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

Unified Diff: media/cast/audio_sender/audio_sender.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/cast/audio_sender/audio_encoder.cc ('k') | media/cast/audio_sender/audio_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/audio_sender/audio_sender.h
diff --git a/media/cast/audio_sender/audio_sender.h b/media/cast/audio_sender/audio_sender.h
index 7673b8250faf71d592f4cc6a200ff984f5dd21a5..57ab7e01299c4947b3d171ef5f189543061875c4 100644
--- a/media/cast/audio_sender/audio_sender.h
+++ b/media/cast/audio_sender/audio_sender.h
@@ -68,8 +68,6 @@ class AudioSender : public base::NonThreadSafe,
void InitializeTimers();
- base::WeakPtrFactory<AudioSender> weak_factory_;
-
scoped_refptr<CastEnvironment> cast_environment_;
transport::CastTransportSender* const transport_sender_;
scoped_ptr<AudioEncoder> audio_encoder_;
@@ -79,6 +77,9 @@ class AudioSender : public base::NonThreadSafe,
bool timers_initialized_;
CastInitializationStatus cast_initialization_cb_;
+ // NOTE: Weak pointers must be invalidated before all other member variables.
+ base::WeakPtrFactory<AudioSender> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(AudioSender);
};
« no previous file with comments | « media/cast/audio_sender/audio_encoder.cc ('k') | media/cast/audio_sender/audio_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698