Bug 1292042 - Enable the keyword-spacing rule for eslint. Most of this patch was autogenerated by 'eslint --fix'. Files with .xml extension needed to be changed by hand due to limitations of custom plugin. r=markh
authorJared Wein <jwein@mozilla.com>
Thu, 04 Aug 2016 03:28:58 -0400
changeset 308264 ab1d29e62ee411f1f1d344616dc5ea98bab33f76
parent 308263 fd861f275e0943bede7e4c1e16bdce56b45ca28c
child 308265 30f222a7ff2b552995c6e66be347ded5e6770368
push id80307
push usercbook@mozilla.com
push dateFri, 05 Aug 2016 10:05:01 +0000
treeherdermozilla-inbound@f63b7c68ac82 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh
bugs1292042
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1292042 - Enable the keyword-spacing rule for eslint. Most of this patch was autogenerated by 'eslint --fix'. Files with .xml extension needed to be changed by hand due to limitations of custom plugin. r=markh MozReview-Commit-ID: EMjJ3yWt9Wt
browser/base/content/aboutTabCrashed.js
browser/base/content/abouthome/aboutHome.js
browser/base/content/browser-addons.js
browser/base/content/browser-customization.js
browser/base/content/browser-feeds.js
browser/base/content/browser-gestureSupport.js
browser/base/content/browser-places.js
browser/base/content/browser.js
browser/base/content/content.js
browser/base/content/pageinfo/pageInfo.js
browser/base/content/pageinfo/security.js
browser/base/content/socialmarks.xml
browser/base/content/sync/setup.js
browser/base/content/tab-content.js
browser/base/content/tabbrowser.xml
browser/base/content/urlbarBindings.xml
browser/base/content/utilityOverlay.js
browser/components/contextualidentity/test/browser/browser_blobUrl.js
browser/components/customizableui/CustomizableUI.jsm
browser/components/customizableui/CustomizeMode.jsm
browser/components/customizableui/ScrollbarSampler.jsm
browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js
browser/components/customizableui/test/browser_947914_button_newWindow.js
browser/components/customizableui/test/browser_967000_button_feeds.js
browser/components/customizableui/test/browser_967000_button_sync.js
browser/components/customizableui/test/browser_973641_button_addon.js
browser/components/distribution.js
browser/components/migration/360seProfileMigrator.js
browser/components/migration/ChromeProfileMigrator.js
browser/components/migration/MigrationUtils.jsm
browser/components/migration/SafariProfileMigrator.js
browser/components/migration/content/migration.js
browser/components/nsBrowserContentHandler.js
browser/components/nsBrowserGlue.js
browser/components/places/PlacesUIUtils.jsm
browser/components/places/content/controller.js
browser/components/places/content/editBookmarkOverlay.js
browser/components/places/content/places.js
browser/components/places/content/tree.xml
browser/components/places/content/treeView.js
browser/components/places/tests/browser/browser_library_middleclick.js
browser/components/places/tests/unit/head_bookmarks.js
browser/components/places/tests/unit/test_PUIU_makeTransaction.js
browser/components/syncedtabs/SyncedTabsListStore.js
browser/components/uitour/UITour.jsm
browser/experiments/Experiments.jsm
browser/extensions/pocket/content/main.js
browser/extensions/pocket/content/panels/js/saved.js
browser/extensions/pocket/content/panels/js/signup.js
browser/extensions/pocket/content/pktApi.jsm
browser/modules/BrowserUITelemetry.jsm
browser/modules/BrowserUsageTelemetry.jsm
browser/modules/CaptivePortalWatcher.jsm
browser/modules/ContentCrashHandlers.jsm
browser/modules/ContentLinkHandler.jsm
browser/modules/ContentObservers.jsm
browser/modules/ContentWebRTC.jsm
browser/modules/DirectoryLinksProvider.jsm
browser/modules/Feeds.jsm
browser/modules/Social.jsm
browser/modules/offlineAppCache.jsm
toolkit/.eslintrc
toolkit/components/aboutmemory/content/aboutMemory.js
toolkit/components/aboutperformance/tests/browser/browser_aboutperformance.js
toolkit/components/addoncompat/RemoteAddonsChild.jsm
toolkit/components/addoncompat/tests/addon/bootstrap.js
toolkit/components/captivedetect/captivedetect.js
toolkit/components/commandlines/test/unit/test_bug666224.js
toolkit/components/contentprefs/nsContentPrefService.js
toolkit/components/contentprefs/tests/unit/head_contentPrefs.js
toolkit/components/contextualidentity/ContextualIdentityService.jsm
toolkit/components/cookie/content/cookieAcceptDialog.js
toolkit/components/crashes/CrashManager.jsm
toolkit/components/ctypes/tests/unit/head.js
toolkit/components/ctypes/tests/unit/test_finalizer_shouldaccept.js
toolkit/components/ctypes/tests/unit/test_finalizer_shouldfail.js
toolkit/components/ctypes/tests/unit/test_jsctypes.js
toolkit/components/exthelper/extApplication.js
toolkit/components/feeds/FeedProcessor.js
toolkit/components/feeds/test/head.js
toolkit/components/feeds/test/test_xml.js
toolkit/components/filepicker/content/filepicker.js
toolkit/components/filepicker/nsFilePicker.js
toolkit/components/jsdownloads/src/DownloadCore.jsm
toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js
toolkit/components/microformats/microformat-shiv.js
toolkit/components/microformats/update/update.js
toolkit/components/passwordmgr/LoginHelper.jsm
toolkit/components/passwordmgr/nsLoginManagerPrompter.js
toolkit/components/passwordmgr/storage-mozStorage.js
toolkit/components/passwordmgr/test/notification_common.js
toolkit/components/passwordmgr/test/test_master_password.html
toolkit/components/passwordmgr/test/test_xhr.html
toolkit/components/passwordmgr/test/test_xml_load.html
toolkit/components/passwordmgr/test/unit/test_OSCrypto_win.js
toolkit/components/places/BookmarkHTMLUtils.jsm
toolkit/components/places/BookmarkJSONUtils.jsm
toolkit/components/places/Bookmarks.jsm
toolkit/components/places/PlacesBackups.jsm
toolkit/components/places/PlacesDBUtils.jsm
toolkit/components/places/PlacesRemoteTabsAutocompleteProvider.jsm
toolkit/components/places/PlacesTransactions.jsm
toolkit/components/places/PlacesUtils.jsm
toolkit/components/places/nsLivemarkService.js
toolkit/components/places/nsPlacesExpiration.js
toolkit/components/places/tests/bookmarks/test_388695.js
toolkit/components/places/tests/bookmarks/test_395101.js
toolkit/components/places/tests/bookmarks/test_448584.js
toolkit/components/places/tests/bookmarks/test_458683.js
toolkit/components/places/tests/bookmarks/test_bookmarks.js
toolkit/components/places/tests/bookmarks/test_keywords.js
toolkit/components/places/tests/bookmarks/test_savedsearches.js
toolkit/components/places/tests/browser/browser_favicon_setAndFetchFaviconForPage_failures.js
toolkit/components/places/tests/browser/head.js
toolkit/components/places/tests/expiration/head_expiration.js
toolkit/components/places/tests/head_common.js
toolkit/components/places/tests/network/test_history_redirects.js
toolkit/components/places/tests/queries/test_415716.js
toolkit/components/places/tests/queries/test_containersQueries_sorting.js
toolkit/components/places/tests/queries/test_queryMultipleFolder.js
toolkit/components/places/tests/queries/test_results-as-visit.js
toolkit/components/places/tests/queries/test_searchterms-domain.js
toolkit/components/places/tests/queries/test_searchterms-uri.js
toolkit/components/places/tests/unit/test_000_frecency.js
toolkit/components/places/tests/unit/test_331487.js
toolkit/components/places/tests/unit/test_402799.js
toolkit/components/places/tests/unit/test_408221.js
toolkit/components/places/tests/unit/test_415757.js
toolkit/components/places/tests/unit/test_418643_removeFolderChildren.js
toolkit/components/places/tests/unit/test_433317_query_title_update.js
toolkit/components/places/tests/unit/test_433525_hasChildren_crash.js
toolkit/components/places/tests/unit/test_annotations.js
toolkit/components/places/tests/unit/test_async_transactions.js
toolkit/components/places/tests/unit/test_browserhistory.js
toolkit/components/places/tests/unit/test_database_replaceOnStartup.js
toolkit/components/places/tests/unit/test_frecency.js
toolkit/components/places/tests/unit/test_getChildIndex.js
toolkit/components/places/tests/unit/test_getPlacesInfo.js
toolkit/components/places/tests/unit/test_history.js
toolkit/components/places/tests/unit/test_history_autocomplete_tags.js
toolkit/components/places/tests/unit/test_history_notifications.js
toolkit/components/places/tests/unit/test_hosts_triggers.js
toolkit/components/places/tests/unit/test_isvisited.js
toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js
toolkit/components/places/tests/unit/test_multi_word_tags.js
toolkit/components/places/tests/unit/test_null_interfaces.js
toolkit/components/places/tests/unit/test_pageGuid_bookmarkGuid.js
toolkit/components/places/tests/unit/test_placeURIs.js
toolkit/components/places/tests/unit/test_tag_autocomplete_search.js
toolkit/components/printing/content/printPageSetup.js
toolkit/components/printing/content/printPreviewBindings.xml
toolkit/components/printing/content/printPreviewProgress.js
toolkit/components/printing/content/printProgress.js
toolkit/components/printing/content/printUtils.js
toolkit/components/printing/content/printdialog.js
toolkit/components/printing/content/printjoboptions.js
toolkit/components/processsingleton/MainProcessSingleton.js
toolkit/components/prompts/content/tabprompts.xml
toolkit/components/prompts/test/test_dom_prompts.html
toolkit/components/reader/AboutReader.jsm
toolkit/components/reader/ReaderMode.jsm
toolkit/components/satchel/nsFormAutoComplete.js
toolkit/components/satchel/nsFormHistory.js
toolkit/components/satchel/test/test_form_autocomplete.html
toolkit/components/satchel/test/test_form_autocomplete_with_list.html
toolkit/components/search/SearchSuggestionController.jsm
toolkit/components/search/nsSidebar.js
toolkit/components/search/tests/xpcshell/head_search.js
toolkit/components/social/MozSocialAPI.jsm
toolkit/components/social/SocialService.jsm
toolkit/components/telemetry/TelemetryEnvironment.jsm
toolkit/components/telemetry/TelemetryLog.jsm
toolkit/components/telemetry/TelemetryReportingPolicy.jsm
toolkit/components/telemetry/TelemetrySend.jsm
toolkit/components/telemetry/TelemetrySession.jsm
toolkit/components/telemetry/TelemetryStopwatch.jsm
toolkit/components/telemetry/TelemetryStorage.jsm
toolkit/components/telemetry/tests/unit/test_nsITelemetry.js
toolkit/components/thumbnails/BackgroundPageThumbs.jsm
toolkit/components/thumbnails/test/head.js
toolkit/components/tooltiptext/TooltipTextProvider.js
toolkit/components/viewsource/ViewSourceBrowser.jsm
toolkit/components/viewsource/content/viewSource-content.js
toolkit/components/viewsource/content/viewSource.js
toolkit/components/xulstore/XULStore.js
toolkit/content/aboutProfiles.js
toolkit/content/aboutServiceWorkers.js
toolkit/content/browser-child.js
toolkit/content/browser-content.js
toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js
toolkit/content/tests/unit/test_contentAreaUtils.js
toolkit/content/widgets/autocomplete.xml
toolkit/content/widgets/browser.xml
toolkit/content/widgets/findbar.xml
toolkit/content/widgets/notification.xml
toolkit/content/widgets/popup.xml
toolkit/content/widgets/scrollbox.xml
toolkit/content/widgets/tabbox.xml
toolkit/content/widgets/textbox.xml
toolkit/content/widgets/toolbar.xml
toolkit/crashreporter/CrashSubmit.jsm
toolkit/crashreporter/test/CrashTestUtils.jsm
toolkit/crashreporter/test/browser/browser_aboutCrashesResubmit.js
toolkit/crashreporter/test/browser/head.js
toolkit/crashreporter/test/unit/head_crashreporter.js
toolkit/crashreporter/test/unit/test_crash_terminator.js
toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
toolkit/identity/Identity.jsm
toolkit/identity/IdentityProvider.jsm
toolkit/identity/LogUtils.jsm
toolkit/identity/tests/unit/head_identity.js
toolkit/modules/BrowserUtils.jsm
toolkit/modules/FinderHighlighter.jsm
toolkit/modules/GMPInstallManager.jsm
toolkit/modules/InlineSpellChecker.jsm
toolkit/modules/Log.jsm
toolkit/modules/PopupNotifications.jsm
toolkit/modules/Preferences.jsm
toolkit/modules/PropertyListUtils.jsm
toolkit/modules/SpatialNavigation.jsm
toolkit/modules/UpdateUtils.jsm
toolkit/modules/debug.js
toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm
toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
toolkit/modules/tests/xpcshell/test_Log_stackTrace.js
toolkit/modules/tests/xpcshell/test_Preferences.js
toolkit/modules/tests/xpcshell/test_Promise.js
toolkit/modules/tests/xpcshell/test_UpdateUtils_url.js
toolkit/modules/tests/xpcshell/test_ZipUtils.js
toolkit/mozapps/extensions/AddonManager.jsm
toolkit/mozapps/extensions/DeferredSave.jsm
toolkit/mozapps/extensions/LightweightThemeManager.jsm
toolkit/mozapps/extensions/amInstallTrigger.js
toolkit/mozapps/extensions/amWebInstallListener.js
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/content/setting.xml
toolkit/mozapps/extensions/internal/AddonRepository.jsm
toolkit/mozapps/extensions/internal/Content.js
toolkit/mozapps/extensions/internal/GMPProvider.jsm
toolkit/mozapps/extensions/internal/XPIProvider.jsm
toolkit/mozapps/extensions/internal/XPIProviderUtils.js
toolkit/mozapps/extensions/nsBlocklistService.js
toolkit/mozapps/extensions/test/browser/browser_bug567127.js
toolkit/mozapps/extensions/test/browser/browser_bug577990.js
toolkit/mozapps/extensions/test/browser/browser_bug590347.js
toolkit/mozapps/extensions/test/browser/browser_discovery.js
toolkit/mozapps/extensions/test/browser/head.js
toolkit/mozapps/extensions/test/xpcshell/head_addons.js
toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_prefs.js
toolkit/mozapps/extensions/test/xpcshell/test_nodisable_hidden.js
toolkit/mozapps/extensions/test/xpcshell/test_update.js
toolkit/mozapps/extensions/test/xpcshell/test_update_strictcompat.js
toolkit/mozapps/extensions/test/xpcshell/test_updatecheck.js
toolkit/mozapps/installer/precompile_cache.js
toolkit/mozapps/update/UpdateTelemetry.jsm
toolkit/mozapps/update/content/updates.js
toolkit/mozapps/update/nsUpdateService.js
toolkit/mozapps/update/tests/chrome/utils.js
toolkit/mozapps/update/tests/data/shared.js
toolkit/mozapps/update/tests/unit_aus_update/downloadAndHashCheckMar.js
toolkit/mozapps/update/tests/unit_aus_update/urlConstruction.js
toolkit/obsolete/content/nsUserSettings.js
toolkit/profile/content/createProfileWizard.js
toolkit/profile/content/profileSelection.js
--- a/browser/base/content/aboutTabCrashed.js
+++ b/browser/base/content/aboutTabCrashed.js
@@ -55,17 +55,17 @@ var AboutTabCrashed = {
   init() {
     this.MESSAGES.forEach((msg) => addMessageListener(msg, this.receiveMessage.bind(this)));
     addEventListener("DOMContentLoaded", this);
 
     document.title = this.pageData.title;
   },
 
   receiveMessage(message) {
-    switch(message.name) {
+    switch (message.name) {
       case "UpdateCount": {
         this.showRestoreAll(message.data.count > 1);
         break;
       }
       case "SetCrashReportAvailable": {
         this.onSetCrashReportAvailable(message);
         break;
       }
@@ -105,17 +105,17 @@ var AboutTabCrashed = {
     // Error pages are loaded as LOAD_BACKGROUND, so they don't get load events.
     let event = new CustomEvent("AboutTabCrashedLoad", {bubbles:true});
     document.dispatchEvent(event);
 
     sendAsyncMessage("Load");
   },
 
   onClick(event) {
-    switch(event.target.id) {
+    switch (event.target.id) {
       case "closeTab": {
         this.sendMessage("closeTab");
         break;
       }
 
       case "restoreTab": {
         this.sendMessage("restoreTab");
         break;
@@ -129,17 +129,17 @@ var AboutTabCrashed = {
       case "sendReport": {
         this.showCrashReportUI(event.target.checked);
         break;
       }
     }
   },
 
   onInput(event) {
-    switch(event.target.id) {
+    switch (event.target.id) {
       case "email": {
         document.getElementById("emailMe").checked = !!event.target.value;
         break;
       }
     }
   },
   /**
    * After this page tells the parent that it has loaded, the parent
--- a/browser/base/content/abouthome/aboutHome.js
+++ b/browser/base/content/abouthome/aboutHome.js
@@ -156,17 +156,17 @@ function ensureSnippetsMapThen(aCallback
       invokeCallbacks();
     }
 
     let cache = new Map();
     let cursorRequest;
     try {
       cursorRequest = db.transaction(SNIPPETS_OBJECTSTORE_NAME)
                         .objectStore(SNIPPETS_OBJECTSTORE_NAME).openCursor();
-    } catch(ex) {
+    } catch (ex) {
       console.error(ex);
       invokeCallbacks();
       return;
     }
 
     cursorRequest.onerror = function (event) {
       invokeCallbacks();
     }
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -628,17 +628,17 @@ var LightWeightThemeWebInstaller = {
     this._manager.resetPreview();
   },
 
   _isAllowed: function (srcURIString) {
     let uri;
     try {
       uri = makeURI(srcURIString);
     }
-    catch(e) {
+    catch (e) {
       //makeURI fails if srcURIString is a nonsense URI
       return false;
     }
 
     if (!uri.schemeIs("https")) {
       return false;
     }
 
--- a/browser/base/content/browser-customization.js
+++ b/browser/base/content/browser-customization.js
@@ -5,17 +5,17 @@
 
 /**
  * Customization handler prepares this browser window for entering and exiting
  * customization mode by handling customizationstarting and customizationending
  * events.
  */
 var CustomizationHandler = {
   handleEvent: function(aEvent) {
-    switch(aEvent.type) {
+    switch (aEvent.type) {
       case "customizationstarting":
         this._customizationStarting();
         break;
       case "customizationchange":
         this._customizationChange();
         break;
       case "customizationending":
         this._customizationEnding(aEvent.detail);
--- a/browser/base/content/browser-feeds.js
+++ b/browser/base/content/browser-feeds.js
@@ -263,17 +263,17 @@ var FeedHandler = {
     }
 
     // Retrieving the shell service might fail on some systems, most
     // notably systems where GNOME is not installed.
     try {
       let ss = Cc["@mozilla.org/browser/shell-service;1"]
                  .getService(Ci.nsIShellService);
       ss.openApplicationWithURI(clientApp, aSpec);
-    } catch(e) {
+    } catch (e) {
       // If we couldn't use the shell service, fallback to using a
       // nsIProcess instance
       let p = Cc["@mozilla.org/process/util;1"]
                 .createInstance(Ci.nsIProcess);
       p.init(clientApp);
       p.run(false, [aSpec], 1);
     }
   },
@@ -306,17 +306,17 @@ var FeedHandler = {
         }
 
         let defaultClientApp = null;
         try {
           // This can sometimes not exist
           defaultClientApp = Cc["@mozilla.org/browser/shell-service;1"]
                                .getService(Ci.nsIShellService)
                                .defaultFeedReader;
-        } catch(ex) {
+        } catch (ex) {
           // Just do nothing, then we don't bother populating
         }
 
         if (selectedClientApp && selectedClientApp.exists()) {
           if (defaultClientApp && selectedClientApp.path != defaultClientApp.path) {
             // Only set the default menu item if it differs from the selected one
             msg.target.messageManager
                .sendAsyncMessage("FeedWriter:SetApplicationLauncherMenuItem",
--- a/browser/base/content/browser-gestureSupport.js
+++ b/browser/base/content/browser-gestureSupport.js
@@ -848,17 +848,17 @@ var gHistorySwipeAnimation = {
    * @param aIndex
    *        The index to check for availability for in the history.
    * @return true if the index exists in the browser history, false otherwise.
    */
   _doesIndexExistInHistory: function HSA__doesIndexExistInHistory(aIndex) {
     try {
       return SessionStore.getSessionHistory(gBrowser.selectedTab).entries[aIndex] != null;
     }
-    catch(ex) {
+    catch (ex) {
       return false;
     }
     return true;
   },
 
   /**
    * Navigates to the index in history that is currently being tracked by
    * |this|.
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -1621,17 +1621,17 @@ var BookmarkingUI = {
 
       this._updateStar();
 
       // Start observing bookmarks if needed.
       if (!this._hasBookmarksObserver) {
         try {
           PlacesUtils.addLazyBookmarkObserver(this);
           this._hasBookmarksObserver = true;
-        } catch(ex) {
+        } catch (ex) {
           Components.utils.reportError("BookmarkingUI failed adding a bookmarks observer: " + ex);
         }
       }
 
       delete this._pendingStmt;
     });
   },
 
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1137,17 +1137,17 @@ var gBrowserInit = {
             gBrowser.updateBrowserRemoteness(gBrowser.selectedBrowser, true);
           } else if (gBrowser.selectedBrowser.isRemoteBrowser) {
             // If the browser is remote, then it's implied that
             // gMultiProcessBrowser is true. We need to flip the remoteness
             // of this tab to false in order for the tab drag to work.
             gBrowser.updateBrowserRemoteness(gBrowser.selectedBrowser, false);
           }
           gBrowser.swapBrowsersAndCloseOther(gBrowser.selectedTab, tabToOpen);
-        } catch(e) {
+        } catch (e) {
           Cu.reportError(e);
         }
       }
       // window.arguments[2]: referrer (nsIURI | string)
       //                 [3]: postData (nsIInputStream)
       //                 [4]: allowThirdPartyFixup (bool)
       //                 [5]: referrerPolicy (int)
       //                 [6]: userContextId (int)
@@ -1714,17 +1714,17 @@ function gotoHistoryIndex(aEvent) {
   let where = whereToOpenLink(aEvent);
 
   if (where == "current") {
     // Normal click. Go there in the current tab and update session history.
 
     try {
       gBrowser.gotoIndex(index);
     }
-    catch(ex) {
+    catch (ex) {
       return false;
     }
     return true;
   }
   // Modified click. Go there in a new tab/window.
 
   let historyindex = aEvent.target.getAttribute("historyindex");
   duplicateTabIn(gBrowser.selectedTab, where, Number(historyindex));
@@ -1733,32 +1733,32 @@ function gotoHistoryIndex(aEvent) {
 
 function BrowserForward(aEvent) {
   let where = whereToOpenLink(aEvent, false, true);
 
   if (where == "current") {
     try {
       gBrowser.goForward();
     }
-    catch(ex) {
+    catch (ex) {
     }
   }
   else {
     duplicateTabIn(gBrowser.selectedTab, where, 1);
   }
 }
 
 function BrowserBack(aEvent) {
   let where = whereToOpenLink(aEvent, false, true);
 
   if (where == "current") {
     try {
       gBrowser.goBack();
     }
-    catch(ex) {
+    catch (ex) {
     }
   }
   else {
     duplicateTabIn(gBrowser.selectedTab, where, -1);
   }
 }
 
 function BrowserHandleBackspace()
@@ -1955,25 +1955,25 @@ var gLastOpenDirectory = {
   get path() {
     if (!this._lastDir || !this._lastDir.exists()) {
       try {
         this._lastDir = gPrefService.getComplexValue("browser.open.lastDir",
                                                      Ci.nsILocalFile);
         if (!this._lastDir.exists())
           this._lastDir = null;
       }
-      catch(e) {}
+      catch (e) {}
     }
     return this._lastDir;
   },
   set path(val) {
     try {
       if (!val || !val.isDirectory())
         return;
-    } catch(e) {
+    } catch (e) {
       return;
     }
     this._lastDir = val.clone();
 
     // Don't save the last open directory pref inside the Private Browsing mode
     if (!PrivateBrowsingUtils.isWindowPrivate(window))
       gPrefService.setComplexValue("browser.open.lastDir", Ci.nsILocalFile,
                                    this._lastDir);
@@ -3105,17 +3105,17 @@ function getDefaultHomePage() {
   var prefs = Services.prefs.getDefaultBranch(null);
   var url = BROWSER_NEW_TAB_URL;
   try {
     url = prefs.getComplexValue("browser.startup.homepage",
                                 Ci.nsIPrefLocalizedString).data;
     // If url is a pipe-delimited set of pages, just take the first one.
     if (url.includes("|"))
       url = url.split("|")[0];
-  } catch(e) {
+  } catch (e) {
     Components.utils.reportError("Couldn't get homepage pref: " + e);
   }
   return url;
 }
 
 function BrowserFullScreen()
 {
   window.fullScreen = !window.fullScreen;
@@ -5455,17 +5455,17 @@ function contentAreaClick(event, isPanel
       if (linkNode.getAttribute("onclick") ||
           href.startsWith("javascript:") ||
           href.startsWith("data:"))
         return;
 
       try {
         urlSecurityCheck(href, linkNode.ownerDocument.nodePrincipal);
       }
-      catch(ex) {
+      catch (ex) {
         // Prevent loading unsecure destinations.
         event.preventDefault();
         return;
       }
 
       loadURI(href, null, null, false);
       event.preventDefault();
       return;
@@ -6376,17 +6376,17 @@ function convertFromUnicode(charset, str
 {
   try {
     var unicodeConverter = Components
        .classes["@mozilla.org/intl/scriptableunicodeconverter"]
        .createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
     unicodeConverter.charset = charset;
     str = unicodeConverter.ConvertFromUnicode(str);
     return str + unicodeConverter.Finish();
-  } catch(ex) {
+  } catch (ex) {
     return null;
   }
 }
 
 /**
  * Re-open a closed tab.
  * @param aIndex
  *        The index of the tab (via SessionStore.getClosedTabData)
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -177,22 +177,22 @@ var showContentContextMenu = function (e
     try {
       let imageCache =
         Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools)
                                         .getImgCacheForDocument(doc);
       let props =
         imageCache.findEntryProperties(event.target.currentURI, doc);
       try {
         contentType = props.get("type", Ci.nsISupportsCString).data;
-      } catch(e) {}
+      } catch (e) {}
       try {
         contentDisposition =
           props.get("content-disposition", Ci.nsISupportsCString).data;
-      } catch(e) {}
-    } catch(e) {}
+      } catch (e) {}
+    } catch (e) {}
   }
 
   let selectionInfo = BrowserUtils.getSelectionDetails(content);
 
   if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
     let editFlags = SpellCheckHelper.isEditable(event.target, content);
     let spellInfo;
     if (editFlags &
@@ -688,17 +688,17 @@ addEventListener("pagehide", function(ev
 });
 
 var PageMetadataMessenger = {
   init() {
     addMessageListener("PageMetadata:GetPageData", this);
     addMessageListener("PageMetadata:GetMicroformats", this);
   },
   receiveMessage(message) {
-    switch(message.name) {
+    switch (message.name) {
       case "PageMetadata:GetPageData": {
         let target = message.objects.target;
         let result = PageMetadata.getData(content.document, target);
         sendAsyncMessage("PageMetadata:PageDataResult", result);
         break;
       }
       case "PageMetadata:GetMicroformats": {
         let target = message.objects.target;
@@ -725,17 +725,17 @@ addEventListener("ActivateSocialFeature"
   }
 
   let node = aEvent.target;
   let ownerDocument = node.ownerDocument;
   let data = node.getAttribute("data-service");
   if (data) {
     try {
       data = JSON.parse(data);
-    } catch(e) {
+    } catch (e) {
       Cu.reportError("Social Service manifest parse error: " + e);
       return;
     }
   } else {
     Cu.reportError("Social Service manifest not available");
     return;
   }
 
@@ -1456,17 +1456,17 @@ let OfflineApps = {
     if (Services.perms.testExactPermission(currentURI, "offline-app") != Services.perms.UNKNOWN_ACTION)
       return;
 
     try {
       if (Services.prefs.getBoolPref("offline-apps.allow_by_default")) {
         // all pages can use offline capabilities, no need to ask the user
         return;
       }
-    } catch(e) {
+    } catch (e) {
       // this pref isn't set by default, ignore failures
     }
     let docId = ++this._docId;
     this._docIdMap.set(docId, Cu.getWeakReference(aContentWindow.document));
     sendAsyncMessage("OfflineApps:RequestPermission", {
       uri: currentURI.spec,
       docId,
     });
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -257,17 +257,17 @@ const nsIPermissionManager = Components.
 
 const nsICertificateDialogs = Components.interfaces.nsICertificateDialogs;
 const CERTIFICATEDIALOGS_CONTRACTID = "@mozilla.org/nsCertificateDialogs;1"
 
 // clipboard helper
 function getClipboardHelper() {
     try {
         return Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);
-    } catch(e) {
+    } catch (e) {
         // do nothing, later code will handle the error
         return null;
     }
 }
 const gClipboardHelper = getClipboardHelper();
 
 // Interface for image loading content
 const nsIImageLoadingContent = Components.interfaces.nsIImageLoadingContent;
@@ -754,17 +754,17 @@ function saveMedia()
           var dir = aDirectory.clone();
           var item = gImageView.data[v][COL_IMAGE_NODE];
           var uriString = gImageView.data[v][COL_IMAGE_ADDRESS];
           var uri = makeURI(uriString);
 
           try {
             uri.QueryInterface(Components.interfaces.nsIURL);
             dir.append(decodeURIComponent(uri.fileName));
-          } catch(ex) {
+          } catch (ex) {
             // data:/blob: uris
             // Supply a dummy filename, otherwise Download Manager
             // will try to delete the base directory on failure.
             dir.append(gImageView.data[v][COL_IMAGE_TYPE]);
           }
 
           if (i == 0) {
             saveAnImage(uriString, new AutoChosen(dir, uri), makeURI(item.baseURI));
--- a/browser/base/content/pageinfo/security.js
+++ b/browser/base/content/pageinfo/security.js
@@ -227,17 +227,17 @@ function securityOnLoad(uri, windowInfo)
   var noStr = pageInfoBundle.getString("no");
 
   setText("security-privacy-cookies-value",
           hostHasCookies(uri) ? yesStr : noStr);
   setText("security-privacy-passwords-value",
           realmHasPasswords(uri) ? yesStr : noStr);
 
   var visitCount = previousVisitCount(info.hostName);
-  if(visitCount > 1) {
+  if (visitCount > 1) {
     setText("security-privacy-history-value",
             pageInfoBundle.getFormattedString("securityNVisits", [visitCount.toLocaleString()]));
   }
   else if (visitCount == 1) {
     setText("security-privacy-history-value",
             pageInfoBundle.getString("securityOneVisit"));
   }
   else {
--- a/browser/base/content/socialmarks.xml
+++ b/browser/base/content/socialmarks.xml
@@ -309,17 +309,17 @@
         ]]></body>
       </method>
 
       <method name="handleEvent">
         <parameter name="aEvent"/>
         <body><![CDATA[
         if (aEvent.eventPhase != aEvent.BUBBLING_PHASE)
           return;
-        switch(aEvent.type) {
+        switch (aEvent.type) {
           case "DOMLinkAdded": {
             // much of this logic is from DOMLinkHandler in browser.js, this sets
             // the presence icon for a chat user, we simply use favicon style
             // updating
             let link = aEvent.originalTarget;
             let rel = link.rel && link.rel.toLowerCase();
             if (!link || !link.ownerDocument || !rel || !link.href)
               return;
--- a/browser/base/content/sync/setup.js
+++ b/browser/base/content/sync/setup.js
@@ -994,17 +994,17 @@ var gSyncSetup = {
   },
 
   // shim
   _setFeedbackMessage: function (element, success, string) {
     let str = "";
     if (string) {
       try {
         str = this._stringBundle.GetStringFromName(string);
-      } catch(e) {}
+      } catch (e) {}
 
       if (!str)
         str = Weave.Utils.getErrorString(string);
     }
     this._setFeedback(element, success, str);
   },
 
   loadCaptcha: function loadCaptcha() {
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -536,17 +536,17 @@ var PageStyleHandler = {
 
       let URI;
       try {
         if (!currentStyleSheet.ownerNode ||
             // special-case style nodes, which have no href
             currentStyleSheet.ownerNode.nodeName.toLowerCase() != "style") {
           URI = Services.io.newURI(currentStyleSheet.href, null, null);
         }
-      } catch(e) {
+      } catch (e) {
         if (e.result != Cr.NS_ERROR_MALFORMED_URI) {
           throw e;
         }
         continue;
       }
 
       // We won't send data URIs all of the way up to the parent, as these
       // can be arbitrarily large.
@@ -647,17 +647,17 @@ var DOMFullscreenHandler = {
       return null;
     }
     return content.QueryInterface(Ci.nsIInterfaceRequestor)
                   .getInterface(Ci.nsIDOMWindowUtils);
   },
 
   receiveMessage: function(aMessage) {
     let windowUtils = this._windowUtils;
-    switch(aMessage.name) {
+    switch (aMessage.name) {
       case "DOMFullscreen:Entered": {
         this._lastTransactionId = windowUtils.lastTransactionId;
         if (!windowUtils.handleFullscreenRequests() &&
             !content.document.fullscreenElement) {
           // If we don't actually have any pending fullscreen request
           // to handle, neither we have been in fullscreen, tell the
           // parent to just exit.
           sendAsyncMessage("DOMFullscreen:Exit");
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1402,31 +1402,31 @@
             var browser = this.getBrowserForTab(aTab);
             var crop = "end";
             var title = browser.contentTitle;
 
             if (!title) {
               if (browser.currentURI.spec) {
                 try {
                   title = this.mURIFixup.createExposableURI(browser.currentURI).spec;
-                } catch(ex) {
+                } catch (ex) {
                   title = browser.currentURI.spec;
                 }
               }
 
               if (title && !isBlankPageURL(title)) {
                 // At this point, we now have a URI.
                 // Let's try to unescape it using a character set
                 // in case the URI is not ASCII.
                 try {
                   var characterSet = browser.characterSet;
                   const textToSubURI = Components.classes["@mozilla.org/intl/texttosuburi;1"]
                                                  .getService(Components.interfaces.nsITextToSubURI);
                   title = textToSubURI.unEscapeNonAsciiURI(characterSet, title);
-                } catch(ex) { /* Do nothing. */ }
+                } catch (ex) { /* Do nothing. */ }
 
                 crop = "center";
 
               } else if (aTab.hasAttribute("customizemode")) {
                 let brandBundle = document.getElementById("bundle_brand");
                 let brandShortName = brandBundle.getString("brandShortName");
                 title = gNavigatorBundle.getFormattedString("customizeMode.tabTitle",
                                                             [ brandShortName ]);
@@ -4421,17 +4421,17 @@
       </method>
 
       <method name="observe">
         <parameter name="aSubject"/>
         <parameter name="aTopic"/>
         <parameter name="aData"/>
         <body><![CDATA[
           let browser;
-          switch(aTopic) {
+          switch (aTopic) {
             case "live-resize-start":
               browser = this.mCurrentTab.linkedBrowser;
               let fl = browser.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader;
               if (fl && fl.tabParent && !this.mActiveResizeDisplayportSuppression) {
                 fl.tabParent.suppressDisplayport(true);
                 this.mActiveResizeDisplayportSuppression = browser;
               }
               break;
@@ -6091,17 +6091,17 @@
             // Load in an existing tab.
             try {
               let webNav = Ci.nsIWebNavigation;
               let flags = webNav.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP |
                           webNav.LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
               this.tabbrowser.getBrowserForTab(tab).loadURIWithFlags(url, flags);
               if (!bgLoad)
                 this.selectedItem = tab;
-            } catch(ex) {
+            } catch (ex) {
               // Just ignore invalid urls
             }
           }
         }
 
         if (draggedTab) {
           delete draggedTab._dragData;
         }
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -588,17 +588,17 @@ file, You can obtain one at http://mozil
               case (shift):
                 suffix = ".net/";
                 break;
               case (accel):
                 try {
                   suffix = gPrefService.getCharPref("browser.fixup.alternate.suffix");
                   if (suffix.charAt(suffix.length - 1) != "/")
                     suffix += "/";
-                } catch(e) {
+                } catch (e) {
                   suffix = ".com/";
                 }
                 break;
             }
 
             if (suffix) {
               // trim leading/trailing spaces (bug 233205)
               url = url.trim();
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -61,17 +61,17 @@ function openTopWin(url) {
   openUILinkIn(url, "current");
 }
 
 function getBoolPref(prefname, def)
 {
   try {
     return Services.prefs.getBoolPref(prefname);
   }
-  catch(er) {
+  catch (er) {
     return def;
   }
 }
 
 /* openUILink handles clicks on UI elements that cause URLs to load.
  *
  * As the third argument, you may pass an object with the same properties as
  * accepted by openUILinkIn, plus "ignoreButton" and "ignoreAlt".
--- a/browser/components/contextualidentity/test/browser/browser_blobUrl.js
+++ b/browser/components/contextualidentity/test/browser/browser_blobUrl.js
@@ -59,17 +59,17 @@ add_task(function* test() {
 
   yield ContentTask.spawn(browser3, blobURL, function(url) {
     return new Promise(resolve => {
       var xhr = new content.window.XMLHttpRequest();
       xhr.open("GET", url);
       try {
         xhr.send();
         resolve("SendSucceeded");
-      } catch(e) {
+      } catch (e) {
         resolve("SendThrew");
       }
     });
   }).then(status => {
     is(status, "SendSucceeded", "Using a blob URI within a single user context id should work");
   });
 
   yield BrowserTestUtils.removeTab(tab1);
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -1439,17 +1439,17 @@ var CustomizableUIInternal = {
       def = aDef || "";
     }
     try {
       if (Array.isArray(aFormatArgs) && aFormatArgs.length) {
         return gWidgetsBundle.formatStringFromName(name, aFormatArgs,
           aFormatArgs.length) || def;
       }
       return gWidgetsBundle.GetStringFromName(name) || def;
-    } catch(ex) {
+    } catch (ex) {
       // If an empty string was explicitly passed, treat it as an actual
       // value rather than a missing property.
       if (!def && (name != "" || kReqStringProps.includes(aProp))) {
         log.error("Could not localize property '" + name + "'.");
       }
     }
     return def;
   },
@@ -1510,17 +1510,17 @@ var CustomizableUIInternal = {
     }
   },
 
   handleWidgetClick: function(aWidget, aNode, aEvent) {
     log.debug("handleWidgetClick");
     if (aWidget.onClick) {
       try {
         aWidget.onClick.call(null, aEvent);
-      } catch(e) {
+      } catch (e) {
         Cu.reportError(e);
       }
     } else {
       //XXXunf Need to think this through more, and formalize.
       Services.obs.notifyObservers(aNode, "customizedui-widget-click", aWidget.id);
     }
   },
 
@@ -1944,17 +1944,17 @@ var CustomizableUIInternal = {
     if (!state) {
       return;
     }
     try {
       gSavedState = JSON.parse(state);
       if (typeof gSavedState != "object" || gSavedState === null) {
         throw "Invalid saved state";
       }
-    } catch(e) {
+    } catch (e) {
       Services.prefs.clearUserPref(kPrefCustomizationState);
       gSavedState = {};
       log.debug("Error loading saved UI customization state, falling back to defaults.");
     }
 
     if (!("placements" in gSavedState)) {
       gSavedState.placements = {};
     }
@@ -2524,17 +2524,17 @@ var CustomizableUIInternal = {
     gResetting = false;
   },
 
   _resetUIState: function() {
     try {
       gUIStateBeforeReset.drawInTitlebar = Services.prefs.getBoolPref(kPrefDrawInTitlebar);
       gUIStateBeforeReset.uiCustomizationState = Services.prefs.getCharPref(kPrefCustomizationState);
       gUIStateBeforeReset.currentTheme = LightweightThemeManager.currentTheme;
-    } catch(e) { }
+    } catch (e) { }
 
     this._resetExtraToolbars();
 
     Services.prefs.clearUserPref(kPrefCustomizationState);
     Services.prefs.clearUserPref(kPrefDrawInTitlebar);
     LightweightThemeManager.currentTheme = null;
     log.debug("State reset");
 
@@ -2786,17 +2786,17 @@ var CustomizableUIInternal = {
       }
     }
 
     if (Services.prefs.prefHasUserValue(kPrefDrawInTitlebar)) {
       log.debug(kPrefDrawInTitlebar + " pref is non-default");
       return false;
     }
 
-    if(LightweightThemeManager.currentTheme) {
+    if (LightweightThemeManager.currentTheme) {
       log.debug(LightweightThemeManager.currentTheme + " theme is non-default");
       return false;
     }
 
     return true;
   },
 
   setToolbarVisibility: function(aToolbarId, aIsVisible) {
@@ -4085,17 +4085,17 @@ OverflowableToolbar.prototype = {
     this._chevron.removeEventListener("dragover", this);
     this._chevron.removeEventListener("dragend", this);
     this._panel.removeEventListener("popuphiding", this);
     CustomizableUI.removeListener(this);
     CustomizableUIInternal.removePanelCloseListeners(this._panel);
   },
 
   handleEvent: function(aEvent) {
-    switch(aEvent.type) {
+    switch (aEvent.type) {
       case "aftercustomization":
         this._enable();
         break;
       case "command":
         if (aEvent.target == this._chevron) {
           this._onClickChevron(aEvent);
         } else {
           this._panel.hidePopup();
--- a/browser/components/customizableui/CustomizeMode.jsm
+++ b/browser/components/customizableui/CustomizeMode.jsm
@@ -1482,17 +1482,17 @@ CustomizeMode.prototype = {
   },
 
   _updateUndoResetButton: function() {
     let undoResetButton =  this.document.getElementById("customization-undo-reset-button");
     undoResetButton.hidden = !CustomizableUI.canUndoReset;
   },
 
   handleEvent: function(aEvent) {
-    switch(aEvent.type) {
+    switch (aEvent.type) {
       case "toolbarvisibilitychange":
         this._onToolbarVisibilityChange(aEvent);
         break;
       case "dragstart":
         this._onDragStart(aEvent);
         break;
       case "dragover":
         this._onDragOver(aEvent);
--- a/browser/components/customizableui/ScrollbarSampler.jsm
+++ b/browser/components/customizableui/ScrollbarSampler.jsm
@@ -44,17 +44,17 @@ this.ScrollbarSampler = {
                        .getInterface(Ci.nsIDOMWindowUtils);
 
     return new Promise(resolve => {
       cwindow.addEventListener("load", function onLoad(aEvent) {
         cwindow.removeEventListener("load", onLoad);
         let sbWidth = {};
         try {
           utils.getScrollbarSize(true, sbWidth, {});
-        } catch(e) {
+        } catch (e) {
           Cu.reportError("Could not sample scrollbar size: " + e + " -- " +
                          e.stack);
           sbWidth.value = 0;
         }
         // Minimum width of 10 so that we have enough padding:
         sbWidth.value = Math.max(sbWidth.value, 10);
         resolve(sbWidth.value);
         iframe.remove();
--- a/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js
+++ b/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js
@@ -34,15 +34,15 @@ add_task(function*() {
   ok(privateBrowsingButton, "Private browsing button exists in Panel Menu");
   privateBrowsingButton.click();
 
   try {
     yield waitForCondition(() => windowWasHandled);
     yield promiseWindowClosed(privateWindow);
     info("The new private window was closed");
   }
-  catch(e) {
+  catch (e) {
     ok(false, "The new private browser window was not properly handled");
   }
   finally {
     Services.ww.unregisterNotification(observerWindowOpened);
   }
 });
--- a/browser/components/customizableui/test/browser_947914_button_newWindow.js
+++ b/browser/components/customizableui/test/browser_947914_button_newWindow.js
@@ -33,15 +33,15 @@ add_task(function*() {
   ok(newWindowButton, "New Window button exists in Panel Menu");
   newWindowButton.click();
 
   try {
     yield waitForCondition(() => windowWasHandled);
     yield promiseWindowClosed(newWindow);
     info("The new window was closed");
   }
-  catch(e) {
+  catch (e) {
     ok(false, "The new browser window was not properly handled");
   }
   finally {
     Services.ww.unregisterNotification(observerWindowOpened);
   }
 });
--- a/browser/components/customizableui/test/browser_967000_button_feeds.js
+++ b/browser/components/customizableui/test/browser_967000_button_feeds.js
@@ -37,17 +37,17 @@ add_task(function*() {
   ok(!feedButton.hasAttribute("disabled"), "The Subscribe button gets enabled");
 
   feedButton.click();
   yield promiseTabLoadEvent(newTab, TEST_FEED);
 
   is(gBrowser.currentURI.spec, TEST_FEED, "Subscribe page opened");
   ok(!isPanelUIOpen(), "Panel is closed");
 
-  if(isPanelUIOpen()) {
+  if (isPanelUIOpen()) {
     panelHidePromise = promisePanelHidden(window);
     PanelUI.hide();
     yield panelHidePromise;
   }
 });
 
 add_task(function* asyncCleanup() {
   // reset the panel UI to the default state
--- a/browser/components/customizableui/test/browser_967000_button_sync.js
+++ b/browser/components/customizableui/test/browser_967000_button_sync.js
@@ -92,17 +92,17 @@ function* openPrefsFromMenuPanel(expecte
 
   yield deferred.promise;
   newTab = gBrowser.selectedTab;
 
   is(gBrowser.currentURI.spec, "about:preferences?entrypoint=" + entryPoint + "#sync",
     "Firefox Sync preference page opened with `menupanel` entrypoint");
   ok(!isPanelUIOpen(), "The panel closed");
 
-  if(isPanelUIOpen()) {
+  if (isPanelUIOpen()) {
     let panelHidePromise = promisePanelHidden(window);
     PanelUI.hide();
     yield panelHidePromise;
   }
 }
 
 function* asyncCleanup() {
   Services.prefs.clearUserPref("identity.fxaccounts.remote.signup.uri");
--- a/browser/components/customizableui/test/browser_973641_button_addon.js
+++ b/browser/components/customizableui/test/browser_973641_button_addon.js
@@ -51,17 +51,17 @@ add_task(function* asyncCleanup() {
   ok(CustomizableUI.inDefaultState, "The UI is in default state again.");
 
   // destroy the widget
   CustomizableUI.destroyWidget(kButton);
 });
 
 function resetTabs() {
   //close all opened tabs
-  while(gBrowser.tabs.length > 1) {
+  while (gBrowser.tabs.length > 1) {
     gBrowser.removeTab(gBrowser.selectedTab);
   }
 
   //restore the initial tab
   gBrowser.addTab(initialLocation);
   gBrowser.removeTab(gBrowser.selectedTab);
 }
 
--- a/browser/components/distribution.js
+++ b/browser/components/distribution.js
@@ -20,29 +20,29 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/PlacesUtils.jsm");
 
 this.DistributionCustomizer = function DistributionCustomizer() {
   // For parallel xpcshell testing purposes allow loading the distribution.ini
   // file from the profile folder through an hidden pref.
   let loadFromProfile = false;
   try {
     loadFromProfile = Services.prefs.getBoolPref("distribution.testing.loadFromProfile");
-  } catch(ex) {}
+  } catch (ex) {}
   let dirSvc = Cc["@mozilla.org/file/directory_service;1"].
                getService(Ci.nsIProperties);
   try {
     let iniFile = loadFromProfile ? dirSvc.get("ProfD", Ci.nsIFile)
                                   : dirSvc.get("XREAppDist", Ci.nsIFile);
     if (loadFromProfile) {
       iniFile.leafName = "distribution";
     }
     iniFile.append("distribution.ini");
     if (iniFile.exists())
       this._iniFile = iniFile;
-  } catch(ex) {}
+  } catch (ex) {}
 }
 
 DistributionCustomizer.prototype = {
   _iniFile: null,
 
   get _ini() {
     let ini = null;
     try {
@@ -217,26 +217,26 @@ DistributionCustomizer.prototype = {
             PlacesUtils.favicons.replaceFaviconDataFromDataURL(
               faviconURI, item.iconData, 0,
               Services.scriptSecurityManager.getSystemPrincipal());
 
             PlacesUtils.favicons.setAndFetchFaviconForPage(
               this._makeURI(item.link), faviconURI, false,
               PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE, null,
               Services.scriptSecurityManager.getSystemPrincipal());
-          } catch(e) {
+          } catch (e) {
             Cu.reportError(e);
           }
         }
 
         if (item.keyword) {
           try {
             yield PlacesUtils.keywords.insert({ keyword: item.keyword,
                                                 url: item.link });
-          } catch(e) {
+          } catch (e) {
             Cu.reportError(e);
           }
         }
 
         break;
       }
     }
   }),
@@ -454,23 +454,23 @@ DistributionCustomizer.prototype = {
     if (this._newProfile) {
       let xulStore = Cc["@mozilla.org/xul/xulstore;1"].getService(Ci.nsIXULStore);
 
       try {
         var showPersonalToolbar = Services.prefs.getBoolPref("browser.showPersonalToolbar");
         if (showPersonalToolbar) {
           xulStore.setValue(BROWSER_DOCURL, "PersonalToolbar", "collapsed", "false");
         }
-      } catch(e) {}
+      } catch (e) {}
       try {
         var showMenubar = Services.prefs.getBoolPref("browser.showMenubar");
         if (showMenubar) {
           xulStore.setValue(BROWSER_DOCURL, "toolbar-menubar", "collapsed", "false");
         }
-      } catch(e) {}
+      } catch (e) {}
     }
 
     let prefDefaultsApplied = this._prefDefaultsApplied || !this._ini;
     if (this._customizationsApplied && this._bookmarksApplied &&
         prefDefaultsApplied) {
       let os = Cc["@mozilla.org/observer-service;1"].
                getService(Ci.nsIObserverService);
       os.notifyObservers(null, DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC, null);
--- a/browser/components/migration/360seProfileMigrator.js
+++ b/browser/components/migration/360seProfileMigrator.js
@@ -226,17 +226,17 @@ Object.defineProperty(Qihoo360seProfileM
       if (!loginIni.isReadable()) {
         throw new Error("360 Secure Browser's 'login.ini' file could not be read.");
       }
 
       let loginIniInUtf8 = copyToTempUTF8File(loginIni, "gbk");
       let loginIniObj = parseINIStrings(loginIniInUtf8);
       try {
         loginIniInUtf8.remove(false);
-      } catch(ex) {}
+      } catch (ex) {}
 
       let nowLoginEmail = loginIniObj.NowLogin && loginIniObj.NowLogin.email;
 
       /*
        * NowLogin section may:
        * 1. be missing or without email, before any user logs in.
        * 2. represents the current logged in user
        * 3. represents the most recent logged in user
--- a/browser/components/migration/ChromeProfileMigrator.js
+++ b/browser/components/migration/ChromeProfileMigrator.js
@@ -221,17 +221,17 @@ Object.defineProperty(ChromeProfileMigra
                     createInstance(Ci.nsIFileInputStream);
       fstream.init(file, -1, 0, 0);
       try {
         return JSON.parse(
           NetUtil.readInputStreamToString(fstream, fstream.available(),
                                           { charset: "UTF-8" })
             ).homepage;
       }
-      catch(e) {
+      catch (e) {
         Cu.reportError("Error parsing Chrome's preferences file: " + e);
       }
     }
     return "";
   }
 });
 
 Object.defineProperty(ChromeProfileMigrator.prototype, "sourceLocked", {
--- a/browser/components/migration/MigrationUtils.jsm
+++ b/browser/components/migration/MigrationUtils.jsm
@@ -262,17 +262,17 @@ this.MigratorPrototype = {
             completeDeferred.resolve();
           }
 
           // If migrate throws, an error occurred, and the callback
           // (itemMayBeDone) might haven't been called.
           try {
             resource.migrate(resourceDone);
           }
-          catch(ex) {
+          catch (ex) {
             Cu.reportError(ex);
             resourceDone(false);
           }
 
           // Certain resources must be ran sequentially or they could fail,
           // for example bookmarks and history (See bug 1272652).
           if (migrationType == MigrationUtils.resourceTypes.BOOKMARKS ||
               migrationType == MigrationUtils.resourceTypes.HISTORY) {
@@ -332,17 +332,17 @@ this.MigratorPrototype = {
         let resources = this._getMaybeCachedResources("");
         if (resources && resources.length > 0)
           exists = true;
       }
       else {
         exists = profiles.length > 0;
       }
     }
-    catch(ex) {
+    catch (ex) {
       Cu.reportError(ex);
     }
     return exists;
   },
 
   /*** PRIVATE STUFF - DO NOT OVERRIDE ***/
   _getMaybeCachedResources: function PMB__getMaybeCachedResources(aProfile) {
     let profileKey = aProfile ? aProfile.id : "";
@@ -406,17 +406,17 @@ this.MigrationUtils = Object.freeze({
    */
   wrapMigrateFunction: function MU_wrapMigrateFunction(aFunction, aCallback) {
     return function() {
       let success = false;
       try {
         aFunction.apply(null, arguments);
         success = true;
       }
-      catch(ex) {
+      catch (ex) {
         Cu.reportError(ex);
       }
       // Do not change this to call aCallback directly in try try & catch
       // blocks, because if aCallback throws, we may end up calling aCallback
       // twice.
       aCallback(success);
     }
   },
@@ -534,17 +534,17 @@ this.MigrationUtils = Object.freeze({
     if (this._migrators.has(aKey)) {
       migrator = this._migrators.get(aKey);
     }
     else {
       try {
         migrator = Cc["@mozilla.org/profile/migrator;1?app=browser&type=" +
                       aKey].createInstance(Ci.nsIBrowserProfileMigrator);
       }
-      catch(ex) { Cu.reportError(ex) }
+      catch (ex) { Cu.reportError(ex) }
       this._migrators.set(aKey, migrator);
     }
 
     try {
       return migrator && migrator.sourceExists ? migrator : null;
     } catch (ex) { Cu.reportError(ex); return null }
   },
 
@@ -572,17 +572,17 @@ this.MigrationUtils = Object.freeze({
     let browserDesc = "";
     try {
       let browserDesc =
         Cc["@mozilla.org/uriloader/external-protocol-service;1"].
         getService(Ci.nsIExternalProtocolService).
         getApplicationDescription("http");
       return APP_DESC_TO_KEY[browserDesc] || "";
     }
-    catch(ex) {
+    catch (ex) {
       Cu.reportError("Could not detect default browser: " + ex);
     }
     return "";
   },
 
   // Whether or not we're in the process of startup migration
   get isStartupMigration() {
     return gProfileStartup != null;
--- a/browser/components/migration/SafariProfileMigrator.js
+++ b/browser/components/migration/SafariProfileMigrator.js
@@ -166,17 +166,17 @@ Bookmarks.prototype = {
         let title;
         if (entry.has("URIDictionary"))
           title = entry.get("URIDictionary").get("title");
 
         try {
           yield PlacesUtils.bookmarks.insert({
             parentGuid, url: entry.get("URLString"), title
           });
-        } catch(ex) {
+        } catch (ex) {
           Cu.reportError("Invalid Safari bookmark: " + ex);
         }
       }
     }
   })
 };
 
 function History(aHistoryFile) {
@@ -217,17 +217,17 @@ History.prototype = {
           if (entry.has("lastVisitedDate")) {
             let visitDate = this._parseCocoaDate(entry.get("lastVisitedDate"));
             try {
               places.push({ uri: NetUtil.newURI(entry.get("")),
                             title: entry.get("title"),
                             visits: [{ transitionType: transType,
                                        visitDate: visitDate }] });
             }
-            catch(ex) {
+            catch (ex) {
               // Safari's History file may contain malformed URIs which
               // will be ignored.
               Cu.reportError(ex)
             }
           }
         }
         if (places.length > 0) {
           PlacesUtils.asyncHistory.updatePlaces(places, {
@@ -241,17 +241,17 @@ History.prototype = {
               aCallback(this._success);
             }
           });
         }
         else {
           aCallback(false);
         }
       }
-      catch(ex) {
+      catch (ex) {
         Cu.reportError(ex);
         aCallback(false);
       }
     }.bind(this));
   }
 };
 
 /**
@@ -280,17 +280,17 @@ MainPreferencesPropertyList.prototype = 
     this._callbacks.push(aCallback);
     if (!alreadyReading) {
       PropertyListUtils.read(this._file, function readPrefs(aDict) {
         this._dict = aDict;
         for (let callback of this._callbacks) {
           try {
             callback(aDict);
           }
-          catch(ex) {
+          catch (ex) {
             Cu.reportError(ex);
           }
         }
         this._callbacks.splice(0);
       }.bind(this));
     }
   },
 
@@ -475,23 +475,23 @@ Preferences.prototype = {
 
     // See nsLanguageAtomService::GetLanguageGroup
     let localeLangGroup = "x-unicode";
     let bundle = Services.strings.createBundle(
       "resource://gre/res/langGroups.properties");
     try {
       localeLangGroup = bundle.GetStringFromName(locale);
     }
-    catch(ex) {
+    catch (ex) {
       let hyphenAt = locale.indexOf("-");
       if (hyphenAt != -1) {
         try {
           localeLangGroup = bundle.GetStringFromName(locale.substr(0, hyphenAt));
         }
-        catch(ex2) { }
+        catch (ex2) { }
       }
     }
     return localeLangGroup;
   },
 
   _migrateDownloadsFolder: Task.async(function* () {
     // Windows Safari uses DownloadPath while Mac uses DownloadsPath.
     // Check both for future compatibility.
--- a/browser/components/migration/content/migration.js
+++ b/browser/components/migration/content/migration.js
@@ -337,17 +337,17 @@ var MigrationWizard = {
 
   onHomePageMigrationPageAdvanced: function ()
   {
     // we might not have a selectedItem if we're in fallback mode
     try {
       var radioGroup = document.getElementById("homePageRadiogroup");
 
       this._newHomePage = radioGroup.selectedItem.value;
-    } catch(ex) {}
+    } catch (ex) {}
   },
 
   // 5 - Migrating
   onMigratingPageShow: function ()
   {
     this._wiz.getButton("cancel").disabled = true;
     this._wiz.canRewind = false;
     this._wiz.canAdvance = false;
@@ -449,17 +449,17 @@ var MigrationWizard = {
                                          str);
             }
 
             var dirSvc = Components.classes["@mozilla.org/file/directory_service;1"]
                                    .getService(Components.interfaces.nsIProperties);
             var prefFile = dirSvc.get("ProfDS", Components.interfaces.nsIFile);
             prefFile.append("prefs.js");
             prefSvc.savePrefFile(prefFile);
-          } catch(ex) {
+          } catch (ex) {
             dump(ex);
           }
         }
 
         // We're done now.
         this._wiz.canAdvance = true;
         this._wiz.advance();
 
--- a/browser/components/nsBrowserContentHandler.js
+++ b/browser/components/nsBrowserContentHandler.js
@@ -757,17 +757,17 @@ nsDefaultCommandLineHandler.prototype = 
         // Searches in the Windows 10 task bar searchbox simply open the default browser
         // with a URL for a search on Bing. Here we extract the search term and use the
         // user's default search engine instead.
         var uriScheme = "", uriHost = "", uriPath = "";
         try {
           uriScheme = uri.scheme;
           uriHost = uri.host;
           uriPath = uri.path;
-        } catch(e) {
+        } catch (e) {
         }
 
         // Most Windows searches are "https://www.bing.com/search...", but bug
         // 1182308 reports a Chinese edition of Windows 10 using
         // "http://cn.bing.com/search...", so be a bit flexible in what we match.
         if (redirectWinSearch &&
             (uriScheme == "http" || uriScheme == "https") &&
             uriHost.endsWith(".bing.com") && uriPath.startsWith("/search")) {
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -731,17 +731,17 @@ BrowserGlue.prototype = {
     this._sanitizer.onStartup();
     // check if we're in safe mode
     if (Services.appinfo.inSafeMode) {
       // See https://bugzilla.mozilla.org/show_bug.cgi?id=1231112#c7 . We need to
       // register the observer early if we have to migrate tab groups
       let currentUIVersion = 0;
       try {
         currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
-      } catch(ex) {}
+      } catch (ex) {}
       if (currentUIVersion < 35) {
         this._maybeMigrateTabGroups();
       }
       Services.ww.openWindow(null, "chrome://browser/content/safeMode.xul",
                              "_blank", "chrome,centerscreen,modal,resizable=no", null);
     }
 
     // apply distribution customizations
@@ -1102,17 +1102,17 @@ BrowserGlue.prototype = {
     this._trackSlowStartup();
 
     // Offer to reset a user's profile if it hasn't been used for 60 days.
     const OFFER_PROFILE_RESET_INTERVAL_MS = 60 * 24 * 60 * 60 * 1000;
     let lastUse = Services.appinfo.replacedLockTime;
     let disableResetPrompt = false;
     try {
       disableResetPrompt = Services.prefs.getBoolPref("browser.disableResetPrompt");
-    } catch(e) {}
+    } catch (e) {}
 
     if (!disableResetPrompt && lastUse &&
         Date.now() - lastUse >= OFFER_PROFILE_RESET_INTERVAL_MS) {
       this._resetProfileNotification("unused");
     } else if (AppConstants.platform == "win" && !disableResetPrompt) {
       // Check if we were just re-installed and offer Firefox Reset
       let updateChannel;
       try {
@@ -1648,17 +1648,17 @@ BrowserGlue.prototype = {
 
     // Check if user or an extension has required to import bookmarks.html
     let importBookmarksHTML = false;
     try {
       importBookmarksHTML =
         Services.prefs.getBoolPref("browser.places.importBookmarksHTML");
       if (importBookmarksHTML)
         importBookmarks = true;
-    } catch(ex) {}
+    } catch (ex) {}
 
     // Support legacy bookmarks.html format for apps that depend on that format.
     let autoExportHTML = false;
     try {
       autoExportHTML = Services.prefs.getBoolPref("browser.bookmarks.autoExportHTML");
     } catch (ex) {} // Do not export.
     if (autoExportHTML) {
       // Sqlite.jsm and Places shutdown happen at profile-before-change, thus,
@@ -1675,17 +1675,17 @@ BrowserGlue.prototype = {
       try {
         restoreDefaultBookmarks =
           Services.prefs.getBoolPref("browser.bookmarks.restore_default_bookmarks");
         if (restoreDefaultBookmarks) {
           // Ensure that we already have a bookmarks backup for today.
           yield this._backupBookmarks();
           importBookmarks = true;
         }
-      } catch(ex) {}
+      } catch (ex) {}
 
       // This may be reused later, check for "=== undefined" to see if it has
       // been populated already.
       let lastBackupFile;
 
       // If the user did not require to restore default bookmarks, or import
       // from bookmarks.html, we will try to restore from JSON
       if (importBookmarks && !restoreDefaultBookmarks && !importBookmarksHTML) {
@@ -1723,17 +1723,17 @@ BrowserGlue.prototype = {
       }
       else {
         // An import operation is about to run.
         // Don't try to recreate smart bookmarks if autoExportHTML is true or
         // smart bookmarks are disabled.
         let smartBookmarksVersion = 0;
         try {
           smartBookmarksVersion = Services.prefs.getIntPref("browser.places.smartBookmarksVersion");
-        } catch(ex) {}
+        } catch (ex) {}
         if (!autoExportHTML && smartBookmarksVersion != -1)
           Services.prefs.setIntPref("browser.places.smartBookmarksVersion", 0);
 
         let bookmarksUrl = null;
         if (restoreDefaultBookmarks) {
           // User wants to restore bookmarks.html file from default profile folder
           bookmarksUrl = "chrome://browser/locale/bookmarks.html";
         }
@@ -2144,22 +2144,22 @@ BrowserGlue.prototype = {
 
     if (currentUIVersion < 30) {
       // Convert old devedition theme pref to lightweight theme storage
       let lightweightThemeSelected = false;
       let selectedThemeID = null;
       try {
         lightweightThemeSelected = Services.prefs.prefHasUserValue("lightweightThemes.selectedThemeID");
         selectedThemeID = Services.prefs.getCharPref("lightweightThemes.selectedThemeID");
-      } catch(e) {}
+      } catch (e) {}
 
       let defaultThemeSelected = false;
       try {
          defaultThemeSelected = Services.prefs.getCharPref("general.skins.selectedSkin") == "classic/1.0";
-      } catch(e) {}
+      } catch (e) {}
 
       // If we are on the devedition channel, the devedition theme is on by
       // default.  But we need to handle the case where they didn't want it
       // applied, and unapply the theme.
       let userChoseToNotUseDeveditionTheme =
         !defaultThemeSelected ||
         (lightweightThemeSelected && selectedThemeID != "firefox-devedition@mozilla.org");
 
@@ -2289,17 +2289,17 @@ BrowserGlue.prototype = {
 
     // TODO bug 399268: should this be a pref?
     const MAX_RESULTS = 10;
 
     // Get current smart bookmarks version.  If not set, create them.
     let smartBookmarksCurrentVersion = 0;
     try {
       smartBookmarksCurrentVersion = Services.prefs.getIntPref(SMART_BOOKMARKS_PREF);
-    } catch(ex) {}
+    } catch (ex) {}
 
     // If version is current, or smart bookmarks are disabled, bail out.
     if (smartBookmarksCurrentVersion == -1 ||
         smartBookmarksCurrentVersion >= SMART_BOOKMARKS_VERSION) {
       return;
     }
 
     try {
@@ -2394,17 +2394,17 @@ BrowserGlue.prototype = {
                                                      index: menuIndex });
         // Don't add a separator if the menu was empty or there is one already.
         if (bm && bm.type != PlacesUtils.bookmarks.TYPE_SEPARATOR) {
           yield PlacesUtils.bookmarks.insert({ type: PlacesUtils.bookmarks.TYPE_SEPARATOR,
                                                parentGuid: PlacesUtils.bookmarks.menuGuid,
                                                index: menuIndex });
         }
       }
-    } catch(ex) {
+    } catch (ex) {
       Cu.reportError(ex);
     } finally {
       Services.prefs.setIntPref(SMART_BOOKMARKS_PREF, SMART_BOOKMARKS_VERSION);
       Services.prefs.savePrefFile(null);
     }
   }),
 
   /**
--- a/browser/components/places/PlacesUIUtils.jsm
+++ b/browser/components/places/PlacesUIUtils.jsm
@@ -1145,26 +1145,26 @@ this.PlacesUIUtils = {
         }
         // removeItemAnnotation does not check if item exists, nor the anno,
         // so this is safe to do.
         as.removeItemAnnotation(aItemId, PlacesUIUtils.ORGANIZER_FOLDER_ANNO);
         as.removeItemAnnotation(aItemId, PlacesUIUtils.ORGANIZER_QUERY_ANNO);
         // This will throw if the annotation is an orphan.
         bs.removeItem(aItemId);
       }
-      catch(e) { /* orphan anno */ }
+      catch (e) { /* orphan anno */ }
     }
 
     // Returns true if item really exists, false otherwise.
     function itemExists(aItemId) {
       try {
         bs.getItemIndex(aItemId);
         return true;
       }
-      catch(e) {
+      catch (e) {
         return false;
       }
     }
 
     // Get all items marked as being the left pane folder.
     let items = as.getItemsWithAnnotation(this.ORGANIZER_FOLDER_ANNO);
     if (items.length > 1) {
       // Something went wrong, we cannot have more than one left pane folder,
@@ -1457,17 +1457,17 @@ this.PlacesUIUtils = {
       defGetter("title", () => PlacesUtils.bookmarks.getItemTitle(itemId));
 
     if (!("uri" in aNodeLike)) {
       defGetter("uri", () => {
         let uri = null;
         try {
           uri = PlacesUtils.bookmarks.getBookmarkURI(itemId);
         }
-        catch(ex) { }
+        catch (ex) { }
         return uri ? uri.spec : "";
       });
     }
 
     if (!("type" in aNodeLike)) {
       defGetter("type", () => {
         if (aNodeLike.uri.length > 0) {
           if (/^place:/.test(aNodeLike.uri)) {
@@ -1564,17 +1564,17 @@ XPCOMUtils.defineLazyGetter(PlacesUIUtil
   return Services.prefs.getComplexValue("intl.ellipsis",
                                         Ci.nsIPrefLocalizedString).data;
 });
 
 XPCOMUtils.defineLazyGetter(PlacesUIUtils, "useAsyncTransactions", function() {
   try {
     return Services.prefs.getBoolPref("browser.places.useAsyncTransactions");
   }
-  catch(ex) { }
+  catch (ex) { }
   return false;
 });
 
 XPCOMUtils.defineLazyServiceGetter(this, "URIFixup",
                                    "@mozilla.org/docshell/urifixup;1",
                                    "nsIURIFixup");
 
 XPCOMUtils.defineLazyGetter(this, "bundle", function() {
--- a/browser/components/places/content/controller.js
+++ b/browser/components/places/content/controller.js
@@ -1105,17 +1105,17 @@ PlacesController.prototype = {
       let xferable = Cc["@mozilla.org/widget/transferable;1"].
                      createInstance(Ci.nsITransferable);
       xferable.init(null);
       xferable.addDataFlavor(PlacesUtils.TYPE_X_MOZ_PLACE_ACTION)
       this.clipboard.getData(xferable, Ci.nsIClipboard.kGlobalClipboard);
       xferable.getTransferData(PlacesUtils.TYPE_X_MOZ_PLACE_ACTION, action, {});
       [action, actionOwner] =
         action.value.QueryInterface(Ci.nsISupportsString).data.split(",");
-    } catch(ex) {
+    } catch (ex) {
       // Paste from external sources don't have any associated action, just
       // fallback to a copy action.
       return "copy";
     }
     // For cuts also check who inited the action, since cuts across different
     // instances should instead be handled as copies (The sources are not
     // available for this instance).
     if (action == "cut" && actionOwner != this.profileName)
@@ -1283,17 +1283,17 @@ PlacesController.prototype = {
 
     // Now get the clipboard contents, in the best available flavor.
     let data = {}, type = {}, items = [];
     try {
       xferable.getAnyTransferData(type, data, {});
       data = data.value.QueryInterface(Ci.nsISupportsString).data;
       type = type.value;
       items = PlacesUtils.unwrapNodes(data, type);
-    } catch(ex) {
+    } catch (ex) {
       // No supported data exists or nodes unwrap failed, just bail out.
       return;
     }
 
     let itemsToSelect = [];
     if (PlacesUIUtils.useAsyncTransactions) {
       if (ip.isTag) {
         let uris = items.filter(item => "uri" in item).map(item => NetUtil.newURI(item.uri));
@@ -1605,17 +1605,17 @@ var PlacesControllerDragHelper = {
         let uri = data.linkedBrowser.currentURI;
         let spec = uri ? uri.spec : "about:blank";
         let title = data.label;
         unwrapped = { uri: spec,
                       title: data.label,
                       type: PlacesUtils.TYPE_X_MOZ_URL};
       }
       else
-        throw("bogus data was passed as a tab")
+        throw new Error("bogus data was passed as a tab");
 
       let index = insertionPoint.index;
 
       // Adjust insertion index to prevent reversal of dragged items. When you
       // drag multiple elts upward: need to increment index or each successive
       // elt will be inserted at the same index, each above the previous.
       let dragginUp = insertionPoint.itemId == unwrapped.parent &&
                       index < PlacesUtils.bookmarks.getItemIndex(unwrapped.id);
--- a/browser/components/places/content/editBookmarkOverlay.js
+++ b/browser/components/places/content/editBookmarkOverlay.js
@@ -596,17 +596,17 @@ var gEditItemOverlay = {
   onLocationFieldChange() {
     if (this.readOnly || !this._paneInfo.isBookmark)
       return;
 
     let newURI;
     try {
       newURI = PlacesUIUtils.createFixedURI(this._locationField.value);
     }
-    catch(ex) {
+    catch (ex) {
       // TODO: Bug 1089141 - Provide some feedback about the invalid url.
       return;
     }
 
     if (this._paneInfo.uri.equals(newURI))
       return;
 
     if (!PlacesUIUtils.useAsyncTransactions) {
--- a/browser/components/places/content/places.js
+++ b/browser/components/places/content/places.js
@@ -517,17 +517,17 @@ var PlacesOrganizer = {
     if (!prompts.confirm(null,
                          PlacesUIUtils.getString("bookmarksRestoreAlertTitle"),
                          PlacesUIUtils.getString("bookmarksRestoreAlert")))
       return;
 
     Task.spawn(function* () {
       try {
         yield BookmarkJSONUtils.importFromFile(aFilePath, true);
-      } catch(ex) {
+      } catch (ex) {
         PlacesOrganizer._showErrorAlert(PlacesUIUtils.getString("bookmarksRestoreParseError"));
       }
     });
   },
 
   _showErrorAlert: function PO__showErrorAlert(aMsg) {
     var brandShortName = document.getElementById("brandStrings").
                                   getString("brandShortName");
@@ -1231,17 +1231,17 @@ var ViewMenu = {
       lastModified: { key: "LASTMODIFIED", dir: "descending" },
       description:  { key: "ANNOTATION",
                       dir: "ascending",
                       anno: PlacesUIUtils.DESCRIPTION_ANNO }
     };
 
     // Make sure we have a valid column.
     if (!colLookupTable.hasOwnProperty(columnId))
-      throw("Invalid column");
+      throw new Error("Invalid column");
 
     // Use a default sort direction if none has been specified.  If aDirection
     // is invalid, result.sortingMode will be undefined, which has the effect
     // of unsorting the tree.
     aDirection = (aDirection || colLookupTable[columnId].dir).toUpperCase();
 
     var sortConst = "SORT_BY_" + colLookupTable[columnId].key + "_" + aDirection;
     result.sortingAnnotation = colLookupTable[columnId].anno || "";
@@ -1275,17 +1275,17 @@ var ContentArea = {
         let { view, options } = this._specialViews.get(aQueryString);
         if (typeof view == "function") {
           view = view();
           this._specialViews.set(aQueryString, { view: view, options: options });
         }
         return view;
       }
     }
-    catch(ex) {
+    catch (ex) {
       Components.utils.reportError(ex);
     }
     return ContentTree.view;
   },
 
   /**
    * Sets a custom view to be used rather than the default places tree
    * whenever the given query is selected in the left pane.
--- a/browser/components/places/content/tree.xml
+++ b/browser/components/places/content/tree.xml
@@ -42,17 +42,17 @@
                 onget="return this._controller"/>
 
       <!-- overriding -->
       <property name="view">
         <getter><![CDATA[
           try {
             return this.treeBoxObject.view.wrappedJSObject || null;
           }
-          catch(e) {
+          catch (e) {
             return null;
           }
         ]]></getter>
         <setter><![CDATA[
           return this.treeBoxObject.view = val;
         ]]></setter>
       </property>
 
--- a/browser/components/places/content/treeView.js
+++ b/browser/components/places/content/treeView.js
@@ -1106,17 +1106,17 @@ PlacesTreeView.prototype = {
     return this._getNodeForRow(aIndex);
   },
 
   treeIndexForNode: function PTV_treeNodeForIndex(aNode) {
     // The API allows passing invisible nodes.
     try {
       return this._getRowForNode(aNode, true);
     }
-    catch(ex) { }
+    catch (ex) { }
 
     return Ci.nsINavHistoryResultTreeViewer.INDEX_INVISIBLE;
   },
 
   // nsITreeView
   get rowCount() {
     return this._rows.length;
   },
--- a/browser/components/places/tests/browser/browser_library_middleclick.js
+++ b/browser/components/places/tests/browser/browser_library_middleclick.js
@@ -254,17 +254,17 @@ function runNextTest() {
 
     // Remove tabs listeners.
     gBrowser.tabContainer.removeEventListener("TabOpen", gTabsListener, false);
     gBrowser.removeTabsProgressListener(gTabsListener);
 
     // Restore history.
     try {
       gPrefService.clearUserPref(ENABLE_HISTORY_PREF);
-    } catch(ex) {}
+    } catch (ex) {}
 
     finish();
   }
 }
 
 function mouseEventOnCell(aTree, aRowIndex, aColumnIndex, aEventDetails) {
   var selection = aTree.view.selection;
   selection.select(aRowIndex);
--- a/browser/components/places/tests/unit/head_bookmarks.js
+++ b/browser/components/places/tests/unit/head_bookmarks.js
@@ -120,10 +120,10 @@ var waitForResolvedPromise = Task.async(
   let tries = 0;
   do {
     try {
       let value = yield promiseFn();
       return value;
     } catch (ex) {}
     yield new Promise(resolve => do_timeout(SINGLE_TRY_TIMEOUT, resolve));
   } while (++tries <= tryCount);
-  throw(timeoutMsg);
+  throw new Error(timeoutMsg);
 });
--- a/browser/components/places/tests/unit/test_PUIU_makeTransaction.js
+++ b/browser/components/places/tests/unit/test_PUIU_makeTransaction.js
@@ -157,17 +157,17 @@ add_test(function test_container()
     let txn = PlacesUIUtils.makeTransaction(
       wrapNodeByIdAndParent(aData.id, PlacesUtils.unfiledBookmarksFolderId),
       0, // Unused for real nodes.
       PlacesUtils.unfiledBookmarksFolderId,
       PlacesUtils.bookmarks.DEFAULT_INDEX,
       true
     );
     PlacesUtils.transactionManager.doTransaction(txn);
-    } catch(ex) {
+    } catch (ex) {
       do_throw(ex);
     }
   }, "random-anno");
 
   let id = PlacesUtils.bookmarks.createFolder(PlacesUtils.unfiledBookmarksFolderId,
                                               TEST_TITLE,
                                               PlacesUtils.bookmarks.DEFAULT_INDEX);
   PlacesUtils.annotations.setItemAnnotation(id, PlacesUIUtils.DESCRIPTION_ANNO,
@@ -215,17 +215,17 @@ add_test(function test_separator()
     let txn = PlacesUIUtils.makeTransaction(
       wrapNodeByIdAndParent(aData.id, PlacesUtils.unfiledBookmarksFolderId),
       0, // Unused for real nodes.
       PlacesUtils.unfiledBookmarksFolderId,
       PlacesUtils.bookmarks.DEFAULT_INDEX,
       true
     );
     PlacesUtils.transactionManager.doTransaction(txn);
-    } catch(ex) {
+    } catch (ex) {
       do_throw(ex);
     }
   }, "random-anno");
 
   let id = PlacesUtils.bookmarks.insertSeparator(PlacesUtils.unfiledBookmarksFolderId,
                                                  PlacesUtils.bookmarks.DEFAULT_INDEX);
   PlacesUtils.annotations.setItemAnnotation(id, "random-anno",
                                             "random-value", 0,
@@ -275,17 +275,17 @@ add_test(function test_bookmark()
     let txn = PlacesUIUtils.makeTransaction(
       wrapNodeByIdAndParent(aData.id, PlacesUtils.unfiledBookmarksFolderId),
       0, // Unused for real nodes.
       PlacesUtils.unfiledBookmarksFolderId,
       PlacesUtils.bookmarks.DEFAULT_INDEX,
       true
     );
     PlacesUtils.transactionManager.doTransaction(txn);
-    } catch(ex) {
+    } catch (ex) {
       do_throw(ex);
     }
   }, "random-anno");
 
   let id = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                                                 NetUtil.newURI(TEST_URL),
                                                 PlacesUtils.bookmarks.DEFAULT_INDEX,
                                                 TEST_TITLE);
@@ -325,17 +325,17 @@ add_test(function test_visit()
     let txn = PlacesUIUtils.makeTransaction(
       node,
       0, // Unused for real nodes.
       PlacesUtils.unfiledBookmarksFolderId,
       PlacesUtils.bookmarks.DEFAULT_INDEX,
       true
     );
     PlacesUtils.transactionManager.doTransaction(txn);
-    } catch(ex) {
+    } catch (ex) {
       do_throw(ex);
     }
   });
 
   PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                                        NetUtil.newURI(TEST_URL),
                                        PlacesUtils.bookmarks.DEFAULT_INDEX,
                                        TEST_TITLE);
--- a/browser/components/syncedtabs/SyncedTabsListStore.js
+++ b/browser/components/syncedtabs/SyncedTabsListStore.js
@@ -113,17 +113,17 @@ Object.assign(SyncedTabsListStore.protot
       this.selectRow(branchRow + 1);
       return;
     }
 
     if (branchRow < 0) {
       this.selectRow(0, -1);
     } else if ((!branch.tabs.length || childRow >= branch.tabs.length - 1 || !this._isOpen(branch)) && branchRow < this.data.length) {
       this.selectRow(branchRow + 1, -1);
-    } else if(childRow < branch.tabs.length) {
+    } else if (childRow < branch.tabs.length) {
       this.selectRow(branchRow, childRow + 1);
     }
   },
 
   moveSelectionUp() {
     let branchRow = this._selectedRow[0];
     let childRow = this._selectedRow[1];
     let branch = this.data[branchRow];
--- a/browser/components/uitour/UITour.jsm
+++ b/browser/components/uitour/UITour.jsm
@@ -1807,17 +1807,17 @@ this.UITour = {
         props.forEach(property => appinfo[property] = Services.appinfo[property]);
 
         // Identifier of the partner repack, as stored in preference "distribution.id"
         // and included in Firefox and other update pings. Note this is not the same as
         // Services.appinfo.distributionID (value of MOZ_DISTRIBUTION_ID is set at build time).
         let distribution = "default";
         try {
           distribution = Services.prefs.getDefaultBranch("distribution.").getCharPref("id");
-        } catch(e) {}
+        } catch (e) {}
         appinfo["distribution"] = distribution;
 
         let isDefaultBrowser = null;
         try {
           let shell = aWindow.getShellService();
           if (shell) {
             isDefaultBrowser = shell.isDefaultBrowser(false);
           }
--- a/browser/experiments/Experiments.jsm
+++ b/browser/experiments/Experiments.jsm
@@ -2169,17 +2169,17 @@ this.Experiments.PreviousExperimentProvi
     this._log.trace("startup()");
     Services.obs.addObserver(this, EXPERIMENTS_CHANGED_TOPIC, false);
   },
 
   shutdown: function () {
     this._log.trace("shutdown()");
     try {
       Services.obs.removeObserver(this, EXPERIMENTS_CHANGED_TOPIC);
-    } catch(e) {
+    } catch (e) {
       // Prevent crash in mochitest-browser3 on Mulet
     }
   },
 
   observe: function (subject, topic, data) {
     switch (topic) {
       case EXPERIMENTS_CHANGED_TOPIC:
         this._updateExperimentList();
--- a/browser/extensions/pocket/content/main.js
+++ b/browser/extensions/pocket/content/main.js
@@ -462,17 +462,17 @@ var pktUI = (function() {
             })
         });
 
         var _initL10NMessageId = "initL10N";
         pktUIMessaging.addMessageListener(_initL10NMessageId, function(panelId, data) {
             var strings = {};
             var bundle = Services.strings.createBundle("chrome://pocket/locale/pocket.properties");
             var e = bundle.getSimpleEnumeration();
-            while(e.hasMoreElements()) {
+            while (e.hasMoreElements()) {
                 var str = e.getNext().QueryInterface(Components.interfaces.nsIPropertyElement);
                 strings[str.key] = str.value;
             }
             pktUIMessaging.sendResponseMessageToPanel(panelId, _initL10NMessageId, { strings: strings });
         });
 
     }
 
--- a/browser/extensions/pocket/content/panels/js/saved.js
+++ b/browser/extensions/pocket/content/panels/js/saved.js
@@ -188,17 +188,17 @@ var PKT_SAVED_OVERLAY = function (option
                 }
                 if (!$('.token-input-dropdown-tag').data('init')) {
                     $('.token-input-dropdown-tag').css('width',inputwrapper.outerWidth()).data('init');
                     inputwrapper.append($('.token-input-dropdown-tag'));
                 }
                 cb(returnlist);
             },
             textToData: function(text) {
-                if($.trim(text).length > 25 || !$.trim(text).length) {
+                if ($.trim(text).length > 25 || !$.trim(text).length) {
                     if (text.length > 25) {
                         myself.showTagsError(myself.dictJSON.maxtaglength);
                         changestamp = Date.now();
                         setTimeout(function() {
                             $('.token-input-input-token input').val(text).focus();
                         },10);
                     }
                     return null;
@@ -586,17 +586,17 @@ PKT_SAVED.prototype = {
             myself.overlay.showStateSaved(resp);
         });
 
     }
 }
 
 $(function()
 {
-    if(!window.thePKT_SAVED) {
+    if (!window.thePKT_SAVED) {
         var thePKT_SAVED = new PKT_SAVED();
         window.thePKT_SAVED = thePKT_SAVED;
         thePKT_SAVED.init();
     }
 
     // send an async message to get string data
     thePKT_SAVED.sendMessage("initL10N", {}, function(resp) {
         window.pocketStrings = resp.strings;
--- a/browser/extensions/pocket/content/panels/js/signup.js
+++ b/browser/extensions/pocket/content/panels/js/signup.js
@@ -162,17 +162,17 @@ PKT_SIGNUP.prototype = {
 
         // tell back end we're ready
         thePKT_SIGNUP.sendMessage("show");
     }
 }
 
 $(function()
 {
-    if(!window.thePKT_SIGNUP) {
+    if (!window.thePKT_SIGNUP) {
         var thePKT_SIGNUP = new PKT_SIGNUP();
         window.thePKT_SIGNUP = thePKT_SIGNUP;
         thePKT_SIGNUP.init();
     }
 
     // send an async message to get string data
     thePKT_SIGNUP.sendMessage("initL10N", {}, function(resp) {
         window.pocketStrings = resp.strings;
--- a/browser/extensions/pocket/content/pktApi.jsm
+++ b/browser/extensions/pocket/content/pktApi.jsm
@@ -294,17 +294,17 @@ var pktApi = (function() {
         };
 
         // Set headers
         request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
         request.setRequestHeader('X-Accept',' application/json');
 
         // Serialize and Fire off the request
         var str = [];
-        for(var p in data) {
+        for (var p in data) {
             if (data.hasOwnProperty(p)) {
                 str.push(encodeURIComponent(p) + "=" + encodeURIComponent(data[p]));
             }
         }
 
         request.send(str.join("&"));
 
         return true;
--- a/browser/modules/BrowserUITelemetry.jsm
+++ b/browser/modules/BrowserUITelemetry.jsm
@@ -185,17 +185,17 @@ this.BrowserUITelemetry = {
 
     Services.obs.addObserver(this, "sessionstore-windows-restored", false);
     Services.obs.addObserver(this, "browser-delayed-startup-finished", false);
     Services.obs.addObserver(this, "autocomplete-did-enter-text", false);
     CustomizableUI.addListener(this);
   },
 
   observe: function(aSubject, aTopic, aData) {
-    switch(aTopic) {
+    switch (aTopic) {
       case "sessionstore-windows-restored":
         this._gatherFirstWindowMeasurements();
         break;
       case "browser-delayed-startup-finished":
         this._registerWindow(aSubject);
         break;
       case "autocomplete-did-enter-text":
         let input = aSubject.QueryInterface(Ci.nsIAutoCompleteInput);
@@ -345,17 +345,17 @@ this.BrowserUITelemetry = {
       let item = document.getElementById(itemID);
       if (item) {
         item.removeEventListener("mousedown", this);
       }
     }
   },
 
   handleEvent: function(aEvent) {
-    switch(aEvent.type) {
+    switch (aEvent.type) {
       case "unload":
         this._unregisterWindow(aEvent.currentTarget);
         break;
       case "mouseup":
         this._handleMouseUp(aEvent);
         break;
       case "mousedown":
         this._handleMouseDown(aEvent);
--- a/browser/modules/BrowserUsageTelemetry.jsm
+++ b/browser/modules/BrowserUsageTelemetry.jsm
@@ -120,31 +120,31 @@ let BrowserUsageTelemetry = {
 
   uninit() {
     Services.obs.removeObserver(this, DOMWINDOW_OPENED_TOPIC, false);
     Services.obs.removeObserver(this, TELEMETRY_SUBSESSIONSPLIT_TOPIC, false);
     Services.obs.removeObserver(this, WINDOWS_RESTORED_TOPIC, false);
   },
 
   observe(subject, topic, data) {
-    switch(topic) {
+    switch (topic) {
       case WINDOWS_RESTORED_TOPIC:
         this._setupAfterRestore();
         break;
       case DOMWINDOW_OPENED_TOPIC:
         this._onWindowOpen(subject);
         break;
       case TELEMETRY_SUBSESSIONSPLIT_TOPIC:
         this.afterSubsessionSplit();
         break;
     }
   },
 
   handleEvent(event) {
-    switch(event.type) {
+    switch (event.type) {
       case "TabOpen":
         this._onTabOpen();
         break;
       case "unload":
         this._unregisterWindow(event.target);
         break;
     }
   },
--- a/browser/modules/CaptivePortalWatcher.jsm
+++ b/browser/modules/CaptivePortalWatcher.jsm
@@ -58,17 +58,17 @@ this.CaptivePortalWatcher = {
       return;
     }
     Services.obs.removeObserver(this, "captive-portal-login");
     Services.obs.removeObserver(this, "captive-portal-login-abort");
     Services.obs.removeObserver(this, "captive-portal-login-success");
   },
 
   observe(subject, topic, data) {
-    switch(topic) {
+    switch (topic) {
       case "captive-portal-login":
         this._addCaptivePortalTab();
         break;
       case "captive-portal-login-abort":
       case "captive-portal-login-success":
         this._captivePortalGone();
         break;
       case "xul-window-visible":
--- a/browser/modules/ContentCrashHandlers.jsm
+++ b/browser/modules/ContentCrashHandlers.jsm
@@ -77,17 +77,17 @@ this.TabCrashHandler = {
     }
   },
 
   receiveMessage: function(message) {
     let browser = message.target.browser;
     let gBrowser = browser.ownerGlobal.gBrowser;
     let tab = gBrowser.getTabForBrowser(browser);
 
-    switch(message.name) {
+    switch (message.name) {
       case "Load": {
         this.onAboutTabCrashedLoad(message);
         break;
       }
 
       case "RemotePage:Unload": {
         this.onAboutTabCrashedUnload(message);
         break;
@@ -340,17 +340,17 @@ this.PluginCrashReporter = {
   uninit() {
     Services.obs.removeObserver(this, "plugin-crashed", false);
     Services.obs.removeObserver(this, "gmp-plugin-crash", false);
     Services.obs.removeObserver(this, "profile-after-change", false);
     this.initialized = false;
   },
 
   observe(subject, topic, data) {
-    switch(topic) {
+    switch (topic) {
       case "plugin-crashed": {
         let propertyBag = subject;
         if (!(propertyBag instanceof Ci.nsIPropertyBag2) ||
             !(propertyBag instanceof Ci.nsIWritablePropertyBag2) ||
             !propertyBag.hasKey("runID") ||
             !propertyBag.hasKey("pluginDumpID")) {
           Cu.reportError("PluginCrashReporter can not read plugin information.");
           return;
--- a/browser/modules/ContentLinkHandler.jsm
+++ b/browser/modules/ContentLinkHandler.jsm
@@ -134,14 +134,14 @@ this.ContentLinkHandler = {
     }
   },
 
   getLinkIconURI: function(aLink) {
     let targetDoc = aLink.ownerDocument;
     var uri = BrowserUtils.makeURI(aLink.href, targetDoc.characterSet);
     try {
       uri.userPass = "";
-    } catch(e) {
+    } catch (e) {
       // some URIs are immutable
     }
     return uri;
   },
 };
--- a/browser/modules/ContentObservers.jsm
+++ b/browser/modules/ContentObservers.jsm
@@ -38,17 +38,17 @@ var gDecoderDoctorObserver = function(su
 function getMessageManagerForWindow(aContentWindow) {
   let ir = aContentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                          .getInterface(Ci.nsIDocShell)
                          .sameTypeRootTreeItem
                          .QueryInterface(Ci.nsIInterfaceRequestor);
   try {
     // If e10s is disabled, this throws NS_NOINTERFACE for closed tabs.
     return ir.getInterface(Ci.nsIContentFrameMessageManager);
-  } catch(e) {
+  } catch (e) {
     if (e.result == Cr.NS_NOINTERFACE) {
       return null;
     }
     throw e;
   }
 }
 
 Services.obs.addObserver(gEMEUIObserver, "mediakeys-request", false);
--- a/browser/modules/ContentWebRTC.jsm
+++ b/browser/modules/ContentWebRTC.jsm
@@ -353,17 +353,17 @@ function getInnerWindowIDForWindow(aCont
 function getMessageManagerForWindow(aContentWindow) {
   let ir = aContentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                          .getInterface(Ci.nsIDocShell)
                          .sameTypeRootTreeItem
                          .QueryInterface(Ci.nsIInterfaceRequestor);
   try {
     // If e10s is disabled, this throws NS_NOINTERFACE for closed tabs.
     return ir.getInterface(Ci.nsIContentFrameMessageManager);
-  } catch(e) {
+  } catch (e) {
     if (e.result == Cr.NS_NOINTERFACE) {
       return null;
     }
     throw e;
   }
 }
 
 function processShutdown() {
--- a/browser/modules/DirectoryLinksProvider.jsm
+++ b/browser/modules/DirectoryLinksProvider.jsm
@@ -223,17 +223,17 @@ var DirectoryLinksProvider = {
     if (!Services.prefs.prefHasUserValue(PREF_NEWTAB_ENHANCED)) {
       let enhanced = Services.prefs.getBoolPref(PREF_NEWTAB_ENHANCED);
       try {
         // Default to not enhanced if DNT is set to tell websites to not track
         if (Services.prefs.getBoolPref("privacy.donottrackheader.enabled")) {
           enhanced = false;
         }
       }
-      catch(ex) {}
+      catch (ex) {}
       Services.prefs.setBoolPref(PREF_NEWTAB_ENHANCED, enhanced);
     }
   },
 
   observe: function DirectoryLinksProvider_observe(aSubject, aTopic, aData) {
     if (aTopic == "nsPref:changed") {
       switch (aData) {
         // Re-set the default in case the user clears the pref
@@ -604,17 +604,17 @@ var DirectoryLinksProvider = {
     try {
       // A malformed url will not be allowed
       let uri = Services.io.newURI(url, null, null);
       scheme = uri.scheme;
 
       // URIs without base domains will be allowed
       base = Services.eTLD.getBaseDomain(uri);
     }
-    catch(ex) {}
+    catch (ex) {}
     // Require a scheme match and the base only if desired
     return allowed.has(scheme) && (!checkBase || ALLOWED_URL_BASE.has(base));
   },
 
   _escapeChars(text) {
     let charMap = {
       '&': '&amp;',
       '<': '&lt;',
--- a/browser/modules/Feeds.jsm
+++ b/browser/modules/Feeds.jsm
@@ -89,16 +89,16 @@ this.Feeds = {
       let principalURI = BrowserUtils.makeURIFromCPOW(aPrincipal.URI);
       let principalToCheck =
         Services.scriptSecurityManager.createCodebasePrincipal(principalURI, aPrincipal.originAttributes);
       try {
         BrowserUtils.urlSecurityCheck(aLink.href, principalToCheck,
                                       Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL);
         return type || "application/rss+xml";
       }
-      catch(ex) {
+      catch (ex) {
       }
     }
 
     return null;
   },
 
 };
--- a/browser/modules/Social.jsm
+++ b/browser/modules/Social.jsm
@@ -41,17 +41,17 @@ function promiseSetAnnotation(aURI, prov
     try {
       if (providerList && providerList.length > 0) {
         PlacesUtils.annotations.setPageAnnotation(
           aURI, "social/mark", JSON.stringify(providerList), 0,
           PlacesUtils.annotations.EXPIRE_WITH_HISTORY);
       } else {
         PlacesUtils.annotations.removePageAnnotation(aURI, "social/mark");
       }
-    } catch(e) {
+    } catch (e) {
       Cu.reportError("SocialAnnotation failed: " + e);
     }
     deferred.resolve();
   }, Ci.nsIThread.DISPATCH_NORMAL);
 
   return deferred.promise;
 }
 
--- a/browser/modules/offlineAppCache.jsm
+++ b/browser/modules/offlineAppCache.jsm
@@ -10,11 +10,11 @@ const Cc = Components.classes;
 const Ci = Components.interfaces;
 
 this.OfflineAppCacheHelper = {
   clear: function() {
     var cacheService = Cc["@mozilla.org/netwerk/cache-storage-service;1"].getService(Ci.nsICacheStorageService);
     var appCacheStorage = cacheService.appCacheStorage(LoadContextInfo.default, null);
     try {
       appCacheStorage.asyncEvictStorage(null);
-    } catch(er) {}
+    } catch (er) {}
   }
 };
--- a/toolkit/.eslintrc
+++ b/toolkit/.eslintrc
@@ -39,17 +39,17 @@
 
     // Two space indent
     // "indent": [2, 2, { "SwitchCase": 1 }],
 
     // Space after colon not before in property declarations
     // "key-spacing": [2, { "beforeColon": false, "afterColon": true, "mode": "minimum" }],
 
     // Require spaces before and after keywords
-    // "keyword-spacing": 2,
+    "keyword-spacing": 2,
 
     // Unix linebreaks
     "linebreak-style": [2, "unix"],
 
     // Always require parenthesis for new calls
     // "new-parens": 2,
 
     // Use [] instead of Array()
--- a/toolkit/components/aboutmemory/content/aboutMemory.js
+++ b/toolkit/components/aboutmemory/content/aboutMemory.js
@@ -2022,17 +2022,17 @@ function saveReportsToFile()
     if (aResult == Ci.nsIFilePicker.returnOK ||
         aResult == Ci.nsIFilePicker.returnReplace) {
       fpFinish(fp.file);
     }
   };
 
   try {
     fp.init(window, "Save Memory Reports", Ci.nsIFilePicker.modeSave);
-  } catch(ex) {
+  } catch (ex) {
     // This will fail on Android, since there is no Save as file picker there.
     // Just save to the default downloads dir if it does.
     Downloads.getSystemDownloadsDirectory().then(function(dirPath) {
       let file = FileUtils.File(dirPath);
       file.append(fp.defaultString);
       fpFinish(file);
     });
 
--- a/toolkit/components/aboutperformance/tests/browser/browser_aboutperformance.js
+++ b/toolkit/components/aboutperformance/tests/browser/browser_aboutperformance.js
@@ -267,17 +267,17 @@ add_task(function* test_close_tab() {
         yield promiseContentResponse(tab.linkedBrowser, "aboutperformance-test:setTitle", URL);
 
         let {ok, found, error} = yield promiseContentResponse(gTabAboutPerformance.linkedBrowser, "aboutperformance-test:closeTab", {url: URL, autoRefresh: true, mode, displayRecent});
         Assert.ok(ok, `Message aboutperformance-test:closeTab was handled correctly ${JSON.stringify(error)}`);
         info(`URL ${URL} ${found?"found":"hasn't been found yet"}`);
         if (found) {
           break;
         }
-      } while(true);
+      } while (true);
 
       if (mode == "close") {
         info(`Waiting for close`);
         yield promiseClosed;
       } else {
         info(`Waiting for reload`);
         yield promiseReloaded;
         yield BrowserTestUtils.removeTab(tab);
--- a/toolkit/components/addoncompat/RemoteAddonsChild.jsm
+++ b/toolkit/components/addoncompat/RemoteAddonsChild.jsm
@@ -261,23 +261,23 @@ AboutProtocolChannel.prototype = {
     // Return the data via an nsIStringInputStream.
     let stream = Cc["@mozilla.org/io/string-input-stream;1"].createInstance(Ci.nsIStringInputStream);
     stream.setData(data, data.length);
 
     let runnable = {
       run: () => {
         try {
           listener.onStartRequest(this, context);
-        } catch(e) {}
+        } catch (e) {}
         try {
           listener.onDataAvailable(this, context, stream, 0, stream.available());
-        } catch(e) {}
+        } catch (e) {}
         try {
           listener.onStopRequest(this, context, Cr.NS_OK);
-        } catch(e) {}
+        } catch (e) {}
       }
     };
     Services.tm.currentThread.dispatch(runnable, Ci.nsIEventTarget.DISPATCH_NORMAL);
   },
 
   asyncOpen2: function(listener) {
     // throws an error if security checks fail
     var outListener = contentSecManager.performSecurityCheck(this, listener);
@@ -530,17 +530,17 @@ var RemoteAddonsChild = {
       ContentPolicyChild,
       AboutProtocolChild,
       ObserverChild,
     ];
 
     for (let shim of shims) {
       try {
         shim.init();
-      } catch(e) {
+      } catch (e) {
         Cu.reportError(e);
       }
     }
   },
 
   init: function(global) {
 
     if (!this._ready) {
@@ -560,17 +560,17 @@ var RemoteAddonsChild = {
     // Return this so it gets rooted in the content script.
     return [new EventTargetChild(global), sandboxChild];
   },
 
   uninit: function(perTabShims) {
     for (let shim of perTabShims) {
       try {
         shim.uninit();
-      } catch(e) {
+      } catch (e) {
         Cu.reportError(e);
       }
     }
   },
 
   get useSyncWebProgress() {
     return NotificationTracker.getCount("web-progress") > 0;
   },
--- a/toolkit/components/addoncompat/tests/addon/bootstrap.js
+++ b/toolkit/components/addoncompat/tests/addon/bootstrap.js
@@ -284,23 +284,23 @@ function testAboutModuleRegistration()
 
   TestChannel.prototype = {
     asyncOpen: function(listener, context) {
       let stream = this.open();
       let runnable = {
         run: () => {
           try {
             listener.onStartRequest(this, context);
-          } catch(e) {}
+          } catch (e) {}
           try {
             listener.onDataAvailable(this, context, stream, 0, stream.available());
-          } catch(e) {}
+          } catch (e) {}
           try {
             listener.onStopRequest(this, context, Cr.NS_OK);
-          } catch(e) {}
+          } catch (e) {}
         }
       };
       Services.tm.currentThread.dispatch(runnable, Ci.nsIEventTarget.DISPATCH_NORMAL);
     },
 
     asyncOpen2: function(listener) {
       // throws an error if security checks fail
       var outListener = contentSecManager.performSecurityCheck(this, listener);
@@ -308,23 +308,23 @@ function testAboutModuleRegistration()
     },
 
     open: function() {
       function getWindow(channel) {
         try
         {
           if (channel.notificationCallbacks)
             return channel.notificationCallbacks.getInterface(Ci.nsILoadContext).associatedWindow;
-        } catch(e) {}
+        } catch (e) {}
 
         try
         {
           if (channel.loadGroup && channel.loadGroup.notificationCallbacks)
             return channel.loadGroup.notificationCallbacks.getInterface(Ci.nsILoadContext).associatedWindow;
-        } catch(e) {}
+        } catch (e) {}
 
         return null;
       }
 
       let data = `<html><h1>${this.aboutName}</h1></html>`;
       let wnd = getWindow(this);
       if (!wnd)
         throw Cr.NS_ERROR_UNEXPECTED;
@@ -441,37 +441,37 @@ function testAboutModuleRegistration()
    */
   let testAboutModulesWork = (browser) => {
     let testConnection = () => {
       let request = new content.XMLHttpRequest();
       try {
         request.open("GET", "about:test1", false);
         request.send(null);
         if (request.status != 200) {
-          throw(`about:test1 response had status ${request.status} - expected 200`);
+          throw (`about:test1 response had status ${request.status} - expected 200`);
         }
         if (request.responseText.indexOf("test1") == -1) {
-          throw(`about:test1 response had result ${request.responseText}`);
+          throw (`about:test1 response had result ${request.responseText}`);
         }
 
         request = new content.XMLHttpRequest();
         request.open("GET", "about:test2", false);
         request.send(null);
 
         if (request.status != 200) {
-          throw(`about:test2 response had status ${request.status} - expected 200`);
+          throw (`about:test2 response had status ${request.status} - expected 200`);
         }
         if (request.responseText.indexOf("test2") == -1) {
-          throw(`about:test2 response had result ${request.responseText}`);
+          throw (`about:test2 response had result ${request.responseText}`);
         }
 
         sendAsyncMessage("test:result", {
           pass: true,
         });
-      } catch(e) {
+      } catch (e) {
         sendAsyncMessage("test:result", {
           pass: false,
           errorMsg: e.toString(),
         });
       }
     };
 
     return new Promise((resolve, reject) => {
--- a/toolkit/components/captivedetect/captivedetect.js
+++ b/toolkit/components/captivedetect/captivedetect.js
@@ -169,17 +169,17 @@ function LoginObserver(captivePortalDete
         }
       }
     },
 
     /*
      * Check if login activity is finished according to HTTP burst.
      */
     notify : function notify() {
-      switch(state) {
+      switch (state) {
         case LOGIN_OBSERVER_STATE_BURST:
           // Wait while network stays idle for a short period
           state = LOGIN_OBSERVER_STATE_VERIFY_NEEDED;
           // Fall though to start polling timer
         case LOGIN_OBSERVER_STATE_IDLE:
           if (waitForNetworkActivity) {
             timer.initWithCallback(this,
                                    captivePortalDetector._pollingTime,
@@ -208,17 +208,17 @@ function CaptivePortalDetector() {
   this._canonicalSiteURL = null;
   this._canonicalSiteExpectedContent = null;
 
   try {
     this._canonicalSiteURL =
       Services.prefs.getCharPref('captivedetect.canonicalURL');
     this._canonicalSiteExpectedContent =
       Services.prefs.getCharPref('captivedetect.canonicalContent');
-  } catch(e) {
+  } catch (e) {
     debug('canonicalURL or canonicalContent not set.')
   }
 
   this._maxWaitingTime =
     Services.prefs.getIntPref('captivedetect.maxWaitingTime');
   this._pollingTime =
     Services.prefs.getIntPref('captivedetect.pollingTime');
   this._maxRetryCount =
--- a/toolkit/components/commandlines/test/unit/test_bug666224.js
+++ b/toolkit/components/commandlines/test/unit/test_bug666224.js
@@ -1,6 +1,6 @@
 function run_test() {
     var cmdLine=Components.classes["@mozilla.org/toolkit/command-line;1"].createInstance(Components.interfaces.nsICommandLine);
     try {
         cmdLine.getArgument(cmdLine.length);
-    } catch(e) {}
+    } catch (e) {}
 }
--- a/toolkit/components/contentprefs/nsContentPrefService.js
+++ b/toolkit/components/contentprefs/nsContentPrefService.js
@@ -151,21 +151,21 @@ ContentPrefService.prototype = {
     if (this.__stmtSelectPrefsByName) {
       this.__stmtSelectPrefsByName.finalize();
       this.__stmtSelectPrefsByName = null;
     }
     if (this.__stmtDeleteSettingIfUnused) {
       this.__stmtDeleteSettingIfUnused.finalize();
       this.__stmtDeleteSettingIfUnused = null;
     }
-    if(this.__stmtSelectPrefs) {
+    if (this.__stmtSelectPrefs) {
       this.__stmtSelectPrefs.finalize();
       this.__stmtSelectPrefs = null;
     }
-    if(this.__stmtDeleteGroupIfUnused) {
+    if (this.__stmtDeleteGroupIfUnused) {
       this.__stmtDeleteGroupIfUnused.finalize();
       this.__stmtDeleteGroupIfUnused = null;
     }
     if (this.__stmtDeletePref) {
       this.__stmtDeletePref.finalize();
       this.__stmtDeletePref = null;
     }
     if (this.__stmtUpdatePref) {
@@ -354,17 +354,17 @@ ContentPrefService.prototype = {
       this._dbConnection.executeSimpleSQL("DELETE FROM prefs WHERE groupID IS NOT NULL");
       this._dbConnection.executeSimpleSQL("DELETE FROM groups");
       this._dbConnection.executeSimpleSQL(`
         DELETE FROM settings
         WHERE id NOT IN (SELECT DISTINCT settingID FROM prefs)
       `);
       this._dbConnection.commitTransaction();
     }
-    catch(ex) {
+    catch (ex) {
       this._dbConnection.rollbackTransaction();
       throw ex;
     }
   },
 
   removePrefsByName: function ContentPrefService_removePrefsByName(aName, aContext) {
     warnDeprecated();
 
@@ -526,31 +526,31 @@ ContentPrefService.prototype = {
   /**
    * Notify all observers about the removal of a preference.
    */
   _notifyPrefRemoved: function ContentPrefService__notifyPrefRemoved(aGroup, aName, aIsPrivate) {
     for (var observer of this._getObservers(aName)) {
       try {
         observer.onContentPrefRemoved(aGroup, aName, aIsPrivate);
       }
-      catch(ex) {
+      catch (ex) {
         Cu.reportError(ex);
       }
     }
   },
 
   /**
    * Notify all observers about a preference change.
    */
   _notifyPrefSet: function ContentPrefService__notifyPrefSet(aGroup, aName, aValue, aIsPrivate) {
     for (var observer of this._getObservers(aName)) {
       try {
         observer.onContentPrefSet(aGroup, aName, aValue, aIsPrivate);
       }
-      catch(ex) {
+      catch (ex) {
         Cu.reportError(ex);
       }
     }
   },
 
   get grouper() {
     warnDeprecated();
     return this._grouper;
@@ -1033,17 +1033,17 @@ ContentPrefService.prototype = {
   },
 
   _dbConnection: null,
 
   _dbCreateStatement: function ContentPrefService__dbCreateStatement(aSQLString) {
     try {
       var statement = this._dbConnection.createStatement(aSQLString);
     }
-    catch(ex) {
+    catch (ex) {
       Cu.reportError("error creating statement " + aSQLString + ": " +
                      this._dbConnection.lastError + " - " +
                      this._dbConnection.lastErrorString);
       throw ex;
     }
 
     return statement;
   },
@@ -1083,17 +1083,17 @@ ContentPrefService.prototype = {
       var version = dbConnection.schemaVersion;
 
       // Try to migrate the schema in the database to the current schema used by
       // the service.  If migration fails, back up the database and recreate it.
       if (version != this._dbVersion) {
         try {
           this._dbMigrate(dbConnection, version, this._dbVersion);
         }
-        catch(ex) {
+        catch (ex) {
           Cu.reportError("error migrating DB: " + ex + "; backing up and recreating");
           dbConnection = this._dbBackUpAndRecreate(dbService, dbFile, dbConnection);
         }
       }
     }
 
     // Turn off disk synchronization checking to reduce disk churn and speed up
     // operations when prefs are changed rapidly (such as when a user repeatedly
@@ -1115,17 +1115,17 @@ ContentPrefService.prototype = {
 
   _dbCreate: function ContentPrefService__dbCreate(aDBService, aDBFile) {
     var dbConnection = aDBService.openDatabase(aDBFile);
 
     try {
       this._dbCreateSchema(dbConnection);
       dbConnection.schemaVersion = this._dbVersion;
     }
-    catch(ex) {
+    catch (ex) {
       // If we failed to create the database (perhaps because the disk ran out
       // of space), then remove the database file so we don't leave it in some
       // half-created state from which we won't know how to recover.
       dbConnection.close();
       aDBFile.remove(false);
       throw ex;
     }
 
@@ -1156,17 +1156,17 @@ ContentPrefService.prototype = {
   _dbBackUpAndRecreate: function ContentPrefService__dbBackUpAndRecreate(aDBService,
                                                                          aDBFile,
                                                                          aDBConnection) {
     aDBService.backupDatabaseFile(aDBFile, "content-prefs.sqlite.corrupt");
 
     // Close the database, ignoring the "already closed" exception, if any.
     // It'll be open if we're here because of a migration failure but closed
     // if we're here because of database corruption.
-    try { aDBConnection.close() } catch(ex) {}
+    try { aDBConnection.close() } catch (ex) {}
 
     aDBFile.remove(false);
 
     let dbConnection = this._dbCreate(aDBService, aDBFile);
 
     return dbConnection;
   },
 
@@ -1189,17 +1189,17 @@ ContentPrefService.prototype = {
        * applying the schema.  In any case, recover by simply reapplying the schema.
        */
       if (aOldVersion == 0) {
         this._dbCreateSchema(aDBConnection);
       } else {
         for (let i = aOldVersion; i < aNewVersion; i++) {
           let migrationName = "_dbMigrate" + i + "To" + (i + 1);
           if (typeof this[migrationName] != 'function') {
-            throw("no migrator function from version " + aOldVersion + " to version " + aNewVersion);
+            throw ("no migrator function from version " + aOldVersion + " to version " + aNewVersion);
           }
           this[migrationName](aDBConnection);
         }
       }
       aDBConnection.schemaVersion = aNewVersion;
       aDBConnection.commitTransaction();
     } catch (ex) {
       aDBConnection.rollbackTransaction();
@@ -1276,36 +1276,36 @@ HostnameGrouper.prototype = {
     try {
       // Accessing the host property of the URI will throw an exception
       // if the URI is of a type that doesn't have a host property.
       // Otherwise, we manually throw an exception if the host is empty,
       // since the effect is the same (we can't derive a group from it).
 
       group = aURI.host;
       if (!group)
-        throw("can't derive group from host; no host in URI");
+        throw ("can't derive group from host; no host in URI");
     }
-    catch(ex) {
+    catch (ex) {
       // If we don't have a host, then use the entire URI (minus the query,
       // reference, and hash, if possible) as the group.  This means that URIs
       // like about:mozilla and about:blank will be considered separate groups,
       // but at least they'll be grouped somehow.
 
       // This also means that each individual file: URL will be considered
       // its own group.  This seems suboptimal, but so does treating the entire
       // file: URL space as a single group (especially if folks start setting
       // group-specific capabilities prefs).
 
       // XXX Is there something better we can do here?
 
       try {
         var url = aURI.QueryInterface(Ci.nsIURL);
         group = aURI.prePath + url.filePath;
       }
-      catch(ex) {
+      catch (ex) {
         group = aURI.spec;
       }
     }
 
     return group;
   }
 };
 
--- a/toolkit/components/contentprefs/tests/unit/head_contentPrefs.js
+++ b/toolkit/components/contentprefs/tests/unit/head_contentPrefs.js
@@ -103,17 +103,17 @@ var ContentPrefTest = {
    * Delete the content pref service's persistent datastore.  We do this before
    * and after running tests to make sure we start from scratch each time. We
    * also do it during the database creation, schema migration, and backup tests.
    */
   deleteDatabase: function ContentPrefTest_deleteDatabase() {
     var file = this.getProfileDir();
     file.append(CONTENT_PREFS_DB_FILENAME);
     if (file.exists())
-      try { file.remove(false); } catch(e) { /* stupid windows box */ }
+      try { file.remove(false); } catch (e) { /* stupid windows box */ }
     return file;
   },
 
   /**
    * Delete the backup of the content pref service's persistent datastore.
    * We do this during the database creation, schema migration, and backup tests.
    */
   deleteBackupDatabase: function ContentPrefTest_deleteBackupDatabase() {
--- a/toolkit/components/contextualidentity/ContextualIdentityService.jsm
+++ b/toolkit/components/contextualidentity/ContextualIdentityService.jsm
@@ -111,17 +111,17 @@ function _ContextualIdentityService(path
           this.loadError(null);
           return;
         }
 
         this._identities = data.identities;
         this._lastUserContextId = data.lastUserContextId;
 
         this._dataReady = true;
-      } catch(error) {
+      } catch (error) {
         this.loadError(error);
       }
     }, (error) => {
       this.loadError(error);
     });
   },
 
   loadError(error) {
--- a/toolkit/components/cookie/content/cookieAcceptDialog.js
+++ b/toolkit/components/cookie/content/cookieAcceptDialog.js
@@ -189,15 +189,15 @@ function GetExpiresString(secondsUntilEx
     // see bug 238045 for details
     var expiry = "";
     try {
       expiry = gDateService.FormatDateTime("", gDateService.dateFormatLong,
                                            gDateService.timeFormatSeconds,
                                            date.getFullYear(), date.getMonth()+1,
                                            date.getDate(), date.getHours(),
                                            date.getMinutes(), date.getSeconds());
-    } catch(ex) {
+    } catch (ex) {
       // do nothing
     }
     return expiry;
   }
   return cookieBundle.getString("expireAtEndOfSession");
 }
--- a/toolkit/components/crashes/CrashManager.jsm
+++ b/toolkit/components/crashes/CrashManager.jsm
@@ -531,17 +531,17 @@ this.CrashManager.prototype = Object.fre
           // If we have a saved environment, use it. Otherwise report
           // the current environment.
           let crashEnvironment = null;
           let sessionId = null;
           let reportMeta = Cu.cloneInto(metadata, myScope);
           if ('TelemetryEnvironment' in reportMeta) {
             try {
               crashEnvironment = JSON.parse(reportMeta.TelemetryEnvironment);
-            } catch(e) {
+            } catch (e) {
               Cu.reportError(e);
             }
             delete reportMeta.TelemetryEnvironment;
           }
           if ('TelemetrySessionId' in reportMeta) {
             sessionId = reportMeta.TelemetrySessionId;
             delete reportMeta.TelemetrySessionId;
           }
--- a/toolkit/components/ctypes/tests/unit/head.js
+++ b/toolkit/components/ctypes/tests/unit/head.js
@@ -1,13 +1,13 @@
 try {
   // We might be running without privileges, in which case it's up to the
   // harness to give us the 'ctypes' object.
   Components.utils.import("resource://gre/modules/ctypes.jsm");
-} catch(e) {
+} catch (e) {
 }
 
 function open_ctypes_test_lib()
 {
   return ctypes.open(do_get_file(ctypes.libraryName("jsctypes-test")).path);
 }
 
 /**
--- a/toolkit/components/ctypes/tests/unit/test_finalizer_shouldaccept.js
+++ b/toolkit/components/ctypes/tests/unit/test_finalizer_shouldaccept.js
@@ -1,13 +1,13 @@
 try {
   // We might be running without privileges, in which case it's up to the
   // harness to give us the 'ctypes' object.
   Components.utils.import("resource://gre/modules/ctypes.jsm");
-} catch(e) {
+} catch (e) {
 }
 
 var acquire, dispose, reset_errno, dispose_errno,
   acquire_ptr, dispose_ptr,
   acquire_void_ptr, dispose_void_ptr,
   acquire_string, dispose_string;
 
 function run_test()
--- a/toolkit/components/ctypes/tests/unit/test_finalizer_shouldfail.js
+++ b/toolkit/components/ctypes/tests/unit/test_finalizer_shouldfail.js
@@ -1,13 +1,13 @@
 try {
   // We might be running without privileges, in which case it's up to the
   // harness to give us the 'ctypes' object.
   Components.utils.import("resource://gre/modules/ctypes.jsm");
-} catch(e) {
+} catch (e) {
 }
 
 var acquire, dispose, null_dispose, compare, dispose_64;
 
 function run_test()
 {
   let library = open_ctypes_test_lib();
 
--- a/toolkit/components/ctypes/tests/unit/test_jsctypes.js
+++ b/toolkit/components/ctypes/tests/unit/test_jsctypes.js
@@ -2,17 +2,17 @@
 /* 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/. */
 
 try {
   // We might be running without privileges, in which case it's up to the
   // harness to give us the 'ctypes' object.
   Components.utils.import("resource://gre/modules/ctypes.jsm");
-} catch(e) {
+} catch (e) {
 }
 
 CTYPES_TEST_LIB = ctypes.libraryName("jsctypes-test");
 CTYPES_UNICODE_LIB = ctypes.libraryName("jsctyp\u00E8s-t\u00EB\u00DFt");
 
 function do_check_throws(f, type, stack)
 {
   if (!stack) {
@@ -656,17 +656,17 @@ function run_basic_abi_tests(library, t,
   check_struct_stats(library, t);
 
   // Check the ToSource functions defined in the namespace ABI
   do_check_eq(ctypes.default_abi.toSource(), "ctypes.default_abi");
 
   let exn;
   try {
     ctypes.default_abi.toSource.call(null);
-  } catch(x) {
+  } catch (x) {
     exn = x;
   }
   do_check_true(!!exn); // Check that some exception was raised
 }
 
 function run_single_abi_tests(decl, abi, t, toprimitive,
                               get_test, set_tests, sum_tests, sum_many_tests) {
   let getter_t = ctypes.FunctionType(abi, t).ptr;
@@ -2655,17 +2655,17 @@ function run_single_closure_tests(librar
     sb.fn = fn_v_t(function() {sb.foo = {};});
     Components.utils.evalInSandbox("fn();", sb);
   } catch (e) {} // Components not available in workers.
 
   // Make sure that a void callback can't return an error sentinel.
   var sentinelThrew = false;
   try {
   fn_v_t(function() {}, null, -1);
-  } catch(e) {
+  } catch (e) {
     sentinelThrew = true;
   }
   do_check_true(sentinelThrew);
 }
 
 function run_variadic_tests(library) {
   let sum_va_type = ctypes.FunctionType(ctypes.default_abi,
                                         ctypes.int32_t,
--- a/toolkit/components/exthelper/extApplication.js
+++ b/toolkit/components/exthelper/extApplication.js
@@ -289,17 +289,17 @@ PreferenceBranch.prototype = {
         break;
       case "Boolean":
         this._prefs.setBoolPref(aName, aValue);
         break;
       case "Number":
         this._prefs.setIntPref(aName, aValue);
         break;
       default:
-        throw("Unknown preference value specified.");
+        throw ("Unknown preference value specified.");
     }
   },
 
   reset: function prefs_reset() {
     this._prefs.resetBranch("");
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.extIPreferenceBranch])
--- a/toolkit/components/feeds/FeedProcessor.js
+++ b/toolkit/components/feeds/FeedProcessor.js
@@ -51,17 +51,17 @@ const RSS090NS = "http://my.netscape.com
 /***** Some general utils *****/
 function strToURI(link, base) {
   base = base || null;
   if (!gIoService)
     gIoService = Cc[IO_CONTRACTID].getService(Ci.nsIIOService);
   try {
     return gIoService.newURI(link, null, base);
   }
-  catch(e) {
+  catch (e) {
     return null;
   }
 }
 
 function isArray(a) {
   return isObject(a) && a.constructor == Array;
 }
 
@@ -74,17 +74,17 @@ function isFunction(a) {
 }
 
 function isIID(a, iid) {
   var rv = false;
   try {
     a.QueryInterface(iid);
     rv = true;
   }
-  catch(e) {
+  catch (e) {
   }
   return rv;
 }
 
 function isIArray(a) {
   return isIID(a, Ci.nsIArray);
 }
 
@@ -152,17 +152,17 @@ function bagHasKey(bag, key) {
   }
 }
 
 function makePropGetter(key) {
   return function FeedPropGetter(bag) {
     try {
       return value = bag.getProperty(key);
     }
-    catch(e) {
+    catch (e) {
     }
     return null;
   }
 }
 
 const RDF_NS = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
 // namespace map
 var gNamespaces = {
@@ -354,17 +354,17 @@ Feed.prototype = {
   },
 
   _resolveURI: function Feed_resolveURI(linkSpec, baseSpec) {
     var uri = null;
     try {
       var base = baseSpec ? strToURI(baseSpec, this.baseURI) : this.baseURI;
       uri = strToURI(linkSpec, base);
     }
-    catch(e) {
+    catch (e) {
       LOG(e);
     }
 
     return uri;
   },
 
   // reset the bag to raw contents, not text constructs
   _resetBagMembersToRawText: function Feed_resetBagMembers(fieldLists) {
@@ -711,17 +711,17 @@ function fieldsToObj(container, fields) 
     searchList = fields[key];
     for (var i=0; i < searchList.length; ++i) {
       props = searchList[i];
       prop = null;
       field = isArray(props) ? props[0] : props;
       try {
         prop = container.fields.getProperty(field);
       }
-      catch(e) {
+      catch (e) {
       }
       if (prop) {
         prop = isArray(props) ? props[1](prop) : prop;
         container[key] = prop;
       }
     }
   }
 }
@@ -1525,17 +1525,17 @@ FeedProcessor.prototype = {
     // First we'll see what's on top of the stack.
     var container = this._stack[this._stack.length - 1][0];
 
     // Check to see if it has the property
     var prop;
     try {
       prop = container.getProperty(elementInfo.fieldName);
     }
-    catch(e) {
+    catch (e) {
     }
 
     if (elementInfo.isArray) {
       if (!prop) {
         container.setPropertyAsInterface(elementInfo.fieldName,
                                          Cc[ARRAY_CONTRACTID].
                                          createInstance(Ci.nsIMutableArray));
       }
@@ -1685,17 +1685,17 @@ FeedProcessor.prototype = {
             // convert URI-bearing values to an nsIURI
             if (propName == "uri") {
               var base = this._xmlBaseStack[this._xmlBaseStack.length - 1];
               propValue = strToURI(chars, base);
             }
             el[propName] = propValue;
           }
         }
-        catch(e) {
+        catch (e) {
           // ignore XPConnect errors
         }
         // the rest of the function deals with entry- and feed-level stuff
         return;
       }
       container = container.queryElementAt(container.length - 1,
                                            Ci.nsIWritablePropertyBag2);
     }
--- a/toolkit/components/feeds/test/head.js
+++ b/toolkit/components/feeds/test/head.js
@@ -37,17 +37,17 @@ function readTestData(testFile) {
       if (testcase.expect && testcase.desc) {
         testcase.path = 'xml/' + testFile.parent.leafName + '/' + testFile.leafName;
         testcase.file = testFile;
         break;
       }
 
     } while (hasmore);
 
-  } catch(e) {
+  } catch (e) {
     Assert.ok(false, "FAILED! Error reading testFile case in file " + testFile.leafName  + " ---- " + e);
   } finally {
     istream.close();
   }
 
   return testcase;
 }
 
@@ -69,12 +69,12 @@ function iterateDir(dir, recurse, callba
     }
   }
 }
 
 function isIID(a, iid) {
   try {
     a.QueryInterface(iid);
     return true;
-  } catch(e) { }
+  } catch (e) { }
 
   return false;
 }
--- a/toolkit/components/feeds/test/test_xml.js
+++ b/toolkit/components/feeds/test/test_xml.js
@@ -38,17 +38,17 @@ FeedListener.prototype = {
       do_print("Testing feed " + this.testcase.file.path);
       Assert.ok(isIID(feed, Ci.nsIFeed), "Has feed interface");
 
       if (!eval(this.testcase.expect)) {
         Assert.ok(false, "expect failed for " + this.testcase.desc);
       } else {
         Assert.ok(true, "expect passed for " + this.testcase.desc);
       }
-    } catch(e) {
+    } catch (e) {
       Assert.ok(false, "expect failed for " + this.testcase.desc + " ---- " + e.message);
     }
 
     run_next_test();
   }
 }
 
 function createTest(data) {
@@ -65,17 +65,17 @@ function createTest(data) {
 
     var parser = Cc["@mozilla.org/feed-processor;1"].createInstance(Ci.nsIFeedProcessor);
     var stream = Cc["@mozilla.org/network/file-input-stream;1"].createInstance(Ci.nsIFileInputStream);
     stream.init(data.file, 0x01, parseInt("0444", 8), 0);
     parser.listener = new FeedListener(data);
 
     try {
       parser.parseFromStream(stream, uri);
-    } catch(e) {
+    } catch (e) {
       Assert.ok(false, "parse failed for " + data.file.leafName + " ---- " + e.message);
       // If the parser failed, the listener won't be notified, run the next test here.
       run_next_test();
     } finally {
       stream.close();
     }
   }
 }
--- a/toolkit/components/filepicker/content/filepicker.js
+++ b/toolkit/components/filepicker/content/filepicker.js
@@ -230,19 +230,19 @@ function selectOnOK()
   var curFileIndex;
   for (curFileIndex = 0; curFileIndex < fileList.length &&
          ret != nsIFilePicker.returnCancel; ++curFileIndex) {
     var file = fileList[curFileIndex].QueryInterface(nsIFile);
 
     // try to normalize - if this fails we will ignore the error
     // because we will notice the
     // error later and show a fitting error alert.
-    try{
+    try {
       file.normalize();
-    } catch(e) {
+    } catch (e) {
       //promptService.alert(window, "Problem", "normalize failed, continuing");
     }
 
     var fileExists = file.exists();
 
     if (!fileExists && (filePickerMode == nsIFilePicker.modeOpen ||
                         filePickerMode == nsIFilePicker.modeOpenMultiple)) {
       showErrorDialog("errorOpenFileDoesntExistTitle",
@@ -258,17 +258,17 @@ function selectOnOK()
       return false;
     }
 
     if (fileExists) {
       isDir = file.isDirectory();
       isFile = file.isFile();
     }
 
-    switch(filePickerMode) {
+    switch (filePickerMode) {
     case nsIFilePicker.modeOpen:
     case nsIFilePicker.modeOpenMultiple:
       if (isFile) {
         if (file.isReadable()) {
           retvals.directory = file.parent.path;
         } else {
           showErrorDialog("errorOpeningFileTitle",
                           "openWithoutPermissionMessage_file",
@@ -486,17 +486,17 @@ function setOKAction(file) {
   var buttonIcon = "open"; // used in all but one case
 
   if (file && file.isDirectory()) {
     document.documentElement.setAttribute("ondialogaccept", "return openOnOK();");
     buttonLabel = gFilePickerBundle.getString("openButtonLabel");
   }
   else {
     document.documentElement.setAttribute("ondialogaccept", "return selectOnOK();");
-    switch(filePickerMode) {
+    switch (filePickerMode) {
     case nsIFilePicker.modeGetFolder:
       buttonLabel = gFilePickerBundle.getString("selectFolderButtonLabel");
       break;
     case nsIFilePicker.modeOpen:
     case nsIFilePicker.modeOpenMultiple:
       buttonLabel = gFilePickerBundle.getString("openButtonLabel");
       break;
     case nsIFilePicker.modeSave:
@@ -616,17 +616,17 @@ function populateAncestorList(directory)
 
   var menuList = document.getElementById("lookInMenuList");
   menuList.selectedIndex = 0;
 }
 
 function goUp() {
   try {
     var parent = sfile.parent;
-  } catch(ex) { dump("can't get parent directory\n"); }
+  } catch (ex) { dump("can't get parent directory\n"); }
 
   if (parent) {
     gotoDirectory(parent);
   }
 }
 
 function goHome() {
   gotoDirectory(homeDir);
@@ -699,17 +699,17 @@ function newDir() {
 }
 
 function gotoDirectory(directory) {
   window.setCursor("wait");
   try {
     populateAncestorList(directory);
     treeView.setDirectory(directory);
     document.getElementById("errorShower").selectedIndex = 0;
-  } catch(ex) {
+  } catch (ex) {
     document.getElementById("errorShower").selectedIndex = 1;
   }
 
   window.setCursor("auto");
 
   if (filePickerMode == nsIFilePicker.modeGetFolder) {
     textInput.value = "";
   }
@@ -786,17 +786,17 @@ function processPath(path)
 
 function processPathEntry(path, fileArray)
 {
   var filePath;
   var file;
 
   try {
     file = sfile.clone().QueryInterface(nsILocalFile);
-  } catch(e) {
+  } catch (e) {
     dump("Couldn't clone\n"+e);
     return false;
   }
 
   var tilde_file = file.clone();
   tilde_file.append("~");
   if (path[0] == '~' &&                        // Expand ~ to $HOME, except:
       !(path == "~" && tilde_file.exists()) && // If ~ was entered and such a file exists, don't expand
@@ -810,17 +810,17 @@ function processPathEntry(path, fileArra
 
   if (filePath[0] == '/')   /* an absolute path was entered */
     file.initWithPath(filePath);
   else if ((filePath.indexOf("/../") > 0) ||
            (filePath.substr(-3) == "/..") ||
            (filePath.substr(0,3) == "../") ||
            (filePath == "..")) {
     /* appendRelativePath doesn't allow .. */
-    try{
+    try {
       file.initWithPath(file.path + "/" + filePath);
     } catch (e) {
       dump("Couldn't init path\n"+e);
       return false;
     }
   }
   else {
     try {
--- a/toolkit/components/filepicker/nsFilePicker.js
+++ b/toolkit/components/filepicker/nsFilePicker.js
@@ -229,17 +229,17 @@ nsFilePicker.prototype = {
 
   open: function(aFilePickerShownCallback) {
     var tm = Components.classes["@mozilla.org/thread-manager;1"]
                        .getService(Components.interfaces.nsIThreadManager);
     tm.mainThread.dispatch(function() {
       let result = Components.interfaces.nsIFilePicker.returnCancel;
       try {
         result = this.show();
-      } catch(ex) {
+      } catch (ex) {
       }
       if (aFilePickerShownCallback) {
         aFilePickerShownCallback.done(result);
       }
     }.bind(this), Components.interfaces.nsIThread.DISPATCH_NORMAL);
   },
 
   show: function() {
@@ -259,45 +259,45 @@ nsFilePicker.prototype = {
     if (this.mParentWindow) {
       parent = this.mParentWindow;
     } else if (typeof(window) == "object" && window != null) {
       parent = window;
     } else {
       try {
         var appShellService = Components.classes[APPSHELL_SERV_CONTRACTID].getService(nsIAppShellService);
         parent = appShellService.hiddenDOMWindow;
-      } catch(ex) {
+      } catch (ex) {
         debug("Can't get parent.  xpconnect hates me so we can't get one from the appShellService.\n");
         debug(ex + "\n");
       }
     }
 
     var parentWin = null;
     try {
       parentWin = parent.QueryInterface(nsIInterfaceRequestor)
                         .getInterface(nsIWebNavigation)
                         .QueryInterface(nsIDocShellTreeItem)
                         .treeOwner
                         .QueryInterface(nsIInterfaceRequestor)
                         .getInterface(nsIBaseWindow);
-    } catch(ex) {
+    } catch (ex) {
       dump("file picker couldn't get base window\n"+ex+"\n");
     }
     try {
       parent.openDialog("chrome://global/content/filepicker.xul",
                         "",
                         "chrome,modal,titlebar,resizable=yes,dependent=yes",
                         o);
 
       this.mFilterIndex = o.retvals.filterIndex;
       this.mFilesEnumerator = o.retvals.files;
       this.mFileURL = o.retvals.fileURL;
       lastDirectory = o.retvals.directory;
       return o.retvals.buttonStatus;
-    } catch(ex) { dump("unable to open file picker\n" + ex + "\n"); }
+    } catch (ex) { dump("unable to open file picker\n" + ex + "\n"); }
 
     return null;
   }
 }
 
 if (DEBUG)
   debug = function (s) { dump("-*- filepicker: " + s + "\n"); };
 else
--- a/toolkit/components/jsdownloads/src/DownloadCore.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadCore.jsm
@@ -1753,17 +1753,17 @@ this.DownloadSaver.prototype = {
 
     // The start time is always available when we reach this point.
     let startPRTime = this.download.startTime.getTime() * 1000;
 
     try {
       gDownloadHistory.addDownload(sourceUri, referrerUri, startPRTime,
                                    targetUri);
     }
-    catch(ex) {
+    catch (ex) {
       if (!(ex instanceof Components.Exception) ||
           ex.result != Cr.NS_ERROR_NOT_AVAILABLE) {
         throw ex;
       }
       //
       // Under normal operation the download history service may not
       // be available. We don't want all downloads that are public to fail
       // when this happens so we'll ignore this error and this error only!
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js
+++ b/toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js
@@ -86,17 +86,17 @@ add_task(function* test_getSystemDownloa
 
     let info = yield OS.File.stat(downloadDir);
     do_check_true(info.isDir);
   } else {
     let targetPath = OS.Path.join(tempDir.path,
                        gStringBundle.GetStringFromName("downloadsFolder"));
     try {
       yield OS.File.removeEmptyDir(targetPath);
-    } catch(e) {}
+    } catch (e) {}
     downloadDir = yield DownloadIntegration.getSystemDownloadsDirectory();
     do_check_eq(downloadDir, targetPath);
     do_check_true(yield OS.File.exists(downloadDir));
 
     let info = yield OS.File.stat(downloadDir);
     do_check_true(info.isDir);
     yield OS.File.removeEmptyDir(targetPath);
   }
--- a/toolkit/components/microformats/microformat-shiv.js
+++ b/toolkit/components/microformats/microformat-shiv.js
@@ -73,51 +73,51 @@ var Microformats; // jshint ignore:line
                 rels;
 
             this.init();
             options = (options)? options : {};
             this.mergeOptions(options);
             this.getDOMContext( options );
 
             // if we do not have any context create error
-            if(!this.rootNode || !this.document) {
+            if (!this.rootNode || !this.document) {
                 this.errors.push(this.noContentErr);
-            }else{
+            } else {
 
                 // only parse h-* microformats if we need to
                 // this is added to speed up parsing
-                if(this.hasMicroformats(this.rootNode, options)) {
+                if (this.hasMicroformats(this.rootNode, options)) {
                     this.prepareDOM( options );
 
-                    if(this.options.filters.length > 0) {
+                    if (this.options.filters.length > 0) {
                         // parse flat list of items
                         var newRootNode = this.findFilterNodes(this.rootNode, this.options.filters);
                         data = this.walkRoot(newRootNode);
-                    }else{
+                    } else {
                         // parse whole document from root
                         data = this.walkRoot(this.rootNode);
                     }
 
                     out.items = data;
                     // don't clear-up DOM if it was cloned
-                    if(modules.domUtils.canCloneDocument(this.document) === false) {
+                    if (modules.domUtils.canCloneDocument(this.document) === false) {
                         this.clearUpDom(this.rootNode);
                     }
                 }
 
                 // find any rels
-                if(this.findRels) {
+                if (this.findRels) {
                     rels = this.findRels(this.rootNode);
                     out.rels = rels.rels;
                     out['rel-urls'] = rels['rel-urls'];
                 }
 
             }
 
-            if(this.errors.length > 0) {
+            if (this.errors.length > 0) {
                 return this.formatError();
             }
             return out;
         },
 
 
         /**
          * parse to get parent microformat of passed node
@@ -125,17 +125,17 @@ var Microformats; // jshint ignore:line
          * @param  {DOM Node} node
          * @param  {Object} options
          * @return {Object}
          */
         getParent: function(node, options) {
             this.init();
             options = (options)? options : {};
 
-            if(node) {
+            if (node) {
                 return this.getParentTreeWalk(node, options);
             }
             this.errors.push(this.noContentErr);
             return this.formatError();
         },
 
 
         /**
@@ -151,40 +151,40 @@ var Microformats; // jshint ignore:line
                 x,
                 i;
 
             this.init();
             options = (options)? options : {};
             this.getDOMContext( options );
 
             // if we do not have any context create error
-            if(!this.rootNode || !this.document) {
+            if (!this.rootNode || !this.document) {
                 return {'errors': [this.noContentErr]};
             }
             items = this.findRootNodes( this.rootNode, true );
             i = items.length;
-            while(i--) {
+            while (i--) {
                 classItems = modules.domUtils.getAttributeList(items[i], 'class');
                 x = classItems.length;
-                while(x--) {
+                while (x--) {
                     // find v2 names
-                    if(modules.utils.startWith( classItems[x], 'h-' )) {
+                    if (modules.utils.startWith( classItems[x], 'h-' )) {
                         this.appendCount(classItems[x], 1, out);
                     }
                     // find v1 names
-                    for(var key in modules.maps) {
+                    for (var key in modules.maps) {
                         // dont double count if v1 and v2 roots are present
-                        if(modules.maps[key].root === classItems[x] && classItems.indexOf(key) === -1) {
+                        if (modules.maps[key].root === classItems[x] && classItems.indexOf(key) === -1) {
                             this.appendCount(key, 1, out);
                         }
                     }
                 }
             }
             var relCount = this.countRels( this.rootNode );
-            if(relCount > 0) {
+            if (relCount > 0) {
                 out.rels = relCount;
             }
 
             return out;
         },
 
 
         /**
@@ -193,29 +193,29 @@ var Microformats; // jshint ignore:line
          * @param  {DOM Node} node
          * @param  {Objecte} options
          * @return {Boolean}
          */
         isMicroformat: function( node, options ) {
             var classes,
                 i;
 
-            if(!node) {
+            if (!node) {
                 return false;
             }
 
             // if documemt gets topmost node
             node = modules.domUtils.getTopMostNode( node );
 
             // look for h-* microformats
             classes = this.getUfClassNames(node);
-            if(options && options.filters && modules.utils.isArray(options.filters)) {
+            if (options && options.filters && modules.utils.isArray(options.filters)) {
                 i = options.filters.length;
-                while(i--) {
-                    if(classes.root.indexOf(options.filters[i]) > -1) {
+                while (i--) {
+                    if (classes.root.indexOf(options.filters[i]) > -1) {
                         return true;
                     }
                 }
                 return false;
             }
             return (classes.root.length > 0);
         },
 
@@ -226,46 +226,46 @@ var Microformats; // jshint ignore:line
          * @param  {DOM Node} node
          * @param  {Objecte} options
          * @return {Boolean}
          */
         hasMicroformats: function( node, options ) {
             var items,
                 i;
 
-            if(!node) {
+            if (!node) {
                 return false;
             }
 
             // if browser based documemt get topmost node
             node = modules.domUtils.getTopMostNode( node );
 
             // returns all microformat roots
             items = this.findRootNodes( node, true );
-            if(options && options.filters && modules.utils.isArray(options.filters)) {
+            if (options && options.filters && modules.utils.isArray(options.filters)) {
                 i = items.length;
-                while(i--) {
-                    if( this.isMicroformat( items[i], options ) ) {
+                while (i--) {
+                    if ( this.isMicroformat( items[i], options ) ) {
                         return true;
                     }
                 }
                 return false;
             }
             return (items.length > 0);
         },
 
 
         /**
          * add a new v1 mapping object to parser
          *
          * @param  {Array} maps
          */
         add: function( maps ) {
             maps.forEach(function(map) {
-                if(map && map.root && map.name && map.properties) {
+                if (map && map.root && map.name && map.properties) {
                 modules.maps[map.name] = JSON.parse(JSON.stringify(map));
                 }
             });
         },
 
 
         /**
          * internal parse to get parent microformats by walking up the tree
@@ -327,42 +327,42 @@ var Microformats; // jshint ignore:line
                 }
             } catch (e) {
                 // there is no alt action
             }
 
 
             // find base tag to set baseUrl
             baseTag = modules.domUtils.querySelector(this.document,'base');
-            if(baseTag) {
+            if (baseTag) {
                 href = modules.domUtils.getAttribute(baseTag, 'href');
-                if(href) {
+                if (href) {
                     this.options.baseUrl = href;
                 }
             }
 
             // get path to rootNode
             // then clone document
             // then reset the rootNode to its cloned version in a new document
             var path,
                 newDocument,
                 newRootNode;
 
             path = modules.domUtils.getNodePath(this.rootNode);
             newDocument = modules.domUtils.cloneDocument(this.document);
             newRootNode = modules.domUtils.getNodeByPath(newDocument, path);
 
             // check results as early IE fails
-            if(newDocument && newRootNode) {
+            if (newDocument && newRootNode) {
                 this.document = newDocument;
                 this.rootNode = newRootNode;
             }
 
             // add includes
-            if(this.addIncludes) {
+            if (this.addIncludes) {
                 this.addIncludes( this.document );
             }
 
             return (this.rootNode && this.document);
         },
 
 
         /**
@@ -388,41 +388,41 @@ var Microformats; // jshint ignore:line
                 'rels': {},
                 'rel-urls': {}
             };
         },
 
 
         // find microformats of a given type and return node structures
         findFilterNodes: function(rootNode, filters) {
-            if(modules.utils.isString(filters)) {
+            if (modules.utils.isString(filters)) {
                 filters = [filters];
             }
             var newRootNode = modules.domUtils.createNode('div'),
                 items = this.findRootNodes(rootNode, true),
                 i = 0,
                 x = 0,
                 y = 0;
 
             // add v1 names
             y = filters.length;
             while (y--) {
-                if(this.getMapping(filters[y])) {
+                if (this.getMapping(filters[y])) {
                     var v1Name = this.getMapping(filters[y]).root;
                     filters.push(v1Name);
                 }
             }
 
-            if(items) {
+            if (items) {
                 i = items.length;
-                while(x < i) {
+                while (x < i) {
                     // append matching nodes into newRootNode
                     y = filters.length;
                     while (y--) {
-                        if(modules.domUtils.hasAttributeValue(items[x], 'class', filters[y])) {
+                        if (modules.domUtils.hasAttributeValue(items[x], 'class', filters[y])) {
                             var clone = modules.domUtils.clone(items[x]);
                             modules.domUtils.appendChild(newRootNode, clone);
                             break;
                         }
                     }
                     x++;
                 }
             }
@@ -434,38 +434,38 @@ var Microformats; // jshint ignore:line
         /**
          * appends data to output object for count
          *
          * @param  {string} name
          * @param  {Int} count
          * @param  {Object}
          */
         appendCount: function(name, count, out) {
-            if(out[name]) {
+            if (out[name]) {
                 out[name] = out[name] + count;
-            }else{
+            } else {
                 out[name] = count;
             }
         },
 
 
         /**
          * is the microformats type in the filter list
          *
          * @param  {Object} uf
          * @param  {Array} filters
          * @return {Boolean}
          */
         shouldInclude: function(uf, filters) {
             var i;
 
-            if(modules.utils.isArray(filters) && filters.length > 0) {
+            if (modules.utils.isArray(filters) && filters.length > 0) {
                 i = filters.length;
-                while(i--) {
-                    if(uf.type[0] === filters[i]) {
+                while (i--) {
+                    if (uf.type[0] === filters[i]) {
                         return true;
                     }
                 }
                 return false;
             }
             return true;
         },
 
@@ -484,48 +484,48 @@ var Microformats; // jshint ignore:line
                 items,
                 x,
                 i,
                 y,
                 key;
 
 
             // build an array of v1 root names
-            for(key in modules.maps) {
+            for (key in modules.maps) {
                 if (modules.maps.hasOwnProperty(key)) {
                     classList.push(modules.maps[key].root);
                 }
             }
 
             // get all elements that have a class attribute
             includeRoot = (includeRoot) ? includeRoot : false;
-            if(includeRoot && rootNode.parentNode) {
+            if (includeRoot && rootNode.parentNode) {
                 arr = modules.domUtils.getNodesByAttribute(rootNode.parentNode, 'class');
             } else {
                 arr = modules.domUtils.getNodesByAttribute(rootNode, 'class');
             }
 
             // loop elements that have a class attribute
             x = 0;
             i = arr.length;
-            while(x < i) {
+            while (x < i) {
 
                 items = modules.domUtils.getAttributeList(arr[x], 'class');
 
                 // loop classes on an element
                 y = items.length;
-                while(y--) {
+                while (y--) {
                     // match v1 root names
-                    if(classList.indexOf(items[y]) > -1) {
+                    if (classList.indexOf(items[y]) > -1) {
                         out.push(arr[x]);
                         break;
                     }
 
                     // match v2 root name prefix
-                    if(modules.utils.startWith(items[y], 'h-')) {
+                    if (modules.utils.startWith(items[y], 'h-')) {
                         out.push(arr[x]);
                         break;
                     }
                 }
 
                 x++;
             }
             return out;
@@ -543,30 +543,30 @@ var Microformats; // jshint ignore:line
                 children = [],
                 child,
                 classes,
                 items = [],
                 out = [];
 
             classes = this.getUfClassNames(node);
             // if it is a root microformat node
-            if(classes && classes.root.length > 0) {
+            if (classes && classes.root.length > 0) {
                 items = this.walkTree(node);
 
-                if(items.length > 0) {
+                if (items.length > 0) {
                     out = out.concat(items);
                 }
-            }else{
+            } else {
                 // check if there are children and one of the children has a root microformat
                 children = modules.domUtils.getChildren( node );
-                if(children && children.length > 0 && this.findRootNodes(node, true).length > -1) {
+                if (children && children.length > 0 && this.findRootNodes(node, true).length > -1) {
                     for (var i = 0; i < children.length; i++) {
                         child = children[i];
                         items = context.walkRoot(child);
-                        if(items.length > 0) {
+                        if (items.length > 0) {
                             out = out.concat(items);
                         }
                     }
                 }
             }
             return out;
         },
 
@@ -580,24 +580,24 @@ var Microformats; // jshint ignore:line
         walkTree: function(node) {
             var classes,
                 out = [],
                 obj,
                 itemRootID;
 
             // loop roots found on one element
             classes = this.getUfClassNames(node);
-            if(classes && classes.root.length && classes.root.length > 0) {
+            if (classes && classes.root.length && classes.root.length > 0) {
 
                 this.rootID++;
                 itemRootID = this.rootID;
                 obj = this.createUfObject(classes.root, classes.typeVersion);
 
                 this.walkChildren(node, obj, classes.root, itemRootID, classes);
-                if(this.impliedRules) {
+                if (this.impliedRules) {
                     this.impliedRules(node, obj, classes);
                 }
                 out.push( this.cleanUfObject(obj) );
 
 
             }
             return out;
         },
@@ -625,139 +625,139 @@ var Microformats; // jshint ignore:line
                 y,
                 z,
                 child;
 
             children = modules.domUtils.getChildren( node );
 
             y = 0;
             z = children.length;
-            while(y < z) {
+            while (y < z) {
                 child = children[y];
 
                 // get microformat classes for this single element
                 var classes = context.getUfClassNames(child, ufName);
 
                 // a property which is a microformat
-                if(classes.root.length > 0 && classes.properties.length > 0 && !child.addedAsRoot) {
+                if (classes.root.length > 0 && classes.properties.length > 0 && !child.addedAsRoot) {
                     // create object with type, property and value
                     rootItem = context.createUfObject(
                         classes.root,
                         classes.typeVersion,
                         modules.text.parse(this.document, child, context.options.textFormat)
                     );
 
                     // add the microformat as an array of properties
                     propertyName = context.removePropPrefix(classes.properties[0][0]);
 
                     // modifies value with "implied value rule"
-                    if(parentClasses && parentClasses.root.length === 1 && parentClasses.properties.length === 1) {
-                        if(context.impliedValueRule) {
+                    if (parentClasses && parentClasses.root.length === 1 && parentClasses.properties.length === 1) {
+                        if (context.impliedValueRule) {
                             out = context.impliedValueRule(out, parentClasses.properties[0][0], classes.properties[0][0], value);
                         }
                     }
 
-                    if(out.properties[propertyName]) {
+                    if (out.properties[propertyName]) {
                         out.properties[propertyName].push(rootItem);
                     } else {
                         out.properties[propertyName] = [rootItem];
                     }
 
                     context.rootID++;
                     // used to stop duplication in heavily nested structures
                     child.addedAsRoot = true;
 
 
                     x = 0;
                     i = rootItem.type.length;
                     itemRootID = context.rootID;
-                    while(x < i) {
+                    while (x < i) {
                         context.walkChildren(child, rootItem, rootItem.type, itemRootID, classes);
                         x++;
                     }
-                    if(this.impliedRules) {
+                    if (this.impliedRules) {
                         context.impliedRules(child, rootItem, classes);
                     }
                     this.cleanUfObject(rootItem);
 
                 }
 
                 // a property which is NOT a microformat and has not been used for a given root element
-                if(classes.root.length === 0 && classes.properties.length > 0) {
+                if (classes.root.length === 0 && classes.properties.length > 0) {
 
                     x = 0;
                     i = classes.properties.length;
-                    while(x < i) {
+                    while (x < i) {
 
                         value = context.getValue(child, classes.properties[x][0], out);
                         propertyName = context.removePropPrefix(classes.properties[x][0]);
                         propertyVersion = classes.properties[x][1];
 
                         // modifies value with "implied value rule"
-                        if(parentClasses && parentClasses.root.length === 1 && parentClasses.properties.length === 1) {
-                            if(context.impliedValueRule) {
+                        if (parentClasses && parentClasses.root.length === 1 && parentClasses.properties.length === 1) {
+                            if (context.impliedValueRule) {
                                 out = context.impliedValueRule(out, parentClasses.properties[0][0], classes.properties[x][0], value);
                             }
                         }
 
                         // if we have not added this value into a property with the same name already
-                        if(!context.hasRootID(child, rootID, propertyName)) {
+                        if (!context.hasRootID(child, rootID, propertyName)) {
                             // check the root and property is the same version or if overlapping versions are allowed
-                            if( context.isAllowedPropertyVersion( out.typeVersion, propertyVersion ) ) {
+                            if ( context.isAllowedPropertyVersion( out.typeVersion, propertyVersion ) ) {
                                 // add the property as an array of properties
-                                if(out.properties[propertyName]) {
+                                if (out.properties[propertyName]) {
                                     out.properties[propertyName].push(value);
                                 } else {
                                     out.properties[propertyName] = [value];
                                 }
                                 // add rootid to node so we can track its use
                                 context.appendRootID(child, rootID, propertyName);
                             }
                         }
 
                         x++;
                     }
 
                     context.walkChildren(child, out, ufName, rootID, classes);
                 }
 
                 // if the node has no microformat classes, see if its children have
-                if(classes.root.length === 0 && classes.properties.length === 0) {
+                if (classes.root.length === 0 && classes.properties.length === 0) {
                     context.walkChildren(child, out, ufName, rootID, classes);
                 }
 
                 // if the node is a child root add it to the children tree
-                if(classes.root.length > 0 && classes.properties.length === 0) {
+                if (classes.root.length > 0 && classes.properties.length === 0) {
 
                     // create object with type, property and value
                     rootItem = context.createUfObject(
                         classes.root,
                         classes.typeVersion,
                         modules.text.parse(this.document, child, context.options.textFormat)
                     );
 
                     // add the microformat as an array of properties
-                    if(!out.children) {
+                    if (!out.children) {
                         out.children =  [];
                     }
 
-                    if(!context.hasRootID(child, rootID, 'child-root')) {
+                    if (!context.hasRootID(child, rootID, 'child-root')) {
                         out.children.push( rootItem );
                         context.appendRootID(child, rootID, 'child-root');
                         context.rootID++;
                     }
 
                     x = 0;
                     i = rootItem.type.length;
                     itemRootID = context.rootID;
-                    while(x < i) {
+                    while (x < i) {
                         context.walkChildren(child, rootItem, rootItem.type, itemRootID, classes);
                         x++;
                     }
-                    if(this.impliedRules) {
+                    if (this.impliedRules) {
                         context.impliedRules(child, rootItem, classes);
                     }
                     context.cleanUfObject( rootItem );
 
                 }
 
 
 
@@ -775,73 +775,73 @@ var Microformats; // jshint ignore:line
          * @param  {DOM Node} node
          * @param  {String} className
          * @param  {Object} uf
          * @return {String || Object}
          */
         getValue: function(node, className, uf) {
             var value = '';
 
-            if(modules.utils.startWith(className, 'p-')) {
+            if (modules.utils.startWith(className, 'p-')) {
                 value = this.getPValue(node, true);
             }
 
-            if(modules.utils.startWith(className, 'e-')) {
+            if (modules.utils.startWith(className, 'e-')) {
                 value = this.getEValue(node);
             }
 
-            if(modules.utils.startWith(className, 'u-')) {
+            if (modules.utils.startWith(className, 'u-')) {
                 value = this.getUValue(node, true);
             }
 
-            if(modules.utils.startWith(className, 'dt-')) {
+            if (modules.utils.startWith(className, 'dt-')) {
                 value = this.getDTValue(node, className, uf, true);
             }
             return value;
         },
 
 
         /**
          * gets the value of a node which contains a 'p-' property
          *
          * @param  {DOM Node} node
          * @param  {Boolean} valueParse
          * @return {String}
          */
         getPValue: function(node, valueParse) {
             var out = '';
-            if(valueParse) {
+            if (valueParse) {
                 out = this.getValueClass(node, 'p');
             }
 
-            if(!out && valueParse) {
+            if (!out && valueParse) {
                 out = this.getValueTitle(node);
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.domUtils.getAttrValFromTagList(node, ['abbr'], 'title');
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.domUtils.getAttrValFromTagList(node, ['data','input'], 'value');
             }
 
-            if(node.name === 'br' || node.name === 'hr') {
+            if (node.name === 'br' || node.name === 'hr') {
                 out = '';
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.domUtils.getAttrValFromTagList(node, ['img', 'area'], 'alt');
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.text.parse(this.document, node, this.options.textFormat);
             }
 
-            return(out) ? out : '';
+            return (out) ? out : '';
         },
 
 
         /**
          * gets the value of a node which contains the 'e-' property
          *
          * @param  {DOM Node} node
          * @return {Object}
@@ -864,125 +864,125 @@ var Microformats; // jshint ignore:line
          * gets the value of a node which contains the 'u-' property
          *
          * @param  {DOM Node} node
          * @param  {Boolean} valueParse
          * @return {String}
          */
         getUValue: function(node, valueParse) {
             var out = '';
-            if(valueParse) {
+            if (valueParse) {
                 out = this.getValueClass(node, 'u');
             }
 
-            if(!out && valueParse) {
+            if (!out && valueParse) {
                 out = this.getValueTitle(node);
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.domUtils.getAttrValFromTagList(node, ['a', 'area'], 'href');
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.domUtils.getAttrValFromTagList(node, ['img','audio','video','source'], 'src');
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.domUtils.getAttrValFromTagList(node, ['object'], 'data');
             }
 
             // if we have no protocol separator, turn relative url to absolute url
-            if(out && out !== '' && out.indexOf('://') === -1) {
+            if (out && out !== '' && out.indexOf('://') === -1) {
                 out = modules.url.resolve(out, this.options.baseUrl);
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.domUtils.getAttrValFromTagList(node, ['abbr'], 'title');
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.domUtils.getAttrValFromTagList(node, ['data','input'], 'value');
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.text.parse(this.document, node, this.options.textFormat);
             }
 
-            return(out) ? out : '';
+            return (out) ? out : '';
         },
 
 
         /**
          * gets the value of a node which contains the 'dt-' property
          *
          * @param  {DOM Node} node
          * @param  {String} className
          * @param  {Object} uf
          * @param  {Boolean} valueParse
          * @return {String}
          */
         getDTValue: function(node, className, uf, valueParse) {
             var out = '';
 
-            if(valueParse) {
+            if (valueParse) {
                 out = this.getValueClass(node, 'dt');
             }
 
-            if(!out && valueParse) {
+            if (!out && valueParse) {
                 out = this.getValueTitle(node);
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.domUtils.getAttrValFromTagList(node, ['time', 'ins', 'del'], 'datetime');
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.domUtils.getAttrValFromTagList(node, ['abbr'], 'title');
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.domUtils.getAttrValFromTagList(node, ['data', 'input'], 'value');
             }
 
-            if(!out) {
+            if (!out) {
                 out = modules.text.parse(this.document, node, this.options.textFormat);
             }
 
-            if(out) {
-                if(modules.dates.isDuration(out)) {
+            if (out) {
+                if (modules.dates.isDuration(out)) {
                     // just duration
                     return out;
-                } else if(modules.dates.isTime(out)) {
+                } else if (modules.dates.isTime(out)) {
                     // just time or time+timezone
-                    if(uf) {
+                    if (uf) {
                         uf.times.push([className, modules.dates.parseAmPmTime(out, this.options.dateFormat)]);
                     }
                     return modules.dates.parseAmPmTime(out, this.options.dateFormat);
                 }
                 // returns a date - microformat profile
-                if(uf) {
+                if (uf) {
                     uf.dates.push([className, new modules.ISODate(out).toString( this.options.dateFormat )]);
                 }
                 return new modules.ISODate(out).toString( this.options.dateFormat );
             }
             return '';
         },
 
 
         /**
          * appends a new rootid to a given node
          *
          * @param  {DOM Node} node
          * @param  {String} id
          * @param  {String} propertyName
          */
         appendRootID: function(node, id, propertyName) {
-            if(this.hasRootID(node, id, propertyName) === false) {
+            if (this.hasRootID(node, id, propertyName) === false) {
                 var rootids = [];
-                if(modules.domUtils.hasAttribute(node,'rootids')) {
+                if (modules.domUtils.hasAttribute(node,'rootids')) {
                     rootids = modules.domUtils.getAttributeList(node,'rootids');
                 }
                 rootids.push('id' + id + '-' + propertyName);
                 modules.domUtils.setAttribute(node, 'rootids', rootids.join(' '));
             }
         },
 
 
@@ -991,17 +991,17 @@ var Microformats; // jshint ignore:line
          *
          * @param  {DOM Node} node
          * @param  {String} id
          * @param  {String} propertyName
          * @return {Boolean}
          */
         hasRootID: function(node, id, propertyName) {
             var rootids = [];
-            if(!modules.domUtils.hasAttribute(node,'rootids')) {
+            if (!modules.domUtils.hasAttribute(node,'rootids')) {
                 return false;
             }
             rootids = modules.domUtils.getAttributeList(node, 'rootids');
             return (rootids.indexOf('id' + id + '-' + propertyName) > -1);
         },
 
 
 
@@ -1019,45 +1019,45 @@ var Microformats; // jshint ignore:line
                 child,
                 x,
                 i;
 
             children = modules.domUtils.getChildren( node );
 
             x = 0;
             i = children.length;
-            while(x < i) {
+            while (x < i) {
                 child = children[x];
                 var value = null;
-                if(modules.domUtils.hasAttributeValue(child, 'class', 'value')) {
-                    switch(propertyType) {
+                if (modules.domUtils.hasAttributeValue(child, 'class', 'value')) {
+                    switch (propertyType) {
                     case 'p':
                         value = context.getPValue(child, false);
                         break;
                     case 'u':
                         value = context.getUValue(child, false);
                         break;
                     case 'dt':
                         value = context.getDTValue(child, '', null, false);
                         break;
                     }
-                    if(value) {
+                    if (value) {
                         out.push(modules.utils.trim(value));
                     }
                 }
                 x++;
             }
-            if(out.length > 0) {
-                if(propertyType === 'p') {
+            if (out.length > 0) {
+                if (propertyType === 'p') {
                     return modules.text.parseText( this.document, out.join(' '), this.options.textFormat);
                 }
-                if(propertyType === 'u') {
+                if (propertyType === 'u') {
                     return out.join('');
                 }
-                if(propertyType === 'dt') {
+                if (propertyType === 'dt') {
                     return modules.dates.concatFragments(out,this.options.dateFormat).toString(this.options.dateFormat);
                 }
                 return undefined;
             }
             return null;
         },
 
 
@@ -1072,35 +1072,35 @@ var Microformats; // jshint ignore:line
             var out = [],
                 items,
                 i,
                 x;
 
             items = modules.domUtils.getNodesByAttributeValue(node, 'class', 'value-title');
             x = 0;
             i = items.length;
-            while(x < i) {
-                if(modules.domUtils.hasAttribute(items[x], 'title')) {
+            while (x < i) {
+                if (modules.domUtils.hasAttribute(items[x], 'title')) {
                     out.push(modules.domUtils.getAttribute(items[x], 'title'));
                 }
                 x++;
             }
             return out.join('');
         },
 
 
        /**
          * finds out whether a node has h-* class v1 and v2
          *
          * @param  {DOM Node} node
          * @return {Boolean}
          */
         hasHClass: function(node) {
             var classes = this.getUfClassNames(node);
-            if(classes.root && classes.root.length > 0) {
+            if (classes.root && classes.root.length > 0) {
                 return true;
             }
             return false;
         },
 
 
         /**
          * get both the root and property class names from a node
@@ -1126,98 +1126,98 @@ var Microformats; // jshint ignore:line
                 map,
                 prop,
                 propName,
                 v2Name,
                 impiedRel,
                 ufName;
 
             // don't get classes from excluded list of tags
-            if(modules.domUtils.hasTagName(node, this.excludeTags) === false) {
+            if (modules.domUtils.hasTagName(node, this.excludeTags) === false) {
 
                 // find classes for node
                 classNames = modules.domUtils.getAttribute(node, 'class');
-                if(classNames) {
+                if (classNames) {
                     items = classNames.split(' ');
                     x = 0;
                     i = items.length;
-                    while(x < i) {
+                    while (x < i) {
 
                         item = modules.utils.trim(items[x]);
 
                         // test for root prefix - v2
-                        if(modules.utils.startWith(item, context.rootPrefix)) {
-                            if(out.root.indexOf(item) === -1) {
+                        if (modules.utils.startWith(item, context.rootPrefix)) {
+                            if (out.root.indexOf(item) === -1) {
                                 out.root.push(item);
                             }
                             out.typeVersion = 'v2';
                         }
 
                         // test for property prefix - v2
                         z = context.propertyPrefixes.length;
-                        while(z--) {
-                            if(modules.utils.startWith(item, context.propertyPrefixes[z])) {
+                        while (z--) {
+                            if (modules.utils.startWith(item, context.propertyPrefixes[z])) {
                                 out.properties.push([item,'v2']);
                             }
                         }
 
                         // test for mapped root classnames v1
-                        for(key in modules.maps) {
-                            if(modules.maps.hasOwnProperty(key)) {
+                        for (key in modules.maps) {
+                            if (modules.maps.hasOwnProperty(key)) {
                                 // only add a root once
-                                if(modules.maps[key].root === item && out.root.indexOf(key) === -1) {
+                                if (modules.maps[key].root === item && out.root.indexOf(key) === -1) {
                                     // if root map has subTree set to true
                                     // test to see if we should create a property or root
-                                    if(modules.maps[key].subTree) {
+                                    if (modules.maps[key].subTree) {
                                         out.properties.push(['p-' + modules.maps[key].root, 'v1']);
                                     } else {
                                         out.root.push(key);
-                                        if(!out.typeVersion) {
+                                        if (!out.typeVersion) {
                                             out.typeVersion = 'v1';
                                         }
                                     }
                                 }
                             }
                         }
 
 
                         // test for mapped property classnames v1
-                        if(ufNameArr) {
+                        if (ufNameArr) {
                             for (var a = 0; a < ufNameArr.length; a++) {
                                 ufName = ufNameArr[a];
                                 // get mapped property v1 microformat
                                 map = context.getMapping(ufName);
-                                if(map) {
-                                    for(key in map.properties) {
+                                if (map) {
+                                    for (key in map.properties) {
                                         if (map.properties.hasOwnProperty(key)) {
 
                                             prop = map.properties[key];
                                             propName = (prop.map) ? prop.map : 'p-' + key;
 
-                                            if(key === item) {
-                                                if(prop.uf) {
+                                            if (key === item) {
+                                                if (prop.uf) {
                                                     // loop all the classList make sure
                                                     //   1. this property is a root
                                                     //   2. that there is not already an equivalent v2 property i.e. url and u-url on the same element
                                                     y = 0;
-                                                    while(y < i) {
+                                                    while (y < i) {
                                                         v2Name = context.getV2RootName(items[y]);
                                                         // add new root
-                                                        if(prop.uf.indexOf(v2Name) > -1 && out.root.indexOf(v2Name) === -1) {
+                                                        if (prop.uf.indexOf(v2Name) > -1 && out.root.indexOf(v2Name) === -1) {
                                                             out.root.push(v2Name);
                                                             out.typeVersion = 'v1';
                                                         }
                                                         y++;
                                                     }
                                                     //only add property once
-                                                    if(out.properties.indexOf(propName) === -1) {
+                                                    if (out.properties.indexOf(propName) === -1) {
                                                         out.properties.push([propName,'v1']);
                                                     }
                                                 } else {
-                                                    if(out.properties.indexOf(propName) === -1) {
+                                                    if (out.properties.indexOf(propName) === -1) {
                                                         out.properties.push([propName,'v1']);
                                                     }
                                                 }
                                             }
                                         }
 
                                     }
                                 }
@@ -1228,21 +1228,21 @@ var Microformats; // jshint ignore:line
                         x++;
 
                     }
                 }
             }
 
 
             // finds any alt rel=* mappings for a given node/microformat
-            if(ufNameArr && this.findRelImpied) {
+            if (ufNameArr && this.findRelImpied) {
                 for (var b = 0; b < ufNameArr.length; b++) {
                     ufName = ufNameArr[b];
                     impiedRel = this.findRelImpied(node, ufName);
-                    if(impiedRel && out.properties.indexOf(impiedRel) === -1) {
+                    if (impiedRel && out.properties.indexOf(impiedRel) === -1) {
                         out.properties.push([impiedRel, 'v1']);
                     }
                 }
             }
 
 
             //if(out.root.length === 1 && out.properties.length === 1) {
             //  if(out.root[0].replace('h-','') === this.removePropPrefix(out.properties[0][0])) {
@@ -1257,51 +1257,51 @@ var Microformats; // jshint ignore:line
         /**
          * given a v1 or v2 root name, return mapping object
          *
          * @param  {String} name
          * @return {Object || null}
          */
         getMapping: function(name) {
             var key;
-            for(key in modules.maps) {
-                if(modules.maps[key].root === name || key === name) {
+            for (key in modules.maps) {
+                if (modules.maps[key].root === name || key === name) {
                     return modules.maps[key];
                 }
             }
             return null;
         },
 
 
         /**
          * given a v1 root name returns a v2 root name i.e. vcard >>> h-card
          *
          * @param  {String} name
          * @return {String || null}
          */
         getV2RootName: function(name) {
             var key;
-            for(key in modules.maps) {
-                if(modules.maps[key].root === name) {
+            for (key in modules.maps) {
+                if (modules.maps[key].root === name) {
                     return key;
                 }
             }
             return null;
         },
 
 
         /**
          * whether a property is the right microformats version for its root type
          *
          * @param  {String} typeVersion
          * @param  {String} propertyVersion
          * @return {Boolean}
          */
         isAllowedPropertyVersion: function(typeVersion, propertyVersion) {
-            if(this.options.overlappingVersions === true) {
+            if (this.options.overlappingVersions === true) {
                 return true;
             }
             return (typeVersion === propertyVersion);
         },
 
 
         /**
          * creates a blank microformats object
@@ -1309,21 +1309,21 @@ var Microformats; // jshint ignore:line
          * @param  {String} name
          * @param  {String} value
          * @return {Object}
          */
         createUfObject: function(names, typeVersion, value) {
             var out = {};
 
             // is more than just whitespace
-            if(value && modules.utils.isOnlyWhiteSpace(value) === false) {
+            if (value && modules.utils.isOnlyWhiteSpace(value) === false) {
                 out.value = value;
             }
             // add type i.e. ["h-card", "h-org"]
-            if(modules.utils.isArray(names)) {
+            if (modules.utils.isArray(names)) {
                 out.type = names;
             } else {
                 out.type = [names];
             }
             out.properties = {};
             // metadata properties for parsing
             out.typeVersion = typeVersion;
             out.times = [];
@@ -1354,19 +1354,19 @@ var Microformats; // jshint ignore:line
          *
          * @param  {String} text
          * @return {String}
          */
         removePropPrefix: function(text) {
             var i;
 
             i = this.propertyPrefixes.length;
-            while(i--) {
+            while (i--) {
                 var prefix = this.propertyPrefixes[i];
-                if(modules.utils.startWith(text, prefix)) {
+                if (modules.utils.startWith(text, prefix)) {
                     text = text.substr(prefix.length);
                 }
             }
             return text;
         },
 
 
         /**
@@ -1379,41 +1379,41 @@ var Microformats; // jshint ignore:line
         expandURLs: function(node, attrName, baseUrl) {
             var i,
                 nodes,
                 attr;
 
             nodes = modules.domUtils.getNodesByAttribute(node, attrName);
             i = nodes.length;
             while (i--) {
-                try{
+                try {
                     // the url parser can blow up if the format is not right
                     attr = modules.domUtils.getAttribute(nodes[i], attrName);
-                    if(attr && attr !== '' && baseUrl !== '' && attr.indexOf('://') === -1) {
+                    if (attr && attr !== '' && baseUrl !== '' && attr.indexOf('://') === -1) {
                         //attr = urlParser.resolve(baseUrl, attr);
                         attr = modules.url.resolve(attr, baseUrl);
                         modules.domUtils.setAttribute(nodes[i], attrName, attr);
                     }
-                }catch(err) {
+                } catch (err) {
                     // do nothing - convert only the urls we can, leave the rest as they are
                 }
             }
         },
 
 
 
         /**
          * merges passed and default options -single level clone of properties
          *
          * @param  {Object} options
          */
         mergeOptions: function(options) {
             var key;
-            for(key in options) {
-                if(options.hasOwnProperty(key)) {
+            for (key in options) {
+                if (options.hasOwnProperty(key)) {
                     this.options[key] = options[key];
                 }
             }
         },
 
 
         /**
          * removes all rootid attributes
@@ -1421,74 +1421,74 @@ var Microformats; // jshint ignore:line
          * @param  {DOM Node} rootNode
          */
         removeRootIds: function(rootNode) {
             var arr,
                 i;
 
             arr = modules.domUtils.getNodesByAttribute(rootNode, 'rootids');
             i = arr.length;
-            while(i--) {
+            while (i--) {
                 modules.domUtils.removeAttribute(arr[i],'rootids');
             }
         },
 
 
         /**
          * removes all changes made to the DOM
          *
          * @param  {DOM Node} rootNode
          */
         clearUpDom: function(rootNode) {
-            if(this.removeIncludes) {
+            if (this.removeIncludes) {
                 this.removeIncludes(rootNode);
             }
             this.removeRootIds(rootNode);
         }
 
 
     };
 
 
     modules.Parser.prototype.constructor = modules.Parser;
 
 
     // check parser module is loaded
-    if(modules.Parser) {
+    if (modules.Parser) {
 
         /**
          * applies "implied rules" microformat output structure i.e. feed-title, name, photo, url and date
          *
          * @param  {DOM Node} node
          * @param  {Object} uf (microformat output structure)
          * @param  {Object} parentClasses (classes structure)
          * @param  {Boolean} impliedPropertiesByVersion
          * @return {Object}
          */
          modules.Parser.prototype.impliedRules = function(node, uf, parentClasses) {
             var typeVersion = (uf.typeVersion)? uf.typeVersion: 'v2';
 
             // TEMP: override to allow v1 implied properties while spec changes
-            if(this.options.impliedPropertiesByVersion === false) {
+            if (this.options.impliedPropertiesByVersion === false) {
                 typeVersion = 'v2';
             }
 
-            if(node && uf && uf.properties) {
+            if (node && uf && uf.properties) {
                 uf = this.impliedBackwardComp( node, uf, parentClasses );
-                if(typeVersion === 'v2') {
+                if (typeVersion === 'v2') {
                     uf = this.impliedhFeedTitle( uf );
                     uf = this.impliedName( node, uf );
                     uf = this.impliedPhoto( node, uf );
                     uf = this.impliedUrl( node, uf );
                 }
                 uf = this.impliedValue( node, uf, parentClasses );
                 uf = this.impliedDate( uf );
 
                 // TEMP: flagged while spec changes are put forward
-                if(this.options.parseLatLonGeo === true) {
+                if (this.options.parseLatLonGeo === true) {
                     uf = this.impliedGeo( uf );
                 }
             }
 
             return uf;
         };
 
 
@@ -1512,26 +1512,26 @@ var Microformats; // jshint ignore:line
 
                 .h-x>:only-child>img:only-child[alt]:not[.h-*]      <div class="h-card"><span><img src="jane.html" alt="Jane Doe"/></span></div>
                 .h-x>:only-child>area:only-child[alt]:not[.h-*]     <div class="h-card"><span><area href="jane.html" alt="Jane Doe"></area></span></div>
                 .h-x>:only-child>abbr:only-child[title]             <div class="h-card"><span><abbr title="Jane Doe">JD</abbr></span></div>
             */
             var name,
                 value;
 
-            if(!uf.properties.name) {
+            if (!uf.properties.name) {
                 value = this.getImpliedProperty(node, ['img', 'area', 'abbr'], this.getNameAttr);
                 var textFormat = this.options.textFormat;
                 // if no value for tags/properties use text
-                if(!value) {
+                if (!value) {
                     name = [modules.text.parse(this.document, node, textFormat)];
-                }else{
+                } else {
                     name = [modules.text.parseText(this.document, value, textFormat)];
                 }
-                if(name && name[0] !== '') {
+                if (name && name[0] !== '') {
                     uf.properties.name = name;
                 }
             }
 
             return uf;
         };
 
 
@@ -1548,21 +1548,21 @@ var Microformats; // jshint ignore:line
                 img.h-x[src]                                                <img class="h-card" alt="Jane Doe" src="jane.jpeg"/>
                 object.h-x[data]                                            <object class="h-card" data="jane.jpeg"/>Jane Doe</object>
                 .h-x>img[src]:only-of-type:not[.h-*]                        <div class="h-card"><img alt="Jane Doe" src="jane.jpeg"/></div>
                 .h-x>object[data]:only-of-type:not[.h-*]                    <div class="h-card"><object data="jane.jpeg"/>Jane Doe</object></div>
                 .h-x>:only-child>img[src]:only-of-type:not[.h-*]            <div class="h-card"><span><img alt="Jane Doe" src="jane.jpeg"/></span></div>
                 .h-x>:only-child>object[data]:only-of-type:not[.h-*]        <div class="h-card"><span><object data="jane.jpeg"/>Jane Doe</object></span></div>
             */
             var value;
-            if(!uf.properties.photo) {
+            if (!uf.properties.photo) {
                 value = this.getImpliedProperty(node, ['img', 'object'], this.getPhotoAttr);
-                if(value) {
+                if (value) {
                     // relative to absolute URL
-                    if(value && value !== '' && this.options.baseUrl !== '' && value.indexOf('://') === -1) {
+                    if (value && value !== '' && this.options.baseUrl !== '' && value.indexOf('://') === -1) {
                         value = modules.url.resolve(value, this.options.baseUrl);
                     }
                     uf.properties.photo = [modules.utils.trim(value)];
                 }
             }
             return uf;
         };
 
@@ -1578,21 +1578,21 @@ var Microformats; // jshint ignore:line
             // implied URL rule
             /*
                 a.h-x[href]                             <a class="h-card" href="glenn.html">Glenn</a>
                 area.h-x[href]                          <area class="h-card" href="glenn.html">Glenn</area>
                 .h-x>a[href]:only-of-type:not[.h-*]     <div class="h-card" ><a href="glenn.html">Glenn</a><p>...</p></div>
                 .h-x>area[href]:only-of-type:not[.h-*]  <div class="h-card" ><area href="glenn.html">Glenn</area><p>...</p></div>
             */
             var value;
-            if(!uf.properties.url) {
+            if (!uf.properties.url) {
                 value = this.getImpliedProperty(node, ['a', 'area'], this.getURLAttr);
-                if(value) {
+                if (value) {
                     // relative to absolute URL
-                    if(value && value !== '' && this.options.baseUrl !== '' && value.indexOf('://') === -1) {
+                    if (value && value !== '' && this.options.baseUrl !== '' && value.indexOf('://') === -1) {
                         value = modules.url.resolve(value, this.options.baseUrl);
                     }
                     uf.properties.url = [modules.utils.trim(value)];
                 }
             }
             return uf;
         };
 
@@ -1604,17 +1604,17 @@ var Microformats; // jshint ignore:line
          * @param  {Object} uf
          * @return {Object}
          */
         modules.Parser.prototype.impliedDate = function(uf) {
             // implied date rule
             // http://microformats.org/wiki/value-class-pattern#microformats2_parsers
             // http://microformats.org/wiki/microformats2-parsing-issues#implied_date_for_dt_properties_both_mf2_and_backcompat
             var newDate;
-            if(uf.times.length > 0 && uf.dates.length > 0) {
+            if (uf.times.length > 0 && uf.dates.length > 0) {
                 newDate = modules.dates.dateTimeUnion(uf.dates[0][1], uf.times[0][1], this.options.dateFormat);
                 uf.properties[this.removePropPrefix(uf.times[0][0])][0] = newDate.toString(this.options.dateFormat);
             }
             // clean-up object
             delete uf.times;
             delete uf.dates;
             return uf;
         };
@@ -1629,28 +1629,28 @@ var Microformats; // jshint ignore:line
          * @return {String || null}
          */
         modules.Parser.prototype.getImpliedProperty = function(node, tagList, getAttrFunction) {
             // i.e. img.h-card
             var value = getAttrFunction(node),
                 descendant,
                 child;
 
-            if(!value) {
+            if (!value) {
                 // i.e. .h-card>img:only-of-type:not(.h-card)
                 descendant = modules.domUtils.getSingleDescendantOfType( node, tagList);
-                if(descendant && this.hasHClass(descendant) === false) {
+                if (descendant && this.hasHClass(descendant) === false) {
                     value = getAttrFunction(descendant);
                 }
-                if(node.children.length > 0 ) {
+                if (node.children.length > 0 ) {
                     // i.e.  .h-card>:only-child>img:only-of-type:not(.h-card)
                     child = modules.domUtils.getSingleDescendant(node);
-                    if(child && this.hasHClass(child) === false) {
+                    if (child && this.hasHClass(child) === false) {
                         descendant = modules.domUtils.getSingleDescendantOfType(child, tagList);
-                        if(descendant && this.hasHClass(descendant) === false) {
+                        if (descendant && this.hasHClass(descendant) === false) {
                             value = getAttrFunction(descendant);
                         }
                     }
                 }
             }
 
             return value;
         };
@@ -1659,50 +1659,50 @@ var Microformats; // jshint ignore:line
         /**
          * get an implied name value from a node
          *
          * @param  {DOM Node} node
          * @return {String || null}
          */
         modules.Parser.prototype.getNameAttr = function(node) {
             var value = modules.domUtils.getAttrValFromTagList(node, ['img','area'], 'alt');
-            if(!value) {
+            if (!value) {
                 value = modules.domUtils.getAttrValFromTagList(node, ['abbr'], 'title');
             }
             return value;
         };
 
 
         /**
          * get an implied photo value from a node
          *
          * @param  {DOM Node} node
          * @return {String || null}
          */
         modules.Parser.prototype.getPhotoAttr = function(node) {
             var value = modules.domUtils.getAttrValFromTagList(node, ['img'], 'src');
-            if(!value && modules.domUtils.hasAttributeValue(node, 'class', 'include') === false) {
+            if (!value && modules.domUtils.hasAttributeValue(node, 'class', 'include') === false) {
                 value = modules.domUtils.getAttrValFromTagList(node, ['object'], 'data');
             }
             return value;
         };
 
 
         /**
          * get an implied photo value from a node
          *
          * @param  {DOM Node} node
          * @return {String || null}
          */
         modules.Parser.prototype.getURLAttr = function(node) {
             var value = null;
-            if(modules.domUtils.hasAttributeValue(node, 'class', 'include') === false) {
+            if (modules.domUtils.hasAttributeValue(node, 'class', 'include') === false) {
 
                 value = modules.domUtils.getAttrValFromTagList(node, ['a'], 'href');
-                if(!value) {
+                if (!value) {
                     value = modules.domUtils.getAttrValFromTagList(node, ['area'], 'href');
                 }
 
             }
             return value;
         };
 
 
@@ -1711,31 +1711,31 @@ var Microformats; // jshint ignore:line
          *
          * @param  {DOM Node} node
          * @param  {Object} uf
          * @return {Object}
          */
         modules.Parser.prototype.impliedValue = function(node, uf, parentClasses) {
 
             // intersection of implied name and implied value rules
-            if(uf.properties.name) {
-                if(uf.value && parentClasses.root.length > 0 && parentClasses.properties.length === 1) {
+            if (uf.properties.name) {
+                if (uf.value && parentClasses.root.length > 0 && parentClasses.properties.length === 1) {
                     uf = this.getAltValue(uf, parentClasses.properties[0][0], 'p-name', uf.properties.name[0]);
                 }
             }
 
             // intersection of implied URL and implied value rules
-            if(uf.properties.url) {
-                if(parentClasses && parentClasses.root.length === 1 && parentClasses.properties.length === 1) {
+            if (uf.properties.url) {
+                if (parentClasses && parentClasses.root.length === 1 && parentClasses.properties.length === 1) {
                     uf = this.getAltValue(uf, parentClasses.properties[0][0], 'u-url', uf.properties.url[0]);
                 }
             }
 
             // apply alt value
-            if(uf.altValue !== null) {
+            if (uf.altValue !== null) {
                 uf.value = uf.altValue.value;
             }
             delete uf.altValue;
 
 
             return uf;
         };
 
@@ -1745,47 +1745,47 @@ var Microformats; // jshint ignore:line
          *
          * @param  {Object} uf
          * @param  {String} parentPropertyName
          * @param  {String} propertyName
          * @param  {String} value
          * @return {Object}
          */
         modules.Parser.prototype.getAltValue = function(uf, parentPropertyName, propertyName, value) {
-            if(uf.value && !uf.altValue) {
+            if (uf.value && !uf.altValue) {
                 // first p-name of the h-* child
-                if(modules.utils.startWith(parentPropertyName,'p-') && propertyName === 'p-name') {
+                if (modules.utils.startWith(parentPropertyName,'p-') && propertyName === 'p-name') {
                     uf.altValue = {name: propertyName, value: value};
                 }
                 // if it's an e-* property element
-                if(modules.utils.startWith(parentPropertyName,'e-') && modules.utils.startWith(propertyName,'e-')) {
+                if (modules.utils.startWith(parentPropertyName,'e-') && modules.utils.startWith(propertyName,'e-')) {
                     uf.altValue = {name: propertyName, value: value};
                 }
                 // if it's an u-* property element
-                if(modules.utils.startWith(parentPropertyName,'u-') && propertyName === 'u-url') {
+                if (modules.utils.startWith(parentPropertyName,'u-') && propertyName === 'u-url') {
                     uf.altValue = {name: propertyName, value: value};
                 }
             }
             return uf;
         };
 
 
         /**
          * if a h-feed does not have a title use the title tag of a page
          *
          * @param  {Object} uf
          * @return {Object}
          */
         modules.Parser.prototype.impliedhFeedTitle = function( uf ) {
-            if(uf.type && uf.type.indexOf('h-feed') > -1) {
+            if (uf.type && uf.type.indexOf('h-feed') > -1) {
                 // has no name property
-                if(uf.properties.name === undefined || uf.properties.name[0] === '' ) {
+                if (uf.properties.name === undefined || uf.properties.name[0] === '' ) {
                     // use the text from the title tag
                     var title = modules.domUtils.querySelector(this.document, 'title');
-                    if(title) {
+                    if (title) {
                         uf.properties.name = [modules.domUtils.textContent(title)];
                     }
                 }
             }
             return uf;
         };
 
 
@@ -1798,48 +1798,48 @@ var Microformats; // jshint ignore:line
          */
         modules.Parser.prototype.impliedGeo = function( uf ) {
             var geoPair,
                 parts,
                 longitude,
                 latitude,
                 valid = true;
 
-            if(uf.type && uf.type.indexOf('h-geo') > -1) {
+            if (uf.type && uf.type.indexOf('h-geo') > -1) {
 
                 // has no latitude or longitude property
-                if(uf.properties.latitude === undefined || uf.properties.longitude === undefined ) {
+                if (uf.properties.latitude === undefined || uf.properties.longitude === undefined ) {
 
                     geoPair = (uf.properties.name)? uf.properties.name[0] : null;
                     geoPair = (!geoPair && uf.properties.value)? uf.properties.value : geoPair;
 
-                    if(geoPair) {
+                    if (geoPair) {
                         // allow for the use of a ';' as in microformats and also ',' as in Geo URL
                         geoPair = geoPair.replace(';',',');
 
                         // has sep char
-                        if(geoPair.indexOf(',') > -1 ) {
+                        if (geoPair.indexOf(',') > -1 ) {
                             parts = geoPair.split(',');
 
                             // only correct if we have two or more parts
-                            if(parts.length > 1) {
+                            if (parts.length > 1) {
 
                                 // latitude no value outside the range -90 or 90
                                 latitude = parseFloat( parts[0] );
-                                if(modules.utils.isNumber(latitude) && latitude > 90 || latitude < -90) {
+                                if (modules.utils.isNumber(latitude) && latitude > 90 || latitude < -90) {
                                     valid = false;
                                 }
 
                                 // longitude no value outside the range -180 to 180
                                 longitude = parseFloat( parts[1] );
-                                if(modules.utils.isNumber(longitude) && longitude > 180 || longitude < -180) {
+                                if (modules.utils.isNumber(longitude) && longitude > 180 || longitude < -180) {
                                     valid = false;
                                 }
 
-                                if(valid) {
+                                if (valid) {
                                     uf.properties.latitude = [latitude];
                                     uf.properties.longitude  = [longitude];
                                 }
                             }
 
                         }
                     }
                 }
@@ -1853,37 +1853,37 @@ var Microformats; // jshint ignore:line
          *
          * @param  {Object} uf
          * @return {Object}
          */
         modules.Parser.prototype.impliedBackwardComp = function(node, uf, parentClasses) {
 
             // look for pattern in parent classes like "p-geo h-geo"
             // these are structures built from backwards compat parsing of geo
-            if(parentClasses.root.length === 1 && parentClasses.properties.length === 1) {
-                if(parentClasses.root[0].replace('h-','') === this.removePropPrefix(parentClasses.properties[0][0])) {
+            if (parentClasses.root.length === 1 && parentClasses.properties.length === 1) {
+                if (parentClasses.root[0].replace('h-','') === this.removePropPrefix(parentClasses.properties[0][0])) {
 
                     // if microformat has no properties apply the impliedName rule to get value from containing node
                     // this will get value from html such as <abbr class="geo" title="30.267991;-97.739568">Brighton</abbr>
-                    if( modules.utils.hasProperties(uf.properties) === false ) {
+                    if ( modules.utils.hasProperties(uf.properties) === false ) {
                         uf = this.impliedName( node, uf );
                     }
                 }
             }
 
             return uf;
         };
 
 
 
     }
 
 
     // check parser module is loaded
-    if(modules.Parser) {
+    if (modules.Parser) {
 
 
         /**
          * appends clones of include Nodes into the DOM structure
          *
          * @param  {DOM node} rootNode
          */
         modules.Parser.prototype.addIncludes = function(rootNode) {
@@ -1905,22 +1905,22 @@ var Microformats; // jshint ignore:line
                 i,
                 x,
                 z,
                 y;
 
             arr = modules.domUtils.getNodesByAttribute(rootNode, attributeName);
             x = 0;
             i = arr.length;
-            while(x < i) {
+            while (x < i) {
                 idList = modules.domUtils.getAttributeList(arr[x], attributeName);
-                if(idList) {
+                if (idList) {
                     z = 0;
                     y = idList.length;
-                    while(z < y) {
+                    while (z < y) {
                         this.apppendInclude(arr[x], idList[z]);
                         z++;
                     }
                 }
                 x++;
             }
         };
 
@@ -1933,19 +1933,19 @@ var Microformats; // jshint ignore:line
         modules.Parser.prototype.addClassIncludes = function(rootNode) {
             var id,
                 arr,
                 x = 0,
                 i;
 
             arr = modules.domUtils.getNodesByAttributeValue(rootNode, 'class', 'include');
             i = arr.length;
-            while(x < i) {
+            while (x < i) {
                 id = modules.domUtils.getAttrValFromTagList(arr[x], ['a'], 'href');
-                if(!id) {
+                if (!id) {
                     id = modules.domUtils.getAttrValFromTagList(arr[x], ['object'], 'data');
                 }
                 this.apppendInclude(arr[x], id);
                 x++;
             }
         };
 
 
@@ -1956,17 +1956,17 @@ var Microformats; // jshint ignore:line
          * @param  {Stringe} id
          */
         modules.Parser.prototype.apppendInclude = function(node, id) {
             var include,
                 clone;
 
             id = modules.utils.trim(id.replace('#', ''));
             include = modules.domUtils.getElementById(this.document, id);
-            if(include) {
+            if (include) {
                 clone = modules.domUtils.clone(include);
                 this.markIncludeChildren(clone);
                 modules.domUtils.appendChild(node, clone);
             }
         };
 
 
         /**
@@ -1980,17 +1980,17 @@ var Microformats; // jshint ignore:line
                 i;
 
             // loop the array and add the attribute
             arr = this.findRootNodes(rootNode);
             x = 0;
             i = arr.length;
             modules.domUtils.setAttribute(rootNode, 'data-include', 'true');
             modules.domUtils.setAttribute(rootNode, 'style', 'display:none');
-            while(x < i) {
+            while (x < i) {
                 modules.domUtils.setAttribute(arr[x], 'data-include', 'true');
                 x++;
             }
         };
 
 
         /**
          * removes all appended include clones from DOM
@@ -1999,27 +1999,27 @@ var Microformats; // jshint ignore:line
          */
         modules.Parser.prototype.removeIncludes = function(rootNode) {
             var arr,
                 i;
 
             // remove all the items that were added as includes
             arr = modules.domUtils.getNodesByAttribute(rootNode, 'data-include');
             i = arr.length;
-            while(i--) {
+            while (i--) {
                 modules.domUtils.removeChild(rootNode,arr[i]);
             }
         };
 
 
     }
 
 
     // check parser module is loaded
-    if(modules.Parser) {
+    if (modules.Parser) {
 
         /**
          * finds rel=* structures
          *
          * @param  {DOM node} rootNode
          * @return {Object}
          */
         modules.Parser.prototype.findRels = function(rootNode) {
@@ -2036,66 +2036,66 @@ var Microformats; // jshint ignore:line
                 items,
                 item,
                 value,
                 arr;
 
             arr = modules.domUtils.getNodesByAttribute(rootNode, 'rel');
             x = 0;
             i = arr.length;
-            while(x < i) {
+            while (x < i) {
                 relList = modules.domUtils.getAttribute(arr[x], 'rel');
 
-                if(relList) {
+                if (relList) {
                     items = relList.split(' ');
 
 
                     // add rels
                     z = 0;
                     y = items.length;
-                    while(z < y) {
+                    while (z < y) {
                         item = modules.utils.trim(items[z]);
 
                         // get rel value
                         value = modules.domUtils.getAttrValFromTagList(arr[x], ['a', 'area'], 'href');
-                        if(!value) {
+                        if (!value) {
                             value = modules.domUtils.getAttrValFromTagList(arr[x], ['link'], 'href');
                         }
 
                         // create the key
-                        if(!out.rels[item]) {
+                        if (!out.rels[item]) {
                             out.rels[item] = [];
                         }
 
-                        if(typeof this.options.baseUrl === 'string' && typeof value === 'string') {
+                        if (typeof this.options.baseUrl === 'string' && typeof value === 'string') {
 
                             var resolved = modules.url.resolve(value, this.options.baseUrl);
                             // do not add duplicate rels - based on resolved URLs
-                            if(out.rels[item].indexOf(resolved) === -1) {
+                            if (out.rels[item].indexOf(resolved) === -1) {
                                 out.rels[item].push( resolved );
                             }
                         }
                         z++;
                     }
 
 
                     var url = null;
-                    if(modules.domUtils.hasAttribute(arr[x], 'href')) {
+                    if (modules.domUtils.hasAttribute(arr[x], 'href')) {
                         url = modules.domUtils.getAttribute(arr[x], 'href');
-                        if(url) {
+                        if (url) {
                             url = modules.url.resolve(url, this.options.baseUrl );
                         }
                     }
 
 
                     // add to rel-urls
                     var relUrl = this.getRelProperties(arr[x]);
                     relUrl.rels = items;
                     // // do not add duplicate rel-urls - based on resolved URLs
-                    if(url && out['rel-urls'][url] === undefined) {
+                    if (url && out['rel-urls'][url] === undefined) {
                         out['rel-urls'][url] = relUrl;
                     }
 
 
                 }
                 x++;
             }
             return out;
@@ -2106,29 +2106,29 @@ var Microformats; // jshint ignore:line
          * gets the properties of a rel=*
          *
          * @param  {DOM node} node
          * @return {Object}
          */
         modules.Parser.prototype.getRelProperties = function(node) {
             var obj = {};
 
-            if(modules.domUtils.hasAttribute(node, 'media')) {
+            if (modules.domUtils.hasAttribute(node, 'media')) {
                 obj.media = modules.domUtils.getAttribute(node, 'media');
             }
-            if(modules.domUtils.hasAttribute(node, 'type')) {
+            if (modules.domUtils.hasAttribute(node, 'type')) {
                 obj.type = modules.domUtils.getAttribute(node, 'type');
             }
-            if(modules.domUtils.hasAttribute(node, 'hreflang')) {
+            if (modules.domUtils.hasAttribute(node, 'hreflang')) {
                 obj.hreflang = modules.domUtils.getAttribute(node, 'hreflang');
             }
-            if(modules.domUtils.hasAttribute(node, 'title')) {
+            if (modules.domUtils.hasAttribute(node, 'title')) {
                 obj.title = modules.domUtils.getAttribute(node, 'title');
             }
-            if(modules.utils.trim(this.getPValue(node, false)) !== '') {
+            if (modules.utils.trim(this.getPValue(node, false)) !== '') {
                 obj.text = this.getPValue(node, false);
             }
 
             return obj;
         };
 
 
         /**
@@ -2139,32 +2139,32 @@ var Microformats; // jshint ignore:line
          * @return {String || undefined}
          */
         modules.Parser.prototype.findRelImpied = function(node, ufName) {
             var out,
                 map,
                 i;
 
             map = this.getMapping(ufName);
-            if(map) {
-                for(var key in map.properties) {
+            if (map) {
+                for (var key in map.properties) {
                     if (map.properties.hasOwnProperty(key)) {
                         var prop = map.properties[key],
                             propName = (prop.map) ? prop.map : 'p-' + key,
                             relCount = 0;
 
                         // is property an alt rel=* mapping
-                        if(prop.relAlt && modules.domUtils.hasAttribute(node, 'rel')) {
+                        if (prop.relAlt && modules.domUtils.hasAttribute(node, 'rel')) {
                             i = prop.relAlt.length;
-                            while(i--) {
-                                if(modules.domUtils.hasAttributeValue(node, 'rel', prop.relAlt[i])) {
+                            while (i--) {
+                                if (modules.domUtils.hasAttributeValue(node, 'rel', prop.relAlt[i])) {
                                     relCount++;
                                 }
                             }
-                            if(relCount === prop.relAlt.length) {
+                            if (relCount === prop.relAlt.length) {
                                 out = propName;
                             }
                         }
                     }
                 }
             }
             return out;
         };
@@ -2183,17 +2183,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * returns the number of rel=* microformats
          *
          * @param  {DOM node} node
          * @return {Int}
          */
         modules.Parser.prototype.countRels = function(node) {
-            if(node) {
+            if (node) {
                 return modules.domUtils.getNodesByAttribute(node, 'rel').length;
             }
             return 0;
         };
 
 
 
     }
@@ -2247,76 +2247,76 @@ var Microformats; // jshint ignore:line
         /**
          * does the text start with a test string
          *
          * @param  {String} text
          * @param  {String} test
          * @return {Boolean}
          */
         startWith: function( text, test ) {
-            return(text.indexOf(test) === 0);
+            return (text.indexOf(test) === 0);
         },
 
 
         /**
          * removes spaces at front and back of text
          *
          * @param  {String} text
          * @return {String}
          */
         trim: function( text ) {
-            if(text && this.isString(text)) {
+            if (text && this.isString(text)) {
                 return (text.trim())? text.trim() : text.replace(/^\s+|\s+$/g, '');
             }
             return '';
         },
 
 
         /**
          * replaces a character in text
          *
          * @param  {String} text
          * @param  {Int} index
          * @param  {String} character
          * @return {String}
          */
         replaceCharAt: function( text, index, character ) {
-            if(text && text.length > index) {
+            if (text && text.length > index) {
                return text.substr(0, index) + character + text.substr(index+character.length);
             }
             return text;
         },
 
 
         /**
          * removes whitespace, tabs and returns from start and end of text
          *
          * @param  {String} text
          * @return {String}
          */
         trimWhitespace: function( text ) {
-            if(text && text.length) {
+            if (text && text.length) {
                 var i = text.length,
                     x = 0;
 
                 // turn all whitespace chars at end into spaces
                 while (i--) {
-                    if(this.isOnlyWhiteSpace(text[i])) {
+                    if (this.isOnlyWhiteSpace(text[i])) {
                         text = this.replaceCharAt( text, i, ' ' );
-                    }else{
+                    } else {
                         break;
                     }
                 }
 
                 // turn all whitespace chars at start into spaces
                 i = text.length;
                 while (x < i) {
-                    if(this.isOnlyWhiteSpace(text[x])) {
+                    if (this.isOnlyWhiteSpace(text[x])) {
                         text = this.replaceCharAt( text, i, ' ' );
-                    }else{
+                    } else {
                         break;
                     }
                     x++;
                 }
             }
             return this.trim(text);
         },
 
@@ -2346,18 +2346,18 @@ var Microformats; // jshint ignore:line
         /**
          * does an object have any of its own properties
          *
          * @param  {Object} obj
          * @return {Boolean}
          */
         hasProperties: function( obj ) {
             var key;
-            for(key in obj) {
-                if( obj.hasOwnProperty( key ) ) {
+            for (key in obj) {
+                if ( obj.hasOwnProperty( key ) ) {
                     return true;
                 }
             }
             return false;
         },
 
 
         /**
@@ -2415,49 +2415,49 @@ var Microformats; // jshint ignore:line
          * configures what are the base DOM objects for parsing
          *
          * @param  {Object} options
          * @return {DOM Node} node
          */
         getDOMContext: function( options ) {
 
             // if a node is passed
-            if(options.node) {
+            if (options.node) {
                 this.rootNode = options.node;
             }
 
 
             // if a html string is passed
-            if(options.html) {
+            if (options.html) {
                 //var domParser = new DOMParser();
                 var domParser = this.getDOMParser();
                 this.rootNode = domParser.parseFromString( options.html, 'text/html' );
             }
 
 
             // find top level document from rootnode
-            if(this.rootNode !== null) {
-                if(this.rootNode.nodeType === 9) {
+            if (this.rootNode !== null) {
+                if (this.rootNode.nodeType === 9) {
                     this.document = this.rootNode;
                     this.rootNode = modules.domUtils.querySelector(this.rootNode, 'html');
-                }else{
+                } else {
                     // if it's DOM node get parent DOM Document
                     this.document = modules.domUtils.ownerDocument(this.rootNode);
                 }
             }
 
 
             // use global document object
-            if(!this.rootNode && document) {
+            if (!this.rootNode && document) {
                 this.rootNode = modules.domUtils.querySelector(document, 'html');
                 this.document = document;
             }
 
 
-            if(this.rootNode && this.document) {
+            if (this.rootNode && this.document) {
                 return {document: this.document, rootNode: this.rootNode};
             }
 
             return {document: null, rootNode: null};
         },
 
 
 
@@ -2490,19 +2490,19 @@ var Microformats; // jshint ignore:line
 
         /**
          * abstracts DOM textContent
          *
          * @param  {DOM Node} node
          * @return {String}
          */
         textContent: function(node) {
-            if(node.textContent) {
+            if (node.textContent) {
                 return node.textContent;
-            }else if(node.innerText) {
+            } else if (node.innerText) {
                 return node.innerText;
             }
             return '';
         },
 
 
         /**
          * abstracts DOM innerHTML
@@ -2606,18 +2606,18 @@ var Microformats; // jshint ignore:line
          * @param  {String} attributeName
          * @return {Array}
          */
         getAttributeList: function(node, attributeName) {
             var out = [],
                 attList;
 
             attList = node.getAttribute(attributeName);
-            if(attList && attList !== '') {
-                if(attList.indexOf(' ') > -1) {
+            if (attList && attList !== '') {
+                if (attList.indexOf(' ') > -1) {
                     out = attList.split(' ');
                 } else {
                     out.push(attList);
                 }
             }
             return out;
         },
 
@@ -2644,20 +2644,20 @@ var Microformats; // jshint ignore:line
          */
         getNodesByAttributeValue: function(rootNode, name, value) {
             var arr = [],
                 x = 0,
                 i,
                 out = [];
 
             arr = this.getNodesByAttribute(rootNode, name);
-            if(arr) {
+            if (arr) {
                 i = arr.length;
-                while(x < i) {
-                    if(this.hasAttributeValue(arr[x], name, value)) {
+                while (x < i) {
+                    if (this.hasAttributeValue(arr[x], name, value)) {
                         out.push(arr[x]);
                     }
                     x++;
                 }
             }
             return out;
         },
 
@@ -2667,20 +2667,20 @@ var Microformats; // jshint ignore:line
          *
          * @param  {Array} tagNames
          * @param  {String} attributeName
          * @return {String || null}
          */
         getAttrValFromTagList: function(node, tagNames, attributeName) {
             var i = tagNames.length;
 
-            while(i--) {
-                if(node.tagName.toLowerCase() === tagNames[i]) {
+            while (i--) {
+                if (node.tagName.toLowerCase() === tagNames[i]) {
                     var attrValue = this.getAttribute(node, attributeName);
-                    if(attrValue && attrValue !== '') {
+                    if (attrValue && attrValue !== '') {
                         return attrValue;
                     }
                 }
             }
             return null;
         },
 
 
@@ -2717,50 +2717,50 @@ var Microformats; // jshint ignore:line
          */
         getDescendant: function( node, tagNames, onlyOfType ) {
             var i = node.children.length,
                 countAll = 0,
                 countOfType = 0,
                 child,
                 out = null;
 
-            while(i--) {
+            while (i--) {
                 child = node.children[i];
-                if(child.nodeType === 1) {
-                    if(tagNames) {
+                if (child.nodeType === 1) {
+                    if (tagNames) {
                         // count just only-of-type
-                        if(this.hasTagName(child, tagNames)) {
+                        if (this.hasTagName(child, tagNames)) {
                             out = child;
                             countOfType++;
                         }
-                    }else{
+                    } else {
                         // count all elements
                         out = child;
                         countAll++;
                     }
                 }
             }
-            if(onlyOfType === true) {
+            if (onlyOfType === true) {
                 return (countOfType === 1)? out : null;
             }
             return (countAll === 1)? out : null;
         },
 
 
        /**
          * is a node one of a list of tags
          *
          * @param  {DOM Node} rootNode
          * @param  {Array} tagNames
          * @return {Boolean}
          */
         hasTagName: function(node, tagNames) {
             var i = tagNames.length;
-            while(i--) {
-                if(node.tagName.toLowerCase() === tagNames[i]) {
+            while (i--) {
+                if (node.tagName.toLowerCase() === tagNames[i]) {
                     return true;
                 }
             }
             return false;
         },
 
 
        /**
@@ -2804,17 +2804,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * gets the text of a node
          *
          * @param  {DOM Node} node
          * @return {String}
          */
         getElementText: function( node ) {
-            if(node && node.data) {
+            if (node && node.data) {
                 return node.data;
             }
             return '';
         },
 
 
         /**
          * gets the attributes of a node - ordered by sequence in html
@@ -2854,17 +2854,17 @@ var Microformats; // jshint ignore:line
          *
          * @param  {DOM Document} document
          * @return {DOM Document}
          */
         cloneDocument: function( document ) {
             var newNode,
                 newDocument = null;
 
-            if( this.canCloneDocument( document )) {
+            if ( this.canCloneDocument( document )) {
                 newDocument = document.implementation.createHTMLDocument('');
                 newNode = newDocument.importNode( document.documentElement, true );
                 newDocument.replaceChild(newNode, newDocument.querySelector('html'));
             }
             return (newNode && newNode.nodeType && newNode.nodeType === 1)? newDocument : document;
         },
 
 
@@ -2904,18 +2904,18 @@ var Microformats; // jshint ignore:line
          *   @param  {DOM Node} node
          *   @return {Array}
          */
         getNodePath: function  (node) {
             var parent = node.parentNode,
                 path = [],
                 index = this.getChildIndex(node);
 
-          if(parent && (path = this.getNodePath(parent))) {
-               if(index > -1) {
+          if (parent && (path = this.getNodePath(parent))) {
+               if (index > -1) {
                    path.push(index);
                }
           }
           return path;
         },
 
 
         /**
@@ -2997,41 +2997,41 @@ var Microformats; // jshint ignore:line
          * resolves url to absolute version using baseUrl
          *
          * @param  {String} url
          * @param  {String} baseUrl
          * @return {String}
          */
         resolve: function(url, baseUrl) {
             // use modern URL web API where we can
-            if(modules.utils.isString(url) && modules.utils.isString(baseUrl) && url.indexOf('://') === -1) {
+            if (modules.utils.isString(url) && modules.utils.isString(baseUrl) && url.indexOf('://') === -1) {
                 // this try catch is required as IE has an URL object but no constuctor support
                 // http://glennjones.net/articles/the-problem-with-window-url
                 try {
                     var resolved = new URL(url, baseUrl).toString();
                     // deal with early Webkit not throwing an error - for Safari
-                    if(resolved === '[object URL]') {
+                    if (resolved === '[object URL]') {
                         resolved = URI.resolve(baseUrl, url);
                     }
                     return resolved;
-                }catch(e) {
+                } catch (e) {
                     // otherwise fallback to DOM
-                    if(this._domParser === undefined) {
+                    if (this._domParser === undefined) {
                         this.init();
                     }
 
                     // do not use setAttribute it does not work with IE9
                     this._baseNode.href = baseUrl;
                     this._linkNode.href = url;
 
                     // dont use getAttribute as it returns orginal value not resolved
                     return this._linkNode.href;
                 }
-            }else{
-                if(modules.utils.isString(url)) {
+            } else {
+                if (modules.utils.isString(url)) {
                     return url;
                 }
                 return '';
             }
         },
 
     };
 
@@ -3046,17 +3046,17 @@ var Microformats; // jshint ignore:line
      */
     modules.ISODate = function ( dateString, format ) {
         this.clear();
 
         this.format = (format)? format : 'auto'; // auto or W3C or RFC3339 or HTML5
         this.setFormatSep();
 
         // optional should be full iso date/time string
-        if(arguments[0]) {
+        if (arguments[0]) {
             this.parse(dateString, format);
         }
     };
 
 
     modules.ISODate.prototype = {
 
 
@@ -3135,81 +3135,81 @@ var Microformats; // jshint ignore:line
 
             var parts = [],
                 tzArray = [],
                 position = 0,
                 datePart = '',
                 timePart = '',
                 timeZonePart = '';
 
-            if(format) {
+            if (format) {
                 this.format = format;
             }
 
 
 
             // discover date time separtor for auto profile
             // Set to 'T' by default
-            if(dateString.indexOf('t') > -1) {
+            if (dateString.indexOf('t') > -1) {
                 this.autoProfile.sep = 't';
             }
-            if(dateString.indexOf('z') > -1) {
+            if (dateString.indexOf('z') > -1) {
                 this.autoProfile.tzZulu = 'z';
             }
-            if(dateString.indexOf('Z') > -1) {
+            if (dateString.indexOf('Z') > -1) {
                 this.autoProfile.tzZulu = 'Z';
             }
-            if(dateString.toUpperCase().indexOf('T') === -1) {
+            if (dateString.toUpperCase().indexOf('T') === -1) {
                 this.autoProfile.sep = ' ';
             }
 
 
             dateString = dateString.toUpperCase().replace(' ','T');
 
             // break on 'T' divider or space
-            if(dateString.indexOf('T') > -1) {
+            if (dateString.indexOf('T') > -1) {
                 parts = dateString.split('T');
                 datePart = parts[0];
                 timePart = parts[1];
 
                 // zulu UTC
-                if(timePart.indexOf( 'Z' ) > -1) {
+                if (timePart.indexOf( 'Z' ) > -1) {
                     this.z = true;
                 }
 
                 // timezone
-                if(timePart.indexOf( '+' ) > -1 || timePart.indexOf( '-' ) > -1) {
+                if (timePart.indexOf( '+' ) > -1 || timePart.indexOf( '-' ) > -1) {
                     tzArray = timePart.split( 'Z' ); // incase of incorrect use of Z
                     timePart = tzArray[0];
                     timeZonePart = tzArray[1];
 
                     // timezone
-                    if(timePart.indexOf( '+' ) > -1 || timePart.indexOf( '-' ) > -1) {
+                    if (timePart.indexOf( '+' ) > -1 || timePart.indexOf( '-' ) > -1) {
                         position = 0;
 
-                        if(timePart.indexOf( '+' ) > -1) {
+                        if (timePart.indexOf( '+' ) > -1) {
                             position = timePart.indexOf( '+' );
                         } else {
                             position = timePart.indexOf( '-' );
                         }
 
                         timeZonePart = timePart.substring( position, timePart.length );
                         timePart = timePart.substring( 0, position );
                     }
                 }
 
             } else {
                 datePart = dateString;
             }
 
-            if(datePart !== '') {
+            if (datePart !== '') {
                 this.parseDate( datePart );
-                if(timePart !== '') {
+                if (timePart !== '') {
                     this.parseTime( timePart );
-                    if(timeZonePart !== '') {
+                    if (timeZonePart !== '') {
                         this.parseTimeZone( timeZonePart );
                     }
                 }
             }
             return this.toString( format );
         },
 
 
@@ -3221,41 +3221,41 @@ var Microformats; // jshint ignore:line
          * @return {String}
          */
         parseDate: function( dateString, format ) {
             this.clearDate();
 
             var parts = [];
 
             // discover timezone separtor for auto profile // default is ':'
-            if(dateString.indexOf('-') === -1) {
+            if (dateString.indexOf('-') === -1) {
                 this.autoProfile.tsep = '';
             }
 
             // YYYY-DDD
             parts = dateString.match( /(\d\d\d\d)-(\d\d\d)/ );
-            if(parts) {
-                if(parts[1]) {
+            if (parts) {
+                if (parts[1]) {
                     this.dY = parts[1];
                 }
-                if(parts[2]) {
+                if (parts[2]) {
                     this.dDDD = parts[2];
                 }
             }
 
-            if(this.dDDD === -1) {
+            if (this.dDDD === -1) {
                 // YYYY-MM-DD ie 2008-05-01 and YYYYMMDD ie 20080501
                 parts = dateString.match( /(\d\d\d\d)?-?(\d\d)?-?(\d\d)?/ );
-                if(parts[1]) {
+                if (parts[1]) {
                     this.dY = parts[1];
                 }
-                if(parts[2]) {
+                if (parts[2]) {
                     this.dM = parts[2];
                 }
-                if(parts[3]) {
+                if (parts[3]) {
                     this.dD = parts[3];
                 }
             }
             return this.toString(format);
         },
 
 
         /**
@@ -3265,32 +3265,32 @@ var Microformats; // jshint ignore:line
          * @param  {String} format
          * @return {String}
          */
         parseTime: function( timeString, format ) {
             this.clearTime();
             var parts = [];
 
             // discover date separtor for auto profile // default is ':'
-            if(timeString.indexOf(':') === -1) {
+            if (timeString.indexOf(':') === -1) {
                 this.autoProfile.tsep = '';
             }
 
             // finds timezone HH:MM:SS and HHMMSS  ie 13:30:45, 133045 and 13:30:45.0135
             parts = timeString.match( /(\d\d)?:?(\d\d)?:?(\d\d)?.?([0-9]+)?/ );
-            if(parts[1]) {
+            if (parts[1]) {
                 this.tH = parts[1];
             }
-            if(parts[2]) {
+            if (parts[2]) {
                 this.tM = parts[2];
             }
-            if(parts[3]) {
+            if (parts[3]) {
                 this.tS = parts[3];
             }
-            if(parts[4]) {
+            if (parts[4]) {
                 this.tD = parts[4];
             }
             return this.toTimeString(format);
         },
 
 
         /**
          * parses text to find just the time element of an ISO date/time string i.e. +08:00
@@ -3298,36 +3298,36 @@ var Microformats; // jshint ignore:line
          * @param  {String} timeString
          * @param  {String} format
          * @return {String}
          */
         parseTimeZone: function( timeString, format ) {
             this.clearTimeZone();
             var parts = [];
 
-            if(timeString.toLowerCase() === 'z') {
+            if (timeString.toLowerCase() === 'z') {
                 this.z = true;
                 // set case for z
                 this.autoProfile.tzZulu = (timeString === 'z')? 'z' : 'Z';
-            }else{
+            } else {
 
                 // discover timezone separtor for auto profile // default is ':'
-                if(timeString.indexOf(':') === -1) {
+                if (timeString.indexOf(':') === -1) {
                     this.autoProfile.tzsep = '';
                 }
 
                 // finds timezone +HH:MM and +HHMM  ie +13:30 and +1330
                 parts = timeString.match( /([\-\+]{1})?(\d\d)?:?(\d\d)?/ );
-                if(parts[1]) {
+                if (parts[1]) {
                     this.tzPN = parts[1];
                 }
-                if(parts[2]) {
+                if (parts[2]) {
                     this.tzH = parts[2];
                 }
-                if(parts[3]) {
+                if (parts[3]) {
                     this.tzM = parts[3];
                 }
 
 
             }
             this.tzZulu = 'z';
             return this.toTimeString( format );
         },
@@ -3337,36 +3337,36 @@ var Microformats; // jshint ignore:line
          * returns ISO date/time string in W3C Note, RFC 3339, HTML5, or auto profile
          *
          * @param  {String} format
          * @return {String}
          */
         toString: function( format ) {
             var output = '';
 
-            if(format) {
+            if (format) {
                 this.format = format;
             }
             this.setFormatSep();
 
-            if(this.dY  > -1) {
+            if (this.dY  > -1) {
                 output = this.dY;
-                if(this.dM > 0 && this.dM < 13) {
+                if (this.dM > 0 && this.dM < 13) {
                     output += this.dsep + this.dM;
-                    if(this.dD > 0 && this.dD < 32) {
+                    if (this.dD > 0 && this.dD < 32) {
                         output += this.dsep + this.dD;
-                        if(this.tH > -1 && this.tH < 25) {
+                        if (this.tH > -1 && this.tH < 25) {
                             output += this.sep + this.toTimeString( format );
                         }
                     }
                 }
-                if(this.dDDD > -1) {
+                if (this.dDDD > -1) {
                     output += this.dsep + this.dDDD;
                 }
-            } else if(this.tH > -1) {
+            } else if (this.tH > -1) {
                 output += this.toTimeString( format );
             }
 
             return output;
         },
 
 
         /**
@@ -3374,60 +3374,60 @@ var Microformats; // jshint ignore:line
          * in W3C Note, RFC 3339, HTML5, or auto profile
          *
          * @param  {String} format
          * @return {String}
          */
         toTimeString: function( format ) {
             var out = '';
 
-            if(format) {
+            if (format) {
                 this.format = format;
             }
             this.setFormatSep();
 
             // time can only be created with a full date
-            if(this.tH) {
-                if(this.tH > -1 && this.tH < 25) {
+            if (this.tH) {
+                if (this.tH > -1 && this.tH < 25) {
                     out += this.tH;
-                    if(this.tM > -1 && this.tM < 61) {
+                    if (this.tM > -1 && this.tM < 61) {
                         out += this.tsep + this.tM;
-                        if(this.tS > -1 && this.tS < 61) {
+                        if (this.tS > -1 && this.tS < 61) {
                             out += this.tsep + this.tS;
-                            if(this.tD > -1) {
+                            if (this.tD > -1) {
                                 out += '.' + this.tD;
                             }
                         }
                     }
 
 
 
                     // time zone offset
-                    if(this.z) {
+                    if (this.z) {
                         out += this.tzZulu;
                     } else {
-                        if(this.tzH && this.tzH > -1 && this.tzH < 25) {
+                        if (this.tzH && this.tzH > -1 && this.tzH < 25) {
                             out += this.tzPN + this.tzH;
-                            if(this.tzM > -1 && this.tzM < 61) {
+                            if (this.tzM > -1 && this.tzM < 61) {
                                 out += this.tzsep + this.tzM;
                             }
                         }
                     }
                 }
             }
             return out;
         },
 
 
         /**
          * set the current profile to W3C Note, RFC 3339, HTML5, or auto profile
          *
          */
         setFormatSep: function() {
-            switch( this.format.toLowerCase() ) {
+            switch ( this.format.toLowerCase() ) {
                 case 'rfc3339':
                     this.sep = 'T';
                     this.dsep = '';
                     this.tsep = '';
                     this.tzsep = '';
                     this.tzZulu = 'Z';
                     break;
                 case 'w3c':
@@ -3456,46 +3456,46 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * does current data contain a full date i.e. 2015-03-23
          *
          * @return {Boolean}
          */
         hasFullDate: function() {
-            return(this.dY !== -1 && this.dM !== -1 && this.dD !== -1);
+            return (this.dY !== -1 && this.dM !== -1 && this.dD !== -1);
         },
 
 
         /**
          * does current data contain a minimum date which is just a year number i.e. 2015
          *
          * @return {Boolean}
          */
         hasDate: function() {
-            return(this.dY !== -1);
+            return (this.dY !== -1);
         },
 
 
         /**
          * does current data contain a minimum time which is just a hour number i.e. 13
          *
          * @return {Boolean}
          */
         hasTime: function() {
-            return(this.tH !== -1);
+            return (this.tH !== -1);
         },
 
         /**
          * does current data contain a minimum timezone i.e. -1 || +1 || z
          *
          * @return {Boolean}
          */
         hasTimeZone: function() {
-            return(this.tzH !== -1);
+            return (this.tzH !== -1);
         }
 
     };
 
     modules.ISODate.prototype.constructor = modules.ISODate;
 
 
     modules.dates = {
@@ -3504,29 +3504,29 @@ var Microformats; // jshint ignore:line
         /**
          * does text contain am
          *
          * @param  {String} text
          * @return {Boolean}
          */
         hasAM: function( text ) {
             text = text.toLowerCase();
-            return(text.indexOf('am') > -1 || text.indexOf('a.m.') > -1);
+            return (text.indexOf('am') > -1 || text.indexOf('a.m.') > -1);
         },
 
 
         /**
          * does text contain pm
          *
          * @param  {String} text
          * @return {Boolean}
          */
         hasPM: function( text ) {
             text = text.toLowerCase();
-            return(text.indexOf('pm') > -1 || text.indexOf('p.m.') > -1);
+            return (text.indexOf('pm') > -1 || text.indexOf('p.m.') > -1);
         },
 
 
         /**
          * remove am and pm from text and return it
          *
          * @param  {String} text
          * @return {String}
@@ -3538,54 +3538,54 @@ var Microformats; // jshint ignore:line
 
        /**
          * simple test of whether ISO date string is a duration  i.e.  PY17M or PW12
          *
          * @param  {String} text
          * @return {Boolean}
          */
         isDuration: function( text ) {
-            if(modules.utils.isString( text )) {
+            if (modules.utils.isString( text )) {
                 text = text.toLowerCase();
-                if(modules.utils.startWith(text, 'p') ) {
+                if (modules.utils.startWith(text, 'p') ) {
                     return true;
                 }
             }
             return false;
         },
 
 
        /**
          * is text a time or timezone
          * i.e. HH-MM-SS or z+-HH-MM-SS 08:43 | 15:23:00:0567 | 10:34pm | 10:34 p.m. | +01:00:00 | -02:00 | z15:00 | 0843
          *
          * @param  {String} text
          * @return {Boolean}
          */
         isTime: function( text ) {
-            if(modules.utils.isString(text)) {
+            if (modules.utils.isString(text)) {
                 text = text.toLowerCase();
                 text = modules.utils.trim( text );
                 // start with timezone char
-                if( text.match(':') && ( modules.utils.startWith(text, 'z') || modules.utils.startWith(text, '-')  || modules.utils.startWith(text, '+') )) {
+                if ( text.match(':') && ( modules.utils.startWith(text, 'z') || modules.utils.startWith(text, '-')  || modules.utils.startWith(text, '+') )) {
                     return true;
                 }
                 // has ante meridiem or post meridiem
-                if( text.match(/^[0-9]/) &&
+                if ( text.match(/^[0-9]/) &&
                     ( this.hasAM(text) || this.hasPM(text) )) {
                     return true;
                 }
                 // contains time delimiter but not datetime delimiter
-                if( text.match(':') && !text.match(/t|\s/) ) {
+                if ( text.match(':') && !text.match(/t|\s/) ) {
                     return true;
                 }
 
                 // if it's a number of 2, 4 or 6 chars
-                if(modules.utils.isNumber(text)) {
-                    if(text.length === 2 || text.length === 4 || text.length === 6) {
+                if (modules.utils.isNumber(text)) {
+                    if (text.length === 2 || text.length === 4 || text.length === 6) {
                         return true;
                     }
                 }
             }
             return false;
         },
 
 
@@ -3596,44 +3596,44 @@ var Microformats; // jshint ignore:line
          * @param  {String} text
          * @return {String}
          */
         parseAmPmTime: function( text ) {
             var out = text,
                 times = [];
 
             // if the string has a text : or am or pm
-            if(modules.utils.isString(out)) {
+            if (modules.utils.isString(out)) {
                 //text = text.toLowerCase();
                 text = text.replace(/[ ]+/g, '');
 
-                if(text.match(':') || this.hasAM(text) || this.hasPM(text)) {
-
-                    if(text.match(':')) {
+                if (text.match(':') || this.hasAM(text) || this.hasPM(text)) {
+
+                    if (text.match(':')) {
                         times = text.split(':');
                     } else {
                         // single number text i.e. 5pm
                         times[0] = text;
                         times[0] = this.removeAMPM(times[0]);
                     }
 
                     // change pm hours to 24hr number
-                    if(this.hasPM(text)) {
-                        if(times[0] < 12) {
+                    if (this.hasPM(text)) {
+                        if (times[0] < 12) {
                             times[0] = parseInt(times[0], 10) + 12;
                         }
                     }
 
                     // add leading zero's where needed
-                    if(times[0] && times[0].length === 1) {
+                    if (times[0] && times[0].length === 1) {
                         times[0] = '0' + times[0];
                     }
 
                     // rejoin text elements together
-                    if(times[0]) {
+                    if (times[0]) {
                         text = times.join(':');
                     }
                 }
             }
 
             // remove am/pm strings
             return this.removeAMPM(text);
         },
@@ -3647,24 +3647,24 @@ var Microformats; // jshint ignore:line
          * @param  {String} format ( Modules.ISODate profile format )
          * @return {Object} Modules.ISODate
          */
         dateTimeUnion: function(date, time, format) {
             var isodate = new modules.ISODate(date, format),
                 isotime = new modules.ISODate();
 
             isotime.parseTime(this.parseAmPmTime(time), format);
-            if(isodate.hasFullDate() && isotime.hasTime()) {
+            if (isodate.hasFullDate() && isotime.hasTime()) {
                 isodate.tH = isotime.tH;
                 isodate.tM = isotime.tM;
                 isodate.tS = isotime.tS;
                 isodate.tD = isotime.tD;
                 return isodate;
             }
-            if(isodate.hasFullDate()) {
+            if (isodate.hasFullDate()) {
                 return isodate;
             }
             return new modules.ISODate();
         },
 
 
        /**
          * concatenate an array of date and time text fragments to create an ISODate object
@@ -3675,46 +3675,46 @@ var Microformats; // jshint ignore:line
          * @return {Object} Modules.ISODate
          */
         concatFragments: function (arr, format) {
             var out = new modules.ISODate(),
                 i = 0,
                 value = '';
 
             // if the fragment already contains a full date just return it once
-            if(arr[0].toUpperCase().match('T')) {
+            if (arr[0].toUpperCase().match('T')) {
                 return new modules.ISODate(arr[0], format);
             }
-            for(i = 0; i < arr.length; i++) {
+            for (i = 0; i < arr.length; i++) {
                 value = arr[i];
 
                 // date pattern
-                if( value.charAt(4) === '-' && out.hasFullDate() === false ) {
+                if ( value.charAt(4) === '-' && out.hasFullDate() === false ) {
                     out.parseDate(value);
                 }
 
                 // time pattern
-                if( (value.indexOf(':') > -1 || modules.utils.isNumber( this.parseAmPmTime(value) )) && out.hasTime() === false ) {
+                if ( (value.indexOf(':') > -1 || modules.utils.isNumber( this.parseAmPmTime(value) )) && out.hasTime() === false ) {
                     // split time and timezone
                     var items = this.splitTimeAndZone(value);
                     value = items[0];
 
                     // parse any use of am/pm
                     value = this.parseAmPmTime(value);
                     out.parseTime(value);
 
                     // parse any timezone
-                    if(items.length > 1) {
+                    if (items.length > 1) {
                          out.parseTimeZone(items[1], format);
                     }
                 }
 
                 // timezone pattern
-                if(value.charAt(0) === '-' || value.charAt(0) === '+' || value.toUpperCase() === 'Z') {
-                    if( out.hasTimeZone() === false ) {
+                if (value.charAt(0) === '-' || value.charAt(0) === '+' || value.toUpperCase() === 'Z') {
+                    if ( out.hasTimeZone() === false ) {
                         out.parseTimeZone(value);
                     }
                 }
 
             }
             return out;
         },
 
@@ -3726,17 +3726,17 @@ var Microformats; // jshint ignore:line
          * @return {Array} Modules.ISODate
          */
         splitTimeAndZone: function ( text ) {
            var out = [text],
                chars = ['-','+','z','Z'],
                i = chars.length;
 
             while (i--) {
-              if(text.indexOf(chars[i]) > -1) {
+              if (text.indexOf(chars[i]) > -1) {
                   out[0] = text.slice( 0, text.indexOf(chars[i]) );
                   out.push( text.slice( text.indexOf(chars[i]) ) );
                   break;
                }
             }
            return out;
         }
 
@@ -3764,19 +3764,19 @@ var Microformats; // jshint ignore:line
          *
          * @param  {DOM Node} node
          * @param  {String} textFormat
          * @return {String}
          */
         parse: function(doc, node, textFormat) {
             var out;
             this.textFormat = (textFormat)? textFormat : this.textFormat;
-            if(this.textFormat === 'normalised') {
+            if (this.textFormat === 'normalised') {
                 out = this.walkTreeForText( node );
-                if(out !== undefined) {
+                if (out !== undefined) {
                     return this.normalise( doc, out );
                 }
                 return '';
             }
             return this.formatText( doc, modules.domUtils.textContent(node), this.textFormat );
         },
 
 
@@ -3798,22 +3798,22 @@ var Microformats; // jshint ignore:line
          * parses the text from a html string - only for whitespace or whitespacetrimmed formats
          *
          * @param  {String} text
          * @param  {String} textFormat
          * @return {String}
          */
         formatText: function( doc, text, textFormat ) {
            this.textFormat = (textFormat)? textFormat : this.textFormat;
-           if(text) {
+           if (text) {
               var out = '',
                   regex = /(<([^>]+)>)/ig;
 
               out = text.replace(regex, '');
-              if(this.textFormat === 'whitespacetrimmed') {
+              if (this.textFormat === 'whitespacetrimmed') {
                  out = modules.utils.trimWhitespace( out );
               }
 
               //return entities.decode( out, 2 );
               return modules.domUtils.decodeEntities( doc, out );
            }
            return '';
         },
@@ -3839,37 +3839,37 @@ var Microformats; // jshint ignore:line
          *
          * @param  {DOM Node} node
          * @return {String}
          */
         walkTreeForText: function( node ) {
             var out = '',
                 j = 0;
 
-            if(node.tagName && this.excludeTags.indexOf( node.tagName.toLowerCase() ) > -1) {
+            if (node.tagName && this.excludeTags.indexOf( node.tagName.toLowerCase() ) > -1) {
                 return out;
             }
 
             // if node is a text node get its text
-            if(node.nodeType && node.nodeType === 3) {
+            if (node.nodeType && node.nodeType === 3) {
                 out += modules.domUtils.getElementText( node );
             }
 
             // get the text of the child nodes
-            if(node.childNodes && node.childNodes.length > 0) {
+            if (node.childNodes && node.childNodes.length > 0) {
                 for (j = 0; j < node.childNodes.length; j++) {
                     var text = this.walkTreeForText( node.childNodes[j] );
-                    if(text !== undefined) {
+                    if (text !== undefined) {
                         out += text;
                     }
                 }
             }
 
             // if it's a block level tag add an additional space at the end
-            if(node.tagName && this.blockLevelTags.indexOf( node.tagName.toLowerCase() ) !== -1) {
+            if (node.tagName && this.blockLevelTags.indexOf( node.tagName.toLowerCase() ) !== -1) {
                 out += ' ';
             }
 
             return (out === '')? undefined : out ;
         }
 
     };
 
@@ -3886,20 +3886,20 @@ var Microformats; // jshint ignore:line
          * @param  {DOM Node} node
          * @return {String}
          */
         parse: function( node ) {
             var out = '',
                 j = 0;
 
             // we do not want the outer container
-            if(node.childNodes && node.childNodes.length > 0) {
+            if (node.childNodes && node.childNodes.length > 0) {
                 for (j = 0; j < node.childNodes.length; j++) {
                     var text = this.walkTreeForHtml( node.childNodes[j] );
-                    if(text !== undefined) {
+                    if (text !== undefined) {
                         out += text;
                     }
                 }
             }
 
             return out;
         },
 
@@ -3911,52 +3911,52 @@ var Microformats; // jshint ignore:line
          * @param  {DOM Node} node
          * @return {String}
          */
         walkTreeForHtml: function( node ) {
             var out = '',
                 j = 0;
 
             // if node is a text node get its text
-            if(node.nodeType && node.nodeType === 3) {
+            if (node.nodeType && node.nodeType === 3) {
                 out += modules.domUtils.getElementText( node );
             }
 
 
             // exclude text which has been added with include pattern  -
-            if(node.nodeType && node.nodeType === 1 && modules.domUtils.hasAttribute(node, 'data-include') === false) {
+            if (node.nodeType && node.nodeType === 1 && modules.domUtils.hasAttribute(node, 'data-include') === false) {
 
                 // begin tag
                 out += '<' + node.tagName.toLowerCase();
 
                 // add attributes
                 var attrs = modules.domUtils.getOrderedAttributes(node);
                 for (j = 0; j < attrs.length; j++) {
                     out += ' ' + attrs[j].name +  '=' + '"' + attrs[j].value + '"';
                 }
 
-                if(this.selfClosingElt.indexOf(node.tagName.toLowerCase()) === -1) {
+                if (this.selfClosingElt.indexOf(node.tagName.toLowerCase()) === -1) {
                     out += '>';
                 }
 
                 // get the text of the child nodes
-                if(node.childNodes && node.childNodes.length > 0) {
+                if (node.childNodes && node.childNodes.length > 0) {
 
                     for (j = 0; j < node.childNodes.length; j++) {
                         var text = this.walkTreeForHtml( node.childNodes[j] );
-                        if(text !== undefined) {
+                        if (text !== undefined) {
                             out += text;
                         }
                     }
                 }
 
                 // end tag
-                if(this.selfClosingElt.indexOf(node.tagName.toLowerCase()) > -1) {
+                if (this.selfClosingElt.indexOf(node.tagName.toLowerCase()) > -1) {
                     out += ' />';
-                }else{
+                } else {
                     out += '</' + node.tagName.toLowerCase() + '>';
                 }
             }
 
             return (out === '')? undefined : out;
         }
 
 
@@ -4501,27 +4501,27 @@ var Microformats; // jshint ignore:line
     External.hasMicroformats = function( node, options ) {
         var parser = new modules.Parser();
         addV1(parser, options);
         return parser.hasMicroformats( node, options );
     };
 
 
     function addV1(parser, options) {
-        if(options && options.maps) {
-            if(Array.isArray(options.maps)) {
+        if (options && options.maps) {
+            if (Array.isArray(options.maps)) {
                 parser.add(options.maps);
-            }else{
+            } else {
                 parser.add([options.maps]);
             }
         }
     }
 
 
     return External;
 
 
 }));
 try {
     // mozilla jsm support
     Components.utils.importGlobalProperties(["URL"]);
-} catch(e) {}
+} catch (e) {}
 this.EXPORTED_SYMBOLS = ['Microformats'];
--- a/toolkit/components/microformats/update/update.js
+++ b/toolkit/components/microformats/update/update.js
@@ -39,61 +39,61 @@ var repo = 'glennjones/microformat-shiv'
 		['/test/module-tests','/test/module-tests'],
 		['/test/standards-tests','/test/standards-tests'],
 		['/test/static','/test/static']
 		];
 
 
 
 getLastBuildState( repo, function( err, buildState) {
-	if(buildState) {
+	if (buildState) {
 		console.log('last build state:', buildState);
 
-		if(buildState === 'passed') {
+		if (buildState === 'passed') {
 
 			console.log('downloading git repo', repo);
 			getLastCommitDate( repo, function( err, date) {
-				if(date) {
+				if (date) {
 					console.log( 'last commit:', new Date(date).toString() );
 				}
 			});
 			updateFromRepo();
 
-		}else{
+		} else {
 			console.log('not updating because of build state is failing please contact Glenn Jones glennjones@gmail.com');
 		}
 
-	}else{
+	} else {
 		console.log('could not get build state from travis-ci:', err);
 	}
 });
 
 
 /**
  * updates from directories and files from repo
  *
  */
 function updateFromRepo() {
 	download(repo, tempDir, function(err, data) {
 
 		// the err and data from download-github-repo give false negatives
-		if( fs.existsSync( tempDir ) ) {
+		if ( fs.existsSync( tempDir ) ) {
 
 			var version = getRepoVersion();
 			removeCurrentFiles( pathList, deployDirResolved );
 			addNewFiles( pathList, deployDirResolved );
 			fs.removeSync(tempDir);
 
 			// changes files for firefox
 			replaceInFile('/test/module-tests/index.html', /..\/..\/lib\//g, '../lib/' );
 			addExportedSymbol( '/microformat-shiv.js' );
 
 			console.log('microformat-shiv is now uptodate to v' + version);
 
-		}else{
+		} else {
 			console.log('error getting repo', err);
 		}
 
 	});
 }
 
 
 /**
@@ -127,19 +127,19 @@ function addNewFiles( pathList, deployDi
 
 /**
  * gets the repo version number
  *
  * @return {String}
  */
 function getRepoVersion() {
 	var pack = fs.readFileSync(path.resolve(tempDir,'package.json'), {encoding: 'utf8'});
-	if(pack) {
+	if (pack) {
 		pack = JSON.parse(pack)
-		if(pack && pack.version) {
+		if (pack && pack.version) {
 			return pack.version;
 		}
 	}
 	return '';
 }
 
 
 /**
@@ -156,21 +156,21 @@ function getLastCommitDate( repo, callba
 	    'User-Agent': 'request'
 	  }
 	};
 
 	request(options, function (error, response, body) {
 	  if (!error && response.statusCode == 200) {
 		var date = null,
 			json = JSON.parse(body);
-			if(json && json.length && json[0].commit && json[0].commit.author ) {
+			if (json && json.length && json[0].commit && json[0].commit.author ) {
 				date = json[0].commit.author.date;
 			}
 	    callback(null, date);
-	  }else{
+	  } else {
 		  console.log(error, response, body);
 		  callback('fail to get last commit date', null);
 	  }
 	});
 }
 
 
 /**
@@ -188,70 +188,70 @@ function getLastBuildState( repo, callba
 		'Accept': 'application/vnd.travis-ci.2+json'
 	  }
 	};
 
 	request(options, function (error, response, body) {
 	  if (!error && response.statusCode == 200) {
 		var buildState = null,
 			json = JSON.parse(body);
-			if(json && json.repo &&  json.repo.last_build_state ) {
+			if (json && json.repo &&  json.repo.last_build_state ) {
 				buildState = json.repo.last_build_state;
 			}
 	    callback(null, buildState);
-	  }else{
+	  } else {
 		  console.log(error, response, body);
 		  callback('fail to get last build state', null);
 	  }
 	});
 }
 
 
 /**
  * adds exported symbol to microformat-shiv.js file
  *
  * @param  {String} path
  * @param  {String} content
  */
 function addExportedSymbol( path ) {
-	if(path === '/microformat-shiv.js') {
+	if (path === '/microformat-shiv.js') {
 		fs.appendFileSync(deployDirResolved + '/microformat-shiv.js', '\r\n' + exportedSymbol + '\r\n');
 		console.log('appended exported symbol to microformat-shiv.js');
 	}
 }
 
 
 /**
  * adds exported symbol to microformat-shiv.js file
  *
  * @param  {String} path
  * @param  {String} content
  */
 function replaceInFile( path, findStr, replaceStr ) {
 	readFile(deployDirResolved + path, function(err, fileStr) {
-		if(fileStr) {
+		if (fileStr) {
 			fileStr = fileStr.replace(findStr, replaceStr)
 			writeFile(deployDirResolved + path, fileStr);
 			console.log('replaced ' + findStr + ' with ' + replaceStr + ' in ' + path);
-		}else{
+		} else {
 			console.log('error replaced strings in ' + path);
 		}
 	})
 }
 
 
 /**
  * write a file
  *
  * @param  {String} path
  * @param  {String} content
  */
 function writeFile(path, content) {
 	fs.writeFile(path, content, 'utf8', function(err) {
-		if(err) {
+		if (err) {
 			console.log(err);
 		} else {
 			console.log('The file: ' + path + ' was saved');
 		}
 	});
 }
 
 
--- a/toolkit/components/passwordmgr/LoginHelper.jsm
+++ b/toolkit/components/passwordmgr/LoginHelper.jsm
@@ -575,17 +575,17 @@ this.LoginHelper = {
     }
     // the login is just an update for an old one or the login is older than an existing one
     let foundMatchingLogin = false;
     for (let existingLogin of existingLogins) {
       if (login.username == existingLogin.username) {
         // Bug 1187190: Password changes should be propagated depending on timestamps.
         // this an old login or a just an update, so make sure not to add it
         foundMatchingLogin = true;
-        if(login.password != existingLogin.password &
+        if (login.password != existingLogin.password &
            login.timePasswordChanged > existingLogin.timePasswordChanged) {
           // if a login with the same username and different password already exists and it's older
           // than the current one, that login needs to be updated using the current one details
 
           // the existing login password and timestamps should be updated
           let propBag = Cc["@mozilla.org/hash-property-bag;1"].
                         createInstance(Ci.nsIWritablePropertyBag);
           propBag.setProperty("password", login.password);
--- a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js
+++ b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js
@@ -896,17 +896,17 @@ LoginManagerPrompter.prototype = {
     };
 
     // The main action is the "Remember" or "Update" button.
     let mainAction = {
       label: this._getLocalizedString(initialMsgNames.buttonLabel),
       accessKey: this._getLocalizedString(initialMsgNames.buttonAccessKey),
       callback: () => {
         histogram.add(PROMPT_ADD_OR_UPDATE);
-        if(histogramName == "PWMGR_PROMPT_REMEMBER_ACTION")
+        if (histogramName == "PWMGR_PROMPT_REMEMBER_ACTION")
         {
           Services.obs.notifyObservers(null, 'LoginStats:NewSavedPassword', null);
         }
         readDataFromUI();
         persistData();
         browser.focus();
       }
     };
--- a/toolkit/components/passwordmgr/storage-mozStorage.js
+++ b/toolkit/components/passwordmgr/storage-mozStorage.js
@@ -22,17 +22,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 function Transaction(aDatabase) {
   this._db = aDatabase;
 
   this._hasTransaction = false;
   try {
     this._db.beginTransaction();
     this._hasTransaction = true;
   }
-  catch(e) { /* om nom nom exceptions */ }
+  catch (e) { /* om nom nom exceptions */ }
 }
 
 Transaction.prototype = {
   commit : function() {
     if (this._hasTransaction)
       this._db.commitTransaction();
   },
 
@@ -578,17 +578,17 @@ LoginManagerStorage_mozStorage.prototype
     let stmt = null;
     try {
       this.log("Storing " + aLogin.guid + " in deleted passwords\n");
       let query = "INSERT INTO moz_deleted_logins (guid, timeDeleted) VALUES (:guid, :timeDeleted)";
       let params = { guid: aLogin.guid,
                      timeDeleted: Date.now() };
       let stmt = this._dbCreateStatement(query, params);
       stmt.execute();
-    } catch(ex) {
+    } catch (ex) {
       throw ex;
     } finally {
       if (stmt)
         stmt.reset();
     }
   },
 
 
--- a/toolkit/components/passwordmgr/test/notification_common.js
+++ b/toolkit/components/passwordmgr/test/notification_common.js
@@ -102,10 +102,10 @@ function dumpNotifications() {
                            .QueryInterface(Ci.nsIDocShell)
                            .chromeEventHandler.ownerDocument.defaultView;
     var nb = chromeWin.getNotificationBox(window.top);
     notes = nb.allNotifications;
     ok(true, "Found " + notes.length + " notification bars.");
     for (let i = 0; i < notes.length; i++) {
         ok(true, "#" + i + ": " + notes[i].getAttribute("value"));
     }
-  } catch(e) { todo(false, "WOAH! " + e); }
+  } catch (e) { todo(false, "WOAH! " + e); }
 }
--- a/toolkit/components/passwordmgr/test/test_master_password.html
+++ b/toolkit/components/passwordmgr/test/test_master_password.html
@@ -76,17 +76,17 @@ addEventListener("message", () => {
 function handleDialog(doc, testNum) {
   ok(true, "handleDialog running for test " + testNum);
 
   var clickOK   = true;
   var doNothing = false;
   var passfield = doc.getElementById("password1Textbox");
   var dialog    = doc.getElementById("commonDialog");
 
-    switch(testNum) {
+    switch (testNum) {
       case 1:
         is(passfield.getAttribute("value"), "", "Checking empty prompt");
         passfield.setAttribute("value", masterPassword);
         is(passfield.getAttribute("value"), masterPassword, "Checking filled prompt");
         break;
 
       case 2:
         clickOK = false;
--- a/toolkit/components/passwordmgr/test/test_xhr.html
+++ b/toolkit/components/passwordmgr/test/test_xhr.html
@@ -53,17 +53,17 @@ function handleDialog(doc, testNum) {
 
   var clickOK = true;
   var userfield = doc.getElementById("loginTextbox");
   var passfield = doc.getElementById("password1Textbox");
   var username = userfield.getAttribute("value");
   var password = passfield.getAttribute("value");
   var dialog    = doc.getElementById("commonDialog");
 
-  switch(testNum) {
+  switch (testNum) {
     case 1:
         is(username, "xhruser1", "Checking provided username");
         is(password, "xhrpass1", "Checking provided password");
         break;
 
     case 2:
         is(username, "xhruser2", "Checking provided username");
         is(password, "xhrpass2", "Checking provided password");
@@ -124,17 +124,17 @@ function xhrLoad(xmlDoc) {
   ok(true, "xhrLoad running for test " + testNum);
 
   // The server echos back the user/pass it received.
   var username = xmlDoc.getElementById("user").textContent;
   var password = xmlDoc.getElementById("pass").textContent;
   var authok = xmlDoc.getElementById("ok").textContent;
 
 
-  switch(testNum) {
+  switch (testNum) {
     case 1:
         is(username, "xhruser1", "Checking provided username");
         is(password, "xhrpass1", "Checking provided password");
         break;
 
     case 2:
         is(username, "xhruser2", "Checking provided username");
         is(password, "xhrpass2", "Checking provided password");
@@ -146,17 +146,17 @@ function xhrLoad(xmlDoc) {
         ok(false, "Uhh, unhandled switch for testNum #" + testNum);
         break;
   }
 
   doTest();
 }
 
 function doTest() {
-  switch(++testNum) {
+  switch (++testNum) {
     case 1:
         startCallbackTimer();
         makeRequest("authenticate.sjs?user=xhruser1&pass=xhrpass1&realm=xhr");
         break;
 
     case 2:
         // Test correct parenting, by opening another tab in the foreground,
         // and making sure the prompt re-focuses the original tab when shown:
--- a/toolkit/components/passwordmgr/test/test_xml_load.html
+++ b/toolkit/components/passwordmgr/test/test_xml_load.html
@@ -45,17 +45,17 @@ function handleDialog(doc, testNum) {
 
   var clickOK = true;
   var userfield = doc.getElementById("loginTextbox");
   var passfield = doc.getElementById("password1Textbox");
   var username = userfield.getAttribute("value");
   var password = passfield.getAttribute("value");
   var dialog    = doc.getElementById("commonDialog");
 
-  switch(testNum) {
+  switch (testNum) {
     case 1:
         is(username, "xmluser1", "Checking provided username");
         is(password, "xmlpass1", "Checking provided password");
         break;
 
     case 2:
         is(username, "xmluser2", "Checking provided username");
         is(password, "xmlpass2", "Checking provided password");
@@ -114,17 +114,17 @@ var newWin;
 function xmlLoad(responseDoc) {
   ok(true, "xmlLoad running for test " + testNum);
 
   // The server echos back the user/pass it received.
   var username = responseDoc.getElementById("user").textContent;
   var password = responseDoc.getElementById("pass").textContent;
   var authok = responseDoc.getElementById("ok").textContent;
 
-  switch(testNum) {
+  switch (testNum) {
     case 1:
         is(username, "xmluser1", "Checking provided username");
         is(password, "xmlpass1", "Checking provided password");
         break;
 
     case 2:
         is(username, "xmluser2", "Checking provided username");
         is(password, "xmlpass2", "Checking provided password");
@@ -136,17 +136,17 @@ function xmlLoad(responseDoc) {
         ok(false, "Uhh, unhandled switch for testNum #" + testNum);
         break;
   }
 
   doTest();
 }
 
 function doTest() {
-  switch(++testNum) {
+  switch (++testNum) {
     case 1:
         startCallbackTimer();
         makeRequest("authenticate.sjs?user=xmluser1&pass=xmlpass1&realm=xml");
         break;
 
     case 2:
         // Test correct parenting, by opening another tab in the foreground,
         // and making sure the prompt re-focuses the original tab when shown:
--- a/toolkit/components/passwordmgr/test/unit/test_OSCrypto_win.js
+++ b/toolkit/components/passwordmgr/test/unit/test_OSCrypto_win.js
@@ -66,12 +66,12 @@ add_task(function test_decryptData_encry
   for (let key of keys) {
     decryptEncryptTest(key);
   }
   let url = "https://twitter.com/";
   let value = [1, 0, 0, 0, 208, 140, 157, 223, 1, 21, 209, 17, 140, 122, 0, 192, 79, 194, 151, 235, 1, 0, 0, 0, 254, 58, 230, 75, 132, 228, 181, 79, 184, 160, 37, 106, 201, 29, 42, 152, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 16, 102, 0, 0, 0, 1, 0, 0, 32, 0, 0, 0, 90, 136, 17, 124, 122, 57, 178, 24, 34, 86, 209, 198, 184, 107, 58, 58, 32, 98, 61, 239, 129, 101, 56, 239, 114, 159, 139, 165, 183, 40, 183, 85, 0, 0, 0, 0, 14, 128, 0, 0, 0, 2, 0, 0, 32, 0, 0, 0, 147, 170, 34, 21, 53, 227, 191, 6, 201, 84, 106, 31, 57, 227, 46, 127, 219, 199, 80, 142, 37, 104, 112, 223, 26, 165, 223, 55, 176, 89, 55, 37, 112, 0, 0, 0, 98, 70, 221, 109, 5, 152, 46, 11, 190, 213, 226, 58, 244, 20, 180, 217, 63, 155, 227, 132, 7, 151, 235, 6, 37, 232, 176, 182, 141, 191, 251, 50, 20, 123, 53, 11, 247, 233, 112, 121, 130, 27, 168, 68, 92, 144, 192, 7, 12, 239, 53, 217, 253, 155, 54, 109, 236, 216, 225, 245, 79, 234, 165, 225, 104, 36, 77, 13, 195, 237, 143, 165, 100, 107, 230, 70, 54, 19, 179, 35, 8, 101, 93, 202, 121, 210, 222, 28, 93, 122, 36, 84, 185, 249, 238, 3, 102, 149, 248, 94, 137, 16, 192, 22, 251, 220, 22, 223, 16, 58, 104, 187, 64, 0, 0, 0, 70, 72, 15, 119, 144, 66, 117, 203, 190, 82, 131, 46, 111, 130, 238, 191, 170, 63, 186, 117, 46, 88, 171, 3, 94, 146, 75, 86, 243, 159, 63, 195, 149, 25, 105, 141, 42, 217, 108, 18, 63, 62, 98, 182, 241, 195, 12, 216, 152, 230, 176, 253, 202, 129, 41, 185, 135, 111, 226, 92, 27, 78, 27, 198];
 
   let arr1 = crypto.arrayToString(value)
   let arr2 = crypto.stringToArray(crypto.decryptData(crypto.encryptData(arr1, url), url));
-  for(let i = 0; i < arr1.length; i++) {
+  for (let i = 0; i < arr1.length; i++) {
     do_check_eq(arr2[i], value[i]);
   }
 });
--- a/toolkit/components/places/BookmarkHTMLUtils.jsm
+++ b/toolkit/components/places/BookmarkHTMLUtils.jsm
@@ -142,17 +142,17 @@ this.BookmarkHTMLUtils = Object.freeze({
   importFromURL: function BHU_importFromURL(aSpec, aInitialImport) {
     return Task.spawn(function* () {
       notifyObservers(PlacesUtils.TOPIC_BOOKMARKS_RESTORE_BEGIN, aInitialImport);
       try {
         let importer = new BookmarkImporter(aInitialImport);
         yield importer.importFromURL(aSpec);
 
         notifyObservers(PlacesUtils.TOPIC_BOOKMARKS_RESTORE_SUCCESS, aInitialImport);
-      } catch(ex) {
+      } catch (ex) {
         Cu.reportError("Failed to import bookmarks from " + aSpec + ": " + ex);
         notifyObservers(PlacesUtils.TOPIC_BOOKMARKS_RESTORE_FAILED, aInitialImport);
         throw ex;
       }
     });
   },
 
   /**
@@ -181,17 +181,17 @@ this.BookmarkHTMLUtils = Object.freeze({
       try {
         if (!(yield OS.File.exists(aFilePath))) {
           throw new Error("Cannot import from nonexisting html file: " + aFilePath);
         }
         let importer = new BookmarkImporter(aInitialImport);
         yield importer.importFromURL(OS.Path.toFileURI(aFilePath));
 
         notifyObservers(PlacesUtils.TOPIC_BOOKMARKS_RESTORE_SUCCESS, aInitialImport);
-      } catch(ex) {
+      } catch (ex) {
         Cu.reportError("Failed to import bookmarks from " + aFilePath + ": " + ex);
         notifyObservers(PlacesUtils.TOPIC_BOOKMARKS_RESTORE_FAILED, aInitialImport);
         throw ex;
       }
     });
   },
 
   /**
@@ -366,24 +366,24 @@ BookmarkImporter.prototype = {
       default:
         // NOT REACHED
         throw new Error("Unreached");
     }
 
     if (frame.previousDateAdded > 0) {
       try {
         PlacesUtils.bookmarks.setItemDateAdded(containerId, frame.previousDateAdded);
-      } catch(e) {
+      } catch (e) {
       }
       frame.previousDateAdded = 0;
     }
     if (frame.previousLastModifiedDate > 0) {
       try {
         PlacesUtils.bookmarks.setItemLastModified(containerId, frame.previousLastModifiedDate);
-      } catch(e) {
+      } catch (e) {
       }
       // don't clear last-modified, in case there's a description
     }
 
     frame.previousId = containerId;
 
     this._frames.push(new Frame(containerId));
   },
@@ -397,17 +397,17 @@ BookmarkImporter.prototype = {
    *       pre-Places bookmarks did not support them.
    */
   _handleSeparator: function handleSeparator(aElt) {
     let frame = this._curFrame;
     try {
       frame.previousId =
         PlacesUtils.bookmarks.insertSeparator(frame.containerId,
                                               PlacesUtils.bookmarks.DEFAULT_INDEX);
-    } catch(e) {}
+    } catch (e) {}
   },
 
   /**
    * Handles <H1>. We check for the attribute PLACES_ROOT and reset the
    * container id if it's found. Otherwise, the default bookmark menu
    * root is assumed and imported things will go into the bookmarks menu.
    */
   _handleHead1Begin: function handleHead1Begin(aElt) {
@@ -526,17 +526,17 @@ BookmarkImporter.prototype = {
     }
 
     // Ignore <a> tags that have no href.
     if (href) {
       // Save the address if it's valid.  Note that we ignore errors if this is a
       // feed since href is optional for them.
       try {
         frame.previousLink = NetUtil.newURI(href);
-      } catch(e) {
+      } catch (e) {
         if (!frame.previousFeed) {
           frame.previousLink = null;
           return;
         }
       }
     } else {
       frame.previousLink = null;
       // The exception is for feeds, where the href is an optional component
@@ -560,49 +560,49 @@ BookmarkImporter.prototype = {
 
     // Create the bookmark.  The title is unknown for now, we will set it later.
     try {
       frame.previousId =
         PlacesUtils.bookmarks.insertBookmark(frame.containerId,
                                              frame.previousLink,
                                              PlacesUtils.bookmarks.DEFAULT_INDEX,
                                              "");
-    } catch(e) {
+    } catch (e) {
       return;
     }
 
     // Set the date added value, if we have it.
     if (dateAdded) {
       try {
         PlacesUtils.bookmarks.setItemDateAdded(frame.previousId,
           this._convertImportedDateToInternalDate(dateAdded));
-      } catch(e) {
+      } catch (e) {
       }
     }
 
     // Adds tags to the URI, if there are any.
     if (tags) {
       try {
         let tagsArray = tags.split(",");
         PlacesUtils.tagging.tagURI(frame.previousLink, tagsArray);
-      } catch(e) {
+      } catch (e) {
       }
     }
 
     // Save the favicon.
     if (icon || iconUri) {
       let iconUriObject;
       try {
         iconUriObject = NetUtil.newURI(iconUri);
-      } catch(e) {
+      } catch (e) {
       }
       if (icon || iconUriObject) {
         try {
           this._setFaviconForURI(frame.previousLink, iconUriObject, icon);
-        } catch(e) {
+        } catch (e) {
         }
       }
     }
 
     // Save the keyword.
     if (keyword) {
       let kwPromise = PlacesUtils.keywords.insert({ keyword,
                                                     url: frame.previousLink.spec,
@@ -613,17 +613,17 @@ BookmarkImporter.prototype = {
     // Set load-in-sidebar annotation for the bookmark.
     if (webPanel && webPanel.toLowerCase() == "true") {
       try {
         PlacesUtils.annotations.setItemAnnotation(frame.previousId,
                                                   LOAD_IN_SIDEBAR_ANNO,
                                                   1,
                                                   0,
                                                   PlacesUtils.annotations.EXPIRE_NEVER);
-      } catch(e) {
+      } catch (e) {
       }
     }
 
     // Import last charset.
     if (lastCharset) {
       let chPromise = PlacesUtils.setCharsetForURI(frame.previousLink, lastCharset);
       this._importPromises.push(chPromise);
     }
@@ -682,40 +682,40 @@ BookmarkImporter.prototype = {
           "siteURI": frame.previousLink,
         });
         this._importPromises.push(lmPromise);
       } else if (frame.previousLink) {
         // This is a common bookmark.
         PlacesUtils.bookmarks.setItemTitle(frame.previousId,
                                            frame.previousText);
       }
-    } catch(e) {
+    } catch (e) {
     }
 
 
     // Set last modified date as the last change.
     if (frame.previousId > 0 && frame.previousLastModifiedDate > 0) {
       try {
         PlacesUtils.bookmarks.setItemLastModified(frame.previousId,
                                                   frame.previousLastModifiedDate);
-      } catch(e) {
+      } catch (e) {
       }
       // Note: don't clear previousLastModifiedDate, because if this item has a
       // description, we'll need to set it again.
     }
 
     frame.previousText = "";
 
   },
 
   _openContainer: function openContainer(aElt) {
     if (aElt.namespaceURI != "http://www.w3.org/1999/xhtml") {
       return;
     }
-    switch(aElt.localName) {
+    switch (aElt.localName) {
       case "h1":
         this._handleHead1Begin(aElt);
         break;
       case "h2":
       case "h3":
       case "h4":
       case "h5":
       case "h6":
@@ -755,17 +755,17 @@ BookmarkImporter.prototype = {
         try {
           if (!PlacesUtils.annotations.itemHasAnnotation(itemId, DESCRIPTION_ANNO)) {
             PlacesUtils.annotations.setItemAnnotation(itemId,
                                                       DESCRIPTION_ANNO,
                                                       frame.previousText,
                                                       0,
                                                       PlacesUtils.annotations.EXPIRE_NEVER);
           }
-        } catch(e) {
+        } catch (e) {
         }
         frame.previousText = "";
 
         // Set last-modified a 2nd time for all items with descriptions
         // we need to set last-modified as the *last* step in processing
         // any item type in the bookmarks.html file, so that we do
         // not overwrite the imported value. for items without descriptions,
         // setting this value after setting the item title is that
@@ -787,17 +787,17 @@ BookmarkImporter.prototype = {
         }
       }
       frame.inDescription = false;
     }
 
     if (aElt.namespaceURI != "http://www.w3.org/1999/xhtml") {
       return;
     }
-    switch(aElt.localName) {
+    switch (aElt.localName) {
       case "dl":
       case "ul":
       case "menu":
         this._handleContainerEnd();
         break;
       case "dt":
         break;
       case "h1":
@@ -938,17 +938,17 @@ BookmarkImporter.prototype = {
     this._importPromises = [];
     yield new Promise((resolve, reject) => {
       let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
                   .createInstance(Ci.nsIXMLHttpRequest);
       xhr.onload = () => {
         try {
           this._walkTreeForImport(xhr.responseXML);
           resolve();
-        } catch(e) {
+        } catch (e) {
           reject(e);
         }
       };
       xhr.onabort = xhr.onerror = xhr.ontimeout = () => {
         reject(new Error("xmlhttprequest failed"));
       };
       xhr.open("GET", href);
       xhr.responseType = "document";
--- a/toolkit/components/places/BookmarkJSONUtils.jsm
+++ b/toolkit/components/places/BookmarkJSONUtils.jsm
@@ -59,17 +59,17 @@ this.BookmarkJSONUtils = Object.freeze({
   importFromURL: function BJU_importFromURL(aSpec, aReplace) {
     return Task.spawn(function* () {
       notifyObservers(PlacesUtils.TOPIC_BOOKMARKS_RESTORE_BEGIN);
       try {
         let importer = new BookmarkImporter(aReplace);
         yield importer.importFromURL(aSpec);
 
         notifyObservers(PlacesUtils.TOPIC_BOOKMARKS_RESTORE_SUCCESS);
-      } catch(ex) {
+      } catch (ex) {
         Cu.reportError("Failed to restore bookmarks from " + aSpec + ": " + ex);
         notifyObservers(PlacesUtils.TOPIC_BOOKMARKS_RESTORE_FAILED);
       }
     });
   },
 
   /**
    * Restores bookmarks and tags from a JSON file.
@@ -102,17 +102,17 @@ this.BookmarkJSONUtils = Object.freeze({
 
         let importer = new BookmarkImporter(aReplace);
         if (aFilePath.endsWith("jsonlz4")) {
           yield importer.importFromCompressedFile(aFilePath);
         } else {
           yield importer.importFromURL(OS.Path.toFileURI(aFilePath));
         }
         notifyObservers(PlacesUtils.TOPIC_BOOKMARKS_RESTORE_SUCCESS);
-      } catch(ex) {
+      } catch (ex) {
         Cu.reportError("Failed to restore bookmarks from " + aFilePath + ": " + ex);
         notifyObservers(PlacesUtils.TOPIC_BOOKMARKS_RESTORE_FAILED);
         throw ex;
       }
     });
   },
 
   /**
--- a/toolkit/components/places/Bookmarks.jsm
+++ b/toolkit/components/places/Bookmarks.jsm
@@ -1373,17 +1373,17 @@ function validateBookmarkObject(input, b
       required.delete(prop);
     } else if (input[prop] === undefined) {
       // Skip undefined properties that are not required.
       continue;
     }
     if (VALIDATORS.hasOwnProperty(prop)) {
       try {
         normalizedInput[prop] = VALIDATORS[prop](input[prop], input);
-      } catch(ex) {
+      } catch (ex) {
         throw new Error(`Invalid value for property '${prop}': ${input[prop]}`);
       }
     }
   }
   if (required.size > 0)
     throw new Error(`The following properties were expected: ${[...required].join(", ")}`);
   return normalizedInput;
 }
--- a/toolkit/components/places/PlacesBackups.jsm
+++ b/toolkit/components/places/PlacesBackups.jsm
@@ -107,17 +107,17 @@ this.PlacesBackups = {
    * needed to support deprecated methods themselves.
    */
   get _folder() {
     let bookmarksBackupDir = Services.dirsvc.get("ProfD", Ci.nsILocalFile);
     bookmarksBackupDir.append(this.profileRelativeFolderPath);
     if (!bookmarksBackupDir.exists()) {
       bookmarksBackupDir.create(Ci.nsIFile.DIRECTORY_TYPE, parseInt("0700", 8));
       if (!bookmarksBackupDir.exists())
-        throw("Unable to create bookmarks backup folder");
+        throw ("Unable to create bookmarks backup folder");
     }
     delete this._folder;
     return this._folder = bookmarksBackupDir;
   },
 
   /**
    * Gets backup folder asynchronously.
    * @return {Promise}
@@ -268,17 +268,17 @@ this.PlacesBackups = {
    *        nsIFile or string path of the backup.
    * @return A Date object for the backup's creation time.
    */
   getDateForFile: function PB_getDateForFile(aBackupFile) {
     let filename = (aBackupFile instanceof Ci.nsIFile) ? aBackupFile.leafName
                                                        : OS.Path.basename(aBackupFile);
     let matches = filename.match(filenamesRegex);
     if (!matches)
-      throw("Invalid backup file name: " + filename);
+      throw ("Invalid backup file name: " + filename);
     return new Date(matches[1].replace(/-/g, "/"));
   },
 
   /**
    * Get the most recent backup file.
    *
    * @returns nsIFile backup file
    */
--- a/toolkit/components/places/PlacesDBUtils.jsm
+++ b/toolkit/components/places/PlacesDBUtils.jsm
@@ -824,17 +824,17 @@ this.PlacesDBUtils = {
       stmt.finalize();
     });
 
     // Get maximum number of unique URIs.
     try {
       let limitURIs = Services.prefs.getIntPref(
         "places.history.expiration.transient_current_max_pages");
       tasks.log("History can store a maximum of " + limitURIs + " unique pages");
-    } catch(ex) {}
+    } catch (ex) {}
 
     let stmt = DBConn.createStatement(
       "SELECT name FROM sqlite_master WHERE type = :type");
     stmt.params.type = "table";
     while (stmt.executeStep()) {
       let tableName = stmt.getString(0);
       let countStmt = DBConn.createStatement(
         `SELECT count(*) FROM ${tableName}`);
@@ -999,17 +999,17 @@ this.PlacesDBUtils = {
           stmt.executeAsync({
             handleError: reject,
             handleResult: function (aResultSet) {
               let row = aResultSet.getNextRow();
               resolve([probe, row.getResultByIndex(0)]);
             },
             handleCompletion: function () {}
           });
-        } finally{
+        } finally {
           stmt.finalize();
         }
       });
 
       // Report the result of the probe through Telemetry.
       // The resulting promise cannot reject.
       promiseDone.then(
         // On success
--- a/toolkit/components/places/PlacesRemoteTabsAutocompleteProvider.jsm
+++ b/toolkit/components/places/PlacesRemoteTabsAutocompleteProvider.jsm
@@ -92,17 +92,17 @@ function observe(subject, topic, data) {
       // the cache so we don't supply tabs from a different user.
       _items = null;
       break;
 
     case "nsPref:changed":
       if (data == PREF_SHOW_REMOTE_ICONS) {
         try {
           showRemoteIcons = Services.prefs.getBoolPref(PREF_SHOW_REMOTE_ICONS);
-        } catch(_) {
+        } catch (_) {
           showRemoteIcons = true; // no such pref - default is to show the icons.
         }
       }
       break;
 
     default:
       break;
   }
--- a/toolkit/components/places/PlacesTransactions.jsm
+++ b/toolkit/components/places/PlacesTransactions.jsm
@@ -322,17 +322,17 @@ var PlacesTransactions = {
            o => !TransactionsHistory.isProxifiedTransactionObject(o))) {
         throw new Error("aToBatch contains non-transaction element");
       }
       return TransactionsManager.batch(function* () {
         for (let txn of aToBatch) {
           try {
             yield txn.transact();
           }
-          catch(ex) {
+          catch (ex) {
             console.error(ex);
           }
         }
       });
     }
     if (typeof(aToBatch) == "function") {
       return TransactionsManager.batch(aToBatch);
     }
@@ -562,17 +562,17 @@ var TransactionsManager = {
       let entry = TransactionsHistory.topUndoEntry;
       if (!entry)
         return;
 
       for (let txnProxy of entry) {
         try {
           yield TransactionsHistory.getRawTransaction(txnProxy).undo();
         }
-        catch(ex) {
+        catch (ex) {
           // If one transaction is broken, it's not safe to work with any other
           // undo entry.  Report the error and clear the undo history.
           console.error(ex,
                         "Couldn't undo a transaction, clearing all undo entries.");
           TransactionsHistory.clearUndoEntries();
           return;
         }
       }
@@ -595,17 +595,17 @@ var TransactionsManager = {
       for (let i = entry.length - 1; i >= 0; i--) {
         let transaction = TransactionsHistory.getRawTransaction(entry[i]);
         try {
           if (transaction.redo)
             yield transaction.redo();
           else
             yield transaction.execute();
         }
-        catch(ex) {
+        catch (ex) {
           // If one transaction is broken, it's not safe to work with any other
           // redo entry. Report the error and clear the undo history.
           console.error(ex,
                         "Couldn't redo a transaction, clearing all redo entries.");
           TransactionsHistory.clearRedoEntries();
           return;
         }
       }
@@ -637,17 +637,17 @@ var TransactionsManager = {
   // Inactive windows commands will be updated on focus.
   _updateCommandsOnActiveWindow() {
     // Updating "undo" will cause a group update including "redo".
     try {
       let win = Services.focus.activeWindow;
       if (win)
         win.updateCommands("undo");
     }
-    catch(ex) { console.error(ex, "Couldn't update undo commands"); }
+    catch (ex) { console.error(ex, "Couldn't update undo commands"); }
   }
 };
 
 /**
  * Internal helper for defining the standard transactions and their input.
  * It takes the required and optional properties, and generates the public
  * constructor (which takes the input in the form of a plain object) which,
  * when called, creates the argument-less "public" |execute| method by binding
@@ -748,17 +748,17 @@ function (aNames, aValidationFunction, a
     let propName = name;
     this.inputProps.set(propName, {
       validateValue: function (aValue) {
         if (aValue === undefined)
           return aDefaultValue;
         try {
           return aValidationFunction(aValue);
         }
-        catch(ex) {
+        catch (ex) {
           throw new Error(`Invalid value for input property ${propName}`);
         }
       },
 
       validateInput: function (aInput, aRequired) {
         if (aRequired && !(propName in aInput))
           throw new Error(`Required input property is missing: ${propName}`);
         return this.validateValue(aInput[propName]);
@@ -1423,17 +1423,17 @@ PT.SortByName.prototype = {
  */
 PT.Remove = DefineTransaction(["guids"]);
 PT.Remove.prototype = {
   *execute(aGuids) {
     function promiseBookmarksTree(guid) {
       try {
         return PlacesUtils.promiseBookmarksTree(guid);
       }
-      catch(ex) {
+      catch (ex) {
         throw new Error("Failed to get info for the specified item (guid: " +
                         guid + "). Ex: " + ex);
       }
     }
 
     let toRestore = [];
     for (let guid of aGuids) {
       toRestore.push(yield promiseBookmarksTree(guid));
@@ -1582,17 +1582,17 @@ PT.Untag.prototype = {
 PT.Copy = DefineTransaction(["guid", "newParentGuid"],
                             ["newIndex", "excludingAnnotations"]);
 PT.Copy.prototype = {
   execute: function* (aGuid, aNewParentGuid, aNewIndex, aExcludingAnnotations) {
     let creationInfo = null;
     try {
       creationInfo = yield PlacesUtils.promiseBookmarksTree(aGuid);
     }
-    catch(ex) {
+    catch (ex) {
       throw new Error("Failed to get info for the specified item (guid: " +
                       aGuid + "). Ex: " + ex);
     }
     creationInfo.parentGuid = aNewParentGuid;
     creationInfo.index = aNewIndex;
 
     let newItemId =
       yield createItemsFromBookmarksTree(creationInfo, false,
--- a/toolkit/components/places/PlacesUtils.jsm
+++ b/toolkit/components/places/PlacesUtils.jsm
@@ -749,17 +749,17 @@ this.PlacesUtils = {
    *          to parse.
    * @param   type
    *          The content type of the blob.
    * @returns An array of objects representing each item contained by the source.
    */
   unwrapNodes: function PU_unwrapNodes(blob, type) {
     // We split on "\n"  because the transferable system converts "\r\n" to "\n"
     var nodes = [];
-    switch(type) {
+    switch (type) {
       case this.TYPE_X_MOZ_PLACE:
       case this.TYPE_X_MOZ_PLACE_SEPARATOR:
       case this.TYPE_X_MOZ_PLACE_CONTAINER:
         nodes = JSON.parse("[" + blob + "]");
         break;
       case this.TYPE_X_MOZ_URL: {
         let parts = blob.split("\n");
         // data in this type has 2 parts per entry, so if there are fewer
@@ -1745,17 +1745,17 @@ this.PlacesUtils = {
       if (!rootItem) {
         try {
           // This is the first row.
           rootItem = item = yield createItemInfoObject(row, true);
           Object.defineProperty(rootItem, "itemsCount", { value: 1
                                                         , writable: true
                                                         , enumerable: false
                                                         , configurable: false });
-        } catch(ex) {
+        } catch (ex) {
           throw new Error("Failed to fetch the data for the root item " + ex);
         }
       } else {
         try {
           // Our query guarantees that we always visit parents ahead of their
           // children.
           item = yield createItemInfoObject(row, false);
           let parentGuid = row.getResultByName("parentGuid");
@@ -1764,17 +1764,17 @@ this.PlacesUtils = {
 
           let parentItem = parentsMap.get(parentGuid);
           if ("children" in parentItem)
             parentItem.children.push(item);
           else
             parentItem.children = [item];
 
           rootItem.itemsCount++;
-        } catch(ex) {
+        } catch (ex) {
           // This is a bogus child, report and skip it.
           Cu.reportError("Failed to fetch the data for an item " + ex);
           continue;
         }
       }
 
       if (item.type == this.TYPE_X_MOZ_PLACE_CONTAINER)
         parentsMap.set(item.guid, item);
@@ -1928,17 +1928,17 @@ function setupDbForShutdown(conn, name) 
     });
 
     // Make sure that Sqlite.jsm doesn't close until we are done
     // with the high-level connection.
     Sqlite.shutdown.addBlocker(`${name} must be closed before Sqlite.jsm`,
       () => promiseClosed.catch(Cu.reportError),
       () => state
     );
-  } catch(ex) {
+  } catch (ex) {
     // It's too late to block shutdown, just close the connection.
     conn.close();
     throw ex;
   }
 }
 
 XPCOMUtils.defineLazyGetter(this, "gAsyncDBConnPromised",
   () => Sqlite.cloneStorageConnection({
--- a/toolkit/components/places/nsLivemarkService.js
+++ b/toolkit/components/places/nsLivemarkService.js
@@ -782,17 +782,17 @@ LivemarkLoadListener.prototype = {
           continue;
         }
 
         try {
           Services.scriptSecurityManager
                   .checkLoadURIWithPrincipal(feedPrincipal, uri,
                                              Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL);
         }
-        catch(ex) {
+        catch (ex) {
           continue;
         }
 
         let title = entry.title ? entry.title.plainText() : "";
         livemarkChildren.push({ uri: uri, title: title, visited: false });
       }
 
       this._livemark.children = livemarkChildren;
--- a/toolkit/components/places/nsPlacesExpiration.js
+++ b/toolkit/components/places/nsPlacesExpiration.js
@@ -819,17 +819,17 @@ nsPlacesExpiration.prototype = {
   },
 
   _loadPrefs: Task.async(function* () {
     // Get the user's limit, if it was set.
     try {
       // We want to silently fail since getIntPref throws if it does not exist,
       // and use a default to fallback to.
       this._urisLimit = this._prefBranch.getIntPref(PREF_MAX_URIS);
-    } catch(ex) { /* User limit not set */ }
+    } catch (ex) { /* User limit not set */ }
 
     if (this._urisLimit < 0) {
       // Some testing code expects a pref change to be synchronous, so
       // temporarily set this to a large value, while we asynchronously update
       // to the correct value.
       this._urisLimit = 300000;
 
       // The user didn't specify a custom limit, so we calculate the number of
--- a/toolkit/components/places/tests/bookmarks/test_388695.js
+++ b/toolkit/components/places/tests/bookmarks/test_388695.js
@@ -3,17 +3,17 @@
 /* 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/. */
 
 // Get bookmark service
 try {
   var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
               getService(Ci.nsINavBookmarksService);
-} catch(ex) {
+} catch (ex) {
   do_throw("Could not get nav-bookmarks-service\n");
 }
 
 var gTestRoot;
 var gURI;
 var gItemId1;
 var gItemId2;
 
--- a/toolkit/components/places/tests/bookmarks/test_395101.js
+++ b/toolkit/components/places/tests/bookmarks/test_395101.js
@@ -2,32 +2,32 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* 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/. */
 
 // Get bookmark service
 try {
   var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Ci.nsINavBookmarksService);
-} catch(ex) {
+} catch (ex) {
   do_throw("Could not get nav-bookmarks-service\n");
 }
 
 // Get history service
 try {
   var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].getService(Ci.nsINavHistoryService);
-} catch(ex) {
+} catch (ex) {
   do_throw("Could not get history service\n");
 }
 
 // Get tagging service
 try {
   var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
                 getService(Ci.nsITaggingService);
-} catch(ex) {
+} catch (ex) {
   do_throw("Could not get tagging service\n");
 }
 
 // get bookmarks root id
 var root = bmsvc.bookmarksMenuFolder;
 
 // main
 function run_test() {
--- a/toolkit/components/places/tests/bookmarks/test_448584.js
+++ b/toolkit/components/places/tests/bookmarks/test_448584.js
@@ -6,17 +6,17 @@
 
 var tests = [];
 
 // Get database connection
 try {
   var mDBConn = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                                    .DBConnection;
 }
-catch(ex) {
+catch (ex) {
   do_throw("Could not get database connection\n");
 }
 
 /*
   This test is:
     - don't try to add invalid uri nodes to a JSON backup
 */
 
@@ -96,17 +96,17 @@ add_task(function*() {
   // clean
   tests.forEach(function(aTest) {
     aTest.clean();
   });
 
   // restore json file
   try {
     yield BookmarkJSONUtils.importFromFile(jsonFile, true);
-  } catch(ex) { do_throw("couldn't import the exported file: " + ex); }
+  } catch (ex) { do_throw("couldn't import the exported file: " + ex); }
 
   // validate
   tests.forEach(function(aTest) {
     aTest.validate(1);
   });
 
   // clean up
   yield OS.File.remove(jsonFile);
--- a/toolkit/components/places/tests/bookmarks/test_458683.js
+++ b/toolkit/components/places/tests/bookmarks/test_458683.js
@@ -6,17 +6,17 @@
 
 var tests = [];
 
 // Get database connection
 try {
   var mDBConn = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                                    .DBConnection;
 }
-catch(ex) {
+catch (ex) {
   do_throw("Could not get database connection\n");
 }
 
 /*
   This test is:
     - don't block while doing backup and restore if tag containers contain
       bogus items (separators, folders)
 */
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks.js
+++ b/toolkit/components/places/tests/bookmarks/test_bookmarks.js
@@ -89,23 +89,23 @@ add_task(function* test_bookmarks() {
   do_check_true(bs.tagsFolder > 0);
   do_check_true(bs.toolbarFolder > 0);
   do_check_true(bs.unfiledBookmarksFolder > 0);
 
   // test getFolderIdForItem() with bogus item id will throw
   try {
     let id = bs.getFolderIdForItem(0);
     do_throw("getFolderIdForItem accepted bad input");
-  } catch(ex) {}
+  } catch (ex) {}
 
   // test getFolderIdForItem() with bogus item id will throw
   try {
     let id = bs.getFolderIdForItem(-1);
     do_throw("getFolderIdForItem accepted bad input");
-  } catch(ex) {}
+  } catch (ex) {}
 
   // test root parentage
   do_check_eq(bs.getFolderIdForItem(bs.bookmarksMenuFolder), bs.placesRoot);
   do_check_eq(bs.getFolderIdForItem(bs.tagsFolder), bs.placesRoot);
   do_check_eq(bs.getFolderIdForItem(bs.toolbarFolder), bs.placesRoot);
   do_check_eq(bs.getFolderIdForItem(bs.unfiledBookmarksFolder), bs.placesRoot);
 
   // create a folder to hold all the tests
@@ -182,17 +182,17 @@ add_task(function* test_bookmarks() {
 
   // test getItemType for bookmarks
   do_check_eq(bs.getItemType(newId), bs.TYPE_BOOKMARK);
 
   // get item title bad input
   try {
     let title = bs.getItemTitle(-3);
     do_throw("getItemTitle accepted bad input");
-  } catch(ex) {}
+  } catch (ex) {}
 
   // get the folder that the bookmark is in
   let folderId = bs.getFolderIdForItem(newId);
   do_check_eq(folderId, testRoot);
 
   // test getItemIndex for bookmarks
   do_check_eq(bs.getItemIndex(newId), testStartIndex);
 
@@ -345,29 +345,29 @@ add_task(function* test_bookmarks() {
   let query = hs.getNewQuery();
   query.setFolders([tmpFolder], 1);
   try {
     let result = hs.executeQuery(query, options);
     let rootNode = result.root;
     rootNode.containerOpen = true;
     do_check_eq(rootNode.childCount, 3);
     rootNode.containerOpen = false;
-  } catch(ex) {
+  } catch (ex) {
     do_throw("test removeFolderChildren() - querying for children failed: " + ex);
   }
   // 3) remove all children
   bs.removeFolderChildren(tmpFolder);
   // 4) confirm that folder has 0 children
   try {
     result = hs.executeQuery(query, options);
     let rootNode = result.root;
     rootNode.containerOpen = true;
     do_check_eq(rootNode.childCount, 0);
     rootNode.containerOpen = false;
-  } catch(ex) {
+  } catch (ex) {
     do_throw("removeFolderChildren(): " + ex);
   }
 
   // XXX - test folderReadOnly
 
   // test bookmark id in query output
   try {
     let options = hs.getNewQueryOptions();
@@ -388,17 +388,17 @@ add_task(function* test_bookmarks() {
         do_check_true(node.itemId > 0);
       }
       else {
         do_check_eq(node.itemId, -1);
       }
     }
     rootNode.containerOpen = false;
   }
-  catch(ex) {
+  catch (ex) {
     do_throw("bookmarks query: " + ex);
   }
 
   // test that multiple bookmarks with same URI show up right in bookmark
   // folder queries, todo: also to do for complex folder queries
   try {
     // test uri
     let mURI = uri("http://multiple.uris.in.query");
@@ -416,17 +416,17 @@ add_task(function* test_bookmarks() {
     let rootNode = result.root;
     rootNode.containerOpen = true;
     let cc = rootNode.childCount;
     do_check_eq(cc, 2);
     do_check_eq(rootNode.getChild(0).title, "title 1");
     do_check_eq(rootNode.getChild(1).title, "title 2");
     rootNode.containerOpen = false;
   }
-  catch(ex) {
+  catch (ex) {
     do_throw("bookmarks query: " + ex);
   }
 
   // test change bookmark uri
   let newId10 = bs.insertBookmark(testRoot, uri("http://foo10.com/"),
                                   bs.DEFAULT_INDEX, "");
   dateAdded = bs.getItemDateAdded(newId10);
   // after just inserting, modified should not be set
@@ -461,17 +461,17 @@ add_task(function* test_bookmarks() {
                                   bs.DEFAULT_INDEX, "");
   let bmURI = bs.getBookmarkURI(newId11);
   do_check_eq("http://foo11.com/", bmURI.spec);
 
   // test getBookmarkURI with non-bookmark items
   try {
     bs.getBookmarkURI(testRoot);
     do_throw("getBookmarkURI() should throw for non-bookmark items!");
-  } catch(ex) {}
+  } catch (ex) {}
 
   // test getItemIndex
   let newId12 = bs.insertBookmark(testRoot, uri("http://foo11.com/"), 1, "");
   let bmIndex = bs.getItemIndex(newId12);
   do_check_eq(1, bmIndex);
 
   // insert a bookmark with title ZZZXXXYYY and then search for it.
   // this test confirms that we can find bookmarks that we haven't visited
@@ -509,17 +509,17 @@ add_task(function* test_bookmarks() {
     rootNode.containerOpen = true;
     let cc = rootNode.childCount;
     do_check_eq(cc, 1);
     let node = rootNode.getChild(0);
     do_check_eq(node.title, "ZZZXXXYYY");
     do_check_true(node.itemId > 0);
     rootNode.containerOpen = false;
   }
-  catch(ex) {
+  catch (ex) {
     do_throw("bookmarks query: " + ex);
   }
 
   // test dateAdded and lastModified properties
   // for a search query
   try {
     let options = hs.getNewQueryOptions();
     options.excludeQueries = 1;
@@ -536,17 +536,17 @@ add_task(function* test_bookmarks() {
     do_check_eq(typeof node.dateAdded, "number");
     do_check_true(node.dateAdded > 0);
 
     do_check_eq(typeof node.lastModified, "number");
     do_check_true(node.lastModified > 0);
 
     rootNode.containerOpen = false;
   }
-  catch(ex) {
+  catch (ex) {
     do_throw("bookmarks query: " + ex);
   }
 
   // test dateAdded and lastModified properties
   // for a folder query
   try {
     let options = hs.getNewQueryOptions();
     let query = hs.getNewQuery();
@@ -565,17 +565,17 @@ add_task(function* test_bookmarks() {
 
         do_check_eq(typeof node.lastModified, "number");
         do_check_true(node.lastModified > 0);
         break;
       }
     }
     rootNode.containerOpen = false;
   }
-  catch(ex) {
+  catch (ex) {
     do_throw("bookmarks query: " + ex);
   }
 
   // check setItemLastModified() and setItemDateAdded()
   let newId14 = bs.insertBookmark(testRoot, uri("http://bar.tld/"),
                                   bs.DEFAULT_INDEX, "");
   dateAdded = bs.getItemDateAdded(newId14);
   lastModified = bs.getItemLastModified(newId14);
@@ -706,13 +706,13 @@ function getChildCount(aFolderId) {
     let options = hs.getNewQueryOptions();
     let query = hs.getNewQuery();
     query.setFolders([aFolderId], 1);
     let result = hs.executeQuery(query, options);
     let rootNode = result.root;
     rootNode.containerOpen = true;
     cc = rootNode.childCount;
     rootNode.containerOpen = false;
-  } catch(ex) {
+  } catch (ex) {
     do_throw("getChildCount failed: " + ex);
   }
   return cc;
 }
--- a/toolkit/components/places/tests/bookmarks/test_keywords.js
+++ b/toolkit/components/places/tests/bookmarks/test_keywords.js
@@ -4,17 +4,17 @@ const URI3 = NetUtil.newURI("http://test
 
 function check_keyword(aURI, aKeyword) {
   if (aKeyword)
     aKeyword = aKeyword.toLowerCase();
 
   for (let bm of PlacesUtils.getBookmarksForURI(aURI)) {
     let keyword = PlacesUtils.bookmarks.getKeywordForBookmark(bm);
     if (keyword && !aKeyword) {
-      throw(`${aURI.spec} should not have a keyword`);
+      throw (`${aURI.spec} should not have a keyword`);
     } else if (aKeyword && keyword == aKeyword) {
       Assert.equal(keyword, aKeyword);
     }
   }
 
   if (aKeyword) {
     let uri = PlacesUtils.bookmarks.getURIForKeyword(aKeyword);
     Assert.equal(uri.spec, aURI.spec);
--- a/toolkit/components/places/tests/bookmarks/test_savedsearches.js
+++ b/toolkit/components/places/tests/bookmarks/test_savedsearches.js
@@ -51,17 +51,17 @@ add_test(function test_savedsearches_boo
       // test that queries have valid itemId
       do_check_true(node.itemId > 0);
       // test that the container is closed
       node.QueryInterface(Ci.nsINavHistoryContainerResultNode);
       do_check_eq(node.containerOpen, false);
     }
     rootNode.containerOpen = false;
   }
-  catch(ex) {
+  catch (ex) {
     do_throw("expandQueries=0 query error: " + ex);
   }
 
   // bookmark saved search
   // query for the test root, expandQueries=1
   // the query should show up as a query container, with 1 child
   try {
     let options = PlacesUtils.history.getNewQueryOptions();
@@ -108,17 +108,17 @@ add_test(function test_savedsearches_boo
       // test live-update of query results - add a query that matches the query
       PlacesUtils.bookmarks.insertBookmark(
         root, uri("place:terms=foo&excludeQueries=1&expandQueries=1&queryType=1"),
         PlacesUtils.bookmarks.DEFAULT_INDEX, searchTerm + "blah");
       do_check_eq(node.childCount, 1);
     }
     rootNode.containerOpen = false;
   }
-  catch(ex) {
+  catch (ex) {
     do_throw("expandQueries=1 bookmarks query: " + ex);
   }
 
   // delete the bookmark search
   PlacesUtils.bookmarks.removeItem(searchId);
 
   run_next_test();
 });
@@ -193,17 +193,17 @@ add_task(function* test_savedsearches_hi
     PlacesUtils.bookmarks.setItemTitle(searchId, "foo");
     do_check_eq(tmpFolderNode.title, "foo");
 
     // test live-update of deleted queries
     PlacesUtils.bookmarks.removeItem(searchId);
     try {
       tmpFolderNode = root.getChild(1);
       do_throw("query was not removed");
-    } catch(ex) {}
+    } catch (ex) {}
 
     tmpFolderNode.containerOpen = false;
     rootNode.containerOpen = false;
   }
-  catch(ex) {
+  catch (ex) {
     do_throw("expandQueries=1 bookmarks query: " + ex);
   }
 });
--- a/toolkit/components/places/tests/browser/browser_favicon_setAndFetchFaviconForPage_failures.js
+++ b/toolkit/components/places/tests/browser/browser_favicon_setAndFetchFaviconForPage_failures.js
@@ -42,17 +42,17 @@ function test() {
     let stmt = DBConn().createAsyncStatement("SELECT url FROM moz_favicons");
     stmt.executeAsync({
       handleResult: function final_handleResult(aResultSet) {
         for (let row; (row = aResultSet.getNextRow()); ) {
           favIconsResultCount++;
         }
       },
       handleError: function final_handleError(aError) {
-        throw("Unexpected error (" + aError.result + "): " + aError.message);
+        throw ("Unexpected error (" + aError.result + "): " + aError.message);
       },
       handleCompletion: function final_handleCompletion(aReason) {
         //begin testing
         info("Previous records in moz_favicons: " + favIconsResultCount);
         if (aCallback) {
           aCallback();
         }
       }
@@ -60,34 +60,34 @@ function test() {
     stmt.finalize();
   }
 
   function testNullPageURI(aWindow, aCallback) {
     try {
       aWindow.PlacesUtils.favicons.setAndFetchFaviconForPage(null, favIcon16URI,
         true, aWindow.PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE, null,
         Services.scriptSecurityManager.getSystemPrincipal());
-      throw("Exception expected because aPageURI is null.");
+      throw ("Exception expected because aPageURI is null.");
     } catch (ex) {
       // We expected an exception.
       ok(true, "Exception expected because aPageURI is null");