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

Unified Diff: media/cast/audio_receiver/audio_receiver.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/base/user_input_monitor_win.cc ('k') | media/cast/audio_sender/audio_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/audio_receiver/audio_receiver.h
diff --git a/media/cast/audio_receiver/audio_receiver.h b/media/cast/audio_receiver/audio_receiver.h
index 2742399f33a8a4b5a2ed64da63d412663b09465d..6270498b6a4b54d9f4a9e1f3817644c50d08c9fe 100644
--- a/media/cast/audio_receiver/audio_receiver.h
+++ b/media/cast/audio_receiver/audio_receiver.h
@@ -123,8 +123,6 @@ class AudioReceiver : public base::NonThreadSafe,
// Processes raw audio events to be sent over to the cast sender via RTCP.
ReceiverRtcpEventSubscriber event_subscriber_;
- base::WeakPtrFactory<AudioReceiver> weak_factory_;
-
const transport::AudioCodec codec_;
const int frequency_;
base::TimeDelta target_delay_delta_;
@@ -148,6 +146,9 @@ class AudioReceiver : public base::NonThreadSafe,
// it allows the event to be transmitted via RTCP.
RtpTimestamp frame_id_to_rtp_timestamp_[256];
+ // NOTE: Weak pointers must be invalidated before all other member variables.
+ base::WeakPtrFactory<AudioReceiver> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(AudioReceiver);
};
« no previous file with comments | « media/base/user_input_monitor_win.cc ('k') | media/cast/audio_sender/audio_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698