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

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

Issue 257053003: Always use the same json for null in the vm service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/json.h" 9 #include "platform/json.h"
10 #include "lib/mirrors.h" 10 #include "lib/mirrors.h"
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 } 875 }
876 876
877 877
878 void Isolate::VisitPrologueWeakPersistentHandles(HandleVisitor* visitor) { 878 void Isolate::VisitPrologueWeakPersistentHandles(HandleVisitor* visitor) {
879 if (api_state() != NULL) { 879 if (api_state() != NULL) {
880 api_state()->VisitPrologueWeakHandles(visitor); 880 api_state()->VisitPrologueWeakHandles(visitor);
881 } 881 }
882 } 882 }
883 883
884 884
885 void Isolate::PrintToJSONStream(JSONStream* stream, bool ref) { 885 void Isolate::PrintJSON(JSONStream* stream, bool ref) {
886 JSONObject jsobj(stream); 886 JSONObject jsobj(stream);
887 jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate")); 887 jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate"));
888 jsobj.AddPropertyF("id", "isolates/%" Pd "", 888 jsobj.AddPropertyF("id", "isolates/%" Pd "",
889 static_cast<intptr_t>(main_port())); 889 static_cast<intptr_t>(main_port()));
890 jsobj.AddPropertyF("mainPort", "%" Pd "", 890 jsobj.AddPropertyF("mainPort", "%" Pd "",
891 static_cast<intptr_t>(main_port())); 891 static_cast<intptr_t>(main_port()));
892 892
893 // Assign an isolate name based on the entry function. 893 // Assign an isolate name based on the entry function.
894 IsolateSpawnState* state = spawn_state(); 894 IsolateSpawnState* state = spawn_state();
895 if (state == NULL) { 895 if (state == NULL) {
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 return func.raw(); 1167 return func.raw();
1168 } 1168 }
1169 1169
1170 1170
1171 void IsolateSpawnState::Cleanup() { 1171 void IsolateSpawnState::Cleanup() {
1172 SwitchIsolateScope switch_scope(isolate()); 1172 SwitchIsolateScope switch_scope(isolate());
1173 Dart::ShutdownIsolate(); 1173 Dart::ShutdownIsolate();
1174 } 1174 }
1175 1175
1176 } // namespace dart 1176 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/json_stream.cc » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698