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

Unified Diff: content/renderer/media/crypto/proxy_decryptor.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/crypto/proxy_decryptor.h
diff --git a/content/renderer/media/crypto/proxy_decryptor.h b/content/renderer/media/crypto/proxy_decryptor.h
index 981566624055522a95e170103976719dbde9d730..27d5e574f3f6dc5b825028c17f165724059fe9f4 100644
--- a/content/renderer/media/crypto/proxy_decryptor.h
+++ b/content/renderer/media/crypto/proxy_decryptor.h
@@ -109,8 +109,6 @@ class ProxyDecryptor {
// stored by copy.
const std::string& LookupWebSessionId(uint32 session_id) const;
- base::WeakPtrFactory<ProxyDecryptor> weak_ptr_factory_;
-
#if defined(ENABLE_PEPPER_CDMS)
// Callback to create the Pepper plugin.
CreatePepperCdmCB create_pepper_cdm_cb_;
@@ -138,6 +136,10 @@ class ProxyDecryptor {
bool is_clear_key_;
+ // NOTE: This must always be last so it's invalidated before other member
+ // variables might be accessed.
+ base::WeakPtrFactory<ProxyDecryptor> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor);
};

Powered by Google App Engine
This is Rietveld 408576698