Index: Source/modules/mediastream/RTCDTMFSender.cpp |
diff --git a/Source/modules/mediastream/RTCDTMFSender.cpp b/Source/modules/mediastream/RTCDTMFSender.cpp |
index 7759f1075e0eff6d9c2f32e185d279d132f0df5e..0faa9697b797594094a64e1f2f80ddde9592f75a 100644 |
--- a/Source/modules/mediastream/RTCDTMFSender.cpp |
+++ b/Source/modules/mediastream/RTCDTMFSender.cpp |
@@ -44,21 +44,21 @@ static const long maxToneDurationMs = 6000; |
static const long minInterToneGapMs = 50; |
static const long defaultInterToneGapMs = 50; |
-PassRefPtr<RTCDTMFSender> RTCDTMFSender::create(ExecutionContext* context, blink::WebRTCPeerConnectionHandler* peerConnectionHandler, PassRefPtr<MediaStreamTrack> prpTrack, ExceptionState& exceptionState) |
+PassRefPtrWillBeRawPtr<RTCDTMFSender> RTCDTMFSender::create(ExecutionContext* context, blink::WebRTCPeerConnectionHandler* peerConnectionHandler, PassRefPtrWillBeRawPtr<MediaStreamTrack> prpTrack, ExceptionState& exceptionState) |
{ |
- RefPtr<MediaStreamTrack> track = prpTrack; |
+ RefPtrWillBeRawPtr<MediaStreamTrack> track = prpTrack; |
OwnPtr<blink::WebRTCDTMFSenderHandler> handler = adoptPtr(peerConnectionHandler->createDTMFSender(track->component())); |
if (!handler) { |
exceptionState.throwDOMException(NotSupportedError, "The MediaStreamTrack provided is not an element of a MediaStream that's currently in the local streams set."); |
return nullptr; |
} |
- RefPtr<RTCDTMFSender> dtmfSender = adoptRef(new RTCDTMFSender(context, track, handler.release())); |
+ RefPtrWillBeRawPtr<RTCDTMFSender> dtmfSender = adoptRefWillBeRefCountedGarbageCollected(new RTCDTMFSender(context, track, handler.release())); |
dtmfSender->suspendIfNeeded(); |
return dtmfSender.release(); |
} |
-RTCDTMFSender::RTCDTMFSender(ExecutionContext* context, PassRefPtr<MediaStreamTrack> track, PassOwnPtr<blink::WebRTCDTMFSenderHandler> handler) |
+RTCDTMFSender::RTCDTMFSender(ExecutionContext* context, PassRefPtrWillBeRawPtr<MediaStreamTrack> track, PassOwnPtr<blink::WebRTCDTMFSenderHandler> handler) |
: ActiveDOMObject(context) |
, m_track(track) |
, m_duration(defaultToneDurationMs) |
@@ -166,4 +166,10 @@ void RTCDTMFSender::scheduledEventTimerFired(Timer<RTCDTMFSender>*) |
dispatchEvent((*it).release()); |
} |
+void RTCDTMFSender::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_track); |
+ visitor->trace(m_scheduledEvents); |
+} |
+ |
} // namespace WebCore |