mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 13:45:27 +00:00
Fix bug 572130. r=jst
This commit is contained in:
parent
e22027e424
commit
c22541b762
@ -41,6 +41,7 @@
|
||||
/* nsIVariant implementation for xpconnect. */
|
||||
|
||||
#include "xpcprivate.h"
|
||||
#include "XPCWrapper.h"
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(XPCVariant)
|
||||
|
||||
@ -431,15 +432,17 @@ XPCVariant::VariantDataToJS(XPCLazyCallContext& lccx,
|
||||
NS_ASSERTION(type == nsIDataType::VTYPE_INTERFACE ||
|
||||
type == nsIDataType::VTYPE_INTERFACE_IS,
|
||||
"Weird variant");
|
||||
*pJSVal = realVal;
|
||||
return JS_TRUE;
|
||||
|
||||
// else, it's an object and we really need to double wrap it if we've
|
||||
// already decided that its 'natural' type is as some sort of interface.
|
||||
|
||||
// We just fall through to the code below and let it do what it does.
|
||||
return XPCWrapper::RewrapObject(lccx.GetJSContext(), scope,
|
||||
JSVAL_TO_OBJECT(realVal),
|
||||
XPCWrapper::UNKNOWN, pJSVal);
|
||||
}
|
||||
|
||||
// else, it's an object and we really need to double wrap it if we've
|
||||
// already decided that its 'natural' type is as some sort of interface.
|
||||
|
||||
// We just fall through to the code below and let it do what it does.
|
||||
|
||||
// The nsIVariant is not a XPCVariant (or we act like it isn't).
|
||||
// So we extract the data and do the Right Thing.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user