Open Bug 914675 Opened 11 years ago Updated 2 years ago

Look into being able to invoke JS-implemented WebIDL constructors directly with the right arguments instead of calling __init__

Categories

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

x86
macOS
defect

Tracking

()

People

(Reporter: bzbarsky, Unassigned)

References

(Blocks 1 open bug)

Details

This would be nice.  It might even be sorta doable on the codegen side.

Problem: Some of the __init methods use __DOM_OBJECT__.  That's clearly not possible in a constructor...

If we can solve this problem, then we can hack generateNSGetFactory to expose the relevant functions on the factory object by contractid.  Then we getClassObjectByContractID(), QI to XPCWrappedJS, extract the JSObject, GetProperty to get the correct function.  Then we have to invoke it, ideally with JS_New; this might need some hackery to the callback infrastructure and maybe a JSAPI change to give us a JS_New signature matching JS_CallFunctionValue.  Or something.

But first we need to sort out the __DOM_OBJECT__ thing.
> But first we need to sort out the __DOM_OBJECT__ thing.

I _meant_ __DOM_IMPL__.
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

Probably wontfix, since we want to get rid of JS-implemented webidl.

Component: DOM: Core & HTML → DOM: Bindings (WebIDL)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.