Example #1
0
JSDLW_RawToProcessedLineNumber(JSDContext* jsdc, JSDScript* jsdscript,
                               uintN lineIn, uintN* lineOut)
{
    JSD_ASSERT_VALID_CONTEXT(jsdc);
    JSD_ASSERT_VALID_SCRIPT(jsdscript);
    return jsdlw_RawToProcessedLineNumber(jsdc, jsdscript, lineIn, lineOut);
}
Example #2
0
uintptr_t
jsd_GetClosestPC(JSDContext* jsdc, JSDScript* jsdscript, unsigned line)
{
    uintptr_t pc;
    JSCrossCompartmentCall *call;

    if( !jsdscript )
        return 0;
#ifdef LIVEWIRE
    if( jsdscript->lwscript )
    {
        unsigned newline;
        jsdlw_RawToProcessedLineNumber(jsdc, jsdscript, line, &newline);
        if( line != newline )
            line = newline;
    }
#endif

    call = JS_EnterCrossCompartmentCallScript(jsdc->dumbContext, jsdscript->script);
    if(!call)
        return 0;
    pc = (uintptr_t) JS_LineNumberToPC(jsdc->dumbContext, jsdscript->script, line );
    JS_LeaveCrossCompartmentCall(call);
    return pc;
}
Example #3
0
jsuword
jsd_GetClosestPC(JSDContext* jsdc, JSDScript* jsdscript, uintN line)
{
#ifdef LIVEWIRE
    if( jsdscript && jsdscript->lwscript )
    {
        uintN newline;
        jsdlw_RawToProcessedLineNumber(jsdc, jsdscript, line, &newline);
        if( line != newline )
            line = newline;
    }
#endif

    return (jsuword) JS_LineNumberToPC(jsdc->dumbContext, 
                                       jsdscript->script, line );
}