mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 580128 - Find the true caller through the wrappers. r=jst
This commit is contained in:
parent
9d0588387a
commit
0b191e8ccd
@ -5573,8 +5573,24 @@ nsGlobalWindow::CallerInnerWindow()
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
JSObject *scope = ::JS_GetScopeChain(cx);
|
||||
JSObject *scope = nsnull;
|
||||
JSStackFrame *fp = nsnull;
|
||||
JS_FrameIterator(cx, &fp);
|
||||
if (fp) {
|
||||
while (fp->isDummyFrame()) {
|
||||
if (!JS_FrameIterator(cx, &fp))
|
||||
break;
|
||||
}
|
||||
|
||||
if (fp)
|
||||
scope = &fp->scopeChain();
|
||||
}
|
||||
|
||||
if (!scope)
|
||||
scope = JS_GetScopeChain(cx);
|
||||
|
||||
JSAutoEnterCompartment ac;
|
||||
if (!ac.enter(cx, scope))
|
||||
return nsnull;
|
||||
|
||||
nsCOMPtr<nsIXPConnectWrappedNative> wrapper;
|
||||
|
Loading…
Reference in New Issue
Block a user