Chromium Code Reviews| Index: runtime/vm/object.cc |
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
| index f93e45982f9a1d4320e66f1f2739854b78e3ed0f..c9bb3e1ac5cbb8118f6ee5aeb42297ab37fac4f7 100644 |
| --- a/runtime/vm/object.cc |
| +++ b/runtime/vm/object.cc |
| @@ -12523,11 +12523,16 @@ void Code::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| jsobj.AddPropertyF("end", "%" Px "", EntryPoint() + Size()); |
| jsobj.AddProperty("optimized", is_optimized()); |
| jsobj.AddProperty("alive", is_alive()); |
| - jsobj.AddProperty("kind", "Dart"); |
| + const Object& obj = Object::Handle(owner()); |
| + const bool is_stub = !obj.IsFunction(); |
|
siva
2015/03/02 21:58:44
It might be cleaner to have a
bool IsStub() const
|
| + if (is_stub) { |
| + jsobj.AddProperty("kind", "Stub"); |
| + } else { |
| + jsobj.AddProperty("kind", "Dart"); |
| + } |
| const String& user_name = String::Handle(PrettyName()); |
| const String& vm_name = String::Handle(Name()); |
| AddNameProperties(&jsobj, user_name, vm_name); |
| - const Object& obj = Object::Handle(owner()); |
| if (obj.IsFunction()) { |
| jsobj.AddProperty("function", obj); |
| } else { |
| @@ -12535,7 +12540,6 @@ void Code::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| JSONObject func(&jsobj, "function"); |
| func.AddProperty("type", "@Function"); |
| func.AddProperty("kind", "Stub"); |
| - func.AddPropertyF("id", "functions/stub-%" Pd "", EntryPoint()); |
| func.AddProperty("name", user_name.ToCString()); |
| AddNameProperties(&func, user_name, vm_name); |
| } |