diff options
Diffstat (limited to 'chromium/content/renderer/media/webrtc/rtc_peer_connection_handler.h')
-rw-r--r-- | chromium/content/renderer/media/webrtc/rtc_peer_connection_handler.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/chromium/content/renderer/media/webrtc/rtc_peer_connection_handler.h b/chromium/content/renderer/media/webrtc/rtc_peer_connection_handler.h index 74cb1b77c1a..c6700cb154d 100644 --- a/chromium/content/renderer/media/webrtc/rtc_peer_connection_handler.h +++ b/chromium/content/renderer/media/webrtc/rtc_peer_connection_handler.h @@ -162,6 +162,8 @@ class CONTENT_EXPORT RTCPeerConnectionHandler const blink::WebString& label, const blink::WebRTCDataChannelInit& init) override; void Stop() override; + void StopAndUnregister() override; + blink::WebString Id() const override; // Delegate functions to allow for mocking of WebKit interfaces. @@ -302,14 +304,18 @@ class CONTENT_EXPORT RTCPeerConnectionHandler // first call fails. bool initialize_called_; - // |client_| is a weak pointer to the blink object (blink::RTCPeerConnection) + // |client_| is a raw pointer to the blink object (blink::RTCPeerConnection) // that owns this object. - // It is valid for the lifetime of this object. - blink::WebRTCPeerConnectionHandlerClient* const client_; + // It is valid for the lifetime of this object, but is cleared when + // StopAndUnregister() is called, in order to make sure it doesn't + // interfere with garbage collection of the owner object. + blink::WebRTCPeerConnectionHandlerClient* client_; // True if this PeerConnection has been closed. // After the PeerConnection has been closed, this object may no longer // forward callbacks to blink. bool is_closed_; + // True if StopAndUnregister has been called. + bool is_unregistered_; // |dependency_factory_| is a raw pointer, and is valid for the lifetime of // RenderThreadImpl. |