Browse Source

WebDriver: Allow deleting sessions with an invalid window handle

This case was missed in commit b5aa8f65b168c668e41ce61c966dae8198e233ed.
Timothy Flynn 9 months ago
parent
commit
969361abdb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Userland/Services/WebDriver/Client.cpp

+ 1 - 1
Userland/Services/WebDriver/Client.cpp

@@ -188,7 +188,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.