Missing includes in generated bindings CPP files
Categories
(Core :: DOM: Bindings (WebIDL), defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: sg, Assigned: sg)
References
Details
Attachments
(1 file)
In case a call to DropJSObjects
is generated in the cpp file, mozilla/HoldDropJSObjects.h
must be included.
Assignee | ||
Comment 1•5 years ago
|
||
Andrew, if you could provide some guidance on how to add that around https://searchfox.org/mozilla-central/rev/a147181ece866c1ecd176ac49f112785f960aac0/dom/bindings/Codegen.py#22537, I could probably provide a patch.
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
Does this need to be added in CGEventRoot::__init__
, e.g.?
Assignee | ||
Comment 4•5 years ago
|
||
A similar issue is that when a DeprecationWarning
call is generated at https://searchfox.org/mozilla-central/rev/a147181ece866c1ecd176ac49f112785f960aac0/dom/bindings/Codegen.py#9194, an include for mozilla/dom/Document.h
is missing in the generated cpp file, which defines the enum for deprecated operations.
Comment 5•5 years ago
•
|
||
(In reply to Simon Giesecke [:sg] [he/him] from comment #3)
Does this need to be added in
CGEventRoot::__init__
, e.g.?
Yeah, it looks like we only add a call to DropJSObjects in the definition of a CGEventClass, when self.membersNeedingTrace is non-empty. CGEventRoot::__init__
looks like it is the only thing that uses that, and it already had a CGHeaders in there, so you could add the header to the 6th argument to that. I don't know if it is worthwhile to try to include it only when it is needed, given that this is only for the cpp file but I guess you could assign the CGEventClass to a local and check the members needing trace member?
Updated•5 years ago
|
Updated•5 years ago
|
Comment 7•4 years ago
|
||
bugherder |
Description
•