Changes to Array method this coercion (was: ES3.1 Draft: 27 Oct 2008 version available)
hermanv at microsoft.com
Mon Oct 27 17:15:11 PDT 2008
I am also dubious about this change, particularly since it contradicts the notion that ES3.1 == ES3 + reality. Wouldn't this change be more appropriate to the secure subset?
From: es3.x-discuss-bounces at mozilla.org [mailto:es3.x-discuss-bounces at mozilla.org] On Behalf Of Maciej Stachowiak
Sent: Monday, October 27, 2008 5:04 PM
To: David-Sarah Hopwood
Cc: es3.x-discuss at mozilla.org; es-discuss at mozilla.org
Subject: Re: Changes to Array method this coercion (was: ES3.1 Draft: 27 Oct 2008 version available)
On Oct 27, 2008, at 4:54 PM, David-Sarah Hopwood wrote:
> Robert Sayre wrote:
>> I checked current browser behavior for this coercion to the global
>> object for array methods (as well as apply and call).
>> Opera 9.61
>> Chrome Beta 1
>> Safari 3.1.2
>> Firefox 3.0.3
>> It seems that the above implementations coerce null or undefined to
>> the global object for Array.map in this example, so Mozilla opposes
>> these changes.
> The change in behaviour was quite deliberate, and I had been under the
> impression there was a concensus in favour of it. Removing the
> of 'this' to the global object is necessary to improve the safety and
> security of ES3.1, IMHO.
Apple is also opposed to changing this behavior, at least without
sufficient showing that the change is broadly compatible with Web
It is also not clear to me how it improves safety and security of ES
3.1. What is the threat model it protects against?
Es3.x-discuss mailing list
Es3.x-discuss at mozilla.org
More information about the Es-discuss