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

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

Issue 1916283003: [K6] Replace bind() + GCed pointers with retainedRef() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Kuroneko_5c
Patch Set: Rebase Created 4 years, 8 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 b4219580f00332680fe9dae67ba8f456f06256fb..2b529c581f906f54252a14423fb3754d90d3ea5f 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, retainedRef(errorCallback), retainedRef(exception)));
}
bool callErrorCallbackIfSignalingStateClosed(RTCPeerConnection::SignalingState state, RTCPeerConnectionErrorCallback* errorCallback)
@@ -1163,7 +1163,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, retainedRef(this), iceConnectionState));
}
}

Powered by Google App Engine
This is Rietveld 408576698