/** * Invoke the JavaScript function on the current runtime. * * @param receiver The object on which to call the function on. The * receiver will be mapped to 'this' in JavaScript. If receiver is null * or undefined, then the V8 runtime will be used instead. * @param parameters The parameters passed to the JS Function. * * @return The result of JavaScript function. */ @SuppressWarnings("resource") public Object call(V8Object receiver, final V8Array parameters) { v8.checkThread(); checkReleased(); v8.checkRuntime(receiver); v8.checkRuntime(parameters); receiver = receiver != null ? receiver : v8; long parametersHandle = parameters == null ? 0 : parameters.getHandle(); long receiverHandle = receiver.isUndefined() ? v8.getHandle() : receiver.getHandle(); return v8.executeFunction(v8.getV8RuntimePtr(), receiverHandle, objectHandle, parametersHandle); }
/** * Invoke the JavaScript function on the current runtime. * * @param receiver The object on which to call the function on. The * receiver will be mapped to 'this' in JavaScript. If receiver is null * or undefined, then the V8 runtime will be used instead. * @param parameters The parameters passed to the JS Function. * * @return The result of JavaScript function. */ @SuppressWarnings("resource") public Object call(V8Object receiver, final V8Array parameters) { v8.checkThread(); checkReleased(); v8.checkRuntime(receiver); v8.checkRuntime(parameters); receiver = receiver != null ? receiver : v8; long parametersHandle = parameters == null ? 0 : parameters.getHandle(); long receiverHandle = receiver.isUndefined() ? v8.getHandle() : receiver.getHandle(); return v8.executeFunction(v8.getV8RuntimePtr(), receiverHandle, objectHandle, parametersHandle); }
/** * Invoke the JavaScript function on the current runtime. * * @param receiver The object on which to call the function on. The * receiver will be mapped to 'this' in JavaScript. If receiver is null * or undefined, then the V8 runtime will be used instead. * @param parameters The parameters passed to the JS Function. * * @return The result of JavaScript function. */ public Object call(V8Object receiver, final V8Array parameters) { v8.checkThread(); checkReleased(); receiver = receiver != null ? receiver : v8; long parametersHandle = parameters == null ? 0 : parameters.getHandle(); long receiverHandle = receiver.isUndefined() ? v8.getHandle() : receiver.getHandle(); return v8.executeFunction(v8.getV8RuntimePtr(), receiverHandle, objectHandle, parametersHandle); }
/** * Invoke the JavaScript function on the current runtime. * * @param receiver The object on which to call the function on. The * receiver will be mapped to 'this' in JavaScript. If receiver is null * or undefined, then the V8 runtime will be used instead. * @param parameters The parameters passed to the JS Function. * * @return The result of JavaScript function. */ public Object call(V8Object receiver, final V8Array parameters) { v8.checkThread(); checkReleased(); receiver = receiver != null ? receiver : v8; long parametersHandle = parameters == null ? 0 : parameters.getHandle(); long receiverHandle = receiver.isUndefined() ? v8.getHandle() : receiver.getHandle(); return v8.executeFunction(v8.getV8RuntimePtr(), receiverHandle, objectHandle, parametersHandle); }