Skip to content

Commit

Permalink
Do not attempt to instantiate modules that have previously failed
Browse files Browse the repository at this point in the history
Instead, propagate their instantiation errors. Closes whatwg#2556.
  • Loading branch information
domenic authored and Alice Boxhall committed Jan 7, 2019
1 parent 8177ab4 commit fc1208b
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -87133,16 +87133,30 @@ interface <dfn>NavigatorOnLine</dfn> {
propagated to the caller of this algorithm in the last step.</p>
</li>

<li><p>Let <var>record</var> be <var>result</var>'s <span
data-x="concept-module-script-module-record">module record</span>.</p>
<li><p>Let <var>instantiationStatus</var> be null.</p></li>

<li><p>If <var>result</var>'s <span data-x="concept-module-script-instantiation-state">instantiation
state</span> is "<code data-x="">errored</code>", then set <var>instantiationStatus</var> to
Completion { [[Type]]: throw, [[Value]]: <var>result</var>'s <span
data-x="concept-module-script-instantiation-error">instantiation error</span>, [[Target]]:
empty }.</p></li>

<li>
<p>Let <var>instantiationStatus</var> be <var>record</var>.<span
data-x="js-ModuleDeclarationInstantiation">ModuleDeclarationInstantiation</span>().</p>
<p>Otherwise:</p>

<ol>
<li><p>Let <var>record</var> be <var>result</var>'s <span
data-x="concept-module-script-module-record">module record</span>.</p></li>

<p class="note">This step will recursively call <span
data-x="js-ModuleDeclarationInstantiation">ModuleDeclarationInstantiation</span> all of the
module's uninstantiated dependencies.</p>
<li>
<p>Set <var>instantiationStatus</var> to <var>record</var>.<span
data-x="js-ModuleDeclarationInstantiation">ModuleDeclarationInstantiation</span>().</p>

<p class="note">This step will recursively call <span
data-x="js-ModuleDeclarationInstantiation">ModuleDeclarationInstantiation</span> all of the
module's uninstantiated dependencies.</p>
</li>
</ol>
</li>

<li>
Expand Down Expand Up @@ -120117,6 +120131,7 @@ INSERT INTERFACES HERE
Geoff Richards,
Geoffrey Garen,
Geoffrey Sneddon,
Georg Neis,
George Lund,
Gianmarco Armellin,
Giovanni Campagna,
Expand Down

0 comments on commit fc1208b

Please sign in to comment.