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

Unified Diff: content/browser/media/android/media_resource_getter_impl.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/browser/media/android/media_resource_getter_impl.h
diff --git a/content/browser/media/android/media_resource_getter_impl.h b/content/browser/media/android/media_resource_getter_impl.h
index d3d0d57764f973b493f805e61a989983e77adbea..e5885d4578fae9e2d2cbe41b0d5641a962e75f5e 100644
--- a/content/browser/media/android/media_resource_getter_impl.h
+++ b/content/browser/media/android/media_resource_getter_impl.h
@@ -69,15 +69,16 @@ class MediaResourceGetterImpl : public media::MediaResourceGetter {
// FileSystemContext to be used on FILE thread.
fileapi::FileSystemContext* file_system_context_;
- // Used to post tasks.
- base::WeakPtrFactory<MediaResourceGetterImpl> weak_this_;
-
// Render process id, used to check whether the process can access cookies.
int renderer_id_;
// Routing id for the render view, used to check tab specific cookie policy.
int routing_id_;
+ // Used to post tasks. NOTE: This must always be last so it's invalidated
+ // before other member variables might be accessed.
+ base::WeakPtrFactory<MediaResourceGetterImpl> weak_this_;
+
DISALLOW_COPY_AND_ASSIGN(MediaResourceGetterImpl);
};

Powered by Google App Engine
This is Rietveld 408576698