Bug 1300002 - Port bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=jorgk.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 02 Sep 2016 12:14:19 +1000
changeset 19966 e5a9b86ecf2d4ed5bba845e833c1ed6bf1ac7952
parent 19965 023e39ec99df60521ac5c08446bce39f0f445165
child 19967 5831664662c8e87f3cebbe28b17afdcd84efaa3d
push id12246
push usermozilla@jorgk.com
push dateFri, 02 Sep 2016 20:33:33 +0000
treeherdercomm-central@e5a9b86ecf2d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
bugs1300002, 1299727
Bug 1300002 - Port bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=jorgk.
mailnews/base/search/src/nsMsgFilterService.cpp
mailnews/base/src/nsMsgAccount.cpp
mailnews/base/src/nsMsgDBView.cpp
mailnews/base/src/nsMsgFolderCompactor.cpp
mailnews/base/util/nsMsgDBFolder.cpp
mailnews/compose/src/nsMsgCompose.cpp
mailnews/compose/src/nsMsgComposeService.cpp
mailnews/db/msgdb/src/nsMsgDatabase.cpp
mailnews/db/msgdb/src/nsMsgThread.cpp
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/imap/src/nsImapProtocol.cpp
mailnews/imap/src/nsImapUrl.cpp
mailnews/local/src/nsLocalMailFolder.cpp
mailnews/local/src/nsMsgMaildirStore.cpp
mailnews/local/src/nsParseMailbox.cpp
--- a/mailnews/base/search/src/nsMsgFilterService.cpp
+++ b/mailnews/base/search/src/nsMsgFilterService.cpp
@@ -410,17 +410,17 @@ nsresult nsMsgFilterAfterTheFact::RunNex
     rv = m_searchSession->AddScopeTerm(searchScope, m_curFolder);
     CONTINUE_IF_FAILURE(rv, "Failed to add scope term");
     m_nextAction = 0;
     rv = m_searchSession->Search(m_msgWindow);
     CONTINUE_IF_FAILURE(rv, "Search failed");
     return NS_OK; // OnSearchDone will continue
   }
   m_curFilter = nullptr;
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Search failed");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Search failed");
   return AdvanceToNextFolder();
 }
 
 nsresult nsMsgFilterAfterTheFact::AdvanceToNextFolder()
 {
   nsresult rv = NS_OK;
   // Advance through folders, making sure m_curFolder is null on errors
   while (true)
@@ -1082,17 +1082,17 @@ nsresult nsMsgApplyFiltersToMessages::Ru
     {
       m_nextAction = 0;
       rv = ApplyFilter();
       if (NS_SUCCEEDED(rv))
         return NS_OK; // async callback will continue, or we are done.
     }
   }
   m_curFilter = nullptr;
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to run filters");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Failed to run filters");
   // We expect the failure is already recorded through one of the macro
   // expressions, that will have console logging added to them.
   // So an additional console warning is not needed here.
   return AdvanceToNextFolder();
 }
 
 NS_IMETHODIMP nsMsgFilterService::ApplyFilters(nsMsgFilterTypeType aFilterType,
                                                nsIArray *aMsgHdrList,
--- a/mailnews/base/src/nsMsgAccount.cpp
+++ b/mailnews/base/src/nsMsgAccount.cpp
@@ -58,17 +58,17 @@ nsMsgAccount::GetIncomingServer(nsIMsgIn
 {
   NS_ENSURE_ARG_POINTER(aIncomingServer);
 
   // create the incoming server lazily
   if (!mTriedToGetServer && !m_incomingServer) {
     mTriedToGetServer = true;
     // ignore the error (and return null), but it's still bad so warn
     mozilla::DebugOnly<nsresult> rv = createIncomingServer();
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "couldn't lazily create the server\n");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "couldn't lazily create the server\n");
   }
 
   NS_IF_ADDREF(*aIncomingServer = m_incomingServer);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
--- a/mailnews/base/src/nsMsgDBView.cpp
+++ b/mailnews/base/src/nsMsgDBView.cpp
@@ -7390,18 +7390,18 @@ nsMsgDBView::GetMsgToSelectAfterDelete(n
       // save off the first range in case we need it later
       if (i == 0) {
         startFirstRange = startRange;
         endFirstRange = endRange;
       } else {
         // If the tree selection is goofy (eg adjacent or overlapping ranges),
         // complain about it, but don't try and cope.  Just live with the fact
         // that one of the deleted messages is going to end up selected.
-        NS_WARN_IF_FALSE(endFirstRange != startRange,
-                         "goofy tree selection state: two ranges are adjacent!");
+        NS_WARNING_ASSERTION(endFirstRange != startRange,
+                             "goofy tree selection state: two ranges are adjacent!");
       }
       *msgToSelectAfterDelete = std::min(*msgToSelectAfterDelete,
                                        (nsMsgViewIndex)startRange);
     }
 
     // Multiple selection either using Ctrl, Shift, or one of the affordances
     // to select an entire thread.
     isMultiSelect = (selectionCount > 1 || (endRange-startRange) > 0);
--- a/mailnews/base/src/nsMsgFolderCompactor.cpp
+++ b/mailnews/base/src/nsMsgFolderCompactor.cpp
@@ -497,17 +497,17 @@ nsFolderCompactState::FinishCompact()
   m_folder->ForceDBClosed();
 
   nsCOMPtr<nsIFile> cloneFile;
   int64_t fileSize = 0;
   rv = m_file->Clone(getter_AddRefs(cloneFile));
   if (NS_SUCCEEDED(rv))
     rv = cloneFile->GetFileSize(&fileSize);
   bool tempFileRightSize = ((uint64_t)fileSize == m_totalMsgSize);
-  NS_WARN_IF_FALSE(tempFileRightSize, "temp file not of expected size in compact");
+  NS_WARNING_ASSERTION(tempFileRightSize, "temp file not of expected size in compact");
 
   bool folderRenameSucceeded = false;
   bool msfRenameSucceeded = false;
   if (NS_SUCCEEDED(rv) && tempFileRightSize)
   {
     // First we're going to try and move the old summary file out the way.
     // We don't delete it yet, as we want to keep the files in sync.
     nsCOMPtr<nsIFile> tempSummaryFile;
@@ -517,35 +517,35 @@ nsFolderCompactState::FinishCompact()
 
     nsAutoCString tempSummaryFileName;
     if (NS_SUCCEEDED(rv))
       rv = tempSummaryFile->GetNativeLeafName(tempSummaryFileName);
 
     if (NS_SUCCEEDED(rv))
       rv = oldSummaryFile->MoveToNative((nsIFile*) nullptr, tempSummaryFileName);
 
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "error moving compacted folder's db out of the way");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "error moving compacted folder's db out of the way");
     if (NS_SUCCEEDED(rv))
     {
       // Now we've successfully moved the summary file out the way, try moving
       // the newly compacted message file over the old one.
       rv = m_file->MoveToNative((nsIFile *) nullptr, folderName);
       folderRenameSucceeded = NS_SUCCEEDED(rv);
-      NS_WARN_IF_FALSE(folderRenameSucceeded, "error renaming compacted folder");
+      NS_WARNING_ASSERTION(folderRenameSucceeded, "error renaming compacted folder");
       if (folderRenameSucceeded)
       {
         // That worked, so land the new summary file in the right place.
         nsCOMPtr<nsIFile> renamedCompactedSummaryFile;
         newSummaryFile->Clone(getter_AddRefs(renamedCompactedSummaryFile));
         if (renamedCompactedSummaryFile)
         {
           rv = renamedCompactedSummaryFile->MoveToNative((nsIFile *) nullptr, dbName);
           msfRenameSucceeded = NS_SUCCEEDED(rv);
         }
-        NS_WARN_IF_FALSE(msfRenameSucceeded, "error renaming compacted folder's db");
+        NS_WARNING_ASSERTION(msfRenameSucceeded, "error renaming compacted folder's db");
       }
 
       if (!msfRenameSucceeded)
       {
         // Do our best to put the summary file back to where it was
         rv = tempSummaryFile->MoveToNative((nsIFile*) nullptr, dbName);
         if (NS_SUCCEEDED(rv))
           tempSummaryFile = nullptr; // flagging that a renamed db no longer exists
@@ -553,19 +553,19 @@ nsFolderCompactState::FinishCompact()
           NS_WARNING("error restoring uncompacted folder's db");
       }
     }
     // We don't want any temporarily renamed summary file to lie around
     if (tempSummaryFile)
       tempSummaryFile->Remove(false);
   }
 
-  NS_WARN_IF_FALSE(msfRenameSucceeded, "compact failed");
+  NS_WARNING_ASSERTION(msfRenameSucceeded, "compact failed");
   nsresult rvReleaseFolderLock = ReleaseFolderLock();
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rvReleaseFolderLock),"folder lock not released successfully");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rvReleaseFolderLock),"folder lock not released successfully");
   rv = NS_FAILED(rv) ? rv : rvReleaseFolderLock;
 
   // Cleanup of nstmp-named compacted files if failure
   if (!folderRenameSucceeded)
   {
     // remove the abandoned compacted version with the wrong name
     m_file->Remove(false);
   }
@@ -625,18 +625,18 @@ GetBaseStringBundle(nsIStringBundle **aB
   NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
   nsCOMPtr<nsIStringBundle> bundle;
   return bundleService->CreateBundle(
     "chrome://messenger/locale/messenger.properties", aBundle);
 }
 
 void nsFolderCompactState::CompactCompleted(nsresult exitCode)
 {
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(exitCode),
-                   "nsFolderCompactState::CompactCompleted failed");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(exitCode),
+                       "nsFolderCompactState::CompactCompleted failed");
   if (m_listener)
     m_listener->OnStopRunningUrl(nullptr, exitCode);
   ShowDoneStatus();
 }
 
 nsresult
 nsFolderCompactState::ReleaseFolderLock()
 {
--- a/mailnews/base/util/nsMsgDBFolder.cpp
+++ b/mailnews/base/util/nsMsgDBFolder.cpp
@@ -874,18 +874,18 @@ nsMsgDBFolder::GetMsgInputStream(nsIMsgD
   NS_ENSURE_SUCCESS(rv, rv);
   int64_t offset;
   rv = msgStore->GetMsgInputStream(this, storeToken, &offset, aMsgHdr, aReusable,
                                    aInputStream);
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsISeekableStream> seekableStream(do_QueryInterface(*aInputStream));
   if (seekableStream)
     rv = seekableStream->Seek(PR_SEEK_SET, offset);
-  NS_WARN_IF_FALSE(seekableStream || !offset,
-                   "non-zero offset w/ non-seekable stream");
+  NS_WARNING_ASSERTION(seekableStream || !offset,
+                       "non-zero offset w/ non-seekable stream");
   return rv;
 }
 
 // path coming in is the root path without the leaf name,
 // on the way out, it's the whole path.
 nsresult nsMsgDBFolder::CreateFileForDB(const nsAString& userLeafName, nsIFile *path, nsIFile **dbFile)
 {
   NS_ENSURE_ARG_POINTER(dbFile);
--- a/mailnews/compose/src/nsMsgCompose.cpp
+++ b/mailnews/compose/src/nsMsgCompose.cpp
@@ -1616,17 +1616,17 @@ NS_IMETHODIMP nsMsgCompose::InitEditor(n
   NS_ENSURE_SUCCESS(docShell->GetContentViewer(getter_AddRefs(childCV)), NS_ERROR_FAILURE);
   if (childCV)
   {
     // SetForceCharacterSet will complain when passing a charset (label) which doesn't
     // correspond to a Gecko-canonical name. If we can't set our charset, we just keep going.
     // Previous behaviour was that SetForceCharacterSet() didn't check.
     // XXX To be revisited in bug 1297118.
     rv = childCV->SetForceCharacterSet(msgCharSet);
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "SetForceCharacterSet() failed");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "SetForceCharacterSet() failed");
   }
 
   // This is what used to be done in mDocumentListener,
   //   nsMsgDocumentStateListener::NotifyDocumentCreated()
   bool quotingToFollow = false;
   GetQuotingToFollow(&quotingToFollow);
   if (quotingToFollow)
     return BuildQuotedMessageAndSignature();
--- a/mailnews/compose/src/nsMsgComposeService.cpp
+++ b/mailnews/compose/src/nsMsgComposeService.cpp
@@ -723,17 +723,17 @@ NS_IMETHODIMP nsMsgTemplateReplyHelper::
   compFields->SetSubject(subject);
   compFields->SetRawHeader("Auto-Submitted", NS_LITERAL_CSTRING("auto-replied"), nullptr);
 
   nsCString charset;
   rv = mTemplateHdr->GetCharset(getter_Copies(charset));
   NS_ENSURE_SUCCESS(rv, rv);
   compFields->SetCharacterSet(charset.get());
   rv = nsMsgI18NConvertToUnicode(charset.get(), mTemplateBody, body);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "couldn't convert templ body to unicode");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "couldn't convert templ body to unicode");
   compFields->SetBody(body);
 
   nsCString msgUri;
   nsCOMPtr <nsIMsgFolder> folder;
   mHdrToReplyTo->GetFolder(getter_AddRefs(folder));
   folder->GetUriForMsg(mHdrToReplyTo, msgUri);
   // populate the compose params
   pMsgComposeParams->SetType(nsIMsgCompType::ReplyWithTemplate);
--- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
@@ -77,17 +77,17 @@ nsMsgDBService::nsMsgDBService()
 }
 
 
 nsMsgDBService::~nsMsgDBService()
 {
 #ifdef DEBUG
   // If you hit this warning, it means that some code is holding onto
   // a db at shutdown.
-  NS_WARN_IF_FALSE(!m_dbCache.Length(), "some msg dbs left open");
+  NS_WARNING_ASSERTION(!m_dbCache.Length(), "some msg dbs left open");
   for (uint32_t i = 0; i < m_dbCache.Length(); i++)
   {
     nsMsgDatabase* pMessageDB = m_dbCache.ElementAt(i);
     if (pMessageDB)
       printf("db left open %s\n", (const char *) pMessageDB->m_dbName.get());
   }
 #endif
 }
--- a/mailnews/db/msgdb/src/nsMsgThread.cpp
+++ b/mailnews/db/msgdb/src/nsMsgThread.cpp
@@ -963,20 +963,20 @@ NS_IMETHODIMP nsMsgThread::GetRootHdr(in
 
 nsresult nsMsgThread::ChangeChildCount(int32_t delta)
 {
   nsresult rv;
 
   uint32_t childCount = 0;
   m_mdbDB->RowCellColumnToUInt32(m_metaRow, m_mdbDB->m_threadChildrenColumnToken, childCount);
 
-  NS_WARN_IF_FALSE(childCount != 0 || delta > 0, "child count gone negative");
+  NS_WARNING_ASSERTION(childCount != 0 || delta > 0, "child count gone negative");
   childCount += delta;
 
-  NS_WARN_IF_FALSE((int32_t) childCount >= 0, "child count gone to 0 or below");
+  NS_WARNING_ASSERTION((int32_t) childCount >= 0, "child count gone to 0 or below");
   if ((int32_t) childCount < 0)	// force child count to >= 0
     childCount = 0;
 
   rv = m_mdbDB->UInt32ToRowCellColumn(m_metaRow, m_mdbDB->m_threadChildrenColumnToken, childCount);
   m_numChildren = childCount;
   return rv;
 }
 
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -7593,17 +7593,17 @@ nsImapMailFolder::CopyMessages(nsIMsgFol
   // action, and we should do it pseudo-offline. If it's not
   // user initiated (e.g., mail filters firing), then allowUndo is
   // false, and we should just do the action.
   if (!WeAreOffline() && sameServer && allowUndo) 
   {
     // complete the copy operation as in offline mode
     rv = CopyMessagesOffline(srcFolder, messages, isMove, msgWindow, listener);
 
-    NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "error offline copy");
+    NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "error offline copy");
     // We'll warn if this fails, but we should still try to play back
     // offline ops, because it's possible the copy got far enough to
     // create the offline ops.
 
     // We make sure that the source folder is an imap folder by limiting pseudo-offline 
     // operations to the same imap server. If we extend the code to cover non imap folders 
     // in the future (i.e. imap folder->local folder), then the following downcast
     // will cause either a crash or compiler error. Do not forget to change it accordingly.
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -1175,18 +1175,18 @@ NS_IMETHODIMP nsImapProtocol::OnInputStr
 }
 
 // this is to be called from the UI thread. It sets m_threadShouldDie,
 // and then signals the imap thread, which, when it wakes up, should exit.
 // The imap thread cleanup code will check m_safeToCloseConnection.
 NS_IMETHODIMP
 nsImapProtocol::TellThreadToDie(bool aIsSafeToClose)
 {
-  NS_WARN_IF_FALSE(NS_IsMainThread(),
-                   "TellThreadToDie(aIsSafeToClose) should only be called from UI thread");
+  NS_WARNING_ASSERTION(NS_IsMainThread(),
+                       "TellThreadToDie(aIsSafeToClose) should only be called from UI thread");
   MutexAutoLock mon(mLock);
 
   nsCOMPtr<nsIMsgIncomingServer> me_server = do_QueryReferent(m_server);
   if (me_server)
   {
     nsresult rv;
     nsCOMPtr<nsIImapIncomingServer>
       aImapServer(do_QueryInterface(me_server, &rv));
@@ -1205,18 +1205,18 @@ nsImapProtocol::TellThreadToDie(bool aIs
   readyMon.Notify();
   return NS_OK;
 }
 
 void
 nsImapProtocol::TellThreadToDie()
 {
   nsresult rv = NS_OK;
-  NS_WARN_IF_FALSE(!NS_IsMainThread(),
-                   "TellThreadToDie() should not be called from UI thread");
+  NS_WARNING_ASSERTION(!NS_IsMainThread(),
+                       "TellThreadToDie() should not be called from UI thread");
 
   // prevent re-entering this method because it may lock the UI.
   if (m_inThreadShouldDie)
     return;
   m_inThreadShouldDie = true;
 
   // This routine is called only from the imap protocol thread.
   // The UI thread causes this to be called by calling TellThreadToDie.
@@ -8747,17 +8747,17 @@ nsImapMockChannel::nsImapMockChannel()
   mTryingToReadPart = false;
 }
 
 nsImapMockChannel::~nsImapMockChannel()
 {
   // if we're offline, we may not get to close the channel correctly.
   // we need to do this to send the url state change notification in
   // the case of mem and disk cache reads.
-  NS_WARN_IF_FALSE(NS_IsMainThread(), "should only access mock channel on ui thread");
+  NS_WARNING_ASSERTION(NS_IsMainThread(), "should only access mock channel on ui thread");
   if (!mChannelClosed)
     Close();
 }
 
 nsresult nsImapMockChannel::NotifyStartEndReadFromCache(bool start)
 {
   nsresult rv = NS_OK;
   mReadingFromCache = start;
@@ -9587,18 +9587,18 @@ NS_IMETHODIMP nsImapMockChannel::GetStat
 NS_IMETHODIMP nsImapMockChannel::SetImapProtocol(nsIImapProtocol *aProtocol)
 {
   m_protocol = do_GetWeakReference(aProtocol);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapMockChannel::Cancel(nsresult status)
 {
-  NS_WARN_IF_FALSE(NS_IsMainThread(),
-                   "nsImapMockChannel::Cancel should only be called from UI thread");
+  NS_WARNING_ASSERTION(NS_IsMainThread(),
+                       "nsImapMockChannel::Cancel should only be called from UI thread");
   m_cancelStatus = status;
   nsCOMPtr<nsIImapProtocol> imapProtocol = do_QueryReferent(m_protocol);
 
   // if we aren't reading from the cache and we get canceled...doom our cache entry...
   if (m_url)
   {
     nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(m_url);
     DoomCacheEntry(mailnewsUrl);
--- a/mailnews/imap/src/nsImapUrl.cpp
+++ b/mailnews/imap/src/nsImapUrl.cpp
@@ -1144,26 +1144,26 @@ nsImapUrl::GetMsgFile(nsIFile** aFile)
   NS_IF_ADDREF(*aFile = m_file);
   return NS_OK;
 }
 
 // this method is called from the UI thread..
 NS_IMETHODIMP nsImapUrl::GetMockChannel(nsIImapMockChannel ** aChannel)
 {
   NS_ENSURE_ARG_POINTER(aChannel);
-  NS_WARN_IF_FALSE(NS_IsMainThread(), "should only access mock channel on ui thread");
+  NS_WARNING_ASSERTION(NS_IsMainThread(), "should only access mock channel on ui thread");
   *aChannel = nullptr;
   nsCOMPtr<nsIImapMockChannel> channel(do_QueryReferent(m_channelWeakPtr));
   channel.swap(*aChannel);
   return *aChannel ? NS_OK : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP nsImapUrl::SetMockChannel(nsIImapMockChannel * aChannel)
 {
-  NS_WARN_IF_FALSE(NS_IsMainThread(), "should only access mock channel on ui thread");
+  NS_WARNING_ASSERTION(NS_IsMainThread(), "should only access mock channel on ui thread");
   m_channelWeakPtr = do_GetWeakReference(aChannel);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapUrl::GetAllowContentChange(bool *result)
 {
   NS_ENSURE_ARG_POINTER(result);
   *result = m_allowContentChange;
--- a/mailnews/local/src/nsLocalMailFolder.cpp
+++ b/mailnews/local/src/nsLocalMailFolder.cpp
@@ -770,17 +770,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Dele
 
   nsCOMPtr <nsIFile> summaryFile;
   rv = GetSummaryFile(getter_AddRefs(summaryFile));
   NS_ENSURE_SUCCESS(rv, rv);
 
   //Clean up .sbd folder if it exists.
   // Remove summary file.
   rv = summaryFile->Remove(false);
-  NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Could not delete msg summary file");
+  NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Could not delete msg summary file");
 
   rv = msgStore->DeleteFolder(this);
   if (rv == NS_ERROR_FILE_NOT_FOUND ||
       rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)
     rv = NS_OK; // virtual folders do not have a msgStore file
   return rv;
 }
 
--- a/mailnews/local/src/nsMsgMaildirStore.cpp
+++ b/mailnews/local/src/nsMsgMaildirStore.cpp
@@ -784,18 +784,18 @@ nsMsgMaildirStore::MoveNewlyDownloadedMe
   if (!exists)
   {
     rv = toPath->Create(nsIFile::DIRECTORY_TYPE, 0755);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   nsCOMPtr<nsIMsgDatabase> destMailDB;
   rv = aDestFolder->GetMsgDatabase(getter_AddRefs(destMailDB));
-  NS_WARN_IF_FALSE(destMailDB && NS_SUCCEEDED(rv),
-                   "failed to open mail db moving message");
+  NS_WARNING_ASSERTION(destMailDB && NS_SUCCEEDED(rv),
+                       "failed to open mail db moving message");
 
   nsCOMPtr<nsIMsgDBHdr> newHdr;
   if (destMailDB)
     rv = destMailDB->CopyHdrFromExistingHdr(nsMsgKey_None, aHdr, true,
                                             getter_AddRefs(newHdr));
   if (NS_SUCCEEDED(rv) && !newHdr)
     rv = NS_ERROR_UNEXPECTED;
 
--- a/mailnews/local/src/nsParseMailbox.cpp
+++ b/mailnews/local/src/nsParseMailbox.cpp
@@ -1381,17 +1381,17 @@ nsresult nsParseMailMessageState::Finali
     // We'll need the message id first to recover data from the backup database
     nsAutoCString rawMsgId;
     /* Take off <> around message ID. */
     if (id)
     {
       if (id->length > 0 && id->value[0] == '<')
         id->length--, id->value++;
 
-      NS_WARN_IF_FALSE(id->length > 0, "id->length failure in FinalizeHeaders().");
+      NS_WARNING_ASSERTION(id->length > 0, "id->length failure in FinalizeHeaders().");
 
       if (id->length > 0 && id->value[id->length - 1] == '>')
         /* generate a new null-terminated string without the final > */
         rawMsgId.Assign(id->value, id->length - 1);
       else
         rawMsgId.Assign(id->value);
     }
 
@@ -2538,18 +2538,18 @@ nsresult nsParseNewMailState::MoveIncorp
   nsCOMPtr<nsIMsgDatabase> destMailDB;
 
   if (!localFolder)
     return NS_MSG_POP_FILTER_TARGET_ERROR;
 
   // don't force upgrade in place - open the db here before we start writing to the
   // destination file because XP_Stat can return file size including bytes written...
   rv = localFolder->GetDatabaseWOReparse(getter_AddRefs(destMailDB));
-  NS_WARN_IF_FALSE(destMailDB && NS_SUCCEEDED(rv),
-                   "failed to open mail db parsing folder");
+  NS_WARNING_ASSERTION(destMailDB && NS_SUCCEEDED(rv),
+                       "failed to open mail db parsing folder");
   nsCOMPtr<nsIMsgDBHdr> newHdr;
 
   if (destMailDB)
     rv = destMailDB->CopyHdrFromExistingHdr(m_new_key, mailHdr, true,
                                             getter_AddRefs(newHdr));
   if (NS_SUCCEEDED(rv) && !newHdr)
     rv = NS_ERROR_UNEXPECTED;