summaryrefslogtreecommitdiff
path: root/Userland/Services/WebDriver
diff options
context:
space:
mode:
authorAliaksandr Kalenik <kalenik.aliaksandr@gmail.com>2023-03-19 13:52:14 +0300
committerJelle Raaijmakers <jelle@gmta.nl>2023-03-19 14:51:40 +0100
commit7146c33522943f90164cd6bee6c6d6897763b772 (patch)
tree23a153e525b3cfac078465957fdab36c6744d7e7 /Userland/Services/WebDriver
parent63c16ff41ae53be5e101a757d3b2805edd1c8660 (diff)
downloadserenity-7146c33522943f90164cd6bee6c6d6897763b772.zip
WebDriver: Close all WebContent connections while destroying a session
While closing a session, it is necessary to close all windows that may have been opened during that session.
Diffstat (limited to 'Userland/Services/WebDriver')
-rw-r--r--Userland/Services/WebDriver/Session.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Services/WebDriver/Session.cpp b/Userland/Services/WebDriver/Session.cpp
index 9a04bf9b4f..f18303eaae 100644
--- a/Userland/Services/WebDriver/Session.cpp
+++ b/Userland/Services/WebDriver/Session.cpp
@@ -34,7 +34,9 @@ Session::~Session()
// 1. Perform the following substeps based on the remote end’s type:
// NOTE: We perform the "Remote end is an endpoint node" steps in the WebContent process.
- web_content_connection().close_session();
+ for (auto& it : m_windows) {
+ it.value.web_content_connection->close_session();
+ }
// 2. Remove the current session from active sessions.
// NOTE: We are in a session destruction which means it is already removed