mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 19:45:12 +00:00
WebDriver: Access global sessions mutably when finding sessions
We grab RefPtr to non-const for the sessions within, so we can't call const get() on the global maps. That would return a const reference.
This commit is contained in:
parent
4d828378d8
commit
1819404e43
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ Session::~Session() = default;
|
|||
|
||||
ErrorOr<NonnullRefPtr<Session>, Web::WebDriver::Error> Session::find_session(StringView session_id, Web::WebDriver::SessionFlags session_flags, AllowInvalidWindowHandle allow_invalid_window_handle)
|
||||
{
|
||||
auto const& sessions = has_flag(session_flags, Web::WebDriver::SessionFlags::Http) ? s_http_sessions : s_sessions;
|
||||
auto& sessions = has_flag(session_flags, Web::WebDriver::SessionFlags::Http) ? s_http_sessions : s_sessions;
|
||||
|
||||
if (auto session = sessions.get(session_id); session.has_value()) {
|
||||
if (allow_invalid_window_handle == AllowInvalidWindowHandle::No)
|
||||
|
|
Loading…
Add table
Reference in a new issue