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

Unified Diff: media/cast/test/utility/in_process_receiver.h

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: media/cast/test/utility/in_process_receiver.h
diff --git a/media/cast/test/utility/in_process_receiver.h b/media/cast/test/utility/in_process_receiver.h
index 57d8a8631488b890dd4d2298ea5f5b6f714c82cf..6371f6133d20f6ac7b3119c0a0e3e083439c6f30 100644
--- a/media/cast/test/utility/in_process_receiver.h
+++ b/media/cast/test/utility/in_process_receiver.h
@@ -101,7 +101,8 @@ class InProcessReceiver {
scoped_ptr<transport::UdpTransport> transport_;
scoped_ptr<CastReceiver> cast_receiver_;
- // For shutdown safety, this member must be last:
+ // NOTE: This must always be last so it's invalidated before other member
+ // variables might be accessed.
base::WeakPtrFactory<InProcessReceiver> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(InProcessReceiver);

Powered by Google App Engine
This is Rietveld 408576698