mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 21:21:50 +03:00
WebDriver: Mark current window handle as invalid after close_window()
This commit is contained in:
parent
2b3bc2654f
commit
bc87a48e0b
Notes:
sideshowbarker
2024-07-17 01:06:10 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/bc87a48e0b Pull-request: https://github.com/SerenityOS/serenity/pull/23181
@ -119,7 +119,7 @@ Web::WebDriver::Response Session::close_window()
|
||||
{
|
||||
{
|
||||
// Defer removing the window handle from this session until after we know we are done with its connection.
|
||||
ScopeGuard guard { [this] { m_windows.remove(m_current_window_handle); } };
|
||||
ScopeGuard guard { [this] { m_windows.remove(m_current_window_handle); m_current_window_handle = "NoSuchWindowPleaseSelectANewOne"_string; } };
|
||||
|
||||
// 3. Close the current top-level browsing context.
|
||||
TRY(web_content_connection().close_window());
|
||||
|
Loading…
Reference in New Issue
Block a user