We need to check if we have an unsupported attribute before resolving the
specifier because, according to the spec, the unknown attribute should be
reported before the invalid specifier.
Differential Revision: https://phabricator.services.mozilla.com/D221998
Synthetic modules do not have any dependencies, so calling
`GetRequestedModulesCount` results in cash. This patch fixes this by making
`ResolveRequestedModules` return early for synthetic modules.
Differential Revision: https://phabricator.services.mozilla.com/D218561
This patch adds a module type parameter to
`ModuleLoaderBase::{CreateStaticImport,CreateDynamicImport},` and gets rid of a
bunch of hard-coded `JS::ModuleType::JavaScript.` However, the module type is
still hard-coded when we call `CreateDynamicImport` and `CreateStaticImport`.
Differential Revision: https://phabricator.services.mozilla.com/D218556
This patch adds the new parameter to the `NewVisitedSetForTopLevelImport`
method, but we hard-code the module type (which will be addressed in a later
patch)
Differential Revision: https://phabricator.services.mozilla.com/D218555
This patch gets rid of most hard-coded `JS::ModuleType::JavaScript` in
`js/loader/ModuleLoaderBase.cpp`. However, the module type is still hard-coded
when constructing the `ModuleLoadRequest` (will be addressed in a later patch).
Differential Revision: https://phabricator.services.mozilla.com/D218554
This patch is a small step towards the end goal, so we hardcoded the module
type to `JS::ModuleType::JavaScript`, but that will get changed in a later
patch.
Differential Revision: https://phabricator.services.mozilla.com/D218553
The module maps (`mFetchingModules` and `mFetchedModules`) in
`ModuleLoaderBase`, and `VisitedURLSet` were previously only keyed by the URL
and used the `nsURIHashKey` hashtable key class. This is no longer sufficient,
and the key should also contain the module type.
This patch introduces a new hashtable key class called `ModuleMapKey` and
changes `mFetchingModules`, `mFetchedModules`, and `VisitedURLSet` to use the
new key type.
To make this a bit easier to review, this first patch only introduces the new
key type and hard-codes the type to Javascript, where the key is constructed.
The hard-corded module types will be fixed in later patches.
Differential Revision: https://phabricator.services.mozilla.com/D155160
Synthetic modules do not have any dependencies, so calling
`GetRequestedModulesCount` results in cash. This patch fixes this by making
`ResolveRequestedModules` return early for synthetic modules.
Differential Revision: https://phabricator.services.mozilla.com/D218561
This patch adds a module type parameter to
`ModuleLoaderBase::{CreateStaticImport,CreateDynamicImport},` and gets rid of a
bunch of hard-coded `JS::ModuleType::JavaScript.` However, the module type is
still hard-coded when we call `CreateDynamicImport` and `CreateStaticImport`.
Differential Revision: https://phabricator.services.mozilla.com/D218556
This patch adds the new parameter to the `NewVisitedSetForTopLevelImport`
method, but we hard-code the module type (which will be addressed in a later
patch)
Differential Revision: https://phabricator.services.mozilla.com/D218555
This patch gets rid of most hard-coded `JS::ModuleType::JavaScript` in
`js/loader/ModuleLoaderBase.cpp`. However, the module type is still hard-coded
when constructing the `ModuleLoadRequest` (will be addressed in a later patch).
Differential Revision: https://phabricator.services.mozilla.com/D218554
This patch is a small step towards the end goal, so we hardcoded the module
type to `JS::ModuleType::JavaScript`, but that will get changed in a later
patch.
Differential Revision: https://phabricator.services.mozilla.com/D218553
The module maps (`mFetchingModules` and `mFetchedModules`) in
`ModuleLoaderBase`, and `VisitedURLSet` were previously only keyed by the URL
and used the `nsURIHashKey` hashtable key class. This is no longer sufficient,
and the key should also contain the module type.
This patch introduces a new hashtable key class called `ModuleMapKey` and
changes `mFetchingModules`, `mFetchedModules`, and `VisitedURLSet` to use the
new key type.
To make this a bit easier to review, this first patch only introduces the new
key type and hard-codes the type to Javascript, where the key is constructed.
The hard-corded module types will be fixed in later patches.
Differential Revision: https://phabricator.services.mozilla.com/D155160
In StartDynamicImport, if StartModuleLoad failed, the request would be
kept in mDynamicImportRequests until shutdown.
This fixes the problem by removing it from mDynamicImportRequests once
StartModuleLoad fails.
Differential Revision: https://phabricator.services.mozilla.com/D213016