Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Unified Diff: runtime/lib/debugger.cc

Issue 1116263004: Add 'dart:debugger' library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/lib/debugger.dart » ('j') | runtime/lib/debugger.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/debugger.cc
diff --git a/runtime/lib/num.cc b/runtime/lib/debugger.cc
similarity index 51%
copy from runtime/lib/num.cc
copy to runtime/lib/debugger.cc
index 8004c8c9d9e1937cd5aecf67cdb2d9122b906689..aeee8a317faefacc3195f4bc895ea35fd4944418 100644
--- a/runtime/lib/num.cc
+++ b/runtime/lib/debugger.cc
@@ -4,16 +4,26 @@
#include "vm/bootstrap_natives.h"
+#include "include/dart_api.h"
+
+#include "vm/debugger.h"
+#include "vm/exceptions.h"
#include "vm/native_entry.h"
#include "vm/object.h"
+#include "vm/object_store.h"
namespace dart {
-DEFINE_NATIVE_ENTRY(Num_toString, 1) {
- const Number& number = Number::CheckedHandle(arguments->NativeArgAt(0));
- Heap::Space space = isolate->heap()->ShouldPretenure(kOneByteStringCid) ?
- Heap::kPretenured : Heap::kNew;
- return number.ToString(space);
+// dart:debugger.
+
+DEFINE_NATIVE_ENTRY(Debugger_breakpoint, 0) {
+ Debugger* debugger = isolate->debugger();
+ if (!debugger) {
+ return Object::null();
+ }
+ debugger->ExplicitBreakpoint();
+ return Object::null();
}
+
} // namespace dart
« no previous file with comments | « no previous file | runtime/lib/debugger.dart » ('j') | runtime/lib/debugger.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698