Closed
Bug 1881917
Opened 2 years ago
Closed 2 years ago
Support building with zero component JSMs in tree until both m-c and c-c migrates all components to ESM
Categories
(Core :: XPCOM, task)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
125 Branch
| Tracking | Status | |
|---|---|---|
| firefox125 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
Bug 1770944 is about to remove the last static component JSMs, and it had to remove some code from xpcom/components/StaticComponents.cpp.in and xpcom/components/gen_static_components.py in order to avoid a compilation error comes from gComponentJSMs being 0-length array.
StaticComponents.cpp:13231:47: error: no matching function for call to 'ArrayLengthHelper'
13231 | auto jsms = MakeUnique<nsTArray<nsCString>>(MOZ_ARRAY_LENGTH(gComponentJSMs));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/arai/projects/mozilla-unified/obj/do/dist/include/mozilla/ArrayUtils.h:183:12: note: expanded from macro 'MOZ_ARRAY_LENGTH'
183 | sizeof(mozilla::detail::ArrayLengthHelper(array))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/arai/projects/mozilla-unified/obj/do/dist/include/mozilla/ArrayUtils.h:168:8: note: candidate template ignored: substitution failure [with T = const StringOffset, N = 0]: zero-length arrays are not permitted in C++
168 | char (&ArrayLengthHelper(T (&array)[N]))[N];
But it's problematic for comm-central where there are still some component JSMs.
The code should be kept until both m-c and c-c migrations finish, and the code should compile even if there's no component JSMs in tree.
| Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/20ea3f74f4fe
Support building with zero component JSMs. r=xpcom-reviewers,aiunusov,emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox125:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•