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

Unified Diff: runtime/vm/object.cc

Issue 1090293003: Kill service_test.cc tests in favor of dart tests for the service protocol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests Created 5 years, 8 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/class_table.cc ('k') | runtime/vm/pages.cc » ('j') | 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 186a1bfe372e8f029e0497e7776a3856d28af5b8..714c693b0e41dc01c2d07027e467f3db6ab533cc 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -1601,6 +1601,12 @@ void Object::PrintJSONImpl(JSONStream* stream, bool ref) const {
ObjectIdRing* ring = Isolate::Current()->object_id_ring();
const intptr_t id = ring->GetIdForObject(raw());
jsobj.AddPropertyF("id", "objects/%" Pd "", id);
+ if (ref) {
+ return;
+ }
+ Class& cls = Class::Handle(this->clazz());
+ jsobj.AddProperty("class", cls);
+ jsobj.AddProperty("size", raw()->Size());
}
@@ -3524,7 +3530,7 @@ RawType* Class::CanonicalTypeFromIndex(intptr_t idx) const {
}
}
Object& types = Object::Handle(canonical_types());
- if (types.IsNull()) {
+ if (types.IsNull() || !types.IsArray()) {
return Type::null();
}
if ((idx < 0) || (idx >= Array::Cast(types).Length())) {
@@ -13943,6 +13949,8 @@ void Instance::PrintSharedInstanceJSON(JSONObject* jsobj,
if (raw()->IsHeapObject()) {
jsobj->AddProperty("size", raw()->Size());
+ } else {
+ jsobj->AddProperty("size", (intptr_t)0);
}
// Walk the superclass chain, adding all instance fields.
@@ -15119,7 +15127,10 @@ void Type::PrintJSONImpl(JSONStream* stream, bool ref) const {
if (ref) {
return;
}
- jsobj.AddProperty("typeArguments", TypeArguments::Handle(arguments()));
+ const TypeArguments& typeArgs = TypeArguments::Handle(arguments());
+ if (!typeArgs.IsNull()) {
+ jsobj.AddProperty("typeArguments", typeArgs);
+ }
}
« no previous file with comments | « runtime/vm/class_table.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698