-
Notifications
You must be signed in to change notification settings - Fork 67
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
Layering: Host hook to initialize new Realms #230
Conversation
Part of addressing tc39#225 In HTML, this host hook would probably do something related to [setting up a window environment settings object](https://html.spec.whatwg.org/#set-up-a-window-environment-settings-object). I wouldn't propose that this would add properties to the global object in HTML. This PR makes a new host hook section, as another hook may be needed for new modules (in the context of tc39#224)
If the intention is not to mutate the global object, could the spec state that somehow? |
@@ -74,6 +74,7 @@ location: https://rawgit.com/tc39/proposal-realms/master/index.html | |||
1. Set _O_.[[Realm]] to _realmRec_. | |||
1. Perform ? SetRealmGlobalObject(_realmRec_, *undefined*, *undefined*). | |||
1. Perform ? SetDefaultGlobalBindings(_O_.[[Realm]]). | |||
1. Perform ? HostInitializeUserRealm(_O_.[[Realm]]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In InitializeHostDefinedRealm
, we do:
Create any implementation-defined global object properties on globalObj.
I wonder if that's something that we should do here as part of HostInitializeUserRealm
, or doing it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (previous "Request Changes" was a finger error)
Part of addressing #225
In HTML, this host hook would probably do something related to setting up a window environment settings object. I wouldn't propose that this would add properties to the global object in HTML.
This PR makes a new host hook section, as another hook may be needed for new modules (in the context of #224)