Array.prototype.values() compatibility hazard
Brian.Terlson at microsoft.com
Wed Jun 26 17:19:18 PDT 2013
I have a dataset of scripts downloaded from the top 10k websites by traffic according to Alexa. These scripts are static only, and from page-load only, so take this information with the appropriate amount of salt.
I searched for occurrences of the identifiers "keys", "values", or "entries" inside with statements. Only one site (rank 2243 as of 6 months ago) was found in this query. It contains the identifier "keys" in a with statement, but won't be broken as the with object is appears to always be an instance of Object not Array.
I also searched for all occurrences of eval inside with statements. 24 sites (lowest rank, #19 - ebay.com) matched this query. A random sample of 5 sites found that in all cases the with object was instance of Object.
I could dig in more if people are interested. Let me know!
From: es-discuss-bounces at mozilla.org [mailto:es-discuss-bounces at mozilla.org] On Behalf Of Claude Pache
Sent: Wednesday, June 19, 2013 12:48 AM
To: Brandon Benvie; Jason Orendorff
Cc: es-discuss at mozilla.org
Subject: Re: Array.prototype.values() compatibility hazard
Le 18 juin 2013 à 03:30, Brandon Benvie <bbenvie at mozilla.com> a écrit :
> On 6/17/2013 4:33 PM, Jason Orendorff wrote:
>> Firefox added Array.prototype.values() and immediately ran into compatibility issues.
>> Both bug reports have to do with Sencha Ext JS. I haven't looked closely yet. It seems `with(values)` appears in Ext.
> Looks like the `with` is responsible. When the "values" there is an array, any reference inside the `with` to "values" then becomes "values.values".
Note that they should look after `with(anyArray)` rather than `with(values)`, in order to resolve that issue.
es-discuss mailing list
es-discuss at mozilla.org
More information about the es-discuss