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

Side by Side Diff: sdk/lib/_internal/compiler/js_lib/developer_patch.dart

Issue 1212513002: sdk files reorganization to make dart2js a proper package (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: renamed Created 5 years, 5 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Patch file for dart:developer library.
6
7 import 'dart:_js_helper' show patch;
8 import 'dart:_foreign_helper' show JS;
9
10 /// If [when] is true, stop the program as if a breakpoint where hit at the
11 /// following statement. Returns the value of [when]. Some debuggers may
12 /// display [msg].
13 /// NOTE: When invoked, the isolate will not return until a debugger
14 /// continues execution. When running in the Dart VM the behaviour is the same
15 /// regardless of whether or not a debugger is connected. When compiled to
16 /// JavaScript, this uses the "debugger" statement, and behaves exactly as
17 /// that does.
18 @patch
19 @ForceInline()
20 bool debugger({bool when: true, String msg}) {
21 if (when) {
22 JS('', 'debugger');
23 }
24 return when;
25 }
26
27 /// Send a reference to [object] to any attached debuggers so they may open an
28 /// inspector on the object. Returns the argument.
29 @patch
30 inspect(object) {
31 return object;
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698