!JSD_IS_DEBUG_ENABLED(jsdc, frame->jsdscript)))
frame->jsdscript && !JSD_IS_DEBUG_ENABLED(jsdc, frame->jsdscript)))
jsd_NewThreadState(JSDContext* jsdc, JSContext *cx ){    JSDThreadState* jsdthreadstate;    JSStackFrame *  iter = NULL;    JSStackFrame *  fp;    jsdthreadstate = (JSDThreadState*)calloc(1, sizeof(JSDThreadState));    if( ! jsdthreadstate )        return NULL;    jsdthreadstate->context = cx;    jsdthreadstate->thread = JSD_CURRENT_THREAD();    JS_INIT_CLIST(&jsdthreadstate->stack);    jsdthreadstate->stackDepth = 0;    while( NULL != (fp = JS_FrameIterator(cx, &iter)) )    {        JSScript* script = JS_GetFrameScript(cx, fp);        jsuword  pc = (jsuword) JS_GetFramePC(cx, fp);        /*         * don't construct a JSDStackFrame for dummy frames (those without a         * |this| object, or native frames, if JSD_INCLUDE_NATIVE_FRAMES         * isn't set.         */        if (JS_GetFrameThis(cx, fp) &&            ((jsdc->flags & JSD_INCLUDE_NATIVE_FRAMES) ||             !JS_IsNativeFrame(cx, fp)))        {            JSDStackFrameInfo *frame;            frame = _addNewFrame( jsdc, jsdthreadstate, script, pc, fp );            if ((jsdthreadstate->stackDepth == 0 && !frame) ||                (jsdthreadstate->stackDepth == 1 && frame &&                 !JSD_IS_DEBUG_ENABLED(jsdc, frame->jsdscript)))            {                /*                 * if we failed to create the first frame, or the top frame                 * is not enabled for debugging, fail the entire thread state.                 */                JS_INIT_CLIST(&jsdthreadstate->links);                jsd_DestroyThreadState(jsdc, jsdthreadstate);                return NULL;            }        }    }    if (jsdthreadstate->stackDepth == 0)    {        free(jsdthreadstate);        return NULL;    }        JSD_LOCK_THREADSTATES(jsdc);    JS_APPEND_LINK(&jsdthreadstate->links, &jsdc->threadsStates);    JSD_UNLOCK_THREADSTATES(jsdc);    return jsdthreadstate;}