Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editorial: Return created Realm from InitializeHostDefinedRealm
This AO is not being used in ECMA-262 directly, but from real-world experience implementing & using is as-is I can say that having to pull the Realm out of the running execution context is somewhat awkward. This change is backwards compatible with how the HTML spec uses the AO, but this would allow simplifying the following: 1. Perform InitializeHostDefinedRealm() with the provided customizations for creating the global object and the global this binding. 2. Let realm execution context be the running JavaScript execution context. 3. Remove realm execution context from the JavaScript execution context stack. 4. Let realm be realm execution context's Realm component. to 1. Let realm be InitializeHostDefinedRealm() with the provided customizations for creating the global object and the global this binding. 2. Let realm execution context be the running JavaScript execution context. 3. Remove realm execution context from the JavaScript execution context stack. (https://html.spec.whatwg.org/#creating-a-new-javascript-realm) For hosts that don't have HTML's requirement of removing the running execution context, it becomes a simple: 1. Let realm be InitializeHostDefinedRealm().
- Loading branch information