diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index c9a4b6e5561..c06a10d25e4 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -1033,6 +1033,7 @@ EmitEnterBlock(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn, JSOp op) /* Beware the empty destructuring dummy. */ if (!dn) { JS_ASSERT(i + 1 <= blockObj->slotCount()); + blockObj->setAliased(i, bce->sc->bindingsAccessedDynamically()); continue; } diff --git a/js/src/jit-test/tests/basic/testBug756918.js b/js/src/jit-test/tests/basic/testBug756918.js new file mode 100644 index 00000000000..2787b38813b --- /dev/null +++ b/js/src/jit-test/tests/basic/testBug756918.js @@ -0,0 +1,6 @@ +// |jit-test| error:Error + +with({}) + let([] = []) { + eval("throw new Error()"); + }