Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit f10a46a

Browse files
committed
fixup! [WIP] Top-level await integration
1 parent 3ac463f commit f10a46a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

spec.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h1><ins>Runtime Semantics: HostImportModuleDynamically ( _referencingScriptOrMo
7070

7171
<dd>
7272
<ul>
73-
<li>At some future time, the host environment must perform FinishDynamicImport(_referencingScriptOrModule_, _specifier_, _promiseCapability_, Promise.resolve(*undefined*)).</li>
73+
<li>At some future time, the host environment must perform FinishDynamicImport(_referencingScriptOrModule_, _specifier_, _promiseCapability_, _promise_), where _promise_ is a Promise resolved with *undefined*.</li>
7474

7575
<li>Any subsequent call to HostResolveImportedModule after FinishDynamicImport has completed, given the arguments _referencingScriptOrModule_ and _specifier_, must complete normally.</li>
7676

@@ -82,7 +82,7 @@ <h1><ins>Runtime Semantics: HostImportModuleDynamically ( _referencingScriptOrMo
8282

8383
<dd>
8484
<ul>
85-
<li>At some future time, the host environment must perform FinishDynamicImport(_referencingScriptOrModule_, _specifier_, _promiseCapability_, Promise.reject(an error)), with the error representing the cause of failure.</li>
85+
<li>At some future time, the host environment must perform FinishDynamicImport(_referencingScriptOrModule_, _specifier_, _promiseCapability_, _promise_), where _promise_ is a Promise rejected with an error representing the cause of failure.</li>
8686
</ul>
8787
</dd>
8888
</dl>
@@ -106,16 +106,17 @@ <h1><ins>Runtime Semantics: FinishDynamicImport ( _referencingScriptOrModule_, _
106106
<p>FinishDynamicImport completes the process of a dynamic import originally started by an `import()` call, resolving or rejecting the promise returned by that call as appropriate according to _completion_. It is performed by host environments as part of HostImportModuleDynamically.</p>
107107

108108
<emu-alg>
109-
1. Upon fulfillment of _innerPromise_ with value _v_,
109+
1. Let _onFulfilled_ be ! CreateBuiltinFunction(the following steps with argument _v_, « »).
110110
1. Assert: _v_ is *undefined*.
111111
1. Let _moduleRecord_ be ! HostResolveImportedModule(_referencingScriptOrModule_, _specifier_).
112112
1. Assert: Evaluate has already been invoked on _moduleRecord_ and successfully completed.
113113
1. Assert: _moduleRecord_.[[ExecPromise]] is resolved.
114114
1. Let _namespace_ be GetModuleNamespace(_moduleRecord_).
115115
1. If _namespace_ is an abrupt completion, perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _namespace_.[[Value]] »).
116116
1. Otherwise, perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _namespace_.[[Value]] »).
117-
1. Upon rejection of _innerPromise_ with reason _r_,
117+
1. Let _onRejected_ be ! CreateBuiltinFunction(the following steps with argument _r_, « »).
118118
1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _r_ »).
119+
1. ! PerformPromiseThen(_innerPromise_, _onFulfilled_, _onRejected_).
119120
</emu-alg>
120121
</emu-clause>
121122
</emu-clause>

0 commit comments

Comments
 (0)