current state is that it's been futured, and thus there is no time frame
set for this. It probably won't happen before 1.0, unless more people
demand the feature.
As far as an alternative solution, I'm not well versed enough in JS to
offer one. Maybe someone else here has done this.
Sorry I'm not more help.
Stefan Atev wrote:
> I need to be able to write JS callable methods in C++ that have an
> undefined return type at call-time, e.g.
>
> var regval= some_component.QueryValue() which would return either an
> integer, a string or an array of strings.
>
> My understanding is that this is possible using variants, and that
> variants are currently not supported by either XPCOM or XPConnect. My
> problem is that the calls must be transparent to caller (callee side
> complications are OK as long as no low-level hand-marshalling is needed) so just
> wrapping everything around with objects is not a real option.
>
> Is there any way (no matter how ugly) to achieve this without affecting
> the JS side of things? Reading older threads and looking at bugzilla bug
> 44675 gives me the impression that at some point this was possible to do,
> but nsVariant is not currently included in XPConnect. What is the status of this
> patch (read: is it usable in mozilla 0.9.1 and why)
>
> I'd be glad to work on any portion of XPConnect or XPIDL that would lead
> to providing such functionality.
>