Create inner windows when resolving on an XPCNativeWrapper for an inner-less outer window, not just when resolving on a raw inner-less outer window. Bug 348990 and bug 323641, r+sr=jst, a=beltzner for 1.8.1 drivers

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@209538 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2006-09-09 04:44:22 +00:00
parent 3626b2873d
commit d66eefbe68

View File

@@ -5790,9 +5790,10 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
// Note, we won't forward resolve of the location property to the
// inner window, we need to deal with that one for the outer too
// since we've got special security protection code for that
// property.
if (win->IsOuterWindow() && id != sLocation_id &&
!ObjectIsNativeWrapper(cx, obj)) {
// property. Also note that we want to enter this block even for
// native wrappers, so that we'll ensure an inner window to wrap
// against for the result of whatever we're getting.
if (win->IsOuterWindow() && id != sLocation_id) {
// XXXjst: Do security checks here when we remove the security
// checks on the inner window.
@@ -5826,7 +5827,8 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
}
JSObject *innerObj;
if (innerWin && (innerObj = innerWin->GetGlobalJSObject())) {
if (!ObjectIsNativeWrapper(cx, obj) &&
innerWin && (innerObj = innerWin->GetGlobalJSObject())) {
#ifdef DEBUG_SH_FORWARDING
printf(" --- Forwarding resolve to inner window %p\n", (void *)innerWin);
#endif