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

Unified Diff: content/renderer/media/rtc_peer_connection_handler.h

Issue 1439973006: Reland Fix leak of RTCPeerConnectionHandler if PeerConnection.close() is called from js.… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bug and add expectation. Created 5 years, 1 month 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
Index: content/renderer/media/rtc_peer_connection_handler.h
diff --git a/content/renderer/media/rtc_peer_connection_handler.h b/content/renderer/media/rtc_peer_connection_handler.h
index 8e8af25fcfd40e043f9f4dc7bbbe5dc4f4dde89a..fa45d6a275a5431be2bbb269a5ca160b170640de 100644
--- a/content/renderer/media/rtc_peer_connection_handler.h
+++ b/content/renderer/media/rtc_peer_connection_handler.h
@@ -225,8 +225,14 @@ class CONTENT_EXPORT RTCPeerConnectionHandler
base::ThreadChecker thread_checker_;
- // |client_| is a weak pointer, and is valid until stop() has returned.
- blink::WebRTCPeerConnectionHandlerClient* client_;
+ // |client_| is a weak pointer to the blink object (blink::RTCPeerConnection)
+ // that owns this object.
+ // It is valid for the lifetime of this object.
+ blink::WebRTCPeerConnectionHandlerClient* const 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_;
// |dependency_factory_| is a raw pointer, and is valid for the lifetime of
// RenderThreadImpl.
« no previous file with comments | « content/renderer/media/mock_peer_connection_impl.h ('k') | content/renderer/media/rtc_peer_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698