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

Unified Diff: runtime/vm/object.cc

Issue 1768763002: Fix context level info in for-loops (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « runtime/vm/flow_graph_builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index d92562b8489e103e6084159d5cb24c62589eea1d..dddc632d809aa31303a7c81e9b3260de3b472c76 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -13712,7 +13712,12 @@ void Context::Dump(int indent) const {
for (intptr_t i = 0; i < num_variables(); i++) {
IndentN(indent + 2);
obj = At(i);
- THR_Print("[%" Pd "] = %s\n", i, obj.ToCString());
+ const char* s = obj.ToCString();
+ if (strlen(s) > 50) {
+ THR_Print("[%" Pd "] = [first 50 chars:] %.50s...\n", i, s);
+ } else {
+ THR_Print("[%" Pd "] = %s\n", i, s);
+ }
}
const Context& parent_ctx = Context::Handle(parent());
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698