public Object executeScriptWithContinuations(Script script,
            Scriptable scope)
        throws ContinuationPending
    {
        if (!(script instanceof InterpretedFunction) ||
            !((InterpretedFunction)script).isScript())
        {
            // Can only be applied to scripts
            throw new IllegalArgumentException("Script argument was not" +
                    " a script or was not created by interpreted mode ");
        }
        return callFunctionWithContinuations((InterpretedFunction) script,
                scope, ScriptRuntime.emptyArgs);
    }
public Object executeScriptWithContinuations ( Script script , Scriptable scope ) throws ContinuationPending { if ( ! ( script instanceof InterpretedFunction ) || ! ( ( InterpretedFunction ) script ) . isScript ( ) ) { throw new IllegalArgumentException ( "Script argument was not" + " a script or was not created by interpreted mode " ) ; } return callFunctionWithContinuations ( ( InterpretedFunction ) script , scope , ScriptRuntime . emptyArgs ) ; }
Execute script that may pause execution by capturing a continuation.
Caller must be prepared to catch a ContinuationPending exception
and resume execution by calling
{@link #resumeContinuation(Object, Scriptable, Object)}.
@param script The script to execute. Script must have been compiled
with interpreted mode (optimization level -1)
@param scope The scope to execute the script against
@throws ContinuationPending if the script calls a function that results
in a call to {@link #captureContinuation()}
@since 1.7 Release 2