1.62 MB, image/png
Product: Firefox → Core
EcmaScript 6 adds an "entries" method to arrays. See http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.entries It looks like we added this in bug 894658, which was fixed for Firefox 28. The right solution is probably to change your conditional to check for an own "entries" property, as opposed to an "entries" property anywhere on the prototype chain.
By the way, is this parse method that checks for "entries" something custom to your setup, or part of some library you're using (or authoring)?
Yes. It is part of a custom paginated-data response on a GET request for a collection. Since these methods are to be a standard part of ECMA6 we'll just have to adjust. It will be interesting to see how many things get tripped up by the keys, values, entries methods in a similar manner. Thanks for looking into it
> It will be interesting to see how many things get tripped up Indeed. The "values" case caused enough problems we had to back it out for the time being while the committee figures out how to make it cause fewer problems. :( See bug 875433 and the bugs it depends on and the thread starting https://mail.mozilla.org/pipermail/es-discuss/2013-June/031390.html if you're interested in the gory details.
5 years ago
Added to https://developer.mozilla.org/en-US/Firefox/Releases/28/Site_Compatibility Is this still an issue? Or fixed by Oracle?
Since this turned out to not be a bug with Firefox, but rather something from ES6 that sites have to adjust to, I'm closing this as INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
Typically we don't close these as INVALID, we move them to Tech Evangelism and attempt outreach. Before re-opening though, does this issue still exist?
Ah, ok. The basic conflict must still exist, as per ES6 all arrays have an "entries" object. However, in comment 3 the reporter did mention that they understood this and would adjust their code appropriately (in 2014), so I would be surprised if it was still an issue given the lack of subsequent comments. I also can't see this as being a major evangelism issue at this point, as Firefox isn't the only browser it would happen in, and quick searches in Bugzilla and on the WebCompat site don't show anything obvious.
You need to log in before you can comment on or make changes to this bug.