From 18b8171d1a2dde2f9b28c136e7db5d6f4bbc3266 Mon Sep 17 00:00:00 2001 From: "jst%netscape.com" Date: Thu, 25 Oct 2001 05:09:03 +0000 Subject: [PATCH] Fixing bug 106181. When a window object is asked for the numeric property n, we return the n:th frame in the window, but if there is no n:th frame we should let the JS engine do its thing w/o forsing it to return null. r=jag@netscape.com, sr=rpotts@netscape.com git-svn-id: svn://10.0.0.236/trunk@106247 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/dom/src/base/nsDOMClassInfo.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mozilla/dom/src/base/nsDOMClassInfo.cpp b/mozilla/dom/src/base/nsDOMClassInfo.cpp index 2769494f9b7..1ef2e5f4977 100644 --- a/mozilla/dom/src/base/nsDOMClassInfo.cpp +++ b/mozilla/dom/src/base/nsDOMClassInfo.cpp @@ -2365,8 +2365,10 @@ nsWindowSH::GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, frames->Item(JSVAL_TO_INT(id), getter_AddRefs(f)); - rv = WrapNative(cx, ::JS_GetGlobalObject(cx), f, - NS_GET_IID(nsIDOMWindow), vp); + if (f) { + rv = WrapNative(cx, ::JS_GetGlobalObject(cx), f, + NS_GET_IID(nsIDOMWindow), vp); + } } }