Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b09929827ab58775bb1e23c60c0ebcafce31c341
      
https://github.com/WebKit/WebKit/commit/b09929827ab58775bb1e23c60c0ebcafce31c341
  Author: Simon Pena <[email protected]>
  Date:   2026-06-02 (Tue, 02 Jun 2026)

  Changed paths:
    A 
LayoutTests/media/encrypted-media/mock-MediaKeySession-backforwardcache-prune-crash-expected.txt
    A 
LayoutTests/media/encrypted-media/mock-MediaKeySession-backforwardcache-prune-crash.html
    A 
LayoutTests/media/encrypted-media/resources/mock-MediaKeySession-backforwardcache-prune-helper.html
    M Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp

  Log Message:
  -----------
  [EME] Crash pruning a back/forward-cached page that owns an open 
MediaKeySession
https://bugs.webkit.org/show_bug.cgi?id=315849

Reviewed by Xabier Rodriguez-Calvar.

Invoking session.sessionClosed during document teardown can trigger an
assertion in a deferred promise
(JSDOMPromiseDeferred --
!activeDOMObjectsAreSuspended() ||
scriptExecutionContext()->eventLoop().isSuspended()).

By queueing it, we can ensure the task is dropped if the event loop is
stopped.

Test: 
media/encrypted-media/mock-MediaKeySession-backforwardcache-prune-crash.html

* 
LayoutTests/media/encrypted-media/mock-MediaKeySession-backforwardcache-prune-crash-expected.txt:
 Added.
* 
LayoutTests/media/encrypted-media/mock-MediaKeySession-backforwardcache-prune-crash.html:
 Added.
* 
LayoutTests/media/encrypted-media/resources/mock-MediaKeySession-backforwardcache-prune-helper.html:
 Added.
* Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::stop):

Canonical link: 
https://flagged.apple.com:443/proxy?t2=DL5S1Z7pj3&o=aHR0cHM6Ly9jb21taXRzLndlYmtpdC5vcmcvMzE0MzUyQG1haW4=&emid=048657b3-14e5-4d54-af55-75a1b39a7ebb&c=11



To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to