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

Unified Diff: runtime/vm/object.cc

Issue 501583007: Treat null like the object it is in the Observatory and Service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 5c138fe05b5bbd4ee5c938593c71a2df3bfcc076..28d39c17ed32a189d7b2a4b12fcf4bd77acc08c4 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -1549,6 +1549,11 @@ void Object::PrintJSON(JSONStream* stream, bool ref) const {
jsobj.AddProperty("type", ref ? "@Null" : "Null");
jsobj.AddProperty("id", "objects/null");
jsobj.AddProperty("valueAsString", "null");
+ if (!ref) {
+ const Class& cls = Class::Handle(this->clazz());
+ jsobj.AddProperty("class", cls);
+ jsobj.AddProperty("size", raw()->Size());
+ }
} else {
PrintJSONImpl(stream, ref);
}

Powered by Google App Engine
This is Rietveld 408576698