Java 类org.mozilla.javascript.debug.Debugger 实例源码

项目:birt    文件:ReportVM.java   
public void detach( Context cx )
{
    if ( !isTerminated( ) )
    {
        terminate( );
    }

    Debugger dbg = cx.getDebugger( );

    if ( dbg instanceof JsDebugger )
    {
        cx.setDebugger( null, null );
    }

    isAttached = false;

    if ( jsDebugger != null )
    {
        jsDebugger.dispose( );
        jsDebugger = null;
    }

    if ( factoryListener != null )
    {
        cx.getFactory( ).removeListener( factoryListener );
        factoryListener = null;
    }
}
项目:birt    文件:JsUtil.java   
static boolean check( String source, int lineNumber )
{
    Context cx = Context.enter( );

    Debugger oldDebugger = cx.getDebugger( );
    Object oldContext = cx.getDebuggerContextData( );
    boolean oldGenerate = cx.isGeneratingDebug( );
    int oldLevel = cx.getOptimizationLevel( );

    try
    {
        BreakableSourceChecker checker = new BreakableSourceChecker( );
        checker.lineNumber = lineNumber + 2;

        cx.setDebugger( checker, null );
        cx.setGeneratingDebug( true );
        cx.setOptimizationLevel( -1 );

        cx.compileString( addHeader( source ), "<check>", 1, null ); //$NON-NLS-1$

        return checker.breakable;
    }
    catch ( Exception e )
    {
        return false;
    }
    finally
    {
        cx.setDebugger( oldDebugger, oldContext );
        cx.setGeneratingDebug( oldGenerate );
        cx.setOptimizationLevel( oldLevel );

        Context.exit( );
    }
}
项目:HL4A    文件:Context.java   
/**
 * Return the current debugger.
 * @return the debugger, or null if none is attached.
 */
public final Debugger getDebugger()
{
    return debugger;
}
项目:whackpad    文件:Context.java   
/**
 * Return the current debugger.
 * @return the debugger, or null if none is attached.
 */
public final Debugger getDebugger()
{
    return debugger;
}
项目:phonk    文件:AppRunnerInterpreter.java   
public void addDebugger(Debugger debugger) {
    rhino.setDebugger(debugger, scope);
}
项目:TaleCraft    文件:Context.java   
/**
 * Return the current debugger.
 * @return the debugger, or null if none is attached.
 */
public final Debugger getDebugger()
{
    return debugger;
}
项目:code404    文件:Context.java   
/**
 * Return the current debugger.
 * @return the debugger, or null if none is attached.
 */
public final Debugger getDebugger()
{
    return debugger;
}
项目:rhino-jscover    文件:Context.java   
/**
 * Return the current debugger.
 * @return the debugger, or null if none is attached.
 */
public final Debugger getDebugger()
{
    return debugger;
}
项目:LoboEvolution    文件:Context.java   
/**
 * Return the current debugger.
 * @return the debugger, or null if none is attached.
 */
public final Debugger getDebugger()
{
    return debugger;
}
项目:astor    文件:Context.java   
/**
 * Return the current debugger.
 * @return the debugger, or null if none is attached.
 */
public final Debugger getDebugger()
{
    return debugger;
}
项目:Rhino-Prov-Mod    文件:Context.java   
/**
 * Return the current debugger.
 * @return the debugger, or null if none is attached.
 */
public final Debugger getDebugger()
{
    return debugger;
}
项目:android-js    文件:Context.java   
/**
 * Return the current debugger.
 * @return the debugger, or null if none is attached.
 */
public final Debugger getDebugger()
{
    return debugger;
}
项目:birt    文件:JsDebugFrame.java   
public synchronized VMValue evaluate( String expression )
{
    int currentState = debugger.currentState( );

    if ( currentState == VM_TERMINATED )
    {
        return null;
    }

    JsValue result = null;
    Debugger oldDebugger = cx.getDebugger( );
    Object oldContextData = cx.getDebuggerContextData( );
    int oldLevel = cx.getOptimizationLevel( );

    cx.setDebugger( null, null );
    cx.setOptimizationLevel( -1 );
    cx.setGeneratingDebug( false );

    try
    {
        Callable script = (Callable) cx.compileString( expression,
                EVALUATOR_LITERAL,
                0,
                null );
        Object val = script.call( cx,
                scope,
                thisObj,
                ScriptRuntime.emptyArgs );

        if ( val == Undefined.instance )
        {
            result = new JsValue( UNDEFINED_LITERAL, UNDEFINED_TYPE );
        }
        else
        {
            result = new JsValue( val );
        }
    }
    catch ( Exception ex )
    {
        result = new JsValue( ex.getMessage( ), EXCEPTION_TYPE );
    }
    finally
    {
        cx.setGeneratingDebug( true );
        cx.setOptimizationLevel( oldLevel );
        cx.setDebugger( oldDebugger, oldContextData );
    }

    return result;
}
项目:closure-compiler-old    文件:Context.java   
/**
 * Return the current debugger.
 * @return the debugger, or null if none is attached.
 */
public final Debugger getDebugger()
{
    return debugger;
}
项目:closure-compiler-copy    文件:Context.java   
/**
 * Return the current debugger.
 * @return the debugger, or null if none is attached.
 */
public final Debugger getDebugger()
{
    return debugger;
}
项目:HL4A    文件:Context.java   
/**
 * Set the associated debugger.
 * @param debugger the debugger to be used on callbacks from
 * the engine.
 * @param contextData arbitrary object that debugger can use to store
 *        per Context data.
 */
public final void setDebugger(Debugger debugger, Object contextData)
{
    if (sealed) onSealedMutation();
    this.debugger = debugger;
    debuggerData = contextData;
}
项目:whackpad    文件:Context.java   
/**
 * Set the associated debugger.
 * @param debugger the debugger to be used on callbacks from
 * the engine.
 * @param contextData arbitrary object that debugger can use to store
 *        per Context data.
 */
public final void setDebugger(Debugger debugger, Object contextData)
{
    if (sealed) onSealedMutation();
    this.debugger = debugger;
    debuggerData = contextData;
}
项目:TaleCraft    文件:Context.java   
/**
 * Set the associated debugger.
 * @param debugger the debugger to be used on callbacks from
 * the engine.
 * @param contextData arbitrary object that debugger can use to store
 *        per Context data.
 */
public final void setDebugger(Debugger debugger, Object contextData)
{
    if (sealed) onSealedMutation();
    this.debugger = debugger;
    debuggerData = contextData;
}
项目:code404    文件:Context.java   
/**
 * Set the associated debugger.
 * @param debugger the debugger to be used on callbacks from
 * the engine.
 * @param contextData arbitrary object that debugger can use to store
 *        per Context data.
 */
public final void setDebugger(Debugger debugger, Object contextData)
{
    if (sealed) onSealedMutation();
    this.debugger = debugger;
    debuggerData = contextData;
}
项目:rhino-jscover    文件:Context.java   
/**
 * Set the associated debugger.
 * @param debugger the debugger to be used on callbacks from
 * the engine.
 * @param contextData arbitrary object that debugger can use to store
 *        per Context data.
 */
public final void setDebugger(Debugger debugger, Object contextData)
{
    if (sealed) onSealedMutation();
    this.debugger = debugger;
    debuggerData = contextData;
}
项目:LoboEvolution    文件:Context.java   
/**
 * Set the associated debugger.
 * @param debugger the debugger to be used on callbacks from
 * the engine.
 * @param contextData arbitrary object that debugger can use to store
 *        per Context data.
 */
public final void setDebugger(Debugger debugger, Object contextData)
{
    if (sealed) onSealedMutation();
    this.debugger = debugger;
    debuggerData = contextData;
}
项目:astor    文件:Context.java   
/**
 * Set the associated debugger.
 * @param debugger the debugger to be used on callbacks from
 * the engine.
 * @param contextData arbitrary object that debugger can use to store
 *        per Context data.
 */
public final void setDebugger(Debugger debugger, Object contextData)
{
    if (sealed) onSealedMutation();
    this.debugger = debugger;
    debuggerData = contextData;
}
项目:Rhino-Prov-Mod    文件:Context.java   
/**
 * Set the associated debugger.
 * @param debugger the debugger to be used on callbacks from
 * the engine.
 * @param contextData arbitrary object that debugger can use to store
 *        per Context data.
 */
public final void setDebugger(Debugger debugger, Object contextData)
{
    if (sealed) onSealedMutation();
    this.debugger = debugger;
    debuggerData = contextData;
}
项目:android-js    文件:Context.java   
/**
 * Set the associated debugger.
 * @param debugger the debugger to be used on callbacks from
 * the engine.
 * @param contextData arbitrary object that debugger can use to store
 *        per Context data.
 */
public final void setDebugger(Debugger debugger, Object contextData)
{
    if (sealed) onSealedMutation();
    this.debugger = debugger;
    debuggerData = contextData;
}
项目:closure-compiler-old    文件:Context.java   
/**
 * Set the associated debugger.
 * @param debugger the debugger to be used on callbacks from
 * the engine.
 * @param contextData arbitrary object that debugger can use to store
 *        per Context data.
 */
public final void setDebugger(Debugger debugger, Object contextData)
{
    if (sealed) onSealedMutation();
    this.debugger = debugger;
    debuggerData = contextData;
}
项目:closure-compiler-copy    文件:Context.java   
/**
 * Set the associated debugger.
 * @param debugger the debugger to be used on callbacks from
 * the engine.
 * @param contextData arbitrary object that debugger can use to store
 *        per Context data.
 */
public final void setDebugger(Debugger debugger, Object contextData)
{
    if (sealed) onSealedMutation();
    this.debugger = debugger;
    debuggerData = contextData;
}