summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-05-21 15:21:51 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-21 15:32:53 +0200
commit8a3e6225382f90b633dd4079b16c66d4d98f5646 (patch)
treed1e46089b18d471e6ae7174ea0c93c6c6d2d2d2e
parentf555c2cc95dd5c7c99bfbcb6e238346df60aab18 (diff)
downloadserenity-8a3e6225382f90b633dd4079b16c66d4d98f5646.zip
Browser: Stop leaking popup windows
We were leaking the "view source" and "downloading file" windows for some reason, presumably it was necessary when these were first added. Since they are owned by the spawning browser window, there's no need to leak them.
-rw-r--r--Userland/Applications/Browser/Tab.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/Userland/Applications/Browser/Tab.cpp b/Userland/Applications/Browser/Tab.cpp
index e7e05682e5..7573132c40 100644
--- a/Userland/Applications/Browser/Tab.cpp
+++ b/Userland/Applications/Browser/Tab.cpp
@@ -61,7 +61,6 @@ void Tab::start_download(const URL& url)
window->set_resizable(false);
window->set_main_widget<DownloadWidget>(url);
window->show();
- [[maybe_unused]] auto& unused = window.leak_ref();
}
void Tab::view_source(const URL& url, const String& source)
@@ -76,7 +75,6 @@ void Tab::view_source(const URL& url, const String& source)
window->set_title(url.to_string());
window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-text.png"));
window->show();
- [[maybe_unused]] auto& unused = window.leak_ref();
}
Tab::Tab(BrowserWindow& window, Type type)