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

Unified Diff: media/filters/video_renderer_impl.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/opus_audio_decoder.cc ('k') | media/filters/video_renderer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_renderer_impl.h
diff --git a/media/filters/video_renderer_impl.h b/media/filters/video_renderer_impl.h
index 2baca8a4a582f362e16cba8be90e4330cf6c8966..b45f847259ce8b27ece43ead3cf758e8ab654cf4 100644
--- a/media/filters/video_renderer_impl.h
+++ b/media/filters/video_renderer_impl.h
@@ -137,8 +137,6 @@ class MEDIA_EXPORT VideoRendererImpl
void UpdateStatsAndWait_Locked(base::TimeDelta wait_duration);
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
- base::WeakPtrFactory<VideoRendererImpl> weak_factory_;
- base::WeakPtr<VideoRendererImpl> weak_this_;
// Used for accessing data members.
base::Lock lock_;
@@ -240,6 +238,9 @@ class MEDIA_EXPORT VideoRendererImpl
int frames_decoded_;
int frames_dropped_;
+ // NOTE: Weak pointers must be invalidated before all other member variables.
+ base::WeakPtrFactory<VideoRendererImpl> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl);
};
« no previous file with comments | « media/filters/opus_audio_decoder.cc ('k') | media/filters/video_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698