public static object Name(Context cx, Scriptable scope, string name)
{
Scriptable parent = scope.GetParentScope();
if (parent == null)
{
object result = TopScopeName(cx, scope, name);
if (result == ScriptableConstants.NOT_FOUND)
{
throw NotFoundError(scope, name);
}
return result;
}
return NameOrFunction(cx, scope, parent, name, false);
}