getDebugger().setVisible(true);
}
}
int size = (params != null ? params.size() : 0);
Object[] funArgs = new Object[size];
NativeArray parameters = new NativeArray(size);
if (size != 0) {
for (int i = 0; i < size; i++) {
Interpreter.Argument arg = (Interpreter.Argument)params.get(i);
funArgs[i] = arg.value;
if (arg.name == null) arg.name = "";
parameters.put(arg.name, parameters, arg.value);
}
}
cocoon.setParameters(parameters);
NativeArray funArgsArray = new NativeArray(funArgs);
Object fun = ScriptableObject.getProperty(thrScope, funName);
if (fun == Scriptable.NOT_FOUND) {
fun = funName; // this will produce a better error message
}
Object callFunArgs[] = { fun, funArgsArray };