if(PR_FAILURE == PR_NewThreadPrivateIndex(&index, xpc_ThreadDTORCB))
if(PR_FAILURE == PR_NewThreadPrivateIndex(&index, xpc_StackDtorCB))
GetMyStack(){    nsDeque* myStack;    static PRUintn index = -1;    if(-1 == index)    {        if(PR_FAILURE == PR_NewThreadPrivateIndex(&index, xpc_ThreadDTORCB))        {            NS_ASSERTION(0, "PR_NewThreadPrivateIndex failed!");            return NULL;        }    }    myStack = (nsDeque*) PR_GetThreadPrivate(index);    if(!myStack)    {        if(NULL != (myStack = new nsDeque(nsnull)))        {            if(PR_FAILURE == PR_SetThreadPrivate(index, myStack))            {                NS_ASSERTION(0, "PR_SetThreadPrivate failed!");                delete myStack;                myStack = NULL;            }        }        else        {            NS_ASSERTION(0, "new nsDeque failed!");        }    }    return myStack;}        