add annotation to prevent static IDL operations from generating functions with an nsISupports* global

NEW
Unassigned

Status

()

defect
P5
normal
7 years ago
4 months ago

People

(Reporter: heycam, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Some static functions, like CSS.supports(), do not need access to the global object, so it ought to be possible to say (in Bindings.conf or in the IDL) that the nsISupports* global argument is not added.
Does it really matter?  The compiler will optimize it out.
I'm not sure the compiler can in fact optimize out the binding end of this (the actual extraction of the global from the call information, etc).
This uses templates to detect if a function with the right signature exists, either with or without a globalobject. Because of the templates the error messages are a bit verbose if no function with the right signature exists. Not sure the complexity is worth it. There are some smaller things we should do if we don't take the whole thing (like have separate types for worker/non-worker globalobject).
Moved the part about the type of the global object to bug 816088.
Attachment #689430 - Attachment is obsolete: true
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.