OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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/bootstrap_natives.h" | 5 #include "vm/bootstrap_natives.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 | 8 |
9 #include "vm/debugger.h" | 9 #include "vm/debugger.h" |
10 #include "vm/exceptions.h" | 10 #include "vm/exceptions.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 GET_NON_NULL_NATIVE_ARGUMENT(Bool, enabled, arguments->NativeArgAt(1)); | 165 GET_NON_NULL_NATIVE_ARGUMENT(Bool, enabled, arguments->NativeArgAt(1)); |
166 if (!ServiceIsolate::IsRunning()) { | 166 if (!ServiceIsolate::IsRunning()) { |
167 SendNull(port); | 167 SendNull(port); |
168 } else { | 168 } else { |
169 ServiceIsolate::ControlWebServer(port, enabled.value()); | 169 ServiceIsolate::ControlWebServer(port, enabled.value()); |
170 } | 170 } |
171 return Object::null(); | 171 return Object::null(); |
172 #endif | 172 #endif |
173 } | 173 } |
174 | 174 |
| 175 |
| 176 DEFINE_NATIVE_ENTRY(Developer_getIsolateIDFromSendPort, 1) { |
| 177 #if defined(PRODUCT) |
| 178 return Object::null(); |
| 179 #else |
| 180 GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0)); |
| 181 int64_t port_id = port.Id(); |
| 182 return String::NewFormatted(ISOLATE_SERVICE_ID_FORMAT_STRING, port_id); |
| 183 #endif |
| 184 } |
| 185 |
| 186 |
175 } // namespace dart | 187 } // namespace dart |
OLD | NEW |