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

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

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 9 months 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
« no previous file with comments | « content/renderer/media/crypto/proxy_decryptor.cc ('k') | content/renderer/media/rtc_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_video_decoder.h
diff --git a/content/renderer/media/rtc_video_decoder.h b/content/renderer/media/rtc_video_decoder.h
index 007f9b0490a3bf38d992ee583eccf91c9f2d7c6f..f0eb4bdd66a7b7f9fe943e69827f91770fe81ca7 100644
--- a/content/renderer/media/rtc_video_decoder.h
+++ b/content/renderer/media/rtc_video_decoder.h
@@ -202,9 +202,6 @@ class CONTENT_EXPORT RTCVideoDecoder
// The size of the incoming video frames.
gfx::Size frame_size_;
- // Weak pointer to this, which can be dereferenced only on |vda_task_runner_|.
- base::WeakPtr<RTCVideoDecoder> weak_this_;
-
scoped_refptr<media::GpuVideoAcceleratorFactories> factories_;
// The task runner to run callbacks on. This is from |factories_|.
@@ -269,8 +266,8 @@ class CONTENT_EXPORT RTCVideoDecoder
// Release has been called. Guarded by |lock_|.
int32 reset_bitstream_buffer_id_;
- // Factory used to populate |weak_this_|. Must be destroyed, or invalidated,
- // on |vda_loop_proxy_|.
+ // Must be destroyed, or invalidated, on |vda_loop_proxy_|
+ // NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<RTCVideoDecoder> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RTCVideoDecoder);
« no previous file with comments | « content/renderer/media/crypto/proxy_decryptor.cc ('k') | content/renderer/media/rtc_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698