Chromium Code Reviews| Index: Source/modules/encryptedmedia/MediaKeys.h |
| diff --git a/Source/modules/encryptedmedia/MediaKeys.h b/Source/modules/encryptedmedia/MediaKeys.h |
| index 640c24865fadd50b9343aa4ebc2f50c31c2c1e35..44072bc8bf3ebf11ba7982db005849e0a316a80b 100644 |
| --- a/Source/modules/encryptedmedia/MediaKeys.h |
| +++ b/Source/modules/encryptedmedia/MediaKeys.h |
| @@ -28,6 +28,7 @@ |
| #include "bindings/v8/ScriptWrappable.h" |
| #include "core/events/EventTarget.h" |
| +#include "heap/Handle.h" |
| #include "modules/encryptedmedia/MediaKeySession.h" |
| #include "platform/Timer.h" |
| #include "wtf/Deque.h" |
| @@ -52,12 +53,13 @@ class ExceptionState; |
| // The ContentDecryptionModule has the same lifetime as this object. |
| // Maintains a reference to all MediaKeySessions created to ensure they live as |
| // long as this object unless explicitly close()'d. |
| -class MediaKeys : public RefCounted<MediaKeys>, public ScriptWrappable { |
| +class MediaKeys : public RefCountedWillBeGarbageCollectedFinalized<MediaKeys>, public ScriptWrappable { |
| + DECLARE_GC_INFO; |
| public: |
| - static PassRefPtr<MediaKeys> create(const String& keySystem, ExceptionState&); |
| + static PassRefPtrWillBeRawPtr<MediaKeys> create(const String& keySystem, ExceptionState&); |
| ~MediaKeys(); |
| - PassRefPtr<MediaKeySession> createSession(ExecutionContext*, const String& contentType, Uint8Array* initData, ExceptionState&); |
| + PassRefPtrWillBeRawPtr<MediaKeySession> createSession(ExecutionContext*, const String& contentType, Uint8Array* initData, ExceptionState&); |
| const String& keySystem() const { return m_keySystem; } |
| @@ -65,6 +67,8 @@ public: |
| blink::WebContentDecryptionModule* contentDecryptionModule(); |
| + void trace(Visitor*) { } |
| + |
| protected: |
| MediaKeys(const String& keySystem, PassOwnPtr<ContentDecryptionModule>); |
| void initializeNewSessionTimerFired(Timer<MediaKeys>*); |
| @@ -77,11 +81,11 @@ protected: |
| // FIXME: Check whether |initData| can be changed by JS. Maybe we should not pass it as a pointer. |
| struct InitializeNewSessionData { |
| - InitializeNewSessionData(PassRefPtr<MediaKeySession> session, const String& contentType, PassRefPtr<Uint8Array> initData) |
| + InitializeNewSessionData(PassRefPtrWillBeRawPtr<MediaKeySession> session, const String& contentType, PassRefPtr<Uint8Array> initData) |
| : session(session) |
| , contentType(contentType) |
| , initData(initData) { } |
| - RefPtr<MediaKeySession> session; |
| + RefPtrWillBePersistent<MediaKeySession> session; |
|
Mads Ager (chromium)
2014/02/07 07:19:25
I think this is fine. My guess would be that this
haraken
2014/02/07 07:22:54
I'll keep the current CL since this wouldn't be pe
zerny-chromium
2014/02/07 08:30:07
I agree with Mads that this should be traced and m
Mads Ager (chromium)
2014/02/07 08:52:34
It looks like that code was not moved from the bra
|
| String contentType; |
| RefPtr<Uint8Array> initData; |
| }; |