Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9829a57c4ebc6aa753f6c425e0d01890a97c4a52
https://github.com/WebKit/WebKit/commit/9829a57c4ebc6aa753f6c425e0d01890a97c4a52
Author: Lauro Moura <[email protected]>
Date: 2026-08-31 (Mon, 31 Aug 2026)
Changed paths:
M Source/WebDriver/SessionHost.h
M Source/WebDriver/glib/SessionHostGlib.cpp
Log Message:
-----------
[WebDriver][GLIB] UIProcess is not killed when the last WebProcess crashes
and kills the session
https://bugs.webkit.org/show_bug.cgi?id=321418
Reviewed by Carlos Garcia Campos.
When the WebProcess dies, the WebPageProxy will terminate the current
automation session, ultimately sending "SetTargetList" to the driver's
SessionHost without an "Automation" target. Currently, this leads the
session host to think that the browser is already shutting down,
releasing the managed browser GSubprocess reference without explicitly
terminating the process. As the browser continues to live in this
scenario, the process is effectively left to run indefinitely, even
after deleting the WebDriver session.
This commit makes the SessionHost distinguish between browser-initiated
inspector disconnections ("DidClose"), where it does not need to kill
the browser, and those potentially unexpected terminations (empty
"SetTargetList"), where it should (unless it's a remote browser not
managed by the driver).
* Source/WebDriver/SessionHost.h:
* Source/WebDriver/glib/SessionHostGlib.cpp:
(WebDriver::SessionHost::messageHandlers):
(WebDriver::SessionHost::disconnect):
(WebDriver::SessionHost::setTargetList):
(WebDriver::SessionHost::connectionDidClose): Deleted.
Canonical link: https://commits.webkit.org/320138@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications