Bug 1399756 - fix typos in mailnews/ using codespell. rs=comment-only,typo-fix
authorJorg K <jorgk@jorgk.com>
Tue, 20 Mar 2018 11:54:29 +0100
changeset 23551 37b26fb2a42136d17d5ee39705a7a8e32a188435
parent 23550 96b445d6df365b54eaebcb70193b39cb2055976c
child 23552 64fb777301cd52eafd558d431a32b4124b7e0a7a
push id14217
push usermozilla@jorgk.com
push dateTue, 20 Mar 2018 11:30:53 +0000
treeherdercomm-central@64fb777301cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscomment-only, typo-fix
bugs1399756
Bug 1399756 - fix typos in mailnews/ using codespell. rs=comment-only,typo-fix [skip-blame]
mailnews/addrbook/content/abDragDrop.js
mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
mailnews/addrbook/src/nsAbLDAPChangeLogQuery.cpp
mailnews/addrbook/src/nsAbLDAPDirectory.cpp
mailnews/addrbook/src/nsAbLDIFService.cpp
mailnews/addrbook/src/nsAbManager.cpp
mailnews/addrbook/src/nsVCardObj.cpp
mailnews/base/content/charsetList.xml
mailnews/base/content/dateFormat.js
mailnews/base/content/folderProps.js
mailnews/base/content/msgAccountCentral.js
mailnews/base/prefs/content/AccountManager.js
mailnews/base/prefs/content/aw-identity.js
mailnews/base/prefs/content/aw-incoming.js
mailnews/base/public/nsIMapiRegistry.idl
mailnews/base/public/nsIMsgCopyServiceListener.idl
mailnews/base/public/nsIMsgDBView.idl
mailnews/base/public/nsIMsgIdentity.idl
mailnews/base/public/nsIMsgShutdown.idl
mailnews/base/search/public/nsIMsgFilterList.idl
mailnews/base/search/public/nsIMsgSearchSession.idl
mailnews/base/search/public/nsIMsgTraitService.idl
mailnews/base/search/src/nsMsgSearchTerm.cpp
mailnews/base/src/nsMsgDBView.cpp
mailnews/base/src/nsMsgDBView.h
mailnews/base/src/nsMsgFolderCompactor.cpp
mailnews/base/src/nsMsgMailSession.cpp
mailnews/base/src/nsMsgPrintEngine.cpp
mailnews/base/src/nsMsgThreadedDBView.cpp
mailnews/base/test/unit/test_folderLookupService.js
mailnews/base/test/unit/test_junkWhitelisting.js
mailnews/base/test/unit/test_testsuite_fakeserver_imapd_gmail.js
mailnews/base/test/unit/test_testsuite_fakeserver_imapd_list-extended.js
mailnews/base/util/converterWorker.js
mailnews/base/util/errUtils.js
mailnews/base/util/mailnewsMigrator.js
mailnews/base/util/nsMsgDBFolder.cpp
mailnews/base/util/nsMsgKeyArray.cpp
mailnews/base/util/nsMsgKeySet.cpp
mailnews/base/util/nsMsgProtocol.h
mailnews/base/util/nsMsgUtils.cpp
mailnews/base/util/nsMsgUtils.h
mailnews/compose/public/nsIMsgAttachment.idl
mailnews/compose/public/nsIMsgCompose.idl
mailnews/compose/public/nsIMsgComposeService.idl
mailnews/compose/public/nsIMsgSend.idl
mailnews/compose/src/nsComposeStrings.cpp
mailnews/compose/src/nsMsgAppleEncode.cpp
mailnews/compose/src/nsMsgCompUtils.cpp
mailnews/compose/src/nsMsgCompose.cpp
mailnews/compose/src/nsMsgCompose.h
mailnews/compose/src/nsMsgSend.cpp
mailnews/compose/src/nsMsgSend.h
mailnews/compose/src/nsMsgSendReport.cpp
mailnews/compose/src/nsSmtpProtocol.cpp
mailnews/compose/src/nsSmtpProtocol.h
mailnews/compose/src/nsSmtpServer.cpp
mailnews/compose/src/nsSmtpService.cpp
mailnews/compose/src/nsSmtpService.h
mailnews/compose/src/nsURLFetcher.cpp
mailnews/compose/test/unit/test_bug235432.js
mailnews/compose/test/unit/test_nsMsgCompose1.js
mailnews/compose/test/unit/test_nsMsgCompose4.js
mailnews/compose/test/unit/test_sendMailAddressIDN.js
mailnews/compose/test/unit/test_sendMessageLater2.js
mailnews/db/gloda/components/jsmimeemitter.js
mailnews/db/gloda/content/glodacomplete.xml
mailnews/db/gloda/modules/collection.js
mailnews/db/gloda/modules/datamodel.js
mailnews/db/gloda/modules/datastore.js
mailnews/db/gloda/modules/gloda.js
mailnews/db/gloda/modules/index_msg.js
mailnews/db/gloda/modules/indexer.js
mailnews/db/gloda/modules/mimemsg.js
mailnews/db/gloda/modules/msg_search.js
mailnews/db/gloda/test/unit/resources/glodaTestHelper.js
mailnews/db/gloda/test/unit/test_index_compaction.js
mailnews/db/gloda/test/unit/test_query_core.js
mailnews/db/msgdb/public/nsIMsgDatabase.idl
mailnews/db/msgdb/src/nsMsgDatabase.cpp
mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
mailnews/extensions/fts3/src/fts3_porter.c
mailnews/extensions/mailviews/src/nsMsgMailViewList.cpp
mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
mailnews/extensions/newsblog/content/Feed.js
mailnews/extensions/newsblog/content/FeedUtils.jsm
mailnews/extensions/newsblog/content/feed-parser.js
mailnews/extensions/newsblog/content/feed-subscriptions.js
mailnews/extensions/smime/content/msgCompSMIMEOverlay.js
mailnews/imap/public/nsIImapMessageSink.idl
mailnews/imap/src/nsAutoSyncManager.cpp
mailnews/imap/src/nsImapIncomingServer.cpp
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/imap/src/nsImapOfflineSync.cpp
mailnews/imap/src/nsImapProtocol.cpp
mailnews/imap/src/nsImapProtocol.h
mailnews/imap/src/nsImapServerResponseParser.cpp
mailnews/imap/src/nsImapServerResponseParser.h
mailnews/imap/src/nsImapUrl.cpp
mailnews/imap/test/unit/test_dod.js
mailnews/imap/test/unit/test_dontStatNoSelect.js
mailnews/imap/test/unit/test_imapFilterActions.js
mailnews/imap/test/unit/test_imapHdrChunking.js
mailnews/imap/test/unit/test_imapHighWater.js
mailnews/imap/test/unit/test_imapStoreMsgOffline.js
mailnews/imap/test/unit/test_offlinePlayback.js
mailnews/import/outlook/src/MapiMessage.cpp
mailnews/import/outlook/src/nsOutlookImport.h
mailnews/import/outlook/src/nsOutlookSettings.cpp
mailnews/import/public/nsIImportAddressBooks.idl
mailnews/import/src/ImportTranslate.cpp
mailnews/import/src/nsImportTranslator.h
mailnews/import/text/src/nsTextAddress.cpp
mailnews/import/text/src/nsTextImport.h
mailnews/import/vcard/src/nsVCardImport.h
mailnews/import/winlivemail/nsWMImport.h
mailnews/intl/charsetalias.properties
mailnews/jsaccount/modules/JSAccountUtils.jsm
mailnews/local/src/nsLocalMailFolder.cpp
mailnews/local/src/nsMailboxProtocol.cpp
mailnews/local/src/nsMailboxProtocol.h
mailnews/local/src/nsMovemailService.cpp
mailnews/local/src/nsParseMailbox.h
mailnews/local/src/nsPop3Protocol.cpp
mailnews/local/src/nsPop3Service.h
mailnews/local/src/nsPop3Sink.cpp
mailnews/mailnews.js
mailnews/mapi/mapihook/build/msgMapi.idl
mailnews/mapi/mapihook/src/Registry.cpp
mailnews/mapi/mapihook/src/msgMapiSupport.cpp
mailnews/mime/cthandlers/vcard/mimevcrd.cpp
mailnews/mime/jsmime/jsmime.js
mailnews/mime/public/nsIMsgHeaderParser.idl
mailnews/mime/src/mimehdrs.cpp
mailnews/mime/src/mimei.cpp
mailnews/mime/src/mimei.h
mailnews/mime/src/mimemalt.cpp
mailnews/mime/src/mimemoz2.cpp
mailnews/mime/src/mimemoz2.h
mailnews/mime/src/mimemrel.cpp
mailnews/mime/src/mimemsg.cpp
mailnews/mime/src/mimemsig.cpp
mailnews/mime/src/mimemult.cpp
mailnews/mime/src/mimeobj.h
mailnews/mime/src/mimethpl.cpp
mailnews/mime/src/mimetric.cpp
mailnews/mime/src/nsStreamConverter.cpp
mailnews/news/public/nsINNTPNewsgroupList.idl
mailnews/news/public/nsINNTPNewsgroupPost.idl
mailnews/news/src/nsNNTPProtocol.h
mailnews/news/src/nsNewsFolder.cpp
mailnews/news/src/nsNntpService.h
mailnews/test/fakeserver/nntpd.js
mailnews/test/resources/logHelper.js
mailnews/test/resources/mailTestUtils.js
--- a/mailnews/addrbook/content/abDragDrop.js
+++ b/mailnews/addrbook/content/abDragDrop.js
@@ -161,17 +161,17 @@ var abDirTreeObserver = {
       return false;
 
     var dragSession = dragService.getCurrentSession();
     if (!dragSession)
       return false;
 
     // XXX Due to bug 373125/bug 349044 we can't specify a default action,
     // so we default to move and this means that the user would have to press
-    // ctrl to copy which most users don't realise.
+    // ctrl to copy which most users don't realize.
     //
     // If target directory is a mailing list, then only allow copies.
     //    if (targetDirectory.isMailList &&
     //   dragSession.dragAction != Ci.nsIDragService.DRAGDROP_ACTION_COPY)
     //return false;
 
     var srcDirectory = GetDirectoryFromURI(srcURI);
 
--- a/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPChangeLogData.cpp
@@ -198,17 +198,17 @@ nsresult nsAbLDAPProcessChangeLogData::O
                 // Now start the appropriate query
                 rv = OnSearchRootDSEDone();
                 break;
              }
             case kFindingChanges:
                 rv = OnFindingChangesDone();
                 // If success we return from here since
                 // this changes state to kReplicatingChanges
-                // and it falls thru into the if clause below.
+                // and it falls through into the if clause below.
                 if (NS_SUCCEEDED(rv))
                     return rv;
                 break;
             case kReplicatingAll :
                 return nsAbLDAPProcessReplicationData::OnLDAPSearchResult(aMessage);
             } // end of switch
         }
         else
--- a/mailnews/addrbook/src/nsAbLDAPChangeLogQuery.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPChangeLogQuery.cpp
@@ -132,17 +132,17 @@ NS_IMETHODIMP nsAbLDAPChangeLogQuery::Qu
     return NS_ERROR_UNEXPECTED;
 
   int32_t lastChangeNumber;
   nsresult rv = mDirectory->GetLastChangeNumber(&lastChangeNumber);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // make sure that the filter here just have one condition
   // and should not be enclosed in enclosing brackets.
-  // also condition '>' doesnot work, it should be '>='/
+  // also condition '>' does not work, it should be '>='/
   nsAutoCString filter (NS_LITERAL_CSTRING("changenumber>="));
   filter.AppendInt(lastChangeNumber + 1);
 
   rv = CreateNewLDAPOperation();
   NS_ENSURE_SUCCESS(rv, rv);
 
   return mOperation->SearchExt(aChangeLogDN, nsILDAPURL::SCOPE_ONELEVEL, filter,
                                sizeof(sChangeLogEntryAttribs),
--- a/mailnews/addrbook/src/nsAbLDAPDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbLDAPDirectory.cpp
@@ -498,17 +498,17 @@ NS_IMETHODIMP nsAbLDAPDirectory::UseForA
         bool overrideGlobalPref = false;
         identity->GetOverrideGlobalPref(&overrideGlobalPref);
         if (overrideGlobalPref)
           identity->GetDirectoryServer(prefName);
       }
     }
 
     // If the preference name is still empty but useDirectory is false, then
-    // the global one is not available, nor is the overriden one.
+    // the global one is not available, nor is the overridden one.
     if (prefName.IsEmpty() && !useDirectory)
       return NS_OK;
   }
 
   // If we failed to get the identity preference, or the pref name is empty
   // try the global preference.
   if (prefName.IsEmpty())
   {
--- a/mailnews/addrbook/src/nsAbLDIFService.cpp
+++ b/mailnews/addrbook/src/nsAbLDIFService.cpp
@@ -261,17 +261,17 @@ nsresult nsAbLDIFService::str_parse_line
 }
 
 /*
  * str_getline - return the next "line" (minus newline) of input from a
  * string buffer of lines separated by newlines, terminated by \n\n
  * or \0.  this routine handles continued lines, bundling them into
  * a single big line before returning.  if a line begins with a white
  * space character, it is a continuation of the previous line. the white
- * space character (nb: only one char), and preceeding newline are changed
+ * space character (nb: only one char), and preceding newline are changed
  * into CONTINUED_LINE_MARKER chars, to be deleted later by the
  * str_parse_line() routine above.
  *
  * it takes a pointer to a pointer to the buffer on the first call,
  * which it updates and must be supplied on subsequent calls.
  */
 
 char* nsAbLDIFService::str_getline(char **next) const
--- a/mailnews/addrbook/src/nsAbManager.cpp
+++ b/mailnews/addrbook/src/nsAbManager.cpp
@@ -41,17 +41,17 @@ struct ExportAttributesTableStruct
   uint32_t plainTextStringID;
 };
 
 // our schema is not fixed yet, but we still want some sort of objectclass
 // for now, use obsolete in the class name, hinting that this will change
 // see bugs bug #116692 and #118454
 #define MOZ_AB_OBJECTCLASS "mozillaAbPersonAlpha"
 
-// for now, the oder of the attributes with true for includeForPlainText
+// for now, the order of the attributes with true for includeForPlainText
 // should be in the same order as they are in the import code
 // see importMsgProperties and nsImportStringBundle.
 //
 // XXX todo, merge with what's in nsAbLDAPProperties.cpp, so we can
 // use this for LDAP and LDIF export
 //
 // here's how we're coming up with the ldapPropertyName values
 // if they are specified in RFC 2798, use them
--- a/mailnews/addrbook/src/nsVCardObj.cpp
+++ b/mailnews/addrbook/src/nsVCardObj.cpp
@@ -602,18 +602,18 @@ static const char *AAlarmFields[] = {
 };
 
 static const char *coolTalkFields[] = {
   VCCooltalkAddress,
   VCUseServer,
   0
 };
 
-/* ExDate -- has unamed fields */
-/* RDate -- has unamed fields */
+/* ExDate -- has unnamed fields */
+/* RDate -- has unnamed fields */
 
 static const char *DAlarmFields[] = {
   VCRunTimeProp,
   VCSnoozeTimeProp,
   VCRepeatCountProp,
   VCDisplayStringProp,
   0
 };
--- a/mailnews/base/content/charsetList.xml
+++ b/mailnews/base/content/charsetList.xml
@@ -49,17 +49,17 @@
             return 1;
           return 0;
         });
 
         menuLabels.forEach(function(item) {
           aMenuList.appendItem(item.label, item.value);
         });
 
-        // Selecting appropiate menu item corresponding to preference stored
+        // Selecting appropriate menu item corresponding to preference stored
         // value.
         if (this.hasAttribute("preference")) {
           let preference = Services.prefs.getComplexValue(
             this.getAttribute("preference"), Ci.nsIPrefLocalizedString);
           this.value = preference.data;
         }
      ]]></constructor>
     </implementation>
--- a/mailnews/base/content/dateFormat.js
+++ b/mailnews/base/content/dateFormat.js
@@ -36,17 +36,17 @@ function initLocaleShortDateFormat()
       if ( arrayOfStrings.length == 3 )
       {
         gSearchDateSeparator = possibleSeparators[i];
         break;
       }
     }
 
     // check the format option
-    if ( arrayOfStrings.length != 3 )       // no successfull split
+    if ( arrayOfStrings.length != 3 )       // no successful split
     {
       dump("getLocaleShortDateFormat: could not analyze the date format, defaulting to mm/dd/yyyy\n");
     }
     else
     {
       // the date will contain a zero if that system settings include leading zeros
       gSearchDateLeadingZeros = dateString.includes("0");
 
@@ -74,17 +74,17 @@ function initLocaleShortDateFormat()
   }
 }
 
 function initializeSearchDateFormat()
 {
   if (gSearchDateFormat)
     return;
 
-  // get a search date format option and a seprator
+  // get a search date format option and a separator
   try {
     gSearchDateFormat =
       Services.prefs.getComplexValue("mailnews.search_date_format",
                                      Ci.nsIPrefLocalizedString);
     gSearchDateFormat = parseInt(gSearchDateFormat);
 
     // if the option is 0 then try to use the format of the current locale
     if (gSearchDateFormat == 0)
--- a/mailnews/base/content/folderProps.js
+++ b/mailnews/base/content/folderProps.js
@@ -315,17 +315,17 @@ function hideShowControls(serverType)
       if (hideForTokens[j] == serverType) {
         hideForBool = true;
         break;
       }
     }
     control.hidden = hideForBool;
   }
 
-  // hide the priviliges button if the imap folder doesn't have an admin url
+  // hide the privileges button if the imap folder doesn't have an admin url
   // mabye should leave this hidden by default and only show it in this case instead
   try {
     var imapFolder = gMsgFolder.QueryInterface(Ci.nsIMsgImapMailFolder);
     if (imapFolder)
     {
       var privilegesButton = document.getElementById("imap.FolderPrivileges");
       if (privilegesButton)
       {
--- a/mailnews/base/content/msgAccountCentral.js
+++ b/mailnews/base/content/msgAccountCentral.js
@@ -5,17 +5,17 @@
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var selectedServer = null;
 
 function OnInit()
 {
     // Set the header for the page.
-    // Title containts the brand name of the application and the account
+    // Title contains the brand name of the application and the account
     // type (mail/news) and the name of the account
     try {
         let msgFolder    = null;
         let title;
 
         // Get the brand name
         let brandName = document.getElementById("bundle_brand")
                                 .getString("brandShortName");
--- a/mailnews/base/prefs/content/AccountManager.js
+++ b/mailnews/base/prefs/content/AccountManager.js
@@ -47,17 +47,17 @@ var currentPageId;
 
 var pendingAccount;
 var pendingPageId;
 
 /**
  * This array contains filesystem folders that are deemed inappropriate
  * for use as the local directory pref for message storage.
  * It is global to allow extensions to add to/remove from it if needed.
- * Extentions adding new server types should first consider setting
+ * Extensions adding new server types should first consider setting
  * nsIMsgProtocolInfo(of the server type).defaultLocalPath properly
  * so that the test will allow that directory automatically.
  * See the checkLocalDirectoryIsSafe function for description of the members.
  */
 var gDangerousLocalStorageDirs = [
   // profile folder
   { dirsvc: "ProfD",    OS: null },
   // GRE install folder
@@ -1535,17 +1535,17 @@ var gAccountTree = {
 
         accountName = server.prettyName;
 
         // Now add our panels.
         let idents = MailServices.accounts.getIdentitiesForServer(server);
         if (idents.length) {
           panelsToKeep.push(panels[0]); // The server panel is valid
           panelsToKeep.push(panels[1]); // also the copies panel
-          panelsToKeep.push(panels[4]); // and addresssing
+          panelsToKeep.push(panels[4]); // and addressing
         }
 
         // Everyone except News, RSS and IM has a junk panel
         // XXX: unextensible!
         // The existence of server.spamSettings can't currently be used for this.
         if (server.type != "nntp" && server.type != "rss" && server.type != "im")
           panelsToKeep.push(panels[5]);
 
--- a/mailnews/base/prefs/content/aw-identity.js
+++ b/mailnews/base/prefs/content/aw-identity.js
@@ -96,17 +96,17 @@ function clearEmailTextItems()
   if (emailDescText.hasChildNodes())
     emailDescText.firstChild.remove();
 
   var postEmailText = document.getElementById("postEmailText");
   postEmailText.setAttribute("value", "");
   postEmailText.hidden = true;
 }
 
-// Use email example data that ISP has provided. ISP data, if avaialble
+// Use email example data that ISP has provided. ISP data, if available
 // for the choice user has made, will be read into CurrentAccountData.
 // Default example data from properties will be used when the info is missing.
 function setEmailDescriptionText()
 {
     var emailDescText = document.getElementById("emailDescText");
     var emailFieldLabel = document.getElementById("emailFieldLabel");
     var currentAccountData = parent.gCurrentAccountData;
 
--- a/mailnews/base/prefs/content/aw-incoming.js
+++ b/mailnews/base/prefs/content/aw-incoming.js
@@ -96,17 +96,17 @@ function incomingPageInit() {
   // Server type selection (pop3 or imap) is for mail accounts only
   var pageData = parent.GetPageData();
   var isMailAccount = pageData.accounttype.mailaccount.value;
   var isOtherAccount = pageData.accounttype.otheraccount.value;
   if (isMailAccount && !gHideIncoming) {
     var serverTypeRadioGroup = document.getElementById("servertype");
     /*
      * Check to see if the radiogroup has any value. If there is no
-     * value, this must be the first time user visting this page in the
+     * value, this must be the first time user visiting this page in the
      * account setup process. So, the default is set to pop3. If there
      * is a value (it's used automatically), user has already visited
      * page and server type selection is done. Once user visits the page,
      * the server type value from then on will persist (whether the selection
      * came from the default or the user action).
      */
     if (!serverTypeRadioGroup.value) {
       /*
--- a/mailnews/base/public/nsIMapiRegistry.idl
+++ b/mailnews/base/public/nsIMapiRegistry.idl
@@ -32,17 +32,17 @@ interface nsIMapiRegistry: nsISupports {
 
    /** This will bring the dialog asking the user if he/she wants to set
     * Mozilla as default Mail Client.
     * Call this only if Mozilla is not the default Mail client
     */
    void showMailIntegrationDialog(in mozIDOMWindowProxy parentWindow);
 
    /* After being installed, when we first launch, make sure we add the correct
-    OS registry entries to make us show up as regsitered mail and news client
+    OS registry entries to make us show up as registered mail and news client
     in the OS
    */
 
    void registerMailAndNewsClient();
 };
 
 %{C++
 #define NS_IMAPIREGISTRY_CONTRACTID    "@mozilla.org/mapiregistry;1"
--- a/mailnews/base/public/nsIMsgCopyServiceListener.idl
+++ b/mailnews/base/public/nsIMsgCopyServiceListener.idl
@@ -21,30 +21,30 @@ interface nsIMsgCopyServiceListener : ns
      * Notify the observer that progress as occurred for the message copy
      * aProgress -
      * aProgressMax -
      */
     void OnProgress(in uint32_t aProgress,
                     in uint32_t aProgressMax);
 
     /**
-     * Setting newly created message key. This method is taylored specifically
-     * for nsIMsgCopyService::CopyFileMessage() when saveing Drafts/Templates.
+     * Setting newly created message key. This method is tailored specifically
+     * for nsIMsgCopyService::CopyFileMessage() when saving Drafts/Templates.
      * We need to have a way to inform the client what's the key of the newly
      * created message.
      * aKey -
      */
     void SetMessageKey(in nsMsgKey aKey);
 
     /**
-     * Getting the file message message ID. This method is taylored
+     * Getting the file message message ID. This method is tailored
      * specifically for nsIMsgCopyService::CopyFileMessage() when saving
      * Drafts/Templates. In order to work with imap server which doesn't
      * support uidplus we have to use search comman to retrieve the key of
-     * newly created message. Message ID generated by the compose gurantee its
+     * newly created message. Message ID generated by the compose guarantee its
      * uniqueness.
      * aMessageId -
      */
     void GetMessageId(out ACString aMessageId);
 
     /**
      * Notify the observer that the message copied operation has completed.
      * This method is called regardless of whether the the operation was
--- a/mailnews/base/public/nsIMsgDBView.idl
+++ b/mailnews/base/public/nsIMsgDBView.idl
@@ -495,17 +495,17 @@ interface nsIMsgDBView : nsISupports
 /* this interface is rapidly morphing from a command updater interface into a more generic
    FE updater interface to handle changes in the view
 */
 
 [scriptable, uuid(ce8f52ee-e742-4b31-8bdd-2b3a8168a117)]
 interface nsIMsgDBViewCommandUpdater : nsISupports
 {
   /* Eventually we'll flush this out into some kind of rich interface
-  which may take specifc selection changed type notifications like
+  which may take specific selection changed type notifications like
   no selections, single selection, multi-selection, etc. For starters,
   we are going to keep it generic. The back end will only push an update
   command status when the # of selected items changes.
   */
 
   void updateCommandStatus();
 
   /* displayed message has changed */
--- a/mailnews/base/public/nsIMsgIdentity.idl
+++ b/mailnews/base/public/nsIMsgIdentity.idl
@@ -141,17 +141,17 @@ interface nsIMsgIdentity : nsISupports {
    */
   attribute ACString fccFolderPickerMode;
   attribute ACString draftsFolderPickerMode;
   attribute ACString archivesFolderPickerMode;
   attribute ACString tmplFolderPickerMode;
   /** @} */
 
   // Don't call bccSelf, bccOthers, and bccList directly, they are
-  // only used for migration and backward compatability. Use doBcc
+  // only used for migration and backward compatibility. Use doBcc
   // and doBccList instead.
   attribute boolean bccSelf;
   attribute boolean bccOthers;
   attribute ACString bccList;
 
   attribute boolean doCc;
   attribute AUTF8String doCcList;
 
--- a/mailnews/base/public/nsIMsgShutdown.idl
+++ b/mailnews/base/public/nsIMsgShutdown.idl
@@ -6,17 +6,17 @@
 interface nsIUrlListener;
 interface nsIMsgWindow;
 interface nsIWebProgressListener;
 
 [scriptable, uuid(D1B43428-B631-4629-B691-AB0E01A2DB4B)]
 interface nsIMsgShutdownTask : nsISupports
 {
   /**
-   * Inform the caller wheter or not the task needs to be run. This method
+   * Inform the caller whether or not the task needs to be run. This method
    * gives the task the flexibility to cancel running a task on shutdown
    * if nothing needs to be run.
    */
   readonly attribute boolean needsToRunTask;
 
   /**
    * At shutdown-time, this function will be called to all registered implementors.
    * Shutdown will be temporarily postponed until |OnStopRequest()| has been called
--- a/mailnews/base/search/public/nsIMsgFilterList.idl
+++ b/mailnews/base/search/public/nsIMsgFilterList.idl
@@ -59,17 +59,17 @@ interface nsIMsgFilterList : nsISupports
     attribute boolean loggingEnabled;
 
     nsIMsgFilter createFilter(in AString name);
 
     void saveToFile(in nsIOutputStream stream);
 
     void parseCondition(in nsIMsgFilter aFilter, in string condition);
     // this is temporary so that we can save the filterlist to disk
-    // without knowing where the filters were read from intially
+    // without knowing where the filters were read from initially
     // (such as the filter list dialog)
     attribute nsIFile defaultFile;
     void saveToDefaultFile();
 
 
     // marking noscript because headers is a null-separated list
     // of strings, which is not scriptable
     [noscript]
--- a/mailnews/base/search/public/nsIMsgSearchSession.idl
+++ b/mailnews/base/search/public/nsIMsgSearchSession.idl
@@ -89,17 +89,17 @@ interface nsIMsgSearchSession :  nsISupp
   /* add a scope (e.g. a mail folder) to the search */
   void addScopeTerm(in nsMsgSearchScopeValue scope,
                     in nsIMsgFolder folder);
 
   void addDirectoryScopeTerm(in nsMsgSearchScopeValue scope);
 
   void clearScopes();
 
-  /* Call this function everytime the scope changes! It informs the FE if
+  /* Call this function every time the scope changes! It informs the FE if
      the current scope support custom header use. FEs should not display the
      custom header dialog if custom headers are not supported */
   [noscript] boolean ScopeUsesCustomHeaders(in nsMsgSearchScopeValue scope,
                                  /* could be a folder or server based on scope */
                                  in voidPtr selection,
                                  in boolean forFilters);
 
   /* use this to determine if your attribute is a string attrib */
--- a/mailnews/base/search/public/nsIMsgTraitService.idl
+++ b/mailnews/base/search/public/nsIMsgTraitService.idl
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
  /**
   * This interface provides management of traits that are used to categorize
   * messages. A trait is some characteristic of a message, such as being "junk"
   * or "personal", that may be discoverable by analysis of the message.
   *
   * Traits are described by a universal identifier "id" as a string, as well
-  * as a local integer identifer "index". One purpose of this service is to
+  * as a local integer identifier "index". One purpose of this service is to
   * provide the mapping between those forms.
   *
   * Recommended (but not required) format for id:
   * "extensionName@example.org#traitName"
   */
 
 #include "nsISupports.idl"
 
--- a/mailnews/base/search/src/nsMsgSearchTerm.cpp
+++ b/mailnews/base/search/src/nsMsgSearchTerm.cpp
@@ -75,17 +75,17 @@ nsMsgSearchAttribEntry SearchAttribEntry
     {nsMsgSearchAttrib::ToOrCC,     "to or cc"},
     {nsMsgSearchAttrib::AllAddresses, "all addresses"},
     {nsMsgSearchAttrib::AgeInDays,  "age in days"},
     {nsMsgSearchAttrib::Label,      "label"},
     {nsMsgSearchAttrib::Keywords,   "tag"},
     {nsMsgSearchAttrib::Size,       "size"},
     // this used to be nsMsgSearchAttrib::SenderInAddressBook
     // we used to have two Sender menuitems
-    // for backward compatability, we can still parse
+    // for backward compatibility, we can still parse
     // the old style.  see bug #179803
     {nsMsgSearchAttrib::Sender,     "from in ab"},
     {nsMsgSearchAttrib::JunkStatus, "junk status"},
     {nsMsgSearchAttrib::JunkPercent, "junk percent"},
     {nsMsgSearchAttrib::JunkScoreOrigin, "junk score origin"},
     {nsMsgSearchAttrib::HasAttachmentStatus, "has attachment status"},
 };
 
--- a/mailnews/base/src/nsMsgDBView.cpp
+++ b/mailnews/base/src/nsMsgDBView.cpp
@@ -339,17 +339,17 @@ GetDisplayNameInAddressBook(const nsACSt
  */
 static void
 GetCachedName(const nsCString& unparsedString,
               int32_t displayVersion,
               nsACString& cachedName)
 {
   nsresult err;
 
-  // Get verion #.
+  // Get version #.
   int32_t cachedVersion = unparsedString.ToInteger(&err);
   if (cachedVersion != displayVersion)
     return;
 
   // Get cached name.
   int32_t pos = unparsedString.FindChar('|');
   if (pos != kNotFound)
     cachedName = Substring(unparsedString, pos + 1);
@@ -1043,17 +1043,17 @@ nsMsgDBView::GetMessageEnumerator(nsISim
 
 NS_IMETHODIMP
 nsMsgDBView::IsEditable(int32_t row,
                         nsITreeColumn* col,
                         bool* _retval)
 {
   NS_ENSURE_ARG_POINTER(col);
   NS_ENSURE_ARG_POINTER(_retval);
-  // Attempt to retreive a custom column handler. If it exists call it and
+  // Attempt to retrieve a custom column handler. If it exists call it and
   // return.
   const char16_t* colID;
   col->GetIdConst(&colID);
 
   nsIMsgCustomColumnHandler* colHandler = GetColumnHandler(colID);
 
   if (colHandler)
   {
@@ -2159,17 +2159,17 @@ nsMsgDBView::GetCellText(int32_t aRow,
   const char16_t* colID;
   aCol->GetIdConst(&colID);
 
   if (!IsValidIndex(aRow))
     return NS_MSG_INVALID_DBVIEW_INDEX;
 
   aValue.Truncate();
 
-  // Attempt to retreive a custom column handler. If it exists call it and
+  // Attempt to retrieve a custom column handler. If it exists call it and
   // return.
   nsIMsgCustomColumnHandler* colHandler = GetColumnHandler(colID);
 
   if (colHandler)
   {
     colHandler->GetCellText(aRow, aCol, aValue);
     return NS_OK;
   }
@@ -2328,17 +2328,17 @@ nsMsgDBView::CycleCell(int32_t row,
                        nsITreeColumn* col)
 {
   if (!IsValidIndex(row))
     return NS_MSG_INVALID_DBVIEW_INDEX;
 
   const char16_t* colID;
   col->GetIdConst(&colID);
 
-  // Attempt to retreive a custom column handler. If it exists call it and
+  // Attempt to retrieve a custom column handler. If it exists call it and
   // return.
   nsIMsgCustomColumnHandler* colHandler = GetColumnHandler(colID);
 
   if (colHandler)
   {
     colHandler->CycleCell(row, col);
     return NS_OK;
   }
@@ -4380,17 +4380,17 @@ nsresult nsMsgDBView::GetFieldTypeAndLen
       }
 
       bool isString;
       colHandler->IsString(&isString);
 
       if (isString)
       {
         *pFieldType = kCollationKey;
-        // 80 - do we need a seperate k?
+        // 80 - do we need a separate k?
         *pMaxLen = kMaxRecipientKey;
       }
       else
       {
         *pFieldType = kU32;
         *pMaxLen = 0;
       }
       break;
@@ -6525,17 +6525,17 @@ nsMsgDBView::FindLevelInThread(nsIMsgDBH
         return m_levels[indexToTry] + 1;
     }
 
     // If msgHdr's key is its parentKey, we'll loop forever, so protect
     // against that corruption.
     if (msgKey == parentKey ||
         NS_FAILED(m_db->GetMsgHdrForKey(parentKey, getter_AddRefs(curMsgHdr))))
     {
-      NS_ERROR("msgKey == parentKey, or GetMsgHdrForKey failed, this used to be an infinte loop condition");
+      NS_ERROR("msgKey == parentKey, or GetMsgHdrForKey failed, this used to be an infinite loop condition");
       curMsgHdr = nullptr;
     }
     else
     {
       // Need to update msgKey so the check for a msgHdr with matching
       // key+parentKey will work after first time through loop.
       curMsgHdr->GetMessageKey(&msgKey);
     }
@@ -7401,17 +7401,17 @@ nsMsgDBView::NavigateFromPos(nsMsgNaviga
     case nsMsgNavigationType::firstNew:
       rv = FindFirstNew(pResultIndex);
       if (IsValidIndex(*pResultIndex))
         *pResultKey = m_keys[*pResultIndex];
 
       break;
     case nsMsgNavigationType::firstUnreadMessage:
       startIndex = nsMsgViewIndex_None;
-      // Note fall thru - is this motion ever used?
+      // Note fall through - is this motion ever used?
       MOZ_FALLTHROUGH;
     case nsMsgNavigationType::nextUnreadMessage:
       for (curIndex = (startIndex == nsMsgViewIndex_None) ? 0 : startIndex;
            curIndex <= lastIndex && lastIndex != nsMsgViewIndex_None;
            curIndex++)
       {
         uint32_t flags = m_flags[curIndex];
         // Don't return start index since navigate should move.
@@ -8705,24 +8705,24 @@ nsMsgDBView::CopyDBView(nsMsgDBView *aNe
   aNewMsgDBView->m_customColumnHandlers.AppendObjects(m_customColumnHandlers);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgDBView::GetSearchSession(nsIMsgSearchSession* *aSession)
 {
-  NS_ASSERTION(false, "should be overriden by child class");
+  NS_ASSERTION(false, "should be overridden by child class");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsMsgDBView::SetSearchSession(nsIMsgSearchSession *aSession)
 {
-  NS_ASSERTION(false, "should be overriden by child class");
+  NS_ASSERTION(false, "should be overridden by child class");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsMsgDBView::GetSupportsThreading(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
   *aResult = true;
--- a/mailnews/base/src/nsMsgDBView.h
+++ b/mailnews/base/src/nsMsgDBView.h
@@ -439,17 +439,17 @@ protected:
   // because the selection changed (i.e. after a sort).
   nsMsgKey                m_currentlyDisplayedMsgKey;
   nsCString               m_currentlyDisplayedMsgUri;
   nsMsgViewIndex          m_currentlyDisplayedViewIndex;
   // If we're deleting messages, we want to hold off loading messages on
   // selection changed until the delete is done and we want to batch
   // notifications.
   bool m_deletingRows;
-  // For certain special folders and decendents of those folders
+  // For certain special folders and descendants of those folders
   // (like the "Sent" folder, "Sent/Old Sent").
   // The Sender column really shows recipients.
 
   // Server types for this view's folder
   bool mIsNews;             // We have special icons for news.
   bool mIsRss;              // RSS affects enabling of junk commands.
   bool mIsXFVirtual;        // A virtual folder with multiple folders.
 
--- a/mailnews/base/src/nsMsgFolderCompactor.cpp
+++ b/mailnews/base/src/nsMsgFolderCompactor.cpp
@@ -1278,17 +1278,17 @@ nsFolderCompactState::EndCopy(nsISupport
     if (m_addedHeaderSize)
     {
       msgSize += m_addedHeaderSize;
       newMsgHdr->SetMessageSize(msgSize);
     }
     m_totalMsgSize += msgSize;
   }
 
-//  m_db->Commit(nsMsgDBCommitType::kLargeCommit);  // no sense commiting until the end
+//  m_db->Commit(nsMsgDBCommitType::kLargeCommit);  // no sense committing until the end
   // advance to next message
   m_curIndex ++;
   m_startOfMsg = true;
   nsCOMPtr <nsIMsgStatusFeedback> statusFeedback;
   if (m_window)
   {
     m_window->GetStatusFeedback(getter_AddRefs(statusFeedback));
     if (statusFeedback)
--- a/mailnews/base/src/nsMsgMailSession.cpp
+++ b/mailnews/base/src/nsMsgMailSession.cpp
@@ -276,17 +276,17 @@ nsresult nsMsgMailSession::GetTopmostMsg
 
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsISupports> windowSupports;
     nsCOMPtr<nsPIDOMWindowOuter> topMostWindow;
     nsAutoString windowType;
     bool more;
 
-    // loop to get the top most with attibute "mail:3pane" or "mail:messageWindow"
+    // loop to get the top most with attribute "mail:3pane" or "mail:messageWindow"
     windowEnum->HasMoreElements(&more);
     while (more)
     {
       rv = windowEnum->GetNext(getter_AddRefs(windowSupports));
       NS_ENSURE_SUCCESS(rv, rv);
       NS_ENSURE_TRUE(windowSupports, NS_ERROR_FAILURE);
 
       topMostWindow = do_QueryInterface(windowSupports, &rv);
--- a/mailnews/base/src/nsMsgPrintEngine.cpp
+++ b/mailnews/base/src/nsMsgPrintEngine.cpp
@@ -531,17 +531,17 @@ nsMsgPrintEngine::SetupObserver()
     if (progress)
     {
       (void) progress->AddProgressListener((nsIWebProgressListener *)this,
                                         nsIWebProgress::NOTIFY_STATE_DOCUMENT);
     }
 
     // Cache a pointer to the mail message's DOMWindow
     // so later we know when we can print when the
-    // document "loaded" msgs com thru via the Progress listener
+    // document "loaded" msgs com through via the Progress listener
     mMsgDOMWin = do_GetInterface(mDocShell);
   }
 }
 
 nsresult
 nsMsgPrintEngine::SetStatusMessage(const nsString& aMsgString)
 {
   if ( (!mFeedback) || (aMsgString.IsEmpty()) )
--- a/mailnews/base/src/nsMsgThreadedDBView.cpp
+++ b/mailnews/base/src/nsMsgThreadedDBView.cpp
@@ -544,17 +544,17 @@ nsMsgThreadedDBView::ListThreadIds(nsMsg
       }
     }
     else if (threadsRemoved < 10 &&
              !(threadFlags & (nsMsgMessageFlags::Watched |
                               nsMsgMessageFlags::Ignored)))
     {
       // ### remove thread.
       // Don't want to remove all empty threads first time around as it will
-      // choke preformance for upgrade.
+      // choke performance for upgrade.
       threadsRemoved++;
 #ifdef DEBUG_bienvenu
       printf("removing empty non-ignored non-watched thread\n");
 #endif
     }
   }
 
   if (hasMore && threadHdr)
@@ -1081,17 +1081,17 @@ nsMsgThreadedDBView::RemoveByIndex(nsMsg
 
     }
 
     return nsMsgDBView::RemoveByIndex(index);
   }
 
   // Deleting collapsed thread header is special case. Child will be promoted,
   // so just tell FE that line changed, not that it was deleted.
-  // Header has aleady been deleted from thread.
+  // Header has already been deleted from thread.
   if (threadHdr && numThreadChildren > 0)
   {
     // Change the id array and flags array to reflect the child header.
     // If we're not deleting the header, we want the second header,
     // Otherwise, the first one (which just got promoted).
     nsCOMPtr<nsIMsgDBHdr> msgHdr;
     rv = threadHdr->GetChildHdrAt(0, getter_AddRefs(msgHdr));
     if (msgHdr != nullptr)
--- a/mailnews/base/test/unit/test_folderLookupService.js
+++ b/mailnews/base/test/unit/test_folderLookupService.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
- * This tests that nsIFolderLookupService works acording to specification.
+ * This tests that nsIFolderLookupService works according to specification.
  */
 ChromeUtils.import("resource:///modules/mailServices.js");
 
 var kRootURI = "mailbox://nobody@Local%20Folders";
 
 function run_test() {
   let fls = Cc["@mozilla.org/mail/folder-lookup;1"]
               .getService(Ci.nsIFolderLookupService);
--- a/mailnews/base/test/unit/test_junkWhitelisting.js
+++ b/mailnews/base/test/unit/test_junkWhitelisting.js
@@ -97,17 +97,17 @@ function doChecks(server)
   spamSettings.initialize(server);
 
   // check that the change was propagated to spamSettings
   Assert.ok(!spamSettings.useWhiteList);
 
   // and affects whitelisting calculationss
   Assert.ok(!spamSettings.checkWhiteList(hdrs[kDomainTest]));
 
-  // reenable whitelisting
+  // re-enable whitelisting
   server.setBoolValue("useWhiteList", true);
   spamSettings.initialize(server);
   Assert.ok(spamSettings.checkWhiteList(hdrs[kDomainTest]));
 
   // Set an empty white list.
   // To really empty this, I have to change the default value as well
   Services.prefs.setCharPref("mail.server.default.whiteListAbURI", "");
   server.setCharValue("whiteListAbURI", "");
--- a/mailnews/base/test/unit/test_testsuite_fakeserver_imapd_gmail.js
+++ b/mailnews/base/test/unit/test_testsuite_fakeserver_imapd_gmail.js
@@ -13,17 +13,17 @@ load("../../../resources/alertTestUtils.
 
 // IMAP pump
 ChromeUtils.import("resource://testing-common/mailnews/IMAPpump.js");
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 
 setupIMAPPump("GMail");
-// create our own hander so that we can call imapd functions directly
+// create our own handler so that we can call imapd functions directly
 var handler;
 
 // Definition of tests
 var tests = [
   setupMailboxes,
   testXlist,
   endTest
 ]
--- a/mailnews/base/test/unit/test_testsuite_fakeserver_imapd_list-extended.js
+++ b/mailnews/base/test/unit/test_testsuite_fakeserver_imapd_list-extended.js
@@ -15,17 +15,17 @@ ChromeUtils.import("resource://testing-c
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // Globals
 
 
 // Dovecot is one of the servers that supports LIST-EXTENDED
 setupIMAPPump("Dovecot");
-// create our own hander so that we can call imapd functions directly
+// create our own handler so that we can call imapd functions directly
 var handler;
 
 // Definition of tests
 var tests = [
   setupMailboxes,
   testList,
   testListSelectSubscribed,
   testListReturnChilderen,
--- a/mailnews/base/util/converterWorker.js
+++ b/mailnews/base/util/converterWorker.js
@@ -239,17 +239,17 @@ self.addEventListener("message", functio
               // Set index of the (i+1)th "From - " match found in 'text'.
               lastMatchIndex = msgPos[i + 1];
             }
 
             // Now 'lastMatchIndex' holds the index of the last match found in
             // 'text'. So we move the position in the file to 'position +
             // lastMatchIndex' from the beginning of the file.
             // This ensures that the next 'text' starts from "From - "
-            // and that there is at least 1 match everytime.
+            // and that there is at least 1 match every time.
             sourceFileOpen.setPosition(position + lastMatchIndex,
               OS.File.POS_START);
           } else {
             // If 1 match is found increase the no. of bytes to be extracted by
             // 1000000 and move the position in the file to 'position', i.e. the
             // position in the file before reading the bytes.
             sourceFileOpen.setPosition(position, OS.File.POS_START);
             noOfBytes = noOfBytes + 1000000;
--- a/mailnews/base/util/errUtils.js
+++ b/mailnews/base/util/errUtils.js
@@ -52,17 +52,17 @@ function logElement(aElement) {
  */
 function logEvent(aEvent) {
   stringifier.dumpEvent(aEvent);
 }
 
 /**
  * Dump the current stack and return an Error suitable for throwing.  We return
  *  the new Error so that your code can use a "throw" statement which makes it
- *  obvious to syntactic analysis that there is an exit occuring at that point.
+ *  obvious to syntactic analysis that there is an exit occurring at that point.
  *
  * Example:
  *   throw errorWithDebug("I did not expect this!");
  *
  * @param aString The message payload for the exception.
  */
 function errorWithDebug(aString) {
   dump("PROBLEM: " + aString + "\n");
--- a/mailnews/base/util/mailnewsMigrator.js
+++ b/mailnews/base/util/mailnewsMigrator.js
@@ -111,17 +111,17 @@ function MigrateServerAuthPref()
                             Ci.nsMsgAuthMethod.passwordCleartext) :
                         Ci.nsMsgAuthMethod.none);
       Services.prefs.setIntPref(server + "migrated", kSmtpPrefVersion);
     }
   } catch(e) { logException(e); }
 }
 
 /**
- * The address book used to contain information about wheather to allow remote
+ * The address book used to contain information about whether to allow remote
  * content for a given contact. Now we use the permission manager for that.
  * Do a one-time migration for it.
  */
 function MigrateABRemoteContentSettings()
 {
   if (Services.prefs.prefHasUserValue("mail.ab_remote_content.migrated"))
     return;
 
--- a/mailnews/base/util/nsMsgDBFolder.cpp
+++ b/mailnews/base/util/nsMsgDBFolder.cpp
@@ -2205,17 +2205,17 @@ nsMsgDBFolder::SetStringProperty(const c
       cacheElement->SetStringProperty(propertyName, propertyValue);
   }
   nsCOMPtr<nsIDBFolderInfo> folderInfo;
   nsCOMPtr<nsIMsgDatabase> db;
   nsresult rv = GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(db));
   if(NS_SUCCEEDED(rv))
   {
     folderInfo->SetCharProperty(propertyName, propertyValue);
-    db->Commit(nsMsgDBCommitType::kLargeCommit);  //commiting the db also commits the cache
+    db->Commit(nsMsgDBCommitType::kLargeCommit);  //committing the db also commits the cache
   }
   return NS_OK;
 }
 
 // Get/Set ForcePropertyEmpty is only used with inherited properties
 NS_IMETHODIMP
 nsMsgDBFolder::GetForcePropertyEmpty(const char *aPropertyName, bool *_retval)
 {
@@ -3108,17 +3108,17 @@ NS_IMETHODIMP nsMsgDBFolder::GetFolderUR
   url.Assign(EmptyCString());
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgDBFolder::GetServer(nsIMsgIncomingServer ** aServer)
 {
   NS_ENSURE_ARG_POINTER(aServer);
   nsresult rv;
-  // short circut the server if we have it.
+  // short circuit the server if we have it.
   nsCOMPtr<nsIMsgIncomingServer> server = do_QueryReferent(mServer, &rv);
   if (NS_FAILED(rv))
   {
     // try again after parsing the URI
     rv = parseURI(true);
     server = do_QueryReferent(mServer);
   }
   server.forget(aServer);
@@ -5700,17 +5700,17 @@ void nsMsgDBFolder::compressQuotesInMsgS
   int32_t lineFeedPos = 0;
   while (offset < msgBodyStrLen)
   {
     lineFeedPos = aMsgSnippet.FindChar('\n', offset);
     if (lineFeedPos != -1)
     {
       const nsAString& currentLine = Substring(aMsgSnippet, offset, lineFeedPos - offset);
       // this catches quoted text ("> "), nested quotes of any level (">> ", ">>> ", ...)
-      // it also catches empty line quoted text (">"). It might be over agressive and require
+      // it also catches empty line quoted text (">"). It might be over aggressive and require
       // tweaking later.
       // Try to strip the citation. If the current line ends with a ':' and the next line
       // looks like a quoted reply (starts with a ">") skip the current line
       if (StringBeginsWith(currentLine, NS_LITERAL_STRING(">")) ||
           (lineFeedPos + 1 < msgBodyStrLen  && lineFeedPos
           && aMsgSnippet[lineFeedPos - 1] == char16_t(':')
           && aMsgSnippet[lineFeedPos + 1] == char16_t('>')))
       {
--- a/mailnews/base/util/nsMsgKeyArray.cpp
+++ b/mailnews/base/util/nsMsgKeyArray.cpp
@@ -56,17 +56,17 @@ NS_IMETHODIMP nsMsgKeyArray::AppendEleme
                "Inserting a new key at wrong position in a sorted key list!");
 #endif
   m_keys.AppendElement(aKey);
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgKeyArray::InsertElementSorted(nsMsgKey aKey)
 {
-  // Ths function should be removed after interfaces are not frozen for TB38.
+  // This function should be removed after interfaces are not frozen for TB38.
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsMsgKeyArray::GetArray(uint32_t *aCount, nsMsgKey **aKeys)
 {
   NS_ENSURE_ARG_POINTER(aCount);
   NS_ENSURE_ARG_POINTER(aKeys);
   *aCount = m_keys.Length();
--- a/mailnews/base/util/nsMsgKeySet.cpp
+++ b/mailnews/base/util/nsMsgKeySet.cpp
@@ -28,17 +28,17 @@
    - strictly increasing
    - large subsequences of monotonically increasing ranges
    - gaps in the set are usually small, but not always
    - consecutive ranges tend to be large
 
    The biggest win is to run-length encode the data, storing ranges as two
    numbers (start+length or start,end). We could also store each number as a
    delta from the previous number for further compression, but that gets kind
-   of tricky, since there are no guarentees about the sizes of the gaps, and
+   of tricky, since there are no guarantees about the sizes of the gaps, and
    we'd have to store variable-length words.
 
    Current data format:
 
    DATA := SIZE [ CHUNK ]*
    CHUNK := [ RANGE | VALUE ]
    RANGE := -LENGTH START
    START := VALUE
--- a/mailnews/base/util/nsMsgProtocol.h
+++ b/mailnews/base/util/nsMsgProtocol.h
@@ -116,20 +116,20 @@ protected:
 
   virtual nsresult InitFromURI(nsIURI *aUrl);
 
   nsresult DoNtlmStep1(const nsACString &username, const nsAString &password, nsCString &response);
   nsresult DoNtlmStep2(nsCString &commandResponse, nsCString &response);
 
   nsresult DoGSSAPIStep1(const char *service, const char *username, nsCString &response);
   nsresult DoGSSAPIStep2(nsCString &commandResponse, nsCString &response);
-  // Ouput stream for writing commands to the socket
+  // Output stream for writing commands to the socket
   nsCOMPtr<nsIOutputStream>   m_outputStream;   // this will be obtained from the transport interface
 
-  // Ouput stream for writing commands to the socket
+  // Output stream for writing commands to the socket
   nsCOMPtr<nsITransport>  m_transport;
   nsCOMPtr<nsIRequest>    m_request;
   nsCOMPtr<nsICancelable> m_proxyRequest;
 
   bool          m_socketIsOpen; // mscott: we should look into keeping this state in the nsSocketTransport...
                                   // I'm using it to make sure I open the socket the first time a URL is loaded into the connection
   uint32_t      m_flags; // used to store flag information
   //uint32_t  m_startPosition;
@@ -191,17 +191,17 @@ public:
 
   // if we suspended the asynch write while waiting for more data to write then this will be TRUE
   bool mSuspendedWrite;
   nsCOMPtr<nsIRequest>     m_WriteRequest;
   nsCOMPtr<nsIAsyncOutputStream>    mAsyncOutStream;
   nsCOMPtr<nsIOutputStreamCallback> mProvider;
   nsCOMPtr<nsIThread>               mProviderThread;
 
-  // because we are reading the post data in asychronously, it's possible that we aren't sending it
+  // because we are reading the post data in asynchronously, it's possible that we aren't sending it
   // out fast enough and the reading gets blocked. The following set of state variables are used to
   // track this.
   bool    mSuspendedRead;
   bool    mInsertPeriodRequired; // do we need to insert a '.' as part of the unblocking process
 
   nsresult ProcessIncomingPostData(nsIInputStream *inStr, uint32_t count);
   nsresult UnblockPostReader();
   nsresult UpdateSuspendedReadBytes(uint32_t aNewBytes, bool aAddToPostPeriodByteCount);
--- a/mailnews/base/util/nsMsgUtils.cpp
+++ b/mailnews/base/util/nsMsgUtils.cpp
@@ -222,17 +222,17 @@ nsresult NS_MsgGetPriorityFromString(
            nsMsgPriorityValue & outPriority)
 {
   if (!priority)
     return NS_ERROR_NULL_POINTER;
 
   // Note: Checking the values separately and _before_ the names,
   //        hoping for a much faster match;
   //       Only _drawback_, as "priority" handling is not truly specified:
-  //        some softwares may have the number meanings reversed (1=Lowest) !?
+  //        some software may have the number meanings reversed (1=Lowest) !?
   if (PL_strchr(priority, '1'))
     outPriority = nsMsgPriority::highest;
   else if (PL_strchr(priority, '2'))
     outPriority = nsMsgPriority::high;
   else if (PL_strchr(priority, '3'))
     outPriority = nsMsgPriority::normal;
   else if (PL_strchr(priority, '4'))
     outPriority = nsMsgPriority::low;
@@ -633,17 +633,17 @@ bool NS_MsgStripRE(const char **stringP,
   nsresult rv;
   nsString utf16LocalizedRe;
   NS_GetLocalizedUnicharPreferenceWithDefault(nullptr,
                                               "mailnews.localizedRe",
                                               EmptyString(),
                                               utf16LocalizedRe);
   NS_ConvertUTF16toUTF8 localizedRe(utf16LocalizedRe);
 
-  // hardcoded "Re" so that noone can configure Mozilla standards incompatible
+  // hardcoded "Re" so that no one can configure Mozilla standards incompatible
   nsAutoCString checkString("Re,RE,re,rE");
   if (!localizedRe.IsEmpty()) {
     checkString.Append(',');
     checkString.Append(localizedRe);
   }
 
   // decode the string
   nsCString decodedString;
@@ -839,17 +839,17 @@ bool IsAFromSpaceLine(char *start, const
     start++;
   // If the leading '>'s are followed by an 'F' then we have a possible case here.
   if ( (*start == 'F') && (end-start > 4) && !strncmp(start, "From ", 5) )
     rv = true;
   return rv;
 }
 
 //
-// This function finds all lines starting with "From " or "From " preceeding
+// This function finds all lines starting with "From " or "From " preceding
 // with one or more '>' (ie, ">From", ">>From", etc) in the input buffer
 // (between 'start' and 'end') and prefix them with a ">" .
 //
 nsresult EscapeFromSpaceLine(nsIOutputStream *outputStream, char *start, const char *end)
 {
   nsresult rv;
   char *pChar;
   uint32_t written;
--- a/mailnews/base/util/nsMsgUtils.h
+++ b/mailnews/base/util/nsMsgUtils.h
@@ -286,18 +286,18 @@ NS_MSG_BASE PRTime MsgConvertAgeInDaysTo
 NS_MSG_BASE nsresult MsgTermListToString(nsIArray *aTermList, nsCString &aOutString);
 
 NS_MSG_BASE nsresult
 MsgStreamMsgHeaders(nsIInputStream *aInputStream, nsIStreamListener *aConsumer);
 
 /**
  * convert string to uint64_t
  *
- * @param str conveted string
- * @returns   uint64_t vaule for success, 0 for parse failure
+ * @param str converted string
+ * @returns   uint64_t value for success, 0 for parse failure
  */
 NS_MSG_BASE uint64_t ParseUint64Str(const char *str);
 
 /**
  * Detect charset of file
  *
  * @param      aFile    The target of nsIFile
  * @param[out] aCharset The charset string
--- a/mailnews/compose/public/nsIMsgAttachment.idl
+++ b/mailnews/compose/public/nsIMsgAttachment.idl
@@ -64,17 +64,17 @@ interface nsIMsgAttachment : nsISupports
    */
   attribute ACString contentLocation;
 
   /**
    * contentType attribute
    *
    * @Specify the content-type of the attachment, this does not include extra content-type parameters. If
    * @you need to specify extra information, use contentTypeParam, charset, macType or macCreator.
-   * @If ommitted, it will be determined base on either the name, the url or the content of the file.
+   * @If omitted, it will be determined base on either the name, the url or the content of the file.
    */
   attribute string    contentType;
 
   /**
    * contentTypeParam attribute
    *
    * @Specify the any content-type parameter (other than the content-type itself, charset, macType or macCreator).
    * @It will be added to the content-type during the send/save operation.
--- a/mailnews/compose/public/nsIMsgCompose.idl
+++ b/mailnews/compose/public/nsIMsgCompose.idl
@@ -260,17 +260,17 @@ interface nsIMsgCompose : nsIMsgSendList
                                               in boolean aQuoted,
                                               in boolean aHTMLEditor);
 
   /* Tell the doc state listeners that the doc state has changed
    * aNotificationType is from nsIMsgComposeNotificationType
    */
   [noscript] void notifyStateListeners(in long aNotificationType, in nsresult aResult);
 
-  /* Retreive the progress object */
+  /* Retrieve the progress object */
   readonly attribute nsIMsgProgress progress;
 
 	/* ... */
   [noscript] void buildBodyMessageAndSignature();
 
 	/* ... */
   [noscript] void buildQuotedMessageAndSignature();
 
--- a/mailnews/compose/public/nsIMsgComposeService.idl
+++ b/mailnews/compose/public/nsIMsgComposeService.idl
@@ -41,17 +41,17 @@ interface nsIMsgComposeService : nsISupp
   void OpenComposeWindowWithURI(in string msgComposeWindowURL,
                                 in nsIURI aURI,
                                 [optional] in nsIMsgIdentity aIdentity);
 
   /* ... */
   void OpenComposeWindowWithParams(in string msgComposeWindowURL, in nsIMsgComposeParams params);
 
   /**
-   * Creates an nsIMsgCompose instance and initalizes it.
+   * Creates an nsIMsgCompose instance and initializes it.
    *
    * @param aParams   An nsIMsgComposeParams object containing the initial
    *                  details for the compose.
    * @param aWindow   The optional window associated with this compose object.
    * @param aDocShell The optional docShell of the editor element that is used
    *                  for composing.
    */
   nsIMsgCompose initCompose(in nsIMsgComposeParams aParams,
--- a/mailnews/compose/public/nsIMsgSend.idl
+++ b/mailnews/compose/public/nsIMsgSend.idl
@@ -312,17 +312,17 @@ interface nsIMsgSend : nsISupports
     nsresult fail(in nsresult aFailureCode, in wstring aErrorMsg);
 
     /* Disable UI notification (alert message) */
     void setGUINotificationState(in boolean aEnableFlag);
 
     /* Crypto */
     void BeginCryptoEncapsulation();
 
-    /* retreive the last send process report*/
+    /* retrieve the last send process report*/
     readonly attribute nsIMsgSendReport sendReport;
 
     /* methods for send listener ... */
     void notifyListenerOnStartSending(in string aMsgID, in unsigned long aMsgSize);
     void notifyListenerOnProgress(in string aMsgID, in unsigned long aProgress, in unsigned long aProgressMax);
     void notifyListenerOnStatus(in string aMsgID, in wstring aMsg);
     void notifyListenerOnStopSending(in string aMsgID, in nsresult aStatus, in wstring aMsg, in nsIFile returnFile);
     void deliverAsMailExit(in nsIURI aUrl, in nsresult aExitCode);
--- a/mailnews/compose/src/nsComposeStrings.cpp
+++ b/mailnews/compose/src/nsComposeStrings.cpp
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsComposeStrings.h"
 
 const char* errorStringNameForErrorCode(nsresult aCode)
 {
 #ifdef __GNUC__
-// Temporary workaroung until bug 783526 is fixed.
+// Temporary workaround until bug 783526 is fixed.
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wswitch"
 #endif
   switch(aCode)
   {
     case NS_MSG_UNABLE_TO_OPEN_FILE:
       return "unableToOpenFile";
     case NS_MSG_UNABLE_TO_OPEN_TMP_FILE:
--- a/mailnews/compose/src/nsMsgAppleEncode.cpp
+++ b/mailnews/compose/src/nsMsgAppleEncode.cpp
@@ -378,17 +378,17 @@ static struct magic magic[] =
 };
 static int num_magic = MOZ_ARRAY_LENGTH(magic);
 
 static const char *text_type    = TEXT_PLAIN;					/* the text file type. */
 static const char *default_type = APPLICATION_OCTET_STREAM;
 
 
 /*
- * Determins the format of the file "inputf".  The name
+ * Determines the format of the file "inputf".  The name
  * of the file format (or NULL on error) is returned.
  */
 static const char *magic_look(char *inbuff, int numread)
 {
     int i, j;
 
 	for (i=0; i<num_magic; i++)
 	{
@@ -537,17 +537,17 @@ int ap_encode_data(
 	return status;
 }
 
 static char basis_64[] =
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
 /*
 **	convert the stream in the inbuff to 64 format and put it in the out buff.
-**  To make the life easier, the caller will responcable of the cheking of the outbuff's bundary.
+**  To make the life easier, the caller will responcable of the checking of the outbuff's bundary.
 */
 static int
 to64(appledouble_encode_object* p_ap_encode_obj,
 	char	*p,
 	int 	in_size)
 {
 	int 	status;
     int c1, c2, c3, ct;
--- a/mailnews/compose/src/nsMsgCompUtils.cpp
+++ b/mailnews/compose/src/nsMsgCompUtils.cpp
@@ -266,17 +266,17 @@ nsresult mime_generate_headers(nsIMsgCom
 
   PRExplodedTime now;
   PR_ExplodeTime(PR_Now(), PR_LocalTimeParameters, &now);
   int gmtoffset = (now.tm_params.tp_gmt_offset + now.tm_params.tp_dst_offset) / 60;
 
   /* Use PR_FormatTimeUSEnglish() to format the date in US English format,
      then figure out what our local GMT offset is, and append it (since
      PR_FormatTimeUSEnglish() can't do that.) Generate four digit years as
-     per RFC 1123 (superceding RFC 822.)
+     per RFC 1123 (superseding RFC 822.)
    */
   char dateString[130];
   PR_FormatTimeUSEnglish(dateString, sizeof(dateString),
                "%a, %d %b %Y %H:%M:%S ",
                &now);
 
   char *entryPoint = dateString + strlen(dateString);
   PR_snprintf(entryPoint, sizeof(dateString) - (entryPoint - dateString),
@@ -418,17 +418,17 @@ nsresult mime_generate_headers(nsIMsgCom
             }
           }
         }
       }
     }
   }
 
   // We don't want to emit a Bcc header to the output. If we are saving this to
-  // Drafts/Sent, this is readded later in nsMsgSend.cpp.
+  // Drafts/Sent, this is re-added later in nsMsgSend.cpp.
   finalHeaders->DeleteHeader("bcc");
 
   // Skip no or empty priority.
   nsAutoCString priority;
   rv = fields->GetRawHeader("X-Priority", priority);
   if (NS_SUCCEEDED(rv) && !priority.IsEmpty())
   {
     nsMsgPriorityValue priorityValue;
@@ -926,17 +926,17 @@ msg_generate_message_id (nsIMsgIdentity 
 
 
 inline static bool is7bitCharset(const nsCString& charset)
 {
   // charset name is canonical (no worry about case-sensitivity)
   return Substring(charset, 0, 8).EqualsLiteral("ISO-2022-");
 }
 
-#define PR_MAX_FOLDING_LEN 75     // this is to gurantee the folded line will
+#define PR_MAX_FOLDING_LEN 75     // this is to guarantee the folded line will
                                   // never be greater than 78 = 75 + CRLFLWSP
 /*static */ char *
 RFC2231ParmFolding(const char *parmName, const nsCString& charset,
                    const char *language, const nsString& parmValue)
 {
   NS_ENSURE_TRUE(parmName && *parmName && !parmValue.IsEmpty(), nullptr);
 
   bool needEscape;
@@ -1217,17 +1217,17 @@ mime_type_requires_b64_p (const char *ty
 
   else if (!PL_strncasecmp (type, "image/", 6) ||
        !PL_strncasecmp (type, "audio/", 6) ||
        !PL_strncasecmp (type, "video/", 6) ||
        !PL_strncasecmp (type, "application/", 12))
   {
     /* The following types are application/ or image/ types that are actually
      known to contain textual data (meaning line-based, not binary, where
-     CRLF conversion is desired rather than disasterous.)  So, if the type
+     CRLF conversion is desired rather than disastrous.)  So, if the type
      is any of these, it does not *require* base64, and if we do need to
      encode it for other reasons, we'll probably use quoted-printable.
      But, if it's not one of these types, then we assume that any subtypes
      of the non-"text/" types are binary data, where CRLF conversion would
      corrupt it, so we use base64 right off the bat.
 
      The reason it's desirable to ship these as text instead of just using
      base64 all the time is mainly to preserve the readability of them for
--- a/mailnews/compose/src/nsMsgCompose.cpp
+++ b/mailnews/compose/src/nsMsgCompose.cpp
@@ -1463,17 +1463,17 @@ NS_IMETHODIMP nsMsgCompose::SendMsg(MSG_
       mMsgSend->GetSendReport(getter_AddRefs(sendReport));
     if (sendReport)
     {
       nsresult theError;
       sendReport->DisplayReport(prompt, true, true, &theError);
     }
     else
     {
-      /* If we come here it's because we got an error before we could intialize a
+      /* If we come here it's because we got an error before we could initialize a
          send report! Let's try our best...
       */
       switch (deliverMode)
       {
         case nsIMsgCompDeliverMode::Later:
           nsMsgDisplayMessageByName(prompt, "unableToSendLater");
           break;
         case nsIMsgCompDeliverMode::AutoSaveAsDraft:
@@ -2272,17 +2272,17 @@ NS_IMETHODIMP nsMsgCompose::GetSavedFold
 NS_IMETHODIMP nsMsgCompose::GetOriginalMsgURI(char ** originalMsgURI)
 {
   NS_ENSURE_ARG_POINTER(originalMsgURI);
   *originalMsgURI = ToNewCString(mOriginalMsgURI);
   return (*originalMsgURI) ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
 }
 
 ////////////////////////////////////////////////////////////////////////////////////
-// THIS IS THE CLASS THAT IS THE STREAM CONSUMER OF THE HTML OUPUT
+// THIS IS THE CLASS THAT IS THE STREAM CONSUMER OF THE HTML OUTPUT
 // FROM LIBMIME. THIS IS FOR QUOTING
 ////////////////////////////////////////////////////////////////////////////////////
 QuotingOutputStreamListener::~QuotingOutputStreamListener()
 {
 }
 
 QuotingOutputStreamListener::QuotingOutputStreamListener(const char * originalMsgURI,
                                                          nsIMsgDBHdr *originalMsgHdr,
@@ -2608,17 +2608,17 @@ NS_IMETHODIMP QuotingOutputStreamListene
         do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv);
       NS_ENSURE_SUCCESS(rv,rv);
 
       nsCOMPtr<nsIArray> identities;
       nsCString accountKey;
       mOrigMsgHdr->GetAccountKey(getter_Copies(accountKey));
       if (replyToSelfCheckAll)
       {
-        // Check all avaliable identities if the pref was set.
+        // Check all available identities if the pref was set.
         accountManager->GetAllIdentities(getter_AddRefs(identities));
       }
       else if (!accountKey.IsEmpty())
       {
          // Check headers to see which account the message came in from
          // (only works for pop3).
         nsCOMPtr<nsIMsgAccount> account;
         accountManager->GetAccount(accountKey, getter_AddRefs(account));
@@ -4568,17 +4568,17 @@ nsMsgCompose::BuildBodyMessageAndSignatu
 
   //
   // Now, we have the body so we can just blast it into the
   // composition editor window.
   //
   nsAutoString   body;
   m_compFields->GetBody(body);
 
-  /* Some time we want to add a signature and sometime we wont. Let's figure that now...*/
+  /* Some time we want to add a signature and sometime we won't. Let's figure that now...*/
   bool addSignature;
   bool isQuoted = false;
   switch (mType)
   {
     case nsIMsgCompType::ForwardInline :
       addSignature = true;
       isQuoted = true;
       break;
--- a/mailnews/compose/src/nsMsgCompose.h
+++ b/mailnews/compose/src/nsMsgCompose.h
@@ -142,17 +142,17 @@ protected:
   bool                                      mInsertingQuotedContent;
   MSG_DeliverMode                           mDeliverMode;  // nsIMsgCompDeliverMode long.
 
   friend class QuotingOutputStreamListener;
   friend class nsMsgComposeSendListener;
 };
 
 ////////////////////////////////////////////////////////////////////////////////////
-// THIS IS THE CLASS THAT IS THE STREAM Listener OF THE HTML OUPUT
+// THIS IS THE CLASS THAT IS THE STREAM Listener OF THE HTML OUTPUT
 // FROM LIBMIME. THIS IS FOR QUOTING
 ////////////////////////////////////////////////////////////////////////////////////
 class QuotingOutputStreamListener : public nsIMsgQuotingOutputStreamListener
 {
 public:
     QuotingOutputStreamListener(const char *originalMsgURI,
                                 nsIMsgDBHdr *origMsgHdr,
                                 bool quoteHeaders,
--- a/mailnews/compose/src/nsMsgSend.cpp
+++ b/mailnews/compose/src/nsMsgSend.cpp
@@ -1704,17 +1704,17 @@ nsMsgComposeAndSend::ProcessMultipartRel
     m_attachments[i]->mDeleteFile = true;
     m_attachments[i]->m_done = false;
     m_attachments[i]->SetMimeDeliveryState(this);
     m_attachments[i]->mNodeIndex = locCount;
 
     j++;
     domSaveArray[j].element = domElement;
 
-    // check if we have alreay attached this object, don't need to attach it twice
+    // check if we have already attached this object, don't need to attach it twice
     duplicateOf = -1;
     for (k = mPreloadedAttachmentCount; k < i; k++)
     {
       bool isEqual = false;
       NS_ASSERTION(attachment->m_url, "null attachment url!");
       if (attachment->m_url)
         (void)attachment->m_url->Equals(m_attachments[k]->mURL, &isEqual);
       if (isEqual)
@@ -2772,17 +2772,17 @@ nsMsgComposeAndSend::InitCompositionFiel
                     mCompFields->GetSubject(), mCompFields->GetReferences(),
                     mCompFields->GetOrganization(), "");
   }
   return NS_OK;
 }
 
 // Add default headers to outgoing messages see Bug #61520
 // mail.identity.<id#>.headers pref is a comma separated value of pref names
-// containging headers to add headers are stored in
+// containing headers to add headers are stored in
 // mail.identity.<id#>.header.<header name> grab all the headers, mime encode
 // them and add them to the other custom headers.
 nsresult
 nsMsgComposeAndSend::AddDefaultCustomHeaders() {
   nsCString headersList;
   // get names of prefs containing headers to add
   nsresult rv = mUserIdentity->GetCharAttribute("headers", headersList);
   if (NS_SUCCEEDED(rv) && !headersList.IsEmpty()) {
@@ -2927,17 +2927,17 @@ nsMsgComposeAndSend::AddMailReplyToHeade
     RemoveDuplicateAddresses(recipients, EmptyCString(), recipients_no_dups);
 
     // Remove reply-to mangling mailing lists from recipients...
     nsAutoCString recipients_without_mailing_lists;
     RemoveDuplicateAddresses(recipients_no_dups, mailing_lists,
                              recipients_without_mailing_lists);
 
     // ... If the result is equal to the input, none of the recipients
-    // occure in the MRT addresses and therefore we stop here.
+    // occur in the MRT addresses and therefore we stop here.
     if (recipients_no_dups == recipients_without_mailing_lists)
       return NS_OK;
   }
 
   // Set Mail-Reply-To
   nsAutoCString replyTo, mailReplyTo;
   replyTo = mCompFields->GetReplyTo();
   if (replyTo.IsEmpty())
@@ -2999,17 +2999,17 @@ nsMsgComposeAndSend::Init(
               nsIArray *attachments,
               nsIArray *preloaded_attachments,
               const nsAString &password,
               const nsACString &aOriginalMsgURI,
               MSG_ComposeType aType)
 {
   nsresult      rv = NS_OK;
 
-  //Let make sure we retreive the correct number of related parts. It may have changed since last time
+  //Let make sure we retrieve the correct number of related parts. It may have changed since last time
   GetMultipartRelatedCount(true);
 
   nsString msg;
   if (!mComposeBundle)
   {
     nsCOMPtr<nsIStringBundleService> bundleService =
       mozilla::services::GetStringBundleService();
     NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
@@ -3139,17 +3139,17 @@ NS_IMETHODIMP nsMsgComposeAndSend::SendD
 
     DeliverAsNewsExit(aUrl, aExitCode);
   }
   else
   {
     if (NS_FAILED(aExitCode))
     {
 #ifdef __GNUC__
-// Temporary workaroung until bug 783526 is fixed.
+// Temporary workaround until bug 783526 is fixed.
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wswitch"
 #endif
       switch (aExitCode)
       {
         case NS_ERROR_UNKNOWN_HOST:
         case NS_ERROR_UNKNOWN_PROXY_HOST:
           aExitCode = NS_ERROR_SMTP_SEND_FAILED_UNKNOWN_SERVER;
@@ -4262,17 +4262,17 @@ nsMsgGetEnvelopeLine(void)
   PRExplodedTime    now;
   char              buffer[128] = "";
 
   // Generate envelope line in format of:  From - Sat Apr 18 20:01:49 1998
   //
   // Use PR_FormatTimeUSEnglish() to format the date in US English format,
   // then figure out what our local GMT offset is, and append it (since
   // PR_FormatTimeUSEnglish() can't do that.) Generate four digit years as
-  // per RFC 1123 (superceding RFC 822.)
+  // per RFC 1123 (superseding RFC 822.)
   //
   PR_ExplodeTime(PR_Now(), PR_LocalTimeParameters, &now);
   PR_FormatTimeUSEnglish(buffer, sizeof(buffer),
                "%a %b %d %H:%M:%S %Y",
                &now);
 
   // This value must be in ctime() format, with English abbreviations.
   // PL_strftime("... %c ...") is no good, because it is localized.
--- a/mailnews/compose/src/nsMsgSend.h
+++ b/mailnews/compose/src/nsMsgSend.h
@@ -79,17 +79,17 @@
 
 /* Whether the contents of the BCC header should be preserved in the FCC'ed
    copy of a message.  See comments below, in mime_do_fcc_1().
  */
 #define SAVE_BCC_IN_FCC_FILE
 
 /* When attaching an HTML document, one must indicate the original URL of
    that document, if the receiver is to have any chance of being able to
-   retreive and display the inline images, or to click on any links in the
+   retrieve and display the inline images, or to click on any links in the
    HTML.
 
    The way we have done this in the past is by inserting a <BASE> tag as the
    first line of all HTML documents we attach.  (This is kind of bad in that
    we're actually modifying the document, and it really isn't our place to
    do that.)
 
    The sanctioned *new* way of doing this is to insert a Content-Base header
--- a/mailnews/compose/src/nsMsgSendReport.cpp
+++ b/mailnews/compose/src/nsMsgSendReport.cpp
@@ -270,17 +270,17 @@ NS_IMETHODIMP nsMsgSendReport::DisplayRe
     //TODO display a success error message
     return NS_OK;
   }
 
   //Do we have an explanation of the error? if no, try to build one...
   if (currMessage.IsEmpty())
   {
 #ifdef __GNUC__
-// Temporary workaroung until bug 783526 is fixed.
+// Temporary workaround until bug 783526 is fixed.
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wswitch"
 #endif
     switch (currError)
     {
       case NS_BINDING_ABORTED:
       case NS_ERROR_SEND_FAILED:
       case NS_ERROR_SEND_FAILED_BUT_NNTP_OK:
--- a/mailnews/compose/src/nsSmtpProtocol.cpp
+++ b/mailnews/compose/src/nsSmtpProtocol.cpp
@@ -89,17 +89,17 @@ nsresult nsExplainErrorDetails(nsISmtpUr
   nsCOMPtr<nsIStringBundle> bundle;
   nsresult rv = bundleService->CreateBundle(
     "chrome://messenger/locale/messengercompose/composeMsgs.properties",
     getter_AddRefs(bundle));
   NS_ENSURE_SUCCESS(rv, rv);
 
   const char* exitString;
 #ifdef __GNUC__
-// Temporary workaroung until bug 783526 is fixed.
+// Temporary workaround until bug 783526 is fixed.
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wswitch"
 #endif
   switch (aCode)
   {
     case NS_ERROR_ILLEGAL_LOCALPART:
       bundle->GetStringFromName("errorIllegalLocalPart", eMsg);
       nsTextFormatter::ssprintf(msg, eMsg.get(), arg1, arg2);
@@ -513,17 +513,17 @@ void nsSmtpProtocol::AppendHelloArgument
                   aResult.Append(']');
               }
           }
       }
   }
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////////
-// we suppport the nsIStreamListener interface
+// we support the nsIStreamListener interface
 ////////////////////////////////////////////////////////////////////////////////////////////
 
 // stop binding is a "notification" informing us that the stream
 // associated with aURL is going away.
 NS_IMETHODIMP nsSmtpProtocol::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
                                             nsresult aStatus)
 {
   bool connDroppedDuringAuth = NS_SUCCEEDED(aStatus) && !m_sendDone &&
@@ -1127,17 +1127,17 @@ nsresult nsSmtpProtocol::ProcessAuth()
     nsAutoCString buffer;
 
     if (!m_tlsEnabled)
     {
         if (TestFlag(SMTP_EHLO_STARTTLS_ENABLED))
         {
             // Do not try to combine SMTPS with STARTTLS.
             // If nsMsgSocketType::SSL is set,
-            // we are alrady using a secure connection.
+            // we are already using a secure connection.
             // Do not attempt to do STARTTLS,
             // even if server offers it.
             if (m_prefSocketType == nsMsgSocketType::trySTARTTLS ||
                 m_prefSocketType == nsMsgSocketType::alwaysSTARTTLS)
             {
                 buffer = "STARTTLS";
                 buffer += CRLF;
 
--- a/mailnews/compose/src/nsSmtpProtocol.h
+++ b/mailnews/compose/src/nsSmtpProtocol.h
@@ -95,17 +95,17 @@ public:
 
     // Creating a protocol instance requires the URL which needs to be run.
     nsSmtpProtocol(nsIURI * aURL);
 
     virtual nsresult LoadUrl(nsIURI * aURL, nsISupports * aConsumer = nullptr) override;
     virtual nsresult SendData(const char * dataBuffer, bool aSuppressLogging = false) override;
 
     ////////////////////////////////////////////////////////////////////////////////////////
-    // we suppport the nsIStreamListener interface
+    // we support the nsIStreamListener interface
     ////////////////////////////////////////////////////////////////////////////////////////
 
     // stop binding is a "notification" informing us that the stream associated with aURL is going away.
     NS_IMETHOD OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult status) override;
 
 private:
     virtual ~nsSmtpProtocol();
     // if we are asked to load a url while we are blocked waiting for redirection information,
--- a/mailnews/compose/src/nsSmtpServer.cpp
+++ b/mailnews/compose/src/nsSmtpServer.cpp
@@ -491,17 +491,17 @@ nsSmtpServer::GetUsernamePasswordWithUI(
   rv = aDialog->PromptUsernameAndPassword(aPromptTitle, aPromptMessage,
                                           NS_ConvertASCIItoUTF16(serverUri).get(),
                                           nsIAuthPrompt::SAVE_PASSWORD_PERMANENTLY,
                                           getter_Copies(uniUsername),
                                           getter_Copies(aPassword),
                                           &okayValue);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  // If the user pressed cancel, just return emtpy strings.
+  // If the user pressed cancel, just return empty strings.
   if (!okayValue)
   {
     aUsername.Truncate();
     aPassword.Truncate();
     return rv;
   }
 
   // We got a username and password back...so remember them.
--- a/mailnews/compose/src/nsSmtpService.cpp
+++ b/mailnews/compose/src/nsSmtpService.cpp
@@ -43,17 +43,17 @@ typedef struct _findServerByKeyEntry {
 typedef struct _findServerByHostnameEntry {
     nsCString hostname;
     nsCString username;
     nsISmtpServer *server;
 } findServerByHostnameEntry;
 
 static NS_DEFINE_CID(kCSmtpUrlCID, NS_SMTPURL_CID);
 
-// foward declarations...
+// forward declarations...
 nsresult
 NS_MsgBuildSmtpUrl(nsIFile * aFilePath,
                    nsISmtpServer *aServer,
                    const char* aRecipients,
                    nsIMsgIdentity * aSenderIdentity,
                    const char * aSender,
                    nsIUrlListener * aUrlListener,
                    nsIMsgStatusFeedback *aStatusFeedback,
@@ -112,31 +112,31 @@ NS_IMETHODIMP nsSmtpService::SendMailMes
     else
       NS_IF_RELEASE(urlToRun);
   }
 
   return rv;
 }
 
 
-// The following are two convience functions I'm using to help expedite building and running a mail to url...
+// The following are two convenience functions I'm using to help expedite building and running a mail to url...
 
 // short cut function for creating a mailto url...
 nsresult NS_MsgBuildSmtpUrl(nsIFile * aFilePath,
                             nsISmtpServer *aSmtpServer,
                             const char * aRecipients,
                             nsIMsgIdentity * aSenderIdentity,
                             const char * aSender,
                             nsIUrlListener * aUrlListener,
                             nsIMsgStatusFeedback *aStatusFeedback,
                             nsIInterfaceRequestor* aNotificationCallbacks,
                             nsIURI ** aUrl,
                             bool aRequestDSN)
 {
-  // mscott: this function is a convience hack until netlib actually dispatches
+  // mscott: this function is a convenience hack until netlib actually dispatches
   // smtp urls. in addition until we have a session to get a password, host and
   // other stuff from, we need to use default values....
   // ..for testing purposes....
 
     nsCString smtpHostName;
     nsCString smtpUserName;
     int32_t smtpPort;
     int32_t socketType;
--- a/mailnews/compose/src/nsSmtpService.h
+++ b/mailnews/compose/src/nsSmtpService.h
@@ -24,22 +24,22 @@ class nsSmtpService : public nsISmtpServ
 {
 public:
 
 	nsSmtpService();
 	
 	NS_DECL_ISUPPORTS
 
 	////////////////////////////////////////////////////////////////////////
-	// we suppport the nsISmtpService interface
+	// we support the nsISmtpService interface
 	////////////////////////////////////////////////////////////////////////
 	NS_DECL_NSISMTPSERVICE
 
 	//////////////////////////////////////////////////////////////////////////
-	// we suppport the nsIProtocolHandler interface
+	// we support the nsIProtocolHandler interface
 	//////////////////////////////////////////////////////////////////////////
   NS_DECL_NSIPROTOCOLHANDLER
 
 protected:
     nsresult loadSmtpServers();
 
 
 private:
--- a/mailnews/compose/src/nsURLFetcher.cpp
+++ b/mailnews/compose/src/nsURLFetcher.cpp
@@ -99,17 +99,17 @@ nsURLFetcher::CanHandleContent(const cha
                                 bool aIsContentPreferred,
                                 char ** aDesiredContentType,
                                 bool * aCanHandleContent)
 
 {
     if (!mIsFile && PL_strcasecmp(aContentType, MESSAGE_RFC822) == 0)
       *aDesiredContentType = strdup("text/html");
 
-    // since we explicilty loaded the url, we always want to handle it!
+    // since we explicitly loaded the url, we always want to handle it!
     *aCanHandleContent = true;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsURLFetcher::DoContent(const nsACString& aContentType,
                       bool aIsContentPreferred,
                       nsIRequest *request,
--- a/mailnews/compose/test/unit/test_bug235432.js
+++ b/mailnews/compose/test/unit/test_bug235432.js
@@ -66,17 +66,17 @@ function copyFileMessageInLocalFolder(aM
                                     localAccountUtils.inboxFolder,
                                     null, false,
                                     aMessageFlags,
                                     aMessageKeywords,
                                     gCopyListener,
                                     aMessageWindow);
 }
 
-// The attatchment file can not be obtained from js test,
+// The attachment file can not be obtained from js test,
 // so we have to generate the file name here.
 function createExpectedTemporaryFile() {
   function createTemporaryFile() {
     let file = Services.dirsvc.get("TmpD", Ci.nsIFile);
     file.append("nsmail.tmp");
     file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0o600);
     return file;
   }
--- a/mailnews/compose/test/unit/test_nsMsgCompose1.js
+++ b/mailnews/compose/test/unit/test_nsMsgCompose1.js
@@ -54,17 +54,17 @@ function run_test() {
   // Copy the file to the profile directory for a PAB
   testAB.copyTo(do_get_profile(), kPABData.fileName);
 
   testAB = do_get_file("../../../data/abLists2.mab");
 
   // Copy the file to the profile directory for a CAB
   testAB.copyTo(do_get_profile(), kCABData.fileName);
 
-  // Test - Check we can initalize with fewest specified
+  // Test - Check we can initialize with fewest specified
   // parameters and don't fail/crash like we did in bug 411646.
 
   var msgCompose = Cc[MsgComposeContractID]
                      .createInstance(nsIMsgCompose);
 
   // Set up some params
   var params = Cc[MsgComposeParamsContractID]
                  .createInstance(nsIMsgComposeParams);
--- a/mailnews/compose/test/unit/test_nsMsgCompose4.js
+++ b/mailnews/compose/test/unit/test_nsMsgCompose4.js
@@ -53,17 +53,17 @@ function run_test() {
   // Copy the file to the profile directory for a PAB
   testAB.copyTo(do_get_profile(), kPABData.fileName);
 
   testAB = do_get_file("../../../data/abLists2.mab");
 
   // Copy the file to the profile directory for a CAB
   testAB.copyTo(do_get_profile(), kCABData.fileName);
 
-  // Test - Check we can initalize with fewest specified
+  // Test - Check we can initialize with fewest specified
   // parameters and don't fail/crash like we did in bug 411646.
 
   var msgCompose = Cc[MsgComposeContractID]
                      .createInstance(nsIMsgCompose);
 
   // Set up some params
   var params = Cc[MsgComposeParamsContractID]
                  .createInstance(nsIMsgComposeParams);
--- a/mailnews/compose/test/unit/test_sendMailAddressIDN.js
+++ b/mailnews/compose/test/unit/test_sendMailAddressIDN.js
@@ -200,12 +200,12 @@ function run_test()
   // allowed with unextended SMTP.
   // The old code would just strip the invalid character and try to send the
   // message to the remaining - wrong! - address.
   // The new code will present an informational message box and deny sending.
   test = kToInvalid;
   DoSendTest(kToInvalid, kToInvalid, NS_ERROR_BUT_DONT_SHOW_ALERT);
 
   // Test 4:
-  // Bug 856506. invalid char without '@' casues crash.
+  // Bug 856506. invalid char without '@' causes crash.
   test = kToInvalidWithoutDomain;
   DoSendTest(kToInvalidWithoutDomain, kToInvalidWithoutDomain, NS_ERROR_BUT_DONT_SHOW_ALERT);
 }
--- a/mailnews/compose/test/unit/test_sendMessageLater2.js
+++ b/mailnews/compose/test/unit/test_sendMessageLater2.js
@@ -194,17 +194,17 @@ function sendUnsentMessages()
 function runServerTest()
 {
   server.performTest();
 }
 
 function* actually_run_test() {
   dump("in actually_run_test\n");
 
-  dump("Copy Mesage from file to folder\n");
+  dump("Copy Message from file to folder\n");
   yield async_run({func: sendMessageLater, args: [0]});
 
   dump("Send unsent message\n");
   yield async_run({func: sendUnsentMessages});
 
   // Check sent folder is now empty.
   Assert.equal(gSentFolder.getTotalMessages(false), 0);
 
--- a/mailnews/db/gloda/components/jsmimeemitter.js
+++ b/mailnews/db/gloda/components/jsmimeemitter.js
@@ -317,17 +317,17 @@ MimeMessageEmitter.prototype = {
   },
 
   /**
    * In the case of UUEncoded attachments, libmime tells us about the attachment
    *  as a child of a MimeBody. This obviously doesn't make us happy, so in case
    *  libmime wants us to attach an attachment to something that's not a
    *  container, we walk up the mime tree to find a suitable container to hold
    *  the attachment.
-   * The results are cached so that they're consistent accross calls — this
+   * The results are cached so that they're consistent across calls — this
    *  ensures the call to _replacePart works fine.
    */
   _findAnotherContainer: function(aPartName) {
     if (aPartName in this._bogusPartTranslation)
       return this._bogusPartTranslation[aPartName];
 
     let parentName = aPartName + "";
     let parentPart;
--- a/mailnews/db/gloda/content/glodacomplete.xml
+++ b/mailnews/db/gloda/content/glodacomplete.xml
@@ -39,17 +39,17 @@
             item = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "richlistitem");
 
             let glodaCompleter = Cc["@mozilla.org/autocomplete/search;1?name=gloda"]
                                    .getService(Ci.nsIAutoCompleteSearch)
                                    .wrappedJSObject;
             var result = glodaCompleter.curResult;
 
             // set these attributes before we set the class
-            // so that we can use them from the contructor
+            // so that we can use them from the constructor
             var row = result.getObjectAt(this._currentIndex);
             var obj = row.item;
             item.setAttribute("text", trimmedSearchString);
             item.setAttribute("type", result.getStyleAt(this._currentIndex));
 
             item.row = row;
 
             // set the class at the end so we can use the attributes
@@ -239,17 +239,17 @@
         </body>
       </method>
 
       <method name="_setUpOverflow">
         <parameter name="aParentBox"/>
         <parameter name="aEllipsis"/>
         <body>
           <![CDATA[
-          // Hide the ellipsis incase there's just enough to not underflow
+          // Hide the ellipsis in case there's just enough to not underflow
           aEllipsis.hidden = true;
 
           // Start with the parent's width and subtract off its children
           let tooltip = [];
           let children = aParentBox.childNodes;
           let widthDiff = aParentBox.boxObject.width;
 
           for (let i = 0; i < children.length; i++) {
--- a/mailnews/db/gloda/modules/collection.js
+++ b/mailnews/db/gloda/modules/collection.js
@@ -63,17 +63,17 @@ var GlodaCollectionManager = {
 
   defineCache: function gloda_colm_defineCache(aNounDef, aCacheSize) {
     this._cachesByNoun[aNounDef.id] = new GlodaLRUCacheCollection(aNounDef,
                                                                    aCacheSize);
   },
 
   /**
    * Attempt to locate an instance of the object of the given noun type with the
-   *  given id.  Counts as a cache hit if found.  (And if it was't in a cache,
+   *  given id.  Counts as a cache hit if found.  (And if it wasn't in a cache,
    *  but rather a collection, it is added to the cache.)
    */
   cacheLookupOne: function gloda_colm_cacheLookupOne(aNounID, aID, aDoCache) {
     let cache = this._cachesByNoun[aNounID];
 
     if (cache) {
       if (aID in cache._idMap) {
         let item = cache._idMap[aID];
@@ -169,17 +169,17 @@ var GlodaCollectionManager = {
     }
     // do not promote found items into the cache
     this.cacheLookupMany(aNounID, checkMap, targetMap, false);
     return targetMap;
   },
 
   /**
    * Attempt to locate an instance of the object of the given noun type with the
-   *  given id.  Counts as a cache hit if found.  (And if it was't in a cache,
+   *  given id.  Counts as a cache hit if found.  (And if it wasn't in a cache,
    *  but rather a collection, it is added to the cache.)
    */
   cacheLookupOneByUniqueValue:
       function gloda_colm_cacheLookupOneByUniqueValue(aNounID, aUniqueValue,
                                                       aDoCache) {
     let cache = this._cachesByNoun[aNounID];
 
     if (cache) {
--- a/mailnews/db/gloda/modules/datamodel.js
+++ b/mailnews/db/gloda/modules/datamodel.js
@@ -19,17 +19,17 @@ function getMessenger () {
   if (!gMessenger)
     gMessenger = Cc["@mozilla.org/messenger;1"].createInstance(Ci.nsIMessenger);
   return gMessenger;
 }
 
 /**
  * @class Represents a gloda attribute definition's DB form.  This class
  *  stores the information in the database relating to this attribute
- *  definition.  Access its attrDef attribute to get at the realy juicy data.
+ *  definition.  Access its attrDef attribute to get at the really juicy data.
  *  This main interesting thing this class does is serve as the keeper of the
  *  mapping from parameters to attribute ids in the database if this is a
  *  parameterized attribute.
  */
 function GlodaAttributeDBDef(aDatastore, aID, aCompoundName, aAttrType,
                            aPluginName, aAttrName) {
   // _datastore is now set on the prototype by GlodaDatastore
   this._id = aID;
--- a/mailnews/db/gloda/modules/datastore.js
+++ b/mailnews/db/gloda/modules/datastore.js
@@ -143,17 +143,17 @@ var QueryFromQueryResolver = {
     }
   },
 };
 
 /**
  * Handles the results from a GlodaDatastore.queryFromQuery call in cooperation
  *  with the |QueryFromQueryResolver| collection listener.  We do a lot of
  *  legwork related to satisfying references to other noun instances on the
- *  noun instances the user directy queried.  Messages reference identities
+ *  noun instances the user directly queried.  Messages reference identities
  *  reference contacts which in turn (implicitly) reference identities again.
  *  We have to spin up those other queries and stitch things together.
  *
  * While the code is generally up to the existing set of tasks it is called to
  *  handle, I would not be surprised for it to fall down if things get more
  *  complex.  Some of the logic here 'evolved' a bit and could benefit from
  *  additional documentation and a fresh go-through.
  */
@@ -1940,17 +1940,17 @@ var GlodaDatastore = {
    * Authoritative map from folder URI to folder ID.  (Authoritative in the
    *  sense that this map exactly represents the state of the underlying
    *  database.  If it does not, it's a bug in updating the database.)
    */
   _folderByURI: {},
   /** Authoritative map from folder ID to folder URI */
   _folderByID: {},
 
-  /** Intialize our _folderByURI/_folderByID mappings, called by _init(). */
+  /** Initialize our _folderByURI/_folderByID mappings, called by _init(). */
   _getAllFolderMappings: function gloda_ds_getAllFolderMappings() {
     let stmt = this._createSyncStatement(
       "SELECT id, folderURI, dirtyStatus, name, indexingPriority \
         FROM folderLocations", true);
 
     while (stmt.executeStep()) {  // no chance of this SQLITE_BUSY on this call
       let folderID = stmt.getInt64(0);
       let folderURI = stmt.getString(1);
--- a/mailnews/db/gloda/modules/gloda.js
+++ b/mailnews/db/gloda/modules/gloda.js
@@ -367,17 +367,17 @@ var Gloda = {
    *   that you are operating under.
    * @param aAddrGroups... One or more strings.  Each string can contain zero or more
    *   e-mail addresses with display name.  If more than one address is given,
    *   they should be comma-delimited.  For example
    *   '"Bob Smith" <bob@example.com>' is an address with display name.  Mime
    *   header decoding is performed, but is ignorant of any folder-level
    *   character set overrides.
    * @returns via the callback handle mechanism, a list containing one sub-list
-   *   for each string argument passed.  Each sub-list containts zero or more
+   *   for each string argument passed.  Each sub-list contains zero or more
    *   GlodaIdentity instances corresponding to the addresses provided.
    */
   getOrCreateMailIdentities:
       function* gloda_ns_getOrCreateMailIdentities(aCallbackHandle, ...aAddrGroups) {
     let addresses = {};
     let resultLists = [];
 
     // parse the strings
@@ -652,17 +652,17 @@ var Gloda = {
   /**
    * This attribute is stored as a string column on the row for the noun.  It
    *  differs from kSpecialColumn in that it is a string, which once had
    *  query ramifications and one day may have them again.
    */
   kSpecialString: GlodaDatastore.kSpecialString,
   /**
    * This attribute is stored as a fulltext column on the fulltext table for
-   *  the noun.  The attribute defintion should include this value as 'special'
+   *  the noun.  The attribute definition should include this value as 'special'
    *  and the column name that stores the table as 'specialColumnName'.
    */
   kSpecialFulltext: GlodaDatastore.kSpecialFulltext,
 
   /**
    * The extensionName used for the attributes defined by core gloda plugins
    *  such as fundattr.js and explattr.js.
    */
--- a/mailnews/db/gloda/modules/index_msg.js
+++ b/mailnews/db/gloda/modules/index_msg.js
@@ -362,17 +362,17 @@ MessagesByMessageIdCallback.prototype = 
 
 
 /**
  * The message indexer!
  *
  * === Message Indexing Strategy
  * To these ends, we implement things like so:
  *
- * Mesage State Tracking
+ * Message State Tracking
  * - We store a property on all indexed headers indicating their gloda message
  *   id.  This allows us to tell whether a message is indexed from the header,
  *   without having to consult the SQL database.
  * - When we receive an event that indicates that a message's meta-data has
  *   changed and gloda needs to re-index the message, we set a property on the
  *   header that indicates the message is dirty.  This property can indicate
  *   that the message needs to be re-indexed but the gloda-id is valid (dirty)
  *   or that the message's gloda-id is invalid (filthy) because the gloda
@@ -443,17 +443,17 @@ var GlodaMsgIndexer = {
 
   enable: function msg_indexer_enable() {
     // initialize our listeners' this pointers
     this._databaseAnnouncerListener.indexer = this;
     this._msgFolderListener.indexer = this;
 
     // register for:
     // - folder loaded events, so we know when getDatabaseWithReparse has
-    //   finished updating the index/what not (if it was't immediately
+    //   finished updating the index/what not (if it wasn't immediately
     //   available)
     // - property changes (so we know when a message's read/starred state have
     //   changed.)
     this._folderListener._init(this);
     MailServices.mailSession.AddFolderListener(this._folderListener,
                                                Ci.nsIFolderListener.intPropertyChanged |
                                                Ci.nsIFolderListener.propertyFlagChanged |
                                                Ci.nsIFolderListener.event);
@@ -3188,17 +3188,17 @@ var GlodaMsgIndexer = {
     yield this.kWorkDone;
   },
 
   /**
    * Wipe a message out of existence from our index.  This is slightly more
    *  tricky than one would first expect because there are potentially
    *  attributes not immediately associated with this message that reference
    *  the message.  Not only that, but deletion of messages may leave a
-   *  conversation posessing only ghost messages, which we don't want, so we
+   *  conversation possessing only ghost messages, which we don't want, so we
    *  need to nuke the moot conversation and its moot ghost messages.
    * For now, we are actually punting on that trickiness, and the exact
    *  nuances aren't defined yet because we have not decided whether to store
    *  such attributes redundantly.  For example, if we have subject-pred-object,
    *  we could actually store this as attributes (subject, id, object) and
    *  (object, id, subject).  In such a case, we could query on (subject, *)
    *  and use the results to delete the (object, id, subject) case.  If we
    *  don't redundantly store attributes, we can deal with the problem by
--- a/mailnews/db/gloda/modules/indexer.js
+++ b/mailnews/db/gloda/modules/indexer.js
@@ -1310,17 +1310,17 @@ var GlodaIndexer = {
    * - Make sure the job's cleanup function gets called if appropriate.
    *
    * The async return case is actually not too troublesome.  Since there is an
    *  active indexing job and we are not (by fiat) in that call stack, we know
    *  that the callback driver is guaranteed to get triggered again somehow.
    *  The only issue is to make sure that _workBatchData does not end up with
    *  the data.  We compel |_hireJobWorker| to erase it to this end.
    *
-   * @note You MUST NOT call this function from inside a job or an async funtion
+   * @note You MUST NOT call this function from inside a job or an async function
    *    on the callbackHandle's stack of generators.  If you are in that
    *    situation, you should just throw an exception.  At the very least,
    *    use a timeout to trigger us.
    */
   killActiveJob: function() {
     // There is nothing to do if we have no job
     if (!this._curIndexingJob)
       return;
--- a/mailnews/db/gloda/modules/mimemsg.js
+++ b/mailnews/db/gloda/modules/mimemsg.js
@@ -152,17 +152,17 @@ function stripEncryptedParts(aPart) {
  * @param [aAllowDownload=false] Should we allow the message to be downloaded
  *     for this streaming request?  The default is false, which means that we
  *     require that the message be available offline.  If false is passed and
  *     the message is not available offline, we will propagate an exception
  *     thrown by the underlying code.
  * @param [aOptions] Optional options.
  * @param [aOptions.saneBodySize] Limit body sizes to a 'reasonable' size in
  *     order to combat corrupt offline/message stores creating pathological
- *     situtations where we have erroneously multi-megabyte messages.  This
+ *     situations where we have erroneously multi-megabyte messages.  This
  *     also likely reduces the impact of legitimately ridiculously large
  *     messages.
  * @param [aOptions.partsOnDemand] If this is a message stored on an IMAP
  *     server, and for whatever reason, it isn't available locally, then setting
  *     this option to true will make sure that attachments aren't downloaded.
  *     This makes sure the message is available quickly.
  * @param [aOptions.examineEncryptedParts] By default, we won't reveal the
  *     contents of multipart/encrypted parts to the consumers, unless explicitly
@@ -606,17 +606,17 @@ MimeBody.prototype = {
  *  class.
  *
  * @ivar contentType The content type of this part.
  */
 function MimeUnknown(aContentType) {
   this.partName = null;
   this.contentType = aContentType;
   this.headers = {};
-  // Looks like libmime does not always intepret us as an attachment, which
+  // Looks like libmime does not always interpret us as an attachment, which
   //  means we'll have to have a default size. Returning undefined would cause
   //  the recursive size computations to fail.
   this._size = 0;
   this.isEncrypted = false;
   // We want to make sure MimeUnknown has a part property: S/MIME encrypted
   // messages have a topmost MimeUnknown part, with the encrypted bit set to 1,
   // and we need to ensure all other encrypted parts are children of this
   // topmost part.
--- a/mailnews/db/gloda/modules/msg_search.js
+++ b/mailnews/db/gloda/modules/msg_search.js
@@ -106,17 +106,17 @@ function reduceSum(accum, curValue) {
 
 /**
  * Scores if all search terms match in a column.  We bias against author
  *  slightly and recipient a bit more in this case because a search that
  *  entirely matches just on a person should give a mention of that person
  *  in the subject or attachment a fighting chance.
  * Keep in mind that because of our indexing in the face of address book
  *  contacts (namely, we index the name used in the e-mail as well as the
- *  display name on the address book card associated with the e-mail adress)
+ *  display name on the address book card associated with the e-mail address)
  *  a contact is going to bias towards matching multiple times.
  */
 var COLUMN_ALL_MATCH_SCORES = [4, 20, 20, 16, 12];
 /**
  * Score for each distinct term that matches in the column.  This is capped
  *  by COLUMN_ALL_SCORES.
  */
 var COLUMN_PARTIAL_PER_MATCH_SCORES = [1, 4, 4, 4, 3];
--- a/mailnews/db/gloda/test/unit/resources/glodaTestHelper.js
+++ b/mailnews/db/gloda/test/unit/resources/glodaTestHelper.js
@@ -1154,17 +1154,17 @@ function _inject_failure_on_MsgHdrToMime
  *     failure) or "streaming" indicating that we should inject a failure when
  *     the message indexer attempts to stream a message.  The fault will be an
  *     appropriate exception.  You must omit hangWhile if you use injectFaultIn.
  */
 function configure_gloda_indexing(aArgs) {
   let shouldSuppress = ("event" in aArgs) ? !aArgs.event : false;
   if (shouldSuppress != GlodaIndexer.suppressIndexing) {
     mark_action("glodaTestHelper",
-                "setting supress indexing to " + shouldSuppress, []);
+                "setting suppress indexing to " + shouldSuppress, []);
     GlodaIndexer.suppressIndexing = shouldSuppress;
   }
 
   if ("hangWhile" in aArgs) {
     mark_action("glodaTestHelper", "enabling hang injection in",
                 [aArgs.hangWhile]);
     switch (aArgs.hangWhile) {
       case "streaming":
--- a/mailnews/db/gloda/test/unit/test_index_compaction.js
+++ b/mailnews/db/gloda/test/unit/test_index_compaction.js
@@ -190,17 +190,17 @@ function* test_moves_and_deletions_on_co
   //  indexing in the target folder...
   yield async_move_messages(moveSet, otherFolder);
   // Kill the event-based indexing job of the target; we want the indexing sweep
   //  to see it as a move.
   mark_action("actual", "killing all indexing jobs", []);
   GlodaIndexer.purgeJobsUsingFilter(() => true);
 
   // - Indexing pass
-  // Reenable indexing so we can do a sweep.
+  // Re-enable indexing so we can do a sweep.
   configure_gloda_indexing({event: true});
 
   // This will trigger compaction (per the previous unit test) which should mark
   //  moveSet and delSet as deleted.  Then it should happen in to the next
   //  folder and add moveSet again...
   mark_action("actual", "triggering indexing sweep", []);
   GlodaMsgIndexer.indexingSweepNeeded = true;
   yield wait_for_gloda_indexer([moveSet], {deleted: [moveSet, delSet]});
--- a/mailnews/db/gloda/test/unit/test_query_core.js
+++ b/mailnews/db/gloda/test/unit/test_query_core.js
@@ -350,17 +350,17 @@ function* test_empty_set_logic() {
 /*
  * The conceit of our search is that more recent messages are better than older
  *  messages.  But at the same time, we care about some messages more than
  *  others (in general), and we care about messages that match search terms
  *  more strongly too.  So we introduce a general 'score' heuristic which we
  *  then apply to message timestamps to make them appear more recent.  We
  *  then order by this 'date score' hybrid, which we dub "dascore".  Such a
  *  flattening heuristic is over-simple, but believed to be sufficient to
- *  generally get us the messsages we want.  Post-processing based can then
+ *  generally get us the messages we want.  Post-processing based can then
  *  be more multi-dimensional and what not, but that is beyond the scope of
  *  this unit test.
  */
 
 /**
  * How much time boost should a 'score point' amount to?  The authoritative,
  *  incontrivertible answer, across all time and space, is a week.
  *  Gloda and storage like to store things as PRTime and so we do it too,
--- a/mailnews/db/msgdb/public/nsIMsgDatabase.idl
+++ b/mailnews/db/msgdb/public/nsIMsgDatabase.idl
@@ -539,17 +539,17 @@ interface nsIMsgDatabase : nsIDBChangeAn
 
   // when creating a view, the default sort order and view flags
   // use these for the default.  (this allows news to override, so that
   // news can be threaded by default)
   readonly attribute nsMsgViewFlagsTypeValue defaultViewFlags;
   readonly attribute nsMsgViewSortTypeValue  defaultSortType;
   readonly attribute nsMsgViewSortOrderValue defaultSortOrder;
 
-  // for msg hdr hash table allocation. controllable by caller to improve folder loading preformance.
+  // for msg hdr hash table allocation. controllable by caller to improve folder loading performance.
   attribute unsigned long msgHdrCacheSize;
 
   /**
    * The list of messages currently in the NEW state.
    *
    * If there are no such messages, a null pointer may be returned.
    * the caller should free when done using free.
    */
--- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
@@ -1280,17 +1280,17 @@ nsresult nsMsgDatabase::CheckForErrors(n
     m_dbFolderInfo = nullptr;
     ForceClosed();
     if (err == NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE)
       summaryFile->Remove(false);
   }
   if (NS_FAILED(err) || newFile)
   {
     // if we couldn't open file, or we have a blank one, and we're supposed
-    // to upgrade, updgrade it.
+    // to upgrade, upgrade it.
     if (newFile && !m_leaveInvalidDB)  // caller is upgrading, and we have empty summary file,
     {          // leave db around and open so caller can upgrade it.
       err = NS_MSG_ERROR_FOLDER_SUMMARY_MISSING;
     }
     else if (NS_FAILED(err) && err != NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE)
     {
       Close(false);
       summaryFile->Remove(false);  // blow away the db if it's corrupt.
@@ -2034,17 +2034,17 @@ nsresult nsMsgDatabase::RemoveHeaderFrom
 
 NS_IMETHODIMP nsMsgDatabase::RemoveHeaderMdbRow(nsIMsgDBHdr *msg)
 {
   NS_ENSURE_ARG_POINTER(msg);
   nsMsgHdr* msgHdr = static_cast<nsMsgHdr*>(msg);  // closed system, so this is ok
   return RemoveHeaderFromDB(msgHdr);
 }
 
-// This is a lower level routine which doesn't send notifcations or
+// This is a lower level routine which doesn't send notifications or
 // update folder info. One use is when a rule fires moving a header
 // from one db to another, to remove it from the first db.
 
 nsresult nsMsgDatabase::RemoveHeaderFromDB(nsMsgHdr *msgHdr)
 {
   if (!msgHdr)
     return NS_ERROR_NULL_POINTER;
   nsresult ret = NS_OK;
@@ -5396,17 +5396,17 @@ nsresult nsMsgDatabase::PurgeExcessMessa
         Commit(nsMsgDBCommitType::kLargeCommit);
     }
   }
   return rv;
 }
 
 NS_IMPL_ISUPPORTS(nsMsgRetentionSettings, nsIMsgRetentionSettings)
 
-// Initialise the member variables to resonable defaults.
+// Initialise the member variables to reasonable defaults.
 nsMsgRetentionSettings::nsMsgRetentionSettings()
 : m_retainByPreference(1),
   m_daysToKeepHdrs(0),
   m_numHeadersToKeep(0),
   m_useServerDefaults(true),
   m_cleanupBodiesByDays(false),
   m_daysToKeepBodies(0),
   m_applyToFlaggedMessages(false)
--- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
+++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
@@ -597,17 +597,17 @@ void Tokenizer::tokenize_ascii_word(char
     skipToken.AssignLiteral("skip:");
     skipToken.Append(word[0]);
     skipToken.Append(' ');
     skipToken.AppendInt((wordLength/10) * 10);
     add(skipToken.get());
   }
 }
 
-// one substract and one conditional jump should be faster than two conditional jump on most recent system.
+// one subtract and one conditional jump should be faster than two conditional jump on most recent system.
 #define IN_RANGE(x, low, high)  ((uint16_t)((x)-(low)) <= (high)-(low))
 
 #define IS_JA_HIRAGANA(x)   IN_RANGE(x, 0x3040, 0x309F)
 // swapping the range using xor operation to reduce conditional jump.
 #define IS_JA_KATAKANA(x)	(IN_RANGE(x^0x0004, 0x30A0, 0x30FE)||(IN_RANGE(x, 0xFF66, 0xFF9F)))
 #define IS_JA_KANJI(x)      (IN_RANGE(x, 0x2E80, 0x2FDF)||IN_RANGE(x, 0x4E00, 0x9FAF))
 #define IS_JA_KUTEN(x)      (((x)==0x3001)||((x)==0xFF64)||((x)==0xFF0E))
 #define IS_JA_TOUTEN(x)     (((x)==0x3002)||((x)==0xFF61)||((x)==0xFF0C))
--- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
+++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
@@ -105,17 +105,17 @@ protected:
 class Tokenizer: public TokenHash {
 public:
     Tokenizer();
     ~Tokenizer();
 
     Token* get(const char* word);
 
     // The training set keeps an occurrence count on each word. This count
-    // is supposed to count the # of messsages it occurs in.
+    // is supposed to count the # of messages it occurs in.
     // When add/remove is called while tokenizing a message and NOT the training set,
     //
     Token* add(const char* word, uint32_t count = 1);
 
     Token* copyTokens();
 
     void tokenize(const char* text);
 
--- a/mailnews/extensions/fts3/src/fts3_porter.c
+++ b/mailnews/extensions/fts3/src/fts3_porter.c
@@ -288,17 +288,17 @@ static const char cType[] = {
 ** to Porter ruls.  
 **
 ** A consonate is any letter other than 'a', 'e', 'i', 'o', or 'u'.
 ** 'Y' is a consonant unless it follows another consonant,
 ** in which case it is a vowel.
 **
 ** In these routine, the letters are in reverse order.  So the 'y' rule
 ** is that 'y' is a consonant unless it is followed by another
-** consonent.
+** consonant.
 */
 static int isVowel(const char*);
 static int isConsonant(const char *z){
   int j;
   char x = *z;
   if( x==0 ) return 0;
   assert( x>='a' && x<='z' );
   j = cType[x-'a'];
@@ -400,17 +400,17 @@ static int star_oh(const char *z){
     z[0]!=0 && isConsonant(z) &&
     z[0]!='w' && z[0]!='x' && z[0]!='y' &&
     z[1]!=0 && isVowel(z+1) &&
     z[2]!=0 && isConsonant(z+2);
 }
 
 /*
 ** If the word ends with zFrom and xCond() is true for the stem
-** of the word that preceeds the zFrom ending, then change the 
+** of the word that precedes the zFrom ending, then change the 
 ** ending to zTo.
 **
 ** The input word *pz and zFrom are both in reverse order.  zTo
 ** is in normal order. 
 **
 ** Return TRUE if zFrom matches.  Return FALSE if zFrom does not
 ** match.  Not that TRUE is returned even if xCond() fails and
 ** no substitution occurs.
@@ -813,32 +813,32 @@ static const char porterIdChar[] = {
  * - 0xff61: halfwidth ideographic full stop (~ narrow 0x3002)
  * - 0xff64: halfwidth ideographic comma (~ narrow 0x3001)
  *
  * It is possible we should be treating other things as delimiters!
  */
 #define IS_JA_DELIM(x) (((x)==0x3001)||((x)==0xFF64)||((x)==0xFF0E)||((x)==0x3002)||((x)==0xFF61)||((x)==0xFF0C))
 
 /**
- * The previous character was a delimeter (which includes the start of the
+ * The previous character was a delimiter (which includes the start of the
  *  string).
  */
 #define BIGRAM_RESET   0
 /**
  * The previous character was a CJK character and we have only seen one of them.
  *  If we had seen more than one in a row it would be the BIGRAM_USE state.
  */
 #define BIGRAM_UNKNOWN 1
 /**
  * We have seen two or more CJK characters in a row.
  */
 #define BIGRAM_USE     2
 /**
  * The previous character was ASCII or something in the unicode general scripts
- *  area that we do not believe is a delimeter.  We call it 'alpha' as in
+ *  area that we do not believe is a delimiter.  We call it 'alpha' as in
  *  alphabetic/alphanumeric and something that should be tokenized based on
  *  delimiters rather than on a bi-gram basis.
  */
 #define BIGRAM_ALPHA   3
 
 static int isDelim(
   const unsigned char *zCur,    /* IN: current pointer of token */
   const unsigned char *zTerm,   /* IN: one character beyond end of token */
@@ -883,17 +883,17 @@ static int isDelim(
     /* ignore this because it is combined with previous char */
    return 0;
   }
 
   /* this isn't CJK range, so return as no delim */
   // Anything less than 0x2000 (except to U+0E00-U+0EFF and  U+1780-U+17FF) 
   // is the general scripts area and should not be bi-gram indexed.
   // 0xa000 - 0a4cf is the Yi area.  It is apparently a phonetic language whose
-  //  usage does not appear to have simple delimeter rules, so we're leaving it
+  //  usage does not appear to have simple delimiter rules, so we're leaving it
   //  as bigram processed.  This is a guess, if you know better, let us know.
   //  (We previously bailed on this range too.)
   // Addition, U+0E00-U+0E7F is Thai, U+0E80-U+0EFF is Laos,
   // and U+1780-U+17FF is Khmer.  It is no easy way to break each word.
   // So these should use bi-gram too. 
   // cases: "aa", ".a", "&a"
   if (c < 0xe00 ||
      (c >= 0xf00 && c < 0x1780) ||
@@ -954,28 +954,28 @@ static int isDelim(
  *    search based on the arbitrary context of the indexed documents.)
  *
  * It may be useful to think of this function as operating at the points between
  *  characters.  While we are considering the 'current' character (the one after
  *  the 'point'), we are also interested in the 'previous' character (the one
  *  preceding the point).
  * At any 'point', there are a number of possible situations which I will
  *  illustrate with pairs of characters. 'a' means alphanumeric ASCII or a
- *  non-ASCII character that is not bi-grammable or a delimeter, '.'
+ *  non-ASCII character that is not bi-grammable or a delimiter, '.'
  *  means a delimiter (space or punctuation), '&' means a bi-grammable
  *  character.
  * - aa: We are in the midst of a token.  State remains BIGRAM_ALPHA.
  * - a.: We will generate a porter stemmed or copied token.  State was
  *        BIGRAM_ALPHA, gets set to BIGRAM_RESET.
  * - a&: We will generate a porter stemmed or copied token; we will set our
  *        state to BIGRAM_UNKNOWN to indicate we have seen one bigram character
  *        but that it is not yet time to emit a bigram.
  * - .a: We are starting a token.  State was BIGRAM_RESET, gets set to
  *        BIGRAM_ALPHA.
- * - ..: We skip/eat the delimeters.  State stays BIGRAM_RESET.
+ * - ..: We skip/eat the delimiters.  State stays BIGRAM_RESET.
  * - .&: State set to BIGRAM_UNKNOWN to indicate we have seen one bigram char.
  * - &a: If the state was BIGRAM_USE, we generate a bi-gram token.  If the state
  *        was BIGRAM_UNKNOWN we had only seen one CJK character and so don't do
  *        anything.  State is set to BIGRAM_ALPHA.
  * - &.: Same as the "&a" case, but state is set to BIGRAM_RESET.
  * - &&: We will generate a bi-gram token.  State was either BIGRAM_UNKNOWN or
  *        BIGRAM_USE, gets set to BIGRAM_USE.
  */
--- a/mailnews/extensions/mailviews/src/nsMsgMailViewList.cpp
+++ b/mailnews/extensions/mailviews/src/nsMsgMailViewList.cpp
@@ -252,17 +252,17 @@ nsresult nsMsgMailViewList::LoadMailView
 
          // get the profile directory
         rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(profileDir));
 
         // now copy the file over to the profile directory
         defaultMessagesFile->CopyToNative(profileDir, EmptyCString());
     }
     // this is kind of a hack but I think it will be an effective hack. The filter service already knows how to
-    // take a nsIFile and parse the contents into filters which are very similar to mail views. Intead of
+    // take a nsIFile and parse the contents into filters which are very similar to mail views. Instead of
     // re-writing all of that dirty parsing code, let's just re-use it then convert the results into a data strcuture
     // we wish to give to our consumers.
 
     nsCOMPtr<nsIMsgFilterService> filterService = do_GetService(NS_MSGFILTERSERVICE_CONTRACTID, &rv);
     nsCOMPtr<nsIMsgFilterList> mfilterList;
 
     rv = filterService->OpenFilterList(file, nullptr, nullptr, getter_AddRefs(mFilterList));
     NS_ENSURE_SUCCESS(rv, rv);
--- a/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
+++ b/mailnews/extensions/mdn/src/nsMsgMdnGenerator.cpp
@@ -191,17 +191,17 @@ bool nsMsgMdnGenerator::ProcessSendMode(
         if (!PL_strcasestr(m_dntRrt.get(), accountDomain))
             miscState |= MDN_OUTSIDE_DOMAIN;
         if (NotInToOrCc())
             miscState |= MDN_NOT_IN_TO_CC;
         m_reallySendMdn = true;
         // *********
         // How are we gona deal with the auto forwarding issues? Some server
         // didn't bother to add addition header or modify existing header to
-        // thev message when forwarding. They simply copy the exact same
+        // the message when forwarding. They simply copy the exact same
         // message to another user's mailbox. Some change To: to
         // Apparently-To:
         // Unfortunately, there is nothing we can do. It's out of our control.
         // *********
         // starting from lowest denominator to highest
         if (!miscState)
         {   // under normal situation: recipent is in to and cc list,
             // and the sender is from the same domain
@@ -434,17 +434,17 @@ nsresult nsMsgMdnGenerator::CreateFirstP
     PRExplodedTime now;
     PR_ExplodeTime(PR_Now(), PR_LocalTimeParameters, &now);
 
     int gmtoffset = (now.tm_params.tp_gmt_offset + now.tm_params.tp_dst_offset)
         / 60;
   /* Use PR_FormatTimeUSEnglish() to format the date in US English format,
      then figure out what our local GMT offset is, and append it (since
      PR_FormatTimeUSEnglish() can't do that.) Generate four digit years as
-     per RFC 1123 (superceding RFC 822.)
+     per RFC 1123 (superseding RFC 822.)
   */
     PR_FormatTimeUSEnglish(tmpBuffer, 100,
                            "Date: %a, %d %b %Y %H:%M:%S ",
                            &now);
 
     PR_snprintf(tmpBuffer + strlen(tmpBuffer), 100,
                 "%c%02d%02d" CRLF,
                 (gmtoffset >= 0 ? '+' : '-'),
--- a/mailnews/extensions/newsblog/content/Feed.js
+++ b/mailnews/extensions/newsblog/content/Feed.js
@@ -88,17 +88,17 @@ Feed.prototype =
 
   set folder (aFolder)
   {
     this.mFolder = aFolder;
   },
 
   get name()
   {
-    // Used for the feed's title in Subcribe dialog and opml export.
+    // Used for the feed's title in Subscribe dialog and opml export.
     let name = this.title || this.description || this.url;
     return name.replace(/[\n\r\t]+/g, " ").replace(/[\x00-\x1F]+/g, "");
   },
 
   get folderName()
   {
     if (this.mFolderName)
       return this.mFolderName;
--- a/mailnews/extensions/newsblog/content/FeedUtils.jsm
+++ b/mailnews/extensions/newsblog/content/FeedUtils.jsm
@@ -652,17 +652,17 @@ var FeedUtils = {
  * @return array of urls, or null if none.
  */
   getFeedUrlsInFolder: function(aFolder) {
     if (!aFolder || aFolder.isServer || aFolder.server.type != "rss" ||
         aFolder.getFlag(Ci.nsMsgFolderFlags.Trash) ||
         aFolder.getFlag(Ci.nsMsgFolderFlags.Virtual) ||
         !aFolder.filePath.exists())
       // There are never any feedUrls in the account/non-feed/trash/virtual
-      // folders or in a ghost folder (nonexistant on disk yet found in
+      // folders or in a ghost folder (nonexistent on disk yet found in
       // aFolder.subFolders).
       return null;
 
     let feedUrlArray = [];
 
     // Get the list from the feeds database.
     try {
       let ds = this.getSubscriptionsDS(aFolder.server);
@@ -1860,17 +1860,17 @@ var FeedUtils = {
           // to |null| to indicate error disable (and not user disable), but
           // only if the feed is user enabled.
           let options = feed.options;
           if (options.updates.enabled)
             options.updates.enabled = null;
 
           feed.options = options;
           FeedUtils.setStatus(feed.folder, feed.url, "enabled", false);
-          FeedUtils.log.warn("downloaded: udpates disabled due to error, " +
+          FeedUtils.log.warn("downloaded: updates disabled due to error, " +
                              "check the url - " + feed.url);
         }
 
         if (!this.mSubscribeMode)
         {
           FeedUtils.setStatus(feed.folder, feed.url, "code", aErrorCode);
 
           if (feed.folder &&
@@ -1940,17 +1940,17 @@ var FeedUtils = {
         if (feed.server)
           FeedUtils.getSubscriptionsDS(feed.server).Flush();
 
         this.mFeeds = {};
         this.mSubscribeMode = false;
         FeedUtils.log.debug("downloaded: all pending downloads finished");
 
         // Should we do this on a timer so the text sticks around for a little
-        // while?  It doesnt look like we do it on a timer for newsgroups so
+        // while?  It doesn't look like we do it on a timer for newsgroups so
         // we'll follow that model.  Don't clear the status text if we just
         // dumped an error to the status bar!
         if (aErrorCode == FeedUtils.kNewsBlogSuccess && this.mStatusFeedback)
           this.mStatusFeedback.showStatusString("");
       }
 
       feed = null;
     },
--- a/mailnews/extensions/newsblog/content/feed-parser.js
+++ b/mailnews/extensions/newsblog/content/feed-parser.js
@@ -52,17 +52,17 @@ FeedParser.prototype =
     else if (doc.namespaceURI == FeedUtils.RDF_SYNTAX_NS &&
              doc.getElementsByTagNameNS(FeedUtils.RSS_NS, "channel")[0])
     {
       aFeed.mFeedType = "RSS_1.xRDF"
       FeedUtils.log.debug("FeedParser.parseFeed: type:url - " +
                           aFeed.mFeedType +" : " +aFeed.url);
       // aSource can be misencoded (XMLHttpRequest converts to UTF-8 by default),
       // but the DOM is almost always right because it uses the hints in the
-      // XML file.  This is slower, but not noticably so.  Mozilla doesn't have
+      // XML file.  This is slower, but not noticeably so.  Mozilla doesn't have
       // the XMLHttpRequest.responseBody property that IE has, which provides
       // access to the unencoded response.
       let xmlString = this.mSerializer.serializeToString(doc);
       return this.parseAsRSS1(aFeed, xmlString, aFeed.request.channel.URI);
     }
     else if (doc.namespaceURI == FeedUtils.ATOM_03_NS)
     {
       aFeed.mFeedType = "ATOM_0.3"
--- a/mailnews/extensions/newsblog/content/feed-subscriptions.js
+++ b/mailnews/extensions/newsblog/content/feed-subscriptions.js
@@ -787,17 +787,17 @@ var FeedSubscriptions = {
       if (aItem.url == folderURI)
         return found = true;
 
       for (let i = 0; i < aItem.children.length; i++) {
         if (aItem.children[i].container && containsFolder(aItem.children[i]))
         {
           if (removeIt && aItem.children[i].url == folderURI)
           {
-            // Get all occurences in the tree cache arrays.
+            // Get all occurrences in the tree cache arrays.
             FeedUtils.log.debug("selectFolder: delete in cache, " +
                                 "parent:children:item:index - "+
                                 aItem.name + ":" + aItem.children.length + ":" +
                                 aItem.children[i].name + ":" + i);
             aItem.children.splice(i, 1);
             FeedUtils.log.debug("selectFolder: deleted in cache, " +
                                 "parent:children - " +
                                 aItem.name + ":" + aItem.children.length);
@@ -1658,17 +1658,17 @@ var FeedSubscriptions = {
       let params = {quickMode: currentItem.quickMode,
                     name:      currentItem.name,
                     options:   currentItem.options};
       // Subscribe to the new folder first.  If it already exists in the
       // account or on error, return.
       if (!this.addFeed(currentItem.url, newFolder, false, params, mode))
         return;
       // Unsubscribe the feed from the old folder, if add to the new folder
-      // is successfull, and doing a move.
+      // is successful, and doing a move.
       if (moveFeed)
       {
         let feed = new Feed(currentItem.url, currentItem.parentFolder);
         FeedUtils.deleteFeed(feed);
       }
     }
 
     // Update local favicons.
@@ -2577,17 +2577,17 @@ var FeedSubscriptions = {
     let firstFeedInFolderQuickMode = null;
     let lastFolder;
     let feedsAdded = 0;
     let rssOutlines = 0;
     let folderOutlines = 0;
 
     function processor(aParentNode, aParentFolder)
     {
-      FeedUtils.log.trace("importOPMLOutlines: PROCESSOR tag:name:childs - " +
+      FeedUtils.log.trace("importOPMLOutlines: PROCESSOR tag:name:children - " +
                           aParentNode.tagName + ":" +
                           aParentNode.getAttribute("text") + ":" +
                           aParentNode.childElementCount);
       while (true)
       {
         if (aParentNode.tagName == "body" && !aParentNode.childElementCount)
         {
           // Finished.
--- a/mailnews/extensions/smime/content/msgCompSMIMEOverlay.js
+++ b/mailnews/extensions/smime/content/msgCompSMIMEOverlay.js
@@ -30,17 +30,17 @@ function onComposerLoad()
 
   gSMFields = Cc["@mozilla.org/messenger-smime/composefields;1"]
                 .createInstance(Ci.nsIMsgSMIMECompFields);
   if (!gSMFields)
     return;
 
   gMsgCompose.compFields.securityInfo = gSMFields;
 
-  // Set up the intial security state.
+  // Set up the initial security state.
   gSMFields.requireEncryptMessage =
     gCurrentIdentity.getIntAttribute("encryptionpolicy") == kEncryptionPolicy_Always;
   if (!gSMFields.requireEncryptMessage &&
       gEncryptedURIService &&
       gEncryptedURIService.isEncrypted(gMsgCompose.originalMsgURI))
   {
     // Override encryption setting if original is known as encrypted.
     gSMFields.requireEncryptMessage = true;
--- a/mailnews/imap/public/nsIImapMessageSink.idl
+++ b/mailnews/imap/public/nsIImapMessageSink.idl
@@ -7,17 +7,17 @@
 #include "MailNewsTypes2.idl"
 #include "nsIImapUrl.idl"
 
 interface nsIMsgMailNewsUrl;
 
 [scriptable, uuid(6ffb6a92-e43a-405f-92ea-92cf81a5e17b)]
 
 interface nsIImapMessageSink : nsISupports {
-  // set up messge download output stream
+  // set up message download output stream
   void setupMsgWriteStream(in nsIFile aFile, in boolean aAppendDummyEnvelope);
 
   /**
    * Used by the imap protocol code to notify the core backend code about
    * downloaded imap messages.
    *
    * @param aAdoptedMsgLine  a string with a lot of message lines,
    *                         separated by native line terminators.
--- a/mailnews/imap/src/nsAutoSyncManager.cpp
+++ b/mailnews/imap/src/nsAutoSyncManager.cpp
@@ -1010,17 +1010,17 @@ nsresult nsAutoSyncManager::DownloadMess
  *    with.
  */
 nsresult nsAutoSyncManager::HandleDownloadErrorFor(nsIAutoSyncState *aAutoSyncStateObj,
                                                    const nsresult error)
 {
   if (!aAutoSyncStateObj)
     return NS_ERROR_INVALID_ARG;
 
-  // ensure that an error occured
+  // ensure that an error occurred
   if (NS_SUCCEEDED(error))
     return NS_OK;
 
   // NS_ERROR_NOT_AVAILABLE is a special case/error happens when the queued folder
   // doesn't have any message to download (see bug 457342). In such case we shouldn't
   // retry the current message group, nor notify listeners. Simply continuing with the
   // next sibling in the priority queue would suffice.
 
--- a/mailnews/imap/src/nsImapIncomingServer.cpp
+++ b/mailnews/imap/src/nsImapIncomingServer.cpp
@@ -1444,17 +1444,17 @@ NS_IMETHODIMP nsImapIncomingServer::Disc
     return NS_OK;
 
   nsCOMPtr<nsIMsgFolder> rootMsgFolder;
   nsresult rv = GetRootFolder(getter_AddRefs(rootMsgFolder));
   if (NS_SUCCEEDED(rv) && rootMsgFolder)
   {
     // GetResource() may return a node which is not in the folder
     // tree hierarchy but in the rdf cache in case of the non-existing default
-    // Sent, Drafts, and Templates folders. The resouce will be eventually
+    // Sent, Drafts, and Templates folders. The resource will be eventually
     // released when the rdf service shuts down. When we create the default
     // folders later on in the imap server, the subsequent GetResource() of the
     // same uri will get us the cached rdf resource which should have the folder
     // flag set appropriately.
     nsCOMPtr<nsIRDFService> rdf(do_GetService("@mozilla.org/rdf/rdf-service;1",
                                               &rv));
     NS_ENSURE_SUCCESS(rv, rv);
 
@@ -2167,17 +2167,17 @@ nsImapIncomingServer::AsyncGetPassword(n
     // prompt), so we need to use the async prompter.
     nsresult rv;
     nsCOMPtr<nsIMsgAsyncPrompter> asyncPrompter =
       do_GetService(NS_MSGASYNCPROMPTER_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
     nsCOMPtr<nsIMsgAsyncPromptListener> promptListener(do_QueryInterface(aProtocol));
     rv = asyncPrompter->QueueAsyncAuthPrompt(m_serverKey, aNewPasswordRequested,
                                              promptListener);
-    // Explict NS_ENSURE_SUCCESS for debug purposes as errors tend to get
+    // Explicit NS_ENSURE_SUCCESS for debug purposes as errors tend to get
     // hidden.
     NS_ENSURE_SUCCESS(rv, rv);
   }
   if (!m_password.IsEmpty())
     aPassword = m_password;
   return NS_OK;
 }
 
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -4246,17 +4246,17 @@ void nsImapMailFolder::FindKeysToDelete(
           pHeader->GetMessageKey(&msgKey);
           keysToDelete.AppendElement(msgKey);
         }
       }
     }
     return;
   }
   // otherwise, we have a complete set of uid's and flags, so we delete
-  // anything thats in existingKeys but not in the flag state, as well
+  // anything that's in existingKeys but not in the flag state, as well
   // as messages with the deleted flag set.
   uint32_t total = existingKeys.Length();
   int onlineIndex = 0; // current index into flagState
   for (uint32_t keyIndex = 0; keyIndex < total; keyIndex++)
   {
 
     while ((onlineIndex < numMessageInFlagState) &&
            NS_SUCCEEDED(flagState->GetUidOfMessage(onlineIndex, &uidOfMessage)) &&
@@ -9241,17 +9241,17 @@ nsImapMailFolder::OnMessageClassified(co
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsImapMailFolder::GetShouldDownloadAllHeaders(bool *aResult)
 {
   NS_ENSURE_ARG_POINTER(aResult);
   *aResult = false;
-  //for just the inbox, we check if the filter list has arbitary headers.
+  //for just the inbox, we check if the filter list has arbitrary headers.
   //for all folders, check if we have a spam plugin that requires all headers
   if (mFlags & nsMsgFolderFlags::Inbox)
   {
     nsCOMPtr <nsIMsgFilterList> filterList;
     nsresult rv = GetFilterList(nullptr, getter_AddRefs(filterList));
     NS_ENSURE_SUCCESS(rv,rv);
 
     rv = filterList->GetShouldDownloadAllHeaders(aResult);
--- a/mailnews/imap/src/nsImapOfflineSync.cpp
+++ b/mailnews/imap/src/nsImapOfflineSync.cpp
@@ -238,17 +238,17 @@ void nsImapOfflineSync::ProcessFlagOpera
   uint32_t currentKeyIndex = m_KeyIndex;
 
   imapMessageFlagsType matchingFlags;
   currentOp->GetNewFlags(&matchingFlags);
   imapMessageFlagsType flagOperation;
   imapMessageFlagsType newFlags;
   bool flagsMatch = true;
   do
-  { // loop for all messsages with the same flags
+  { // loop for all messages with the same flags
     if (flagsMatch)
     {
       nsMsgKey curKey;
       currentOp->GetMessageKey(&curKey);
       matchingFlagKeys.AppendElement(curKey);
       currentOp->SetPlayingBack(true);
       m_currentOpsToClear.AppendObject(currentOp);
     }
@@ -301,17 +301,17 @@ void nsImapOfflineSync::ProcessKeywordOp
 
   nsAutoCString keywords;
   if (mCurrentPlaybackOpType == nsIMsgOfflineImapOperation::kAddKeywords)
     currentOp->GetKeywordsToAdd(getter_Copies(keywords));
   else
     currentOp->GetKeywordsToRemove(getter_Copies(keywords));
   bool keywordsMatch = true;
   do
-  { // loop for all messsages with the same keywords
+  { // loop for all messages with the same keywords
     if (keywordsMatch)
     {
       nsMsgKey curKey;
       currentOp->GetMessageKey(&curKey);
       matchingKeywordKeys.AppendElement(curKey);
       currentOp->SetPlayingBack(true);
       m_currentOpsToClear.AppendObject(currentOp);
     }
@@ -521,17 +521,17 @@ void nsImapOfflineSync::ProcessMoveOpera
 {
   nsTArray<nsMsgKey> matchingFlagKeys;
   uint32_t currentKeyIndex = m_KeyIndex;
   nsCString moveDestination;
   op->GetDestinationFolderURI(getter_Copies(moveDestination));
   bool moveMatches = true;
   nsCOMPtr <nsIMsgOfflineImapOperation> currentOp = op;
   do
-  {	// loop for all messsages with the same destination
+  {	// loop for all messages with the same destination
     if (moveMatches)
     {
       nsMsgKey curKey;
       currentOp->GetMessageKey(&curKey);
       matchingFlagKeys.AppendElement(curKey);
       currentOp->SetPlayingBack(true);
       m_currentOpsToClear.AppendObject(currentOp);
     }
@@ -634,17 +634,17 @@ void nsImapOfflineSync::ProcessCopyOpera
 
   nsTArray<nsMsgKey> matchingFlagKeys;
   uint32_t currentKeyIndex = m_KeyIndex;
   nsCString copyDestination;
   currentOp->GetCopyDestination(0, getter_Copies(copyDestination));
   bool copyMatches = true;
   nsresult rv;
 
-  do { // loop for all messsages with the same destination
+  do { // loop for all messages with the same destination
     if (copyMatches)
     {
       nsMsgKey curKey;
       currentOp->GetMessageKey(&curKey);
       matchingFlagKeys.AppendElement(curKey);
       currentOp->SetPlayingBack(true);
       m_currentOpsToClear.AppendObject(currentOp);
     }
@@ -843,17 +843,17 @@ nsresult nsImapOfflineSync::ProcessNextO
               currentOp->GetMessageKey(&curKey);
               m_currentDB->RemoveOfflineOp(currentOp);
               deletedGhostMsgs = true;
 
               // Remember the pseudo headers before we delete them,
               // and when we download new headers, tell listeners about the
               // message key change between the pseudo headers and the real
               // downloaded headers. Note that we're not currently sending
-              // a msgsDeleted notifcation for these headers, but the
+              // a msgsDeleted notification for these headers, but the
               // db listeners are notified about the deletion.
               // for imap folders, we should adjust the pending counts, because we
               // have a header that we know about, but don't have in the db.
               nsCOMPtr <nsIMsgImapMailFolder> imapFolder = do_QueryInterface(m_currentFolder);
               if (imapFolder)
               {
                 bool hdrIsRead;
                 m_currentDB->IsRead(curKey, &hdrIsRead);
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -320,21 +320,21 @@ static bool gUseLiteralPlus = true;
 static bool gExpungeAfterDelete = false;
 static bool gCheckDeletedBeforeExpunge = false; //bug 235004
 static int32_t gResponseTimeout = 60;
 static nsCString gForceSelectDetect;
 static nsTArray<nsCString> gForceSelectServersArray;
 
 // let delete model control expunging, i.e., don't ever expunge when the
 // user chooses the imap delete model, otherwise, expunge when over the
-// threshhold. This is the normal TB behavior.
+// threshold. This is the normal TB behavior.
 static const int32_t kAutoExpungeDeleteModel = 0;
 // Expunge whenever the folder is opened
 static const int32_t kAutoExpungeAlways = 1;
-// Expunge when over the threshhold, independent of the delete model.
+// Expunge when over the threshold, independent of the delete model.
 static const int32_t kAutoExpungeOnThreshold = 2;
 static int32_t gExpungeOption = kAutoExpungeDeleteModel;
 static int32_t gExpungeThreshold = 20;
 
 const int32_t kAppBufSize = 100;
 // can't use static nsCString because it shows up as a leak.
 static char gAppName[kAppBufSize];
 static char gAppVersion[kAppBufSize];
@@ -3130,17 +3130,17 @@ nsresult nsImapProtocol::BeginMessageDow
         NormalMessageEndDownload();
       if (!m_curHdrInfo)
         m_curHdrInfo = m_hdrDownloadCache->StartNewHdr();
       if (m_curHdrInfo)
         m_curHdrInfo->SetMsgSize(total_message_size);
       return NS_OK;
     }
     // if we have a mock channel, that means we have a channel listener who wants the
-    // message. So set up a pipe. We'll write the messsage into one end of the pipe
+    // message. So set up a pipe. We'll write the message into one end of the pipe
     // and they will read it out of the other end.
     if (m_channelListener)
     {
       // create a pipe to pump the message into...the output will go to whoever
       // is consuming the message display
       // we create an "infinite" pipe in case we get extremely long lines from the imap server,
       // and the consumer is waiting for a whole line
       nsCOMPtr<nsIPipe> pipe = do_CreateInstance("@mozilla.org/pipe;1");
@@ -4177,18 +4177,18 @@ void nsImapProtocol::ProcessMailboxUpdat
             m_flagState->SetPartialUIDFetch(false);
             FetchMessage(NS_LITERAL_CSTRING("1:*"), kFlags);
           }
         }
         int32_t numDeleted = m_flagState->NumberOfDeletedMessages();
         // Don't do expunge when we are lite selecting folder because we
         // could be doing undo.
         // Expunge if we're always expunging, or the number of deleted messages
-        // is over the threshhold, and we're either always respecting the
-        // threshhold, or we're expunging based on the delete model, and
+        // is over the threshold, and we're either always respecting the
+        // threshold, or we're expunging based on the delete model, and
         // the delete model is not the imap delete model.
         if (m_imapAction != nsIImapUrl::nsImapLiteSelectFolder &&
             (gExpungeOption == kAutoExpungeAlways ||
              (numDeleted >= gExpungeThreshold &&
               (gExpungeOption == kAutoExpungeOnThreshold ||
                (gExpungeOption == kAutoExpungeDeleteModel && !GetShowDeletedMessages())))))
           Expunge();
       }
@@ -4481,17 +4481,17 @@ bool nsImapProtocol::CheckNewMail()
 // log info including current state...
 void nsImapProtocol::Log(const char *logSubName, const char *extraInfo, const char *logData)
 {
   if (MOZ_LOG_TEST(IMAP, LogLevel::Info))
   {
     static const char nonAuthStateName[] = "NA";
     static const char authStateName[] = "A";
     static const char selectedStateName[] = "S";
-    const nsCString& hostName = GetImapHostName();  // initilize to empty string
+    const nsCString& hostName = GetImapHostName();  // initialize to empty string
 
     int32_t logDataLen = PL_strlen(logData); // PL_strlen checks for null
     nsCString logDataLines;
     const char *logDataToLog;
     int32_t lastLineEnd;
 
     const int kLogDataChunkSize = 400; // nspr line length is 512, and we
                                        // allow some space for the log preamble.
@@ -6139,17 +6139,17 @@ void nsImapProtocol::UploadMessageFromFi
     }
 
     // date should never be 0, but just in case...
     if (date)
     {
       /* Use PR_FormatTimeUSEnglish() to format the date in US English format,
         then figure out what our local GMT offset is, and append it (since
         PR_FormatTimeUSEnglish() can't do that.) Generate four digit years as
-        per RFC 1123 (superceding RFC 822.)
+        per RFC 1123 (superseding RFC 822.)
         */
       char szDateTime[64];
       char dateStr[100];
       PRExplodedTime exploded;
       PR_ExplodeTime(date, PR_LocalTimeParameters, &exploded);
       PR_FormatTimeUSEnglish(szDateTime, sizeof(szDateTime), "%d-%b-%Y %H:%M:%S", &exploded);
       PRExplodedTime now;
       PR_ExplodeTime(PR_Now(), PR_LocalTimeParameters, &now);
@@ -6170,17 +6170,17 @@ void nsImapProtocol::UploadMessageFromFi
     rv = file->GetFileSize(&fileSize);
     NS_ASSERTION(fileSize, "got empty file in UploadMessageFromFile");
     if (NS_FAILED(rv) || !fileSize) goto done;
     rv = NS_NewLocalFileInputStream(getter_AddRefs(fileInputStream), file);
     if (NS_FAILED(rv) || !fileInputStream) goto done;
     command.AppendInt((int32_t)fileSize);
 
     // Set useLiteralPlus to true if server has capability LITERAL+ and
-    // LITERAL+ useage is enabled in the config editor,
+    // LITERAL+ usage is enabled in the config editor,
     // i.e., "mail.imap.use_literal_plus" = true.
     bool useLiteralPlus = (GetServerStateParser().GetCapabilityFlag() &
                           kLiteralPlusCapability) && gUseLiteralPlus;
     if (useLiteralPlus)
       command.AppendLiteral("+}" CRLF);
     else
       command.AppendLiteral("}" CRLF);
 
@@ -8560,17 +8560,17 @@ bool nsImapProtocol::TryToLogon()
     }
     else
     {
       // try to reset failed methods and try them again
       ResetAuthMethods();
       rv = ChooseAuthMethod();
       if (NS_FAILED(rv)) // all methods failed
       {
-        MOZ_LOG(IMAP, LogLevel::Error, ("huch? there are auth methods, and we resetted failed ones, but ChooseAuthMethod still fails."));
+        MOZ_LOG(IMAP, LogLevel::Error, ("huch? there are auth methods, and we reset failed ones, but ChooseAuthMethod still fails."));
         return false;
       }
     }
   }
 
   // Get username, either the stored one or from user
   rv = m_imapServerSink->GetLoginUsername(userName);
   if (NS_FAILED(rv) || userName.IsEmpty())
@@ -8672,17 +8672,17 @@ bool nsImapProtocol::TryToLogon()
           if (buttonPressed == 2) // 'New password' button
           {
             MOZ_LOG(IMAP, LogLevel::Warning, ("new password button pressed."));
             // Forget the current password
             password.Truncate();
             m_hostSessionList->SetPasswordForHost(GetImapServerKey(), EmptyString());
             m_imapServerSink->ForgetPassword();
             m_password.Truncate();
-            MOZ_LOG(IMAP, LogLevel::Warning, ("password resetted (nulled)"));
+            MOZ_LOG(IMAP, LogLevel::Warning, ("password reset (nulled)"));
             newPasswordRequested = true;
             // Will call GetPassword() in beginning of next loop
 
             // Try all possible auth methods again with the new password.
             ResetAuthMethods();
           }
           else if (buttonPressed == 0) // Retry button
           {
--- a/mailnews/imap/src/nsImapProtocol.h
+++ b/mailnews/imap/src/nsImapProtocol.h
@@ -324,30 +324,30 @@ public:
 
   const nsString &GetEmptyMimePartString() { return m_emptyMimePartString; }
 private:
   virtual ~nsImapProtocol();
   // the following flag is used to determine when a url is currently being run. It is cleared when we
   // finish processng a url and it is set whenever we call Load on a url
   bool m_urlInProgress;
   nsCOMPtr<nsIImapUrl> m_runningUrl; // the nsIImapURL that is currently running
-  nsImapAction m_imapAction;  // current imap action associated with this connnection...
+  nsImapAction m_imapAction;  // current imap action associated with this connection...
 
   nsCString             m_hostName;
   nsCString             m_userName;
   nsCString             m_serverKey;
   nsCString             m_realHostName;
   char                  *m_dataOutputBuf;
   nsMsgLineStreamBuffer * m_inputStreamBuffer;
   uint32_t              m_allocatedSize; // allocated size
   uint32_t        m_totalDataSize; // total data size
   uint32_t        m_curReadIndex;  // current read index
   nsCString       m_trashFolderPath;
 
-  // Ouput stream for writing commands to the socket
+  // Output stream for writing commands to the socket
   nsCOMPtr<nsISocketTransport>  m_transport;
   nsCOMPtr<nsIInputStream> m_inputStream;
 
   nsCOMPtr<nsIAsyncInputStream>   m_channelInputStream;
   nsCOMPtr<nsIAsyncOutputStream>  m_channelOutputStream;
   nsCOMPtr<nsIImapMockChannel>    m_mockChannel;   // this is the channel we should forward to people
   uint32_t m_bytesToChannel;
   bool m_fetchingWholeMessage;
--- a/mailnews/imap/src/nsImapServerResponseParser.cpp
+++ b/mailnews/imap/src/nsImapServerResponseParser.cpp
@@ -733,31 +733,31 @@ void nsImapServerResponseParser::PostPro
  mailbox_data    ::=  "FLAGS" SPACE flag_list /
                                "LIST" SPACE mailbox_list /
                                "LSUB" SPACE mailbox_list /
                                "XLIST" SPACE mailbox_list /
                                "MAILBOX" SPACE text /
                                "SEARCH" [SPACE 1#nz_number] /
                                number SPACE "EXISTS" / number SPACE "RECENT"
 
-This production was changed to accomodate predictive parsing
+This production was changed to accommodate predictive parsing
 
  mailbox_data    ::=  "FLAGS" SPACE flag_list /
                                "LIST" SPACE mailbox_list /
                                "LSUB" SPACE mailbox_list /
                                "XLIST" SPACE mailbox_list /
                                "MAILBOX" SPACE text /
                                "SEARCH" [SPACE 1#nz_number]
 */
 void nsImapServerResponseParser::mailbox_data()
 {
   if (!PL_strcasecmp(fNextToken, "FLAGS"))
   {
     // this handles the case where we got the permanent flags response
-    // before the flags response, in which case, we want to ignore thes flags.
+    // before the flags response, in which case, we want to ignore these flags.
     if (fGotPermanentFlags)
       skip_to_CRLF();
     else
       parse_folder_flags();
   }
   else if (!PL_strcasecmp(fNextToken, "LIST") ||
            !PL_strcasecmp(fNextToken, "XLIST"))
   {
@@ -2969,17 +2969,17 @@ nsImapServerResponseParser::bodystructur
 
 
 // RFC2087:  quotaroot_response = "QUOTAROOT" SP astring *(SP astring)
 //           quota_response = "QUOTA" SP astring SP quota_list
 //           quota_list     = "(" [quota_resource *(SP quota_resource)] ")"
 //           quota_resource = atom SP number SP number
 // Only the STORAGE resource is considered.  The current implementation is
 // slightly broken because it assumes that STORAGE is the first resource;
-// a reponse   QUOTA (MESSAGE 5 100 STORAGE 10 512)   would be ignored.
+// a response   QUOTA (MESSAGE 5 100 STORAGE 10 512)   would be ignored.
 void nsImapServerResponseParser::quota_data()
 {
   if (!PL_strcasecmp(fNextToken, "QUOTAROOT"))
   {
     // ignore QUOTAROOT response
     nsCString quotaroot;
     AdvanceToNextToken();
     while (ContinueParse() && !fAtEndOfLine)
--- a/mailnews/imap/src/nsImapServerResponseParser.h
+++ b/mailnews/imap/src/nsImapServerResponseParser.h
@@ -177,17 +177,17 @@ protected:
   virtual void    ProcessBadCommand(const char *commandToken);
   virtual void    PreProcessCommandToken(const char *commandToken,
                                              const char *currentCommand);
   virtual void    PostProcessEndOfLine();
 
   // Overridden from the nsIMAPGenericParser, to retrieve the next line
   // from the open socket.
   virtual bool    GetNextLineForParser(char **nextLine) override;
-  // overriden to do logging
+  // overridden to do logging
   virtual void    SetSyntaxError(bool error, const char *msg = nullptr) override;
 
 private:
   bool            fCurrentCommandFailed;
   bool            fReportingErrors;
 
 
   bool            fCurrentFolderReadOnly;
--- a/mailnews/imap/src/nsImapUrl.cpp
+++ b/mailnews/imap/src/nsImapUrl.cpp
@@ -325,17 +325,17 @@ NS_IMETHODIMP nsImapUrl::GetCustomSubtra
   return NS_OK;
 }
 
 
 NS_IMETHODIMP nsImapUrl::GetImapPartToFetch(char **result)
 {
   //  here's the old code....
 
-  // unforunately an imap part can have the form: /;section= OR
+  // unfortunately an imap part can have the form: /;section= OR
   // it can have the form ?section=. We need to look for both.
   if (m_listOfMessageIds)
   {
     char *wherepart = PL_strstr(m_listOfMessageIds, ";section=");
     if (!wherepart) // look for ?section too....
       wherepart = PL_strstr(m_listOfMessageIds, "?section=");
     if (wherepart)
     {
--- a/mailnews/imap/test/unit/test_dod.js
+++ b/mailnews/imap/test/unit/test_dod.js
@@ -26,17 +26,17 @@ function run_test()
   // pref tuning: one connection only, turn off notifications
   Services.prefs.setIntPref( "mail.server.server1.max_cached_connections", 1);
   Services.prefs.setBoolPref("mail.biff.play_sound", false);
   Services.prefs.setBoolPref("mail.biff.show_alert", false);
   Services.prefs.setBoolPref("mail.biff.show_tray_icon",    false);
   Services.prefs.setBoolPref("mail.biff.animate_dock_icon", false);
 
   // Force bodypart fetching as best as we can.
-  // It would be adviseable to enable log and check to be sure body[] is not
+  // It would be advisable to enable log and check to be sure body[] is not
   // being fetched in lieu of parts. There may be conditions that bypass
   // bodypart fetch.
   Services.prefs.setBoolPref("mail.inline_attachments",     false);
   Services.prefs.setIntPref ("browser.cache.disk.capacity",              0);
   Services.prefs.setIntPref ("mail.imap.mime_parts_on_demand_threshold", 1);
   Services.prefs.setIntPref ("mailnews.display.disallow_mime_handlers",  0);
   Services.prefs.setBoolPref("mail.server.default.fetch_by_chunks",  false);
   Services.prefs.setBoolPref("mail.server.server1.autosync_offline_stores", false);
--- a/mailnews/imap/test/unit/test_dontStatNoSelect.js
+++ b/mailnews/imap/test/unit/test_dontStatNoSelect.js
@@ -100,17 +100,17 @@ function* checkStatNoSelect() {
   MailServices.mailSession.AddFolderListener(gFolderListener,
                                              Ci.nsIFolderListener.boolPropertyChanged);
   gIMAPInbox.getNewMessages(null, null);
   // Wait for the folder listener to get told about new messages.
   yield false;
 }
 
 function addMessageToFolder(mbox) {
-  // make a couple messges
+  // make a couple of messages
   let messages = [];
   let gMessageGenerator = new MessageGenerator();
   messages = messages.concat(gMessageGenerator.makeMessage());
 
   let msgURI =
     Services.io.newURI("data:text/plain;base64," +
                        btoa(messages[0].toMessageString()));
   let message = new imapMessage(msgURI.spec, mbox.uidnext++);
--- a/mailnews/imap/test/unit/test_imapFilterActions.js
+++ b/mailnews/imap/test/unit/test_imapFilterActions.js
@@ -87,29 +87,29 @@ var gTestArray =
     gAction.type = Ci.nsMsgFilterAction.MoveToFolder;
     gAction.targetFolderUri = gSubfolder.URI;
     gInboxCount = folderCount(IMAPPump.inbox);
     gSubfolderCount = folderCount(gSubfolder);
     yield setupTest(gBodyFilter, gAction);
 
     testCounts(false, 0, 0, 0);
     Assert.equal(gSubfolderCount + 1, folderCount(gSubfolder));
-    // no net messsages were added to the inbox
+    // no net messages were added to the inbox
     Assert.equal(gInboxCount, folderCount(IMAPPump.inbox));
   },
   function *MoveToFolderBody2() {
     gAction.type = Ci.nsMsgFilterAction.MoveToFolder;
     gAction.targetFolderUri = gSubfolder.URI;
     gInboxCount = folderCount(IMAPPump.inbox);
     gSubfolderCount = folderCount(gSubfolder);
     yield setupTest(gBodyFilter, gAction);
 
     testCounts(false, 0, 0, 0);
     Assert.equal(gSubfolderCount + 1, folderCount(gSubfolder));
-    // no net messsages were added to the inbox
+    // no net messages were added to the inbox
     Assert.equal(gInboxCount, folderCount(IMAPPump.inbox));
   },
   function *MarkRead() {
     gAction.type = Ci.nsMsgFilterAction.MarkRead;
     gInboxCount = folderCount(IMAPPump.inbox);
     yield setupTest(gFilter, gAction);
     testCounts(false, 0, 0, 0);
     Assert.ok(gHeader.isRead);
--- a/mailnews/imap/test/unit/test_imapHdrChunking.js
+++ b/mailnews/imap/test/unit/test_imapHdrChunking.js
@@ -42,17 +42,17 @@ var tests = [
   testMessageFetched,
   testHdrsDownloaded,
   endTest
 ]
 
 // upload messages to the imap fake server Inbox
 function* uploadImapMessages()
 {
-  // make 10 messges
+  // make 10 messages
   let messageGenerator = new MessageGenerator();
   let scenarioFactory = new MessageScenarioFactory(messageGenerator);
 
   // build up a list of messages
   let messages = [];
   messages = messages.concat(scenarioFactory.directReply(10));
 
   // Add 10 messages with uids 1-10.
--- a/mailnews/imap/test/unit/test_imapHighWater.js
+++ b/mailnews/imap/test/unit/test_imapHighWater.js
@@ -63,17 +63,17 @@ function run_test()
   Services.prefs.setBoolPref("mail.biff.animate_dock_icon", false);
   Services.prefs.setBoolPref("mail.server.default.autosync_offline_stores", false);
   // Don't prompt about offline download when going offline
   Services.prefs.setIntPref("offline.download.download_messages", 2);
   actually_run_test();
 }
 
 function* setupFolders() {
-  // make 10 messges
+  // make 10 messages
   let messageGenerator = new MessageGenerator();
   let scenarioFactory = new MessageScenarioFactory(messageGenerator);
 
   // build up a list of messages
   let messages = [];
   messages = messages.concat(scenarioFactory.directReply(10));
 
   // Add 10 messages with uids 1-10.
--- a/mailnews/imap/test/unit/test_imapStoreMsgOffline.js
+++ b/mailnews/imap/test/unit/test_imapStoreMsgOffline.js
@@ -70,17 +70,17 @@ function addMessagesToServer(messages, m
     mailbox.addMessage(new imapMessage(URI.spec, mailbox.uidnext++, []));
   });
 }
 
 function setup() {
   // We aren't interested in downloading messages automatically
   Services.prefs.setBoolPref("mail.server.server1.autosync_offline_stores", false);
   Services.prefs.setBoolPref("mail.server.server1.offline_download", true);
-  // make small threshhold for mpod so our test messages don't have to be big.
+  // make small threshold for mpod so our test messages don't have to be big.
   // XXX We can't set this pref until the fake server supports body structure.
   // So for now, we'll leave it at the default value, which is larger than any of
   // our test messages.
   // Services.prefs.setIntPref("mail.imap.mime_parts_on_demand_threshold", 3000);
 
   setupIMAPPump();
 
   // these hacks are required because we've created the inbox before
@@ -155,17 +155,17 @@ var tests = [
   },
   function verify3rdMsg() {
     let msg3 = IMAPPump.inbox.msgDatabase.getMsgHdrForMessageID(gMsgId3);
     // can't turn this on because our fake server doesn't support body structure.
 //    do_check_eq(msg3.flags & nsMsgMessageFlags.Offline, 0);
   },
   function* addNewMsgs() {
     let mbox = IMAPPump.daemon.getMailbox("INBOX")
-    // make a couple messges
+    // make a couple of messages
     let messages = [];
     let bodyString = "";
     for (let i = 0; i < 100; i++)
       bodyString += "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\r\n";
 
     let gMessageGenerator = new MessageGenerator();
     messages = messages.concat(gMessageGenerator.makeMessage({body: {body: bodyString, contentType: "text/plain"}}));
 
--- a/mailnews/imap/test/unit/test_offlinePlayback.js
+++ b/mailnews/imap/test/unit/test_offlinePlayback.js
@@ -103,17 +103,17 @@ function *setup() {
    * Set up an IMAP server.
    */
   IMAPPump.daemon.createMailbox("secondFolder", {subscribed : true});
   IMAPPump.daemon.createMailbox("thirdFolder", {subscribed : true});
   Services.prefs.setBoolPref("mail.server.default.autosync_offline_stores", false);
   // Don't prompt about offline download when going offline
   Services.prefs.setIntPref("offline.download.download_messages", 2);
 
-  // make a couple messges
+  // make a couple of messages
   let messages = [];
   let gMessageGenerator = new MessageGenerator();
   messages = messages.concat(gMessageGenerator.makeMessage());
   messages = messages.concat(gMessageGenerator.makeMessage());
   gSynthMessage1 = messages[0];
   gSynthMessage2 = messages[1];
 
   let msgURI =
--- a/mailnews/import/outlook/src/MapiMessage.cpp
+++ b/mailnews/import/outlook/src/MapiMessage.cpp
@@ -619,17 +619,17 @@ void ExtractMetaCharset(const wchar_t* b
   const wchar_t* chset_pos = std::search(body, eohd_pos, str_chset,
                                          str_chset_end, CaseInsensitiveComp);
   if (chset_pos == eohd_pos) // No charset!
     return;
   chset_pos += 8;
 
   // remove everything from the string after the next ; or " or space,
   // whichever comes first.
-  // The inital sting looks something like
+  // The initial string looks something like
   // <META content="text/html; charset=utf-8" http-equiv=Content-Type>
   // <META content="text/html; charset=utf-8;" http-equiv=Content-Type>
   // <META content="text/html; charset=utf-8 ;" http-equiv=Content-Type>
   // <META content="text/html; charset=utf-8 " http-equiv=Content-Type>
   const wchar_t term[] = L";\" ", *term_end= term+sizeof(term)/sizeof(term[0])-1;
   const wchar_t* chset_end = std::find_first_of(chset_pos, eohd_pos, term,
                                                 term_end);
   if (chset_end != eohd_pos)
@@ -1077,17 +1077,17 @@ bool CMapiMessage::AddAttachment(DWORD a
       // when an attachment has a Content-Id while isn't embedded (even in a message
       // with a plain-text body!). So next I tried to look for <img> tags that contain
       // the found Content-Id. But this is unreliable, too, because there exist cases
       // where other places of HTML reference the embedded messages (e.g. it may be
       // a background of a table cell, or some CSS; further, it is possible that the
       // reference to an embedded object is not in the main body, but in another
       // embedded object - like body references a CSS attachment that in turn references
       // a picture as a background of its element). From the other hand, it's unreliable
-      // to relax the search criteria to any occurence of the Content-Id string in the body -
+      // to relax the search criteria to any occurrence of the Content-Id string in the body -
       // partly because the string may be simply in a text or other non-referencing part,
       // partly because of the abovementioned possibility that the reference is outside
       // the body at all.
       // There exist the PR_ATTACH_FLAGS property of the attachment. The MS documentation
       // tells about two possible flags in it: ATT_INVISIBLE_IN_HTML and ATT_INVISIBLE_IN_RTF.
       // There is at least one more undocumented flag: ATT_MHTML_REF. Some sources in Internet
       // suggest simply check for the latter flag to distinguish between the embedded
       // and ordinary attachments. But my observations indicate that even if the flags
--- a/mailnews/import/outlook/src/nsOutlookImport.h
+++ b/mailnews/import/outlook/src/nsOutlookImport.h
@@ -24,17 +24,17 @@ class nsOutlookImport : public nsIImport
 {
 public:
 
   nsOutlookImport();
 
   NS_DECL_ISUPPORTS
 
   ////////////////////////////////////////////////////////////////////////////////////////
-  // we suppport the nsIImportModule interface
+  // we support the nsIImportModule interface
   ////////////////////////////////////////////////////////////////////////////////////////
 
   NS_DECL_NSIIMPORTMODULE
 
 protected:
   virtual ~nsOutlookImport();
 };
 
--- a/mailnews/import/outlook/src/nsOutlookSettings.cpp
+++ b/mailnews/import/outlook/src/nsOutlookSettings.cpp
@@ -540,13 +540,13 @@ nsresult OutlookSettings::SetSmtpServer(
   smtpServer->SetHostname(nativeServerName);
   if (!aUser.IsEmpty())
     smtpServer->SetUsername(nativeUserName);
 
   if (aId)
     SetSmtpServerKey(aId, smtpServer);
 
   // TODO SSL, auth method
-  IMPORT_LOG1("Ceated new SMTP server: %s\n",
+  IMPORT_LOG1("Created new SMTP server: %s\n",
               nativeServerName.get());
   return NS_OK;
 }
 
--- a/mailnews/import/public/nsIImportAddressBooks.idl
+++ b/mailnews/import/public/nsIImportAddressBooks.idl
@@ -87,17 +87,17 @@ interface nsIImportAddressBooks : nsISup
     Fill in defaults (if any) for a field map for importing address
     books from this location.
   */
   void InitFieldMap(in nsIImportFieldMap fieldMap);
 
   /**
    * Import a specific address book into the destination file supplied.
    * If an error occurs that is non-fatal, the destination will be deleted and
-   * other adress book will be imported.  If a fatal error occurs, the
+   * other address book will be imported.  If a fatal error occurs, the
    * destination will be deleted and the import operation will abort.
    *
    * @param aSource         The source data for the import.
    * @param aDestination    The proxy database for the destination of the
    *                        import.
    * @param aFieldMap       The field map containing the mapping of fields to be
    *                        used in cvs and tab type imports.
    * @param aSupportService An optional proxy support service (nullptr is
--- a/mailnews/import/src/ImportTranslate.cpp
+++ b/mailnews/import/src/ImportTranslate.cpp
@@ -22,17 +22,17 @@ bool ImportTranslate::ConvertString(cons
   nsCString  lang;
 
   if (mimeHeader) {
     // add the charset and language
     pTrans->GetCharset(set);
     pTrans->GetLanguage(lang);
   }
 
-  // Unfortunatly, we didn't implement ConvertBuffer for all translators,
+  // Unfortunately, we didn't implement ConvertBuffer for all translators,
   // just ConvertToFile.  This means that this data will not always
   // be converted to the charset of pTrans.  In that case...
   // We don't always have the data in the same charset as the current
   // translator...
   // It is safer to leave the charset and language field blank
   set.Truncate();
   lang.Truncate();
 
--- a/mailnews/import/src/nsImportTranslator.h
+++ b/mailnews/import/src/nsImportTranslator.h
@@ -29,26 +29,26 @@ public:
   virtual bool      ConvertToFile(const uint8_t * pIn, uint32_t inLen, ImportOutFile *pOutFile, uint32_t *pProcessed = nullptr);
   virtual bool      FinishConvertToFile(ImportOutFile * /* pOutFile */) { return true;}
 
   virtual void  GetCharset(nsCString& charSet) { charSet = "us-ascii";}
   virtual void  GetLanguage(nsCString& lang) { lang = "en";}
   virtual void  GetEncoding(nsCString& encoding) { encoding.Truncate();}
 };
 
-// Specialized encoder, not a vaild language translator, used for Mime headers.
+// Specialized encoder, not a valid language translator, used for Mime headers.
 // rfc2231
 class CMHTranslator : public nsImportTranslator {
 public:
   virtual uint32_t  GetMaxBufferSize(uint32_t inLen) override { return (inLen * 3) + 1;}
   virtual void    ConvertBuffer(const uint8_t * pIn, uint32_t inLen, uint8_t * pOut) override;
   virtual bool      ConvertToFile(const uint8_t * pIn, uint32_t inLen, ImportOutFile *pOutFile, uint32_t *pProcessed = nullptr) override;
 };
 
-// Specialized encoder, not a vaild language translator, used for mail headers
+// Specialized encoder, not a valid language translator, used for mail headers
 // rfc2047
 class C2047Translator : public nsImportTranslator {
 public:
   virtual ~C2047Translator() {}
 
   C2047Translator(const char *pCharset, uint32_t headerLen) { m_charset = pCharset; m_startLen = headerLen; m_useQuotedPrintable = false;}
 
   void  SetUseQuotedPrintable(void) { m_useQuotedPrintable = true;}
--- a/mailnews/import/text/src/nsTextAddress.cpp
+++ b/mailnews/import/text/src/nsTextAddress.cpp
@@ -102,17 +102,17 @@ nsresult nsTextAddress::ImportAddresses(
   // Skip the first record if the user has requested it.
   if (skipRecord)
     rv = ReadRecord(lineStream, line, &more);
 
   while (!(*pAbort) && more && NS_SUCCEEDED(rv)) {
     // Read the line in
     rv = ReadRecord(lineStream, line, &more);
     if (NS_SUCCEEDED(rv)) {
-      // Now proces it to add it to the database
+      // Now process it to add it to the database
       rv = ProcessLine(line, errors);
 
       if (NS_FAILED(rv)) {
         IMPORT_LOG0("*** Error processing text record.\n");
       }
     }
     if (NS_SUCCEEDED(rv) && pProgress) {
       // This won't be totally accurate, but its the best we can do
--- a/mailnews/import/text/src/nsTextImport.h
+++ b/mailnews/import/text/src/nsTextImport.h
@@ -21,17 +21,17 @@
 class nsTextImport : public nsIImportModule
 {
 public:
   nsTextImport();
 
   NS_DECL_ISUPPORTS
 
   ////////////////////////////////////////////////////////////////////////////////////////
-  // we suppport the nsIImportModule interface
+  // we support the nsIImportModule interface
   ////////////////////////////////////////////////////////////////////////////////////////
 
   NS_DECL_NSIIMPORTMODULE
 
 protected:
   virtual ~nsTextImport();
   nsCOMPtr<nsIStringBundle>   m_stringBundle;
 };
--- a/mailnews/import/vcard/src/nsVCardImport.h
+++ b/mailnews/import/vcard/src/nsVCardImport.h
@@ -20,17 +20,17 @@ class nsVCardImport : public nsIImportMo
 {
 public:
 
   nsVCardImport();
 
   NS_DECL_ISUPPORTS
 
   ////////////////////////////////////////////////////////////////////////////////////////
-  // we suppport the nsIImportModule interface
+  // we support the nsIImportModule interface
   ////////////////////////////////////////////////////////////////////////////////////////
 
   NS_DECL_NSIIMPORTMODULE
 
 protected:
   virtual ~nsVCardImport();
   nsCOMPtr<nsIStringBundle> m_stringBundle;
 };
--- a/mailnews/import/winlivemail/nsWMImport.h
+++ b/mailnews/import/winlivemail/nsWMImport.h
@@ -21,17 +21,17 @@ class nsWMImport : public nsIImportModul
 {
 public:
 
   nsWMImport();
 
   NS_DECL_ISUPPORTS
 
   ////////////////////////////////////////////////////////////////////////////////////////
-  // we suppport the nsIImportModule interface
+  // we support the nsIImportModule interface
   ////////////////////////////////////////////////////////////////////////////////////////
 
   NS_DECL_NSIIMPORTMODULE
 
 protected:
   virtual ~nsWMImport();
 };
 
--- a/mailnews/intl/charsetalias.properties
+++ b/mailnews/intl/charsetalias.properties
@@ -85,15 +85,15 @@ iso-10646-ucs-basic=UTF-16BE
 csunicodeascii=UTF-16BE
 iso-10646-unicode-latin1=UTF-16BE
 csunicodelatin1=UTF-16BE
 iso-10646=UTF-16BE
 iso-10646-j-1=UTF-16BE
 
 # Following names appears in unix nl_langinfo(CODESET)
 # They can be compiled as platform specific if necessary
-# DONT put things here if it does not look generic enough (like hp15CN)
+# DON'T put things here if it does not look generic enough (like hp15CN)
 iso88591=ISO-8859-1
 iso885912=ISO-8859-12
 windows-936=gbk
 ansi-1251=windows-1251
 
 cp936=gbk
--- a/mailnews/jsaccount/modules/JSAccountUtils.jsm
+++ b/mailnews/jsaccount/modules/JSAccountUtils.jsm
@@ -71,17 +71,17 @@ var log = configureLogging();
  *
  *       contractID:     string contract ID for the JS object that will be
  *                       created by the factory.
  *
  *       classID:        Components.ID(CID) for the JS object that will be
  *                       created by the factory, where CID is a string uuid.
  *      }
  *
- *   @param aJsDelegateConstructor: a JS contructor class, called using new,
+ *   @param aJsDelegateConstructor: a JS constructor class, called using new,
  *                                  that will create the JS object to which
  *                                  XPCOM methods calls will be delegated.
  */
 
 JSAccountUtils.jaFactory = function (aProperties, aJsDelegateConstructor)
 {
   let factory = {};
   factory.QueryInterface = XPCOMUtils.generateQI([Ci.nsIFactory]);
--- a/mailnews/local/src/nsLocalMailFolder.cpp
+++ b/mailnews/local/src/nsLocalMailFolder.cpp
@@ -2970,17 +2970,17 @@ nsMsgLocalMailFolder::MarkMsgsOnPop3Serv
   return rv;
 }
 
 NS_IMETHODIMP nsMsgLocalMailFolder::DeleteDownloadMsg(nsIMsgDBHdr *aMsgHdr, bool *aDoSelect)
 {
   uint32_t numMsgs;
   char *newMsgId;
 
-  // This method is only invoked thru DownloadMessagesForOffline()
+  // This method is only invoked through DownloadMessagesForOffline()
   if (mDownloadState != DOWNLOAD_STATE_NONE)
   {
     // We only remember the first key, no matter how many
     // messages were originally selected.
     if (mDownloadState == DOWNLOAD_STATE_INITED)
     {
       aMsgHdr->GetMessageKey(&mDownloadSelectKey);
       mDownloadState = DOWNLOAD_STATE_GOTMSG;
--- a/mailnews/local/src/nsMailboxProtocol.cpp
+++ b/mailnews/local/src/nsMailboxProtocol.cpp
@@ -217,17 +217,17 @@ nsresult nsMailboxProtocol::Initialize(n
   mCurrentProgress = 0;
 
   // do we really need both?
   m_tempMessageFile = m_tempMsgFile;
   return rv;
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////////
-// we suppport the nsIStreamListener interface
+// we support the nsIStreamListener interface
 ////////////////////////////////////////////////////////////////////////////////////////////
 
 NS_IMETHODIMP nsMailboxProtocol::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
 {
   // extract the appropriate event sinks from the url and initialize them in our protocol data
   // the URL should be queried for a nsINewsURL. If it doesn't support a news URL interface then
   // we have an error.
   if (m_nextState == MAILBOX_READ_FOLDER && m_mailboxParser)
--- a/mailnews/local/src/nsMailboxProtocol.h
+++ b/mailnews/local/src/nsMailboxProtocol.h
@@ -54,25 +54,25 @@ public:
 
   // initialization function given a new url and transport layer
   nsresult Initialize(nsIURI * aURL);
 
   // the consumer of the url might be something like an nsIDocShell....
   virtual nsresult LoadUrl(nsIURI * aURL, nsISupports * aConsumer) override;
 
   ////////////////////////////////////////////////////////////////////////////////////////
-  // we suppport the nsIStreamListener interface
+  // we support the nsIStreamListener interface
   ////////////////////////////////////////////////////////////////////////////////////////
 
   NS_IMETHOD OnStartRequest(nsIRequest *request, nsISupports *ctxt) override;
   NS_IMETHOD OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult aStatus) override;
 
 private:
   nsCOMPtr<nsIMailboxUrl>  m_runningUrl; // the nsIMailboxURL that is currently running
-  nsMailboxAction m_mailboxAction; // current mailbox action associated with this connnection...
+  nsMailboxAction m_mailboxAction; // current mailbox action associated with this connection...
   uint64_t m_msgOffset;
   // Event sink handles
   nsCOMPtr<nsIStreamListener> m_mailboxParser;
 
   // Local state for the current operation
   nsMsgLineStreamBuffer   * m_lineStreamBuffer; // used to efficiently extract lines from the incoming data stream
 
   // Generic state information -- What state are we in? What state do we want to go to
--- a/mailnews/local/src/nsMovemailService.cpp
+++ b/mailnews/local/src/nsMovemailService.cpp
@@ -182,17 +182,17 @@ SpoolLock::isLocked() {
 }
 
 bool
 SpoolLock::ObtainSpoolLock(unsigned int aSeconds /* number of seconds to retry */)
 {
   /*
    * Locking procedures:
    * If the directory is not writable, we want to use the appropriate system
-   * utilites to lock the file.
+   * utilities to lock the file.
    * If the directory is writable, we want to go through the create-and-link
    * locking procedures to make it atomic for certain networked file systems.
    * This involves creating a .mozlock file and attempting to hard-link it to
    * the customary .lock file.
    */
   nsCOMPtr<nsIFile> spoolFile;
   nsresult rv = NS_NewNativeLocalFile(mSpoolName,
                                       true,
--- a/mailnews/local/src/nsParseMailbox.h
+++ b/mailnews/local/src/nsParseMailbox.h
@@ -135,17 +135,17 @@ public:
   nsMsgMailboxParser(nsIMsgFolder *);
   nsMsgMailboxParser();
   nsresult Init();
 
   bool    IsRunningUrl() { return m_urlInProgress;} // returns true if we are currently running a url and false otherwise...
   NS_DECL_ISUPPORTS_INHERITED
 
   ////////////////////////////////////////////////////////////////////////////////////////
-  // we suppport the nsIStreamListener interface
+  // we support the nsIStreamListener interface
   ////////////////////////////////////////////////////////////////////////////////////////
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
 
   void    SetDB (nsIMsgDatabase *mailDB) {m_mailDB = mailDB; }
 
   // message socket libnet callbacks, which come through folder pane
   nsresult ProcessMailboxInputStream(nsIURI* aURL, nsIInputStream *aIStream, uint32_t aLength);
--- a/mailnews/local/src/nsPop3Protocol.cpp
+++ b/mailnews/local/src/nsPop3Protocol.cpp
@@ -738,17 +738,17 @@ nsresult nsPop3Protocol::StartGetAsyncPa
     if (NS_SUCCEEDED(rv) && !m_passwordResult.IsEmpty())
     {
       m_pop3ConData->next_state = GetNextPasswordObtainState();
       return NS_OK;
     }
   }
 
   // We're now going to need to do something that will end up with us either
-  // poking the login manger or prompting the user. We need to ensure we only
+  // poking the login manager or prompting the user. We need to ensure we only
   // do one prompt at a time (and loging manager could cause a master password
   // prompt), so we need to use the async prompter.
   nsCOMPtr<nsIMsgAsyncPrompter> asyncPrompter =
     do_GetService(NS_MSGASYNCPROMPTER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   m_pop3ConData->next_state = aNextState;
 
@@ -756,17 +756,17 @@ nsresult nsPop3Protocol::StartGetAsyncPa
   // the async prompt run. Once it is our turn again we'll call back into
   // ProcessProtocolState.
   m_pop3ConData->pause_for_read = true;
 
   nsCString server("unknown");
   m_url->GetPrePath(server);
 
   rv = asyncPrompter->QueueAsyncAuthPrompt(server, false, this);
-  // Explict NS_ENSURE_SUCCESS for debug purposes as errors tend to get
+  // Explicit NS_ENSURE_SUCCESS for debug purposes as errors tend to get
   // hidden.
   NS_ENSURE_SUCCESS(rv, rv);
   return rv;
 }
 
 NS_IMETHODIMP nsPop3Protocol::OnPromptStart(bool *aResult)
 {
   MOZ_LOG(POP3LOGMODULE, LogLevel::Debug, (POP3LOG("OnPromptStart()")));
@@ -3152,17 +3152,17 @@ int32_t nsPop3Protocol::GetMsg()
     if (m_pop3ConData->next_state == POP3_GET_MSG)
       m_pop3ConData->last_accessed_msg++;
     // Make sure we check the next message next time!
   }
   return 0;
 }
 
 
-/* start retreiving just the first 20 lines
+/* start retrieving just the first 20 lines
  */
 int32_t nsPop3Protocol::SendTop()
 {
    char * cmd = PR_smprintf( "TOP %ld %d" CRLF,
      m_pop3ConData->msg_info[m_pop3ConData->last_accessed_msg].msgnum,
      m_pop3ConData->headers_only ? 0 : 20);
    int32_t status = -1;
    if (cmd)
@@ -3211,17 +3211,17 @@ int32_t nsPop3Protocol::XsenderResponse(
 
     if (m_pop3ConData->truncating_cur_msg)
         m_pop3ConData->next_state = POP3_SEND_TOP;
     else
         m_pop3ConData->next_state = POP3_SEND_RETR;
     return 0;
 }
 
-/* retreive the whole message
+/* retrieve the whole message
  */
 int32_t
 nsPop3Protocol::SendRetr()
 {
 
   char * cmd = PR_smprintf("RETR %ld" CRLF, m_pop3ConData->msg_info[m_pop3ConData->last_accessed_msg].msgnum);
   int32_t status = -1;
   if (cmd)
@@ -3593,17 +3593,17 @@ nsPop3Protocol::HandleLine(char *line, u
             }
 
             m_pop3ConData->msg_closure = nullptr;
             return rv;
         }
     }
     /* Check if the line begins with the termination octet. If so
        and if another termination octet follows, we step over the
-       first occurence of it. */
+       first occurrence of it. */
     else if (line_length > 1 && line[0] == '.' && line[1] == '.') {
         line++;
         line_length--;
 
     }
 
     return m_nsIPop3Sink->IncorporateWrite(line, line_length);
 }
--- a/mailnews/local/src/nsPop3Service.h
+++ b/mailnews/local/src/nsPop3Service.h
@@ -34,17 +34,17 @@ public:
 protected:
   virtual ~nsPop3Service();
   nsresult GetMail(bool downloadNewMail,
                    nsIMsgWindow* aMsgWindow,
                    nsIUrlListener * aUrlListener,
                    nsIMsgFolder *inbox,
                    nsIPop3IncomingServer *popServer,
                    nsIURI ** aURL);
-  // convience function to make constructing of the pop3 url easier...
+  // convenience function to make constructing of the pop3 url easier...
   nsresult BuildPop3Url(const char * urlSpec, nsIMsgFolder *inbox,
                     nsIPop3IncomingServer *, nsIUrlListener * aUrlListener,
                     nsIURI ** aUrl, nsIMsgWindow *aMsgWindow);
 
   nsresult RunPopUrl(nsIMsgIncomingServer * aServer, nsIURI * aUrlToRun);
   void AlertServerBusy(nsIMsgMailNewsUrl *url);
   nsTObserverArray<nsCOMPtr<nsIPop3ServiceListener> > mListeners;
 };
--- a/mailnews/local/src/nsPop3Sink.cpp
+++ b/mailnews/local/src/nsPop3Sink.cpp
@@ -109,32 +109,32 @@ partialRecord::partialRecord() :
 {
 }
 
 partialRecord::~partialRecord()
 {
 }
 
 // Walk through all the messages in this folder and look for any
-// PARTIAL messages. For each of those, dig thru the mailbox and
+// PARTIAL messages. For each of those, dig through the mailbox and
 // find the Account that the message belongs to. If that Account
 // matches the current Account, then look for the Uidl and save
 // this message for later processing.
 nsresult
 nsPop3Sink::FindPartialMessages()
 {
   nsCOMPtr<nsISimpleEnumerator> messages;
   bool hasMore = false;
   bool isOpen = false;
   nsLocalFolderScanState folderScanState;
   nsCOMPtr<nsIMsgDatabase> db;
   nsCOMPtr<nsIMsgLocalMailFolder> localFolder = do_QueryInterface(m_folder);
   m_folder->GetMsgDatabase(getter_AddRefs(db));
   if (!localFolder || !db)
-    return NS_ERROR_FAILURE;  // we need it to grub thru the folder
+    return NS_ERROR_FAILURE;  // we need it to grub through the folder
 
   nsresult rv = db->EnumerateMessages(getter_AddRefs(messages));
   if (messages)
     messages->HasMoreElements(&hasMore);
   while(hasMore && NS_SUCCEEDED(rv))
   {
     nsCOMPtr<nsISupports> aSupport;
     uint32_t flags = 0;
@@ -697,17 +697,17 @@ nsresult nsPop3Sink::WriteLineToMailbox(
     // where for some reason or another we can't write to and lose the messages
     // See bug 62480
     NS_ENSURE_TRUE(m_outFileStream, NS_ERROR_OUT_OF_MEMORY);
 
     // To remove seeking to the end for each line to be written, remove the
     // following line. See bug 1116055 for details.
 #define SEEK_TO_END
 #ifdef  SEEK_TO_END
-    // seek to the end in case someone else has seeked elsewhere in our stream.
+    // seek to the end in case someone else has sought elsewhere in our stream.
     nsCOMPtr <nsISeekableStream> seekableOutStream = do_QueryInterface(m_outFileStream);
 
     int64_t before_seek_pos;
     nsresult rv2 = seekableOutStream->Tell(&before_seek_pos);
     MOZ_ASSERT(NS_SUCCEEDED(rv2), "seekableOutStream->Tell(&before_seek_pos) failed");
 
     // XXX Handle error such as network error for remote file system.
     seekableOutStream->Seek(nsISeekableStream::NS_SEEK_END, 0);
--- a/mailnews/mailnews.js
+++ b/mailnews/mailnews.js
@@ -96,17 +96,17 @@ pref("mail.db.idle_limit", 300000);
 // How many db's should we leave open? LRU db's will be closed first
 pref("mail.db.max_open", 30);
 
 // Should we allow folders over 4GB in size?
 pref("mailnews.allowMboxOver4GB", true);
 
 // For IMAP caching lift the limits since they are designed for HTML pages.
 // Note that the maximum size of a cache entry is limited by
-// max_entry_size and (capacity >> 3), so devided by 8.
+// max_entry_size and (capacity >> 3), so divided by 8.
 // Larger messages or attachments won't be cached.
 pref("browser.cache.memory.max_entry_size", 25000); //  25 MB
 pref("browser.cache.memory.capacity",      200000); // 200 MB = 8*25 MB
 
 pref("mail.imap.chunk_size",                65536);
 pref("mail.imap.min_chunk_size_threshold",  98304);
 pref("mail.imap.chunk_fast",                2);
 pref("mail.imap.chunk_ideal",               4);
@@ -574,17 +574,17 @@ pref("mailnews.traits.enabled.1", false)
 pref("mailnews.traits.id.2", "mailnews@mozilla.org#junk");
 pref("mailnews.traits.name.2", "Junk");
 pref("mailnews.traits.enabled.2", true);
 pref("mailnews.traits.antiId.2", "mailnews@mozilla.org#good");
 // traits 3 - 1000 are reserved for use by mailnews@mozilla.org
 // the first externally defined trait will have index 1001
 pref("mailnews.traits.lastIndex", 1000);
 
-// Adress entry will highlight input that doesn't match anything in the
+// Address entry will highlight input that doesn't match anything in the
 // address books.
 pref("mail.autoComplete.highlightNonMatches", true);
 
 // Show extra column in address entry. This is numeric for
 // historical reasons: 0 = no extra column, 1 = show extra column.
 pref("mail.autoComplete.commentColumn", 0);
 
 // if true, we'll use the password from an incoming server with
--- a/mailnews/mapi/mapihook/build/msgMapi.idl
+++ b/mailnews/mapi/mapihook/build/msgMapi.idl
@@ -44,17 +44,17 @@ typedef struct
     [size_is (nRecipCount)]	lpnsMapiRecipDesc lpRecips;/* Recipient descriptors  */
     unsigned long      nFileCount;    /* # of file attachments  */
     [size_is (nFileCount)]	lpnsMapiFileDesc   lpFiles;       /* Attachment descriptors */
 } nsMapiMessage, * lpnsMapiMessage;
 
 [
     object,
     uuid(6EDCD38E-8861-11d5-A3DD-00B0D0F3BAA7),
-    helpstring("nsIMapi Inteface"),
+    helpstring("nsIMapi Interface"),
     pointer_default(unique)
 ]
 
 interface nsIMapi : IUnknown
 {
     HRESULT Login([in] unsigned long aUIArg, [in, unique] LOGIN_PW_TYPE aLogin,
                   [in, unique] LOGIN_PW_TYPE aPassWord, [in] unsigned long aFlags,
                   [out] unsigned long *aSessionId);
--- a/mailnews/mapi/mapihook/src/Registry.cpp
+++ b/mailnews/mapi/mapihook/src/Registry.cpp
@@ -86,24 +86,24 @@ LONG recursiveDeleteKey(HKEY hKeyParent,
     HKEY hKeyChild ;
     LONG lRes = RegOpenKeyEx(hKeyParent, lpszKeyChild, 0,
                              KEY_ALL_ACCESS, &hKeyChild) ;
     if (lRes != ERROR_SUCCESS)
     {
         return lRes ;
     }
 
-    // Enumerate all of the decendents of this child.
+    // Enumerate all of the descendants of this child.
     FILETIME time ;
     char szBuffer[MAX_SIZE] ;
     DWORD dwSize = MAX_SIZE ;
     while (RegEnumKeyEx(hKeyChild, 0, szBuffer, &dwSize, NULL,
                         NULL, NULL, &time) == S_OK)
     {
-        // Delete the decendents of this child.
+        // Delete the descendants of this child.
         lRes = recursiveDeleteKey(hKeyChild, szBuffer) ;
         if (lRes != ERROR_SUCCESS)
         {
             // Cleanup before exiting.
             RegCloseKey(hKeyChild) ;
             return lRes;
         }
         dwSize = MAX_SIZE;
--- a/mailnews/mapi/mapihook/src/msgMapiSupport.cpp
+++ b/mailnews/mapi/mapihook/src/msgMapiSupport.cpp
@@ -102,25 +102,25 @@ nsMapiSupport::ShutdownMAPISupport()
     ::OleUninitialize();
 
     return NS_OK ;
 }
 
 NS_IMETHODIMP
 nsMapiSupport::RegisterServer()
 {
-  // TODO: Figure out what kind of error propogation to pass back
+  // TODO: Figure out what kind of error propagation to pass back
   ::RegisterServer(CLSID_CMapiImp, "Mozilla MAPI", "MozillaMapi", "MozillaMapi.1");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMapiSupport::UnRegisterServer()
 {
-  // TODO: Figure out what kind of error propogation to pass back
+  // TODO: Figure out what kind of error propagation to pass back
   ::UnregisterServer(CLSID_CMapiImp, "MozillaMapi", "MozillaMapi.1");
   return NS_OK;
 }
 
 NS_DEFINE_NAMED_CID(NS_IMAPISUPPORT_CID);
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMapiSupport)
 
--- a/mailnews/mime/cthandlers/vcard/mimevcrd.cpp
+++ b/mailnews/mime/cthandlers/vcard/mimevcrd.cpp
@@ -172,17 +172,17 @@ MimeInlineTextVCard_parse_eof (MimeObjec
     /* This is a fine place to write any closing HTML.  In fact, you may
     want all the writing to be here, and all of the above would just
     collect data into datastructures, though that isn't very
     "streaming". */
     t = v;
     while (v && status >= 0) {
       /* write out html */
       status = WriteOutVCard (obj, v);
-      /* parse next vcard incase they're embedded */
+      /* parse next vcard in case they're embedded */
       v = vCardService->NextVObjectInList(v);
     }
 
     (void)vCardService->CleanVObject(t);
   }
 
   if (status < 0)
     return status;
--- a/mailnews/mime/jsmime/jsmime.js
+++ b/mailnews/mime/jsmime/jsmime.js
@@ -1314,23 +1314,23 @@ for (let pair of structuredHeaders.decod
 }
 
 /**
  * Use an already-registered structured decoder to parse the value of the header
  * into a structured representation.
  *
  * As this method is designed to be used for the internal MIME Parser to convert
  * the raw header values to well-structured values, value is intended to be an
- * array consisting of all occurences of the header in order. However, for ease
+ * array consisting of all occurrences of the header in order. However, for ease
  * of use by other callers, it can also be treated as a string.
  *
  * If the decoder for the header is not found, an exception will be thrown.
  *
  * A large set of headers have pre-defined structured decoders; these decoders
- * cannot be overrided with addStructuredDecoder, as doing so could prevent the
+ * cannot be overridden with addStructuredDecoder, as doing so could prevent the
  * MIME or message parsers from working properly. The pre-defined structured
  * headers break down into five clases of results, plus some ad-hoc
  * representations. They are:
  *
  * Addressing headers (results are the same as parseAddressingHeader):
  * - Approved
  * - Bcc
  * - Cc
@@ -2853,17 +2853,17 @@ HeaderEmitter.prototype.addPhrase = func
     } catch (e) {
       // If we get an error at this point, we failed to add the quoted string
       // because the string was too long. Fall through to the case where we know
       // that the input was too long to begin with.
     }
   }
 
   // If the text is too long, split the quotable string at space boundaries and
-  // add each word invidually. If we still can't add all those words, there is
+  // add each word individually. If we still can't add all those words, there is
   // nothing that we can do.
   let words = text.split(' ');
   for (let i = 0; i < words.length; i++) {
     this.addQuotable(words[i], qchars,
       i == words.length - 1 ? mayBreakAfter : true);
   }
 };
 
--- a/mailnews/mime/public/nsIMsgHeaderParser.idl
+++ b/mailnews/mime/public/nsIMsgHeaderParser.idl
@@ -128,17 +128,17 @@ interface nsIMsgHeaderParser : nsISuppor
    */
   AString makeMimeHeader([array, size_is(aLength)]
                          in msgIAddressObject aAddresses,
                          in unsigned long aLength);
 
   /**
    * Return the first address in the list in a format suitable for display.
    *
-   * This is largely a convience method for handling From headers (or similar),
+   * This is largely a convenience method for handling From headers (or similar),
    * which are expected to only have a single element in them. It is exactly
    * equivalent to saying (parseDecodedHeader(decodedHeader))[0].toString().
    *
    * @param decodedHeader   The non-RFC 2047-encoded header to parse.
    * @return                The first address, suitable for display.
    */
   AString extractFirstName(in AString aDecodedHeader);
 
--- a/mailnews/mime/src/mimehdrs.cpp
+++ b/mailnews/mime/src/mimehdrs.cpp
@@ -463,17 +463,17 @@ MimeHeaders_get (MimeHeaders *hdrs, cons
         memcpy(s, contents, end - contents);
         s[end - contents] = 0;
       }
     else
       {
         s[0] = 0;
       }
 
-    /* If we only wanted the first occurence of this header, we're done. */
+    /* If we only wanted the first occurrence of this header, we're done. */
     if (!all_p) break;
     }
   }
 
   if (result && !*result)  /* empty string */
   {
     PR_Free(result);
     return 0;
--- a/mailnews/mime/src/mimei.cpp
+++ b/mailnews/mime/src/mimei.cpp
@@ -144,30 +144,30 @@ add_content_type_attribs(const char *con
     return;
 
   PL_strncpy(ptr->content_type, content_type, sizeof(ptr->content_type));
   ptr->force_inline_display = ctHandlerInfo->force_inline_display;
   ctHandlerList->AppendElement(ptr);
 }
 
 /*
- * This routine will find all content type handler for a specifc content
+ * This routine will find all content type handler for a specific content
  * type (if it exists)
  */
 bool
 force_inline_display(const char *content_type)
 {
   bool       force_inline_disp;
 
   find_content_type_attribs(content_type, &force_inline_disp);
   return (force_inline_disp);
 }
 
 /*
- * This routine will find all content type handler for a specifc content
+ * This routine will find all content type handler for a specific content
  * type (if it exists) and is defined to the nsRegistry
  */
 MimeObjectClass *
 mime_locate_external_content_handler(const char *content_type,
                                      contentTypeHandlerInitStruct  *ctHandlerInfo)
 {
   if (!content_type || !*(content_type)) // null or empty content type
     return nullptr;
@@ -480,17 +480,17 @@ mime_find_class (const char *content_typ
       }
 #endif
 
     if (types_of_classes_to_disallow > 0
         && (!PL_strncasecmp(content_type, "text/x-vcard", 12))
        )
       /* Use a little hack to prevent some dangerous plugins, which ship
          with Mozilla, to run.
-         For the truely user-installed plugins, we rely on the judgement
+         For the truly user-installed plugins, we rely on the judgement
          of the user. */
     {
       if (!exact_match_p)
         clazz = (MimeObjectClass *)&mimeExternalObjectClass; // As attachment
     }
     else
       clazz = (MimeObjectClass *)tempClass;
   }
@@ -853,17 +853,17 @@ mime_create (const char *content_type, M
     {
       override_content_type = opts->file_type_fn (name, opts->stream_closure);
       // appledouble isn't a valid override content type, and makes
       // attachments invisible.
       if (!PL_strcasecmp(override_content_type, MULTIPART_APPLEDOUBLE))
         override_content_type = nullptr;
       PR_FREEIF(name);
 
-      // Workaroung for saving '.eml" file encoded with base64.
+      // Workaround for saving '.eml" file encoded with base64.
       // Do not override with message/rfc822 whenever Transfer-Encoding is
       // base64 since base64 encoding of message/rfc822 is invalid.
       // Our MimeMessageClass has no capability to decode it.
       if (!PL_strcasecmp(override_content_type, MESSAGE_RFC822)) {
         nsCString encoding;
         encoding.Adopt(MimeHeaders_get(hdrs,
                                        HEADER_CONTENT_TRANSFER_ENCODING,
                                        true, false));
@@ -1747,17 +1747,17 @@ MimeOptions_write(MimeHeaders *hdrs, Mim
 }
 
 int
 MimeObject_write(MimeObject *obj, const char *output, int32_t length,
          bool user_visible_p)
 {
   if (!obj->output_p) return 0;
 
-  // if we're stripping attachments, check if any parent is not being ouput
+  // if we're stripping attachments, check if any parent is not being output
   if (obj->options->format_out == nsMimeOutput::nsMimeMessageAttach)
   {
     // if true, mime generates a separator in html - we don't want that.
     user_visible_p = false;
 
     for (MimeObject *parent = obj->parent; parent; parent = parent->parent)
     {
       if (!parent->output_p)
--- a/mailnews/mime/src/mimei.h
+++ b/mailnews/mime/src/mimei.h
@@ -133,17 +133,17 @@
   First we pull in the appropriate include file (which includes all necessary
   include files for the parent classes) and then we define the class object
   using the MimeDefClass macro:
 
       #include "foobar.h"
       #define MIME_SUPERCLASS parentlClass
       MimeDefClass(Foobar, FoobarClass, foobarClass, &MIME_SUPERCLASS);
 
-  The definition of MIME_SUPERCLASS is just to move most of the knowlege of the
+  The definition of MIME_SUPERCLASS is just to move most of the knowledge of the
   exact class hierarchy up to the file's header, instead of it being scattered
   through the various methods; see below.
 
   METHOD DECLARATIONS:
   We will be putting function pointers into the class object, so we declare
   them here.  They can generally all be static, since nobody outside of this
   file needs to reference them by name; all references to these routines should
   be through the class object.
--- a/mailnews/mime/src/mimemalt.cpp
+++ b/mailnews/mime/src/mimemalt.cpp
@@ -37,17 +37,17 @@
   problem is what prompted a rewrite of this file into its current
   architecture.
 
   ARCHITECTURE
   ------------
 
   Parts are read and queued until we know whether we're going to display
   them. If the first pending part is one we don't know how to display, then we
-  can add it to the MIME structure immediatelly, with output_p disabled. If the
+  can add it to the MIME structure immediately, with output_p disabled. If the
   first pending part is one we know how to display, then we can't add it to the
   in-memory MIME structure until either (a) we encounter a later, more
   preferred part we know how to display, or (b) we reach the end of the
   parts. A display-capable part of the queue may be followed by one or more
   display-incapable parts. We can't add them to the in-memory structure until
   we figure out what to do with the first, display-capable pending part,
   because otherwise the order and numbering will be wrong. All of the logic in
   this paragraph is implemented in the flush_children function.
@@ -71,22 +71,22 @@
   multipart/alternative and if so not notify emitters there because
   MimeMultipartAlternative_create_child handles it.
 
   - Jonathan Kamens, 2010-07-23
 
   When the option prefer_plaintext is on, the last text/plain part
   should be preferred over any other part that can be displayed. But
   if no text/plain part is found, then the algorithm should go as
-  normal and convert any html part found to text. To achive this I
+  normal and convert any html part found to text. To achieve this I
   found that the simplest way was to change the function display_part_p
   into returning priority as an integer instead of boolean can/can't
   display. Then I also changed the function flush_children so it selects
   the last part with the highest priority. (Priority 0 means it cannot
-  be displayed and the part is never choosen.)
+  be displayed and the part is never chosen.)
 
   - Terje Bråten, 2013-02-16
 */
 
 #include "mimemalt.h"
 #include "prmem.h"
 #include "plstr.h"
 #include "prlog.h"
--- a/mailnews/mime/src/mimemoz2.cpp
+++ b/mailnews/mime/src/mimemoz2.cpp
@@ -97,17 +97,17 @@ nsresult
 ProcessBodyAsAttachment(MimeObject *obj, nsMsgAttachmentData **data)
 {
   nsMsgAttachmentData   *tmp;
   char                  *disp = nullptr;
   char                  *charset = nullptr;
 
   // Ok, this is the special case when somebody sends an "attachment" as the
   // body of an RFC822 message...I really don't think this is the way this
-  // should be done.  I belive this should really be a multipart/mixed message
+  // should be done.  I believe this should really be a multipart/mixed message
   // with an empty body part, but what can ya do...our friends to the North seem
   // to do this.
   MimeObject    *child = obj;
 
   *data = new nsMsgAttachmentData[2];
   if (!*data)
     return NS_ERROR_OUT_OF_MEMORY;
 
@@ -1248,17 +1248,17 @@ bool MimeObjectIsMessageBody(MimeObject 
     root = root->parent;
   return MimeObjectIsMessageBodyNoClimb(root, looking_for, &stop);
 }
 
 //
 // New Stream Converter Interface
 //
 
-// Get the connnection to prefs service manager
+// Get the connection to prefs service manager
 nsIPrefBranch *
 GetPrefBranch(MimeDisplayOptions *opt)
 {
   if (!opt)
     return nullptr;
 
   return opt->m_prefBranch;
 }
@@ -2049,34 +2049,34 @@ nsresult GetMailNewsFont(MimeObject *obj
     *fontSizePercentage = originalSize ?
                           (int32_t)((float)*fontPixelSize / (float)originalSize * 100) : 0;
 
   }
 
   return NS_OK;
 }
 
-/* This function syncronously converts an HTML document (as string)
+/* This function synchronously converts an HTML document (as string)
    to plaintext (as string) using the Gecko converter.
 
    flags: see nsIDocumentEncoder.h
 */
 nsresult
 HTML2Plaintext(const nsString& inString, nsString& outString,
                uint32_t flags, uint32_t wrapCol)
 {
   nsCOMPtr<nsIParserUtils> utils =
     do_GetService(NS_PARSERUTILS_CONTRACTID);
   return utils->ConvertToPlainText(inString, flags, wrapCol, outString);
 }
 // </copy>
 
 
 
-/* This function syncronously sanitizes an HTML document (string->string)
+/* This function synchronously sanitizes an HTML document (string->string)
    using the Gecko nsTreeSanitizer.
 */
 // copied from HTML2Plaintext above
 nsresult
 HTMLSanitize(const nsString& inString, nsString& outString)
 {
   // If you want to add alternative sanitization, you can insert a conditional
   // call to another sanitizer and an early return here.
--- a/mailnews/mime/src/mimemoz2.h
+++ b/mailnews/mime/src/mimemoz2.h
@@ -160,17 +160,17 @@ extern "C" nsresult     mimeEmitterStart
 extern "C" nsresult     mimeEmitterEndBody(MimeDisplayOptions *opt);
 extern "C" nsresult     mimeEmitterEndHeader(MimeDisplayOptions *opt, MimeObject *obj);
 extern "C" nsresult     mimeEmitterStartHeader(MimeDisplayOptions *opt, bool rootMailHeader, bool headerOnly, const char *msgID,
                                                const char *outCharset);
 extern "C" nsresult     mimeEmitterUpdateCharacterSet(MimeDisplayOptions *opt, const char *aCharset);
 
 extern "C" nsresult     MimeGetAttachmentList(MimeObject *tobj, const char *aMessageURL, nsMsgAttachmentData **data);
 
-/* To Get the connnection to prefs service manager */
+/* To Get the connection to prefs service manager */
 extern "C" nsIPrefBranch      *GetPrefBranch(MimeDisplayOptions *opt);
 
 // Get the text converter...
 mozITXTToHTMLConv           *GetTextConverter(MimeDisplayOptions *opt);
 
 nsresult
 HTML2Plaintext(const nsString& inString, nsString& outString,
                uint32_t flags, uint32_t wrapCol);
--- a/mailnews/mime/src/mimemrel.cpp
+++ b/mailnews/mime/src/mimemrel.cpp
@@ -486,17 +486,17 @@ MimeMultipartRelated_output_child_p(Mime
             char * imappart = mime_imap_part_address(child);
             if (imappart)
               imappartnum.Adopt(imappart);
           }
 
           /*
             AppleDouble part need special care: we need to output only the data fork part of it.
             The problem at this point is that we haven't yet decoded the children of the AppleDouble
-            part therfore we will have to hope the datafork is the second one!
+            part therefore we will have to hope the datafork is the second one!
           */
           if (mime_typep(child, (MimeObjectClass *) &mimeMultipartAppleDoubleClass))
             partnum.AppendLiteral(".2");
 
           char* part;
           if (!imappartnum.IsEmpty())
             part = mime_set_url_imap_part(obj->options->url, imappartnum.get(), partnum.get());
           else
@@ -566,17 +566,17 @@ MimeMultipartRelated_output_child_p(Mime
                   else
                     PR_smprintf_free(tloc);
                 }
               }
             }
             /*  rhp - End of putting more stuff into the hash table */
 
               /* it's possible that temp pointer is the same than the part pointer,
-                 therefore be carefull to not freeing twice the same pointer */
+                 therefore be careful to not freeing twice the same pointer */
               if (temp && temp != part)
                 PR_Free(temp);
               PR_Free(part);
             }
           }
         }
       }
   } else {
--- a/mailnews/mime/src/mimemsg.cpp
+++ b/mailnews/mime/src/mimemsg.cpp
@@ -399,17 +399,17 @@ MimeMessage_close_headers (MimeObject *o
       if (mv && !ct)
         ct = strdup(TEXT_PLAIN);
       }
 
     PR_FREEIF(mv);  /* done with this now. */
     }
 
     /* If this message has a body which is encrypted and we're going to
-       decrypt it (whithout converting it to HTML, since decrypt_p and
+       decrypt it (without converting it to HTML, since decrypt_p and
        write_html_p are never true at the same time)
     */
     if (obj->output_p &&
         obj->options &&
         obj->options->decrypt_p
 #ifdef ENABLE_SMIME
         && !mime_crypto_object_p (msg->hdrs, false)
 #endif /* ENABLE_SMIME */
--- a/mailnews/mime/src/mimemsig.cpp
+++ b/mailnews/mime/src/mimemsig.cpp
@@ -175,17 +175,17 @@ MimeMultipartSigned_parse_line (const ch
     {
     case MimeMultipartPreamble:
       PR_ASSERT(0);  /* can't move *in* to preamble state. */
       sig->state = MimeMultipartSignedPreamble;
       break;
 
     case MimeMultipartHeaders:
       /* If we're moving in to the Headers state, then that means
-       that this line is the preceeding boundary string (and we
+       that this line is the preceding boundary string (and we
        should ignore it.)
        */
       hash_line_p = false;
 
       if (sig->state == MimeMultipartSignedPreamble)
       sig->state = MimeMultipartSignedBodyFirstHeader;
       else if (sig->state == MimeMultipartSignedBodyFirstLine ||
            sig->state == MimeMultipartSignedBodyLine)
@@ -289,34 +289,34 @@ MimeMultipartSigned_parse_line (const ch
       sig->state = MimeMultipartSignedBodyHeaders;
 
       /* The newline issues here are tricky, since both the newlines
        before and after the boundary string are to be considered part
        of the boundary: this is so that a part can be specified such
        that it does not end in a trailing newline.
 
        To implement this, we send a newline *before* each line instead
-       of after, except for the first line, which is not preceeded by a
+       of after, except for the first line, which is not preceded by a
        newline.
 
        For purposes of cryptographic hashing, we always hash line
        breaks as CRLF -- the canonical, on-the-wire linebreaks, since
        we have no idea of knowing what line breaks were used on the
        originating system (SMTP rightly destroys that information.)
        */
 
       /* Remove the trailing newline... */
       if (length > 0 && line[length-1] == '\n') length--;
       if (length > 0 && line[length-1] == '\r') length--;
 
       PR_ASSERT(sig->crypto_closure);
 
       if (!first_line_p)
       {
-        /* Push out a preceeding newline... */
+        /* Push out a preceding newline... */
         char nl[] = CRLF;
         status = (((MimeMultipartSignedClass *) obj->clazz)
             ->crypto_data_hash (nl, 2, sig->crypto_closure));
         if (status < 0) return status;
       }
 
       /* Now push out the line sans trailing newline. */
       if (length > 0)
@@ -513,31 +513,31 @@ MimeMultipartSigned_parse_child_line (Mi
      */
 
     /* The newline issues here are tricky, since both the newlines
        before and after the boundary string are to be considered part
        of the boundary: this is so that a part can be specified such
        that it does not end in a trailing newline.
 
        To implement this, we send a newline *before* each line instead
-       of after, except for the first line, which is not preceeded by a
+       of after, except for the first line, which is not preceded by a
        newline.
      */
 
     /* Remove the trailing newline... */
     if (length > 0 && line[length-1] == '\n') length--;
     if (length > 0 && line[length-1] == '\r') length--;
 
     PR_ASSERT(sig->part_buffer);
     PR_ASSERT(first_line_p ==
           (sig->state == MimeMultipartSignedBodyFirstLine));
 
     if (!first_line_p)
       {
-      /* Push out a preceeding newline... */
+      /* Push out a preceding newline... */
       char nl[] = MSG_LINEBREAK;
       status = MimePartBufferWrite (sig->part_buffer, nl, MSG_LINEBREAK_LEN);
       if (status < 0) return status;
       }
 
     /* Now push out the line sans trailing newline. */
     if (length > 0)
       status = MimePartBufferWrite (sig->part_buffer, line, length);
--- a/mailnews/mime/src/mimemult.cpp
+++ b/mailnews/mime/src/mimemult.cpp
@@ -633,27 +633,27 @@ MimeMultipart_parse_child_line (MimeObje
 #endif /* MIME_DRAFTS */
 
   /* The newline issues here are tricky, since both the newlines before
    and after the boundary string are to be considered part of the
    boundary: this is so that a part can be specified such that it
    does not end in a trailing newline.
 
    To implement this, we send a newline *before* each line instead
-   of after, except for the first line, which is not preceeded by a
+   of after, except for the first line, which is not preceded by a
    newline.
    */
 
   /* Remove the trailing newline... */
   if (length > 0 && line[length-1] == '\n') length--;
   if (length > 0 && line[length-1] == '\r') length--;
 
   if (!first_line_p)
   {
-    /* Push out a preceeding newline... */
+    /* Push out a preceding newline... */
     char nl[] = MSG_LINEBREAK;
     status = kid->clazz->parse_buffer (nl, MSG_LINEBREAK_LEN, kid);
     if (status < 0) return status;
   }
 
   /* Now push out the line sans trailing newline. */
   return kid->clazz->parse_buffer (line, length, kid);
 }
--- a/mailnews/mime/src/mimeobj.h
+++ b/mailnews/mime/src/mimeobj.h
@@ -86,17 +86,17 @@
 
      This method should return true if this class of object will be displayed
      directly, as opposed to being displayed as a link.  This information is
      used by the "multipart/alternative" parser to decide which of its children
      is the ``best'' one to display.   Note that this is a class method, not
      an object method -- there is not yet an instance of this class at the time
      that it is called.  The `hdrs' provided are the headers of the object that
    might be instantiated -- from this, the method may extract additional
-   infomation that it might need to make its decision.
+   information that it might need to make its decision.
  */
 
 
 /* this one is typdedef'ed in mimei.h, since it is the base-class. */
 struct MimeObjectClass {
 
   /* Note: the order of these first five slots is known by MimeDefClass().
    Technically, these are part of the object system, not the MIME code.
--- a/mailnews/mime/src/mimethpl.cpp
+++ b/mailnews/mime/src/mimethpl.cpp
@@ -142,21 +142,21 @@ MimeInlineTextHTMLAsPlaintext_parse_line
   {
 #if DEBUG
 printf("Can't output: %s\n", line);
 #endif
     return -1;
   }
 
   /*
-    To convert HTML->TXT syncronously, I need the full source at once,
+    To convert HTML->TXT synchronously, I need the full source at once,
     not line by line (how do you convert "<li>foo\n" to plaintext?).
     parse_decoded_buffer claims to give me that, but in fact also gives
     me single lines.
-    It might be theoretically possible to drive this asyncronously, but
+    It might be theoretically possible to drive this asynchronously, but
     I don't know, which odd circumstances might arise and how libmime
     will behave then. It's not worth the trouble for me to figure this all out.
    */
   nsCString linestr(line, length);
   NS_ConvertUTF8toUTF16 line_ucs2(linestr.get());
   if (length && line_ucs2.IsEmpty())
     CopyASCIItoUTF16 (linestr, line_ucs2);
   (textHTMLPlain->complete_buffer)->Append(line_ucs2);
--- a/mailnews/mime/src/mimetric.cpp
+++ b/mailnews/mime/src/mimetric.cpp
@@ -35,17 +35,17 @@ MimeInlineTextRichtextClassInitialize(Mi
 int
 MimeRichtextConvert (const char *line, int32_t length,
            MimeObject *obj,
            char **obufferP,
            int32_t *obuffer_sizeP,
            bool enriched_p)
 {
   /* RFC 1341 (the original MIME spec) defined text/richtext.
-   RFC 1563 superceded text/richtext with text/enriched.
+   RFC 1563 superseded text/richtext with text/enriched.
    The changes from text/richtext to text/enriched are:
     - CRLF semantics are different
     - << maps to <
     - These tags were added:
        <VERBATIM>, <NOFILL>, <PARAM>, <FLUSHBOTH>
     - These tags were removed:
        <COMMENT>, <OUTDENT>, <OUTDENTRIGHT>, <SAMEPAGE>, <SUBSCRIPT>,
          <SUPERSCRIPT>, <HEADING>, <FOOTING>, <PARAGRAPH>, <SIGNATURE>,
@@ -120,17 +120,17 @@ MimeRichtextConvert (const char *line, i
          !IS_SPACE(*this_end) &&
          *this_end != '<' && *this_end != '>' &&
          *this_end != '&')
       this_end++;
     }
 
     this_end++;
 
-    /* Push out the text preceeding the tag. */
+    /* Push out the text preceding the tag. */
     if (last_end && last_end != this_start)
     {
       memcpy (out, last_end, this_start - last_end);
       out += this_start - last_end;
       *out = 0;
       outlen -= (this_start - last_end);
     }
 
--- a/mailnews/mime/src/nsStreamConverter.cpp
+++ b/mailnews/mime/src/nsStreamConverter.cpp
@@ -846,17 +846,17 @@ nsStreamConverter::GetOrigMsgHdr(nsIMsgD
   return NS_OK;
 }
 
 /////////////////////////////////////////////////////////////////////////////
 // Methods for nsIStreamListener...
 /////////////////////////////////////////////////////////////////////////////
 //
 // Notify the client that data is available in the input stream.  This
-// method is called whenver data is written into the input stream by the
+// method is called whenever data is written into the input stream by the
 // networking library...
 //
 nsresult
 nsStreamConverter::OnDataAvailable(nsIRequest     *request,
                                    nsISupports    *ctxt,
                                    nsIInputStream *aIStream,
                                    uint64_t       sourceOffset,
                                    uint32_t       aLength)
@@ -1093,17 +1093,17 @@ nsresult nsStreamConverter::Close()
   mOutgoingChannel = nullptr;
   mEmitter = nullptr;
   mOutListener = nullptr;
   return NS_OK;
 }
 
 // nsIStreamConverter implementation
 
-// No syncronous conversion at this time.
+// No synchronous conversion at this time.
 NS_IMETHODIMP nsStreamConverter::Convert(nsIInputStream  *aFromStream,
                                          const char *aFromType,
                                          const char *aToType,
                                          nsISupports     *aCtxt,
                                          nsIInputStream **_retval)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
--- a/mailnews/news/public/nsINNTPNewsgroupList.idl
+++ b/mailnews/news/public/nsINNTPNewsgroupList.idl
@@ -35,33 +35,33 @@ interface nsINNTPNewsgroupList : nsISupp
    * @param last_message   The last message of the download range.
    */
   void initXOVER(in long first_message, in long last_message);
   void processXOVERLINE(in string line, out unsigned long status);
   void resetXOVER();
   void finishXOVERLINE(in long status, out long newstatus);
 
   /**
-   * Initalizes the state in preparation for a call to XHDR.
+   * Initializes the state in preparation for a call to XHDR.
    *
    * @return               The next header to get, or an empty string if done.
    */
   ACString initXHDR();
   /**
    * Processes a line of the server's response to XHDR.
    *
    * It will calculate the message number and other information itself, so the
    * unadulterated line itself should be sent.
    *
    * @param aLine          The line as sent from the server.
    */
   void processXHDRLine(in ACString aLine);
 
   /**
-   * Initalizes the internal state to process a HEAD command.
+   * Initializes the internal state to process a HEAD command.
    *
    * This method should be called before sending the line
    * <tt>HEAD @arg aMessage</tt> to the server.
    *
    * @param aMessage       The message number that will be sent.
    */
   void initHEAD(in long aMessage);
   /**
--- a/mailnews/news/public/nsINNTPNewsgroupPost.idl
+++ b/mailnews/news/public/nsINNTPNewsgroupPost.idl
@@ -23,17 +23,17 @@ interface nsINNTPNewsgroupPost : nsISupp
     attribute string date;
 
     void AddNewsgroup(in string newsgroupName);
     readonly attribute string newsgroups;
 
     attribute string subject;
     attribute string path;
 
-    /* Secion 2.2 - optional headers */
+    /* Section 2.2 - optional headers */
     attribute string replyTo;
     attribute string sender;
     attribute string followupTo;
     attribute string dateReceived;
     attribute string expires;
 
     readonly attribute string references;
 
--- a/mailnews/news/src/nsNNTPProtocol.h
+++ b/mailnews/news/src/nsNNTPProtocol.h
@@ -36,17 +36,17 @@
 // commands, etc. I do not intend it to refer to protocol state)
 
 #define NNTP_PAUSE_FOR_READ      0x00000001  /* should we pause for the next read */
 #define NNTP_PROXY_AUTH_REQUIRED    0x00000002  /* is auth required */
 #define NNTP_SENT_PROXY_AUTH        0x00000004  /* have we sent a proxy auth? */
 #define NNTP_READER_PERFORMED       0x00000010  /* have we sent any cmds to the server yet? */
 #define NNTP_USE_FANCY_NEWSGROUP    0x00000020  /* use LIST XACTIVE or LIST */
 #define NNTP_DESTROY_PROGRESS_GRAPH 0x00000040  /* do we need to destroy graph progress */
-#define NNTP_SOME_PROTOCOL_SUCCEEDED 0x0000080  /* some protocol has suceeded so don't kill the connection */
+#define NNTP_SOME_PROTOCOL_SUCCEEDED 0x0000080  /* some protocol has succeeded so don't kill the connection */
 #define NNTP_NO_XOVER_SUPPORT       0x00000100  /* xover command is not supported here */
 
 /* states of the machine
  */
 typedef enum _StatesEnum {
 NNTP_RESPONSE,
 #ifdef BLOCK_UNTIL_AVAILABLE_CONNECTION
 NNTP_BLOCK_UNTIL_CONNECTIONS_ARE_AVAILABLE,
@@ -166,17 +166,17 @@ private:
    *
    * This method additionally handles some states not covered by other methods:
    * NEWS_DONE: Alias for NEWS_FREE
    * NEWS_POST_DONE: Alias for NEWS_FREE that cleans up the URL state
    * NEWS_ERROR: An error which permits further use of the connection
    * NNTP_ERROR: An error which does not permit further use of the connection
    * NEWS_FREE: Cleans up from the current URL and prepares for the next one
    * NNTP_SUSPENDED: A state where the state machine does not read input until
-   *                 reenabled by a non-network related callback
+   *                 re-enabled by a non-network related callback
    *
    * @note Use of NNTP_SUSPENDED is dangerous: if input comes along the socket,
    * the code will not read the input stream at all. Therefore, it is strongly
    * advised to suspend the request before using this state.
    */
   virtual nsresult ProcessProtocolState(nsIURI * url, nsIInputStream * inputStream,
                                         uint64_t sourceOffset, uint32_t length) override;
   virtual nsresult CloseSocket() override;
--- a/mailnews/news/src/nsNewsFolder.cpp
+++ b/mailnews/news/src/nsNewsFolder.cpp
@@ -989,17 +989,17 @@ nsMsgNewsFolder::HandleNewsrcLine(const 
     return RememberLine(nsDependentCString(line));
 
   bool subscribed = (*s == ':');
   setStr = s+1;
 
   if (*line == '\0')
     return 0;
 
-  // previous versions of Communicator poluted the
+  // previous versions of Communicator polluted the
   // newsrc files with articles
   // (this would happen when you clicked on a link like
   // news://news.mozilla.org/3746EF3F.6080309@netscape.com)
   //
   // legal newsgroup names can't contain @ or %
   //
   // News group names are structured into parts separated by dots,
   // for example "netscape.public.mozilla.mail-news".
--- a/mailnews/news/src/nsNntpService.h
+++ b/mailnews/news/src/nsNntpService.h
@@ -52,23 +52,23 @@ protected:
 
   nsresult GetNntpServerByAccount(const char *aAccountKey, nsIMsgIncomingServer **aNntpServer);
   nsresult SetUpNntpUrlForPosting(const char *aAccountKey, char **newsUrlSpec);
   nsresult FindHostFromGroup(nsCString &host, nsCString &groupName);
   nsresult FindServerWithNewsgroup(nsCString &host, nsCString &groupName);
 
   nsresult CreateMessageIDURL(nsIMsgFolder *folder, nsMsgKey key, char **url);
   nsresult GetMessageFromUrl(nsIURI *aUrl, nsIMsgWindow *aMsgWindow, nsISupports *aDisplayConsumer);
-  // a convience routine used to put together news urls
+  // a convenience routine used to put together news urls
   nsresult ConstructNntpUrl(const char * urlString, nsIUrlListener *aUrlListener,  nsIMsgWindow * aMsgWindow, const char *originalMessageUri, int32_t action, nsIURI ** aUrl);
   nsresult CreateNewsAccount(const char *aHostname, bool aIsSecure, int32_t aPort, nsIMsgIncomingServer **aServer);
   nsresult GetServerForUri(nsIURI *aUri, nsINntpIncomingServer **aProtocol);
-  // a convience routine to run news urls
+  // a convenience routine to run news urls
   nsresult RunNewsUrl (nsIURI * aUrl, nsIMsgWindow *aMsgWindow, nsISupports * aConsumer);
-  // a convience routine to go from folder uri to msg folder
+  // a convenience routine to go from folder uri to msg folder
   nsresult GetFolderFromUri(const char *uri, nsIMsgFolder **folder);
   nsresult DecomposeNewsMessageURI(const char * aMessageURI, nsIMsgFolder ** aFolder, nsMsgKey *aMsgKey);
 
   bool              mPrintingOperation; // Flag for printing operations
   bool        mOpenAttachmentOperation; // Flag for opening attachments
 
   nsCOMPtr<nsICacheStorage> mCacheStorage; // the cache storage used by news
 };
--- a/mailnews/test/fakeserver/nntpd.js
+++ b/mailnews/test/fakeserver/nntpd.js
@@ -546,17 +546,17 @@ subclass(NNTP_RFC4643_extension, NNTP_RF
       if (this.requireBoth)
         return "381 Password required";
 
       this.authenticated = this.lastGroupTried ? this.lastGroupTried : true;
       return "281 Authentication Accepted";
     }
     else if (action == "pass") {
       if (!this.requireBoth || !this.usernameReceived)
-        return "482 Authetication commands issued out of sequence";
+        return "482 Authentication commands issued out of sequence";
 
       this.usernameReceived = false;
 
       var expectPassword = this.lastGroupTried
         ? this._daemon.groupCredentials[this.lastGroupTried][1]
         : this.expectedPassword;
       if (param != expectPassword)
         return "481 Authentication failed";
--- a/mailnews/test/resources/logHelper.js
+++ b/mailnews/test/resources/logHelper.js
@@ -250,17 +250,17 @@ function mark_sub_test_start(aName, aPar
 function mark_sub_test_end() {
   if (_testLoggerContexts.length <= 1)
     return;
   mark_test_end(_testLoggerContexts.length - 1);
 }
 
 /**
  * Express that all tests were run to completion.  This helps the listener
- *  distinguish between succesful termination and abort-style termination where
+ *  distinguish between successful termination and abort-style termination where
  *  the process just keeled over and on one told us.
  *
  * This also tells us to clean up.
  */
 function mark_all_tests_run() {
   // make sure all tests get closed out
   mark_test_end();
 
--- a/mailnews/test/resources/mailTestUtils.js
+++ b/mailnews/test/resources/mailTestUtils.js
@@ -222,17 +222,17 @@ var mailTestUtils = {
    *
    * @param aFile The file to mark as sparse.
    * @param aRegionStart The start position of the sparse region, in bytes.
    * @param aRegionBytes The number of bytes to mark as sparse.
    * @return Whether the OS and file system supports marking files as sparse. If
    *          this is true, then the file has been marked as sparse. If this is
    *          false, then the underlying system doesn't support marking files as
    *          sparse. If an exception is thrown, then the system does support
-   *          marking files as sparse, but an error occured while doing so.
+   *          marking files as sparse, but an error occurred while doing so.
    *
    */
   mark_file_region_sparse: function(aFile, aRegionStart, aRegionBytes) {
     let fileSystem = this.get_file_system(aFile);
     dump("[mark_file_region_sparse()] File system = " + (fileSystem || "(unknown)") +
            ", file region = at " + this.toMiBString(aRegionStart) +
            " for " + this.toMiBString(aRegionBytes) + "\n");