Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(659)

Unified Diff: third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp

Issue 2688263002: EME: close() should return a resolved promise if session already closed (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-session-multiple-close-sequential.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
index e992b4b5ed03a8fb5241dc719b219e62dc21792c..d4a4d412c14d890d49a38424658bce8bd606bbbd 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
@@ -762,7 +762,7 @@ ScriptPromise MediaKeySession::close(ScriptState* scriptState) {
// 1. Let session be the associated MediaKeySession object.
// 2. If session is closed, return a resolved promise.
if (m_isClosed)
- return ScriptPromise::cast(scriptState, ScriptValue());
+ return ScriptPromise::castUndefined(scriptState);
// 3. If session's callable value is false, return a promise rejected with
// an InvalidStateError.
« no previous file with comments | « third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-session-multiple-close-sequential.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698