Review request for 8023368: Instance __proto__ property should exist and be writable.
A. Sundararajan
sundararajan.athijegannathan at oracle.com
Wed Aug 21 03:59:22 PDT 2013
Updated: http://cr.openjdk.java.net/~sundar/8023368/webrev.01/
* changed return value of Object.setPrototypeOf(O, proto) to be "O" -
the object whose prototype is changed
* removed --proto-assign command line option. Object.setPrototypeOf
available always.
* __proto__ magic property allows set - but as like __proto__ read, the
__proto__ write is also available only after calling
load("nashorn:mozilla_compat.js")
Thanks
-Sundar
On Wednesday 21 August 2013 02:16 PM, Hannes Wallnoefer wrote:
> This looks good implementation-wise, but I think we should go all the
> way and make a writable __proto__ available by default.
>
> The reason is that all major JS engines support this, and it's also
> defined in Annex B of the current ES6 draft[1] ("Additional ECMAScript
> features for web browsers" which is "normative but optional if the
> ECMAScript host is not a web browser").
>
> ES6 also defines Object.setPrototypeOf ( O, proto ) in 15.2.3.19. From
> what I can see your implementation looks compatible except that it
> should return O instead of undefined.
>
> [1] http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts
>
> Hannes
>
>
> Am 2013-08-21 07:43, schrieb A. Sundararajan:
>> Please review http://cr.openjdk.java.net/~sundar/8023368/
>>
>> Thanks
>> -Sundar
>
More information about the nashorn-dev
mailing list