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

Unified Diff: media/filters/decrypting_video_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/decrypting_demuxer_stream.cc ('k') | media/filters/decrypting_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decrypting_video_decoder.h
diff --git a/media/filters/decrypting_video_decoder.h b/media/filters/decrypting_video_decoder.h
index f0fd27ac757be241a48513a2947f7fcca5c6217a..89c72c2851a767bd72d7c5c64da151a0152a1e9a 100644
--- a/media/filters/decrypting_video_decoder.h
+++ b/media/filters/decrypting_video_decoder.h
@@ -79,8 +79,6 @@ class MEDIA_EXPORT DecryptingVideoDecoder : public VideoDecoder {
void DoStop();
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
- base::WeakPtrFactory<DecryptingVideoDecoder> weak_factory_;
- base::WeakPtr<DecryptingVideoDecoder> weak_this_;
State state_;
@@ -109,6 +107,10 @@ class MEDIA_EXPORT DecryptingVideoDecoder : public VideoDecoder {
// matching DecryptCB call (in DoDeliverFrame()).
uint32 trace_id_;
+ // NOTE: Weak pointers must be invalidated before all other member variables.
+ base::WeakPtrFactory<DecryptingVideoDecoder> weak_factory_;
+ base::WeakPtr<DecryptingVideoDecoder> weak_this_;
+
DISALLOW_COPY_AND_ASSIGN(DecryptingVideoDecoder);
};
« no previous file with comments | « media/filters/decrypting_demuxer_stream.cc ('k') | media/filters/decrypting_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698