Commit Graph
239 Commits
Author SHA1 Message Date
Yoshi Cheng-Hao Huang e10ced86e9 Bug 1820594 - Part 13: Resume waiting requests after fetching dependencies. r=jonco
Process the ModuleLoadRequest itself first when it's fetched, then process the
waiting requests.

Differential Revision: https://phabricator.services.mozilla.com/D228849
2025-07-22 18:28:49 +00:00
Yoshi Cheng-Hao Huang 2662812a51 Bug 1820594 - Part 12: Implement ContinueDynamicImport. r=jonco
Implement https://tc39.es/ecma262/#sec-ContinueDynamicImport.

Differential Revision: https://phabricator.services.mozilla.com/D241811
2025-07-22 18:28:46 +00:00
Yoshi Cheng-Hao Huang a9c5e54942 Bug 1820594 - Part 5: Update Module Hook. r=jonco
Replace resolve hook and dynamic import hook with load hook.

Differential Revision: https://phabricator.services.mozilla.com/D214569
2025-07-22 18:28:25 +00:00
Atila Butkovits f46ece6f70 Revert "Bug 1820594 - Part 36: Add CancelFetchingModules. r=jonco" for causing failures at mochitest.toml.
This reverts commit bb9106dfec.

Revert "Bug 1820594 - Part 35: Disable testSyncImportWhileAsyncImportTLA. r=arai"

This reverts commit bd7ac6c6da.

Revert "Bug 1820594 - Part 34: Update wpt ini for dynamic import. r=jonco"

This reverts commit 6dc30859a2.

Revert "Bug 1820594 - Part 33: Update choice-of-error-1.html.ini and error-type-1.html.ini failed as expected. r=jonco"

This reverts commit 696d4051b2.

Revert "Bug 1820594 - Part 32: Remove js/src/jit-test/tests/modules/bug-1287410.js. r=jonco"

This reverts commit 6a47bd9a7c.

Revert "Bug 1820594 - Part 31: Test the child requests accross multiple module graphs. r=jonco"

This reverts commit fc403c5ea9.

Revert "Bug 1820594 - Part 30: Update JS Shell implementation for HostLoadImportedModule. r=jonco"

This reverts commit 5a2f281ba7.

Revert "Bug 1820594 - Part 29: Remove ModuleLoader::ResolveImportedModule and ModuleLoader::ImportModuleDynamically in JS Shell r=jonco"

This reverts commit aa686310fc.

Revert "Bug 1820594 - Part 28: DOM, Worker, Worklet ScriptLoader, mozJSModuleLoader update r=jonco"

This reverts commit 86aea74da6.

Revert "Bug 1820594 - Part 27: Remove redundant module graph data structures from host layer. r=jonco"

This reverts commit 81673cfb4e.

Revert "Bug 1820594 - Part 26: Remove FindFirstParseError and check for parse error. r=jonco"

This reverts commit 665970f847.

Revert "Bug 1820594 - Part 25: Call FinishLoadingImportedModule for dynamic import. r=jonco"

This reverts commit 9037595d27.

Revert "Bug 1820594 - Part 24: Add ModuleErroredRunnable to dispatch ModuleErrored. r=jonco"

This reverts commit aa0e96e6c1.

Revert "Bug 1820594 - Part 23: Error handling when module fetching failed. r=jonco"

This reverts commit 8054f6d6b3.

Revert "Bug 1820594 - Part 22: Throw TypeError if the module type is unsupported. r=jonco"

This reverts commit f793f2b086.

Revert "Bug 1820594 - Part 21: Implement HostLoadImportedModule and FinishLoadingImportedModule in ModuleLoaderBase. r=jonco"

This reverts commit 2c2abeb8a3.

Revert "Bug 1820594 - Part 20: Update module script's referrer policy. r=jonco"

This reverts commit e92cdaa129.

Revert "Bug 1820594 - Part 19: Refactor CreateStaticImport. r=jonco"

This reverts commit e7cc5dcf27.

Revert "Bug 1820594 - Part 18: Add mReferrerObj, mModuleRequestObj, mReferencingPrivate, mStatePrivate in ModuleLoadRequest r=jonco"

This reverts commit 96b553c522.

Revert "Bug 1820594 - Part 17: Add OnFetchSucceeded r=jonco"

This reverts commit 4b60b4037a.

Revert "Bug 1820594 - Part 16-1 : Use sync version of LoadRequestedModules for chrome pages. r=jonco"

This reverts commit a75c3d1989.

Revert "Bug 1820594 - Part 16: Call LoadRequestedModules in StartFetchingModuleDependencies. r=jonco"

This reverts commit cf9a4a886d.

Revert "Bug 1820594 - Part 15: Remove HostResolveImportedModule and HostImportModuleDynamically r=jonco"

This reverts commit 8c45c3380e.

Revert "Bug 1820594 - Part 14: Remove VisitedURLSet. r=jonco"

This reverts commit 09f1ea1a1a.

Revert "Bug 1820594 - Part 13: Resume waiting requests after fetching dependencies. r=jonco"

This reverts commit a5edee9705.

Revert "Bug 1820594 - Part 12: Implement ContinueDynamicImport. r=jonco"

This reverts commit b487d8ffec.

Revert "Bug 1820594 - Part 11: Implement LoadRequestedModules. r=jonco"

This reverts commit 0049bf82d1.

Revert "Bug 1820594 - Part 10: Implement ImportAttributes in InnerModuleLoading. r=jonco"

This reverts commit 3115d8a191.

Revert "Bug 1820594 - Part 9: Implement FinishLoadingImportedModule, ContinueModuleLoading. r=jonco"

This reverts commit 85bcdccef3.

Revert "Bug 1820594 - Part 8: Update js::FinishDynamicModuleImport. r=jonco"

This reverts commit f5546f06d2.

Revert "Bug 1820594 - Part 7: Remove JS::FinishDynamicModuleImport. r=jonco"

This reverts commit 1e6d8581b9.

Revert "Bug 1820594 - Part 6: Implement InnerModuleLoading. r=jonco"

This reverts commit ef4d03deaf.

Revert "Bug 1820594 - Part 5: Update Module Hook. r=jonco"

This reverts commit 4f00fb82af.

Revert "Bug 1820594 - Part 4: Implement GetImportedModule. r=jonco"

This reverts commit 19507524a2.

Revert "Bug 1820594 - Part 3: Implement LoadedModules in ModuleObject. r=jonco"

This reverts commit f639c7eb96.

Revert "Bug 1820594 - Part 2: Implement GraphLoadingStateRecord. r=jonco"

This reverts commit 05a2b76d9c.

Revert "Bug 1820594 - Part 1: Add ModuleStatus::New. r=jonco"

This reverts commit bfd2615ef1.
2025-07-22 01:03:15 +00:00
Yoshi Cheng-Hao Huang bb9106dfec Bug 1820594 - Part 36: Add CancelFetchingModules. r=jonco
In mochitest-browser tests, it's possible for the about:neterror page to
load. This triggers aboutNetError.html, which in turn loads
aboutNetError.mjs, eventually importing pkijs.js. The pkijs.js module is
compiled off-thread.

However, when the test framework proceeds to the next test, the
associated document may be detached before the off-thread compilation of
pkijs.js completes. If this happens while TaskController is shutting
down, the compilation task may never finish.

Currently, ScriptLoader only tracks top-level off-thread compilation
requests, not submodules involved in those tasks. To address this, we
now call CancelFetchingModules when ScriptLoader cancels ongoing
requests, ensuring submodule fetches are also properly aborted.

Differential Revision: https://phabricator.services.mozilla.com/D257677
2025-07-21 23:10:08 +00:00
Yoshi Cheng-Hao Huang 81673cfb4e Bug 1820594 - Part 27: Remove redundant module graph data structures from host layer. r=jonco
Since the module graph is now traversed within the JS engine itself, the
related data structures in the host layer are no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D255129
2025-07-21 23:09:41 +00:00
Yoshi Cheng-Hao Huang 665970f847 Bug 1820594 - Part 26: Remove FindFirstParseError and check for parse error. r=jonco
The changes in [whatwg/html#8253](https://github.com/whatwg/html/pull/8253)
remove the "Find the first parse error" part.

Differential Revision: https://phabricator.services.mozilla.com/D214579
2025-07-21 23:09:38 +00:00
Yoshi Cheng-Hao Huang 9037595d27 Bug 1820594 - Part 25: Call FinishLoadingImportedModule for dynamic import. r=jonco
From the specification, ContinueDynamicImport is done inside the engine.
https://tc39.es/ecma262/#sec-ContinueDynamicImport

However, our implementation for EvaluateModuleInContext() has bytecode
encoding related stuff, so for now I implement the ContinueDynamicImport
in the host layer.

Also, the updated spec has a slightly different error handling behavior when
module.Link() fails. I list them below:

Before HTML PR 8253 [https://github.com/whatwg/html/pull/8253]

fetch the descendants of and link a module script
https://web.archive.org/web/20221130023614/https://html.spec.whatwg.org/#fetch-the-descendants-of-and-link-a-module-script

onFetchDescendantsComplete
Step 3.2. Perform record.Link().
          If this throws an exception, set result's error to rethrow to that exception.

HostImportModuleDynamically
https://web.archive.org/web/20221130023614/https://html.spec.whatwg.org/#hostimportmoduledynamically(referencingscriptormodule,-modulerequest,-promisecapability)
Step 6.3 Otherwise, set promise to the result of running a module script given result and true.

run a module script
https://web.archive.org/web/20221130023614/https://html.spec.whatwg.org/#run-a-module-script
Step 5. If script's error to rethrow is not null, then set evaluationPromise to a promise rejected with script's error to rethrow.

--------------------------------------------------------
After ECMA262 PR 2905 [https://github.com/tc39/ecma262/pull/2905]
ContinueDynamicImport
Step 6.a Let link be Completion(module.Link()).
Step 6.b If link is an abrupt completion, then
  Step 6.b.i. Perform ! Call(promiseCapability.[[Reject]], undefined, « link.[[Value]] »).
  Step 6.b.ii. Return unused.

In short,
  * The old behavior:
    It catched the exception thrown during module.Link(), and set
    the module script's error to rethrow to the exception. Later in
    Evaluate(), if the module script's error to rethrow is not null,
    reject the evaluation promise with the error to rethrow.

  * The new behavior:
    It simply rejects the evaluation promise with the exception thrown
    during module.Link().

Differential Revision: https://phabricator.services.mozilla.com/D214577
2025-07-21 23:09:35 +00:00
Yoshi Cheng-Hao Huang aa0e96e6c1 Bug 1820594 - Part 24: Add ModuleErroredRunnable to dispatch ModuleErrored. r=jonco
When there's a ParseError, the error should be dispatched asynchronously.
However, workers can't handle the micro task, therefore we still call
ModuleErrored synchronously.

WPT test: /html/semantics/scripting-1/the-script-element/module/inline-async-inserted-execorder.html

Differential Revision: https://phabricator.services.mozilla.com/D255128
2025-07-21 23:09:32 +00:00
Yoshi Cheng-Hao Huang 8054f6d6b3 Bug 1820594 - Part 23: Error handling when module fetching failed. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D228860
2025-07-21 23:09:29 +00:00
Yoshi Cheng-Hao Huang f793f2b086 Bug 1820594 - Part 22: Throw TypeError if the module type is unsupported. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D241812
2025-07-21 23:09:26 +00:00
Yoshi Cheng-Hao Huang 2c2abeb8a3 Bug 1820594 - Part 21: Implement HostLoadImportedModule and FinishLoadingImportedModule in ModuleLoaderBase. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D228856
2025-07-21 23:09:23 +00:00
Yoshi Cheng-Hao Huang e92cdaa129 Bug 1820594 - Part 20: Update module script's referrer policy. r=jonco
- Move UpdateReferrerPolicy from ScriptLoadRequest to ModuleLoadRequest,
  as this can only happend for a module load.

- Add UpdateReferrerPolicy method to ModuleScript.
  Introduces a new UpdateReferrerPolicy method for ModuleScript,
  allowing the referrer policy to be updated based on the associated
  ModuleLoadRequest.

Differential Revision: https://phabricator.services.mozilla.com/D255127
2025-07-21 23:09:20 +00:00
Yoshi Cheng-Hao Huang e7cc5dcf27 Bug 1820594 - Part 19: Refactor CreateStaticImport. r=jonco
Pass LoadContextBase to CreateStaticImport

Differential Revision: https://phabricator.services.mozilla.com/D255126
2025-07-21 23:09:17 +00:00
Yoshi Cheng-Hao Huang 96b553c522 Bug 1820594 - Part 18: Add mReferrerObj, mModuleRequestObj, mReferencingPrivate, mStatePrivate in ModuleLoadRequest r=jonco
Add data structures to pass those information to
FinishLoadingImportedModule.

Differential Revision: https://phabricator.services.mozilla.com/D228852
2025-07-21 23:09:14 +00:00
Yoshi Cheng-Hao Huang 4b60b4037a Bug 1820594 - Part 17: Add OnFetchSucceeded r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D228853
2025-07-21 23:09:11 +00:00
Yoshi Cheng-Hao Huang a75c3d1989 Bug 1820594 - Part 16-1 : Use sync version of LoadRequestedModules for chrome pages. r=jonco
In mochitest-browser tests, it's possible for the about:neterror page to
load. This triggers aboutNetError.html, which in turn loads aboutNetError.mjs.

Occasionally, the load promise from
LoadRequestedModules(aboutNetError.mjs) is never resolved because the
PromiseJobRunnable is not executed if the global is in the process of
shutting down.

To avoid this issue, we now use the synchronous version of
LoadRequestedModules when loading chrome resources.

Differential Revision: https://phabricator.services.mozilla.com/D257676
2025-07-21 23:09:09 +00:00
Yoshi Cheng-Hao Huang cf9a4a886d Bug 1820594 - Part 16: Call LoadRequestedModules in StartFetchingModuleDependencies. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D251142
2025-07-21 23:09:06 +00:00
Yoshi Cheng-Hao Huang 8c45c3380e Bug 1820594 - Part 15: Remove HostResolveImportedModule and HostImportModuleDynamically r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D228851
2025-07-21 23:09:03 +00:00
Yoshi Cheng-Hao Huang 09f1ea1a1a Bug 1820594 - Part 14: Remove VisitedURLSet. r=jonco
Visited set has been removed from the spec.
See https://whatpr.org/html/8253/085d4d1...75e7bf0/webappapis.html

Differential Revision: https://phabricator.services.mozilla.com/D228850
2025-07-21 23:09:00 +00:00
Yoshi Cheng-Hao Huang a5edee9705 Bug 1820594 - Part 13: Resume waiting requests after fetching dependencies. r=jonco
Process the ModuleLoadRequest itself first when it's fetched, then process the
waiting requests.

Differential Revision: https://phabricator.services.mozilla.com/D228849
2025-07-21 23:08:57 +00:00
Yoshi Cheng-Hao Huang b487d8ffec Bug 1820594 - Part 12: Implement ContinueDynamicImport. r=jonco
Implement https://tc39.es/ecma262/#sec-ContinueDynamicImport.

Differential Revision: https://phabricator.services.mozilla.com/D241811
2025-07-21 23:08:54 +00:00
Yoshi Cheng-Hao Huang 4f00fb82af Bug 1820594 - Part 5: Update Module Hook. r=jonco
Replace resolve hook and dynamic import hook with load hook.

Differential Revision: https://phabricator.services.mozilla.com/D214569
2025-07-21 23:08:33 +00:00
Yoshi Cheng-Hao Huang 5aaa5b3e47 Bug 1971701 - Remove JS::ExposeScriptToDebugger. r=arai
The script will be exposed to the debugger during stencil instantiation.
https://searchfox.org/mozilla-central/rev/61f64da2b20e50610d532675877ca4b5b9d6f1e4/js/src/frontend/BytecodeCompiler.cpp#498

Hence removing the extra call to expose the script.

Differential Revision: https://phabricator.services.mozilla.com/D253467
2025-07-09 12:50:08 +00:00
Sandor Molnar 3fd83b1709 Revert "Bug 1971701 - Remove JS::ExposeScriptToDebugger. r=arai" for causing regression.
This reverts commit 82b31dee46.
2025-07-03 17:23:02 +00:00
Yoshi Cheng-Hao Huang 82b31dee46 Bug 1971701 - Remove JS::ExposeScriptToDebugger. r=arai
The script will be exposed to the debugger during stencil instantiation.
https://searchfox.org/mozilla-central/rev/61f64da2b20e50610d532675877ca4b5b9d6f1e4/js/src/frontend/BytecodeCompiler.cpp#498

Hence removing the extra call to expose the script.

Differential Revision: https://phabricator.services.mozilla.com/D253467
2025-06-12 21:31:46 +00:00
Yoshi Cheng-Hao Huang 1722215448 Bug 1965426 - Check recursion limit in ModuleLoaderBase. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D249674
2025-06-03 08:20:31 +00:00
Serban Stanca fc8269fc61 Revert "Bug 1965426 - Update test. r=jonco"
This reverts commit 2e8fb158ca. for causing hazard linux build bustages in ModuleLoaderBase.cpp.

This reverts commit 7f1190586b.
2025-05-29 00:08:21 +00:00
Yoshi Cheng-Hao Huang 7f1190586b Bug 1965426 - Check recursion limit in ModuleLoaderBase. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D249674
2025-05-28 18:02:34 +00:00
Tooru Fujisawa c882062351 Bug 1949932 - Part 1: Use SharedScriptCache from ModuleLoader. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D242728
2025-04-01 13:09:04 +00:00
Stanca Serban 3d34fe1048 Backed out 8 changesets (bug 1949932) for causing reftests failures in LoadedScript.h. CLOSED TREE
Backed out changeset de39fd08733d (bug 1949932)
Backed out changeset b75281f1b27c (bug 1949932)
Backed out changeset 8920e6d4cf8c (bug 1949932)
Backed out changeset c05f9bf802ae (bug 1949932)
Backed out changeset 2c9718bfd7be (bug 1949932)
Backed out changeset 03f4514cfba8 (bug 1949932)
Backed out changeset 9fe4fd6ee6e8 (bug 1949932)
Backed out changeset 1cebf102e64e (bug 1949932)
2025-04-01 08:59:51 +03:00
Tooru Fujisawa 872eb028b0 Bug 1949932 - Part 1: Use SharedScriptCache from ModuleLoader. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D242728
2025-04-01 03:11:18 +00:00
Goloman Adrian 62c97b0b6c Backed out 8 changesets (bug 1949932) for causing build bustages @RootingAPI.h. CLOSED TREE
Backed out changeset 181cde5d267e (bug 1949932)
Backed out changeset 44fd656c40de (bug 1949932)
Backed out changeset b4d93df0edb1 (bug 1949932)
Backed out changeset 7c20db67f688 (bug 1949932)
Backed out changeset ac742d9dc3aa (bug 1949932)
Backed out changeset 102e0dc46dff (bug 1949932)
Backed out changeset 80d1b3331844 (bug 1949932)
Backed out changeset cc1834c3ea2a (bug 1949932)
2025-04-01 07:09:29 +03:00
Tooru Fujisawa 85a3b6e05a Bug 1949932 - Part 1: Use SharedScriptCache from ModuleLoader. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D242728
2025-04-01 03:11:18 +00:00
Tooru Fujisawa bcc4c6ecf8 Bug 1954644 - Part 9: Remove unnecessary cast. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D242314
2025-03-22 04:03:56 +00:00
Tooru Fujisawa 303abbb5c4 Bug 1954644 - Part 1: Make the cycle collection macro use consistent. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D242306
2025-03-22 04:03:54 +00:00
Fatih Kilic 37486aeb74 Bug 1945540: Part 3 - Get integrity from import map. r=tschuster,jonco,dom-core,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D236559
2025-03-06 14:16:30 +00:00
Yoshi Cheng-Hao Huang 0f700f4d20 Bug 1948589 - Part 1: Report exception if import() a unknown module type. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D238421
2025-02-18 17:41:52 +00:00
Jonatan Klemets d81453192a Bug 1917899 - Check unsupported import attributes before resolving specifier r=jonco
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
2024-09-17 08:25:46 +00:00
Jonatan Klemets 4823d60d86 Bug 1877792 - Part 15: Skip ExposeScriptToDebugger/UpdateDebugMetadata for synthetic modules r=spidermonkey-reviewers,jonco
Differential Revision: https://phabricator.services.mozilla.com/D218562
2024-09-03 08:10:53 +00:00
Jonatan Klemets d79584cae1 Bug 1877792 - Part 14: Return early in ModuleLoaderBase::ResolveRequestedModules for synthetic modules r=spidermonkey-reviewers,jonco
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
2024-09-03 08:10:53 +00:00
Jonatan Klemets 00609001ca Bug 1877792 - Part 10: Get the module type from the module request r=spidermonkey-reviewers,jonco
Differential Revision: https://phabricator.services.mozilla.com/D218557
2024-09-03 08:10:51 +00:00
Jonatan Klemets 24c00f1528 Bug 1877792 - Part 9: Add module type to ModuleLoaderBase::{CreateStaticImport,CreateDynamicImport} r=spidermonkey-reviewers,dom-worker-reviewers,dom-core,asuth,jonco,mccr8
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
2024-09-03 08:10:51 +00:00
Jonatan Klemets becd3a556a Bug 1877792 - Part 7: Add ModuleLoadRequest::mModuleType r=dom-core,spidermonkey-reviewers,dom-worker-reviewers,asuth,jonco,mccr8
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
2024-09-03 08:10:50 +00:00
Jonatan Klemets 76c8568c12 Bug 1877792 - Part 6: Change ModuleLoaderBase::ResolveRequestedModules to handle URL and module type r=spidermonkey-reviewers,jonco
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
2024-09-03 08:10:50 +00:00
Jonatan Klemets c5a80d9d47 Bug 1877792 - Part 3: Update module map methods to take ModuleMapKey instead of nsIURI r=spidermonkey-reviewers,jonco
Differential Revision: https://phabricator.services.mozilla.com/D218209
2024-09-03 08:10:48 +00:00
Jonatan Klemets 0598953bb0 Bug 1877792 - Part 2: Change the module map key to include both URL and module type r=yulia,jonco
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
2024-09-03 08:10:48 +00:00
Cristina Horotan a842adb0d9 Backed out 20 changesets (bug 1877792) for causing wpt failures at importscripts_mime_local.any.sharedworker.html CLOSED TREE
Backed out changeset 19d78d0b6ee4 (bug 1877792)
Backed out changeset 14f104e5ce51 (bug 1877792)
Backed out changeset 662eb52b2a6f (bug 1877792)
Backed out changeset 48dc4035a14f (bug 1877792)
Backed out changeset d98ecddf2f59 (bug 1877792)
Backed out changeset 1234a31ff88f (bug 1877792)
Backed out changeset a3b5b0cde6ce (bug 1877792)
Backed out changeset a1f494b9592a (bug 1877792)
Backed out changeset a4d7565218f3 (bug 1877792)
Backed out changeset fe179004423b (bug 1877792)
Backed out changeset 39a20aee3942 (bug 1877792)
Backed out changeset 95b20763e650 (bug 1877792)
Backed out changeset d763241fccaf (bug 1877792)
Backed out changeset 0674cf646120 (bug 1877792)
Backed out changeset bd23c96418b6 (bug 1877792)
Backed out changeset 5b1e29e4c597 (bug 1877792)
Backed out changeset 3cead4149e6b (bug 1877792)
Backed out changeset d73a9f57f03c (bug 1877792)
Backed out changeset 82a58a80f58a (bug 1877792)
Backed out changeset 4c7182604e4f (bug 1877792)
2024-08-22 19:23:15 +03:00
Jonatan Klemets 4f0c793a69 Bug 1877792 - Part 15: Skip ExposeScriptToDebugger/UpdateDebugMetadata for synthetic modules r=spidermonkey-reviewers,jonco
Differential Revision: https://phabricator.services.mozilla.com/D218562
2024-08-22 14:21:54 +00:00
Jonatan Klemets 8fcdc93c58 Bug 1877792 - Part 14: Return early in ModuleLoaderBase::ResolveRequestedModules for synthetic modules r=spidermonkey-reviewers,jonco
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
2024-08-22 14:21:53 +00:00