May 25, 2005

XPIDL and arrays

Yesterday, I discovered QueryInterface executing on my component for nsIClassInfo and nsISecurityCheckedComponent.

Under the nsIClassInfo IDL, the getInterfaces() section is a bit intimidating. But a sample in nsExtensionManager.js is really simple.

So from JS, we're passed an object as an argument. We set a property of that argument, value, to be the length of the array we're returning. We return the array as we normally would, and everything works.

I really ought to write some of this up for devmo. Thanks to #developers for the quick answer to my question.

Posted by WeirdAl at May 25, 2005 9:53 AM