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

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

Issue 173363002: Move mediastream module to oilpan transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 7 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 | « Source/modules/mediastream/RTCDataChannel.h ('k') | Source/modules/mediastream/RTCDataChannel.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/mediastream/RTCDataChannel.cpp
diff --git a/Source/modules/mediastream/RTCDataChannel.cpp b/Source/modules/mediastream/RTCDataChannel.cpp
index 43e24e8ff655fb5f953b15db69d7cea026a0f45d..01ee63c985618203b2faa416bce8b486b2cb8e8a 100644
--- a/Source/modules/mediastream/RTCDataChannel.cpp
+++ b/Source/modules/mediastream/RTCDataChannel.cpp
@@ -52,20 +52,20 @@ static void throwNoBlobSupportException(ExceptionState& exceptionState)
exceptionState.throwDOMException(NotSupportedError, "Blob support not implemented yet");
}
-PassRefPtr<RTCDataChannel> RTCDataChannel::create(ExecutionContext* context, PassOwnPtr<blink::WebRTCDataChannelHandler> handler)
+PassRefPtrWillBeRawPtr<RTCDataChannel> RTCDataChannel::create(ExecutionContext* context, PassOwnPtr<blink::WebRTCDataChannelHandler> handler)
{
ASSERT(handler);
- return adoptRef(new RTCDataChannel(context, handler));
+ return adoptRefWillBeRefCountedGarbageCollected(new RTCDataChannel(context, handler));
}
-PassRefPtr<RTCDataChannel> RTCDataChannel::create(ExecutionContext* context, blink::WebRTCPeerConnectionHandler* peerConnectionHandler, const String& label, const blink::WebRTCDataChannelInit& init, ExceptionState& exceptionState)
+PassRefPtrWillBeRawPtr<RTCDataChannel> RTCDataChannel::create(ExecutionContext* context, blink::WebRTCPeerConnectionHandler* peerConnectionHandler, const String& label, const blink::WebRTCDataChannelInit& init, ExceptionState& exceptionState)
{
OwnPtr<blink::WebRTCDataChannelHandler> handler = adoptPtr(peerConnectionHandler->createDataChannel(label, init));
if (!handler) {
exceptionState.throwDOMException(NotSupportedError, "RTCDataChannel is not supported");
return nullptr;
}
- return adoptRef(new RTCDataChannel(context, handler.release()));
+ return adoptRefWillBeRefCountedGarbageCollected(new RTCDataChannel(context, handler.release()));
}
RTCDataChannel::RTCDataChannel(ExecutionContext* context, PassOwnPtr<blink::WebRTCDataChannelHandler> handler)
@@ -314,4 +314,9 @@ void RTCDataChannel::scheduledEventTimerFired(Timer<RTCDataChannel>*)
events.clear();
}
+void RTCDataChannel::trace(Visitor* visitor)
+{
+ visitor->trace(m_scheduledEvents);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/modules/mediastream/RTCDataChannel.h ('k') | Source/modules/mediastream/RTCDataChannel.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698