NSInvalidArgumentException in [WebAVSampleBufferErrorListener observeValueForKeyPath...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2019 04:44:57 +0000 (04:44 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2019 04:44:57 +0000 (04:44 +0000)
commit10173ad1ef9fb539e9cc5088a9c7e6acaa467e55
treebb5199f7af8e1bfdd995532165fa7102f0137aeb
parenteb952f3bbcda9599eed5504259f8c5ce440566bc
NSInvalidArgumentException in [WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]
https://bugs.webkit.org/show_bug.cgi?id=194123
<rdar://problem/47721094>

Reviewed by Eric Carlson.

According to crash logs, AVSampleBufferDisplayLayer.error can go from an NSError* to nil; when such a change is KVO'd,
the NSKeyValueChangeNewKey is a NSNull. Detect this state and bail out early.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm