WebDriver: Allow deleting sessions with an invalid window handle

This case was missed in commit b5aa8f65b168c668e41ce61c966dae8198e233ed.

(cherry picked from commit 969361abdb73dce664933d0250ab90ed668bc0b6)
This commit is contained in:
Timothy Flynn authored and Nico Weber committed 2024-11-24 21:30:22 -05:00
1 parent 6cbfce87bd
commit ec4fd77063
1 file changed
+1 -1
+1 -1
View File
@@ -190,7 +190,7 @@ Web::WebDriver::Response Client::delete_session(Web::WebDriver::Parameters param
dbgln_if(WEBDRIVER_DEBUG, "Handling DELETE /session/<session_id>");
// 1. If the current session is an active session, try to close the session.
if (auto session = find_session_with_id(parameters[0]); !session.is_error())
if (auto session = find_session_with_id(parameters[0], AllowInvalidWindowHandle::Yes); !session.is_error())
close_session(session.value()->session_id());
// 2. Return success with data null.