From d77ac36399e15bf8b827118e4d3185fa3e0bc6eb Mon Sep 17 00:00:00 2001 From: "jst%netscape.com" Date: Fri, 4 May 2001 06:08:42 +0000 Subject: [PATCH] If we don't find something by name in a named array fall through to the index based array. git-svn-id: svn://10.0.0.236/branches/XPCDOM_20010329_BRANCH@93897 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/dom/src/base/nsDOMClassInfo.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mozilla/dom/src/base/nsDOMClassInfo.cpp b/mozilla/dom/src/base/nsDOMClassInfo.cpp index 6bfe310fb8f..bcc51e24783 100644 --- a/mozilla/dom/src/base/nsDOMClassInfo.cpp +++ b/mozilla/dom/src/base/nsDOMClassInfo.cpp @@ -1994,14 +1994,15 @@ nsNamedArraySH::GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx, nsresult rv = GetNamedItem(native, name, getter_AddRefs(item)); NS_ENSURE_SUCCESS(rv, rv); - // Do we wanto fall through to nsArraySH::GetProperty() here if - // item is null? + if (item) { + rv = WrapNative(cx, ::JS_GetGlobalObject(cx), item, + NS_GET_IID(nsISupports), vp); + NS_ENSURE_SUCCESS(rv, rv); - rv = WrapNative(cx, ::JS_GetGlobalObject(cx), item, - NS_GET_IID(nsISupports), vp); - NS_ENSURE_SUCCESS(rv, rv); + return NS_OK; + } - return NS_OK; + // Fall through to nsArraySH::GetProperty() here } return nsArraySH::GetProperty(wrapper, cx, obj, id, vp, _retval);