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:
parent
7339c26059
commit
d0e7ffdf37
1 changed files with 8 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue