Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3aaae9b46e75fd597240aef4cb9f9ac5c3fdad93
      
https://github.com/WebKit/WebKit/commit/3aaae9b46e75fd597240aef4cb9f9ac5c3fdad93
  Author: Ben Nham <[email protected]>
  Date:   2026-09-27 (Sun, 27 Sep 2026)

  Changed paths:
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebProcessTerminate.mm

  Log Message:
  -----------
  REGRESSION(313673@main): Stuck or hung WebProcess can indefinitely block the 
WebProcess from exiting
https://bugs.webkit.org/show_bug.cgi?id=325090
rdar://188410300

Reviewed by Sihui Liu.

Before 313673@main, WebPageProxy::close() held a shutdown prevention scope only 
until it sent the
WebPage::Close message to the WebProcess. This meant that a WebProcess that was 
hung or stuck in an
infinite loop couldn't block the WebProcess from exiting.

After 313673@main, we changed WebPage::Close to a request/response message and 
hold the shutdown
prevention scope until the WebProcess responds to the message. This means that 
a hung or stuck
WebProcess can indefinitely block shutdown.

Fix this by dropping the shutdown prevention scope after 
unloadEventsExpirationDelay in
WebPageProxy::close(). There is already an identical block of logic in
WebPageProxy::commitProvisionalPage().

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebProcessTerminate.mm

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebProcessTerminate.mm:
(TEST(WebKit, CloseWebViewTerminatesHungProcess)):

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



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

Reply via email to