Skip to content

Commit c96e7b6

Browse files
committed
Editorial: Create the realm execution context slightly later
That is, in InitializeHostDefinedRealm, take the steps that create + push the realm execution context, and move them to after the realm's fields have been finalized.
1 parent 5881c1f commit c96e7b6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spec.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11789,11 +11789,6 @@ <h1>InitializeHostDefinedRealm ( ): either a normal completion containing ~unuse
1178911789
1. Set _realm_.[[GlobalObject]] to *undefined*.
1179011790
1. Set _realm_.[[GlobalEnv]] to *undefined*.
1179111791
1. Set _realm_.[[TemplateMap]] to a new empty List.
11792-
1. Let _newContext_ be a new execution context.
11793-
1. Set the Function of _newContext_ to *null*.
11794-
1. Set the Realm of _newContext_ to _realm_.
11795-
1. Set the ScriptOrModule of _newContext_ to *null*.
11796-
1. Push _newContext_ onto the execution context stack; _newContext_ is now the running execution context.
1179711792
1. If the host requires use of an exotic object to serve as _realm_'s global object, then
1179811793
1. Let _global_ be such an object created in a host-defined manner.
1179911794
1. Else,
@@ -11804,6 +11799,11 @@ <h1>InitializeHostDefinedRealm ( ): either a normal completion containing ~unuse
1180411799
1. Let _thisValue_ be _global_.
1180511800
1. Set _realm_.[[GlobalObject]] to _global_.
1180611801
1. Set _realm_.[[GlobalEnv]] to NewGlobalEnvironment(_global_, _thisValue_).
11802+
1. Let _newContext_ be a new execution context.
11803+
1. Set the Function of _newContext_ to *null*.
11804+
1. Set the Realm of _newContext_ to _realm_.
11805+
1. Set the ScriptOrModule of _newContext_ to *null*.
11806+
1. Push _newContext_ onto the execution context stack; _newContext_ is now the running execution context.
1180711807
1. Perform ? SetDefaultGlobalBindings(_realm_).
1180811808
1. Create any host-defined global object properties on _global_.
1180911809
1. Return ~unused~.

0 commit comments

Comments
 (0)