mFilter(filter), mClosure(closure)
mFilter(filter), mClosure(closure), mFoundChildren(PR_FALSE)
nsMsgThreadEnumerator::nsMsgThreadEnumerator(nsMsgThread *thread, nsMsgKey startKey,                                     nsMsgThreadEnumeratorFilter filter, void* closure)    : mRowCursor(nsnull), mDone(PR_FALSE),      mFilter(filter), mClosure(closure){    NS_INIT_REFCNT();	mThreadParentKey = startKey;	mChildIndex = 0;	mThread = thread;	mNeedToPrefetch = PR_TRUE;	mFirstMsgKey = nsMsgKey_None;	nsresult rv = mThread->GetRootHdr(nsnull, getter_AddRefs(mResultHdr));	if (NS_SUCCEEDED(rv) && mResultHdr)		mResultHdr->GetMessageKey(&mFirstMsgKey);	PRUint32 numChildren;	mThread->GetNumChildren(&numChildren);	if (mThreadParentKey != nsMsgKey_None)	{		nsMsgKey msgKey = nsMsgKey_None;		PRUint32 childIndex = 0;		for (childIndex = 0; childIndex < numChildren; childIndex++)		{			rv = mThread->GetChildHdrAt(childIndex, getter_AddRefs(mResultHdr));			if (NS_SUCCEEDED(rv) && mResultHdr)			{				mResultHdr->GetMessageKey(&msgKey);				if (msgKey == startKey)				{					mChildIndex = MsgKeyFirstChildIndex(msgKey);					mDone = (mChildIndex < 0);					break;				}				if (mDone)					break;			}			else				NS_ASSERTION(PR_FALSE, "couldn't get child from thread");		}	}#ifdef DEBUG_bienvenu1		nsCOMPtr <nsIMsgDBHdr> child;		for (PRUint32 childIndex = 0; childIndex < numChildren; childIndex++)		{			rv = mThread->GetChildHdrAt(childIndex, getter_AddRefs(child));			if (NS_SUCCEEDED(rv) && child)			{				nsMsgKey threadParent;				nsMsgKey msgKey;				// we're only doing one level of threading, so check if caller is				// asking for children of the first message in the thread or not.				// if not, we will tell him there are no children.				child->GetMessageKey(&msgKey);				child->GetThreadParent(&threadParent);				printf("index = %ld key = %ld parent = %lx\n", childIndex, msgKey, threadParent);			}		}#endif    NS_ADDREF(thread);}