Chromium Code Reviews| 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 02128d9c900173584204fb5ef5453db69c960db1..7036d51910f88ae8e91d07aa26ef0a1fbba05537 100644 |
| --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp |
| +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp |
| @@ -813,37 +813,27 @@ ScriptPromise MediaKeySession::remove(ScriptState* script_state) { |
| if (!is_callable_) |
| return CreateRejectedPromiseNotCallable(script_state); |
| - // 3. If the result of running the "Is persistent session type?" algorithm |
| - // on this object's session type is false, return a promise rejected |
| - // with a newly created TypeError. |
| - if (!IsPersistentSessionType(session_type_)) { |
| - return ScriptPromise::Reject( |
| - script_state, |
| - V8ThrowException::CreateTypeError( |
| - script_state->GetIsolate(), "The session type is not persistent.")); |
| - } |
| - |
| - // 4. Let promise be a new promise. |
| + // 3. Let promise be a new promise. |
|
xhwang
2017/04/21 18:00:28
This change will also affect all key systems (e.g.
jrummell
2017/04/22 00:23:17
Limited this to ClearKey only. Unfortunately there
|
| SimpleResultPromise* result = new SimpleResultPromise(script_state, this); |
| ScriptPromise promise = result->Promise(); |
| - // 5. Run the following steps asynchronously (done in removeTask()). |
| + // 4. Run the following steps asynchronously (done in removeTask()). |
| pending_actions_.push_back(PendingAction::CreatePendingRemove(result)); |
| if (!action_timer_.IsActive()) |
| action_timer_.StartOneShot(0, BLINK_FROM_HERE); |
| - // 6. Return promise. |
| + // 5. Return promise. |
| return promise; |
| } |
| void MediaKeySession::RemoveTask(ContentDecryptionModuleResult* result) { |
| - // NOTE: Continue step 5 of MediaKeySession::remove(). |
| + // NOTE: Continue step 4 of MediaKeySession::remove(). |
| DVLOG(MEDIA_KEY_SESSION_LOG_LEVEL) << __func__ << "(" << this << ")"; |
| - // remove() in Chromium will execute steps 5.1 through 5.3. |
| + // remove() in Chromium will execute steps 4.1 through 4.5. |
| session_->Remove(result->Result()); |
| - // Last step (5.3.6 Resolve promise) will be done when |result| is resolved. |
| + // Last step (4.5.6 Resolve promise) will be done when |result| is resolved. |
| } |
| void MediaKeySession::ActionTimerFired(TimerBase*) { |