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

Unified Diff: media/filters/decrypting_audio_decoder.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/filters/decoder_stream.cc ('k') | media/filters/decrypting_audio_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decrypting_audio_decoder.h
diff --git a/media/filters/decrypting_audio_decoder.h b/media/filters/decrypting_audio_decoder.h
index 43e05e24010036fc74f7eaa877d0d69351a2ab7c..4d00ad5d1c5304d3b4ba1554cd3d5c955c169f2b 100644
--- a/media/filters/decrypting_audio_decoder.h
+++ b/media/filters/decrypting_audio_decoder.h
@@ -99,8 +99,6 @@ class MEDIA_EXPORT DecryptingAudioDecoder : public AudioDecoder {
void EnqueueFrames(const Decryptor::AudioBuffers& frames);
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
- base::WeakPtrFactory<DecryptingAudioDecoder> weak_factory_;
- base::WeakPtr<DecryptingAudioDecoder> weak_this_;
State state_;
@@ -136,6 +134,10 @@ class MEDIA_EXPORT DecryptingAudioDecoder : public AudioDecoder {
scoped_ptr<AudioTimestampHelper> timestamp_helper_;
+ // NOTE: Weak pointers must be invalidated before all other member variables.
+ base::WeakPtrFactory<DecryptingAudioDecoder> weak_factory_;
+ base::WeakPtr<DecryptingAudioDecoder> weak_this_;
+
DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder);
};
« no previous file with comments | « media/filters/decoder_stream.cc ('k') | media/filters/decrypting_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698