mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
WebDriver: Send window handle asynchronously after WebContent connects
This prevents a potential deadlock when tests open many popup windows in quick succession.
This commit is contained in:
Notes:
github-actions[bot]
2026-02-15 13:22:53 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/cb803899c26 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7889 Reviewed-by: https://github.com/trflynn89
@@ -203,7 +203,9 @@ ErrorOr<NonnullRefPtr<WebDriverConnection>> WebDriverConnection::connect(Web::Pa
|
||||
page_client.page().set_should_block_pop_ups(false);
|
||||
|
||||
dbgln_if(WEBDRIVER_DEBUG, "Connected to WebDriver");
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) WebDriverConnection(make<IPC::Transport>(move(socket)), page_client));
|
||||
auto connection = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) WebDriverConnection(make<IPC::Transport>(move(socket)), page_client)));
|
||||
connection->async_did_set_window_handle(page_client.page().top_level_traversable()->window_handle());
|
||||
return connection;
|
||||
}
|
||||
|
||||
WebDriverConnection::WebDriverConnection(NonnullOwnPtr<IPC::Transport> transport, Web::PageClient& page_client)
|
||||
|
||||
Reference in New Issue
Block a user