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

Unified Diff: sdk/lib/_internal/compiler/js_lib/debugger_patch.dart

Issue 1121293003: Provide a dart2js implementation of dart:debugger (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | sdk/lib/_internal/libraries.dart » ('j') | sdk/lib/debugger/debugger.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/js_lib/debugger_patch.dart
diff --git a/sdk/lib/debugger/debugger.dart b/sdk/lib/_internal/compiler/js_lib/debugger_patch.dart
similarity index 72%
copy from sdk/lib/debugger/debugger.dart
copy to sdk/lib/_internal/compiler/js_lib/debugger_patch.dart
index 33cf81b9e2f07e10f1947693a3715957dc1e77e7..b5098cb6649904a0d3d7f29468d7abada52a5459 100644
--- a/sdk/lib/debugger/debugger.dart
+++ b/sdk/lib/_internal/compiler/js_lib/debugger_patch.dart
@@ -2,22 +2,27 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-/// Programmatically trigger breakpoints.
-library dart.debugger;
+// Patch file for dart:debugger library.
-/// Programmatically trigger breakpoints.
-class Debugger {
+import 'dart:_js_helper' show patch;
+import 'dart:_foreign_helper' show JS;
+
+@patch class Debugger {
/// Stop the program as if a breakpoint where hit at the following statement.
/// NOTE: When invoked, the isolate will not return until a debugger
/// continues execution. The behaviour is the same regardless of whether or
/// not a debugger is connected.
skybrian 2015/05/05 19:35:38 The last statement isn't true for the JavaScript "
sra1 2015/05/06 04:33:10 +1
Alan Knight 2015/05/06 17:04:39 Done.
+ @patch
static void breakHere() {
floitsch 2015/05/05 20:29:28 The _js_helper library has a "ForceInline()" annot
Alan Knight 2015/05/06 17:04:39 Done.
- print('Debugger.breakHere not supported on this platform.');
+ JS('', 'debugger');
}
/// If [expr] is true, stop the program as if a breakpoint where hit at the
/// following statement.
+ @patch
static void breakHereIf(bool expr) {
floitsch 2015/05/05 20:29:28 ditto.
Alan Knight 2015/05/06 17:04:38 Done.
- print('Debugger.breakHereIf not supported on this platform.');
+ if (expr) {
+ breakHere();
+ }
}
-}
+}
« no previous file with comments | « no previous file | sdk/lib/_internal/libraries.dart » ('j') | sdk/lib/debugger/debugger.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698