X-Git-Url: http://git.megacz.com/?p=org.ibex.js.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjs%2FJSFunction.java;h=fc5cb393dbe847b1bc30c7afdec2ec61488377c4;hp=a14bdec1fedaba22944a334f9e02db54190caa49;hb=f63da7aeac2f942be41aefde91002d14117a8573;hpb=a9ba7fb6a010f903c2021f647561aab7244b6138 diff --git a/src/org/ibex/js/JSFunction.java b/src/org/ibex/js/JSFunction.java index a14bdec..fc5cb39 100644 --- a/src/org/ibex/js/JSFunction.java +++ b/src/org/ibex/js/JSFunction.java @@ -51,7 +51,9 @@ class JSFunction extends JS.Immutable implements ByteCodes, Tokens, Pausable { return ret; } - public JS call(JS[] args) throws JSExn { return (JS)new Interpreter(this, false, args).run(null); } + public JS call(JS method, JS[] args) throws JSExn { + if (method != null) return super.call(method, args); + return (JS)new Interpreter(this, false, args).run(null); } JSScope getParentScope() { return parentScope; }