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

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

Issue 1438153002: Fix leak of RTCPeerConnectionHandler if PeerConnection.close() is called from js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simple unittest of DestructAllHandlers 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..a2e1b2046ff58a862d66207488773b76a07e0abd 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.
+ // |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* client_;
+ // True if this PeerConnection has been closed.
+ // After PeerConnection has been closed, this object may no longer forward
tommi (sloooow) - chröme 2015/11/12 14:53:19 nit: After the PeerConnection has been ...
perkj_chrome 2015/11/12 15:48:38 Done.
+ // callbacks to blink.
+ bool is_closed_;
// |dependency_factory_| is a raw pointer, and is valid for the lifetime of
// RenderThreadImpl.

Powered by Google App Engine
This is Rietveld 408576698