Chromium Code Reviews| Index: Source/modules/mediastream/RTCDataChannel.h |
| diff --git a/Source/modules/mediastream/RTCDataChannel.h b/Source/modules/mediastream/RTCDataChannel.h |
| index 8cd17b7b7034a3c878273012e3463aa72d3c2af7..42946d66d6e68344e00bb88fa02c764f956b7dab 100644 |
| --- a/Source/modules/mediastream/RTCDataChannel.h |
| +++ b/Source/modules/mediastream/RTCDataChannel.h |
| @@ -43,13 +43,14 @@ namespace WebCore { |
| class Blob; |
| class ExceptionState; |
| +class RTCPeerConnection; |
| class RTCDataChannel FINAL : public RefCountedWillBeRefCountedGarbageCollected<RTCDataChannel>, public ScriptWrappable, public EventTargetWithInlineData, public blink::WebRTCDataChannelHandlerClient { |
| REFCOUNTED_EVENT_TARGET(RTCDataChannel); |
| WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCDataChannel); |
| public: |
| - static PassRefPtrWillBeRawPtr<RTCDataChannel> create(ExecutionContext*, PassOwnPtr<blink::WebRTCDataChannelHandler>); |
| - static PassRefPtrWillBeRawPtr<RTCDataChannel> create(ExecutionContext*, blink::WebRTCPeerConnectionHandler*, const String& label, const blink::WebRTCDataChannelInit&, ExceptionState&); |
| + static PassRefPtrWillBeRawPtr<RTCDataChannel> create(ExecutionContext*, WeakPtrWillBeRawPtr<RTCPeerConnection>, PassOwnPtr<blink::WebRTCDataChannelHandler>); |
| + static PassRefPtrWillBeRawPtr<RTCDataChannel> create(ExecutionContext*, WeakPtrWillBeRawPtr<RTCPeerConnection>, blink::WebRTCPeerConnectionHandler*, const String& label, const blink::WebRTCDataChannelInit&, ExceptionState&); |
| virtual ~RTCDataChannel(); |
| String label() const; |
| @@ -90,7 +91,7 @@ public: |
| virtual void trace(Visitor*) OVERRIDE; |
| private: |
| - RTCDataChannel(ExecutionContext*, PassOwnPtr<blink::WebRTCDataChannelHandler>); |
| + RTCDataChannel(ExecutionContext*, WeakPtrWillBeRawPtr<RTCPeerConnection>, PassOwnPtr<blink::WebRTCDataChannelHandler>); |
| void scheduleDispatchEvent(PassRefPtrWillBeRawPtr<Event>); |
| void scheduledEventTimerFired(Timer<RTCDataChannel>*); |
| @@ -103,6 +104,8 @@ private: |
| virtual void didReceiveRawData(const char*, size_t) OVERRIDE; |
| virtual void didDetectError() OVERRIDE; |
| + void stopAndFireCloseEventIfCreatorWasDeleted(); |
| + |
| OwnPtr<blink::WebRTCDataChannelHandler> m_handler; |
| bool m_stopped; |
| @@ -117,6 +120,8 @@ private: |
| Timer<RTCDataChannel> m_scheduledEventTimer; |
| WillBeHeapVector<RefPtrWillBeMember<Event> > m_scheduledEvents; |
| + |
| + WeakPtrWillBeWeakMember<RTCPeerConnection> m_creator; |
|
keishi
2014/06/17 07:58:21
We need to trace members. You need to add this lin
Henrik Grunell
2014/06/17 08:08:27
Done.
|
| }; |
| } // namespace WebCore |