| 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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 if (lib.IsNull()) { | 969 if (lib.IsNull()) { |
| 970 return Api::NewError("%s: %" Pd " is not a valid library id", | 970 return Api::NewError("%s: %" Pd " is not a valid library id", |
| 971 CURRENT_FUNC, library_id); | 971 CURRENT_FUNC, library_id); |
| 972 } | 972 } |
| 973 lib.set_debuggable(is_debuggable); | 973 lib.set_debuggable(is_debuggable); |
| 974 return Api::Success(); | 974 return Api::Success(); |
| 975 } | 975 } |
| 976 | 976 |
| 977 | 977 |
| 978 DART_EXPORT Dart_Isolate Dart_GetIsolate(Dart_IsolateId isolate_id) { | 978 DART_EXPORT Dart_Isolate Dart_GetIsolate(Dart_IsolateId isolate_id) { |
| 979 // Dart_Isolate is now the same as Dart_IsolateId. | 979 Isolate* isolate = PortMap::GetIsolate(isolate_id); |
| 980 // TODO(johnmccutchan): Kill Dart_IsolateId. | 980 return Api::CastIsolate(isolate); |
| 981 return static_cast<Dart_Isolate>(isolate_id); | |
| 982 } | 981 } |
| 983 | 982 |
| 984 | 983 |
| 985 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { | 984 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { |
| 986 // Dart_Isolate is now the same as Dart_IsolateId. | 985 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); |
| 987 // TODO(johnmccutchan): Kill Dart_IsolateId. | 986 return isolate->debugger()->GetIsolateId(); |
| 988 return static_cast<Dart_IsolateId>(dart_isolate); | |
| 989 } | 987 } |
| 990 | 988 |
| 991 } // namespace dart | 989 } // namespace dart |
| OLD | NEW |