mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-15 22:44:13 +00:00
De-confuse GetWrappedNativeOfJSObject about wrappers around the outer object. bug 391055, r+sr=jst
This commit is contained in:
parent
1e49925451
commit
3989bcdf70
@ -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…
x
Reference in New Issue
Block a user