Closed Bug 1674080 Opened 8 months ago Closed 3 months ago

Missing includes in generated bindings CPP files

Categories

(Core :: DOM: Bindings (WebIDL), defect, P3)

defect

Tracking

()

RESOLVED FIXED
88 Branch
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.

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.

Blocks: 1660470
Flags: needinfo?(continuation)

Does this need to be added in CGEventRoot::__init__, e.g.?

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.

(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?

Flags: needinfo?(continuation)
Assignee: nobody → sgiesecke
Attachment #9184522 - Attachment description: Bug 1674080 - WORKAROUND to have a buildable stack. → Bug 1674080 - Add some required includes to the bindings generator. r=nika
Status: NEW → ASSIGNED
Severity: -- → S4
Priority: -- → P3
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c50f939ae803
Add some required includes to the bindings generator. r=peterv
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.