Changeset 174475 in webkit
- Timestamp:
- Oct 8, 2014, 1:26:41 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r174469 r174475 1 2014-10-08 Jer Noble <jer.noble@apple.com> 2 3 Unreviewed follow-up fix for r174460. Do not register for KVOs if the object does not respond to the requested property. 4 5 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: 6 (-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]): 7 (-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]): 8 (-[CDMSessionMediaSourceAVFObjCObserver invalidate]): 9 1 10 2014-10-08 Dean Jackson <dino@apple.com> 2 11 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm
r174460 r174475 88 88 ASSERT(!m_parsers.contains(parser)); 89 89 m_parsers.add(parser); 90 [parser addObserver:self forKeyPath:@"sessionIdentifier" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionInitial) context:nullptr]; 90 if ([parser respondsToSelector:@selector(sessionIdentifier)]) 91 [parser addObserver:self forKeyPath:@"sessionIdentifier" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionInitial) context:nullptr]; 91 92 } 92 93 … … 95 96 ASSERT(m_parsers.contains(parser)); 96 97 m_parsers.remove(parser); 97 [parser removeObserver:self forKeyPath:@"sessionIdentifier" context:nullptr]; 98 if ([parser respondsToSelector:@selector(sessionIdentifier)]) 99 [parser removeObserver:self forKeyPath:@"sessionIdentifier" context:nullptr]; 98 100 } 99 101 … … 101 103 { 102 104 m_parent = nullptr; 103 for (auto& parser : m_parsers) 104 [parser removeObserver:self forKeyPath:@"sessionIdentifier" context:nullptr]; 105 for (auto& parser : m_parsers) { 106 if ([parser respondsToSelector:@selector(sessionIdentifier)]) 107 [parser removeObserver:self forKeyPath:@"sessionIdentifier" context:nullptr]; 108 } 105 109 m_parsers.clear(); 106 110 }
Note:
See TracChangeset
for help on using the changeset viewer.