[webkit-changes] [WebKit/WebKit] 162415: Make sure scriptExecutionContext stays around when...

Chirag Shah noreply at github.com
Mon Nov 7 06:44:22 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1624156ba5f959a0e7cdb9e804271e3a493853ed
      https://github.com/WebKit/WebKit/commit/1624156ba5f959a0e7cdb9e804271e3a493853ed
  Author: Chirag M Shah <chirag_m_shah at apple.com>
  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




More information about the webkit-changes mailing list