Title: [241592] trunk/Source/WebCore
Revision
241592
Author
[email protected]
Date
2019-02-15 10:25:24 -0800 (Fri, 15 Feb 2019)

Log Message

Stop the endpoint synchronously in RTCPeerConnection::close
https://bugs.webkit.org/show_bug.cgi?id=194688

Reviewed by Eric Carlson.

In the case where the peer connection is being closed, it was asynchronously stopping the endpoint.
But the endpoint, before being stopped, could try to fire an event.
If the context is gone in between, we end up with a null pointer dereference.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::close):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (241591 => 241592)


--- trunk/Source/WebCore/ChangeLog	2019-02-15 18:04:48 UTC (rev 241591)
+++ trunk/Source/WebCore/ChangeLog	2019-02-15 18:25:24 UTC (rev 241592)
@@ -1,3 +1,17 @@
+2019-02-15  Youenn Fablet  <[email protected]>
+
+        Stop the endpoint synchronously in RTCPeerConnection::close
+        https://bugs.webkit.org/show_bug.cgi?id=194688
+
+        Reviewed by Eric Carlson.
+
+        In the case where the peer connection is being closed, it was asynchronously stopping the endpoint.
+        But the endpoint, before being stopped, could try to fire an event.
+        If the context is gone in between, we end up with a null pointer dereference.
+
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::close):
+
 2019-02-15  Zalan Bujtas  <[email protected]>
 
         [LFC] Out-of-flow box is never a float box

Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (241591 => 241592)


--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp	2019-02-15 18:04:48 UTC (rev 241591)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp	2019-02-15 18:25:24 UTC (rev 241592)
@@ -437,9 +437,7 @@
 
     updateConnectionState();
     ASSERT(isClosed());
-    scriptExecutionContext()->postTask([protectedThis = makeRef(*this)](ScriptExecutionContext&) {
-        protectedThis->doStop();
-    });
+    doStop();
 }
 
 void RTCPeerConnection::emulatePlatformEvent(const String& action)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to