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

Unified Diff: runtime/vm/service.cc

Issue 2231313002: Avoid to list internal Arrays in _GetRetainingPath api (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Stop iterating at static fields and remove GrowableObjectList internal storage from the list Created 4 years, 4 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
« runtime/vm/object_graph.cc ('K') | « runtime/vm/object_graph.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index c57890a6b0404b44a1e447cfeb2be8747eee10b6..a0f273418b01dce0c441e635b433cf9dabcb9b0d 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -2011,13 +2011,13 @@ static bool PrintRetainingPath(Thread* thread,
for (intptr_t i = 0; i < limit; ++i) {
JSONObject jselement(&elements);
element = path.At(i * 2);
- jselement.AddProperty("index", i);
jselement.AddProperty("value", element);
// Interpret the word offset from parent as list index or instance field.
// TODO(koda): User-friendly interpretation for map entries.
if (i > 0) {
slot_offset ^= path.At((i * 2) - 1);
- if (element.IsArray()) {
+ jselement.AddProperty("offset", slot_offset.Value());
+ if (element.IsArray() || element.IsGrowableObjectArray()) {
intptr_t element_index = slot_offset.Value() -
(Array::element_offset(0) >> kWordSizeLog2);
jselement.AddProperty("parentListIndex", element_index);
« runtime/vm/object_graph.cc ('K') | « runtime/vm/object_graph.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698