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

Unified Diff: media/filters/audio_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/audio_renderer_impl.h
diff --git a/media/filters/audio_renderer_impl.h b/media/filters/audio_renderer_impl.h
index 2617bdd87421cc1f1ee7bd17097b78413167a9b7..a3b73fa20d410d44edd6d7e29f57bc84cd1255ff 100644
--- a/media/filters/audio_renderer_impl.h
+++ b/media/filters/audio_renderer_impl.h
@@ -188,8 +188,6 @@ class MEDIA_EXPORT AudioRendererImpl
void StopDecoder();
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
- base::WeakPtrFactory<AudioRendererImpl> weak_factory_;
- base::WeakPtr<AudioRendererImpl> weak_this_;
scoped_ptr<AudioSplicer> splicer_;
@@ -280,6 +278,11 @@ class MEDIA_EXPORT AudioRendererImpl
// End variables which must be accessed under |lock_|. ----------------------
+ // NOTE: These must always be last so they're invalidated before other member
+ // variables might be accessed.
+ base::WeakPtr<AudioRendererImpl> weak_this_;
Ami GONE FROM CHROMIUM 2014/03/10 22:02:08 ditto
+ base::WeakPtrFactory<AudioRendererImpl> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl);
};

Powered by Google App Engine
This is Rietveld 408576698