Commit 10474d18 authored by cbruni's avatar cbruni Committed by Commit bot

[debugging] Show internal fields with %DebugPrint

BUG=

Review-Url: https://codereview.chromium.org/2178363003
Cr-Commit-Position: refs/heads/master@{#38061}
parent d05c2f02
......@@ -419,6 +419,9 @@ static void JSObjectPrintHeader(std::ostream& os, JSObject* obj,
os << " (COW)";
}
os << "]";
if (obj->GetInternalFieldCount() > 0) {
os << "\n - internal fields: " << obj->GetInternalFieldCount();
}
}
......@@ -432,6 +435,14 @@ static void JSObjectPrintBody(std::ostream& os, JSObject* obj, // NOLINT
obj->PrintElements(os);
os << "\n }\n";
}
int internal_fields = obj->GetInternalFieldCount();
if (internal_fields > 0) {
os << " - internal fields = {";
for (int i = 0; i < internal_fields; i++) {
os << "\n " << Brief(obj->GetInternalField(i));
}
os << "\n }\n";
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment