SSIA.
Created attachment 301021 [details] Patch
Comment on attachment 301021 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=301021&action=review > Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp:525 > + // 5. Let promise be the closed attribute of the session. > + // 6. Resolve promise. > + if (m_closedPromise) > + m_closedPromise->resolve(); These lines make me think a lot given that m_closedPromise is created when the JS closed attribute is accessed. So for this to work we would have to access closed so that the promise can be ever resolved. If the run this algorithm before accessing closed from JS we will be returning an unresolved promise that should be resolved already. I think we need to change the strategy. We need to have the promise created in advance and get it from the JS getter. Actually, please update the tests to test this situation this too.
Created attachment 301034 [details] Patch
Committed r212109: <http://trac.webkit.org/changeset/212109>