From a8bdf866d9816d29076e585602811d6474b18c14 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 16 Oct 2022 15:16:25 +0200 Subject: [PATCH] LibWeb: Discard old browsing context after obtaining a new one Cleaning up an old FIXME from before discard was implemented. --- Userland/Libraries/LibWeb/DOM/Document.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 443eb28f5c..89a079290d 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -116,7 +116,8 @@ static NonnullRefPtr obtain_a_browsing_context_to_use_for // 3. Set newBrowsingContext's popup sandboxing flag set to a clone of sandboxFlags. } - // FIXME: 6. Discard browsingContext. + // 6. Discard browsingContext. + browsing_context.discard(); // 7. Return newBrowsingContext. return new_browsing_context;