Bug 1519387 - Follow-up: remove unneeded \n from logging and assertions in IMAP. r=me DONTBUILD
authorJorg K <jorgk@jorgk.com>
Sat, 12 Jan 2019 10:14:00 +0100
changeset 34171 0fb460d27117da21b5ee2bb36d51ab9c321be263
parent 34170 37983d049d22566a6fe7e6f00b258d86a4660f05
child 34172 7edaf941a3beca1b37c1797462456fe3cf92b6b4
push id389
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:01:53 +0000
reviewersme
bugs1519387
Bug 1519387 - Follow-up: remove unneeded \n from logging and assertions in IMAP. r=me DONTBUILD
mailnews/base/src/nsMsgBiffManager.cpp
mailnews/imap/src/nsAutoSyncManager.cpp
mailnews/imap/src/nsIMAPHostSessionList.cpp
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/imap/src/nsImapProtocol.cpp
mailnews/imap/src/nsImapUndoTxn.cpp
--- a/mailnews/base/src/nsMsgBiffManager.cpp
+++ b/mailnews/base/src/nsMsgBiffManager.cpp
@@ -218,17 +218,17 @@ nsresult nsMsgBiffManager::AddBiffEntry(
 {
   uint32_t i;
   uint32_t count = mBiffArray.Length();
   for (i = 0; i < count; i++)
   {
     if (biffEntry.nextBiffTime < mBiffArray[i].nextBiffTime)
       break;
   }
-  MOZ_LOG(MsgBiffLogModule, mozilla::LogLevel::Info, ("inserting biff entry at %d\n", i));
+  MOZ_LOG(MsgBiffLogModule, mozilla::LogLevel::Info, ("inserting biff entry at %d", i));
   mBiffArray.InsertElementAt(i, biffEntry);
   return NS_OK;
 }
 
 nsresult nsMsgBiffManager::SetNextBiffTime(nsBiffEntry &biffEntry, PRTime currentTime)
 {
   nsIMsgIncomingServer *server = biffEntry.server;
   NS_ENSURE_TRUE(server, NS_ERROR_FAILURE);
@@ -286,32 +286,32 @@ nsresult nsMsgBiffManager::SetupNextBiff
     int64_t timeInMS = biffDelay / ms;
     uint32_t timeInMSUint32 = (uint32_t)timeInMS;
 
     // Can't currently reset a timer when it's in the process of
     // calling Notify. So, just release the timer here and create a new one.
     if (mBiffTimer)
       mBiffTimer->Cancel();
 
-    MOZ_LOG(MsgBiffLogModule, mozilla::LogLevel::Info, ("setting %d timer\n", timeInMSUint32));
+    MOZ_LOG(MsgBiffLogModule, mozilla::LogLevel::Info, ("setting %d timer", timeInMSUint32));
     mBiffTimer = do_CreateInstance("@mozilla.org/timer;1");
     mBiffTimer->InitWithNamedFuncCallback(OnBiffTimer, (void*)this, timeInMSUint32,
                                           nsITimer::TYPE_ONE_SHOT,
                                           "nsMsgBiffManager::OnBiffTimer");
 
   }
   return NS_OK;
 }
 
 //This is the function that does a biff on all of the servers whose time it is to biff.
 nsresult nsMsgBiffManager::PerformBiff()
 {
   PRTime currentTime = PR_Now();
   nsCOMArray<nsIMsgFolder> targetFolders;
-  MOZ_LOG(MsgBiffLogModule, mozilla::LogLevel::Info, ("performing biffs\n"));
+  MOZ_LOG(MsgBiffLogModule, mozilla::LogLevel::Info, ("performing biffs"));
 
   uint32_t count = mBiffArray.Length();
   for (uint32_t i = 0; i < count; i++)
   {
     // Take a copy of the entry rather than the a reference so that we can
     // remove and add if necessary, but keep the references and memory alive.
     nsBiffEntry current = mBiffArray[i];
     if (current.nextBiffTime < currentTime)
@@ -336,22 +336,24 @@ nsresult nsMsgBiffManager::PerformBiff()
       // new messages
       if (!serverBusy &&
           (!serverRequiresPassword || !passwordPromptRequired) &&
           targetFolderIndex == kNotFound)
       {
         nsCString serverKey;
         current.server->GetKey(serverKey);
         nsresult rv = current.server->PerformBiff(nullptr);
-        MOZ_LOG(MsgBiffLogModule, mozilla::LogLevel::Info, ("biffing server %s rv = %" PRIx32 "\n", serverKey.get(), static_cast<uint32_t>(rv)));
+        MOZ_LOG(MsgBiffLogModule, mozilla::LogLevel::Info,
+          ("biffing server %s rv = %" PRIx32, serverKey.get(), static_cast<uint32_t>(rv)));
       }
       else
       {
-        MOZ_LOG(MsgBiffLogModule, mozilla::LogLevel::Info, ("not biffing server serverBusy = %d requirespassword = %d password prompt required = %d targetFolderIndex = %d\n",
-          serverBusy, serverRequiresPassword, passwordPromptRequired, targetFolderIndex));
+        MOZ_LOG(MsgBiffLogModule, mozilla::LogLevel::Info,
+          ("not biffing server serverBusy = %d requirespassword = %d password prompt required = %d targetFolderIndex = %d",
+           serverBusy, serverRequiresPassword, passwordPromptRequired, targetFolderIndex));
       }
       // if we didn't do this server because the destination server was already being
       // biffed into, leave this server in the biff array so it will fire next.
       if (targetFolderIndex == kNotFound)
       {
         mBiffArray.RemoveElementAt(i);
         i--; //Because we removed it we need to look at the one that just moved up.
         SetNextBiffTime(current, currentTime);
--- a/mailnews/imap/src/nsAutoSyncManager.cpp
+++ b/mailnews/imap/src/nsAutoSyncManager.cpp
@@ -536,25 +536,25 @@ NS_IMETHODIMP nsAutoSyncManager::OnStopR
 
   return aExitCode;
 }
 
 NS_IMETHODIMP nsAutoSyncManager::Pause()
 {
   StopTimer();
   mPaused = true;
-  MOZ_LOG(gAutoSyncLog, LogLevel::Debug, ("autosync paused\n"));
+  MOZ_LOG(gAutoSyncLog, LogLevel::Debug, ("autosync paused"));
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAutoSyncManager::Resume()
 {
   mPaused = false;
   StartTimerIfNeeded();
-  MOZ_LOG(gAutoSyncLog, LogLevel::Debug, ("autosync resumed\n"));
+  MOZ_LOG(gAutoSyncLog, LogLevel::Debug, ("autosync resumed"));
   return NS_OK;
 }
 
 NS_IMETHODIMP nsAutoSyncManager::Observe(nsISupports*, const char *aTopic, const char16_t *aSomeData)
 {
   if (!PL_strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID))
   {
     nsCOMPtr<nsIObserverService> observerService =
--- a/mailnews/imap/src/nsIMAPHostSessionList.cpp
+++ b/mailnews/imap/src/nsIMAPHostSessionList.cpp
@@ -14,17 +14,17 @@
 #include "nsServiceManagerUtils.h"
 #include "nsMsgUtils.h"
 #include "mozilla/Services.h"
 
 nsIMAPHostInfo::nsIMAPHostInfo(const char *serverKey,
                                nsIImapIncomingServer *server)
 {
   fServerKey = serverKey;
-  NS_ASSERTION(server, "*** Fatal null imap incoming server...\n");
+  NS_ASSERTION(server, "*** Fatal null imap incoming server...");
   server->GetServerDirectory(fOnlineDir);
   fNextHost = NULL;
   fCapabilityFlags = kCapabilityUndefined;
   fHierarchyDelimiters = NULL;
 #ifdef DEBUG_bienvenu1
   fHaveWeEverDiscoveredFolders = true; // try this, see what bad happens - we'll need to
   // figure out a way to make new accounts have it be false
 #else
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -3184,61 +3184,62 @@ NS_IMETHODIMP nsImapMailFolder::BeginCop
   NS_ENSURE_TRUE(m_copyState, NS_ERROR_NULL_POINTER);
   nsresult rv;
   if (m_copyState->m_tmpFile) // leftover file spec nuke it
   {
     rv = m_copyState->m_tmpFile->Remove(false);
     if (NS_FAILED(rv))
     {
       nsCString nativePath = m_copyState->m_tmpFile->HumanReadablePath();
-      MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("couldn't remove prev temp file %s: %" PRIx32 "\n", nativePath.get(), static_cast<uint32_t>(rv)));
+      MOZ_LOG(IMAP, mozilla::LogLevel::Info,
+        ("couldn't remove prev temp file %s: %" PRIx32, nativePath.get(), static_cast<uint32_t>(rv)));
     }
     m_copyState->m_tmpFile = nullptr;
   }
   if (message)
     m_copyState->m_message = message;
 
   rv = GetSpecialDirectoryWithFileName(NS_OS_TEMP_DIR,
                                        "nscpmsg.txt",
                                         getter_AddRefs(m_copyState->m_tmpFile));
   if (NS_FAILED(rv))
-    MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("couldn't find nscpmsg.txt:%" PRIx32 "\n", static_cast<uint32_t>(rv)));
+    MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("couldn't find nscpmsg.txt:%" PRIx32, static_cast<uint32_t>(rv)));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // create a unique file, since multiple copies may be open on multiple folders
   rv = m_copyState->m_tmpFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 00600);
   if (NS_FAILED(rv))
   {
-    MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("couldn't create temp nscpmsg.txt:%" PRIx32 "\n", static_cast<uint32_t>(rv)));
+    MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("couldn't create temp nscpmsg.txt:%" PRIx32, static_cast<uint32_t>(rv)));
     // Last ditch attempt to create a temp file, because virus checker might
     // be locking the previous temp file, and CreateUnique fails if the file
     // is locked. Use the message key to make a unique name.
     if (message)
     {
       nsCString tmpFileName("nscpmsg-");
       nsMsgKey msgKey;
       message->GetMessageKey(&msgKey);
       tmpFileName.AppendInt(msgKey);
       tmpFileName.AppendLiteral(".txt");
       m_copyState->m_tmpFile->SetNativeLeafName(tmpFileName);
       rv = m_copyState->m_tmpFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 00600);
       if (NS_FAILED(rv))
       {
-        MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("couldn't create temp nscpmsg.txt: %" PRIx32 "\n", static_cast<uint32_t>(rv)));
+        MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("couldn't create temp nscpmsg.txt: %" PRIx32, static_cast<uint32_t>(rv)));
         OnCopyCompleted(m_copyState->m_srcSupport, rv);
         return rv;
       }
     }
   }
 
   nsCOMPtr<nsIOutputStream> fileOutputStream;
   rv = MsgNewBufferedFileOutputStream(getter_AddRefs(m_copyState->m_msgFileStream),
                                       m_copyState->m_tmpFile, -1, 00600);
   if (NS_FAILED(rv))
-    MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("couldn't create output file stream: %" PRIx32 "\n", static_cast<uint32_t>(rv)));
+    MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("couldn't create output file stream: %" PRIx32, static_cast<uint32_t>(rv)));
 
   if (!m_copyState->m_dataBuffer)
     m_copyState->m_dataBuffer = (char*) PR_CALLOC(COPY_BUFFER_SIZE+1);
   NS_ENSURE_TRUE(m_copyState->m_dataBuffer, NS_ERROR_OUT_OF_MEMORY);
   m_copyState->m_dataBufferSize = COPY_BUFFER_SIZE;
   return NS_OK;
 }
 
@@ -3326,17 +3327,17 @@ NS_IMETHODIMP nsImapMailFolder::CopyData
 // sICopyMessageListener methods, BeginCopy, CopyData, EndCopy, EndMove, StartMessage, EndMessage
 NS_IMETHODIMP nsImapMailFolder::CopyData(nsIInputStream *aIStream, int32_t aLength)
 {
   NS_ENSURE_TRUE(m_copyState && m_copyState->m_msgFileStream && m_copyState->m_dataBuffer, NS_ERROR_NULL_POINTER);
   nsresult rv = CopyDataToOutputStreamForAppend(aIStream, aLength,
                                                 m_copyState->m_msgFileStream);
   if (NS_FAILED(rv))
   {
-    MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("CopyData failed: %" PRIx32 "\n", static_cast<uint32_t>(rv)));
+    MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("CopyData failed: %" PRIx32, static_cast<uint32_t>(rv)));
     OnCopyCompleted(m_copyState->m_srcSupport, rv);
   }
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::EndCopy(bool copySucceeded)
 {
   nsresult rv = copySucceeded ? NS_OK : NS_ERROR_FAILURE;
@@ -3358,17 +3359,17 @@ NS_IMETHODIMP nsImapMailFolder::EndCopy(
     rv = imapService->AppendMessageFromFile(m_copyState->m_tmpFile,
                                             this, EmptyCString(), true,
                                             m_copyState->m_selectedState,
                                             urlListener, nullptr,
                                             copySupport,
                                             m_copyState->m_msgWindow);
   }
   if (NS_FAILED(rv) || !copySucceeded)
-    MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("EndCopy failed: %" PRIx32 "\n", static_cast<uint32_t>(rv)));
+    MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("EndCopy failed: %" PRIx32, static_cast<uint32_t>(rv)));
   return rv;
 }
 
 NS_IMETHODIMP nsImapMailFolder::EndMove(bool moveSucceeded)
 {
   return NS_OK;
 }
 // this is the beginning of the next message copied
@@ -6742,40 +6743,42 @@ nsImapMailFolder::CopyNextStreamMessage(
   //if copy has failed it could be either user interrupted it or for some other reason
   //don't do any subsequent copies or delete src messages if it is move
   if (!copySucceeded)
     return NS_OK;
   nsresult rv;
   nsCOMPtr<nsImapMailCopyState> mailCopyState = do_QueryInterface(copyState, &rv);
   if (NS_FAILED(rv))
   {
-    MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("QI copyState failed: %" PRIx32 "\n", static_cast<uint32_t>(rv)));
+    MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("QI copyState failed: %" PRIx32, static_cast<uint32_t>(rv)));
     return rv; // this can fail...
   }
 
   if (!mailCopyState->m_streamCopy)
     return NS_OK;
 
-  MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("CopyNextStreamMessage: Copying %u of %u\n", mailCopyState->m_curIndex, mailCopyState->m_totalCount));
+  MOZ_LOG(IMAP, mozilla::LogLevel::Info,
+    ("CopyNextStreamMessage: Copying %u of %u", mailCopyState->m_curIndex, mailCopyState->m_totalCount));
   if (mailCopyState->m_curIndex < mailCopyState->m_totalCount)
   {
     mailCopyState->m_message = do_QueryElementAt(mailCopyState->m_messages,
                                                  mailCopyState->m_curIndex,
                                                  &rv);
     if (NS_SUCCEEDED(rv))
     {
       bool isRead;
       mailCopyState->m_message->GetIsRead(&isRead);
       mailCopyState->m_unreadCount = (isRead) ? 0 : 1;
       rv = CopyStreamMessage(mailCopyState->m_message,
                              this, mailCopyState->m_msgWindow, mailCopyState->m_isMove);
     }
     else
     {
-      MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("QueryElementAt %u failed: %" PRIx32 "\n", mailCopyState->m_curIndex, static_cast<uint32_t>(rv)));
+      MOZ_LOG(IMAP, mozilla::LogLevel::Info,
+        ("QueryElementAt %u failed: %" PRIx32, mailCopyState->m_curIndex, static_cast<uint32_t>(rv)));
     }
   }
   else
   {
     // Notify of move/copy completion in case we have some source headers
     nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
     if (notifier)
     {
@@ -8189,17 +8192,17 @@ nsImapMailFolder::CopyStreamMessage(nsIM
           statusFeedback->ShowProgress(percent);
       }
     }
     nsCOMPtr<nsIURI> dummyNull;
     rv = m_copyState->m_msgService->CopyMessage(uri.get(), streamListener,
                                                 isMove && !m_copyState->m_isCrossServerOp, nullptr, aMsgWindow,
                                                 getter_AddRefs(dummyNull));
     if (NS_FAILED(rv))
-      MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("CopyMessage failed: uri %s\n", uri.get()));
+      MOZ_LOG(IMAP, mozilla::LogLevel::Info, ("CopyMessage failed: uri %s", uri.get()));
   }
   return rv;
 }
 
 nsImapMailCopyState::nsImapMailCopyState() :
     m_isMove(false), m_selectedState(false),
     m_isCrossServerOp(false), m_curIndex(0),
     m_totalCount(0), m_streamCopy(false), m_dataBuffer(nullptr),
@@ -9517,28 +9520,28 @@ NS_IMETHODIMP nsImapMailFolder::GetAutoS
   NS_IF_ADDREF(*autoSyncStateObj = m_autoSyncStateObj);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsImapMailFolder::InitiateAutoSync(nsIUrlListener *aUrlListener)
 {
   nsCString folderName;
   GetURI(folderName);
-  MOZ_LOG(gAutoSyncLog, mozilla::LogLevel::Debug, ("Updating folder: %s\n", folderName.get()));
+  MOZ_LOG(gAutoSyncLog, mozilla::LogLevel::Debug, ("Updating folder: %s", folderName.get()));
 
   // HACK: if UpdateFolder finds out that it can't open
   // the folder, it doesn't set the url listener and returns
   // no error. In this case, we return success from this call
   // but the caller never gets a notification on its url listener.
   bool canOpenThisFolder = true;
   GetCanOpenFolder(&canOpenThisFolder);
 
   if (!canOpenThisFolder)
   {
-    MOZ_LOG(gAutoSyncLog, mozilla::LogLevel::Debug, ("Cannot update folder: %s\n", folderName.get()));
+    MOZ_LOG(gAutoSyncLog, mozilla::LogLevel::Debug, ("Cannot update folder: %s", folderName.get()));
     return NS_ERROR_FAILURE;
   }
 
   // create auto-sync state object lazily
   InitAutoSyncState();
 
   // make sure we get the counts from the folder cache.
   ReadDBFolderInfo(false);
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -557,33 +557,33 @@ nsImapProtocol::Initialize(nsIImapHostSe
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Now initialize the thread for the connection
   if (m_thread == nullptr)
   {
     nsresult rv = NS_NewThread(getter_AddRefs(m_iThread), this);
     if (NS_FAILED(rv))
     {
-      NS_ASSERTION(m_iThread, "Unable to create imap thread.\n");
+      NS_ASSERTION(m_iThread, "Unable to create imap thread.");
       return rv;
     }
     m_iThread->GetPRThread(&m_thread);
 
   }
   return NS_OK;
 }
 
 nsImapProtocol::~nsImapProtocol()
 {
   PR_Free(m_fetchBodyIdList);
 
   PR_Free(m_dataOutputBuf);
 
   // **** We must be out of the thread main loop function
-  NS_ASSERTION(!m_imapThreadIsRunning, "Oops, thread is still running.\n");
+  NS_ASSERTION(!m_imapThreadIsRunning, "Oops, thread is still running.");
 }
 
 const nsCString&
 nsImapProtocol::GetImapHostName()
 {
   if (m_runningUrl && m_hostName.IsEmpty())
   {
     nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningUrl);
@@ -1344,17 +1344,17 @@ nsImapProtocol::PseudoInterruptMsgLoad(n
   printf("interrupt msg load : %s\n", (*interrupted) ? "TRUE" : "FALSE");
 #endif
   return NS_OK;
 }
 
 void
 nsImapProtocol::ImapThreadMainLoop()
 {
-  MOZ_LOG(IMAP, LogLevel::Debug, ("ImapThreadMainLoop entering [this=%p]\n", this));
+  MOZ_LOG(IMAP, LogLevel::Debug, ("ImapThreadMainLoop entering [this=%p]", this));
 
   PRIntervalTime sleepTime = kImapSleepTime;
   while (!DeathSignalReceived())
   {
     nsresult rv = NS_OK;
     bool readyToRun;
 
     // wait for an URL to process...
@@ -1437,17 +1437,17 @@ nsImapProtocol::ImapThreadMainLoop()
 #endif
     // This can happen if the UI thread closes cached connections in the
     // OnStopRunningUrl notification.
     if (m_threadShouldDie)
       TellThreadToDie();
   }
   m_imapThreadIsRunning = false;
 
-  MOZ_LOG(IMAP, LogLevel::Debug, ("ImapThreadMainLoop leaving [this=%p]\n", this));
+  MOZ_LOG(IMAP, LogLevel::Debug, ("ImapThreadMainLoop leaving [this=%p]", this));
 }
 
 void nsImapProtocol::HandleIdleResponses()
 {
   // int32_t oldRecent = GetServerStateParser().NumberOfRecentMessages();
   nsAutoCString commandBuffer(GetServerCommandTag());
   commandBuffer.AppendLiteral(" IDLE" CRLF);
 
@@ -1636,17 +1636,17 @@ bool nsImapProtocol::ProcessCurrentURL()
   GetServerStateParser().InitializeState();
   GetServerStateParser().SetConnected(true);
 
   // acknowledge that we are running the url now..
   nsCOMPtr<nsIMsgMailNewsUrl> mailnewsurl = do_QueryInterface(m_runningUrl, &rv);
   nsAutoCString urlSpec;
   rv = mailnewsurl->GetSpec(urlSpec);
   NS_ENSURE_SUCCESS(rv, false);
-  Log("ProcessCurrentURL", urlSpec.get(), (validUrl) ? " = currentUrl\n" : " is not valid\n");
+  Log("ProcessCurrentURL", urlSpec.get(), (validUrl) ? " = currentUrl" : " is not valid");
   if (!validUrl)
     return false;
 
   if (NS_SUCCEEDED(rv) && mailnewsurl && m_imapMailFolderSink && !rerunningUrl)
     m_imapMailFolderSink->SetUrlState(this, mailnewsurl, true, false,
                                       NS_OK);
 
   // if we are set up as a channel, we should notify our channel listener that we are starting...
@@ -1876,17 +1876,17 @@ bool nsImapProtocol::ProcessCurrentURL()
 
       NS_ReleaseOnMainThreadSystemGroup("nsImapProtocol, copyState", copyState.forget());
     }
     // we might need this to stick around for IDLE support
     m_imapMailFolderSink = imapMailFolderSink;
     imapMailFolderSink = nullptr;
   }
   else
-    MOZ_LOG(IMAP, LogLevel::Info, ("null imapMailFolderSink\n"));
+    MOZ_LOG(IMAP, LogLevel::Info, ("null imapMailFolderSink"));
 
   // now try queued urls, now that we've released this connection.
   if (m_imapServerSink)
   {
     if (NS_SUCCEEDED(GetConnectionStatus()))
       rv = m_imapServerSink->LoadNextQueuedUrl(this, &anotherUrlRun);
     else // if we don't do this, they'll just sit and spin until
           // we run some other url on this server.
@@ -4927,17 +4927,17 @@ char* nsImapProtocol::CreateNewLineFromS
   // ui thread, which releases our ref to the input stream, and can
   // cause the pipe to get deleted before the monitor the read is
   // blocked on gets notified. When that happens, the imap thread
   // will stay blocked.
   nsCOMPtr <nsIInputStream> kungFuGrip = m_inputStream;
   do
   {
     newLine = m_inputStreamBuffer->ReadNextLine(m_inputStream, numBytesInLine, needMoreData, &rv);
-    MOZ_LOG(IMAP, LogLevel::Debug, ("ReadNextLine [stream=%p nb=%u needmore=%u]\n",
+    MOZ_LOG(IMAP, LogLevel::Debug, ("ReadNextLine [stream=%p nb=%u needmore=%u]",
         m_inputStream.get(), numBytesInLine, needMoreData));
 
   } while (!newLine && NS_SUCCEEDED(rv) && !DeathSignalReceived()); // until we get the next line and haven't been interrupted
 
   kungFuGrip = nullptr;
 
   if (NS_FAILED(rv))
   {
@@ -5210,17 +5210,17 @@ nsImapProtocol::DiscoverMailboxSpec(nsIm
             SetMailboxDiscoveryStatus(eContinue);
           }
         }
       }
       }
       break;
     case kDeleteSubFoldersInProgress:
       {
-        NS_ASSERTION(m_deletableChildren, "Oops .. null m_deletableChildren\n");
+        NS_ASSERTION(m_deletableChildren, "Oops .. null m_deletableChildren");
         m_deletableChildren->AppendElement(ToNewCString(adoptedBoxSpec->mAllocatedPathName));
       }
       break;
     case kListingForInfoOnly:
       {
         //UpdateProgressWindowForUpgrade(adoptedBoxSpec->allocatedPathName);
         ProgressEventFunctionUsingNameWithString("imapDiscoveringMailbox",
           adoptedBoxSpec->mAllocatedPathName.get());
@@ -6544,17 +6544,17 @@ void nsImapProtocol::OnEnsureExistsFolde
   List(aSourceMailbox, false); // how to tell if that succeeded?
   bool exists = false;
 
   // try converting aSourceMailbox to canonical format
 
   nsIMAPNamespace *nsForMailbox = nullptr;
   m_hostSessionList->GetNamespaceForMailboxForHost(GetImapServerKey(),
                                                      aSourceMailbox, nsForMailbox);
-  // NS_ASSERTION (nsForMailbox, "Oops .. null nsForMailbox\n");
+  // NS_ASSERTION (nsForMailbox, "Oops .. null nsForMailbox");
 
   nsCString name;
 
   if (nsForMailbox)
     m_runningUrl->AllocateCanonicalPath(aSourceMailbox,
                                             nsForMailbox->GetDelimiter(),
                                             getter_Copies(name));
   else
@@ -6917,17 +6917,17 @@ void nsImapProtocol::OnListFolder(const 
 // If we don't know about it, returns false.
 bool nsImapProtocol::MailboxIsNoSelectMailbox(const char *mailboxName)
 {
   bool rv = false;
 
   nsIMAPNamespace *nsForMailbox = nullptr;
     m_hostSessionList->GetNamespaceForMailboxForHost(GetImapServerKey(),
                                                      mailboxName, nsForMailbox);
-  // NS_ASSERTION (nsForMailbox, "Oops .. null nsForMailbox\n");
+  // NS_ASSERTION (nsForMailbox, "Oops .. null nsForMailbox");
 
   nsCString name;
 
   if (nsForMailbox)
     m_runningUrl->AllocateCanonicalPath(mailboxName,
                                             nsForMailbox->GetDelimiter(),
                                             getter_Copies(name));
   else
--- a/mailnews/imap/src/nsImapUndoTxn.cpp
+++ b/mailnews/imap/src/nsImapUndoTxn.cpp
@@ -312,21 +312,21 @@ nsImapMoveCopyMsgTxn::UndoMailboxDelete(
 
         uint32_t count = m_srcKeyArray.Length();
         uint32_t i;
         nsCOMPtr<nsIMsgDBHdr> oldHdr;
         nsCOMPtr<nsIMsgDBHdr> newHdr;
         for (i = 0; i < count; i++)
         {
             oldHdr = m_srcHdrs[i];
-            NS_ASSERTION(oldHdr, "fatal ... cannot get old msg header\n");
+            NS_ASSERTION(oldHdr, "fatal ... cannot get old msg header");
             rv = srcDB->CopyHdrFromExistingHdr(m_srcKeyArray[i],
                                                oldHdr,true,
                                                getter_AddRefs(newHdr));
-            NS_ASSERTION(newHdr, "fatal ... cannot create new header\n");
+            NS_ASSERTION(newHdr, "fatal ... cannot create new header");
 
             if (NS_SUCCEEDED(rv) && newHdr)
             {
                 if (i < m_srcSizeArray.Length())
                     newHdr->SetMessageSize(m_srcSizeArray[i]);
                 srcDB->UndoDelete(newHdr);
             }
         }