Title: [240834] trunk/Source/WebCore
- Revision
- 240834
- Author
- jer.no...@apple.com
- Date
- 2019-01-31 20:44:57 -0800 (Thu, 31 Jan 2019)
Log Message
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:]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (240833 => 240834)
--- trunk/Source/WebCore/ChangeLog 2019-02-01 02:32:33 UTC (rev 240833)
+++ trunk/Source/WebCore/ChangeLog 2019-02-01 04:44:57 UTC (rev 240834)
@@ -1,5 +1,19 @@
2019-01-31 Jer Noble <jer.no...@apple.com>
+ 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:]):
+
+2019-01-31 Jer Noble <jer.no...@apple.com>
+
[Cocoa][EME] AirPlaying a FairPlay-protected HLS stream fails to decrypt
https://bugs.webkit.org/show_bug.cgi?id=194114
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm (240833 => 240834)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm 2019-02-01 02:32:33 UTC (rev 240833)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm 2019-02-01 04:44:57 UTC (rev 240834)
@@ -356,6 +356,9 @@
if ([keyPath isEqualToString:@"error"]) {
RetainPtr<NSError> error = [change valueForKey:NSKeyValueChangeNewKey];
+ if ([error isKindOfClass:[NSNull class]])
+ return;
+
callOnMainThread([parent = _parent, layer = WTFMove(layer), error = WTFMove(error)] {
if (parent)
parent->layerDidReceiveError(layer.get(), error.get());
@@ -373,6 +376,8 @@
RetainPtr<AVSampleBufferAudioRenderer> renderer = (AVSampleBufferAudioRenderer *)object;
ALLOW_NEW_API_WITHOUT_GUARDS_END
RetainPtr<NSError> error = [change valueForKey:NSKeyValueChangeNewKey];
+ if ([error isKindOfClass:[NSNull class]])
+ return;
ASSERT(_renderers.contains(renderer.get()));
ASSERT([keyPath isEqualToString:@"error"]);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes