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 Arguments (BuiltinCall activation) { this.activation = activation; IScriptable parent = activation.ParentScope; ParentScope = parent; SetPrototype (ScriptableObject.GetObjectPrototype (parent)); args = activation.originalArgs; lengthObj = (int)args.Length; BuiltinFunction f = activation.function; calleeObj = f; Context.Versions version = f.LanguageVersion; if (version <= Context.Versions.JS1_3 && version != Context.Versions.Default) { callerObj = null; } else { callerObj = UniqueTag.NotFound; } }
internal static void Init(IScriptable scope, bool zealed) { BuiltinCall obj = new BuiltinCall(); obj.ExportAsJSClass(MAX_PROTOTYPE_ID, scope, zealed); }
internal static void Init(IScriptable scope, bool zealed) { BuiltinCall obj = new BuiltinCall (); obj.ExportAsJSClass (MAX_PROTOTYPE_ID, scope, zealed); }
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)); }