Title: [241738] trunk/Source/WebCore
Revision
241738
Author
jer.no...@apple.com
Date
2019-02-18 14:43:10 -0800 (Mon, 18 Feb 2019)

Log Message

Uncaught Exception crash in MediaPlayerPrivateAVFoundationObjC::setShouldObserveTimeControlStatus()
https://bugs.webkit.org/show_bug.cgi?id=194786

Reviewed by Eric Carlson.

Convert a runtime crash to a debug assert by wrapping the call to -[AVPlayer removeObserver:forKeyPath:]
in an exception handler.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldObserveTimeControlStatus):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (241737 => 241738)


--- trunk/Source/WebCore/ChangeLog	2019-02-18 22:43:07 UTC (rev 241737)
+++ trunk/Source/WebCore/ChangeLog	2019-02-18 22:43:10 UTC (rev 241738)
@@ -1,3 +1,16 @@
+2019-02-18  Jer Noble  <jer.no...@apple.com>
+
+        Uncaught Exception crash in MediaPlayerPrivateAVFoundationObjC::setShouldObserveTimeControlStatus()
+        https://bugs.webkit.org/show_bug.cgi?id=194786
+
+        Reviewed by Eric Carlson.
+
+        Convert a runtime crash to a debug assert by wrapping the call to -[AVPlayer removeObserver:forKeyPath:]
+        in an exception handler.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldObserveTimeControlStatus):
+
 2019-02-18  Daniel Bates  <daba...@apple.com>
 
         [iOS] Keyups for non-modifier keys identified as "Dead" when not focused in a content-editable element

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (241737 => 241738)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2019-02-18 22:43:07 UTC (rev 241737)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2019-02-18 22:43:10 UTC (rev 241738)
@@ -3368,8 +3368,11 @@
     if (shouldObserve) {
         [m_avPlayer addObserver:m_objcObserver.get() forKeyPath:@"timeControlStatus" options:NSKeyValueObservingOptionNew context:(void *)MediaPlayerAVFoundationObservationContextPlayer];
         timeControlStatusDidChange(m_avPlayer.get().timeControlStatus);
-    } else
+    } else {
+BEGIN_BLOCK_OBJC_EXCEPTIONS
         [m_avPlayer removeObserver:m_objcObserver.get() forKeyPath:@"timeControlStatus"];
+END_BLOCK_OBJC_EXCEPTIONS
+    }
 }
 
 NSArray* assetMetadataKeyNames()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to