Closed Bug 1083498 Opened 6 years ago Closed 5 years ago

Remove SpiderMonkey support for destructuring for-in (JS1.7-only language extension)

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox39 --- wontfix
firefox40 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

(Keywords: addon-compat, dev-doc-complete, site-compat, Whiteboard: [DocArea=JS])

Attachments

(1 file)

No description provided.
Depends on: 1083499
Keywords: dev-doc-needed
Whiteboard: [DocArea=JS]
- Remove SpiderMonkey's nonstandard behavior for destructuring for…in loops in JS1.7.
- Stop collecting telemetry for destructuring for…in loops.
- Change js1_7 tests to expect JS1.8's destructuring for…in behavior.
- Also add two reportCompare() calls to js1_7/geniter/regress-345736.js that were presumably forgotten in https://hg.mozilla.org/mozilla-central/rev/b23162a81291.
Assignee: nobody → cpeterson
Status: NEW → ASSIGNED
Attachment #8582211 - Flags: review?(jorendorff)
Comment on attachment 8582211 [details] [diff] [review]
remove-js17-destructuring-for-in.patch

Review of attachment 8582211 [details] [diff] [review]:
-----------------------------------------------------------------

Thank you!

::: js/src/tests/js1_7/geniter/regress-347593.js
@@ +21,5 @@
>    printStatus (summary);
> +
> +  // Before JS1.7's destructuring for…in was fixed to match JS1.8,
> +  // the expected result was simply '23'.
> +  expect = 'TypeError: (intermediate value)[Symbol.iterator](...).next(...).value is undefined';

It's better not to check exact error messages here. Just checking ex.name is fine.
Attachment #8582211 - Flags: review?(jorendorff) → review+
Keywords: site-compat
https://hg.mozilla.org/mozilla-central/rev/129deced715e
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Depends on: 1151162
Keywords: addon-compat
Duplicate of this bug: 632047
Duplicate of this bug: 1083497
You need to log in before you can comment on or make changes to this bug.