| Index: test/mjsunit/debug-return-value.js
|
| diff --git a/test/mjsunit/debug-return-value.js b/test/mjsunit/debug-return-value.js
|
| index 02d6a7cbc93f708e4a3fc09049905e66378362e1..8f639c8231b8a97c8869419fedbd76d5bda1cb35 100644
|
| --- a/test/mjsunit/debug-return-value.js
|
| +++ b/test/mjsunit/debug-return-value.js
|
| @@ -27,7 +27,7 @@
|
|
|
| // Flags: --expose-debug-as debug
|
| // Get the Debug object exposed from the debug context global object.
|
| -Debug = debug.Debug
|
| +Debug = debug.Debug;
|
|
|
|
|
| function ParsedResponse(json) {
|
| @@ -43,22 +43,22 @@ function ParsedResponse(json) {
|
|
|
| ParsedResponse.prototype.response = function() {
|
| return this.response_;
|
| -}
|
| +};
|
|
|
|
|
| ParsedResponse.prototype.body = function() {
|
| return this.response_.body;
|
| -}
|
| +};
|
|
|
|
|
| ParsedResponse.prototype.running = function() {
|
| return this.response_.running;
|
| -}
|
| +};
|
|
|
|
|
| ParsedResponse.prototype.lookup = function(handle) {
|
| return this.refs_[handle];
|
| -}
|
| +};
|
|
|
|
|
| listener_complete = false;
|
| @@ -70,11 +70,10 @@ debugger_source_position = 0;
|
| // Listener which expects to do four steps to reach returning from the function.
|
| function listener(event, exec_state, event_data, data) {
|
| try {
|
| - if (event == Debug.DebugEvent.Break)
|
| - {
|
| + if (event == Debug.DebugEvent.Break) {
|
| break_count++;
|
| if (break_count < 4) {
|
| - assertFalse(exec_state.frame(0).isAtReturn())
|
| + assertFalse(exec_state.frame(0).isAtReturn());
|
| switch (break_count) {
|
| case 1:
|
| // Collect the position of the debugger statement.
|
| @@ -105,7 +104,7 @@ function listener(event, exec_state, event_data, data) {
|
| exec_state.frame(0).sourcePosition());
|
|
|
| // Just about to return from the function.
|
| - assertTrue(exec_state.frame(0).isAtReturn())
|
| + assertTrue(exec_state.frame(0).isAtReturn());
|
| assertEquals(expected_return_value,
|
| exec_state.frame(0).returnValue().value());
|
|
|
| @@ -123,9 +122,9 @@ function listener(event, exec_state, event_data, data) {
|
| }
|
| }
|
| } catch (e) {
|
| - exception = e
|
| - };
|
| -};
|
| + exception = e;
|
| + }
|
| +}
|
|
|
| // Add the debug event listener.
|
| Debug.setListener(listener);
|
| @@ -135,14 +134,14 @@ Debug.setListener(listener);
|
| // 0 1 2 3 4 5
|
| // 0123456789012345678901234567890123456789012345678901
|
|
|
| -function f(x) {debugger; if (x) { return 1; } else { return 2; } };
|
| +function f(x) {debugger; if (x) { return 1; } else { return 2; } }
|
|
|
| // Call f expecting different return values.
|
| break_count = 0;
|
| expected_return_value = 2;
|
| listener_complete = false;
|
| f();
|
| -assertFalse(exception, "exception in listener")
|
| +assertFalse(exception, "exception in listener");
|
| assertTrue(listener_complete);
|
| assertEquals(4, break_count);
|
|
|
| @@ -150,7 +149,7 @@ break_count = 0;
|
| expected_return_value = 1;
|
| listener_complete = false;
|
| f(true);
|
| -assertFalse(exception, "exception in listener")
|
| +assertFalse(exception, "exception in listener");
|
| assertTrue(listener_complete);
|
| assertEquals(4, break_count);
|
|
|
| @@ -158,6 +157,6 @@ break_count = 0;
|
| expected_return_value = 2;
|
| listener_complete = false;
|
| f(false);
|
| -assertFalse(exception, "exception in listener")
|
| +assertFalse(exception, "exception in listener");
|
| assertTrue(listener_complete);
|
| assertEquals(4, break_count);
|
|
|