Be consistent as to when we forward to the inner window. bug 393669, r+sr=jst

This commit is contained in:
mrbkap%gmail.com 2007-08-25 20:11:34 +00:00
Родитель ff5202060d
Коммит 45dce6da97
1 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

@ -4463,7 +4463,9 @@ nsWindowSH::SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
} }
#endif #endif
if (win->IsOuterWindow() && !ObjectIsNativeWrapper(cx, obj)) { JSObject *realObj;
wrapper->GetJSObject(&realObj);
if (win->IsOuterWindow() && obj == realObj) {
// XXXjst: Do security checks here when we remove the security // XXXjst: Do security checks here when we remove the security
// checks on the inner window. // checks on the inner window.
@ -4542,7 +4544,9 @@ nsWindowSH::AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
} }
#endif #endif
if (win->IsOuterWindow() && !ObjectIsNativeWrapper(cx, obj) ) { JSObject *realObj;
wrapper->GetJSObject(&realObj);
if (win->IsOuterWindow() && obj == realObj) {
// XXXjst: Do security checks here when we remove the security // XXXjst: Do security checks here when we remove the security
// checks on the inner window. // checks on the inner window.
@ -5571,7 +5575,9 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
} }
JSObject *innerObj; JSObject *innerObj;
if (!ObjectIsNativeWrapper(cx, obj) && JSObject *realObj;
wrapper->GetJSObject(&realObj);
if (realObj == obj &&
innerWin && (innerObj = innerWin->GetGlobalJSObject())) { innerWin && (innerObj = innerWin->GetGlobalJSObject())) {
#ifdef DEBUG_SH_FORWARDING #ifdef DEBUG_SH_FORWARDING
printf(" --- Forwarding resolve to inner window %p\n", (void *)innerWin); printf(" --- Forwarding resolve to inner window %p\n", (void *)innerWin);