Skip to content
Permalink
Browse files
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):


Canonical link: https://commits.webkit.org/209090@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
youennf committed Feb 15, 2019
1 parent 42e556c commit 1c300bf345259f03a5336532c32c28b951e72824
Showing 2 changed files with 15 additions and 3 deletions.
@@ -1,3 +1,17 @@
2019-02-15 Youenn Fablet <youenn@apple.com>

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 <zalan@apple.com>

[LFC] Out-of-flow box is never a float box
@@ -437,9 +437,7 @@ void RTCPeerConnection::close()

updateConnectionState();
ASSERT(isClosed());
scriptExecutionContext()->postTask([protectedThis = makeRef(*this)](ScriptExecutionContext&) {
protectedThis->doStop();
});
doStop();
}

void RTCPeerConnection::emulatePlatformEvent(const String& action)

0 comments on commit 1c300bf

Please sign in to comment.