New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immutable Prototype Exotic Objects is underspecified #705

Closed
allenwb opened this Issue Oct 2, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@allenwb
Member

allenwb commented Oct 2, 2016

The specification for Immutable Prototype Exotic Objects is incomplete and does not fully follow the pattern used to specify other standard exotic objects. Other than for [[GetPrototypeOf]], an implementer would have to guess at the intended definition of the essential internal methods.

This can be corrected by replacing the single paragraph of 9.4.7 with something like the following :

Immutable prototype exotic objects have the same internal slots as ordinary objects however the [[Prototype]] internal slot is immutable. Once the [[Prototype]] internal slot has been initialized its value must not change.

Immutable prototype exotic objects provide alternative definitions for the following internal methods. All of the other Immutable prototype exotic object essential internal methods that are not defined below are as specified in 9.1.

@domenic

This comment has been minimized.

Show comment
Hide comment
@domenic

domenic Oct 2, 2016

Member

+1. Nit: I'd replace "must not change" with "can not change" since otherwise the normative not-changing requirement is being duplicated in two places.

Member

domenic commented Oct 2, 2016

+1. Nit: I'd replace "must not change" with "can not change" since otherwise the normative not-changing requirement is being duplicated in two places.

@littledan

This comment has been minimized.

Show comment
Hide comment
@littledan

littledan Oct 17, 2016

Member

Thanks for pointing this out; I'll prepare a spec match to make it match the other parts soon.

Member

littledan commented Oct 17, 2016

Thanks for pointing this out; I'll prepare a spec match to make it match the other parts soon.

littledan added a commit to littledan/ecma262 that referenced this issue Nov 15, 2016

Clean up definition of Immutable Prototype Exotic Objects
- Explicitly state that they are just like ordinary objects, and have
  the same internal slots, except for one weird trick. (closes tc39#705)
- Factor out the body of the [[SetPrototypeOf]] method of immutable
  prototype exotic objects into an abstract operation to make it
  easier to do integration with embedders.
  (see whatwg/html#2035)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment