1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:38:12 +00:00

Ladybird, WebContent: Add option in debug menu to output GC graph dump

This commit is contained in:
Aliaksandr Kalenik 2023-08-17 15:43:50 +02:00 committed by Andreas Kling
parent 0ff29349e6
commit 24edb7c97f
2 changed files with 10 additions and 0 deletions

View file

@ -278,6 +278,12 @@ BrowserWindow::BrowserWindow(Optional<URL> const& initial_url, Browser::CookieJa
debug_request("collect-garbage");
});
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");
});
auto* clear_cache_action = new QAction("Clear &Cache", this);
clear_cache_action->setShortcut(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_C));
clear_cache_action->setIcon(QIcon(QString("%1/res/icons/browser/clear-cache.png").arg(s_serenity_resource_root.characters())));