public static object CallSpecial(Context cx, Callable fun, Scriptable thisObj, object[] args, Scriptable scope, Scriptable callerThis, int callType, string filename, int lineNumber)
{
if (callType == Node.SPECIALCALL_EVAL)
{
if (thisObj.GetParentScope() == null && NativeGlobal.IsEvalFunction(fun))
{
return EvalSpecial(cx, scope, callerThis, args, filename, lineNumber);
}
}
else
{
if (callType == Node.SPECIALCALL_WITH)
{
if (NativeWith.IsWithFunction(fun))
{
throw Context.ReportRuntimeError1("msg.only.from.new", "With");
}
}
else
{
throw Kit.CodeBug();
}
}
return fun.Call(cx, scope, thisObj, args);
}