I'll atttach a patch I did to support scripting of the info we read from typelibs (or may generate dynamically in the near future). Rather than make the nsIInterfaceInfo family of objects support scripting, this implementation builds wrappers around those existing interfaces and object. This means that new implmentations of those existing interfaces can leverage this wrapper code automatically. Those objects are on a critical path for all xptcall based code. The scriptablity is not so critical. In order to test (and as a first cut of a tool we may want later) I wrote some JS code that spits out idl source. It is mostly right. It is currently setup to be run in xpcshell (it uses 'print'). I'm not sure if xpconnect is the best place for this new code. We might want to push it into an extension. We can decide later. I'm going to park the patch in this bug and pick it up after xmas.
Created attachment 63297 [details] [diff] [review] improved patch of ifaceinfotest.js only This patch with only ifaceinfotest.js changed now emits compilable idl. Fixes: - forward declarations of referenced types - correct retval types rather than always using the trailing [retval] param. - correct use of native void ptr declarations
I checked this in as part of mozilla/extensions/interfaceinfo. It is not yet enabled in the build.
QA note: I was able to check out mozilla/extensions/interfaceinfo and find the file as mozilla/extensions/interfaceinfo/tests/ifaceinfotest.js
This stuff is all checked in (but not part of the default build). I'm just going to mark this bug fixed.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Marking Verified -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.