Commit Graph
366 Commits
Author SHA1 Message Date
Tooru Fujisawa 607f48b4b6 Bug 2031614 - Use LoadedScript::mURI instead of LoadedScript::mBaseURL in Cu.loadedESModules. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D294116
2026-04-15 03:29:39 +00:00
Tooru Fujisawa ebd63c667c Bug 2031573 - Pass the module record instead of the module private to the ModuleMetadataHook. r=allstarschh
Differential Revision: https://phabricator.services.mozilla.com/D294105
2026-04-14 15:26:54 +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
Yoshi Cheng-Hao Huang 519cd1caab Bug 2027541 - Patch. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D291467
2026-04-02 19:36:22 +00:00
Emilio Cobos Álvarez 5016086e1a Bug 2025089 - Remove some includes from nsINode.h and Element.h. r=dom-core,dom-storage-reviewers,firefox-svg-reviewers,janv,smaug
Differential Revision: https://phabricator.services.mozilla.com/D289049
2026-03-22 23:45:55 +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 4545802714 Bug 1916277 - Part 14: Fetching/Fetched module maps update. r=jonco
Cancel preloading requests, regardless the pref is on or off.

When the pref is on (multiple import maps is enabled), mFetchedModules
may contain module scripts that have been fetched during normal loading,
therefore we don't update it.

Differential Revision: https://phabricator.services.mozilla.com/D275179
2026-03-03 00:52:58 +00:00
Yoshi Cheng-Hao Huang 2ed834694e Bug 1916277 - Part 13: Reset preloaded module graphs before registering an import map. r=jonco
When registering an import map, we must remove any preloaded scripts
because their resolved URLs may no longer be valid under the new import
map.

Differential Revision: https://phabricator.services.mozilla.com/D272783
2026-03-03 00:52:56 +00:00
Yoshi Cheng-Hao Huang f10f564f7b Bug 1916277 - Part 11: Add preloaded specifiers into global's resolved set. r=jonco
When the preloaded request is reused during parsing, merge the preloaded
resolved module set into the global resolved module set to ensure consistency.

Differential Revision: https://phabricator.services.mozilla.com/D275178
2026-03-03 00:52:52 +00:00
Yoshi Cheng-Hao Huang 8377cfe15c Bug 1916277 - Part 10: Add a debug slot [[IsPreload]] in ModuleObject. r=jonco
This will allow us to identify the module is loaded during preloading
phase.

Differential Revision: https://phabricator.services.mozilla.com/D281155
2026-03-03 00:52:49 +00:00
Yoshi Cheng-Hao Huang 14a186766a Bug 1916277 - Part 9: Store Preloaded resolved set in the root moduleScript. r=jonco
Allocate a ResolvedModuleSet in the top-level preloading module script, and
use the `aHostDefined` parameter in HostLoadImportedModule to get the
corresponding preloaded ResolvedModuleSet.

Differential Revision: https://phabricator.services.mozilla.com/D272782
2026-03-03 00:52:47 +00:00
Yoshi Cheng-Hao Huang 2e020fb841 Bug 1916277 - Part 7: Implement ImportMap::Merge. r=jonco,flod
Implement https://html.spec.whatwg.org/#merge-existing-and-new-import-maps

Differential Revision: https://phabricator.services.mozilla.com/D272781
2026-03-03 00:52:43 +00:00
Yoshi Cheng-Hao Huang b267594cfd Bug 1916277 - Part 6: Implement AddToResolvedModuleSet to complete the 'resolve a module specifier' per spec. r=jonco
The addition is performed after resolution so that resolved specifiers
can be processed more easily, particularly for preload requests. This
change also refactors the return value of ResolvedModuleSpecifier to use
a SpecifierResolutionRecord instead.

Differential Revision: https://phabricator.services.mozilla.com/D272779
2026-03-03 00:52:40 +00:00
Yoshi Cheng-Hao Huang ada725c0a3 Bug 1916277 - Part 5: Update RegisterImportMap. r=jonco
Add a request parameter to construct the ReportWarningHelper.

Differential Revision: https://phabricator.services.mozilla.com/D272780
2026-03-03 00:52:38 +00:00
Tooru Fujisawa bf1873b928 Bug 2019262 - Propagate the error status of the modules from/to SyncModuleLoader, to avoid importing single module twice even for error case. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D285311
2026-03-02 14:02:03 +00:00
Matthew Gaudet 0b02c4cf28 Bug 2010911 - Cleanup PromiseJobRunnable r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D279353
2026-01-19 16:09:09 +00:00
Tooru Fujisawa 2613218569 Bug 2002199 - Part 4: Remove LoadedScriptDelegate::ClearScriptSource. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D273971
2025-12-02 01:28:17 +00:00
Tooru Fujisawa fb06302042 Bug 1907011 - Part 7: Update the most of the remaining usage of "bytecode" and update document. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D273960
2025-11-26 04:13:26 +00:00
Harveer Singh 19e9ef1bce Bug 1995558: Service worker module registration should be rejected in case of any evaluation errors.r=edenchuang,dom-worker-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D269457
2025-11-14 15:55:52 +00:00
Lando ce8566cc91 Merge mozilla-central to autoland 2025-11-05 10:33:44 +00:00
Narcis Beleuzu 88121de0cc Revert "Bug 1360870, 1989386, 1990925, 1995558: apply code formatting via Lando" for causing the macOS top crash in Bug 1998332
This reverts commit fdacf289d5.

This reverts commit 5f838f6b5a.

This reverts commit a9ff68075f.

This reverts commit 92013428c4.

This reverts commit 62795c77d7.

This reverts commit 9e90e5f01e.

This reverts commit f8438fb258.

This reverts commit f7f43476a2.
2025-11-05 10:27:55 +00:00
Tooru Fujisawa 4a904c5804 Bug 1973221 - Part 1: Support disk cache for dynamic import. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D271030
2025-11-05 04:12:21 +00:00
Harveer Singh a9ff68075f Bug 1995558: Service worker module registration should be rejected in case of any evaluation errors.r=edenchuang,dom-worker-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D269457
2025-11-04 01:23:53 +00:00
Cristina Horotan 3880a52dfd Revert "Bug 1360870, Bug 1989386, Bug 1990925, Bug 1995558: Test changes.r=edenchuang,dom-worker-reviewers" for causing dt failures on browser_webconsole_json_mime.js
This reverts commit 7604e737be.

Revert "Bug 1995558: Service worker module registration should be rejected in case of any evaluation errors.r=edenchuang,dom-worker-reviewers"

This reverts commit ac602ed98c.

Revert "Bug 1990925: Module service workers should be able to load json modules.r=edenchuang,dom-worker-reviewers"

This reverts commit dc6f670880.

Revert "Bug 1989386: Correctly update serviceworker type on re-registration.r=edenchuang,dom-worker-reviewers"

This reverts commit bd63d6b6d0.

Revert "Bug 1360870: on-disk schema changes to persist new serviceworker type parameter.r=edenchuang,dom-worker-reviewers"

This reverts commit 9f740083c9.

Revert "Bug 1360870: Some source code plumbing and refactorings to support new serviceworker type.r=edenchuang,dom-worker-reviewers"

This reverts commit e813c3de2f.

Revert "Bug 1360870: idl changes to support module service workers.r=asuth,edenchuang,webidl,smaug,dom-worker-reviewers"

This reverts commit 2b4f2ed60e.
2025-11-03 01:32:20 +00:00
Harveer Singh ac602ed98c Bug 1995558: Service worker module registration should be rejected in case of any evaluation errors.r=edenchuang,dom-worker-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D269457
2025-11-02 14:16:16 +00:00
Tooru Fujisawa b1c9db5a25 Bug 1996160 - Part 1: Use observer notifications for ScriptLoader tests. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D270110
2025-10-29 23:32:13 +00:00
Atila Butkovits 285b305de4 Revert "Bug 1360870, Bug 1995558, Bug 1990925, Bug 1989386: Test changes.r=edenchuang,dom-worker-reviewers" for causing failures at browser_dbg-browser-toolbox-workers.js.
This reverts commit 5308d85d13.

Revert "Bug 1995558: Service worker module registration should be rejected in case of any evaluation errors.r=edenchuang,dom-worker-reviewers"

This reverts commit 262e9c7f22.

Revert "Bug 1990925: Module service workers should be able to load json modules.r=edenchuang,dom-worker-reviewers"

This reverts commit 5e00fd86aa.

Revert "Bug 1989386: Correctly update serviceworker type on re-registration.r=edenchuang,dom-worker-reviewers"

This reverts commit 137e22f440.

Revert "Bug 1360870: on-disk schema changes to persist new serviceworker type parameter.r=edenchuang,dom-worker-reviewers"

This reverts commit bf551670f4.

Revert "Bug 1360870: Some source code plumbing and refactorings to support new serviceworker type.r=edenchuang,dom-worker-reviewers"

This reverts commit 040663a23b.

Revert "Bug 1360870: idl changes to support module service workers.r=asuth,edenchuang,webidl,smaug,dom-worker-reviewers"

This reverts commit c8854f0a27.
2025-10-29 22:04:28 +00:00
Harveer Singh 262e9c7f22 Bug 1995558: Service worker module registration should be rejected in case of any evaluation errors.r=edenchuang,dom-worker-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D269457
2025-10-29 20:34:08 +00:00
Yoshi Cheng-Hao Huang 444f24047f Bug 1968885 - Part 2: Remove ResolveRequestedModules. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D269567
2025-10-23 08:50:12 +00:00
Yoshi Cheng-Hao Huang 3d14ba2824 Bug 1968885 - Part 1: Pass lineNo and columnNo to HostLoadImportedModule. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D269566
2025-10-23 08:50:10 +00:00
Tooru Fujisawa 32c285e820 Bug 1992341 - Part 6: Update the method names and comments. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D269523
2025-10-23 04:19:20 +00:00
Tooru Fujisawa 3cab1a6f1a Bug 1991607 - Part 11: Remove ScriptLoadRequest::mBaseURL. r=bthrall,dom-worker-reviewers,edenchuang
In contrast to other fields, mBaseURL is not populated in the constructors.
Thus we just need to remove the ScriptLoadRequest::mBaseURL field and
use the LoadedScript::mBaseURL instead.

Differential Revision: https://phabricator.services.mozilla.com/D267360
2025-10-22 11:21:01 +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
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 85324622ab Bug 1991607 - Part 11: Remove ScriptLoadRequest::mBaseURL. r=bthrall,dom-worker-reviewers,edenchuang
In contrast to other fields, mBaseURL is not populated in the constructors.
Thus we just need to remove the ScriptLoadRequest::mBaseURL field and
use the LoadedScript::mBaseURL instead.

Differential Revision: https://phabricator.services.mozilla.com/D267360
2025-10-22 04:38:20 +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 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 75ecc00217 Bug 1991380 - Remove MarkedForCache state from the caching plan. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266621
2025-10-20 17:48:28 +00:00
Tooru Fujisawa 1257f9e671 Bug 1991081 - Part 1: Rename Stencil variant to CachedStencil in LoadedScript. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266610
2025-10-16 09:05:36 +00:00
agoloman 3352c88229 Revert "Bug 1991081 - Part 7: Rewrite EncodeBytecodeAndSave with LoadedScript. r=nbp" for causing failures @LoadedScript.h.
This reverts commit b10b7c8add.

Revert "Bug 1991081 - Part 6: Remove testing-only events from EncodeBytecodeAndSave. r=nbp"

This reverts commit caf275708e.

Revert "Bug 1991081 - Part 5: Use single field for SRI and optional bytecode, for bytecode case and for cached stencil case. r=nbp"

This reverts commit 86631a6e10.

Revert "Bug 1991081 - Part 4: Use LoadedScript for logging in EncodeBytecodeAndSave. r=nbp"

This reverts commit 0f9d7f11e8.

Revert "Bug 1991081 - Part 3: Store nsICacheInfoChannel to LoadedScript also in text and bytecode variants. r=nbp"

This reverts commit 370f5bcd48.

Revert "Bug 1991081 - Part 2: Store stencil to LoadedScript also in text and bytecode variants. r=nbp"

This reverts commit 7eaf4f425f.

Revert "Bug 1991081 - Part 1: Rename Stencil variant to CachedStencil in LoadedScript. r=nbp"

This reverts commit a7a6ce8f6f.
2025-10-15 13:30:07 +00:00
Tooru Fujisawa a7a6ce8f6f Bug 1991081 - Part 1: Rename Stencil variant to CachedStencil in LoadedScript. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266610
2025-10-15 09:44:04 +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
Tooru Fujisawa 3412fc5535 Bug 1991380 - Remove MarkedForCache state from the caching plan. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D266621
2025-10-08 04:07:00 +00:00
Yoshi Cheng-Hao Huang 2dbf29e59b Bug 1968890 - Part 10: Check if the request has been canceled in reject handler. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D267274
2025-10-03 21:52:43 +00:00
Yoshi Cheng-Hao Huang 08904835b8 Bug 1968890 - Part 8: Remove FinishDynamicImportAndReject. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D264810
2025-10-03 21:52:36 +00:00