if (mCurKey != nsMsgKey_None) { nsMsgKey msgKey = nsMsgKey_None; nsresult rv = mThread->GetChildHdrAt(0, &mResultHdr); if (NS_SUCCEEDED(rv) && mResultHdr) {    mResultHdr->GetMessageKey(&msgKey); if (msgKey != mCurKey) mDone = PR_TRUE;  NS_RELEASE(mResultHdr); mResultHdr = nsnull;  } mChildIndex = 1; }
nsMsgThreadEnumerator::nsMsgThreadEnumerator(nsMsgThread *thread, nsMsgKey startKey,                                     nsMsgThreadEnumeratorFilter filter, void* closure)    : mRowCursor(nsnull), mResultHdr(nsnull), mDone(PR_FALSE),      mFilter(filter), mClosure(closure){    NS_INIT_REFCNT();	mCurKey = startKey;	mChildIndex = 0;	mThread = thread;    NS_ADDREF(thread);}