[ES6 modules] HRIM may return errored module until V8 forgets instantiation errors #7664
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Today, we are in somewhat stale state where new module tree fetching algorithm
[1][2] is partially applied. This CL (temporarily) disables an assert which
exists in the final algorithm, but doesn't hold today.
Specifically, the assert in HostResolveImportedModule (HRIM [3]) Step 7 currently
doesn't hold, as the instantiation may have failed for a module script node,
and current V8 implementation records the instantiation error as an error.
See the attached test case for an example.
[1] whatwg/html#2991
[2] tc39/ecma262#1006
[3] https://html.spec.whatwg.org/multipage/webappapis.html#hostresolveimportedmodule(referencingscriptormodule,-specifier)
Test: external/wpt/html/semantics/scripting-1/the-script-element/module/instantiation-error-8.html
Bug: 772750, 763597
Change-Id: Ida600598b658c74cdbda5937219f1e62a41f2a16
Reviewed-on: https://chromium-review.googlesource.com/708078
Reviewed-by: Yutaka Hirano yhirano@chromium.org
Reviewed-by: Kinuko Yasuda kinuko@chromium.org
Commit-Queue: Kouhei Ueno kouhei@chromium.org
Cr-Commit-Position: refs/heads/master@{#507888}