XPIDL compiler should forbid [ref] outparams

NEW
Unassigned

Status

()

7 years ago
2 years ago

People

(Reporter: bholley, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
When the headers for references are generated, XPIDL will always convert:

[ref] T foo;

to

T & foo;

Unfortunately, the calling convention dictates that we use an extra level of indirection for outparams. So XPConnect will pass the callee a T**, and the callee will interpret it as a T&, leading to crashes. This happened to me when I tried to do an out nsIDRef.

We could fix this in various ways, but it seems simplest just to forbid it in the compiler.

Assigning to khuey since that seems to be how we roll. ;-)
You need to log in before you can comment on or make changes to this bug.