Is it spec-compliant to forbid setPrototypeOf(Object.prototype, foo)?

Jordan Harband ljharb at gmail.com
Thu Feb 2 19:20:20 UTC 2017


Also, `Object.freeze` causes `Object.setPrototypeOf` to fail.

On Thu, Feb 2, 2017 at 4:40 AM, T.J. Crowder <
tj.crowder at farsightsoftware.com> wrote:

> On Thu, Feb 2, 2017 at 12:38 PM, Michał Wadas <michalwadas at gmail.com>
> wrote:
>
>> Thanks, I erroneously looked at ES2015 spec that calls Object.prototype
>> ordinary object.
>>
>> The Object prototype object is the intrinsic object %ObjectPrototype%.
>> The Object prototype object is an ordinary object.
>> The value of the [[Prototype]] internal slot
>> <http://www.ecma-international.org/ecma-262/6.0/#sec-object-internal-methods-and-internal-slots>
>> of the Object prototype object is null and the initial value of the
>> [[Extensible]] internal slot
>> <http://www.ecma-international.org/ecma-262/6.0/#sec-object-internal-methods-and-internal-slots>
>> is true.
>>
>> Ah! I looked in the ES2016 spec to make sure it wasn't a recent change,
> didn't think to go back to the one before...
>
> -- T.J.
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170202/ad96b262/attachment.html>


More information about the es-discuss mailing list