Title: [174475] trunk/Source/WebCore
- Revision
- 174475
- Author
- [email protected]
- Date
- 2014-10-08 13:26:41 -0700 (Wed, 08 Oct 2014)
Log Message
Unreviewed follow-up fix for r174460. Do not register for KVOs if the object does not respond to the requested property.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]):
(-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]):
(-[CDMSessionMediaSourceAVFObjCObserver invalidate]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (174474 => 174475)
--- trunk/Source/WebCore/ChangeLog 2014-10-08 20:26:39 UTC (rev 174474)
+++ trunk/Source/WebCore/ChangeLog 2014-10-08 20:26:41 UTC (rev 174475)
@@ -1,3 +1,12 @@
+2014-10-08 Jer Noble <[email protected]>
+
+ Unreviewed follow-up fix for r174460. Do not register for KVOs if the object does not respond to the requested property.
+
+ * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
+ (-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]):
+ (-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]):
+ (-[CDMSessionMediaSourceAVFObjCObserver invalidate]):
+
2014-10-08 Dean Jackson <[email protected]>
Add deprecation warning for CSSKeyframesRule::appendRule
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm (174474 => 174475)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm 2014-10-08 20:26:39 UTC (rev 174474)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm 2014-10-08 20:26:41 UTC (rev 174475)
@@ -87,21 +87,25 @@
{
ASSERT(!m_parsers.contains(parser));
m_parsers.add(parser);
- [parser addObserver:self forKeyPath:@"sessionIdentifier" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionInitial) context:nullptr];
+ if ([parser respondsToSelector:@selector(sessionIdentifier)])
+ [parser addObserver:self forKeyPath:@"sessionIdentifier" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionInitial) context:nullptr];
}
- (void)stopObserving:(AVStreamDataParser *)parser
{
ASSERT(m_parsers.contains(parser));
m_parsers.remove(parser);
- [parser removeObserver:self forKeyPath:@"sessionIdentifier" context:nullptr];
+ if ([parser respondsToSelector:@selector(sessionIdentifier)])
+ [parser removeObserver:self forKeyPath:@"sessionIdentifier" context:nullptr];
}
- (void)invalidate
{
m_parent = nullptr;
- for (auto& parser : m_parsers)
- [parser removeObserver:self forKeyPath:@"sessionIdentifier" context:nullptr];
+ for (auto& parser : m_parsers) {
+ if ([parser respondsToSelector:@selector(sessionIdentifier)])
+ [parser removeObserver:self forKeyPath:@"sessionIdentifier" context:nullptr];
+ }
m_parsers.clear();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes