public Scriptable getParentScope() { return this.delegate.getParentScope(); }
public Scriptable getParentScope() { return this.delegate.getParentScope(); }
public Scriptable getParentScope() { return this.delegate.getParentScope(); }
private static Global getInstance(Function function) { Scriptable scope = function.getParentScope(); if (!(scope instanceof Global)) throw reportRuntimeError("msg.bad.shell.function.scope", String.valueOf(scope)); return (Global)scope; }
private static Global getInstance(Function function) { Scriptable scope = function.getParentScope(); if (!(scope instanceof Global)) throw reportRuntimeError("msg.bad.shell.function.scope", String.valueOf(scope)); return (Global)scope; }
public Object run(Context cx) { Object[] args = ab.buildArguments(); handler.call(cx, handler.getParentScope(), globalObject, args); return null; } });
public Object run(Context cx) { Object[] args = ab.buildArguments(); handler.call(cx, handler.getParentScope(), globalObject, args); return null; } });
public Object run(Context cx) { Object[] args = ab.buildArguments(); handler.call(cx, handler.getParentScope(), globalObject, args); return null; } });
private Object call(Function func, Object[] args) { Context cx = Context.getCurrentContext(); Scriptable thisObj = getAdaptee(); Scriptable scope = func.getParentScope(); try { return func.call(cx, scope, thisObj, args); } catch (RhinoException re) { throw Context.reportRuntimeError(re.getMessage()); } }
private Object call(Function func, Object[] args) { Context cx = Context.getCurrentContext(); Scriptable thisObj = getAdaptee(); Scriptable scope = func.getParentScope(); try { return func.call(cx, scope, thisObj, args); } catch (RhinoException re) { throw Context.reportRuntimeError(re.getMessage()); } }
@Override public Object invokeMethod(Object thiz, final String name, final Object... args) throws ScriptException, NoSuchMethodException { if (thiz == null) { throw new java.lang.IllegalArgumentException("thiz is null!"); } if (name == null) { throw new java.lang.IllegalArgumentException("method name is null"); } if (!(thiz instanceof Scriptable)) { thiz = Context.toObject(thiz, topLevel); } final Scriptable localScope = (Scriptable) thiz; final Object obj = ScriptableObject.getProperty(localScope, name); if (!(obj instanceof org.mozilla.javascript.Function)) { throw new NoSuchMethodException("no such method: " + name); } return callInContext((cx) -> { final org.mozilla.javascript.Function func = (org.mozilla.javascript.Function) obj; Scriptable parentScope = func.getParentScope(); if (parentScope == null) { parentScope = topLevelProto(); } Object result = func.call(cx, parentScope, localScope, wrapArguments(args)); return unwrapReturnValue(result); }); }
private Object call(Function func, Object[] args) { Context cx = Context.getCurrentContext(); Scriptable thisObj = getAdaptee(); Scriptable scope = func.getParentScope(); try { return func.call(cx, scope, thisObj, args); } catch (RhinoException re) { throw Context.reportRuntimeError(re.getMessage()); } }
private Object call(Function func, Object[] args) { Context cx = Context.getCurrentContext(); Scriptable thisObj = getAdaptee(); Scriptable scope = func.getParentScope(); try { return func.call(cx, scope, thisObj, args); } catch (RhinoException re) { throw Context.reportRuntimeError(re.getMessage()); } }
Scriptable parentScope = func.getParentScope(); if (parentScope == null) { parentScope = topLevelProto();
Scriptable scope = method.getParentScope(); if (scope == null) { scope = getGlobal();
final Scriptable scope = f.getParentScope(); if (argsToWrap == 0) { return Context.call(factory, f, scope, thisObj, args);
final Scriptable scope = f.getParentScope(); if (argsToWrap == 0) { return Context.call(factory, f, scope, thisObj, args);
Function f = (Function)getter; Context cx = Context.getContext(); return f.call(cx, f.getParentScope(), start, ScriptRuntime.emptyArgs);
final Scriptable scope = f.getParentScope(); if (argsToWrap == 0) { return Context.call(factory, f, scope, thisObj, args);
Function f = (Function)getter; Context cx = Context.getContext(); return f.call(cx, f.getParentScope(), start, ScriptRuntime.emptyArgs);