Closed Bug 554432 Opened 14 years ago Closed 14 years ago

Allow non-scriptable types for quickstub arguments

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a4

People

(Reporter: peterv, Assigned: peterv)

References

Details

Attachments

(1 file)

Attached patch v1Splinter Review
We want to be able to call fast non-scriptable methods from quickstubs. We already have support for unwrapping a this pointer to a non-scriptable interface (like nsINode), but we don't have support for unwrapping arguments to non-scriptable interfaces. I'm attaching a patch that adds support for that. It refactors the unwrapping code so that we share more code between unwrapping this pointers and unwrapping arguments. The type of the arguments is set in the .qsconf file (like for the this pointers), ideally we'd be able to get them through IDL somehow but that seems like a bigger task (involving conversion of a bunch of .h headers to .idl).
Attachment #434319 - Flags: review?(mrbkap)
Oh, the way I added support for non-scriptable types in the python script is by faking them as forward-declared types.
Blocks: 533637
Comment on attachment 434319 [details] [diff] [review]
v1

>+        if(NS_FAILED(castNative(cx, wrapper, obj2, tearoff, iid, ppArg,
>+                               ppArgRef, vp, nsnull)))

Nit: The second line is misindented by a space.

Looks good otherwise, though!
Attachment #434319 - Flags: review?(mrbkap) → review+
http://hg.mozilla.org/mozilla-central/rev/ff91de87a878
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: