Bug 1146136 - Fix most in-tree tests that parenthesize destructuring pattern assignment targets, as ES6 forbids such parenthesization. (The patch making SpiderMonkey reject this syntax will follow shortly.) r=efaust, r=testingonlychange
authorJeff Walden <jwalden@mit.edu>
Sat, 30 May 2015 00:55:35 -0700
changeset 249316 7386b1f4acfc6e51e29e5a13ea2cbb91c923a925
parent 249315 9fa4c9526086aa39bf43cb8b534d5cf072167cfb
child 249317 e20e65a1f5e8cbd017f897ab07b0d1c70be0d24e
push id28923
push userryanvm@gmail.com
push dateWed, 17 Jun 2015 18:57:11 +0000
treeherdermozilla-central@099d6cd6725e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersefaust, testingonlychange
bugs1146136
milestone41.0a1
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
Bug 1146136 - Fix most in-tree tests that parenthesize destructuring pattern assignment targets, as ES6 forbids such parenthesization. (The patch making SpiderMonkey reject this syntax will follow shortly.) r=efaust, r=testingonlychange
browser/devtools/animationinspector/test/browser_animation_empty_on_invalid_nodes.js
browser/devtools/animationinspector/test/browser_animation_panel_exists.js
browser/devtools/animationinspector/test/browser_animation_playerWidgets_appear_on_panel_init.js
browser/devtools/animationinspector/test/browser_animation_playerWidgets_target_nodes.js
browser/devtools/animationinspector/test/browser_animation_refresh_on_added_animation.js
browser/devtools/animationinspector/test/browser_animation_refresh_on_removed_animation.js
browser/devtools/animationinspector/test/browser_animation_refresh_when_active.js
browser/devtools/animationinspector/test/browser_animation_same_nb_of_playerWidgets_and_playerFronts.js
browser/devtools/animationinspector/test/browser_animation_shows_player_on_valid_node.js
browser/devtools/inspector/test/browser_inspector_highlighter-options.js
browser/devtools/inspector/test/browser_inspector_highlighter-rulers_02.js
browser/devtools/markupview/test/browser_markupview_links_02.js
browser/devtools/markupview/test/browser_markupview_links_03.js
browser/devtools/markupview/test/browser_markupview_links_05.js
browser/devtools/markupview/test/browser_markupview_links_06.js
browser/devtools/shared/inplace-editor.js
js/src/jit-test/tests/basic/destructuring-default.js
js/src/jit-test/tests/basic/destructuring-rest.js
js/src/tests/js1_7/extensions/destructuring-order.js
js/src/tests/js1_7/extensions/regress-368224.js
js/src/tests/js1_7/regress/regress-379442.js
toolkit/components/passwordmgr/test/test_bug_627616.html
toolkit/devtools/gcli/commands/screenshot.js
toolkit/devtools/server/tests/unit/test_forwardingprefix.js
--- a/browser/devtools/animationinspector/test/browser_animation_empty_on_invalid_nodes.js
+++ b/browser/devtools/animationinspector/test/browser_animation_empty_on_invalid_nodes.js
@@ -7,17 +7,17 @@
 // Test that the panel shows no animation data for invalid or not animated nodes
 
 add_task(function*() {
   yield addTab(TEST_URL_ROOT + "doc_simple_animation.html");
 
   let {inspector, panel} = yield openAnimationInspector();
   yield testEmptyPanel(inspector, panel);
 
-  ({inspector, panel}) = yield closeAnimationInspectorAndRestartWithNewUI();
+  ({inspector, panel} = yield closeAnimationInspectorAndRestartWithNewUI());
   yield testEmptyPanel(inspector, panel, true);
 });
 
 function* testEmptyPanel(inspector, panel, isNewUI=false) {
   info("Select node .still and check that the panel is empty");
   let stillNode = yield getNodeFront(".still", inspector);
   let onUpdated = panel.once(panel.UI_UPDATED_EVENT);
   yield selectNode(stillNode, inspector);
--- a/browser/devtools/animationinspector/test/browser_animation_panel_exists.js
+++ b/browser/devtools/animationinspector/test/browser_animation_panel_exists.js
@@ -11,17 +11,17 @@ add_task(function*() {
   let {panel, controller} = yield openAnimationInspector();
 
   ok(controller, "The animation controller exists");
   ok(controller.animationsFront, "The animation controller has been initialized");
 
   ok(panel, "The animation panel exists");
   ok(panel.playersEl, "The animation panel has been initialized");
 
-  ({panel, controller}) = yield closeAnimationInspectorAndRestartWithNewUI();
+  ({panel, controller} = yield closeAnimationInspectorAndRestartWithNewUI());
 
   ok(controller, "The animation controller exists");
   ok(controller.animationsFront, "The animation controller has been initialized");
 
   ok(panel, "The animation panel exists");
   ok(panel.playersEl, "The animation panel has been initialized");
   ok(panel.animationsTimelineComponent, "The animation panel has been initialized");
 });
--- a/browser/devtools/animationinspector/test/browser_animation_playerWidgets_appear_on_panel_init.js
+++ b/browser/devtools/animationinspector/test/browser_animation_playerWidgets_appear_on_panel_init.js
@@ -9,14 +9,14 @@
 
 add_task(function*() {
   yield addTab(TEST_URL_ROOT + "doc_body_animation.html");
 
   let {panel} = yield openAnimationInspector();
   is(panel.playerWidgets.length, 1,
     "One animation player is displayed after init");
 
-  ({panel}) = yield closeAnimationInspectorAndRestartWithNewUI();
+  ({panel} = yield closeAnimationInspectorAndRestartWithNewUI());
   is(panel.animationsTimelineComponent.animations.length, 1,
     "One animation is handled by the timeline after init");
   is(panel.animationsTimelineComponent.animationsEl.childNodes.length, 1,
     "One animation is displayed after init");
 });
--- a/browser/devtools/animationinspector/test/browser_animation_playerWidgets_target_nodes.js
+++ b/browser/devtools/animationinspector/test/browser_animation_playerWidgets_target_nodes.js
@@ -26,17 +26,17 @@ add_task(function*() {
   is(targetEl.textContent, "<divid=\"\"class=\"ball animated\">",
     "The target element's content is correct");
 
   let selectorEl = targetEl.querySelector(".node-selector");
   ok(selectorEl,
     "The icon to select the target element in the inspector exists");
 
   info("Test again with the new timeline UI");
-  ({inspector, panel}) = yield closeAnimationInspectorAndRestartWithNewUI();
+  ({inspector, panel} = yield closeAnimationInspectorAndRestartWithNewUI());
 
   info("Select the simple animated node");
   yield selectNode(".animated", inspector);
 
   let targetNodeComponent = panel.animationsTimelineComponent.targetNodes[0];
   // Make sure to wait for the target-retrieved event if the nodeFront hasn't
   // yet been retrieved by the TargetNodeComponent.
   if (!targetNodeComponent.nodeFront) {
--- a/browser/devtools/animationinspector/test/browser_animation_refresh_on_added_animation.js
+++ b/browser/devtools/animationinspector/test/browser_animation_refresh_on_added_animation.js
@@ -7,17 +7,17 @@
 // Test that the panel content refreshes when new animations are added.
 
 add_task(function*() {
   yield addTab(TEST_URL_ROOT + "doc_simple_animation.html");
 
   let {inspector, panel} = yield openAnimationInspector();
   yield testRefreshOnNewAnimation(inspector, panel);
 
-  ({inspector, panel}) = yield closeAnimationInspectorAndRestartWithNewUI();
+  ({inspector, panel} = yield closeAnimationInspectorAndRestartWithNewUI());
   yield testRefreshOnNewAnimation(inspector, panel);
 });
 
 function* testRefreshOnNewAnimation(inspector, panel) {
   info("Select a non animated node");
   yield selectNode(".still", inspector);
 
   assertAnimationsDisplayed(panel, 0);
--- a/browser/devtools/animationinspector/test/browser_animation_refresh_on_removed_animation.js
+++ b/browser/devtools/animationinspector/test/browser_animation_refresh_on_removed_animation.js
@@ -9,17 +9,17 @@
 add_task(function*() {
   yield addTab(TEST_URL_ROOT + "doc_simple_animation.html");
 
   let {inspector, panel} = yield openAnimationInspector();
   yield testRefreshOnRemove(inspector, panel);
   yield testAddedAnimationWorks(inspector, panel);
 
   info("Reload and test again with the new UI");
-  ({inspector, panel}) = yield closeAnimationInspectorAndRestartWithNewUI(true);
+  ({inspector, panel} = yield closeAnimationInspectorAndRestartWithNewUI(true));
   yield testRefreshOnRemove(inspector, panel, true);
 });
 
 function* testRefreshOnRemove(inspector, panel) {
   info("Select a animated node");
   yield selectNode(".animated", inspector);
 
   assertAnimationsDisplayed(panel, 1);
--- a/browser/devtools/animationinspector/test/browser_animation_refresh_when_active.js
+++ b/browser/devtools/animationinspector/test/browser_animation_refresh_when_active.js
@@ -7,17 +7,17 @@
 // Test that the panel only refreshes when it is visible in the sidebar.
 
 add_task(function*() {
   yield addTab(TEST_URL_ROOT + "doc_simple_animation.html");
 
   let {inspector, panel} = yield openAnimationInspector();
   yield testRefresh(inspector, panel);
 
-  ({inspector, panel}) = yield closeAnimationInspectorAndRestartWithNewUI();
+  ({inspector, panel} = yield closeAnimationInspectorAndRestartWithNewUI());
   yield testRefresh(inspector, panel);
 });
 
 function* testRefresh(inspector, panel) {
   info("Select a non animated node");
   yield selectNode(".still", inspector);
 
   info("Switch to the rule-view panel");
--- a/browser/devtools/animationinspector/test/browser_animation_same_nb_of_playerWidgets_and_playerFronts.js
+++ b/browser/devtools/animationinspector/test/browser_animation_same_nb_of_playerWidgets_and_playerFronts.js
@@ -20,17 +20,17 @@ add_task(function*() {
   for (let widget of panel.playerWidgets) {
     ok(widget.initialized, "The player widget is initialized");
     is(widget.el.parentNode, panel.playersEl,
       "The player widget has been appended to the panel");
   }
 
   info("Test again with the new UI, making sure the same number of " +
        "animation timelines is created");
-  ({inspector, panel, controller}) = yield closeAnimationInspectorAndRestartWithNewUI();
+  ({inspector, panel, controller} = yield closeAnimationInspectorAndRestartWithNewUI());
   let timeline = panel.animationsTimelineComponent;
 
   info("Selecting the test animated node again");
   yield selectNode(".multi", inspector);
 
   is(controller.animationPlayers.length,
     timeline.animationsEl.querySelectorAll(".animation").length,
     "As many timeline elements were created as there are playerFronts");
--- a/browser/devtools/animationinspector/test/browser_animation_shows_player_on_valid_node.js
+++ b/browser/devtools/animationinspector/test/browser_animation_shows_player_on_valid_node.js
@@ -8,17 +8,17 @@
 // selected.
 
 add_task(function*() {
   yield addTab(TEST_URL_ROOT + "doc_simple_animation.html");
 
   let {inspector, panel} = yield openAnimationInspector();
   yield testShowsAnimations(inspector, panel);
 
-  ({inspector, panel}) = yield closeAnimationInspectorAndRestartWithNewUI();
+  ({inspector, panel} = yield closeAnimationInspectorAndRestartWithNewUI());
   yield testShowsAnimations(inspector, panel);
 });
 
 function* testShowsAnimations(inspector, panel) {
   info("Select node .animated and check that the panel is not empty");
   let node = yield getNodeFront(".animated", inspector);
   yield selectNode(node, inspector);
 
--- a/browser/devtools/inspector/test/browser_inspector_highlighter-options.js
+++ b/browser/devtools/inspector/test/browser_inspector_highlighter-options.js
@@ -68,40 +68,40 @@ const TEST_DATA = [
   },
   {
     desc: "One region only can be shown (1)",
     options: {showOnly: "content"},
     checkHighlighter: function*(toolbox) {
       let {d} = yield getHighlighterRegionPath("margin", toolbox.highlighter);
       ok(!d, "margin region is hidden");
 
-      ({d}) = yield getHighlighterRegionPath("border", toolbox.highlighter);
+      ({d} = yield getHighlighterRegionPath("border", toolbox.highlighter));
       ok(!d, "border region is hidden");
 
-      ({d}) = yield getHighlighterRegionPath("padding", toolbox.highlighter);
+      ({d} = yield getHighlighterRegionPath("padding", toolbox.highlighter));
       ok(!d, "padding region is hidden");
 
-      ({d}) = yield getHighlighterRegionPath("content", toolbox.highlighter);
+      ({d} = yield getHighlighterRegionPath("content", toolbox.highlighter));
       ok(d, "content region is shown");
     }
   },
   {
     desc: "One region only can be shown (2)",
     options: {showOnly: "margin"},
     checkHighlighter: function*(toolbox) {
       let {d} = yield getHighlighterRegionPath("margin", toolbox.highlighter);
       ok(d, "margin region is shown");
 
-      ({d}) = yield getHighlighterRegionPath("border", toolbox.highlighter);
+      ({d} = yield getHighlighterRegionPath("border", toolbox.highlighter));
       ok(!d, "border region is hidden");
 
-      ({d}) = yield getHighlighterRegionPath("padding", toolbox.highlighter);
+      ({d} = yield getHighlighterRegionPath("padding", toolbox.highlighter));
       ok(!d, "padding region is hidden");
 
-      ({d}) = yield getHighlighterRegionPath("content", toolbox.highlighter);
+      ({d} = yield getHighlighterRegionPath("content", toolbox.highlighter));
       ok(!d, "content region is hidden");
     }
   },
   {
     desc: "Guides can be drawn around a given region (1)",
     options: {region: "padding"},
     checkHighlighter: function*(toolbox) {
       let topY1 = yield getHighlighterNodeAttribute(toolbox.highlighter,
--- a/browser/devtools/inspector/test/browser_inspector_highlighter-rulers_02.js
+++ b/browser/devtools/inspector/test/browser_inspector_highlighter-rulers_02.js
@@ -66,21 +66,21 @@ function* isUpdatedAfterScroll(highlight
 
   is(xAxisRulerTransform, `translate(-${x})`, "x axis ruler is positioned properly");
   is(xAxisTextTransform, `translate(-${x})`, "x axis text are positioned properly");
   is(yAxisRulerTransform, `translate(0, -${y})`, "y axis ruler is positioned properly");
   is(yAxisRulerTransform, `translate(0, -${y})`, "y axis text are positioned properly");
 
   info("Asking the content window to scroll relative to the current position");
 
-  ({ data }) = yield executeInContent("Test:ScrollWindow", {
+  ({ data } = yield executeInContent("Test:ScrollWindow", {
     x: -50,
     y: -60,
     relative: true
-  });
+  }));
 
   is(data.x, x - 50, "window scrolled properly horizontally");
   is(data.y, y - 60, "window scrolled properly vertically");
 
   info("Checking the rulers are properly positioned after the relative scrolling");
 
   xAxisRulerTransform = yield getHighlighterNodeAttribute(highlighterFront,
     `${ID}x-axis-ruler`, "transform");
--- a/browser/devtools/markupview/test/browser_markupview_links_02.js
+++ b/browser/devtools/markupview/test/browser_markupview_links_02.js
@@ -24,14 +24,14 @@ add_task(function*() {
 
   info("Editing the contextmenu attribute on the body node");
   let nodeMutated = inspector.once("markupmutation");
   let attr = editor.attrElements.get("contextmenu").querySelector(".editable");
   setEditableFieldValue(attr, "contextmenu=\"menu2\"", inspector);
   yield nodeMutated;
 
   info("Checking for links in the updated attribute");
-  ({editor}) = yield getContainerForSelector("body", inspector);
+  ({editor} = yield getContainerForSelector("body", inspector));
   linkEls = editor.attrElements.get("contextmenu").querySelectorAll(".link");
   is(linkEls.length, 1, "There is one link in the contextmenu attribute");
   is(linkEls[0].dataset.type, "idref", "The link has the right type");
   is(linkEls[0].textContent, "menu2", "The link has the right value");
 });
--- a/browser/devtools/markupview/test/browser_markupview_links_03.js
+++ b/browser/devtools/markupview/test/browser_markupview_links_03.js
@@ -24,14 +24,14 @@ add_task(function*() {
   is(linkEls[0].textContent, "menu1", "The link has the right value");
 
   info("Editing the contextmenu attribute on the body node");
   onMutated = inspector.once("markupmutation");
   yield setNodeAttribute("body", "contextmenu", "menu2");
   yield onMutated;
 
   info("Checking for links in the updated attribute");
-  ({editor}) = yield getContainerForSelector("body", inspector);
+  ({editor} = yield getContainerForSelector("body", inspector));
   linkEls = editor.attrElements.get("contextmenu").querySelectorAll(".link");
   is(linkEls.length, 1, "There is one link in the contextmenu attribute");
   is(linkEls[0].dataset.type, "idref", "The link has the right type");
   is(linkEls[0].textContent, "menu2", "The link has the right value");
 });
--- a/browser/devtools/markupview/test/browser_markupview_links_05.js
+++ b/browser/devtools/markupview/test/browser_markupview_links_05.js
@@ -30,33 +30,33 @@ add_task(function*() {
   is(tab.linkedBrowser.currentURI.spec, TEST_URL_ROOT + "doc_markup_tooltip.png",
     "The URL for the new tab is correct");
   gBrowser.removeTab(tab);
 
   info("Select a node with a IDREF attribute");
   yield selectNode("label", inspector);
 
   info("Set the popupNode to the node that contains the ref");
-  ({editor}) = yield getContainerForSelector("label", inspector);
+  ({editor} = yield getContainerForSelector("label", inspector));
   popupNode = editor.attrElements.get("for").querySelector(".link");
   inspector.panelDoc.popupNode = popupNode;
 
   info("Follow the link and wait for the new node to be selected");
   let onSelection = inspector.selection.once("new-node-front");
   inspector.followAttributeLink();
   yield onSelection;
 
   ok(true, "A new node was selected");
   is(inspector.selection.nodeFront.id, "name", "The right node was selected");
 
   info("Select a node with an invalid IDREF attribute");
   yield selectNode("output", inspector);
 
   info("Set the popupNode to the node that contains the ref");
-  ({editor}) = yield getContainerForSelector("output", inspector);
+  ({editor} = yield getContainerForSelector("output", inspector));
   popupNode = editor.attrElements.get("for").querySelectorAll(".link")[2];
   inspector.panelDoc.popupNode = popupNode;
 
   info("Try to follow the link and check that no new node were selected");
   let onFailed = inspector.once("idref-attribute-link-failed");
   inspector.followAttributeLink();
   yield onFailed;
 
--- a/browser/devtools/markupview/test/browser_markupview_links_06.js
+++ b/browser/devtools/markupview/test/browser_markupview_links_06.js
@@ -31,17 +31,17 @@ add_task(function*() {
 
   info("Switch back to the inspector");
   yield toolbox.selectTool("inspector");
 
   info("Select a node with a jsresource attribute");
   yield selectNode("script", inspector);
 
   info("Set the popupNode to the node that contains the uri");
-  ({editor}) = yield getContainerForSelector("script", inspector);
+  ({editor} = yield getContainerForSelector("script", inspector));
   popupNode = editor.attrElements.get("src").querySelector(".link");
   inspector.panelDoc.popupNode = popupNode;
 
   info("Follow the link and wait for the debugger to open");
   let onDebuggerReady = toolbox.once("jsdebugger-ready");
   inspector.followAttributeLink();
   yield onDebuggerReady;
 
--- a/browser/devtools/shared/inplace-editor.js
+++ b/browser/devtools/shared/inplace-editor.js
@@ -824,20 +824,20 @@ InplaceEditor.prototype = {
    * Handle loss of focus by calling done if it hasn't been called yet.
    */
   _onBlur: function InplaceEditor_onBlur(aEvent, aDoNotClear)
   {
     if (aEvent && this.popup && this.popup.isOpen &&
         this.popup.selectedIndex >= 0) {
       let label, preLabel;
       if (this._selectedIndex === undefined) {
-        ({label, preLabel}) = this.popup.getItemAtIndex(this.popup.selectedIndex);
+        ({label, preLabel} = this.popup.getItemAtIndex(this.popup.selectedIndex));
       }
       else {
-        ({label, preLabel}) = this.popup.getItemAtIndex(this._selectedIndex);
+        ({label, preLabel} = this.popup.getItemAtIndex(this._selectedIndex));
       }
       let input = this.input;
       let pre = "";
       if (input.selectionStart < input.selectionEnd) {
         pre = input.value.slice(0, input.selectionStart);
       }
       else {
         pre = input.value.slice(0, input.selectionStart - label.length +
--- a/js/src/jit-test/tests/basic/destructuring-default.js
+++ b/js/src/jit-test/tests/basic/destructuring-default.js
@@ -44,26 +44,26 @@ function testConst(pattern, input) {
     'const ' + pattern + ' = input;' +
     'return [a, b, c, d, e, f];'
   )(input);
 }
 testAll(testConst);
 
 function testGlobal(pattern, input) {
   return new Function('input',
-    '(' + pattern + ') = input;' +
+    '(' + pattern + ' = input);' +
     'return [a, b, c, d, e, f];'
   )(input);
 }
 testAll(testGlobal);
 
 function testClosure(pattern, input) {
   return new Function('input',
     'var rest; (function () {' +
-    '(' + pattern + ') = input;' +
+    '(' + pattern + ' = input);' +
     '})();' +
     'return [a, b, c, d, e, f];'
   )(input);
 }
 testAll(testClosure);
 
 function testArgument(pattern, input) {
   return new Function('input',
@@ -108,17 +108,17 @@ const [ca = 1, cb = 2] = [];
 assertEq(ca, 1);
 assertEq(cb, 2);
 
 const {a: {a: cc = 3} = {a: undefined}} = {};
 assertEq(cc, 3);
 
 // test that the assignment happens in source order
 var a = undefined, b = undefined, c = undefined;
-({a: a = 1, c: c = 2, b: b = 3}) = {
+({a: a = 1, c: c = 2, b: b = 3} = {
   get a() {
     assertEq(a, undefined);
     assertEq(c, undefined);
     assertEq(b, undefined);
     return undefined;
   },
   get b() {
     assertEq(a, 1);
@@ -127,17 +127,17 @@ var a = undefined, b = undefined, c = un
     return 4;
   },
   get c() {
     assertEq(a, 1);
     assertEq(c, undefined);
     assertEq(b, undefined);
     return undefined;
   }
-};
+});
 assertEq(b, 4);
 
 assertThrowsInstanceOf(() => { var {a: {a} = null} = {}; }, TypeError);
 assertThrowsInstanceOf(() => { var [[a] = 2] = []; }, TypeError);
 
 // destructuring assignment might have  duplicate variable names.
 var [a = 1, a = 2] = [3];
 assertEq(a, 2);
@@ -145,17 +145,17 @@ assertEq(a, 2);
 // assignment to properties of default params
 [a = {y: 2}, a.x = 1] = [];
 assertEq(typeof a, 'object');
 assertEq(a.x, 1);
 assertEq(a.y, 2);
 
 // defaults are evaluated even if there is no binding
 var evaled = false;
-({a: {} = (evaled = true, {})}) = {};
+({a: {} = (evaled = true, {})} = {});
 assertEq(evaled, true);
 evaled = false;
 assertThrowsInstanceOf(() => { [[] = (evaled = true, 2)] = [] }, TypeError);
 assertEq(evaled, true);
 
 assertThrowsInstanceOf(() => new Function('var [...rest = defaults] = [];'), SyntaxError);
 
 // bug 1124480: destructuring defaults should work correctly as part of for-in
--- a/js/src/jit-test/tests/basic/destructuring-rest.js
+++ b/js/src/jit-test/tests/basic/destructuring-rest.js
@@ -76,27 +76,27 @@ function testVar(pattern, input, binding
     'return ' + binding
   )(input);
 }
 testDeclaration(testVar);
 
 function testGlobal(pattern, input, binding) {
   binding = binding || 'rest';
   return new Function('input',
-    '(' + pattern + ') = input;' +
+    '(' + pattern + ' = input);' +
     'return ' + binding
   )(input);
 }
 testAll(testGlobal);
 
 function testClosure(pattern, input, binding) {
   binding = binding || 'rest';
   return new Function('input',
     'var ' + binding + '; (function () {' +
-    '(' + pattern + ') = input;' +
+    '(' + pattern + ' = input);' +
     '})();' +
     'return ' + binding
   )(input);
 }
 testDeclaration(testClosure);
 
 function testArgument(pattern, input, binding) {
   binding = binding || 'rest';
--- a/js/src/tests/js1_7/extensions/destructuring-order.js
+++ b/js/src/tests/js1_7/extensions/destructuring-order.js
@@ -25,17 +25,17 @@ function exceptObj()
 {
   return { get b() { throw "PASSED"; }, a: "PASSED" };
 }
 
 function partialEvalObj()
 {
   try
   {
-    ({a:a, b:b}) = exceptObj();
+    ({a:a, b:b} = exceptObj());
     throw "FAILED";
   }
   catch (ex)
   {
     if (ex !== "PASSED")
       throw "bad exception thrown: " + ex;
   }
 }
@@ -109,17 +109,17 @@ function objWithGetters()
 	      order.push("h");
 	      return rv;
 	    }
   };
 }
 
 function partialEvalObj2()
 {
-  ({g: g, h: h, i: i, j: j, k: k}) = objWithGetters();
+  ({g: g, h: h, i: i, j: j, k: k} = objWithGetters());
 }
 
 try
 {
   partialEvalObj();
   if (a !== "PASSED" || b !== "PASSED")
     throw "FAILED: lhs not mutated correctly during destructuring!\n" +
       "a == " + a + ", b == " + b;
--- a/js/src/tests/js1_7/extensions/regress-368224.js
+++ b/js/src/tests/js1_7/extensions/regress-368224.js
@@ -15,14 +15,14 @@ test();
 //-----------------------------------------------------------------------------
 
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
  
-  ({ x: a }) = {}
+  ({ x: a } = {});
 
   reportCompare(expect, actual, summary);
 
   exitFunc ('test');
 }
--- a/js/src/tests/js1_7/regress/regress-379442.js
+++ b/js/src/tests/js1_7/regress/regress-379442.js
@@ -17,12 +17,12 @@ test();
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
  
   reportCompare(expect, actual, summary);
 
-  (function () { ({ y: [] }) = {} });
+  (function () { ({ y: [] } = {}); });
 
   exitFunc ('test');
 }
--- a/toolkit/components/passwordmgr/test/test_bug_627616.html
+++ b/toolkit/components/passwordmgr/test/test_bug_627616.html
@@ -110,17 +110,17 @@
 
     var gExpectedDialogs = 0;
     var gCurrentTest;
     function runNextTest() {
       is(gExpectedDialogs, 0, "received expected number of auth dialogs");
       Cc["@mozilla.org/network/http-auth-manager;1"].getService(SpecialPowers.Ci.nsIHttpAuthManager).clearAll();
       if (pendingTests.length > 0) {
         ({expectedDialogs: gExpectedDialogs,
-          test: gCurrentTest}) = pendingTests.shift();
+          test: gCurrentTest} = pendingTests.shift());
         gCurrentTest.call(this);
       } else {
         cleanup();
         SimpleTest.finish();
       }
     }
 
     var pendingTests = [{expectedDialogs: 2, test: testNonAnonymousCredentials},
--- a/toolkit/devtools/gcli/commands/screenshot.js
+++ b/toolkit/devtools/gcli/commands/screenshot.js
@@ -261,17 +261,17 @@ function createScreenshotData(document, 
     // Bug 961832: GCLI screenshot shows fixed position element in wrong
     // position if we don't scroll to top
     window.scrollTo(0,0);
     width = window.innerWidth + window.scrollMaxX;
     height = window.innerHeight + window.scrollMaxY;
   }
   else if (args.selector) {
     const lh = new LayoutHelpers(window);
-    ({ top, left, width, height }) = lh.getRect(args.selector, window);
+    ({ top, left, width, height } = lh.getRect(args.selector, window));
   }
   else {
     left = window.scrollX;
     top = window.scrollY;
     width = window.innerWidth;
     height = window.innerHeight;
   }
 
--- a/toolkit/devtools/server/tests/unit/test_forwardingprefix.js
+++ b/toolkit/devtools/server/tests/unit/test_forwardingprefix.js
@@ -45,17 +45,17 @@ function newConnection(aPrefix)
   var transport = DebuggerServer.connectPipe(aPrefix);
 
   return { conn: conn, transport: transport };
 }
 
 /* Create the main connection for these tests. */
 function createMainConnection()
 {
-  ({ conn: gMainConnection, transport: gMainTransport }) = newConnection();
+  ({ conn: gMainConnection, transport: gMainTransport } = newConnection());
   gClient = new DebuggerClient(gMainTransport);
   gClient.connect((aType, aTraits) => run_next_test());
 }
 
 /*
  * Exchange 'echo' messages with five actors:
  * - root
  * - prefix1/root