Chromium Code Reviews| Index: runtime/vm/object.h |
| diff --git a/runtime/vm/object.h b/runtime/vm/object.h |
| index 1fe836e6dd3b38f9d6c7277ab96bfa43b04c63c7..e236df2841416f54a83ea37c961c00eba9450703 100644 |
| --- a/runtime/vm/object.h |
| +++ b/runtime/vm/object.h |
| @@ -134,11 +134,12 @@ class Symbols; |
| /* Object is printed as JSON into stream. If ref is true only a header */ \ |
| /* with an object id is printed. If ref is false the object is fully */ \ |
| /* printed. */ \ |
| - virtual void PrintToJSONStream(JSONStream* stream, bool ref = true) const; \ |
| virtual const char* JSONType(bool ref) const { \ |
| return ref ? "@"#object : ""#object; \ |
| } \ |
| static const ClassId kClassId = k##object##Cid; \ |
| + protected: /* NOLINT */ \ |
|
Cutch
2014/04/28 21:27:20
whitespace before the \
|
| + virtual void PrintJSONImpl(JSONStream* stream, bool ref) const; \ |
|
Cutch
2014/04/28 21:27:20
whitespace before the \
|
| private: /* NOLINT */ \ |
| /* Initialize the handle based on the raw_ptr in the presence of null. */ \ |
| static void initializeHandle(object* obj, RawObject* raw_ptr) { \ |
| @@ -268,10 +269,7 @@ class Object { |
| } |
| } |
| - virtual void PrintToJSONStream(JSONStream* stream, bool ref = true) const { |
| - JSONObject jsobj(stream); |
| - jsobj.AddProperty("type", JSONType(ref)); |
| - } |
| + void PrintJSON(JSONStream* stream, bool ref = true) const; |
| virtual const char* JSONType(bool ref) const { |
| return IsNull() ? "null" : "Object"; |
| @@ -544,6 +542,12 @@ class Object { |
| RawObject* raw_; // The raw object reference. |
| + protected: |
| + virtual void PrintJSONImpl(JSONStream* stream, bool ref) const { |
| + JSONObject jsobj(stream); |
| + jsobj.AddProperty("type", JSONType(ref)); |
| + } |
| + |
| private: |
| static intptr_t NextFieldOffset() { |
| // Indicates this class cannot be extended by dart code. |
| @@ -4171,10 +4175,10 @@ class Instance : public Object { |
| HEAP_OBJECT_IMPLEMENTATION(Instance, Object); |
| friend class Class; |
| friend class Closure; |
| + friend class DeferredObject; |
| friend class SnapshotWriter; |
| friend class StubCode; |
| friend class TypedDataView; |
| - friend class DeferredObject; |
| }; |