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

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: sync and build 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
« no previous file with comments | « runtime/bin/vmservice/observatory/lib/src/elements/service_view.dart ('k') | runtime/vm/object_id_ring.h » ('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 f0d805932409426e298832c5ab0ad44bb94ec61a..43d45935dd1a93a3298f678055c7787ad6fff78a 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);
}
« no previous file with comments | « runtime/bin/vmservice/observatory/lib/src/elements/service_view.dart ('k') | runtime/vm/object_id_ring.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698