public override object ExecIdCall(IdFunctionObject f, Context cx, IScriptable scope, IScriptable thisObj, object [] args) { if (!f.HasTag(CALL_TAG)) { return(base.ExecIdCall(f, cx, scope, thisObj, args)); } int id = f.MethodId; if (id == Id_constructor) { if (thisObj != null) { throw Context.ReportRuntimeErrorById("msg.only.from.new", "Call"); } ScriptRuntime.checkDeprecated(cx, "Call"); BuiltinCall result = new BuiltinCall(); result.SetPrototype(GetObjectPrototype(scope)); return(result); } throw new ArgumentException(Convert.ToString(id)); }
public override object ExecIdCall(IdFunctionObject f, Context cx, IScriptable scope, IScriptable thisObj, object [] args) { if (!f.HasTag (CALL_TAG)) { return base.ExecIdCall (f, cx, scope, thisObj, args); } int id = f.MethodId; if (id == Id_constructor) { if (thisObj != null) { throw Context.ReportRuntimeErrorById ("msg.only.from.new", "Call"); } ScriptRuntime.checkDeprecated (cx, "Call"); BuiltinCall result = new BuiltinCall (); result.SetPrototype (GetObjectPrototype (scope)); return result; } throw new ArgumentException (Convert.ToString (id)); }