Skip to content

Commit

Permalink
review #35
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Nov 21, 2024
1 parent 2d0eb52 commit b96eb97
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -842,19 +842,18 @@ contributors: Luca Casonato, Guy Bedford
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
1. <ins>Let _moduleRequest_ be *undefined*.</ins>
1. <ins>If _specifier_ is an Object, then</ins>
1. <ins>Set _moduleRequest_ to GetModuleSourceModuleRecord(_specifier_).</ins>
1. <ins>If _moduleRequest_ is ~not-a-source~, then</ins>
1. <ins>Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »).</ins>
1. <ins>Return _promiseCapability_.[[Promise]].</ins>
1. <ins>If _moduleRequest_.[[Realm]] is not equal to the current Realm Record, then</ins>
1. <ins>Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »).</ins>
1. <ins>Return _promiseCapability_.[[Promise]].</ins>
1. <ins>Let _attributesObj_ be Completion(Get(_options_, *"with"*)).</ins>
1. <ins>IfAbruptRejectPromise(_attributesObj_, _promiseCapability_).</ins>
1. <ins>If _attributesObj_ is not *undefined*, then</ins>
1. <ins>Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »).</ins>
1. <ins>Return _promiseCapability_.[[Promise]].</ins>
1. <ins>Else,</ins>
1. <ins>Let _moduleSource_ be GetModuleSourceModuleRecord(_specifier_).</ins>
1. <ins>If _moduleSource_ is not ~not-a-source~, then</ins>
1. <ins>If _moduleSource_.[[Realm]] is not equal to the current Realm Record, then</ins>
1. <ins>Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »).</ins>
1. <ins>Return _promiseCapability_.[[Promise]].</ins>
1. <ins>Let _attributesObj_ be Completion(Get(_options_, *"with"*)).</ins>
1. <ins>IfAbruptRejectPromise(_attributesObj_, _promiseCapability_).</ins>
1. <ins>If _attributesObj_ is not *undefined*, then</ins>
1. <ins>Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »).</ins>
1. <ins>Return _promiseCapability_.[[Promise]].</ins>
1. <ins>Set _moduleRequest_ to _moduleSource_.</ins>
1. <ins>If _moduleRequest_ is *undefined*, then</ins>
1. Let _specifierString_ be Completion(ToString(_specifier_)).
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
1. Let _attributes_ be a new empty List.
Expand Down Expand Up @@ -1260,7 +1259,7 @@ contributors: Luca Casonato, Guy Bedford
The completion record returned by this operation must not be affected by _moduleRequest_.[[Phase]].
</li>
<li>
<ins>A _moduleRequest_ is a Module Record when importing a Module Source Object directly. In this case it is only necesasry to add the module to the module registry to ensure the invariants above.</ins>
<ins>A _moduleRequest_ is a Module Record when importing a Module Source Object directly. In this case it is only necessary to add the module to the module registry, while possibly coalescing with any existing record on exact key and source equality to maintain the invariants above.</ins>
</li>
<li>
The operation must treat _payload_ as an opaque value to be passed through to FinishLoadingImportedModule.
Expand Down

0 comments on commit b96eb97

Please sign in to comment.