Backed out changeset c9f2cb674778 (bug 1303118) for failures in browser_dbg_watch-expressions-02.js
authorPhil Ringnalda <philringnalda@gmail.com>
Tue, 20 Sep 2016 18:20:25 -0700
changeset 314556 dcebf2b98e14523c02905b82f03733086487a7fb
parent 314555 9502a353f4dba3ff8f9be3496a7c46f21097093a
child 314557 fd291895b378fba58c48631972e66638c2e8dd21
push id81930
push userphilringnalda@gmail.com
push dateWed, 21 Sep 2016 01:20:32 +0000
treeherdermozilla-inbound@dcebf2b98e14 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1303118
milestone52.0a1
backs outc9f2cb674778ded355d16e6d06f2fa22b49e99b3
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset c9f2cb674778 (bug 1303118) for failures in browser_dbg_watch-expressions-02.js
js/src/frontend/Parser.cpp
js/src/jit-test/tests/debug/Frame-evalWithBindings-15.js
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -282,29 +282,23 @@ EvalSharedContext::EvalSharedContext(Exc
     computeThisBinding(enclosingScope);
 
     // Like all things Debugger, Debugger.Frame.eval needs special
     // handling. Since the environment chain of such evals are non-syntactic
     // (DebuggerEnvironmentProxy is not an EnvironmentObject), computing the
     // this binding with respect to enclosingScope is incorrect if the
     // Debugger.Frame is a function frame. Recompute the this binding if we
     // are such an eval.
-    if (enclosingEnv && enclosingScope->kind() == ScopeKind::NonSyntactic) {
-        // For Debugger.Frame.eval with bindings, the environment chain may
-        // have more than the DebugEnvironmentProxy.
-        JSObject* env = enclosingEnv;
+    if (enclosingEnv && enclosingEnv->is<DebugEnvironmentProxy>()) {
+        JSObject* env = &enclosingEnv->as<DebugEnvironmentProxy>().environment();
         while (env) {
-            if (env->is<DebugEnvironmentProxy>())
-                env = &env->as<DebugEnvironmentProxy>().environment();
-
             if (env->is<CallObject>()) {
                 computeThisBinding(env->as<CallObject>().callee().nonLazyScript()->bodyScope());
                 break;
             }
-
             env = env->enclosingEnvironment();
         }
     }
 }
 
 bool
 ParseContext::init()
 {
deleted file mode 100644
--- a/js/src/jit-test/tests/debug/Frame-evalWithBindings-15.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var g = newGlobal();
-var dbg = new Debugger(g);
-
-dbg.onDebuggerStatement = function (frame) {
-  // The bindings object is unused but adds another environment on the
-  // environment chain. Make sure 'this' computes the right value in light of
-  // this.
-  frame.evalWithBindings(`assertEq(this, foo);`, { bar: 42 });
-};
-
-g.eval(`
-var foo = { bar: function() { debugger; } };
-foo.bar();
-`);