Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(832)

Unified Diff: third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp

Issue 2049003002: Wrap GCed raw pointer parameters of WTF::bind with Persistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert "unretained" part and "disallow pointers" part Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
index fd96d6119b39cdd45bc2dee7251e17f03037ced3..9355e4e2d4404324e08051985be466a546b4f807 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
@@ -112,7 +112,7 @@ bool throwExceptionIfSignalingStateClosed(RTCPeerConnection::SignalingState stat
void asyncCallErrorCallback(RTCPeerConnectionErrorCallback* errorCallback, DOMException* exception)
{
DCHECK(errorCallback);
- Microtask::enqueueMicrotask(bind(&RTCPeerConnectionErrorCallback::handleEvent, errorCallback, exception));
+ Microtask::enqueueMicrotask(bind(&RTCPeerConnectionErrorCallback::handleEvent, wrapCrossThreadPersistent(errorCallback), wrapCrossThreadPersistent(exception)));
}
bool callErrorCallbackIfSignalingStateClosed(RTCPeerConnection::SignalingState state, RTCPeerConnectionErrorCallback* errorCallback)
@@ -1181,7 +1181,7 @@ void RTCPeerConnection::changeIceConnectionState(ICEConnectionState iceConnectio
{
if (m_iceConnectionState != ICEConnectionStateClosed) {
scheduleDispatchEvent(Event::create(EventTypeNames::iceconnectionstatechange),
- WTF::bind(&RTCPeerConnection::setIceConnectionState, this, iceConnectionState));
+ WTF::bind(&RTCPeerConnection::setIceConnectionState, wrapCrossThreadPersistent(this), iceConnectionState));
}
}

Powered by Google App Engine
This is Rietveld 408576698