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 Review URL: https://codereview.chromium.org/465053002 git-svn-id: svn://svn.chromium.org/blink/trunk@180128 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment