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

Unified Diff: content/renderer/media/crypto/ppapi_decryptor.h

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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
« no previous file with comments | « content/renderer/media/cdm_session_adapter.h ('k') | content/renderer/media/crypto/ppapi_decryptor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/crypto/ppapi_decryptor.h
diff --git a/content/renderer/media/crypto/ppapi_decryptor.h b/content/renderer/media/crypto/ppapi_decryptor.h
index 0fb5c1d8d1a7c5df6bd6cab59354ce47b189a94e..12ef4fec9716eea52cf03844e08a0d89b0533889 100644
--- a/content/renderer/media/crypto/ppapi_decryptor.h
+++ b/content/renderer/media/crypto/ppapi_decryptor.h
@@ -104,8 +104,6 @@ class PpapiDecryptor : public media::MediaKeys, public media::Decryptor {
ContentDecryptorDelegate* CdmDelegate();
- base::WeakPtr<PpapiDecryptor> weak_this_;
-
// Hold a reference of the Pepper CDM wrapper to make sure the plugin lives
// as long as needed.
scoped_ptr<PepperCdmWrapper> pepper_cdm_wrapper_;
@@ -124,6 +122,7 @@ class PpapiDecryptor : public media::MediaKeys, public media::Decryptor {
NewKeyCB new_audio_key_cb_;
NewKeyCB new_video_key_cb_;
+ // NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<PpapiDecryptor> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(PpapiDecryptor);
« no previous file with comments | « content/renderer/media/cdm_session_adapter.h ('k') | content/renderer/media/crypto/ppapi_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698