Ensure nsCSSProps.h is explicitly included for interfaces using attrName in Bindings.conf
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox143 | --- | fixed |
People
(Reporter: janv, Assigned: janv)
References
Details
Attachments
(1 file)
This is a similar issue to bug 1981111:
0:08.52 In file included from UnifiedBindings3.cpp:2:
0:08.52 ./CSSPositionTryDescriptorsBinding.cpp:47:26: error: use of undeclared identifier 'nsCSSProps'
0:08.52 47 | const char* attrName = nsCSSProps::PropertyIDLName(id);
0:08.53 | ^
0:08.53 ./CSSPositionTryDescriptorsBinding.cpp:68:26: error: use of undeclared identifier 'nsCSSProps'
0:08.53 68 | const char* attrName = nsCSSProps::PropertyIDLName(id);
0:08.53 | ^
0:08.53 2 errors generated.
0:08.53 make[4]: *** [UnifiedBindings3.o] Error 1
0:08.53 make[3]: *** [dom/bindings/target-objects] Error 2
0:08.53 make[2]: *** [compile] Error 2
0:08.53 make[1]: *** [default] Error 2
0:08.53 make: *** [build] Error 2
but in this case it's not about [Func="..."] annotations, it's about the use of attrName in the final section of Bindings.conf, where templated attributes are defined.
A similar problem was addressed in bug 1890842 by explicitly including nsCSSProps.h. However, since then, a new interface was added in bug 1909346 where the issue didn’t manifest because nsCSSProps.h happened to be included transitively.
I reviewed all three special interfaces at the end of Bindings.conf, matched them with their corresponding header files, and ensured that nsCSSProps.h is now explicitly included where needed.
A patch is coming shortly.
| Assignee | ||
Comment 1•6 months ago
|
||
This patch fixes a potential build failure in code generated for interfaces
using attrName in Bindings.conf by ensuring that nsCSSProps.h is
explicitly included where needed.
The affected interfaces previously relied on transitive inclusion of
nsCSSProps.h, which worked unintentionally due to include order. As more
WebIDL files are added (e.g. for CSS Typed OM), this include may no longer be
present, resulting in undefined references to symbols like
nsCSSProps::PropertyIDLName.
To fix this, nsCSSProps.h is now included explicitly in the headers
corresponding to all interfaces using attrName.
Comment 3•6 months ago
|
||
| bugherder | ||
Updated•5 months ago
|
Description
•