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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user