Commit Graph
227 Commits
Author SHA1 Message Date
Tooru Fujisawa 83c3d50d82 Bug 2031200 - Part 7: Use ScriptFetchInfo for the script private and module private instead of LoadedScript. r=bthrall,allstarschh,dom-worker-reviewers,asuth
Replace the all places that stores and uses the script/module private to use
ScriptFetchInfo instead of LoadedScript/ModuleScript, so that the
LoadedScript/ModuleScript can be released earlier.

Differential Revision: https://phabricator.services.mozilla.com/D294339
2026-04-22 04:12:30 +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 0011dfbdcc Bug 2031200 - Part 7: Use ScriptFetchInfo for the script private and module private instead of LoadedScript. r=bthrall,allstarschh,dom-worker-reviewers,asuth
Replace the all places that stores and uses the script/module private to use
ScriptFetchInfo instead of LoadedScript/ModuleScript, so that the
LoadedScript/ModuleScript can be released earlier.

Differential Revision: https://phabricator.services.mozilla.com/D294339
2026-04-21 15:57:59 +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
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 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 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 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
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
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
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
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
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 548979d573 Bug 1968890 - Part 4: Handle Dynamic import in LoadRequestedModulesRejected. r=jonco
Reject the dynamic import when the LoadRequestedModules fails.

Differential Revision: https://phabricator.services.mozilla.com/D264806
2025-10-03 21:52:21 +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 0c71c535fc Bug 1968890 - Part 8: Remove FinishDynamicImportAndReject. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D264810
2025-09-26 06:47:37 +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 3837c393b5 Bug 1968890 - Part 4: Handle Dynamic import in LoadRequestedModulesRejected. r=jonco
Reject the dynamic import when the LoadRequestedModules fails.

Differential Revision: https://phabricator.services.mozilla.com/D264806
2025-09-26 06:47:25 +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 111e590ac7 Bug 1968890 - Part 8: Remove FinishDynamicImportAndReject. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D264810
2025-09-24 18:19:54 +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 59b34ef09e Bug 1968890 - Part 4: Handle Dynamic import in LoadRequestedModulesRejected. r=jonco
Reject the dynamic import when the LoadRequestedModules fails.

Differential Revision: https://phabricator.services.mozilla.com/D264806
2025-09-24 18:19:42 +00:00
Lando 40c808e836 Bug 1720570: apply code formatting via Lando
# ignore-this-changeset
2025-09-15 21:24:36 +00:00
Daniel Minor 3fe727e5ed Bug 1720570 - Add support for css modules in ModuleLoader, WorkerModuleLoader and WorkletModuleLoader; r=allstarschh,dom-core,emilio,smaug
Differential Revision: https://phabricator.services.mozilla.com/D263414
2025-09-15 21:24:13 +00:00
Daniel Minor bec9f73c5c Bug 1720570 - Move ModuleTypeAllowed check into ModuleLoaderBase; r=allstarschh
CSS Modules are not supported in Workers and Worklets. This adds a
IsModuleTypeAllowed to ModuleLoaderBase so that the subclasses can
decide which modules are allowed.

Differential Revision: https://phabricator.services.mozilla.com/D263412
2025-09-15 21:24:05 +00:00
Alexandru Marc 982c15a70d Revert "Bug 1720570: apply code formatting via Lando" for causing build bustages @ ModuleLoaderBase.h
This reverts commit ba4e616475.

Revert "Bug 1720570 - Update web-platform test expectations; r=layout-reviewers,emilio"

This reverts commit 27214f9ae8.

Revert "Bug 1720570 - Use backgroundImage in relative-urls.html; r=layout-reviewers,emilio"

This reverts commit 97ec45d1db.

Revert "Bug 1720570 - Support fetching css module scripts; r=dom-core,smaug"

This reverts commit e54b57ec16.

Revert "Bug 1720570 - Add support for css modules in ModuleLoader, WorkerModuleLoader and WorkletModuleLoader; r=allstarschh,dom-core,emilio,smaug"

This reverts commit 2eb55b783d.

Revert "Bug 1720570 - Break out separate method to create constructed stylesheets; r=layout-reviewers,firefox-style-system-reviewers,emilio"

This reverts commit 2ccebf50bb.

Revert "Bug 1720570 - Move ModuleTypeAllowed check into ModuleLoaderBase; r=allstarschh"

This reverts commit 040b387d3e.

Revert "Bug 1720570 - Handle css module in GetModuleType; r=allstarschh"

This reverts commit 4b64b94cb1.

Revert "Bug 1720570 - Add CreateCssModule; r=allstarschh"

This reverts commit 3f20b1d5b7.

Revert "Bug 1720570 - Add ModuleType::CSS; r=allstarschh"

This reverts commit ef5e3a7151.

Revert "Bug 1720570 - Add pref for css module scripts; r=layout-reviewers,emilio"

This reverts commit 7a9b1fbac0.
2025-09-10 01:10:49 +00:00
Lando ba4e616475 Bug 1720570: apply code formatting via Lando
# ignore-this-changeset
2025-09-10 00:45:08 +00:00
Daniel Minor 2eb55b783d Bug 1720570 - Add support for css modules in ModuleLoader, WorkerModuleLoader and WorkletModuleLoader; r=allstarschh,dom-core,emilio,smaug
Differential Revision: https://phabricator.services.mozilla.com/D263414
2025-09-10 00:44:28 +00:00
Daniel Minor 040b387d3e Bug 1720570 - Move ModuleTypeAllowed check into ModuleLoaderBase; r=allstarschh
CSS Modules are not supported in Workers and Worklets. This adds a
IsModuleTypeAllowed to ModuleLoaderBase so that the subclasses can
decide which modules are allowed.

Differential Revision: https://phabricator.services.mozilla.com/D263412
2025-09-10 00:44:21 +00:00
Kelsey Gilbert 351b02d1e2 Bug 1958371 - Reduce header-header-includes of e.g. ScriptLoadRequest.h. r=mccr8,spidermonkey-reviewers,arai
Differential Revision: https://phabricator.services.mozilla.com/D244409
2025-09-09 19:03:45 +00:00
Atila Butkovits c5ace57d5c Revert "Bug 1720570: apply code formatting via Lando" for causing Hazard failures.
This reverts commit 8267f4ae14.

Revert "Bug 1720570 - Update web-platform test expectations; r=layout-reviewers,emilio"

This reverts commit 0a8f6facf2.

Revert "Bug 1720570 - Use backgroundImage in relative-urls.html; r=layout-reviewers,emilio"

This reverts commit 886bec571a.

Revert "Bug 1720570 - Support fetching css module scripts; r=dom-core,smaug"

This reverts commit 161decf185.

Revert "Bug 1720570 - Add support for css modules in ModuleLoader, WorkerModuleLoader and WorkletModuleLoader; r=allstarschh,dom-core,emilio,smaug"

This reverts commit 1c0eba5a86.

Revert "Bug 1720570 - Break out separate method to create constructed stylesheets; r=layout-reviewers,firefox-style-system-reviewers,emilio"

This reverts commit 0552b0f555.

Revert "Bug 1720570 - Move ModuleTypeAllowed check into ModuleLoaderBase; r=allstarschh"

This reverts commit b3be3d8fc4.

Revert "Bug 1720570 - Handle css module in GetModuleType; r=allstarschh"

This reverts commit 6ff53c0877.

Revert "Bug 1720570 - Add CreateCssModule; r=allstarschh"

This reverts commit cf4c677737.

Revert "Bug 1720570 - Add ModuleType::CSS; r=allstarschh"

This reverts commit e5f6251479.

Revert "Bug 1720570 - Add pref for css module scripts; r=layout-reviewers,emilio"

This reverts commit 9155521841.
2025-09-09 00:35:54 +00:00
Lando 8267f4ae14 Bug 1720570: apply code formatting via Lando
# ignore-this-changeset
2025-09-08 18:30:52 +00:00
Daniel Minor 1c0eba5a86 Bug 1720570 - Add support for css modules in ModuleLoader, WorkerModuleLoader and WorkletModuleLoader; r=allstarschh,dom-core,emilio,smaug
Differential Revision: https://phabricator.services.mozilla.com/D263414
2025-09-08 18:30:25 +00:00
Daniel Minor b3be3d8fc4 Bug 1720570 - Move ModuleTypeAllowed check into ModuleLoaderBase; r=allstarschh
CSS Modules are not supported in Workers and Worklets. This adds a
IsModuleTypeAllowed to ModuleLoaderBase so that the subclasses can
decide which modules are allowed.

Differential Revision: https://phabricator.services.mozilla.com/D263412
2025-09-08 18:30:18 +00:00
Lando 44a8bc1e91 Bug 1968895: apply code formatting via Lando
# ignore-this-changeset
2025-09-07 09:04:19 +00:00
Yoshi Cheng-Hao Huang 292eb157f6 Bug 1968895 - Part 7: Remove StartFetchingModuleAndDependencies. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D263376
2025-09-07 09:03:59 +00:00