Bug 531364 - Account for differences in the old code. r=jst a=dveditz
git-svn-id: svn://10.0.0.236/trunk@259572 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -6888,6 +6888,13 @@ nsEventReceiverSH::AddEventListenerHelper(JSContext *cx, JSObject *obj,
|
|||||||
return JS_FALSE;
|
return JS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rv = sXPConnect->GetWrappedNativeOfJSObject(cx, obj, getter_AddRefs(wrapper));
|
||||||
|
if (NS_FAILED(rv)) {
|
||||||
|
nsDOMClassInfo::ThrowJSException(cx, rv);
|
||||||
|
|
||||||
|
return JS_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
// Check that the caller has permission to call obj's addEventListener.
|
// Check that the caller has permission to call obj's addEventListener.
|
||||||
if (NS_FAILED(sSecMan->CheckPropertyAccess(cx, obj,
|
if (NS_FAILED(sSecMan->CheckPropertyAccess(cx, obj,
|
||||||
JS_GET_CLASS(cx, obj)->name,
|
JS_GET_CLASS(cx, obj)->name,
|
||||||
|
|||||||
@@ -2803,12 +2803,16 @@ nsXPCComponents_Utils::LookupMethod()
|
|||||||
return NS_ERROR_XPC_BAD_CONVERT_JS;
|
return NS_ERROR_XPC_BAD_CONVERT_JS;
|
||||||
|
|
||||||
JSObject* obj = JSVAL_TO_OBJECT(argv[0]);
|
JSObject* obj = JSVAL_TO_OBJECT(argv[0]);
|
||||||
XPCWrappedNative *wn =
|
|
||||||
XPCWrappedNative::GetWrappedNativeOfJSObject(cx, obj);
|
|
||||||
if(!wn)
|
|
||||||
return NS_ERROR_XPC_BAD_CONVERT_JS;
|
|
||||||
|
|
||||||
obj = wn->GetFlatJSObject();
|
{
|
||||||
|
XPCWrappedNative *wn =
|
||||||
|
XPCWrappedNative::GetWrappedNativeOfJSObject(cx, obj);
|
||||||
|
if(!wn)
|
||||||
|
return NS_ERROR_XPC_BAD_CONVERT_JS;
|
||||||
|
|
||||||
|
obj = wn->GetFlatJSObject();
|
||||||
|
}
|
||||||
|
|
||||||
OBJ_TO_INNER_OBJECT(cx, obj);
|
OBJ_TO_INNER_OBJECT(cx, obj);
|
||||||
if(!obj)
|
if(!obj)
|
||||||
return NS_ERROR_XPC_BAD_CONVERT_JS;
|
return NS_ERROR_XPC_BAD_CONVERT_JS;
|
||||||
|
|||||||
Reference in New Issue
Block a user