From e86da3d09b977104ee49656707bbf238a6271733 Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Thu, 21 Nov 2024 09:57:18 -0500 Subject: [PATCH] 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. --- spec.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec.html b/spec.html index 277f6f73972..d74a6589ddf 100644 --- a/spec.html +++ b/spec.html @@ -11652,11 +11652,6 @@

InitializeHostDefinedRealm ( ): either a normal completion containing ~unuse 1. Perform CreateIntrinsics(_realm_). 1. Set _realm_.[[AgentSignifier]] to AgentSignifier(). 1. Set _realm_.[[TemplateMap]] to a new empty List. - 1. Let _newContext_ be a new execution context. - 1. Set the Function of _newContext_ to *null*. - 1. Set the Realm of _newContext_ to _realm_. - 1. Set the ScriptOrModule of _newContext_ to *null*. - 1. Push _newContext_ onto the execution context stack; _newContext_ is now the running execution context. 1. If the host requires use of a specific object to serve as _realm_'s global object, then 1. Let _global_ be such an object created in a host-defined manner. 1. Else, @@ -11667,6 +11662,11 @@

InitializeHostDefinedRealm ( ): either a normal completion containing ~unuse 1. Let _thisValue_ be _global_. 1. Set _realm_.[[GlobalObject]] to _global_. 1. Set _realm_.[[GlobalEnv]] to NewGlobalEnvironment(_global_, _thisValue_). + 1. Let _newContext_ be a new execution context. + 1. Set the Function of _newContext_ to *null*. + 1. Set the Realm of _newContext_ to _realm_. + 1. Set the ScriptOrModule of _newContext_ to *null*. + 1. Push _newContext_ onto the execution context stack; _newContext_ is now the running execution context. 1. Perform ? SetDefaultGlobalBindings(_realm_). 1. Create any host-defined global object properties on _global_. 1. Return ~unused~.