Bug 658909 - Remove GWNOJO from JSValToXPCException. r=mrbkap

This commit is contained in:
Bobby Holley 2013-03-21 08:20:44 -07:00
parent 174fac9ba4
commit f6df1b589a

View File

@ -1177,9 +1177,12 @@ XPCConvert::JSValToXPCException(XPCCallContext& ccx,
}
// is this really a native xpcom object with a wrapper?
XPCWrappedNative* wrapper;
if (nullptr != (wrapper =
XPCWrappedNative::GetWrappedNativeOfJSObject(cx,obj))) {
JSObject *unwrapped = js::UnwrapObjectChecked(obj, /* stopAtOuter = */ false);
if (!unwrapped)
return NS_ERROR_XPC_SECURITY_MANAGER_VETO;
XPCWrappedNative* wrapper = IS_WN_WRAPPER(unwrapped) ? XPCWrappedNative::Get(unwrapped)
: nullptr;
if (wrapper) {
nsISupports* supports = wrapper->GetIdentityObject();
nsCOMPtr<nsIException> iface = do_QueryInterface(supports);
if (iface) {