| Index: test/mjsunit/debug-evaluate-closure.js
|
| diff --git a/test/mjsunit/debug-evaluate-closure.js b/test/mjsunit/debug-evaluate-closure.js
|
| index 7e8fb91da7e4f23ac2c155432fb26db2dd9a64d4..541dec9d6dab28fdc8ec7bade515a21cb230dd7c 100644
|
| --- a/test/mjsunit/debug-evaluate-closure.js
|
| +++ b/test/mjsunit/debug-evaluate-closure.js
|
| @@ -26,6 +26,7 @@
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| // Flags: --expose-debug-as debug --allow-natives-syntax
|
| +// Flags: --debug-eval-readonly-locals
|
|
|
| Debug = debug.Debug;
|
| var listened = false;
|
| @@ -34,20 +35,18 @@ function listener(event, exec_state, event_data, data) {
|
| if (event != Debug.DebugEvent.Break) return;
|
| try {
|
| assertEquals("goo", exec_state.frame(0).evaluate("goo").value());
|
| - exec_state.frame(0).evaluate("goo = 'goo foo'");
|
| + exec_state.frame(0).evaluate("goo = 'goo foo'"); // no effect
|
| assertEquals("bar return", exec_state.frame(0).evaluate("bar()").value());
|
| - // Check that calling bar() has no effect to context-allocated variables.
|
| - // TODO(yangguo): reevaluate this if we no longer update context from copy.
|
| - assertEquals("inner", exec_state.frame(0).evaluate("inner").value());
|
| - assertEquals("outer", exec_state.frame(0).evaluate("outer").value());
|
| + assertEquals("inner bar", exec_state.frame(0).evaluate("inner").value());
|
| + assertEquals("outer bar", exec_state.frame(0).evaluate("outer").value());
|
|
|
| assertEquals("baz inner", exec_state.frame(0).evaluate("baz").value());
|
| assertEquals("baz outer", exec_state.frame(1).evaluate("baz").value());
|
| exec_state.frame(0).evaluate("w = 'w foo'");
|
| - exec_state.frame(0).evaluate("inner = 'inner foo'");
|
| - exec_state.frame(0).evaluate("outer = 'outer foo'");
|
| - exec_state.frame(0).evaluate("baz = 'baz inner foo'");
|
| - exec_state.frame(1).evaluate("baz = 'baz outer foo'");
|
| + exec_state.frame(0).evaluate("inner = 'inner foo'"); // no effect
|
| + exec_state.frame(0).evaluate("outer = 'outer foo'"); // has effect
|
| + exec_state.frame(0).evaluate("baz = 'baz inner foo'"); // no effect
|
| + exec_state.frame(1).evaluate("baz = 'baz outer foo'"); // has effect
|
| listened = true;
|
| } catch (e) {
|
| print(e);
|
| @@ -69,9 +68,9 @@ function foo() {
|
|
|
| with (withv) {
|
| var bar = function bar() {
|
| - assertEquals("goo foo", goo);
|
| - inner = "inner bar"; // this has no effect, when called from debug-eval
|
| - outer = "outer bar"; // this has no effect, when called from debug-eval
|
| + assertEquals("goo", goo);
|
| + inner = "inner bar";
|
| + outer = "outer bar";
|
| v = "v bar";
|
| return "bar return";
|
| };
|
| @@ -81,8 +80,8 @@ function foo() {
|
| debugger;
|
| }
|
|
|
| - assertEquals("inner foo", inner);
|
| - assertEquals("baz inner foo", baz);
|
| + assertEquals("inner bar", inner);
|
| + assertEquals("baz inner", baz);
|
| assertEquals("w foo", withw.w);
|
| assertEquals("v bar", withv.v);
|
| }
|
|
|