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

Unified Diff: media/cast/video_receiver/video_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/video_receiver/video_receiver.h
diff --git a/media/cast/video_receiver/video_receiver.h b/media/cast/video_receiver/video_receiver.h
index 3f4d8123921c13a14c22ffec9a71779abe9f238a..d63af95fba462b4b95d3f19f4cef0df598577238 100644
--- a/media/cast/video_receiver/video_receiver.h
+++ b/media/cast/video_receiver/video_receiver.h
@@ -126,6 +126,8 @@ class VideoReceiver : public base::NonThreadSafe,
// it allows the event to be transmitted via RTCP.
RtpTimestamp frame_id_to_rtp_timestamp_[256];
+ // NOTE: This must always be last so it's invalidated before other member
+ // variables might be accessed.
base::WeakPtrFactory<VideoReceiver> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(VideoReceiver);

Powered by Google App Engine
This is Rietveld 408576698