public static NewSpecial ( |
||
cx | ||
fun | object | |
args | object | |
scope | Scriptable | |
callType | int | |
return | object |
public static object NewSpecial(Context cx, object fun, object[] args, Scriptable scope, int callType)
{
if (callType == Node.SPECIALCALL_EVAL)
{
if (NativeGlobal.IsEvalFunction(fun))
{
throw TypeError1("msg.not.ctor", "eval");
}
}
else
{
if (callType == Node.SPECIALCALL_WITH)
{
if (NativeWith.IsWithFunction(fun))
{
return NativeWith.NewWithSpecial(cx, scope, args);
}
}
else
{
throw Kit.CodeBug();
}
}
return NewObject(fun, cx, scope, args);
}