Skip to content
This repository has been archived by the owner on Aug 29, 2021. It is now read-only.

Normative: Fix state checking in async cycle case #96

Merged
merged 1 commit into from
May 31, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ <h1>InnerModuleEvaluation( _module_, _stack_, _index_ )</h1>
1. For each String _required_ that is an element of _module_.[[RequestedModules]], do
1. Let _requiredModule_ be ! HostResolveImportedModule(_module_, _required_).
1. NOTE: Instantiate must be completed successfully prior to invoking this method, so every requested module is guaranteed to resolve successfully.
1. <ins>Let _cycle_ be *true* if _requiredModule_.[[Status]] is `"evaluating"`, and *false* otherwise.</ins>
1. Set _index_ to ? InnerModuleEvaluation(_requiredModule_, _stack_, _index_).
1. If _requiredModule_ is a Cyclic Module Record, then
1. Assert: _requiredModule_.[[Status]] is either `"evaluating"`<ins>, `"evaluating-async"`</ins> or `"evaluated"`.
Expand All @@ -478,9 +479,10 @@ <h1>InnerModuleEvaluation( _module_, _stack_, _index_ )</h1>
1. Set _module_.[[DFSAncestorIndex]] to min(_module_.[[DFSAncestorIndex]], _requiredModule_.[[DFSAncestorIndex]]).
1. <ins>Otherwise, set _requiredModule_ to GetCycleRoot(_requiredModule_).</ins>
1. <ins>If _requiredModule_.[[EvaluationError]] is not *undefined*, return _module_.[[EvaluationError]].</ins>
1. <ins>If _requiredModule_.[[Status]] is `"evaluating-async"`, then</ins>
1. <ins>Set _module_.[[PendingAsyncDependencies]] to _module_.[[PendingAsyncDependencies]] + 1.</ins>
1. <ins>Append _module_ to _requiredModule_.[[AsyncParentModules]].</ins>
1. <ins>If _cycle_ is *false*,</ins>
1. <ins>If either _requiredModule_.[[Async]] is *true*, or _requiredModule_.[[PendingAsyncDependencies]] is not 0, then</ins>
1. <ins>Set _module_.[[PendingAsyncDependencies]] to _module_.[[PendingAsyncDependencies]] + 1.</ins>
1. <ins>Append _module_ to _requiredModule_.[[AsyncParentModules]].</ins>
1. <del>Perform ? _module_.ExecuteModule().</del>
1. <ins>If _module_.[[PendingAsyncDependencies]] is 0, then</ins>
1. <ins>Perform ! ExecuteCyclicModule(_module_).</ins>
Expand Down