Commit Graph
108 Commits
Author SHA1 Message Date
Tooru Fujisawa dfc61e3c96 Bug 2031200 - Part 12: Remove ModuleScript::mForPreload. r=allstarschh
Differential Revision: https://phabricator.services.mozilla.com/D295268
2026-04-22 04:12:47 +00:00
Alexandru Marc bcdf79e032 Revert "Bug 2031200 - Part 12: Remove ModuleScript::mForPreload. r=allstarschh" for causing hazard bustages @ ModuleLoaderBase
This reverts commit 260ad06a2e.

Revert "Bug 2031200 - Part 11: Repurpose LoadedScript::mReferrerPolicy for the cached case. r=bthrall"

This reverts commit cedffcba4e.

Revert "Bug 2031200 - Part 10: Repurpose LoadedScript::mBaseURL for the cached case. r=bthrall"

This reverts commit a4fd83ce4d.

Revert "Bug 2031200 - Part 9: Add ScriptLoadRequest::FetchOptions() accessor and remove LoadedScript::mFetchOptions. r=bthrall"

This reverts commit 66bc9492b3.

Revert "Bug 2031200 - Part 8: Remove ScriptHashKey constructor with LoadedScript. r=bthrall"

This reverts commit 5bb4928c8f.

Revert "Bug 2031200 - Part 7: Use ScriptFetchInfo for the script private and module private instead of LoadedScript. r=bthrall,allstarschh,dom-worker-reviewers,asuth"

This reverts commit 0011dfbdcc.

Revert "Bug 2031200 - Part 6: Do not pass private value to JS::UpdateDebugMetadata. r=bthrall"

This reverts commit 0e8a2f1032.

Revert "Bug 2031200 - Part 5: Sync ModuleScript::mForPreload and ScriptFetchInfo::mIsForModulePreload. r=bthrall"

This reverts commit 0f69b1fb94.

Revert "Bug 2031200 - Part 4: Sync LoadedScript::mBaseURL and ScriptFetchInfo::mBaseURL. r=bthrall,dom-worker-reviewers,asuth"

This reverts commit 472f447c9e.

Revert "Bug 2031200 - Part 3: Sync LoadedScript::mReferrerPolicy and ScriptFetchInfo::mReferrerPolicy. r=bthrall"

This reverts commit b5410280f5.

Revert "Bug 2031200 - Part 2: Remove obsolete code to sync the exact same field. r=bthrall"

This reverts commit 2b784b6e6f.

Revert "Bug 2031200 - Part 1: Add ScriptFetchInfo class and ScriptLoadRequest::mFetchInfo field. r=bthrall"

This reverts commit fc8d3b6c48.
2026-04-21 21:28:08 +00:00
Tooru Fujisawa 260ad06a2e Bug 2031200 - Part 12: Remove ModuleScript::mForPreload. r=allstarschh
Differential Revision: https://phabricator.services.mozilla.com/D295268
2026-04-21 15:58:17 +00:00
Sylvestre Ledru d2b4f9d727 Bug 2023419 - Remove Emacs/Vim modelines from js/ r=emilio,nbp
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287851
2026-04-03 07:40:15 +00:00
Alexandru Marc c565130f5c Revert "Bug 2023419 - Remove Emacs/Vim modelines from js/ r=emilio,nbp" for causing SM bustages @ Debugger-findScripts-12.js
This reverts commit 631e966bff.
2026-03-17 16:04:32 +00:00
Sylvestre Ledru 631e966bff Bug 2023419 - Remove Emacs/Vim modelines from js/ r=emilio,nbp
replaced by .editorconfig

Differential Revision: https://phabricator.services.mozilla.com/D287851
2026-03-17 15:44:27 +00:00
Yoshi Cheng-Hao Huang ac6a7c224d Bug 1916277 - Part 8: Set mIsPreload to true for non-top-level modules. r=jonco
Currently Gecko only set mIsPreload to true for the top-level preloading
load. To identify a non-top-level preload, update mIsPreload accordingly
to match the mIsPreload flag from the root module.

Differential Revision: https://phabricator.services.mozilla.com/D281154
2026-03-03 00:52:45 +00:00
Yoshi Cheng-Hao Huang 308e3ec2f1 Bug 2009280 : Relax !IsDynamicImport() assertion for error to rethrow. r=jonco
Per spec, [[ErrorToRethrow]] is only set for static imports and
top-level modules [1].  Accordingly, an assertion was added to require
non-dynamic imports when hasRethrow is true.

However, during a dynamic import, if the module script has already been
fetched, the cached module is returned (See HTML “fetch a single module
script”, step 6) [2]. In that case, a previously fetched module may already
carry [[ErrorToRethrow]], and this value is propagated to the dynamic
import.

This causes the assertion to fire for valid dynamic-import behavior. The
assertion is therefore incorrect and must be removed.

[1]: https://html.spec.whatwg.org/#fetch-the-descendants-of-and-link-a-module-script
[2]: https://html.spec.whatwg.org/#fetch-a-single-module-script

Differential Revision: https://phabricator.services.mozilla.com/D278670
2026-01-14 00:01:38 +00:00
Tooru Fujisawa 40dcf63aa3 Bug 1991607 - Part 12: Reorder ScriptLoadRequest/ModuleLoadRequest fields. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D267361
2025-10-22 11:21:04 +00:00
Tooru Fujisawa cde6c638b3 Bug 1991607 - Part 10: Remove ScriptLoadRequest::mURI. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267359
2025-10-22 11:20:59 +00:00
Tooru Fujisawa 9cd82d3aa1 Bug 1991607 - Part 8: Remove ScriptLoadRequest::mFetchOptions. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267357
2025-10-22 11:20:53 +00:00
Tooru Fujisawa 37731eea18 Bug 1991607 - Part 6: Remove ScriptLoadRequest::mReferrerPolicy. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267355
2025-10-22 11:20:48 +00:00
Atila Butkovits 13ff5f1bad Revert "Bug 1991607 - Part 12: Reorder ScriptLoadRequest/ModuleLoadRequest fields. r=bthrall" for causing bustages at LoadedScript.cpp.
This reverts commit 30499d5cdc.

Revert "Bug 1991607 - Part 11: Remove ScriptLoadRequest::mBaseURL. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit 85324622ab.

Revert "Bug 1991607 - Part 10: Remove ScriptLoadRequest::mURI. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit 3b1afd5ca0.

Revert "Bug 1991607 - Part 9: Pass URI to LoadedScript ctor from ScriptLoadRequest ctor callsites. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit 10dc4e2bc0.

Revert "Bug 1991607 - Part 8: Remove ScriptLoadRequest::mFetchOptions. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit b4c09eb6e1.

Revert "Bug 1991607 - Part 7: Pass FetchOptions to LoadedScript ctor from ScriptLoadRequest ctor callsites. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit f48d2160e1.

Revert "Bug 1991607 - Part 6: Remove ScriptLoadRequest::mReferrerPolicy. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit a6901c3f1d.

Revert "Bug 1991607 - Part 5: Pass ReferrerPolicy to LoadedScript ctor from ScriptLoadRequest ctor callsites. r=bthrall,dom-worker-reviewers,edenchuang"

This reverts commit c2b5cb885a.

Revert "Bug 1991607 - Part 4: Add ImportMapScript subclass for LoadedScript. r=bthrall"

This reverts commit 09b8ae44b8.

Revert "Bug 1991607 - Part 3: Make LoadedScript::mKind field const. r=bthrall"

This reverts commit 3eebccc479.

Revert "Bug 1991607 - Part 2: Let ScriptLoader::CheckContentPolicy receive LoadedScript-related parameters separately. r=bthrall"

This reverts commit dd8530cb71.

Revert "Bug 1991607 - Part 1: Let ScriptHashKey and ScriptLoadData receive LoadedScript-related parameters separately. r=bthrall"

This reverts commit b4a4f94096.
2025-10-22 05:40:38 +00:00
Tooru Fujisawa 30499d5cdc Bug 1991607 - Part 12: Reorder ScriptLoadRequest/ModuleLoadRequest fields. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D267361
2025-10-22 04:38:23 +00:00
Tooru Fujisawa 3b1afd5ca0 Bug 1991607 - Part 10: Remove ScriptLoadRequest::mURI. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267359
2025-10-22 04:38:17 +00:00
Tooru Fujisawa b4c09eb6e1 Bug 1991607 - Part 8: Remove ScriptLoadRequest::mFetchOptions. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267357
2025-10-22 04:38:11 +00:00
Tooru Fujisawa a6901c3f1d Bug 1991607 - Part 6: Remove ScriptLoadRequest::mReferrerPolicy. r=bthrall,dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D267355
2025-10-22 04:38:06 +00:00
Tooru Fujisawa 30f36a59be Bug 1991734 - Part 2: Remove unused PendingFetchingError state. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D267096
2025-10-22 01:32:30 +00:00
Tooru Fujisawa 63333e6ccd Bug 1991358 - Part 2: Remove ScriptLoadRequest::mScriptForCache. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266619
2025-10-20 11:49:52 +00:00
Lando ea9361e474 Merge mozilla-central to autoland 2025-10-08 13:01:19 +00:00
Serban Stanca 713fa52191 Revert "Bug 1991370, Bug 1991380, Bug 1991358, Bug 1991081 - Part 4: Use FrontendContext-based EncodeStencil in ScriptPreloader. r=bthrall" for causing multiple bugs.
This reverts commit b1f784aebb.

This reverts commit 7f4d0b5564.

This reverts commit 7292c33902.

This reverts commit cbe156f214.

This reverts commit 3412fc5535.

This reverts commit 1b08161b6d.

This reverts commit d0cf6f5210.

This reverts commit da56ddfb2f.

This reverts commit 926bbd302a.

This reverts commit 8c38c4c093.

This reverts commit d6475781cd.

This reverts commit 8044e8dae9.

This reverts commit a3149ca9dd.

This reverts commit eca472223f.

This reverts commit 6bc2703f1a.
2025-10-08 12:57:20 +00:00
Yoshi Cheng-Hao Huang 4e61329ac0 Bug 1992588 - Align error handling with the HTML spec when loading imported module scripts. r=jonco,frontend-codestyle-reviewers
According to the spec, a ThrowCompletion should be performed if the module
script is null or has a parse error.
See https://html.spec.whatwg.org/#hostloadimportedmodule:fetch-a-single-imported-module-script
Step 14.

So this patch reverts ModuleLoadRequest::IsErrored() update in https://phabricator.services.mozilla.com/D264807

Additionally, a spec issue has been filed to clarify whether an error to
rethrow should also be treated as a ThrowCompletion:
https://github.com/whatwg/html/issues/11755

Differential Revision: https://phabricator.services.mozilla.com/D267603
2025-10-08 08:37:57 +00:00
Yoshi Cheng-Hao Huang 8b743b6a79 Bug 1968890 - Part 7: Add Cancel method. r=jonco
Triggers FinishLoadingImportedModule in Cancel() to prevent memory leak.

Differential Revision: https://phabricator.services.mozilla.com/D264809
2025-10-03 21:52:32 +00:00
Yoshi Cheng-Hao Huang 1e5ddf19cf Bug 1968890 - Part 5: Add ModuleLoadRequest::SetErroredLoadingImports(). r=jonco
To indicate the loading error for a top-level of the module from the dynamic import
is successfully fetched and parsed, but one of its dependencies fails to fetch
or compile.

//Example
import("a.mjs");

// a.mjs
import "./404.mjs";

This patch allows the ModuleLoadRequest::IsErrored() for "a.mjs" returns
true.

Differential Revision: https://phabricator.services.mozilla.com/D264807
2025-10-03 21:52:24 +00:00
Yoshi Cheng-Hao Huang c4ba35eab1 Bug 1968890 - Part 3: Call ModuleErrored in OnFetchFailed. r=jonco
Update the state of the ModuleLoadRequest in OnFetchFailed.

Differential Revision: https://phabricator.services.mozilla.com/D264805
2025-10-03 21:52:17 +00:00
Yoshi Cheng-Hao Huang 982b4fcd35 Bug 1968890 - Part 1: Dynamic import is not a top-level request. r=jonco,dom-worker-reviewers,edenchuang
According to the spec, requests created in HostLoadImportedModule have
the isTopLevel flag set to false. This means both static and dynamic
import requests should also have this flag set to false.

[HostLoadImportedModule](https://html.spec.whatwg.org/#hostloadimportedmodule)
Step 14. Fetch a single imported module script ...

[Fetch a single imported module script](https://html.spec.whatwg.org/#fetch-a-single-imported-module-script)
Step 4. Fetch a single module script given url, fetchClient, destination, options, settingsObject, referrer, moduleRequest, false, and onComplete.

The false argument in the second-to-last parameter of 'Fetch a single
module script' corresponds to the top-levl flag.

[Fetch a single module script](https://html.spec.whatwg.org/#fetch-a-single-module-script)
given a URL url, an environment settings object fetchClient, a
destination destination, a script fetch options options, an environment
settings object settingsObject, a referrer referrer, an optional
ModuleRequest Record moduleRequest, a boolean isTopLevel, an algorithm
onComplete,

The spec was updated in https://github.com/whatwg/html/issues/7996. We’re
updating the implementation to reflect this change.

Differential Revision: https://phabricator.services.mozilla.com/D265593
2025-10-03 21:52:09 +00:00
Tooru Fujisawa d0cf6f5210 Bug 1991358 - Part 2: Remove ScriptLoadRequest::mScriptForCache. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266619
2025-10-02 03:28:46 +00:00
Cristina Horotan 82cca9c5e0 Revert "Bug 1991380, Bug 1991358 - Remove MarkedForCache state from the caching plan. r=nbp" for causing build bustages
This reverts commit fbc2c40121.

Revert "Bug 1991358 - Part 3: Remove ScriptLoadRequest::MarkScriptForCache and ModuleLoadRequest::MarkModuleForCache. r=nbp"

This reverts commit ebec92d70e.

Revert "Bug 1991358 - Part 2: Remove ScriptLoadRequest::mScriptForCache. r=nbp"

This reverts commit f9e1c5eb8c.

Revert "Bug 1991358 - Part 1: Stop performing JS::FinishCollectingDelazifications/JS::AbortCollectingDelazifications. r=nbp"

This reverts commit 7fa3a4ebaf.
2025-10-01 11:03:26 +00:00
Tooru Fujisawa f9e1c5eb8c Bug 1991358 - Part 2: Remove ScriptLoadRequest::mScriptForCache. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266619
2025-10-01 09:58:46 +00:00
Alexandru Marc 17032d74be Revert "Bug 1968890 - Part 9: Add test for dynamic import. r=jonco" as potential cause of javascript engine crashes (bug 1991268)
This reverts commit c6e5d9e61c.

Revert "Bug 1968890 - Part 8: Remove FinishDynamicImportAndReject. r=jonco"

This reverts commit 0c71c535fc.

Revert "Bug 1968890 - Part 7: Add Cancel method. r=jonco"

This reverts commit 4efb29fcff.

Revert "Bug 1968890 - Part 6: ScriptLoaders update. r=jonco,dom-worker-reviewers,edenchuang"

This reverts commit 0bd0adafd8.

Revert "Bug 1968890 - Part 5: Add ModuleLoadRequest::SetErroredLoadingImports(). r=jonco"

This reverts commit 36f140b26b.

Revert "Bug 1968890 - Part 4: Handle Dynamic import in LoadRequestedModulesRejected. r=jonco"

This reverts commit 3837c393b5.

Revert "Bug 1968890 - Part 3: Call ModuleErrored in OnFetchFailed. r=jonco"

This reverts commit 33105bfe8d.

Revert "Bug 1968890 - Part 2: Handle dynamic import in OnFetchFailed. r=jonco"

This reverts commit 4396212837.

Revert "Bug 1968890 - Part 1: Dynamic import is not a top-level request. r=jonco,dom-worker-reviewers,edenchuang"

This reverts commit 43e95dfc62.
2025-09-27 09:31:04 +00:00
Yoshi Cheng-Hao Huang 4efb29fcff Bug 1968890 - Part 7: Add Cancel method. r=jonco
Triggers FinishLoadingImportedModule in Cancel() to prevent memory leak.

Differential Revision: https://phabricator.services.mozilla.com/D264809
2025-09-26 06:47:34 +00:00
Yoshi Cheng-Hao Huang 36f140b26b Bug 1968890 - Part 5: Add ModuleLoadRequest::SetErroredLoadingImports(). r=jonco
To indicate the loading error for a top-level of the module from the dynamic import
is successfully fetched and parsed, but one of its dependencies fails to fetch
or compile.

//Example
import("a.mjs");

// a.mjs
import "./404.mjs";

This patch allows the ModuleLoadRequest::IsErrored() for "a.mjs" returns
true.

Differential Revision: https://phabricator.services.mozilla.com/D264807
2025-09-26 06:47:28 +00:00
Yoshi Cheng-Hao Huang 33105bfe8d Bug 1968890 - Part 3: Call ModuleErrored in OnFetchFailed. r=jonco
Update the state of the ModuleLoadRequest in OnFetchFailed.

Differential Revision: https://phabricator.services.mozilla.com/D264805
2025-09-26 06:47:22 +00:00
Yoshi Cheng-Hao Huang 43e95dfc62 Bug 1968890 - Part 1: Dynamic import is not a top-level request. r=jonco,dom-worker-reviewers,edenchuang
According to the spec, requests created in HostLoadImportedModule have
the isTopLevel flag set to false. This means both static and dynamic
import requests should also have this flag set to false.

[HostLoadImportedModule](https://html.spec.whatwg.org/#hostloadimportedmodule)
Step 14. Fetch a single imported module script ...

[Fetch a single imported module script](https://html.spec.whatwg.org/#fetch-a-single-imported-module-script)
Step 4. Fetch a single module script given url, fetchClient, destination, options, settingsObject, referrer, moduleRequest, false, and onComplete.

The false argument in the second-to-last parameter of 'Fetch a single
module script' corresponds to the top-levl flag.

[Fetch a single module script](https://html.spec.whatwg.org/#fetch-a-single-module-script)
given a URL url, an environment settings object fetchClient, a
destination destination, a script fetch options options, an environment
settings object settingsObject, a referrer referrer, an optional
ModuleRequest Record moduleRequest, a boolean isTopLevel, an algorithm
onComplete,

The spec was updated in https://github.com/whatwg/html/issues/7996. We’re
updating the implementation to reflect this change.

Differential Revision: https://phabricator.services.mozilla.com/D265593
2025-09-26 06:47:16 +00:00
Alexandru Marc ea0e5ede0e Revert "Bug 1968890 - Part 9: Add test for dynamic import. r=jonco" for causing multiple wpt failures
This reverts commit 6126014923.

Revert "Bug 1968890 - Part 8: Remove FinishDynamicImportAndReject. r=jonco"

This reverts commit 111e590ac7.

Revert "Bug 1968890 - Part 7: Add Cancel method. r=jonco"

This reverts commit 6af0a75aa4.

Revert "Bug 1968890 - Part 6: ScriptLoaders update. r=jonco,dom-worker-reviewers,edenchuang"

This reverts commit 38def54b95.

Revert "Bug 1968890 - Part 5: Add ModuleLoadRequest::SetErroredLoadingImports(). r=jonco"

This reverts commit d3e0ec0a70.

Revert "Bug 1968890 - Part 4: Handle Dynamic import in LoadRequestedModulesRejected. r=jonco"

This reverts commit 59b34ef09e.

Revert "Bug 1968890 - Part 3: Call ModuleErrored in OnFetchFailed. r=jonco"

This reverts commit 3ef1571f6c.

Revert "Bug 1968890 - Part 2: Handle dynamic import in OnFetchFailed. r=jonco"

This reverts commit 4846001155.

Revert "Bug 1968890 - Part 1: Dynamic import is not a top-level request. r=jonco,dom-worker-reviewers,edenchuang"

This reverts commit 2f3764f5f6.
2025-09-25 02:50:52 +00:00
Yoshi Cheng-Hao Huang 6af0a75aa4 Bug 1968890 - Part 7: Add Cancel method. r=jonco
Triggers FinishLoadingImportedModule in Cancel() to prevent memory leak.

Differential Revision: https://phabricator.services.mozilla.com/D264809
2025-09-24 18:19:51 +00:00
Yoshi Cheng-Hao Huang d3e0ec0a70 Bug 1968890 - Part 5: Add ModuleLoadRequest::SetErroredLoadingImports(). r=jonco
To indicate the loading error for a top-level of the module from the dynamic import
is successfully fetched and parsed, but one of its dependencies fails to fetch
or compile.

//Example
import("a.mjs");

// a.mjs
import "./404.mjs";

This patch allows the ModuleLoadRequest::IsErrored() for "a.mjs" returns
true.

Differential Revision: https://phabricator.services.mozilla.com/D264807
2025-09-24 18:19:45 +00:00
Yoshi Cheng-Hao Huang 3ef1571f6c Bug 1968890 - Part 3: Call ModuleErrored in OnFetchFailed. r=jonco
Update the state of the ModuleLoadRequest in OnFetchFailed.

Differential Revision: https://phabricator.services.mozilla.com/D264805
2025-09-24 18:19:39 +00:00
Yoshi Cheng-Hao Huang 2f3764f5f6 Bug 1968890 - Part 1: Dynamic import is not a top-level request. r=jonco,dom-worker-reviewers,edenchuang
According to the spec, requests created in HostLoadImportedModule have
the isTopLevel flag set to false. This means both static and dynamic
import requests should also have this flag set to false.

[HostLoadImportedModule](https://html.spec.whatwg.org/#hostloadimportedmodule)
Step 14. Fetch a single imported module script ...

[Fetch a single imported module script](https://html.spec.whatwg.org/#fetch-a-single-imported-module-script)
Step 4. Fetch a single module script given url, fetchClient, destination, options, settingsObject, referrer, moduleRequest, false, and onComplete.

The false argument in the second-to-last parameter of 'Fetch a single
module script' corresponds to the top-levl flag.

[Fetch a single module script](https://html.spec.whatwg.org/#fetch-a-single-module-script)
given a URL url, an environment settings object fetchClient, a
destination destination, a script fetch options options, an environment
settings object settingsObject, a referrer referrer, an optional
ModuleRequest Record moduleRequest, a boolean isTopLevel, an algorithm
onComplete,

The spec was updated in https://github.com/whatwg/html/issues/7996. We’re
updating the implementation to reflect this change.

Differential Revision: https://phabricator.services.mozilla.com/D265593
2025-09-24 18:19:33 +00:00
Yoshi Cheng-Hao Huang 374f6ffb24 Bug 1968895 - Part 6: Replace CreateStaticImport/CreateDynamicImport with CreateRequest. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D263375
2025-09-07 09:03:55 +00:00
Cristina Horotan 1fe1c12f6e Revert "Bug 1968895: apply code formatting via Lando" for causing SM failures on Value.h
This reverts commit 40010a7da7.

Revert "Bug 1968895 - Part 7: Remove StartFetchingModuleAndDependencies. r=jonco"

This reverts commit 816a0a6015.

Revert "Bug 1968895 - Part 6: Replace CreateStaticImport/CreateDynamicImport with CreateRequest. r=jonco"

This reverts commit e29a957535.

Revert "Bug 1968895 - Part 5: Add CreateDefaultScriptFetchOptions and GetClientReferrerURI. r=jonco"

This reverts commit 4b21d41ec1.

Revert "Bug 1968895 - Part 4: Pass null for referrer in shadow realm import value. r=jonco"

This reverts commit a3417dbe89.

Revert "Bug 1968895 - Part 3: Update ModuleLoadRequest's referrer policy for workers. r=jonco"

This reverts commit 6a28639be8.

Revert "Bug 1968895 - Part 2: Pass BaseURL for static/dynamic import. r=jonco"

This reverts commit dab430a7b4.

Revert "Bug 1968895 - Part 1: Check if dynamic import is supported earlier. r=jonco"

This reverts commit 34f67fd697.
2025-09-03 18:44:42 +00:00
Yoshi Cheng-Hao Huang e29a957535 Bug 1968895 - Part 6: Replace CreateStaticImport/CreateDynamicImport with CreateRequest. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D263375
2025-09-03 17:58:52 +00:00
Jon Coppeard bc5f405136 Bug 1968870 - Part 4: Remove use of referencing private in browser module loader r=allstarschh
Differential Revision: https://phabricator.services.mozilla.com/D260945
2025-08-14 06:35:39 +00:00
Jon Coppeard 84fafeaa92 Bug 1968870 - Part 1: Pass referrer as script rather than object r=allstarschh
Previously we passed the module object for modules and nullptr for other cases.
This patch makes it so we pass the script for both module and classic script
referrers, and nullptr for the realm case.

Differential Revision: https://phabricator.services.mozilla.com/D260942
2025-08-14 06:35:28 +00:00
Jon Coppeard d7ab3e3d21 Bug 1982328 - Part 14: Remove ModuleLoadRequest::mDynamicPromise and use mPayload for this r=allstarschh
Differential Revision: https://phabricator.services.mozilla.com/D260677
2025-08-13 14:17:18 +00:00
Jon Coppeard 1da8e1557e Bug 1982328 - Part 13: Remove unused fields ModuleLoadRequest::mDynamicReferencingScript and mDynamicSpecifier r=allstarschh
Differential Revision: https://phabricator.services.mozilla.com/D260676
2025-08-13 14:17:14 +00:00
Jon Coppeard a6a27c7090 Bug 1982328 - Part 12: Rename ModuleLoadRequest::mStatePrivate to mPayload r=allstarschh
Differential Revision: https://phabricator.services.mozilla.com/D260675
2025-08-13 14:17:10 +00:00
Jon Coppeard 5f0809ace8 Bug 1982328 - Part 11: Remove use of unnecessary JS namespace prefix in the module loader r=allstarschh
We're already in the JS namespace here so this is not necessary.

Differential Revision: https://phabricator.services.mozilla.com/D260674
2025-08-13 14:17:06 +00:00
Yoshi Cheng-Hao Huang 264c8307be 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-22 18:29:34 +00:00
Yoshi Cheng-Hao Huang 33d4e771ca Bug 1820594 - Part 23: Error handling when module fetching failed. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D228860
2025-07-22 18:29:22 +00:00