Skip to content

Truly independent web browser

LibWeb: Don't remove windows and message ports from their weak sets

Shannon Booth5e220ee36a6a
diff --git a/Libraries/LibWeb/HTML/MessagePort.cpp b/Libraries/LibWeb/HTML/MessagePort.cpp
index 7c6c0a2e6d0..4c726aff547 100644
--- a/Libraries/LibWeb/HTML/MessagePort.cpp
+++ b/Libraries/LibWeb/HTML/MessagePort.cpp
@@ -91,7 +91,6 @@ void MessagePort::for_each_message_port(Function<void(MessagePort&)> callback)
void MessagePort::finalize()
{
Base::finalize();
- all_message_ports().remove(*this);
disentangle();
}
diff --git a/Libraries/LibWeb/HTML/Window.cpp b/Libraries/LibWeb/HTML/Window.cpp
index ba22e97e2aa..c67db749fe1 100644
--- a/Libraries/LibWeb/HTML/Window.cpp
+++ b/Libraries/LibWeb/HTML/Window.cpp
@@ -399,7 +399,6 @@ void Window::finalize()
{
Base::finalize();
WindowOrWorkerGlobalScopeMixin::finalize();
- all_windows().remove(*this);
}
Window::~Window() = default;