| Index: media/blink/cdm_result_promise.h
|
| diff --git a/media/blink/cdm_result_promise.h b/media/blink/cdm_result_promise.h
|
| index 179654eae88a36ef7228b1f08c495bbc11f25cb4..c59d2c3990c16cc667ae3ba4ca4b4b77ba80f3af 100644
|
| --- a/media/blink/cdm_result_promise.h
|
| +++ b/media/blink/cdm_result_promise.h
|
| @@ -56,6 +56,13 @@ CdmResultPromise<T...>::CdmResultPromise(
|
|
|
| template <typename... T>
|
| CdmResultPromise<T...>::~CdmResultPromise() {
|
| + if (web_cdm_result_.isCompleted())
|
| + return;
|
| +
|
| + std::string message =
|
| + "Unfulfilled promise rejected automatically during destruction.";
|
| + DVLOG(1) << message;
|
| + reject(MediaKeys::INVALID_STATE_ERROR, 0, message);
|
| }
|
|
|
| // "inline" is needed to prevent multiple definition error.
|
|
|