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
Global inherits from %ObjectPrototype% #14
Comments
The frozen realm omits all host objects and so is not considered a host-specific kind of realm. We should prefer more deterministic specs to less deterministic specs. Thus, we should specify what the frozen global inherits from, i.e., what the value of the frozen realm's global's The only plausible one that comes to mind is |
FYI, in the current spec text for this repo, neither spawned realms, and immutableRoot realms have a way to control the realm's [[GlobalObject]] internal slot, it will always be a newly created object of the newly created realm's Although, when creating new realms via |
What needs to be said to ensure that the platform-created global is initialized only with things from the ES spec, and not with, e.g., any host-provided properties. I think we need to state explicitly that https://tc39.github.io/ecma262/#sec-setdefaultglobalbindings must not add any properties other than "each property of the Global Object specified in clause 18,". Proposing that this be changed unconditionally in the language at 8.2.4 is best. If for some reason we can't get that, then we need to make sure that frozen realms engage a variant that does have this guarantee. Likewise with the initial state of all the objects that are magically created by the realm initialization mechanism. |
This mandate is not in ES spec. It would be a mandate solely for frozen-realms and may cause oddities if the parent realm does not inherit from %ObjectPrototype%. Also keeps strange behaviors around like
new constructor()
.previous discussion at: https://esdiscuss.org/topic/proposal-revisions-draft-proposed-standard-ses-becomes-draft-proposed-frozen-realm-api#content-1
The text was updated successfully, but these errors were encountered: