Closed Bug 818263 Opened 13 years ago Closed 13 years ago

Make EventTarget binding work reliably for nodes

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In particular, nsINode does not inherit from nsDOMEventTargetHelper. It sort of works out right this second because they have identical vtable layouts for the parts that matter, but relying on that is chancy.
Attachment #688480 - Flags: review?(peterv)
Attachment #688480 - Flags: review?(bugs)
Peter, is the castability bit at all right? Or do I need to also implement QueryInterface on EventTarget?
Whiteboard: [need review]
Comment on attachment 688480 [details] [diff] [review] Make the EventTarget binding work for nodes. > #undef DOMCI_CASTABLE_INTERFACE > #define DOMCI_CASTABLE_INTERFACES(_extra) \ > DOMCI_CASTABLE_INTERFACE(nsINode, nsINode, 0, _extra) \ > DOMCI_CASTABLE_NODECL_INTERFACE(mozilla::dom::Element, mozilla::dom::Element,\ > 1, _extra) \ >+/* If this is ever removed, the IID for EventTarget can to go away */ \ >+DOMCI_CASTABLE_NODECL_INTERFACE(mozilla::dom::EventTarget, \ >+ mozilla::dom::EventTarget, 2, _extra) \ 'can to go'? > 'EventTarget': [ > { >- 'nativeType': 'nsDOMEventTargetHelper', > 'hasInstanceInterface': 'nsIDOMEventTarget', >+ 'hasXPConnectImpls': True, > 'concrete': False, >- 'prefable': True, > }, I'm not familiar with this stuff
Attachment #688480 - Flags: review?(bugs) → review+
> 'can to go'? Should be just "can go". ;) I'll fix. > I'm not familiar with this stuff Yeah, Peter can handle that end of it.
Try run looks ok.
Attachment #688480 - Flags: review?(peterv) → review+
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla20
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Depends on: 832899
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: