diff --git a/mozilla/mailnews/base/src/nsMsgDBView.cpp b/mozilla/mailnews/base/src/nsMsgDBView.cpp index a34232f17d3..f0677399d26 100644 --- a/mozilla/mailnews/base/src/nsMsgDBView.cpp +++ b/mozilla/mailnews/base/src/nsMsgDBView.cpp @@ -2267,19 +2267,19 @@ nsMsgDBView::ApplyCommandToIndices(nsMsgViewCommandTypeValue command, nsMsgViewI if (command == nsMsgViewCommandType::junk) { - // append this batch of junk message indices to the - // array of junk message indices to be acted upon - // once OnMessageClassified() is run for the last message - // - // note: although message classification is done - // asynchronously, it is not done in a different thread, - // so the manipulations of mJunkIndices here and in - // OnMessageClassified() cannot interrupt each other - // - mNumJunkIndices += numIndices; - mJunkIndices = (nsMsgViewIndex *)nsMemory::Realloc(mJunkIndices, mNumJunkIndices * sizeof(nsMsgViewIndex)); - memcpy(mJunkIndices + (mNumJunkIndices - numIndices), indices, numIndices * sizeof(nsMsgViewIndex)); - + // append this batch of junk message indices to the + // array of junk message indices to be acted upon + // once OnMessageClassified() is run for the last message + // + // note: although message classification is done + // asynchronously, it is not done in a different thread, + // so the manipulations of mJunkIndices here and in + // OnMessageClassified() cannot interrupt each other + // + mNumJunkIndices += numIndices; + mJunkIndices = (nsMsgViewIndex *)nsMemory::Realloc(mJunkIndices, mNumJunkIndices * sizeof(nsMsgViewIndex)); + memcpy(mJunkIndices + (mNumJunkIndices - numIndices), indices, numIndices * sizeof(nsMsgViewIndex)); + // save the last URI, so that OnMessageClassified() // will know when the classification it runs after // is the last one; if the classification of previously-marked @@ -2354,7 +2354,7 @@ nsMsgDBView::ApplyCommandToIndices(nsMsgViewCommandTypeValue command, nsMsgViewI } m_folder->EnableNotifications(nsIMsgFolder::allMessageCountNotifications, PR_TRUE, PR_TRUE /*dbBatching*/); - + if (thisIsImapFolder) { imapMessageFlagsType flags = kNoImapMsgFlag; @@ -2744,8 +2744,8 @@ nsMsgDBView::OnMessageClassified(const char *aMsgURI, // the first call of this function if (aClassification == nsIJunkMailPlugin::GOOD) return NS_OK; - - NS_ASSERTION(mJunkIndices != nsnull, "the classification of a manually-marked junk message has been classified as junk, yet there seem to be no such outstanding messages"); + + NS_ASSERTION(mJunkIndices != nsnull, "the classification of a manually-marked junk message has been classified as junk, yet there seem to be no such outstanding messages"); if ( mLastJunkURIInBatch.Equals(aMsgURI) ) {