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

Issue 1987883002: Change back to destroy the CDM synchronously (Closed)

Created:
4 years, 7 months ago by jrummell
Modified:
4 years, 6 months ago
CC:
chromium-reviews, blink-reviews, feature-media-reviews_chromium.org, mlamouri+watch-blink_chromium.org, eric.carlson_apple.com
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change back to destroy the CDM synchronously Outstanding promises may get rejected due to blink garbage collection destroying all the remaining EME objects when they are no longer referenced. The original fix destroyed the CDM asynchronously. However, that causes problems as the CDM may hold references to objects owned by RenderFrameImpl, and they may get accessed after ~RenderFrameImpl. This fix posts a task to reject the promise asynchronously. That way any outstanding promises that need to be rejected are handled after gc is done. It affects all EME promise rejections (from Chromium). Resolving promises is still done synchronously as there may be events already posted that need to happen only after the promise is resolved. BUG=597355 TEST=existing EME tests still pass Committed: https://crrev.com/3135b5eec1c39fb213cbf906f81553efa8cbaf67 Cr-Commit-Position: refs/heads/master@{#398986}

Patch Set 1 #

Patch Set 2 : reject asynchronously #

Total comments: 6

Patch Set 3 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -16 lines) Patch
M media/blink/cdm_session_adapter.cc View 1 chunk +1 line, -15 lines 0 comments Download
M third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.h View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp View 1 2 2 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (9 generated)
jrummell
PTAL. MediaKeySession is already using a prefinalizer, so this just adds one to MediaKeys (and ...
4 years, 7 months ago (2016-05-17 23:11:13 UTC) #2
xhwang
lgtm but I defer to blink owners for a closer look. halliwell: Could you please ...
4 years, 7 months ago (2016-05-17 23:18:08 UTC) #3
halliwell
On 2016/05/17 23:18:08, xhwang wrote: > lgtm but I defer to blink owners for a ...
4 years, 7 months ago (2016-05-17 23:20:29 UTC) #4
haraken
LGTM
4 years, 7 months ago (2016-05-17 23:52:46 UTC) #5
halliwell
On 2016/05/17 23:52:46, haraken wrote: > LGTM Haven't forgotten about this: sadly struggling to reproduce ...
4 years, 7 months ago (2016-05-18 22:47:31 UTC) #6
yhirano1
lgtm
4 years, 7 months ago (2016-05-19 02:12:23 UTC) #8
yhirano
lgtm
4 years, 7 months ago (2016-05-19 02:12:53 UTC) #10
halliwell
On 2016/05/19 02:12:53, yhirano wrote: > lgtm Sorry for delay, I couldn't figure out my ...
4 years, 7 months ago (2016-05-23 23:07:03 UTC) #11
xhwang
On 2016/05/23 23:07:03, halliwell wrote: > On 2016/05/19 02:12:53, yhirano wrote: > > lgtm > ...
4 years, 7 months ago (2016-05-23 23:20:44 UTC) #12
jrummell
I did try this on Chromium. The problem is that WebPlugin is destroyed asynchronously (on ...
4 years, 7 months ago (2016-05-23 23:37:41 UTC) #13
jrummell
Updated to reject promises asynchronously rather than using predispose (which is part of gc, so ...
4 years, 6 months ago (2016-06-07 22:38:41 UTC) #15
xhwang
+ddorwin to see whether it's okay to only post for rejections for now. The current ...
4 years, 6 months ago (2016-06-07 23:33:47 UTC) #17
haraken
https://codereview.chromium.org/1987883002/diff/20001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/1987883002/diff/20001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode91 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:91: // destroying objects that result in unfulfilled promises being ...
4 years, 6 months ago (2016-06-07 23:45:52 UTC) #18
xhwang
https://codereview.chromium.org/1987883002/diff/20001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/1987883002/diff/20001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode91 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:91: // destroying objects that result in unfulfilled promises being ...
4 years, 6 months ago (2016-06-08 06:52:56 UTC) #19
haraken
On 2016/06/08 06:52:56, xhwang wrote: > https://codereview.chromium.org/1987883002/diff/20001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp > File > third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp > (right): > > ...
4 years, 6 months ago (2016-06-08 06:57:54 UTC) #20
halliwell
On 2016/06/08 06:57:54, haraken wrote: > On 2016/06/08 06:52:56, xhwang wrote: > > > https://codereview.chromium.org/1987883002/diff/20001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp ...
4 years, 6 months ago (2016-06-08 15:33:00 UTC) #21
jrummell
Thanks for the reviews. I've opened http://crbug.com/618476 to track adding a test case to check ...
4 years, 6 months ago (2016-06-08 22:40:37 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1987883002/40001
4 years, 6 months ago (2016-06-09 19:04:07 UTC) #25
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 6 months ago (2016-06-09 19:57:13 UTC) #27
commit-bot: I haz the power
4 years, 6 months ago (2016-06-09 19:58:48 UTC) #29
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/3135b5eec1c39fb213cbf906f81553efa8cbaf67
Cr-Commit-Position: refs/heads/master@{#398986}

Powered by Google App Engine
This is Rietveld 408576698