Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c89929f28371a2215edddfdba37139aea5432d05
      
https://github.com/WebKit/WebKit/commit/c89929f28371a2215edddfdba37139aea5432d05
  Author: Lauro Moura <[email protected]>
  Date:   2025-05-11 (Sun, 11 May 2025)

  Changed paths:
    M Source/WebDriver/Session.cpp
    M Source/WebDriver/SessionHost.cpp

  Log Message:
  -----------
  [WebDriver][BiDi] Driver segfault waiting for relay response when browser 
abruptly closes
https://bugs.webkit.org/show_bug.cgi?id=292738

Reviewed by Carlos Garcia Campos.

Originally, SessionHost::inspectorDisconnected reported just empty error
messages, while Session::relayBidiCommand expected a string error if the
initial dispatch failed. This combination could lead to segfaults when
the browser closed prematurely.

This commit makes Session::relayBidiCommand check the response message
contents to avoid such segfauls, and also add an error message to
SessionHost::inspectorDisconnected, making it easier for the clients to
know why the command failed.

* Source/WebDriver/Session.cpp:
(WebDriver::Session::relayBidiCommand): Check if we have a response
object before accessing it.
* Source/WebDriver/SessionHost.cpp:
(WebDriver::SessionHost::inspectorDisconnected): Instead of an empty
error, give a message telling the command is failing because the browser
closed.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to