internal static object[] GetApplyArguments(Context cx, object arg1)
{
if (arg1 == null || arg1 == Undefined.instance)
{
return ScriptRuntime.emptyArgs;
}
else
{
if (arg1 is NativeArray || arg1 is Arguments)
{
return cx.GetElements((Scriptable)arg1);
}
else
{
throw ScriptRuntime.TypeError0("msg.arg.isnt.array");
}
}
}