mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 22:52:22 +02:00
LibGC: Add missing root type switch cases in graph dump
Also, remove the default case so that we don't end up with missing cases again.
This commit is contained in:
committed by
Gregory Bertilson
parent
7339c26059
commit
d0e7ffdf37
Notes:
github-actions[bot]
2026-03-03 17:28:01 +00:00
Author: https://github.com/Zaggy1024 Commit: https://github.com/LadybirdBrowser/ladybird/commit/d0e7ffdf37a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8252 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/Hendiadyoin1
@@ -208,11 +208,14 @@ public:
|
||||
auto node = AK::JsonObject();
|
||||
if (it.value.root_origin.has_value()) {
|
||||
auto type = it.value.root_origin->type;
|
||||
auto location = it.value.root_origin->location;
|
||||
auto const* location = it.value.root_origin->location;
|
||||
switch (type) {
|
||||
case HeapRoot::Type::ConservativeVector:
|
||||
node.set("root"sv, "ConservativeVector"sv);
|
||||
break;
|
||||
case HeapRoot::Type::HeapFunctionCapturedPointer:
|
||||
node.set("root"sv, "HeapFunctionCapturedPointer"sv);
|
||||
break;
|
||||
case HeapRoot::Type::MustSurviveGC:
|
||||
node.set("root"sv, "MustSurviveGC"sv);
|
||||
break;
|
||||
@@ -222,6 +225,9 @@ public:
|
||||
case HeapRoot::Type::RootVector:
|
||||
node.set("root"sv, "RootVector"sv);
|
||||
break;
|
||||
case HeapRoot::Type::RootHashMap:
|
||||
node.set("root"sv, "RootHashMap"sv);
|
||||
break;
|
||||
case HeapRoot::Type::RegisterPointer:
|
||||
node.set("root"sv, "RegisterPointer"sv);
|
||||
if (it.value.root_origin->stack_frame_index.has_value())
|
||||
@@ -235,9 +241,8 @@ public:
|
||||
case HeapRoot::Type::VM:
|
||||
node.set("root"sv, "VM"sv);
|
||||
break;
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
VERIFY(node.has("root"sv));
|
||||
}
|
||||
node.set("class_name"sv, it.value.class_name);
|
||||
node.set("edges"sv, edges);
|
||||
|
||||
Reference in New Issue
Block a user