1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:37:35 +00:00

LibJS+LibWebView+WebContent+Ladybird: Output GC-graph into a file

Instead of displaying a massive JSON in stdout, it's more practical
to save the GC-graph to a file.
This commit is contained in:
Aliaksandr Kalenik 2023-12-12 13:25:06 +01:00 committed by Andreas Kling
parent ed1bee222b
commit 57e5abae92
8 changed files with 38 additions and 13 deletions

View file

@ -278,7 +278,12 @@ BrowserWindow::BrowserWindow(Vector<URL> const& initial_urls, WebView::CookieJar
auto* dump_gc_graph_action = new QAction("Dump GC graph", this);
debug_menu->addAction(dump_gc_graph_action);
QObject::connect(dump_gc_graph_action, &QAction::triggered, this, [this] {
debug_request("dump-gc-graph");
if (m_current_tab) {
auto gc_graph_path = m_current_tab->view().dump_gc_graph();
warnln("\033[33;1mDumped GC-graph into {}"
"\033[0m",
gc_graph_path);
}
});
auto* clear_cache_action = new QAction("Clear &Cache", this);