Index: runtime/lib/developer.cc |
diff --git a/runtime/lib/debugger.cc b/runtime/lib/developer.cc |
similarity index 55% |
rename from runtime/lib/debugger.cc |
rename to runtime/lib/developer.cc |
index b2a91b183aa5fcd298be99ab09d3d25772f9d099..32b8384d43a33093533e4e6b7fdd3fece42b2b02 100644 |
--- a/runtime/lib/debugger.cc |
+++ b/runtime/lib/developer.cc |
@@ -14,29 +14,19 @@ |
namespace dart { |
-// dart:debugger. |
+// Native implementations for the dart:developer library. |
-DEFINE_NATIVE_ENTRY(Debugger_breakHere, 0) { |
+DEFINE_NATIVE_ENTRY(Developer_debugger, 2) { |
+ GET_NON_NULL_NATIVE_ARGUMENT(Bool, when, arguments->NativeArgAt(0)); |
+ GET_NATIVE_ARGUMENT(String, msg, arguments->NativeArgAt(1)); |
Debugger* debugger = isolate->debugger(); |
if (!debugger) { |
- return Object::null(); |
+ return when.raw(); |
} |
- debugger->BreakHere(); |
- return Object::null(); |
-} |
- |
- |
-DEFINE_NATIVE_ENTRY(Debugger_breakHereIf, 1) { |
- Debugger* debugger = isolate->debugger(); |
- if (!debugger) { |
- return Object::null(); |
- } |
- GET_NON_NULL_NATIVE_ARGUMENT(Bool, expr, arguments->NativeArgAt(0)); |
- if (expr.value()) { |
- debugger->BreakHere(); |
+ if (when.value()) { |
+ debugger->BreakHere(msg); |
} |
- return Object::null(); |
+ return when.raw(); |
} |
- |
} // namespace dart |