mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-19 19:15:19 +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
ea68944149
commit
02afbf3285
Notes:
github-actions[bot]
2025-04-16 16:43:01 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/02afbf3285a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4362 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/Hendiadyoin1
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