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

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..49d1453d212f511381397f97d12de9115b671ff7 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)
@@ -489,6 +488,7 @@ MediaStream* RTCPeerConnection::getStreamById(const String& streamId)
void RTCPeerConnection::getStats(PassOwnPtr<RTCStatsCallback> successCallback, PassRefPtr<MediaStreamTrack> selector)
{
+ ASSERT(m_peerHandler);
haraken 2014/06/18 09:17:09 What is this ASSERT for?
keishi 2014/06/18 10:48:00 Removed.
RefPtr<RTCStatsRequest> statsRequest = RTCStatsRequestImpl::create(executionContext(), this, successCallback, selector);
// FIXME: Add passing selector as part of the statsRequest.
m_peerHandler->getStats(statsRequest.release());
@@ -515,7 +515,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 +649,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