Value thisValue = sessionData.getSessionHandler().makeValueFromJsval(cx,
args[1]);
int dispatchId = ((Number) args[0]).intValue();
ExceptionOrReturnValue returnValue = getReturnFromJavaMethod(cx,
sessionData.getSessionHandler(), sessionData.getChannel(), dispatchId,
thisValue, valueArgs);
/*
* Return a object array ret. ret[0] is a boolean indicating whether an
* exception was thrown or not. ret[1] is the exception or the return value.
*/
Object ret[] = new Object[2];
ret[0] = returnValue.isException();
ret[1] = sessionData.getSessionHandler().makeJsvalFromValue(cx,
returnValue.getReturnValue());
return ret;
}