mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:07:46 +00:00
WebDriver: Defer removing closed window handles until no longer needed
WebDriver::Session::close_window may invoke Session::stop, which needs the WebContent connection to still exist. Do not remove the window's handle (thus destroying the connection) until it is no longer needed.
This commit is contained in:
parent
ae1611aa08
commit
7be8931ca0
2 changed files with 15 additions and 8 deletions
|
@ -36,8 +36,10 @@ public:
|
|||
|
||||
WebContentConnection& web_content_connection() const
|
||||
{
|
||||
auto const& current_window = m_windows.get(m_current_window_handle).value();
|
||||
return current_window.web_content_connection;
|
||||
auto current_window = m_windows.get(m_current_window_handle);
|
||||
VERIFY(current_window.has_value());
|
||||
|
||||
return current_window->web_content_connection;
|
||||
}
|
||||
|
||||
String const& current_window_handle() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue