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

RESOLVED FIXED in Firefox 40

Status

()

Core
JavaScript Engine
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: cpeterson, Assigned: cpeterson)

Tracking

(Blocks: 1 bug, {addon-compat, dev-doc-complete, site-compat})

unspecified
mozilla40
addon-compat, dev-doc-complete, site-compat
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox39 wontfix, firefox40 fixed)

Details

(Whiteboard: [DocArea=JS])

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Updated

3 years ago
Depends on: 1083499
Keywords: dev-doc-needed
Whiteboard: [DocArea=JS]
(Assignee)

Comment 1

2 years ago
Created attachment 8582211 [details] [diff] [review]
remove-js17-destructuring-for-in.patch

- 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+
(Assignee)

Comment 3

2 years ago
Thanks!

https://hg.mozilla.org/integration/mozilla-inbound/rev/129deced715e
Blocks: 1103158
status-firefox39: --- → wontfix
status-firefox40: --- → fixed

Updated

2 years ago
Keywords: site-compat
https://hg.mozilla.org/mozilla-central/rev/129deced715e
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40

Updated

2 years ago
Depends on: 1151162

Updated

2 years ago
Keywords: addon-compat
Updated following documents:
  https://developer.mozilla.org/en-US/Firefox/Releases/40
  https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/1.7
Also noted on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Firefox-specific_notes
Keywords: dev-doc-needed → dev-doc-complete

Updated

2 years ago
Duplicate of this bug: 632047

Updated

2 years ago
Duplicate of this bug: 1083497
You need to log in before you can comment on or make changes to this bug.