OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "include/dart_debugger_api.h" | 5 #include "include/dart_debugger_api.h" |
6 | 6 |
7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
10 #include "vm/dart_api_state.h" | 10 #include "vm/dart_api_state.h" |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 return Api::Success(); | 966 return Api::Success(); |
967 } | 967 } |
968 | 968 |
969 | 969 |
970 DART_EXPORT Dart_Isolate Dart_GetIsolate(Dart_IsolateId isolate_id) { | 970 DART_EXPORT Dart_Isolate Dart_GetIsolate(Dart_IsolateId isolate_id) { |
971 Isolate* isolate = PortMap::GetIsolate(isolate_id); | 971 Isolate* isolate = PortMap::GetIsolate(isolate_id); |
972 return Api::CastIsolate(isolate); | 972 return Api::CastIsolate(isolate); |
973 } | 973 } |
974 | 974 |
975 | 975 |
| 976 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { |
| 977 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); |
| 978 return isolate->debugger()->GetIsolateId(); |
| 979 } |
| 980 |
| 981 |
976 DART_EXPORT char* Dart_GetVmStatus(const char* request) { | 982 DART_EXPORT char* Dart_GetVmStatus(const char* request) { |
977 if (strncmp(request, "/isolate/", 9) == 0) { | 983 if (strncmp(request, "/isolate/", 9) == 0) { |
978 return Isolate::GetStatus(request); | 984 return Isolate::GetStatus(request); |
979 } | 985 } |
980 return NULL; | 986 return NULL; |
981 } | 987 } |
982 | 988 |
983 } // namespace dart | 989 } // namespace dart |
OLD | NEW |