Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: src/objects-printer.cc

Issue 2178363003: [debugging] Show internal fields with %DebugPrint (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index 0a022ae8312cc2e389c89b82ceb101f54af2851d..6fe3035fc00b394096c647efbce6a41bfbffd5a5 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -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";
+ }
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698