[WebDriver] Fix clang warnings in Session.cpp
[WebKit-https.git] / Source / WebDriver / WebDriverService.cpp
index dab0fa8..7d528b2 100644 (file)
@@ -758,7 +758,7 @@ void WebDriverService::deleteSession(RefPtr<JSON::Object>&& parameters, Function
     }
 
     auto session = std::exchange(m_session, nullptr);
-    session->close([this, session, completionHandler = WTFMove(completionHandler)](CommandResult&& result) mutable {
+    session->close([session, completionHandler = WTFMove(completionHandler)](CommandResult&& result) mutable {
         // Ignore unknown errors when closing the session if the browser is closed.
         if (result.isError() && result.errorCode() == CommandResult::ErrorCode::UnknownError && !session->isConnected())
             completionHandler(CommandResult::success());