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

Unified Diff: media/cast/audio_sender/audio_sender.cc

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/cast/audio_sender/audio_sender.cc
diff --git a/media/cast/audio_sender/audio_sender.cc b/media/cast/audio_sender/audio_sender.cc
index cd62f9b3cb4be098a3532dca047f3a9da7f18166..6af1ce8c6c77dfa5b8ae7a7022e63d3d2db85ac3 100644
--- a/media/cast/audio_sender/audio_sender.cc
+++ b/media/cast/audio_sender/audio_sender.cc
@@ -86,6 +86,8 @@ class LocalRtpSenderStatistics : public RtpSenderStatistics {
base::TimeTicks time_sent_;
uint32 rtp_timestamp_;
+ // NOTE: This must always be last so it's invalidated before other member
+ // variables might be accessed.
base::WeakPtrFactory<LocalRtpSenderStatistics> weak_factory_;
DISALLOW_IMPLICIT_CONSTRUCTORS(LocalRtpSenderStatistics);

Powered by Google App Engine
This is Rietveld 408576698