1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:47:35 +00:00

WebDriver: Inline Sesssion::stop() in session destructor

Previously it was possible to have following sequence of calls
while destroying a session:
1. `WebContentConnection::die()` calls `Client::close_session()`
2. `Client::close_session()` removes a session from active sessions
map which causes session destructor call.
3. Session destructor calls `Client::close_session()` to remove a
session from active sessions.

With `stop()` method inlined into destructor `close_session()` need
to be called just once while destroying a session.
This commit is contained in:
Aliaksandr Kalenik 2023-03-19 13:36:32 +03:00 committed by Jelle Raaijmakers
parent b79cd5cf6e
commit 63c16ff41a
3 changed files with 23 additions and 34 deletions

View file

@ -49,7 +49,6 @@ public:
}
ErrorOr<void> start(LaunchBrowserCallbacks const&);
Web::WebDriver::Response stop();
Web::WebDriver::Response close_window();
Web::WebDriver::Response switch_to_window(StringView);
Web::WebDriver::Response get_window_handles() const;