Closed Bug 1171586 Opened 9 years ago Closed 8 years ago

regress-476427.js emits "JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead" 16,322 times in linux debug test logs

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox41 --- affected
firefox51 --- fixed

People

(Reporter: erahm, Assigned: evilpie)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

> JavaScript warning: file:///builds/slave/test/build/tests/jsreftest/tests/js1_8/extensions/regress-476427.js, line 1: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead It looks like we can just update the use of "for each" [1]. [1] https://hg.mozilla.org/mozilla-central/annotate/98820360ab66/js/src/tests/js1_8/extensions/regress-476427.js#l34
Gary, can you propose a fix for this? Would switching to "for y of this" suffice to maintain what we're testing here?
Flags: needinfo?(gary)
Doesn't look like it. for-each iterates over the *values* of properties on the provided value (coerced to an object if necessary, as I recall). for-of invokes the ES6 iterator protocol, which requires opt-in from the object in question. In the standard library only arrays really opted into that, as I recall. Given the problem was only fixed happenstantially by some other bug, we have no idea what this test was *actually* trying to test, so I'd say do the Minimum Viable Thing That Looks Vaguely Similar. Perhaps this fits, here: foo("for (yyy in this) y = this[yyy];");
Flags: needinfo?(gary)
Attachment #8634464 - Flags: review?(jwalden+bmo)
Assignee: nobody → erahm
Status: NEW → ASSIGNED
Attachment #8634464 - Flags: review?(jwalden+bmo) → review+
url: https://hg.mozilla.org/integration/mozilla-inbound/rev/085f96014278d0cbef9e3a372146cc3ed406224e changeset: 085f96014278d0cbef9e3a372146cc3ed406224e user: Eric Rahm <erahm@mozilla.com> date: Wed Jul 15 20:28:07 2015 -0700 description: Bug 1171586 - Remove for-each-in from regress-476427.js. r=waldo
Flags: needinfo?(erahm)
This is probably more appropriate for someone working on the JS engine.
Status: ASSIGNED → NEW
Flags: needinfo?(erahm)
Assignee: erahm → nobody
Assignee: nobody → evilpies
Attached patch Remove test with for-each in (deleted) — Splinter Review
I don't think there is much value in fixing 10 year old fuzz bugs, when at the time of check-in the fix wasn't even in that bug.
Attachment #8778830 - Flags: review?(arai.unmht)
Comment on attachment 8778830 [details] [diff] [review] Remove test with for-each in Review of attachment 8778830 [details] [diff] [review]: ----------------------------------------------------------------- I agree. the target of this testcase doesn't exist anymore.
Attachment #8778830 - Flags: review?(arai.unmht) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: