mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
De-confuse GetWrappedNativeOfJSObject about wrappers around the outer object. bug 391055, r+sr=jst
This commit is contained in:
parent
0197403515
commit
b1458c56ab
@ -1367,6 +1367,15 @@ return_tearoff:
|
||||
{
|
||||
JSObject *outer = ((JSExtendedClass*)clazz)->outerObject(cx, obj);
|
||||
|
||||
// Protect against infinite recursion through XOWs.
|
||||
JSObject *unsafeObj;
|
||||
clazz = JS_GET_CLASS(cx, outer);
|
||||
if(clazz == &sXPC_XOW_JSClass.base &&
|
||||
(unsafeObj = XPCWrapper::Unwrap(cx, outer)))
|
||||
{
|
||||
outer = unsafeObj;
|
||||
}
|
||||
|
||||
if(outer && outer != obj)
|
||||
return GetWrappedNativeOfJSObject(cx, outer, funobj, pobj2,
|
||||
pTearOff);
|
||||
|
Loading…
Reference in New Issue
Block a user