OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |