Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1624156ba5f959a0e7cdb9e804271e3a493853ed
      
https://github.com/WebKit/WebKit/commit/1624156ba5f959a0e7cdb9e804271e3a493853ed
  Author: Chirag M Shah <[email protected]>
  Date:   2022-11-07 (Mon, 07 Nov 2022)

  Changed paths:
    A LayoutTests/js/frame-application-cache-with-listener-crash-expected.txt
    A LayoutTests/js/frame-application-cache-with-listener-crash.html
    M Source/WebCore/loader/appcache/DOMApplicationCache.cpp

  Log Message:
  -----------
  Make sure scriptExecutionContext stays around when invoking listeners
https://bugs.webkit.org/show_bug.cgi?id=247380

Reviewed by Ryosuke Niwa.

This change fixes DOMApplicationCache::scriptExecutionContext to get the
correct scriptExecutionContext by getting it from the window instead of
the frame because the frame can navigate when invoking event listeners, in which
case the scriptExecutionContext will become NULL.

* LayoutTests/js/frame-application-cache-with-listener-crash-expected.txt: 
Added.
* LayoutTests/js/frame-application-cache-with-listener-crash.html: Added.
* Source/WebCore/loader/appcache/DOMApplicationCache.cpp:
(WebCore::DOMApplicationCache::scriptExecutionContext const):

Canonical link: https://commits.webkit.org/256402@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to