| 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 7cbe44ca71580679b2b4bb36d9195442b1157f82..a4229079730a06002a2b0cfb2a42c1f83101442c 100644
|
| --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp
|
| +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp
|
| @@ -129,17 +129,14 @@ MediaKeys* MediaKeys::create(
|
| ExecutionContext* context,
|
| const WebVector<WebEncryptedMediaSessionType>& supportedSessionTypes,
|
| std::unique_ptr<WebContentDecryptionModule> cdm) {
|
| - MediaKeys* mediaKeys =
|
| - new MediaKeys(context, supportedSessionTypes, std::move(cdm));
|
| - mediaKeys->suspendIfNeeded();
|
| - return mediaKeys;
|
| + return new MediaKeys(context, supportedSessionTypes, std::move(cdm));
|
| }
|
|
|
| MediaKeys::MediaKeys(
|
| ExecutionContext* context,
|
| const WebVector<WebEncryptedMediaSessionType>& supportedSessionTypes,
|
| std::unique_ptr<WebContentDecryptionModule> cdm)
|
| - : SuspendableObject(context),
|
| + : ContextLifecycleObserver(context),
|
| m_supportedSessionTypes(supportedSessionTypes),
|
| m_cdm(std::move(cdm)),
|
| m_mediaElement(nullptr),
|
| @@ -292,7 +289,7 @@ WebContentDecryptionModule* MediaKeys::contentDecryptionModule() {
|
| DEFINE_TRACE(MediaKeys) {
|
| visitor->trace(m_pendingActions);
|
| visitor->trace(m_mediaElement);
|
| - SuspendableObject::trace(visitor);
|
| + ContextLifecycleObserver::trace(visitor);
|
| }
|
|
|
| void MediaKeys::contextDestroyed() {
|
| @@ -300,7 +297,7 @@ void MediaKeys::contextDestroyed() {
|
| m_pendingActions.clear();
|
|
|
| // We don't need the CDM anymore. Only destroyed after all related
|
| - // SuspendableObjects have been stopped.
|
| + // ContextLifecycleObservers have been stopped.
|
| m_cdm.reset();
|
| }
|
|
|
|
|