Index: runtime/vm/json_stream.cc |
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc |
index 1749cff98c68412a0e161ab3f72f7674ff6dc3a6..df60bc52992e42f6acfe551d15959bbb36ab9b2d 100644 |
--- a/runtime/vm/json_stream.cc |
+++ b/runtime/vm/json_stream.cc |
@@ -3,6 +3,7 @@ |
// BSD-style license that can be found in the LICENSE file. |
#include "platform/assert.h" |
+#include "vm/object.h" |
#include "vm/json_stream.h" |
@@ -83,6 +84,12 @@ void JSONStream::PrintValue(const char* s) { |
} |
+void JSONStream::PrintValue(const Object& o, bool ref) { |
+ PrintCommaIfNeeded(); |
+ o.PrintToJSONStream(this, ref); |
+} |
+ |
+ |
void JSONStream::PrintPropertyBool(const char* name, bool b) { |
PrintPropertyName(name); |
PrintValueBool(b); |
@@ -107,6 +114,12 @@ void JSONStream::PrintProperty(const char* name, const char* s) { |
} |
+void JSONStream::PrintProperty(const char* name, const Object& o, bool ref) { |
+ PrintPropertyName(name); |
+ PrintValue(o, ref); |
+} |
+ |
+ |
void JSONStream::PrintPropertyName(const char* name) { |
ASSERT(name != NULL); |
PrintCommaIfNeeded(); |