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

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: 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
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..ff14f6b5ea0d666ea32dbeb0e032c31d6d424c5f 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,11 @@ class MEDIA_EXPORT VideoRendererImpl
int frames_decoded_;
int frames_dropped_;
+ // NOTE: These must always be last so they're invalidated before other member
+ // variables might be accessed.
+ base::WeakPtr<VideoRendererImpl> weak_this_;
Ami GONE FROM CHROMIUM 2014/03/10 22:02:08 ditto
+ base::WeakPtrFactory<VideoRendererImpl> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl);
};

Powered by Google App Engine
This is Rietveld 408576698