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

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

Issue 342683002: Oilpan: Use weak processing to stop a closed RTCPeerConnection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Created 6 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: Source/modules/mediastream/RTCPeerConnection.cpp
diff --git a/Source/modules/mediastream/RTCPeerConnection.cpp b/Source/modules/mediastream/RTCPeerConnection.cpp
index 9fa043f41ad084136ab707cbb02866952bb0f86f..dbfbb975db26dd0466812fe23eed67836377a814 100644
--- a/Source/modules/mediastream/RTCPeerConnection.cpp
+++ b/Source/modules/mediastream/RTCPeerConnection.cpp
@@ -220,10 +220,9 @@ RTCPeerConnection::~RTCPeerConnection()
// We are assuming that a wrapper is always created when RTCPeerConnection is created.
ASSERT(m_closed || m_stopped);
- // FIXME: Oilpan: We can't call stop here since it touches m_dataChannels.
- // Another way to ensure that data channels are stopped at RTCPeerConnection
- // destruction is needed.
+#if !ENABLE(OILPAN)
stop();
+#endif
}
void RTCPeerConnection::createOffer(PassOwnPtr<RTCSessionDescriptionCallback> successCallback, PassOwnPtr<RTCErrorCallback> errorCallback, const Dictionary& mediaConstraints, ExceptionState& exceptionState)
@@ -515,7 +514,7 @@ PassRefPtrWillBeRawPtr<RTCDataChannel> RTCPeerConnection::createDataChannel(Stri
options.get("protocol", protocolString);
init.protocol = protocolString;
- RefPtrWillBeRawPtr<RTCDataChannel> channel = RTCDataChannel::create(executionContext(), m_peerHandler.get(), label, init, exceptionState);
+ RefPtrWillBeRawPtr<RTCDataChannel> channel = RTCDataChannel::create(executionContext(), this, m_peerHandler.get(), label, init, exceptionState);
if (exceptionState.hadException())
return nullptr;
m_dataChannels.append(channel);
@@ -649,7 +648,7 @@ void RTCPeerConnection::didAddRemoteDataChannel(blink::WebRTCDataChannelHandler*
if (m_signalingState == SignalingStateClosed)
return;
- RefPtrWillBeRawPtr<RTCDataChannel> channel = RTCDataChannel::create(executionContext(), adoptPtr(handler));
+ RefPtrWillBeRawPtr<RTCDataChannel> channel = RTCDataChannel::create(executionContext(), this, adoptPtr(handler));
m_dataChannels.append(channel);
scheduleDispatchEvent(RTCDataChannelEvent::create(EventTypeNames::datachannel, false, false, channel.release()));

Powered by Google App Engine
This is Rietveld 408576698