Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e5579bd106dfccd15c1c1cc25ac86150b8354207
      
https://github.com/WebKit/WebKit/commit/e5579bd106dfccd15c1c1cc25ac86150b8354207
  Author: Basuke Suzuki <[email protected]>
  Date:   2025-12-05 (Fri, 05 Dec 2025)

  Changed paths:
    M Tools/MiniBrowser/mac/WK1BrowserWindowController.m

  Log Message:
  -----------
  [WebKitLegacy] [MiniBrowser] Web Inspector window does not close when 
inspected page window is closed.
https://bugs.webkit.org/show_bug.cgi?id=303576
rdar://165858296

Reviewed by Alexey Proskuryakov.

`WK1BrowserWindowController::windowWillClose:` does not call `[_webView 
close]`, which prevents:
1. WebView cleanup and deallocation
2. Inspector notification via `inspectedWebViewClosed`
3. Proper Inspector window closure

Without calling `[_webView close]`, both the WebView and 
WK1BrowserWindowController leak memory
and the Inspector close flow is never triggered.

Call `[_webView close]` in `WK1BrowserWindowController::windowWillClose:` 
before notifying the
app delegate. This ensures proper cleanup of the WebView and triggers the 
Inspector close flow:

WebView::close → WebView::_close → inspectedWebViewClosed → WebInspector::close 
→
WebInspectorFrontend::close → WebInspectorFrontendClient::closeWindow → 
Inspector window closes

* Tools/MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController windowWillClose:]):

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



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

Reply via email to