m_folder->NotifyCompactCompleted(); ReleaseFolderLock();
nsFolderCompactState::OnStopRequest(nsIChannel *channel, nsISupports *ctxt,                                    nsresult status,                                     const PRUnichar *errorMsg){  nsresult rv = status;  nsCOMPtr<nsIMessage> message;  nsCOMPtr<nsIDBMessage> dbMessage;  nsCOMPtr<nsIURI> uri;  nsCOMPtr<nsIMsgDBHdr> msgHdr;  nsCOMPtr<nsIMsgDBHdr> newMsgHdr;  if (NS_FAILED(rv)) goto done;  uri = do_QueryInterface(ctxt, &rv);  if (NS_FAILED(rv)) goto done;  rv = GetMessage(getter_AddRefs(message));  if (NS_FAILED(rv)) goto done;  dbMessage = do_QueryInterface(message, &rv);  if (NS_FAILED(rv)) goto done;  rv = dbMessage->GetMsgDBHdr(getter_AddRefs(msgHdr));  if (NS_FAILED(rv)) goto done;    // okay done with the current message; copying the existing message header    // to the new database  m_db->CopyHdrFromExistingHdr(m_newKey, msgHdr,                               getter_AddRefs(newMsgHdr));  m_db->Commit(nsMsgDBCommitType::kLargeCommit);    // advance to next message   m_curIndex ++;  if (m_curIndex >= m_size)  {    // no more to copy finish it up    FinishCompact();    Release(); // kill self  }  else  {    m_messageUri.SetLength(0); // clear the previous message uri    rv = nsBuildLocalMessageURI(m_baseMessageUri, m_keyArray[m_curIndex],                                m_messageUri);    if (NS_FAILED(rv)) goto done;    rv = m_messageService->CopyMessage(m_messageUri, this, PR_FALSE, nsnull,                                       nsnull);      }done:  if (NS_FAILED(rv)) {    m_status = rv; // set the status to rv so the destructor can remove the                   // temp folder and database    Release(); // kill self    return rv;  }  return rv;}