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

Issue 1870883003: Destroy the CDM asynchronously (Closed)

Created:
4 years, 8 months ago by jrummell
Modified:
4 years, 8 months ago
Reviewers:
xhwang, halliwell, ddorwin
CC:
chromium-reviews, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Destroy the CDM asynchronously CDM destruction can potentially take a long time, so do this asynchronously. When the CDM is destroyed, any unfulfilled promises are rejected. If this happens during blink garbage collection (nothing refers to the EME blink objects anymore), blink doesn't like creating new objects (rejection results in a DOMException being created). So post a task to delete the CDM asynchronously, which will reject the unfulfilled promises later (after gc is done). BUG=597355 TEST=existing EME tests still pass Committed: https://crrev.com/23f24a3c67f11e066f65820298c73d438f88da29 Cr-Commit-Position: refs/heads/master@{#386130}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -1 line) Patch
M media/blink/cdm_session_adapter.cc View 2 chunks +18 lines, -1 line 1 comment Download

Messages

Total messages: 12 (5 generated)
jrummell
PTAL. Third attempt at fixing the cast shutdown crash.
4 years, 8 months ago (2016-04-08 01:16:10 UTC) #2
halliwell
On 2016/04/08 01:16:10, jrummell wrote: > PTAL. Third attempt at fixing the cast shutdown crash. ...
4 years, 8 months ago (2016-04-08 15:20:07 UTC) #3
ddorwin
You might include the part about CDM destruction potentially taking a long time to the ...
4 years, 8 months ago (2016-04-08 17:06:26 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870883003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870883003/1
4 years, 8 months ago (2016-04-08 17:53:58 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-04-08 18:34:26 UTC) #9
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/23f24a3c67f11e066f65820298c73d438f88da29 Cr-Commit-Position: refs/heads/master@{#386130}
4 years, 8 months ago (2016-04-08 18:36:57 UTC) #11
xhwang
4 years, 8 months ago (2016-04-11 16:52:20 UTC) #12
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/1870883003/diff/1/media/blink/cdm_session_ada...
File media/blink/cdm_session_adapter.cc (right):

https://codereview.chromium.org/1870883003/diff/1/media/blink/cdm_session_ada...
media/blink/cdm_session_adapter.cc:46: FROM_HERE, base::Bind(&ReleaseCdm,
cdm_));
nit: This can be done with MessageLoop::ReleaseSoon:

https://code.google.com/p/chromium/codesearch#chromium/src/base/message_loop/...

Though I don't really like the syntax using it (AddRef, take raw pointer etc).

Powered by Google App Engine
This is Rietveld 408576698