Closed Bug 1351345 Opened 7 years ago Closed 7 years ago

Add test that a module loader does not attempt to re-instantiate a previously instantiated module

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(1 file)

This adds a missing test that should have been added in bug 1284486.  This just exercises a different check inside ModuleDeclarationInstantiation().
Attachment #8852049 - Flags: review?(shu)
Comment on attachment 8852049 [details] [diff] [review]
add-module-reinstantiation-test

Review of attachment 8852049 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jit-test/tests/modules/bug-1284486-2.js
@@ +4,5 @@
> +// time after a failure throws an error. Doing this would be a bug in the module
> +// loader, which is expected to throw away modules if there is an error
> +// instantiating them.
> +//
> +// The first attempt fails becuase module 'a' is not available. The second

typo: because

@@ +8,5 @@
> +// The first attempt fails becuase module 'a' is not available. The second
> +// attempt fails because of the previous failure (it would otherwise succeed as
> +// 'a' is now available).
> +//
> +// This test excerises the path where the previously instantiated module is

typo: exercises

::: js/src/jit-test/tests/modules/bug-1284486.js
@@ +9,5 @@
>  // attempt fails because of the previous failure (it would otherwise succeed as
>  // 'a' is now available).
> +//
> +// This test excerises the path where the previously instantiated module is
> +// encontered as an import.

typo: encountered
Attachment #8852049 - Flags: review?(shu) → review+
Ugh, sorry for the typos.  Makes me wish we had something to spell check comments.
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8b9640274420
Add test that a module loader does not attempt to re-instantiate a previously instantiated module r=shu
https://hg.mozilla.org/mozilla-central/rev/8b9640274420
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: