Title: [209685] trunk/Source/WebCore
Revision
209685
Author
[email protected]
Date
2016-12-11 14:08:05 -0800 (Sun, 11 Dec 2016)

Log Message

[MediaStream] Protect MediaDevicesRequest during callback
https://bugs.webkit.org/show_bug.cgi?id=165711
<rdar://problem/28400468>

Reviewed by Sam Weinig.

No new tests, I was unable to create a reproducible test but this fix avoids
an occasional crash in existing tests.

* Modules/mediastream/MediaDevicesEnumerationRequest.cpp:
(WebCore::MediaDevicesEnumerationRequest::start): Take a reference to the object
before calling the controller in case the completion handler is called synchronously.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (209684 => 209685)


--- trunk/Source/WebCore/ChangeLog	2016-12-11 22:00:17 UTC (rev 209684)
+++ trunk/Source/WebCore/ChangeLog	2016-12-11 22:08:05 UTC (rev 209685)
@@ -1,3 +1,18 @@
+2016-12-11  Eric Carlson  <[email protected]>
+
+        [MediaStream] Protect MediaDevicesRequest during callback
+        https://bugs.webkit.org/show_bug.cgi?id=165711
+        <rdar://problem/28400468>
+
+        Reviewed by Sam Weinig.
+
+        No new tests, I was unable to create a reproducible test but this fix avoids
+        an occasional crash in existing tests.
+
+        * Modules/mediastream/MediaDevicesEnumerationRequest.cpp:
+        (WebCore::MediaDevicesEnumerationRequest::start): Take a reference to the object
+        before calling the controller in case the completion handler is called synchronously.
+
 2016-12-09  Filip Pizlo  <[email protected]>
 
         The DOM should have an advancing wavefront opaque root barrier

Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevicesEnumerationRequest.cpp (209684 => 209685)


--- trunk/Source/WebCore/Modules/mediastream/MediaDevicesEnumerationRequest.cpp	2016-12-11 22:00:17 UTC (rev 209684)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevicesEnumerationRequest.cpp	2016-12-11 22:08:05 UTC (rev 209685)
@@ -88,6 +88,7 @@
     if (!controller)
         return;
 
+    Ref<MediaDevicesEnumerationRequest> protectedThis(*this);
     controller->enumerateMediaDevices(*this);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to