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

Unified Diff: media/base/android/media_decoder_job.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/audio/alsa/alsa_output.cc ('k') | media/base/android/media_decoder_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_decoder_job.h
diff --git a/media/base/android/media_decoder_job.h b/media/base/android/media_decoder_job.h
index 286d27cf75b5c60251085d7000764736f7a8fd6a..9c5949ae63732c977a11ca3b6b95d642835272f4 100644
--- a/media/base/android/media_decoder_job.h
+++ b/media/base/android/media_decoder_job.h
@@ -170,10 +170,6 @@ class MediaDecoderJob {
// is not very accurate.
bool prerolling_;
- // Weak pointer passed to media decoder jobs for callbacks. It is bounded to
- // the decoder thread.
- base::WeakPtrFactory<MediaDecoderJob> weak_this_;
-
// Callback used to request more data.
base::Closure request_data_cb_;
@@ -200,6 +196,11 @@ class MediaDecoderJob {
// while there is a decode in progress.
bool destroy_pending_;
+ // Weak pointer passed to media decoder jobs for callbacks. It is bounded to
+ // the decoder thread.
+ // NOTE: Weak pointers must be invalidated before all other member variables.
+ base::WeakPtrFactory<MediaDecoderJob> weak_factory_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob);
};
« no previous file with comments | « media/audio/alsa/alsa_output.cc ('k') | media/base/android/media_decoder_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698