mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Fixing bug 380474. Use the inner object when looking up methods and adding event listeners. r=mrbkap@mozilla.org, sr=brendan@mozilla.org
This commit is contained in:
parent
b30f4be28c
commit
a859c10ced
@ -6620,6 +6620,8 @@ nsEventReceiverSH::AddEventListenerHelper(JSContext *cx, JSObject *obj,
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
OBJ_TO_INNER_OBJECT(cx, obj);
|
||||
|
||||
nsCOMPtr<nsIXPConnectWrappedNative> wrapper;
|
||||
nsresult rv =
|
||||
sXPConnect->GetWrappedNativeOfJSObject(cx, obj, getter_AddRefs(wrapper));
|
||||
|
@ -2786,6 +2786,8 @@ nsXPCComponents_Utils::LookupMethod()
|
||||
|
||||
JSObject* obj = JSVAL_TO_OBJECT(argv[0]);
|
||||
|
||||
OBJ_TO_INNER_OBJECT(cx, obj);
|
||||
|
||||
// second param must be a string
|
||||
if(!JSVAL_IS_STRING(argv[1]))
|
||||
return NS_ERROR_XPC_BAD_CONVERT_JS;
|
||||
|
Loading…
Reference in New Issue
Block a user