archives

« Bugzilla Issues Index

#2601 — Loader.prototype.import should not throw if the module is already loaded


Guy Bedford found this bug. Loader.prototype.import launches AsyncStartLoadPartwayThrough. But no load should be started if the requested module is already loaded or loading. Loader.prototype.import needs to check first, to see if the module is already loaded or loading.

The loading case is slightly tricky. The easiest fix is to add a Promise to each Load Record that resolves when the module is removed from loader.[[Loads]].


Moving this to modules.


concerns old module spec.