Skip to content

Commit 36ada6f

Browse files
domenicinikulin
authored andcommitted
Do not attempt to instantiate modules that have previously failed
Instead, propagate their instantiation errors. Closes whatwg#2556.
1 parent 255e837 commit 36ada6f

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

source

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87118,16 +87118,30 @@ interface <dfn>NavigatorOnLine</dfn> {
8711887118
propagated to the caller of this algorithm in the last step.</p>
8711987119
</li>
8712087120

87121-
<li><p>Let <var>record</var> be <var>result</var>'s <span
87122-
data-x="concept-module-script-module-record">module record</span>.</p>
87121+
<li><p>Let <var>instantiationStatus</var> be null.</p></li>
87122+
87123+
<li><p>If <var>result</var>'s <span data-x="concept-module-script-instantiation-state">instantiation
87124+
state</span> is "<code data-x="">errored</code>", then set <var>instantiationStatus</var> to
87125+
Completion { [[Type]]: throw, [[Value]]: <var>result</var>'s <span
87126+
data-x="concept-module-script-instantiation-error">instantiation error</span>, [[Target]]:
87127+
empty }.</p></li>
8712387128

8712487129
<li>
87125-
<p>Let <var>instantiationStatus</var> be <var>record</var>.<span
87126-
data-x="js-ModuleDeclarationInstantiation">ModuleDeclarationInstantiation</span>().</p>
87130+
<p>Otherwise:</p>
87131+
87132+
<ol>
87133+
<li><p>Let <var>record</var> be <var>result</var>'s <span
87134+
data-x="concept-module-script-module-record">module record</span>.</p></li>
8712787135

87128-
<p class="note">This step will recursively call <span
87129-
data-x="js-ModuleDeclarationInstantiation">ModuleDeclarationInstantiation</span> all of the
87130-
module's uninstantiated dependencies.</p>
87136+
<li>
87137+
<p>Set <var>instantiationStatus</var> to <var>record</var>.<span
87138+
data-x="js-ModuleDeclarationInstantiation">ModuleDeclarationInstantiation</span>().</p>
87139+
87140+
<p class="note">This step will recursively call <span
87141+
data-x="js-ModuleDeclarationInstantiation">ModuleDeclarationInstantiation</span> all of the
87142+
module's uninstantiated dependencies.</p>
87143+
</li>
87144+
</ol>
8713187145
</li>
8713287146

8713387147
<li>
@@ -120225,6 +120239,7 @@ INSERT INTERFACES HERE
120225120239
Geoff Richards,
120226120240
Geoffrey Garen,
120227120241
Geoffrey Sneddon,
120242+
Georg Neis,
120228120243
George Lund,
120229120244
Gianmarco Armellin,
120230120245
Giovanni Campagna,

0 commit comments

Comments
 (0)