Allow non-scriptable types for quickstub arguments

RESOLVED FIXED in mozilla1.9.3a4

Status

()

Core
XPConnect
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: peterv, Assigned: peterv)

Tracking

Trunk
mozilla1.9.3a4
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
Created attachment 434319 [details] [diff] [review]
v1

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)
(Assignee)

Comment 1

8 years ago
Oh, the way I added support for non-scriptable types in the python script is by faking them as forward-declared types.
(Assignee)

Updated

8 years ago
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+
(Assignee)

Comment 3

8 years ago
http://hg.mozilla.org/mozilla-central/rev/ff91de87a878
Status: ASSIGNED → RESOLVED
Last Resolved: 8 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.