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

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

Issue 1634073003: Remove references between RTCPeerConnection and RTCDataChannel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove RTCPeerConnection reference from RTCDataChannel Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 063d4345a168cf49a4d1669964eb0608736d8964..805d30b2dd5f08df19447586300b124a05fdcc52 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
@@ -796,10 +796,9 @@ RTCDataChannel* RTCPeerConnection::createDataChannel(String label, const Diction
DictionaryHelper::get(options, "protocol", protocolString);
init.protocol = protocolString;
- RTCDataChannel* channel = RTCDataChannel::create(executionContext(), this, m_peerHandler.get(), label, init, exceptionState);
+ RTCDataChannel* channel = RTCDataChannel::create(executionContext(), m_peerHandler.get(), label, init, exceptionState);
if (exceptionState.hadException())
return nullptr;
- m_dataChannels.append(channel);
RTCDataChannel::ReadyState handlerState = channel->getHandlerState();
if (handlerState != RTCDataChannel::ReadyStateConnecting) {
// There was an early state transition. Don't miss it!
@@ -925,9 +924,7 @@ void RTCPeerConnection::didAddRemoteDataChannel(WebRTCDataChannelHandler* handle
if (m_signalingState == SignalingStateClosed)
return;
- RTCDataChannel* channel = RTCDataChannel::create(executionContext(), this, adoptPtr(handler));
- m_dataChannels.append(channel);
-
+ RTCDataChannel* channel = RTCDataChannel::create(executionContext(), adoptPtr(handler));
scheduleDispatchEvent(RTCDataChannelEvent::create(EventTypeNames::datachannel, false, false, channel));
}
@@ -971,11 +968,6 @@ void RTCPeerConnection::stop()
m_iceConnectionState = ICEConnectionStateClosed;
m_signalingState = SignalingStateClosed;
- HeapVector<Member<RTCDataChannel>>::iterator i = m_dataChannels.begin();
- for (; i != m_dataChannels.end(); ++i)
- (*i)->stop();
- m_dataChannels.clear();
-
m_dispatchScheduledEventRunner->stop();
m_peerHandler.clear();
@@ -1057,7 +1049,6 @@ DEFINE_TRACE(RTCPeerConnection)
{
visitor->trace(m_localStreams);
visitor->trace(m_remoteStreams);
- visitor->trace(m_dataChannels);
visitor->trace(m_dispatchScheduledEventRunner);
visitor->trace(m_scheduledEvents);
RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnection>::trace(visitor);
« no previous file with comments | « third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698