Closed Bug 1173829 Opened 9 years ago Closed 9 years ago

Codegen doesn't like non-concrete static interfaces

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: fitzgen, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

Doesn't generate includes of implementations.

Also "no member named 'GetProtoObjectHandle' in namespace 'mozilla::dom::ThreadSafeChromeUtilsBinding'".
Specifically, two issues:

1)  We didn't include the implementation header for a non-concrete empty
interface.  But if it has a parent we assert it's refcounted if and only if the
parent is refcounted, so need to see the class declaration.

2)  We were getting the parent proto in all cases in CreateInterfaceObjects.
But parent may not have a proto at all if it has no concrete descendants.  So
this patch switches to getting the parent proto only if we have a proto ourselves.
Attachment #8621019 - Flags: review?(peterv)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment on attachment 8621019 [details] [diff] [review]
Fix some compile issues in code generated by bindings codegen for non-concrete interfaces

Review of attachment 8621019 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/bindings/Codegen.py
@@ +2735,5 @@
>          else:
>              protoClass = "nullptr"
>              protoCache = "nullptr"
> +            getParentProto = None
> +            parentProto = "nullptr"

Maybe put these in the same order as above?
Attachment #8621019 - Flags: review?(peterv) → review+
> Maybe put these in the same order as above?

Done.
https://hg.mozilla.org/mozilla-central/rev/ec6773c9131c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: