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 EC 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 not backwards compatible with how the HTML spec uses the AO, but will 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 execution context be InitializeHostDefinedRealm() with the provided customizations for creating the global object and the global this binding. 2. Let realm be realm execution context's Realm component. (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 executionContext be InitializeHostDefinedRealm(). 2. Let realm be executionContext.[[Realm]].
- Loading branch information