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

Unified Diff: content/renderer/media/rtc_video_encoder.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: content/renderer/media/rtc_video_encoder.h
diff --git a/content/renderer/media/rtc_video_encoder.h b/content/renderer/media/rtc_video_encoder.h
index 4d27ff2f82640868a432c59362192c3e5de73d86..2d433851c8d6a6211ab2621afd3fa82107432584 100644
--- a/content/renderer/media/rtc_video_encoder.h
+++ b/content/renderer/media/rtc_video_encoder.h
@@ -99,7 +99,8 @@ class CONTENT_EXPORT RTCVideoEncoder
int32_t impl_status_;
// Weak pointer factory for posting back VEA::Client notifications to
- // RTCVideoEncoder.
+ // RTCVideoEncoder. NOTE: This must always be last so it's invalidated before
+ // other member variables might be accessed.
base::WeakPtrFactory<RTCVideoEncoder> weak_this_factory_;
DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoder);

Powered by Google App Engine
This is Rietveld 408576698