| Index: third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp
|
| diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp
|
| index 6016aaf05d95cc1d9d8c43b8ed1ea4931877a33c..7dd8749155e9e3b4bb0eed17fc30f8f99c31d192 100644
|
| --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp
|
| +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp
|
| @@ -31,9 +31,9 @@
|
| #include "core/dom/ExceptionCode.h"
|
| #include "core/dom/ExecutionContext.h"
|
| #include "core/html/HTMLMediaElement.h"
|
| +#include "modules/encryptedmedia/ContentDecryptionModuleResultPromise.h"
|
| #include "modules/encryptedmedia/EncryptedMediaUtils.h"
|
| #include "modules/encryptedmedia/MediaKeySession.h"
|
| -#include "modules/encryptedmedia/SimpleContentDecryptionModuleResultPromise.h"
|
| #include "platform/Timer.h"
|
| #include "public/platform/WebContentDecryptionModule.h"
|
| #include "wtf/RefPtr.h"
|
| @@ -82,8 +82,9 @@ class MediaKeys::PendingAction final
|
| class SetCertificateResultPromise
|
| : public ContentDecryptionModuleResultPromise {
|
| public:
|
| - SetCertificateResultPromise(ScriptState* scriptState)
|
| - : ContentDecryptionModuleResultPromise(scriptState) {}
|
| + SetCertificateResultPromise(ScriptState* scriptState, MediaKeys* mediaKeys)
|
| + : ContentDecryptionModuleResultPromise(scriptState),
|
| + m_mediaKeys(mediaKeys) {}
|
|
|
| ~SetCertificateResultPromise() override {}
|
|
|
| @@ -104,6 +105,14 @@ class SetCertificateResultPromise
|
| ContentDecryptionModuleResultPromise::completeWithError(
|
| exceptionCode, systemCode, errorMessage);
|
| }
|
| +
|
| + DEFINE_INLINE_TRACE() {
|
| + visitor->trace(m_mediaKeys);
|
| + ContentDecryptionModuleResultPromise::trace(visitor);
|
| + }
|
| +
|
| + private:
|
| + Member<MediaKeys> m_mediaKeys;
|
| };
|
|
|
| MediaKeys* MediaKeys::create(
|
| @@ -194,7 +203,7 @@ ScriptPromise MediaKeys::setServerCertificate(
|
|
|
| // 4. Let promise be a new promise.
|
| SetCertificateResultPromise* result =
|
| - new SetCertificateResultPromise(scriptState);
|
| + new SetCertificateResultPromise(scriptState, this);
|
| ScriptPromise promise = result->promise();
|
|
|
| // 5. Run the following steps asynchronously (documented in timerFired()).
|
|
|