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

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: gen js 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
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/json_stream.cc » ('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) 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 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 } 876 }
877 877
878 878
879 void Isolate::VisitPrologueWeakPersistentHandles(HandleVisitor* visitor) { 879 void Isolate::VisitPrologueWeakPersistentHandles(HandleVisitor* visitor) {
880 if (api_state() != NULL) { 880 if (api_state() != NULL) {
881 api_state()->VisitPrologueWeakHandles(visitor); 881 api_state()->VisitPrologueWeakHandles(visitor);
882 } 882 }
883 } 883 }
884 884
885 885
886 void Isolate::PrintToJSONStream(JSONStream* stream, bool ref) { 886 void Isolate::PrintJSON(JSONStream* stream, bool ref) {
887 JSONObject jsobj(stream); 887 JSONObject jsobj(stream);
888 jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate")); 888 jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate"));
889 jsobj.AddPropertyF("id", "isolates/%" Pd "", 889 jsobj.AddPropertyF("id", "isolates/%" Pd "",
890 static_cast<intptr_t>(main_port())); 890 static_cast<intptr_t>(main_port()));
891 jsobj.AddPropertyF("mainPort", "%" Pd "", 891 jsobj.AddPropertyF("mainPort", "%" Pd "",
892 static_cast<intptr_t>(main_port())); 892 static_cast<intptr_t>(main_port()));
893 893
894 // Assign an isolate name based on the entry function. 894 // Assign an isolate name based on the entry function.
895 IsolateSpawnState* state = spawn_state(); 895 IsolateSpawnState* state = spawn_state();
896 if (state == NULL) { 896 if (state == NULL) {
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 return func.raw(); 1168 return func.raw();
1169 } 1169 }
1170 1170
1171 1171
1172 void IsolateSpawnState::Cleanup() { 1172 void IsolateSpawnState::Cleanup() {
1173 SwitchIsolateScope switch_scope(isolate()); 1173 SwitchIsolateScope switch_scope(isolate());
1174 Dart::ShutdownIsolate(); 1174 Dart::ShutdownIsolate();
1175 } 1175 }
1176 1176
1177 } // namespace dart 1177 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/json_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698