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