From a4d3e8004dc4338a8653ffa70a9a41a5dcc7e548 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 --- dom/src/base/nsDOMClassInfo.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dom/src/base/nsDOMClassInfo.cpp b/dom/src/base/nsDOMClassInfo.cpp index 2769494f9b78..1ef2e5f49779 100644 --- a/dom/src/base/nsDOMClassInfo.cpp +++ b/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); + } } }