Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5aee90b4e66e8cd6d81f108d1b2cffe74010e751
      
https://github.com/WebKit/WebKit/commit/5aee90b4e66e8cd6d81f108d1b2cffe74010e751
  Author: David Kilzer <[email protected]>
  Date:   2026-03-12 (Thu, 12 Mar 2026)

  Changed paths:
    M Source/WebCore/testing/js/WebCoreTestSupport.cpp

  Log Message:
  -----------
  WebCoreTestSupport::resetInternalsObject() crashes when Document::frame() 
returns nullptr
<https://bugs.webkit.org/show_bug.cgi?id=309781>
<rdar://63019644>

Reviewed by Darin Adler.

Use the safe accessor `Document::page()` instead of calling
`document->frame()->page()` which dereferences a nullptr when the
document's frame has been disconnected.

Add a `RELEASE_ASSERT` to catch the case where `Document` is in an
unexpected state during post-test teardown rather than crashing with
an uninformative nullptr dereference.

No new tests since this would always crash when triggered.

* Source/WebCore/testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::resetInternalsObject):

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



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

Reply via email to