Closed Bug 1674080 Opened 8 months ago Closed 3 months ago

Missing includes in generated bindings CPP files


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




88 Branch
Tracking Status
firefox88 --- fixed


(Reporter: sg, Assigned: sg)




(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, 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, 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
Severity: -- → S4
Priority: -- → P3
Pushed by
Add some required includes to the bindings generator. r=peterv
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.