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

Unified Diff: media/filters/gpu_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 | « media/filters/ffmpeg_video_decoder.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.h
diff --git a/media/filters/gpu_video_decoder.h b/media/filters/gpu_video_decoder.h
index d46e1784dd8e92f20581adf2e9dea1ca9557e826..cb4174256b077a69636183381e61ffb0e9db9001 100644
--- a/media/filters/gpu_video_decoder.h
+++ b/media/filters/gpu_video_decoder.h
@@ -130,10 +130,6 @@ class MEDIA_EXPORT GpuVideoDecoder
bool needs_bitstream_conversion_;
- // Bound to factories_->GetMessageLoop().
- base::WeakPtrFactory<GpuVideoDecoder> weak_factory_;
- base::WeakPtr<GpuVideoDecoder> weak_this_;
-
scoped_refptr<GpuVideoAcceleratorFactories> factories_;
// Populated during Initialize() (on success) and unchanged until an error
@@ -188,6 +184,10 @@ class MEDIA_EXPORT GpuVideoDecoder
// HasAvailableOutputFrames().
int available_pictures_;
+ // Bound to factories_->GetMessageLoop().
+ // NOTE: Weak pointers must be invalidated before all other member variables.
+ base::WeakPtrFactory<GpuVideoDecoder> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder);
};
« no previous file with comments | « media/filters/ffmpeg_video_decoder.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698