| Index: third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
|
| diff --git a/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp b/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
|
| index faf41cb8f6afa61ae6bceb1f0c3b152bed028b6a..6db3244e9892078a6786616cf64c6edf864db95a 100644
|
| --- a/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
|
| +++ b/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
|
| @@ -166,8 +166,8 @@ void SetMediaKeysHandler::clearExistingMediaKeys()
|
| // attribute to decrypt media data and remove the association
|
| // with the media element.
|
| // (All 3 steps handled as needed in Chromium.)
|
| - OwnPtr<SuccessCallback> successCallback = bind(&SetMediaKeysHandler::setNewMediaKeys, this);
|
| - OwnPtr<FailureCallback> failureCallback = bind<ExceptionCode, const String&>(&SetMediaKeysHandler::clearFailed, this);
|
| + OwnPtr<SuccessCallback> successCallback = bind(&SetMediaKeysHandler::setNewMediaKeys, retainedRef(this));
|
| + OwnPtr<FailureCallback> failureCallback = bind<ExceptionCode, const String&>(&SetMediaKeysHandler::clearFailed, retainedRef(this));
|
| ContentDecryptionModuleResult* result = new SetContentDecryptionModuleResult(successCallback.release(), failureCallback.release());
|
| mediaPlayer->setContentDecryptionModule(nullptr, result->result());
|
|
|
| @@ -194,8 +194,8 @@ void SetMediaKeysHandler::setNewMediaKeys()
|
| // algorithm on the media element.
|
| // (Handled in Chromium).
|
| if (m_element->webMediaPlayer()) {
|
| - OwnPtr<SuccessCallback> successCallback = bind(&SetMediaKeysHandler::finish, this);
|
| - OwnPtr<FailureCallback> failureCallback = bind<ExceptionCode, const String&>(&SetMediaKeysHandler::setFailed, this);
|
| + OwnPtr<SuccessCallback> successCallback = bind(&SetMediaKeysHandler::finish, retainedRef(this));
|
| + OwnPtr<FailureCallback> failureCallback = bind<ExceptionCode, const String&>(&SetMediaKeysHandler::setFailed, retainedRef(this));
|
| ContentDecryptionModuleResult* result = new SetContentDecryptionModuleResult(successCallback.release(), failureCallback.release());
|
| m_element->webMediaPlayer()->setContentDecryptionModule(m_newMediaKeys->contentDecryptionModule(), result->result());
|
|
|
|
|