Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1b3d1149f0fe66e926d915128316c5f76d6956df
      
https://github.com/WebKit/WebKit/commit/1b3d1149f0fe66e926d915128316c5f76d6956df
  Author: Lauro Moura <[email protected]>
  Date:   2024-11-08 (Fri, 08 Nov 2024)

  Changed paths:
    M Source/WebDriver/SessionHost.cpp
    M Source/WebDriver/SessionHost.h
    M Source/WebDriver/WebDriverService.cpp
    M Source/WebDriver/WebDriverService.h

  Log Message:
  -----------
  [WebDriver] Assertion failure when starting a second session after the first 
one exits
https://bugs.webkit.org/show_bug.cgi?id=282790

Reviewed by Carlos Garcia Campos.

285374@main added the BrowserTerminatedObserver to allow the
WebDriverService to disconnect the WebSocket connection to the WebDriver
client when the browser is terminated. But it was adding the same observer
for each new session created, instead of adding it only once, as in each
call we are given the required session id.

This commit changes the related observer methods to be static on the
SessionHost and moves the WebDriverService call to them into its
constructor, so we add the observer only once. For completeness, a
cleanup method on the WebDriverService destructor was added.

* Source/WebDriver/SessionHost.cpp:
(WebDriver::SessionHost::removeBrowserTerminatedObserver):
* Source/WebDriver/SessionHost.h:
* Source/WebDriver/WebDriverService.cpp:
(WebDriver::WebDriverService::~WebDriverService):
(WebDriver::WebDriverService::connectToBrowser):
* Source/WebDriver/WebDriverService.h:

Canonical link: https://commits.webkit.org/286371@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