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

Unified Diff: media/base/serial_runner.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/android/media_source_player.cc ('k') | media/base/serial_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/serial_runner.h
diff --git a/media/base/serial_runner.h b/media/base/serial_runner.h
index 44300dc1d96ac25a62d6dfbe9fabdb3c04cfab7b..6d3d1996593f7cbb686971bb024893440add9a56 100644
--- a/media/base/serial_runner.h
+++ b/media/base/serial_runner.h
@@ -71,11 +71,13 @@ class MEDIA_EXPORT SerialRunner {
void RunNextInSeries(PipelineStatus last_status);
- base::WeakPtrFactory<SerialRunner> weak_this_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
Queue bound_fns_;
PipelineStatusCB done_cb_;
+ // NOTE: Weak pointers must be invalidated before all other member variables.
+ base::WeakPtrFactory<SerialRunner> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(SerialRunner);
};
« no previous file with comments | « media/base/android/media_source_player.cc ('k') | media/base/serial_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698