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

Side by Side Diff: runtime/vm/object_service.cc

Issue 2223543002: Always send typeClass field, if it is resolved (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/service/service.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/debugger.h" 5 #include "vm/debugger.h"
6 #include "vm/disassembler.h" 6 #include "vm/disassembler.h"
7 #include "vm/object.h" 7 #include "vm/object.h"
8 #include "vm/object_store.h" 8 #include "vm/object_store.h"
9 #include "vm/stub_code.h" 9 #include "vm/stub_code.h"
10 #include "vm/symbols.h" 10 #include "vm/symbols.h"
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 1128
1129 void AbstractType::PrintJSONImpl(JSONStream* stream, bool ref) const { 1129 void AbstractType::PrintJSONImpl(JSONStream* stream, bool ref) const {
1130 UNREACHABLE(); 1130 UNREACHABLE();
1131 } 1131 }
1132 1132
1133 1133
1134 void Type::PrintJSONImpl(JSONStream* stream, bool ref) const { 1134 void Type::PrintJSONImpl(JSONStream* stream, bool ref) const {
1135 JSONObject jsobj(stream); 1135 JSONObject jsobj(stream);
1136 PrintSharedInstanceJSON(&jsobj, ref); 1136 PrintSharedInstanceJSON(&jsobj, ref);
1137 jsobj.AddProperty("kind", "Type"); 1137 jsobj.AddProperty("kind", "Type");
1138 if (IsCanonical()) { 1138 if (HasResolvedTypeClass()) {
1139 const Class& type_cls = Class::Handle(type_class()); 1139 const Class& type_cls = Class::Handle(type_class());
1140 if (type_cls.CanonicalType() == raw()) { 1140 if (type_cls.CanonicalType() == raw()) {
1141 intptr_t cid = type_cls.id(); 1141 intptr_t cid = type_cls.id();
1142 jsobj.AddFixedServiceId("classes/%" Pd "/types/%d", cid, 0); 1142 jsobj.AddFixedServiceId("classes/%" Pd "/types/%d", cid, 0);
1143 jsobj.AddProperty("typeClass", type_cls);
1144 } else { 1143 } else {
1145 jsobj.AddServiceId(*this); 1144 jsobj.AddServiceId(*this);
1146 } 1145 }
1146 jsobj.AddProperty("typeClass", type_cls);
1147 } else { 1147 } else {
1148 jsobj.AddServiceId(*this); 1148 jsobj.AddServiceId(*this);
1149 } 1149 }
1150 const String& user_name = String::Handle(UserVisibleName()); 1150 const String& user_name = String::Handle(UserVisibleName());
1151 const String& vm_name = String::Handle(Name()); 1151 const String& vm_name = String::Handle(Name());
1152 AddNameProperties(&jsobj, user_name, vm_name); 1152 AddNameProperties(&jsobj, user_name, vm_name);
1153 if (ref) { 1153 if (ref) {
1154 return; 1154 return;
1155 } 1155 }
1156 const TypeArguments& typeArgs = TypeArguments::Handle(arguments()); 1156 const TypeArguments& typeArgs = TypeArguments::Handle(arguments());
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 jsobj.AddProperty("mirrorReferent", referent_handle); 1597 jsobj.AddProperty("mirrorReferent", referent_handle);
1598 } 1598 }
1599 1599
1600 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 1600 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
1601 Instance::PrintJSONImpl(stream, ref); 1601 Instance::PrintJSONImpl(stream, ref);
1602 } 1602 }
1603 1603
1604 #endif 1604 #endif
1605 1605
1606 } // namespace dart 1606 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/service/service.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698