bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

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




5 years ago
5 years ago


(Reporter: bz, Unassigned)


(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)


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__.
You need to log in before you can comment on or make changes to this bug.