mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09: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: bc87a48e0b
Pull-request: https://github.com/SerenityOS/serenity/pull/23181
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue