| Index: runtime/observatory/lib/src/elements/debugger.dart
|
| diff --git a/runtime/observatory/lib/src/elements/debugger.dart b/runtime/observatory/lib/src/elements/debugger.dart
|
| index dada6923c1fd537c613627a75ca97af496b6382d..d609ff3c33045dc08b576619a09c3a2faadf1200 100644
|
| --- a/runtime/observatory/lib/src/elements/debugger.dart
|
| +++ b/runtime/observatory/lib/src/elements/debugger.dart
|
| @@ -209,8 +209,7 @@ class DownCommand extends DebuggerCommand {
|
| debugger.downFrame(count);
|
| debugger.console.print('frame = ${debugger.currentFrame}');
|
| } catch (e) {
|
| - debugger.console.print(
|
| - 'frame must be in range [${e.start}..${e.end-1}]');
|
| + debugger.console.print('frame must be in range [${e.start}..${e.end-1}]');
|
| }
|
| return new Future.value(null);
|
| }
|
| @@ -244,8 +243,7 @@ class UpCommand extends DebuggerCommand {
|
| debugger.upFrame(count);
|
| debugger.console.print('frame = ${debugger.currentFrame}');
|
| } on RangeError catch (e) {
|
| - debugger.console.print(
|
| - 'frame must be in range [${e.start}..${e.end-1}]');
|
| + debugger.console.print('frame must be in range [${e.start}..${e.end-1}]');
|
| }
|
| return new Future.value(null);
|
| }
|
| @@ -281,8 +279,7 @@ class FrameCommand extends DebuggerCommand {
|
| debugger.currentFrame = frame;
|
| debugger.console.print('frame = ${debugger.currentFrame}');
|
| } on RangeError catch (e) {
|
| - debugger.console.print(
|
| - 'frame must be in range [${e.start}..${e.end-1}]');
|
| + debugger.console.print('frame must be in range [${e.start}..${e.end-1}]');
|
| }
|
| return new Future.value(null);
|
| }
|
| @@ -418,12 +415,12 @@ class RewindCommand extends DebuggerCommand {
|
| debugger.console.print('rewind expects 0 or 1 argument');
|
| return;
|
| } else if (count < 1 || count > debugger.stackDepth) {
|
| - debugger.console.print(
|
| - 'frame must be in range [1..${debugger.stackDepth - 1}]');
|
| + debugger.console
|
| + .print('frame must be in range [1..${debugger.stackDepth - 1}]');
|
| return;
|
| }
|
| await debugger.rewind(count);
|
| - } on S.ServerRpcException catch(e) {
|
| + } on S.ServerRpcException catch (e) {
|
| if (e.code == S.ServerRpcException.kCannotResume) {
|
| debugger.console.printRed(e.data['details']);
|
| } else {
|
| @@ -434,8 +431,7 @@ class RewindCommand extends DebuggerCommand {
|
|
|
| String helpShort = 'Rewind the stack to a previous frame';
|
|
|
| - String helpLong =
|
| - 'Rewind the stack to a previous frame.\n'
|
| + String helpLong = 'Rewind the stack to a previous frame.\n'
|
| '\n'
|
| 'Syntax: rewind\n'
|
| ' rewind <count>\n';
|
| @@ -454,7 +450,7 @@ class ReloadCommand extends DebuggerCommand {
|
| await debugger.isolate.reloadSources();
|
| debugger.console.print('reload complete');
|
| await debugger.refreshStack();
|
| - } on S.ServerRpcException catch(e) {
|
| + } on S.ServerRpcException catch (e) {
|
| if (e.code == S.ServerRpcException.kIsolateReloadBarred ||
|
| e.code == S.ServerRpcException.kIsolateReloadFailed ||
|
| e.code == S.ServerRpcException.kIsolateIsReloading) {
|
| @@ -467,8 +463,7 @@ class ReloadCommand extends DebuggerCommand {
|
|
|
| String helpShort = 'Reload the sources for the current isolate';
|
|
|
| - String helpLong =
|
| - 'Reload the sources for the current isolate.\n'
|
| + String helpLong = 'Reload the sources for the current isolate.\n'
|
| '\n'
|
| 'Syntax: reload\n';
|
| }
|
| @@ -1833,24 +1828,18 @@ class ObservatoryDebugger extends Debugger {
|
| console.printBold('\$ $command');
|
| return cmd.runCommand(command).then((_) {
|
| lastCommand = command;
|
| - }).catchError(
|
| - (e, s) {
|
| - console.printRed('Unable to execute command because the connection '
|
| - 'to the VM has been closed');
|
| - }, test: (e) => e is S.NetworkRpcException
|
| - ).catchError(
|
| - (e, s) {
|
| - console.printRed(e.toString());
|
| - }, test: (e) => e is CommandException
|
| - ).catchError(
|
| - (e, s) {
|
| - if (s != null) {
|
| - console.printRed('Internal error: $e\n$s');
|
| - } else {
|
| - console.printRed('Internal error: $e\n');
|
| - }
|
| + }).catchError((e, s) {
|
| + console.printRed('Unable to execute command because the connection '
|
| + 'to the VM has been closed');
|
| + }, test: (e) => e is S.NetworkRpcException).catchError((e, s) {
|
| + console.printRed(e.toString());
|
| + }, test: (e) => e is CommandException).catchError((e, s) {
|
| + if (s != null) {
|
| + console.printRed('Internal error: $e\n$s');
|
| + } else {
|
| + console.printRed('Internal error: $e\n');
|
| }
|
| - );
|
| + });
|
| }
|
|
|
| String historyPrev(String command) {
|
| @@ -2417,10 +2406,9 @@ class DebuggerFrameElement extends HtmlElement implements Renderable {
|
| bool _expanded = false;
|
|
|
| void setCurrent(bool value) {
|
| - Future load =
|
| - (_frame.function != null) ?
|
| - _frame.function.load() :
|
| - new Future.value(null);
|
| + Future load = (_frame.function != null)
|
| + ? _frame.function.load()
|
| + : new Future.value(null);
|
| load.then((func) {
|
| _current = value;
|
| if (_current) {
|
| @@ -2480,8 +2468,7 @@ class DebuggerFrameElement extends HtmlElement implements Renderable {
|
| }
|
| if (_frame.kind == M.FrameKind.asyncSuspensionMarker) {
|
| final content = <Element>[
|
| - new SpanElement()
|
| - ..children = _createMarkerHeader(_frame.marker)
|
| + new SpanElement()..children = _createMarkerHeader(_frame.marker)
|
| ];
|
| children = content;
|
| return;
|
| @@ -2603,7 +2590,7 @@ class DebuggerFrameElement extends HtmlElement implements Renderable {
|
| new DivElement()
|
| ..classes = ['frameSummary']
|
| ..children = content
|
| - ];
|
| + ];
|
| }
|
|
|
| List<Element> _createHeader() {
|
| @@ -2657,8 +2644,7 @@ class DebuggerFrameElement extends HtmlElement implements Renderable {
|
| return frame.function == null;
|
| }
|
| return (newFrame.function.id == _frame.function.id &&
|
| - newFrame.location.script.id ==
|
| - frame.location.script.id);
|
| + newFrame.location.script.id == frame.location.script.id);
|
| }
|
|
|
| void updateFrame(S.Frame newFrame) {
|
|
|