Ecma262: Inconsistency with the definition of %Object.prototype%

Created on 4 Oct 2019  路  4Comments  路  Source: tc39/ecma262

Forgive me if I'm totally missing the mark with this, I'm pretty new to being able wrap my head around what's going on in the spec, but I've spotted something I just can't figure out.

According to 8.2.2 realmRec.[[intrinsics]].[[%Object.prototype%]] is set to ObjectCreate(null)

According to 9.1.12 ObjectCreate returns an object whose

essential internal methods [are set] to the default ordinary object definitions specified in 9.1

i.e., an ordinary object.

However, in 19.1.3, %ObjectPrototype% is defined to be an exotic object.

Most helpful comment

All 4 comments

Looks like CreateIntrinsics needs to add a step that ensures that realmRec.[[intrinsics]].[[%Object.prototype%]] becomes an immutable prototype exotic object, so it's in sync with the definition in 19.1.3.

@devsnek very nice! Forgive me for asking this but I'm not very familiar with the process, why are those changes are not in https://tc39.es/ecma262/?

it hasn't been merged yet. the editorial process of ecma262 is... slow.

Was this page helpful?
0 / 5 - 0 ratings