Arrays of jsval and jsval return values generate invalid .h code

RESOLVED WONTFIX

Status

()

Core
XPCOM
RESOLVED WONTFIX
6 years ago
5 years ago

People

(Reporter: mrbkap, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
With the IDL:

    void init(in nsIDOMWindow aWindow, in jsval aObj,
              in size_t aArgc, [array,size_is(aArgc)] in jsval aArgv);

I get:

../../dist/include/nsIDOMJSInitializer.h:33:145: error: cannot declare pointer to ‘const class JS::Value&’

And the generated .h is:

  NS_SCRIPTABLE NS_IMETHOD Init(nsIDOMWindow *aWindow, const JS::Value & aObj, size_t aArgc, const JS::Value & *aArgv) = 0;

If there's a better way to do what I want here, that would work too. I don't even know if XPConnect does the right thing in this case. I'll test more tomorrow.
Can you just move the relevant thing to new bindings?  ;)
(Reporter)

Comment 2

5 years ago
We worked around this by sidestepping IDL entirely. I'm assuming that we're not going to bother fixing this.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.