| 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 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |