| 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" |
| 11 #include "vm/flags.h" | 11 #include "vm/flags.h" |
| 12 #include "vm/native_entry.h" | 12 #include "vm/native_entry.h" |
| 13 #include "vm/object.h" | 13 #include "vm/object.h" |
| 14 #include "vm/object_store.h" | 14 #include "vm/object_store.h" |
| 15 #include "vm/service.h" | 15 #include "vm/service.h" |
| 16 | 16 |
| 17 namespace dart { | 17 namespace dart { |
| 18 | 18 |
| 19 // Native implementations for the dart:developer library. | 19 // Native implementations for the dart:developer library. |
| 20 | |
| 21 DEFINE_NATIVE_ENTRY(Developer_debugger, 2) { | 20 DEFINE_NATIVE_ENTRY(Developer_debugger, 2) { |
| 22 GET_NON_NULL_NATIVE_ARGUMENT(Bool, when, arguments->NativeArgAt(0)); | 21 GET_NON_NULL_NATIVE_ARGUMENT(Bool, when, arguments->NativeArgAt(0)); |
| 23 GET_NATIVE_ARGUMENT(String, msg, arguments->NativeArgAt(1)); | 22 GET_NATIVE_ARGUMENT(String, msg, arguments->NativeArgAt(1)); |
| 24 Debugger* debugger = isolate->debugger(); | 23 Debugger* debugger = isolate->debugger(); |
| 25 if (!FLAG_support_debugger || !debugger) { | 24 if (!FLAG_support_debugger || !debugger) { |
| 26 return when.raw(); | 25 return when.raw(); |
| 27 } | 26 } |
| 28 if (when.value()) { | 27 if (when.value()) { |
| 29 debugger->BreakHere(msg); | 28 debugger->BreakHere(msg); |
| 30 } | 29 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 if (!FLAG_support_service) { | 89 if (!FLAG_support_service) { |
| 91 return Object::null(); | 90 return Object::null(); |
| 92 } | 91 } |
| 93 GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(0)); | 92 GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(0)); |
| 94 GET_NON_NULL_NATIVE_ARGUMENT(Instance, handler, arguments->NativeArgAt(1)); | 93 GET_NON_NULL_NATIVE_ARGUMENT(Instance, handler, arguments->NativeArgAt(1)); |
| 95 isolate->RegisterServiceExtensionHandler(name, handler); | 94 isolate->RegisterServiceExtensionHandler(name, handler); |
| 96 return Object::null(); | 95 return Object::null(); |
| 97 } | 96 } |
| 98 | 97 |
| 99 } // namespace dart | 98 } // namespace dart |
| OLD | NEW |