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

Unified Diff: runtime/vm/service.cc

Issue 1300853006: Functions are objects too! (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: update tests Created 5 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
« no previous file with comments | « runtime/observatory/tests/service/inbound_references_test.dart ('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 8fb17157efda44fb5a39e316473764224cc46c60..a517f21c1336952ecd5fd4c8cf688d5d8df1de74 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -1485,19 +1485,21 @@ static bool PrintInboundReferences(Isolate* isolate,
slot_offset ^= path.At((i * 2) + 1);
jselement.AddProperty("source", source);
- jselement.AddProperty("slot", "<unknown>");
if (source.IsArray()) {
intptr_t element_index = slot_offset.Value() -
(Array::element_offset(0) >> kWordSizeLog2);
- jselement.AddProperty("slot", element_index);
+ jselement.AddProperty("parentListIndex", element_index);
} else if (source.IsInstance()) {
source_class ^= source.clazz();
parent_field_map = source_class.OffsetToFieldMap();
intptr_t offset = slot_offset.Value();
if (offset > 0 && offset < parent_field_map.Length()) {
field ^= parent_field_map.At(offset);
- jselement.AddProperty("slot", field);
+ jselement.AddProperty("parentField", field);
}
+ } else {
+ intptr_t element_index = slot_offset.Value();
+ jselement.AddProperty("_parentWordOffset", element_index);
}
// We nil out the array after generating the response to prevent
@@ -1870,7 +1872,7 @@ static bool GetInstances(Isolate* isolate, JSONStream* js) {
JSONArray samples(&jsobj, "samples");
for (int i = 0; i < storage.Length(); i++) {
const Object& sample = Object::Handle(storage.At(i));
- samples.AddValue(Instance::Cast(sample));
+ samples.AddValue(sample);
}
}
return true;
« no previous file with comments | « runtime/observatory/tests/service/inbound_references_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698