Branch: refs/heads/webkitglib/2.52
  Home:   https://github.com/WebKit/WebKit
  Commit: 21f03e8a5ee844bae1c3a3c354d6252327f86f52
      
https://github.com/WebKit/WebKit/commit/21f03e8a5ee844bae1c3a3c354d6252327f86f52
  Author: Lauro Moura <[email protected]>
  Date:   2026-10-01 (Thu, 01 Oct 2026)

  Changed paths:
    M Source/WebDriver/SessionHost.cpp
    M Source/WebDriver/WebDriverService.cpp
    M Source/WebDriver/glib/SessionHostGlib.cpp

  Log Message:
  -----------
  Cherry-pick 316784@main (a917f438fb1f). 
https://bugs.webkit.org/show_bug.cgi?id=316798

    [WebDriver] Improve driver logging coverage
    https://bugs.webkit.org/show_bug.cgi?id=316798

    Reviewed by BJ Burg.

    To improve traceability, this commit adds RELEASE_LOG statements
    covering the following areas of Source/WebDriver:

    - Browser startup and lifetime (for glib ports)
    - HTTP request and response
    - Driver->Browser Automation.json commands and replies.

    The added log statements cover mainly data like the request path, body
    size, response status, and duration. The actual body with payload like
    field values or JS code to be executed is omitted. For deeper
    inspection, the existing LOG() statements that inspect the actual
    payload are kept.

    We opted for RELEASE_LOG instead of LOG due to the WebDriver-related
    channels being low-volume in comparison to hotter ones internal to the
    browser. On top of that, it should be easier for reporters to provide
    release logs, helping get more useful bug reports.

    Example output:

    Started WebSocket BiDi server with host local and port 60782
    Started HTTP server with host local and port 60781
    HTTP request POST /session (body=303 bytes)
    Spawning local browser: /sdk/webkit/WebKitBuild/WPE/Release/bin/MiniBrowser 
with 2 argument(s)
    Connecting to RemoteInspector at 127.0.0.1:54821
    Connected to RemoteInspector at 127.0.0.1:54821 after 1 attempt(s)
        SEND inspector #0001: Automation.createBrowsingContext (52 bytes)
        RECV inspector #0001: ok
    HTTP response 200 in 196ms
    HTTP request POST /session/fbc9c527-945d-4030-852e-50c5f1852557/url 
(body=43 bytes)
        SEND inspector #0002: Automation.resolveBrowsingContext (149 bytes)
        RECV inspector #0002: ok
        SEND inspector #0003: Automation.waitForNavigationToComplete (207 bytes)
        RECV inspector #0003: ok
        SEND inspector #0004: Automation.isShowingJavaScriptDialog (135 bytes)
        RECV inspector #0004: ok
        SEND inspector #0005: Automation.navigateBrowsingContext (212 bytes)
        RECV inspector #0005: ok
    HTTP response 200 in 124ms

    * Source/WebDriver/SessionHost.cpp:
    (WebDriver::SessionHost::inspectorDisconnected):
    (WebDriver::SessionHost::sendCommandToBackend):
    (WebDriver::SessionHost::dispatchMessage):
    * Source/WebDriver/WebDriverService.cpp:
    (WebDriver::printUsageStatement):
    (WebDriver::WebDriverService::run):
    (WebDriver::WebDriverService::handleRequest):
    * Source/WebDriver/glib/SessionHostGlib.cpp:
    (WebDriver::SessionHost::launchBrowser):
    (WebDriver::SessionHost::connectToBrowser):
    (WebDriver::SessionHost::connectionDidClose):
    (WebDriver::SessionHost::setTargetList):

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

Canonical link: https://commits.webkit.org/305877.1183@webkitglib/2.52


  Commit: 5d22230ed756ada84fde996f21a8d6ef161b5e52
      
https://github.com/WebKit/WebKit/commit/5d22230ed756ada84fde996f21a8d6ef161b5e52
  Author: Lauro Moura <[email protected]>
  Date:   2026-10-01 (Thu, 01 Oct 2026)

  Changed paths:
    M Source/WebDriver/WebDriverService.cpp
    M Source/WebDriver/soup/WebSocketServerSoup.cpp

  Log Message:
  -----------
  Cherry-pick 318931@main (717e0fa52336). 
https://bugs.webkit.org/show_bug.cgi?id=321314

    [WebDriver][BiDi] Use OS-provided free port instead of guessing based on 
the http port
    https://bugs.webkit.org/show_bug.cgi?id=321314

    Reviewed by Carlos Alberto Lopez Perez.

    Currently, the WebDriver service chooses the WebDriverBiDi WebSockets
    port based on the HTTP server port if the latter is not explicitly
    defined by the user.

    While this works fine in low churn scenarios, this does not guarantee
    that the server will pick a free port, potentially leading to fatal
    startup errors and test failures.

    This commit makes the WebDriverBiDi server let the OS provide a free
    port if the user does not provide one, reporting that port back through
    the `webSocketURL` capability. Also, to ensure the os-provided port does
    not clash with the explicit port requested for the HTTP server, the
    WebSocket server is now started after it.

    For bidi-only connections (not yet supported, though), the user can just
    provide the port explicitly.

    * Source/WebDriver/WebDriverService.cpp:
    (WebDriver::WebDriverService::run):
    * Source/WebDriver/soup/WebSocketServerSoup.cpp:
    (WebDriver::WebSocketServer::listen):

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

Canonical link: https://commits.webkit.org/305877.1184@webkitglib/2.52


  Commit: 2090e2c1881bc82b74c476e91fd246ce6a7d3b13
      
https://github.com/WebKit/WebKit/commit/2090e2c1881bc82b74c476e91fd246ce6a7d3b13
  Author: Lauro Moura <[email protected]>
  Date:   2026-10-01 (Thu, 01 Oct 2026)

  Changed paths:
    M Source/WebDriver/SessionHost.h
    M Source/WebDriver/glib/SessionHostGlib.cpp

  Log Message:
  -----------
  Cherry-pick 320138@main (9829a57c4ebc). 
https://bugs.webkit.org/show_bug.cgi?id=321418

    [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

Canonical link: https://commits.webkit.org/305877.1185@webkitglib/2.52


Compare: https://github.com/WebKit/WebKit/compare/654a5685b75c...2090e2c1881b

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

Reply via email to