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

Unified Diff: Source/modules/encryptedmedia/MediaKeySession.h

Issue 976613002: Update MediaKeySession lifetime description to be Oilpan reality-based. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: comment tweak Created 5 years, 10 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 | « Source/modules/crypto/CryptoResultImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/encryptedmedia/MediaKeySession.h
diff --git a/Source/modules/encryptedmedia/MediaKeySession.h b/Source/modules/encryptedmedia/MediaKeySession.h
index d777a180e44d15ca4c09ee309336c673d65aecaa..30e35f3389e2738cc07ba930a141a792faf57e8d 100644
--- a/Source/modules/encryptedmedia/MediaKeySession.h
+++ b/Source/modules/encryptedmedia/MediaKeySession.h
@@ -44,13 +44,16 @@ class MediaKeys;
// References are held by JS only. However, even if all JS references are
// dropped, it won't be garbage collected until close event received or
-// MediaKeys goes away (as determined by the validity of a WeakPtr). This allows
+// MediaKeys goes away (as determined by a WeakMember reference). This allows
// the CDM to continue to fire events for this session, as long as the session
// is open.
//
-// WeakPtr<MediaKeys> is used instead of having MediaKeys and MediaKeySession
+// WeakMember<MediaKeys> is used instead of having MediaKeys and MediaKeySession
// keep references to each other, and then having to inform the other object
-// when it gets destroyed.
+// when it gets destroyed. When the Oilpan garbage collector determines that
+// only WeakMember<> references remain to the MediaKeys object, the MediaKeys
+// object will be finalized and the WeakMember<> references will be cleared
+// out(zeroed) by the garbage collector.
//
// Because this object controls the lifetime of the WebContentDecryptionModuleSession,
// it may outlive any JavaScript references as long as the MediaKeys object is alive.
« no previous file with comments | « Source/modules/crypto/CryptoResultImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698