Skip to content

Commit b4df313

Browse files
authored
Merge pull request #1412 from WebPlatformForEmbedded/pgorszkowski/2.38/network_sessions_are_destroyed_in_platform_finalize
[GTK][WPE] Network sessions are not destroyed in platformFinalize
2 parents f0b98a4 + 09fa7d0 commit b4df313

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Source/WebKit/NetworkProcess/soup/NetworkProcessMainSoup.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ class NetworkProcessMainSoup final: public AuxiliaryProcessMainBaseNoSingleton<N
4949

5050
void platformFinalize() override
5151
{
52-
// FIXME: Is this still needed? We should probably destroy all existing sessions at this point instead.
5352
// Needed to destroy the SoupSession and SoupCookieJar, e.g. to avoid
5453
// leaking SQLite temporary journaling files.
55-
process().destroySession(PAL::SessionID::defaultSessionID());
54+
Vector<PAL::SessionID> sessionIDs;
55+
process().forEachNetworkSession([&sessionIDs](auto& session) {
56+
sessionIDs.append(session.sessionID());
57+
});
58+
for (auto& sessionID : sessionIDs)
59+
process().destroySession(sessionID);
5660
}
5761
};
5862

0 commit comments

Comments
 (0)