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

Issue 465053002: Delay posting Message event on MediaKeySession if no event handlers (Closed)

Created:
6 years, 4 months ago by jrummell
Modified:
6 years, 4 months ago
Reviewers:
xhwang, ddorwin
CC:
blink-reviews, feature-media-reviews_chromium.org, philipj_slow, eric.carlson_apple.com
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Delay posting "message" event on MediaKeySession if no event handlers. A recent CL to Promises changed when JavaScript is run when a promise is resolved. In the past the JS ran immediately -- now it is run using a microtask. For EME code, the "message" event is generated right after creating the session. It relies on the JS running and binding an event handler. With the recent CL, it is possible for the event to be generated before the handler is bound, so the event is lost. This change delays posting the "message" event if there are no event handlers registered. BUG=402766, 403121 TEST=Disabled EME browser_test passes Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=180128

Patch Set 1 #

Total comments: 4

Patch Set 2 : Add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -4 lines) Patch
M Source/modules/encryptedmedia/MediaKeySession.cpp View 1 5 chunks +52 lines, -4 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
jrummell
PTAL. This is causing the browser_tests to be flaky.
6 years, 4 months ago (2014-08-12 21:51:14 UTC) #1
ddorwin
https://codereview.chromium.org/465053002/diff/1/Source/modules/encryptedmedia/MediaKeySession.cpp File Source/modules/encryptedmedia/MediaKeySession.cpp (right): https://codereview.chromium.org/465053002/diff/1/Source/modules/encryptedmedia/MediaKeySession.cpp#newcode478 Source/modules/encryptedmedia/MediaKeySession.cpp:478: m_asyncEventQueue->enqueueEvent(action->event().release()); Won't ".release()" this fail to compile with Oilpan ...
6 years, 4 months ago (2014-08-12 22:31:45 UTC) #2
jrummell
Updated. https://codereview.chromium.org/465053002/diff/1/Source/modules/encryptedmedia/MediaKeySession.cpp File Source/modules/encryptedmedia/MediaKeySession.cpp (right): https://codereview.chromium.org/465053002/diff/1/Source/modules/encryptedmedia/MediaKeySession.cpp#newcode478 Source/modules/encryptedmedia/MediaKeySession.cpp:478: m_asyncEventQueue->enqueueEvent(action->event().release()); On 2014/08/12 22:31:45, ddorwin wrote: > Won't ...
6 years, 4 months ago (2014-08-12 23:12:44 UTC) #3
ddorwin
Any idea why this is only affecting the one test in the BUG instead of ...
6 years, 4 months ago (2014-08-12 23:23:09 UTC) #4
jrummell
There is now a second test that fails enough to get disabled (see linked bug). ...
6 years, 4 months ago (2014-08-12 23:51:17 UTC) #5
ddorwin
LGTM to solve the current test failures. We'll track a permanent and guaranteed fix in ...
6 years, 4 months ago (2014-08-12 23:56:11 UTC) #6
xhwang
lgtm
6 years, 4 months ago (2014-08-13 00:02:13 UTC) #7
jrummell
The CQ bit was checked by jrummell@chromium.org
6 years, 4 months ago (2014-08-13 00:02:32 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jrummell@chromium.org/465053002/20001
6 years, 4 months ago (2014-08-13 00:03:46 UTC) #9
commit-bot: I haz the power
6 years, 4 months ago (2014-08-13 01:04:46 UTC) #10
Message was sent while issue was closed.
Change committed as 180128

Powered by Google App Engine
This is Rietveld 408576698