Commit Graph
32 Commits
Author SHA1 Message Date
Tooru Fujisawa 14b3e5d09b Bug 2033379 - Part 1: Remove EventScript. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D295235
2026-04-26 10:07:32 +00:00
Cosmin Sabou 1bce27241f Revert "Bug 2033379, Bug 2031074 - Remove nsIMemoryReporter interface from LoadedScript. r=nbp" for causing build bustages on ImportMap.cpp
This reverts commit f2463cd050.

Revert "Bug 2033379 - Part 2: Add ScriptKind document. r=nbp"

This reverts commit c947be415d.

Revert "Bug 2033379 - Part 1: Remove EventScript. r=nbp"

This reverts commit 4eddb4c65f.
2026-04-25 19:03:51 +00:00
Tooru Fujisawa 4eddb4c65f Bug 2033379 - Part 1: Remove EventScript. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D295235
2026-04-25 18:32:58 +00:00
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
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 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 dacb61844a Bug 1916277 - Part 4: Update ImportMap::ResolveModuleSpecifier. r=jonco
This is just a minor update to the latest spec, the logic remains the same.

Before:
If found a match in scopesImportMatch, return result.

After:
If found a match in scopesImportMatch, break from the for-loop.
if result is not null, return result

Differential Revision: https://phabricator.services.mozilla.com/D272778
2026-03-03 00:52:36 +00:00
Yoshi Cheng-Hao Huang 19b9ec22f6 Bug 1916277 - Part 1: Add pref dom.multiple_import_maps.enabled. r=jonco
Add a pref to enable support for multiple import maps.

Differential Revision: https://phabricator.services.mozilla.com/D278654
2026-03-03 00:52:30 +00:00
Jan de Mooij 5f8adac946 Bug 2013573 - Handle CCW nuking under ErrorReportBuilder::init better. r=jonco
This adds a `JS::BorrowedErrorReport` type and uses it for `ErrorFromException`
and `JS_ErrorFromException`. This avoids problems with CCW nuking because
`BorrowedErrorReport` roots the wrapper's target object instead of the CCW.

Differential Revision: https://phabricator.services.mozilla.com/D281761
2026-02-04 16:25:22 +00:00
Yoshi Cheng-Hao Huang b110d7daf9 Bug 1979050 - Part 1: Patch. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D271970
2025-11-11 08:23:46 +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
Fatih Kilic 92c8533185 Bug 1945540: Part 1 - Implement parsing of integrity field. r=tschuster,jonco
Differential Revision: https://phabricator.services.mozilla.com/D236729
2025-03-06 14:16:29 +00:00
Jon Coppeard 9c329cdb6e Bug 1871075 - Part 1: Store referencing private as a pointer to the underlying LoadedScript r=yulia
In Gecko we use a LoadedScript pointer as the referencing private for dynamic
imports. This is passed through the JS engine as a private value, which doesn't
care what it means. Currently we store this in the module loader as a JS::Value,
but we could just as well unpack it since we know what it is. That lets use a
RefPtr which also keeps it alive and will let use remove some manual reference
counting.

We also don't need to pass it to the CreateDynamicImport method twice.

This change makes it the responsibility of the module loader for keeping the
referencing private alive until FinishDynamicModuleImport is called.

Differential Revision: https://phabricator.services.mozilla.com/D196974
2023-12-21 13:30:34 +00:00
Yoshi Cheng-Hao Huang e1b2f52c7a Bug 1808357: Add better error message for importmaps of invalid JSON format. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D166084
2023-01-06 13:34:17 +00:00
Yoshi Cheng-Hao Huang 6d98cdb61b Bug 1778289 - Part 12: Update spec links as the PR is merged. r=jonco,yulia
The PR has been merged.
See https://html.spec.whatwg.org/multipage/webappapis.html#import-maps

Differential Revision: https://phabricator.services.mozilla.com/D158828
2022-10-07 13:56:27 +00:00
Yoshi Cheng-Hao Huang 5b9b1024ae Bug 1778289 - Part 7: Update spec in ImportMaps.cpp/h. r=jonco,yulia
Differential Revision: https://phabricator.services.mozilla.com/D152874
2022-10-07 13:56:25 +00:00
Yoshi Cheng-Hao Huang 7b6baa808f Bug 1778289 - Part 1: Rename 'parse a URL-Like import specifier' to 'resolve a URL-Like module specifier'. r=jonco,yulia
The old function name is "parse a URL-like import specifier".
https://wicg.github.io/import-maps/#parse-a-url-like-import-specifier

It has been rename to "resolve a URL-like module specifier".
https://whatpr.org/html/8075/webappapis.html#resolving-a-url-like-module-specifier

Differential Revision: https://phabricator.services.mozilla.com/D152868
2022-10-07 13:56:23 +00:00
Jon Coppeard ac8af1df8b Bug 1777450 - Separate error messages for module resulution failure when the specifier might be bare r=allstarschh,flod
This fixes the original case by adding an extra error reason which is used when
the specifier could be bare and and only warning about relative URLs in this
case.

The same problem happens with import maps enable where "./foo.js" produces an
error about it being a bare specifier, which it's not. For that case make
ParseURLLikeImportSpecifier return a ResolveResult and use the same approach.

Differential Revision: https://phabricator.services.mozilla.com/D151153
2022-07-08 09:58:33 +00:00
Yoshi Cheng-Hao Huang 2ffa0ac697 Bug 1688879 - Part 5: ResolveModuleSpecifier for import maps. r=jonco,yulia,flod
Implement https://wicg.github.io/import-maps/#resolve-a-module-specifier

Differential Revision: https://phabricator.services.mozilla.com/D142072
2022-05-05 21:19:02 +00:00
Yoshi Cheng-Hao Huang d5ac332d96 Bug 1688879 - Part 3: Parse and register an import map. r=jonco,yulia
Implement
https://wicg.github.io/import-maps/#parse-an-import-map-string,
and
https://wicg.github.io/import-maps/#register-an-import-map

Differential Revision: https://phabricator.services.mozilla.com/D142071
2022-05-05 21:19:01 +00:00
Butkovits Atila b018b0e4da Backed out 11 changesets (bug 1688879) for causing build bustages. CLOSED TREE
Backed out changeset 350ddd17c7f5 (bug 1688879)
Backed out changeset 27984b95ed20 (bug 1688879)
Backed out changeset 6a5bb063965f (bug 1688879)
Backed out changeset d8edcfdb504b (bug 1688879)
Backed out changeset 77ab231310ec (bug 1688879)
Backed out changeset c2bce95a1aca (bug 1688879)
Backed out changeset f5862572ced8 (bug 1688879)
Backed out changeset 05e0a1bf32fc (bug 1688879)
Backed out changeset adeab05b7419 (bug 1688879)
Backed out changeset 0e60834e17e5 (bug 1688879)
Backed out changeset 877bb4c2ce66 (bug 1688879)
2022-05-05 19:52:05 +03:00
Yoshi Cheng-Hao Huang 578cf001b9 Bug 1688879 - Part 10: Fix class-varargs warnings in Windows builds. r=jonco
Error message:

/builds/worker/checkouts/gecko/js/loader/ImportMap.cpp(262,30): error: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Werror,-Wclass-varargs]
[task 2022-05-05T00:33:57.282Z] 00:33:57     INFO -                               scopePrefix.get());
[task 2022-05-05T00:33:57.283Z] 00:33:57     INFO -                               ^
[task 2022-05-05T00:33:57.283Z] 00:33:57     INFO -  1 error generated.

Differential Revision: https://phabricator.services.mozilla.com/D145602
2022-05-05 16:03:37 +00:00
Yoshi Cheng-Hao Huang ec955eda01 Bug 1688879 - Part 5: ResolveModuleSpecifier for import maps. r=jonco,yulia,flod
Implement https://wicg.github.io/import-maps/#resolve-a-module-specifier

Differential Revision: https://phabricator.services.mozilla.com/D142072
2022-05-05 16:03:17 +00:00
Yoshi Cheng-Hao Huang ea9b864f1c Bug 1688879 - Part 3: Parse and register an import map. r=jonco,yulia
Implement
https://wicg.github.io/import-maps/#parse-an-import-map-string,
and
https://wicg.github.io/import-maps/#register-an-import-map

Differential Revision: https://phabricator.services.mozilla.com/D142071
2022-05-05 16:03:16 +00:00
Narcis Beleuzu 8fd1fceb75 Backed out 9 changesets (bug 1688879) for bustages on ImportMap.cpp
Backed out changeset 44e9abe72a5e (bug 1688879)
Backed out changeset 0503d2d2ae01 (bug 1688879)
Backed out changeset 2cf08a51b184 (bug 1688879)
Backed out changeset 6f0276c3ab0e (bug 1688879)
Backed out changeset f16b14d8f677 (bug 1688879)
Backed out changeset 03b772e02d07 (bug 1688879)
Backed out changeset 39ed48a5ecc2 (bug 1688879)
Backed out changeset d7b42d8312bb (bug 1688879)
Backed out changeset 5e695bf5dd0d (bug 1688879)
2022-05-05 03:41:31 +03:00
Yoshi Cheng-Hao Huang a0004f1c1b Bug 1688879 - Part 5: ResolveModuleSpecifier for import maps. r=jonco,yulia,flod
Implement https://wicg.github.io/import-maps/#resolve-a-module-specifier

Differential Revision: https://phabricator.services.mozilla.com/D142072
2022-05-04 21:02:51 +00:00
Yoshi Cheng-Hao Huang 641d407325 Bug 1688879 - Part 3: Parse and register an import map. r=jonco,yulia
Implement
https://wicg.github.io/import-maps/#parse-an-import-map-string,
and
https://wicg.github.io/import-maps/#register-an-import-map

Differential Revision: https://phabricator.services.mozilla.com/D142071
2022-05-04 21:02:50 +00:00