mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-12 14:37:50 +00:00
Bug 638026 - Make sure we hold onto the right JS object here. r=jst
--HG-- extra : rebase_source : 5ebebc39f689d0b76e51b2ca79fa432871b1404e
This commit is contained in:
parent
310733626a
commit
f28f2573f7
@ -63,6 +63,11 @@ XPCVariant::XPCVariant(XPCCallContext& ccx, jsval aJSVal)
|
||||
nsVariant::Initialize(&mData);
|
||||
if(!JSVAL_IS_PRIMITIVE(mJSVal))
|
||||
{
|
||||
JSObject *obj = JSVAL_TO_OBJECT(mJSVal);
|
||||
OBJ_TO_INNER_OBJECT(ccx, obj);
|
||||
|
||||
mJSVal = OBJECT_TO_JSVAL(obj);
|
||||
|
||||
// If the incoming object is an XPCWrappedNative, then it could be a
|
||||
// double-wrapped object, and we should return the double-wrapped
|
||||
// object back out to script.
|
||||
|
Loading…
Reference in New Issue
Block a user