Closed Bug 816376 Opened 12 years ago Closed 12 years ago

Interface objects for callback interfaces should not be functions

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)

Per spec, these should be just vanilla objects, whose proto is Object.prototype. Right now we create a callable object whose proto is Function.prototype.
Comment on attachment 686389 [details] [diff] [review] Create vanilla objects for the interface object of callback interfaces. Review of attachment 686389 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/Codegen.py @@ +1465,1 @@ > constructHook = "&" + CONSTRUCT_HOOK_NAME + "_holder" I know you're just changing existing code, but needConstructor seems badly named here :-/. I think it would make more sense to rename needsConstructorFunction to needsConstructHookHolder or something and do: if (needInterfaceObject and self.descriptor.needsConstructHookHolder(): constructHookHolder = "&" + CONSTRUCT_HOOK_NAME + "_holder" else: constructHookHolder = "nullptr" and pass that in to the call to CreateInterfaceObjects.
Attachment #686389 - Flags: review?(peterv) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/d531b6a61a6e with that change. Once we turn on WebIDL bindings for NodeFilter this will be tested too (that's how I found it).
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla20
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
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: