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

Issue 2407013002: EME: Improve promise lifetime (Closed)

Created:
4 years, 2 months ago by jrummell
Modified:
4 years, 2 months ago
Reviewers:
haraken, xhwang, yhirano
CC:
chromium-reviews, feature-media-reviews_chromium.org, mlamouri+watch-blink_chromium.org, eric.carlson_apple.com, haraken, blink-reviews, Srirama
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

EME: Improve promise lifetime Each promise generated by EME now keeps a link to the object that initiated it so that garbage collection doesn't clean up EME objects while there are promises outstanding. Also don't resolve/reject a promise if the ExecutionContext has been (or is in the process of being) destroyed. BUG=654556 TEST=EME tests pass (plus manual test with changes to not resolve a promise) Committed: https://crrev.com/b2d6c9f4a63e717cb37d8963a4566e70c3bef0f5 Cr-Commit-Position: refs/heads/master@{#425277}

Patch Set 1 #

Total comments: 1

Patch Set 2 : refactor check #

Total comments: 4

Patch Set 3 : remove m_contextDestroyed #

Total comments: 22

Patch Set 4 : changes #

Total comments: 2

Patch Set 5 : remove ContextLifecycleObserver #

Total comments: 2

Patch Set 6 : more checks #

Messages

Total messages: 30 (8 generated)
jrummell
Changes based on our discussion last week. I've included a question below, in case there ...
4 years, 2 months ago (2016-10-10 21:06:15 UTC) #2
haraken
https://codereview.chromium.org/2407013002/diff/20001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2407013002/diff/20001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode105 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:105: if (m_contextDestroyed || You can replace m_contextDestroyed with getExecutionContext(). ...
4 years, 2 months ago (2016-10-11 03:51:24 UTC) #4
jrummell
Updated to remove m_contextDestroyed. https://codereview.chromium.org/2407013002/diff/20001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2407013002/diff/20001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode105 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:105: if (m_contextDestroyed || On 2016/10/11 ...
4 years, 2 months ago (2016-10-11 21:38:27 UTC) #5
haraken
https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode105 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:105: !getExecutionContext()->activeDOMObjectsAreStopped(); Alternately, can we just check m_resolver?
4 years, 2 months ago (2016-10-12 00:58:22 UTC) #6
yhirano
> Also don't resolve/reject a promise if the ExecutionContext has been (or is in the ...
4 years, 2 months ago (2016-10-12 01:15:50 UTC) #7
jrummell
Comments only >> Also don't resolve/reject a promise if the ExecutionContext has been (or is ...
4 years, 2 months ago (2016-10-12 17:59:14 UTC) #8
haraken
https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode105 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:105: !getExecutionContext()->activeDOMObjectsAreStopped(); On 2016/10/12 17:59:14, jrummell wrote: > On 2016/10/12 ...
4 years, 2 months ago (2016-10-13 02:06:47 UTC) #9
jrummell
https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode105 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:105: !getExecutionContext()->activeDOMObjectsAreStopped(); On 2016/10/13 02:06:47, haraken wrote: > On 2016/10/12 ...
4 years, 2 months ago (2016-10-13 07:02:23 UTC) #10
haraken
LGTM https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode105 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:105: !getExecutionContext()->activeDOMObjectsAreStopped(); On 2016/10/13 07:02:23, jrummell wrote: > On ...
4 years, 2 months ago (2016-10-13 07:58:29 UTC) #11
yhirano
https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode86 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:86: m_resolver.clear(); Is this needed? ScriptPromiseResolver is a ContextLifecycleObserver and ...
4 years, 2 months ago (2016-10-13 13:35:47 UTC) #12
xhwang
looking good though I don't fully understand blink code :) Just a few nits from ...
4 years, 2 months ago (2016-10-13 19:29:59 UTC) #13
jrummell
Updated. https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode86 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:86: m_resolver.clear(); On 2016/10/13 13:35:47, yhirano wrote: > Is ...
4 years, 2 months ago (2016-10-14 00:03:32 UTC) #14
haraken
https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode86 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:86: m_resolver.clear(); On 2016/10/14 00:03:31, jrummell wrote: > On 2016/10/13 ...
4 years, 2 months ago (2016-10-14 00:05:07 UTC) #17
jrummell
Updated to remove ContextLifecycleObserver. https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2407013002/diff/40001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode86 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:86: m_resolver.clear(); On 2016/10/14 00:05:07, haraken ...
4 years, 2 months ago (2016-10-14 00:41:55 UTC) #18
haraken
LGTM https://codereview.chromium.org/2407013002/diff/80001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2407013002/diff/80001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode107 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:107: !getExecutionContext()->activeDOMObjectsAreStopped(); Add a comment about why we need ...
4 years, 2 months ago (2016-10-14 00:48:41 UTC) #19
yhirano
https://codereview.chromium.org/2407013002/diff/60001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2407013002/diff/60001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode94 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:94: DCHECK(isValidToFulfillPromise()); Is this change (from PS3) correct? You once ...
4 years, 2 months ago (2016-10-14 01:05:26 UTC) #20
jrummell
Updated. https://codereview.chromium.org/2407013002/diff/60001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp File third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp (right): https://codereview.chromium.org/2407013002/diff/60001/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp#newcode94 third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp:94: DCHECK(isValidToFulfillPromise()); On 2016/10/14 01:05:25, yhirano wrote: > Is ...
4 years, 2 months ago (2016-10-14 02:13:30 UTC) #21
yhirano
LGTM
4 years, 2 months ago (2016-10-14 03:45:23 UTC) #22
xhwang
lgtm
4 years, 2 months ago (2016-10-14 04:52:50 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2407013002/100001
4 years, 2 months ago (2016-10-14 06:14:40 UTC) #26
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 2 months ago (2016-10-14 09:27:47 UTC) #28
commit-bot: I haz the power
4 years, 2 months ago (2016-10-14 09:30:11 UTC) #30
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/b2d6c9f4a63e717cb37d8963a4566e70c3bef0f5
Cr-Commit-Position: refs/heads/master@{#425277}

Powered by Google App Engine
This is Rietveld 408576698