Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1b5686beea25916acdad72a1bbb69fb8b6b2d3aa
      
https://github.com/WebKit/WebKit/commit/1b5686beea25916acdad72a1bbb69fb8b6b2d3aa
  Author: Qianlang Chen <[email protected]>
  Date:   2026-03-09 (Mon, 09 Mar 2026)

  Changed paths:
    M LayoutTests/platform/mac-site-isolation/TestExpectations
    M Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
    M Source/WebCore/inspector/agents/InspectorPageAgent.cpp
    M Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js

  Log Message:
  -----------
  [Site Isolation] Web Inspector: Page navigating cross-origin won't complete 
with inspector open
https://bugs.webkit.org/show_bug.cgi?id=309511

Reviewed by BJ Burg.

The observed hang is due to two silent crashes in the web process in:
   - InspectorPageAgent::getResourceTree, localMainFrame could be null
     before provisional loading commits as was unguarded
   - InspectorDOMAgent::documents, m_document could be null similarly
Add graceful handling of these two cases so they don't end up in
assertion failures and halt the process.

In the case of getResourceTree, make frontend delay the request until
the provisional target commits and the page transitions, as doing it too
early will just result in the (now graceful) failure.

Manually tested under site isolation with the test case in bug report.
The test target-events-for-provisional-page.html now also progresses:
    run-webkit-tests --site-isolation 
.../target-events-for-provisional-page.html

* LayoutTests/platform/mac-site-isolation/TestExpectations:
* Source/WebCore/inspector/agents/InspectorDOMAgent.cpp:
* Source/WebCore/inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getResourceTree):
* Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.initializeTarget):
(WI.NetworkManager.prototype.transitionPageTarget):

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



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

Reply via email to