eso = context.toObject(thisObject, global);
eso = Context.toObject(thisObject, global);
    public Object invoke(Object thisObject, String functionName, Object[] args,                         boolean xmlrpc) throws ScriptingException {        Scriptable eso = null;        if (thisObject == null) {            eso = global;        } else {            eso = context.toObject(thisObject, global);        }        try {            for (int i = 0; i < args.length; i++) {                // XML-RPC requires special argument conversion                if (xmlrpc) {                    args[i] = core.processXmlRpcArgument (args[i]);                } else if (args[i] != null) {                    args[i] = context.toObject(args[i], global);                }            }            Object f = ScriptableObject.getProperty(eso, functionName.replace('.', '_'));            if ((f == ScriptableObject.NOT_FOUND) || !(f instanceof Function)) {                return null;            }            Object retval = ((Function) f).call(context, global, eso, args);            if (xmlrpc) {                return core.processXmlRpcResponse (retval);            } else if ((retval == null) || (retval == Undefined.instance)) {                return null;            } else if (retval instanceof NativeJavaObject) {                return ((NativeJavaObject) retval).unwrap();            } else {                return retval;            }        } catch (RedirectException redirect) {            throw redirect;        } catch (TimeoutException timeout) {            throw timeout;        } catch (ConcurrencyException concur) {            throw concur;        } catch (Exception x) {            // check if this is a redirect exception, which has been converted by fesi            // into an EcmaScript exception, which is why we can't explicitly catch it            if (reval.res.getRedirect() != null) {                throw new RedirectException(reval.res.getRedirect());            }            // do the same for not-modified responses            if (reval.res.getNotModified()) {                throw new RedirectException(null);            }            // has the request timed out? If so, throw TimeoutException            if (thread != Thread.currentThread())                throw new TimeoutException ();            // create and throw a ScriptingException with the right message            String msg;            if (x instanceof JavaScriptException) {                msg = ((JavaScriptException) x).getValue().toString();            } else {                msg = x.toString();            }            if (app.debug()) {                System.err.println("Error in Script: " + msg);                x.printStackTrace();            }            throw new ScriptingException(msg);        }    }