Bug 1326511 - Enable brace-style and no-multi-spaces eslint rules for toolkit. r?mattn draft
authorJared Wein <jwein@mozilla.com>
Fri, 30 Dec 2016 21:47:25 -0500
changeset 455355 a70b0afb3beee527b771bdb10d7c49cc18f852bb
parent 455348 89715464e98833dc3a9026eaa70eacf6a73a899c
child 455528 642233413f4656683799e31398c9dd88dc2896d9
push id40208
push userbmo:jaws@mozilla.com
push dateTue, 03 Jan 2017 16:44:57 +0000
reviewersmattn
bugs1326511
milestone53.0a1
Bug 1326511 - Enable brace-style and no-multi-spaces eslint rules for toolkit. r?mattn MozReview-Commit-ID: FuVu8skcqOe
browser/base/content/aboutDialog-appUpdater.js
browser/base/content/aboutDialog.js
browser/base/content/aboutNetError.xhtml
browser/base/content/aboutRobots.xhtml
browser/base/content/abouthealthreport/abouthealth.js
browser/base/content/abouthome/aboutHome.js
browser/base/content/blockedSite.xhtml
browser/base/content/browser-addons.js
browser/base/content/browser-feeds.js
browser/base/content/browser-fullScreenAndPointerLock.js
browser/base/content/browser-gestureSupport.js
browser/base/content/browser-places.js
browser/base/content/browser-plugins.js
browser/base/content/browser-syncui.js
browser/base/content/browser.js
browser/base/content/content.js
browser/base/content/contentSearchUI.js
browser/base/content/pageinfo/feeds.js
browser/base/content/pageinfo/pageInfo.js
browser/base/content/pageinfo/permissions.js
browser/base/content/pageinfo/security.js
browser/base/content/sanitize.js
browser/base/content/sync/aboutSyncTabs.js
browser/base/content/sync/genericChange.js
browser/base/content/sync/setup.js
browser/base/content/sync/utils.js
browser/base/content/tabbrowser.xml
browser/base/content/test/general/browser_aboutAccounts.js
browser/base/content/test/general/browser_aboutCertError.js
browser/base/content/test/general/browser_aboutHealthReport.js
browser/base/content/test/general/browser_accesskeys.js
browser/base/content/test/general/browser_bookmark_titles.js
browser/base/content/test/general/browser_bug1261299.js
browser/base/content/test/general/browser_bug1297539.js
browser/base/content/test/general/browser_bug409481.js
browser/base/content/test/general/browser_bug432599.js
browser/base/content/test/general/browser_bug462289.js
browser/base/content/test/general/browser_bug553455.js
browser/base/content/test/general/browser_bug561636.js
browser/base/content/test/general/browser_bug580638.js
browser/base/content/test/general/browser_bug585558.js
browser/base/content/test/general/browser_bug734076.js
browser/base/content/test/general/browser_bug763468_perwindowpb.js
browser/base/content/test/general/browser_bug767836_perwindowpb.js
browser/base/content/test/general/browser_bug970746.js
browser/base/content/test/general/browser_contentAltClick.js
browser/base/content/test/general/browser_contentAreaClick.js
browser/base/content/test/general/browser_contentSearchUI.js
browser/base/content/test/general/browser_contextmenu.js
browser/base/content/test/general/browser_contextmenu_childprocess.js
browser/base/content/test/general/browser_ctrlTab.js
browser/base/content/test/general/browser_discovery.js
browser/base/content/test/general/browser_documentnavigation.js
browser/base/content/test/general/browser_drag.js
browser/base/content/test/general/browser_e10s_switchbrowser.js
browser/base/content/test/general/browser_focusonkeydown.js
browser/base/content/test/general/browser_fullscreen-window-open.js
browser/base/content/test/general/browser_fxaccounts.js
browser/base/content/test/general/browser_gZipOfflineChild.js
browser/base/content/test/general/browser_gestureSupport.js
browser/base/content/test/general/browser_parsable_css.js
browser/base/content/test/general/browser_sanitize-timespans.js
browser/base/content/test/general/browser_sanitizeDialog.js
browser/base/content/test/general/browser_save_private_link_perwindowpb.js
browser/base/content/test/general/browser_selectpopup.js
browser/base/content/test/general/browser_star_hsts.js
browser/base/content/test/general/browser_tabfocus.js
browser/base/content/test/general/browser_utilityOverlay.js
browser/base/content/test/general/browser_windowactivation.js
browser/base/content/test/general/clipboard_pastefile.html
browser/base/content/test/general/contentSearchUI.js
browser/base/content/test/general/contextmenu_common.js
browser/base/content/test/general/download_page.html
browser/base/content/test/general/file_bug822367_5.html
browser/base/content/test/general/head.js
browser/base/content/test/newtab/browser_newtab_background_captures.js
browser/base/content/test/newtab/browser_newtab_bug752841.js
browser/base/content/test/newtab/browser_newtab_disable.js
browser/base/content/test/newtab/browser_newtab_search.js
browser/base/content/test/plugins/browser_clearplugindata.html
browser/base/content/test/plugins/browser_clearplugindata_noage.html
browser/base/content/test/plugins/browser_pluginCrashCommentAndURL.js
browser/base/content/test/plugins/browser_pluginnotification.js
browser/base/content/test/plugins/head.js
browser/base/content/test/plugins/plugin_crashCommentAndURL.html
browser/base/content/test/popupNotifications/head.js
browser/base/content/test/social/browser_aboutHome_activation.js
browser/base/content/test/urlbar/browser_bug556061.js
browser/base/content/test/urlbar/browser_bug623155.js
browser/base/content/test/urlbar/browser_locationBarCommand.js
browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
browser/base/content/test/webrtc/browser_devices_get_user_media.js
browser/base/content/test/webrtc/browser_devices_get_user_media_screen.js
browser/base/content/test/webrtc/head.js
browser/base/content/urlbarBindings.xml
browser/base/content/utilityOverlay.js
browser/base/content/web-panels.js
browser/base/content/webrtcIndicator.js
browser/components/contextualidentity/test/browser/browser_eme.js
browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js
browser/components/customizableui/CustomizableUI.jsm
browser/components/customizableui/CustomizeMode.jsm
browser/components/customizableui/test/browser_901207_searchbar_in_panel.js
browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js
browser/components/customizableui/test/browser_947914_button_newWindow.js
browser/components/customizableui/test/browser_947914_button_print.js
browser/components/distribution.js
browser/components/feeds/FeedConverter.js
browser/components/feeds/FeedWriter.js
browser/components/feeds/WebContentConverter.js
browser/components/feeds/test/test_registerHandler.html
browser/components/feeds/test/unit/test_758990.js
browser/components/migration/ChromeProfileMigrator.js
browser/components/migration/IEProfileMigrator.js
browser/components/migration/MSMigrationUtils.jsm
browser/components/migration/MigrationUtils.jsm
browser/components/migration/SafariProfileMigrator.js
browser/components/migration/content/migration.js
browser/components/migration/tests/unit/test_automigration.js
browser/components/newtab/PlacesProvider.jsm
browser/components/newtab/aboutNewTabService.js
browser/components/newtab/tests/xpcshell/test_PlacesProvider.js
browser/components/nsBrowserContentHandler.js
browser/components/nsBrowserGlue.js
browser/components/places/PlacesUIUtils.jsm
browser/components/places/content/bookmarkProperties.js
browser/components/places/content/browserPlacesViews.js
browser/components/places/content/controller.js
browser/components/places/content/editBookmarkOverlay.js
browser/components/places/content/history-panel.js
browser/components/places/content/menu.xml
browser/components/places/content/places.js
browser/components/places/content/sidebarUtils.js
browser/components/places/content/tree.xml
browser/components/places/content/treeView.js
browser/components/places/tests/browser/browser_bookmarksProperties.js
browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
browser/components/places/tests/browser/browser_library_batch_delete.js
browser/components/places/tests/browser/browser_library_downloads.js
browser/components/places/tests/browser/browser_library_infoBox.js
browser/components/places/tests/browser/browser_library_middleclick.js
browser/components/places/tests/browser/browser_library_search.js
browser/components/places/tests/browser/browser_markPageAsFollowedLink.js
browser/components/places/tests/browser/browser_sidebarpanels_click.js
browser/components/places/tests/browser/browser_sort_in_library.js
browser/components/places/tests/browser/head.js
browser/components/places/tests/unit/test_PUIU_makeTransaction.js
browser/components/places/tests/unit/test_clearHistory_shutdown.js
browser/components/places/tests/unit/test_leftpane_corruption_handling.js
browser/components/preferences/applicationManager.js
browser/components/preferences/connection.js
browser/components/preferences/cookies.js
browser/components/preferences/fonts.js
browser/components/preferences/in-content/advanced.js
browser/components/preferences/in-content/applications.js
browser/components/preferences/in-content/content.js
browser/components/preferences/in-content/main.js
browser/components/preferences/in-content/privacy.js
browser/components/preferences/in-content/search.js
browser/components/preferences/in-content/security.js
browser/components/preferences/in-content/sync.js
browser/components/preferences/in-content/tests/browser_cookies_exceptions.js
browser/components/preferences/in-content/tests/privacypane_tests_perwindow.js
browser/components/preferences/languages.js
browser/components/preferences/permissions.js
browser/components/preferences/selectBookmark.js
browser/components/preferences/translation.js
browser/components/safebrowsing/content/test/head.js
browser/components/search/content/search.xml
browser/components/search/test/browser_426329.js
browser/components/search/test/browser_aboutSearchReset.js
browser/components/search/test/browser_amazon_behavior.js
browser/components/search/test/browser_bing_behavior.js
browser/components/search/test/browser_google_behavior.js
browser/components/search/test/browser_google_codes.js
browser/components/search/test/browser_oneOffHeader.js
browser/components/search/test/browser_searchbar_keyboard_navigation.js
browser/components/search/test/browser_searchbar_openpopup.js
browser/components/search/test/browser_searchbar_smallpanel_keyboard_navigation.js
browser/components/search/test/browser_yahoo_behavior.js
browser/components/search/test/head.js
browser/components/selfsupport/test/browser_selfsupportAPI.js
browser/components/shell/content/setDesktopBackground.js
browser/components/tests/browser/browser_bug538331.js
browser/components/translation/Translation.jsm
browser/components/translation/TranslationDocument.jsm
browser/components/uitour/test/browser_UITour3.js
browser/experiments/Experiments.jsm
browser/experiments/test/xpcshell/test_activate.js
browser/experiments/test/xpcshell/test_api.js
browser/experiments/test/xpcshell/test_cache.js
browser/experiments/test/xpcshell/test_conditions.js
browser/experiments/test/xpcshell/test_disableExperiments.js
browser/experiments/test/xpcshell/test_previous_provider.js
browser/experiments/test/xpcshell/test_telemetry.js
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/ContentLinkHandler.jsm
browser/modules/ContentSearch.jsm
browser/modules/ContentWebRTC.jsm
browser/modules/DirectoryLinksProvider.jsm
browser/modules/E10SUtils.jsm
browser/modules/Feeds.jsm
browser/modules/FormSubmitObserver.jsm
browser/modules/PluginContent.jsm
browser/modules/WindowsJumpLists.jsm
browser/modules/WindowsPreviewPerTab.jsm
browser/modules/test/browser_ContentSearch.js
browser/modules/test/unit/social/head.js
browser/modules/test/xpcshell/test_DirectoryLinksProvider.js
browser/modules/webrtcUI.jsm
storage/test/unit/head_storage.js
storage/test/unit/test_bug-365166.js
storage/test/unit/test_bug-393952.js
storage/test/unit/test_cache_size.js
storage/test/unit/test_connection_executeAsync.js
storage/test/unit/test_js_helpers.js
storage/test/unit/test_levenshtein.js
storage/test/unit/test_like.js
storage/test/unit/test_like_escape.js
storage/test/unit/test_locale_collation.js
storage/test/unit/test_page_size_is_32k.js
storage/test/unit/test_sqlite_secure_delete.js
storage/test/unit/test_statement_executeAsync.js
storage/test/unit/test_statement_wrapper_automatically.js
storage/test/unit/test_storage_aggregates.js
storage/test/unit/test_storage_connection.js
storage/test/unit/test_storage_fulltextindex.js
storage/test/unit/test_storage_function.js
storage/test/unit/test_storage_progresshandler.js
storage/test/unit/test_storage_service.js
storage/test/unit/test_storage_service_unshared.js
storage/test/unit/test_storage_statement.js
storage/test/unit/test_telemetry_vfs.js
storage/test/unit/test_vacuum.js
storage/test/unit/vacuumParticipant.js
toolkit/.eslintrc.js
toolkit/components/aboutcache/content/aboutCache.js
toolkit/components/aboutmemory/content/aboutMemory.js
toolkit/components/addoncompat/CompatWarning.jsm
toolkit/components/addoncompat/Prefetcher.jsm
toolkit/components/addoncompat/RemoteAddonsChild.jsm
toolkit/components/addoncompat/RemoteAddonsParent.jsm
toolkit/components/addoncompat/multiprocessShims.js
toolkit/components/addoncompat/tests/addon/bootstrap.js
toolkit/components/addoncompat/tests/browser/browser_addonShims.js
toolkit/components/addoncompat/tests/compat-addon/bootstrap.js
toolkit/components/asyncshutdown/AsyncShutdown.jsm
toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js
toolkit/components/autocomplete/tests/unit/test_378079.js
toolkit/components/autocomplete/tests/unit/test_393191.js
toolkit/components/autocomplete/tests/unit/test_440866.js
toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js
toolkit/components/autocomplete/tests/unit/test_previousResult.js
toolkit/components/autocomplete/tests/unit/test_stopSearch.js
toolkit/components/captivedetect/test/unit/head_setprefs.js
toolkit/components/contentprefs/ContentPrefService2.jsm
toolkit/components/contentprefs/ContentPrefStore.jsm
toolkit/components/contentprefs/ContentPrefUtils.jsm
toolkit/components/contentprefs/nsContentPrefService.js
toolkit/components/contentprefs/tests/unit_cps2/AsyncRunner.jsm
toolkit/components/contentprefs/tests/unit_cps2/head.js
toolkit/components/cookie/content/cookieAcceptDialog.js
toolkit/components/crashmonitor/test/unit/head.js
toolkit/components/ctypes/tests/unit/head.js
toolkit/components/ctypes/tests/unit/test_errno.js
toolkit/components/ctypes/tests/unit/test_finalizer.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/downloads/test/unit/head_download_manager.js
toolkit/components/downloads/test/unit/tail_download_manager.js
toolkit/components/downloads/test/unit/test_app_rep_maclinux.js
toolkit/components/downloads/test/unit/test_app_rep_windows.js
toolkit/components/exthelper/extApplication.js
toolkit/components/feeds/FeedProcessor.js
toolkit/components/feeds/test/head.js
toolkit/components/filepicker/content/filepicker.js
toolkit/components/filepicker/nsFilePicker.js
toolkit/components/filepicker/test/unit/test_filecomplete.js
toolkit/components/gfx/SanityTest.js
toolkit/components/jsdownloads/src/DownloadCore.jsm
toolkit/components/jsdownloads/src/DownloadImport.jsm
toolkit/components/jsdownloads/src/DownloadLegacy.js
toolkit/components/jsdownloads/src/DownloadList.jsm
toolkit/components/jsdownloads/src/DownloadStore.jsm
toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
toolkit/components/jsdownloads/src/Downloads.jsm
toolkit/components/jsdownloads/test/browser/head.js
toolkit/components/jsdownloads/test/unit/common_test_Download.js
toolkit/components/jsdownloads/test/unit/head.js
toolkit/components/jsdownloads/test/unit/test_DownloadCore.js
toolkit/components/jsdownloads/test/unit/test_DownloadImport.js
toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js
toolkit/components/jsdownloads/test/unit/test_DownloadList.js
toolkit/components/jsdownloads/test/unit/test_DownloadStore.js
toolkit/components/jsdownloads/test/unit/test_Downloads.js
toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
toolkit/components/microformats/microformat-shiv.js
toolkit/components/microformats/update/update.js
toolkit/components/nsDefaultCLH.js
toolkit/components/passwordmgr/LoginHelper.jsm
toolkit/components/passwordmgr/LoginManagerContent.jsm
toolkit/components/passwordmgr/LoginManagerParent.jsm
toolkit/components/passwordmgr/nsLoginInfo.js
toolkit/components/passwordmgr/storage-mozStorage.js
toolkit/components/passwordmgr/test/browser/browser_context_menu_iframe.js
toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw.html
toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw_2.html
toolkit/components/passwordmgr/test/mochitest/test_basic_form_2pw_1.html
toolkit/components/passwordmgr/test/mochitest/test_basic_form_3pw_1.html
toolkit/components/passwordmgr/test/mochitest/test_form_action_2.html
toolkit/components/passwordmgr/test/mochitest/test_passwords_in_type_password.html
toolkit/components/passwordmgr/test/pwmgr_common.js
toolkit/components/passwordmgr/test/unit/test_OSCrypto_win.js
toolkit/components/passwordmgr/test/unit/test_module_LoginImport.js
toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js
toolkit/components/places/BookmarkHTMLUtils.jsm
toolkit/components/places/PlacesCategoriesStarter.js
toolkit/components/places/PlacesDBUtils.jsm
toolkit/components/places/PlacesTransactions.jsm
toolkit/components/places/PlacesUtils.jsm
toolkit/components/places/UnifiedComplete.js
toolkit/components/places/nsLivemarkService.js
toolkit/components/places/nsPlacesExpiration.js
toolkit/components/places/nsTaggingService.js
toolkit/components/places/tests/PlacesTestUtils.jsm
toolkit/components/places/tests/bookmarks/test_417228-exclude-from-backup.js
toolkit/components/places/tests/bookmarks/test_448584.js
toolkit/components/places/tests/bookmarks/test_458683.js
toolkit/components/places/tests/bookmarks/test_818593-store-backup-metadata.js
toolkit/components/places/tests/bookmarks/test_async_observers.js
toolkit/components/places/tests/bookmarks/test_bmindex.js
toolkit/components/places/tests/bookmarks/test_bookmarks.js
toolkit/components/places/tests/bookmarks/test_changeBookmarkURI.js
toolkit/components/places/tests/bookmarks/test_nsINavBookmarkObserver.js
toolkit/components/places/tests/bookmarks/test_protectRoots.js
toolkit/components/places/tests/bookmarks/test_savedsearches.js
toolkit/components/places/tests/browser/browser_bug399606.js
toolkit/components/places/tests/browser/browser_settitle.js
toolkit/components/places/tests/browser/browser_visituri.js
toolkit/components/places/tests/browser/browser_visituri_nohistory.js
toolkit/components/places/tests/browser/head.js
toolkit/components/places/tests/expiration/head_expiration.js
toolkit/components/places/tests/expiration/test_analyze_runs.js
toolkit/components/places/tests/expiration/test_annos_expire_policy.js
toolkit/components/places/tests/expiration/test_clearHistory.js
toolkit/components/places/tests/expiration/test_debug_expiration.js
toolkit/components/places/tests/expiration/test_outdated_analyze.js
toolkit/components/places/tests/expiration/test_pref_maxpages.js
toolkit/components/places/tests/favicons/test_getFaviconDataForPage.js
toolkit/components/places/tests/favicons/test_getFaviconURLForPage.js
toolkit/components/places/tests/favicons/test_moz-anno_favicon_mime_type.js
toolkit/components/places/tests/head_common.js
toolkit/components/places/tests/history/test_insert.js
toolkit/components/places/tests/history/test_remove.js
toolkit/components/places/tests/history/test_removeVisitsByFilter.js
toolkit/components/places/tests/migration/test_current_from_v19.js
toolkit/components/places/tests/migration/test_current_from_v24.js
toolkit/components/places/tests/queries/head_queries.js
toolkit/components/places/tests/queries/test_415716.js
toolkit/components/places/tests/queries/test_abstime-annotation-domain.js
toolkit/components/places/tests/queries/test_abstime-annotation-uri.js
toolkit/components/places/tests/queries/test_async.js
toolkit/components/places/tests/queries/test_containersQueries_sorting.js
toolkit/components/places/tests/queries/test_history_queries_tags_liveUpdate.js
toolkit/components/places/tests/queries/test_history_queries_titles_liveUpdate.js
toolkit/components/places/tests/queries/test_onlyBookmarked.js
toolkit/components/places/tests/queries/test_querySerialization.js
toolkit/components/places/tests/queries/test_redirects.js
toolkit/components/places/tests/queries/test_results-as-tag-contents-query.js
toolkit/components/places/tests/queries/test_results-as-visit.js
toolkit/components/places/tests/queries/test_searchTerms_includeHidden.js
toolkit/components/places/tests/queries/test_searchterms-bookmarklets.js
toolkit/components/places/tests/queries/test_searchterms-domain.js
toolkit/components/places/tests/queries/test_searchterms-uri.js
toolkit/components/places/tests/queries/test_sort-date-site-grouping.js
toolkit/components/places/tests/queries/test_sorting.js
toolkit/components/places/tests/queries/test_tags.js
toolkit/components/places/tests/queries/test_transitions.js
toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
toolkit/components/places/tests/unit/test_000_frecency.js
toolkit/components/places/tests/unit/test_317472.js
toolkit/components/places/tests/unit/test_385397.js
toolkit/components/places/tests/unit/test_399264_query_to_string.js
toolkit/components/places/tests/unit/test_399264_string_to_query.js
toolkit/components/places/tests/unit/test_399266.js
toolkit/components/places/tests/unit/test_402799.js
toolkit/components/places/tests/unit/test_405497.js
toolkit/components/places/tests/unit/test_408221.js
toolkit/components/places/tests/unit/test_412132.js
toolkit/components/places/tests/unit/test_413784.js
toolkit/components/places/tests/unit/test_415460.js
toolkit/components/places/tests/unit/test_415757.js
toolkit/components/places/tests/unit/test_425563.js
toolkit/components/places/tests/unit/test_433525_hasChildren_crash.js
toolkit/components/places/tests/unit/test_452777.js
toolkit/components/places/tests/unit/test_454977.js
toolkit/components/places/tests/unit/test_463863.js
toolkit/components/places/tests/unit/test_486978_sort_by_date_queries.js
toolkit/components/places/tests/unit/test_536081.js
toolkit/components/places/tests/unit/test_adaptive.js
toolkit/components/places/tests/unit/test_annotations.js
toolkit/components/places/tests/unit/test_asyncExecuteLegacyQueries.js
toolkit/components/places/tests/unit/test_async_history_api.js
toolkit/components/places/tests/unit/test_async_transactions.js
toolkit/components/places/tests/unit/test_autocomplete_stopSearch_no_throw.js
toolkit/components/places/tests/unit/test_bookmarks_html.js
toolkit/components/places/tests/unit/test_bookmarks_html_singleframe.js
toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js
toolkit/components/places/tests/unit/test_childlessTags.js
toolkit/components/places/tests/unit/test_crash_476292.js
toolkit/components/places/tests/unit/test_download_history.js
toolkit/components/places/tests/unit/test_frecency.js
toolkit/components/places/tests/unit/test_frecency_zero_updated.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_clear.js
toolkit/components/places/tests/unit/test_history_sidebar.js
toolkit/components/places/tests/unit/test_hosts_triggers.js
toolkit/components/places/tests/unit/test_isURIVisited.js
toolkit/components/places/tests/unit/test_isvisited.js
toolkit/components/places/tests/unit/test_markpageas.js
toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js
toolkit/components/places/tests/unit/test_multi_queries.js
toolkit/components/places/tests/unit/test_multi_word_tags.js
toolkit/components/places/tests/unit/test_nsINavHistoryViewer.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_placesTxn.js
toolkit/components/places/tests/unit/test_preventive_maintenance.js
toolkit/components/places/tests/unit/test_promiseBookmarksTree.js
toolkit/components/places/tests/unit/test_sql_guid_functions.js
toolkit/components/places/tests/unit/test_tag_autocomplete_search.js
toolkit/components/places/tests/unit/test_telemetry.js
toolkit/components/places/tests/unit/test_utils_backups_create.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/src/CommonDialog.jsm
toolkit/components/prompts/src/nsPrompter.js
toolkit/components/prompts/test/prompt_common.js
toolkit/components/prompts/test/test_bug620145.html
toolkit/components/prompts/test/test_subresources_prompts.html
toolkit/components/remotebrowserutils/RemoteWebNavigation.js
toolkit/components/remotebrowserutils/tests/browser/browser_RemoteWebNavigation.js
toolkit/components/satchel/FormHistory.jsm
toolkit/components/satchel/FormHistoryStartup.js
toolkit/components/satchel/formSubmitListener.js
toolkit/components/satchel/nsFormHistory.js
toolkit/components/satchel/test/satchel_common.js
toolkit/components/satchel/test/test_bug_511615.html
toolkit/components/satchel/test/test_datalist_with_caching.html
toolkit/components/satchel/test/test_form_autocomplete.html
toolkit/components/satchel/test/test_form_autocomplete_with_list.html
toolkit/components/satchel/test/test_form_submission.html
toolkit/components/satchel/test/test_form_submission_cap2.html
toolkit/components/satchel/test/unit/test_async_expire.js
toolkit/components/satchel/test/unit/test_autocomplete.js
toolkit/components/satchel/test/unit/test_db_update_v4.js
toolkit/components/satchel/test/unit/test_db_update_v4b.js
toolkit/components/satchel/test/unit/test_db_update_v999a.js
toolkit/components/satchel/test/unit/test_db_update_v999b.js
toolkit/components/satchel/test/unit/test_history_api.js
toolkit/components/satchel/test/unit/test_notify.js
toolkit/components/satchel/test/unit/test_previous_result.js
toolkit/components/search/nsSearchService.js
toolkit/components/search/tests/xpcshell/head_search.js
toolkit/components/search/tests/xpcshell/test_bug930456.js
toolkit/components/search/tests/xpcshell/test_nocache.js
toolkit/components/search/tests/xpcshell/test_nodb.js
toolkit/components/search/tests/xpcshell/test_purpose.js
toolkit/components/securityreporter/SecurityReporter.js
toolkit/components/sqlite/sqlite_internal.js
toolkit/components/telemetry/TelemetrySession.jsm
toolkit/components/telemetry/TelemetryStopwatch.jsm
toolkit/components/telemetry/TelemetryUtils.jsm
toolkit/components/telemetry/tests/unit/test_TelemetryControllerShutdown.js
toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
toolkit/components/telemetry/tests/unit/test_TelemetryEvents.js
toolkit/components/telemetry/tests/unit/test_TelemetryFlagClear.js
toolkit/components/telemetry/tests/unit/test_TelemetryLateWrites.js
toolkit/components/telemetry/tests/unit/test_TelemetryLog.js
toolkit/components/telemetry/tests/unit/test_nsITelemetry.js
toolkit/components/terminator/nsTerminatorTelemetry.js
toolkit/components/thumbnails/BackgroundPageThumbs.jsm
toolkit/components/thumbnails/PageThumbs.jsm
toolkit/components/thumbnails/content/backgroundPageThumbsContent.js
toolkit/components/thumbnails/test/browser_thumbnails_bug727765.js
toolkit/components/utils/simpleServices.js
toolkit/components/viewconfig/content/config.js
toolkit/components/viewsource/content/viewSource-content.js
toolkit/components/viewsource/content/viewSource.js
toolkit/components/viewsource/content/viewSourceUtils.js
toolkit/content/aboutNetworking.js
toolkit/content/aboutSupport.js
toolkit/content/aboutTelemetry.js
toolkit/content/aboutwebrtc/aboutWebrtc.js
toolkit/content/browser-content.js
toolkit/content/contentAreaUtils.js
toolkit/content/customizeToolbar.js
toolkit/content/editMenuOverlay.js
toolkit/content/findUtils.js
toolkit/content/finddialog.js
toolkit/content/globalOverlay.js
toolkit/content/macWindowMenu.js
toolkit/content/tests/browser/browser_autoscroll_disabled.js
toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js
toolkit/content/tests/browser/browser_f7_caret_browsing.js
toolkit/content/tests/browser/browser_keyevents_during_autoscrolling.js
toolkit/content/tests/browser/browser_save_resend_postdata.js
toolkit/content/tests/browser/common/mockTransfer.js
toolkit/content/tests/chrome/RegisterUnregisterChrome.js
toolkit/content/tests/chrome/file_autocomplete_with_composition.js
toolkit/content/tests/chrome/popup_trigger.js
toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html
toolkit/content/tests/chrome/xul_selectcontrol.js
toolkit/content/tests/fennec-tile-testapp/chrome/content/BrowserView.js
toolkit/content/tests/fennec-tile-testapp/chrome/content/FooScript.js
toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js
toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js
toolkit/content/tests/mochitest/test_mousecapture.xhtml
toolkit/content/tests/unit/test_contentAreaUtils.js
toolkit/content/tests/widgets/popup_shared.js
toolkit/content/tests/widgets/test_mousecapture_area.html
toolkit/content/tests/widgets/test_videocontrols.html
toolkit/content/tests/widgets/test_videocontrols_onclickplay.html
toolkit/content/tests/widgets/tree_shared.js
toolkit/content/tests/widgets/videocontrols_direction_test.js
toolkit/content/treeUtils.js
toolkit/content/widgets/autocomplete.xml
toolkit/content/widgets/browser.xml
toolkit/content/widgets/button.xml
toolkit/content/widgets/colorpicker.xml
toolkit/content/widgets/datetimepicker.xml
toolkit/content/widgets/dialog.xml
toolkit/content/widgets/editor.xml
toolkit/content/widgets/filefield.xml
toolkit/content/widgets/findbar.xml
toolkit/content/widgets/listbox.xml
toolkit/content/widgets/menulist.xml
toolkit/content/widgets/notification.xml
toolkit/content/widgets/numberbox.xml
toolkit/content/widgets/popup.xml
toolkit/content/widgets/preferences.xml
toolkit/content/widgets/radio.xml
toolkit/content/widgets/richlistbox.xml
toolkit/content/widgets/scrollbox.xml
toolkit/content/widgets/stringbundle.xml
toolkit/content/widgets/tabbox.xml
toolkit/content/widgets/text.xml
toolkit/content/widgets/textbox.xml
toolkit/content/widgets/tree.xml
toolkit/content/widgets/videocontrols.xml
toolkit/crashreporter/CrashReports.jsm
toolkit/crashreporter/CrashSubmit.jsm
toolkit/crashreporter/content/crashes.js
toolkit/crashreporter/test/CrashTestUtils.jsm
toolkit/crashreporter/test/unit/head_crashreporter.js
toolkit/crashreporter/test/unit/test_crash_abort.js
toolkit/crashreporter/test/unit/test_crash_after_js_large_allocation_failure.js
toolkit/crashreporter/test/unit/test_crash_after_js_large_allocation_failure_reporting.js
toolkit/crashreporter/test/unit/test_crash_after_js_oom_recovered.js
toolkit/crashreporter/test/unit/test_crash_after_js_oom_reported.js
toolkit/crashreporter/test/unit/test_crash_after_js_oom_reported_2.js
toolkit/crashreporter/test/unit/test_crash_moz_crash.js
toolkit/crashreporter/test/unit/test_crash_oom.js
toolkit/crashreporter/test/unit/test_crash_purevirtual.js
toolkit/crashreporter/test/unit/test_crash_with_memory_report.js
toolkit/crashreporter/test/unit/test_crashreporter.js
toolkit/crashreporter/test/unit/test_crashreporter_appmem.js
toolkit/crashreporter/test/unit/test_crashreporter_crash.js
toolkit/crashreporter/test/unit/test_oom_annotation_windows.js
toolkit/crashreporter/test/unit/test_override_exception_handler.js
toolkit/crashreporter/test/unit_ipc/test_content_annotation.js
toolkit/crashreporter/test/unit_ipc/test_content_exception_time_annotation.js
toolkit/crashreporter/test/unit_ipc/test_content_memory_list.js
toolkit/crashreporter/test/unit_ipc/test_content_oom_annotation_windows.js
toolkit/forgetaboutsite/ForgetAboutSite.jsm
toolkit/forgetaboutsite/test/browser/browser_clearplugindata.html
toolkit/forgetaboutsite/test/browser/browser_clearplugindata.js
toolkit/forgetaboutsite/test/unit/head_forgetaboutsite.js
toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
toolkit/identity/IdentityProvider.jsm
toolkit/identity/jwcrypto.jsm
toolkit/modules/BrowserUtils.jsm
toolkit/modules/CertUtils.jsm
toolkit/modules/Console.jsm
toolkit/modules/DeferredTask.jsm
toolkit/modules/FileUtils.jsm
toolkit/modules/GMPInstallManager.jsm
toolkit/modules/Geometry.jsm
toolkit/modules/Http.jsm
toolkit/modules/InlineSpellChecker.jsm
toolkit/modules/Locale.jsm
toolkit/modules/Log.jsm
toolkit/modules/NewTabUtils.jsm
toolkit/modules/ObjectUtils.jsm
toolkit/modules/PageMenu.jsm
toolkit/modules/Preferences.jsm
toolkit/modules/Promise-backend.js
toolkit/modules/PropertyListUtils.jsm
toolkit/modules/RemoteController.jsm
toolkit/modules/RemoteFinder.jsm
toolkit/modules/RemotePageManager.jsm
toolkit/modules/RemoteSecurityUI.jsm
toolkit/modules/RemoteWebProgress.jsm
toolkit/modules/SpatialNavigation.jsm
toolkit/modules/Sqlite.jsm
toolkit/modules/Troubleshoot.jsm
toolkit/modules/UpdateUtils.jsm
toolkit/modules/WindowDraggingUtils.jsm
toolkit/modules/ZipUtils.jsm
toolkit/modules/tests/browser/browser_Deprecated.js
toolkit/modules/tests/browser/browser_RemotePageManager.js
toolkit/modules/tests/browser/browser_Troubleshoot.js
toolkit/modules/tests/browser/browser_WebNavigation.js
toolkit/modules/tests/browser/browser_WebRequest.js
toolkit/modules/tests/browser/browser_WebRequest_cookies.js
toolkit/modules/tests/browser/browser_WebRequest_filtering.js
toolkit/modules/tests/browser/head.js
toolkit/modules/tests/xpcshell/test_DeferredTask.js
toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
toolkit/modules/tests/xpcshell/test_JSONFile.js
toolkit/modules/tests/xpcshell/test_Log.js
toolkit/modules/tests/xpcshell/test_Log_stackTrace.js
toolkit/modules/tests/xpcshell/test_MatchPattern.js
toolkit/modules/tests/xpcshell/test_Preferences.js
toolkit/modules/tests/xpcshell/test_Promise.js
toolkit/modules/tests/xpcshell/test_Services.js
toolkit/modules/tests/xpcshell/test_sqlite.js
toolkit/mozapps/downloads/DownloadLastDir.jsm
toolkit/mozapps/downloads/DownloadUtils.jsm
toolkit/mozapps/downloads/tests/unit/test_DownloadPaths.js
toolkit/mozapps/downloads/tests/unit/test_DownloadUtils.js
toolkit/mozapps/downloads/tests/unit/test_lowMinutes.js
toolkit/mozapps/downloads/tests/unit/test_syncedDownloadUtils.js
toolkit/mozapps/downloads/tests/unit/test_unspecified_arguments.js
toolkit/mozapps/extensions/AddonManager.jsm
toolkit/mozapps/extensions/ChromeManifestParser.jsm
toolkit/mozapps/extensions/DeferredSave.jsm
toolkit/mozapps/extensions/LightweightThemeManager.jsm
toolkit/mozapps/extensions/addonManager.js
toolkit/mozapps/extensions/amInstallTrigger.js
toolkit/mozapps/extensions/amWebInstallListener.js
toolkit/mozapps/extensions/content/blocklist.js
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/content/list.js
toolkit/mozapps/extensions/content/newaddon.js
toolkit/mozapps/extensions/content/setting.xml
toolkit/mozapps/extensions/content/update.js
toolkit/mozapps/extensions/content/xpinstallConfirm.js
toolkit/mozapps/extensions/internal/AddonLogging.jsm
toolkit/mozapps/extensions/internal/AddonRepository.jsm
toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
toolkit/mozapps/extensions/internal/GMPProvider.jsm
toolkit/mozapps/extensions/internal/PluginProvider.jsm
toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
toolkit/mozapps/extensions/internal/WebExtensionBootstrap.js
toolkit/mozapps/extensions/internal/XPIProvider.jsm
toolkit/mozapps/extensions/internal/XPIProviderUtils.js
toolkit/mozapps/extensions/nsBlocklistService.js
toolkit/mozapps/extensions/test/browser/browser_bug573062.js
toolkit/mozapps/extensions/test/browser/browser_discovery.js
toolkit/mozapps/extensions/test/browser/browser_installssl.js
toolkit/mozapps/extensions/test/browser/browser_list.js
toolkit/mozapps/extensions/test/browser/browser_purchase.js
toolkit/mozapps/extensions/test/browser/browser_searching.js
toolkit/mozapps/extensions/test/browser/browser_updatessl.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_LightweightThemeManager.js
toolkit/mozapps/extensions/test/xpcshell/test_ProductAddonChecker.js
toolkit/mozapps/extensions/test/xpcshell/test_addon_path_service.js
toolkit/mozapps/extensions/test/xpcshell/test_blocklistchange.js
toolkit/mozapps/extensions/test/xpcshell/test_bug335238.js
toolkit/mozapps/extensions/test/xpcshell/test_bug371495.js
toolkit/mozapps/extensions/test/xpcshell/test_bug384052.js
toolkit/mozapps/extensions/test/xpcshell/test_bug394300.js
toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js
toolkit/mozapps/extensions/test/xpcshell/test_bug424262.js
toolkit/mozapps/extensions/test/xpcshell/test_bug425657.js
toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js
toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js
toolkit/mozapps/extensions/test/xpcshell/test_bug455906.js
toolkit/mozapps/extensions/test/xpcshell/test_bug465190.js
toolkit/mozapps/extensions/test/xpcshell/test_bug554133.js
toolkit/mozapps/extensions/test/xpcshell/test_bug587088.js
toolkit/mozapps/extensions/test/xpcshell/test_childprocess.js
toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js
toolkit/mozapps/extensions/test/xpcshell/test_dss.js
toolkit/mozapps/extensions/test/xpcshell/test_duplicateplugins.js
toolkit/mozapps/extensions/test/xpcshell/test_fuel.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Device.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_DriverNew.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Equal_DriverNew.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Equal_DriverOld.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Equal_OK.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_GTE_DriverOld.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_GTE_OK.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_No_Comparison.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OK.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OS.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OSVersion_match.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OSVersion_mismatch_DriverVersion.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OSVersion_mismatch_OSVersion.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Vendor.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Version.js
toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_prefs.js
toolkit/mozapps/extensions/test/xpcshell/test_install.js
toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js
toolkit/mozapps/extensions/test/xpcshell/test_locked2.js
toolkit/mozapps/extensions/test/xpcshell/test_locked_strictcompat.js
toolkit/mozapps/extensions/test/xpcshell/test_mapURIToAddonID.js
toolkit/mozapps/extensions/test/xpcshell/test_no_addons.js
toolkit/mozapps/extensions/test/xpcshell/test_overrideblocklist.js
toolkit/mozapps/extensions/test/xpcshell/test_permissions_prefs.js
toolkit/mozapps/extensions/test/xpcshell/test_proxies.js
toolkit/mozapps/extensions/test/xpcshell/test_shutdown.js
toolkit/mozapps/extensions/test/xpcshell/test_signed_inject.js
toolkit/mozapps/extensions/test/xpcshell/test_signed_verify.js
toolkit/mozapps/extensions/test/xpcshell/test_syncGUID.js
toolkit/mozapps/extensions/test/xpcshell/test_system_reset.js
toolkit/mozapps/extensions/test/xpcshell/test_system_update.js
toolkit/mozapps/extensions/test/xpcshell/test_theme.js
toolkit/mozapps/extensions/test/xpcshell/test_upgrade.js
toolkit/mozapps/extensions/test/xpcshell/test_upgrade_strictcompat.js
toolkit/mozapps/extensions/test/xpcshell/test_webextension.js
toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js
toolkit/mozapps/extensions/test/xpinstall/concurrent_installs.html
toolkit/mozapps/extensions/test/xpinstall/head.js
toolkit/mozapps/extensions/test/xpinstall/installtrigger.html
toolkit/mozapps/handling/content/dialog.js
toolkit/mozapps/handling/nsContentDispatchChooser.js
toolkit/mozapps/preferences/changemp.js
toolkit/mozapps/preferences/fontbuilder.js
toolkit/mozapps/preferences/removemp.js
toolkit/mozapps/update/content/updates.js
toolkit/mozapps/update/nsUpdateService.js
toolkit/mozapps/update/tests/chrome/utils.js
toolkit/profile/content/createProfileWizard.js
toolkit/profile/content/profileSelection.js
toolkit/xre/test/test_fpuhandler.html
--- a/browser/base/content/aboutDialog-appUpdater.js
+++ b/browser/base/content/aboutDialog-appUpdater.js
@@ -19,18 +19,17 @@ function onUnload(aEvent) {
   if (gAppUpdater.isChecking)
     gAppUpdater.checker.stopChecking(Components.interfaces.nsIUpdateChecker.CURRENT_CHECK);
   // Safe to call even when there isn't a download in progress.
   gAppUpdater.removeDownloadListener();
   gAppUpdater = null;
 }
 
 
-function appUpdater()
-{
+function appUpdater() {
   XPCOMUtils.defineLazyServiceGetter(this, "aus",
                                      "@mozilla.org/updates/update-service;1",
                                      "nsIApplicationUpdateService");
   XPCOMUtils.defineLazyServiceGetter(this, "checker",
                                      "@mozilla.org/updates/update-checker;1",
                                      "nsIUpdateChecker");
   XPCOMUtils.defineLazyServiceGetter(this, "um",
                                      "@mozilla.org/updates/update-manager;1",
@@ -137,33 +136,31 @@ appUpdater.prototype =
     return !this.updateEnabled &&
            Services.prefs.prefIsLocked("app.update.enabled");
   },
 
   // true when updating is enabled.
   get updateEnabled() {
     try {
       return Services.prefs.getBoolPref("app.update.enabled");
-    }
-    catch (e) { }
+    } catch (e) { }
     return true; // Firefox default is true
   },
 
   // true when updating in background is enabled.
   get backgroundUpdateEnabled() {
     return this.updateEnabled &&
            gAppUpdater.aus.canStageUpdates;
   },
 
   // true when updating is automatic.
   get updateAuto() {
     try {
       return Services.prefs.getBoolPref("app.update.auto");
-    }
-    catch (e) { }
+    } catch (e) { }
     return true; // Firefox default is true
   },
 
   /**
    * Sets the panel of the updateDeck.
    *
    * @param  aChildID
    *         The id of the deck's child to select, e.g. "apply".
--- a/browser/base/content/aboutDialog.js
+++ b/browser/base/content/aboutDialog.js
@@ -3,18 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 // Services = object with smart getters for common XPCOM services
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/AppConstants.jsm");
 
-function init(aEvent)
-{
+function init(aEvent) {
   if (aEvent.target != document)
     return;
 
   try {
     var distroId = Services.prefs.getCharPref("distribution.id");
     if (distroId) {
       var distroVersion = Services.prefs.getCharPref("distribution.version");
 
@@ -24,24 +23,22 @@ function init(aEvent)
 
       try {
         // This is in its own try catch due to bug 895473 and bug 900925.
         var distroAbout = Services.prefs.getComplexValue("distribution.about",
           Components.interfaces.nsISupportsString);
         var distroField = document.getElementById("distribution");
         distroField.value = distroAbout;
         distroField.style.display = "block";
-      }
-      catch (ex) {
+      } catch (ex) {
         // Pref is unset
         Components.utils.reportError(ex);
       }
     }
-  }
-  catch (e) {
+  } catch (e) {
     // Pref is unset
   }
 
   // Include the build ID and display warning if this is an "a#" (nightly or aurora) build
   let versionField = document.getElementById("version");
   let version = Services.appinfo.version;
   if (/a\d+$/.test(version)) {
     let buildID = Services.appinfo.appBuildID;
--- a/browser/base/content/aboutNetError.xhtml
+++ b/browser/base/content/aboutNetError.xhtml
@@ -39,37 +39,33 @@
       // which is the URL displayed in the location bar, i.e.
       // the URI that the user attempted to load.
 
       let searchParams = new URLSearchParams(document.documentURI.split("?")[1]);
 
       // Set to true on init if the error code is nssBadCert.
       let gIsCertError;
 
-      function getErrorCode()
-      {
+      function getErrorCode() {
         return searchParams.get("e");
       }
 
-      function getCSSClass()
-      {
+      function getCSSClass() {
         return searchParams.get("s");
       }
 
-      function getDescription()
-      {
+      function getDescription() {
         return searchParams.get("d");
       }
 
       function isCaptive() {
         return searchParams.get("captive") == "true";
       }
 
-      function retryThis(buttonEl)
-      {
+      function retryThis(buttonEl) {
         // Note: The application may wish to handle switching off "offline mode"
         // before this event handler runs, but using a capturing event handler.
 
         // Session history has the URL of the page that failed
         // to load, not the one of the error page. So, just call
         // reload(), which will also repost POST data correctly.
         try {
           location.reload();
@@ -174,61 +170,57 @@
         if (cssClass == "badStsCert" || window != top) {
           document.getElementById("exceptionDialogButton").setAttribute("hidden", "true");
         }
         if (cssClass == "badStsCert") {
           document.getElementById("badStsCertExplanation").removeAttribute("hidden");
         }
       }
 
-      function initPage()
-      {
+      function initPage() {
         var err = getErrorCode();
         gIsCertError = (err == "nssBadCert");
         // Only worry about captive portals if this is a cert error.
         let showCaptivePortalUI = isCaptive() && gIsCertError;
         if (showCaptivePortalUI) {
           err = "captivePortal";
         }
 
         // if it's an unknown error or there's no title or description
         // defined, get the generic message
         var errTitle = document.getElementById("et_" + err);
         var errDesc  = document.getElementById("ed_" + err);
-        if (!errTitle || !errDesc)
-        {
+        if (!errTitle || !errDesc) {
           errTitle = document.getElementById("et_generic");
           errDesc  = document.getElementById("ed_generic");
         }
 
         document.querySelector(".title-text").innerHTML = errTitle.innerHTML;
 
         var sd = document.getElementById("errorShortDescText");
         if (sd) {
           if (gIsCertError) {
             sd.innerHTML = errDesc.innerHTML;
-          }
-          else {
+          } else {
             sd.textContent = getDescription();
           }
         }
         if (showCaptivePortalUI) {
           initPageCaptivePortal();
           return;
         }
         if (gIsCertError) {
           initPageCertError();
           return;
         }
 
         document.body.className = "neterror";
 
         var ld = document.getElementById("errorLongDesc");
-        if (ld)
-        {
+        if (ld) {
           ld.innerHTML = errDesc.innerHTML;
         }
 
         if (err == "sslv3Used") {
           document.getElementById("learnMoreContainer").style.display = "block";
           let learnMoreLink = document.getElementById("learnMoreLink");
           learnMoreLink.href = "https://support.mozilla.org/kb/how-resolve-sslv3-error-messages-firefox";
           document.body.className = "certerror";
@@ -330,18 +322,17 @@
           for (var span of container.querySelectorAll("span.hostname")) {
             span.textContent = document.location.hostname;
           }
         }
 
         addDomainErrorLinks();
       }
 
-      function initPageCaptivePortal()
-      {
+      function initPageCaptivePortal() {
         document.body.className = "captiveportal";
         document.title = document.getElementById("captivePortalPageTitle").textContent;
 
         document.getElementById("openPortalLoginPageButton")
                 .addEventListener("click", () => {
           let event = new CustomEvent("AboutNetErrorOpenCaptivePortal", {bubbles:true});
           document.dispatchEvent(event);
         });
--- a/browser/base/content/aboutRobots.xhtml
+++ b/browser/base/content/aboutRobots.xhtml
@@ -23,18 +23,17 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <title>&robots.pagetitle;</title>
     <link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all" />
     <link rel="icon" type="image/png" id="favicon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAACGFjVEwAAAASAAAAAJNtBPIAAAAaZmNUTAAAAAAAAAAQAAAAEAAAAAAAAAAALuAD6AABhIDeugAAALhJREFUOI2Nk8sNxCAMRDlGohauXFOMpfTiAlxICqAELltHLqlgctg1InzMRhpFAc%2BLGWTnmoeZYamt78zXdZmaQtQMADlnU0OIAlbmJUBEcO4bRKQY2rUXIPmAGnDuG%2FBx3%2FfvOPVaDUg%2BoAPUf1PArIMCSD5glMEsUGaG%2BkyAFWIBaCsKuA%2BHGCNijLgP133XgOEtaPFMy2vUolEGJoCIzBmoRUR9%2B7rxj16DZaW%2FmgtmxnJ8V3oAnApQwNS5zpcAAAAaZmNUTAAAAAEAAAAQAAAAEAAAAAAAAAAAAB4D6AIB52fclgAAACpmZEFUAAAAAjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9WF%2Bu8QAAABpmY1RMAAAAAwAAABAAAAAQAAAAAAAAAAAAHgPoAgEK8Q9%2FAAAAFmZkQVQAAAAEOI1jYBgFo2AUjAIIAAAEEAAB0xIn4wAAABpmY1RMAAAABQAAABAAAAAQAAAAAAAAAAAAHgPoAgHnO30FAAAAQGZkQVQAAAAGOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVfozYcAAAABpmY1RMAAAABwAAABAAAAAQAAAAAAAAAAAAHgPoAgEKra7sAAAAFmZkQVQAAAAIOI1jYBgFo2AUjAIIAAAEEAABM9s3hAAAABpmY1RMAAAACQAAABAAAAAQAAAAAAAAAAAAHgPoAgHn3p%2BwAAAAKmZkQVQAAAAKOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F1BhPl6AAAAGmZjVEwAAAALAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQpITFkAAAAWZmRBVAAAAAw4jWNgGAWjYBSMAggAAAQQAAHaszpmAAAAGmZjVEwAAAANAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeeCPiMAAABAZmRBVAAAAA44jWNgGJ5gpxrDf2LEcIL%2FpzAVYxPDavP%2FUwz%2FpW79%2F%2F%2F%2FFMP%2FnWoQjC5GOxcgu4QYsVEwCmAAAOE0KxUmBL0KAAAAGmZjVEwAAAAPAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQoU7coAAAAWZmRBVAAAABA4jWNgGAWjYBSMAggAAAQQAAEpOBELAAAAGmZjVEwAAAARAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeYVWtoAAAAqZmRBVAAAABI4jWNgGAVYQXNz839ixHBq3qnG8B9ZAzYx2rlgFIwCcgAA8psX%2FWvpAecAAAAaZmNUTAAAABMAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC4OJMwAAABZmZEFUAAAAFDiNY2AYBaNgFIwCCAAABBAAAcBQHOkAAAAaZmNUTAAAABUAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5kn7SQAAAEBmZEFUAAAAFjiNY2AYnmCnGsN%2FYsRwgv%2BnMBVjE8Nq8%2F9TDP%2Blbv3%2F%2F%2F8Uw%2F%2BdahCMLkY7FyC7hBixUTAKYAAA4TQrFc%2BcEoQAAAAaZmNUTAAAABcAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC98ooAAAABZmZEFUAAAAGDiNY2AYBaNgFIwCCAAABBAAASCZDI4AAAAaZmNUTAAAABkAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5qwZ%2FAAAACpmZEFUAAAAGjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9cjJWbAAAABpmY1RMAAAAGwAAABAAAAAQAAAAAAAAAAAAHgPoAgELOsoVAAAAFmZkQVQAAAAcOI1jYBgFo2AUjAIIAAAEEAAByfEBbAAAABpmY1RMAAAAHQAAABAAAAAQAAAAAAAAAAAAHgPoAgHm8LhvAAAAQGZkQVQAAAAeOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVlxR3%2FgAAABpmY1RMAAAAHwAAABAAAAAQAAAAAAAAAAAAHgPoAgELZmuGAAAAFmZkQVQAAAAgOI1jYBgFo2AUjAIIAAAEEAABHP5cFQAAABpmY1RMAAAAIQAAABAAAAAQAAAAAAAAAAAAHgPoAgHlgtAOAAAAKmZkQVQAAAAiOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F0%2FMvDdAAAAAElFTkSuQmCC"/>
 
     <script type="application/javascript"><![CDATA[
       var buttonClicked = false;
-      function robotButton()
-      {
+      function robotButton() {
         var button = document.getElementById('errorTryAgain');
         if (buttonClicked) {
           button.style.visibility = "hidden";
         } else {
           var newLabel = button.getAttribute("label2");
           button.textContent = newLabel;
           buttonClicked = true;
         }
--- a/browser/base/content/abouthealthreport/abouthealth.js
+++ b/browser/base/content/abouthealthreport/abouthealth.js
@@ -37,18 +37,17 @@ var healthReportWrapper = {
   },
 
   updatePrefState() {
     try {
       let prefsObj = {
         enabled: MozSelfSupport.healthReportDataSubmissionEnabled,
       };
       healthReportWrapper.injectData("prefs", prefsObj);
-    }
-    catch (ex) {
+    } catch (ex) {
       healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PREFS_FAILED);
     }
   },
 
   sendTelemetryPingList() {
     console.log("AboutHealthReport: Collecting Telemetry ping list.");
     MozSelfSupport.getTelemetryPingList().then((list) => {
       console.log("AboutHealthReport: Sending Telemetry ping list.");
--- a/browser/base/content/abouthome/aboutHome.js
+++ b/browser/base/content/abouthome/aboutHome.js
@@ -99,18 +99,17 @@ var gSnippetsMapCallbacks = [];
 /**
  * Ensure the snippets map is properly initialized.
  *
  * @param aCallback
  *        Invoked once the map has been initialized, gets the map as argument.
  * @note Snippets should never directly manage the underlying storage, since
  *       it may change inadvertently.
  */
-function ensureSnippetsMapThen(aCallback)
-{
+function ensureSnippetsMapThen(aCallback) {
   if (gSnippetsMap) {
     aCallback(gSnippetsMap);
     return;
   }
 
   // Handle multiple requests during the async initialization.
   gSnippetsMapCallbacks.push(aCallback);
   if (gSnippetsMapCallbacks.length > 1) {
@@ -205,26 +204,24 @@ function ensureSnippetsMapThen(aCallback
         get size() { return cache.size; },
       });
 
       setTimeout(invokeCallbacks, 0);
     }
   }
 }
 
-function onSearchSubmit(aEvent)
-{
+function onSearchSubmit(aEvent) {
   gContentSearchController.search(aEvent);
 }
 
 
 var gContentSearchController;
 
-function setupSearch()
-{
+function setupSearch() {
   // Set submit button label for when CSS background are disabled (e.g.
   // high contrast mode).
   document.getElementById("searchSubmit").value =
     document.body.getAttribute("dir") == "ltr" ? "\u25B6" : "\u25C0";
 
   // The "autofocus" attribute doesn't focus the form element
   // immediately when the element is first drawn, so the
   // attribute is also used for styling when the page first loads.
@@ -239,28 +236,26 @@ function setupSearch()
       new ContentSearchUIController(searchText, searchText.parentNode,
                                     "abouthome", "homepage");
   }
 }
 
 /**
  * Inform the test harness that we're done loading the page.
  */
-function loadCompleted()
-{
+function loadCompleted() {
   var event = new CustomEvent("AboutHomeLoadSnippetsCompleted", {bubbles:true});
   document.dispatchEvent(event);
 }
 
 /**
  * Update the local snippets from the remote storage, then show them through
  * showSnippets.
  */
-function loadSnippets()
-{
+function loadSnippets() {
   if (!gSnippetsMap)
     throw new Error("Snippets map has not properly been initialized");
 
   // Allow tests to modify the snippets map before using it.
   var event = new CustomEvent("AboutHomeLoadSnippets", {bubbles:true});
   document.dispatchEvent(event);
 
   // Check cached snippets version.
@@ -307,18 +302,17 @@ function loadSnippets()
 
 /**
  * Shows locally cached remote snippets, or default ones when not available.
  *
  * @note: snippets should never invoke showSnippets(), or they may cause
  *        a "too much recursion" exception.
  */
 var _snippetsShown = false;
-function showSnippets()
-{
+function showSnippets() {
   let snippetsElt = document.getElementById("snippets");
 
   // Show about:rights notification, if needed.
   let showRights = document.documentElement.getAttribute("showKnowYourRights");
   if (showRights) {
     let rightsElt = document.getElementById("rightsSnippet");
     let anchor = rightsElt.getElementsByTagName("a")[0];
     anchor.href = "about:rights";
@@ -358,18 +352,17 @@ function showSnippets()
   }
 
   showDefaultSnippets();
 }
 
 /**
  * Clear snippets element contents and show default snippets.
  */
-function showDefaultSnippets()
-{
+function showDefaultSnippets() {
   // Clear eventual contents...
   let snippetsElt = document.getElementById("snippets");
   snippetsElt.innerHTML = "";
 
   // ...then show default snippets.
   let defaultSnippetsElt = document.getElementById("defaultSnippets");
   let entries = defaultSnippetsElt.querySelectorAll("span");
   // Choose a random snippet.  Assume there is always at least one.
--- a/browser/base/content/blockedSite.xhtml
+++ b/browser/base/content/blockedSite.xhtml
@@ -26,26 +26,24 @@
       //     (o=1 when user overrides are allowed)
 
       // Note that this file uses document.documentURI to get
       // the URL (with the format from above). This is because
       // document.location.href gets the current URI off the docshell,
       // which is the URL displayed in the location bar, i.e.
       // the URI that the user attempted to load.
 
-      function getErrorCode()
-      {
+      function getErrorCode() {
         var url = document.documentURI;
         var error = url.search(/e\=/);
         var duffUrl = url.search(/\&u\=/);
         return decodeURIComponent(url.slice(error + 2, duffUrl));
       }
 
-      function getURL()
-      {
+      function getURL() {
         var url = document.documentURI;
         var match = url.match(/&u=([^&]+)&/);
 
         // match == null if not found; if so, return an empty string
         // instead of what would turn out to be portions of the URI
         if (!match)
           return "";
 
@@ -56,38 +54,35 @@
           url = url.slice(12);
         return url;
       }
 
       /**
        * Check whether this warning page should be overridable or whether
        * the "ignore warning" button should be hidden.
        */
-      function getOverride()
-      {
+      function getOverride() {
         var url = document.documentURI;
         var match = url.match(/&o=1&/);
         return !!match;
       }
 
       /**
        * Attempt to get the hostname via document.location.  Fail back
        * to getURL so that we always return something meaningful.
        */
-      function getHostString()
-      {
+      function getHostString() {
         try {
           return document.location.hostname;
         } catch (e) {
           return getURL();
         }
       }
 
-      function initPage()
-      {
+      function initPage() {
         var error = "";
         switch (getErrorCode()) {
           case "malwareBlocked" :
             error = "malware";
             break;
           case "deceptiveBlocked" :
             error = "phishing";
             break;
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -25,33 +25,31 @@ function removeNotificationOnEnd(notific
       onDownloadFailed: maybeRemove,
       onInstallFailed: maybeRemove,
       onInstallEnded: maybeRemove
     });
   }
 }
 
 const gXPInstallObserver = {
-  _findChildShell(aDocShell, aSoughtShell)
-  {
+  _findChildShell(aDocShell, aSoughtShell) {
     if (aDocShell == aSoughtShell)
       return aDocShell;
 
     var node = aDocShell.QueryInterface(Components.interfaces.nsIDocShellTreeItem);
     for (var i = 0; i < node.childCount; ++i) {
       var docShell = node.getChildAt(i);
       docShell = this._findChildShell(docShell, aSoughtShell);
       if (docShell == aSoughtShell)
         return docShell;
     }
     return null;
   },
 
-  _getBrowser(aDocShell)
-  {
+  _getBrowser(aDocShell) {
     for (let browser of gBrowser.browsers) {
       if (this._findChildShell(browser.docShell, aDocShell))
         return browser;
     }
     return null;
   },
 
   pendingInstalls: new WeakMap(),
@@ -158,24 +156,22 @@ const gXPInstallObserver = {
 
     let messageString;
     let notification = document.getElementById("addon-install-confirmation-notification");
     if (unsigned.length == installInfo.installs.length) {
       // None of the add-ons are verified
       messageString = gNavigatorBundle.getString("addonConfirmInstallUnsigned.message");
       notification.setAttribute("warning", "true");
       options.learnMoreURL += "unsigned-addons";
-    }
-    else if (unsigned.length == 0) {
+    } else if (unsigned.length == 0) {
       // All add-ons are verified or don't need to be verified
       messageString = gNavigatorBundle.getString("addonConfirmInstall.message");
       notification.removeAttribute("warning");
       options.learnMoreURL += "find-and-install-add-ons";
-    }
-    else {
+    } else {
       // Some of the add-ons are unverified, the list of names will indicate
       // which
       messageString = gNavigatorBundle.getString("addonConfirmInstallSomeUnsigned.message");
       notification.setAttribute("warning", "true");
       options.learnMoreURL += "unsigned-addons";
     }
 
     let brandBundle = document.getElementById("bundle_brand");
@@ -212,18 +208,17 @@ const gXPInstallObserver = {
 
     removeNotificationOnEnd(popup, installInfo.installs);
 
     Services.telemetry
             .getHistogramById("SECURITY_UI")
             .add(Ci.nsISecurityUITelemetry.WARNING_CONFIRM_ADDON_INSTALL);
   },
 
-  observe(aSubject, aTopic, aData)
-  {
+  observe(aSubject, aTopic, aData) {
     var brandBundle = document.getElementById("bundle_brand");
     var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo);
     var browser = installInfo.browser;
 
     // Make sure the browser is still alive.
     if (!browser || gBrowser.browsers.indexOf(browser) == -1)
       return;
 
@@ -242,18 +237,17 @@ const gXPInstallObserver = {
 
     switch (aTopic) {
     case "addon-install-disabled": {
       notificationID = "xpinstall-disabled";
 
       if (gPrefService.prefIsLocked("xpinstall.enabled")) {
         messageString = gNavigatorBundle.getString("xpinstallDisabledMessageLocked");
         buttons = [];
-      }
-      else {
+      } else {
         messageString = gNavigatorBundle.getString("xpinstallDisabledMessage");
 
         action = {
           label: gNavigatorBundle.getString("xpinstallDisabledButton"),
           accessKey: gNavigatorBundle.getString("xpinstallDisabledButton.accesskey"),
           callback: function editPrefs() {
             gPrefService.setBoolPref("xpinstall.enabled", true);
           }
@@ -437,18 +431,17 @@ const gXPInstallObserver = {
             BrowserUtils.restartApplication();
           }
         };
         secondaryActions = [{
           label: gNavigatorBundle.getString("addonInstallRestartIgnoreButton"),
           accessKey: gNavigatorBundle.getString("addonInstallRestartIgnoreButton.accesskey"),
           callback: () => {},
         }];
-      }
-      else {
+      } else {
         messageString = gNavigatorBundle.getString("addonsInstalled");
         action = null;
       }
 
       messageString = PluralForm.get(installInfo.installs.length, messageString);
       messageString = messageString.replace("#1", installInfo.installs[0].name);
       messageString = messageString.replace("#2", installInfo.installs.length);
       messageString = messageString.replace("#3", brandShortName);
@@ -678,18 +671,17 @@ var LightWeightThemeWebInstaller = {
     gBrowser.tabContainer.removeEventListener("TabSelect", this, false);
     this._manager.resetPreview();
   },
 
   _isAllowed(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-feeds.js
+++ b/browser/base/content/browser-feeds.js
@@ -90,18 +90,17 @@ var FeedHandler = {
       href = "feed:" + href;
     this.loadFeed(href, event);
   },
 
   loadFeed(href, event) {
     let feeds = gBrowser.selectedBrowser.feeds;
     try {
       openUILink(href, event, { ignoreAlt: true });
-    }
-    finally {
+    } finally {
       // We might default to a livebookmarks modal dialog,
       // so reset that if the user happens to click it again
       gBrowser.selectedBrowser.feeds = feeds;
     }
   },
 
   get _feedMenuitem() {
     delete this._feedMenuitem;
--- a/browser/base/content/browser-fullScreenAndPointerLock.js
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js
@@ -325,18 +325,17 @@ var FullScreen = {
 
     if (enterFS) {
       document.addEventListener("keypress", this._keyToggleCallback, false);
       document.addEventListener("popupshown", this._setPopupOpen, false);
       document.addEventListener("popuphidden", this._setPopupOpen, false);
       // In DOM fullscreen mode, we hide toolbars with CSS
       if (!document.fullscreenElement)
         this.hideNavToolbox(true);
-    }
-    else {
+    } else {
       this.showNavToolbox(false);
       // This is needed if they use the context menu to quit fullscreen
       this._isPopupOpen = false;
       this.cleanup();
       // In TabsInTitlebar._update(), we cancel the appearance update on
       // resize event for exiting fullscreen, since that happens before we
       // change the UI here in the "fullscreen" event. Hence we need to
       // call it here to ensure the appearance is properly updated. See
@@ -490,40 +489,36 @@ var FullScreen = {
     return gMultiProcessBrowser && aBrowser.getAttribute("remote") == "true";
   },
 
   get _windowUtils() {
     return window.QueryInterface(Ci.nsIInterfaceRequestor)
                  .getInterface(Ci.nsIDOMWindowUtils);
   },
 
-  getMouseTargetRect()
-  {
+  getMouseTargetRect() {
     return this._mouseTargetRect;
   },
 
   // Event callbacks
-  _expandCallback()
-  {
+  _expandCallback() {
     FullScreen.showNavToolbox();
   },
-  onMouseEnter()
-  {
+  onMouseEnter() {
     FullScreen.hideNavToolbox();
   },
-  _keyToggleCallback(aEvent)
-  {
+  _keyToggleCallback(aEvent) {
     // if we can use the keyboard (eg Ctrl+L or Ctrl+E) to open the toolbars, we
     // should provide a way to collapse them too.
     if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE) {
       FullScreen.hideNavToolbox();
+    } else if (aEvent.keyCode == aEvent.DOM_VK_F6) {
+      // F6 is another shortcut to the address bar, but its not covered in OpenLocation()
+      FullScreen.showNavToolbox();
     }
-    // F6 is another shortcut to the address bar, but its not covered in OpenLocation()
-    else if (aEvent.keyCode == aEvent.DOM_VK_F6)
-      FullScreen.showNavToolbox();
   },
 
   // Checks whether we are allowed to collapse the chrome
   _isPopupOpen: false,
   _isChromeCollapsed: false,
   _safeToCollapse() {
     if (!gPrefService.getBoolPref("browser.fullscreen.autohide"))
       return false;
@@ -541,40 +536,37 @@ var FullScreen = {
         document.commandDispatcher.focusedElement.ownerDocument == document &&
         document.commandDispatcher.focusedElement.localName == "input") {
       return false;
     }
 
     return true;
   },
 
-  _setPopupOpen(aEvent)
-  {
+  _setPopupOpen(aEvent) {
     // Popups should only veto chrome collapsing if they were opened when the chrome was not collapsed.
     // Otherwise, they would not affect chrome and the user would expect the chrome to go away.
     // e.g. we wouldn't want the autoscroll icon firing this event, so when the user
     // toggles chrome when moving mouse to the top, it doesn't go away again.
     if (aEvent.type == "popupshown" && !FullScreen._isChromeCollapsed &&
         aEvent.target.localName != "tooltip" && aEvent.target.localName != "window")
       FullScreen._isPopupOpen = true;
     else if (aEvent.type == "popuphidden" && aEvent.target.localName != "tooltip" &&
              aEvent.target.localName != "window") {
       FullScreen._isPopupOpen = false;
       // Try again to hide toolbar when we close the popup.
       FullScreen.hideNavToolbox(true);
     }
   },
 
   // Autohide helpers for the context menu item
-  getAutohide(aItem)
-  {
+  getAutohide(aItem) {
     aItem.setAttribute("checked", gPrefService.getBoolPref("browser.fullscreen.autohide"));
   },
-  setAutohide()
-  {
+  setAutohide() {
     gPrefService.setBoolPref("browser.fullscreen.autohide", !gPrefService.getBoolPref("browser.fullscreen.autohide"));
     // Try again to hide toolbar when we change the pref.
     FullScreen.hideNavToolbox(true);
   },
 
   showNavToolbox(trackMouse = true) {
     this._fullScrToggler.hidden = true;
     gNavToolbox.removeAttribute("fullscreenShouldAnimate");
@@ -657,18 +649,17 @@ var FullScreen = {
     }
 
     var fullscreenctls = document.getElementById("window-controls");
     var navbar = document.getElementById("nav-bar");
     var ctlsOnTabbar = window.toolbar.visible;
     if (fullscreenctls.parentNode == navbar && ctlsOnTabbar) {
       fullscreenctls.removeAttribute("flex");
       document.getElementById("TabsToolbar").appendChild(fullscreenctls);
-    }
-    else if (fullscreenctls.parentNode.id == "TabsToolbar" && !ctlsOnTabbar) {
+    } else if (fullscreenctls.parentNode.id == "TabsToolbar" && !ctlsOnTabbar) {
       fullscreenctls.setAttribute("flex", "1");
       navbar.appendChild(fullscreenctls);
     }
     fullscreenctls.hidden = !aEnterFS;
   }
 };
 XPCOMUtils.defineLazyGetter(FullScreen, "useLionFullScreen", function() {
   // We'll only use OS X Lion full screen if we're
--- a/browser/base/content/browser-gestureSupport.js
+++ b/browser/base/content/browser-gestureSupport.js
@@ -333,18 +333,17 @@ var gGestureSupport = {
       if (node.getAttribute("disabled") != "true") {
         let cmdEvent = document.createEvent("xulcommandevent");
         cmdEvent.initCommandEvent("command", true, true, window, 0,
                                   aEvent.ctrlKey, aEvent.altKey,
                                   aEvent.shiftKey, aEvent.metaKey, aEvent);
         node.dispatchEvent(cmdEvent);
       }
 
-    }
-    else {
+    } else {
       goDoCommand(aCommand);
     }
   },
 
   /**
    * Handle continual motion events.  This function will be set by
    * _setupGesture or _setupSwipe.
    *
@@ -400,18 +399,17 @@ var gGestureSupport = {
    * @param aDir
    *        The direction for the swipe event
    */
   _coordinateSwipeEventWithAnimation:
   function GS__coordinateSwipeEventWithAnimation(aEvent, aDir) {
     if ((gHistorySwipeAnimation.isAnimationRunning()) &&
         (aDir == "RIGHT" || aDir == "LEFT")) {
       gHistorySwipeAnimation.processSwipeEvent(aEvent, aDir);
-    }
-    else {
+    } else {
       this.processSwipeEvent(aEvent, aDir);
     }
   },
 
   /**
    * Get a gesture preference or use a default if it doesn't exist
    *
    * @param aPref
@@ -427,18 +425,17 @@ var gGestureSupport = {
       // Determine what type of data to load based on default value's type
       let type = typeof aDef;
       let getFunc = "Char";
       if (type == "boolean")
         getFunc = "Bool";
       else if (type == "number")
         getFunc = "Int";
       return gPrefService["get" + getFunc + "Pref"](branch + aPref);
-    }
-    catch (e) {
+    } catch (e) {
       return aDef;
     }
   },
 
   /**
    * Perform rotation for ImageDocuments
    *
    * @param aEvent
@@ -644,18 +641,17 @@ var gHistorySwipeAnimation = {
       if (this._direction == "horizontal" || this._lastSwipeDir != "") {
         gBrowser.stop();
         this._lastSwipeDir = "RELOAD"; // just ensure that != ""
         this._canGoBack = this.canGoBack();
         this._canGoForward = this.canGoForward();
         this._handleFastSwiping();
       }
       this.updateAnimation(0);
-    }
-    else {
+    } else {
       // Get the session history from SessionStore.
       let updateSessionHistory = sessionHistory => {
         this._startingIndex = sessionHistory.index;
         this._historyIndex = this._startingIndex;
         this._canGoBack = this.canGoBack();
         this._canGoForward = this.canGoForward();
         if (this.active) {
           this._addBoxes();
@@ -845,18 +841,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;
     }
   },
 
   /**
    * Navigates to the index in history that is currently being tracked by
    * |this|.
    */
@@ -1149,18 +1144,17 @@ var gHistorySwipeAnimation = {
 
     let img = new Image();
     let url = "";
     try {
       url = URL.createObjectURL(aBlob);
       img.onload = function() {
         URL.revokeObjectURL(url);
       };
-    }
-    finally {
+    } finally {
       img.src = url;
       return img;
     }
   },
 
   /**
    * Scales the background of a given box element (which uses a given snapshot
    * as background) based on a given scale factor.
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -113,17 +113,17 @@ var StarUI = {
 
         switch (aEvent.keyCode) {
           case KeyEvent.DOM_VK_ESCAPE:
             this.panel.hidePopup();
             break;
           case KeyEvent.DOM_VK_RETURN:
             if (aEvent.target.classList.contains("expander-up") ||
                 aEvent.target.classList.contains("expander-down") ||
-                aEvent.target.id == "editBMPanel_newFolderButton")  {
+                aEvent.target.id == "editBMPanel_newFolderButton") {
               // XXX Why is this necessary? The defaultPrevented check should
               //    be enough.
               break;
             }
             this.panel.hidePopup();
             break;
           // This case is for catching character-generating keypresses
           case 0:
@@ -173,18 +173,17 @@ var StarUI = {
     // transactions code is gone (bug 1131491) - we don't want addons to to use
     // the  completeNodeLikeObjectForItemId, so it's better if they keep passing
     // the item-id for now).
     if (typeof(aNode) == "number") {
       let itemId = aNode;
       if (PlacesUIUtils.useAsyncTransactions) {
         let guid = yield PlacesUtils.promiseItemGuid(itemId);
         aNode = yield PlacesUIUtils.promiseNodeLike(guid);
-      }
-      else {
+      } else {
         aNode = { itemId };
         yield PlacesUIUtils.completeNodeLikeObjectForItemId(aNode);
       }
     }
 
     // Performance: load the overlay the first time the panel is opened
     // (see bug 392443).
     if (this._overlayLoading)
@@ -315,32 +314,30 @@ var StarUI = {
   beginBatch() {
     if (this._batching)
       return;
     if (PlacesUIUtils.useAsyncTransactions) {
       this._batchBlockingDeferred = PromiseUtils.defer();
       PlacesTransactions.batch(function* () {
         yield this._batchBlockingDeferred.promise;
       }.bind(this));
-    }
-    else {
+    } else {
       PlacesUtils.transactionManager.beginBatch(null);
     }
     this._batching = true;
   },
 
   endBatch() {
     if (!this._batching)
       return;
 
     if (PlacesUIUtils.useAsyncTransactions) {
       this._batchBlockingDeferred.resolve();
       this._batchBlockingDeferred = null;
-    }
-    else {
+    } else {
       PlacesUtils.transactionManager.endBatch(false);
     }
     this._batching = false;
   }
 };
 
 var PlacesCommandHook = {
   /**
@@ -372,18 +369,17 @@ var PlacesCommandHook = {
       let docInfo = yield this._getPageDetails(aBrowser);
 
       try {
         title = docInfo.isErrorPage ? PlacesUtils.history.getPageTitle(uri)
                                     : aBrowser.contentTitle;
         title = title || uri.spec;
         description = docInfo.description;
         charset = aBrowser.characterSet;
-      }
-      catch (e) { }
+      } catch (e) { }
 
       if (aShowEditUI && isNewBookmark) {
         // If we bookmark the page here but open right into a cancelable
         // state (i.e. new bookmark in Library), start batching here so
         // all of the actions can be undone in a single undo step.
         StarUI.beginBatch();
       }
 
@@ -445,18 +441,17 @@ var PlacesCommandHook = {
 
       try {
         info.title = docInfo.isErrorPage ?
           (yield PlacesUtils.promisePlaceInfo(aBrowser.currentURI)).title :
           aBrowser.contentTitle;
         info.title = info.title || url.href;
         description = docInfo.description;
         charset = aBrowser.characterSet;
-      }
-      catch (e) {
+      } catch (e) {
         Components.utils.reportError(e);
       }
 
       if (aShowEditUI && isNewBookmark) {
         // If we bookmark the page here but open right into a cancelable
         // state (i.e. new bookmark in Library), start batching here so
         // all of the actions can be undone in a single undo step.
         StarUI.beginBatch();
@@ -653,18 +648,17 @@ var PlacesCommandHook = {
    */
   showPlacesOrganizer: function PCH_showPlacesOrganizer(aLeftPaneRoot) {
     var organizer = Services.wm.getMostRecentWindow("Places:Organizer");
     // Due to bug 528706, getMostRecentWindow can return closed windows.
     if (!organizer || organizer.closed) {
       // No currently open places window, so open one with the specified mode.
       openDialog("chrome://browser/content/places/places.xul",
                  "", "chrome,toolbar=yes,dialog=no,resizable", aLeftPaneRoot);
-    }
-    else {
+    } else {
       organizer.PlacesOrganizer.selectLeftPaneContainerByHierarchy(aLeftPaneRoot);
       organizer.focus();
     }
   }
 };
 
 XPCOMUtils.defineLazyModuleGetter(this, "RecentlyClosedTabsAndWindowsMenuUtils",
   "resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm");
@@ -841,18 +835,17 @@ var BookmarksEventHandler = {
     }
 
     if (target._placesNode && PlacesUtils.nodeIsContainer(target._placesNode)) {
       // Don't open the root folder in tabs when the empty area on the toolbar
       // is middle-clicked or when a non-bookmark item except for Open in Tabs)
       // in a bookmarks menupopup is middle-clicked.
       if (target.localName == "menu" || target.localName == "toolbarbutton")
         PlacesUIUtils.openContainerNodeInTabs(target._placesNode, aEvent, aView);
-    }
-    else if (aEvent.button == 1) {
+    } else if (aEvent.button == 1) {
       // left-clicks with modifier are already served by onCommand
       this.onCommand(aEvent, aView);
     }
   },
 
   /**
    * Handler for command event for an item in the bookmarks toolbar.
    * Menus and submenus from the folder buttons bubble up to this handler.
@@ -876,18 +869,17 @@ var BookmarksEventHandler = {
     if (aDocument.tooltipNode.localName == "treechildren") {
       var tree = aDocument.tooltipNode.parentNode;
       var tbo = tree.treeBoxObject;
       var cell = tbo.getCellAt(aEvent.clientX, aEvent.clientY);
       if (cell.row == -1)
         return false;
       node = tree.view.nodeForTreeIndex(cell.row);
       cropped = tbo.isCellCropped(cell.row, cell.col);
-    }
-    else {
+    } else {
       // Check whether the tooltipNode is a Places node.
       // In such a case use it, otherwise check for targetURI attribute.
       var tooltipNode = aDocument.tooltipNode;
       if (tooltipNode._placesNode)
         node = tooltipNode._placesNode;
       else {
         // This is a static non-Places node.
         targetURI = tooltipNode.getAttribute("targetURI");
@@ -1255,25 +1247,23 @@ var BookmarkingUI = {
       return this.STATUS_UNSTARRED;
     }
     if (this._pendingStmt)
       return this.STATUS_UPDATING;
     return this.button.hasAttribute("starred") ? this.STATUS_STARRED
                                                : this.STATUS_UNSTARRED;
   },
 
-  get _starredTooltip()
-  {
+  get _starredTooltip() {
     delete this._starredTooltip;
     return this._starredTooltip =
       this._getFormattedTooltip("starButtonOn.tooltip2");
   },
 
-  get _unstarredTooltip()
-  {
+  get _unstarredTooltip() {
     delete this._unstarredTooltip;
     return this._unstarredTooltip =
       this._getFormattedTooltip("starButtonOff.tooltip2");
   },
 
   _getFormattedTooltip(strId) {
     let args = [];
     let shortcut = document.getElementById(this.BOOKMARK_BUTTON_SHORTCUT);
@@ -1657,18 +1647,17 @@ var BookmarkingUI = {
     }
 
     if (this._itemIds.length > 0) {
       this.broadcaster.setAttribute("starred", "true");
       this.broadcaster.setAttribute("buttontooltiptext", this._starredTooltip);
       if (this.button.getAttribute("overflowedItem") == "true") {
         this.button.setAttribute("label", this._starButtonOverflowedStarredLabel);
       }
-    }
-    else {
+    } else {
       this.broadcaster.removeAttribute("starred");
       this.broadcaster.setAttribute("buttontooltiptext", this._unstarredTooltip);
       if (this.button.getAttribute("overflowedItem") == "true") {
         this.button.setAttribute("label", this._starButtonOverflowedLabel);
       }
     }
   },
 
@@ -1717,17 +1706,17 @@ var BookmarkingUI = {
       let isRTL = getComputedStyle(this.button).direction == "rtl";
       let buttonRect = this.button.getBoundingClientRect();
       let notifierRect = this.notifier.getBoundingClientRect();
       let dropmarkerRect = dropmarkerIcon.getBoundingClientRect();
       let dropmarkerNotifierRect = this.dropmarkerNotifier.getBoundingClientRect();
 
       // Compute, but do not set, transform for star icon
       let [translateX, translateY] = getCenteringTransformForRects(notifierRect, buttonRect);
-      let starIconTransform = "translate(" +  translateX + ", " + translateY + ")";
+      let starIconTransform = "translate(" + translateX + ", " + translateY + ")";
       if (isRTL) {
         starIconTransform += " scaleX(-1)";
       }
 
       // Compute, but do not set, transform for dropmarker
       [translateX, translateY] = getCenteringTransformForRects(dropmarkerNotifierRect, dropmarkerRect);
       let dropmarkerTransform = "translate(" + translateX + ", " + translateY + ")";
 
@@ -1885,19 +1874,18 @@ var BookmarkingUI = {
       // If the changed bookmark was tracked, check if it is now pointing to
       // a different uri and unregister it.
       if (index != -1 && aNewValue != this._uri.spec) {
         this._itemIds.splice(index, 1);
         // Only need to update the UI if the page is no longer starred
         if (this._itemIds.length == 0) {
           this._updateStar();
         }
-      }
-      // If another bookmark is now pointing to the tracked uri, register it.
-      else if (index == -1 && aNewValue == this._uri.spec) {
+      } else if (index == -1 && aNewValue == this._uri.spec) {
+        // If another bookmark is now pointing to the tracked uri, register it.
         this._itemIds.push(aItemId);
         // Only need to update the UI if it wasn't marked as starred before:
         if (this._itemIds.length == 1) {
           this._updateStar();
         }
       }
     }
   },
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -121,18 +121,17 @@ var gPluginHandler = {
         .add(!this.options.primaryPlugin);
       // Histograms always start at 0, even though our data starts at 1
       let histogramCount = this.options.pluginData.size - 1;
       if (histogramCount > 4) {
         histogramCount = 4;
       }
       Services.telemetry.getHistogramById("PLUGINS_NOTIFICATION_PLUGIN_COUNT")
         .add(histogramCount);
-    }
-    else if (event == "dismissed") {
+    } else if (event == "dismissed") {
       // Once the popup is dismissed, clicking the icon should show the full
       // list again
       this.options.primaryPlugin = null;
     }
   },
 
   /**
    * Called from the plugin doorhanger to set the new permissions for a plugin
@@ -246,18 +245,17 @@ var gPluginHandler = {
       // If a block contains an infoURL, we should always prefer that to the default
       // URL that we construct in-product, even for other blocklist types.
       let url = Services.blocklist.getPluginInfoURL(pluginInfo.pluginTag);
 
       if (pluginInfo.blocklistState != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) {
         if (!url) {
           url = Services.blocklist.getPluginBlocklistURL(pluginInfo.pluginTag);
         }
-      }
-      else {
+      } else {
         url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "clicktoplay";
       }
       pluginInfo.detailsLink = url;
 
       pluginData.set(pluginInfo.permissionString, pluginInfo);
     }
 
     let primaryPluginPermission = null;
--- a/browser/base/content/browser-syncui.js
+++ b/browser/base/content/browser-syncui.js
@@ -394,18 +394,17 @@ var gSyncUI = {
     } else if (loginFailed) {
       // "need to reconnect/re-enter your password"
       tooltiptext = gFxAccounts.strings.formatStringFromName("reconnectDescription", [email], 1);
     } else {
       // Sync appears configured - format the "last synced at" time.
       try {
         let lastSync = new Date(Services.prefs.getCharPref("services.sync.lastSync"));
         tooltiptext = this.formatLastSyncDate(lastSync);
-      }
-      catch (e) {
+      } catch (e) {
         // pref doesn't exist (which will be the case until we've seen the
         // first successful sync) or is invalid (which should be impossible!)
         // Just leave tooltiptext as the empty string in these cases, which
         // will cause the tooltip to be removed below.
       }
     }
 
     // We've done all our promise-y work and ready to update the UI - make
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -403,18 +403,17 @@ const gClickAndHoldListenersOnElement = 
     this._timers.delete(aElm);
 
     aElm.addEventListener("mousedown", this, true);
     aElm.addEventListener("click", this, true);
   }
 };
 
 const gSessionHistoryObserver = {
-  observe(subject, topic, data)
-  {
+  observe(subject, topic, data) {
     if (topic != "browser:purge-session-history")
       return;
 
     var backCommand = document.getElementById("Browser:Back");
     backCommand.setAttribute("disabled", "true");
     var fwdCommand = document.getElementById("Browser:Forward");
     fwdCommand.setAttribute("disabled", "true");
 
@@ -454,29 +453,27 @@ function findChildShell(aDocument, aDocS
       return docShell;
   }
   return null;
 }
 
 var gPopupBlockerObserver = {
   _reportButton: null,
 
-  onReportButtonMousedown(aEvent)
-  {
+  onReportButtonMousedown(aEvent) {
     // If this method is called on the same event tick as the popup gets
     // hidden, do nothing to avoid re-opening the popup.
     if (aEvent.button != 0 || aEvent.target != this._reportButton || this.isPopupHidingTick)
       return;
 
     document.getElementById("blockedPopupOptions")
             .openPopup(this._reportButton, "after_end", 0, 2, false, false, aEvent);
   },
 
-  handleEvent(aEvent)
-  {
+  handleEvent(aEvent) {
     if (aEvent.originalTarget != gBrowser.selectedBrowser)
       return;
 
     if (!this._reportButton)
       this._reportButton = document.getElementById("page-report-button");
 
     if (!gBrowser.selectedBrowser.blockedPopups ||
         gBrowser.selectedBrowser.blockedPopups.count == 0) {
@@ -514,18 +511,17 @@ var gPopupBlockerObserver = {
         var message = PluralForm.get(popupCount, messageBase)
                                 .replace("#1", brandShortName)
                                 .replace("#2", popupCount);
 
         let notificationBox = gBrowser.getNotificationBox();
         let notification = notificationBox.getNotificationWithValue("popup-blocked");
         if (notification) {
           notification.label = message;
-        }
-        else {
+        } else {
           var buttons = [{
             label: popupButtonText,
             accessKey: popupButtonAccesskey,
             popup: "blockedPopupOptions",
             callback: null
           }];
 
           const priority = notificationBox.PRIORITY_WARNING_MEDIUM;
@@ -536,31 +532,29 @@ var gPopupBlockerObserver = {
       }
 
       // Record the fact that we've reported this blocked popup, so we don't
       // show it again.
       gBrowser.selectedBrowser.blockedPopups.reported = true;
     }
   },
 
-  toggleAllowPopupsForSite(aEvent)
-  {
+  toggleAllowPopupsForSite(aEvent) {
     var pm = Services.perms;
     var shouldBlock = aEvent.target.getAttribute("block") == "true";
     var perm = shouldBlock ? pm.DENY_ACTION : pm.ALLOW_ACTION;
     pm.addFromPrincipal(gBrowser.contentPrincipal, "popup", perm);
 
     if (!shouldBlock)
       this.showAllBlockedPopups(gBrowser.selectedBrowser);
 
     gBrowser.getNotificationBox().removeCurrentNotification();
   },
 
-  fillPopupList(aEvent)
-  {
+  fillPopupList(aEvent) {
     // XXXben - rather than using |currentURI| here, which breaks down on multi-framed sites
     //          we should really walk the blockedPopups and create a list of "allow for <host>"
     //          menuitems for the common subset of hosts present in the report, this will
     //          make us frame-safe.
     //
     // XXXjst - Note that when this is fixed to work with multi-framed sites,
     //          also back out the fix for bug 343772 where
     //          nsGlobalWindow::CheckOpenAllow() was changed to also
@@ -573,25 +567,23 @@ var gPopupBlockerObserver = {
       let uriHost = uri.asciiHost ? uri.host : uri.spec;
       var pm = Services.perms;
       if (pm.testPermission(uri, "popup") == pm.ALLOW_ACTION) {
         // Offer an item to block popups for this site, if a whitelist entry exists
         // already for it.
         let blockString = gNavigatorBundle.getFormattedString("popupBlock", [uriHost]);
         blockedPopupAllowSite.setAttribute("label", blockString);
         blockedPopupAllowSite.setAttribute("block", "true");
-      }
-      else {
+      } else {
         // Offer an item to allow popups for this site
         let allowString = gNavigatorBundle.getFormattedString("popupAllow", [uriHost]);
         blockedPopupAllowSite.setAttribute("label", allowString);
         blockedPopupAllowSite.removeAttribute("block");
       }
-    }
-    catch (e) {
+    } catch (e) {
       blockedPopupAllowSite.setAttribute("hidden", "true");
     }
 
     if (PrivateBrowsingUtils.isWindowPrivate(window))
       blockedPopupAllowSite.setAttribute("disabled", "true");
     else
       blockedPopupAllowSite.removeAttribute("disabled");
 
@@ -667,89 +659,83 @@ var gPopupBlockerObserver = {
     let item = aEvent.target.lastChild;
     while (item && item.getAttribute("observes") != "blockedPopupsSeparator") {
       let next = item.previousSibling;
       item.parentNode.removeChild(item);
       item = next;
     }
   },
 
-  showBlockedPopup(aEvent)
-  {
+  showBlockedPopup(aEvent) {
     var target = aEvent.target;
     var popupReportIndex = target.getAttribute("popupReportIndex");
     let browser = target.popupReportBrowser;
     browser.unblockPopup(popupReportIndex);
   },
 
-  showAllBlockedPopups(aBrowser)
-  {
+  showAllBlockedPopups(aBrowser) {
     aBrowser.retrieveListOfBlockedPopups().then(popups => {
       for (let i = 0; i < popups.length; i++) {
         if (popups[i].popupWindowURIspec)
           aBrowser.unblockPopup(i);
       }
     }, null);
   },
 
-  editPopupSettings()
-  {
+  editPopupSettings() {
     let prefillValue = "";
     try {
       // We use contentPrincipal rather than currentURI to get the right
       // value in case this is a data: URI that's inherited off something else.
       // Some principals don't have URIs, so fall back in case URI is not present.
       let principalURI = gBrowser.contentPrincipal.URI || gBrowser.currentURI;
       if (principalURI) {
         // asciiHost conveniently doesn't throw.
         if (principalURI.asciiHost) {
           prefillValue = principalURI.prePath;
         } else {
           // For host-less URIs like file://, prePath would effectively allow
           // popups everywhere on file://. Use the full spec:
           prefillValue = principalURI.spec;
         }
       }
-    }
-    catch (e) { }
+    } catch (e) { }
 
     var bundlePreferences = document.getElementById("bundle_preferences");
     var params = { blockVisible   : false,
                    sessionVisible : false,
                    allowVisible   : true,
                    prefilledHost  : prefillValue,
                    permissionType : "popup",
                    windowTitle    : bundlePreferences.getString("popuppermissionstitle"),
                    introText      : bundlePreferences.getString("popuppermissionstext") };
     var existingWindow = Services.wm.getMostRecentWindow("Browser:Permissions");
     if (existingWindow) {
       existingWindow.initWithParams(params);
       existingWindow.focus();
-    }
-    else
+    } else
       window.openDialog("chrome://browser/content/preferences/permissions.xul",
                         "_blank", "resizable,dialog=no,centerscreen", params);
   },
 
-  dontShowMessage()
-  {
+  dontShowMessage() {
     var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
     gPrefService.setBoolPref("privacy.popups.showBrowserMessage", !showMessage);
     gBrowser.getNotificationBox().removeCurrentNotification();
   }
 };
 
 function gKeywordURIFixup({ target: browser, data: fixupInfo }) {
   let deserializeURI = (spec) => spec ? makeURI(spec) : null;
 
   // We get called irrespective of whether we did a keyword search, or
   // whether the original input would be vaguely interpretable as a URL,
   // so figure that out first.
   let alternativeURI = deserializeURI(fixupInfo.fixedURI);
-  if (!fixupInfo.keywordProviderName  || !alternativeURI || !alternativeURI.host) {
+  if (!fixupInfo.keywordProviderName || !alternativeURI || !alternativeURI.host) {
     return;
   }
 
   // At this point we're still only just about to load this URI.
   // When the async DNS lookup comes back, we may be in any of these states:
   // 1) still on the previous URI, waiting for the preferredURI (keyword
   //    search) to respond;
   // 2) at the keyword search URI (preferredURI)
@@ -1156,18 +1142,17 @@ var gBrowserInit = {
           specs.push(urisstring.data);
         }
 
         // This function throws for certain malformed URIs, so use exception handling
         // so that we don't disrupt startup
         try {
           gBrowser.loadTabs(specs, false, true);
         } catch (e) {}
-      }
-      else if (uriToLoad instanceof XULElement) {
+      } else if (uriToLoad instanceof XULElement) {
         // swap the given tab with the default about:blank tab and then close
         // the original tab in the other window.
         let tabToOpen = uriToLoad;
 
         // If this tab was passed as a window argument, clear the
         // reference to it from the arguments array.
         if (window.arguments[0] == tabToOpen) {
           window.arguments[0] = null;
@@ -1190,24 +1175,23 @@ var gBrowserInit = {
           // we are swapping in.
           gBrowser.updateBrowserRemoteness(gBrowser.selectedBrowser,
                                            tabToOpen.linkedBrowser.isRemoteBrowser,
                                            { remoteType: tabToOpen.linkedBrowser.remoteType });
           gBrowser.swapBrowsersAndCloseOther(gBrowser.selectedTab, tabToOpen);
         } catch (e) {
           Cu.reportError(e);
         }
-      }
-      // window.arguments[2]: referrer (nsIURI | string)
-      //                 [3]: postData (nsIInputStream)
-      //                 [4]: allowThirdPartyFixup (bool)
-      //                 [5]: referrerPolicy (int)
-      //                 [6]: userContextId (int)
-      //                 [7]: originPrincipal (nsIPrincipal)
-      else if (window.arguments.length >= 3) {
+      } else if (window.arguments.length >= 3) {
+        // window.arguments[2]: referrer (nsIURI | string)
+        //                 [3]: postData (nsIInputStream)
+        //                 [4]: allowThirdPartyFixup (bool)
+        //                 [5]: referrerPolicy (int)
+        //                 [6]: userContextId (int)
+        //                 [7]: originPrincipal (nsIPrincipal)
         let referrerURI = window.arguments[2];
         if (typeof(referrerURI) == "string") {
           try {
             referrerURI = makeURI(referrerURI);
           } catch (e) {
             referrerURI = null;
           }
         }
@@ -1216,20 +1200,19 @@ var gBrowserInit = {
         let userContextId = (window.arguments[6] != undefined ?
             window.arguments[6] : Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID);
         loadURI(uriToLoad, referrerURI, window.arguments[3] || null,
                 window.arguments[4] || false, referrerPolicy, userContextId,
                 // pass the origin principal (if any) and force its use to create
                 // an initial about:blank viewer if present:
                 window.arguments[7], !!window.arguments[7]);
         window.focus();
-      }
-      // Note: loadOneOrMoreURIs *must not* be called if window.arguments.length >= 3.
-      // Such callers expect that window.arguments[0] is handled as a single URI.
-      else {
+      } else {
+        // Note: loadOneOrMoreURIs *must not* be called if window.arguments.length >= 3.
+        // Such callers expect that window.arguments[0] is handled as a single URI.
         loadOneOrMoreURIs(uriToLoad);
       }
     }
 
     // Bug 778855 - Perf regression if we do this here. To be addressed in bug 779008.
     setTimeout(function() { SafeBrowsing.init(); }, 2000);
 
     Services.obs.addObserver(gIdentityHandler, "perm-changed", false);
@@ -1646,18 +1629,17 @@ if (AppConstants.platform == "macosx") {
                          .createInstance(Ci.nsIStandaloneNativeMenu);
 
         try {
           nativeMenu.init(dockMenuElement);
 
           let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"]
                             .getService(Ci.nsIMacDockSupport);
           dockSupport.dockMenu = nativeMenu;
-        }
-        catch (e) {
+        } catch (e) {
         }
       }
     }
 
     if (PrivateBrowsingUtils.permanentPrivateBrowsing) {
       document.getElementById("macDockMenuNewWindow").hidden = true;
     }
 
@@ -1771,18 +1753,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));
@@ -1790,54 +1771,48 @@ function gotoHistoryIndex(aEvent) {
 }
 
 function BrowserForward(aEvent) {
   let where = whereToOpenLink(aEvent, false, true);
 
   if (where == "current") {
     try {
       gBrowser.goForward();
-    }
-    catch (ex) {
-    }
-  }
-  else {
+    } 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) {
-    }
-  }
-  else {
+    } catch (ex) {
+    }
+  } else {
     duplicateTabIn(gBrowser.selectedTab, where, -1);
   }
 }
 
-function BrowserHandleBackspace()
-{
+function BrowserHandleBackspace() {
   switch (gPrefService.getIntPref("browser.backspace_action")) {
   case 0:
     BrowserBack();
     break;
   case 1:
     goDoCommand("cmd_scrollPageUp");
     break;
   }
 }
 
-function BrowserHandleShiftBackspace()
-{
+function BrowserHandleShiftBackspace() {
   switch (gPrefService.getIntPref("browser.backspace_action")) {
   case 0:
     BrowserForward();
     break;
   case 1:
     goDoCommand("cmd_scrollPageDown");
     break;
   }
@@ -1909,31 +1884,28 @@ function BrowserGoHome(aEvent) {
     gBrowser.loadTabs(urls, loadInBackground);
     break;
   case "window":
     OpenBrowserWindow();
     break;
   }
 }
 
-function loadOneOrMoreURIs(aURIString)
-{
+function loadOneOrMoreURIs(aURIString) {
   // we're not a browser window, pass the URI string to a new browser window
-  if (window.location.href != getBrowserURL())
-  {
+  if (window.location.href != getBrowserURL()) {
     window.openDialog(getBrowserURL(), "_blank", "all,dialog=no", aURIString);
     return;
   }
 
   // This function throws for certain malformed URIs, so use exception handling
   // so that we don't disrupt startup
   try {
     gBrowser.loadTabs(aURIString.split("|"), false, true);
-  }
-  catch (e) {
+  } catch (e) {
   }
 }
 
 function focusAndSelectUrlBar() {
   // In customize mode, the url bar is disabled. If a new tab is opened or the
   // user switches to a different tab, this function gets called before we've
   // finished leaving customize mode, and the url bar will still be disabled.
   // We can't focus it when it's disabled, so we need to re-run ourselves when
@@ -1963,18 +1935,17 @@ function openLocation() {
     return;
 
   if (window.location.href != getBrowserURL()) {
     var win = getTopWin();
     if (win) {
       // If there's an open browser window, it should handle this command
       win.focus()
       win.openLocation();
-    }
-    else {
+    } else {
       // If there are no open browser windows, open a new one
       window.openDialog("chrome://browser/content/", "_blank",
                         "chrome,all,dialog=no", BROWSER_NEW_TAB_URL);
     }
   }
 }
 
 function BrowserOpenTab(event) {
@@ -1999,30 +1970,28 @@ function BrowserOpenTab(event) {
 
   openUILinkIn(BROWSER_NEW_TAB_URL, where, { relatedToCurrent });
 }
 
 /* Called from the openLocation dialog. This allows that dialog to instruct
    its opener to open a new window and then step completely out of the way.
    Anything less byzantine is causing horrible crashes, rather believably,
    though oddly only on Linux. */
-function delayedOpenWindow(chrome, flags, href, postData)
-{
+function delayedOpenWindow(chrome, flags, href, postData) {
   // The other way to use setTimeout,
   // setTimeout(openDialog, 10, chrome, "_blank", flags, url),
   // doesn't work here.  The extra "magic" extra argument setTimeout adds to
   // the callback function would confuse gBrowserInit.onLoad() by making
   // window.arguments[1] be an integer instead of null.
   setTimeout(function() { openDialog(chrome, "_blank", flags, href, null, null, postData); }, 10);
 }
 
 /* Required because the tab needs time to set up its content viewers and get the load of
    the URI kicked off before becoming the active content area. */
-function delayedOpenTab(aUrl, aReferrer, aCharset, aPostData, aAllowThirdPartyFixup)
-{
+function delayedOpenTab(aUrl, aReferrer, aCharset, aPostData, aAllowThirdPartyFixup) {
   gBrowser.loadOneTab(aUrl, {
                       referrerURI: aReferrer,
                       charset: aCharset,
                       postData: aPostData,
                       inBackground: false,
                       allowThirdPartyFixup: aAllowThirdPartyFixup});
 }
 
@@ -2030,18 +1999,17 @@ var gLastOpenDirectory = {
   _lastDir: null,
   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) {
@@ -2054,18 +2022,17 @@ var gLastOpenDirectory = {
       gPrefService.setComplexValue("browser.open.lastDir", Ci.nsILocalFile,
                                    this._lastDir);
   },
   reset() {
     this._lastDir = null;
   }
 };
 
-function BrowserOpenFileWindow()
-{
+function BrowserOpenFileWindow() {
   // Get filepicker component.
   try {
     const nsIFilePicker = Ci.nsIFilePicker;
     let fp = Cc["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
     let fpCallback = function fpCallback_done(aResult) {
       if (aResult == nsIFilePicker.returnOK) {
         try {
           if (fp.file) {
@@ -2095,18 +2062,17 @@ function BrowserCloseTabOrWindow() {
     closeWindow(true);
     return;
   }
 
   // If the current tab is the last one, this will close the window.
   gBrowser.removeCurrentTab({animate: true});
 }
 
-function BrowserTryToCloseWindow()
-{
+function BrowserTryToCloseWindow() {
   if (WindowIsClosing())
     window.close();     // WindowIsClosing does all the necessary checks
 }
 
 function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
                  userContextId, originPrincipal, forceAboutBlankViewerInCurrent) {
   try {
     openLinkIn(uri, "current",
@@ -2210,18 +2176,17 @@ function getPostDataStream(aPostDataStri
 }
 
 function getLoadContext() {
   return window.QueryInterface(Ci.nsIInterfaceRequestor)
                .getInterface(Ci.nsIWebNavigation)
                .QueryInterface(Ci.nsILoadContext);
 }
 
-function readFromClipboard()
-{
+function readFromClipboard() {
   var url;
 
   try {
     // Create transferable that will transfer the text.
     var trans = Components.classes["@mozilla.org/widget/transferable;1"]
                           .createInstance(Components.interfaces.nsITransferable);
     trans.init(getLoadContext());
 
@@ -2502,18 +2467,17 @@ function losslessDecodeURI(aURI) {
   // except ZWNJ (U+200C) and ZWJ (U+200D) (bug 582186).
   // This includes all bidirectional formatting characters.
   // (RFC 3987 sections 3.2 and 4.1 paragraph 6)
   value = value.replace(/[\u00ad\u034f\u061c\u115f-\u1160\u17b4-\u17b5\u180b-\u180d\u200b\u200e-\u200f\u202a-\u202e\u2060-\u206f\u3164\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufff8]|\ud834[\udd73-\udd7a]|[\udb40-\udb43][\udc00-\udfff]/g,
                         encodeURIComponent);
   return value;
 }
 
-function UpdateUrlbarSearchSplitterState()
-{
+function UpdateUrlbarSearchSplitterState() {
   var splitter = document.getElementById("urlbar-search-splitter");
   var urlbar = document.getElementById("urlbar-container");
   var searchbar = document.getElementById("search-container");
 
   if (document.documentElement.getAttribute("customizing") == "true") {
     if (splitter) {
       splitter.remove();
     }
@@ -2545,18 +2509,17 @@ function UpdateUrlbarSearchSplitterState
       splitter.setAttribute("overflows", "false");
       splitter.className = "chromeclass-toolbar-additional";
     }
     urlbar.parentNode.insertBefore(splitter, ibefore);
   } else if (splitter)
     splitter.parentNode.removeChild(splitter);
 }
 
-function UpdatePageProxyState()
-{
+function UpdatePageProxyState() {
   if (gURLBar && gURLBar.value != gLastValidURLStr)
     SetPageProxyState("invalid");
 }
 
 /**
  * Updates the user interface to indicate whether the URI in the location bar is
  * different than the loaded page, because it's being edited or because a search
  * result is currently selected and is displayed in the location bar.
@@ -2570,18 +2533,17 @@ function UpdatePageProxyState()
  *        An object with the following properties:
  *        {
  *          isForLocationChange:
  *            Set to true to indicate that the function was invoked to respond
  *            to a location change event. This is useful to avoid calling
  *            PopupNotifications.jsm multiple times.
  *        }
  */
-function SetPageProxyState(aState, aOptions = {})
-{
+function SetPageProxyState(aState, aOptions = {}) {
   if (!gURLBar)
     return;
 
   gURLBar.setAttribute("pageproxystate", aState);
 
   // the page proxy state is set to valid via OnLocationChange, which
   // gets called when we switch tabs.
   if (aState == "valid") {
@@ -2596,18 +2558,17 @@ function SetPageProxyState(aState, aOpti
   // longer exists). If this is the result of a locations change, then we will
   // already invoke PopupNotifications.locationChange separately.
   if (!Object.getOwnPropertyDescriptor(window, "PopupNotifications").get &&
       !aOptions.isForLocationChange) {
     PopupNotifications.anchorVisibilityChange();
   }
 }
 
-function PageProxyClickHandler(aEvent)
-{
+function PageProxyClickHandler(aEvent) {
   if (aEvent.button == 1 && gPrefService.getBoolPref("middlemouse.paste"))
     middleMousePaste(aEvent);
 }
 
 var gMenuButtonBadgeManager = {
   BADGEID_APPUPDATE: "update",
   BADGEID_DOWNLOAD: "download",
   BADGEID_FXA: "fxa",
@@ -3218,18 +3179,17 @@ function getDefaultHomePage() {
     if (url.includes("|"))
       url = url.split("|")[0];
   } catch (e) {
     Components.utils.reportError("Couldn't get homepage pref: " + e);
   }
   return url;
 }
 
-function BrowserFullScreen()
-{
+function BrowserFullScreen() {
   window.fullScreen = !window.fullScreen;
 }
 
 function mirrorShow(popup) {
   let services = [];
   if (Services.prefs.getBoolPref("browser.casting.enabled")) {
     services = CastingApps.getServicesForMirroring();
   }
@@ -3252,18 +3212,17 @@ function populateMirrorTabMenu(popup) {
     let item = doc.createElement("menuitem");
     item.setAttribute("label", service.friendlyName);
     item._service = service;
     item.addEventListener("command", mirrorMenuItemClicked);
     popup.appendChild(item);
   });
 }
 
-function getWebNavigation()
-{
+function getWebNavigation() {
   return gBrowser.webNavigation;
 }
 
 function BrowserReloadWithFlags(reloadFlags) {
   let url = gBrowser.currentURI.spec;
   if (gBrowser.updateBrowserRemotenessByURL(gBrowser.selectedBrowser, url)) {
     // If the remoteness has changed, the new browser doesn't have any
     // information of what was loaded before, so we need to load the previous
@@ -3342,29 +3301,27 @@ function getDetailedCertErrorInfo(locati
                       gNavigatorBundle.getString("certErrorDetailsCertChain.label") +
                       "\r\n\r\n" + certChain;
 
   return certErrorDetails;
 }
 
 // TODO: can we pull getDERString and getPEMString in from pippki.js instead of
 // duplicating them here?
-function getDERString(cert)
-{
+function getDERString(cert) {
   var length = {};
   var derArray = cert.getRawDER(length);
   var derString = '';
   for (var i = 0; i < derArray.length; i++) {
     derString += String.fromCharCode(derArray[i]);
   }
   return derString;
 }
 
-function getPEMString(cert)
-{
+function getPEMString(cert) {
   var derb64 = btoa(getDERString(cert));
   // Wrap the Base64 string into lines of 64 characters,
   // with CRLF line breaks (as specified in RFC 1421).
   var wrapped = derb64.replace(/(\S{64}(?!$))/g, "$1\r\n");
   return "-----BEGIN CERTIFICATE-----\r\n"
          + wrapped
          + "\r\n-----END CERTIFICATE-----\r\n";
 }
@@ -3480,67 +3437,60 @@ var PrintPreviewListener = {
       SidebarUI.show(this._sidebarCommand);
   },
 
   activateBrowser(browser) {
     gBrowser.activateBrowserForPrintPreview(browser);
   },
 }
 
-function getMarkupDocumentViewer()
-{
+function getMarkupDocumentViewer() {
   return gBrowser.markupDocumentViewer;
 }
 
 // This function is obsolete. Newer code should use <tooltip page="true"/> instead.
-function FillInHTMLTooltip(tipElement)
-{
+function FillInHTMLTooltip(tipElement) {
   document.getElementById("aHTMLTooltip").fillInPageTooltip(tipElement);
 }
 
 var browserDragAndDrop = {
   canDropLink: aEvent => Services.droppedLinkHandler.canDropLink(aEvent, true),
 
-  dragOver(aEvent)
-  {
+  dragOver(aEvent) {
     if (this.canDropLink(aEvent)) {
       aEvent.preventDefault();
     }
   },
 
   dropLinks(aEvent, aDisallowInherit) {
     return Services.droppedLinkHandler.dropLinks(aEvent, aDisallowInherit);
   }
 };
 
 var homeButtonObserver = {
-  onDrop(aEvent)
-    {
+  onDrop(aEvent) {
       // disallow setting home pages that inherit the principal
       let links = browserDragAndDrop.dropLinks(aEvent, true);
       if (links.length) {
         setTimeout(openHomeDialog, 0, links.map(link => link.url).join("|"));
       }
     },
 
-  onDragOver(aEvent)
-    {
+  onDragOver(aEvent) {
       if (gPrefService.prefIsLocked("browser.startup.homepage")) {
         return;
       }
       browserDragAndDrop.dragOver(aEvent);
       aEvent.dropEffect = "link";
     },
-  onDragExit(aEvent)
-    {
-    }
-}
-
-function openHomeDialog(aURL)
-{
+  onDragExit(aEvent) {
+    }
+}
+
+function openHomeDialog(aURL) {
   var promptTitle = gNavigatorBundle.getString("droponhometitle");
   var promptMsg;
   if (aURL.includes("|")) {
     promptMsg = gNavigatorBundle.getString("droponhomemsgMultiple");
   } else {
     promptMsg = gNavigatorBundle.getString("droponhomemsg");
   }
 
@@ -3941,18 +3891,17 @@ function FillHistoryMenu(aParent) {
   }
 
   const MAX_HISTORY_MENU_ITEMS = 15;
 
   const tooltipBack = gNavigatorBundle.getString("tabHistory.goBack");
   const tooltipCurrent = gNavigatorBundle.getString("tabHistory.current");
   const tooltipForward = gNavigatorBundle.getString("tabHistory.goForward");
 
-  function updateSessionHistory(sessionHistory, initial)
-  {
+  function updateSessionHistory(sessionHistory, initial) {
     let count = sessionHistory.entries.length;
 
     if (!initial) {
       if (count <= 1) {
         // if there is only one entry now, close the popup.
         aParent.hidePopup();
         return;
       } else if (aParent.id != "backForwardMenu" && !aParent.parentNode.open) {
@@ -4044,39 +3993,36 @@ function FillHistoryMenu(aParent) {
 function addToUrlbarHistory(aUrlToAdd) {
   if (!PrivateBrowsingUtils.isWindowPrivate(window) &&
       aUrlToAdd &&
       !aUrlToAdd.includes(" ") &&
       !/[\x00-\x1F]/.test(aUrlToAdd))
     PlacesUIUtils.markPageAsTyped(aUrlToAdd);
 }
 
-function BrowserDownloadsUI()
-{
+function BrowserDownloadsUI() {
   if (PrivateBrowsingUtils.isWindowPrivate(window)) {
     openUILinkIn("about:downloads", "tab");
   } else {
     PlacesCommandHook.showPlacesOrganizer("Downloads");
   }
 }
 
-function toOpenWindowByType(inType, uri, features)
-{
+function toOpenWindowByType(inType, uri, features) {
   var topWindow = Services.wm.getMostRecentWindow(inType);
 
   if (topWindow)
     topWindow.focus();
   else if (features)
     window.open(uri, "_blank", features);
   else
     window.open(uri, "_blank", "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar");
 }
 
-function OpenBrowserWindow(options)
-{
+function OpenBrowserWindow(options) {
   var telemetryObj = {};
   TelemetryStopwatch.start("FX_NEW_WINDOW_MS", telemetryObj);
 
   function newDocumentShown(doc, topic, data) {
     if (topic == "document-shown" &&
         doc != document &&
         doc.defaultView == win) {
       Services.obs.removeObserver(newDocumentShown, "document-shown");
@@ -4119,26 +4065,24 @@ function OpenBrowserWindow(options)
   } else if (options && options.remote === false) {
     extraFeatures += ",non-remote";
   }
 
   // if and only if the current window is a browser window and it has a document with a character
   // set, then extract the current charset menu setting from the current document and use it to
   // initialize the new browser window...
   var win;
-  if (window && (wintype == "navigator:browser") && window.content && window.content.document)
-  {
+  if (window && (wintype == "navigator:browser") && window.content && window.content.document) {
     var DocCharset = window.content.document.characterSet;
     charsetArg = "charset=" + DocCharset;
 
     // we should "inherit" the charset menu setting in a new window
     win = window.openDialog("chrome://browser/content/", "_blank", "chrome,all,dialog=no" + extraFeatures, defaultArgs, charsetArg);
-  }
-  else // forget about the charset information.
-  {
+  } else {
+    // forget about the charset information.
     win = window.openDialog("chrome://browser/content/", "_blank", "chrome,all,dialog=no" + extraFeatures, defaultArgs);
   }
 
   return win;
 }
 
 // Only here for backwards compat, we should remove this soon
 function BrowserCustomizeToolbar() {
@@ -4160,18 +4104,17 @@ function BrowserCustomizeToolbar() {
  * still work and just lazily disable them as needed when the user presses a
  * shortcut.
  *
  * This doesn't work on Mac, since Mac menus flash when users press their
  * keyboard shortcuts, so edit UI is essentially always visible on the Mac,
  * and we need to always update the edit commands.  Thus on Mac this function
  * is a no op.
  */
-function updateEditUIVisibility()
-{
+function updateEditUIVisibility() {
   if (AppConstants.platform == "macosx")
     return;
 
   let editMenuPopupState = document.getElementById("menu_EditPopup").state;
   let contextMenuPopupState = document.getElementById("contentAreaContextMenu").state;
   let placesContextMenuPopupState = document.getElementById("placesContext").state;
 
   // The UI is visible if the Edit menu is opening or open, if the context menu
@@ -4208,41 +4151,38 @@ function updateEditUIVisibility()
 /**
  * Opens a new tab with the userContextId specified as an attribute of
  * sourceEvent. This attribute is propagated to the top level originAttributes
  * living on the tab's docShell.
  *
  * @param event
  *        A click event on a userContext File Menu option
  */
-function openNewUserContextTab(event)
-{
+function openNewUserContextTab(event) {
   openUILinkIn(BROWSER_NEW_TAB_URL, "tab", {
     userContextId: parseInt(event.target.getAttribute('data-usercontextid')),
   });
 }
 
 /**
  * Updates File Menu User Context UI visibility depending on
  * privacy.userContext.enabled pref state.
  */
-function updateUserContextUIVisibility()
-{
+function updateUserContextUIVisibility() {
   let menu = document.getElementById("menu_newUserContext");
   menu.hidden = !Services.prefs.getBoolPref("privacy.userContext.enabled");
   if (PrivateBrowsingUtils.isWindowPrivate(window)) {
     menu.setAttribute("disabled", "true");
   }
 }
 
 /**
  * Updates the User Context UI indicators if the browser is in a non-default context
  */
-function updateUserContextUIIndicator()
-{
+function updateUserContextUIIndicator() {
   let hbox = document.getElementById("userContext-icons");
 
   let userContextId = gBrowser.selectedBrowser.getAttribute("usercontextid");
   if (!userContextId) {
     hbox.setAttribute("data-identity-color", "");
     hbox.hidden = true;
     return;
   }
@@ -4264,18 +4204,17 @@ function updateUserContextUIIndicator()
 
   hbox.hidden = false;
 }
 
 /**
  * Makes the Character Encoding menu enabled or disabled as appropriate.
  * To be called when the View menu or the app menu is opened.
  */
-function updateCharacterEncodingMenuState()
-{
+function updateCharacterEncodingMenuState() {
   let charsetMenu = document.getElementById("charsetMenu");
   // gBrowser is null on Mac when the menubar shows in the context of
   // non-browser windows. The above elements may be null depending on
   // what parts of the menubar are present. E.g. no app menu on Mac.
   if (gBrowser && gBrowser.selectedBrowser.mayEnableCharacterEncodingMenu) {
     if (charsetMenu) {
       charsetMenu.removeAttribute("disabled");
     }
@@ -4478,18 +4417,17 @@ var XULBrowserWindow = {
 
       if (!(aStateFlags & nsIWebProgressListener.STATE_RESTORING)) {
         this._busyUI = true;
 
         // XXX: This needs to be based on window activity...
         this.stopCommand.removeAttribute("disabled");
         CombinedStopReload.switchToStop();
       }
-    }
-    else if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
+    } else if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
       // This (thanks to the filter) is a network stop or the last
       // request stop outside of loading the document, stop throbbers
       // and progress bars and such
       if (aRequest) {
         let msg = "";
         let location;
         let canViewSource = true;
         // Get the URI either from a channel or a pseudo-object
@@ -4548,18 +4486,17 @@ var XULBrowserWindow = {
     FormValidationHandler.hidePopup();
 
     let pageTooltip = document.getElementById("aHTMLTooltip");
     let tooltipNode = pageTooltip.triggerNode;
     if (tooltipNode) {
       // Optimise for the common case
       if (aWebProgress.isTopLevel) {
         pageTooltip.hidePopup();
-      }
-      else {
+      } else {
         for (let tooltipWindow = tooltipNode.ownerGlobal;
              tooltipWindow != tooltipWindow.parent;
              tooltipWindow = tooltipWindow.parent) {
           if (tooltipWindow == aWebProgress.DOMWindow) {
             pageTooltip.hidePopup();
             break;
           }
         }
@@ -5363,48 +5300,44 @@ var gTabletModePageCounter = {
     if (this.enabled) {
       let histogram = Services.telemetry.getKeyedHistogramById("FX_TABLETMODE_PAGE_LOAD");
       histogram.add("tablet", this._tabletCount);
       histogram.add("desktop", this._desktopCount);
     }
   },
 };
 
-function displaySecurityInfo()
-{
+function displaySecurityInfo() {
   BrowserPageInfo(null, "securityTab");
 }
 
 
 var gHomeButton = {
   prefDomain: "browser.startup.homepage",
-  observe(aSubject, aTopic, aPrefName)
-  {
+  observe(aSubject, aTopic, aPrefName) {
     if (aTopic != "nsPref:changed" || aPrefName != this.prefDomain)
       return;
 
     this.updateTooltip();
   },
 
-  updateTooltip(homeButton)
-  {
+  updateTooltip(homeButton) {
     if (!homeButton)
       homeButton = document.getElementById("home-button");
     if (homeButton) {
       var homePage = this.getHomePage();
       homePage = homePage.replace(/\|/g, ', ');
       if (["about:home", "about:newtab"].includes(homePage.toLowerCase()))
         homeButton.setAttribute("tooltiptext", homeButton.getAttribute("aboutHomeOverrideTooltip"));
       else
         homeButton.setAttribute("tooltiptext", homePage);
     }
   },
 
-  getHomePage()
-  {
+  getHomePage() {
     var url;
     try {
       url = gPrefService.getComplexValue(this.prefDomain,
                                 Components.interfaces.nsIPrefLocalizedString).data;
     } catch (e) {
     }
 
     // use this if we can't find the pref
@@ -5516,20 +5449,18 @@ function asyncOpenWebPanel(event) {
  *
  * @param event
  *        The click event.
  * @return [href, linkNode].
  *
  * @note linkNode will be null if the click wasn't on an anchor
  *       element (or XLink).
  */
-function hrefAndLinkNodeForClickEvent(event)
-{
-  function isHTMLLink(aNode)
-  {
+function hrefAndLinkNodeForClickEvent(event) {
+  function isHTMLLink(aNode) {
     // Be consistent with what nsContextMenu.js does.
     return ((aNode instanceof HTMLAnchorElement && aNode.href) ||
             (aNode instanceof HTMLAreaElement && aNode.href) ||
             aNode instanceof HTMLLinkElement);
   }
 
   let node = event.target;
   while (node && !isHTMLLink(node)) {
@@ -5566,18 +5497,17 @@ function hrefAndLinkNodeForClickEvent(ev
  * Called whenever the user clicks in the content area.
  *
  * @param event
  *        The click event.
  * @param isPanelClick
  *        Whether the event comes from a web panel.
  * @note default event is prevented if the click is handled.
  */
-function contentAreaClick(event, isPanelClick)
-{
+function contentAreaClick(event, isPanelClick) {
   if (!event.isTrusted || event.defaultPrevented || event.button == 2)
     return;
 
   let [href, linkNode] = hrefAndLinkNodeForClickEvent(event);
   if (!href) {
     // Not a link, handle middle mouse navigation.
     if (event.button == 1 &&
         gPrefService.getBoolPref("middlemouse.contentLoadURL") &&
@@ -5591,28 +5521,27 @@ function contentAreaClick(event, isPanel
   // This code only applies if we have a linkNode (i.e. clicks on real anchor
   // elements, as opposed to XLink).
   if (linkNode && event.button == 0 &&
       !event.ctrlKey && !event.shiftKey && !event.altKey && !event.metaKey) {
     // A Web panel's links should target the main content area.  Do this
     // if no modifier keys are down and if there's no target or the target
     // equals _main (the IE convention) or _content (the Mozilla convention).
     let target = linkNode.target;
-    let mainTarget = !target || target == "_content" || target  == "_main";
+    let mainTarget = !target || target == "_content" || target == "_main";
     if (isPanelClick && mainTarget) {
       // javascript and data links should be executed in the current browser.
       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;
@@ -5677,18 +5606,17 @@ function handleLinkClick(event, href, li
   var persistAllowMixedContentInChildTab = false;
 
   if (where == "tab" && gBrowser.docShell.mixedContentChannel) {
     const sm = Services.scriptSecurityManager;
     try {
       var targetURI = makeURI(href);
       sm.checkSameOriginURI(referrerURI, targetURI, false);
       persistAllowMixedContentInChildTab = true;
-    }
-    catch (e) { }
+    } catch (e) { }
   }
 
   // first get document wide referrer policy, then
   // get referrer attribute from clicked link and parse it and
   // allow per element referrer to overrule the document wide referrer if enabled
   let referrerPolicy = doc.referrerPolicy;
   if (Services.prefs.getBoolPref("network.http.enablePerElementReferrer") &&
       linkNode) {
@@ -5766,26 +5694,27 @@ function middleMousePaste(event) {
 }
 
 function stripUnsafeProtocolOnPaste(pasteData) {
   // Don't allow pasting javascript URIs since we don't support
   // LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL for those.
   let changed = false;
   let pasteDataNoJS = pasteData.replace(/\r?\n/g, "")
                                .replace(/^(?:\s*javascript:)+/i,
-                                        () => { changed = true;
-                                                return ""; });
+                                        () => {
+                                                changed = true;
+                                                return "";
+                                              });
   return changed ? pasteDataNoJS : pasteData;
 }
 
 // handleDroppedLink has the following 2 overloads:
 //   handleDroppedLink(event, url, name)
 //   handleDroppedLink(event, links)
-function handleDroppedLink(event, urlOrLinks, name)
-{
+function handleDroppedLink(event, urlOrLinks, name) {
   let links;
   if (Array.isArray(urlOrLinks)) {
     links = urlOrLinks;
   } else {
     links = [{ url: urlOrLinks, name, type: "" }];
   }
 
   let lastLocationChange = gBrowser.selectedBrowser.lastLocationChange;
@@ -5824,29 +5753,27 @@ function handleDroppedLink(event, urlOrL
   // called in content process.
   if (event) {
     // Keep the event from being handled by the dragDrop listeners
     // built-in to gecko if they happen to be above us.
     event.preventDefault();
   }
 }
 
-function BrowserSetForcedCharacterSet(aCharset)
-{
+function BrowserSetForcedCharacterSet(aCharset) {
   if (aCharset) {
     gBrowser.selectedBrowser.characterSet = aCharset;
     // Save the forced character-set
     if (!PrivateBrowsingUtils.isWindowPrivate(window))
       PlacesUtils.setCharsetForURI(getWebNavigation().currentURI, aCharset);
   }
   BrowserCharsetReload();
 }
 
-function BrowserCharsetReload()
-{
+function BrowserCharsetReload() {
   BrowserReloadWithFlags(nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
 }
 
 function UpdateCurrentCharset(target) {
   let selectedCharset = CharsetMenu.foldCharset(gBrowser.selectedBrowser.characterSet);
   for (let menuItem of target.getElementsByTagName("menuitem")) {
     let isSelected = menuItem.getAttribute("charset") === selectedCharset;
     menuItem.setAttribute("checked", isSelected);
@@ -6006,78 +5933,71 @@ var LanguageDetectionListener = {
   }
 };
 
 
 var BrowserOffline = {
   _inited: false,
 
   // BrowserOffline Public Methods
-  init()
-  {
+  init() {
     if (!this._uiElement)
       this._uiElement = document.getElementById("workOfflineMenuitemState");
 
     Services.obs.addObserver(this, "network:offline-status-changed", false);
 
     this._updateOfflineUI(Services.io.offline);
 
     this._inited = true;
   },
 
-  uninit()
-  {
+  uninit() {
     if (this._inited) {
       Services.obs.removeObserver(this, "network:offline-status-changed");
     }
   },
 
-  toggleOfflineStatus()
-  {
+  toggleOfflineStatus() {
     var ioService = Services.io;
 
     if (!ioService.offline && !this._canGoOffline()) {
       this._updateOfflineUI(false);
       return;
     }
 
     ioService.offline = !ioService.offline;
   },
 
   // nsIObserver
-  observe(aSubject, aTopic, aState)
-  {
+  observe(aSubject, aTopic, aState) {
     if (aTopic != "network:offline-status-changed")
       return;
 
     // This notification is also received because of a loss in connectivity,
     // which we ignore by updating the UI to the current value of io.offline
     this._updateOfflineUI(Services.io.offline);
   },
 
   // BrowserOffline Implementation Methods
-  _canGoOffline()
-  {
+  _canGoOffline() {
     try {
       var cancelGoOffline = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
       Services.obs.notifyObservers(cancelGoOffline, "offline-requested", null);
 
       // Something aborted the quit process.
       if (cancelGoOffline.data)
         return false;
-    }
-    catch (ex) {
+    } catch (ex) {
     }
 
     return true;
   },
 
   _uiElement: null,
-  _updateOfflineUI(aOffline)
-  {
+  _updateOfflineUI(aOffline) {
     var offlineLocked = gPrefService.prefIsLocked("network.online");
     if (offlineLocked)
       this._uiElement.setAttribute("disabled", "true");
 
     this._uiElement.setAttribute("checked", aOffline);
   }
 };
 
@@ -6304,18 +6224,17 @@ var IndexedDBPromptHelper = {
                             this._notificationIcon, mainAction,
                             secondaryActions, {
                               persistent: true,
                               hideClose: true,
                             });
   }
 };
 
-function CanCloseWindow()
-{
+function CanCloseWindow() {
   // Avoid redundant calls to canClose from showing multiple
   // PermitUnload dialogs.
   if (Services.startup.shuttingDown || window.skipNextCanClose) {
     return true;
   }
 
   for (let browser of gBrowser.browsers) {
     let {permitUnload, timedOut} = browser.permitUnload();
@@ -6324,18 +6243,17 @@ function CanCloseWindow()
     }
     if (!permitUnload) {
       return false;
     }
   }
   return true;
 }
 
-function WindowIsClosing()
-{
+function WindowIsClosing() {
   if (!closeWindow(false, warnAboutClosingWindow))
     return false;
 
   // In theory we should exit here and the Window's internal Close
   // method should trigger canClose on nsBrowserAccess. However, by
   // that point it's too late to be able to show a prompt for
   // PermitUnload. So we do it here, when we still can.
   if (CanCloseWindow()) {
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -185,18 +185,17 @@ var handleContentContextMenu = function(
     let principal = doc.nodePrincipal;
     sendRpcMessage("contextmenu",
                    { editFlags, spellInfo, customMenuItems, addonInfo,
                      principal, docLocation, charSet, baseURI, referrer,
                      referrerPolicy, contentType, contentDisposition,
                      frameOuterWindowID, selectionInfo, disableSetDesktopBg,
                      loginFillInfo, parentAllowsMixedContent, userContextId },
                    { event, popupNode: event.target });
-  }
-  else {
+  } else {
     // Break out to the parent window and pass the add-on info along
     let browser = docShell.chromeEventHandler;
     let mainWin = browser.ownerGlobal;
     mainWin.gContextMenuContentData = {
       isRemote: false,
       event,
       popupNode: event.target,
       browser,
@@ -298,17 +297,17 @@ var AboutNetAndCertErrorListener = {
   onCertErrorDetails(msg) {
     let div = content.document.getElementById("certificateErrorText");
     div.textContent = msg.data.info;
     let learnMoreLink = content.document.getElementById("learnMoreLink");
     let baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL");
 
     switch (msg.data.code) {
       case SEC_ERROR_UNKNOWN_ISSUER:
-        learnMoreLink.href = baseURL  + "security-error";
+        learnMoreLink.href = baseURL + "security-error";
         break;
 
       // in case the certificate expired we make sure the system clock
       // matches settings server (kinto) time
       case SEC_ERROR_EXPIRED_CERTIFICATE:
       case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE:
       case SEC_ERROR_OCSP_FUTURE_RESPONSE:
       case SEC_ERROR_OCSP_OLD_RESPONSE:
@@ -334,17 +333,17 @@ var AboutNetAndCertErrorListener = {
               .textContent = actualDate;
 
             content.document.getElementById("errorShortDesc")
               .style.display = "none";
             content.document.getElementById("wrongSystemTimePanel")
               .style.display = "block";
           }
         }
-        learnMoreLink.href = baseURL  + "time-errors";
+        learnMoreLink.href = baseURL + "time-errors";
         break;
     }
   },
 
   onCaptivePortalFreed(msg) {
     content.dispatchEvent(new content.CustomEvent("AboutNetErrorCaptivePortalFreed"));
   },
 
@@ -964,18 +963,17 @@ addMessageListener("ContextMenu:SetAsDes
       let canvas = content.document.createElement("canvas");
       canvas.width = target.naturalWidth;
       canvas.height = target.naturalHeight;
       let ctx = canvas.getContext("2d");
       ctx.drawImage(target, 0, 0);
       let dataUrl = canvas.toDataURL();
       sendAsyncMessage("ContextMenu:SetAsDesktopBackground:Result",
                        { dataUrl });
-    }
-    catch (e) {
+    } catch (e) {
       Cu.reportError(e);
       disable = true;
     }
   }
 
   if (disable)
     sendAsyncMessage("ContextMenu:SetAsDesktopBackground:Result", { disable });
 });
@@ -992,18 +990,17 @@ var PageInfoListener = {
     let document;
 
     let frameOuterWindowID = message.data.frameOuterWindowID;
 
     // If inside frame then get the frame's window and document.
     if (frameOuterWindowID) {
       window = Services.wm.getOuterWindowWithId(frameOuterWindowID);
       document = window.document;
-    }
-    else {
+    } else {
       window = content.window;
       document = content.document;
     }
 
     let imageElement = message.objects.imageElement;
 
     let pageInfoData = {metaViewRows: this.getMetaInfo(document),
                         docInfo: this.getDocumentInfo(document),
@@ -1046,18 +1043,17 @@ var PageInfoListener = {
 
   getWindowInfo(window) {
     let windowInfo = {};
     windowInfo.isTopWindow = window == window.top;
 
     let hostName = null;
     try {
       hostName = window.location.host;
-    }
-    catch (exception) { }
+    } catch (exception) { }
 
     windowInfo.hostName = hostName;
     return windowInfo;
   },
 
   getDocumentInfo(document) {
     let docInfo = {};
     docInfo.title = document.title;
@@ -1105,38 +1101,35 @@ var PageInfoListener = {
           feeds.push([link.title, type, link.href]);
         }
       }
     }
     return feeds;
   },
 
   // Only called once to get the media tab's media elements from the content page.
-  getMediaInfo(document, window, strings)
-  {
+  getMediaInfo(document, window, strings) {
     let frameList = this.goThroughFrames(document, window);
     Task.spawn(() => this.processFrames(document, frameList, strings));
   },
 
-  goThroughFrames(document, window)
-  {
+  goThroughFrames(document, window) {
     let frameList = [document];
     if (window && window.frames.length > 0) {
       let num = window.frames.length;
       for (let i = 0; i < num; i++) {
         // Recurse through the frames.
         frameList.concat(this.goThroughFrames(window.frames[i].document,
                                               window.frames[i]));
       }
     }
     return frameList;
   },
 
-  *processFrames(document, frameList, strings)
-  {
+  *processFrames(document, frameList, strings) {
     let nodeCount = 0;
     for (let doc of frameList) {
       let iterator = doc.createTreeWalker(doc, content.NodeFilter.SHOW_ELEMENT);
 
       // Goes through all the elements on the doc. imageViewRows takes only the media elements.
       while (iterator.nextNode()) {
         let mediaItems = this.getMediaItems(document, strings, iterator.currentNode);
 
@@ -1150,44 +1143,41 @@ var PageInfoListener = {
           yield new Promise(resolve => setTimeout(resolve, 10));
         }
       }
     }
     // Send that page info media fetching has finished.
     sendAsyncMessage("PageInfo:mediaData", {isComplete: true});
   },
 
-  getMediaItems(document, strings, elem)
-  {
+  getMediaItems(document, strings, elem) {
     // Check for images defined in CSS (e.g. background, borders)
     let computedStyle = elem.ownerGlobal.getComputedStyle(elem);
     // A node can have multiple media items associated with it - for example,
     // multiple background images.
     let mediaItems = [];
 
     let addImage = (url, type, alt, el, isBg) => {
       let element = this.serializeElementInfo(document, url, type, alt, el, isBg);
       mediaItems.push([url, type, alt, element, isBg]);
     };
 
     if (computedStyle) {
       let addImgFunc = (label, val) => {
         if (val.primitiveType == content.CSSPrimitiveValue.CSS_URI) {
           addImage(val.getStringValue(), label, strings.notSet, elem, true);
-        }
-        else if (val.primitiveType == content.CSSPrimitiveValue.CSS_STRING) {
+        } else if (val.primitiveType == content.CSSPrimitiveValue.CSS_STRING) {
           // This is for -moz-image-rect.
           // TODO: Reimplement once bug 714757 is fixed.
           let strVal = val.getStringValue();
           if (strVal.search(/^.*url\(\"?/) > -1) {
             let url = strVal.replace(/^.*url\(\"?/, "").replace(/\"?\).*$/, "");
             addImage(url, label, strings.notSet, elem, true);
           }
-        }
-        else if (val.cssValueType == content.CSSValue.CSS_VALUE_LIST) {
+        } else if (val.cssValueType == content.CSSValue.CSS_VALUE_LIST) {
           // Recursively resolve multiple nested CSS value lists.
           for (let i = 0; i < val.length; i++) {
             addImgFunc(label, val.item(i));
           }
         }
       };
 
       addImgFunc(strings.mediaBGImg, computedStyle.getPropertyCSSValue("background-image"));
@@ -1195,59 +1185,51 @@ var PageInfoListener = {
       addImgFunc(strings.mediaListImg, computedStyle.getPropertyCSSValue("list-style-image"));
       addImgFunc(strings.mediaCursor, computedStyle.getPropertyCSSValue("cursor"));
     }
 
     // One swi^H^H^Hif-else to rule them all.
     if (elem instanceof content.HTMLImageElement) {
       addImage(elem.src, strings.mediaImg,
                (elem.hasAttribute("alt")) ? elem.alt : strings.notSet, elem, false);
-    }
-    else if (elem instanceof content.SVGImageElement) {
+    } else if (elem instanceof content.SVGImageElement) {
       try {
         // Note: makeURLAbsolute will throw if either the baseURI is not a valid URI
         //       or the URI formed from the baseURI and the URL is not a valid URI.
         let href = makeURLAbsolute(elem.baseURI, elem.href.baseVal);
         addImage(href, strings.mediaImg, "", elem, false);
       } catch (e) { }
-    }
-    else if (elem instanceof content.HTMLVideoElement) {
+    } else if (elem instanceof content.HTMLVideoElement) {
       addImage(elem.currentSrc, strings.mediaVideo, "", elem, false);
-    }
-    else if (elem instanceof content.HTMLAudioElement) {
+    } else if (elem instanceof content.HTMLAudioElement) {
       addImage(elem.currentSrc, strings.mediaAudio, "", elem, false);
-    }
-    else if (elem instanceof content.HTMLLinkElement) {
+    } else if (elem instanceof content.HTMLLinkElement) {
       if (elem.rel && /\bicon\b/i.test(elem.rel)) {
         addImage(elem.href, strings.mediaLink, "", elem, false);
       }
-    }
-    else if (elem instanceof content.HTMLInputElement || elem instanceof content.HTMLButtonElement) {
+    } else if (elem instanceof content.HTMLInputElement || elem instanceof content.HTMLButtonElement) {
       if (elem.type.toLowerCase() == "image") {
         addImage(elem.src, strings.mediaInput,
                  (elem.hasAttribute("alt")) ? elem.alt : strings.notSet, elem, false);
       }
-    }
-    else if (elem instanceof content.HTMLObjectElement) {
+    } else if (elem instanceof content.HTMLObjectElement) {
       addImage(elem.data, strings.mediaObject, this.getValueText(elem), elem, false);
-    }
-    else if (elem instanceof content.HTMLEmbedElement) {
+    } else if (elem instanceof content.HTMLEmbedElement) {
       addImage(elem.src, strings.mediaEmbed, "", elem, false);
     }
 
     return mediaItems;
   },
 
   /**
    * Set up a JSON element object with all the instanceOf and other infomation that
    * makePreview in pageInfo.js uses to figure out how to display the preview.
    */
 
-  serializeElementInfo(document, url, type, alt, item, isBG)
-  {
+  serializeElementInfo(document, url, type, alt, item, isBG) {
     let result = {};
 
     let imageText;
     if (!isBG &&
         !(item instanceof content.SVGImageElement) &&
         !(document instanceof content.ImageDocument)) {
       imageText = item.title || item.alt;
 
@@ -1317,18 +1299,17 @@ var PageInfoListener = {
     result.baseURI = item.baseURI;
 
     return result;
   },
 
   // Other Misc Stuff
   // Modified from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html
   // parse a node to extract the contents of the node
-  getValueText(node)
-  {
+  getValueText(node) {
 
     let valueText = "";
 
     // Form input elements don't generally contain information that is useful to our callers, so return nothing.
     if (node instanceof content.HTMLInputElement ||
         node instanceof content.HTMLSelectElement ||
         node instanceof content.HTMLTextAreaElement) {
       return valueText;
@@ -1339,54 +1320,50 @@ var PageInfoListener = {
 
     for (let i = 0; i < length; i++) {
       let childNode = node.childNodes[i];
       let nodeType = childNode.nodeType;
 
       // Text nodes are where the goods are.
       if (nodeType == content.Node.TEXT_NODE) {
         valueText += " " + childNode.nodeValue;
-      }
-      // And elements can have more text inside them.
-      else if (nodeType == content.Node.ELEMENT_NODE) {
+      } else if (nodeType == content.Node.ELEMENT_NODE) {
+        // And elements can have more text inside them.
         // Images are special, we want to capture the alt text as if the image weren't there.
         if (childNode instanceof content.HTMLImageElement) {
           valueText += " " + this.getAltText(childNode);
-        }
-        else {
+        } else {
           valueText += " " + this.getValueText(childNode);
         }
       }
     }
 
     return this.stripWS(valueText);
   },
 
   // Copied from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html.
   // Traverse the tree in search of an img or area element and grab its alt tag.
-  getAltText(node)
-  {
+  getAltText(node) {
     let altText = "";
 
     if (node.alt) {
       return node.alt;
     }
     let length = node.childNodes.length;
     for (let i = 0; i < length; i++) {
       if ((altText = this.getAltText(node.childNodes[i]) != undefined)) { // stupid js warning...
         return altText;
       }
     }
     return "";
   },
 
   // Copied from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html.
   // Strip leading and trailing whitespace, and replace multiple consecutive whitespace characters with a single space.
-  stripWS(text)
-  {
+  stripWS(text) {
     let middleRE = /\s+/g;
     let endRE = /(^\s+)|(\s+$)/g;
 
     text = text.replace(middleRE, " ");
     return text.replace(endRE, "");
   }
 };
 PageInfoListener.init();
--- a/browser/base/content/contentSearchUI.js
+++ b/browser/base/content/contentSearchUI.js
@@ -78,18 +78,17 @@ ContentSearchUIController.prototype = {
 
   set defaultEngine(engine) {
     if (this._defaultEngine && this._defaultEngine.icon) {
       URL.revokeObjectURL(this._defaultEngine.icon);
     }
     let icon;
     if (engine.iconBuffer) {
       icon = this._getFaviconURIFromBuffer(engine.iconBuffer);
-    }
-    else {
+    } else {
       icon = this._getImageURIForCurrentResolution(
         "chrome://mozapps/skin/places/defaultFavicon.png");
     }
     this._defaultEngine = {
       name: engine.name,
       icon,
     };
     this._updateDefaultEngineHeader();
@@ -137,18 +136,17 @@ ContentSearchUIController.prototype = {
                        this.numSuggestions + this.selectedButtonIndex : -1;
     for (let i = 0; i < allElts.length; ++i) {
       let elt = allElts[i];
       let ariaSelectedElt = i < this.numSuggestions ? elt.firstChild : elt;
       if (i == idx) {
         elt.classList.add("selected");
         ariaSelectedElt.setAttribute("aria-selected", "true");
         this.input.setAttribute("aria-activedescendant", ariaSelectedElt.id);
-      }
-      else if (i != excludeIndex) {
+      } else if (i != excludeIndex) {
         elt.classList.remove("selected");
         ariaSelectedElt.setAttribute("aria-selected", "false");
       }
     }
   },
 
   get selectedButtonIndex() {
     let elts = [...this._oneOffButtons,
@@ -164,18 +162,17 @@ ContentSearchUIController.prototype = {
   set selectedButtonIndex(idx) {
     let elts = [...this._oneOffButtons,
                 document.getElementById("contentSearchSettingsButton")];
     for (let i = 0; i < elts.length; ++i) {
       let elt = elts[i];
       if (i == idx) {
         elt.classList.add("selected");
         elt.setAttribute("aria-selected", "true");
-      }
-      else {
+      } else {
         elt.classList.remove("selected");
         elt.setAttribute("aria-selected", "false");
       }
     }
   },
 
   get selectedEngineName() {
     let selectedElt = this._oneOffsTable.querySelector(".selected");
@@ -248,18 +245,17 @@ ContentSearchUIController.prototype = {
     }
 
     let searchText = this.input;
     let searchTerms;
     if (this._table.hidden ||
         aEvent.originalTarget.id == "contentSearchDefaultEngineHeader" ||
         aEvent instanceof KeyboardEvent) {
       searchTerms = searchText.value;
-    }
-    else {
+    } else {
       searchTerms = this.suggestionAtIndex(this.selectedIndex) || searchText.value;
     }
     // Send an event that will perform a search and Firefox Health Report will
     // record that a search from the healthReportKey passed to the constructor.
     let eventData = {
       engineName: this.selectedEngineName,
       searchString: searchTerms,
       healthReportKey: this._healthReportKey,
@@ -290,18 +286,17 @@ ContentSearchUIController.prototype = {
     this._sendMsg("Search", eventData);
     this.addInputValueToFormHistory();
   },
 
   _onInput() {
     if (!this.input.value) {
       this._stickyInputValue = "";
       this._hideSuggestions();
-    }
-    else if (this.input.value != this._stickyInputValue) {
+    } else if (this.input.value != this._stickyInputValue) {
       // Only fetch new suggestions if the input value has changed.
       this._getSuggestions();
       this.selectAndUpdateInput(-1);
     }
     this._updateSearchWithHeader();
   },
 
   _onKeypress(event) {
@@ -404,43 +399,37 @@ ContentSearchUIController.prototype = {
       }
       // If are moving up from the first one off, we have to deselect the one off
       // manually because the selectedIndex setter tries to exclude the selected
       // one-off (which is desirable for accel+shift+up/down).
       if (currentIndex == this.numSuggestions && selectedIndexDelta == -1) {
         this.selectedButtonIndex = -1;
       }
       this.selectAndUpdateInput(newSelectedIndex);
-    }
-
-    else if (selectedSuggestionDelta) {
+    } else if (selectedSuggestionDelta) {
       let newSelectedIndex;
       if (currentIndex >= this.numSuggestions || currentIndex == -1) {
         // No suggestion already selected, select the first/last one appropriately.
         newSelectedIndex = selectedSuggestionDelta == 1 ?
                            0 : this.numSuggestions - 1;
-      }
-      else {
+      } else {
         newSelectedIndex = currentIndex + selectedSuggestionDelta;
       }
       if (newSelectedIndex >= this.numSuggestions) {
         newSelectedIndex = -1;
       }
       this.selectAndUpdateInput(newSelectedIndex);
-    }
-
-    else if (selectedOneOffDelta) {
+    } else if (selectedOneOffDelta) {
       let newSelectedIndex;
       let currentButton = this.selectedButtonIndex;
       if (currentButton == -1 || currentButton == this._oneOffButtons.length) {
         // No one-off already selected, select the first/last one appropriately.
         newSelectedIndex = selectedOneOffDelta == 1 ?
                            0 : this._oneOffButtons.length - 1;
-      }
-      else {
+      } else {
         newSelectedIndex = currentButton + selectedOneOffDelta;
       }
       // Allow selection of the settings button via the tab key.
       if (newSelectedIndex == this._oneOffButtons.length &&
           event.keyCode != event.DOM_VK_TAB) {
         newSelectedIndex = -1;
       }
       this.selectedButtonIndex = newSelectedIndex;
@@ -545,23 +534,21 @@ ContentSearchUIController.prototype = {
 
     // Add the suggestions to the table.
     let searchWords =
       new Set(suggestions.searchString.trim().toLowerCase().split(/\s+/));
     for (let i = 0; i < MAX_DISPLAYED_SUGGESTIONS; i++) {
       let type, idx;
       if (i < suggestions.formHistory.length) {
         [type, idx] = ["formHistory", i];
-      }
-      else {
+      } else {
         let j = i - suggestions.formHistory.length;
         if (j < suggestions.remote.length) {
           [type, idx] = ["remote", j];
-        }
-        else {
+        } else {
           break;
         }
       }
       this._suggestionsList.appendChild(
         this._makeTableRow(type, suggestions[type][idx], i, searchWords));
     }
 
     if (this._table.hidden) {
@@ -856,18 +843,17 @@ ContentSearchUIController.prototype = {
         cell.setAttribute("class", "contentSearchSuggestionsContainer");
       }
       let button = document.createElementNS(HTML_NS, "button");
       button.setAttribute("class", "contentSearchOneOffItem");
       let img = document.createElementNS(HTML_NS, "img");
       let uri;
       if (engine.iconBuffer) {
         uri = this._getFaviconURIFromBuffer(engine.iconBuffer);
-      }
-      else {
+      } else {
         uri = this._getImageURIForCurrentResolution(
           "chrome://browser/skin/search-engine-placeholder.png");
       }
       img.setAttribute("src", uri);
       img.addEventListener("load", function imgLoad() {
         img.removeEventListener("load", imgLoad);
         URL.revokeObjectURL(uri);
       });
--- a/browser/base/content/pageinfo/feeds.js
+++ b/browser/base/content/pageinfo/feeds.js
@@ -1,32 +1,29 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* 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/. */
 
-function initFeedTab(feeds)
-{
+function initFeedTab(feeds) {
   for (let feed of feeds) {
     let [name, type, url] = feed;
     addRow(name, type, url);
   }
 
   var feedListbox = document.getElementById("feedListbox");
   document.getElementById("feedTab").hidden = feedListbox.getRowCount() == 0;
 }
 
-function onSubscribeFeed()
-{
+function onSubscribeFeed() {
   var listbox = document.getElementById("feedListbox");
   openUILinkIn(listbox.selectedItem.getAttribute("feedURL"), "current",
                { ignoreAlt: true });
 }
 
-function addRow(name, type, url)
-{
+function addRow(name, type, url) {
   var item = document.createElement("richlistitem");
   item.setAttribute("feed", "true");
   item.setAttribute("name", name);
   item.setAttribute("type", type);
   item.setAttribute("feedURL", url);
   document.getElementById("feedListbox").appendChild(item);
 }
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -1,106 +1,93 @@
 /* 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/. */
 
 Components.utils.import("resource://gre/modules/LoadContextInfo.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 // define a js object to implement nsITreeView
-function pageInfoTreeView(treeid, copycol)
-{
+function pageInfoTreeView(treeid, copycol) {
   // copycol is the index number for the column that we want to add to
   // the copy-n-paste buffer when the user hits accel-c
   this.treeid = treeid;
   this.copycol = copycol;
   this.rows = 0;
   this.tree = null;
   this.data = [ ];
   this.selection = null;
   this.sortcol = -1;
   this.sortdir = false;
 }
 
 pageInfoTreeView.prototype = {
   set rowCount(c) { throw "rowCount is a readonly property"; },
   get rowCount() { return this.rows; },
 
-  setTree(tree)
-  {
+  setTree(tree) {
     this.tree = tree;
   },
 
-  getCellText(row, column)
-  {
+  getCellText(row, column) {
     // row can be null, but js arrays are 0-indexed.
     // colidx cannot be null, but can be larger than the number
     // of columns in the array. In this case it's the fault of
     // whoever typoed while calling this function.
     return this.data[row][column.index] || "";
   },
 
-  setCellValue(row, column, value)
-  {
+  setCellValue(row, column, value) {
   },
 
-  setCellText(row, column, value)
-  {
+  setCellText(row, column, value) {
     this.data[row][column.index] = value;
   },
 
-  addRow(row)
-  {
+  addRow(row) {
     this.rows = this.data.push(row);
     this.rowCountChanged(this.rows - 1, 1);
     if (this.selection.count == 0 && this.rowCount && !gImageElement) {
       this.selection.select(0);
     }
   },
 
-  addRows(rows)
-  {
+  addRows(rows) {
     for (let row of rows) {
       this.addRow(row);
     }
   },
 
-  rowCountChanged(index, count)
-  {
+  rowCountChanged(index, count) {
     this.tree.rowCountChanged(index, count);
   },
 
-  invalidate()
-  {
+  invalidate() {
     this.tree.invalidate();
   },
 
-  clear()
-  {
+  clear() {
     if (this.tree)
       this.tree.rowCountChanged(0, -this.rows);
     this.rows = 0;
     this.data = [ ];
   },
 
-  handleCopy(row)
-  {
+  handleCopy(row) {
     return (row < 0 || this.copycol < 0) ? "" : (this.data[row][this.copycol] || "");
   },
 
-  performActionOnRow(action, row)
-  {
+  performActionOnRow(action, row) {
     if (action == "copy") {
       var data = this.handleCopy(row)
       this.tree.treeBody.parentNode.setAttribute("copybuffer", data);
     }
   },
 
-  onPageMediaSort(columnname)
-  {
+  onPageMediaSort(columnname) {
     var tree = document.getElementById(this.treeid);
     var treecol = tree.columns.getNamedColumn(columnname);
 
     this.sortdir =
       gTreeUtils.sort(
         tree,
         this,
         this.data,
@@ -309,18 +296,17 @@ var onFinished = [ ];
 var onUnloadRegistry = [ ];
 
 /* Called when PageInfo window is loaded.  Arguments are:
  *  window.arguments[0] - (optional) an object consisting of
  *                         - doc: (optional) document to use for source. if not provided,
  *                                the calling window's document will be used
  *                         - initialTab: (optional) id of the inital tab to display
  */
-function onLoadPageInfo()
-{
+function onLoadPageInfo() {
   gBundle = document.getElementById("pageinfobundle");
   gStrings.unknown = gBundle.getString("unknown");
   gStrings.notSet = gBundle.getString("notset");
   gStrings.mediaImg = gBundle.getString("mediaImg");
   gStrings.mediaBGImg = gBundle.getString("mediaBGImg");
   gStrings.mediaBorderImg = gBundle.getString("mediaBorderImg");
   gStrings.mediaListImg = gBundle.getString("mediaListImg");
   gStrings.mediaCursor = gBundle.getString("mediaCursor");
@@ -341,18 +327,17 @@ function onLoadPageInfo()
 
   /* Select the requested tab, if the name is specified */
   loadTab(args);
   Components.classes["@mozilla.org/observer-service;1"]
             .getService(Components.interfaces.nsIObserverService)
             .notifyObservers(window, "page-info-dialog-loaded", null);
 }
 
-function loadPageInfo(frameOuterWindowID, imageElement, browser)
-{
+function loadPageInfo(frameOuterWindowID, imageElement, browser) {
   browser = browser || window.opener.gBrowser.selectedBrowser;
   let mm = browser.messageManager;
 
   gStrings["application/rss+xml"]  = gBundle.getString("feedRss");
   gStrings["application/atom+xml"] = gBundle.getString("feedAtom");
   gStrings["text/xml"]             = gBundle.getString("feedXML");
   gStrings["application/xml"]      = gBundle.getString("feedXML");
   gStrings["application/rdf+xml"]  = gBundle.getString("feedXML");
@@ -410,18 +395,17 @@ function loadPageInfo(frameOuterWindowID
 
     selectImage();
   });
 
   /* Call registered overlay init functions */
   onLoadRegistry.forEach(function(func) { func(); });
 }
 
-function resetPageInfo(args)
-{
+function resetPageInfo(args) {
   /* Reset Meta tags part */
   gMetaView.clear();
 
   /* Reset Media tab */
   var mediaTab = document.getElementById("mediaTab");
   if (!mediaTab.hidden) {
     Components.classes["@mozilla.org/observer-service;1"]
               .getService(Components.interfaces.nsIObserverService)
@@ -438,53 +422,49 @@ function resetPageInfo(args)
 
   /* Call registered overlay reset functions */
   onResetRegistry.forEach(function(func) { func(); });
 
   /* Rebuild the data */
   loadTab(args);
 }
 
-function onUnloadPageInfo()
-{
+function onUnloadPageInfo() {
   // Remove the observer, only if there is at least 1 image.
   if (!document.getElementById("mediaTab").hidden) {
     Components.classes["@mozilla.org/observer-service;1"]
               .getService(Components.interfaces.nsIObserverService)
               .removeObserver(imagePermissionObserver, "perm-changed");
   }
 
   /* Call registered overlay unload functions */
   onUnloadRegistry.forEach(function(func) { func(); });
 }
 
-function doHelpButton()
-{
+function doHelpButton() {
   const helpTopics = {
     "generalPanel":  "pageinfo_general",
     "mediaPanel":    "pageinfo_media",
     "feedPanel":     "pageinfo_feed",
     "permPanel":     "pageinfo_permissions",
     "securityPanel": "pageinfo_security"
   };
 
   var deck  = document.getElementById("mainDeck");
   var helpdoc = helpTopics[deck.selectedPanel.id] || "pageinfo_general";
   openHelpLink(helpdoc);
 }
 
-function showTab(id)
-{
+function showTab(id) {
   var deck  = document.getElementById("mainDeck");
   var pagel = document.getElementById(id + "Panel");
   deck.selectedPanel = pagel;
 }
 
-function loadTab(args)
-{
+function loadTab(args) {
   // If the "View Image Info" context menu item was used, the related image
   // element is provided as an argument. This can't be a background image.
   let imageElement = args && args.imageElement;
   let frameOuterWindowID = args && args.frameOuterWindowID;
   let browser = args && args.browser;
 
   /* Load the page info */
   loadPageInfo(frameOuterWindowID, imageElement, browser);
@@ -492,48 +472,44 @@ function loadTab(args)
   var initialTab = (args && args.initialTab) || "generalTab";
   var radioGroup = document.getElementById("viewGroup");
   initialTab = document.getElementById(initialTab) || document.getElementById("generalTab");
   radioGroup.selectedItem = initialTab;
   radioGroup.selectedItem.doCommand();
   radioGroup.focus();
 }
 
-function toggleGroupbox(id)
-{
+function toggleGroupbox(id) {
   var elt = document.getElementById(id);
   if (elt.hasAttribute("closed")) {
     elt.removeAttribute("closed");
     if (elt.flexWhenOpened)
       elt.flex = elt.flexWhenOpened;
-  }
-  else {
+  } else {
     elt.setAttribute("closed", "true");
     if (elt.flex) {
       elt.flexWhenOpened = elt.flex;
       elt.flex = 0;
     }
   }
 }
 
-function openCacheEntry(key, cb)
-{
+function openCacheEntry(key, cb) {
   var checkCacheListener = {
     onCacheEntryCheck(entry, appCache) {
       return Components.interfaces.nsICacheEntryOpenCallback.ENTRY_WANTED;
     },
     onCacheEntryAvailable(entry, isNew, appCache, status) {
       cb(entry);
     }
   };
   diskStorage.asyncOpenURI(Services.io.newURI(key, null, null), "", nsICacheStorage.OPEN_READONLY, checkCacheListener);
 }
 
-function makeGeneralTab(metaViewRows, docInfo)
-{
+function makeGeneralTab(metaViewRows, docInfo) {
   var title = (docInfo.title) ? docInfo.title : gBundle.getString("noPageTitle");
   document.getElementById("titletext").value = title;
 
   var url = docInfo.location;
   setItemValue("urltext", url);
 
   var referrer = ("referrer" in docInfo && docInfo.referrer);
   setItemValue("refertext", referrer);
@@ -581,18 +557,17 @@ function makeGeneralTab(metaViewRows, do
       var pageSize = cacheEntry.dataSize;
       var kbSize = formatNumber(Math.round(pageSize / 1024 * 100) / 100);
       sizeText = gBundle.getFormattedString("generalSize", [kbSize, formatNumber(pageSize)]);
     }
     setItemValue("sizetext", sizeText);
   });
 }
 
-function addImage(imageViewRow)
-{
+function addImage(imageViewRow) {
   let [url, type, alt, elem, isBg] = imageViewRow;
 
   if (!url)
     return;
 
   if (!gImageHash.hasOwnProperty(url))
     gImageHash[url] = { };
   if (!gImageHash[url].hasOwnProperty(type))
@@ -614,42 +589,39 @@ function addImage(imageViewRow)
 
     // Add the observer, only once.
     if (gImageView.data.length == 1) {
       document.getElementById("mediaTab").hidden = false;
       Components.classes["@mozilla.org/observer-service;1"]
                 .getService(Components.interfaces.nsIObserverService)
                 .addObserver(imagePermissionObserver, "perm-changed", false);
     }
-  }
-  else {
+  } else {
     var i = gImageHash[url][type][alt];
     gImageView.data[i][COL_IMAGE_COUNT]++;
     // The same image can occur several times on the page at different sizes.
     // If the "View Image Info" context menu item was used, ensure we select
     // the correct element.
     if (!gImageView.data[i][COL_IMAGE_BG] &&
         gImageElement && url == gImageElement.currentSrc &&
         gImageElement.width == elem.width &&
         gImageElement.height == elem.height &&
         gImageElement.imageText == elem.imageText) {
       gImageView.data[i][COL_IMAGE_NODE] = elem;
     }
   }
 }
 
 // Link Stuff
-function openURL(target)
-{
+function openURL(target) {
   var url = target.parentNode.childNodes[2].value;
   window.open(url, "_blank", "chrome");
 }
 
-function onBeginLinkDrag(event, urlField, descField)
-{
+function onBeginLinkDrag(event, urlField, descField) {
   if (event.originalTarget.localName != "treechildren")
     return;
 
   var tree = event.target;
   if (!("treeBoxObject" in tree))
     tree = tree.parentNode;
 
   var row = tree.treeBoxObject.getRowAt(event.clientX, event.clientY);
@@ -664,40 +636,37 @@ function onBeginLinkDrag(event, urlField
 
   var dt = event.dataTransfer;
   dt.setData("text/x-moz-url", url + "\n" + desc);
   dt.setData("text/url-list", url);
   dt.setData("text/plain", url);
 }
 
 // Image Stuff
-function getSelectedRows(tree)
-{
+function getSelectedRows(tree) {
   var start = { };
   var end   = { };
   var numRanges = tree.view.selection.getRangeCount();
 
   var rowArray = [ ];
   for (var t = 0; t < numRanges; t++) {
     tree.view.selection.getRangeAt(t, start, end);
     for (var v = start.value; v <= end.value; v++)
       rowArray.push(v);
   }
 
   return rowArray;
 }
 
-function getSelectedRow(tree)
-{
+function getSelectedRow(tree) {
   var rows = getSelectedRows(tree);
   return (rows.length == 1) ? rows[0] : -1;
 }
 
-function selectSaveFolder(aCallback)
-{
+function selectSaveFolder(aCallback) {
   const nsILocalFile = Components.interfaces.nsILocalFile;
   const nsIFilePicker = Components.interfaces.nsIFilePicker;
   let titleText = gBundle.getString("mediaSelectFolder");
   let fp = Components.classes["@mozilla.org/filepicker;1"].
            createInstance(nsIFilePicker);
   let fpCallback = function fpCallback_done(aResult) {
     if (aResult == nsIFilePicker.returnOK) {
       aCallback(fp.file.QueryInterface(nsILocalFile));
@@ -715,18 +684,17 @@ function selectSaveFolder(aCallback)
     if (initialDir) {
       fp.displayDirectory = initialDir;
     }
   } catch (ex) {
   }
   fp.open(fpCallback);
 }
 
-function saveMedia()
-{
+function saveMedia() {
   var tree = document.getElementById("imagetree");
   var rowArray = getSelectedRows(tree);
   if (rowArray.length == 1) {
     let row = rowArray[0];
     let item = gImageView.data[row][COL_IMAGE_NODE];
     let url = gImageView.data[row][COL_IMAGE_ADDRESS];
 
     if (url) {
@@ -775,60 +743,55 @@ function saveMedia()
                        makeURI(item.baseURI));
           }
         }
       }
     });
   }
 }
 
-function onBlockImage()
-{
+function onBlockImage() {
   var permissionManager = Components.classes[PERMISSION_CONTRACTID]
                                     .getService(nsIPermissionManager);
 
   var checkbox = document.getElementById("blockImage");
   var uri = makeURI(document.getElementById("imageurltext").value);
   if (checkbox.checked)
     permissionManager.add(uri, "image", nsIPermissionManager.DENY_ACTION);
   else
     permissionManager.remove(uri, "image");
 }
 
-function onImageSelect()
-{
+function onImageSelect() {
   var previewBox   = document.getElementById("mediaPreviewBox");
   var mediaSaveBox = document.getElementById("mediaSaveBox");
   var splitter     = document.getElementById("mediaSplitter");
   var tree = document.getElementById("imagetree");
   var count = tree.view.selection.count;
   if (count == 0) {
     previewBox.collapsed   = true;
     mediaSaveBox.collapsed = true;
     splitter.collapsed     = true;
     tree.flex = 1;
-  }
-  else if (count > 1) {
+  } else if (count > 1) {
     splitter.collapsed     = true;
     previewBox.collapsed   = true;
     mediaSaveBox.collapsed = false;
     tree.flex = 1;
-  }
-  else {
+  } else {
     mediaSaveBox.collapsed = true;
     splitter.collapsed     = false;
     previewBox.collapsed   = false;
     tree.flex = 0;
     makePreview(getSelectedRows(tree)[0]);
   }
 }
 
 // Makes the media preview (image, video, etc) for the selected row on the media tab.
-function makePreview(row)
-{
+function makePreview(row) {
   var item = gImageView.data[row][COL_IMAGE_NODE];
   var url = gImageView.data[row][COL_IMAGE_ADDRESS];
   var isBG = gImageView.data[row][COL_IMAGE_BG];
   var isAudio = false;
 
   setItemValue("imageurltext", url);
   setItemValue("imagetext", item.imageText);
   setItemValue("imagelongdesctext", item.longDesc);
@@ -838,18 +801,17 @@ function makePreview(row)
   openCacheEntry(cacheKey, function(cacheEntry) {
     // find out the file size
     var sizeText;
     if (cacheEntry) {
       let imageSize = cacheEntry.dataSize;
       var kbSize = Math.round(imageSize / 1024 * 100) / 100;
       sizeText = gBundle.getFormattedString("generalSize",
                                             [formatNumber(kbSize), formatNumber(imageSize)]);
-    }
-    else
+    } else
       sizeText = gBundle.getString("mediaUnknownNotCached");
     setItemValue("imagesizetext", sizeText);
 
     var mimeType = item.mimeType || this.getContentTypeFromHeaders(cacheEntry);
     var numFrames = item.numFrames;
 
     var imageType;
     if (mimeType) {
@@ -857,23 +819,21 @@ function makePreview(row)
       let imageMimeType = /^image\/(.*)/i.exec(mimeType);
       if (imageMimeType) {
         imageType = imageMimeType[1].toUpperCase();
         if (numFrames > 1)
           imageType = gBundle.getFormattedString("mediaAnimatedImageType",
                                                  [imageType, numFrames]);
         else
           imageType = gBundle.getFormattedString("mediaImageType", [imageType]);
-      }
-      else {
+      } else {
         // the MIME type doesn't begin with image/, display the raw type
         imageType = mimeType;
       }
-    }
-    else {
+    } else {
       // We couldn't find the type, fall back to the value in the treeview
       imageType = gImageView.data[row][COL_IMAGE_TYPE];
     }
     setItemValue("imagetypetext", imageType);
 
     var imageContainer = document.getElementById("theimagecontainer");
     var oldImage = document.getElementById("thepreviewimage");
 
@@ -901,89 +861,83 @@ function makePreview(row)
       // failing that, we'll assume that the image was never loaded in the
       // other process (this can be true for favicons, for example), and so
       // we'll assume that we can use the natural dimensions of the newImage
       // we just created. If the natural dimensions of newImage are not known
       // then the image is probably broken.
       if (!isBG) {
         newImage.width = ("width" in item && item.width) || newImage.naturalWidth;
         newImage.height = ("height" in item && item.height) || newImage.naturalHeight;
-      }
-      else {
+      } else {
         // the Width and Height of an HTML tag should not be used for its background image
         // (for example, "table" can have "width" or "height" attributes)
         newImage.width = item.naturalWidth || newImage.naturalWidth;
         newImage.height = item.naturalHeight || newImage.naturalHeight;
       }
 
       if (item.SVGImageElement) {
         newImage.width = item.SVGImageElementWidth;
         newImage.height = item.SVGImageElementHeight;
       }
 
       width = newImage.width;
       height = newImage.height;
 
       document.getElementById("theimagecontainer").collapsed = false
       document.getElementById("brokenimagecontainer").collapsed = true;
-    }
-    else if (item.HTMLVideoElement && isProtocolAllowed) {
+    } else if (item.HTMLVideoElement && isProtocolAllowed) {
       newImage = document.createElementNS("http://www.w3.org/1999/xhtml", "video");
       newImage.id = "thepreviewimage";
       newImage.src = url;
       newImage.controls = true;
       width = physWidth = item.videoWidth;
       height = physHeight = item.videoHeight;
 
       document.getElementById("theimagecontainer").collapsed = false;
       document.getElementById("brokenimagecontainer").collapsed = true;
-    }
-    else if (item.HTMLAudioElement && isProtocolAllowed) {
+    } else if (item.HTMLAudioElement && isProtocolAllowed) {
       newImage = new Audio;
       newImage.id = "thepreviewimage";
       newImage.src = url;
       newImage.controls = true;
       isAudio = true;
 
       document.getElementById("theimagecontainer").collapsed = false;
       document.getElementById("brokenimagecontainer").collapsed = true;
-    }
-    else {
+    } else {
       // fallback image for protocols not allowed (e.g., javascript:)
       // or elements not [yet] handled (e.g., object, embed).
       document.getElementById("brokenimagecontainer").collapsed = false;
       document.getElementById("theimagecontainer").collapsed = true;
     }
 
     let imageSize = "";
     if (url && !isAudio) {
       if (width != physWidth || height != physHeight) {
         imageSize = gBundle.getFormattedString("mediaDimensionsScaled",
                                                [formatNumber(physWidth),
                                                 formatNumber(physHeight),
                                                 formatNumber(width),
                                                 formatNumber(height)]);
-      }
-      else {
+      } else {
         imageSize = gBundle.getFormattedString("mediaDimensions",
                                                [formatNumber(width),
                                                 formatNumber(height)]);
       }
     }
     setItemValue("imagedimensiontext", imageSize);
 
     makeBlockImage(url);
 
     imageContainer.removeChild(oldImage);
     imageContainer.appendChild(newImage);
   });
 }
 
-function makeBlockImage(url)
-{
+function makeBlockImage(url) {
   var permissionManager = Components.classes[PERMISSION_CONTRACTID]
                                     .getService(nsIPermissionManager);
   var prefs = Components.classes[PREFERENCES_CONTRACTID]
                         .getService(Components.interfaces.nsIPrefBranch);
 
   var checkbox = document.getElementById("blockImage");
   var imagePref = prefs.getIntPref("permissions.default.image");
   if (!(/^https?:/.test(url)) || imagePref == 2)
@@ -992,25 +946,23 @@ function makeBlockImage(url)
     checkbox.hidden = true;
   else {
     var uri = makeURI(url);
     if (uri.host) {
       checkbox.hidden = false;
       checkbox.label = gBundle.getFormattedString("mediaBlockImage", [uri.host]);
       var perm = permissionManager.testPermission(uri, "image");
       checkbox.checked = perm == nsIPermissionManager.DENY_ACTION;
-    }
-    else
+    } else
       checkbox.hidden = true;
   }
 }
 
 var imagePermissionObserver = {
-  observe(aSubject, aTopic, aData)
-  {
+  observe(aSubject, aTopic, aData) {
     if (document.getElementById("mediaPreviewBox").collapsed)
       return;
 
     if (aTopic == "perm-changed") {
       var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission);
       if (permission.type == "image") {
         var imageTree = document.getElementById("imagetree");
         var row = getSelectedRow(imageTree);
@@ -1018,58 +970,52 @@ var imagePermissionObserver = {
         if (permission.matchesURI(makeURI(url), true)) {
           makeBlockImage(url);
         }
       }
     }
   }
 }
 
-function getContentTypeFromHeaders(cacheEntryDescriptor)
-{
+function getContentTypeFromHeaders(cacheEntryDescriptor) {
   if (!cacheEntryDescriptor)
     return null;
 
   let headers = cacheEntryDescriptor.getMetaDataElement("response-head");
   let type = /^Content-Type:\s*(.*?)\s*(?:\;|$)/mi.exec(headers);
   return type && type[1];
 }
 
-function setItemValue(id, value)
-{
+function setItemValue(id, value) {
   var item = document.getElementById(id);
   if (value) {
     item.parentNode.collapsed = false;
     item.value = value;
-  }
-  else
+  } else
     item.parentNode.collapsed = true;
 }
 
-function formatNumber(number)
-{
+function formatNumber(number) {
   return (+number).toLocaleString();  // coerce number to a numeric value before calling toLocaleString()
 }
 
-function formatDate(datestr, unknown)
-{
+function formatDate(datestr, unknown) {
   var date = new Date(datestr);
   if (!date.valueOf())
     return unknown;
 
   const locale = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
                  .getService(Components.interfaces.nsIXULChromeRegistry)
                  .getSelectedLocale("global", true);
   const dtOptions = { year: 'numeric', month: 'long', day: 'numeric',
                       hour: 'numeric', minute: 'numeric', second: 'numeric' };
   return date.toLocaleString(locale, dtOptions);
 }
 
-function doCopy()
-{
+function doCopy() {
   if (!gClipboardHelper)
     return;
 
   var elem = document.commandDispatcher.focusedElement;
 
   if (elem && "treeBoxObject" in elem) {
     var view = elem.view;
     var selection = view.selection;
@@ -1089,34 +1035,31 @@ function doCopy()
           text.push(tmp);
         elem.removeAttribute("copybuffer");
       }
     }
     gClipboardHelper.copyString(text.join("\n"));
   }
 }
 
-function doSelectAllMedia()
-{
+function doSelectAllMedia() {
   var tree = document.getElementById("imagetree");
 
   if (tree)
     tree.view.selection.selectAll();
 }
 
-function doSelectAll()
-{
+function doSelectAll() {
   var elem = document.commandDispatcher.focusedElement;
 
   if (elem && "treeBoxObject" in elem)
     elem.view.selection.selectAll();
 }
 
-function selectImage()
-{
+function selectImage() {
   if (!gImageElement)
     return;
 
   var tree = document.getElementById("imagetree");
   for (var i = 0; i < tree.view.rowCount; i++) {
     // If the image row element is the image selected from the "View Image Info" context menu item.
     let image = gImageView.data[i][COL_IMAGE_NODE];
     if (!gImageView.data[i][COL_IMAGE_BG] &&
@@ -1127,14 +1070,13 @@ function selectImage()
       tree.view.selection.select(i);
       tree.treeBoxObject.ensureRowIsVisible(i);
       tree.focus();
       return;
     }
   }
 }
 
-function checkProtocol(img)
-{
+function checkProtocol(img) {
   var url = img[COL_IMAGE_ADDRESS];
   return /^data:image\//i.test(url) ||
     /^(https?|ftp|file|about|chrome|resource):/.test(url);
 }
--- a/browser/base/content/pageinfo/permissions.js
+++ b/browser/base/content/pageinfo/permissions.js
@@ -15,81 +15,75 @@ var gUsageRequest;
 var gPermissions = SitePermissions.listPermissions().sort((a, b) => {
   let firstLabel = SitePermissions.getPermissionLabel(a);
   let secondLabel = SitePermissions.getPermissionLabel(b);
   return firstLabel.localeCompare(secondLabel);
 });
 gPermissions.push("plugins");
 
 var permissionObserver = {
-  observe(aSubject, aTopic, aData)
-  {
+  observe(aSubject, aTopic, aData) {
     if (aTopic == "perm-changed") {
       var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission);
       if (permission.matchesURI(gPermURI, true)) {
         if (gPermissions.indexOf(permission.type) > -1)
           initRow(permission.type);
         else if (permission.type.startsWith("plugin"))
           setPluginsRadioState();
       }
     }
   }
 };
 
-function onLoadPermission(uri, principal)
-{
+function onLoadPermission(uri, principal) {
   var permTab = document.getElementById("permTab");
   if (SitePermissions.isSupportedURI(uri)) {
     gPermURI = uri;
     gPermPrincipal = principal;
     var hostText = document.getElementById("hostText");
     hostText.value = gPermURI.prePath;
 
     for (var i of gPermissions)
       initRow(i);
     var os = Components.classes["@mozilla.org/observer-service;1"]
                        .getService(Components.interfaces.nsIObserverService);
     os.addObserver(permissionObserver, "perm-changed", false);
     onUnloadRegistry.push(onUnloadPermission);
     permTab.hidden = false;
-  }
-  else
+  } else
     permTab.hidden = true;
 }
 
-function onUnloadPermission()
-{
+function onUnloadPermission() {
   var os = Components.classes["@mozilla.org/observer-service;1"]
                      .getService(Components.interfaces.nsIObserverService);
   os.removeObserver(permissionObserver, "perm-changed");
 
   if (gUsageRequest) {
     gUsageRequest.cancel();
     gUsageRequest = null;
   }
 }
 
-function initRow(aPartId)
-{
+function initRow(aPartId) {
   if (aPartId == "plugins") {
     initPluginsRow();
     return;
   }
 
   createRow(aPartId);
 
   var checkbox = document.getElementById(aPartId + "Def");
   var command  = document.getElementById("cmd_" + aPartId + "Toggle");
   var perm = SitePermissions.get(gPermURI, aPartId);
 
   if (perm) {
     checkbox.checked = false;
     command.removeAttribute("disabled");
-  }
-  else {
+  } else {
     checkbox.checked = true;
     command.setAttribute("disabled", "true");
     perm = SitePermissions.getDefault(aPartId);
   }
   setRadioState(aPartId, perm);
 
   if (aPartId == "indexedDB") {
     initIndexedDBRow();
@@ -147,52 +141,47 @@ function createRow(aPartId) {
   }
   controls.appendChild(radiogroup);
 
   row.appendChild(controls);
 
   document.getElementById("permList").appendChild(row);
 }
 
-function onCheckboxClick(aPartId)
-{
+function onCheckboxClick(aPartId) {
   var command  = document.getElementById("cmd_" + aPartId + "Toggle");
   var checkbox = document.getElementById(aPartId + "Def");
   if (checkbox.checked) {
     SitePermissions.remove(gPermURI, aPartId);
     command.setAttribute("disabled", "true");
     var perm = SitePermissions.getDefault(aPartId);
     setRadioState(aPartId, perm);
-  }
-  else {
+  } else {
     onRadioClick(aPartId);
     command.removeAttribute("disabled");
   }
 }
 
 function onPluginRadioClick(aEvent) {
   onRadioClick(aEvent.originalTarget.getAttribute("id").split('#')[0]);
 }
 
-function onRadioClick(aPartId)
-{
+function onRadioClick(aPartId) {
   var radioGroup = document.getElementById(aPartId + "RadioGroup");
   var id = radioGroup.selectedItem.id;
   var permission = id.split('#')[1];
   SitePermissions.set(gPermURI, aPartId, permission);
 }
 
-function setRadioState(aPartId, aValue)
-{
+function setRadioState(aPartId, aValue) {
   var radio = document.getElementById(aPartId + "#" + aValue);
   radio.radioGroup.selectedItem = radio;
 }
 
-function initIndexedDBRow()
-{
+function initIndexedDBRow() {
   let row = document.getElementById("perm-indexedDB-row");
   let extras = document.getElementById("perm-indexedDB-extras");
 
   row.appendChild(extras);
 
   var quotaManagerService =
     Components.classes["@mozilla.org/dom/quota-manager-service;1"]
               .getService(nsIQuotaManagerService);
@@ -203,32 +192,30 @@ function initIndexedDBRow()
   var status = document.getElementById("indexedDBStatus");
   var button = document.getElementById("indexedDBClear");
 
   status.value = "";
   status.setAttribute("hidden", "true");
   button.setAttribute("hidden", "true");
 }
 
-function onIndexedDBClear()
-{
+function onIndexedDBClear() {
   Components.classes["@mozilla.org/dom/quota-manager-service;1"]
             .getService(nsIQuotaManagerService)
             .clearStoragesForPrincipal(gPermPrincipal);
 
   Components.classes["@mozilla.org/serviceworkers/manager;1"]
             .getService(Components.interfaces.nsIServiceWorkerManager)
             .removeAndPropagate(gPermURI.host);
 
   SitePermissions.remove(gPermURI, "indexedDB");
   initIndexedDBRow();
 }
 
-function onIndexedDBUsageCallback(request)
-{
+function onIndexedDBUsageCallback(request) {
   let uri = request.principal.URI;
   if (!uri.equals(gPermURI)) {
     throw new Error("Callback received for bad URI: " + uri);
   }
 
   if (request.usage) {
     if (!("DownloadUtils" in window)) {
       Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
--- a/browser/base/content/pageinfo/security.js
+++ b/browser/base/content/pageinfo/security.js
@@ -66,18 +66,17 @@ var security = {
         certificateTransparency : undefined
       };
 
       var version;
       try {
         retval.encryptionAlgorithm = status.cipherName;
         retval.encryptionStrength = status.secretKeyLength;
         version = status.protocolVersion;
-      }
-      catch (e) {
+      } catch (e) {
       }
 
       switch (version) {
         case nsISSLStatus.SSL_VERSION_3:
           retval.version = "SSL 3";
           break;
         case nsISSLStatus.TLS_VERSION_1:
           retval.version = "TLS 1.0";
@@ -147,38 +146,35 @@ var security = {
 
     // No mapping required
     return name;
   },
 
   /**
    * Open the cookie manager window
    */
-  viewCookies()
-  {
+  viewCookies() {
     var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                        .getService(Components.interfaces.nsIWindowMediator);
     var win = wm.getMostRecentWindow("Browser:Cookies");
     var eTLDService = Components.classes["@mozilla.org/network/effective-tld-service;1"].
                       getService(Components.interfaces.nsIEffectiveTLDService);
 
     var eTLD;
     try {
       eTLD = eTLDService.getBaseDomain(this.uri);
-    }
-    catch (e) {
+    } catch (e) {
       // getBaseDomain will fail if the host is an IP address or is empty
       eTLD = this.uri.asciiHost;
     }
 
     if (win) {
       win.gCookiesWindow.setFilter(eTLD);
       win.focus();
-    }
-    else
+    } else
       window.openDialog("chrome://browser/content/preferences/cookies.xul",
                         "Browser:Cookies", "", {filterString : eTLD});
   },
 
   /**
    * Open the login manager window
    */
   viewPasswords() {
@@ -206,66 +202,61 @@ function securityOnLoad(uri, windowInfo)
   var owner, verifier;
   if (info.cert && !info.isBroken) {
     // Try to pull out meaningful values.  Technically these fields are optional
     // so we'll employ fallbacks where appropriate.  The EV spec states that Org
     // fields must be specified for subject and issuer so that case is simpler.
     if (info.isEV) {
       owner = info.cert.organization;
       verifier = security.mapIssuerOrganization(info.cAName);
-    }
-    else {
+    } else {
       // Technically, a non-EV cert might specify an owner in the O field or not,
       // depending on the CA's issuing policies.  However we don't have any programmatic
       // way to tell those apart, and no policy way to establish which organization
       // vetting standards are good enough (that's what EV is for) so we default to
       // treating these certs as domain-validated only.
       owner = pageInfoBundle.getString("securityNoOwner");
       verifier = security.mapIssuerOrganization(info.cAName ||
                                                 info.cert.issuerCommonName ||
                                                 info.cert.issuerName);
     }
-  }
-  else {
+  } else {
     // We don't have valid identity credentials.
     owner = pageInfoBundle.getString("securityNoOwner");
     verifier = pageInfoBundle.getString("notset");
   }
 
   setText("security-identity-owner-value", owner);
   setText("security-identity-verifier-value", verifier);
 
   /* Manage the View Cert button*/
   var viewCert = document.getElementById("security-view-cert");
   if (info.cert) {
     security._cert = info.cert;
     viewCert.collapsed = false;
-  }
-  else
+  } else
     viewCert.collapsed = true;
 
   /* Set Privacy & History section text */
   var yesStr = pageInfoBundle.getString("yes");
   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) {
     setText("security-privacy-history-value",
             pageInfoBundle.getFormattedString("securityNVisits", [visitCount.toLocaleString()]));
-  }
-  else if (visitCount == 1) {
+  } else if (visitCount == 1) {
     setText("security-privacy-history-value",
             pageInfoBundle.getString("securityOneVisit"));
-  }
-  else {
+  } else {
     setText("security-privacy-history-value", noStr);
   }
 
   /* Set the Technical Detail section messages */
   const pkiBundle = document.getElementById("pkiBundle");
   var hdr;
   var msg1;
   var msg2;
@@ -277,27 +268,25 @@ function securityOnLoad(uri, windowInfo)
     } else {
       hdr = pkiBundle.getFormattedString("pageInfo_BrokenEncryption",
                                          [info.encryptionAlgorithm,
                                           info.encryptionStrength + "",
                                           info.version]);
       msg1 = pkiBundle.getString("pageInfo_WeakCipher");
     }
     msg2 = pkiBundle.getString("pageInfo_Privacy_None2");
-  }
-  else if (info.encryptionStrength > 0) {
+  } else if (info.encryptionStrength > 0) {
     hdr = pkiBundle.getFormattedString("pageInfo_EncryptionWithBitsAndProtocol",
                                        [info.encryptionAlgorithm,
                                         info.encryptionStrength + "",
                                         info.version]);
     msg1 = pkiBundle.getString("pageInfo_Privacy_Encrypted1");
     msg2 = pkiBundle.getString("pageInfo_Privacy_Encrypted2");
     security._cert = info.cert;
-  }
-  else {
+  } else {
     hdr = pkiBundle.getString("pageInfo_NoEncryption");
     if (info.hostName != null)
       msg1 = pkiBundle.getFormattedString("pageInfo_Privacy_None1", [info.hostName]);
     else
       msg1 = pkiBundle.getString("pageInfo_Privacy_None4");
     msg2 = pkiBundle.getString("pageInfo_Privacy_None2");
   }
   setText("security-technical-shortform", hdr);
@@ -310,33 +299,31 @@ function securityOnLoad(uri, windowInfo)
     ctStatus.hidden = false;
     ctStatus.value = pkiBundle.getString(
       "pageInfo_CertificateTransparency_" + info.certificateTransparency);
   } else {
     ctStatus.hidden = true;
   }
 }
 
-function setText(id, value)
-{
+function setText(id, value) {
   var element = document.getElementById(id);
   if (!element)
     return;
   if (element.localName == "textbox" || element.localName == "label")
     element.value = value;
   else {
     if (element.hasChildNodes())
       element.removeChild(element.firstChild);
     var textNode = document.createTextNode(value);
     element.appendChild(textNode);
   }
 }
 
-function viewCertHelper(parent, cert)
-{
+function viewCertHelper(parent, cert) {
   if (!cert)
     return;
 
   var cd = Components.classes[CERTIFICATEDIALOGS_CONTRACTID].getService(nsICertificateDialogs);
   cd.viewCert(parent, cert);
 }
 
 /**
--- a/browser/base/content/sanitize.js
+++ b/browser/base/content/sanitize.js
@@ -33,25 +33,23 @@ XPCOMUtils.defineLazyModuleGetter(this, 
  * to the system.
  */
 const YIELD_PERIOD = 10;
 
 function Sanitizer() {
 }
 Sanitizer.prototype = {
   // warning to the caller: this one may raise an exception (e.g. bug #265028)
-  clearItem(aItemName)
-  {
+  clearItem(aItemName) {
     this.items[aItemName].clear();
   },
 
   prefDomain: "",
 
-  getNameFromPreference(aPreferenceName)
-  {
+  getNameFromPreference(aPreferenceName) {
     return aPreferenceName.substr(this.prefDomain.length);
   },
 
   /**
    * Deletes privacy sensitive data in a batch, according to user preferences.
    * Returns a promise which is resolved if no errors occurred.  If an error
    * occurs, a message is reported to the console and all other items are still
    * cleared before the promise is finally rejected.
@@ -249,18 +247,17 @@ Sanitizer.prototype = {
                 cookieMgr.remove(cookie.host, cookie.name, cookie.path,
                                  false, cookie.originAttributes);
 
                 if (++yieldCounter % YIELD_PERIOD == 0) {
                   yield new Promise(resolve => setTimeout(resolve, 0)); // Don't block the main thread too long
                 }
               }
             }
-          }
-          else {
+          } else {
             // Remove everything
             cookieMgr.removeAll();
             yield new Promise(resolve => setTimeout(resolve, 0)); // Don't block the main thread too long
           }
         } catch (ex) {
           seenException = ex;
         } finally {
           TelemetryStopwatch.finish("FX_SANITIZE_COOKIES_2", refObj);
@@ -788,43 +785,40 @@ Sanitizer.clearPluginData = Task.async(f
   });
 
   if (seenException) {
     throw seenException;
   }
 });
 
 Sanitizer._prefs = null;
-Sanitizer.__defineGetter__("prefs", function()
-{
+Sanitizer.__defineGetter__("prefs", function() {
   return Sanitizer._prefs ? Sanitizer._prefs
     : Sanitizer._prefs = Components.classes["@mozilla.org/preferences-service;1"]
                          .getService(Components.interfaces.nsIPrefService)
                          .getBranch(Sanitizer.PREF_DOMAIN);
 });
 
 // Shows sanitization UI
-Sanitizer.showUI = function(aParentWindow)
-{
+Sanitizer.showUI = function(aParentWindow) {
   let win = AppConstants.platform == "macosx" ?
     null : // make this an app-modal window on Mac
     aParentWindow;
   Services.ww.openWindow(win,
                          "chrome://browser/content/sanitize.xul",
                          "Sanitize",
                          "chrome,titlebar,dialog,centerscreen,modal",
                          null);
 };
 
 /**
  * Deletes privacy sensitive data in a batch, optionally showing the
  * sanitize UI, according to user preferences
  */
-Sanitizer.sanitize = function(aParentWindow)
-{
+Sanitizer.sanitize = function(aParentWindow) {
   Sanitizer.showUI(aParentWindow);
 };
 
 Sanitizer.onStartup = Task.async(function*() {
   // Check if we were interrupted during the last shutdown sanitization.
   let shutownSanitizationWasInterrupted =
     Preferences.get(Sanitizer.PREF_SANITIZE_ON_SHUTDOWN, false) &&
     !Preferences.has(Sanitizer.PREF_SANITIZE_DID_SHUTDOWN);
--- a/browser/base/content/sync/aboutSyncTabs.js
+++ b/browser/base/content/sync/aboutSyncTabs.js
@@ -67,18 +67,17 @@ var RemoteTabViewer = {
       let hide = false;
       if (item.getAttribute("type") == "tab") {
         if (!item.getAttribute("url").toLowerCase().includes(val) &&
             !item.getAttribute("title").toLowerCase().includes(val)) {
           hide = true;
         } else {
           clientTabs++;
         }
-      }
-      else if (item.getAttribute("type") == "client") {
+      } else if (item.getAttribute("type") == "client") {
         if (currentClient) {
           if (clientTabs == 0) {
             currentClient.hidden = true;
           }
         }
         currentClient = item;
         clientTabs = 0;
       }
@@ -301,18 +300,17 @@ var RemoteTabViewer = {
   },
 
   _refetchTabs(force) {
     if (!force) {
       // Don't bother refetching tabs if we already did so recently
       let lastFetch = 0;
       try {
         lastFetch = Services.prefs.getIntPref("services.sync.lastTabFetch");
-      }
-      catch (e) {
+      } catch (e) {
         /* Just use the default value of 0 */
       }
 
       let now = Math.floor(Date.now() / 1000);
       if (now - lastFetch < 30) {
         return false;
       }
     }
--- a/browser/base/content/sync/genericChange.js
+++ b/browser/base/content/sync/genericChange.js
@@ -60,18 +60,17 @@ var Change = {
         document.getElementById("passphraseSpacer").hidden = false;
 
         if (this._updatingPassphrase) {
           document.getElementById("passphraseHelpBox").hidden = false;
           document.title = this._str("new.recoverykey.title");
           introText.textContent = this._str("new.recoverykey.introText");
           this._dialog.getButton("finish").label
             = this._str("new.recoverykey.acceptButton");
-        }
-        else {
+        } else {
           document.getElementById("generatePassphraseButton").hidden = false;
           document.getElementById("passphraseBackupButtons").hidden = false;
           this._passphraseBox.setAttribute("readonly", "true");
           let pp = Weave.Service.identity.syncKey;
           if (Weave.Utils.isPassphrase(pp))
              pp = Weave.Utils.hyphenatePassphrase(pp);
           this._passphraseBox.value = pp;
           this._passphraseBox.focus();
@@ -92,18 +91,17 @@ var Change = {
         box1label.value = this._str("new.password.label");
 
         if (this._currentPasswordInvalid) {
           document.title = this._str("new.password.title");
           introText.textContent = this._str("new.password.introText");
           this._dialog.getButton("finish").label
             = this._str("new.password.acceptButton");
           document.getElementById("textBox2Row").hidden = true;
-        }
-        else {
+        } else {
           document.title = this._str("change.password.title");
           box2label.value = this._str("new.password.confirm");
           introText.textContent = this._str("change.password3.introText");
           warningText.textContent = this._str("change.password.warningText");
           this._dialog.getButton("finish").label
             = this._str("change.password.acceptButton");
         }
         break;
@@ -156,22 +154,20 @@ var Change = {
   doChangePassphrase: function Change_doChangePassphrase() {
     let pp = Weave.Utils.normalizePassphrase(this._passphraseBox.value);
     if (this._updatingPassphrase) {
       Weave.Service.identity.syncKey = pp;
       if (Weave.Service.login()) {
         this._updateStatus("change.recoverykey.success", "success");
         Weave.Service.persistLogin();
         Weave.Service.scheduler.delayedAutoConnect(0);
-      }
-      else {
+      } else {
         this._updateStatus("new.passphrase.status.incorrect", "error");
       }
-    }
-    else {
+    } else {
       this._updateStatus("change.recoverykey.label", "active");
 
       if (Weave.Service.changePassphrase(pp))
         this._updateStatus("change.recoverykey.success", "success");
       else
         this._updateStatus("change.recoverykey.error", "error");
     }
 
@@ -179,22 +175,20 @@ var Change = {
   },
 
   doChangePassword: function Change_doChangePassword() {
     if (this._currentPasswordInvalid) {
       Weave.Service.identity.basicPassword = this._firstBox.value;
       if (Weave.Service.login()) {
         this._updateStatus("change.password.status.success", "success");
         Weave.Service.persistLogin();
-      }
-      else {
+      } else {
         this._updateStatus("new.password.status.incorrect", "error");
       }
-    }
-    else {
+    } else {
       this._updateStatus("change.password.status.active", "active");
 
       if (Weave.Service.changePassword(this._firstBox.value))
         this._updateStatus("change.password.status.success", "success");
       else
         this._updateStatus("change.password.status.error", "error");
     }
 
@@ -205,18 +199,17 @@ var Change = {
     let valid = false;
     let errorString = "";
 
     if (this._dialogType == "ChangePassword") {
       if (this._currentPasswordInvalid)
         [valid, errorString] = gSyncUtils.validatePassword(this._firstBox);
       else
         [valid, errorString] = gSyncUtils.validatePassword(this._firstBox, this._secondBox);
-    }
-    else {
+    } else {
       if (!this._updatingPassphrase)
         return;
 
       valid = this._passphraseBox.value != "";
     }
 
     if (errorString == "")
       this._clearStatus();
--- a/browser/base/content/sync/setup.js
+++ b/browser/base/content/sync/setup.js
@@ -720,18 +720,17 @@ var gSyncSetup = {
     if (addExceptions) {
       this._remoteSites.forEach(function(site) {
         site = ns.getSite(site);
         if (!ns.isJSEnabled(site)) {
           this._disabledSites.push(site); // save status
           ns.setJSEnabled(site, true); // allow site
         }
       }, this);
-    }
-    else {
+    } else {
       this._disabledSites.forEach(function(site) {
         ns.setJSEnabled(site, false);
       });
       this._disabledSites = [];
     }
   },
 
   onExistingServerCommand() {
@@ -796,18 +795,17 @@ var gSyncSetup = {
     delete this._checkServerTimer;
     let el = document.getElementById("server");
     let valid = false;
     let feedback = document.getElementById("serverFeedbackRow");
     if (el.value) {
       valid = this._validateServer(el);
       let str = valid ? "" : "serverInvalid.label";
       this._setFeedbackMessage(feedback, valid, str);
-    }
-    else
+    } else
       this._setFeedbackMessage(feedback, true);
 
     // Recheck account against the new server.
     if (valid)
       this.checkAccount();
 
     this.status.server = valid;
     this.checkFields();
@@ -840,18 +838,17 @@ var gSyncSetup = {
           uri.scheme = "http";
       }
       if (!valid)
         valid = isValid(uri);
 
       if (valid) {
         this.loadCaptcha();
       }
-    }
-    else if (uri) {
+    } else if (uri) {
       valid = true;
       Weave.Service.serverURL = uri.spec;
     }
 
     if (valid)
       element.value = Weave.Service.serverURL;
     else
       Weave.Svc.Prefs.reset("serverURL");
--- a/browser/base/content/sync/utils.js
+++ b/browser/base/content/sync/utils.js
@@ -74,26 +74,26 @@ var gSyncUtils = {
   },
 
   resetPassword() {
     this._openLink(Weave.Service.pwResetURL);
   },
 
   get tosURL() {
     let root = this.fxAccountsEnabled ? "fxa." : "";
-    return  Weave.Svc.Prefs.get(root + "termsURL");
+    return Weave.Svc.Prefs.get(root + "termsURL");
   },
 
   openToS() {
     this._openLink(this.tosURL);
   },
 
   get privacyPolicyURL() {
     let root = this.fxAccountsEnabled ? "fxa." : "";
-    return  Weave.Svc.Prefs.get(root + "privacyURL");
+    return Weave.Svc.Prefs.get(root + "privacyURL");
   },
 
   openPrivacyPolicy() {
     this._openLink(this.privacyPolicyURL);
   },
 
   /**
    * Prepare an invisible iframe with the passphrase backup document.
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -628,18 +628,17 @@
               try {
                 aRequest.QueryInterface(nsIChannel)
                 location = aRequest.URI;
                 originalLocation = aRequest.originalURI;
               } catch (ex) {}
 
               if (aStateFlags & nsIWebProgressListener.STATE_START) {
                 this.mRequestCount++;
-              }
-              else if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
+              } else if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
                 const NS_ERROR_UNKNOWN_HOST = 2152398878;
                 if (--this.mRequestCount > 0 && aStatus == NS_ERROR_UNKNOWN_HOST) {
                   // to prevent bug 235825: wait for the request handled
                   // by the automatic keyword resolver
                   return;
                 }
                 // since we (try to) only handle STATE_STOP of the last request,
                 // the count of open requests should now be 0
@@ -681,19 +680,18 @@
                     if (aWebProgress.isTopLevel &&
                         !(aWebProgress.loadType & Ci.nsIDocShell.LOAD_CMD_RELOAD))
                       this.mTabBrowser.setTabTitleLoading(this.mTab);
                   }
 
                   if (this.mTab.selected)
                     this.mTabBrowser.mIsBusy = true;
                 }
-              }
-              else if (aStateFlags & nsIWebProgressListener.STATE_STOP &&
-                       aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
+              } else if (aStateFlags & nsIWebProgressListener.STATE_STOP &&
+                         aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
 
                 if (this.mTab.hasAttribute("busy")) {
                   this.mTab.removeAttribute("busy");
                   this.mTabBrowser._tabAttrModified(this.mTab, ["busy"]);
                   if (!this.mTab.selected)
                     this.mTab.setAttribute("unread", "true");
                 }
                 this.mTab.removeAttribute("progress");
@@ -904,18 +902,17 @@
               if (sizedIconUrl) {
                 aTab.setAttribute("image", sizedIconUrl);
                 if (!browser.mIconLoadingPrincipal ||
                     !browser.mIconLoadingPrincipal.equals(loadingPrincipal)) {
                   aTab.setAttribute("iconLoadingPrincipal",
                     this.serializationHelper.serializeToString(loadingPrincipal));
                   browser.mIconLoadingPrincipal = loadingPrincipal;
                 }
-              }
-              else {
+              } else {
                 aTab.removeAttribute("image");
                 aTab.removeAttribute("iconLoadingPrincipal");
                 delete browser.mIconLoadingPrincipal;
               }
               this._tabAttrModified(aTab, ["image"]);
             }
 
             this._callProgressListeners(browser, "onLinkIconAvailable", [browser.mIconURL]);
@@ -1658,18 +1655,17 @@
             if (targetTabIndex !== -1)
               this.moveTabTo(tab, ++tabNum);
           }
 
           if (!aLoadInBackground) {
             if (firstTabAdded) {
               // .selectedTab setter focuses the content area
               this.selectedTab = firstTabAdded;
-            }
-            else
+            } else
               this.selectedBrowser.focus();
           }
         ]]></body>
       </method>
 
       <method name="updateBrowserRemoteness">
         <parameter name="aBrowser"/>
         <parameter name="aShouldBeRemote"/>
@@ -3974,18 +3970,17 @@
                 if (this.tabbrowser._printPreviewBrowsers.has(tab.linkedBrowser)) {
                   continue;
                 }
 
                 if (state == this.STATE_LOADED &&
                     !this.maybeVisibleTabs.has(tab) &&
                     tab !== this.lastVisibleTab &&
                     tab !== this.loadingTab &&
-                    tab !== this.requestedTab)
-                {
+                    tab !== this.requestedTab) {
                   this.setTabState(tab, this.STATE_UNLOADING);
                 }
 
                 if (state != this.STATE_UNLOADED && tab !== this.requestedTab) {
                   numPending++;
                 }
               }
 
@@ -6486,18 +6481,17 @@
           let captureListener;
           let platform = this.tabbrowser.AppConstants.platform;
           // On Windows and Mac we can update the drag image during a drag
           // using updateDragImage. On Linux, we can use a panel.
           if (platform == "win" || platform == "macosx") {
             captureListener = function() {
               dt.updateDragImage(canvas, dragImageOffset, dragImageOffset);
             }
-          }
-          else {
+          } else {
             // Create a panel to use it in setDragImage
             // which will tell xul to render a panel that follows
             // the pointer while a dnd session is on.
             if (!this._dndPanel) {
               this._dndCanvas = canvas;
               this._dndPanel = document.createElement("panel");
               this._dndPanel.className = "dragfeedback-tab";
               this._dndPanel.setAttribute("type", "drag");
@@ -6600,27 +6594,25 @@
           let scrollRect = tabStrip.scrollClientRect;
           let minMargin = scrollRect.left - rect.left;
           let maxMargin = Math.min(minMargin + scrollRect.width,
                                    scrollRect.right);
           if (!ltr)
             [minMargin, maxMargin] = [this.clientWidth - maxMargin,
                                       this.clientWidth - minMargin];
           newMargin = (pixelsToScroll > 0) ? maxMargin : minMargin;
-        }
-        else {
+        } else {
           let newIndex = this._getDropIndex(event, effects == "link");
           if (newIndex == this.childNodes.length) {
             let tabRect = this.childNodes[newIndex - 1].getBoundingClientRect();
             if (ltr)
               newMargin = tabRect.right - rect.left;
             else
               newMargin = rect.right - tabRect.left;
-          }
-          else {
+          } else {
             let tabRect = this.childNodes[newIndex].getBoundingClientRect();
             if (ltr)
               newMargin = tabRect.left - rect.left;
             else
               newMargin = rect.right - tabRect.right;
           }
         }
 
--- a/browser/base/content/test/general/browser_aboutAccounts.js
+++ b/browser/base/content/test/general/browser_aboutAccounts.js
@@ -35,18 +35,17 @@ registerCleanupFunction(function() {
 
 var gTests = [
 {
   desc: "Test the remote commands",
   *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  *run()
-  {
+  *run() {
     setPref("identity.fxaccounts.remote.signup.uri",
             "https://example.com/browser/browser/base/content/test/general/accounts_testRemoteCommands.html");
     let tab = yield promiseNewTabLoadEvent("about:accounts");
     let mm = tab.linkedBrowser.messageManager;
 
     let deferred = Promise.defer();
 
     // We'll get a message when openPrefs() is called, which this test should
@@ -71,18 +70,17 @@ var gTests = [
     }
     yield deferred.promise;
     yield promisePrefsOpened;
   }
 },
 {
   desc: "Test action=signin - no user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  *run()
-  {
+  *run() {
     // When this loads with no user logged-in, we expect the "normal" URL
     const expected_url = "https://example.com/?is_sign_in";
     setPref("identity.fxaccounts.remote.signin.uri", expected_url);
     let [tab, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin");
     is(url, expected_url, "action=signin got the expected URL");
     // we expect the remote iframe to be shown.
     yield checkVisibilities(tab, {
       stage: false, // parent of 'manage' and 'intro'
@@ -94,18 +92,17 @@ var gTests = [
   }
 },
 {
   desc: "Test action=signin - user logged in",
   *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  *run()
-  {
+  *run() {
     // When this loads with a user logged-in, we expect the normal URL to
     // have been ignored and the "manage" page to be shown.
     const expected_url = "https://example.com/?is_sign_in";
     setPref("identity.fxaccounts.remote.signin.uri", expected_url);
     yield setSignedInUser();
     let tab = yield promiseNewTabLoadEvent("about:accounts?action=signin");
     // about:accounts initializes after fetching the current user from Fxa -
     // so we also request it - by the time we get it we know it should have
@@ -119,18 +116,17 @@ var gTests = [
       remote: false,
       networkError: false
     });
   }
 },
 {
   desc: "Test action=signin - captive portal",
   teardown: () => gBrowser.removeCurrentTab(),
-  *run()
-  {
+  *run() {
     const signinUrl = "https://redirproxy.example.com/test";
     setPref("identity.fxaccounts.remote.signin.uri", signinUrl);
     let [tab, ] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin");
     yield checkVisibilities(tab, {
       stage: true, // parent of 'manage' and 'intro'
       manage: false,
       intro: false, // this is  "get started"
       remote: false,
@@ -139,18 +135,17 @@ var gTests = [
   }
 },
 {
   desc: "Test action=signin - offline",
   teardown: () => {
     gBrowser.removeCurrentTab();
     BrowserOffline.toggleOfflineStatus();
   },
-  *run()
-  {
+  *run() {
     BrowserOffline.toggleOfflineStatus();
     Services.cache2.clear();
 
     const signinUrl = "https://unknowndomain.cow";
     setPref("identity.fxaccounts.remote.signin.uri", signinUrl);
     let [tab, ] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin");
     yield checkVisibilities(tab, {
       stage: true, // parent of 'manage' and 'intro'
@@ -159,18 +154,17 @@ var gTests = [
       remote: false,
       networkError: true
     });
   }
 },
 {
   desc: "Test action=signup - no user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  *run()
-  {
+  *run() {
     const expected_url = "https://example.com/?is_sign_up";
     setPref("identity.fxaccounts.remote.signup.uri", expected_url);
     let [tab, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signup");
     is(url, expected_url, "action=signup got the expected URL");
     // we expect the remote iframe to be shown.
     yield checkVisibilities(tab, {
       stage: false, // parent of 'manage' and 'intro'
       manage: false,
@@ -178,18 +172,17 @@ var gTests = [
       remote: true,
       networkError: false
     });
   },
 },
 {
   desc: "Test action=signup - user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  *run()
-  {
+  *run() {
     const expected_url = "https://example.com/?is_sign_up";
     setPref("identity.fxaccounts.remote.signup.uri", expected_url);
     yield setSignedInUser();
     let tab = yield promiseNewTabLoadEvent("about:accounts?action=signup");
     yield fxAccounts.getSignedInUser();
     // we expect "manage" to be shown.
     yield checkVisibilities(tab, {
       stage: true, // parent of 'manage' and 'intro'
@@ -201,36 +194,34 @@ var gTests = [
   },
 },
 {
   desc: "Test action=reauth",
   *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  *run()
-  {
+  *run() {
     const expected_url = "https://example.com/?is_force_auth";
     setPref("identity.fxaccounts.remote.force_auth.uri", expected_url);
 
     yield setSignedInUser();
     let [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=reauth");
     // The current user will be appended to the url
     let expected = expected_url + "&email=foo%40example.com";
     is(url, expected, "action=reauth got the expected URL");
   },
 },
 {
   desc: "Test with migrateToDevEdition enabled (success)",
   *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  *run()
-  {
+  *run() {
     let fxAccountsCommon = {};
     Cu.import("resource://gre/modules/FxAccountsCommon.js", fxAccountsCommon);
     const pref = "identity.fxaccounts.migrateToDevEdition";
     changedPrefs.add(pref);
     Services.prefs.setBoolPref(pref, true);
 
     // Create the signedInUser.json file that will be used as the source of
     // migrated user data.
@@ -280,18 +271,17 @@ var gTests = [
   },
 },
 {
   desc: "Test with migrateToDevEdition enabled (no user to migrate)",
   *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  *run()
-  {
+  *run() {
     const pref = "identity.fxaccounts.migrateToDevEdition";
     changedPrefs.add(pref);
     Services.prefs.setBoolPref(pref, true);
 
     let profD = Services.dirsvc.get("ProfD", Ci.nsIFile);
     let mockDir = profD.clone();
     mockDir.append("about-accounts-mock-profd");
     mockDir.createUnique(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
@@ -397,18 +387,17 @@ var gTests = [
     let [, url] =
       yield promiseNewTabWithIframeLoadEvent("about:accounts?" + queryStr +
                                              "&action=action");
     is(url, signupURL + "&" + queryStr, "URL params are copied to signup URL");
   },
 },
 ]; // gTests
 
-function test()
-{
+function test() {
   waitForExplicitFinish();
 
   Task.spawn(function* () {
     for (let testCase of gTests) {
       info(testCase.desc);
       try {
         yield testCase.run();
       } finally {
@@ -425,18 +414,17 @@ function promiseOneMessage(tab, messageN
   let deferred = Promise.defer();
   mm.addMessageListener(messageName, function onmessage(message) {
     mm.removeMessageListener(messageName, onmessage);
     deferred.resolve(message);
   });
   return deferred.promise;
 }
 
-function promiseNewTabLoadEvent(aUrl)
-{
+function promiseNewTabLoadEvent(aUrl) {
   let tab = gBrowser.selectedTab = gBrowser.addTab(aUrl);
   let browser = tab.linkedBrowser;
   let mm = browser.messageManager;
 
   // give it an e10s-friendly content script to help with our tests,
   // and wait for it to tell us about the load.
   let promise = promiseOneMessage(tab, "test:document:load");
   mm.loadFrameScript(CHROME_BASE + "content_aboutAccounts.js", true);
--- a/browser/base/content/test/general/browser_aboutCertError.js
+++ b/browser/base/content/test/general/browser_aboutCertError.js
@@ -371,29 +371,27 @@ function getCertChain(securityInfoAsStri
   while (certs.hasMoreElements()) {
     let cert = certs.getNext();
     cert.QueryInterface(Ci.nsIX509Cert);
     certChain += getPEMString(cert);
   }
   return certChain;
 }
 
-function getDERString(cert)
-{
+function getDERString(cert) {
   var length = {};
   var derArray = cert.getRawDER(length);
   var derString = '';
   for (var i = 0; i < derArray.length; i++) {
     derString += String.fromCharCode(derArray[i]);
   }
   return derString;
 }
 
-function getPEMString(cert)
-{
+function getPEMString(cert) {
   var derb64 = btoa(getDERString(cert));
   // Wrap the Base64 string into lines of 64 characters,
   // with CRLF line breaks (as specified in RFC 1421).
   var wrapped = derb64.replace(/(\S{64}(?!$))/g, "$1\r\n");
   return "-----BEGIN CERTIFICATE-----\r\n"
          + wrapped
          + "\r\n-----END CERTIFICATE-----\r\n";
 }
--- a/browser/base/content/test/general/browser_aboutHealthReport.js
+++ b/browser/base/content/test/general/browser_aboutHealthReport.js
@@ -56,53 +56,49 @@ function* setupPingArchive() {
     p.id = yield scope.TelemetryController.submitExternalPing(p.type, p.payload);
   }
 }
 
 var gTests = [
 
 {
   desc: "Test the remote commands",
-  setup: Task.async(function*()
-  {
+  setup: Task.async(function*() {
     Preferences.set(TELEMETRY_LOG_PREF, "Trace");
     yield setupPingArchive();
     Preferences.set("datareporting.healthreport.about.reportUrl",
                     HTTPS_BASE + "healthreport_testRemoteCommands.html");
   }),
-  run(iframe)
-  {
+  run(iframe) {
     let deferred = Promise.defer();
     let results = 0;
     try {
       iframe.contentWindow.addEventListener("FirefoxHealthReportTestResponse", function evtHandler(event) {
         let data = event.detail.data;
         if (data.type == "testResult") {
           ok(data.pass, data.info);
           results++;
-        }
-        else if (data.type == "testsComplete") {
+        } else if (data.type == "testsComplete") {
           is(results, data.count, "Checking number of results received matches the number of tests that should have run");
           iframe.contentWindow.removeEventListener("FirefoxHealthReportTestResponse", evtHandler, true);
           deferred.resolve();
         }
       }, true);
 
     } catch (e) {
       ok(false, "Failed to get all commands");
       deferred.reject();
     }
     return deferred.promise;
   }
 },
 
 ]; // gTests
 
-function test()
-{
+function test() {
   waitForExplicitFinish();
 
   // xxxmpc leaving this here until we resolve bug 854038 and bug 854060
   requestLongerTimeout(10);
 
   Task.spawn(function* () {
     for (let testCase of gTests) {
       info(testCase.desc);
@@ -114,18 +110,17 @@ function test()
 
       gBrowser.removeCurrentTab();
     }
 
     finish();
   });
 }
 
-function promiseNewTabLoadEvent(aUrl, aEventType = "load")
-{
+function promiseNewTabLoadEvent(aUrl, aEventType = "load") {
   let deferred = Promise.defer();
   let tab = gBrowser.selectedTab = gBrowser.addTab(aUrl);
   tab.linkedBrowser.addEventListener(aEventType, function load(event) {
     tab.linkedBrowser.removeEventListener(aEventType, load, true);
     let iframe = tab.linkedBrowser.contentDocument.getElementById("remote-report");
       iframe.addEventListener("load", function frameLoad(e) {
         if (iframe.contentWindow.location.href == "about:blank" ||
             e.target != iframe) {
--- a/browser/base/content/test/general/browser_accesskeys.js
+++ b/browser/base/content/test/general/browser_accesskeys.js
@@ -54,29 +54,27 @@ add_task(function *() {
 function childHandleFocus() {
   content.document.body.firstChild.addEventListener("focus", function focused(event) {
     let focusedElement = content.document.activeElement;
     focusedElement.blur();
     sendAsyncMessage("Test:FocusFromAccessKey", { focus: focusedElement.id })
   }, true);
 }
 
-function performAccessKey(key)
-{
+function performAccessKey(key) {
   return new Promise(resolve => {
     let mm = gBrowser.selectedBrowser.messageManager;
     mm.addMessageListener("Test:FocusFromAccessKey", function listenForFocus(msg) {
       mm.removeMessageListener("Test:FocusFromAccessKey", listenForFocus);
       resolve(msg.data.focus);
     });
 
     EventUtils.synthesizeKey(key, { altKey: true, shiftKey: true });
   });
 }
 
 // This version is used when a chrome elemnt is expected to be found for an accesskey.
-function* performAccessKeyForChrome(key, inChild)
-{
+function* performAccessKeyForChrome(key, inChild) {
   let waitFocusChangePromise = BrowserTestUtils.waitForEvent(document, "focus", true);
   EventUtils.synthesizeKey(key, { altKey: true, shiftKey: true });
   yield waitFocusChangePromise;
   return document.activeElement.id;
 }
--- a/browser/base/content/test/general/browser_bookmark_titles.js
+++ b/browser/base/content/test/general/browser_bookmark_titles.js
@@ -81,18 +81,17 @@ function* checkBookmark(uri, expected_ti
     let title = PlacesUtils.bookmarks.getItemTitle(id);
     is(title, expected_title, "Bookmark got a good default title.");
 
     PlacesUtils.bookmarks.removeItem(id);
 }
 
 // BrowserTestUtils.browserLoaded doesn't work for the about pages, so use a
 // custom page load listener.
-function promisePageLoaded(browser)
-{
+function promisePageLoaded(browser) {
   return ContentTask.spawn(browser, null, function* () {
     yield ContentTaskUtils.waitForEvent(this, "DOMContentLoaded", true,
         (event) => {
           return event.originalTarget === content.document &&
                  event.target.location.href !== "about:blank"
         });
   });
 }
--- a/browser/base/content/test/general/browser_bug1261299.js
+++ b/browser/base/content/test/general/browser_bug1261299.js
@@ -4,18 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Tests for Bug 1261299
  * Test that the service menu code path is called properly and the
  * current selection (transferable) is cached properly on the parent process.
  */
 
-add_task(function* test_content_and_chrome_selection()
-{
+add_task(function* test_content_and_chrome_selection() {
   let testPage =
     'data:text/html,' +
     '<textarea id="textarea">Write something here</textarea>';
   let DOMWindowUtils = EventUtils._getDOMWindowUtils(window);
   let selectedText;
 
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, testPage);
   yield BrowserTestUtils.synthesizeMouse("#textarea", 0, 0, {}, gBrowser.selectedBrowser);
@@ -34,18 +33,17 @@ add_task(function* test_content_and_chro
   yield BrowserTestUtils.removeTab(tab);
 });
 
 // Test switching active selection.
 // Each tab has a content selection and when you switch to that tab, its selection becomes
 // active aka the current selection.
 // Expect: The active selection is what is being sent to OSX service menu.
 
-add_task(function* test_active_selection_switches_properly()
-{
+add_task(function* test_active_selection_switches_properly() {
   let testPage1 =
     'data:text/html,' +
     '<textarea id="textarea">Write something here</textarea>';
   let testPage2 =
     'data:text/html,' +
     '<textarea id="textarea">Nothing available</textarea>';
   let DOMWindowUtils = EventUtils._getDOMWindowUtils(window);
   let selectedText;
--- a/browser/base/content/test/general/browser_bug1297539.js
+++ b/browser/base/content/test/general/browser_bug1297539.js
@@ -47,18 +47,17 @@ function* cutCurrentSelection(elementQue
       let element = content.document.querySelector(contentElementQueryString);
       is(element[contentProperty], "",
         `${contentElementQueryString} should be empty after cut (superkey + x)`);
     });
 }
 
 // Test that you are able to pasteTransferable for plain text
 // which is handled by TextEditor::PasteTransferable to paste into the editor.
-add_task(function* test_paste_transferable_plain_text()
-{
+add_task(function* test_paste_transferable_plain_text() {
   let testPage =
     'data:text/html,' +
     '<textarea id="textarea">Write something here</textarea>';
 
   yield BrowserTestUtils.withNewTab(testPage, function* (browser) {
     // Select all the content in your editor element.
     yield BrowserTestUtils.synthesizeMouse("#textarea", 0, 0, {}, browser);
     yield BrowserTestUtils.synthesizeKey("a", {accelKey: true}, browser);
@@ -79,18 +78,17 @@ add_task(function* test_paste_transferab
 
 // Test that you are able to pasteTransferable for html
 // which is handled by HTMLEditor::PasteTransferable to paste into the editor.
 //
 // On Linux,
 // BrowserTestUtils.synthesizeKey("a", {accelKey: true}, browser);
 // doesn't seem to trigger for contenteditable which is why we use
 // Selection to select the contenteditable contents.
-add_task(function* test_paste_transferable_html()
-{
+add_task(function* test_paste_transferable_html() {
   let testPage =
     'data:text/html,' +
     '<div contenteditable="true"><b>Bold Text</b><i>italics</i></div>';
 
   yield BrowserTestUtils.withNewTab(testPage, function* (browser) {
     // Select all the content in your editor element.
     yield BrowserTestUtils.synthesizeMouse("div", 0, 0, {}, browser);
     yield ContentTask.spawn(browser, {}, function* () {
--- a/browser/base/content/test/general/browser_bug409481.js
+++ b/browser/base/content/test/general/browser_bug409481.js
@@ -40,43 +40,40 @@ function runTest(event) {
   ok(div && div.textContent == "Content!", "Sidebar content loaded");
 
   var link = browser && browser.contentDocument.getElementById("link");
   sidebar.contentDocument.addEventListener("popupshown", contextMenuOpened, false);
 
   EventUtils.synthesizeMouseAtCenter(link, { type: "contextmenu", button: 2 }, browser.contentWindow);
 }
 
-function contextMenuOpened()
-{
+function contextMenuOpened() {
   var sidebar = document.getElementById("sidebar");
   sidebar.contentDocument.removeEventListener("popupshown", contextMenuOpened, false);
 
   var copyLinkCommand = sidebar.contentDocument.getElementById("context-copylink");
   copyLinkCommand.addEventListener("command", copyLinkCommandExecuted, false);
   copyLinkCommand.doCommand();
 }
 
-function copyLinkCommandExecuted(event)
-{
+function copyLinkCommandExecuted(event) {
   event.target.removeEventListener("command", copyLinkCommandExecuted, false);
 
   var sidebar = document.getElementById("sidebar");
   var browser = sidebar.contentDocument.getElementById("web-panels-browser");
   var textbox = browser && browser.contentDocument.getElementById("textbox");
   textbox.focus();
   document.commandDispatcher.getControllerForCommand("cmd_paste").doCommand("cmd_paste");
   is(textbox.value, "http://www.example.com/ctest", "copy link command");
 
   sidebar.contentDocument.addEventListener("popuphidden", contextMenuClosed, false);
   event.target.parentNode.hidePopup();
 }
 
-function contextMenuClosed()
-{
+function contextMenuClosed() {
   var sidebar = document.getElementById("sidebar");
   sidebar.contentDocument.removeEventListener("popuphidden", contextMenuClosed, false);
 
   SidebarUI.hide();
 
   ok(document.getElementById("sidebar-box").hidden, "Sidebar successfully hidden");
 
   finish();
--- a/browser/base/content/test/general/browser_bug432599.js
+++ b/browser/base/content/test/general/browser_bug432599.js
@@ -76,18 +76,17 @@ var currentInvoker = 0;
 
 var initialValue;
 var initialRemoveHidden;
 
 var popupElement = document.getElementById("editBookmarkPanel");
 var titleElement = document.getElementById("editBookmarkPanelTitle");
 var removeElement = document.getElementById("editBookmarkPanelRemoveButton");
 
-function checkBookmarksPanel(invoker, phase)
-{
+function checkBookmarksPanel(invoker, phase) {
   let onPopupShown = function(aEvent) {
     if (aEvent.originalTarget == popupElement) {
       popupElement.removeEventListener("popupshown", arguments.callee, false);
       checkBookmarksPanel(invoker, phase + 1);
     }
   };
   let onPopupHidden = function(aEvent) {
     if (aEvent.originalTarget == popupElement) {
--- a/browser/base/content/test/general/browser_bug462289.js
+++ b/browser/base/content/test/general/browser_bug462289.js
@@ -1,81 +1,74 @@
 var tab1, tab2;
 
-function focus_in_navbar()
-{
+function focus_in_navbar() {
   var parent = document.activeElement.parentNode;
   while (parent && parent.id != "nav-bar")
     parent = parent.parentNode;
 
   return parent != null;
 }
 
-function test()
-{
+function test() {
   waitForExplicitFinish();
 
   tab1 = gBrowser.addTab("about:blank", {skipAnimation: true});
   tab2 = gBrowser.addTab("about:blank", {skipAnimation: true});
 
   EventUtils.synthesizeMouseAtCenter(tab1, {});
   executeSoon(step2);
 }
 
-function step2()
-{
+function step2() {
   is(gBrowser.selectedTab, tab1, "1st click on tab1 selects tab");
   isnot(document.activeElement, tab1, "1st click on tab1 does not activate tab");
 
   EventUtils.synthesizeMouseAtCenter(tab1, {});
   executeSoon(step3);
 }
 
-function step3()
-{
+function step3() {
   is(gBrowser.selectedTab, tab1, "2nd click on selected tab1 keeps tab selected");
   isnot(document.activeElement, tab1, "2nd click on selected tab1 does not activate tab");
 
   ok(true, "focusing URLBar then sending 1 Shift+Tab.");
   gURLBar.focus();
   EventUtils.synthesizeKey("VK_TAB", {shiftKey: true});
   is(gBrowser.selectedTab, tab1, "tab key to selected tab1 keeps tab selected");
   is(document.activeElement, tab1, "tab key to selected tab1 activates tab");
 
   EventUtils.synthesizeMouseAtCenter(tab1, {});
   executeSoon(step4);
 }
 
-function step4()
-{
+function step4() {
   is(gBrowser.selectedTab, tab1, "3rd click on activated tab1 keeps tab selected");
   is(document.activeElement, tab1, "3rd click on activated tab1 keeps tab activated");
 
   gBrowser.addEventListener("TabSwitchDone", step5);
   EventUtils.synthesizeMouseAtCenter(tab2, {});
 }
 
-function step5()
-{
+function step5() {
   gBrowser.removeEventListener("TabSwitchDone", step5);
 
   // The tabbox selects a tab within a setTimeout in a bubbling mousedown event
   // listener, and focuses the current tab if another tab previously had focus.
   is(gBrowser.selectedTab, tab2, "click on tab2 while tab1 is activated selects tab");
   is(document.activeElement, tab2, "click on tab2 while tab1 is activated activates tab");
 
   info("focusing content then sending middle-button mousedown to tab2.");
   gBrowser.selectedBrowser.focus();
 
   EventUtils.synthesizeMouseAtCenter(tab2, {button: 1, type: "mousedown"});
   executeSoon(step6);
 }
 
-function step6()
-{
+function step6() {
   is(gBrowser.selectedTab, tab2, "middle-button mousedown on selected tab2 keeps tab selected");
   isnot(document.activeElement, tab2, "middle-button mousedown on selected tab2 does not activate tab");
 
   gBrowser.removeTab(tab2);
   gBrowser.removeTab(tab1);
 
   finish();
 }
--- a/browser/base/content/test/general/browser_bug553455.js
+++ b/browser/base/content/test/general/browser_bug553455.js
@@ -255,18 +255,17 @@ function test_disabledInstall() {
 
     let closePromise = waitForNotificationClose();
     // Click on Enable
     EventUtils.synthesizeMouseAtCenter(notification.button, {});
     yield closePromise;
 
     try {
       ok(Services.prefs.getBoolPref("xpinstall.enabled"), "Installation should be enabled");
-    }
-    catch (e) {
+    } catch (e) {
       ok(false, "xpinstall.enabled should be set");
     }
 
     yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
     let installs = yield getInstalls();
     is(installs.length, 0, "Shouldn't be any pending installs");
   });
 },
--- a/browser/base/content/test/general/browser_bug561636.js
+++ b/browser/base/content/test/general/browser_bug561636.js
@@ -1,83 +1,72 @@
 var gInvalidFormPopup = document.getElementById('invalid-form-popup');
 ok(gInvalidFormPopup,
    "The browser should have a popup to show when a form is invalid");
 
-function checkPopupShow()
-{
+function checkPopupShow() {
   ok(gInvalidFormPopup.state == 'showing' || gInvalidFormPopup.state == 'open',
      "[Test " + testId + "] The invalid form popup should be shown");
 }
 
-function checkPopupHide()
-{
+function checkPopupHide() {
   ok(gInvalidFormPopup.state != 'showing' && gInvalidFormPopup.state != 'open',
      "[Test " + testId + "] The invalid form popup should not be shown");
 }
 
 var gObserver = {
   QueryInterface : XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]),
 
-  notifyInvalidSubmit(aFormElement, aInvalidElements)
-  {
+  notifyInvalidSubmit(aFormElement, aInvalidElements) {
   }
 };
 
 var testId = 0;
 
-function incrementTest()
-{
+function incrementTest() {
   testId++;
   info("Starting next part of test");
 }
 
-function getDocHeader()
-{
+function getDocHeader() {
   return "<html><head><meta charset='utf-8'></head><body>" + getEmptyFrame();
 }
 
-function getDocFooter()
-{
+function getDocFooter() {
   return "</body></html>";
 }
 
-function getEmptyFrame()
-{
+function getEmptyFrame() {
   return "<iframe style='width:100px; height:30px; margin:3px; border:1px solid lightgray;' " +
          "name='t' srcdoc=\"<html><head><meta charset='utf-8'></head><body>form target</body></html>\"></iframe>";
 }
 
-function* openNewTab(uri, background)
-{
+function* openNewTab(uri, background) {
   let tab = gBrowser.addTab();
   let browser = gBrowser.getBrowserForTab(tab);
   if (!background) {
     gBrowser.selectedTab = tab;
   }
   yield promiseTabLoadEvent(tab, "data:text/html," + escape(uri));
   return browser;
 }
 
-function* clickChildElement(browser)
-{
+function* clickChildElement(browser) {
   yield ContentTask.spawn(browser, {}, function* () {
     content.document.getElementById('s').click();
   });
 }
 
-function* blurChildElement(browser)
-{
+function* blurChildElement(browser) {
   yield ContentTask.spawn(browser, {}, function* () {
     content.document.getElementById('i').blur();
   });
 }
 
-function* checkChildFocus(browser, message)
-{
+function* checkChildFocus(browser, message) {
   yield ContentTask.spawn(browser, [message, testId], function* (args) {
     let [msg, id] = args;
     var focused = content.document.activeElement == content.document.getElementById('i');
 
     var validMsg = true;
     if (msg) {
       validMsg = (msg == content.document.getElementById('i').validationMessage);
     }
@@ -85,18 +74,17 @@ function* checkChildFocus(browser, messa
     Assert.equal(focused, true, "Test " + id + " First invalid element should be focused");
     Assert.equal(validMsg, true, "Test " + id + " The panel should show the message from validationMessage");
   });
 }
 
 /**
  * In this test, we check that no popup appears if the form is valid.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   yield clickChildElement(browser);
 
   yield new Promise((resolve, reject) => {
     // XXXndeakin This isn't really going to work when the content is another process
@@ -108,18 +96,17 @@ add_task(function* ()
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that, when an invalid form is submitted,
  * the invalid element is focused and a popup appears.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input required id='i'><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -128,18 +115,17 @@ add_task(function* ()
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that, when an invalid form is submitted,
  * the first invalid element is focused and a popup appears.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input><input id='i' required><input required><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -148,18 +134,17 @@ add_task(function* ()
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that, we hide the popup by interacting with the
  * invalid element if the element becomes valid.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -172,18 +157,17 @@ add_task(function* ()
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that, we don't hide the popup by interacting with the
  * invalid element if the element is still invalid.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input type='email' id='i' required><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -200,18 +184,17 @@ add_task(function* ()
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that we can hide the popup by blurring the invalid
  * element.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -223,18 +206,17 @@ add_task(function* ()
   yield popupHiddenPromise;
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that we can hide the popup by pressing TAB.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -246,18 +228,17 @@ add_task(function* ()
   yield popupHiddenPromise;
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that the popup will hide if we move to another tab.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>" + getDocFooter();
   let browser1 = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser1);
   yield popupShownPromise;
 
@@ -272,18 +253,17 @@ add_task(function* ()
   gBrowser.removeTab(gBrowser.getTabForBrowser(browser1));
   gBrowser.removeTab(gBrowser.getTabForBrowser(browser2));
 });
 
 /**
  * In this test, we check that nothing happen if the invalid form is
  * submitted in a background tab.
  */
-add_task(function* ()
-{
+add_task(function* () {
   // Observers don't propagate currently across processes. We may add support for this in the
   // future via the addon compat layer.
   if (gMultiProcessBrowser) {
     return;
   }
 
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>" + getDocFooter();
@@ -312,18 +292,17 @@ add_task(function* ()
   yield notifierPromise;
 
   gBrowser.removeTab(gBrowser.getTabForBrowser(browser));
 });
 
 /**
  * In this test, we check that the author defined error message is shown.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input x-moz-errormessage='foo' required id='i'><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -334,18 +313,17 @@ add_task(function* ()
      "The panel should show the author defined error message");
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that the message is correctly updated when it changes.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input type='email' required id='i'><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
--- a/browser/base/content/test/general/browser_bug580638.js
+++ b/browser/base/content/test/general/browser_bug580638.js
@@ -10,18 +10,17 @@ function test() {
       return document.getElementById(id).getAttribute(attr);
     }
 
     if (aPinned) {
       is(elemAttr("key_close", "disabled"), "true",
          "key_close should be disabled when a pinned-tab is selected");
       is(elemAttr("menu_close", "key"), "",
          "menu_close shouldn't have a key set when a pinned is selected");
-    }
-    else {
+    } else {
       is(elemAttr("key_close", "disabled"), "",
          "key_closed shouldn't have disabled state set when a non-pinned tab is selected");
       is(elemAttr("menu_close", "key"), "key_close",
          "menu_close should have key_close set as its key when a non-pinned tab is selected");
     }
   }
 
   let lastSelectedTab = gBrowser.selectedTab;
--- a/browser/base/content/test/general/browser_bug585558.js
+++ b/browser/base/content/test/general/browser_bug585558.js
@@ -79,45 +79,45 @@ function test_showFirst() {
 function test_movedLower() {
   testAttrib(gBrowser.tabs[2], "afterselected-visible", true,
              "Third tab marked afterselected-visible!");
   test_hoverOne();
 }
 
 function test_hoverOne() {
   EventUtils.synthesizeMouseAtCenter(gBrowser.tabs[4], { type: "mousemove" });
-  testAttrib(gBrowser.tabs[3], "beforehovered", true,  "Fourth tab marked beforehovered");
+  testAttrib(gBrowser.tabs[3], "beforehovered", true, "Fourth tab marked beforehovered");
   EventUtils.synthesizeMouseAtCenter(gBrowser.tabs[3], { type: "mousemove" });
-  testAttrib(gBrowser.tabs[2], "beforehovered", true,  "Third tab marked beforehovered!");
-  testAttrib(gBrowser.tabs[2], "afterhovered",  false, "Third tab not marked afterhovered!");
-  testAttrib(gBrowser.tabs[4], "afterhovered",  true,  "Fifth tab marked afterhovered!");
+  testAttrib(gBrowser.tabs[2], "beforehovered", true, "Third tab marked beforehovered!");
+  testAttrib(gBrowser.tabs[2], "afterhovered", false, "Third tab not marked afterhovered!");
+  testAttrib(gBrowser.tabs[4], "afterhovered", true, "Fifth tab marked afterhovered!");
   testAttrib(gBrowser.tabs[4], "beforehovered", false, "Fifth tab not marked beforehovered!");
   testAttrib(gBrowser.tabs[0], "beforehovered", false, "First tab not marked beforehovered!");
-  testAttrib(gBrowser.tabs[0], "afterhovered",  false, "First tab not marked afterhovered!");
+  testAttrib(gBrowser.tabs[0], "afterhovered", false, "First tab not marked afterhovered!");
   testAttrib(gBrowser.tabs[1], "beforehovered", false, "Second tab not marked beforehovered!");
-  testAttrib(gBrowser.tabs[1], "afterhovered",  false, "Second tab not marked afterhovered!");
+  testAttrib(gBrowser.tabs[1], "afterhovered", false, "Second tab not marked afterhovered!");
   testAttrib(gBrowser.tabs[3], "beforehovered", false, "Fourth tab not marked beforehovered!");
-  testAttrib(gBrowser.tabs[3], "afterhovered",  false, "Fourth tab not marked afterhovered!");
+  testAttrib(gBrowser.tabs[3], "afterhovered", false, "Fourth tab not marked afterhovered!");
   gBrowser.removeTab(tabs.pop());
   executeSoon(test_hoverStatePersistence);
 }
 
 function test_hoverStatePersistence() {
   // Test that the afterhovered and beforehovered attributes are still there when
   // a tab is selected and then unselected again. See bug 856107.
 
   function assertState() {
-    testAttrib(gBrowser.tabs[0], "beforehovered", true,  "First tab still marked beforehovered!");
-    testAttrib(gBrowser.tabs[0], "afterhovered",  false, "First tab not marked afterhovered!");
-    testAttrib(gBrowser.tabs[2], "afterhovered",  true,  "Third tab still marked afterhovered!");
+    testAttrib(gBrowser.tabs[0], "beforehovered", true, "First tab still marked beforehovered!");
+    testAttrib(gBrowser.tabs[0], "afterhovered", false, "First tab not marked afterhovered!");
+    testAttrib(gBrowser.tabs[2], "afterhovered", true, "Third tab still marked afterhovered!");
     testAttrib(gBrowser.tabs[2], "beforehovered", false, "Third tab not marked afterhovered!");
     testAttrib(gBrowser.tabs[1], "beforehovered", false, "Second tab not marked beforehovered!");
-    testAttrib(gBrowser.tabs[1], "afterhovered",  false, "Second tab not marked afterhovered!");
+    testAttrib(gBrowser.tabs[1], "afterhovered", false, "Second tab not marked afterhovered!");
     testAttrib(gBrowser.tabs[3], "beforehovered", false, "Fourth tab not marked beforehovered!");
-    testAttrib(gBrowser.tabs[3], "afterhovered",  false, "Fourth tab not marked afterhovered!");
+    testAttrib(gBrowser.tabs[3], "afterhovered", false, "Fourth tab not marked afterhovered!");
   }
 
   gBrowser.selectedTab = gBrowser.tabs[3];
   EventUtils.synthesizeMouseAtCenter(gBrowser.tabs[1], { type: "mousemove" });
   assertState();
   gBrowser.selectedTab = gBrowser.tabs[1];
   assertState();
   gBrowser.selectedTab = gBrowser.tabs[3];
--- a/browser/base/content/test/general/browser_bug734076.js
+++ b/browser/base/content/test/general/browser_bug734076.js
@@ -1,13 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-add_task(function* ()
-{
+add_task(function* () {
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, null, false);
 
   let browser = tab.linkedBrowser;
   browser.stop(); // stop the about:blank load
 
   let writeDomainURL = encodeURI("data:text/html,<script>document.write(document.domain);</script>");
 
   let tests = [
--- a/browser/base/content/test/general/browser_bug763468_perwindowpb.js
+++ b/browser/base/content/test/general/browser_bug763468_perwindowpb.js
@@ -24,17 +24,17 @@ function test() {
         mode = "per window private browsing";
         newTabURL = "about:privatebrowsing";
       } else {
         mode = "normal";
         newTabURL = "about:newtab";
       }
 
       is(aWindow.gBrowser.currentURI.spec, newTabURL,
-        "URL of NewTab should be " + newTabURL + " in " + mode +  " mode");
+        "URL of NewTab should be " + newTabURL + " in " + mode + " mode");
 
       aWindow.gBrowser.removeTab(aWindow.gBrowser.selectedTab);
       aCallback();
     });
   }
 
   function testOnWindow(aOptions, aCallback) {
     whenNewWindowLoaded(aOptions, function(aWin) {
--- a/browser/base/content/test/general/browser_bug767836_perwindowpb.js
+++ b/browser/base/content/test/general/browser_bug767836_perwindowpb.js
@@ -24,17 +24,17 @@ function test() {
         newTabURL = "about:privatebrowsing";
       } else {
         mode = "normal";
         newTabURL = "about:newtab";
       }
 
       // Check the new tab opened while in normal/private mode
       is(aWindow.gBrowser.selectedBrowser.currentURI.spec, newTabURL,
-        "URL of NewTab should be " + newTabURL + " in " + mode +  " mode");
+        "URL of NewTab should be " + newTabURL + " in " + mode + " mode");
       // Set the custom newtab url
       aboutNewTabService.newTabURL = testURL;
       is(aboutNewTabService.newTabURL, testURL, "Custom newtab url is set");
 
       // Open a newtab after setting the custom newtab url
       openNewTab(aWindow, function() {
         is(aWindow.gBrowser.selectedBrowser.currentURI.spec, testURL,
            "URL of NewTab should be the custom url");
--- a/browser/base/content/test/general/browser_bug970746.js
+++ b/browser/base/content/test/general/browser_bug970746.js
@@ -103,17 +103,17 @@ add_task(function *() {
     yield popupShownPromise;
 
     let menuItem = document.getElementById("context-searchselect");
     is(menuItem.hidden, !test.shouldBeShown,
         "search context menu item is shown for  '#" + test.id + "' and selected is '" + test.isSelected + "'");
 
     if (test.shouldBeShown) {
       ok(menuItem.label.includes(test.expectedLabelContents),
-         "Menu item text '" + menuItem.label  + "' contains the correct search terms '" + test.expectedLabelContents  + "'");
+         "Menu item text '" + menuItem.label + "' contains the correct search terms '" + test.expectedLabelContents + "'");
     }
 
     let popupHiddenPromise = BrowserTestUtils.waitForEvent(contentAreaContextMenu, "popuphidden");
     contentAreaContextMenu.hidePopup();
     yield popupHiddenPromise;
   }
 
   // cleanup
--- a/browser/base/content/test/general/browser_contentAltClick.js
+++ b/browser/base/content/test/general/browser_contentAltClick.js
@@ -39,18 +39,17 @@ function* clean_up() {
   }
   // Remove download history.
   yield PlacesTestUtils.clearHistory();
 
   gPrefService.clearUserPref("browser.altClickSave");
   yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
 }
 
-add_task(function* test_alt_click()
-{
+add_task(function* test_alt_click() {
   yield setup();
 
   let downloadList = yield Downloads.getList(Downloads.ALL);
   let downloads = [];
   let downloadView;
   // When 1 download has been attempted then resolve the promise.
   let finishedAllDownloads = new Promise( (resolve) => {
     downloadView = {
@@ -68,18 +67,17 @@ add_task(function* test_alt_click()
   yield downloadList.removeView(downloadView);
 
   is(downloads.length, 1, "1 downloads");
   is(downloads[0].source.url, "http://mochi.test/moz/", "Downloaded #commonlink element");
 
   yield* clean_up();
 });
 
-add_task(function* test_alt_click_on_xlinks()
-{
+add_task(function* test_alt_click_on_xlinks() {
   yield setup();
 
   let downloadList = yield Downloads.getList(Downloads.ALL);
   let downloads = [];
   let downloadView;
   // When all 2 downloads have been attempted then resolve the promise.
   let finishedAllDownloads = new Promise( (resolve) => {
     downloadView = {
--- a/browser/base/content/test/general/browser_contentAreaClick.js
+++ b/browser/base/content/test/general/browser_contentAreaClick.js
@@ -268,18 +268,17 @@ function runNextTest() {
 
   if (gCurrentTest.targets.length == 0) {
     info(gCurrentTest.desc + ": cleaning up...")
     gCurrentTest.clean();
 
     if (gTests.length > 0) {
       gCurrentTest = gTests.shift();
       gCurrentTest.setup();
-    }
-    else {
+    } else {
       finishTest();
       return;
     }
   }
 
   // Move to next target.
   gInvokedMethods.length = 0;
   let target = gCurrentTest.targets.shift();
--- a/browser/base/content/test/general/browser_contentSearchUI.js
+++ b/browser/base/content/test/general/browser_contentSearchUI.js
@@ -698,21 +698,19 @@ function checkState(actualState, expecte
 
     tableHidden: expectedSuggestions.length == 0,
 
     inputValue: expectedInputVal,
     ariaExpanded: expectedSuggestions.length == 0 ? "false" : "true",
   };
   if (expectedSelectedButtonIdx != undefined) {
     expectedState.selectedButtonIndex = expectedSelectedButtonIdx;
-  }
-  else if (expectedSelectedIdx < expectedSuggestions.length) {
+  } else if (expectedSelectedIdx < expectedSuggestions.length) {
     expectedState.selectedButtonIndex = -1;
-  }
-  else {
+  } else {
     expectedState.selectedButtonIndex = expectedSelectedIdx - expectedSuggestions.length;
   }
 
   SimpleTest.isDeeply(actualState, expectedState, "State");
 }
 
 var gMsgMan;
 
--- a/browser/base/content/test/general/browser_contextmenu.js
+++ b/browser/base/content/test/general/browser_contextmenu.js
@@ -15,17 +15,17 @@ let hasContainers = Services.prefs.getBo
 
 const example_base = "http://example.com/browser/browser/base/content/test/general/";
 const chrome_base = "chrome://mochitests/content/browser/browser/base/content/test/general/";
 
 Services.scriptloader.loadSubScript(chrome_base + "contextmenu_common.js", this);
 
 // Below are test cases for XUL element
 add_task(function* test_xul_text_link_label() {
-  let  url = chrome_base + "subtst_contextmenu_xul.xul";
+  let url = chrome_base + "subtst_contextmenu_xul.xul";
 
   yield BrowserTestUtils.openNewForegroundTab(gBrowser, url);
 
   yield test_contextmenu("#test-xul-text-link-label",
     ["context-openlinkintab", true,
      ...(hasContainers ? ["context-openlinkinusercontext-menu", true] : []),
      // We need a blank entry here because the containers submenu is
      // dynamically generated with no ids.
--- a/browser/base/content/test/general/browser_contextmenu_childprocess.js
+++ b/browser/base/content/test/general/browser_contextmenu_childprocess.js
@@ -18,30 +18,27 @@ add_task(function *() {
 
   let popupHiddenPromise = BrowserTestUtils.waitForEvent(contextMenu, "popuphidden");
   contextMenu.hidePopup();
   yield popupHiddenPromise;
 
   yield BrowserTestUtils.removeTab(tab);
 });
 
-function checkItems(menuitem, arr)
-{
+function checkItems(menuitem, arr) {
   for (let i = 0; i < arr.length; i += 2) {
     let str = arr[i];
     let details = arr[i + 1];
     if (str == "---") {
       is(menuitem.localName, "menuseparator", "menuseparator");
-    }
-    else if ("children" in details) {
+    } else if ("children" in details) {
       is(menuitem.localName, "menu", "submenu");
       is(menuitem.getAttribute("label"), str, str + " label");
       checkItems(menuitem.firstChild.firstChild, details.children);
-    }
-    else {
+    } else {
       is(menuitem.localName, "menuitem", str + " menuitem");
 
       is(menuitem.getAttribute("label"), str, str + " label");
       is(menuitem.getAttribute("type"), details.type, str + " type");
       is(menuitem.getAttribute("image"), details.icon ? gBaseURL + details.icon : "", str + " icon");
 
       if (details.checked)
         is(menuitem.getAttribute("checked"), "true", str + " checked");
@@ -53,18 +50,17 @@ function checkItems(menuitem, arr)
       else
         ok(!menuitem.hasAttribute("disabled"), str + " disabled");
     }
 
     menuitem = menuitem.nextSibling;
   }
 }
 
-function checkMenu(contextMenu)
-{
+function checkMenu(contextMenu) {
   let items = [ "Plain item",          {type: "", icon: "", checked: false, disabled: false},
                 "Disabled item",       {type: "", icon: "", checked: false, disabled: true},
                 "Item w/ textContent", {type: "", icon: "", checked: false, disabled: false},
                 "---",                  null,
                 "Checkbox",            {type: "checkbox", icon: "", checked: true, disabled: false},
                 "---",                  null,
                 "Radio1",              {type: "checkbox", icon: "", checked: true, disabled: false},
                 "Radio2",              {type: "checkbox", icon: "", checked: false, disabled: false},
--- a/browser/base/content/test/general/browser_ctrlTab.js
+++ b/browser/base/content/test/general/browser_ctrlTab.js
@@ -2,19 +2,19 @@ add_task(function* () {
   gPrefService.setBoolPref("browser.ctrlTab.previews", true);
 
   gBrowser.addTab();
   gBrowser.addTab();
   gBrowser.addTab();
 
   checkTabs(4);
 
-  yield ctrlTabTest([2],       1, 0);
+  yield ctrlTabTest([2], 1, 0);
   yield ctrlTabTest([2, 3, 1], 2, 2);
-  yield ctrlTabTest([],        4, 2);
+  yield ctrlTabTest([], 4, 2);
 
   {
     let selectedIndex = gBrowser.tabContainer.selectedIndex;
     yield pressCtrlTab();
     yield pressCtrlTab(true);
     yield releaseCtrl();
     is(gBrowser.tabContainer.selectedIndex, selectedIndex,
        "Ctrl+Tab -> Ctrl+Shift+Tab keeps the selected tab");
--- a/browser/base/content/test/general/browser_discovery.js
+++ b/browser/base/content/test/general/browser_discovery.js
@@ -95,18 +95,17 @@ function runSearchDiscoveryTest() {
   var testCase = searchDiscoveryTests[0];
   var title = testCase.title || searchDiscoveryTests.length;
   if (browser.engines) {
     var hasEngine = (testCase.count) ? (browser.engines[0].title == title &&
                                         browser.engines.length == testCase.count) :
                                        (browser.engines[0].title == title);
     ok(hasEngine, testCase.text);
     browser.engines = null;
-  }
-  else
+  } else
     ok(!testCase.pass, testCase.text);
 
   searchDiscoveryTests.shift();
   searchDiscovery(); // Run the next test.
 }
 
 // This handler is called twice, once for each added link element.
 // Only want to check once the second link element has been added.
--- a/browser/base/content/test/general/browser_documentnavigation.js
+++ b/browser/base/content/test/general/browser_documentnavigation.js
@@ -5,18 +5,17 @@
  */
 
 var testPage1 = "data:text/html,<html id='html1'><body id='body1'><button id='button1'>Tab 1</button></body></html>";
 var testPage2 = "data:text/html,<html id='html2'><body id='body2'><button id='button2'>Tab 2</button></body></html>";
 var testPage3 = "data:text/html,<html id='html3'><body id='body3' contenteditable='true'><button id='button3'>Tab 3</button></body></html>";
 
 var fm = Services.focus;
 
-function* expectFocusOnF6(backward, expectedDocument, expectedElement, onContent, desc)
-{
+function* expectFocusOnF6(backward, expectedDocument, expectedElement, onContent, desc) {
   let focusChangedInChildResolver = null;
   let focusPromise = onContent ? new Promise(resolve => focusChangedInChildResolver = resolve) :
                                  BrowserTestUtils.waitForEvent(window, "focus", true);
 
   function focusChangedListener(msg) {
     let expected = expectedDocument;
     if (!expectedElement.startsWith("html")) {
       expected += "," + expectedElement;
@@ -34,18 +33,17 @@ function* expectFocusOnF6(backward, expe
       if (!contentExpectedElement) {
         // Element not found, so look in the child frames.
         for (let f = 0; f < content.frames.length; f++) {
           if (content.frames[f].document.getElementById(arg.expectedElementId)) {
             contentExpectedElement = content.frames[f].document;
             break;
           }
         }
-      }
-      else if (contentExpectedElement.localName == "html") {
+      } else if (contentExpectedElement.localName == "html") {
         contentExpectedElement = contentExpectedElement.ownerDocument;
       }
 
       if (!contentExpectedElement) {
         sendSyncMessage("BrowserTest:FocusChanged",
                         { details : "expected element " + arg.expectedElementId + " not found" });
         return;
       }
@@ -81,18 +79,17 @@ function* expectFocusOnF6(backward, expe
   is(fm.focusedElement, expectedElement, desc + " element matches");
 
   if (onContent) {
     messageManager.removeMessageListener("BrowserTest:FocusChanged", focusChangedListener);
   }
 }
 
 // Load a page and navigate between it and the chrome window.
-add_task(function* ()
-{
+add_task(function* () {
   let page1Promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
   gBrowser.selectedBrowser.loadURI(testPage1);
   yield page1Promise;
 
   // When the urlbar is focused, pressing F6 should focus the root of the content page.
   gURLBar.focus();
   yield* expectFocusOnF6(false, "html1", "html1",
                                 true, "basic focus content page");
@@ -119,42 +116,39 @@ add_task(function* ()
   // Check to ensure that the root element is focused
   yield ContentTask.spawn(gBrowser.selectedBrowser, { }, function* () {
     Assert.ok(content.document.activeElement == content.document.documentElement,
       "basic focus again content page with button focused child root is focused");
   });
 });
 
 // Open a second tab. Document focus should skip the background tab.
-add_task(function* ()
-{
+add_task(function* () {
   yield BrowserTestUtils.openNewForegroundTab(gBrowser, testPage2);
 
   yield* expectFocusOnF6(false, "main-window", gURLBar.inputField,
                                 false, "basic focus content page and second tab urlbar");
   yield* expectFocusOnF6(false, "html2", "html2",
                                 true, "basic focus content page with second tab");
 
   yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
 
 // Shift+F6 should navigate backwards. There's only one document here so the effect
 // is the same.
-add_task(function* ()
-{
+add_task(function* () {
   gURLBar.focus();
   yield* expectFocusOnF6(true, "html1", "html1",
                                true, "back focus content page");
   yield* expectFocusOnF6(true, "main-window", gURLBar.inputField,
                                false, "back focus content page urlbar");
 });
 
 // Open the sidebar and navigate between the sidebar, content and top-level window
-add_task(function* ()
-{
+add_task(function* () {
   let sidebar = document.getElementById("sidebar");
 
   let loadPromise = BrowserTestUtils.waitForEvent(sidebar, "load", true);
   SidebarUI.toggle('viewBookmarksSidebar');
   yield loadPromise;
 
 
   gURLBar.focus();
@@ -174,18 +168,17 @@ add_task(function* ()
                                false, "back focus with sidebar open sidebar");
   yield* expectFocusOnF6(true, "main-window", gURLBar.inputField,
                                false, "back focus with sidebar urlbar");
 
   SidebarUI.toggle('viewBookmarksSidebar');
 });
 
 // Navigate when the downloads panel is open
-add_task(function* ()
-{
+add_task(function* () {
   yield pushPrefs(["accessibility.tabfocus", 7]);
 
   let popupShownPromise = BrowserTestUtils.waitForEvent(document, "popupshown", true);
   EventUtils.synthesizeMouseAtCenter(document.getElementById("downloads-button"), { });
   yield popupShownPromise;
 
   gURLBar.focus();
   yield* expectFocusOnF6(false, "main-window", document.getElementById("downloadsHistory"),
@@ -205,18 +198,17 @@ add_task(function* ()
 
   let downloadsPopup = document.getElementById("downloadsPanel");
   let popupHiddenPromise = BrowserTestUtils.waitForEvent(downloadsPopup, "popuphidden", true);
   downloadsPopup.hidePopup();
   yield popupHiddenPromise;
 });
 
 // Navigation with a contenteditable body
-add_task(function* ()
-{
+add_task(function* () {
   yield BrowserTestUtils.openNewForegroundTab(gBrowser, testPage3);
 
   // The body should be focused when it is editable, not the root.
   gURLBar.focus();
   yield* expectFocusOnF6(false, "html3", "body3",
                                 true, "focus with contenteditable body");
   yield* expectFocusOnF6(false, "main-window", gURLBar.inputField,
                                 false, "focus with contenteditable body urlbar");
@@ -227,18 +219,17 @@ add_task(function* ()
                                 true, "back focus with contenteditable body");
   yield* expectFocusOnF6(false, "main-window", gURLBar.inputField,
                                 false, "back focus with contenteditable body urlbar");
 
   yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
 
 // Navigation with a frameset loaded
-add_task(function* ()
-{
+add_task(function* () {
   yield BrowserTestUtils.openNewForegroundTab(gBrowser,
     "http://mochi.test:8888/browser/browser/base/content/test/general/file_documentnavigation_frameset.html");
 
   gURLBar.focus();
   yield* expectFocusOnF6(false, "htmlframe1", "htmlframe1",
                                 true, "focus on frameset frame 0");
   yield* expectFocusOnF6(false, "htmlframe2", "htmlframe2",
                                 true, "focus on frameset frame 1");
--- a/browser/base/content/test/general/browser_drag.js
+++ b/browser/base/content/test/general/browser_drag.js
@@ -1,10 +1,9 @@
-function test()
-{
+function test() {
   waitForExplicitFinish();
 
   let scriptLoader = Cc["@mozilla.org/moz/jssubscript-loader;1"].
                      getService(Ci.mozIJSSubScriptLoader);
   let EventUtils = {};
   scriptLoader.loadSubScript("chrome://mochikit/content/tests/SimpleTest/EventUtils.js", EventUtils);
 
   // ---- Test dragging the proxy icon ---
--- a/browser/base/content/test/general/browser_e10s_switchbrowser.js
+++ b/browser/base/content/test/general/browser_e10s_switchbrowser.js
@@ -75,18 +75,17 @@ var waitForLoadWithFlags = Task.async(fu
   info("Loading " + uri + " flags = " + flags);
   gBrowser.selectedBrowser.loadURIWithFlags(uri, flags, null, null, null);
 
   yield waitForDocLoadComplete();
   if (!(flags & Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY)) {
 
     if (flags & Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY) {
       gExpectedHistory.entries.pop();
-    }
-    else {
+    } else {
       gExpectedHistory.index++;
     }
 
     gExpectedHistory.entries.push({
       uri: gBrowser.currentURI.spec,
       title: gBrowser.contentTitle
     });
   }
--- a/browser/base/content/test/general/browser_focusonkeydown.js
+++ b/browser/base/content/test/general/browser_focusonkeydown.js
@@ -1,10 +1,9 @@
-add_task(function *()
-{
+add_task(function *() {
   let keyUps = 0;
 
   yield BrowserTestUtils.openNewForegroundTab(gBrowser, "data:text/html,<body>");
 
   gURLBar.focus();
 
   window.addEventListener("keyup", function countKeyUps(event) {
     window.removeEventListener("keyup", countKeyUps, true);
--- a/browser/base/content/test/general/browser_fullscreen-window-open.js
+++ b/browser/base/content/test/general/browser_fullscreen-window-open.js
@@ -47,18 +47,17 @@ var gTests = [
   test_open_with_pref_to_disable_in_fullscreen,
   test_open_from_chrome,
 ];
 
 function runNextTest() {
   let testCase = gTests.shift();
   if (testCase) {
     executeSoon(testCase);
-  }
-  else {
+  } else {
     finish();
   }
 }
 
 
 // Test for window.open() with no feature.
 function test_open() {
   waitForTabOpen({
@@ -327,18 +326,17 @@ WindowListener.prototype = {
       domwindow.removeEventListener("load", onLoad, true);
 
       // wait for trasition to fullscreen on OSX Lion later
       if (isOSX) {
         setTimeout(function() {
           domwindow.close();
           executeSoon(this.callBack_onFinalize);
         }.bind(this), 3000);
-      }
-      else {
+      } else {
         domwindow.close();
         executeSoon(this.callBack_onFinalize);
       }
     };
     domwindow.addEventListener("load", onLoad, true);
   },
   onCloseWindow(aXULWindow) {},
   onWindowTitleChange(aXULWindow, aNewTitle) {},
--- a/browser/base/content/test/general/browser_fxaccounts.js
+++ b/browser/base/content/test/general/browser_fxaccounts.js
@@ -210,18 +210,17 @@ var promiseTabOpen = Task.async(function
   yield promiseTabLoadEvent(tab);
   ok(tab.linkedBrowser.currentURI.spec.startsWith(urlBase),
      "Got " + tab.linkedBrowser.currentURI.spec + ", expecting " + urlBase);
   let whenUnloaded = promiseTabUnloaded(tab);
   gBrowser.removeTab(tab);
   yield whenUnloaded;
 });
 
-function promiseTabUnloaded(tab)
-{
+function promiseTabUnloaded(tab) {
   return new Promise(resolve => {
     info("Wait for tab to unload");
     function handle(event) {
       tab.linkedBrowser.removeEventListener("unload", handle, true);
       info("Got unload event");
       resolve(event);
     }
     tab.linkedBrowser.addEventListener("unload", handle, true, true);
--- a/browser/base/content/test/general/browser_gZipOfflineChild.js
+++ b/browser/base/content/test/general/browser_gZipOfflineChild.js
@@ -34,18 +34,17 @@ function handleMessageEvents(event) {
       // the offline cache is udpated (which means our iframe
       // successfully reloaded), or the string "error" appears
       // in the iframe, as in the case of bug 501422.
       intervalID = setInterval(function() {
         // Sometimes document.body may not exist, and trying to access
         // it will throw an exception, so handle this case.
         try {
           var bodyInnerHTML = event.source.document.body.innerHTML;
-        }
-        catch (e) {
+        } catch (e) {
           bodyInnerHTML = "";
         }
         if (cacheCount == 2 || bodyInnerHTML.includes("error")) {
           clearInterval(intervalID);
           is(cacheCount, 2, "frame not reloaded successfully");
           if (cacheCount != 2) {
             finish();
           }
--- a/browser/base/content/test/general/browser_gestureSupport.js
+++ b/browser/base/content/test/general/browser_gestureSupport.js
@@ -7,18 +7,17 @@
 // These tests require the ability to disable the fact that the
 // Firefox chrome intentionally prevents "simple gesture" events from
 // reaching web content.
 
 var test_utils;
 var test_commandset;
 var test_prefBranch = "browser.gesture.";
 
-function test()
-{
+function test() {
   waitForExplicitFinish();
 
   // Disable the default gestures support during the test
   gGestureSupport.init(false);
 
   test_utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
     getInterface(Components.interfaces.nsIDOMWindowUtils);
 
@@ -42,18 +41,17 @@ function test()
 var test_eventCount = 0;
 var test_expectedType;
 var test_expectedDirection;
 var test_expectedDelta;
 var test_expectedModifiers;
 var test_expectedClickCount;
 var test_imageTab;
 
-function test_gestureListener(evt)
-{
+function test_gestureListener(evt) {
   is(evt.type, test_expectedType,
      "evt.type (" + evt.type + ") does not match expected value");
   is(evt.target, test_utils.elementFromPoint(20, 20, false, false),
      "evt.target (" + evt.target + ") does not match expected value");
   is(evt.clientX, 20,
      "evt.clientX (" + evt.clientX + ") does not match expected value");
   is(evt.clientY, 20,
      "evt.clientY (" + evt.clientY + ") does not match expected value");
@@ -78,53 +76,50 @@ function test_gestureListener(evt)
 
   if (evt.type == "MozTapGesture") {
     is(evt.clickCount, test_expectedClickCount, "evt.clickCount does not match");
   }
 
   test_eventCount++;
 }
 
-function test_helper1(type, direction, delta, modifiers)
-{
+function test_helper1(type, direction, delta, modifiers) {
   // Setup the expected values
   test_expectedType = type;
   test_expectedDirection = direction;
   test_expectedDelta = delta;
   test_expectedModifiers = modifiers;
 
   let expectedEventCount = test_eventCount + 1;
 
   document.addEventListener(type, test_gestureListener, true);
   test_utils.sendSimpleGestureEvent(type, 20, 20, direction, delta, modifiers);
   document.removeEventListener(type, test_gestureListener, true);
 
   is(expectedEventCount, test_eventCount, "Event (" + type + ") was never received by event listener");
 }
 
-function test_clicks(type, clicks)
-{
+function test_clicks(type, clicks) {
   // Setup the expected values
   test_expectedType = type;
   test_expectedDirection = 0;
   test_expectedDelta = 0;
   test_expectedModifiers = 0;
   test_expectedClickCount = clicks;
 
   let expectedEventCount = test_eventCount + 1;
 
   document.addEventListener(type, test_gestureListener, true);
   test_utils.sendSimpleGestureEvent(type, 20, 20, 0, 0, 0, clicks);
   document.removeEventListener(type, test_gestureListener, true);
 
   is(expectedEventCount, test_eventCount, "Event (" + type + ") was never received by event listener");
 }
 
-function test_TestEventListeners()
-{
+function test_TestEventListeners() {
   let e = test_helper1;  // easier to type this name
 
   // Swipe gesture animation events
   e("MozSwipeGestureStart", 0, -0.7, 0);
   e("MozSwipeGestureUpdate", 0, -0.4, 0);
   e("MozSwipeGestureEnd", 0, 0, 0);
   e("MozSwipeGestureStart", 0, 0.6, 0);
   e("MozSwipeGestureUpdate", 0, 0.3, 0);
@@ -179,45 +174,41 @@ function test_TestEventListeners()
   modifier = Components.interfaces.nsIDOMEvent.ALT_MASK;
   e("MozSwipeGesture", SimpleGestureEvent.DIRECTION_RIGHT, 0, modifier);
 
   // event.ctrlKey
   modifier = Components.interfaces.nsIDOMEvent.CONTROL_MASK;
   e("MozSwipeGesture", SimpleGestureEvent.DIRECTION_RIGHT, 0, modifier);
 }
 
-function test_eventDispatchListener(evt)
-{
+function test_eventDispatchListener(evt) {
   test_eventCount++;
   evt.stopPropagation();
 }
 
-function test_helper2(type, direction, delta, altKey, ctrlKey, shiftKey, metaKey)
-{
+function test_helper2(type, direction, delta, altKey, ctrlKey, shiftKey, metaKey) {
   let event = null;
   let successful;
 
   try {
     event = document.createEvent("SimpleGestureEvent");
     successful = true;
-  }
-  catch (ex) {
+  } catch (ex) {
     successful = false;
   }
   ok(successful, "Unable to create SimpleGestureEvent");
 
   try {
     event.initSimpleGestureEvent(type, true, true, window, 1,
                                  10, 10, 10, 10,
                                  ctrlKey, altKey, shiftKey, metaKey,
                                  1, window,
                                  0, direction, delta, 0);
     successful = true;
-  }
-  catch (ex) {
+  } catch (ex) {
     successful = false;
   }
   ok(successful, "event.initSimpleGestureEvent should not fail");
 
   // Make sure the event fields match the expected values
   is(event.type, type, "Mismatch on evt.type");
   is(event.direction, direction, "Mismatch on evt.direction");
   is(event.delta, delta, "Mismatch on evt.delta");
@@ -237,27 +228,25 @@ function test_helper2(type, direction, d
   // Test event dispatch
   let expectedEventCount = test_eventCount + 1;
   document.addEventListener(type, test_eventDispatchListener, true);
   document.dispatchEvent(event);
   document.removeEventListener(type, test_eventDispatchListener, true);
   is(expectedEventCount, test_eventCount, "Dispatched event was never received by listener");
 }
 
-function test_TestEventCreation()
-{
+function test_TestEventCreation() {
   // Event creation
   test_helper2("MozMagnifyGesture", SimpleGestureEvent.DIRECTION_RIGHT, 20.0,
                true, false, true, false);
   test_helper2("MozMagnifyGesture", SimpleGestureEvent.DIRECTION_LEFT, -20.0,
                false, true, false, true);
 }
 
-function test_EnsureConstantsAreDisjoint()
-{
+function test_EnsureConstantsAreDisjoint() {
   let up = SimpleGestureEvent.DIRECTION_UP;
   let down = SimpleGestureEvent.DIRECTION_DOWN;
   let left = SimpleGestureEvent.DIRECTION_LEFT;
   let right = SimpleGestureEvent.DIRECTION_RIGHT;
 
   let clockwise = SimpleGestureEvent.ROTATION_CLOCKWISE;
   let cclockwise = SimpleGestureEvent.ROTATION_COUNTERCLOCKWISE;
 
@@ -268,18 +257,17 @@ function test_EnsureConstantsAreDisjoint
   ok(down ^ right, "DIRECTION_DOWN and DIRECTION_RIGHT are not bitwise disjoint");
   ok(left ^ right, "DIRECTION_LEFT and DIRECTION_RIGHT are not bitwise disjoint");
   ok(clockwise ^ cclockwise, "ROTATION_CLOCKWISE and ROTATION_COUNTERCLOCKWISE are not bitwise disjoint");
 }
 
 // Helper for test of latched event processing. Emits the actual
 // gesture events to test whether the commands associated with the
 // gesture will only trigger once for each direction of movement.
-function test_emitLatchedEvents(eventPrefix, initialDelta, cmd)
-{
+function test_emitLatchedEvents(eventPrefix, initialDelta, cmd) {
   let cumulativeDelta = 0;
   let isIncreasing = initialDelta > 0;
 
   let expect = {};
   // Reset the call counters and initialize expected values
   for (let dir in cmd)
     cmd[dir].callCount = expect[dir] = 0;
 
@@ -343,38 +331,35 @@ function test_emitLatchedEvents(eventPre
     checkBoth(5, "Increasing command was triggered", "Decreasing command was not triggered");
   }
 
   // Send the wrap-up event. No commands should be triggered.
   test_utils.sendSimpleGestureEvent(eventPrefix, 0, 0, 0, cumulativeDelta, 0);
   checkBoth(6, "Increasing command was triggered", "Decreasing command was triggered");
 }
 
-function test_addCommand(prefName, id)
-{
+function test_addCommand(prefName, id) {
   let cmd = test_commandset.appendChild(document.createElement("command"));
   cmd.setAttribute("id", id);
   cmd.setAttribute("oncommand", "this.callCount++;");
 
   cmd.origPrefName = prefName;
   cmd.origPrefValue = gPrefService.getCharPref(prefName);
   gPrefService.setCharPref(prefName, id);
 
   return cmd;
 }
 
-function test_removeCommand(cmd)
-{
+function test_removeCommand(cmd) {
   gPrefService.setCharPref(cmd.origPrefName, cmd.origPrefValue);
   test_commandset.removeChild(cmd);
 }
 
 // Test whether latched events are only called once per direction of motion.
-function test_latchedGesture(gesture, inc, dec, eventPrefix)
-{
+function test_latchedGesture(gesture, inc, dec, eventPrefix) {
   let branch = test_prefBranch + gesture + ".";
 
   // Put the gesture into latched mode.
   let oldLatchedValue = gPrefService.getBoolPref(branch + "latched");
   gPrefService.setBoolPref(branch + "latched", true);
 
   // Install the test commands for increasing and decreasing motion.
   let cmd = {
@@ -388,18 +373,17 @@ function test_latchedGesture(gesture, in
 
   // Restore the gesture to its original configuration.
   gPrefService.setBoolPref(branch + "latched", oldLatchedValue);
   for (let dir in cmd)
     test_removeCommand(cmd[dir]);
 }
 
 // Test whether non-latched events are triggered upon sufficient motion.
-function test_thresholdGesture(gesture, inc, dec, eventPrefix)
-{
+function test_thresholdGesture(gesture, inc, dec, eventPrefix) {
   let branch = test_prefBranch + gesture + ".";
 
   // Disable latched mode for this gesture.
   let oldLatchedValue = gPrefService.getBoolPref(branch + "latched");
   gPrefService.setBoolPref(branch + "latched", false);
 
   // Set the triggering threshold value to 50.
   let oldThresholdValue = gPrefService.getIntPref(branch + "threshold");
@@ -442,18 +426,17 @@ function test_thresholdGesture(gesture, 
 
   // Restore the gesture to its original configuration.
   gPrefService.setBoolPref(branch + "latched", oldLatchedValue);
   gPrefService.setIntPref(branch + "threshold", oldThresholdValue);
   test_removeCommand(cmdInc);
   test_removeCommand(cmdDec);
 }
 
-function test_swipeGestures()
-{
+function test_swipeGestures() {
   // easier to type names for the direction constants
   let up = SimpleGestureEvent.DIRECTION_UP;
   let down = SimpleGestureEvent.DIRECTION_DOWN;
   let left = SimpleGestureEvent.DIRECTION_LEFT;
   let right = SimpleGestureEvent.DIRECTION_RIGHT;
 
   let branch = test_prefBranch + "swipe.";
 
@@ -516,36 +499,34 @@ function test_swipeGestures()
   // Remove the test commands.
   test_removeCommand(cmdUp);
   test_removeCommand(cmdDown);
   test_removeCommand(cmdLeft);
   test_removeCommand(cmdRight);
 }
 
 
-function test_rotateHelperGetImageRotation(aImageElement)
-{
+function test_rotateHelperGetImageRotation(aImageElement) {
   // Get the true image rotation from the transform matrix, bounded
   // to 0 <= result < 360
   let transformValue = content.window.getComputedStyle(aImageElement, null)
                                      .transform;
   if (transformValue == "none")
     return 0;
 
   transformValue = transformValue.split("(")[1]
                                  .split(")")[0]
                                  .split(",");
   var rotation = Math.round(Math.atan2(transformValue[1], transformValue[0]) *
                             (180 / Math.PI));
   return (rotation < 0 ? rotation + 360 : rotation);
 }
 
 function test_rotateHelperOneGesture(aImageElement, aCurrentRotation,
-                                     aDirection, aAmount, aStop)
-{
+                                     aDirection, aAmount, aStop) {
   if (aAmount <= 0 || aAmount > 90) // Bound to 0 < aAmount <= 90
     return;
 
   // easier to type names for the direction constants
   let clockwise = SimpleGestureEvent.ROTATION_CLOCKWISE;
 
   let delta = aAmount * (aDirection == clockwise ? 1 : -1);
 
@@ -578,36 +559,34 @@ function test_rotateHelperOneGesture(aIm
   test_utils.sendSimpleGestureEvent("MozRotateGesture", 0, 0, aDirection, 0, 0);
   aImageElement.clientTop;
 
   let finalExpectedRotation;
 
   if (aAmount < 45 && aStop) {
     // Rotate a bit, then stop.  Expect no change at end of gesture.
     finalExpectedRotation = aCurrentRotation;
-  }
-  else {
+  } else {
     // Either not stopping (expect 90 degree change in aDirection), OR
     // stopping but after 45, (expect 90 degree change in aDirection)
     finalExpectedRotation = (aCurrentRotation +
                              (aDirection == clockwise ? 1 : -1) * 90) % 360;
     if (finalExpectedRotation < 0)
       finalExpectedRotation += 360;
   }
 
   is(finalExpectedRotation, test_rotateHelperGetImageRotation(aImageElement),
      "Image rotation gesture end: expected=" + finalExpectedRotation +
      ", observed=" + test_rotateHelperGetImageRotation(aImageElement) +
      ", init=" + aCurrentRotation +
      ", amt=" + aAmount +
      ", dir=" + (aDirection == clockwise ? "cl" : "ccl"));
 }
 
-function test_rotateGesturesOnTab()
-{
+function test_rotateGesturesOnTab() {
   gBrowser.selectedBrowser.removeEventListener("load", test_rotateGesturesOnTab, true);
 
   if (!(content.document instanceof ImageDocument)) {
     ok(false, "Image document failed to open for rotation testing");
     gBrowser.removeTab(test_imageTab);
     finish();
     return;
   }
@@ -633,38 +612,37 @@ function test_rotateGesturesOnTab()
       rotation += 360;
     return rotation;
   }
 
   for (var initRot = 0; initRot < 360; initRot += 90) {
     // Test each case: at each 90 degree snap; cl/ccl;
     // amount more or less than 45; stop and hold or don't (32 total tests)
     // The amount added to the initRot is where it is expected to be
-    test_rotateHelperOneGesture(imgElem, normRot(initRot +   0), cl,  35, true );
-    test_rotateHelperOneGesture(imgElem, normRot(initRot +   0), cl,  35, false);
-    test_rotateHelperOneGesture(imgElem, normRot(initRot +  90), cl,  55, true );
-    test_rotateHelperOneGesture(imgElem, normRot(initRot + 180), cl,  55, false);
+    test_rotateHelperOneGesture(imgElem, normRot(initRot + 0), cl, 35, true );
+    test_rotateHelperOneGesture(imgElem, normRot(initRot + 0), cl, 35, false);
+    test_rotateHelperOneGesture(imgElem, normRot(initRot + 90), cl, 55, true );
+    test_rotateHelperOneGesture(imgElem, normRot(initRot + 180), cl, 55, false);
     test_rotateHelperOneGesture(imgElem, normRot(initRot + 270), ccl, 35, true );
     test_rotateHelperOneGesture(imgElem, normRot(initRot + 270), ccl, 35, false);
     test_rotateHelperOneGesture(imgElem, normRot(initRot + 180), ccl, 55, true );
-    test_rotateHelperOneGesture(imgElem, normRot(initRot +  90), ccl, 55, false);
+    test_rotateHelperOneGesture(imgElem, normRot(initRot + 90), ccl, 55, false);
 
     // Manually rotate it 90 degrees clockwise to prepare for next iteration,
     // and force flush
     test_utils.sendSimpleGestureEvent("MozRotateGestureStart", 0, 0, cl, .001, 0);
     test_utils.sendSimpleGestureEvent("MozRotateGestureUpdate", 0, 0, cl, 90, 0);
     test_utils.sendSimpleGestureEvent("MozRotateGestureUpdate", 0, 0, cl, .001, 0);
     test_utils.sendSimpleGestureEvent("MozRotateGesture", 0, 0, cl, 0, 0);
     imgElem.clientTop;
   }
 
   gBrowser.removeTab(test_imageTab);
   test_imageTab = null;
   finish();
 }
 
-function test_rotateGestures()
-{
+function test_rotateGestures() {
   test_imageTab = gBrowser.addTab("chrome://branding/content/about-logo.png");
   gBrowser.selectedTab = test_imageTab;
 
   gBrowser.selectedBrowser.addEventListener("load", test_rotateGesturesOnTab, true);
 }
--- a/browser/base/content/test/general/browser_parsable_css.js
+++ b/browser/base/content/test/general/browser_parsable_css.js
@@ -224,18 +224,17 @@ function processCSSRules(sheet) {
         imageURIsToReferencesMap.set(url, new Set([baseUrl]));
       } else {
         imageURIsToReferencesMap.get(url).add(baseUrl);
       }
     }
   }
 }
 
-function chromeFileExists(aURI)
-{
+function chromeFileExists(aURI) {
   let available = 0;
   try {
     let channel = NetUtil.newChannel({uri: aURI, loadUsingSystemPrincipal: true});
     let stream = channel.open();
     let sstream = Cc["@mozilla.org/scriptableinputstream;1"]
                     .createInstance(Ci.nsIScriptableInputStream);
     sstream.init(stream);
     available = sstream.available();
--- a/browser/base/content/test/general/browser_sanitize-timespans.js
+++ b/browser/base/content/test/general/browser_sanitize-timespans.js
@@ -497,18 +497,17 @@ function* setupFormHistory() {
                                           deferred.reject(error);
                                           throw new Error("Error occurred searching form history: " + error);
                                         },
                                         handleCompletion(reason) { deferred.resolve(results); }
                                       });
     return deferred.promise;
   }
 
-  function update(changes)
-  {
+  function update(changes) {
     let deferred = Promise.defer();
     FormHistory.update(changes, { handleError(error) {
                                     deferred.reject(error);
                                     throw new Error("Error occurred searching form history: " + error);
                                   },
                                   handleCompletion(reason) { deferred.resolve(); }
                                 });
     return deferred.promise;
--- a/browser/base/content/test/general/browser_sanitizeDialog.js
+++ b/browser/base/content/test/general/browser_sanitizeDialog.js
@@ -567,18 +567,17 @@ add_task(function* test_offline_cache() 
     this.uncheckAllCheckboxes();
     this.checkPrefCheckbox("offlineApps", true);
     this.acceptDialog();
   };
   wh.onunload = function() {
     // Check if the cache has been deleted
     var size = -1;
     var visitor = {
-      onCacheStorageInfo(aEntryCount, aConsumption, aCapacity, aDiskDirectory)
-      {
+      onCacheStorageInfo(aEntryCount, aConsumption, aCapacity, aDiskDirectory) {
         size = aConsumption;
       }
     };
     storage.asyncVisitStorage(visitor, false);
     // Offline cache visit happens synchronously, since it's forwarded to the old code
     is(size, 0, "offline application cache entries evicted");
   };
 
@@ -835,18 +834,17 @@ WindowHelper.prototype = {
    * @param aDurVal
    *        One of the Sanitizer.TIMESPAN_* values
    */
   selectDuration(aDurVal) {
     this.getDurationDropdown().value = aDurVal;
     if (aDurVal === Sanitizer.TIMESPAN_EVERYTHING) {
       is(this.isWarningPanelVisible(), true,
          "Warning panel should be visible for TIMESPAN_EVERYTHING");
-    }
-    else {
+    } else {
       is(this.isWarningPanelVisible(), false,
          "Warning panel should not be visible for non-TIMESPAN_EVERYTHING");
     }
   },
 
   /**
    * Toggles the details progressive disclosure button.
    */
@@ -907,18 +905,17 @@ function promiseAddFormEntryWithMinutesA
                          }
                        })
    )
 }
 
 /**
  * Checks if a form entry exists.
  */
-function formNameExists(name)
-{
+function formNameExists(name) {
   return new Promise((resolve, reject) => {
     let count = 0;
     FormHistory.count({ fieldname: name },
                       { handleResult: result => count = result,
                         handleError(error) {
                           reject(error);
                           throw new Error("Error occurred searching form history: " + error);
                         },
--- a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js
+++ b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js
@@ -10,28 +10,25 @@ function createTemporarySaveDirectory() 
   if (!saveDir.exists())
     saveDir.create(Ci.nsIFile.DIRECTORY_TYPE, 0o755);
   return saveDir;
 }
 
 function promiseNoCacheEntry(filename) {
   return new Promise((resolve, reject) => {
     Visitor.prototype = {
-      onCacheStorageInfo(num, consumption)
-      {
+      onCacheStorageInfo(num, consumption) {
         info("disk storage contains " + num + " entries");
       },
-      onCacheEntryInfo(uri)
-      {
+      onCacheEntryInfo(uri) {
         let urispec = uri.asciiSpec;
         info(urispec);
         is(urispec.includes(filename), false, "web content present in disk cache");
       },
-      onCacheEntryVisitCompleted()
-      {
+      onCacheEntryVisitCompleted() {
         resolve();
       }
     };
     function Visitor() {}
 
     let cache = Cc["@mozilla.org/netwerk/cache-storage-service;1"]
                 .getService(Ci.nsICacheStorageService);
     let {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", null);
--- a/browser/base/content/test/general/browser_selectpopup.js
+++ b/browser/base/content/test/general/browser_selectpopup.js
@@ -59,66 +59,59 @@ const PAGECONTENT_SOMEHIDDEN =
 const PAGECONTENT_TRANSLATED =
   "<html><body>" +
   "<div id='div'>" +
   "<iframe id='frame' width='320' height='295' style='border: none;'" +
   "        src='data:text/html,<select id=select autofocus><option>he he he</option><option>boo boo</option><option>baz baz</option></select>'" +
   "</iframe>" +
   "</div></body></html>";
 
-function openSelectPopup(selectPopup, withMouse, selector = "select",  win = window)
-{
+function openSelectPopup(selectPopup, withMouse, selector = "select", win = window) {
   let popupShownPromise = BrowserTestUtils.waitForEvent(selectPopup, "popupshown");
 
   if (withMouse) {
     return Promise.all([popupShownPromise,
                         BrowserTestUtils.synthesizeMouseAtCenter(selector, { }, win.gBrowser.selectedBrowser)]);
   }
 
   EventUtils.synthesizeKey("KEY_ArrowDown", { altKey: true, code: "ArrowDown" }, win);
   return popupShownPromise;
 }
 
-function hideSelectPopup(selectPopup, mode = "enter", win = window)
-{
+function hideSelectPopup(selectPopup, mode = "enter", win = window) {
   let browser = win.gBrowser.selectedBrowser;
   let selectClosedPromise = ContentTask.spawn(browser, null, function*() {
     Cu.import("resource://gre/modules/SelectContentHelper.jsm");
     return ContentTaskUtils.waitForCondition(() => !SelectContentHelper.open);
   });
 
   if (mode == "escape") {
     EventUtils.synthesizeKey("KEY_Escape", { code: "Escape" }, win);
-  }
-  else if (mode == "enter") {
+  } else if (mode == "enter") {
     EventUtils.synthesizeKey("KEY_Enter", { code: "Enter" }, win);
-  }
-  else if (mode == "click") {
+  } else if (mode == "click") {
     EventUtils.synthesizeMouseAtCenter(selectPopup.lastChild, { }, win);
   }
 
   return selectClosedPromise;
 }
 
-function getInputEvents()
-{
+function getInputEvents() {
   return ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
     return content.wrappedJSObject.gInputEvents;
   });
 }
 
-function getChangeEvents()
-{
+function getChangeEvents() {
   return ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
     return content.wrappedJSObject.gChangeEvents;
   });
 }
 
-function* doSelectTests(contentType, dtd)
-{
+function* doSelectTests(contentType, dtd) {
   const pageUrl = "data:" + contentType + "," + escape(dtd + "\n" + PAGECONTENT);
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, pageUrl);
 
   let menulist = document.getElementById("ContentSelectDropdown");
   let selectPopup = menulist.menupopup;
 
   yield openSelectPopup(selectPopup);
 
@@ -285,18 +278,17 @@ add_task(function*() {
     yield ContentTask.spawn(gBrowser.selectedBrowser, step, function*(contentStep) {
       return new Promise(resolve => {
         let changedWin = content;
 
         let elem;
         if (contentStep[0] == "select") {
           changedWin = content.document.getElementById("frame").contentWindow;
           elem = changedWin.document.getElementById("select");
-        }
-        else {
+        } else {
           elem = content.document.getElementById(contentStep[0]);
         }
 
         changedWin.addEventListener("MozAfterPaint", function onPaint() {
           changedWin.removeEventListener("MozAfterPaint", onPaint);
           resolve();
         });
 
@@ -406,18 +398,17 @@ add_task(function* test_event_order() {
 
       EventUtils.synthesizeKey("KEY_ArrowDown", { code: "ArrowDown" });
       yield hideSelectPopup(selectPopup, mode);
       yield eventsPromise;
     }
   });
 });
 
-function* performLargePopupTests(win)
-{
+function* performLargePopupTests(win) {
   let browser = win.gBrowser.selectedBrowser;
 
   yield ContentTask.spawn(browser, null, function*() {
     let doc = content.document;
     let select = doc.getElementById("one");
     for (var i = 0; i < 180; i++) {
       select.add(new content.Option("Test" + i));
     }
--- a/browser/base/content/test/general/browser_star_hsts.js
+++ b/browser/base/content/test/general/browser_star_hsts.js
@@ -58,18 +58,17 @@ function promiseStarState(aValue) {
  * @param aTab
  *        The tab to load into.
  * @param aUrl
  *        The url to load.
  * @param [optional] aFinalURL
  *        The url to wait for, same as aURL if not defined.
  * @return {Promise} resolved when the event is handled.
  */
-function promiseTabLoadEvent(aTab, aURL, aFinalURL)
-{
+function promiseTabLoadEvent(aTab, aURL, aFinalURL) {
   if (!aFinalURL)
     aFinalURL = aURL;
   let deferred = Promise.defer();
   info("Wait for load tab event");
   aTab.linkedBrowser.addEventListener("load", function load(event) {
     if (event.originalTarget != aTab.linkedBrowser.contentDocument ||
         event.target.location.href == "about:blank" ||
         event.target.location.href != aFinalURL) {
--- a/browser/base/content/test/general/browser_tabfocus.js
+++ b/browser/base/content/test/general/browser_tabfocus.js
@@ -35,18 +35,17 @@ var _lastfocuswindow = null;
 var actualEvents = new EventStore();
 var expectedEvents = new EventStore();
 var currentTestName = "";
 var _expectedElement = null;
 var _expectedWindow = null;
 
 var currentPromiseResolver = null;
 
-function* getFocusedElementForBrowser(browser, dontCheckExtraFocus = false)
-{
+function* getFocusedElementForBrowser(browser, dontCheckExtraFocus = false) {
   if (gMultiProcessBrowser) {
     return new Promise((resolve, reject) => {
       messageManager.addMessageListener("Browser:GetCurrentFocus", function getCurrentFocus(message) {
         messageManager.removeMessageListener("Browser:GetCurrentFocus", getCurrentFocus);
         resolve(message.data.details);
       });
 
       // The dontCheckExtraFocus flag is used to indicate not to check some
@@ -56,23 +55,21 @@ function* getFocusedElementForBrowser(br
         { dontCheckExtraFocus });
     });
   }
   var focusedWindow = {};
   var node = fm.getFocusedElementForWindow(browser.contentWindow, false, focusedWindow);
   return "Focus is " + (node ? node.id : "<none>");
 }
 
-function focusInChild()
-{
+function focusInChild() {
   var contentFM = Components.classes["@mozilla.org/focus-manager;1"].
                       getService(Components.interfaces.nsIFocusManager);
 
-  function getWindowDocId(target)
-  {
+  function getWindowDocId(target) {
     return (String(target.location).indexOf("1") >= 0) ? "window1" : "window2";
   }
 
   function eventListener(event) {
     var id;
     if (event.target instanceof Components.interfaces.nsIDOMWindow)
       id = getWindowDocId(event.originalTarget) + "-window";
     else if (event.target instanceof Components.interfaces.nsIDOMDocument)
@@ -112,24 +109,22 @@ function focusInChild()
         details += "<ERROR: child activeElement is not correct>";
       }
     }
 
     sendSyncMessage("Browser:GetCurrentFocus", { details });
   });
 }
 
-function focusElementInChild(elementid, type)
-{
+function focusElementInChild(elementid, type) {
   let browser = (elementid.indexOf("1") >= 0) ? browser1 : browser2;
   if (gMultiProcessBrowser) {
     browser.messageManager.sendAsyncMessage("Browser:ChangeFocus",
                                             { id: elementid, type });
-  }
-  else {
+  } else {
     browser.contentDocument.getElementById(elementid)[type]();
   }
 }
 
 add_task(function*() {
   tab1 = gBrowser.addTab();
   browser1 = gBrowser.getBrowserForTab(tab1);
 
@@ -367,20 +362,18 @@ add_task(function*() {
   window.removeEventListener("blur", _browser_tabfocus_test_eventOccured, true);
 
   gBrowser.removeCurrentTab();
   gBrowser.removeCurrentTab();
 
   finish();
 });
 
-function _browser_tabfocus_test_eventOccured(event)
-{
-  function getWindowDocId(target)
-  {
+function _browser_tabfocus_test_eventOccured(event) {
+  function getWindowDocId(target) {
     if (target == browser1.contentWindow || target == browser1.contentDocument) {
       return "window1";
     }
     if (target == browser2.contentWindow || target == browser2.contentDocument) {
       return "window2";
     }
     return "main-window";
   }
@@ -403,35 +396,33 @@ function _browser_tabfocus_test_eventOcc
     id = (event.originalTarget == tab1) ? "tab1" : "tab2";
   else
     id = event.originalTarget.id;
 
   actualEvents.push(event.type + ": " + id);
   compareFocusResults();
 }
 
-function getId(element)
-{
+function getId(element) {
   if (!element) {
     return null;
   }
 
   if (element.localName == "browser") {
     return element == browser1 ? "browser1" : "browser2";
   }
 
   if (element.localName == "tab") {
     return element == tab1 ? "tab1" : "tab2";
   }
 
   return (element.localName == "input") ? "urlbar" : element.id;
 }
 
-function compareFocusResults()
-{
+function compareFocusResults() {
   if (!currentPromiseResolver)
     return;
 
   let winIds = ["main-window", "window1", "window2"];
 
   for (let winId of winIds) {
     if (actualEvents[winId].length < expectedEvents[winId].length)
       return;
@@ -444,18 +435,17 @@ function compareFocusResults()
     actualEvents[winId] = [];
   }
 
   // Use executeSoon as this will be called during a focus/blur event handler
   executeSoon(() => {
     let matchWindow = window;
     if (gMultiProcessBrowser) {
       is(_expectedWindow, "main-window", "main-window is always expected");
-    }
-    else if (_expectedWindow != "main-window") {
+    } else if (_expectedWindow != "main-window") {
       matchWindow = (_expectedWindow == "window1" ? browser1.contentWindow : browser2.contentWindow);
     }
 
     var focusedElement = fm.focusedElement;
     is(getId(focusedElement), _expectedElement, currentTestName + " focusedElement");
     is(fm.focusedWindow, matchWindow, currentTestName + " focusedWindow");
     var focusedWindow = {};
     is(getId(fm.getFocusedElementForWindow(matchWindow, false, focusedWindow)),
@@ -469,42 +459,39 @@ function compareFocusResults()
     }
     is(getId(matchWindow.document.activeElement), expectedActive, currentTestName + " activeElement");
 
     currentPromiseResolver();
     currentPromiseResolver = null;
   });
 }
 
-function* expectFocusShiftAfterTabSwitch(tab, expectedWindow, expectedElement, focusChanged, testid)
-{
+function* expectFocusShiftAfterTabSwitch(tab, expectedWindow, expectedElement, focusChanged, testid) {
   let tabSwitchPromise = null;
   yield expectFocusShift(() => { tabSwitchPromise = BrowserTestUtils.switchTab(gBrowser, tab) },
                          expectedWindow, expectedElement, focusChanged, testid)
   yield tabSwitchPromise;
 }
 
-function* expectFocusShift(callback, expectedWindow, expectedElement, focusChanged, testid)
-{
+function* expectFocusShift(callback, expectedWindow, expectedElement, focusChanged, testid) {
   currentPromiseResolver = null;
   currentTestName = testid;
 
   expectedEvents = new EventStore();
 
   if (focusChanged) {
     _expectedElement = expectedElement;
     _expectedWindow = expectedWindow;
 
     // When the content is in a child process, the expected element in the chrome window
     // will always be the urlbar or a browser element.
     if (gMultiProcessBrowser) {
       if (_expectedWindow == "window1") {
         _expectedElement = "browser1";
-      }
-      else if (_expectedWindow == "window2") {
+      } else if (_expectedWindow == "window2") {
         _expectedElement = "browser2";
       }
       _expectedWindow = "main-window";
     }
 
     if (gMultiProcessBrowser && _lastfocuswindow != "main-window" &&
         _lastfocuswindow != expectedWindow) {
       let browserid = _lastfocuswindow == "window1" ? "browser1" : "browser2";
--- a/browser/base/content/test/general/browser_utilityOverlay.js
+++ b/browser/base/content/test/general/browser_utilityOverlay.js
@@ -15,18 +15,17 @@ function test() {
   executeSoon(runNextTest);
 }
 
 function runNextTest() {
   if (gTests.length) {
     let testFun = gTests.shift();
     info("Running " + testFun.name);
     testFun()
-  }
-  else {
+  } else {
     finish();
   }
 }
 
 function test_eventMatchesKey() {
   let eventMatchResult;
   let key;
   let checkEvent = function(e) {
--- a/browser/base/content/test/general/browser_windowactivation.js
+++ b/browser/base/content/test/general/browser_windowactivation.js
@@ -19,18 +19,17 @@ function reallyRunTests() {
   let tab1 = gBrowser.addTab();
   let tab2 = gBrowser.addTab();
   browser1 = gBrowser.getBrowserForTab(tab1);
   browser2 = gBrowser.getBrowserForTab(tab2);
 
   gURLBar.focus();
 
   var loadCount = 0;
-  function check()
-  {
+  function check() {
     // wait for both tabs to load
     if (++loadCount != 2) {
       return;
     }
 
     browser1.removeEventListener("load", check, true);
     browser2.removeEventListener("load", check, true);
 
@@ -102,39 +101,36 @@ function reallyRunTests() {
   browser2.contentWindow.location = testPage;
 
   browser1.messageManager.loadFrameScript("data:,(" + childFunction.toString() + ")();", true);
   browser2.messageManager.loadFrameScript("data:,(" + childFunction.toString() + ")();", true);
 
   gBrowser.selectedTab = tab1;
 }
 
-function sendGetBackgroundRequest(ifChanged)
-{
+function sendGetBackgroundRequest(ifChanged) {
   browser1.messageManager.sendAsyncMessage("Test:GetBackgroundColor", { ifChanged });
   browser2.messageManager.sendAsyncMessage("Test:GetBackgroundColor", { ifChanged });
 }
 
 function runOtherWindowTests() {
   otherWindow = window.open("data:text/html,<body>Hi</body>", "", "chrome");
   waitForFocus(function() {
     sendGetBackgroundRequest(true);
   }, otherWindow);
 }
 
-function finishTest()
-{
+function finishTest() {
   gBrowser.removeCurrentTab();
   gBrowser.removeCurrentTab();
   otherWindow = null;
   finish();
 }
 
-function childFunction()
-{
+function childFunction() {
   let oldColor = null;
 
   let expectingResponse = false;
   let ifChanged = true;
 
   addMessageListener("Test:GetBackgroundColor", function(message) {
     expectingResponse = true;
     ifChanged = message.data.ifChanged;
--- a/browser/base/content/test/general/clipboard_pastefile.html
+++ b/browser/base/content/test/general/clipboard_pastefile.html
@@ -1,18 +1,16 @@
 <html><body>
 <script>
-function checkPaste(event)
-{
+function checkPaste(event) {
   let output = document.getElementById("output");
   output.textContent = checkPasteHelper(event);
 }
 
-function checkPasteHelper(event)
-{
+function checkPasteHelper(event) {
   let dt = event.clipboardData;
   if (dt.types.length != 2)
     return "Wrong number of types; got " + dt.types.length;
 
   for (let type of dt.types) {
     if (type != "Files" && type != "application/x-moz-file")
       return "Invalid type for types; got" + type;
   }
--- a/browser/base/content/test/general/contentSearchUI.js
+++ b/browser/base/content/test/general/contentSearchUI.js
@@ -79,18 +79,17 @@ var messageHandlers = {
     waitForContentSearchEvent("ManageEngines",
                               aData => ack("waitForSearchSettings", aData));
   },
 
   mousemove(itemIndex) {
     let row;
     if (itemIndex == -1) {
       row = gController._table.firstChild;
-    }
-    else {
+    } else {
       let allElts = [...gController._suggestionsList.children,
                      ...gController._oneOffButtons,
                      content.document.getElementById("contentSearchSettingsButton")];
       row = allElts[itemIndex];
     }
     let event = {
       type: "mousemove",
       clickcount: 0,
@@ -102,18 +101,17 @@ var messageHandlers = {
     content.synthesizeMouseAtCenter(row, event);
   },
 
   click(arg) {
     let eltIdx = typeof(arg) == "object" ? arg.eltIdx : arg;
     let row;
     if (eltIdx == -1) {
       row = gController._table.firstChild;
-    }
-    else {
+    } else {
       let allElts = [...gController._suggestionsList.children,
                      ...gController._oneOffButtons,
                      content.document.getElementById("contentSearchSettingsButton")];
       row = allElts[eltIdx];
     }
     let event = arg.modifiers || {};
     // synthesizeMouseAtCenter defaults to sending a mousedown followed by a
     // mouseup if the event type is not specified.
--- a/browser/base/content/test/general/contextmenu_common.js
+++ b/browser/base/content/test/general/contextmenu_common.js
@@ -14,18 +14,17 @@ function openContextMenuFor(element, shi
       lastElement = element;
       var eventDetails = { type : "contextmenu", button : 2, shiftKey : shiftkey };
       synthesizeMouse(element, 2, 2, eventDetails, element.ownerGlobal);
     }
 
     if (waitForSpellCheck) {
       var { onSpellCheck } = SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm", {});
       onSpellCheck(element, actuallyOpenContextMenuFor);
-    }
-    else {
+    } else {
       actuallyOpenContextMenuFor();
     }
 }
 
 function closeContextMenu() {
     contextMenu.hidePopup();
 }
 
--- a/browser/base/content/test/general/download_page.html
+++ b/browser/base/content/test/general/download_page.html
@@ -21,17 +21,17 @@ https://bugzilla.mozilla.org/show_bug.cg
                 download="with-target.txt" id="link4">Download "with-target.txt"</a></li>
         <li><a href="javascript:(1+2)+''"
             download="javascript.txt" id="link5">Download "javascript.txt"</a></li>
     </ul>
     <script>
         var li = document.createElement('li');
         var a = document.createElement('a');
 
-        a.href = window.URL.createObjectURL(new Blob(["just text"]))    ;
+        a.href = window.URL.createObjectURL(new Blob(["just text"]));
         a.download = "test.blob";
         a.id = "link6";
         a.textContent = 'Download "test.blob"';
 
         li.appendChild(a);
         document.getElementsByTagName('ul')[0].appendChild(li);
 
         window.addEventListener("beforeunload", function(evt) {
--- a/browser/base/content/test/general/file_bug822367_5.html
+++ b/browser/base/content/test/general/file_bug822367_5.html
@@ -3,18 +3,17 @@
 <!--
 Test 5 for Mixed Content Blocker User Override - Mixed Script in document.open()
 https://bugzilla.mozilla.org/show_bug.cgi?id=822367
 -->
 <head>
   <meta charset="utf-8">
   <title>Test 5 for Bug 822367</title>
   <script>
-    function createDoc()
-    {
+    function createDoc() {
       var doc = document.open("text/html", "replace");
       doc.write('<!DOCTYPE html><html><body><p id="p1">This is some content</p><script src="http://example.com/browser/browser/base/content/test/general/file_bug822367_1.js">\<\/script\>\<\/body>\<\/html>');
       doc.close();
     }
   </script>
 </head>
 <body>
   <div id="testContent">
--- a/browser/base/content/test/general/head.js
+++ b/browser/base/content/test/general/head.js
@@ -99,17 +99,17 @@ function closeToolbarCustomizationUI(aCa
     aBrowserWin.gNavToolbox.removeEventListener("aftercustomization", unloaded);
     executeSoon(aCallback);
   });
 
   aBrowserWin.gCustomizeMode.exit();
 }
 
 function waitForCondition(condition, nextTest, errorMsg, retryTimes) {
-  retryTimes = typeof retryTimes !== 'undefined' ?  retryTimes : 30;
+  retryTimes = typeof retryTimes !== 'undefined' ? retryTimes : 30;
   var tries = 0;
   var interval = setInterval(function() {
     if (tries >= retryTimes) {
       ok(false, errorMsg);
       moveOn();
     }
     var conditionPassed;
     try {
@@ -609,18 +609,17 @@ var FullZoomHelper = {
  * @param tab
  *        The tab to load into.
  * @param [optional] url
  *        The url to load, or the current url.
  * @return {Promise} resolved when the event is handled.
  * @resolves to the received event
  * @rejects if a valid load event is not received within a meaningful interval
  */
-function promiseTabLoadEvent(tab, url)
-{
+function promiseTabLoadEvent(tab, url) {
   info("Wait tab event: load");
 
   function handle(loadedUrl) {
     if (loadedUrl === "about:blank" || (url && loadedUrl !== url)) {
       info(`Skipping spurious load event for ${loadedUrl}`);
       return false;
     }
 
@@ -668,17 +667,17 @@ function waitForNewTabEvent(aTabBrowser)
  *           passiveLoaded: true|false,
  *        }
  *
  * @return {Promise}
  * @resolves When the operation has finished and the identity panel has closed.
  */
 function assertMixedContentBlockingState(tabbrowser, states = {}) {
   if (!tabbrowser || !("activeLoaded" in states) ||
-      !("activeBlocked" in states) || !("passiveLoaded" in states))  {
+      !("activeBlocked" in states) || !("passiveLoaded" in states)) {
     throw new Error("assertMixedContentBlockingState requires a browser and a states object");
   }
 
   let {passiveLoaded, activeLoaded, activeBlocked} = states;
   let {gIdentityHandler} = tabbrowser.ownerGlobal;
   let doc = tabbrowser.ownerDocument;
   let identityBox = gIdentityHandler._identityBox;
   let classList = identityBox.classList;
@@ -897,18 +896,17 @@ function promiseNotificationShown(notifi
  * @param aTopic
  *        Notification topic to observe.
  *
  * @return {Promise}
  * @resolves An object with subject and data properties from the observed
  *           notification.
  * @rejects Never.
  */
-function promiseTopicObserved(aTopic)
-{
+function promiseTopicObserved(aTopic) {
   return new Promise((resolve) => {
     Services.obs.addObserver(
       function PTO_observe(aSubject, aTopic2, aData) {
         Services.obs.removeObserver(PTO_observe, aTopic2);
         resolve({subject: aSubject, data: aData});
       }, aTopic, false);
   });
 }
@@ -966,18 +964,17 @@ function isSecurityState(expectedState) 
 function promiseOnBookmarkItemAdded(aExpectedURI) {
   return new Promise((resolve, reject) => {
     let bookmarksObserver = {
       onItemAdded(aItemId, aFolderId, aIndex, aItemType, aURI) {
         info("Added a bookmark to " + aURI.spec);
         PlacesUtils.bookmarks.removeObserver(bookmarksObserver);
         if (aURI.equals(aExpectedURI)) {
           resolve();
-        }
-        else {
+        } else {
           reject(new Error("Added an unexpected bookmark"));
         }
       },
       onBeginUpdateBatch() {},
       onEndUpdateBatch() {},
       onItemRemoved() {},
       onItemChanged() {},
       onItemVisited() {},
--- a/browser/base/content/test/newtab/browser_newtab_background_captures.js
+++ b/browser/base/content/test/newtab/browser_newtab_background_captures.js
@@ -17,18 +17,17 @@ add_task(function* () {
 
   // Make sure the thumbnail doesn't exist yet.
   let url = "http://example.com/";
   let path = imports.PageThumbsStorage.getFilePathForURL(url);
   let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
   file.initWithPath(path);
   try {
     file.remove(false);
-  }
-  catch (err) {}
+  } catch (err) {}
 
   // Add a top site.
   yield setLinks("-1");
 
   // We need a handle to a hidden, pre-loaded newtab so we can verify that it
   // doesn't allow background captures. Ensure we have a preloaded browser.
   gBrowser._createPreloadBrowser();
 
--- a/browser/base/content/test/newtab/browser_newtab_bug752841.js
+++ b/browser/base/content/test/newtab/browser_newtab_bug752841.js
@@ -1,16 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const PREF_NEWTAB_ROWS = "browser.newtabpage.rows";
 const PREF_NEWTAB_COLUMNS = "browser.newtabpage.columns";
 
-function getCellsCount()
-{
+function getCellsCount() {
   return ContentTask.spawn(gBrowser.selectedBrowser, {}, function* () {
     return content.gGrid.cells.length;
   });
 }
 
 add_task(function* () {
   let testValues = [
     {row: 0, column: 0},
--- a/browser/base/content/test/newtab/browser_newtab_disable.js
+++ b/browser/base/content/test/newtab/browser_newtab_disable.js
@@ -7,18 +7,17 @@
  */
 add_task(function* () {
   // create a new tab page and hide it.
   yield setLinks("0,1,2,3,4,5,6,7,8");
   setPinnedLinks("");
 
   let firstTab = yield* addNewTabPageTab();
 
-  function isGridDisabled(browser = gBrowser.selectedBrowser)
-  {
+  function isGridDisabled(browser = gBrowser.selectedBrowser) {
     return ContentTask.spawn(browser, {}, function*() {
       return content.gGrid.node.hasAttribute("page-disabled");
     });
   }
 
   let isDisabled = yield isGridDisabled();
   ok(!isDisabled, "page is not disabled");
 
--- a/browser/base/content/test/newtab/browser_newtab_search.js
+++ b/browser/base/content/test/newtab/browser_newtab_search.js
@@ -223,18 +223,17 @@ function promiseNewSearchEngine({name: b
     });
   });
 
   return Promise.all([addEnginePromise, eventPromise]).then(([newEngine, _]) => {
     return newEngine;
   });
 }
 
-function* checkCurrentEngine(engineInfo)
-{
+function* checkCurrentEngine(engineInfo) {
   let engine = Services.search.currentEngine;
   ok(engine.name.includes(engineInfo.name),
      "Sanity check: current engine: engine.name=" + engine.name +
      " basename=" + engineInfo.name);
 
   yield ContentTask.spawn(gBrowser.selectedBrowser, { name: engine.name }, function* (args) {
     Assert.equal(content.gSearch._contentSearchController.defaultEngine.name,
       args.name, "currentEngineName: " + args.name);
--- a/browser/base/content/test/plugins/browser_clearplugindata.html
+++ b/browser/base/content/test/plugins/browser_clearplugindata.html
@@ -4,18 +4,17 @@
 -->
 <html>
   <head>
     <title>Plugin Clear Site Data sanitize test</title>
 
     <embed id="plugin1" type="application/x-test" width="200" height="200"></embed>
 
     <script type="application/javascript">
-      function testSteps()
-      {
+      function testSteps() {
         // Make sure clearing by timerange is supported.
         var p = document.getElementById("plugin1");
         p.setSitesWithDataCapabilities(true);
 
         p.setSitesWithData(
           "foo.com:0:5," +
           "bar.com:0:100," +
           "baz.com:1:5," +
--- a/browser/base/content/test/plugins/browser_clearplugindata_noage.html
+++ b/browser/base/content/test/plugins/browser_clearplugindata_noage.html
@@ -4,18 +4,17 @@
 -->
 <html>
   <head>
     <title>Plugin Clear Site Data sanitize test without age</title>
 
     <embed id="plugin1" type="application/x-test" width="200" height="200"></embed>
 
     <script type="application/javascript">
-      function testSteps()
-      {
+      function testSteps() {
         // Make sure clearing by timerange is disabled.
         var p = document.getElementById("plugin1");
         p.setSitesWithDataCapabilities(false);
 
         p.setSitesWithData(
           "foo.com:0:5," +
           "bar.com:0:100," +
           "baz.com:1:5," +
--- a/browser/base/content/test/plugins/browser_pluginCrashCommentAndURL.js
+++ b/browser/base/content/test/plugins/browser_pluginCrashCommentAndURL.js
@@ -192,16 +192,15 @@ function onSubmitStatus(aSubject, aData)
        "URL should be absent from extra data when opt-in not checked");
 
   return true;
 }
 
 function getPropertyBagValue(bag, key) {
   try {
     var val = bag.getProperty(key);
-  }
-  catch (e) {
+  } catch (e) {
     if (e.result != Cr.NS_ERROR_FAILURE) {
       throw e;
     }
   }
   return val;
 }
--- a/browser/base/content/test/plugins/browser_pluginnotification.js
+++ b/browser/base/content/test/plugins/browser_pluginnotification.js
@@ -494,18 +494,17 @@ add_task(function* () {
   ok(centerAction, "Test 21d, found center action for the Second Test plugin");
 
   centerItem = null;
   for (let item of PopupNotifications.panel.firstChild.childNodes) {
     if (item.action == centerAction) {
       is(item.value, "block", "Test 21d, test plugin 2 should start blocked");
       centerItem = item;
       break;
-    }
-    else {
+    } else {
       is(item.value, "allownow", "Test 21d, test plugin should be enabled");
     }
   }
   ok(centerItem, "Test 21d, found center item for the Second Test plugin");
 
   // Select the allow now option in the select drop down for Second Test Plguins
   centerItem.value = "allownow";
 
--- a/browser/base/content/test/plugins/head.js
+++ b/browser/base/content/test/plugins/head.js
@@ -6,18 +6,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   "resource://gre/modules/PlacesUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PromiseUtils",
   "resource://gre/modules/PromiseUtils.jsm");
 
 // The blocklist shim running in the content process does not initialize at
 // start up, so it's not active until we load content that needs to do a
 // check. This helper bypasses the delay to get the svc up and running
 // immediately. Note, call this after remote content has loaded.
-function promiseInitContentBlocklistSvc(aBrowser)
-{
+function promiseInitContentBlocklistSvc(aBrowser) {
   return ContentTask.spawn(aBrowser, {}, function* () {
     try {
       Cc["@mozilla.org/extensions/blocklist;1"]
         .getService(Ci.nsIBlocklistService);
     } catch (ex) {
       return ex.message;
     }
     return null;
--- a/browser/base/content/test/plugins/plugin_crashCommentAndURL.html
+++ b/browser/base/content/test/plugins/plugin_crashCommentAndURL.html
@@ -8,18 +8,17 @@
         var argStr = decodeURIComponent(window.location.search.substr(1));
         if (argStr) {
           var args = JSON.parse(argStr);
           for (var key in args)
             plugin.setAttribute(key, args[key]);
         }
         try {
           plugin.crash();
-        }
-        catch (err) {}
+        } catch (err) {}
       }
     </script>
   </head>
   <body onload="crash();">
     <embed id="plugin" type="application/x-test"
            width="400" height="400"
            drawmode="solid" color="FF00FFFF">
     </embed>
--- a/browser/base/content/test/popupNotifications/head.js
+++ b/browser/base/content/test/popupNotifications/head.js
@@ -12,33 +12,31 @@ XPCOMUtils.defineLazyModuleGetter(this, 
  *
  * @param topic
  *        Notification topic to observe.
  *
  * @return {Promise}
  * @resolves The array [subject, data] from the observed notification.
  * @rejects Never.
  */
-function promiseTopicObserved(topic)
-{
+function promiseTopicObserved(topic) {
   let deferred = Promise.defer();
   info("Waiting for observer topic " + topic);
   Services.obs.addObserver(function PTO_observe(obsSubject, obsTopic, obsData) {
     Services.obs.removeObserver(PTO_observe, obsTopic);
     deferred.resolve([obsSubject, obsData]);
   }, topic, false);
   return deferred.promise;
 }
 
 /**
  * Called after opening a new window or switching windows, this will wait until
  * we are sure that an attempt to display a notification will not fail.
  */
-function* waitForWindowReadyForPopupNotifications(win)
-{
+function* waitForWindowReadyForPopupNotifications(win) {
   // These are the same checks that PopupNotifications.jsm makes before it
   // allows a notification to open.
   yield BrowserTestUtils.waitForCondition(
     () => win.gBrowser.selectedBrowser.docShellIsActive,
     "The browser should be active"
   );
   yield BrowserTestUtils.waitForCondition(
     () => Services.focus.activeWindow == win,
@@ -53,18 +51,17 @@ function* waitForWindowReadyForPopupNoti
  * @param tab
  *        The tab to load into.
  * @param [optional] url
  *        The url to load, or the current url.
  * @return {Promise} resolved when the event is handled.
  * @resolves to the received event
  * @rejects if a valid load event is not received within a meaningful interval
  */
-function promiseTabLoadEvent(tab, url)
-{
+function promiseTabLoadEvent(tab, url) {
   let browser = tab.linkedBrowser;
 
   if (url) {
     browser.loadURI(url);
   }
 
   return BrowserTestUtils.browserLoaded(browser, false, url);
 }
--- a/browser/base/content/test/social/browser_aboutHome_activation.js
+++ b/browser/base/content/test/social/browser_aboutHome_activation.js
@@ -63,18 +63,17 @@ var gTests = [
 
 {
   desc: "Test activation bypassing enable panel",
   snippet: snippet2,
   panel: false
 }
 ];
 
-function test()
-{
+function test() {
   waitForExplicitFinish();
   requestLongerTimeout(2);
   ignoreAllUncaughtExceptions();
   PopupNotifications.panel.setAttribute("animate", "false");
   registerCleanupFunction(function() {
     PopupNotifications.panel.removeAttribute("animate");
   });
 
@@ -125,18 +124,17 @@ function test()
  * @param aTab
  *        The tab to load into.
  * @param aUrl
  *        The url to load.
  * @param aEvent
  *        The load event type to wait for.  Defaults to "load".
  * @return {Promise} resolved when the event is handled.
  */
-function promiseTabLoadEvent(aTab, aURL, aEventType = "load")
-{
+function promiseTabLoadEvent(aTab, aURL, aEventType = "load") {
   return new Promise(resolve => {
     info("Wait tab event: " + aEventType);
     aTab.linkedBrowser.addEventListener(aEventType, function load(event) {
       if (event.originalTarget != aTab.linkedBrowser.contentDocument ||
           event.target.location.href == "about:blank") {
         info("skipping spurious load event");
         return;
       }
@@ -153,18 +151,17 @@ function promiseTabLoadEvent(aTab, aURL,
  * remote snippets since that may cause network bustage or slowness.
  *
  * @param aTab
  *        The tab containing about:home.
  * @param aSetupFn
  *        The setup function to be run.
  * @return {Promise} resolved when the snippets are ready.  Gets the snippets map.
  */
-function promiseSetupSnippetsMap(aTab, aSnippet)
-{
+function promiseSetupSnippetsMap(aTab, aSnippet) {
   info("Waiting for snippets map");
 
   return ContentTask.spawn(aTab.linkedBrowser,
                     {snippetsVersion: AboutHomeUtils.snippetsVersion,
                      snippet: aSnippet},
                     function*(arg) {
     return new Promise(resolve => {
       addEventListener("AboutHomeLoadSnippets", function load(event) {
--- a/browser/base/content/test/urlbar/browser_bug556061.js
+++ b/browser/base/content/test/urlbar/browser_bug556061.js
@@ -9,18 +9,17 @@ var testTab;
 
 function runNextTest() {
   if (tests.length) {
     let t = tests.shift();
     waitForClipboard(t.expected, t.setup, function() {
       t.success();
       runNextTest();
     }, cleanup);
-  }
-  else {
+  } else {
     cleanup();
   }
 }
 
 function cleanup() {
   gBrowser.removeTab(testTab);
   finish();
 }
--- a/browser/base/content/test/urlbar/browser_bug623155.js
+++ b/browser/base/content/test/urlbar/browser_bug623155.js
@@ -86,18 +86,17 @@ var gWebProgressListener = {
        "onLocationChange catches only redirected URI.");
 
     if (aLocation.ref == "BG") {
       // This is background tab's request.
       isnot(gNewTab, gBrowser.selectedTab, "This is a background tab.");
     } else if (aLocation.ref == "FG") {
       // This is foreground tab's request.
       is(gNewTab, gBrowser.selectedTab, "This is a foreground tab.");
-    }
-    else {
+    } else {
       // We shonuld not reach here.
       ok(false, "This URI hash is not expected:" + aLocation.ref);
     }
 
     let isSelectedTab = gNewTab.selected;
     setTimeout(delayed, 0, isSelectedTab);
   }
 };
@@ -112,18 +111,17 @@ function delayed(aIsSelectedTab) {
   ok(isRedirectedURISpec(currentURI),
      "The content area is redirected. aIsSelectedTab:" + aIsSelectedTab);
   is(gURLBar.value, currentURI,
      "The URL bar shows the content URI. aIsSelectedTab:" + aIsSelectedTab);
 
   if (!aIsSelectedTab) {
     // If this was a background request, go on a foreground request.
     gBrowser.selectedBrowser.loadURI(REDIRECT_FROM + "#FG");
-  }
-  else {
+  } else {
     // Othrewise, nothing to do remains.
     finish();
   }
 }
 
 /* Cleanup */
 registerCleanupFunction(function() {
   if (gNewTab) {
--- a/browser/base/content/test/urlbar/browser_locationBarCommand.js
+++ b/browser/base/content/test/urlbar/browser_locationBarCommand.js
@@ -198,18 +198,17 @@ function promiseNewTabSwitched() {
   return new Promise(resolve => {
     gBrowser.addEventListener("TabSwitchDone", function onSwitch() {
       gBrowser.removeEventListener("TabSwitchDone", onSwitch);
       executeSoon(resolve);
     });
   });
 }
 
-function promiseCheckChildNoFocusedElement(browser)
-{
+function promiseCheckChildNoFocusedElement(browser) {
   if (!gMultiProcessBrowser) {
     Assert.equal(Services.focus.focusedElement, null, "There should be no focused element");
     return null;
   }
 
   return ContentTask.spawn(browser, { }, function* () {
     const fm = Components.classes["@mozilla.org/focus-manager;1"].
                           getService(Components.interfaces.nsIFocusManager);
--- a/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
+++ b/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
@@ -157,32 +157,30 @@ function ensure_opentabs_match_db() {
     }
   }
 
   return new Promise(resolve => {
     checkAutocompleteResults(tabs, resolve);
   });
 }
 
-function checkAutocompleteResults(aExpected, aCallback)
-{
+function checkAutocompleteResults(aExpected, aCallback) {
   gController.input = {
     timeout: 10,
     textValue: "",
     searches: ["unifiedcomplete"],
     searchParam: "enable-actions",
     popupOpen: false,
     minResultsForPopup: 0,
     invalidate() {},
     disableAutoComplete: false,
     completeDefaultIndex: false,
     get popup() { return this; },
     onSearchBegin() {},
-    onSearchComplete()
-    {
+    onSearchComplete() {
       info("Found " + gController.matchCount + " matches.");
       // Check to see the expected uris and titles match up (in any order)
       for (let i = 0; i < gController.matchCount; i++) {
         if (gController.getStyleAt(i).includes("heuristic")) {
           info("Skip heuristic match");
           continue;
         }
         let action = gURLBar.popup.input._parseActionUrl(gController.getValueAt(i));
--- a/browser/base/content/test/webrtc/browser_devices_get_user_media.js
+++ b/browser/base/content/test/webrtc/browser_devices_get_user_media.js
@@ -200,18 +200,17 @@ var gTests = [
       let expected = {};
       if (expectedMessage == "ok") {
         yield expectObserverCalled("getUserMedia:response:allow");
         yield expectObserverCalled("recording-device-events");
         if (aRequestVideo)
           expected.video = true;
         if (aRequestAudio)
           expected.audio = true;
-      }
-      else {
+      } else {
         yield expectObserverCalled("getUserMedia:response:deny");
         yield expectObserverCalled("recording-window-ended");
       }
       Assert.deepEqual((yield getMediaCaptureState()), expected,
                        "expected " + Object.keys(expected).join(" and ") +
                        " to be shared");
 
       function checkDevicePermissions(aDevice, aExpected) {
@@ -276,18 +275,17 @@ var gTests = [
         yield expectObserverCalled("getUserMedia:request");
 
         // Deny the request to cleanup...
         yield promiseMessage(permissionError, () => {
           activateSecondaryAction(kActionDeny);
         });
         yield expectObserverCalled("getUserMedia:response:deny");
         yield expectObserverCalled("recording-window-ended");
-      }
-      else {
+      } else {
         let expectedMessage = aExpectStream ? "ok" : permissionError;
         let promise = promiseMessage(expectedMessage);
         yield promiseRequestDevice(aRequestAudio, aRequestVideo);
         yield promise;
 
         if (expectedMessage == "ok") {
           yield expectObserverCalled("getUserMedia:request");
           yield promiseNoPopupNotification("webRTC-shareDevices");
@@ -300,18 +298,17 @@ var gTests = [
             expected.video = true;
           if (aAllowAudio && aRequestAudio)
             expected.audio = true;
           Assert.deepEqual((yield getMediaCaptureState()), expected,
                            "expected " + Object.keys(expected).join(" and ") +
                            " to be shared");
 
           yield closeStream();
-        }
-        else {
+        } else {
           yield expectObserverCalled("recording-window-ended");
         }
       }
 
       Perms.remove(uri, "camera");
       Perms.remove(uri, "microphone");
     }
 
@@ -445,18 +442,17 @@ var gTests = [
 
     yield indicator;
     yield checkSharingUI({video: true});
 
     ok(gIdentityHandler._identityPopup.hidden, "control center should be hidden");
     if ("nsISystemStatusBar" in Ci) {
       let activeStreams = webrtcUI.getActiveStreams(true, false, false);
       webrtcUI.showSharingDoorhanger(activeStreams[0]);
-    }
-    else {
+    } else {
       let win =
         Services.wm.getMostRecentWindow("Browser:WebRTCGlobalIndicator");
       let elt = win.document.getElementById("audioVideoButton");
       EventUtils.synthesizeMouseAtCenter(elt, {}, win);
       yield promiseWaitForCondition(() => !gIdentityHandler._identityPopup.hidden);
     }
     ok(!gIdentityHandler._identityPopup.hidden, "control center should be open");
 
--- a/browser/base/content/test/webrtc/browser_devices_get_user_media_screen.js
+++ b/browser/base/content/test/webrtc/browser_devices_get_user_media_screen.js
@@ -475,18 +475,17 @@ var gTests = [
                      "expected screen to be shared");
     yield indicator;
     yield checkSharingUI({screen: "Screen"});
 
     ok(gIdentityHandler._identityPopup.hidden, "control center should be hidden");
     if ("nsISystemStatusBar" in Ci) {
       let activeStreams = webrtcUI.getActiveStreams(false, false, true);
       webrtcUI.showSharingDoorhanger(activeStreams[0]);
-    }
-    else {
+    } else {
       let win =
         Services.wm.getMostRecentWindow("Browser:WebRTCGlobalIndicator");
       let elt = win.document.getElementById("screenShareButton");
       EventUtils.synthesizeMouseAtCenter(elt, {}, win);
       yield promiseWaitForCondition(() => !gIdentityHandler._identityPopup.hidden);
     }
     ok(!gIdentityHandler._identityPopup.hidden, "control center should be open");
 
--- a/browser/base/content/test/webrtc/head.js
+++ b/browser/base/content/test/webrtc/head.js
@@ -2,17 +2,17 @@ Components.utils.import("resource://gre/
 
 XPCOMUtils.defineLazyModuleGetter(this, "Promise",
   "resource://gre/modules/Promise.jsm");
 
 const PREF_PERMISSION_FAKE = "media.navigator.permission.fake";
 const CONTENT_SCRIPT_HELPER = getRootDirectory(gTestPath) + "get_user_media_content_script.js";
 
 function waitForCondition(condition, nextTest, errorMsg, retryTimes) {
-  retryTimes = typeof retryTimes !== 'undefined' ?  retryTimes : 30;
+  retryTimes = typeof retryTimes !== 'undefined' ? retryTimes : 30;
   var tries = 0;
   var interval = setInterval(function() {
     if (tries >= retryTimes) {
       ok(false, errorMsg);
       moveOn();
     }
     var conditionPassed;
     try {
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -1557,18 +1557,17 @@ file, You can obtain one at http://mozil
           let alignSiteIcons = urlbarPosition <= 2 &&
                                nodes.slice(0, urlbarPosition)
                                     .every(n => n.localName == "toolbarbutton");
           if (alignSiteIcons) {
             let identityRect =
               document.getElementById("identity-icon").getBoundingClientRect();
             this.siteIconStart = popupDirection == "rtl" ? identityRect.right
                                                          : identityRect.left;
-          }
-          else {
+          } else {
             // Reset the alignment so that the site icons are positioned
             // according to whatever's in the CSS.
             this.siteIconStart = undefined;
           }
 
           // Position the popup below the navbar.  To get the y-coordinate,
           // which is an offset from the bottom of the input, subtract the
           // bottom of the navbar from the buttom of the input.
@@ -1988,18 +1987,17 @@ file, You can obtain one at http://mozil
       </method>
 
       <method name="setProgress">
         <parameter name="aProgress"/>
         <parameter name="aMaxProgress"/>
         <body><![CDATA[
           if (aMaxProgress == -1) {
             this.progressmeter.setAttribute("mode", "undetermined");
-          }
-          else {
+          } else {
             this.progressmeter.setAttribute("mode", "determined");
             this.progressmeter.setAttribute("value", (aProgress * 100) / aMaxProgress);
           }
 
           let now = Date.now();
 
           if (!this.notification.lastUpdate) {
             this.notification.lastUpdate = now;
@@ -2030,18 +2028,17 @@ file, You can obtain one at http://mozil
       </method>
 
       <method name="cancel">
         <body><![CDATA[
           let installs = this.notification.options.installs;
           installs.forEach(function(aInstall) {
             try {
               aInstall.cancel();
-            }
-            catch (e) {
+            } catch (e) {
               // Cancel will throw if the download has already failed
             }
           }, this);
 
           PopupNotifications.remove(this.notification);
         ]]></body>
       </method>
 
@@ -2069,18 +2066,17 @@ file, You can obtain one at http://mozil
             if (Preferences.get("xpinstall.customConfirmationUI", false)) {
               this.progressmeter.setAttribute("mode", "undetermined");
               let status = gNavigatorBundle.getString("addonDownloadVerifying");
               this.progresstext.setAttribute("value", status);
               this.progresstext.setAttribute("tooltiptext", status);
             } else {
               PopupNotifications.remove(this.notification);
             }
-          }
-          else {
+          } else {
             this.setProgress(progress, maxProgress);
           }
         ]]></body>
       </method>
 
       <method name="onDownloadProgress">
         <body><![CDATA[
           this.updateProgress();
@@ -2137,18 +2133,17 @@ file, You can obtain one at http://mozil
     <implementation>
       <constructor><![CDATA[
         document.getAnonymousElementByAttribute(this, "anonid", "center-item-label").value = this.action.pluginName;
 
         let curState = "block";
         if (this.action.fallbackType == Ci.nsIObjectLoadingContent.PLUGIN_ACTIVE) {
           if (this.action.pluginPermissionType == Ci.nsIPermissionManager.EXPIRE_SESSION) {
             curState = "allownow";
-          }
-          else {
+          } else {
             curState = "allowalways";
           }
         }
         document.getAnonymousElementByAttribute(this, "anonid", "center-item-menulist").value = curState;
 
         let warningString = "";
         let linkString = "";
 
@@ -2161,18 +2156,17 @@ file, You can obtain one at http://mozil
           document.getAnonymousElementByAttribute(this, "anonid", "center-item-menulist").hidden = true;
           warningString = gNavigatorBundle.getString("pluginActivateDisabled.label");
           linkString = gNavigatorBundle.getString("pluginActivateDisabled.manage");
           linkHandler = function(event) {
             event.preventDefault();
             gPluginHandler.managePlugins();
           };
           document.getAnonymousElementByAttribute(this, "anonid", "center-item-warning-icon").hidden = true;
-        }
-        else {
+        } else {
           url = this.action.detailsLink;
 
           switch (this.action.blocklistState) {
           case Ci.nsIBlocklistService.STATE_NOT_BLOCKED:
             document.getAnonymousElementByAttribute(this, "anonid", "center-item-warning").hidden = true;
             break;
           case Ci.nsIBlocklistService.STATE_BLOCKED:
             document.getAnonymousElementByAttribute(this, "anonid", "center-item-menulist").hidden = true;
@@ -2208,18 +2202,17 @@ file, You can obtain one at http://mozil
         if (url || linkHandler) {
           link.value = linkString;
           if (url) {
             link.href = url;
           }
           if (linkHandler) {
             link.addEventListener("click", linkHandler, false);
           }
-        }
-        else {
+        } else {
           link.hidden = true;
         }
       ]]></constructor>
       <property name="value">
         <getter>
           return document.getAnonymousElementByAttribute(this, "anonid",
                    "center-item-menulist").value;
         </getter>
@@ -2358,18 +2351,17 @@ file, You can obtain one at http://mozil
             for (let child of this.childNodes) {
               if (child.tagName != "row") {
                 continue;
               }
               child.hidden = this.notification.options.primaryPlugin !=
                              child.action.permissionString;
             }
             showBox.hidden = false;
-          }
-          else {
+          } else {
             for (let child of this.childNodes) {
               if (child.tagName != "row") {
                 continue;
               }
               child.hidden = false;
             }
             showBox.hidden = true;
           }
@@ -2420,39 +2412,36 @@ file, You can obtain one at http://mozil
             default:
               Cu.reportError(Error("Unexpected blocklist state"));
             }
 
             // TODO: temporary compromise, remove this once bug 892487 is fixed
             if (isWindowPrivate) {
               this._buttonContainer.hidden = true;
             }
-          }
-          else if (action.pluginTag.enabledState == Ci.nsIPluginTag.STATE_DISABLED) {
+          } else if (action.pluginTag.enabledState == Ci.nsIPluginTag.STATE_DISABLED) {
             let linkElement =
               document.getAnonymousElementByAttribute(
                          this, "anonid", "click-to-play-plugins-notification-link");
             linkElement.textContent = gNavigatorBundle.getString("pluginActivateDisabled.manage");
             linkElement.setAttribute("onclick", "gPluginHandler.managePlugins()");
 
             let descElement = document.getAnonymousElementByAttribute(this, "anonid", "click-to-play-plugins-notification-description");
             descElement.textContent = gNavigatorBundle.getFormattedString(
               "pluginActivateDisabled.message", [action.pluginName, this._brandShortName]) + " ";
             this._buttonContainer.hidden = true;
             return;
-          }
-          else if (action.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED) {
+          } else if (action.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED) {
             let descElement = document.getAnonymousElementByAttribute(this, "anonid", "click-to-play-plugins-notification-description");
             descElement.textContent = gNavigatorBundle.getFormattedString(
               "pluginActivateBlocked.message", [action.pluginName, this._brandShortName]) + " ";
             this._setupLink("pluginActivate.learnMore", action.detailsLink);
             this._buttonContainer.hidden = true;
             return;
-          }
-          else {
+          } else {
             button1 = {
               label: "pluginActivateNow.label",
               accesskey: "pluginActivateNow.accesskey",
               action: "_singleActivateNow"
             };
             button2 = {
               label: "pluginActivateAlways.label",
               accesskey: "pluginActivateAlways.accesskey",
@@ -2494,18 +2483,17 @@ file, You can obtain one at http://mozil
           this._primaryButton.accessKey = gNavigatorBundle.getString(button1.accesskey);
           this._primaryButton.setAttribute("action", button1.action);
 
           this._secondaryButton.label = gNavigatorBundle.getString(button2.label);
           this._secondaryButton.accessKey = gNavigatorBundle.getString(button2.accesskey);
           this._secondaryButton.setAttribute("action", button2.action);
           if (button1.default) {
             this._primaryButton.setAttribute("default", "true");
-          }
-          else if (button2.default) {
+          } else if (button2.default) {
             this._secondaryButton.setAttribute("default", "true");
           }
         ]]></body>
       </method>
       <method name="_setupDescription">
         <parameter name="baseString" />
         <parameter name="pluginName" /> <!-- null for the multiple-plugin case -->
         <parameter name="prePath" />
@@ -2605,18 +2593,17 @@ file, You can obtain one at http://mozil
       <method name="_accept">
         <parameter name="aEvent" />
         <body><![CDATA[
           if (aEvent.defaultPrevented)
             return;
           aEvent.preventDefault();
           if (this._primaryButton.getAttribute("default") == "true") {
             this._primaryButton.click();
-          }
-          else if (this._secondaryButton.getAttribute("default") == "true") {
+          } else if (this._secondaryButton.getAttribute("default") == "true") {
             this._secondaryButton.click();
           }
         ]]></body>
       </method>
     </implementation>
     <handlers>
       <!-- The _accept method checks for .defaultPrevented so that if focus is in a button,
            enter activates the button and not this default action -->
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -33,18 +33,17 @@ var gBidiUI = false;
 
 /**
  * Determines whether the given url is considered a special URL for new tabs.
  */
 function isBlankPageURL(aURL) {
   return aURL == "about:blank" || aURL == BROWSER_NEW_TAB_URL;
 }
 
-function getBrowserURL()
-{
+function getBrowserURL() {
   return "chrome://browser/content/browser.xul";
 }
 
 function getTopWin(skipPopups) {
   // If this is called in a browser window, use that window regardless of
   // whether it's the frontmost window, since commands can be executed in
   // background windows (bug 626148).
   if (top.document.documentElement.getAttribute("windowtype") == "navigator:browser" &&
@@ -56,22 +55,20 @@ function getTopWin(skipPopups) {
                                                   allowPopups: !skipPopups});
 }
 
 function openTopWin(url) {
   /* deprecated */
   openUILinkIn(url, "current");
 }
 
-function getBoolPref(prefname, def)
-{
+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".
@@ -117,18 +114,17 @@ function openUILink(url, event, aIgnoreB
  *
  * Exceptions:
  * - Alt is ignored for menu items selected using the keyboard so you don't accidentally save stuff.
  *    (Currently, the Alt isn't sent here at all for menu items, but that will change in bug 126189.)
  * - Alt is hard to use in context menus, because pressing Alt closes the menu.
  * - Alt can't be used on the bookmarks toolbar because Alt is used for "treat this as something draggable".
  * - The button is ignored for the middle-click-paste-URL feature, since it's always a middle-click.
  */
-function whereToOpenLink( e, ignoreButton, ignoreAlt )
-{
+function whereToOpenLink(e, ignoreButton, ignoreAlt) {
   // This method must treat a null event like a left click without modifier keys (i.e.
   // e = { shiftKey:false, ctrlKey:false, metaKey:false, altKey:false, button:0 })
   // for compatibility purposes.
   if (!e)
     return "current";
 
   var shift = e.shiftKey;
   var ctrl =  e.ctrlKey;
@@ -228,18 +224,17 @@ function openLinkIn(url, where, params) 
       params.forceAboutBlankViewerInCurrent;
 
   if (where == "save") {
     // TODO(1073187): propagate referrerPolicy.
 
     // ContentClick.jsm passes isContentWindowPrivate for saveURL instead of passing a CPOW initiatingDoc
     if ("isContentWindowPrivate" in params) {
       saveURL(url, null, null, true, true, aNoReferrer ? null : aReferrerURI, null, params.isContentWindowPrivate);
-    }
-    else {
+    } else {
       if (!aInitiatingDoc) {
         Components.utils.reportError("openUILink/openLinkIn was called with " +
           "where == 'save' but without initiatingDoc.  See bug 814264.");
         return;
       }
       saveURL(url, null, null, true, true, aNoReferrer ? null : aReferrerURI, aInitiatingDoc);
     }
     return;
@@ -517,18 +512,17 @@ function createUserContextMenu(event, {
     docfrag.appendChild(menuitem);
   }
 
   event.target.appendChild(docfrag);
   return true;
 }
 
 // Closes all popups that are ancestors of the node.
-function closeMenus(node)
-{
+function closeMenus(node) {
   if ("tagName" in node) {
     if (node.namespaceURI == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
     && (node.tagName == "menupopup" || node.tagName == "popup"))
       node.hidePopup();
 
     closeMenus(node.parentNode);
   }
 }
@@ -538,18 +532,17 @@ function closeMenus(node)
  * @param aEvent
  *        The KeyboardEvent event you want to compare against your key.
  *
  * @param aKey
  *        The <key> element checked to see if it was called in aEvent.
  *        For example, aKey can be a variable set to document.getElementById("key_close")
  *        to check if the close command key was pressed in aEvent.
 */
-function eventMatchesKey(aEvent, aKey)
-{
+function eventMatchesKey(aEvent, aKey) {
   let keyPressed = aKey.getAttribute("key").toLowerCase();
   let keyModifiers = aKey.getAttribute("modifiers");
   let modifiers = ["Alt", "Control", "Meta", "Shift"];
 
   if (aEvent.key != keyPressed) {
     return false;
   }
   let eventModifiers = modifiers.filter(modifier => aEvent.getModifierState(modifier));
@@ -558,29 +551,28 @@ function eventMatchesKey(aEvent, aKey)
      return false;
   }
   // Check whether aKey's modifiers match aEvent's modifiers
   if (keyModifiers) {
     keyModifiers = keyModifiers.split(/[\s,]+/);
     // Capitalize first letter of aKey's modifers to compare to aEvent's modifier
     keyModifiers.forEach(function(modifier, index) {
       if (modifier == "accel") {
-        keyModifiers[index] = AppConstants.platform == "macosx" ?  "Meta" : "Control";
+        keyModifiers[index] = AppConstants.platform == "macosx" ? "Meta" : "Control";
       } else {
         keyModifiers[index] = modifier[0].toUpperCase() + modifier.slice(1);
       }
     });
     return modifiers.every(modifier => keyModifiers.includes(modifier) == aEvent.getModifierState(modifier));
   }
   return true;
 }
 
 // Gather all descendent text under given document node.
-function gatherTextUnder( root )
-{
+function gatherTextUnder(root) {
   var text = "";
   var node = root.firstChild;
   var depth = 1;
   while ( node && depth > 0 ) {
     // See if this node is text.
     if ( node.nodeType == Node.TEXT_NODE ) {
       // Add this text to our collection.
       text += " " + node.data;
@@ -611,18 +603,17 @@ function gatherTextUnder( root )
   // Strip leading and tailing whitespace.
   text = text.trim();
   // Compress remaining whitespace.
   text = text.replace( /\s+/g, " " );
   return text;
 }
 
 // This function exists for legacy reasons.
-function getShellService()
-{
+function getShellService() {
   return ShellService;
 }
 
 function isBidiEnabled() {
   // first check the pref.
   if (getBoolPref("bidi.browser.ui", false))
     return true;
 
@@ -674,18 +665,17 @@ function openAboutDialog() {
     features += "resizable=no,minimizable=no";
   } else {
     features += "centerscreen,dependent,dialog=no";
   }
 
   window.openDialog("chrome://browser/content/aboutDialog.xul", "", features);
 }
 
-function openPreferences(paneID, extraArgs)
-{
+function openPreferences(paneID, extraArgs) {
   function switchToAdvancedSubPane(doc) {
     if (extraArgs && extraArgs["advancedTab"]) {
       let advancedPaneTabs = doc.getElementById("advancedPrefs");
       advancedPaneTabs.selectedTab = doc.getElementById(extraArgs["advancedTab"]);
     }
   }
 
   // This function is duplicated from preferences.js.
@@ -741,78 +731,70 @@ function openPreferences(paneID, extraAr
   } else {
     if (paneID) {
       browser.contentWindow.gotoPref(paneID);
     }
     switchToAdvancedSubPane(browser.contentDocument);
   }
 }
 
-function openAdvancedPreferences(tabID)
-{
+function openAdvancedPreferences(tabID) {
   openPreferences("paneAdvanced", { "advancedTab" : tabID });
 }
 
 /**
  * Opens the troubleshooting information (about:support) page for this version
  * of the application.
  */
-function openTroubleshootingPage()
-{
+function openTroubleshootingPage() {
   openUILinkIn("about:support", "tab");
 }
 
 /**
  * Opens the troubleshooting information (about:support) page for this version
  * of the application.
  */
-function openHealthReport()
-{
+function openHealthReport() {
   openUILinkIn("about:healthreport", "tab");
 }
 
 /**
  * Opens the feedback page for this version of the application.
  */
-function openFeedbackPage()
-{
+function openFeedbackPage() {
   var url = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
                       .getService(Components.interfaces.nsIURLFormatter)
                       .formatURLPref("app.feedback.baseURL");
   openUILinkIn(url, "tab");
 }
 
-function openTourPage()
-{
+function openTourPage() {
   let scope = {}
   Components.utils.import("resource:///modules/UITour.jsm", scope);
   openUILinkIn(scope.UITour.url, "tab");
 }
 
-function buildHelpMenu()
-{
+function buildHelpMenu() {
   // Enable/disable the "Report Web Forgery" menu item.
   if (typeof gSafeBrowsing != "undefined") {
     gSafeBrowsing.setReportPhishingMenu();
   }
 }
 
-function isElementVisible(aElement)
-{
+function isElementVisible(aElement) {
   if (!aElement)
     return false;
 
   // If aElement or a direct or indirect parent is hidden or collapsed,
   // height, width or both will be 0.
   var bo = aElement.boxObject;
   return (bo.height > 0 && bo.width > 0);
 }
 
-function makeURLAbsolute(aBase, aUrl)
-{
+function makeURLAbsolute(aBase, aUrl) {
   // Note:  makeURI() will throw if aUri is not a valid URI
   return makeURI(aUrl, null, makeURI(aBase)).spec;
 }
 
 /**
  * openNewTabWith: opens a new tab with the given URL.
  *
  * @param aURL
--- a/browser/base/content/web-panels.js
+++ b/browser/base/content/web-panels.js
@@ -2,59 +2,55 @@
 /* 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/. */
 
 const NS_ERROR_MODULE_NETWORK = 2152398848;
 const NS_NET_STATUS_READ_FROM = NS_ERROR_MODULE_NETWORK + 8;
 const NS_NET_STATUS_WROTE_TO  = NS_ERROR_MODULE_NETWORK + 9;
 
-function getPanelBrowser()
-{
+function getPanelBrowser() {
     return document.getElementById("web-panels-browser");
 }
 
 var panelProgressListener = {
     onProgressChange(aWebProgress, aRequest,
                                 aCurSelfProgress, aMaxSelfProgress,
                                 aCurTotalProgress, aMaxTotalProgress) {
     },
 
-    onStateChange(aWebProgress, aRequest, aStateFlags, aStatus)
-    {
+    onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
         if (!aRequest)
           return;
 
         // ignore local/resource:/chrome: files
         if (aStatus == NS_NET_STATUS_READ_FROM || aStatus == NS_NET_STATUS_WROTE_TO)
            return;
 
         if (aStateFlags & Ci.nsIWebProgressListener.STATE_START &&
             aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
             window.parent.document.getElementById('sidebar-throbber').setAttribute("loading", "true");
-        }
-        else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
+        } else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
                 aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
             window.parent.document.getElementById('sidebar-throbber').removeAttribute("loading");
         }
     }
     ,
 
     onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
         UpdateBackForwardCommands(getPanelBrowser().webNavigation);
     },
 
     onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
     },
 
     onSecurityChange(aWebProgress, aRequest, aState) {
     },
 
-    QueryInterface(aIID)
-    {
+    QueryInterface(aIID) {
         if (aIID.equals(Ci.nsIWebProgressListener) ||
             aIID.equals(Ci.nsISupportsWeakReference) ||
             aIID.equals(Ci.nsISupports))
             return this;
         throw Cr.NS_NOINTERFACE;
     }
 };
 
@@ -64,41 +60,37 @@ function loadWebPanel(aURI) {
     if (gLoadFired) {
         panelBrowser.webNavigation
                     .loadURI(aURI, nsIWebNavigation.LOAD_FLAGS_NONE,
                              null, null, null);
     }
     panelBrowser.setAttribute("cachedurl", aURI);
 }
 
-function load()
-{
+function load() {
     var panelBrowser = getPanelBrowser();
     panelBrowser.webProgress.addProgressListener(panelProgressListener,
                                                  Ci.nsIWebProgress.NOTIFY_ALL);
     panelBrowser.messageManager.loadFrameScript("chrome://browser/content/content.js", true);
     var cachedurl = panelBrowser.getAttribute("cachedurl")
     if (cachedurl) {
         panelBrowser.webNavigation
                     .loadURI(cachedurl, nsIWebNavigation.LOAD_FLAGS_NONE, null,
                              null, null);
     }
 
     gLoadFired = true;
 }
 
-function unload()
-{
+function unload() {
     getPanelBrowser().webProgress.removeProgressListener(panelProgressListener);
 }
 
-function PanelBrowserStop()
-{
+function PanelBrowserStop() {
     getPanelBrowser().webNavigation.stop(nsIWebNavigation.STOP_ALL)
 }
 
-function PanelBrowserReload()
-{
+function PanelBrowserReload() {
     getPanelBrowser().webNavigation
                      .sessionHistory
                      .QueryInterface(nsIWebNavigation)
                      .reload(nsIWebNavigation.LOAD_FLAGS_NONE);
 }
--- a/browser/base/content/webrtcIndicator.js
+++ b/browser/base/content/webrtcIndicator.js
@@ -50,30 +50,28 @@ function updateIndicatorState() {
   if (webrtcUI.showMicrophoneIndicator)
     shareTypes.push("Microphone");
 
   let audioVideoButton = document.getElementById("audioVideoButton");
   if (shareTypes.length) {
     let stringId = "webrtcIndicator.sharing" + shareTypes.join("And") + ".tooltip";
     audioVideoButton.setAttribute("tooltiptext",
                                    gStringBundle.GetStringFromName(stringId));
-  }
-  else {
+  } else {
     audioVideoButton.removeAttribute("tooltiptext");
   }
 
   // Screen sharing button tooltip.
   let screenShareButton = document.getElementById("screenShareButton");
   if (webrtcUI.showScreenSharingIndicator) {
     let stringId = "webrtcIndicator.sharing" +
       webrtcUI.showScreenSharingIndicator + ".tooltip";
     screenShareButton.setAttribute("tooltiptext",
                                     gStringBundle.GetStringFromName(stringId));
-  }
-  else {
+  } else {
     screenShareButton.removeAttribute("tooltiptext");
   }
 
   // Resize and ensure the window position is correct
   // (sizeToContent messes with our position).
   window.sizeToContent();
   PositionHandler.adjustPosition();
 }
--- a/browser/components/contextualidentity/test/browser/browser_eme.js
+++ b/browser/components/contextualidentity/test/browser/browser_eme.js
@@ -25,27 +25,25 @@ function* openTabInUserContext(uri, user
   gBrowser.selectedTab = tab;
   tab.ownerDocument.defaultView.focus();
 
   let browser = gBrowser.getBrowserForTab(tab);
   yield BrowserTestUtils.browserLoaded(browser);
   return {tab, browser};
 }
 
-function HexToBase64(hex)
-{
+function HexToBase64(hex) {
   var bin = "";
   for (var i = 0; i < hex.length; i += 2) {
     bin += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
   }
   return window.btoa(bin).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
 }
 
-function Base64ToHex(str)
-{
+function Base64ToHex(str) {
   var bin = window.atob(str.replace(/-/g, "+").replace(/_/g, "/"));
   var res = "";
   for (var i = 0; i < bin.length; i++) {
     res += ("0" + bin.charCodeAt(i).toString(16)).substr(-2);
   }
   return res;
 }
 
--- a/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js
+++ b/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js
@@ -66,37 +66,34 @@ function* openTabInUserContext(uri, user
   yield BrowserTestUtils.browserLoaded(browser);
   return {tab, browser};
 }
 
 function getCookiesForOA(host, userContextId) {
   return Services.cookies.getCookiesFromHost(host, {userContextId});
 }
 
-function createURI(uri)
-{
+function createURI(uri) {
   let ioServ = Cc["@mozilla.org/network/io-service;1"]
                   .getService(Components.interfaces.nsIIOService);
   return ioServ.newURI(uri, null, null);
 }
 
-function getCacheStorage(where, lci, appcache)
-{
+function getCacheStorage(where, lci, appcache) {
   if (!lci) lci = LoadContextInfo.default;
   switch (where) {
     case "disk": return css.diskCacheStorage(lci, false);
     case "memory": return css.memoryCacheStorage(lci);
     case "appcache": return css.appCacheStorage(lci, appcache);
     case "pin": return css.pinningCacheStorage(lci);
   }
   return null;
 }
 
-function OpenCacheEntry(key, where, flags, lci)
-{
+function OpenCacheEntry(key, where, flags, lci) {
   return new Promise(resolve => {
     key = createURI(key);
     function CacheListener() { }
     CacheListener.prototype = {
       _appCache: null,
 
       QueryInterface(iid) {
         if (iid.equals(Components.interfaces.nsICacheEntryOpenCallback) ||
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -1337,18 +1337,17 @@ var CustomizableUIInternal = {
 
     let node;
     if (aWidget.type == "custom") {
       if (aWidget.onBuild) {
         node = aWidget.onBuild(aDocument);
       }
       if (!node || !(node instanceof aDocument.defaultView.XULElement))
         log.error("Custom widget with id " + aWidget.id + " does not return a valid node");
-    }
-    else {
+    } else {
       if (aWidget.onBeforeCreated) {
         aWidget.onBeforeCreated(aDocument);
       }
       node = aDocument.createElementNS(kNSXUL, "toolbarbutton");
 
       node.setAttribute("id", aWidget.id);
       node.setAttribute("widget-id", aWidget.id);
       node.setAttribute("widget-type", aWidget.type);
@@ -4319,28 +4318,26 @@ OverflowableToolbar.prototype = {
         // NB: we're guaranteed that it has a previousSibling, because if it didn't,
         // we would have added it to the toolbar instead. See getOverflowedNextNode.
         let prevId = aNode.previousSibling.id;
         let minSize = this._collapsed.get(prevId);
         this._collapsed.set(aNode.id, minSize);
         aNode.setAttribute("cui-anchorid", this._chevron.id);
         aNode.setAttribute("overflowedItem", true);
         CustomizableUIInternal.notifyListeners("onWidgetOverflow", aNode, this._target);
-      }
-      // If it is not overflowed and not in the toolbar, and was not overflowed
-      // either, it moved out of the toolbar. That means there's now space in there!
-      // Let's try to move stuff back:
-      else if (!nowInBar) {
+      } else if (!nowInBar) {
+        // If it is not overflowed and not in the toolbar, and was not overflowed
+        // either, it moved out of the toolbar. That means there's now space in there!
+        // Let's try to move stuff back:
         this._moveItemsBackToTheirOrigin(true);
       }
       // If it's in the toolbar now, then we don't care. An overflow event may
       // fire afterwards; that's ok!
-    }
-    // If it used to be overflowed...
-    else if (!nowOverflowed) {
+    } else if (!nowOverflowed) {
+      // If it used to be overflowed...
       // ... and isn't anymore, let's remove our bookkeeping:
       this._collapsed.delete(aNode.id);
       aNode.removeAttribute("cui-anchorid");
       aNode.removeAttribute("overflowedItem");
       CustomizableUIInternal.notifyListeners("onWidgetUnderflow", aNode, this._target);
 
       if (!this._collapsed.size) {
         this._toolbar.removeAttribute("overflowing");
--- a/browser/components/customizableui/CustomizeMode.jsm
+++ b/browser/components/customizableui/CustomizeMode.jsm
@@ -1141,17 +1141,17 @@ CustomizeMode.prototype = {
         let placements = CustomizableUI.getWidgetIdsInArea(child.id);
         if (!placements.length) {
           CustomizableUI.removeExtraToolbar(child.id);
         }
       }
     }
   },
 
-  persistCurrentSets(aSetBeforePersisting)  {
+  persistCurrentSets(aSetBeforePersisting) {
     let document = this.document;
     let toolbars = document.querySelectorAll("toolbar[customizable='true'][currentset]");
     for (let toolbar of toolbars) {
       if (aSetBeforePersisting) {
         let set = toolbar.currentSet;
         toolbar.setAttribute("currentset", set);
       }
       // Persist the currentset attribute directly on hardcoded toolbars.
@@ -2049,17 +2049,17 @@ CustomizeMode.prototype = {
       // had been set.
       aItem.style.removeProperty("border-left-width");
       aItem.style.removeProperty("border-right-width");
       if (aNoTransition) {
         // Force a layout flush:
         aItem.getBoundingClientRect();
         aItem.removeAttribute("notransition");
       }
-    } else  {
+    } else {
       aItem.removeAttribute("dragover");
       if (aNextItem) {
         let nextArea = this._getCustomizableParent(aNextItem);
         if (nextArea == currentArea) {
           // No need to do anything if we're still dragging in this area:
           return;
         }
       }
@@ -2150,17 +2150,17 @@ CustomizeMode.prototype = {
       aElement = aElement.parentNode;
     }
     return null;
   },
 
   _getDragOverNode(aEvent, aAreaElement, aInToolbar, aDraggedItemId) {
     let expectedParent = aAreaElement.customizationTarget || aAreaElement;
     // Our tests are stupid. Cope:
-    if (!aEvent.clientX  && !aEvent.clientY) {
+    if (!aEvent.clientX && !aEvent.clientY) {
       return aEvent.target;
     }
     // Offset the drag event's position with the offset to the center of
     // the thing we're dragging
     let dragX = aEvent.clientX - this._dragOffset.x;
     let dragY = aEvent.clientY - this._dragOffset.y;
 
     // Ensure this is within the container
--- a/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js
+++ b/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js
@@ -1,18 +1,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/. */
 
 "use strict";
 
 logActiveElement();
 
-function* waitForSearchBarFocus()
-{
+function* waitForSearchBarFocus() {
   let searchbar = document.getElementById("searchbar");
   yield waitForCondition(function() {
     logActiveElement();
     return document.activeElement === searchbar.textbox.inputField;
   });
 }
 
 // Ctrl+K should open the menu panel and focus the search bar if the search bar is in the panel.
--- a/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js
+++ b/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js
@@ -33,16 +33,14 @@ add_task(function*() {
   let privateBrowsingButton = document.getElementById("privatebrowsing-button");
   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 {
+  } 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
@@ -32,16 +32,14 @@ add_task(function*() {
   let newWindowButton = document.getElementById("new-window-button");
   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 {
+  } finally {
     Services.ww.unregisterNotification(observerWindowOpened);
   }
 });
--- a/browser/components/customizableui/test/browser_947914_button_print.js
+++ b/browser/components/customizableui/test/browser_947914_button_print.js
@@ -21,18 +21,17 @@ add_task(function*() {
     let printButton = document.getElementById("print-button");
     ok(printButton, "Print button exists in Panel Menu");
 
     if (isOSX) {
       let panelHiddenPromise = promisePanelHidden(window);
       PanelUI.hide();
       yield panelHiddenPromise;
       info("Menu panel was closed");
-    }
-    else {
+    } else {
       printButton.click();
       yield waitForCondition(() => gInPrintPreviewMode);
 
       ok(gInPrintPreviewMode, "Entered print preview mode");
 
       // close print preview
       if (gInPrintPreviewMode) {
         PrintUtils.exitPrintPreview();
--- a/browser/components/distribution.js
+++ b/browser/components/distribution.js
@@ -58,18 +58,17 @@ DistributionCustomizer.prototype = {
     this.__defineGetter__("_ini", () => ini);
     return this._ini;
   },
 
   get _locale() {
     let locale;
     try {
       locale = this._prefs.getCharPref("general.useragent.locale");
-    }
-    catch (e) {
+    } catch (e) {
       locale = "en-US";
     }
     this.__defineGetter__("_locale", () => locale);
     return this._locale;
   },
 
   get _language() {
     let language = this._locale.split("-")[0];
@@ -280,27 +279,25 @@ DistributionCustomizer.prototype = {
     let globalPrefs = enumToObject(this._ini.getKeys("Global"));
     if (!(globalPrefs["id"] && globalPrefs["version"] && globalPrefs["about"]))
       return;
 
     let bmProcessedPref;
     try {
       bmProcessedPref = this._ini.getString("Global",
                                             "bookmarks.initialized.pref");
-    }
-    catch (e) {
+    } catch (e) {
       bmProcessedPref = "distribution." +
         this._ini.getString("Global", "id") + ".bookmarksProcessed";
     }
 
     let bmProcessed = false;
     try {
       bmProcessed = this._prefs.getBoolPref(bmProcessedPref);
-    }
-    catch (e) {}
+    } catch (e) {}
 
     if (!bmProcessed) {
       if (sections["BookmarksMenu"])
         yield this._parseBookmarksSection(PlacesUtils.bookmarks.menuGuid,
                                           "BookmarksMenu");
       if (sections["BookmarksToolbar"])
         yield this._parseBookmarksSection(PlacesUtils.bookmarks.toolbarGuid,
                                           "BookmarksToolbar");
--- a/browser/components/feeds/FeedConverter.js
+++ b/browser/components/feeds/FeedConverter.js
@@ -92,18 +92,17 @@ function getPrefReaderForType(t) {
 }
 
 function safeGetCharPref(pref, defaultValue) {
   var prefs =
       Cc["@mozilla.org/preferences-service;1"].
       getService(Ci.nsIPrefBranch);
   try {
     return prefs.getCharPref(pref);
-  }
-  catch (e) {
+  } catch (e) {
   }
   return defaultValue;
 }
 
 function FeedConverter() {
 }
 FeedConverter.prototype = {
   classID: Components.ID("{229fa115-9412-4d32-baf3-2fc407f76fb1}"),
@@ -261,18 +260,17 @@ FeedConverter.prototype = {
           Services.scriptSecurityManager.createCodebasePrincipal(aboutFeedsURI,
                                                                  loadInfo.originAttributes);
       } else {
         chromeChannel = ios.newChannelFromURIWithLoadInfo(result.uri, loadInfo);
       }
 
       chromeChannel.loadGroup = this._request.loadGroup;
       chromeChannel.asyncOpen(this._listener, null);
-    }
-    finally {
+    } finally {
       this._releaseHandles();
     }
   },
 
   /**
    * See nsIStreamListener.idl
    */
   onDataAvailable(request, context, inputStream,
@@ -297,18 +295,17 @@ FeedConverter.prototype = {
       if (!httpChannel.requestSucceeded) {
         // Just give up, but don't forget to cancel the channel first!
         request.cancel(Cr.NS_BINDING_ABORTED);
         return;
       }
 
       // Note: this throws if the header is not set.
       httpChannel.getResponseHeader("X-Moz-Is-Feed");
-    }
-    catch (ex) {
+    } catch (ex) {
       this._sniffed = true;
     }
 
     this._request = request;
 
     // Save and reset the forced state bit early, in case there's some kind of
     // error.
     let feedService =
--- a/browser/components/feeds/FeedWriter.js
+++ b/browser/components/feeds/FeedWriter.js
@@ -17,18 +17,17 @@ const FEEDWRITER_CONTRACTID = "@mozilla.
 
 function LOG(str) {
   let prefB = Cc["@mozilla.org/preferences-service;1"].
               getService(Ci.nsIPrefBranch);
 
   let shouldLog = false;
   try {
     shouldLog = prefB.getBoolPref("feeds.log");
-  }
-  catch (ex) {
+  } catch (ex) {
   }
 
   if (shouldLog)
     dump("*** Feeds: " + str + "\n");
 }
 
 /**
  * Wrapper function for nsIIOService::newURI.
@@ -164,18 +163,17 @@ FeedWriter.prototype = {
   _getPropertyAsBag(container, property) {
     return container.fields.getProperty(property).
                      QueryInterface(Ci.nsIPropertyBag2);
   },
 
   _getPropertyAsString(container, property) {
     try {
       return container.fields.getPropertyAsAString(property);
-    }
-    catch (e) {
+    } catch (e) {
     }
     return "";
   },
 
   _setContentText(id, text) {
     let element = this._document.getElementById(id);
     let textNode = text.createDocumentFragment(element);
     while (element.hasChildNodes())
@@ -201,18 +199,17 @@ FeedWriter.prototype = {
                  getService(Ci.nsIScriptSecurityManager);
     const flags = Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL;
     try {
       // TODO Is this necessary?
       secman.checkLoadURIStrWithPrincipal(this._feedPrincipal, uri, flags);
       // checkLoadURIStrWithPrincipal will throw if the link URI should not be
       // loaded, either because our feedURI isn't allowed to load it or per
       // the rules specified in |flags|, so we'll never "linkify" the link...
-    }
-    catch (e) {
+    } catch (e) {
       // Not allowed to load this link because secman.checkLoadURIStr threw
       return;
     }
 
     element.setAttribute(attribute, uri);
   },
 
   __bundle: null,
@@ -354,18 +351,17 @@ FeedWriter.prototype = {
 
       // Fix the margin on the main title, so that the image doesn't run over
       // the underline
       feedTitleLink.setAttribute('title', titleText);
       feedTitleText.style.marginRight = titleImageWidth + 'px';
 
       this._safeSetURIAttribute(feedTitleLink, "href",
                                 parts.getPropertyAsAString("link"));
-    }
-    catch (e) {
+    } catch (e) {
       LOG("Failed to set Title Image (this is benign): " + e);
     }
   },
 
   /**
    * Writes all entries contained in the feed.
    * @param   container
    *          The container of entries in the feed
@@ -500,17 +496,17 @@ FeedWriter.prototype = {
       if (enc.hasKey("type")) {
         type_text = enc.get("type");
         try {
           let handlerInfoWrapper = this._mimeSvc.getFromTypeAndExtension(enc.get("type"), null);
 
           if (handlerInfoWrapper)
             type_text = handlerInfoWrapper.description;
 
-          if  (type_text && type_text.length > 0)
+          if (type_text && type_text.length > 0)
             mozicon = "moz-icon://goat?size=16&contentType=" + enc.get("type");
 
         } catch (ex) { }
 
       }
 
       if (enc.hasKey("length") && /^[0-9]+$/.test(enc.get("length"))) {
         let enc_size = convertByteUnits(parseInt(enc.get("length")));
@@ -557,30 +553,28 @@ FeedWriter.prototype = {
     let feedService =
         Cc["@mozilla.org/browser/feeds/result-service;1"].
         getService(Ci.nsIFeedResultService);
 
     let result;
     try {
       result =
         feedService.getFeedResult(this._getOriginalURI(this._window));
-    }
-    catch (e) {
+    } catch (e) {
       LOG("Subscribe Preview: feed not available?!");
     }
 
     if (result.bozo) {
       LOG("Subscribe Preview: feed result is bozo?!");
     }
 
     let container;
     try {
       container = result.doc;
-    }
-    catch (e) {
+    } catch (e) {
       LOG("Subscribe Preview: no result.doc? Why didn't the original reload?");
       return null;
     }
     return container;
   },
 
   /**
    * Get moz-icon url for a file
@@ -611,18 +605,17 @@ FeedWriter.prototype = {
 
   _setAlwaysUseCheckedState(feedType) {
     let checkbox = this._document.getElementById("alwaysUse");
     if (checkbox) {
       let alwaysUse = false;
       try {
         if (Services.prefs.getCharPref(getPrefActionForType(feedType)) != "ask")
           alwaysUse = true;
-      }
-      catch (ex) { }
+      } catch (ex) { }
       this._setCheckboxCheckedState(checkbox, alwaysUse);
     }
   },
 
   _setSubscribeUsingLabel() {
     let stringLabel = "subscribeFeedUsing";
     switch (this._getFeedType()) {
       case Ci.nsIFeed.TYPE_VIDEO:
@@ -702,18 +695,17 @@ FeedWriter.prototype = {
     return menu.querySelectorAll('[webhandlerurl="' + aURL + '"]');
   },
 
   _setSelectedHandler(feedType) {
     let prefs = Services.prefs;
     let handler = "bookmarks";
     try {
       handler = prefs.getCharPref(getPrefReaderForType(feedType));
-    }
-    catch (ex) { }
+    } catch (ex) { }
 
     switch (handler) {
       case "web": {
         if (this._handlersList) {
           let url;
           try {
             url = prefs.getComplexValue(getPrefWebForType(feedType), Ci.nsISupportsString).data;
           } catch (ex) {
@@ -841,18 +833,17 @@ FeedWriter.prototype = {
     // Set up the "Subscribe Now" button
     this._document.getElementById("subscribeButton")
         .addEventListener("click", this);
 
     // first-run ui
     let showFirstRunUI = true;
     try {
       showFirstRunUI = Services.prefs.getBoolPref(PREF_SHOW_FIRST_RUN_UI);
-    }
-    catch (ex) { }
+    } catch (ex) { }
     if (showFirstRunUI) {
       let textfeedinfo1, textfeedinfo2;
       switch (feedType) {
         case Ci.nsIFeed.TYPE_VIDEO:
           textfeedinfo1 = "feedSubscriptionVideoPodcast1";
           textfeedinfo2 = "feedSubscriptionVideoPodcast2";
           break;
         case Ci.nsIFeed.TYPE_AUDIO:
@@ -989,18 +980,17 @@ FeedWriter.prototype = {
       // Set up the feed content
       let container = this._getContainer();
       if (!container)
         return;
 
       this._setTitleText(container);
       this._setTitleImage(container);
       this._writeFeedContent(container);
-    }
-    finally {
+    } finally {
       this._removeFeedFromCache();
     }
   },
 
   close() {
     this._document.getElementById("subscribeButton")
         .removeEventListener("click", this, false);
     this._document.getElementById("handlersMenuList")
--- a/browser/components/feeds/WebContentConverter.js
+++ b/browser/components/feeds/WebContentConverter.js
@@ -181,18 +181,17 @@ const Utils = {
         aWindowOrNull);
     }
 
     // check if it is in the black list
     let pb = Services.prefs;
     let allowed;
     try {
       allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol);
-    }
-    catch (e) {
+    } catch (e) {
       allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default");
     }
     if (!allowed) {
       throw this.getSecurityError(
         `Not allowed to register a protocol handler for ${aProtocol}`,
         aWindowOrNull);
     }
   },
@@ -497,18 +496,17 @@ WebContentConverterRegistrar.prototype =
         let browserElement = this._getBrowserForContentWindow(browserWindow, aWindowOrBrowser);
         notificationBox = browserElement.getTabBrowser().getNotificationBox(browserElement);
       } else {
         notificationBox = aWindowOrBrowser.getTabBrowser()
                                           .getNotificationBox(aWindowOrBrowser);
       }
 
       this._appendFeedReaderNotification(uri, aTitle, notificationBox);
-    }
-    else {
+    } else {
       this._registerContentHandler(contentType, aURIString, aTitle);
     }
   },
 
   /**
    * Returns the browser chrome window in which the content window is in
    */
   _getBrowserWindowForContentWindow(aContentWindow) {
@@ -629,18 +627,17 @@ WebContentConverterRegistrar.prototype =
     let i = 0;
     let typeBranch = null;
     while (true) {
       typeBranch =
         ps.getBranch(PREF_CONTENTHANDLERS_BRANCH + i + ".");
       try {
         typeBranch.getCharPref("type");
         ++i;
-      }
-      catch (e) {
+      } catch (e) {
         // No more handlers
         break;
       }
     }
     if (typeBranch) {
       typeBranch.setCharPref("type", contentType);
       let pls =
           Cc["@mozilla.org/pref-localizedstring;1"].
--- a/browser/components/feeds/test/test_registerHandler.html
+++ b/browser/components/feeds/test/test_registerHandler.html
@@ -15,25 +15,23 @@ https://bugzilla.mozilla.org/show_bug.cg
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 402788 **/
 
   // return false if an exception has been catched, true otherwise
-  function testRegisterHandler(aIsProtocol, aTxt, aUri, aTitle)
-  {
+  function testRegisterHandler(aIsProtocol, aTxt, aUri, aTitle) {
     try {
       if (aIsProtocol)
         navigator.registerProtocolHandler(aTxt, aUri, aTitle);
       else
         navigator.registerContentHandler(aTxt, aUri, aTitle);
-    }
-    catch (e) {
+    } catch (e) {
       return false;
     }
 
     return true;
   }
 
   ok(navigator.registerProtocolHandler, "navigator.registerProtocolHandler should be defined");
   ok(navigator.registerContentHandler, "navigator.registerContentHandler should be defined");
--- a/browser/components/feeds/test/unit/test_758990.js
+++ b/browser/components/feeds/test/unit/test_758990.js
@@ -1,42 +1,38 @@
 function run_test() {
   var success = false;
   try {
     ios.newURI("feed:javascript:alert('hi');", null, null);
-  }
-  catch (e) {
+  } catch (e) {
     success = e.result == Cr.NS_ERROR_MALFORMED_URI;
   }
   if (!success)
     do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a feed:javascript: URI");
 
   success = false;
   try {
     ios.newURI("feed:data:text/html,hi", null, null);
-  }
-  catch (e) {
+  } catch (e) {
     success = e.result == Cr.NS_ERROR_MALFORMED_URI;
   }
   if (!success)
     do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a feed:data: URI");
 
   success = false;
   try {
     ios.newURI("pcast:javascript:alert('hi');", null, null);
-  }
-  catch (e) {
+  } catch (e) {
     success = e.result == Cr.NS_ERROR_MALFORMED_URI;
   }
   if (!success)
     do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a pcast:javascript: URI");
 
   success = false;
   try {
     ios.newURI("pcast:data:text/html,hi", null, null);
-  }
-  catch (e) {
+  } catch (e) {
     success = e.result == Cr.NS_ERROR_MALFORMED_URI;
   }
   if (!success)
     do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a pcast:data: URI");
 
 }
--- a/browser/components/migration/ChromeProfileMigrator.js
+++ b/browser/components/migration/ChromeProfileMigrator.js
@@ -59,18 +59,17 @@ function getDataFolder(subfoldersWin, su
  * Convert Chrome time format to Date object
  *
  * @param   aTime
  *          Chrome time
  * @return  converted Date object
  * @note    Google Chrome uses FILETIME / 10 as time.
  *          FILETIME is based on same structure of Windows.
  */
-function chromeTimeToDate(aTime)
-{
+function chromeTimeToDate(aTime) {
   return new Date((aTime * S100NS_PER_MS - S100NS_FROM1601TO1970) / 10000);
 }
 
 /**
  * Insert bookmark items into specific folder.
  *
  * @param   parentGuid
  *          GUID of the folder where items will be inserted
@@ -216,18 +215,17 @@ Object.defineProperty(ChromeProfileMigra
       let fstream = Cc[FILE_INPUT_STREAM_CID].
                     createInstance(Ci.nsIFileInputStream);
       fstream.init(prefsFile, -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/IEProfileMigrator.js
+++ b/browser/components/migration/IEProfileMigrator.js
@@ -334,18 +334,17 @@ IE7FormPasswords.prototype = {
       results.push(currentResult);
       // move to the next login item
       currentLoginItemPointer = currentLoginItemPointer.increment();
     }
     return results;
   },
 };
 
-function IEProfileMigrator()
-{
+function IEProfileMigrator() {
   this.wrappedJSObject = this; // export this to be able to use it in the unittest.
 }
 
 IEProfileMigrator.prototype = Object.create(MigratorPrototype);
 
 IEProfileMigrator.prototype.getResources = function IE_getResources() {
   let resources = [
     MSMigrationUtils.getBookmarksMigrator(),
--- a/browser/components/migration/MSMigrationUtils.jsm
+++ b/browser/components/migration/MSMigrationUtils.jsm
@@ -395,32 +395,30 @@ Bookmarks.prototype = {
           if (entry.leafName == this._toolbarFolderName &&
               entry.parent.equals(this._favoritesFolder)) {
             // Import to the bookmarks toolbar.
             folderGuid = PlacesUtils.bookmarks.toolbarGuid;
             if (!MigrationUtils.isStartupMigration) {
               folderGuid =
                 yield MigrationUtils.createImportedBookmarksFolder(this.importedAppLabel, folderGuid);
             }
-          }
-          else {
+          } else {
             // Import to a new folder.
             folderGuid = (yield MigrationUtils.insertBookmarkWrapper({
               type: PlacesUtils.bookmarks.TYPE_FOLDER,
               parentGuid: aDestFolderGuid,
               title: entry.leafName
             })).guid;
           }
 
           if (entry.isReadable()) {
             // Recursively import the folder.
             yield this._migrateFolder(entry, folderGuid);
           }
-        }
-        else {
+        } else {
           // Strip the .url extension, to both check this is a valid link file,
           // and get the associated title.
           let matches = entry.leafName.match(/(.+)\.url$/i);
           if (matches) {
             let fileHandler = Cc["@mozilla.org/network/protocol;1?name=file"].
                               getService(Ci.nsIFileProtocolHandler);
             let uri = fileHandler.readURLFile(entry);
             let title = matches[1];
--- a/browser/components/migration/MigrationUtils.jsm
+++ b/browser/components/migration/MigrationUtils.jsm
@@ -317,18 +317,17 @@ this.MigratorPrototype = {
             }
             completeDeferred.resolve();
           };
 
           // If migrate throws, an error occurred, and the callback
           // (itemMayBeDone) might haven't been called.
           try {
             res.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) {
@@ -390,35 +389,32 @@ this.MigratorPrototype = {
     // profile is available.
     let exists = false;
     try {
       let profiles = this.sourceProfiles;
       if (!profiles) {
         let resources = this._getMaybeCachedResources("");
         if (resources && resources.length > 0)
           exists = true;
-      }
-      else {
+      } 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 : "";
     if (this._resourcesByProfile) {
       if (profileKey in this._resourcesByProfile)
         return this._resourcesByProfile[profileKey];
-    }
-    else {
+    } else {
       this._resourcesByProfile = { };
     }
     this._resourcesByProfile[profileKey] = this.getResources(aProfile);
     return this._resourcesByProfile[profileKey];
   }
 };
 
 this.MigrationUtils = Object.freeze({
@@ -469,18 +465,17 @@ this.MigrationUtils = Object.freeze({
    * @return the wrapped function.
    */
   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);
     };
   },
@@ -658,23 +653,21 @@ this.MigrationUtils = Object.freeze({
    *
    * @return profile migrator implementing nsIBrowserProfileMigrator, if it can
    *         import any data, null otherwise.
    */
   getMigrator: function MU_getMigrator(aKey) {
     let migrator = null;
     if (this._migrators.has(aKey)) {
       migrator = this._migrators.get(aKey);
-    }
-    else {
+    } 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 }
   },
 
@@ -706,18 +699,17 @@ this.MigrationUtils = Object.freeze({
         Cc["@mozilla.org/uriloader/external-protocol-service;1"]
           .getService(Ci.nsIExternalProtocolService)
           .getApplicationDescription("http");
       key = APP_DESC_TO_KEY[browserDesc] || "";
       // Handle devedition, as well as "FirefoxNightly" on OS X.
       if (!key && browserDesc.startsWith("Firefox")) {
         key = "firefox";
       }
-    }
-    catch (ex) {
+    } catch (ex) {
       Cu.reportError("Could not detect default browser: " + ex);
     }
 
     // "firefox" is the least useful entry here, and might just be because we've set
     // ourselves as the default (on Windows 7 and below). In that case, check if we
     // have a registry key that tells us where to go:
     if (key == "firefox" && AppConstants.isPlatformAndVersionAtMost("win", "6.2")) {
       // Because we remove the registry key, reading the registry key only works once.
@@ -884,18 +876,17 @@ this.MigrationUtils = Object.freeze({
         // aMigratorKey must point to a valid source, so, if it doesn't
         // cleanup and throw.
         this.finishMigration();
         throw new Error("startMigration was asked to open auto-migrate from " +
                         "a non-existent source: " + aMigratorKey);
       }
       migratorKey = aMigratorKey;
       skipSourcePage = true;
-    }
-    else {
+    } else {
       let defaultBrowserKey = this.getMigratorKeyForDefaultBrowser();
       if (defaultBrowserKey) {
         migrator = this.getMigrator(defaultBrowserKey);
         if (migrator)
           migratorKey = defaultBrowserKey;
       }
     }
 
--- a/browser/components/migration/SafariProfileMigrator.js
+++ b/browser/components/migration/SafariProfileMigrator.js
@@ -81,23 +81,21 @@ Bookmarks.prototype = {
           if (title == "BookmarksBar")
             yield this._migrateCollection(children, this.TOOLBAR_COLLECTION);
           else if (title == "BookmarksMenu")
             yield this._migrateCollection(children, this.MENU_COLLECTION);
           else if (title == "com.apple.ReadingList")
             yield this._migrateCollection(children, this.READING_LIST_COLLECTION);
           else if (entry.get("ShouldOmitFromUI") !== true)
             entriesFiltered.push(entry);
-        }
-        else if (type == "WebBookmarkTypeLeaf") {
+        } else if (type == "WebBookmarkTypeLeaf") {
           entriesFiltered.push(entry);
         }
       }
-    }
-    else {
+    } else {
       entriesFiltered = aEntries;
     }
 
     if (entriesFiltered.length == 0)
       return;
 
     let folderGuid = -1;
     switch (aCollection) {
@@ -156,18 +154,17 @@ Bookmarks.prototype = {
         let title = entry.get("Title");
         let newFolderGuid = (yield MigrationUtils.insertBookmarkWrapper({
           parentGuid, type: PlacesUtils.bookmarks.TYPE_FOLDER, title
         })).guid;
 
         // Empty folders may not have a children array.
         if (entry.has("Children"))
           yield this._migrateEntries(entry.get("Children"), newFolderGuid, false);
-      }
-      else if (type == "WebBookmarkTypeLeaf" && entry.has("URLString")) {
+      } else if (type == "WebBookmarkTypeLeaf" && entry.has("URLString")) {
         let title;
         if (entry.has("URIDictionary"))
           title = entry.get("URIDictionary").get("title");
 
         try {
           yield MigrationUtils.insertBookmarkWrapper({
             parentGuid, url: entry.get("URLString"), title
           });
@@ -216,18 +213,17 @@ History.prototype = {
         for (let entry of entries) {
           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 }] });
-            }
-            catch (ex) {
+            } catch (ex) {
               // Safari's History file may contain malformed URIs which
               // will be ignored.
               Cu.reportError(ex);
             }
           }
         }
         if (places.length > 0) {
           MigrationUtils.insertVisitsWrapper(places, {
@@ -236,22 +232,20 @@ History.prototype = {
               // Importing any entry is considered a successful import.
               this._success = true;
             },
             handleError() {},
             handleCompletion() {
               aCallback(this._success);
             }
           });
-        }
-        else {
+        } else {
           aCallback(false);
         }
-      }
-      catch (ex) {
+      } catch (ex) {
         Cu.reportError(ex);
         aCallback(false);
       }
     }.bind(this));
   }
 };
 
 /**
@@ -279,18 +273,17 @@ MainPreferencesPropertyList.prototype = 
     let alreadyReading = this._callbacks.length > 0;
     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));
     }
   },
 
--- a/browser/components/migration/content/migration.js
+++ b/browser/components/migration/content/migration.js
@@ -17,18 +17,17 @@ Cu.import("resource:///modules/Migration
 var MigrationWizard = { /* exported MigrationWizard */
   _source: "",                  // Source Profile Migrator ContractID suffix
   _itemsFlags: kIMig.ALL,       // Selected Import Data Sources (16-bit bitfield)
   _selectedProfile: null,       // Selected Profile name to import from
   _wiz: null,
   _migrator: null,
   _autoMigrate: null,
 
-  init()
-  {
+  init() {
     let os = Services.obs;
     os.addObserver(this, "Migration:Started", false);
     os.addObserver(this, "Migration:ItemBeforeMigrate", false);
     os.addObserver(this, "Migration:ItemAfterMigrate", false);
     os.addObserver(this, "Migration:ItemError", false);
     os.addObserver(this, "Migration:Ended", false);
 
     this._wiz = document.documentElement;
@@ -53,31 +52,29 @@ var MigrationWizard = { /* exported Migr
         // easily identifiable way to avoid migration and create a new profile.
         document.getElementById("nothing").hidden = false;
       }
     }
 
     this.onImportSourcePageShow();
   },
 
-  uninit()
-  {
+  uninit() {
     var os = Components.classes["@mozilla.org/observer-service;1"]
                        .getService(Components.interfaces.nsIObserverService);
     os.removeObserver(this, "Migration:Started");
     os.removeObserver(this, "Migration:ItemBeforeMigrate");
     os.removeObserver(this, "Migration:ItemAfterMigrate");
     os.removeObserver(this, "Migration:ItemError");
     os.removeObserver(this, "Migration:Ended");
     MigrationUtils.finishMigration();
   },
 
   // 1 - Import Source
-  onImportSourcePageShow()
-  {
+  onImportSourcePageShow() {
     // Show warning message to close the selected browser when needed
     function toggleCloseBrowserWarning() {
       let visibility = "hidden";
       if (group.selectedItem.id != "nothing") {
         let migrator = MigrationUtils.getMigrator(group.selectedItem.id);
         visibility = migrator.sourceLocked ? "visible" : "hidden";
       }
       document.getElementById("closeSourceBrowser").style.visibility = visibility;
@@ -132,18 +129,17 @@ var MigrationWizard = { /* exported Migr
 
     // Advance to the next page if the caller told us to.
     if (this._migrator && this._skipImportSourcePage) {
       this._wiz.advance();
       this._wiz.canRewind = false;
     }
   },
 
-  onImportSourcePageAdvanced()
-  {
+  onImportSourcePageAdvanced() {
     var newSource = document.getElementById("importSourceGroup").selectedItem.id;
 
     if (newSource == "nothing") {
       // Need to do telemetry here because we're closing the dialog before we get to
       // do actual migration. For actual migration, this doesn't happen until after
       // migration takes place.
       Services.telemetry.getHistogramById("FX_MIGRATION_SOURCE_BROWSER")
                         .add(MigrationUtils.getSourceIdForTelemetry("nothing"));
@@ -159,37 +155,34 @@ var MigrationWizard = { /* exported Migr
       this._selectedProfile = null;
     }
     this._source = newSource;
 
     // check for more than one source profile
     var sourceProfiles = this._migrator.sourceProfiles;
     if (this._skipImportSourcePage) {
       this._wiz.currentPage.next = "homePageImport";
-    }
-    else if (sourceProfiles && sourceProfiles.length > 1) {
+    } else if (sourceProfiles && sourceProfiles.length > 1) {
       this._wiz.currentPage.next = "selectProfile";
-    }
-    else {
+    } else {
       if (this._autoMigrate)
         this._wiz.currentPage.next = "homePageImport";
       else
         this._wiz.currentPage.next = "importItems";
 
       if (sourceProfiles && sourceProfiles.length == 1)
         this._selectedProfile = sourceProfiles[0];
       else
         this._selectedProfile = null;
     }
     return undefined;
   },
 
   // 2 - [Profile Selection]
-  onSelectProfilePageShow()
-  {
+  onSelectProfilePageShow() {
     // Disabling this for now, since we ask about import sources in automigration
     // too and don't want to disable the back button
     // if (this._autoMigrate)
     //   document.documentElement.getButton("back").disabled = true;
 
     var profiles = document.getElementById("profiles");
     while (profiles.hasChildNodes())
       profiles.removeChild(profiles.firstChild);
@@ -205,39 +198,36 @@ var MigrationWizard = { /* exported Migr
         item.setAttribute("label", profile.name);
         profiles.appendChild(item);
       }
     }
 
     profiles.selectedItem = this._selectedProfile ? document.getElementById(this._selectedProfile.id) : profiles.firstChild;
   },
 
-  onSelectProfilePageRewound()
-  {
+  onSelectProfilePageRewound() {
     var profiles = document.getElementById("profiles");
     this._selectedProfile = this._migrator.sourceProfiles.find(
       profile => profile.id == profiles.selectedItem.id
     ) || null;
   },
 
-  onSelectProfilePageAdvanced()
-  {
+  onSelectProfilePageAdvanced() {
     var profiles = document.getElementById("profiles");
     this._selectedProfile = this._migrator.sourceProfiles.find(
       profile => profile.id == profiles.selectedItem.id
     ) || null;
 
     // If we're automigrating or just doing bookmarks don't show the item selection page
     if (this._autoMigrate)
       this._wiz.currentPage.next = "homePageImport";
   },
 
   // 3 - ImportItems
-  onImportItemsPageShow()
-  {
+  onImportItemsPageShow() {
     var dataSources = document.getElementById("dataSources");
     while (dataSources.hasChildNodes())
       dataSources.removeChild(dataSources.firstChild);
 
     var items = this._migrator.getMigrateData(this._selectedProfile, this._autoMigrate);
     for (var i = 0; i < 16; ++i) {
       var itemID = (items >> i) & 0x1 ? Math.pow(2, i) : 0;
       if (itemID > 0) {
@@ -247,68 +237,63 @@ var MigrationWizard = { /* exported Migr
           MigrationUtils.getLocalizedString(itemID + "_" + this._source));
         dataSources.appendChild(checkbox);
         if (!this._itemsFlags || this._itemsFlags & itemID)
           checkbox.checked = true;
       }
     }
   },
 
-  onImportItemsPageRewound()
-  {
+  onImportItemsPageRewound() {
     this._wiz.canAdvance = true;
     this.onImportItemsPageAdvanced();
   },
 
-  onImportItemsPageAdvanced()
-  {
+  onImportItemsPageAdvanced() {
     var dataSources = document.getElementById("dataSources");
     this._itemsFlags = 0;
     for (var i = 0; i < dataSources.childNodes.length; ++i) {
       var checkbox = dataSources.childNodes[i];
       if (checkbox.localName == "checkbox" && checkbox.checked)
         this._itemsFlags |= parseInt(checkbox.id);
     }
   },
 
-  onImportItemCommand()
-  {
+  onImportItemCommand() {
     var items = document.getElementById("dataSources");
     var checkboxes = items.getElementsByTagName("checkbox");
 
     var oneChecked = false;
     for (var i = 0; i < checkboxes.length; ++i) {
       if (checkboxes[i].checked) {
         oneChecked = true;
         break;
       }
     }
 
     this._wiz.canAdvance = oneChecked;
   },
 
   // 4 - Home Page Selection
-  onHomePageMigrationPageShow()
-  {
+  onHomePageMigrationPageShow() {
     // only want this on the first run
     if (!this._autoMigrate) {
       this._wiz.advance();
       return;
     }
 
     var brandBundle = document.getElementById("brandBundle");
     var pageTitle, pageDesc, mainStr;
     // These strings don't exist when not using official branding. If that's
     // the case, just skip this page.
     try {
       pageTitle = brandBundle.getString("homePageMigrationPageTitle");
       pageDesc = brandBundle.getString("homePageMigrationDescription");
       mainStr = brandBundle.getString("homePageSingleStartMain");
-    }
-    catch (e) {
+    } catch (e) {
       this._wiz.advance();
       return;
     }
 
     document.getElementById("homePageImport").setAttribute("label", pageTitle);
     document.getElementById("homePageImportDesc").setAttribute("value", pageDesc);
 
     this._wiz._adjustWizardHeader();
@@ -326,50 +311,46 @@ var MigrationWizard = { /* exported Migr
 
     if (oldHomePageURL && appName) {
       var oldHomePageLabel =
         brandBundle.getFormattedString("homePageImport", [appName]);
       var oldHomePage = document.getElementById("oldHomePage");
       oldHomePage.setAttribute("label", oldHomePageLabel);
       oldHomePage.setAttribute("value", oldHomePageURL);
       oldHomePage.removeAttribute("hidden");
-    }
-    else {
+    } else {
       // if we don't have at least two options, just advance
       this._wiz.advance();
     }
   },
 
-  onHomePageMigrationPageAdvanced()
-  {
+  onHomePageMigrationPageAdvanced() {
     // 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) {}
   },
 
   // 5 - Migrating
-  onMigratingPageShow()
-  {
+  onMigratingPageShow() {
     this._wiz.getButton("cancel").disabled = true;
     this._wiz.canRewind = false;
     this._wiz.canAdvance = false;
 
     // When automigrating, show all of the data that can be received from this source.
     if (this._autoMigrate)
       this._itemsFlags = this._migrator.getMigrateData(this._selectedProfile, this._autoMigrate);
 
     this._listItems("migratingItems");
     setTimeout(() => this.onMigratingMigrate(), 0);
   },
 
-  onMigratingMigrate()
-  {
+  onMigratingMigrate() {
     this._migrator.migrate(this._itemsFlags, this._autoMigrate, this._selectedProfile);
 
     Services.telemetry.getHistogramById("FX_MIGRATION_SOURCE_BROWSER")
                       .add(MigrationUtils.getSourceIdForTelemetry(this._source));
     if (!this._autoMigrate) {
       let hist = Services.telemetry.getKeyedHistogramById("FX_MIGRATION_USAGE");
       let exp = 0;
       let items = this._itemsFlags;
@@ -378,44 +359,41 @@ var MigrationWizard = { /* exported Migr
           hist.add(this._source, exp);
         }
         items = items >> 1;
         exp++;
       }
     }
   },
 
-  _listItems(aID)
-  {
+  _listItems(aID) {
     var items = document.getElementById(aID);
     while (items.hasChildNodes())
       items.removeChild(items.firstChild);
 
     var itemID;
     for (var i = 0; i < 16; ++i) {
       itemID = (this._itemsFlags >> i) & 0x1 ? Math.pow(2, i) : 0;
       if (itemID > 0) {
         var label = document.createElement("label");
         label.id = itemID + "_migrated";
         try {
           label.setAttribute("value",
             MigrationUtils.getLocalizedString(itemID + "_" + this._source));
           items.appendChild(label);
-        }
-        catch (e) {
+        } catch (e) {
           // if the block above throws, we've enumerated all the import data types we
           // currently support and are now just wasting time, break.
           break;
         }
       }
     }
   },
 
-  observe(aSubject, aTopic, aData)
-  {
+  observe(aSubject, aTopic, aData) {
     var label;
     switch (aTopic) {
       case "Migration:Started":
         break;
       case "Migration:ItemBeforeMigrate":
         label = document.getElementById(aData + "_migrated");
         if (label)
           label.setAttribute("style", "font-weight: bold");
@@ -442,18 +420,17 @@ var MigrationWizard = { /* exported Migr
             try {
               // set homepage properly
               var prefSvc = Components.classes["@mozilla.org/preferences-service;1"]
                                       .getService(Components.interfaces.nsIPrefService);
               var prefBranch = prefSvc.getBranch(null);
 
               if (this._newHomePage == "DEFAULT") {
                 prefBranch.clearUserPref("browser.startup.homepage");
-              }
-              else {
+              } else {
                 var str = Components.classes["@mozilla.org/supports-string;1"]
                                   .createInstance(Components.interfaces.nsISupportsString);
                 str.data = this._newHomePage;
                 prefBranch.setComplexValue("browser.startup.homepage",
                                            Components.interfaces.nsISupportsString,
                                            str);
               }
 
@@ -467,18 +444,17 @@ var MigrationWizard = { /* exported Migr
             }
           }
 
           // We're done now.
           this._wiz.canAdvance = true;
           this._wiz.advance();
 
           setTimeout(close, 5000);
-        }
-        else {
+        } else {
           this._wiz.canAdvance = true;
           var nextButton = this._wiz.getButton("next");
           nextButton.click();
         }
         break;
       case "Migration:ItemError":
         let type = "undefined";
         let numericType = parseInt(aData);
@@ -509,18 +485,17 @@ var MigrationWizard = { /* exported Migr
           .getService(Ci.nsIConsoleService)
           .logStringMessage("some " + type + " did not successfully migrate.");
         Services.telemetry.getKeyedHistogramById("FX_MIGRATION_ERRORS")
                           .add(this._source, Math.log2(numericType));
         break;
     }
   },
 
-  onDonePageShow()
-  {
+  onDonePageShow() {
     this._wiz.getButton("cancel").disabled = true;
     this._wiz.canRewind = false;
     this._listItems("doneItems");
   },
 
   reportDataRecencyTelemetry() {
     let histogram = Services.telemetry.getKeyedHistogramById("FX_STARTUP_MIGRATION_DATA_RECENCY");
     let lastUsedPromises = [];
--- a/browser/components/migration/tests/unit/test_automigration.js
+++ b/browser/components/migration/tests/unit/test_automigration.js
@@ -24,18 +24,17 @@ AutoMigrateBackstage.MigrationUtils = ne
 });
 
 do_register_cleanup(function() {
   AutoMigrateBackstage.MigrationUtils = MigrationUtils;
 });
 
 // This should be replaced by using History.fetch with a fetchVisits option,
 // once that becomes available
-function* visitsForURL(url)
-{
+function* visitsForURL(url) {
   let visitCount = 0;
   let db = yield PlacesUtils.promiseDBConnection();
   visitCount = yield db.execute(
     `SELECT count(*) FROM moz_historyvisits v
      JOIN moz_places h ON h.id = v.place_id
      WHERE url_hash = hash(:url) AND url = :url`,
      {url});
   visitCount = visitCount[0].getInt64(0);
--- a/browser/components/newtab/PlacesProvider.jsm
+++ b/browser/components/newtab/PlacesProvider.jsm
@@ -206,19 +206,18 @@ Links.prototype = {
     let items = [];
     let queryError = null;
     let conn = yield PlacesUtils.promiseDBConnection();
     yield conn.executeCached(aSql, params, aRow => {
       try {
         // check if caller wants to handle query raws
         if (callback) {
           callback(aRow);
-        }
-        // otherwise fill in the item and add items array
-        else {
+        } else {
+          // otherwise fill in the item and add items array
           let item = null;
           // if columns array is given construct an object
           if (columns && Array.isArray(columns)) {
             item = {};
             columns.forEach(column => {
               item[column] = aRow.getResultByName(column);
             });
           } else {
--- a/browser/components/newtab/aboutNewTabService.js
+++ b/browser/components/newtab/aboutNewTabService.js
@@ -186,17 +186,17 @@ AboutNewTabService.prototype = {
    * the newtab page has no effect on the result of this function.
    *
    * The result is also the remote URL if this is in a test (PREF_REMOTE_CS_TEST)
    *
    * @returns {String} the default newtab URL, remote or local depending on browser.newtabpage.remote
    */
   get defaultURL() {
     let csTest = Services.prefs.getBoolPref(PREF_REMOTE_CS_TEST);
-    if (this._remoteEnabled || csTest)  {
+    if (this._remoteEnabled || csTest) {
       return this._remoteURL;
     }
     return LOCAL_NEWTAB_URL;
   },
 
   /*
    * Updates the remote location when the page is not overriden.
    *
--- a/browser/components/newtab/tests/xpcshell/test_PlacesProvider.js
+++ b/browser/components/newtab/tests/xpcshell/test_PlacesProvider.js
@@ -333,33 +333,30 @@ add_task(function* test_Links_execute_qu
   testItemObject(results, 2, {url: `${TEST_URL}2`});
   testItemObject(results, 3, {url: `${TEST_URL}3`});
 
   // negative test cases
   // bad sql
   try {
     yield provider.executePlacesQuery("select from moz");
     do_throw("bad sql should've thrown");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_true("expected failure - bad sql");
   }
   // missing bindings
   try {
     yield provider.executePlacesQuery("select * from moz_places limit :limit");
     do_throw("bad sql should've thrown");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_true("expected failure - missing bidning");
   }
   // non-existent column name
   try {
     yield provider.executePlacesQuery("select * from moz_places limit :limit",
                                      {columns: ["no-such-column"], params: {limit: 4}});
     do_throw("bad sql should've thrown");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_true("expected failure - wrong column name");
   }
 
   // cleanup
   yield PlacesTestUtils.clearHistory();
 });
--- a/browser/components/nsBrowserContentHandler.js
+++ b/browser/components/nsBrowserContentHandler.js
@@ -60,28 +60,26 @@ function resolveURIInternal(aCmdLine, aA
   if (!(uri instanceof nsIFileURL)) {
     return uriFixup.createFixupURI(aArgument,
                                    uriFixup.FIXUP_FLAG_FIX_SCHEME_TYPOS);
   }
 
   try {
     if (uri.file.exists())
       return uri;
-  }
-  catch (e) {
+  } catch (e) {
     Components.utils.reportError(e);
   }
 
   // We have interpreted the argument as a relative file URI, but the file
   // doesn't exist. Try URI fixup heuristics: see bug 290782.
 
   try {
     uri = uriFixup.createFixupURI(aArgument, 0);
-  }
-  catch (e) {
+  } catch (e) {
     Components.utils.reportError(e);
   }
 
   return uri;
 }
 
 var gFirstWindow = false;
 
@@ -336,29 +334,27 @@ nsBrowserContentHandler.prototype = {
         let uri = resolveURIInternal(cmdLine, uriparam);
         if (!shouldLoadURI(uri))
           continue;
         openWindow(null, this.chromeURL, "_blank",
                    "chrome,dialog=no,all" + this.getFeatures(cmdLine),
                    uri.spec);
         cmdLine.preventDefault = true;
       }
-    }
-    catch (e) {
+    } catch (e) {
       Components.utils.reportError(e);
     }
 
     try {
       while ((uriparam = cmdLine.handleFlagWithParam("new-tab", false))) {
         let uri = resolveURIInternal(cmdLine, uriparam);
         handURIToExistingBrowser(uri, nsIBrowserDOMWindow.OPEN_NEWTAB, cmdLine);
         cmdLine.preventDefault = true;
       }
-    }
-    catch (e) {
+    } catch (e) {
       Components.utils.reportError(e);
     }
 
     var chromeParam = cmdLine.handleFlagWithParam("chrome", false);
     if (chromeParam) {
 
       // Handle old preference dialog URLs.
       if (chromeParam == "chrome://browser/content/pref/pref.xul" ||
@@ -378,18 +374,17 @@ nsBrowserContentHandler.prototype = {
           // If the URI is local, we are sure it won't wrongly inherit chrome privs
           var features = "chrome,dialog=no,all" + this.getFeatures(cmdLine);
           openWindow(null, resolvedURI.spec, "_blank", features);
           cmdLine.preventDefault = true;
         } else {
           dump("*** Preventing load of web URI as chrome\n");
           dump("    If you're trying to load a webpage, do not pass --chrome.\n");
         }
-      }
-      catch (e) {
+      } catch (e) {
         Components.utils.reportError(e);
       }
     }
     if (cmdLine.handleFlag("preferences", false)) {
       openPreferences();
       cmdLine.preventDefault = true;
     }
     if (cmdLine.handleFlag("silent", false))
@@ -432,17 +427,17 @@ nsBrowserContentHandler.prototype = {
       var file = cmdLine.resolveFile(fileParam);
       var fileURI = Services.io.newFileURI(file);
       openWindow(null, this.chromeURL, "_blank",
                  "chrome,dialog=no,all" + this.getFeatures(cmdLine),
                  fileURI.spec);
       cmdLine.preventDefault = true;
     }
 
-    if (AppConstants.platform  == "win") {
+    if (AppConstants.platform == "win") {
       // Handle "? searchterm" for Windows Vista start menu integration
       for (var i = cmdLine.length - 1; i >= 0; --i) {
         var param = cmdLine.getArgument(i);
         if (param.match(/^\? /)) {
           cmdLine.removeArguments(i, i);
           cmdLine.preventDefault = true;
 
           searchParam = param.substr(2);
@@ -581,18 +576,17 @@ nsBrowserContentHandler.prototype = {
       try {
         var width = cmdLine.handleFlagWithParam("width", false);
         var height = cmdLine.handleFlagWithParam("height", false);
 
         if (width)
           this.mFeatures += ",width=" + width;
         if (height)
           this.mFeatures += ",height=" + height;
-      }
-      catch (e) {
+      } catch (e) {
       }
 
       // The global PB Service consumes this flag, so only eat it in per-window
       // PB builds.
       if (PrivateBrowsingUtils.isInTemporaryAutoStartMode) {
         this.mFeatures = ",private";
       }
     }
@@ -644,18 +638,17 @@ nsBrowserContentHandler.prototype = {
         throw NS_ERROR_ABORT;
       }
       cmdLine.handleFlag("osint", false)
     }
   },
 };
 var gBrowserContentHandler = new nsBrowserContentHandler();
 
-function handURIToExistingBrowser(uri, location, cmdLine, forcePrivate)
-{
+function handURIToExistingBrowser(uri, location, cmdLine, forcePrivate) {
   if (!shouldLoadURI(uri))
     return;
 
   // Unless using a private window is forced, open external links in private
   // windows only if we're in perma-private mode.
   var allowPrivate = forcePrivate || PrivateBrowsingUtils.permanentPrivateBrowsing;
   var navWin = RecentWindow.getMostRecentBrowserWindow({private: allowPrivate});
   if (!navWin) {
@@ -706,74 +699,69 @@ nsDefaultCommandLineHandler.prototype = 
       // preventDefault to true to prevent the display of the ui. The initial
       // command line will be retained when nsAppRunner calls LaunchChild though
       // urls launched after the initial launch will be lost.
       if (!this._haveProfile) {
         try {
           // This will throw when a profile has not been selected.
           Services.dirsvc.get("ProfD", Components.interfaces.nsILocalFile);
           this._haveProfile = true;
-        }
-        catch (e) {
+        } catch (e) {
           while ((ar = cmdLine.handleFlagWithParam("url", false)));
           cmdLine.preventDefault = true;
         }
       }
     }
 
     try {
       var ar;
       while ((ar = cmdLine.handleFlagWithParam("url", false))) {
         var uri = resolveURIInternal(cmdLine, ar);
         urilist.push(uri);
       }
-    }
-    catch (e) {
+    } catch (e) {
       Components.utils.reportError(e);
     }
 
     for (let i = 0; i < cmdLine.length; ++i) {
       var curarg = cmdLine.getArgument(i);
       if (curarg.match(/^-/)) {
         Components.utils.reportError("Warning: unrecognized command line flag " + curarg + "\n");
         // To emulate the pre-nsICommandLine behavior, we ignore
         // the argument after an unrecognized flag.
         ++i;
       } else {
         try {
           urilist.push(resolveURIInternal(cmdLine, curarg));
-        }
-        catch (e) {
+        } catch (e) {
           Components.utils.reportError("Error opening URI '" + curarg + "' from the command line: " + e + "\n");
         }
       }
     }
 
     if (urilist.length) {
       if (cmdLine.state != nsICommandLine.STATE_INITIAL_LAUNCH &&
           urilist.length == 1) {
         // Try to find an existing window and load our URI into the
         // current tab, new tab, or new window as prefs determine.
         try {
           handURIToExistingBrowser(urilist[0], nsIBrowserDOMWindow.OPEN_DEFAULTWINDOW, cmdLine);
           return;
-        }
-        catch (e) {
+        } catch (e) {
         }
       }
 
       var URLlist = urilist.filter(shouldLoadURI).map(u => u.spec);
       if (URLlist.length) {
         openWindow(null, gBrowserContentHandler.chromeURL, "_blank",
                    "chrome,dialog=no,all" + gBrowserContentHandler.getFeatures(cmdLine),
                    URLlist);
       }
 
-    }
-    else if (!cmdLine.preventDefault) {
+    } else if (!cmdLine.preventDefault) {
       if (AppConstants.isPlatformAndVersionAtLeast("win", "10") &&
           cmdLine.state != nsICommandLine.STATE_INITIAL_LAUNCH &&
           WindowsUIUtils.inTabletMode) {
         // In windows 10 tablet mode, do not create a new window, but reuse the existing one.
         let win = RecentWindow.getMostRecentBrowserWindow();
         if (win) {
           win.focus();
           return;
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -293,29 +293,25 @@ BrowserGlue.prototype = {
         Services.obs.removeObserver(this, "distribution-customization-complete");
         // Customization has finished, we don't need the customizer anymore.
         delete this._distributionCustomizer;
         break;
       case "browser-glue-test": // used by tests
         if (data == "post-update-notification") {
           if (Services.prefs.prefHasUserValue("app.update.postupdate"))
             this._showUpdateNotification();
-        }
-        else if (data == "force-ui-migration") {
+        } else if (data == "force-ui-migration") {
           this._migrateUI();
-        }
-        else if (data == "force-distribution-customization") {
+        } else if (data == "force-distribution-customization") {
           this._distributionCustomizer.applyPrefDefaults();
           this._distributionCustomizer.applyCustomizations();
           // To apply distribution bookmarks use "places-init-complete".
-        }
-        else if (data == "force-places-init") {
+        } else if (data == "force-places-init") {
           this._initPlaces(false);
-        }
-        else if (data == "smart-bookmarks-init") {
+        } else if (data == "smart-bookmarks-init") {
           this.ensurePlacesDefaultQueriesInitialized().then(() => {
             Services.obs.notifyObservers(null, "test-smart-bookmarks-done", null);
           });
         }
         break;
       case "initial-migration-will-import-default-bookmarks":
         this._migrationImportsDefaultBookmarks = true;
         break;
@@ -1105,18 +1101,17 @@ BrowserGlue.prototype = {
         usePromptLimit ? Services.prefs.getIntPref("browser.shell.defaultBrowserCheckCount") : 0;
 
       let willRecoverSession = false;
       try {
         let ss = Cc["@mozilla.org/browser/sessionstartup;1"].
                  getService(Ci.nsISessionStartup);
         willRecoverSession =
           (ss.sessionType == Ci.nsISessionStartup.RECOVER_SESSION);
-      }
-      catch (ex) { /* never mind; suppose SessionStore is broken */ }
+      } catch (ex) { /* never mind; suppose SessionStore is broken */ }
 
       // startup check, check all assoc
       let isDefault = false;
       let isDefaultError = false;
       try {
         isDefault = ShellService.isDefaultBrowser(true, false);
       } catch (ex) {
         isDefaultError = true;
@@ -1153,18 +1148,17 @@ BrowserGlue.prototype = {
         Services.telemetry.getHistogramById("BROWSER_IS_USER_DEFAULT")
                           .add(isDefault);
         Services.telemetry.getHistogramById("BROWSER_IS_USER_DEFAULT_ERROR")
                           .add(isDefaultError);
         Services.telemetry.getHistogramById("BROWSER_SET_DEFAULT_ALWAYS_CHECK")
                           .add(shouldCheck);
         Services.telemetry.getHistogramById("BROWSER_SET_DEFAULT_DIALOG_PROMPT_RAWCOUNT")
                           .add(promptCount);
-      }
-      catch (ex) { /* Don't break the default prompt if telemetry is broken. */ }
+      } catch (ex) { /* Don't break the default prompt if telemetry is broken. */ }
 
       if (willPrompt) {
         Services.tm.mainThread.dispatch(function() {
           DefaultBrowserCheck.prompt(RecentWindow.getMostRecentBrowserWindow());
         }.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
       }
     }
 
@@ -1340,18 +1334,17 @@ BrowserGlue.prototype = {
   _showUpdateNotification: function BG__showUpdateNotification() {
     Services.prefs.clearUserPref("app.update.postupdate");
 
     var um = Cc["@mozilla.org/updates/update-manager;1"].
              getService(Ci.nsIUpdateManager);
     try {
       // If the updates.xml file is deleted then getUpdateAt will throw.
       var update = um.getUpdateAt(0).QueryInterface(Ci.nsIPropertyBag);
-    }
-    catch (e) {
+    } catch (e) {
       // This should never happen.
       Cu.reportError("Unable to find update: " + e);
       return;
     }
 
     var actions = update.getProperty("actions");
     if (!actions || actions.indexOf("silent") != -1)
       return;
@@ -1425,18 +1418,17 @@ BrowserGlue.prototype = {
       win.openUILinkIn(data, "tab");
     }
 
     try {
       // This will throw NS_ERROR_NOT_AVAILABLE if the notification cannot
       // be displayed per the idl.
       AlertsService.showAlertNotification(null, title, text,
                                           true, url, clickCallback);
-    }
-    catch (e) {
+    } catch (e) {
       Cu.reportError(e);
     }
   },
 
   /**
    * Initialize Places
    * - imports the bookmarks html file if bookmarks database is empty, try to
    *   restore bookmarks from a JSON backup if the backend indicates that the
@@ -1511,25 +1503,23 @@ BrowserGlue.prototype = {
       // from bookmarks.html, we will try to restore from JSON
       if (importBookmarks && !restoreDefaultBookmarks && !importBookmarksHTML) {
         // get latest JSON backup
         lastBackupFile = yield PlacesBackups.getMostRecentBackup();
         if (lastBackupFile) {
           // restore from JSON backup
           yield BookmarkJSONUtils.importFromFile(lastBackupFile, true);
           importBookmarks = false;
-        }
-        else {
+        } else {
           // We have created a new database but we don't have any backup available
           importBookmarks = true;
           if (yield OS.File.exists(BookmarkHTMLUtils.defaultPath)) {
             // If bookmarks.html is available in current profile import it...
             importBookmarksHTML = true;
-          }
-          else {
+          } else {
             // ...otherwise we will restore defaults
             restoreDefaultBookmarks = true;
           }
         }
       }
 
       // If bookmarks are not imported, then initialize smart bookmarks.  This
       // happens during a common startup.
@@ -1540,34 +1530,32 @@ BrowserGlue.prototype = {
         // Now apply distribution customized bookmarks.
         // This should always run after Places initialization.
         try {
           yield this._distributionCustomizer.applyBookmarks();
           yield this.ensurePlacesDefaultQueriesInitialized();
         } catch (e) {
           Cu.reportError(e);
         }
-      }
-      else {
+      } 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) {}
         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";
-        }
-        else if (yield OS.File.exists(BookmarkHTMLUtils.defaultPath)) {
+        } else if (yield OS.File.exists(BookmarkHTMLUtils.defaultPath)) {
           bookmarksUrl = OS.Path.toFileURI(BookmarkHTMLUtils.defaultPath);
         }
 
         if (bookmarksUrl) {
           // Import from bookmarks.html file.
           try {
             yield BookmarkHTMLUtils.importFromURL(bookmarksUrl, true);
           } catch (e) {
@@ -1579,18 +1567,17 @@ BrowserGlue.prototype = {
             yield this._distributionCustomizer.applyBookmarks();
             // Ensure that smart bookmarks are created once the operation is
             // complete.
             yield this.ensurePlacesDefaultQueriesInitialized();
           } catch (e) {
             Cu.reportError(e);
           }
 
-        }
-        else {
+        } else {
           Cu.reportError(new Error("Unable to find bookmarks.html file."));
         }
 
         // Reset preferences, so we won't try to import again at next run
         if (importBookmarksHTML)
           Services.prefs.setBoolPref("browser.places.importBookmarksHTML", false);
         if (restoreDefaultBookmarks)
           Services.prefs.setBoolPref("browser.bookmarks.restore_default_bookmarks",
@@ -1602,18 +1589,17 @@ BrowserGlue.prototype = {
         this._bookmarksBackupIdleTime = BOOKMARKS_BACKUP_IDLE_TIME_SEC;
 
         // If there is no backup, or the last bookmarks backup is too old, use
         // a more aggressive idle observer.
         if (lastBackupFile === undefined)
           lastBackupFile = yield PlacesBackups.getMostRecentBackup();
         if (!lastBackupFile) {
             this._bookmarksBackupIdleTime /= 2;
-        }
-        else {
+        } else {
           let lastBackupTime = PlacesBackups.getDateForFile(lastBackupFile);
           let profileLastUse = Services.appinfo.replacedLockTime || Date.now();
 
           // If there is a backup after the last profile usage date it's fine,
           // regardless its age.  Otherwise check how old is the last
           // available backup compared to that session.
           if (profileLastUse > lastBackupTime) {
             let backupAge = Math.round((profileLastUse - lastBackupTime) / 86400000);
@@ -1905,18 +1891,17 @@ BrowserGlue.prototype = {
       // three-state to two-state. (This reverts a setting of "please track me"
       // to the default "don't say anything").
       try {
         if (Services.prefs.getBoolPref("privacy.donottrackheader.enabled") &&
             Services.prefs.getIntPref("privacy.donottrackheader.value") != 1) {
           Services.prefs.clearUserPref("privacy.donottrackheader.enabled");
           Services.prefs.clearUserPref("privacy.donottrackheader.value");
         }
-      }
-      catch (ex) {}
+      } catch (ex) {}
     }
 
     if (currentUIVersion < 26) {
       // Refactor urlbar suggestion preferences to make it extendable and
       // allow new suggestion types (e.g: search suggestions).
       let types = ["history", "bookmark", "openpage"];
       let defaultBehavior = 0;
       try {
@@ -2178,18 +2163,17 @@ BrowserGlue.prototype = {
           if (!smartBookmark.url) {
             yield PlacesUtils.bookmarks.remove(smartBookmark.guid);
             continue;
           }
 
           let bm = yield PlacesUtils.bookmarks.fetch(smartBookmark.guid);
           smartBookmark.parentGuid = bm.parentGuid;
           smartBookmark.index = bm.index;
-        }
-        else {
+        } else {
           // We don't remove old Smart Bookmarks because user could still
           // find them useful, or could have personalized them.
           // Instead we remove the Smart Bookmark annotation.
           PlacesUtils.annotations.removeItemAnnotation(itemId, SMART_BOOKMARKS_ANNO);
         }
       }
 
       for (let queryId of Object.keys(smartBookmarks)) {
--- a/browser/components/places/PlacesUIUtils.jsm
+++ b/browser/components/places/PlacesUIUtils.jsm
@@ -325,18 +325,17 @@ this.PlacesUIUtils = {
    *          The index within the container the item is copied to
    * @return A nsITransaction object that performs the copy.
    *
    * @note Since a copy creates a completely new item, only some internal
    *       annotations are synced from the old one.
    * @see this._copyableAnnotations for the list of copyable annotations.
    */
   _getURIItemCopyTransaction:
-  function PUIU__getURIItemCopyTransaction(aData, aContainer, aIndex)
-  {
+  function PUIU__getURIItemCopyTransaction(aData, aContainer, aIndex) {
     let transactions = [];
     if (aData.dateAdded) {
       transactions.push(
         new PlacesEditItemDateAddedTransaction(null, aData.dateAdded)
       );
     }
     if (aData.lastModified) {
       transactions.push(
@@ -395,32 +394,28 @@ this.PlacesUIUtils = {
           index = i;
         }
 
         if (node.type == PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER) {
           if (node.livemark && node.annos) {
             transactions.push(
               PlacesUIUtils._getLivemarkCopyTransaction(node, aContainer, index)
             );
-          }
-          else {
+          } else {
             transactions.push(
               PlacesUIUtils._getFolderCopyTransaction(node, aContainer, index)
             );
           }
-        }
-        else if (node.type == PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR) {
+        } else if (node.type == PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR) {
           transactions.push(new PlacesCreateSeparatorTransaction(-1, index));
-        }
-        else if (node.type == PlacesUtils.TYPE_X_MOZ_PLACE) {
+        } else if (node.type == PlacesUtils.TYPE_X_MOZ_PLACE) {
           transactions.push(
             PlacesUIUtils._getURIItemCopyTransaction(node, -1, index)
           );
-        }
-        else {
+        } else {
           throw new Error("Unexpected item under a bookmarks folder");
         }
       }
       return transactions;
     }
 
     if (aContainer == PlacesUtils.tagsFolderId) { // Copying into a tag folder.
       let transactions = [];
@@ -479,30 +474,28 @@ this.PlacesUIUtils = {
    *          The index in the destination container to insert the new items
    * @return A nsITransaction object that will perform the copy.
    *
    * @note Since a copy creates a completely new item, only some internal
    *       annotations are synced from the old one.
    * @see this._copyableAnnotations for the list of copyable annotations.
    */
   _getLivemarkCopyTransaction:
-  function PUIU__getLivemarkCopyTransaction(aData, aContainer, aIndex)
-  {
+  function PUIU__getLivemarkCopyTransaction(aData, aContainer, aIndex) {
     if (!aData.livemark || !aData.annos) {
       throw new Error("node is not a livemark");
     }
 
     let feedURI, siteURI;
     let annos = [];
     if (aData.annos) {
       annos = aData.annos.filter(function(aAnno) {
         if (aAnno.name == PlacesUtils.LMANNO_FEEDURI) {
           feedURI = PlacesUtils._uri(aAnno.value);
-        }
-        else if (aAnno.name == PlacesUtils.LMANNO_SITEURI) {
+        } else if (aAnno.name == PlacesUtils.LMANNO_SITEURI) {
           siteURI = PlacesUtils._uri(aAnno.value);
         }
         return this._copyableAnnotations.includes(aAnno.name)
       }, this);
     }
 
     return new PlacesCreateLivemarkTransaction(feedURI, siteURI, aData.title,
                                                aContainer, aIndex, annos);
@@ -520,18 +513,17 @@ this.PlacesUIUtils = {
    * @param   index
    *          The index within the container the item was dropped or pasted at
    * @param   copy
    *          The drag action was copy, so don't move folders or links.
    * @return An object implementing nsITransaction that can perform
    *         the move/insert.
    */
   makeTransaction:
-  function PUIU_makeTransaction(data, type, container, index, copy)
-  {
+  function PUIU_makeTransaction(data, type, container, index, copy) {
     switch (data.type) {
       case PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER:
         if (copy) {
           return this._getFolderCopyTransaction(data, container, index);
         }
 
         // Otherwise move the item.
         return new PlacesMoveItemTransaction(data.id, container, index);
@@ -844,21 +836,19 @@ this.PlacesUIUtils = {
    * @throws if aNodeOrItemId is neither an item id nor a folder result node.
    * @note livemark "folders" are considered read-only (but see bug 1072833).
    * @return true if aItemId points to a read-only folder, false otherwise.
    */
   isContentsReadOnly(aNodeOrItemId) {
     let itemId;
     if (typeof(aNodeOrItemId) == "number") {
       itemId = aNodeOrItemId;
-    }
-    else if (PlacesUtils.nodeIsFolder(aNodeOrItemId)) {
+    } else if (PlacesUtils.nodeIsFolder(aNodeOrItemId)) {
       itemId = PlacesUtils.getConcreteItemId(aNodeOrItemId);
-    }
-    else {
+    } else {
       throw new Error("invalid value for aNodeOrItemId");
     }
 
     if (itemId == PlacesUtils.placesRootId || IsLivemark(itemId))
       return true;
 
     // leftPaneFolderId, and as a result, allBookmarksFolderId, is a lazy getter
     // performing at least a synchronous DB query (and on its very first call
@@ -1099,23 +1089,21 @@ this.PlacesUIUtils = {
         // if fileName is empty, use path to distinguish labels
         if (aDoNotCutTitle) {
           title = host + uri.path;
         } else {
           title = host + (fileName ?
                            (host ? "/" + this.ellipsis + "/" : "") + fileName :
                            uri.path);
         }
-      }
-      catch (e) {
+      } catch (e) {
         // Use (no title) for non-standard URIs (data:, javascript:, ...)
         title = "";
       }
-    }
-    else
+    } else
       title = aNode.title;
 
     return title || this.getString("noTitle");
   },
 
   get leftPaneQueries() {
     // build the map
     this.leftPaneFolderId;
@@ -1164,39 +1152,36 @@ this.PlacesUIUtils = {
           return;
         }
         // 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,
       // remove all left pane folders and continue.  We will create a new one.
       items.forEach(safeRemoveItem);
-    }
-    else if (items.length == 1 && items[0] != -1) {
+    } else if (items.length == 1 && items[0] != -1) {
       leftPaneRoot = items[0];
       // Check that organizer left pane root is valid.
       let version = as.getItemAnnotation(leftPaneRoot, this.ORGANIZER_FOLDER_ANNO);
       if (version != this.ORGANIZER_LEFTPANE_VERSION ||
           !itemExists(leftPaneRoot)) {
         // Invalid root, we must rebuild the left pane.
         safeRemoveItem(leftPaneRoot);
         leftPaneRoot = -1;
@@ -1259,18 +1244,17 @@ this.PlacesUIUtils = {
       // valid ones.  As well as we can't just rely on corrupt since we may find
       // less valid queries than expected.
       if (corrupt || queriesCount != EXPECTED_QUERY_COUNT) {
         // Queries number is wrong, so the left pane must be corrupt.
         // Note: we can't just remove the leftPaneRoot, because some query could
         // have a bad parent, so we have to remove all items one by one.
         queryItems.forEach(safeRemoveItem);
         safeRemoveItem(leftPaneRoot);
-      }
-      else {
+      } else {
         // Everything is fine, return the current left pane folder.
         delete this.leftPaneFolderId;
         return this.leftPaneFolderId = leftPaneRoot;
       }
     }
 
     // Create a new left pane folder.
     var callback = {
@@ -1301,18 +1285,17 @@ this.PlacesUIUtils = {
         as.setItemAnnotation(folderId, PlacesUtils.EXCLUDE_FROM_BACKUP_ANNO, 1,
                              0, as.EXPIRE_NEVER);
 
         if (aIsRoot) {
           // Mark as special left pane root.
           as.setItemAnnotation(folderId, PlacesUIUtils.ORGANIZER_FOLDER_ANNO,
                                PlacesUIUtils.ORGANIZER_LEFTPANE_VERSION,
                                0, as.EXPIRE_NEVER);
-        }
-        else {
+        } else {
           // Mark as special organizer folder.
           as.setItemAnnotation(folderId, PlacesUIUtils.ORGANIZER_QUERY_ANNO, aFolderName,
                            0, as.EXPIRE_NEVER);
           PlacesUIUtils.leftPaneQueries[aFolderName] = folderId;
         }
         return folderId;
       },
 
@@ -1386,23 +1369,21 @@ this.PlacesUIUtils = {
   getLeftPaneQueryNameFromId: function PUIU_getLeftPaneQueryNameFromId(aItemId) {
     var queryName = "";
     // If the let pane hasn't been built, use the annotation service
     // directly, to avoid building the left pane too early.
     if (Object.getOwnPropertyDescriptor(this, "leftPaneFolderId").value === undefined) {
       try {
         queryName = PlacesUtils.annotations.
                                 getItemAnnotation(aItemId, this.ORGANIZER_QUERY_ANNO);
-      }
-      catch (ex) {
+      } catch (ex) {
         // doesn't have the annotation
         queryName = "";
       }
-    }
-    else {
+    } else {
       // If the left pane has already been built, use the name->id map
       // cached in PlacesUIUtils.
       for (let [name, id] of Object.entries(this.leftPaneQueries)) {
         if (aItemId == id)
           queryName = name;
       }
     }
     return queryName;
@@ -1476,18 +1457,17 @@ this.PlacesUIUtils = {
     if (!("title" in aNodeLike))
       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)) {
@@ -1583,18 +1563,17 @@ XPCOMUtils.defineLazyServiceGetter(Place
 XPCOMUtils.defineLazyGetter(PlacesUIUtils, "ellipsis", function() {
   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() {
@@ -1686,18 +1665,17 @@ XPCOMUtils.defineLazyGetter(PlacesUIUtil
      * Transaction for setting/unsetting Load-in-sidebar annotation.
      *
      * @param aBookmarkId
      *        id of the bookmark where to set Load-in-sidebar annotation.
      * @param aLoadInSidebar
      *        boolean value.
      * @return nsITransaction object.
      */
-    setLoadInSidebar(aItemId, aLoadInSidebar)
-    {
+    setLoadInSidebar(aItemId, aLoadInSidebar) {
       let annoObj = { name: PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO,
                       type: Ci.nsIAnnotationService.TYPE_INT32,
                       flags: 0,
                       value: aLoadInSidebar,
                       expires: Ci.nsIAnnotationService.EXPIRE_NEVER };
       return new PlacesSetItemAnnotationTransaction(aItemId, annoObj);
     },
 
@@ -1705,18 +1683,17 @@ XPCOMUtils.defineLazyGetter(PlacesUIUtil
     * Transaction for editing the description of a bookmark or a folder.
     *
     * @param aItemId
     *        id of the item to edit.
     * @param aDescription
     *        new description.
     * @return nsITransaction object.
     */
-    editItemDescription(aItemId, aDescription)
-    {
+    editItemDescription(aItemId, aDescription) {
       let annoObj = { name: PlacesUIUtils.DESCRIPTION_ANNO,
                       type: Ci.nsIAnnotationService.TYPE_STRING,
                       flags: 0,
                       value: aDescription,
                       expires: Ci.nsIAnnotationService.EXPIRE_NEVER };
       return new PlacesSetItemAnnotationTransaction(aItemId, annoObj);
     },
 
--- a/browser/components/places/content/bookmarkProperties.js
+++ b/browser/components/places/content/bookmarkProperties.js
@@ -157,18 +157,17 @@ var BookmarkPropertiesPanel = {
     if (this._action == ACTION_ADD) {
       NS_ASSERT("type" in dialogInfo, "missing type property for add action");
 
       if ("title" in dialogInfo)
         this._title = dialogInfo.title;
 
       if ("defaultInsertionPoint" in dialogInfo) {
         this._defaultInsertionPoint = dialogInfo.defaultInsertionPoint;
-      }
-      else {
+      } else {
         this._defaultInsertionPoint =
           new InsertionPoint(PlacesUtils.bookmarksMenuFolderId,
                              PlacesUtils.bookmarks.DEFAULT_INDEX,
                              Ci.nsITreeView.DROP_ON);
       }
 
       switch (dialogInfo.type) {
         case "bookmark":
@@ -176,18 +175,17 @@ var BookmarkPropertiesPanel = {
           if ("uri" in dialogInfo) {
             NS_ASSERT(dialogInfo.uri instanceof Ci.nsIURI,
                       "uri property should be a uri object");
             this._uri = dialogInfo.uri;
             if (typeof(this._title) != "string") {
               this._title = this._getURITitleFromHistory(this._uri) ||
                             this._uri.spec;
             }
-          }
-          else {
+          } else {
             this._uri = PlacesUtils._uri("about:blank");
             this._title = this._strings.getString("newBookmarkDefault");
             this._dummyItem = true;
           }
 
           if ("loadBookmarkInSidebar" in dialogInfo)
             this._loadInSidebar = dialogInfo.loadBookmarkInSidebar;
 
@@ -202,44 +200,41 @@ var BookmarkPropertiesPanel = {
           break;
 
         case "folder":
           this._itemType = BOOKMARK_FOLDER;
           if (!this._title) {
             if ("URIList" in dialogInfo) {
               this._title = this._strings.getString("bookmarkAllTabsDefault");
               this._URIs = dialogInfo.URIList;
-            }
-            else
+            } else
               this._title = this._strings.getString("newFolderDefault");
               this._dummyItem = true;
           }
           break;
 
         case "livemark":
           this._itemType = LIVEMARK_CONTAINER;
           if ("feedURI" in dialogInfo)
             this._feedURI = dialogInfo.feedURI;
           if ("siteURI" in dialogInfo)
             this._siteURI = dialogInfo.siteURI;
 
           if (!this._title) {
             if (this._feedURI) {
               this._title = this._getURITitleFromHistory(this._feedURI) ||
                             this._feedURI.spec;
-            }
-            else
+            } else
               this._title = this._strings.getString("newLivemarkDefault");
           }
       }
 
       if ("description" in dialogInfo)
         this._description = dialogInfo.description;
-    }
-    else { // edit
+    } else { // edit
       this._node = dialogInfo.node;
       this._title = this._node.title;
       if (PlacesUtils.nodeIsFolder(this._node))
         this._itemType = BOOKMARK_FOLDER;
       else if (PlacesUtils.nodeIsURI(this._node))
         this._itemType = BOOKMARK_ITEM;
     }
   },
@@ -383,32 +378,30 @@ var BookmarkPropertiesPanel = {
   _beginBatch() {
     if (this._batching)
       return;
     if (PlacesUIUtils.useAsyncTransactions) {
       this._batchBlockingDeferred = PromiseUtils.defer();
       PlacesTransactions.batch(function* () {
         yield this._batchBlockingDeferred.promise;
       }.bind(this));
-    }
-    else {
+    } else {
       PlacesUtils.transactionManager.beginBatch(null);
     }
     this._batching = true;
   },
 
   _endBatch() {
     if (!this._batching)
       return;
 
     if (PlacesUIUtils.useAsyncTransactions) {
       this._batchBlockingDeferred.resolve();
       this._batchBlockingDeferred = null;
-    }
-    else {
+    } else {
       PlacesUtils.transactionManager.endBatch(false);
     }
     this._batching = false;
   },
 
   // nsISupports
   QueryInterface: function BPP_QueryInterface(aIID) {
     if (aIID.equals(Ci.nsIDOMEventListener) ||
@@ -653,33 +646,30 @@ var BookmarkPropertiesPanel = {
         info.keyword = this._keyword;
       if (this._postData)
         info.postData = this._postData;
 
       if (this._charSet && !PrivateBrowsingUtils.isWindowPrivate(window))
         PlacesUtils.setCharsetForURI(this._uri, this._charSet);
 
       itemGuid = yield PlacesTransactions.NewBookmark(info).transact();
-    }
-    else if (this._itemType == LIVEMARK_CONTAINER) {
+    } else if (this._itemType == LIVEMARK_CONTAINER) {
       info.feedUrl = this._feedURI;
       if (this._siteURI)
         info.siteUrl = this._siteURI;
 
       itemGuid = yield PlacesTransactions.NewLivemark(info).transact();
-    }
-    else if (this._itemType == BOOKMARK_FOLDER) {
+    } else if (this._itemType == BOOKMARK_FOLDER) {
       itemGuid = yield PlacesTransactions.NewFolder(info).transact();
       for (let uri of this._URIs) {
         let placeInfo = yield PlacesUtils.promisePlaceInfo(uri);
         let title = placeInfo ? placeInfo.title : "";
         yield PlacesTransactions.transact({ parentGuid: itemGuid, uri, title });
       }
-    }
-    else {
+    } else {
       throw new Error(`unexpected value for _itemType:  ${this._itemType}`);
     }
 
     this._itemGuid = itemGuid;
     this._itemId = yield PlacesUtils.promiseItemId(itemGuid);
     return Object.freeze({
       itemId: this._itemId,
       bookmarkGuid: this._itemGuid,
--- a/browser/components/places/content/browserPlacesViews.js
+++ b/browser/components/places/content/browserPlacesViews.js
@@ -82,18 +82,17 @@ PlacesViewBase.prototype = {
     if (val) {
       this._resultNode = val.root;
       this._rootElt._placesNode = this._resultNode;
       this._domNodes = new Map();
       this._domNodes.set(this._resultNode, this._rootElt);
 
       // This calls _rebuild through invalidateContainer.
       this._resultNode.containerOpen = true;
-    }
-    else {
+    } else {
       this._resultNode = null;
       delete this._domNodes;
     }
 
     return val;
   },
 
   _options: null,
@@ -196,18 +195,17 @@ PlacesViewBase.prototype = {
     if (selectedNode) {
       let popup = document.popupNode;
       if (!popup._placesNode || popup._placesNode == this._resultNode ||
           popup._placesNode.itemId == -1 || !selectedNode.parent) {
         // If a static menuitem is selected, or if the root node is selected,
         // the insertion point is inside the folder, at the end.
         container = selectedNode;
         orientation = Ci.nsITreeView.DROP_ON;
-      }
-      else {
+      } else {
         // In all other cases the insertion point is before that node.
         container = selectedNode.parent;
         index = container.getChildIndex(selectedNode);
         if (PlacesUtils.nodeIsTagQuery(container)) {
           tagName = container.title;
           // TODO (Bug 1160193): properly support dropping on a tag root.
           if (!tagName)
             return null;
@@ -234,27 +232,25 @@ PlacesViewBase.prototype = {
 
   _cleanPopup: function PVB_cleanPopup(aPopup, aDelay) {
     // Remove Places nodes from the popup.
     let child = aPopup._startMarker;
     while (child.nextSibling != aPopup._endMarker) {
       let sibling = child.nextSibling;
       if (sibling._placesNode && !aDelay) {
         aPopup.removeChild(sibling);
-      }
-      else if (sibling._placesNode && aDelay) {
+      } else if (sibling._placesNode && aDelay) {
         // HACK (bug 733419): the popups originating from the OS X native
         // menubar don't live-update while open, thus we don't clean it
         // until the next popupshowing, to avoid zombie menuitems.
         if (!aPopup._delayedRemovals)
           aPopup._delayedRemovals = [];
         aPopup._delayedRemovals.push(sibling);
         child = child.nextSibling;
-      }
-      else {
+      } else {
         child = child.nextSibling;
       }
     }
   },
 
   _rebuildPopup: function PVB__rebuildPopup(aPopup) {
     let resultNode = aPopup._placesNode;
     if (!resultNode.containerOpen)
@@ -272,18 +268,17 @@ PlacesViewBase.prototype = {
     let cc = resultNode.childCount;
     if (cc > 0) {
       this._setEmptyPopupStatus(aPopup, false);
 
       for (let i = 0; i < cc; ++i) {
         let child = resultNode.getChild(i);
         this._insertNewItemToPopup(child, aPopup, null);
       }
-    }
-    else {
+    } else {
       this._setEmptyPopupStatus(aPopup, true);
     }
     aPopup._built = true;
   },
 
   _removeChild: function PVB__removeChild(aChild) {
     // If document.popupNode pointed to this child, null it out,
     // otherwise controller's command-updating may rely on the removed
@@ -307,57 +302,53 @@ PlacesViewBase.prototype = {
     }
 
     if (aEmpty) {
       aPopup.setAttribute("emptyplacesresult", "true");
       // Don't add the menuitem if there is static content.
       if (!aPopup._startMarker.previousSibling &&
           !aPopup._endMarker.nextSibling)
         aPopup.insertBefore(aPopup._emptyMenuitem, aPopup._endMarker);
-    }
-    else {
+    } else {
       aPopup.removeAttribute("emptyplacesresult");
       try {
         aPopup.removeChild(aPopup._emptyMenuitem);
       } catch (ex) {}
     }
   },
 
   _createMenuItemForPlacesNode:
   function PVB__createMenuItemForPlacesNode(aPlacesNode) {
     this._domNodes.delete(aPlacesNode);
 
     let element;
     let type = aPlacesNode.type;
     if (type == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR) {
       element = document.createElement("menuseparator");
       element.setAttribute("class", "small-separator");
-    }
-    else {
+    } else {
       let itemId = aPlacesNode.itemId;
       if (type == Ci.nsINavHistoryResultNode.RESULT_TYPE_URI) {
         element = document.createElement("menuitem");
         element.className = "menuitem-iconic bookmark-item menuitem-with-favicon";
         element.setAttribute("scheme",
                              PlacesUIUtils.guessUrlSchemeForUI(aPlacesNode.uri));
-      }
-      else if (PlacesUtils.containerTypes.includes(type)) {
+      } else if (PlacesUtils.containerTypes.includes(type)) {
         element = document.createElement("menu");
         element.setAttribute("container", "true");
 
         if (aPlacesNode.type == Ci.nsINavHistoryResultNode.RESULT_TYPE_QUERY) {
           element.setAttribute("query", "true");
           if (PlacesUtils.nodeIsTagQuery(aPlacesNode))
             element.setAttribute("tagContainer", "true");
           else if (PlacesUtils.nodeIsDay(aPlacesNode))
             element.setAttribute("dayContainer", "true");
           else if (PlacesUtils.nodeIsHost(aPlacesNode))
             element.setAttribute("hostContainer", "true");
-        }
-        else if (itemId != -1) {
+        } else if (itemId != -1) {
           PlacesUtils.livemarks.getLivemark({ id: itemId })
             .then(aLivemark => {
               element.setAttribute("livemark", "true");
               if (AppConstants.platform === "macosx") {
                 // OS X native menubar doesn't track list-style-images since
                 // it doesn't have a frame (bug 733415).  Thus enforce updating.
                 element.setAttribute("image", "");
                 element.removeAttribute("image");
@@ -375,18 +366,17 @@ PlacesViewBase.prototype = {
 
         element.appendChild(popup);
         element.className = "menu-iconic bookmark-item";
         if (typeof this.options.extraClasses.entry == "string") {
           element.classList.add(this.options.extraClasses.entry);
         }
 
         this._domNodes.set(aPlacesNode, popup);
-      }
-      else
+      } else
         throw "Unexpected node";
 
       element.setAttribute("label", PlacesUIUtils.getBestTitle(aPlacesNode));
 
       let icon = aPlacesNode.icon;
       if (icon)
         element.setAttribute("image", icon);
     }
@@ -417,18 +407,17 @@ PlacesViewBase.prototype = {
     let livemarkInfo = this.controller.getCachedLivemarkInfo(aPopup._placesNode);
     let siteUrl = livemarkInfo && livemarkInfo.siteURI ?
                   livemarkInfo.siteURI.spec : null;
     if (!siteUrl && aPopup._siteURIMenuitem) {
       aPopup.removeChild(aPopup._siteURIMenuitem);
       aPopup._siteURIMenuitem = null;
       aPopup.removeChild(aPopup._siteURIMenuseparator);
       aPopup._siteURIMenuseparator = null;
-    }
-    else if (siteUrl && !aPopup._siteURIMenuitem) {
+    } else if (siteUrl && !aPopup._siteURIMenuitem) {
       // Add "Open (Feed Name)" menuitem.
       aPopup._siteURIMenuitem = document.createElement("menuitem");
       aPopup._siteURIMenuitem.className = "openlivemarksite-menuitem";
       if (typeof this.options.extraClasses.entry == "string") {
         aPopup._siteURIMenuitem.classList.add(this.options.extraClasses.entry);
       }
       aPopup._siteURIMenuitem.setAttribute("targetURI", siteUrl);
       aPopup._siteURIMenuitem.setAttribute("oncommand",
@@ -475,18 +464,17 @@ PlacesViewBase.prototype = {
     if (aStatus == Ci.mozILivemark.STATUS_LOADING ||
         aStatus == Ci.mozILivemark.STATUS_FAILED) {
       // Status has changed, update the cached status menuitem.
       let stringId = aStatus == Ci.mozILivemark.STATUS_LOADING ?
                        "bookmarksLivemarkLoading" : "bookmarksLivemarkFailed";
       statusMenuitem.setAttribute("label", PlacesUIUtils.getString(stringId));
       if (aPopup._startMarker.nextSibling != statusMenuitem)
         aPopup.insertBefore(statusMenuitem, aPopup._startMarker.nextSibling);
-    }
-    else if (aPopup._statusMenuitem.parentNode == aPopup) {
+    } else if (aPopup._statusMenuitem.parentNode == aPopup) {
       // The livemark has finished loading.
       aPopup.removeChild(aPopup._statusMenuitem);
     }
   },
 
   toggleCutNode: function PVB_toggleCutNode(aPlacesNode, aValue) {
     let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
 
@@ -568,18 +556,17 @@ PlacesViewBase.prototype = {
     if (elt.localName == "menupopup")
       elt = elt.parentNode;
 
     if (!aNewTitle && elt.localName != "toolbarbutton") {
       // Many users consider toolbars as shortcuts containers, so explicitly
       // allow empty labels on toolbarbuttons.  For any other element try to be
       // smarter, guessing a title from the uri.
       elt.setAttribute("label", PlacesUIUtils.getBestTitle(aPlacesNode));
-    }
-    else {
+    } else {
       elt.setAttribute("label", aNewTitle);
     }
   },
 
   nodeRemoved:
   function PVB_nodeRemoved(aParentPlacesNode, aPlacesNode, aIndex) {
     let parentElt = this._getDOMNodeForPlacesNode(aParentPlacesNode);
     let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
@@ -687,27 +674,25 @@ PlacesViewBase.prototype = {
             this.controller.cacheLivemarkInfo(aPlacesNode, aLivemark);
             if (aNewState == Ci.nsINavHistoryContainerResultNode.STATE_OPENED) {
               aLivemark.registerForUpdates(aPlacesNode, this);
               // Prioritize the current livemark.
               aLivemark.reload();
               PlacesUtils.livemarks.reloadLivemarks();
               if (shouldInvalidate)
                 this.invalidateContainer(aPlacesNode);
-            }
-            else {
+            } else {
               aLivemark.unregisterForUpdates(aPlacesNode);
             }
           }, () => undefined);
       }
     }
   },
 
-  _populateLivemarkPopup: function PVB__populateLivemarkPopup(aPopup)
-  {
+  _populateLivemarkPopup: function PVB__populateLivemarkPopup(aPopup) {
     this._setLivemarkSiteURIMenuItem(aPopup);
     // Show the loading status only if there are no entries yet.
     if (aPopup._startMarker.nextSibling == aPopup._endMarker)
       this._setLivemarkStatusMenuItem(aPopup, Ci.mozILivemark.STATUS_LOADING);
 
     PlacesUtils.livemarks.getLivemark({ id: aPopup._placesNode.itemId })
       .then(aLivemark => {
         let placesNode = aPopup._placesNode;
@@ -822,18 +807,17 @@ PlacesViewBase.prototype = {
       // We don't have to show any option.
       if (aPopup._endOptOpenAllInTabs) {
         aPopup.removeChild(aPopup._endOptOpenAllInTabs);
         aPopup._endOptOpenAllInTabs = null;
 
         aPopup.removeChild(aPopup._endOptSeparator);
         aPopup._endOptSeparator = null;
       }
-    }
-    else if (!aPopup._endOptOpenAllInTabs) {
+    } else if (!aPopup._endOptOpenAllInTabs) {
       // Create a separator before options.
       aPopup._endOptSeparator = document.createElement("menuseparator");
       aPopup._endOptSeparator.className = "bookmarks-actions-menuseparator";
       aPopup.appendChild(aPopup._endOptSeparator);
 
       // Add the "Open All in Tabs" menuitem.
       aPopup._endOptOpenAllInTabs = document.createElement("menuitem");
       aPopup._endOptOpenAllInTabs.className = "openintabs-menuitem";
@@ -1044,51 +1028,48 @@ PlacesToolbar.prototype = {
   _insertNewItem:
   function PT__insertNewItem(aChild, aBefore) {
     this._domNodes.delete(aChild);
 
     let type = aChild.type;
     let button;
     if (type == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR) {
       button = document.createElement("toolbarseparator");
-    }
-    else {
+    } else {
       button = document.createElement("toolbarbutton");
       button.className = "bookmark-item";
       button.setAttribute("label", aChild.title || "");
       let icon = aChild.icon;
       if (icon)
         button.setAttribute("image", icon);
 
       if (PlacesUtils.containerTypes.includes(type)) {
         button.setAttribute("type", "menu");
         button.setAttribute("container", "true");
 
         if (PlacesUtils.nodeIsQuery(aChild)) {
           button.setAttribute("query", "true");
           if (PlacesUtils.nodeIsTagQuery(aChild))
             button.setAttribute("tagContainer", "true");
-        }
-        else if (PlacesUtils.nodeIsFolder(aChild)) {
+        } else if (PlacesUtils.nodeIsFolder(aChild)) {
           PlacesUtils.livemarks.getLivemark({ id: aChild.itemId })
             .then(aLivemark => {
               button.setAttribute("livemark", "true");
               this.controller.cacheLivemarkInfo(aChild, aLivemark);
             }, () => undefined);
         }
 
         let popup = document.createElement("menupopup");
         popup.setAttribute("placespopup", "true");
         button.appendChild(popup);
         popup._placesNode = PlacesUtils.asContainer(aChild);
         popup.setAttribute("context", "placesContext");
 
         this._domNodes.set(aChild, popup);
-      }
-      else if (PlacesUtils.nodeIsURI(aChild)) {
+      } else if (PlacesUtils.nodeIsURI(aChild)) {
         button.setAttribute("scheme",
                             PlacesUIUtils.guessUrlSchemeForUI(aChild.uri));
       }
     }
 
     button._placesNode = aChild;
     if (!this._domNodes.has(aChild))
       this._domNodes.set(aChild, button);
@@ -1325,18 +1306,17 @@ PlacesToolbar.prototype = {
         elt.setAttribute("livemark", true);
 
         PlacesUtils.livemarks.getLivemark({ id: aPlacesNode.itemId })
           .then(aLivemark => {
             this.controller.cacheLivemarkInfo(aPlacesNode, aLivemark);
             this.invalidateContainer(aPlacesNode);
           }, Components.utils.reportError);
       }
-    }
-    else {
+    } else {
       // Node is in a submenu.
       PlacesViewBase.prototype.nodeAnnotationChanged.apply(this, arguments);
     }
   },
 
   nodeTitleChanged: function PT_nodeTitleChanged(aPlacesNode, aNewTitle) {
     let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
 
@@ -1419,66 +1399,61 @@ PlacesToolbar.prototype = {
         let threshold = eltRect.width * 0.25;
         if (this.isRTL ? (aEvent.clientX > eltRect.right - threshold)
                        : (aEvent.clientX < eltRect.left + threshold)) {
           // Drop before this folder.
           dropPoint.ip =
             new InsertionPoint(PlacesUtils.getConcreteItemId(this._resultNode),
                                eltIndex, Ci.nsITreeView.DROP_BEFORE);
           dropPoint.beforeIndex = eltIndex;
-        }
-        else if (this.isRTL ? (aEvent.clientX > eltRect.left + threshold)
+        } else if (this.isRTL ? (aEvent.clientX > eltRect.left + threshold)
                             : (aEvent.clientX < eltRect.right - threshold)) {
           // Drop inside this folder.
           let tagName = PlacesUtils.nodeIsTagQuery(elt._placesNode) ?
                         elt._placesNode.title : null;
           dropPoint.ip =
             new InsertionPoint(PlacesUtils.getConcreteItemId(elt._placesNode),
                                -1, Ci.nsITreeView.DROP_ON,
                                tagName);
           dropPoint.beforeIndex = eltIndex;
           dropPoint.folderElt = elt;
-        }
-        else {
+        } else {
           // Drop after this folder.
           let beforeIndex =
             (eltIndex == this._rootElt.childNodes.length - 1) ?
             -1 : eltIndex + 1;
 
           dropPoint.ip =
             new InsertionPoint(PlacesUtils.getConcreteItemId(this._resultNode),
                                beforeIndex, Ci.nsITreeView.DROP_BEFORE);
           dropPoint.beforeIndex = beforeIndex;
         }
-      }
-      else {
+      } else {
         // This is a non-folder node or a read-only folder.
         // Drop before it with regards to RTL mode.
         let threshold = eltRect.width * 0.5;
         if (this.isRTL ? (aEvent.clientX > eltRect.left + threshold)
                        : (aEvent.clientX < eltRect.left + threshold)) {
           // Drop before this bookmark.
           dropPoint.ip =
             new InsertionPoint(PlacesUtils.getConcreteItemId(this._resultNode),
                                eltIndex, Ci.nsITreeView.DROP_BEFORE);
           dropPoint.beforeIndex = eltIndex;
-        }
-        else {
+        } else {
           // Drop after this bookmark.
           let beforeIndex =
             eltIndex == this._rootElt.childNodes.length - 1 ?
             -1 : eltIndex + 1;
           dropPoint.ip =
             new InsertionPoint(PlacesUtils.getConcreteItemId(this._resultNode),
                                beforeIndex, Ci.nsITreeView.DROP_BEFORE);
           dropPoint.beforeIndex = beforeIndex;
         }
       }
-    }
-    else {
+    } else {
       // We are most likely dragging on the empty area of the
       // toolbar, we should drop after the last node.
       dropPoint.ip =
         new InsertionPoint(PlacesUtils.getConcreteItemId(this._resultNode),
                            -1, Ci.nsITreeView.DROP_BEFORE);
       dropPoint.beforeIndex = -1;
     }
 
@@ -1490,35 +1465,29 @@ PlacesToolbar.prototype = {
     timer.initWithCallback(this, aTime, timer.TYPE_ONE_SHOT);
     return timer;
   },
 
   notify: function PT_notify(aTimer) {
     if (aTimer == this._updateChevronTimer) {
       this._updateChevronTimer = null;
       this._updateChevronTimerCallback();
-    }
-
-    // * Timer to turn off indicator bar.
-    else if (aTimer == this._ibTimer) {
+    } else if (aTimer == this._ibTimer) {
+      // * Timer to turn off indicator bar.
       this._dropIndicator.collapsed = true;
       this._ibTimer = null;
-    }
-
-    // * Timer to open a menubutton that's being dragged over.
-    else if (aTimer == this._overFolder.openTimer) {
+    } else if (aTimer == this._overFolder.openTimer) {
+      // * Timer to open a menubutton that's being dragged over.
       // Set the autoopen attribute on the folder's menupopup so that
       // the menu will automatically close when the mouse drags off of it.
       this._overFolder.elt.lastChild.setAttribute("autoopened", "true");
       this._overFolder.elt.open = true;
       this._overFolder.openTimer = null;
-    }
-
-    // * Timer to close a menubutton that's been dragged off of.
-    else if (aTimer == this._overFolder.closeTimer) {
+    } else if (aTimer == this._overFolder.closeTimer) {
+      // * Timer to close a menubutton that's been dragged off of.
       // Close the menubutton if we are not dragging over it or one of
       // its children.  The autoopened attribute will let the menu know to
       // close later if the menu is still being dragged over.
       let currentPlacesNode = PlacesControllerDragHelper.currentDropTarget;
       let inHierarchy = false;
       while (currentPlacesNode) {
         if (currentPlacesNode == this._rootElt) {
           inHierarchy = true;
@@ -1618,18 +1587,17 @@ PlacesToolbar.prototype = {
         this._clearOverFolder();
         this._overFolder.elt = overElt;
         this._overFolder.openTimer = this._setTimer(this._overFolder.hoverTime);
       }
       if (!this._overFolder.elt.hasAttribute("dragover"))
         this._overFolder.elt.setAttribute("dragover", "true");
 
       this._dropIndicator.collapsed = true;
-    }
-    else {
+    } else {
       // Dragging over a normal toolbarbutton,
       // show indicator bar and move it to the appropriate drop point.
       let ind = this._dropIndicator;
       ind.parentNode.collapsed = false;
       let halfInd = ind.clientWidth / 2;
       let translateX;
       if (this.isRTL) {
         halfInd = Math.ceil(halfInd);
@@ -1637,18 +1605,17 @@ PlacesToolbar.prototype = {
         if (this._rootElt.firstChild) {
           if (dropPoint.beforeIndex == -1)
             translateX += this._rootElt.lastChild.getBoundingClientRect().left;
           else {
             translateX += this._rootElt.childNodes[dropPoint.beforeIndex]
                               .getBoundingClientRect().right;
           }
         }
-      }
-      else {
+      } else {
         halfInd = Math.floor(halfInd);
         translateX = 0 - this._rootElt.getBoundingClientRect().left +
                      halfInd;
         if (this._rootElt.firstChild) {
           if (dropPoint.beforeIndex == -1)
             translateX += this._rootElt.lastChild.getBoundingClientRect().right;
           else {
             translateX += this._rootElt.childNodes[dropPoint.beforeIndex]
@@ -1868,44 +1835,41 @@ PlacesPanelMenuView.prototype = {
   function PAMV__insertNewItem(aChild, aBefore) {
     this._domNodes.delete(aChild);
 
     let type = aChild.type;
     let button;
     if (type == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR) {
       button = document.createElement("toolbarseparator");
       button.setAttribute("class", "small-separator");
-    }
-    else {
+    } else {
       button = document.createElement("toolbarbutton");
       button.className = "bookmark-item";
       if (typeof this.options.extraClasses.entry == "string")
         button.classList.add(this.options.extraClasses.entry);
       button.setAttribute("label", aChild.title || "");
       let icon = aChild.icon;
       if (icon)
         button.setAttribute("image", icon);
 
       if (PlacesUtils.containerTypes.includes(type)) {
         button.setAttribute("container", "true");
 
         if (PlacesUtils.nodeIsQuery(aChild)) {
           button.setAttribute("query", "true");
           if (PlacesUtils.nodeIsTagQuery(aChild))
             button.setAttribute("tagContainer", "true");
-        }
-        else if (PlacesUtils.nodeIsFolder(aChild)) {
+        } else if (PlacesUtils.nodeIsFolder(aChild)) {
           PlacesUtils.livemarks.getLivemark({ id: aChild.itemId })
             .then(aLivemark => {
               button.setAttribute("livemark", "true");
               this.controller.cacheLivemarkInfo(aChild, aLivemark);
             }, () => undefined);
         }
-      }
-      else if (PlacesUtils.nodeIsURI(aChild)) {
+      } else if (PlacesUtils.nodeIsURI(aChild)) {
         button.setAttribute("scheme",
                             PlacesUIUtils.guessUrlSchemeForUI(aChild.uri));
       }
     }
 
     button._placesNode = aChild;
     if (!this._domNodes.has(aChild))
       this._domNodes.set(aChild, button);
--- a/browser/components/places/content/controller.js
+++ b/browser/components/places/content/controller.js
@@ -246,18 +246,17 @@ PlacesController.prototype = {
     case "placesCmd_delete":
       this.remove("Remove Selection").then(null, Components.utils.reportError);
       break;
     case "placesCmd_deleteDataHost":
       var host;
       if (PlacesUtils.nodeIsHost(this._view.selectedNode)) {
         var queries = this._view.selectedNode.getQueries();
         host = queries[0].domain;
-      }
-      else
+      } else
         host = NetUtil.newURI(this._view.selectedNode.uri).host;
       ForgetAboutSite.removeDataFromDomain(host);
       break;
     case "cmd_selectAll":
       this.selectAll();
       break;
     case "placesCmd_open":
       PlacesUIUtils.openNodeIn(this._view.selectedNode, "current", this._view);
@@ -387,18 +386,17 @@ PlacesController.prototype = {
       data = data.value.QueryInterface(Ci.nsISupportsString).data;
       if (type.value != PlacesUtils.TYPE_X_MOZ_URL &&
           type.value != PlacesUtils.TYPE_UNICODE)
         return false;
 
       // unwrapNodes() will throw if the data blob is malformed.
       PlacesUtils.unwrapNodes(data, type.value);
       return this._view.insertionPoint != null;
-    }
-    catch (e) {
+    } catch (e) {
       // getAnyTransferData or unwrapNodes failed
       return false;
     }
   },
 
   /**
    * Gathers information about the selected nodes according to the following
    * rules:
@@ -620,18 +618,17 @@ PlacesController.prototype = {
           usableItemCount++;
 
           // Show the separator above the menu-item if any
           if (separator) {
             separator.hidden = false;
             separator = null;
           }
         }
-      }
-      else { // menuseparator
+      } else { // menuseparator
         // Initially hide it. It will be unhidden if there will be at least one
         // visible menu-item above and below it.
         item.hidden = true;
 
         // We won't show the separator at all if no items are visible above it
         if (visibleItemsBeforeSep)
           separator = item;
 
@@ -863,72 +860,65 @@ PlacesController.prototype = {
         // untag transaction.
         var tagItemId = PlacesUtils.getConcreteItemId(node.parent);
         var uri = NetUtil.newURI(node.uri);
         if (PlacesUIUtils.useAsyncTransactions) {
           let tag = node.parent.title;
           if (!tag)
             tag = PlacesUtils.bookmarks.getItemTitle(tagItemId);
           transactions.push(PlacesTransactions.Untag({ uri, tag }));
-        }
-        else {
+        } else {
           let txn = new PlacesUntagURITransaction(uri, [tagItemId]);
           transactions.push(txn);
         }
-      }
-      else if (PlacesUtils.nodeIsTagQuery(node) && node.parent &&
+      } else if (PlacesUtils.nodeIsTagQuery(node) && node.parent &&
                PlacesUtils.nodeIsQuery(node.parent) &&
                PlacesUtils.asQuery(node.parent).queryOptions.resultType ==
                  Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_QUERY) {
         // This is a tag container.
         // Untag all URIs tagged with this tag only if the tag container is
         // child of the "Tags" query in the library, in all other places we
         // must only remove the query node.
         let tag = node.title;
         let URIs = PlacesUtils.tagging.getURIsForTag(tag);
         if (PlacesUIUtils.useAsyncTransactions) {
           transactions.push(PlacesTransactions.Untag({ tag, uris: URIs }));
-        }
-        else {
+        } else {
           for (var j = 0; j < URIs.length; j++) {
             let txn = new PlacesUntagURITransaction(URIs[j], [tag]);
             transactions.push(txn);
           }
         }
-      }
-      else if (PlacesUtils.nodeIsURI(node) &&
+      } else if (PlacesUtils.nodeIsURI(node) &&
                PlacesUtils.nodeIsQuery(node.parent) &&
                PlacesUtils.asQuery(node.parent).queryOptions.queryType ==
                  Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY) {
         // This is a uri node inside an history query.
         PlacesUtils.bhistory.removePage(NetUtil.newURI(node.uri));
         // History deletes are not undoable, so we don't have a transaction.
-      }
-      else if (node.itemId == -1 &&
+      } else if (node.itemId == -1 &&
                PlacesUtils.nodeIsQuery(node) &&
                PlacesUtils.asQuery(node).queryOptions.queryType ==
                  Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY) {
         // This is a dynamically generated history query, like queries
         // grouped by site, time or both.  Dynamically generated queries don't
         // have an itemId even if they are descendants of a bookmark.
         this._removeHistoryContainer(node);
         // History deletes are not undoable, so we don't have a transaction.
-      }
-      else {
+      } else {
         // This is a common bookmark item.
         if (PlacesUtils.nodeIsFolder(node)) {
           // If this is a folder we add it to our array of folders, used
           // to skip nodes that are children of an already removed folder.
           removedFolders.push(node);
         }
         if (PlacesUIUtils.useAsyncTransactions) {
           transactions.push(
             PlacesTransactions.Remove({ guid: node.bookmarkGuid }));
-        }
-        else {
+        } else {
           let txn = new PlacesRemoveItemTransaction(node.itemId);
           transactions.push(txn);
         }
       }
     }
   },
 
   /**
@@ -942,18 +932,17 @@ PlacesController.prototype = {
     var removedFolders = [];
 
     for (var i = 0; i < ranges.length; i++)
       this._removeRange(ranges[i], transactions, removedFolders);
 
     if (transactions.length > 0) {
       if (PlacesUIUtils.useAsyncTransactions) {
         yield PlacesTransactions.batch(transactions);
-      }
-      else {
+      } else {
         var txn = new PlacesAggregatedTransaction(txnName, transactions);
         PlacesUtils.transactionManager.doTransaction(txn);
       }
     }
   }),
 
   /**
    * Removes the set of selected ranges from history.
@@ -966,18 +955,17 @@ PlacesController.prototype = {
     for (let i = 0; i < nodes.length; ++i) {
       let node = nodes[i];
       if (PlacesUtils.nodeIsURI(node)) {
         let uri = NetUtil.newURI(node.uri);
         // Avoid duplicates.
         if (URIs.indexOf(uri) < 0) {
           URIs.push(uri);
         }
-      }
-      else if (PlacesUtils.nodeIsQuery(node) &&
+      } else if (PlacesUtils.nodeIsQuery(node) &&
                PlacesUtils.asQuery(node).queryOptions.queryType ==
                  Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY) {
         this._removeHistoryContainer(node);
       }
     }
 
     // Do removal in chunks to give some breath to main-thread.
     function* pagesChunkGenerator(aURIs) {
@@ -999,18 +987,17 @@ PlacesController.prototype = {
    *          The container node to remove.
    *
    * @note history deletes are not undoable.
    */
   _removeHistoryContainer: function PC__removeHistoryContainer(aContainerNode) {
     if (PlacesUtils.nodeIsHost(aContainerNode)) {
       // Site container.
       PlacesUtils.bhistory.removePagesFromHost(aContainerNode.title, true);
-    }
-    else if (PlacesUtils.nodeIsDay(aContainerNode)) {
+    } else if (PlacesUtils.nodeIsDay(aContainerNode)) {
       // Day container.
       let query = aContainerNode.getQueries()[0];
       let beginTime = query.beginTime;
       let endTime = query.endTime;
       NS_ASSERT(query && beginTime && endTime,
                 "A valid date container query should exist!");
       // We want to exclude beginTime from the removal because
       // removePagesByTimeframe includes both extremes, while date containers
@@ -1034,33 +1021,29 @@ PlacesController.prototype = {
 
     var root = this._view.result.root;
 
     if (PlacesUtils.nodeIsFolder(root)) {
       if (PlacesUIUtils.useAsyncTransactions)
         yield this._removeRowsFromBookmarks(aTxnName);
       else
         this._removeRowsFromBookmarks(aTxnName);
-    }
-    else if (PlacesUtils.nodeIsQuery(root)) {
+    } else if (PlacesUtils.nodeIsQuery(root)) {
       var queryType = PlacesUtils.asQuery(root).queryOptions.queryType;
       if (queryType == Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS) {
         if (PlacesUIUtils.useAsyncTransactions)
           yield this._removeRowsFromBookmarks(aTxnName);
         else
           this._removeRowsFromBookmarks(aTxnName);
-      }
-      else if (queryType == Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY) {
+      } else if (queryType == Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY) {
         this._removeRowsFromHistory();
-      }
-      else {
+      } else {
         NS_ASSERT(false, "implement support for QUERY_TYPE_UNIFIED");
       }
-    }
-    else
+    } else
       NS_ASSERT(false, "unexpected root");
   }),
 
   /**
    * Fills a DataTransfer object with the content of the selection that can be
    * dropped elsewhere.
    * @param   aEvent
    *          The dragstart event.
@@ -1092,23 +1075,21 @@ PlacesController.prototype = {
         // This order is _important_! It controls how this and other
         // applications select data to be inserted based on type.
         addData(PlacesUtils.TYPE_X_MOZ_PLACE, i);
 
         // Drop the feed uri for livemark containers
         let livemarkInfo = this.getCachedLivemarkInfo(node);
         if (livemarkInfo) {
           addURIData(i, livemarkInfo.feedURI.spec);
-        }
-        else if (node.uri) {
+        } else if (node.uri) {
           addURIData(i);
         }
       }
-    }
-    finally {
+    } finally {
       if (!didSuppressNotifications)
         result.suppressNotifications = false;
     }
   },
 
   get clipboardAction() {
     let action = {};
     let actionOwner;
@@ -1239,36 +1220,34 @@ PlacesController.prototype = {
    */
   copy: function PC_copy() {
     let result = this._view.result;
     let didSuppressNotifications = result.suppressNotifications;
     if (!didSuppressNotifications)
       result.suppressNotifications = true;
     try {
       this._populateClipboard(this._view.selectedNodes, "copy");
-    }
-    finally {
+    } finally {
       if (!didSuppressNotifications)
         result.suppressNotifications = false;
     }
   },
 
   /**
    * Cut Bookmarks and Folders to the clipboard
    */
   cut: function PC_cut() {
     let result = this._view.result;
     let didSuppressNotifications = result.suppressNotifications;
     if (!didSuppressNotifications)
       result.suppressNotifications = true;
     try {
       this._populateClipboard(this._view.selectedNodes, "cut");
       this.cutNodes = this._view.selectedNodes;
-    }
-    finally {
+    } finally {
       if (!didSuppressNotifications)
         result.suppressNotifications = false;
     }
   },
 
   /**
    * Paste Bookmarks and Folders from the clipboard
    */
@@ -1304,18 +1283,17 @@ PlacesController.prototype = {
       return;
     }
 
     let itemsToSelect = [];
     if (PlacesUIUtils.useAsyncTransactions) {
       if (ip.isTag) {
         let uris = items.filter(item => "uri" in item).map(item => NetUtil.newURI(item.uri));
         yield PlacesTransactions.Tag({ uris, tag: ip.tagName }).transact();
-      }
-      else {
+      } else {
         yield PlacesTransactions.batch(function* () {
           let insertionIndex = ip.index;
           let parent = yield ip.promiseGuid();
 
           for (let item of items) {
             let doCopy = action == "copy";
 
             // If this is not a copy, check for safety that we can move the
@@ -1332,18 +1310,17 @@ PlacesController.prototype = {
 
             // Adjust index to make sure items are pasted in the correct
             // position.  If index is DEFAULT_INDEX, items are just appended.
             if (insertionIndex != PlacesUtils.bookmarks.DEFAULT_INDEX)
               insertionIndex++;
           }
         });
       }
-    }
-    else {
+    } else {
       let transactions = [];
       let insertionIndex = ip.index;
       for (let i = 0; i < items.length; ++i) {
         if (ip.isTag) {
           // Pasting into a tag container means tagging the item, regardless of
           // the requested action.
           let tagTxn = new PlacesTagURITransaction(NetUtil.newURI(items[i].uri),
                                                    [ip.itemId]);
@@ -1509,18 +1486,17 @@ var PlacesControllerDragHelper = {
       // places.
       if (flavor == TAB_DROP_TYPE)
         continue;
 
       let data = dt.mozGetDataAt(flavor, i);
       let dragged;
       try {
         dragged = PlacesUtils.unwrapNodes(data, flavor)[0];
-      }
-      catch (e) {
+      } catch (e) {
         return false;
       }
 
       // Only bookmarks and urls can be dropped into tag containers.
       if (ip.isTag &&
           dragged.type != PlacesUtils.TYPE_X_MOZ_URL &&
           (dragged.type != PlacesUtils.TYPE_X_MOZ_PLACE ||
            (dragged.uri && dragged.uri.startsWith("place:")) ))
@@ -1605,26 +1581,24 @@ var PlacesControllerDragHelper = {
       if (!flavor)
         return;
 
       let data = dt.mozGetDataAt(flavor, i);
       let unwrapped;
       if (flavor != TAB_DROP_TYPE) {
         // There's only ever one in the D&D case.
         unwrapped = PlacesUtils.unwrapNodes(data, flavor)[0];
-      }
-      else if (data instanceof XULElement && data.localName == "tab" &&
+      } else if (data instanceof XULElement && data.localName == "tab" &&
                data.ownerGlobal instanceof ChromeWindow) {
         let uri = data.linkedBrowser.currentURI;
         let spec = uri ? uri.spec : "about:blank";
         unwrapped = { uri: spec,
                       title: data.label,
                       type: PlacesUtils.TYPE_X_MOZ_URL};
-      }
-      else
+      } else
         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 &&
@@ -1635,45 +1609,42 @@ var PlacesControllerDragHelper = {
       // If dragging over a tag container we should tag the item.
       if (insertionPoint.isTag) {
         let uri = NetUtil.newURI(unwrapped.uri);
         let tagItemId = insertionPoint.itemId;
         if (PlacesUIUtils.useAsyncTransactions)
           transactions.push(PlacesTransactions.Tag({ uri, tag: tagName }));
         else
           transactions.push(new PlacesTagURITransaction(uri, [tagItemId]));
-      }
-      else {
+      } else {
         // If this is not a copy, check for safety that we can move the source,
         // otherwise report an error and fallback to a copy.
         if (!doCopy && !PlacesControllerDragHelper.canMoveUnwrappedNode(unwrapped)) {
           Components.utils.reportError("Tried to move an unmovable Places " +
                                        "node, reverting to a copy operation.");
           doCopy = true;
         }
         if (PlacesUIUtils.useAsyncTransactions) {
           transactions.push(
             PlacesUIUtils.getTransactionForData(unwrapped,
                                                 flavor,
                                                 parentGuid,
                                                 index,
                                                 doCopy));
-        }
-        else {
+        } else {
           transactions.push(PlacesUIUtils.makeTransaction(unwrapped,
                               flavor, insertionPoint.itemId,
                               index, doCopy));
         }
       }
     }
 
     if (PlacesUIUtils.useAsyncTransactions) {
       yield PlacesTransactions.batch(transactions);
-    }
-    else {
+    } else {
       let txn = new PlacesAggregatedTransaction("DropItems", transactions);
       PlacesUtils.transactionManager.doTransaction(txn);
     }
   }),
 
   /**
    * Checks if we can insert into a container.
    * @param   aContainer
@@ -1713,18 +1684,17 @@ function goUpdatePlacesCommands() {
   updatePlacesCommand("placesCmd_reload");
   updatePlacesCommand("placesCmd_sortBy:name");
   updatePlacesCommand("placesCmd_cut");
   updatePlacesCommand("placesCmd_copy");
   updatePlacesCommand("placesCmd_paste");
   updatePlacesCommand("placesCmd_delete");
 }
 
-function doGetPlacesControllerForCommand(aCommand)
-{
+function doGetPlacesControllerForCommand(aCommand) {
   // A context menu may be built for non-focusable views.  Thus, we first try
   // to look for a view associated with document.popupNode
   let popupNode;
   try {
     popupNode = document.popupNode;
   } catch (e) {
     // The document went away (bug 797307).
     return null;
@@ -1740,14 +1710,13 @@ function doGetPlacesControllerForCommand
   let controller = top.document.commandDispatcher
                       .getControllerForCommand(aCommand);
   if (controller)
     return controller;
 
   return null;
 }
 
-function goDoPlacesCommand(aCommand)
-{
+function goDoPlacesCommand(aCommand) {
   let controller = doGetPlacesControllerForCommand(aCommand);
   if (controller && controller.isCommandEnabled(aCommand))
     controller.doCommand(aCommand);
 }
--- a/browser/components/places/content/editBookmarkOverlay.js
+++ b/browser/components/places/content/editBookmarkOverlay.js
@@ -573,18 +573,17 @@ var gEditItemOverlay = {
       return;
 
     // Here we update either the item title or its cached static title
     let newTitle = this._namePicker.value;
     if (!newTitle &&
         PlacesUtils.bookmarks.getFolderIdForItem(this._paneInfo.itemId) == PlacesUtils.tagsFolderId) {
       // We don't allow setting an empty title for a tag, restore the old one.
       this._initNamePicker();
-    }
-    else {
+    } else {
       this._mayUpdateFirstEditField("namePicker");
       if (!PlacesUIUtils.useAsyncTransactions) {
         let txn = new PlacesEditItemTitleTransaction(this._paneInfo.itemId,
                                                      newTitle);
         PlacesUtils.transactionManager.doTransaction(txn);
         return;
       }
       Task.spawn(function* () {
@@ -620,18 +619,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) {
@@ -690,18 +688,17 @@ var gEditItemOverlay = {
     var folderTreeRow = this._element("folderTreeRow");
     if (!folderTreeRow.collapsed) {
       expander.className = "expander-down";
       expander.setAttribute("tooltiptext",
                             expander.getAttribute("tooltiptextdown"));
       folderTreeRow.collapsed = true;
       this._element("chooseFolderSeparator").hidden =
         this._element("chooseFolderMenuItem").hidden = false;
-    }
-    else {
+    } else {
       expander.className = "expander-up"
       expander.setAttribute("tooltiptext",
                             expander.getAttribute("tooltiptextup"));
       folderTreeRow.collapsed = false;
 
       // XXXmano: Ideally we would only do this once, but for some odd reason,
       // the editable mode set on this tree, together with its collapsed state
       // breaks the view.
@@ -769,18 +766,17 @@ var gEditItemOverlay = {
     if (PlacesUtils.bookmarks.getFolderIdForItem(this._paneInfo.itemId) != containerId &&
         this._paneInfo.itemId != containerId) {
       if (PlacesUIUtils.useAsyncTransactions) {
         Task.spawn(function* () {
           let newParentGuid = yield PlacesUtils.promiseItemGuid(containerId);
           let guid = this._paneInfo.itemGuid;
           yield PlacesTransactions.Move({ guid, newParentGuid }).transact();
         }.bind(this));
-      }
-      else {
+      } else {
         let txn = new PlacesMoveItemTransaction(this._paneInfo.itemId,
                                                 containerId,
                                                 PlacesUtils.bookmarks.DEFAULT_INDEX);
         PlacesUtils.transactionManager.doTransaction(txn);
       }
 
       // Mark the containing folder as recently-used if it isn't in the
       // static list
@@ -936,18 +932,17 @@ var gEditItemOverlay = {
       expander.className = "expander-up";
       expander.setAttribute("tooltiptext",
                             expander.getAttribute("tooltiptextup"));
       tagsSelectorRow.collapsed = false;
       yield this._rebuildTagsSelectorList();
 
       // This is a no-op if we've added the listener.
       tagsSelector.addEventListener("CheckboxStateChange", this, false);
-    }
-    else {
+    } else {
       expander.className = "expander-down";
       expander.setAttribute("tooltiptext",
                             expander.getAttribute("tooltiptextdown"));
       tagsSelectorRow.collapsed = true;
     }
   }),
 
   /**
@@ -973,18 +968,17 @@ var gEditItemOverlay = {
     }
 
     // XXXmano: add a separate "New Folder" string at some point...
     let title = this._element("newFolderButton").label;
     if (PlacesUIUtils.useAsyncTransactions) {
       let parentGuid = yield ip.promiseGuid();
       yield PlacesTransactions.NewFolder({ parentGuid, title, index: ip.index })
                               .transact().catch(Components.utils.reportError);
-    }
-    else {
+    } else {
       let txn = new PlacesCreateFolderTransaction(title, ip.itemId, ip.index);
       PlacesUtils.transactionManager.doTransaction(txn);
     }
 
     this._folderTree.focus();
     this._folderTree.selectItems([ip.itemId]);
     PlacesUtils.asContainer(this._folderTree.selectedNode).containerOpen = true;
     this._folderTree.selectItems([this._lastNewItem]);
@@ -1002,18 +996,17 @@ var gEditItemOverlay = {
 
       let curTagIndex = tags.indexOf(tagCheckbox.label);
       let tagsSelector = this._element("tagsSelector");
       tagsSelector.selectedItem = tagCheckbox;
 
       if (tagCheckbox.checked) {
         if (curTagIndex == -1)
           tags.push(tagCheckbox.label);
-      }
-      else if (curTagIndex != -1) {
+      } else if (curTagIndex != -1) {
         tags.splice(curTagIndex, 1);
       }
       this._element("tagsField").value = tags.join(", ");
       this._updateTags();
       break;
     case "unload":
       this.uninitPanel(false);
       break;
@@ -1033,30 +1026,27 @@ var gEditItemOverlay = {
   }),
 
   _onTagsChange(aItemId) {
     let paneInfo = this._paneInfo;
     let updateTagsField = false;
     if (paneInfo.isURI) {
       if (paneInfo.isBookmark && aItemId == paneInfo.itemId) {
         updateTagsField = true;
-      }
-      else if (!paneInfo.isBookmark) {
+      } else if (!paneInfo.isBookmark) {
         let changedURI = PlacesUtils.bookmarks.getBookmarkURI(aItemId);
         updateTagsField = changedURI.equals(paneInfo.uri);
       }
-    }
-    else if (paneInfo.bulkTagging) {
+    } else if (paneInfo.bulkTagging) {
       let changedURI = PlacesUtils.bookmarks.getBookmarkURI(aItemId);
       if (paneInfo.uris.some(uri => uri.equals(changedURI))) {
         updateTagsField = true;
         delete this._paneInfo._cachedCommonTags;
       }
-    }
-    else {
+    } else {
       throw new Error("_onTagsChange called unexpectedly");
     }
 
     if (updateTagsField)
       this._initTagsField().catch(Components.utils.reportError);
 
     // Any tags change should be reflected in the tags selector.
     if (this._element("tagsSelector"))
@@ -1064,18 +1054,17 @@ var gEditItemOverlay = {
   },
 
   _onItemTitleChange(aItemId, aNewTitle) {
     if (!this._paneInfo.isBookmark)
       return;
     if (aItemId == this._paneInfo.itemId) {
       this._paneInfo.title = aNewTitle;
       this._initTextField(this._namePicker, aNewTitle);
-    }
-    else if (this._paneInfo.visibleRows.has("folderRow")) {
+    } else if (this._paneInfo.visibleRows.has("folderRow")) {
       // If the title of a folder which is listed within the folders
       // menulist has been changed, we need to update the label of its
       // representing element.
       let menupopup = this._folderMenuList.menupopup;
       for (menuitem of menupopup.childNodes) {
         if ("folderId" in menuitem && menuitem.folderId == aItemId) {
           menuitem.label = aNewTitle;
           break;
@@ -1084,22 +1073,20 @@ var gEditItemOverlay = {
     }
   },
 
   // nsINavBookmarkObserver
   onItemChanged(aItemId, aProperty, aIsAnnotationProperty, aValue,
                 aLastModified, aItemType) {
     if (aProperty == "tags" && this._paneInfo.visibleRows.has("tagsRow")) {
       this._onTagsChange(aItemId);
-    }
-    else if (aProperty == "title" && this._paneInfo.isItem) {
+    } else if (aProperty == "title" && this._paneInfo.isItem) {
       // This also updates titles of folders in the folder menu list.
       this._onItemTitleChange(aItemId, aValue);
-    }
-    else if (!this._paneInfo.isItem || this._paneInfo.itemId != aItemId) {
+    } else if (!this._paneInfo.isItem || this._paneInfo.itemId != aItemId) {
       return;
     }
 
     switch (aProperty) {
     case "uri":
       let newURI = NetUtil.newURI(aValue);
       if (!newURI.equals(this._paneInfo.uri)) {
         this._paneInfo.uri = newURI;
--- a/browser/components/places/content/history-panel.js
+++ b/browser/components/places/content/history-panel.js
@@ -5,18 +5,17 @@
 
 Components.utils.import("resource://gre/modules/TelemetryStopwatch.jsm");
 
 var gHistoryTree;
 var gSearchBox;
 var gHistoryGrouping = "";
 var gSearching = false;
 
-function HistorySidebarInit()
-{
+function HistorySidebarInit() {
   gHistoryTree = document.getElementById("historyTree");
   gSearchBox = document.getElementById("search-box");
 
   gHistoryGrouping = document.getElementById("viewButton").
                               getAttribute("selectedsort");
 
   if (gHistoryGrouping == "site")
     document.getElementById("bysite").setAttribute("checked", "true");
@@ -27,24 +26,22 @@ function HistorySidebarInit()
   else if (gHistoryGrouping == "dayandsite")
     document.getElementById("bydayandsite").setAttribute("checked", "true");
   else
     document.getElementById("byday").setAttribute("checked", "true");
 
   searchHistory("");
 }
 
-function GroupBy(groupingType)
-{
+function GroupBy(groupingType) {
   gHistoryGrouping = groupingType;
   searchHistory(gSearchBox.value);
 }
 
-function searchHistory(aInput)
-{
+function searchHistory(aInput) {
   var query = PlacesUtils.history.getNewQuery();
   var options = PlacesUtils.history.getNewQueryOptions();
 
   const NHQO = Ci.nsINavHistoryQueryOptions;
   var sortingMode;
   var resultType;
 
   switch (gHistoryGrouping) {
--- a/browser/components/places/content/menu.xml
+++ b/browser/components/places/content/menu.xml
@@ -115,29 +115,27 @@
                 // If mouse is in the top part of the element, drop above folder.
                 dropPoint.ip = new InsertionPoint(
                                     PlacesUtils.getConcreteItemId(resultNode),
                                     -1,
                                     Ci.nsITreeView.DROP_BEFORE,
                                     tagName,
                                     elt._placesNode.itemId);
                 return dropPoint;
-              }
-              else if (eventY - eltY < eltHeight * 0.80) {
+              } else if (eventY - eltY < eltHeight * 0.80) {
                 // If mouse is in the middle of the element, drop inside folder.
                 dropPoint.ip = new InsertionPoint(
                                     PlacesUtils.getConcreteItemId(elt._placesNode),
                                     -1,
                                     Ci.nsITreeView.DROP_ON,
                                     tagName);
                 dropPoint.folderElt = elt;
                 return dropPoint;
               }
-            }
-            else if (eventY - eltY <= eltHeight / 2) {
+            } else if (eventY - eltY <= eltHeight / 2) {
               // This is a non-folder node or a readonly folder.
               // If the mouse is above the middle, drop above this item.
               dropPoint.ip = new InsertionPoint(
                                   PlacesUtils.getConcreteItemId(resultNode),
                                   -1,
                                   Ci.nsITreeView.DROP_BEFORE,
                                   tagName,
                                   elt._placesNode.itemId);
@@ -210,36 +208,32 @@
         notify: function OF__notify(aTimer) {
           // Function to process all timer notifications.
 
           if (aTimer == this._folder.openTimer) {
             // Timer to open a submenu that's being dragged over.
             this._folder.elt.lastChild.setAttribute("autoopened", "true");
             this._folder.elt.lastChild.showPopup(this._folder.elt);
             this._folder.openTimer = null;
-          }
-
-          else if (aTimer == this._folder.closeTimer) {
+          } else if (aTimer == this._folder.closeTimer) {
             // Timer to close a submenu that's been dragged off of.
             // Only close the submenu if the mouse isn't being dragged over any
             // of its child menus.
             var draggingOverChild = PlacesControllerDragHelper
                                     .draggingOverChildNode(this._folder.elt);
             if (draggingOverChild)
               this._folder.elt = null;
             this.clear();
 
             // Close any parent folders which aren't being dragged over.
             // (This is necessary because of the above code that keeps a folder
             // open while its children are being dragged over.)
             if (!draggingOverChild)
               this.closeParentMenus();
-          }
-
-          else if (aTimer == this.closeMenuTimer) {
+          } else if (aTimer == this.closeMenuTimer) {
             // Timer to close this menu after the drag exit.
             var popup = this._self;
             // if we are no more dragging we can leave the menu open to allow
             // for better D&D bookmark organization
             if (PlacesControllerDragHelper.getSession() &&
                 !PlacesControllerDragHelper.draggingOverChildNode(popup.parentNode)) {
               popup.hidePopup();
               // Close any parent menus that aren't being dragged over;
@@ -403,18 +397,17 @@
           if (!this._overFolder.elt) {
             this._overFolder.elt = dropPoint.folderElt;
             // Create the timer to open this folder.
             this._overFolder.openTimer = this._overFolder
                                              .setTimer(this._overFolder.hoverTime);
           }
           // Since we are dropping into a folder set the corresponding style.
           dropPoint.folderElt.setAttribute("_moz-menuactive", true);
-        }
-        else {
+        } else {
           // We are not dragging over a folder.
           // Clear out old _overFolder information.
           this._overFolder.clear();
         }
 
         // Autoscroll the popup strip if we drag over the scroll buttons.
         let anonid = event.originalTarget.getAttribute('anonid');
         let scrollDir = 0;
@@ -440,18 +433,17 @@
         let newMarginTop = 0;
         if (scrollDir == 0) {
           let elt = this.firstChild;
           while (elt && event.screenY > elt.boxObject.screenY +
                                         elt.boxObject.height / 2)
             elt = elt.nextSibling;
           newMarginTop = elt ? elt.boxObject.screenY - sbo.screenY :
                                sbo.height;
-        }
-        else if (scrollDir == 1)
+        } else if (scrollDir == 1)
           newMarginTop = sbo.height;
 
         // Set the new marginTop based on arrowscrollbox.
         newMarginTop += sbo.y - this._scrollBox.boxObject.y;
         this._indicatorBar.firstChild.style.marginTop = newMarginTop + "px";
         this._indicatorBar.hidden = false;
 
         event.preventDefault();
@@ -551,37 +543,34 @@
             arrowbox.style.transform = "translate(0, " + -offset + "px)";
 
             // The assigned side stays the same regardless of direction.
             var isRTL = (window.getComputedStyle(this).direction == "rtl");
 
             if (position.indexOf("start_") == 0) {
               container.dir = "reverse";
               this.setAttribute("side", isRTL ? "left" : "right");
-            }
-            else {
+            } else {
               container.dir = "";
               this.setAttribute("side", isRTL ? "right" : "left");
             }
-          }
-          else if (position.indexOf("before_") == 0 || position.indexOf("after_") == 0) {
+          } else if (position.indexOf("before_") == 0 || position.indexOf("after_") == 0) {
             container.orient = "";
             arrowbox.orient = "";
             if (position.indexOf("_end") > 0) {
               arrowbox.pack = "end";
             } else {
               arrowbox.pack = "start";
             }
             arrowbox.style.transform = "translate(" + -offset + "px, 0)";
 
             if (position.indexOf("before_") == 0) {
               container.dir = "reverse";
               this.setAttribute("side", "bottom");
-            }
-            else {
+            } else {
               container.dir = "";
               this.setAttribute("side", "top");
             }
           }
 
           arrow.hidden = false;
         ]]></body>
       </method>
--- a/browser/components/places/content/places.js
+++ b/browser/components/places/content/places.js
@@ -277,21 +277,19 @@ var PlacesOrganizer = {
    *          the node to set up scope from
    */
   _setSearchScopeForNode: function PO__setScopeForNode(aNode) {
     let itemId = aNode.itemId;
 
     if (PlacesUtils.nodeIsHistoryContainer(aNode) ||
         itemId == PlacesUIUtils.leftPaneQueries["History"]) {
       PlacesQueryBuilder.setScope("history");
-    }
-    else if (itemId == PlacesUIUtils.leftPaneQueries["Downloads"]) {
+    } else if (itemId == PlacesUIUtils.leftPaneQueries["Downloads"]) {
       PlacesQueryBuilder.setScope("downloads");
-    }
-    else {
+    } else {
       // Default to All Bookmarks for all other nodes, per bug 469437.
       PlacesQueryBuilder.setScope("bookmarks");
     }
   },
 
   /**
    * Handle clicks on the places list.
    * Single Left click, right click or modified click do not result in any
@@ -329,18 +327,17 @@ var PlacesOrganizer = {
       this._fillDetailsPane(selectedNodes);
     }
   },
 
   openFlatContainer: function PO_openFlatContainerFlatContainer(aContainer) {
     if (aContainer.itemId != -1) {
       PlacesUtils.asContainer(this._places.selectedNode).containerOpen = true;
       this._places.selectItems([aContainer.itemId], false);
-    }
-    else if (PlacesUtils.nodeIsQuery(aContainer)) {
+    } else if (PlacesUtils.nodeIsQuery(aContainer)) {
       this._places.selectPlaceURI(aContainer.uri);
     }
   },
 
   /**
    * Returns the options associated with the query currently loaded in the
    * main places pane.
    */
@@ -497,17 +494,17 @@ var PlacesOrganizer = {
   },
 
   /**
    * Restores bookmarks from a JSON file.
    */
   restoreBookmarksFromFile: function PO_restoreBookmarksFromFile(aFilePath) {
     // check file extension
     if (!aFilePath.toLowerCase().endsWith("json") &&
-        !aFilePath.toLowerCase().endsWith("jsonlz4"))  {
+        !aFilePath.toLowerCase().endsWith("jsonlz4")) {
       this._showErrorAlert(PlacesUIUtils.getString("bookmarksRestoreFormatError"));
       return;
     }
 
     // confirm ok to delete existing bookmarks
     var prompts = Cc["@mozilla.org/embedcomp/prompt-service;1"].
                   getService(Ci.nsIPromptService);
     if (!prompts.confirm(null,
@@ -579,18 +576,17 @@ var PlacesOrganizer = {
       return;
     }
     if (aNode.itemId != -1 &&
         PlacesUtils.nodeIsFolder(aNode) && !aNode._feedURI) {
       if (infoBox.getAttribute("minimal") == "true")
         infoBox.setAttribute("wasminimal", "true");
       infoBox.removeAttribute("minimal");
       infoBoxExpanderWrapper.hidden = true;
-    }
-    else {
+    } else {
       if (infoBox.getAttribute("wasminimal") == "true")
         infoBox.setAttribute("minimal", "true");
       infoBox.removeAttribute("wasminimal");
       infoBoxExpanderWrapper.hidden =
         this._additionalInfoFields.every(id =>
           document.getElementById(id).collapsed);
     }
     additionalInfoBroadcaster.hidden = infoBox.getAttribute("minimal") == "true";
@@ -643,57 +639,53 @@ var PlacesOrganizer = {
 
     if (selectedNode && !PlacesUtils.nodeIsSeparator(selectedNode)) {
       detailsDeck.selectedIndex = 1;
 
       gEditItemOverlay.initPanel({ node: selectedNode
                                  , hiddenRows: ["folderPicker"] });
 
       this._detectAndSetDetailsPaneMinimalState(selectedNode);
-    }
-    else if (!selectedNode && aNodeList[0]) {
+    } else if (!selectedNode && aNodeList[0]) {
       if (aNodeList.every(PlacesUtils.nodeIsURI)) {
         let uris = aNodeList.map(node => PlacesUtils._uri(node.uri));
         detailsDeck.selectedIndex = 1;
         gEditItemOverlay.initPanel({ uris
                                    , hiddenRows: ["folderPicker",
                                                   "loadInSidebar",
                                                   "location",
                                                   "keyword",
                                                   "description",
                                                   "name"]});
         this._detectAndSetDetailsPaneMinimalState(selectedNode);
-      }
-      else {
+      } else {
         detailsDeck.selectedIndex = 0;
         let selectItemDesc = document.getElementById("selectItemDescription");
         let itemsCountLabel = document.getElementById("itemsCountText");
         selectItemDesc.hidden = false;
         itemsCountLabel.value =
           PlacesUIUtils.getPluralString("detailsPane.itemsCountLabel",
                                         aNodeList.length, [aNodeList.length]);
         infoBox.hidden = true;
       }
-    }
-    else {
+    } else {
       detailsDeck.selectedIndex = 0;
       infoBox.hidden = true;
       let selectItemDesc = document.getElementById("selectItemDescription");
       let itemsCountLabel = document.getElementById("itemsCountText");
       let itemsCount = 0;
       if (ContentArea.currentView.result) {
         let rootNode = ContentArea.currentView.result.root;
         if (rootNode.containerOpen)
           itemsCount = rootNode.childCount;
       }
       if (itemsCount == 0) {
         selectItemDesc.hidden = true;
         itemsCountLabel.value = PlacesUIUtils.getString("detailsPane.noItems");
-      }
-      else {
+      } else {
         selectItemDesc.hidden = false;
         itemsCountLabel.value =
           PlacesUIUtils.getPluralString("detailsPane.itemsCountLabel",
                                         itemsCount, [itemsCount]);
       }
     }
   },
 
@@ -726,18 +718,17 @@ var PlacesOrganizer = {
     var additionalInfoBroadcaster = document.getElementById("additionalInfoBroadcaster");
 
     if (infoBox.getAttribute("minimal") == "true") {
       infoBox.removeAttribute("minimal");
       infoBoxExpanderLabel.value = infoBoxExpanderLabel.getAttribute("lesslabel");
       infoBoxExpanderLabel.accessKey = infoBoxExpanderLabel.getAttribute("lessaccesskey");
       infoBoxExpander.className = "expander-up";
       additionalInfoBroadcaster.removeAttribute("hidden");
-    }
-    else {
+    } else {
       infoBox.setAttribute("minimal", "true");
       infoBoxExpanderLabel.value = infoBoxExpanderLabel.getAttribute("morelabel");
       infoBoxExpanderLabel.accessKey = infoBoxExpanderLabel.getAttribute("moreaccesskey");
       infoBoxExpander.className = "expander-down";
       additionalInfoBroadcaster.setAttribute("hidden", "true");
     }
   },
 };
@@ -803,18 +794,17 @@ var PlacesSearchBox = {
           let query = PlacesUtils.history.getNewQuery();
           query.searchTerms = filterString;
           let options = currentOptions.clone();
           // Make sure we're getting uri results.
           options.resultType = currentOptions.RESULTS_AS_URI;
           options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY;
           options.includeHidden = true;
           currentView.load([query], options);
-        }
-        else {
+        } else {
           TelemetryStopwatch.start(HISTORY_LIBRARY_SEARCH_TELEMETRY);
           currentView.applyFilter(filterString, null, true);
           TelemetryStopwatch.finish(HISTORY_LIBRARY_SEARCH_TELEMETRY);
         }
         break;
       }
       case "downloads": {
         if (currentView == ContentTree.view) {
@@ -822,18 +812,17 @@ var PlacesSearchBox = {
           query.searchTerms = filterString;
           query.setTransitions([Ci.nsINavHistoryService.TRANSITION_DOWNLOAD], 1);
           let options = currentOptions.clone();
           // Make sure we're getting uri results.
           options.resultType = currentOptions.RESULTS_AS_URI;
           options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY;
           options.includeHidden = true;
           currentView.load([query], options);
-        }
-        else {
+        } else {
           // The new downloads view doesn't use places for searching downloads.
           currentView.searchTerm = filterString;
         }
         break;
       }
       default:
         throw "Invalid filterCollection on search";
     }
@@ -1065,18 +1054,17 @@ var ViewMenu = {
       menuitem.setAttribute("label", label);
       if (type == "radio") {
         menuitem.setAttribute("type", "radio");
         menuitem.setAttribute("name", "columns");
         // This column is the sort key. Its item is checked.
         if (column.getAttribute("sortDirection") != "") {
           menuitem.setAttribute("checked", "true");
         }
-      }
-      else if (type == "checkbox") {
+      } else if (type == "checkbox") {
         menuitem.setAttribute("type", "checkbox");
         // Cannot uncheck the primary column.
         if (column.getAttribute("primary") == "true")
           menuitem.setAttribute("disabled", "true");
         // Items for visible columns are checked.
         if (!column.hidden)
           menuitem.setAttribute("checked", "true");
       }
@@ -1099,23 +1087,21 @@ var ViewMenu = {
     var viewSortDescending = document.getElementById("viewSortDescending");
     // We need to remove an existing checked attribute because the unsorted
     // menu item is not rebuilt every time we open the menu like the others.
     var viewUnsorted = document.getElementById("viewUnsorted");
     if (!sortColumn) {
       viewSortAscending.removeAttribute("checked");
       viewSortDescending.removeAttribute("checked");
       viewUnsorted.setAttribute("checked", "true");
-    }
-    else if (sortColumn.getAttribute("sortDirection") == "ascending") {
+    } else if (sortColumn.getAttribute("sortDirection") == "ascending") {
       viewSortAscending.setAttribute("checked", "true");
       viewSortDescending.removeAttribute("checked");
       viewUnsorted.removeAttribute("checked");
-    }
-    else if (sortColumn.getAttribute("sortDirection") == "descending") {
+    } else if (sortColumn.getAttribute("sortDirection") == "descending") {
       viewSortDescending.setAttribute("checked", "true");
       viewSortAscending.removeAttribute("checked");
       viewUnsorted.removeAttribute("checked");
     }
   },
 
   /**
    * Shows/Hides a tree column.
@@ -1128,18 +1114,17 @@ var ViewMenu = {
     var splitter = column.nextSibling;
     if (splitter && splitter.localName != "splitter")
       splitter = null;
 
     if (element.getAttribute("checked") == "true") {
       column.setAttribute("hidden", "false");
       if (splitter)
         splitter.removeAttribute("hidden");
-    }
-    else {
+    } else {
       column.setAttribute("hidden", "true");
       if (splitter)
         splitter.setAttribute("hidden", "true");
     }
   },
 
   /**
    * Gets the last column that was sorted.
@@ -1178,18 +1163,17 @@ var ViewMenu = {
     var columnId;
     if (aColumn) {
       columnId = aColumn.getAttribute("anonid");
       if (!aDirection) {
         let sortColumn = this._getSortColumn();
         if (sortColumn)
           aDirection = sortColumn.getAttribute("sortDirection");
       }
-    }
-    else {
+    } else {
       let sortColumn = this._getSortColumn();
       columnId = sortColumn ? sortColumn.getAttribute("anonid") : "title";
     }
 
     // This maps the possible values of columnId (i.e., anonid's of treecols in
     // placeContent) to the default sortingMode and sortingAnnotation values for
     // each column.
     //   key:  Sort key in the name of one of the
@@ -1249,18 +1233,17 @@ var ContentArea = {
       if (this._specialViews.has(aQueryString)) {
         let { view, options } = this._specialViews.get(aQueryString);
         if (typeof view == "function") {
           view = view();
           this._specialViews.set(aQueryString, { view, 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.
@@ -1327,18 +1310,17 @@ var ContentArea = {
 
     // toolbarSet.
     for (let elt of this._toolbar.childNodes) {
       // On Windows and Linux the menu buttons are menus wrapped in a menubar.
       if (elt.id == "placesMenu") {
         for (let menuElt of elt.childNodes) {
           menuElt.hidden = !options.toolbarSet.includes(menuElt.id);
         }
-      }
-      else {
+      } else {
         elt.hidden = !options.toolbarSet.includes(elt.id);
       }
     }
   },
 
   /**
    * Options for the current view.
    *
@@ -1385,18 +1367,17 @@ var ContentTree = {
   onClick: function CT_onClick(aEvent) {
     let node = this.view.selectedNode;
     if (node) {
       let doubleClick = aEvent.button == 0 && aEvent.detail == 2;
       let middleClick = aEvent.button == 1 && aEvent.detail == 1;
       if (PlacesUtils.nodeIsURI(node) && (doubleClick || middleClick)) {
         // Open associated uri in the browser.
         this.openSelectedNode(aEvent);
-      }
-      else if (middleClick && PlacesUtils.nodeIsContainer(node)) {
+      } else if (middleClick && PlacesUtils.nodeIsContainer(node)) {
         // The command execution function will take care of seeing if the
         // selection is a folder or a different container type, and will
         // load its contents in tabs.
         PlacesUIUtils.openContainerNodeInTabs(node, aEvent, this.view);
       }
     }
   },
 
--- a/browser/components/places/content/sidebarUtils.js
+++ b/browser/components/places/content/sidebarUtils.js
@@ -38,23 +38,21 @@ var SidebarUtils = {
     var openInTabs = isContainer &&
                      (aEvent.button == 1 ||
                       (aEvent.button == 0 && modifKey)) &&
                      PlacesUtils.hasChildURIs(tbo.view.nodeForTreeIndex(cell.row));
 
     if (aEvent.button == 0 && isContainer && !openInTabs) {
       tbo.view.toggleOpenState(cell.row);
       return;
-    }
-    else if (!mouseInGutter && openInTabs &&
+    } else if (!mouseInGutter && openInTabs &&
             aEvent.originalTarget.localName == "treechildren") {
       tbo.view.selection.select(cell.row);
       PlacesUIUtils.openContainerNodeInTabs(aTree.selectedNode, aEvent, aTree);
-    }
-    else if (!mouseInGutter && !isContainer &&
+    } else if (!mouseInGutter && !isContainer &&
              aEvent.originalTarget.localName == "treechildren") {
       // Clear all other selection since we're loading a link now. We must
       // do this *before* attempting to load the link since openURL uses
       // selection as an indication of which link to load.
       tbo.view.selection.select(cell.row);
       PlacesUIUtils.openNodeWithEvent(aTree.selectedNode, aEvent, aTree);
     }
   },
@@ -85,18 +83,17 @@ var SidebarUtils = {
     // To avoid showing a URL from a previously hovered node for a currently
     // hovered non-url node, we must clear the moused-over URL in these cases.
     if (cell.row != -1) {
       var node = tree.view.nodeForTreeIndex(cell.row);
       if (PlacesUtils.nodeIsURI(node))
         this.setMouseoverURL(node.uri);
       else
         this.setMouseoverURL("");
-    }
-    else
+    } else
       this.setMouseoverURL("");
   },
 
   setMouseoverURL: function SU_setMouseoverURL(aURL) {
     // When the browser window is closed with an open sidebar, the sidebar
     // unload event happens after the browser's one.  In this case
     // top.XULBrowserWindow has been nullified already.
     if (top.XULBrowserWindow) {
--- a/browser/components/places/content/tree.xml
+++ b/browser/components/places/content/tree.xml
@@ -41,18 +41,17 @@
                 readonly="true"
                 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>
 
@@ -257,18 +256,17 @@
         ]]></body>
       </method>
 
       <!-- nsIPlacesView -->
       <property name="result">
         <getter><![CDATA[
           try {
             return this.view.QueryInterface(Ci.nsINavHistoryResultObserver).result;
-          }
-          catch (e) {
+          } catch (e) {
             return null;
           }
         ]]></getter>
       </property>
 
       <!-- nsIPlacesView -->
       <property name="place">
         <getter><![CDATA[
@@ -476,27 +474,25 @@
           // the view is populated from (i.e. the result's itemId).
           if (index != -1) {
             var lastSelected = resultview.nodeForTreeIndex(index);
             if (resultview.isContainer(index) && orientation == Ci.nsITreeView.DROP_ON) {
               // If the last selected item is an open container, append _into_
               // it, rather than insert adjacent to it.
               container = lastSelected;
               index = -1;
-            }
-            else if (lastSelected.containerOpen &&
-                     orientation == Ci.nsITreeView.DROP_AFTER &&
-                     lastSelected.hasChildren) {
+            } else if (lastSelected.containerOpen &&
+                       orientation == Ci.nsITreeView.DROP_AFTER &&
+                       lastSelected.hasChildren) {
              // If the last selected item is an open container and the user is
              // trying to drag into it as a first item, really insert into it.
              container = lastSelected;
              orientation = Ci.nsITreeView.DROP_ON;
              index = 0;
-            }
-            else {
+            } else {
               // Use the last-selected node's container.
               container = lastSelected.parent;
 
               // See comment in the treeView.js's copy of this method
               if (!container || !container.containerOpen)
                 return null;
 
               // Avoid the potentially expensive call to getChildIndex
@@ -504,27 +500,25 @@
               if (PlacesControllerDragHelper.disallowInsertion(container))
                 return null;
 
               var queryOptions = PlacesUtils.asQuery(result.root).queryOptions;
               if (queryOptions.sortingMode !=
                     Ci.nsINavHistoryQueryOptions.SORT_BY_NONE) {
                 // If we are within a sorted view, insert at the end
                 index = -1;
-              }
-              else if (queryOptions.excludeItems ||
-                       queryOptions.excludeQueries ||
-                       queryOptions.excludeReadOnlyFolders) {
+              } else if (queryOptions.excludeItems ||
+                         queryOptions.excludeQueries ||
+                         queryOptions.excludeReadOnlyFolders) {
                 // Some item may be invisible, insert near last selected one.
                 // We don't replace index here to avoid requests to the db,
                 // instead it will be calculated later by the controller.
                 index = -1;
                 dropNearItemId = lastSelected.itemId;
-              }
-              else {
+              } else {
                 var lsi = container.getChildIndex(lastSelected);
                 index = orientation == Ci.nsITreeView.DROP_BEFORE ? lsi : lsi + 1;
               }
             }
           }
 
           if (PlacesControllerDragHelper.disallowInsertion(container))
             return null;
@@ -618,18 +612,17 @@
               return foundOne;
 
             checkedGuidsSet.add(concreteGuid);
 
             // Remember the beginning state so that we can re-close
             // this node if we don't find any additional results here.
             var previousOpenness = node.containerOpen;
             node.containerOpen = true;
-            for (var child = 0;  child < node.childCount && ids.length > 0;
-                 child++) {
+            for (var child = 0; child < node.childCount && ids.length > 0; child++) {
               var childNode = node.getChild(child);
               var found = findNodes(childNode);
               if (!foundOne)
                 foundOne = found;
             }
 
             // If we didn't find any additional matches in this node's
             // subtree, revert the node to its previous openness.
@@ -641,18 +634,17 @@
 
           // Disable notifications while looking for nodes.
           let result = this.result;
           let didSuppressNotifications = result.suppressNotifications;
           if (!didSuppressNotifications)
             result.suppressNotifications = true
           try {
             findNodes(this.result.root);
-          }
-          finally {
+          } finally {
             if (!didSuppressNotifications)
               result.suppressNotifications = false;
           }
 
           // For all the nodes we've found, highlight the corresponding
           // index in the tree.
           var resultview = this.view;
           var selection = this.view.selection;
@@ -765,24 +757,22 @@
         let eventY = event.clientY - tbo.treeBody.boxObject.y -
                      rowHeight * (cell.row - tbo.getFirstVisibleRow());
 
         let orientation = Ci.nsITreeView.DROP_BEFORE;
 
         if (cell.row == -1) {
           // If the row is not valid we try to insert inside the resultNode.
           orientation = Ci.nsITreeView.DROP_ON;
-        }
-        else if (PlacesUtils.nodeIsContainer(node) &&
+        } else if (PlacesUtils.nodeIsContainer(node) &&
                  eventY > rowHeight * 0.75) {
           // If we are below the 75% of a container the treeview we try
           // to drop after the node.
           orientation = Ci.nsITreeView.DROP_AFTER;
-        }
-        else if (PlacesUtils.nodeIsContainer(node) &&
+        } else if (PlacesUtils.nodeIsContainer(node) &&
                  eventY > rowHeight * 0.25) {
           // If we are below the 25% of a container the treeview we try
           // to drop inside the node.
           orientation = Ci.nsITreeView.DROP_ON;
         }
 
         if (!this.view.canDrop(cell.row, orientation, event.dataTransfer))
           return;
--- a/browser/components/places/content/treeView.js
+++ b/browser/components/places/content/treeView.js
@@ -52,18 +52,17 @@ PlacesTreeView.prototype = {
     let selection = this.selection;
     if (selection)
       selection.selectEventsSuppressed = true;
 
     if (!this._rootNode.containerOpen) {
       // This triggers containerStateChanged which then builds the visible
       // section.
       this._rootNode.containerOpen = true;
-    }
-    else
+    } else
       this.invalidateContainer(this._rootNode);
 
     // "Activate" the sorting column and update commands.
     this.sortingChanged(this._result.sortingMode);
 
     if (selection)
       selection.selectEventsSuppressed = false;
   },
@@ -166,23 +165,21 @@ PlacesTreeView.prototype = {
 
       return this._rows.indexOf(aNode, aParentRow);
     }
 
     let row = -1;
     let useNodeIndex = typeof(aNodeIndex) == "number";
     if (parent == this._rootNode) {
       row = useNodeIndex ? aNodeIndex : this._rootNode.getChildIndex(aNode);
-    }
-    else if (useNodeIndex && typeof(aParentRow) == "number") {
+    } else if (useNodeIndex && typeof(aParentRow) == "number") {
       // If we have both the row of the parent node, and the node's index, we
       // can avoid searching the rows array if the parent is a plain container.
       row = aParentRow + aNodeIndex + 1;
-    }
-    else {
+    } else {
       // Look for the node in the nodes array.  Start the search at the parent
       // row.  If the parent row isn't passed, we'll pass undefined to indexOf,
       // which is fine.
       row = this._rows.indexOf(aNode, aParentRow);
       if (row == -1 && aForceBuild) {
         let parentRow = typeof(aParentRow) == "number" ? aParentRow
                                                        : this._getRowForNode(parent);
         row = parentRow + parent.getChildIndex(aNode) + 1;
@@ -258,18 +255,17 @@ PlacesTreeView.prototype = {
    *        The first row at which nodes may be inserted to the row array.
    *        In other words, that's aContainer's row + 1.
    * @param [out] aToOpen
    *        An array of containers to open once the build is done.
    *
    * @return the number of rows which were inserted.
    */
   _buildVisibleSection:
-  function PTV__buildVisibleSection(aContainer, aFirstChildRow, aToOpen)
-  {
+  function PTV__buildVisibleSection(aContainer, aFirstChildRow, aToOpen) {
     // There's nothing to do if the container is closed.
     if (!aContainer.containerOpen)
       return 0;
 
     // Inserting the new elements into the rows array in one shot (by
     // Array.prototype.concat) is faster than resizing the array (by splice) on each loop
     // iteration.
     let cc = aContainer.childCount;
@@ -624,18 +620,17 @@ PlacesTreeView.prototype = {
     let cc = aParentNode.childCount;
     if (aNewIndex == 0 || this._isPlainContainer(aParentNode) || cc == 0) {
       // We don't need to worry about sub hierarchies of the parent node
       // if it's a plain container, or if the new node is its first child.
       if (aParentNode == this._rootNode)
         row = aNewIndex;
       else
         row = parentRow + aNewIndex + 1;
-    }
-    else {
+    } else {
       // Here, we try to find the next visible element in the child list so we
       // can set the new visible index to be right before that.  Note that we
       // have to search down instead of up, because some siblings could have
       // children themselves that would be in the way.
       let separatorsAreHidden = PlacesUtils.nodeIsSeparator(aNode) &&
                                 this.isSorted();
       for (let i = aNewIndex + 1; i < cc; i++) {
         let node = aParentNode.getChild(i);
@@ -854,18 +849,17 @@ PlacesTreeView.prototype = {
     this._invalidateCellValue(aNode, this.COLUMN_TYPE_TAGS);
   },
 
   nodeKeywordChanged(aNode, aNewKeyword) {},
 
   nodeAnnotationChanged: function PTV_nodeAnnotationChanged(aNode, aAnno) {
     if (aAnno == PlacesUIUtils.DESCRIPTION_ANNO) {
       this._invalidateCellValue(aNode, this.COLUMN_TYPE_DESCRIPTION);
-    }
-    else if (aAnno == PlacesUtils.LMANNO_FEEDURI) {
+    } else if (aAnno == PlacesUtils.LMANNO_FEEDURI) {
       PlacesUtils.livemarks.getLivemark({ id: aNode.itemId })
         .then(aLivemark => {
           this._controller.cacheLivemarkInfo(aNode, aLivemark);
           let properties = this._cellProperties.get(aNode);
           this._cellProperties.set(aNode, properties += " livemark");
           // The livemark attribute is set as a cell property on the title cell.
           this._invalidateCellValue(aNode, this.COLUMN_TYPE_TITLE);
         }, Components.utils.reportError);
@@ -899,18 +893,17 @@ PlacesTreeView.prototype = {
             this._controller.cacheLivemarkInfo(aNode, aLivemark);
             if (aNewState == Components.interfaces.nsINavHistoryContainerResultNode.STATE_OPENED) {
               aLivemark.registerForUpdates(aNode, this);
               // Prioritize the current livemark.
               aLivemark.reload();
               PlacesUtils.livemarks.reloadLivemarks();
               if (shouldInvalidate)
                 this.invalidateContainer(aNode);
-            }
-            else {
+            } else {
               aLivemark.unregisterForUpdates(aNode);
             }
           }, () => undefined);
       }
     }
   },
 
   invalidateContainer: function PTV_invalidateContainer(aContainer) {
@@ -926,18 +919,17 @@ PlacesTreeView.prototype = {
       // If the root node is now closed, the tree is empty.
       if (!this._rootNode.containerOpen) {
         this._rows = [];
         if (replaceCount)
           this._tree.rowCountChanged(startReplacement, -replaceCount);
 
         return;
       }
-    }
-    else {
+    } else {
       // Update the twisty state.
       let row = this._getRowForNode(aContainer);
       this._tree.invalidateRow(row);
 
       // We don't replace the container node itself, so we should decrease the
       // replaceCount by 1.
       startReplacement = row + 1;
       replaceCount = this._countVisibleRowsForNodeAtRow(row) - 1;
@@ -1066,18 +1058,17 @@ PlacesTreeView.prototype = {
   },
 
   _inBatchMode: false,
   batching: function PTV__batching(aToggleMode) {
     if (this._inBatchMode != aToggleMode) {
       this._inBatchMode = this.selection.selectEventsSuppressed = aToggleMode;
       if (this._inBatchMode) {
         this._tree.beginUpdateBatch();
-      }
-      else {
+      } else {
         this._tree.endUpdateBatch();
       }
     }
   },
 
   get result() {
     return this._result;
   },
@@ -1087,18 +1078,17 @@ PlacesTreeView.prototype = {
       this._rootNode.containerOpen = false;
     }
 
     if (val) {
       this._result = val;
       this._rootNode = this._result.root;
       this._cellProperties = new Map();
       this._cuttingNodes = new Set();
-    }
-    else if (this._result) {
+    } else if (this._result) {
       delete this._result;
       delete this._rootNode;
       delete this._cellProperties;
       delete this._cuttingNodes;
     }
 
     // If the tree is not set yet, setTree will call finishInit.
     if (this._tree && val)
@@ -1113,18 +1103,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;
   },
@@ -1169,41 +1158,38 @@ PlacesTreeView.prototype = {
         if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_QUERY) {
           properties += " query";
           if (PlacesUtils.nodeIsTagQuery(node))
             properties += " tagContainer";
           else if (PlacesUtils.nodeIsDay(node))
             properties += " dayContainer";
           else if (PlacesUtils.nodeIsHost(node))
             properties += " hostContainer";
-        }
-        else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER ||
+        } else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER ||
                  nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT) {
           if (this._controller.hasCachedLivemarkInfo(node)) {
             properties += " livemark";
-          }
-          else {
+          } else {
             PlacesUtils.livemarks.getLivemark({ id: node.itemId })
               .then(aLivemark => {
                 this._controller.cacheLivemarkInfo(node, aLivemark);
                 let livemarkProps = this._cellProperties.get(node);
                 this._cellProperties.set(node, livemarkProps += " livemark");
                 // The livemark attribute is set as a cell property on the title cell.
                 this._invalidateCellValue(node, this.COLUMN_TYPE_TITLE);
               }, () => undefined);
           }
         }
 
         if (itemId != -1) {
           let queryName = PlacesUIUtils.getLeftPaneQueryNameFromId(itemId);
           if (queryName)
             properties += " OrganizerQuery_" + queryName;
         }
-      }
-      else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR)
+      } else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR)
         properties += " separator";
       else if (PlacesUtils.nodeIsURI(node)) {
         properties += " " + PlacesUIUtils.guessUrlSchemeForUI(node.uri);
 
         if (this._controller.hasCachedLivemarkInfo(node.parent)) {
           properties += " livemarkItem";
           if (node.accessCount) {
             properties += " visited";
@@ -1296,27 +1282,25 @@ PlacesTreeView.prototype = {
     // the view is populated from (i.e. the result's itemId).
     if (index != -1) {
       let lastSelected = this.nodeForTreeIndex(index);
       if (this.isContainer(index) && orientation == Ci.nsITreeView.DROP_ON) {
         // If the last selected item is an open container, append _into_
         // it, rather than insert adjacent to it.
         container = lastSelected;
         index = -1;
-      }
-      else if (lastSelected.containerOpen &&
+      } else if (lastSelected.containerOpen &&
                orientation == Ci.nsITreeView.DROP_AFTER &&
                lastSelected.hasChildren) {
         // If the last selected node is an open container and the user is
         // trying to drag into it as a first node, really insert into it.
         container = lastSelected;
         orientation = Ci.nsITreeView.DROP_ON;
         index = 0;
-      }
-      else {
+      } else {
         // Use the last-selected node's container.
         container = lastSelected.parent;
 
         // During its Drag & Drop operation, the tree code closes-and-opens
         // containers very often (part of the XUL "spring-loaded folders"
         // implementation).  And in certain cases, we may reach a closed
         // container here.  However, we can simply bail out when this happens,
         // because we would then be back here in less than a millisecond, when
@@ -1329,27 +1313,25 @@ PlacesTreeView.prototype = {
         if (PlacesControllerDragHelper.disallowInsertion(container))
           return null;
 
         let queryOptions = PlacesUtils.asQuery(this._result.root).queryOptions;
         if (queryOptions.sortingMode !=
               Ci.nsINavHistoryQueryOptions.SORT_BY_NONE) {
           // If we are within a sorted view, insert at the end.
           index = -1;
-        }
-        else if (queryOptions.excludeItems ||
+        } else if (queryOptions.excludeItems ||
                  queryOptions.excludeQueries ||
                  queryOptions.excludeReadOnlyFolders) {
           // Some item may be invisible, insert near last selected one.
           // We don't replace index here to avoid requests to the db,
           // instead it will be calculated later by the controller.
           index = -1;
           dropNearItemId = lastSelected.itemId;
-        }
-        else {
+        } else {
           let lsi = container.getChildIndex(lastSelected);
           index = orientation == Ci.nsITreeView.DROP_BEFORE ? lsi : lsi + 1;
         }
       }
     }
 
     if (PlacesControllerDragHelper.disallowInsertion(container))
       return null;
@@ -1461,18 +1443,17 @@ PlacesTreeView.prototype = {
         return this._convertPRTimeToString(nodeTime);
       case this.COLUMN_TYPE_VISITCOUNT:
         return node.accessCount;
       case this.COLUMN_TYPE_DESCRIPTION:
         if (node.itemId != -1) {
           try {
             return PlacesUtils.annotations.
                                getItemAnnotation(node.itemId, PlacesUIUtils.DESCRIPTION_ANNO);
-          }
-          catch (ex) { /* has no description */ }
+          } catch (ex) { /* has no description */ }
         }
         return "";
       case this.COLUMN_TYPE_DATEADDED:
         if (node.dateAdded)
           return this._convertPRTimeToString(node.dateAdded);
         return "";
       case this.COLUMN_TYPE_LASTMODIFIED:
         if (node.lastModified)
@@ -1596,18 +1577,17 @@ PlacesTreeView.prototype = {
           newSort = NHQO.SORT_BY_VISITCOUNT_DESCENDING;
 
         break;
       case this.COLUMN_TYPE_DESCRIPTION:
         if (oldSort == NHQO.SORT_BY_ANNOTATION_ASCENDING &&
             oldSortingAnnotation == PlacesUIUtils.DESCRIPTION_ANNO) {
           newSort = NHQO.SORT_BY_ANNOTATION_DESCENDING;
           newSortingAnnotation = PlacesUIUtils.DESCRIPTION_ANNO;
-        }
-        else if (allowTriState &&
+        } else if (allowTriState &&
                  oldSort == NHQO.SORT_BY_ANNOTATION_DESCENDING &&
                  oldSortingAnnotation == PlacesUIUtils.DESCRIPTION_ANNO)
           newSort = NHQO.SORT_BY_NONE;
         else {
           newSort = NHQO.SORT_BY_ANNOTATION_ASCENDING;
           newSortingAnnotation = PlacesUIUtils.DESCRIPTION_ANNO;
         }
 
--- a/browser/components/places/tests/browser/browser_bookmarksProperties.js
+++ b/browser/components/places/tests/browser/browser_bookmarksProperties.js
@@ -354,18 +354,17 @@ function runNextTest() {
 
   if (gTests.length > 0) {
     // Goto next tests.
     gCurrentTest = gTests.shift();
     info("Start of test: " + gCurrentTest.desc);
     gCurrentTest.setup(function() {
       execute_test_in_sidebar();
     });
-  }
-  else {
+  } else {
     // Finished all tests.
     finish();
   }
 }
 
 /**
  * Global functions to run a test in Properties dialog context.
  */
@@ -429,18 +428,17 @@ function open_properties_dialog() {
       case ACTION_ADD:
         if (gCurrentTest.sidebar == SIDEBAR_BOOKMARKS_ID) {
           if (gCurrentTest.itemType == TYPE_FOLDER)
             command = "placesCmd_new:folder";
           else if (gCurrentTest.itemType == TYPE_BOOKMARK)
             command = "placesCmd_new:bookmark";
           else
             ok(false, "You didn't set a valid itemType for adding an item");
-        }
-        else
+        } else
           command = "placesCmd_createBookmark";
         break;
       default:
         ok(false, "You didn't set a valid action for this test");
     }
     // Ensure command is enabled for this node.
     ok(tree.controller.isCommandEnabled(command),
        " command '" + command + "' on current selected node is enabled");
--- a/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
+++ b/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
@@ -22,18 +22,17 @@ var dragDirections = { LEFT: 0, UP: 1, R
  *        Array of flavors and values in the form:
  *        [ ["text/plain: sometext", "text/html: <b>sometext</b>"], [...] ]
  *        Pass an empty array to check that drag even has been canceled.
  * @param aDirection
  *        Direction for the dragging gesture, see dragDirections helper object.
  */
 function synthesizeDragWithDirection(aElement, aExpectedDragData, aDirection, aCallback) {
   // Dragstart listener function.
-  gBookmarksToolbar.addEventListener("dragstart", function(event)
-  {
+  gBookmarksToolbar.addEventListener("dragstart", function(event) {
     info("A dragstart event has been trapped.");
     var dataTransfer = event.dataTransfer;
     is(dataTransfer.mozItemCount, aExpectedDragData.length,
        "Number of dragged items should be the same.");
 
     for (var t = 0; t < dataTransfer.mozItemCount; t++) {
       var types = dataTransfer.mozTypesAt(t);
       var expecteditem = aExpectedDragData[t];
@@ -153,26 +152,23 @@ var gTests = [
       var element = getToolbarNodeForItemId(folderId);
       isnot(element, null, "Found node on toolbar");
 
       isnot(element._placesNode, null, "Toolbar node has an associated Places node.");
       var expectedData = getExpectedDataForPlacesNode(element._placesNode);
 
       info("Dragging left");
       synthesizeDragWithDirection(element, expectedData, dragDirections.LEFT,
-        function()
-        {
+        function() {
           info("Dragging right");
           synthesizeDragWithDirection(element, expectedData, dragDirections.RIGHT,
-            function()
-            {
+            function() {
               info("Dragging up");
               synthesizeDragWithDirection(element, expectedData, dragDirections.UP,
-                function()
-                {
+                function() {
                   info("Dragging down");
                   synthesizeDragWithDirection(element, new Array(), dragDirections.DOWN,
                     function() {
                       // Cleanup.
                       PlacesUtils.bookmarks.removeItem(folderId);
                       nextTest();
                     });
                 });
@@ -195,26 +191,23 @@ var gTests = [
       var element = getToolbarNodeForItemId(itemId);
       isnot(element, null, "Found node on toolbar");
 
       isnot(element._placesNode, null, "Toolbar node has an associated Places node.");
       var expectedData = getExpectedDataForPlacesNode(element._placesNode);
 
       info("Dragging left");
       synthesizeDragWithDirection(element, expectedData, dragDirections.LEFT,
-        function()
-        {
+        function() {
           info("Dragging right");
           synthesizeDragWithDirection(element, expectedData, dragDirections.RIGHT,
-            function()
-            {
+            function() {
               info("Dragging up");
               synthesizeDragWithDirection(element, expectedData, dragDirections.UP,
-                function()
-                {
+                function() {
                   info("Dragging down");
                   synthesizeDragWithDirection(element, expectedData, dragDirections.DOWN,
                     function() {
                       // Cleanup.
                       PlacesUtils.bookmarks.removeItem(itemId);
                       nextTest();
                     });
                 });
@@ -226,18 +219,17 @@ var gTests = [
 
 function nextTest() {
   if (gTests.length) {
     var testCase = gTests.shift();
     waitForFocus(function() {
       info("Start of test: " + testCase.desc);
       testCase.run();
     });
-  }
-  else if (wasCollapsed) {
+  } else if (wasCollapsed) {
     // Collapse the personal toolbar if needed.
     promiseSetToolbarVisibility(toolbar, false).then(finish);
   } else {
     finish();
   }
 }
 
 var toolbar = document.getElementById("PersonalToolbar");
--- a/browser/components/places/tests/browser/browser_library_batch_delete.js
+++ b/browser/components/places/tests/browser/browser_library_batch_delete.js
@@ -100,15 +100,14 @@ function test() {
   gLibrary = openLibrary(nextTest);
 }
 
 function nextTest() {
   if (gTests.length) {
     var testCase = gTests.shift();
     info("Start of test: " + testCase.desc);
     testCase.run();
-  }
-  else {
+  } else {
     // Close Library window.
     gLibrary.close();
     finish();
   }
 }
--- a/browser/components/places/tests/browser/browser_library_downloads.js
+++ b/browser/components/places/tests/browser/browser_library_downloads.js
@@ -55,16 +55,15 @@ function test() {
         PlacesTestUtils.clearHistory().then(finish);
       }
     })
   }
 
   openLibrary(onLibraryReady, "Downloads");
 }
 
-function VisitInfo(aTransitionType)
-{
+function VisitInfo(aTransitionType) {
   this.transitionType =
     aTransitionType === undefined ?
       PlacesUtils.history.TRANSITION_LINK : aTransitionType;
   this.visitDate = now++ * 1000;
 }
 VisitInfo.prototype = {}
--- a/browser/components/places/tests/browser/browser_library_infoBox.js
+++ b/browser/components/places/tests/browser/browser_library_infoBox.js
@@ -168,18 +168,17 @@ function getAndCheckElmtById(id) {
 // ------------------------------------------------------------------------------
 
 function nextTest() {
   if (gTests.length) {
     var testCase = gTests.shift();
     ok(true, "TEST: " + testCase.desc);
     dump("TEST: " + testCase.desc + "\n");
     testCase.run();
-  }
-  else {
+  } else {
     // Close Library window.
     gLibrary.close();
     // No need to cleanup anything, we have a correct left pane now.
     finish();
   }
 }
 
 function test() {
--- a/browser/components/places/tests/browser/browser_library_middleclick.js
+++ b/browser/components/places/tests/browser/browser_library_middleclick.js
@@ -240,18 +240,17 @@ function runNextTest() {
     // first node in the content (right pane) tree.
     gCurrentTest.setup();
 
     // Middle click on first node in the content tree of the Library.
     gLibrary.focus();
     waitForFocus(function() {
       mouseEventOnCell(gLibrary.ContentTree.view, 0, 0, { button: 1 });
     }, gLibrary);
-  }
-  else {
+  } else {
     // No more tests.
 
     // Close Library window.
     gLibrary.close();
 
     // Remove tabs listeners.
     gBrowser.tabContainer.removeEventListener("TabOpen", gTabsListener, false);
     gBrowser.removeTabsProgressListener(gTabsListener);
--- a/browser/components/places/tests/browser/browser_library_search.js
+++ b/browser/components/places/tests/browser/browser_library_search.js
@@ -130,18 +130,17 @@ function search(aFolderId, aSearchStr, a
   // properly.
   let searchBox = doc.getElementById("searchFilter");
   searchBox.value = aSearchStr;
   gLibrary.PlacesSearchBox.search(searchBox.value);
   let query = queryStringToQuery(contentTree.result.root.uri);
   if (aSearchStr) {
     is(query.searchTerms, aSearchStr,
        "Content tree's searchTerms should be text in search box");
-  }
-  else {
+  } else {
     is(query.hasSearchTerms, false,
        "Content tree's searchTerms should not exist after search reset");
   }
 }
 
 /**
  * test() contains window-launching boilerplate that calls this to really kick
  * things off.  Add functions to the testCases array, and this will call them.
--- a/browser/components/places/tests/browser/browser_markPageAsFollowedLink.js
+++ b/browser/components/places/tests/browser/browser_markPageAsFollowedLink.js
@@ -14,18 +14,17 @@ add_task(function* test() {
 
   Services.obs.addObserver(function observe(subject) {
     Task.spawn(function* () {
       let url = subject.QueryInterface(Ci.nsIURI).spec;
       if (url == LEFT_URL ) {
         is((yield getTransitionForUrl(url)), null,
            "Embed visits should not get a database entry.");
         deferredLeftFrameVisit.resolve();
-      }
-      else if (url == RIGHT_URL ) {
+      } else if (url == RIGHT_URL ) {
         is((yield getTransitionForUrl(url)),
            PlacesUtils.history.TRANSITION_FRAMED_LINK,
            "User activated visits should get a FRAMED_LINK transition.");
         Services.obs.removeObserver(observe, "uri-visit-saved");
         deferredRightFrameVisit.resolve();
       }
     });
   }, "uri-visit-saved", false);
--- a/browser/components/places/tests/browser/browser_sidebarpanels_click.js
+++ b/browser/components/places/tests/browser/browser_sidebarpanels_click.js
@@ -125,18 +125,17 @@ function test() {
   function runNextTest() {
     // Remove eventual tabs created by previous sub-tests.
     while (gBrowser.tabs.length > 1) {
       gBrowser.removeTab(gBrowser.tabContainer.lastChild);
     }
 
     if (tests.length == 0) {
       finish();
-    }
-    else {
+    } else {
       // Create a new tab and run the test.
       gBrowser.selectedTab = gBrowser.addTab();
       currentTest = tests.shift();
       testPlacesPanel(function() {
                         changeSidebarDirection("ltr");
                         info("Running " + currentTest.desc + " in LTR mode");
                       },
                       function() {
--- a/browser/components/places/tests/browser/browser_sort_in_library.js
+++ b/browser/components/places/tests/browser/browser_sort_in_library.js
@@ -115,18 +115,17 @@ function setSort(aOrganizerWin, aTree, a
   let failed = false;
   try {
     aOrganizerWin.ViewMenu.setSortColumn(aCol, aDir);
 
     // Remember the sort key and direction.
     if (!aCol && !aDir) {
       prevSortKey = null;
       prevSortDir = null;
-    }
-    else {
+    } else {
       if (aCol)
         prevSortKey = SORT_LOOKUP_TABLE[aCol.getAttribute("anonid")].key;
       else if (prevSortKey === null)
         prevSortKey = DEFAULT_SORT_KEY;
 
       if (aDir)
         prevSortDir = aDir.toUpperCase();
       else if (prevSortDir === null)
--- a/browser/components/places/tests/browser/head.js
+++ b/browser/components/places/tests/browser/head.js
@@ -46,18 +46,17 @@ function openLibrary(callback, aLeftPane
 function promiseLibrary(aLeftPaneRoot) {
   return new Promise(resolve => {
     let library = Services.wm.getMostRecentWindow("Places:Organizer");
     if (library && !library.closed) {
       if (aLeftPaneRoot) {
         library.PlacesOrganizer.selectLeftPaneContainerByHierarchy(aLeftPaneRoot);
       }
       resolve(library);
-    }
-    else {
+    } else {
       openLibrary(resolve, aLeftPaneRoot);
     }
   });
 }
 
 function promiseLibraryClosed(organizer) {
   return new Promise(resolve => {
     // Wait for the Organizer window to actually be closed
@@ -99,32 +98,30 @@ function promiseClipboard(aPopulateClipb
  *        Arguments array for the callback.
  *
  * @note The result is achieved by asynchronously executing a query requiring
  *       a write lock.  Since all statements on the same connection are
  *       serialized, the end of this write operation means that all writes are
  *       complete.  Note that WAL makes so that writers don't block readers, but
  *       this is a problem only across different connections.
  */
-function waitForAsyncUpdates(aCallback, aScope, aArguments)
-{
+function waitForAsyncUpdates(aCallback, aScope, aArguments) {
   let scope = aScope || this;
   let args = aArguments || [];
   let db = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                               .DBConnection;
   let begin = db.createAsyncStatement("BEGIN EXCLUSIVE");
   begin.executeAsync();
   begin.finalize();
 
   let commit = db.createAsyncStatement("COMMIT");
   commit.executeAsync({
     handleResult() {},
     handleError() {},
-    handleCompletion(aReason)
-    {
+    handleCompletion(aReason) {
       aCallback.apply(scope, args);
     }
   });
   commit.finalize();
 }
 
 function synthesizeClickOnSelectedTreeCell(aTree, aOptions) {
   let tbo = aTree.treeBoxObject;
--- a/browser/components/places/tests/unit/test_PUIU_makeTransaction.js
+++ b/browser/components/places/tests/unit/test_PUIU_makeTransaction.js
@@ -1,46 +1,42 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-function waitForBookmarkNotification(aNotification, aCallback, aProperty)
-{
+function waitForBookmarkNotification(aNotification, aCallback, aProperty) {
   PlacesUtils.bookmarks.addObserver({
-    validate(aMethodName, aData)
-    {
+    validate(aMethodName, aData) {
       if (aMethodName == aNotification &&
           (!aProperty || aProperty == aData.property)) {
         PlacesUtils.bookmarks.removeObserver(this);
         aCallback(aData);
       }
     },
 
     // nsINavBookmarkObserver
     QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver]),
     onBeginUpdateBatch: function onBeginUpdateBatch() {
       return this.validate(arguments.callee.name, arguments);
     },
     onEndUpdateBatch: function onEndUpdateBatch() {
       return this.validate(arguments.callee.name, arguments);
     },
     onItemAdded: function onItemAdded(aItemId, aParentId, aIndex, aItemType,
-                                      aURI, aTitle)
-    {
+                                      aURI, aTitle) {
       return this.validate(arguments.callee.name, { id: aItemId,
                                                     index: aIndex,
                                                     type: aItemType,
                                                     url: aURI ? aURI.spec : null,
                                                     title: aTitle });
     },
     onItemRemoved: function onItemRemoved() {
       return this.validate(arguments.callee.name, arguments);
     },
     onItemChanged: function onItemChanged(id, property, aIsAnno,
-                                          aNewValue, aLastModified, type)
-    {
+                                          aNewValue, aLastModified, type) {
       return this.validate(arguments.callee.name,
                            { id,
                              get index() {
                                return PlacesUtils.bookmarks.getItemIndex(this.id);
                              },
                              type,
                              property,
                              get url() {
@@ -52,59 +48,52 @@ function waitForBookmarkNotification(aNo
                                return PlacesUtils.bookmarks.getItemTitle(this.id);
                              },
                            });
     },
     onItemVisited: function onItemVisited() {
       return this.validate(arguments.callee.name, arguments);
     },
     onItemMoved: function onItemMoved(aItemId, aOldParentId, aOldIndex,
-                                      aNewParentId, aNewIndex, aItemType)
-    {
+                                      aNewParentId, aNewIndex, aItemType) {
       this.validate(arguments.callee.name, { id: aItemId,
                                              index: aNewIndex,
                                              type: aItemType });
     }
   }, false);
 }
 
-function wrapNodeByIdAndParent(aItemId, aParentId)
-{
+function wrapNodeByIdAndParent(aItemId, aParentId) {
   let wrappedNode;
   let root = PlacesUtils.getFolderContents(aParentId, false, false).root;
   for (let i = 0; i < root.childCount; ++i) {
     let node = root.getChild(i);
     if (node.itemId == aItemId) {
       let type;
       if (PlacesUtils.nodeIsContainer(node)) {
         type = PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER;
-      }
-      else if (PlacesUtils.nodeIsURI(node)) {
+      } else if (PlacesUtils.nodeIsURI(node)) {
         type = PlacesUtils.TYPE_X_MOZ_PLACE;
-      }
-      else if (PlacesUtils.nodeIsSeparator(node)) {
+      } else if (PlacesUtils.nodeIsSeparator(node)) {
         type = PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR;
-      }
-      else {
+      } else {
         do_throw("Unknown node type");
       }
       wrappedNode = PlacesUtils.wrapNode(node, type);
     }
   }
   root.containerOpen = false;
   return JSON.parse(wrappedNode);
 }
 
-add_test(function test_text_paste()
-{
+add_test(function test_text_paste() {
   const TEST_URL = "http://places.moz.org/"
   const TEST_TITLE = "Places bookmark"
 
-  waitForBookmarkNotification("onItemAdded", function(aData)
-  {
+  waitForBookmarkNotification("onItemAdded", function(aData) {
     do_check_eq(aData.title, TEST_TITLE);
     do_check_eq(aData.url, TEST_URL);
     do_check_eq(aData.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
     do_check_eq(aData.index, 0);
     run_next_test();
   });
 
   let txn = PlacesUIUtils.makeTransaction(
@@ -112,35 +101,31 @@ add_test(function test_text_paste()
     PlacesUtils.TYPE_X_MOZ_URL,
     PlacesUtils.unfiledBookmarksFolderId,
     PlacesUtils.bookmarks.DEFAULT_INDEX,
     true // Unused for text.
   );
   PlacesUtils.transactionManager.doTransaction(txn);
 });
 
-add_test(function test_container()
-{
+add_test(function test_container() {
   const TEST_TITLE = "Places folder"
 
-  waitForBookmarkNotification("onItemChanged", function(aChangedData)
-  {
+  waitForBookmarkNotification("onItemChanged", function(aChangedData) {
     do_check_eq(aChangedData.title, TEST_TITLE);
     do_check_eq(aChangedData.type, PlacesUtils.bookmarks.TYPE_FOLDER);
     do_check_eq(aChangedData.index, 1);
 
-    waitForBookmarkNotification("onItemAdded", function(aAddedData)
-    {
+    waitForBookmarkNotification("onItemAdded", function(aAddedData) {
       do_check_eq(aAddedData.title, TEST_TITLE);
       do_check_eq(aAddedData.type, PlacesUtils.bookmarks.TYPE_FOLDER);
       do_check_eq(aAddedData.index, 2);
       let id = aAddedData.id;
 
-      waitForBookmarkNotification("onItemMoved", function(aMovedData)
-      {
+      waitForBookmarkNotification("onItemMoved", function(aMovedData) {
         do_check_eq(aMovedData.id, id);
         do_check_eq(aMovedData.type, PlacesUtils.bookmarks.TYPE_FOLDER);
         do_check_eq(aMovedData.index, 1);
 
         run_next_test();
       });
 
       let txn = PlacesUIUtils.makeTransaction(
@@ -174,31 +159,27 @@ add_test(function test_container()
                                             "description", 0,
                                             PlacesUtils.annotations.EXPIRE_NEVER);
   PlacesUtils.annotations.setItemAnnotation(id, "random-anno",
                                             "random-value", 0,
                                             PlacesUtils.annotations.EXPIRE_NEVER);
 });
 
 
-add_test(function test_separator()
-{
-  waitForBookmarkNotification("onItemChanged", function(aChangedData)
-  {
+add_test(function test_separator() {
+  waitForBookmarkNotification("onItemChanged", function(aChangedData) {
     do_check_eq(aChangedData.type, PlacesUtils.bookmarks.TYPE_SEPARATOR);
     do_check_eq(aChangedData.index, 3);
 
-    waitForBookmarkNotification("onItemAdded", function(aAddedData)
-    {
+    waitForBookmarkNotification("onItemAdded", function(aAddedData) {
       do_check_eq(aAddedData.type, PlacesUtils.bookmarks.TYPE_SEPARATOR);
       do_check_eq(aAddedData.index, 4);
       let id = aAddedData.id;
 
-      waitForBookmarkNotification("onItemMoved", function(aMovedData)
-      {
+      waitForBookmarkNotification("onItemMoved", function(aMovedData) {
         do_check_eq(aMovedData.id, id);
         do_check_eq(aMovedData.type, PlacesUtils.bookmarks.TYPE_SEPARATOR);
         do_check_eq(aMovedData.index, 1);
 
         run_next_test();
       });
 
       let txn = PlacesUIUtils.makeTransaction(
@@ -227,38 +208,34 @@ add_test(function test_separator()
 
   let id = PlacesUtils.bookmarks.insertSeparator(PlacesUtils.unfiledBookmarksFolderId,
                                                  PlacesUtils.bookmarks.DEFAULT_INDEX);
   PlacesUtils.annotations.setItemAnnotation(id, "random-anno",
                                             "random-value", 0,
                                             PlacesUtils.annotations.EXPIRE_NEVER);
 });
 
-add_test(function test_bookmark()
-{
+add_test(function test_bookmark() {
   const TEST_URL = "http://places.moz.org/"
   const TEST_TITLE = "Places bookmark"
 
-  waitForBookmarkNotification("onItemChanged", function(aChangedData)
-  {
+  waitForBookmarkNotification("onItemChanged", function(aChangedData) {
     do_check_eq(aChangedData.title, TEST_TITLE);
     do_check_eq(aChangedData.url, TEST_URL);
     do_check_eq(aChangedData.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
     do_check_eq(aChangedData.index, 5);
 
-    waitForBookmarkNotification("onItemAdded", function(aAddedData)
-    {
+    waitForBookmarkNotification("onItemAdded", function(aAddedData) {
       do_check_eq(aAddedData.title, TEST_TITLE);
       do_check_eq(aAddedData.url, TEST_URL);
       do_check_eq(aAddedData.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
       do_check_eq(aAddedData.index, 6);
       let id = aAddedData.id;
 
-      waitForBookmarkNotification("onItemMoved", function(aMovedData)
-      {
+      waitForBookmarkNotification("onItemMoved", function(aMovedData) {
         do_check_eq(aMovedData.id, id);
         do_check_eq(aMovedData.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
         do_check_eq(aMovedData.index, 1);
 
         run_next_test();
       });
 
       let txn = PlacesUIUtils.makeTransaction(
@@ -292,30 +269,27 @@ add_test(function test_bookmark()
   PlacesUtils.annotations.setItemAnnotation(id, PlacesUIUtils.DESCRIPTION_ANNO,
                                             "description", 0,
                                             PlacesUtils.annotations.EXPIRE_NEVER);
   PlacesUtils.annotations.setItemAnnotation(id, "random-anno",
                                             "random-value", 0,
                                             PlacesUtils.annotations.EXPIRE_NEVER);
 });
 
-add_test(function test_visit()
-{
+add_test(function test_visit() {
   const TEST_URL = "http://places.moz.org/"
   const TEST_TITLE = "Places bookmark"
 
-  waitForBookmarkNotification("onItemAdded", function(aAddedData)
-  {
+  waitForBookmarkNotification("onItemAdded", function(aAddedData) {
     do_check_eq(aAddedData.title, TEST_TITLE);
     do_check_eq(aAddedData.url, TEST_URL);
     do_check_eq(aAddedData.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
     do_check_eq(aAddedData.index, 7);
 
-    waitForBookmarkNotification("onItemAdded", function(aAddedData2)
-    {
+    waitForBookmarkNotification("onItemAdded", function(aAddedData2) {
       do_check_eq(aAddedData2.title, TEST_TITLE);
       do_check_eq(aAddedData2.url, TEST_URL);
       do_check_eq(aAddedData2.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
       do_check_eq(aAddedData2.index, 8);
       run_next_test();
     });
 
     try {
@@ -350,12 +324,11 @@ add_test(function check_annotations() {
   do_check_eq(descriptions.length, 4);
 
   // Only the original bookmarks should have this annotation.
   let others = PlacesUtils.annotations.getItemsWithAnnotation("random-anno", {});
   do_check_eq(others.length, 3);
   run_next_test();
 });
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
--- a/browser/components/places/tests/unit/test_clearHistory_shutdown.js
+++ b/browser/components/places/tests/unit/test_clearHistory_shutdown.js
@@ -141,17 +141,17 @@ function storeCache(aURL, aContent) {
         do_check_eq(status, Cr.NS_OK);
 
         entry.setMetaDataElement("servertype", "0");
         var os = entry.openOutputStream(0);
 
         var written = os.write(aContent, aContent.length);
         if (written != aContent.length) {
           do_throw("os.write has not written all data!\n" +
-                   "  Expected: " + written  + "\n" +
+                   "  Expected: " + written + "\n" +
                    "  Actual: " + aContent.length + "\n");
         }
         os.close();
         entry.close();
         resolve();
       }
     };
 
--- a/browser/components/places/tests/unit/test_leftpane_corruption_handling.js
+++ b/browser/components/places/tests/unit/test_leftpane_corruption_handling.js
@@ -156,18 +156,17 @@ function folderIdToHierarchy(aFolderId) 
 }
 
 function hierarchyToObj(aNode) {
   let o = {}
   o.title = aNode.title;
   o.annos = PlacesUtils.getAnnotationsForItem(aNode.itemId)
   if (PlacesUtils.nodeIsURI(aNode)) {
     o.uri = aNode.uri;
-  }
-  else if (PlacesUtils.nodeIsFolder(aNode)) {
+  } else if (PlacesUtils.nodeIsFolder(aNode)) {
     o.children = [];
     PlacesUtils.asContainer(aNode).containerOpen = true;
     for (let i = 0; i < aNode.childCount; ++i) {
       o.children.push(hierarchyToObj(aNode.getChild(i)));
     }
     aNode.containerOpen = false;
   }
   return o;
--- a/browser/components/preferences/applicationManager.js
+++ b/browser/components/preferences/applicationManager.js
@@ -63,18 +63,17 @@ var gAppManagerDialog = {
   remove: function appManager_remove() {
     var list = document.getElementById("appList");
     this._removed.push(list.selectedItem.app);
     var index = list.selectedIndex;
     list.removeItemAt(index);
     if (list.getRowCount() == 0) {
       // The list is now empty, make the bottom part disappear
       document.getElementById("appDetails").hidden = true;
-    }
-    else {
+    } else {
       // Select the item at the same index, if we removed the last
       // item of the list, select the previous item
       if (index == list.getRowCount())
         --index;
       list.selectedIndex = index;
     }
   },
 
--- a/browser/components/preferences/connection.js
+++ b/browser/components/preferences/connection.js
@@ -1,16 +1,15 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
 /* 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/. */
 
 var gConnectionsDialog = {
-  beforeAccept()
-  {
+  beforeAccept() {
     var proxyTypePref = document.getElementById("network.proxy.type");
     if (proxyTypePref.value == 2) {
       this.doAutoconfigURLFixup();
       return true;
     }
 
     if (proxyTypePref.value != 1)
       return true;
@@ -47,24 +46,22 @@ var gConnectionsDialog = {
       }
     }
 
     this.sanitizeNoProxiesPref();
 
     return true;
   },
 
-  checkForSystemProxy()
-  {
+  checkForSystemProxy() {
     if ("@mozilla.org/system-proxy-settings;1" in Components.classes)
       document.getElementById("systemPref").removeAttribute("hidden");
   },
 
-  proxyTypeChanged()
-  {
+  proxyTypeChanged() {
     var proxyTypePref = document.getElementById("network.proxy.type");
 
     // Update http
     var httpProxyURLPref = document.getElementById("network.proxy.http");
     httpProxyURLPref.disabled = proxyTypePref.value != 1;
     var httpProxyPortPref = document.getElementById("network.proxy.http_port");
     httpProxyPortPref.disabled = proxyTypePref.value != 1;
 
@@ -79,28 +76,26 @@ var gConnectionsDialog = {
     noProxiesPref.disabled = proxyTypePref.value != 1;
 
     var autoconfigURLPref = document.getElementById("network.proxy.autoconfig_url");
     autoconfigURLPref.disabled = proxyTypePref.value != 2;
 
     this.updateReloadButton();
   },
 
-  updateDNSPref()
-  {
+  updateDNSPref() {
     var socksVersionPref = document.getElementById("network.proxy.socks_version");
     var socksDNSPref = document.getElementById("network.proxy.socks_remote_dns");
     var proxyTypePref = document.getElementById("network.proxy.type");
     var isDefinitelySocks4 = !socksVersionPref.disabled && socksVersionPref.value == 4;
     socksDNSPref.disabled = (isDefinitelySocks4 || proxyTypePref.value == 0);
     return undefined;
   },
 
-  updateReloadButton()
-  {
+  updateReloadButton() {
     // Disable the "Reload PAC" button if the selected proxy type is not PAC or
     // if the current value of the PAC textbox does not match the value stored
     // in prefs.  Likewise, disable the reload button if PAC is not configured
     // in prefs.
 
     var typedURL = document.getElementById("networkProxyAutoconfigURL").value;
     var proxyTypeCur = document.getElementById("network.proxy.type").value;
 
@@ -111,24 +106,22 @@ var gConnectionsDialog = {
     var proxyType = prefs.getIntPref("network.proxy.type");
 
     var disableReloadPref =
         document.getElementById("pref.advanced.proxies.disable_button.reload");
     disableReloadPref.disabled =
         (proxyTypeCur != 2 || proxyType != 2 || typedURL != pacURL);
   },
 
-  readProxyType()
-  {
+  readProxyType() {
     this.proxyTypeChanged();
     return undefined;
   },
 
-  updateProtocolPrefs()
-  {
+  updateProtocolPrefs() {
     var proxyTypePref = document.getElementById("network.proxy.type");
     var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings");
     var proxyPrefs = ["ssl", "ftp", "socks"];
     for (var i = 0; i < proxyPrefs.length; ++i) {
       var proxyServerURLPref = document.getElementById("network.proxy." + proxyPrefs[i]);
       var proxyPortPref = document.getElementById("network.proxy." + proxyPrefs[i] + "_port");
 
       // Restore previous per-proxy custom settings, if present.
@@ -151,63 +144,57 @@ var gConnectionsDialog = {
       proxyPortPref.disabled = proxyServerURLPref.disabled;
     }
     var socksVersionPref = document.getElementById("network.proxy.socks_version");
     socksVersionPref.disabled = proxyTypePref.value != 1 || shareProxiesPref.value;
     this.updateDNSPref();
     return undefined;
   },
 
-  readProxyProtocolPref(aProtocol, aIsPort)
-  {
+  readProxyProtocolPref(aProtocol, aIsPort) {
     var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings");
     if (shareProxiesPref.value) {
       var pref = document.getElementById("network.proxy.http" + (aIsPort ? "_port" : ""));
       return pref.value;
     }
 
     var backupPref = document.getElementById("network.proxy.backup." + aProtocol + (aIsPort ? "_port" : ""));
     return backupPref.hasUserValue ? backupPref.value : undefined;
   },
 
-  reloadPAC()
-  {
+  reloadPAC() {
     Components.classes["@mozilla.org/network/protocol-proxy-service;1"].
         getService().reloadPAC();
   },
 
-  doAutoconfigURLFixup()
-  {
+  doAutoconfigURLFixup() {
     var autoURL = document.getElementById("networkProxyAutoconfigURL");
     var autoURLPref = document.getElementById("network.proxy.autoconfig_url");
     var URIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"]
                              .getService(Components.interfaces.nsIURIFixup);
     try {
       autoURLPref.value = autoURL.value = URIFixup.createFixupURI(autoURL.value, 0).spec;
     } catch (ex) {}
   },
 
-  sanitizeNoProxiesPref()
-  {
+  sanitizeNoProxiesPref() {
     var noProxiesPref = document.getElementById("network.proxy.no_proxies_on");
     // replace substrings of ; and \n with commas if they're neither immediately
     // preceded nor followed by a valid separator character
     noProxiesPref.value = noProxiesPref.value.replace(/([^, \n;])[;\n]+(?![,\n;])/g, '$1,');
     // replace any remaining ; and \n since some may follow commas, etc.
     noProxiesPref.value = noProxiesPref.value.replace(/[;\n]/g, '');
   },
 
-  readHTTPProxyServer()
-  {
+  readHTTPProxyServer() {
     var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings");
     if (shareProxiesPref.value)
       this.updateProtocolPrefs();
     return undefined;
   },
 
-  readHTTPProxyPort()
-  {
+  readHTTPProxyPort() {
     var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings");
     if (shareProxiesPref.value)
       this.updateProtocolPrefs();
     return undefined;
   }
 };
--- a/browser/components/preferences/cookies.js
+++ b/browser/components/preferences/cookies.js
@@ -54,18 +54,17 @@ var gCookiesWindow = {
     if (this._view.rowCount > 0)
       this._tree.view.selection.select(0);
 
     if (aInitialLoad) {
       if ("arguments" in window &&
           window.arguments[0] &&
           window.arguments[0].filterString)
         this.setFilter(window.arguments[0].filterString);
-    }
-    else if (document.getElementById("filter").value != "") {
+    } else if (document.getElementById("filter").value != "") {
       this.filter();
     }
 
     this._updateRemoveAllButton();
 
     this._saveState();
   },
 
@@ -95,28 +94,26 @@ var gCookiesWindow = {
         return;
       }
 
       var strippedHost = this._makeStrippedHost(aCookie.host);
       if (aData == "changed")
         this._handleCookieChanged(aCookie, strippedHost);
       else if (aData == "added")
         this._handleCookieAdded(aCookie, strippedHost);
-    }
-    else if (aData == "cleared") {
+    } else if (aData == "cleared") {
       this._hosts = {};
       this._hostOrder = [];
 
       var oldRowCount = this._view._rowCount;
       this._view._rowCount = 0;
       this._tree.treeBoxObject.rowCountChanged(0, -oldRowCount);
       this._view.selection.clearSelection();
       this._updateRemoveAllButton();
-    }
-    else if (aData == "reload") {
+    } else if (aData == "reload") {
       // first, clear any existing entries
       this.observe(aCookie, aTopic, "cleared");
 
       // then, reload the list
       this._populateList(false);
     }
 
     // We don't yet handle aData == "deleted" - it's a less common case
@@ -139,22 +136,20 @@ var gCookiesWindow = {
               currCookie.value    = changedCookie.value;
               currCookie.isSecure = changedCookie.isSecure;
               currCookie.isDomain = changedCookie.isDomain;
               currCookie.expires  = changedCookie.expires;
               cookieItem = currCookie;
               break;
             }
           }
-        }
-        else if (hostItem.open)
+        } else if (hostItem.open)
           rowIndex += hostItem.cookies.length;
       }
-    }
-    else {
+    } else {
       // Just walk the filter list to find the item. It doesn't matter that
       // we don't update the main Host collection when we do this, because
       // when the filter is reset the Host collection is rebuilt anyway.
       for (let currCookie of this._view._filterSet) {
         if (this._cookieEquals(currCookie, changedCookie, strippedHost)) {
           currCookie.value    = changedCookie.value;
           currCookie.isSecure = changedCookie.isSecure;
           currCookie.isDomain = changedCookie.isDomain;
@@ -177,18 +172,17 @@ var gCookiesWindow = {
     var addedHost = { value: 0 };
     this._addCookie(strippedHost, changedCookie, addedHost);
     if (!this._view._filtered) {
       // The Host collection for this cookie already exists, and it's not open,
       // so don't increment the rowCountImpact becaues the user is not going to
       // see the additional rows as they're hidden.
       if (addedHost.value || this._hosts[strippedHost].open)
         ++rowCountImpact;
-    }
-    else {
+    } else {
       // We're in search mode, and the cookie being added matches
       // the search condition, so add it to the list.
       var c = this._makeCookieObject(strippedHost, changedCookie);
       if (this._cookieMatchesFilter(c)) {
         this._view._filterSet.push(this._makeCookieObject(strippedHost, changedCookie));
         ++rowCountImpact;
       }
     }
@@ -243,26 +237,24 @@ var gCookiesWindow = {
             ++count;
             for (let cookie of currHost.cookies) {
               if (count == aIndex) {
                 cookie.parentIndex = hostIndex;
                 return cookie;
               }
               ++count;
             }
-          }
-          else {
+          } else {
             // A host entry was open, but we weren't looking for an index
             // within that host entry's children, so skip forward over the
             // entry's children. We need to add one to increment for the
             // host value too.
             count += currHost.cookies.length + 1;
           }
-        }
-        else
+        } else
           ++count;
 
         for (let k = cacheStart; k < count; k++)
           this._cacheItems[k] = cacheEntry;
         this._cacheValid = count - 1;
       }
       return null;
     },
@@ -314,18 +306,17 @@ var gCookiesWindow = {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item)
           return "";
         if (aColumn.id == "domainCol")
           return item.rawHost;
         else if (aColumn.id == "nameCol")
           return item.name;
-      }
-      else if (aColumn.id == "domainCol") {
+      } else if (aColumn.id == "domainCol") {
         return this._filterSet[aIndex].rawHost;
       } else if (aColumn.id == "nameCol") {
         return this._filterSet[aIndex].name;
       }
       return "";
     },
 
     _selection: null,
@@ -494,18 +485,17 @@ var gCookiesWindow = {
       var cookie = e.getNext();
       if (cookie && cookie instanceof Components.interfaces.nsICookie) {
         if (this._isPrivateCookie(cookie)) {
           continue;
         }
 
         var strippedHost = this._makeStrippedHost(cookie.host);
         this._addCookie(strippedHost, cookie, hostCount);
-      }
-      else
+      } else
         break;
     }
     this._view._rowCount = hostCount.value;
   },
 
   formatExpiresString(aExpires) {
     if (aExpires) {
       var date = new Date(1000 * aExpires);
@@ -538,18 +528,17 @@ var gCookiesWindow = {
                      isDomain: aItem.isDomain ? this._bundle.getString("domainColon")
                                               : this._bundle.getString("hostColon"),
                      isSecure: aItem.isSecure ? this._bundle.getString("forSecureOnly")
                                               : this._bundle.getString("forAnyConnection"),
                      userContext: this._getUserContextString(aItem.originAttributes.userContextId) };
       for (let id of ids) {
         document.getElementById(id).disabled = false;
       }
-    }
-    else {
+    } else {
       var noneSelected = this._bundle.getString("noCookieSelected");
       properties = { name: noneSelected, value: noneSelected, host: noneSelected,
                      path: noneSelected, expires: noneSelected,
                      isSecure: noneSelected, userContext: noneSelected };
       for (let id of ids) {
         document.getElementById(id).disabled = true;
       }
     }
@@ -665,43 +654,40 @@ var gCookiesWindow = {
       var invalidateRow = -1;
       var item = this._view._getItemAtIndex(ci);
       if (item.container) {
         rowCountImpact -= (item.open ? item.cookies.length : 0) + 1;
         deleteItems = deleteItems.concat(item.cookies);
         if (!this._view.hasNextSibling(-1, ci))
           --nextSelected;
         this._view._removeItemAtIndex(ci);
-      }
-      else {
+      } else {
         var parent = this._view._getItemAtIndex(item.parentIndex);
         --rowCountImpact;
         if (parent.cookies.length == 1) {
           --rowCountImpact;
           deleteItems.push(item);
           if (!this._view.hasNextSibling(-1, ci))
             --nextSelected;
           if (!this._view.hasNextSibling(-1, item.parentIndex))
             --nextSelected;
           this._view._removeItemAtIndex(item.parentIndex);
           invalidateRow = item.parentIndex;
-        }
-        else {
+        } else {
           deleteItems.push(item);
           if (!this._view.hasNextSibling(-1, ci))
             --nextSelected;
           this._view._removeItemAtIndex(ci);
         }
       }
       this._view._rowCount += rowCountImpact;
       tbo.rowCountChanged(ci, rowCountImpact);
       if (invalidateRow != -1)
         tbo.invalidateRow(invalidateRow);
-    }
-    else {
+    } else {
       var rangeCount = seln.getRangeCount();
       // Traverse backwards through selections to avoid messing
       // up the indices when they are deleted.
       // See bug 388079.
       for (let i = rangeCount - 1; i >= 0; --i) {
         var min = {}; var max = {};
         seln.getRangeAt(i, min, max);
         nextSelected = min.value;
@@ -734,18 +720,17 @@ var gCookiesWindow = {
       var deleteItems = [];
       for (let index = 0; index < rowCount; index++) {
         deleteItems.push(this._view._getItemAtIndex(index));
       }
       this._view._removeItemAtIndex(0, rowCount);
       this._view._rowCount = 0;
       this._tree.treeBoxObject.rowCountChanged(0, -rowCount);
       this.performDeletion(deleteItems);
-    }
-    else {
+    } else {
       this._cm.removeAll();
     }
     this._updateRemoveAllButton();
     this.focusFilterBox();
   },
 
   onCookieKeyPress(aEvent) {
     if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) {
@@ -788,18 +773,17 @@ var gCookiesWindow = {
 
     // Adjust the Sort Indicator
     var domainCol = document.getElementById("domainCol");
     var nameCol = document.getElementById("nameCol");
     var sortOrderString = ascending ? "ascending" : "descending";
     if (aProperty == "rawHost") {
       domainCol.setAttribute("sortDirection", sortOrderString);
       nameCol.removeAttribute("sortDirection");
-    }
-    else {
+    } else {
       nameCol.setAttribute("sortDirection", sortOrderString);
       domainCol.removeAttribute("sortDirection");
     }
 
     this._view._invalidateCache(0);
     this._view.selection.clearSelection();
     this._view.selection.select(0);
     this._tree.treeBoxObject.invalidate();
@@ -823,18 +807,17 @@ var gCookiesWindow = {
     this._loadCookies();
     this._tree.view = this._view;
 
     // Restore sort order
     var sortby = this._lastSortProperty;
     if (sortby == "") {
       this._lastSortAscending = false;
       this.sort("rawHost");
-    }
-    else {
+    } else {
       this._lastSortAscending = !this._lastSortAscending;
       this.sort(sortby);
     }
 
     // Restore open state
     for (let openIndex of this._openIndices) {
       this._view.toggleOpenState(openIndex);
     }
--- a/browser/components/preferences/fonts.js
+++ b/browser/components/preferences/fonts.js
@@ -14,18 +14,17 @@ const kFontNameFmtMonospace     = "font.
 const kFontNameListFmtSerif     = "font.name-list.serif.%LANG%";
 const kFontNameListFmtSansSerif = "font.name-list.sans-serif.%LANG%";
 const kFontNameListFmtMonospace = "font.name-list.monospace.%LANG%";
 const kFontSizeFmtVariable      = "font.size.variable.%LANG%";
 const kFontSizeFmtFixed         = "font.size.fixed.%LANG%";
 const kFontMinSizeFmt           = "font.minimum-size.%LANG%";
 
 var gFontsDialog = {
-  _selectLanguageGroup(aLanguageGroup)
-  {
+  _selectLanguageGroup(aLanguageGroup) {
     var prefs = [{ format: kDefaultFontType,          type: "string",   element: "defaultFontType", fonttype: null},
                  { format: kFontNameFmtSerif,         type: "fontname", element: "serif",      fonttype: "serif"       },
                  { format: kFontNameFmtSansSerif,     type: "fontname", element: "sans-serif", fonttype: "sans-serif"  },
                  { format: kFontNameFmtMonospace,     type: "fontname", element: "monospace",  fonttype: "monospace"   },
                  { format: kFontNameListFmtSerif,     type: "unichar",  element: null,         fonttype: "serif"       },
                  { format: kFontNameListFmtSansSerif, type: "unichar",  element: null,         fonttype: "sans-serif"  },
                  { format: kFontNameListFmtMonospace, type: "unichar",  element: null,         fonttype: "monospace"   },
                  { format: kFontSizeFmtVariable,      type: "int",      element: "sizeVar",    fonttype: null          },
@@ -53,37 +52,33 @@ var gFontsDialog = {
         if (prefs[i].fonttype)
           FontBuilder.buildFontList(aLanguageGroup, prefs[i].fonttype, element);
 
         preference.setElementValue(element);
       }
     }
   },
 
-  readFontLanguageGroup()
-  {
+  readFontLanguageGroup() {
     var languagePref = document.getElementById("font.language.group");
     this._selectLanguageGroup(languagePref.value);
     return undefined;
   },
 
-  readUseDocumentFonts()
-  {
+  readUseDocumentFonts() {
     var preference = document.getElementById("browser.display.use_document_fonts");
     return preference.value == 1;
   },
 
-  writeUseDocumentFonts()
-  {
+  writeUseDocumentFonts() {
     var useDocumentFonts = document.getElementById("useDocumentFonts");
     return useDocumentFonts.checked ? 1 : 0;
   },
 
-  onBeforeAccept()
-  {
+  onBeforeAccept() {
     let preferences = document.querySelectorAll("preference[id*='font.minimum-size']");
     // It would be good if we could avoid touching languages the pref pages won't use, but
     // unfortunately the language group APIs (deducing language groups from language codes)
     // are C++ - only. So we just check all the things the user touched:
     // Don't care about anything up to 24px, or if this value is the same as set previously:
     preferences = Array.filter(preferences, prefEl => {
       return prefEl.value > 24 && prefEl.value != prefEl.valueFromPreferences;
     });
--- a/browser/components/preferences/in-content/advanced.js
+++ b/browser/components/preferences/in-content/advanced.js
@@ -13,20 +13,18 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 const PREF_UPLOAD_ENABLED = "datareporting.healthreport.uploadEnabled";
 
 var gAdvancedPane = {
   _inited: false,
 
   /**
    * Brings the appropriate tab to the front and initializes various bits of UI.
    */
-  init()
-  {
-    function setEventListener(aId, aEventType, aCallback)
-    {
+  init() {
+    function setEventListener(aId, aEventType, aCallback) {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gAdvancedPane));
     }
 
     this._inited = true;
     var advancedPrefs = document.getElementById("advancedPrefs");
 
     var preference = document.getElementById("browser.preferences.advanced.selectedTabIndex");
@@ -115,18 +113,17 @@ var gAdvancedPane = {
       }, true);
     }
   },
 
   /**
    * Stores the identity of the current tab in preferences so that the selected
    * tab can be persisted between openings of the preferences window.
    */
-  tabSelectionChanged()
-  {
+  tabSelectionChanged() {
     if (!this._inited)
       return;
     var advancedPrefs = document.getElementById("advancedPrefs");
     var preference = document.getElementById("browser.preferences.advanced.selectedTabIndex");
 
     // tabSelectionChanged gets called twice due to the selectedIndex being set
     // by both the selectedItem and selectedPanel callstacks. This guard is used
     // to prevent double-counting in Telemetry.
@@ -177,70 +174,65 @@ var gAdvancedPane = {
    */
   _storedSpellCheck: 0,
 
   /**
    * Returns true if any spellchecking is enabled and false otherwise, caching
    * the current value to enable proper pref restoration if the checkbox is
    * never changed.
    */
-  readCheckSpelling()
-  {
+  readCheckSpelling() {
     var pref = document.getElementById("layout.spellcheckDefault");
     this._storedSpellCheck = pref.value;
 
     return (pref.value != 0);
   },
 
   /**
    * Returns the value of the spellchecking preference represented by UI,
    * preserving the preference's "hidden" value if the preference is
    * unchanged and represents a value not strictly allowed in UI.
    */
-  writeCheckSpelling()
-  {
+  writeCheckSpelling() {
     var checkbox = document.getElementById("checkSpelling");
     if (checkbox.checked) {
       if (this._storedSpellCheck == 2) {
         return 2;
       }
       return 1;
     }
     return 0;
   },
 
   /**
    * security.OCSP.enabled is an integer value for legacy reasons.
    * A value of 1 means OCSP is enabled. Any other value means it is disabled.
    */
-  readEnableOCSP()
-  {
+  readEnableOCSP() {
     var preference = document.getElementById("security.OCSP.enabled");
     // This is the case if the preference is the default value.
     if (preference.value === undefined) {
       return true;
     }
     return preference.value == 1;
   },
 
   /**
    * See documentation for readEnableOCSP.
    */
-  writeEnableOCSP()
-  {
+  writeEnableOCSP() {
     var checkbox = document.getElementById("enableOCSP");
     return checkbox.checked ? 1 : 0;
   },
 
   /**
    * When the user toggles the layers.acceleration.disabled pref,
    * sync its new value to the gfx.direct2d.disabled pref too.
    */
-  updateHardwareAcceleration()
-  {
+  updateHardwareAcceleration() {
     if (AppConstants.platform = "win") {
       var fromPref = document.getElementById("layers.acceleration.disabled");
       var toPref = document.getElementById("gfx.direct2d.disabled");
       toPref.value = fromPref.value;
     }
   },
 
   // DATA CHOICES TAB
@@ -258,40 +250,37 @@ var gAdvancedPane = {
     } else {
       el.setAttribute("hidden", "true");
     }
   },
 
   /**
    *
    */
-  initSubmitCrashes()
-  {
+  initSubmitCrashes() {
     this._setupLearnMoreLink("toolkit.crashreporter.infoURL",
                              "crashReporterLearnMore");
   },
 
   /**
    * The preference/checkbox is configured in XUL.
    *
    * In all cases, set up the Learn More link sanely.
    */
-  initTelemetry()
-  {
+  initTelemetry() {
     if (AppConstants.MOZ_TELEMETRY_REPORTING) {
       this._setupLearnMoreLink("toolkit.telemetry.infoURL", "telemetryLearnMore");
     }
   },
 
   /**
    * Set the status of the telemetry controls based on the input argument.
    * @param {Boolean} aEnabled False disables the controls, true enables them.
    */
-  setTelemetrySectionEnabled(aEnabled)
-  {
+  setTelemetrySectionEnabled(aEnabled) {
     if (AppConstants.MOZ_TELEMETRY_REPORTING) {
       // If FHR is disabled, additional data sharing should be disabled as well.
       let disabled = !aEnabled;
       document.getElementById("submitTelemetryBox").disabled = disabled;
       if (disabled) {
         // If we disable FHR, untick the telemetry checkbox.
         Services.prefs.setBoolPref("toolkit.telemetry.enabled", false);
       }
@@ -346,18 +335,17 @@ var gAdvancedPane = {
    * browser.cache.disk.capacity
    * - the size of the browser cache in KB
    * - Only used if browser.cache.disk.smart_size.enabled is disabled
    */
 
   /**
    * Displays a dialog in which proxy settings may be changed.
    */
-  showConnections()
-  {
+  showConnections() {
     gSubDialog.open("chrome://browser/content/preferences/connection.xul");
   },
 
   showSiteDataSettings() {
     gSubDialog.open("chrome://browser/content/preferences/siteDataSettings.xul");
   },
 
   updateTotalSiteDataSize() {
@@ -368,18 +356,17 @@ var gAdvancedPane = {
         let totalSiteDataSizeLabel = document.getElementById("totalSiteDataSize");
         totalSiteDataSizeLabel.textContent = prefStrBundle.getFormattedString("totalSiteDataSize", size);
         let siteDataGroup = document.getElementById("siteDataGroup");
         siteDataGroup.hidden = false;
       });
   },
 
   // Retrieves the amount of space currently used by disk cache
-  updateActualCacheSize()
-  {
+  updateActualCacheSize() {
     var actualSizeLabel = document.getElementById("actualDiskCacheSize");
     var prefStrBundle = document.getElementById("bundlePreferences");
 
     // Needs to root the observer since cache service keeps only a weak reference.
     this.observer = {
       onNetworkCacheDiskConsumption(consumption) {
         var size = DownloadUtils.convertByteUnits(consumption);
         // The XBL binding for the string bundle may have been destroyed if
@@ -402,21 +389,19 @@ var gAdvancedPane = {
       var cacheService =
         Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
                   .getService(Components.interfaces.nsICacheStorageService);
       cacheService.asyncGetDiskConsumption(this.observer);
     } catch (e) {}
   },
 
   // Retrieves the amount of space currently used by offline cache
-  updateActualAppCacheSize()
-  {
+  updateActualAppCacheSize() {
     var visitor = {
-      onCacheStorageInfo(aEntryCount, aConsumption, aCapacity, aDiskDirectory)
-      {
+      onCacheStorageInfo(aEntryCount, aConsumption, aCapacity, aDiskDirectory) {
         var actualSizeLabel = document.getElementById("actualAppCacheSize");
         var sizeStrings = DownloadUtils.convertByteUnits(aConsumption);
         var prefStrBundle = document.getElementById("bundlePreferences");
         // The XBL binding for the string bundle may have been destroyed if
         // the page was closed before this callback was executed.
         if (!prefStrBundle.getFormattedString) {
           return;
         }
@@ -429,77 +414,71 @@ var gAdvancedPane = {
       var cacheService =
         Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
                   .getService(Components.interfaces.nsICacheStorageService);
       var storage = cacheService.appCacheStorage(LoadContextInfo.default, null);
       storage.asyncVisitStorage(visitor, false);
     } catch (e) {}
   },
 
-  updateCacheSizeUI(smartSizeEnabled)
-  {
+  updateCacheSizeUI(smartSizeEnabled) {
     document.getElementById("useCacheBefore").disabled = smartSizeEnabled;
     document.getElementById("cacheSize").disabled = smartSizeEnabled;
     document.getElementById("useCacheAfter").disabled = smartSizeEnabled;
   },
 
-  readSmartSizeEnabled()
-  {
+  readSmartSizeEnabled() {
     // The smart_size.enabled preference element is inverted="true", so its
     // value is the opposite of the actual pref value
     var disabled = document.getElementById("browser.cache.disk.smart_size.enabled").value;
     this.updateCacheSizeUI(!disabled);
   },
 
   /**
    * Converts the cache size from units of KB to units of MB and stores it in
    * the textbox element.
    */
-  updateCacheSizeInputField()
-  {
+  updateCacheSizeInputField() {
     let cacheSizeElem = document.getElementById("cacheSize");
     let cachePref = document.getElementById("browser.cache.disk.capacity");
     cacheSizeElem.value = cachePref.value / 1024;
     if (cachePref.locked)
       cacheSizeElem.disabled = true;
   },
 
   /**
    * Updates the cache size preference once user enters a new value.
    * We intentionally do not set preference="browser.cache.disk.capacity"
    * onto the textbox directly, as that would update the pref at each keypress
    * not only after the final value is entered.
    */
-  updateCacheSizePref()
-  {
+  updateCacheSizePref() {
     let cacheSizeElem = document.getElementById("cacheSize");
     let cachePref = document.getElementById("browser.cache.disk.capacity");
     // Converts the cache size as specified in UI (in MB) to KB.
     let intValue = parseInt(cacheSizeElem.value, 10);
     cachePref.value = isNaN(intValue) ? 0 : intValue * 1024;
   },
 
   /**
    * Clears the cache.
    */
-  clearCache()
-  {
+  clearCache() {
     try {
       var cache = Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
                             .getService(Components.interfaces.nsICacheStorageService);
       cache.clear();
     } catch (ex) {}
     this.updateActualCacheSize();
   },
 
   /**
    * Clears the application cache.
    */
-  clearOfflineAppCache()
-  {
+  clearOfflineAppCache() {
     Components.utils.import("resource:///modules/offlineAppCache.jsm");
     OfflineAppCacheHelper.clear();
 
     this.updateActualAppCacheSize();
     this.updateOfflineApps();
   },
 
   clearSiteData() {
@@ -514,26 +493,24 @@ var gAdvancedPane = {
 
     let result = Services.prompt.confirmEx(
       window, title, text, flags, btn0Label, null, null, null, {});
     if (result == 0) {
       SiteDataManager.removeAll();
     }
   },
 
-  readOfflineNotify()
-  {
+  readOfflineNotify() {
     var pref = document.getElementById("browser.offline-apps.notify");
     var button = document.getElementById("offlineNotifyExceptions");
     button.disabled = !pref.value;
     return pref.value;
   },
 
-  showOfflineExceptions()
-  {
+  showOfflineExceptions() {
     var bundlePreferences = document.getElementById("bundlePreferences");
     var params = { blockVisible     : false,
                    sessionVisible   : false,
                    allowVisible     : false,
                    prefilledHost    : "",
                    permissionType   : "offline-app",
                    manageCapability : Components.interfaces.nsIPermissionManager.DENY_ACTION,
                    windowTitle      : bundlePreferences.getString("offlinepermissionstitle"),
@@ -564,18 +541,17 @@ var gAdvancedPane = {
     }
 
     return usage;
   },
 
   /**
    * Updates the list of offline applications
    */
-  updateOfflineApps()
-  {
+  updateOfflineApps() {
     var pm = Components.classes["@mozilla.org/permissionmanager;1"]
                        .getService(Components.interfaces.nsIPermissionManager);
 
     var list = document.getElementById("offlineAppsList");
     while (list.firstChild) {
       list.removeChild(list.firstChild);
     }
 
@@ -605,29 +581,27 @@ var gAdvancedPane = {
         row.setAttribute("usage",
                          bundle.getFormattedString("offlineAppUsage",
                                                    converted));
         list.appendChild(row);
       }
     }
   },
 
-  offlineAppSelected()
-  {
+  offlineAppSelected() {
     var removeButton = document.getElementById("offlineAppsListRemove");
     var list = document.getElementById("offlineAppsList");
     if (list.selectedItem) {
       removeButton.setAttribute("disabled", "false");
     } else {
       removeButton.setAttribute("disabled", "true");
     }
   },
 
-  removeOfflineApp()
-  {
+  removeOfflineApp() {
     var list = document.getElementById("offlineAppsList");
     var item = list.selectedItem;
     var origin = item.getAttribute("origin");
     var principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(origin);
 
     var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                             .getService(Components.interfaces.nsIPromptService);
     var flags = prompts.BUTTON_TITLE_IS_STRING * prompts.BUTTON_POS_0 +
@@ -697,18 +671,17 @@ var gAdvancedPane = {
    *
    * Disabled states:
    * Element           pref  value  locked  disabled
    * radiogroup        i     t/f    f       false
    *                   i     t/f    *t*     *true*
    *                   ii    t/f    f       false
    *                   ii    t/f    *t*     *true*
    */
-  updateReadPrefs()
-  {
+  updateReadPrefs() {
     if (AppConstants.MOZ_UPDATER) {
       var enabledPref = document.getElementById("app.update.enabled");
       var autoPref = document.getElementById("app.update.auto");
       var radiogroup = document.getElementById("updateRadioGroup");
 
       if (!enabledPref.value)   // Don't care for autoPref.value in this case.
         radiogroup.value = "manual";    // 3. Never check for updates.
       else if (autoPref.value)  // enabledPref.value && autoPref.value
@@ -743,18 +716,17 @@ var gAdvancedPane = {
         }
       }
     }
   },
 
   /**
    * Sets the pref values based on the selected item of the radiogroup.
    */
-  updateWritePrefs()
-  {
+  updateWritePrefs() {
     if (AppConstants.MOZ_UPDATER) {
       var enabledPref = document.getElementById("app.update.enabled");
       var autoPref = document.getElementById("app.update.auto");
       var radiogroup = document.getElementById("updateRadioGroup");
       switch (radiogroup.value) {
         case "auto":      // 1. Automatically install updates for Desktop only
           enabledPref.value = true;
           autoPref.value = true;
@@ -768,18 +740,17 @@ var gAdvancedPane = {
           autoPref.value = false;
       }
     }
   },
 
   /**
    * Displays the history of installed updates.
    */
-  showUpdates()
-  {
+  showUpdates() {
     gSubDialog.open("chrome://mozapps/content/update/history.xul");
   },
 
   // ENCRYPTION TAB
 
   /*
    * Preferences:
    *
@@ -790,26 +761,24 @@ var gAdvancedPane = {
    *     "Ask Every Time"         present a dialog to the user so he can select
    *                              the certificate to use on a site which
    *                              requests one
    */
 
   /**
    * Displays the user's certificates and associated options.
    */
-  showCertificates()
-  {
+  showCertificates() {
     gSubDialog.open("chrome://pippki/content/certManager.xul");
   },
 
   /**
    * Displays a dialog from which the user can manage his security devices.
    */
-  showSecurityDevices()
-  {
+  showSecurityDevices() {
     gSubDialog.open("chrome://pippki/content/device_manager.xul");
   },
 
   observe(aSubject, aTopic, aData) {
     if (AppConstants.MOZ_UPDATER) {
       switch (aTopic) {
         case "nsPref:changed":
           this.updateReadPrefs();
--- a/browser/components/preferences/in-content/applications.js
+++ b/browser/components/preferences/in-content/applications.js
@@ -498,18 +498,17 @@ FeedHandlerInfo.prototype = {
         return null;
     }
   },
 
   set preferredApplicationHandler(aNewValue) {
     if (aNewValue instanceof Ci.nsILocalHandlerApp) {
       this.element(this._prefSelectedApp).value = aNewValue.executable;
       this.element(this._prefSelectedReader).value = "client";
-    }
-    else if (aNewValue instanceof Ci.nsIWebContentHandlerInfo) {
+    } else if (aNewValue instanceof Ci.nsIWebContentHandlerInfo) {
       this.element(this._prefSelectedWeb).value = aNewValue.uri;
       this.element(this._prefSelectedReader).value = "web";
       // Make the web handler be the new "auto handler" for feeds.
       // Note: we don't have to unregister the auto handler when the user picks
       // a non-web handler (local app, Live Bookmarks, etc.) because the service
       // only uses the "auto handler" when the selected reader is a web handler.
       // We also don't have to unregister it when the user turns on "always ask"
       // (i.e. preview in browser), since that also overrides the auto handler.
@@ -586,45 +585,42 @@ FeedHandlerInfo.prototype = {
   get _defaultApplicationHandler() {
     if (typeof this.__defaultApplicationHandler != "undefined")
       return this.__defaultApplicationHandler;
 
     var defaultFeedReader = null;
     if (AppConstants.HAVE_SHELL_SERVICE) {
       try {
         defaultFeedReader = this._shellSvc.defaultFeedReader;
-      }
-      catch (ex) {
+      } catch (ex) {
         // no default reader or _shellSvc is null
       }
     }
 
     if (defaultFeedReader) {
       let handlerApp = Cc["@mozilla.org/uriloader/local-handler-app;1"].
                        createInstance(Ci.nsIHandlerApp);
       handlerApp.name = getFileDisplayName(defaultFeedReader);
       handlerApp.QueryInterface(Ci.nsILocalHandlerApp);
       handlerApp.executable = defaultFeedReader;
 
       this.__defaultApplicationHandler = handlerApp;
-    }
-    else {
+    } else {
       this.__defaultApplicationHandler = null;
     }
 
     return this.__defaultApplicationHandler;
   },
 
   get hasDefaultHandler() {
     if (AppConstants.HAVE_SHELL_SERVICE) {
       try {
         if (this._shellSvc.defaultFeedReader)
           return true;
-      }
-      catch (ex) {
+      } catch (ex) {
         // no default reader or _shellSvc is null
       }
     }
 
     return false;
   },
 
   get defaultDescription() {
@@ -730,18 +726,17 @@ FeedHandlerInfo.prototype = {
       if (app instanceof Ci.nsILocalHandlerApp) {
         let pref = this.element(PREF_FEED_SELECTED_APP);
         var preferredAppFile = pref.value;
         if (preferredAppFile) {
           let preferredApp = getLocalHandlerApp(preferredAppFile);
           if (app.equals(preferredApp))
             pref.reset();
         }
-      }
-      else {
+      } else {
         app.QueryInterface(Ci.nsIWebContentHandlerInfo);
         this._converterSvc.removeContentHandler(app.contentType, app.uri);
       }
     }
     this._possibleApplicationHandlers._removed = [];
   },
 
 
@@ -869,18 +864,17 @@ var gApplicationsPane = {
 
   _ioSvc        : Cc["@mozilla.org/network/io-service;1"].
                   getService(Ci.nsIIOService),
 
 
   // Initialization & Destruction
 
   init() {
-    function setEventListener(aId, aEventType, aCallback)
-    {
+    function setEventListener(aId, aEventType, aCallback) {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gApplicationsPane));
     }
 
     // Initialize shortcuts to some commonly accessed elements & values.
     this._brandShortName =
       document.getElementById("bundleBrand").getString("brandShortName");
     this._prefsBundle = document.getElementById("bundlePreferences");
@@ -923,18 +917,17 @@ var gApplicationsPane = {
     // XXX should we be using the XUL sort service instead?
     if (document.getElementById("actionColumn").hasAttribute("sortDirection")) {
       this._sortColumn = document.getElementById("actionColumn");
       // The typeColumn element always has a sortDirection attribute,
       // either because it was persisted or because the default value
       // from the xul file was used.  If we are sorting on the other
       // column, we should remove it.
       document.getElementById("typeColumn").removeAttribute("sortDirection");
-    }
-    else
+    } else
       this._sortColumn = document.getElementById("typeColumn");
 
     // Load the data and build the list of handlers.
     // By doing this in a timeout, we let the preferences dialog resize itself
     // to an appropriate size before we add a bunch of items to the list.
     // Otherwise, if there are many items, and the Applications prefpane
     // is the one that gets displayed when the user first opens the dialog,
     // the dialog might stretch too much in an attempt to fit them all in.
@@ -1473,18 +1466,17 @@ var gApplicationsPane = {
     let canOpenWithOtherApp = true;
     if (AppConstants.platform == "win") {
       // On Windows, selecting an application to open another application
       // would be meaningless so we special case executables.
       let executableType = Cc["@mozilla.org/mime;1"].getService(Ci.nsIMIMEService)
                                                     .getTypeFromExtension("exe");
       canOpenWithOtherApp = handlerInfo.type != executableType;
     }
-    if (canOpenWithOtherApp)
-    {
+    if (canOpenWithOtherApp) {
       let menuItem = document.createElement("menuitem");
       menuItem.className = "choose-app-item";
       menuItem.addEventListener("command", function(e) {
         gApplicationsPane.chooseApp(e);
       });
       let label = this._prefsBundle.getString("useOtherApp");
       menuItem.setAttribute("label", label);
       menuItem.setAttribute("tooltiptext", label);
@@ -1606,18 +1598,17 @@ var gApplicationsPane = {
 
   // Changes
 
   onSelectAction(aActionItem) {
     this._storingAction = true;
 
     try {
       this._storeAction(aActionItem);
-    }
-    finally {
+    } finally {
       this._storingAction = false;
     }
   },
 
   _storeAction(aActionItem) {
     var typeItem = this._list.selectedItem;
     var handlerInfo = this._handledTypes[typeItem.type];
 
@@ -1881,18 +1872,17 @@ var gApplicationsPane = {
       let wrappedHandlerInfo = aHandlerInfo.wrappedHandlerInfo;
 
       if (wrappedHandlerInfo instanceof Ci.nsIMIMEInfo &&
           wrappedHandlerInfo instanceof Ci.nsIPropertyBag) {
         try {
           let url = wrappedHandlerInfo.getProperty("defaultApplicationIconURL");
           if (url)
             return url + "?size=16";
-        }
-        catch (ex) {}
+        } catch (ex) {}
       }
     }
 
     // If this isn't a MIME type object on an OS that supports retrieving
     // the icon, or if we couldn't retrieve the icon for some other reason,
     // then use a generic icon.
     return ICON_URL_APP;
   }
--- a/browser/components/preferences/in-content/content.js
+++ b/browser/components/preferences/in-content/content.js
@@ -11,20 +11,18 @@ XPCOMUtils.defineLazyGetter(this, "Alert
     alertsService.manualDoNotDisturb;
     return alertsService;
   } catch (ex) {
     return undefined;
   }
 });
 
 var gContentPane = {
-  init()
-  {
-    function setEventListener(aId, aEventType, aCallback)
-    {
+  init() {
+    function setEventListener(aId, aEventType, aCallback) {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gContentPane));
     }
 
     // Initializes the fonts dropdowns displayed in this pane.
     this._rebuildFonts();
     var menulist = document.getElementById("defaultFont");
     if (menulist.selectedIndex == -1) {
@@ -94,18 +92,17 @@ var gContentPane = {
   },
 
   // UTILITY FUNCTIONS
 
   /**
    * Utility function to enable/disable the button specified by aButtonID based
    * on the value of the Boolean preference specified by aPreferenceID.
    */
-  updateButtons(aButtonID, aPreferenceID)
-  {
+  updateButtons(aButtonID, aPreferenceID) {
     var button = document.getElementById(aButtonID);
     var preference = document.getElementById(aPreferenceID);
     button.disabled = preference.value != true;
     return undefined;
   },
 
   // BEGIN UI CODE
 
@@ -117,18 +114,17 @@ var gContentPane = {
    */
 
   // NOTIFICATIONS
 
   /**
    * Displays the notifications exceptions dialog where specific site notification
    * preferences can be set.
    */
-  showNotificationExceptions()
-  {
+  showNotificationExceptions() {
     let bundlePreferences = document.getElementById("bundlePreferences");
     let params = { permissionType: "desktop-notification" };
     params.windowTitle = bundlePreferences.getString("notificationspermissionstitle");
     params.introText = bundlePreferences.getString("notificationspermissionstext4");
 
     gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
                     "resizable=yes", params);
 
@@ -140,50 +136,47 @@ var gContentPane = {
 
 
   // POP-UPS
 
   /**
    * Displays the popup exceptions dialog where specific site popup preferences
    * can be set.
    */
-  showPopupExceptions()
-  {
+  showPopupExceptions() {
     var bundlePreferences = document.getElementById("bundlePreferences");
     var params = { blockVisible: false, sessionVisible: false, allowVisible: true,
                    prefilledHost: "", permissionType: "popup" }
     params.windowTitle = bundlePreferences.getString("popuppermissionstitle");
     params.introText = bundlePreferences.getString("popuppermissionstext");
 
     gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
                     "resizable=yes", params);
   },
 
   // FONTS
 
   /**
    * Populates the default font list in UI.
    */
-  _rebuildFonts()
-  {
+  _rebuildFonts() {
     var preferences = document.getElementById("contentPreferences");
     // Ensure preferences are "visible" to ensure bindings work.
     preferences.hidden = false;
     // Force flush:
     preferences.clientHeight;
     var langGroupPref = document.getElementById("font.language.group");
     this._selectDefaultLanguageGroup(langGroupPref.value,
                                      this._readDefaultFontTypeForLanguage(langGroupPref.value) == "serif");
   },
 
   /**
    *
    */
-  _selectDefaultLanguageGroup(aLanguageGroup, aIsSerif)
-  {
+  _selectDefaultLanguageGroup(aLanguageGroup, aIsSerif) {
     const kFontNameFmtSerif         = "font.name.serif.%LANG%";
     const kFontNameFmtSansSerif     = "font.name.sans-serif.%LANG%";
     const kFontNameListFmtSerif     = "font.name-list.serif.%LANG%";
     const kFontNameListFmtSansSerif = "font.name-list.sans-serif.%LANG%";
     const kFontSizeFmtVariable      = "font.size.variable.%LANG%";
 
     var preferences = document.getElementById("contentPreferences");
     var prefs = [{ format   : aIsSerif ? kFontNameFmtSerif : kFontNameFmtSansSerif,
@@ -223,18 +216,17 @@ var gContentPane = {
       }
     }
   },
 
   /**
    * Returns the type of the current default font for the language denoted by
    * aLanguageGroup.
    */
-  _readDefaultFontTypeForLanguage(aLanguageGroup)
-  {
+  _readDefaultFontTypeForLanguage(aLanguageGroup) {
     const kDefaultFontType = "font.default.%LANG%";
     var defaultFontTypePref = kDefaultFontType.replace(/%LANG%/, aLanguageGroup);
     var preference = document.getElementById(defaultFontTypePref);
     if (!preference) {
       preference = document.createElement("preference");
       preference.id = defaultFontTypePref;
       preference.setAttribute("name", defaultFontTypePref);
       preference.setAttribute("type", "string");
@@ -243,52 +235,46 @@ var gContentPane = {
     }
     return preference.value;
   },
 
   /**
    * Displays the fonts dialog, where web page font names and sizes can be
    * configured.
    */
-  configureFonts()
-  {
+  configureFonts() {
     gSubDialog.open("chrome://browser/content/preferences/fonts.xul", "resizable=no");
   },
 
   /**
    * Displays the colors dialog, where default web page/link/etc. colors can be
    * configured.
    */
-  configureColors()
-  {
+  configureColors() {
     gSubDialog.open("chrome://browser/content/preferences/colors.xul", "resizable=no");
   },
 
   // LANGUAGES
 
   /**
    * Shows a dialog in which the preferred language for web content may be set.
    */
-  showLanguages()
-  {
+  showLanguages() {
     gSubDialog.open("chrome://browser/content/preferences/languages.xul");
   },
 
   /**
    * Displays the translation exceptions dialog where specific site and language
    * translation preferences can be set.
    */
-  showTranslationExceptions()
-  {
+  showTranslationExceptions() {
     gSubDialog.open("chrome://browser/content/preferences/translation.xul");
   },
 
-  openTranslationProviderAttribution()
-  {
+  openTranslationProviderAttribution() {
     Components.utils.import("resource:///modules/translation/Translation.jsm");
     Translation.openProviderAttribution();
   },
 
-  toggleDoNotDisturbNotifications(event)
-  {
+  toggleDoNotDisturbNotifications(event) {
     AlertsServiceDND.manualDoNotDisturb = event.target.checked;
   },
 };
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -15,20 +15,18 @@ if (AppConstants.E10S_TESTING_ONLY) {
   XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
                                     "resource://gre/modules/UpdateUtils.jsm");
 }
 
 var gMainPane = {
   /**
    * Initialization of this.
    */
-  init()
-  {
-    function setEventListener(aId, aEventType, aCallback)
-    {
+  init() {
+    function setEventListener(aId, aEventType, aCallback) {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gMainPane));
     }
 
     if (AppConstants.HAVE_SHELL_SERVICE) {
       this.updateSetDefaultBrowser();
       if (AppConstants.platform == "win") {
         // In Windows 8 we launch the control panel since it's the only
@@ -116,18 +114,17 @@ var gMainPane = {
     }
 
     // Notify observers that the UI is now ready
     Components.classes["@mozilla.org/observer-service;1"]
               .getService(Components.interfaces.nsIObserverService)
               .notifyObservers(window, "main-pane-loaded", null);
   },
 
-  enableE10SChange()
-  {
+  enableE10SChange() {
     if (AppConstants.E10S_TESTING_ONLY) {
       let e10sCheckbox = document.getElementById("e10sAutoStart");
       let e10sPref = document.getElementById("browser.tabs.remote.autostart");
       let e10sTempPref = document.getElementById("e10sTempPref");
 
       let prefsToChange;
       if (e10sCheckbox.checked) {
         // Enabling e10s autostart
@@ -142,29 +139,28 @@ var gMainPane = {
 
       let buttonIndex = confirmRestartPrompt(e10sCheckbox.checked, 0,
                                              true, false);
       if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
         for (let prefToChange of prefsToChange) {
           prefToChange.value = e10sCheckbox.checked;
         }
 
-        Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit |  Ci.nsIAppStartup.eRestart);
+        Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
       }
 
       // Revert the checkbox in case we didn't quit
       e10sCheckbox.checked = e10sPref.value || e10sTempPref.value;
     }
   },
 
-  separateProfileModeChange()
-  {
+  separateProfileModeChange() {
     if (AppConstants.MOZ_DEV_EDITION) {
       function quitApp() {
-        Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit |  Ci.nsIAppStartup.eRestartNotSameProfile);
+        Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestartNotSameProfile);
       }
       function revertCheckbox(error) {
         separateProfileModeCheckbox.checked = !separateProfileModeCheckbox.checked;
         if (error) {
           Cu.reportError("Failed to toggle separate profile mode: " + error);
         }
       }
       function createOrRemoveSpecialDevEditionFile(onSuccess) {
@@ -236,18 +232,17 @@ var gMainPane = {
    *     2: the last page the user visited (DEPRECATED)
    *     3: windows and tabs from the last session (a.k.a. session restore)
    *
    *   The deprecated option is not exposed in UI; however, if the user has it
    *   selected and doesn't change the UI for this preference, the deprecated
    *   option is preserved.
    */
 
-  syncFromHomePref()
-  {
+  syncFromHomePref() {
     let homePref = document.getElementById("browser.startup.homepage");
 
     // If the pref is set to about:home or about:newtab, set the value to ""
     // to show the placeholder text (about:home title) rather than
     // exposing those URLs to users.
     let defaultBranch = Services.prefs.getDefaultBranch("");
     let defaultValue = defaultBranch.getComplexValue("browser.startup.homepage",
                                                      Ci.nsIPrefLocalizedString).data;
@@ -262,51 +257,48 @@ var gMainPane = {
     // to be shown.
     if (homePref.value == "")
       return "about:blank";
 
     // Otherwise, show the actual pref value.
     return undefined;
   },
 
-  syncToHomePref(value)
-  {
+  syncToHomePref(value) {
     // If the value is "", use about:home.
     if (value == "")
       return "about:home";
 
     // Otherwise, use the actual textbox value.
     return undefined;
   },
 
   /**
    * Sets the home page to the current displayed page (or frontmost tab, if the
    * most recent browser window contains multiple tabs), updating preference
    * window UI to reflect this.
    */
-  setHomePageToCurrent()
-  {
+  setHomePageToCurrent() {
     let homePage = document.getElementById("browser.startup.homepage");
     let tabs = this._getTabsForHomePage();
     function getTabURI(t) {
       return t.linkedBrowser.currentURI.spec;
     }
 
     // FIXME Bug 244192: using dangerous "|" joiner!
     if (tabs.length)
       homePage.value = tabs.map(getTabURI).join("|");
   },
 
   /**
    * Displays a dialog in which the user can select a bookmark to use as home
    * page.  If the user selects a bookmark, that bookmark's name is displayed in
    * UI and the bookmark's address is stored to the home page preference.
    */
-  setHomePageToBookmark()
-  {
+  setHomePageToBookmark() {
     var rv = { urls: null, names: null };
     gSubDialog.open("chrome://browser/content/preferences/selectBookmark.xul",
                     "resizable=yes, modal=yes", rv,
                     this._setHomePageToBookmarkClosed.bind(this, rv));
   },
 
   _setHomePageToBookmarkClosed(rv, aEvent) {
     if (aEvent.detail.button != "accept")
@@ -337,18 +329,17 @@ var gMainPane = {
     // In this case, the button's disabled state is set by preferences.xml.
     let prefName = "pref.browser.homepage.disable_button.current_page";
     if (document.getElementById(prefName).locked)
       return;
 
     useCurrent.disabled = !tabs.length
   },
 
-  _getTabsForHomePage()
-  {
+  _getTabsForHomePage() {
     var win;
     var tabs = [];
 
     const Cc = Components.classes, Ci = Components.interfaces;
     var wm = Cc["@mozilla.org/appshell/window-mediator;1"]
                 .getService(Ci.nsIWindowMediator);
     win = wm.getMostRecentWindow("navigator:browser");
 
@@ -361,26 +352,24 @@ var gMainPane = {
     }
 
     return tabs;
   },
 
   /**
    * Check to see if a tab is not about:preferences
    */
-  isNotAboutPreferences(aElement, aIndex, aArray)
-  {
+  isNotAboutPreferences(aElement, aIndex, aArray) {
     return !aElement.linkedBrowser.currentURI.spec.startsWith("about:preferences");
   },
 
   /**
    * Restores the default home page as the user's home page.
    */
-  restoreDefaultHomePage()
-  {
+  restoreDefaultHomePage() {
     var homePage = document.getElementById("browser.startup.homepage");
     homePage.value = homePage.defaultValue;
   },
 
   // DOWNLOADS
 
   /*
    * Preferences:
@@ -411,57 +400,54 @@ var gMainPane = {
    * browser.download.defaultFolder
    *   deprecated.
    */
 
   /**
    * Enables/disables the folder field and Browse button based on whether a
    * default download directory is being used.
    */
-  readUseDownloadDir()
-  {
+  readUseDownloadDir() {
     var downloadFolder = document.getElementById("downloadFolder");
     var chooseFolder = document.getElementById("chooseFolder");
     var preference = document.getElementById("browser.download.useDownloadDir");
     downloadFolder.disabled = !preference.value || preference.locked;
     chooseFolder.disabled = !preference.value || preference.locked;
 
     // don't override the preference's value in UI
     return undefined;
   },
 
   /**
    * Displays a file picker in which the user can choose the location where
    * downloads are automatically saved, updating preferences and UI in
    * response to the choice, if one is made.
    */
-  chooseFolder()
-  {
+  chooseFolder() {
     return this.chooseFolderTask().catch(Components.utils.reportError);
   },
-  chooseFolderTask: Task.async(function* ()
-  {
+  chooseFolderTask: Task.async(function* () {
     let bundlePreferences = document.getElementById("bundlePreferences");
     let title = bundlePreferences.getString("chooseDownloadFolderTitle");
     let folderListPref = document.getElementById("browser.download.folderList");
     let currentDirPref = yield this._indexToFolder(folderListPref.value);
     let defDownloads = yield this._indexToFolder(1);
     let fp = Components.classes["@mozilla.org/filepicker;1"].
              createInstance(Components.interfaces.nsIFilePicker);
 
     fp.init(window, title, Components.interfaces.nsIFilePicker.modeGetFolder);
     fp.appendFilters(Components.interfaces.nsIFilePicker.filterAll);
     // First try to open what's currently configured
     if (currentDirPref && currentDirPref.exists()) {
       fp.displayDirectory = currentDirPref;
-    } // Try the system's download dir
-    else if (defDownloads && defDownloads.exists()) {
+    } else if (defDownloads && defDownloads.exists()) {
+      // Try the system's download dir
       fp.displayDirectory = defDownloads;
-    } // Fall back to Desktop
-    else {
+    } else {
+      // Fall back to Desktop
       fp.displayDirectory = yield this._indexToFolder(0);
     }
 
     let result = yield new Promise(resolve => fp.open(resolve));
     if (result != Components.interfaces.nsIFilePicker.returnOK) {
       return;
     }
 
@@ -473,26 +459,24 @@ var gMainPane = {
     // this code executes. displayDownloadDirPref will be called on
     // the assignment above to update the UI.
   }),
 
   /**
    * Initializes the download folder display settings based on the user's
    * preferences.
    */
-  displayDownloadDirPref()
-  {
+  displayDownloadDirPref() {
     this.displayDownloadDirPrefTask().catch(Components.utils.reportError);
 
     // don't override the preference's value in UI
     return undefined;
   },
 
-  displayDownloadDirPrefTask: Task.async(function* ()
-  {
+  displayDownloadDirPrefTask: Task.async(function* () {
     var folderListPref = document.getElementById("browser.download.folderList");
     var bundlePreferences = document.getElementById("bundlePreferences");
     var downloadFolder = document.getElementById("downloadFolder");
     var currentDirPref = document.getElementById("browser.download.dir");
 
     // Used in defining the correct path to the folder icon.
     var ios = Components.classes["@mozilla.org/network/io-service;1"]
                         .getService(Components.interfaces.nsIIOService);
@@ -524,34 +508,32 @@ var gMainPane = {
       iconUrlSpec = fph.getURLSpecFromFile(yield this._getDownloadsFolder("Desktop"));
     }
     downloadFolder.image = "moz-icon://" + iconUrlSpec + "?size=16";
   }),
 
   /**
    * Returns the textual path of a folder in readable form.
    */
-  _getDisplayNameOfFile(aFolder)
-  {
+  _getDisplayNameOfFile(aFolder) {
     // TODO: would like to add support for 'Downloads on Macintosh HD'
     //       for OS X users.
     return aFolder ? aFolder.path : "";
   },
 
   /**
    * Returns the Downloads folder.  If aFolder is "Desktop", then the Downloads
    * folder returned is the desktop folder; otherwise, it is a folder whose name
    * indicates that it is a download folder and whose path is as determined by
    * the XPCOM directory service via the download manager's attribute
    * defaultDownloadsDirectory.
    *
    * @throws if aFolder is not "Desktop" or "Downloads"
    */
-  _getDownloadsFolder: Task.async(function* (aFolder)
-  {
+  _getDownloadsFolder: Task.async(function* (aFolder) {
     switch (aFolder) {
       case "Desktop":
         var fileLoc = Components.classes["@mozilla.org/file/directory_service;1"]
                                     .getService(Components.interfaces.nsIProperties);
         return fileLoc.get("Desk", Components.interfaces.nsILocalFile);
       case "Downloads":
         let downloadsDir = yield Downloads.getSystemDownloadsDirectory();
         return new FileUtils.File(downloadsDir);
@@ -564,52 +546,49 @@ var gMainPane = {
    *
    * @param   aFolder
    *          the folder whose type is to be determined
    * @returns integer
    *          0 if aFolder is the Desktop or is unspecified,
    *          1 if aFolder is the Downloads folder,
    *          2 otherwise
    */
-  _folderToIndex: Task.async(function* (aFolder)
-  {
+  _folderToIndex: Task.async(function* (aFolder) {
     if (!aFolder || aFolder.equals(yield this._getDownloadsFolder("Desktop")))
       return 0;
     else if (aFolder.equals(yield this._getDownloadsFolder("Downloads")))
       return 1;
     return 2;
   }),
 
   /**
    * Converts an integer into the corresponding folder.
    *
    * @param   aIndex
    *          an integer
    * @returns the Desktop folder if aIndex == 0,
    *          the Downloads folder if aIndex == 1,
    *          the folder stored in browser.download.dir
    */
-  _indexToFolder: Task.async(function* (aIndex)
-  {
+  _indexToFolder: Task.async(function* (aIndex) {
     switch (aIndex) {
       case 0:
         return yield this._getDownloadsFolder("Desktop");
       case 1:
         return yield this._getDownloadsFolder("Downloads");
     }
     var currentDirPref = document.getElementById("browser.download.dir");
     return currentDirPref.value;
   }),
 
   /**
    * Hide/show the "Show my windows and tabs from last time" option based
    * on the value of the browser.privatebrowsing.autostart pref.
    */
-  updateBrowserStartupLastSession()
-  {
+  updateBrowserStartupLastSession() {
     let pbAutoStartPref = document.getElementById("browser.privatebrowsing.autostart");
     let startupPref = document.getElementById("browser.startup.page");
     let menu = document.getElementById("browserStartupPage");
     let option = document.getElementById("browserStartupLastSession");
     if (pbAutoStartPref.value) {
       option.setAttribute("disabled", "true");
       if (option.selected) {
         menu.selectedItem = document.getElementById("browserStartupHomePage");
@@ -672,18 +651,17 @@ var gMainPane = {
    * - true if a default-browser check (and prompt to make it so if necessary)
    *   occurs at startup, false otherwise
    */
 
   /**
    * Show button for setting browser as default browser or information that
    * browser is already the default browser.
    */
-  updateSetDefaultBrowser()
-  {
+  updateSetDefaultBrowser() {
     if (AppConstants.HAVE_SHELL_SERVICE) {
       let shellSvc = getShellService();
       let defaultBrowserBox = document.getElementById("defaultBrowserBox");
       if (!shellSvc) {
         defaultBrowserBox.hidden = true;
         return;
       }
       let setDefaultPane = document.getElementById("setDefaultPane");
@@ -693,18 +671,17 @@ var gMainPane = {
       alwaysCheck.disabled = alwaysCheck.disabled ||
                              isDefault && alwaysCheck.checked;
     }
   },
 
   /**
    * Set browser as the operating system default browser.
    */
-  setDefaultBrowser()
-  {
+  setDefaultBrowser() {
     if (AppConstants.HAVE_SHELL_SERVICE) {
       let alwaysCheckPref = document.getElementById("browser.shell.checkDefaultBrowser");
       alwaysCheckPref.value = true;
 
       let shellSvc = getShellService();
       if (!shellSvc)
         return;
       try {
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -111,20 +111,18 @@ var gPrivacyPane = {
 
     checkbox.checked = true;
   },
 
   /**
    * Sets up the UI for the number of days of history to keep, and updates the
    * label of the "Clear Now..." button.
    */
-  init()
-  {
-    function setEventListener(aId, aEventType, aCallback)
-    {
+  init() {
+    function setEventListener(aId, aEventType, aCallback) {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gPrivacyPane));
     }
 
     this._updateSanitizeSettingsButton();
     this.initializeHistoryMode();
     this.updateHistoryModePane();
     this.updatePrivacyMicroControls();
@@ -277,40 +275,37 @@ var gPrivacyPane = {
         return false;
     }
     return true;
   },
 
   /**
    * Initialize the history mode menulist based on the privacy preferences
    */
-  initializeHistoryMode()
-  {
+  initializeHistoryMode() {
     let mode;
     let getVal = aPref => document.getElementById(aPref).value;
 
     if (getVal("privacy.history.custom"))
       mode = "custom";
     else if (this._checkHistoryValues(this.prefsForKeepingHistory)) {
       if (getVal("browser.privatebrowsing.autostart"))
         mode = "dontremember";
       else
         mode = "remember";
-    }
-    else
+    } else
       mode = "custom";
 
     document.getElementById("historyMode").value = mode;
   },
 
   /**
    * Update the selected pane based on the history mode menulist
    */
-  updateHistoryModePane()
-  {
+  updateHistoryModePane() {
     let selectedIndex = -1;
     switch (document.getElementById("historyMode").value) {
     case "remember":
       selectedIndex = 0;
       break;
     case "dontremember":
       selectedIndex = 1;
       break;
@@ -321,18 +316,17 @@ var gPrivacyPane = {
     document.getElementById("historyPane").selectedIndex = selectedIndex;
     document.getElementById("privacy.history.custom").value = selectedIndex == 2;
   },
 
   /**
    * Update the private browsing auto-start pref and the history mode
    * micro-management prefs based on the history mode menulist
    */
-  updateHistoryModePrefs()
-  {
+  updateHistoryModePrefs() {
     let pref = document.getElementById("browser.privatebrowsing.autostart");
     switch (document.getElementById("historyMode").value) {
     case "remember":
       if (pref.value)
         pref.value = false;
 
       // select the remember history option if needed
       let rememberHistoryCheckbox = document.getElementById("rememberHistory");
@@ -356,18 +350,17 @@ var gPrivacyPane = {
       break;
     }
   },
 
   /**
    * Update the privacy micro-management controls based on the
    * value of the private browsing auto-start checkbox.
    */
-  updatePrivacyMicroControls()
-  {
+  updatePrivacyMicroControls() {
     if (document.getElementById("historyMode").value == "custom") {
       let disabled = this._autoStartPrivateBrowsing =
         document.getElementById("privateBrowsingAutoStart").checked;
       this.dependentControls.forEach(function(aElement) {
         let control = document.getElementById(aElement);
         let preferenceId = control.getAttribute("preference");
         if (!preferenceId) {
           let dependentControlId = control.getAttribute("control");
@@ -408,18 +401,17 @@ var gPrivacyPane = {
     }
   },
 
   // PRIVATE BROWSING
 
   /**
    * Initialize the starting state for the auto-start private browsing mode pref reverter.
    */
-  initAutoStartPrivateBrowsingReverter()
-  {
+  initAutoStartPrivateBrowsingReverter() {
     let mode = document.getElementById("historyMode");
     let autoStart = document.getElementById("privateBrowsingAutoStart");
     this._lastMode = mode.selectedIndex;
     this._lastCheckState = autoStart.hasAttribute('checked');
   },
 
   _lastMode: null,
   _lastCheckState: null,
@@ -442,17 +434,17 @@ var gPrivacyPane = {
       }
 
       let buttonIndex = confirmRestartPrompt(autoStart.checked, 1,
                                              true, false);
       if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
         pref.value = autoStart.hasAttribute('checked');
         let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"]
                            .getService(Ci.nsIAppStartup);
-        appStartup.quit(Ci.nsIAppStartup.eAttemptQuit |  Ci.nsIAppStartup.eRestart);
+        appStartup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
         return;
       }
 
       this._shouldPromptForRestart = false;
 
       if (this._lastCheckState) {
         autoStart.checked = "checked";
       } else {
@@ -485,18 +477,17 @@ var gPrivacyPane = {
    */
   showContainerSettings() {
     gotoPref("containers");
   },
 
   /**
    * Displays the available block lists for tracking protection.
    */
-  showBlockLists()
-  {
+  showBlockLists() {
     var bundlePreferences = document.getElementById("bundlePreferences");
     let brandName = document.getElementById("bundleBrand")
                             .getString("brandShortName");
     var params = { brandShortName: brandName,
                    windowTitle: bundlePreferences.getString("blockliststitle"),
                    introText: bundlePreferences.getString("blockliststext") };
     gSubDialog.open("chrome://browser/content/preferences/blocklists.xul",
                     null, params);
@@ -540,18 +531,17 @@ var gPrivacyPane = {
    *     2   means keep cookies until the browser is closed
    */
 
   /**
    * Reads the network.cookie.cookieBehavior preference value and
    * enables/disables the rest of the cookie UI accordingly, returning true
    * if cookies are enabled.
    */
-  readAcceptCookies()
-  {
+  readAcceptCookies() {
     var pref = document.getElementById("network.cookie.cookieBehavior");
     var acceptThirdPartyLabel = document.getElementById("acceptThirdPartyLabel");
     var acceptThirdPartyMenu = document.getElementById("acceptThirdPartyMenu");
     var keepUntil = document.getElementById("keepUntil");
     var menu = document.getElementById("keepCookiesUntil");
 
     // enable the rest of the UI for anything other than "disable all cookies"
     var acceptCookies = (pref.value != 2);
@@ -561,105 +551,97 @@ var gPrivacyPane = {
 
     return acceptCookies;
   },
 
   /**
    * Enables/disables the "keep until" label and menulist in response to the
    * "accept cookies" checkbox being checked or unchecked.
    */
-  writeAcceptCookies()
-  {
+  writeAcceptCookies() {
     var accept = document.getElementById("acceptCookies");
     var acceptThirdPartyMenu = document.getElementById("acceptThirdPartyMenu");
 
     // if we're enabling cookies, automatically select 'accept third party always'
     if (accept.checked)
       acceptThirdPartyMenu.selectedIndex = 0;
 
     return accept.checked ? 0 : 2;
   },
 
   /**
    * Converts between network.cookie.cookieBehavior and the third-party cookie UI
    */
-  readAcceptThirdPartyCookies()
-  {
+  readAcceptThirdPartyCookies() {
     var pref = document.getElementById("network.cookie.cookieBehavior");
-    switch (pref.value)
-    {
+    switch (pref.value) {
       case 0:
         return "always";
       case 1:
         return "never";
       case 2:
         return "never";
       case 3:
         return "visited";
       default:
         return undefined;
     }
   },
 
-  writeAcceptThirdPartyCookies()
-  {
+  writeAcceptThirdPartyCookies() {
     var accept = document.getElementById("acceptThirdPartyMenu").selectedItem;
-    switch (accept.value)
-    {
+    switch (accept.value) {
       case "always":
         return 0;
       case "visited":
         return 3;
       case "never":
         return 1;
       default:
         return undefined;
     }
   },
 
   /**
    * Displays fine-grained, per-site preferences for cookies.
    */
-  showCookieExceptions()
-  {
+  showCookieExceptions() {
     var bundlePreferences = document.getElementById("bundlePreferences");
     var params = { blockVisible   : true,
                    sessionVisible : true,
                    allowVisible   : true,
                    prefilledHost  : "",
                    permissionType : "cookie",
                    windowTitle    : bundlePreferences.getString("cookiepermissionstitle"),
                    introText      : bundlePreferences.getString("cookiepermissionstext") };
     gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
                     null, params);
   },
 
   /**
    * Displays all the user's cookies in a dialog.
    */
-  showCookies(aCategory)
-  {
+  showCookies(aCategory) {
     gSubDialog.open("chrome://browser/content/preferences/cookies.xul");
   },
 
   // CLEAR PRIVATE DATA
 
   /*
    * Preferences:
    *
    * privacy.sanitize.sanitizeOnShutdown
    * - true if the user's private data is cleared on startup according to the
    *   Clear Private Data settings, false otherwise
    */
 
   /**
    * Displays the Clear Private Data settings dialog.
    */
-  showClearPrivateDataSettings()
-  {
+  showClearPrivateDataSettings() {
     gSubDialog.open("chrome://browser/content/preferences/sanitize.xul", "resizable=no");
   },
 
 
   /**
    * Displays a dialog from which individual parts of private data may be
    * cleared.
    */
@@ -699,17 +681,16 @@ var gPrivacyPane = {
    *
    * privacy.userContext.enabled
    * - true if containers is enabled
    */
 
    /**
     * Enables/disables the Settings button used to configure containers
     */
-   readBrowserContainersCheckbox()
-   {
+   readBrowserContainersCheckbox() {
      var pref = document.getElementById("privacy.userContext.enabled");
      var settings = document.getElementById("browserContainersSettings");
 
      settings.disabled = !pref.value;
    }
 
 };
--- a/browser/components/preferences/in-content/search.js
+++ b/browser/components/preferences/in-content/search.js
@@ -17,18 +17,17 @@ var gSearchPane = {
   /**
    * Initialize autocomplete to ensure prefs are in sync.
    */
   _initAutocomplete() {
     Components.classes["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"]
               .getService(Components.interfaces.mozIPlacesAutoComplete);
   },
 
-  init()
-  {
+  init() {
     gEngineView = new EngineView(new EngineStore());
     document.getElementById("engineList").view = gEngineView;
     this.buildDefaultEngineDropDown();
 
     let addEnginesLink = document.getElementById("addEngines");
     let searchEnginesURL = Services.wm.getMostRecentWindow('navigator:browser')
                                       .BrowserSearch.searchEnginesURL;
     addEnginesLink.setAttribute("href", searchEnginesURL);
@@ -217,18 +216,17 @@ var gSearchPane = {
 
     if (aEvent.charCode == KeyEvent.DOM_VK_SPACE) {
       // Space toggles the checkbox.
       let newValue = !gEngineView._engineStore.engines[index].shown;
       gEngineView.setCellValue(index, tree.columns.getFirstColumn(),
                                newValue.toString());
       // Prevent page from scrolling on the space key.
       aEvent.preventDefault();
-    }
-    else {
+    } else {
       let isMac = Services.appinfo.OS == "Darwin";
       if ((isMac && aEvent.keyCode == KeyEvent.DOM_VK_RETURN) ||
           (!isMac && aEvent.keyCode == KeyEvent.DOM_VK_F2)) {
         tree.startEditing(index, tree.columns.getLastColumn());
       } else if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE ||
                  (isMac && aEvent.shiftKey &&
                   aEvent.keyCode == KeyEvent.DOM_VK_BACK_SPACE &&
                   gEngineView.isEngineSelectedAndRemovable())) {
--- a/browser/components/preferences/in-content/security.js
+++ b/browser/components/preferences/in-content/security.js
@@ -8,20 +8,18 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 var gSecurityPane = {
   _pane: null,
 
   /**
    * Initializes master password UI.
    */
-  init()
-  {
-    function setEventListener(aId, aEventType, aCallback)
-    {
+  init() {
+    function setEventListener(aId, aEventType, aCallback) {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gSecurityPane));
     }
 
     this._pane = document.getElementById("paneSecurity");
     this._initMasterPasswordUI();
     this._initSafeBrowsing();
 
@@ -47,32 +45,30 @@ var gSecurityPane = {
    *   provided by the site may be installed from it, false if the extension
    *   may be directly installed after a confirmation dialog
    */
 
   /**
    * Enables/disables the add-ons Exceptions button depending on whether
    * or not add-on installation warnings are displayed.
    */
-  readWarnAddonInstall()
-  {
+  readWarnAddonInstall() {
     var warn = document.getElementById("xpinstall.whitelist.required");
     var exceptions = document.getElementById("addonExceptions");
 
     exceptions.disabled = !warn.value;
 
     // don't override the preference value
     return undefined;
   },
 
   /**
    * Displays the exceptions lists for add-on installation warnings.
    */
-  showAddonExceptions()
-  {
+  showAddonExceptions() {
     var bundlePrefs = document.getElementById("bundlePreferences");
 
     var params = this._addonParams;
     if (!params.windowTitle || !params.introText) {
       params.windowTitle = bundlePrefs.getString("addons_permissions_title");
       params.introText = bundlePrefs.getString("addonspermissionstext");
     }
 
@@ -101,18 +97,17 @@ var gSecurityPane = {
    * - true if passwords are remembered, false otherwise
    */
 
   /**
    * Enables/disables the Exceptions button used to configure sites where
    * passwords are never saved. When browser is set to start in Private
    * Browsing mode, the "Remember passwords" UI is useless, so we disable it.
    */
-  readSavePasswords()
-  {
+  readSavePasswords() {
     var pref = document.getElementById("signon.rememberSignons");
     var excepts = document.getElementById("passwordExceptions");
 
     if (PrivateBrowsingUtils.permanentPrivateBrowsing) {
       document.getElementById("savePasswords").disabled = true;
       excepts.disabled = true;
       return false;
     }
@@ -120,18 +115,17 @@ var gSecurityPane = {
     // don't override pref value in UI
     return undefined;
   },
 
   /**
    * Displays a dialog in which the user can view and modify the list of sites
    * where passwords are never saved.
    */
-  showPasswordExceptions()
-  {
+  showPasswordExceptions() {
     var bundlePrefs = document.getElementById("bundlePreferences");
     var params = {
       blockVisible: true,
       sessionVisible: false,
       allowVisible: false,
       hideStatusColumn: true,
       prefilledHost: "",
       permissionType: "login-saving",
@@ -144,18 +138,17 @@ var gSecurityPane = {
   },
 
   /**
    * Initializes master password UI: the "use master password" checkbox, selects
    * the master password button to show, and enables/disables it as necessary.
    * The master password is controlled by various bits of NSS functionality, so
    * the UI for it can't be controlled by the normal preference bindings.
    */
-  _initMasterPasswordUI()
-  {
+  _initMasterPasswordUI() {
     var noMP = !LoginHelper.isMasterPasswordSet();
 
     var button = document.getElementById("changeMasterPassword");
     button.disabled = noMP;
 
     var checkbox = document.getElementById("useMasterPassword");
     checkbox.checked = !noMP;
   },
@@ -233,18 +226,17 @@ var gSecurityPane = {
     blockUncommonUnwanted.checked = blockUnwantedPref.value && blockUncommonPref.value;
   },
 
   /**
    * Enables/disables the master password button depending on the state of the
    * "use master password" checkbox, and prompts for master password removal if
    * one is set.
    */
-  updateMasterPasswordButton()
-  {
+  updateMasterPasswordButton() {
     var checkbox = document.getElementById("useMasterPassword");
     var button = document.getElementById("changeMasterPassword");
     button.disabled = !checkbox.checked;
 
     // unchecking the checkbox should try to immediately remove the master
     // password, because it's impossible to non-destructively remove the master
     // password used to encrypt all the passwords without providing it (by
     // design), and it would be extremely odd to pop up that dialog when the
@@ -257,46 +249,42 @@ var gSecurityPane = {
     this._initMasterPasswordUI();
   },
 
   /**
    * Displays the "remove master password" dialog to allow the user to remove
    * the current master password.  When the dialog is dismissed, master password
    * UI is automatically updated.
    */
-  _removeMasterPassword()
-  {
+  _removeMasterPassword() {
     var secmodDB = Cc["@mozilla.org/security/pkcs11moduledb;1"].
                    getService(Ci.nsIPKCS11ModuleDB);
     if (secmodDB.isFIPSEnabled) {
       var promptService = Cc["@mozilla.org/embedcomp/prompt-service;1"].
                           getService(Ci.nsIPromptService);
       var bundle = document.getElementById("bundlePreferences");
       promptService.alert(window,
                           bundle.getString("pw_change_failed_title"),
                           bundle.getString("pw_change2empty_in_fips_mode"));
       this._initMasterPasswordUI();
-    }
-    else {
+    } else {
       gSubDialog.open("chrome://mozapps/content/preferences/removemp.xul",
                       null, null, this._initMasterPasswordUI.bind(this));
     }
   },
 
   /**
    * Displays a dialog in which the master password may be changed.
    */
-  changeMasterPassword()
-  {
+  changeMasterPassword() {
     gSubDialog.open("chrome://mozapps/content/preferences/changemp.xul",
                     "resizable=no", null, this._initMasterPasswordUI.bind(this));
   },
 
   /**
    * Shows the sites where the user has saved passwords and the associated login
    * information.
    */
-  showPasswords()
-  {
+  showPasswords() {
     gSubDialog.open("chrome://passwordmgr/content/passwordManager.xul");
   }
 
 };
--- a/browser/components/preferences/in-content/sync.js
+++ b/browser/components/preferences/in-content/sync.js
@@ -92,18 +92,17 @@ var gSyncPane = {
     } catch (e) {}
     if (!username) {
       this.page = FXA_PAGE_LOGGED_OUT;
     } else if (xps.fxAccountsEnabled) {
       // Use cached values while we wait for the up-to-date values
       let cachedComputerName;
       try {
         cachedComputerName = Services.prefs.getCharPref("services.sync.client.name");
-      }
-      catch (e) {
+      } catch (e) {
         cachedComputerName = "";
       }
       document.getElementById("fxaEmailAddress1").textContent = username;
       this._populateComputerName(cachedComputerName);
       this.page = FXA_PAGE_LOGGED_IN;
     } else { // Old Sync
       this.page = PAGE_HAS_ACCOUNT;
     }
@@ -191,18 +190,17 @@ var gSyncPane = {
     if (save) {
       let textbox = document.getElementById("fxaSyncComputerName");
       Weave.Service.clientsEngine.localName = textbox.value;
     }
     this._populateComputerName(Weave.Service.clientsEngine.localName);
   },
 
   _setupEventListeners() {
-    function setEventListener(aId, aEventType, aCallback)
-    {
+    function setEventListener(aId, aEventType, aCallback) {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gSyncPane));
     }
 
     setEventListener("noAccountSetup", "click", function(aEvent) {
       aEvent.stopPropagation();
       gSyncPane.openSetup(null);
     });
--- a/browser/components/preferences/in-content/tests/browser_cookies_exceptions.js
+++ b/browser/components/preferences/in-content/tests/browser_cookies_exceptions.js
@@ -224,18 +224,17 @@ var testRunner = {
     this._currentTest++;
 
     info("Running test #" + (this._currentTest + 1) + "\n");
     let that = this;
     let p = this.runCurrentTest(this._currentTest + 1);
     p.then(function() {
       if (that._currentTest == that.tests.length - 1) {
         finish();
-      }
-      else {
+      } else {
         that.runTests();
       }
     });
   },
 
   runCurrentTest(testNumber) {
     return new Promise(function(resolve, reject) {
 
@@ -277,17 +276,17 @@ var testRunner = {
 
               let permission = aSubject.QueryInterface(Ci.nsIPermission);
               let expected = testRunner.tests[testRunner._currentTest].observances.shift();
 
               is(aData, expected.data, "type of message should be the same");
               for (let prop of ["type", "capability"]) {
                 if (expected[prop])
                   is(permission[prop], expected[prop],
-                    "property: \"" + prop  + "\" should be equal");
+                    "property: \"" + prop + "\" should be equal");
               }
 
               if (expected.origin) {
                 is(permission.principal.origin, expected.origin,
                    "property: \"origin\" should be equal");
               }
 
               os.removeObserver(permObserver, "perm-changed");
--- a/browser/components/preferences/in-content/tests/privacypane_tests_perwindow.js
+++ b/browser/components/preferences/in-content/tests/privacypane_tests_perwindow.js
@@ -215,17 +215,17 @@ function test_dependent_prefs(win) {
   ok(thirdPartyCookieMenu, "the third-party cookie control should exist");
 
   function expect_checked(checked) {
     controls.forEach(function(control) {
       is(control.checked, checked,
         control.getAttribute("id") + " should " + (checked ? "not " : "") + "be checked");
     });
 
-    is(thirdPartyCookieMenu.value == "always" || thirdPartyCookieMenu.value == "visited", checked, "third-party cookies should "  + (checked ? "not " : "") + "be limited");
+    is(thirdPartyCookieMenu.value == "always" || thirdPartyCookieMenu.value == "visited", checked, "third-party cookies should " + (checked ? "not " : "") + "be limited");
   }
 
   // controls should be checked in remember mode
   historymode.value = "remember";
   controlChanged(historymode);
   expect_checked(true);
 
   // even if they're unchecked in custom mode
--- a/browser/components/preferences/languages.js
+++ b/browser/components/preferences/languages.js
@@ -5,54 +5,48 @@
 
 var gLanguagesDialog = {
 
   _availableLanguagesList : [],
   _acceptLanguages        : { },
 
   _selectedItemID         : null,
 
-  init()
-  {
+  init() {
     if (!this._availableLanguagesList.length)
       this._loadAvailableLanguages();
   },
 
   // Ugly hack used to trigger extra reflow in order to work around XUL bug 1194844;
   // see bug 1194346.
-  forceReflow()
-  {
+  forceReflow() {
     this._activeLanguages.style.fontKerning = "none";
     setTimeout("gLanguagesDialog._activeLanguages.style.removeProperty('font-kerning')", 0);
   },
 
-  get _activeLanguages()
-  {
+  get _activeLanguages() {
     return document.getElementById("activeLanguages");
   },
 
-  get _availableLanguages()
-  {
+  get _availableLanguages() {
     return document.getElementById("availableLanguages");
   },
 
-  _loadAvailableLanguages()
-  {
+  _loadAvailableLanguages() {
     // This is a parser for: resource://gre/res/language.properties
     // The file is formatted like so:
     // ab[-cd].accept=true|false
     //  ab = language
     //  cd = region
     var bundleAccepted    = document.getElementById("bundleAccepted");
     var bundleRegions     = document.getElementById("bundleRegions");
     var bundleLanguages   = document.getElementById("bundleLanguages");
     var bundlePreferences = document.getElementById("bundlePreferences");
 
-    function LanguageInfo(aName, aABCD, aIsVisible)
-    {
+    function LanguageInfo(aName, aABCD, aIsVisible) {
       this.name = aName;
       this.abcd = aABCD;
       this.isVisible = aIsVisible;
     }
 
     // 1) Read the available languages out of language.properties
     var strings = bundleAccepted.strings;
     while (strings.hasMoreElements()) {
@@ -66,25 +60,23 @@ var gLanguagesDialog = {
         var abCDPairs = abCD.split("-");      // ab[-cd]
         var useABCDFormat = abCDPairs.length > 1;
         var ab = useABCDFormat ? abCDPairs[0] : abCD;
         var cd = useABCDFormat ? abCDPairs[1] : "";
         if (ab) {
           var language = "";
           try {
             language = bundleLanguages.getString(ab);
-          }
-          catch (e) { continue; }
+          } catch (e) { continue; }
 
           var region = "";
           if (useABCDFormat) {
             try {
               region = bundleRegions.getString(cd);
-            }
-            catch (e) { continue; }
+            } catch (e) { continue; }
           }
 
           var name = "";
           if (useABCDFormat)
             name = bundlePreferences.getFormattedString("languageRegionCodeFormat",
                                                         [language, region, abCD]);
           else
             name = bundlePreferences.getFormattedString("languageCodeFormat",
@@ -97,18 +89,17 @@ var gLanguagesDialog = {
             this._availableLanguagesList.push(li);
           }
         }
       }
     }
     this._buildAvailableLanguageList();
   },
 
-  _buildAvailableLanguageList()
-  {
+  _buildAvailableLanguageList() {
     var availableLanguagesPopup = document.getElementById("availableLanguagesPopup");
     while (availableLanguagesPopup.hasChildNodes())
       availableLanguagesPopup.removeChild(availableLanguagesPopup.firstChild);
 
     // Sort the list of languages by name
     this._availableLanguagesList.sort(function(a, b) {
                                         return a.name.localeCompare(b.name);
                                       });
@@ -121,18 +112,17 @@ var gLanguagesDialog = {
         var menuitem = document.createElement("menuitem");
         menuitem.id = this._availableLanguagesList[i].abcd;
         availableLanguagesPopup.appendChild(menuitem);
         menuitem.setAttribute("label", this._availableLanguagesList[i].name);
       }
     }
   },
 
-  readAcceptLanguages()
-  {
+  readAcceptLanguages() {
     while (this._activeLanguages.hasChildNodes())
       this._activeLanguages.removeChild(this._activeLanguages.firstChild);
 
     var selectedIndex = 0;
     var preference = document.getElementById("intl.accept_languages");
     if (preference.value == "")
       return undefined;
     var languages = preference.value.toLowerCase().split(/\s*,\s*/);
@@ -155,31 +145,28 @@ var gLanguagesDialog = {
     if (this._activeLanguages.childNodes.length > 0) {
       this._activeLanguages.ensureIndexIsVisible(selectedIndex);
       this._activeLanguages.selectedIndex = selectedIndex;
     }
 
     return undefined;
   },
 
-  writeAcceptLanguages()
-  {
+  writeAcceptLanguages() {
     return undefined;
   },
 
-  onAvailableLanguageSelect()
-  {
+  onAvailableLanguageSelect() {
     var addButton = document.getElementById("addButton");
     addButton.disabled = false;
 
     this._availableLanguages.removeAttribute("accesskey");
   },
 
-  addLanguage()
-  {
+  addLanguage() {
     var selectedID = this._availableLanguages.selectedItem.id;
     var preference = document.getElementById("intl.accept_languages");
     var arrayOfPrefs = preference.value.toLowerCase().split(/\s*,\s*/);
     for (var i = 0; i < arrayOfPrefs.length; ++i ) {
       if (arrayOfPrefs[i] == selectedID)
         return;
     }
 
@@ -196,18 +183,17 @@ var gLanguagesDialog = {
     this._availableLanguages.selectedItem = null;
 
     // Rebuild the available list with the added item removed...
     this._buildAvailableLanguageList();
 
     this._availableLanguages.setAttribute("label", this._availableLanguages.getAttribute("label2"));
   },
 
-  removeLanguage()
-  {
+  removeLanguage() {
     // Build the new preference value string.
     var languagesArray = [];
     for (var i = 0; i < this._activeLanguages.childNodes.length; ++i) {
       var item = this._activeLanguages.childNodes[i];
       if (!item.selected)
         languagesArray.push(item.id);
       else
         this._acceptLanguages[item.id] = false;
@@ -224,29 +210,27 @@ var gLanguagesDialog = {
 
     // Update the preference and force a UI rebuild
     var preference = document.getElementById("intl.accept_languages");
     preference.value = string;
 
     this._buildAvailableLanguageList();
   },
 
-  _getLanguageName(aABCD)
-  {
+  _getLanguageName(aABCD) {
     if (!this._availableLanguagesList.length)
       this._loadAvailableLanguages();
     for (var i = 0; i < this._availableLanguagesList.length; ++i) {
       if (aABCD == this._availableLanguagesList[i].abcd)
         return this._availableLanguagesList[i].name;
     }
     return "";
   },
 
-  moveUp()
-  {
+  moveUp() {
     var selectedItem = this._activeLanguages.selectedItems[0];
     var previousItem = selectedItem.previousSibling;
 
     var string = "";
     for (var i = 0; i < this._activeLanguages.childNodes.length; ++i) {
       var item = this._activeLanguages.childNodes[i];
       string += (i == 0 ? "" : ",");
       if (item.id == previousItem.id)
@@ -259,18 +243,17 @@ var gLanguagesDialog = {
 
     this._selectedItemID = selectedItem.id;
 
     // Update the preference and force a UI rebuild
     var preference = document.getElementById("intl.accept_languages");
     preference.value = string;
   },
 
-  moveDown()
-  {
+  moveDown() {
     var selectedItem = this._activeLanguages.selectedItems[0];
     var nextItem = selectedItem.nextSibling;
 
     var string = "";
     for (var i = 0; i < this._activeLanguages.childNodes.length; ++i) {
       var item = this._activeLanguages.childNodes[i];
       string += (i == 0 ? "" : ",");
       if (item.id == nextItem.id)
@@ -283,18 +266,17 @@ var gLanguagesDialog = {
 
     this._selectedItemID = selectedItem.id;
 
     // Update the preference and force a UI rebuild
     var preference = document.getElementById("intl.accept_languages");
     preference.value = string;
   },
 
-  onLanguageSelect()
-  {
+  onLanguageSelect() {
     var upButton = document.getElementById("up");
     var downButton = document.getElementById("down");
     var removeButton = document.getElementById("remove");
     switch (this._activeLanguages.selectedCount) {
     case 0:
       upButton.disabled = downButton.disabled = removeButton.disabled = true;
       break;
     case 1:
--- a/browser/components/preferences/permissions.js
+++ b/browser/components/preferences/permissions.js
@@ -4,18 +4,17 @@
 
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 const nsIPermissionManager = Components.interfaces.nsIPermissionManager;
 const nsICookiePermission = Components.interfaces.nsICookiePermission;
 
 const NOTIFICATION_FLUSH_PERMISSIONS = "flush-pending-permissions";
 
-function Permission(principal, type, capability)
-{
+function Permission(principal, type, capability) {
   this.principal = principal;
   this.origin = principal.origin;
   this.type = type;
   this.capability = capability;
 }
 
 var gPermissionManager = {
   _type                 : "",
@@ -23,22 +22,20 @@ var gPermissionManager = {
   _permissionsToAdd     : new Map(),
   _permissionsToDelete  : new Map(),
   _bundle               : null,
   _tree                 : null,
   _observerRemoved      : false,
 
   _view: {
     _rowCount: 0,
-    get rowCount()
-    {
+    get rowCount() {
       return this._rowCount;
     },
-    getCellText(aRow, aColumn)
-    {
+    getCellText(aRow, aColumn) {
       if (aColumn.id == "siteCol")
         return gPermissionManager._permissions[aRow].origin;
       else if (aColumn.id == "statusCol")
         return gPermissionManager._permissions[aRow].capability;
       return "";
     },
 
     isSeparator(aIndex) { return false; },
@@ -54,18 +51,17 @@ var gPermissionManager = {
     getCellProperties(row, column) {
       if (column.element.getAttribute("id") == "siteCol")
         return "ltr";
 
       return "";
     }
   },
 
-  _getCapabilityString(aCapability)
-  {
+  _getCapabilityString(aCapability) {
     var stringKey = null;
     switch (aCapability) {
     case nsIPermissionManager.ALLOW_ACTION:
       stringKey = "can";
       break;
     case nsIPermissionManager.DENY_ACTION:
       stringKey = "cannot";
       break;
@@ -74,18 +70,17 @@ var gPermissionManager = {
       break;
     case nsICookiePermission.ACCESS_SESSION:
       stringKey = "canSession";
       break;
     }
     return this._bundle.getString(stringKey);
   },
 
-  addPermission(aCapability)
-  {
+  addPermission(aCapability) {
     var textbox = document.getElementById("url");
     var input_url = textbox.value.replace(/^\s*/, ""); // trim any leading space
     let principal;
     try {
       // The origin accessor on the principal object will throw if the
       // principal doesn't have a canonical origin representation. This will
       // help catch cases where the URI parser parsed something like
       // `localhost:8080` as having the scheme `localhost`, rather than being
@@ -126,104 +121,94 @@ var gPermissionManager = {
         break;
       }
     }
 
     let permissionParams = {principal, type: this._type, capability: aCapability};
     if (!permissionExists) {
       this._permissionsToAdd.set(principal.origin, permissionParams);
       this._addPermission(permissionParams);
-    }
-    else if (!capabilityExists) {
+    } else if (!capabilityExists) {
       this._permissionsToAdd.set(principal.origin, permissionParams);
       this._handleCapabilityChange();
     }
 
     textbox.value = "";
     textbox.focus();
 
     // covers a case where the site exists already, so the buttons don't disable
     this.onHostInput(textbox);
 
     // enable "remove all" button as needed
     document.getElementById("removeAllPermissions").disabled = this._permissions.length == 0;
   },
 
-  _removePermission(aPermission)
-  {
+  _removePermission(aPermission) {
     this._removePermissionFromList(aPermission.principal);
 
     // If this permission was added during this session, let's remove
     // it from the pending adds list to prevent calls to the
     // permission manager.
     let isNewPermission = this._permissionsToAdd.delete(aPermission.principal.origin);
 
     if (!isNewPermission) {
       this._permissionsToDelete.set(aPermission.principal.origin, aPermission);
     }
 
   },
 
-  _handleCapabilityChange()
-  {
+  _handleCapabilityChange() {
     // Re-do the sort, if the status changed from Block to Allow
     // or vice versa, since if we're sorted on status, we may no
     // longer be in order.
     if (this._lastPermissionSortColumn == "statusCol") {
       this._resortPermissions();
     }
     this._tree.treeBoxObject.invalidate();
   },
 
-  _addPermission(aPermission)
-  {
+  _addPermission(aPermission) {
     this._addPermissionToList(aPermission);
     ++this._view._rowCount;
     this._tree.treeBoxObject.rowCountChanged(this._view.rowCount - 1, 1);
     // Re-do the sort, since we inserted this new item at the end.
     this._resortPermissions();
   },
 
-  _resortPermissions()
-  {
+  _resortPermissions() {
     gTreeUtils.sort(this._tree, this._view, this._permissions,
                     this._lastPermissionSortColumn,
                     this._permissionsComparator,
                     this._lastPermissionSortColumn,
                     !this._lastPermissionSortAscending); // keep sort direction
   },
 
-  onHostInput(aSiteField)
-  {
+  onHostInput(aSiteField) {
     document.getElementById("btnSession").disabled = !aSiteField.value;
     document.getElementById("btnBlock").disabled = !aSiteField.value;
     document.getElementById("btnAllow").disabled = !aSiteField.value;
   },
 
-  onWindowKeyPress(aEvent)
-  {
+  onWindowKeyPress(aEvent) {
     if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE)
       window.close();
   },
 
-  onHostKeyPress(aEvent)
-  {
+  onHostKeyPress(aEvent) {
     if (aEvent.keyCode == KeyEvent.DOM_VK_RETURN)
       document.getElementById("btnAllow").click();
   },
 
-  onLoad()
-  {
+  onLoad() {
     this._bundle = document.getElementById("bundlePreferences");
     var params = window.arguments[0];
     this.init(params);
   },
 
-  init(aParams)
-  {
+  init(aParams) {
     if (this._type) {
       // reusing an open dialog, clear the old observer
       this.uninit();
     }
 
     this._type = aParams.permissionType;
     this._manageCapability = aParams.manageCapability;
 
@@ -270,138 +255,126 @@ var gPermissionManager = {
     Services.obs.notifyObservers(null, NOTIFICATION_FLUSH_PERMISSIONS, this._type);
     Services.obs.addObserver(this, "perm-changed", false);
 
     this._loadPermissions();
 
     urlField.focus();
   },
 
-  uninit()
-  {
+  uninit() {
     if (!this._observerRemoved) {
       Services.obs.removeObserver(this, "perm-changed");
 
       this._observerRemoved = true;
     }
   },
 
-  observe(aSubject, aTopic, aData)
-  {
+  observe(aSubject, aTopic, aData) {
     if (aTopic == "perm-changed") {
       var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission);
 
       // Ignore unrelated permission types.
       if (permission.type != this._type)
         return;
 
       if (aData == "added") {
         this._addPermission(permission);
-      }
-      else if (aData == "changed") {
+      } else if (aData == "changed") {
         for (var i = 0; i < this._permissions.length; ++i) {
           if (permission.matches(this._permissions[i].principal, true)) {
             this._permissions[i].capability = this._getCapabilityString(permission.capability);
             break;
           }
         }
         this._handleCapabilityChange();
-      }
-      else if (aData == "deleted") {
+      } else if (aData == "deleted") {
         this._removePermissionFromList(permission.principal);
       }
     }
   },
 
-  onPermissionSelected()
-  {
+  onPermissionSelected() {
     var hasSelection = this._tree.view.selection.count > 0;
     var hasRows = this._tree.view.rowCount > 0;
     document.getElementById("removePermission").disabled = !hasRows || !hasSelection;
     document.getElementById("removeAllPermissions").disabled = !hasRows;
   },
 
-  onPermissionDeleted()
-  {
+  onPermissionDeleted() {
     if (!this._view.rowCount)
       return;
     var removedPermissions = [];
     gTreeUtils.deleteSelectedItems(this._tree, this._view, this._permissions, removedPermissions);
     for (var i = 0; i < removedPermissions.length; ++i) {
       var p = removedPermissions[i];
       this._removePermission(p);
     }
     document.getElementById("removePermission").disabled = !this._permissions.length;
     document.getElementById("removeAllPermissions").disabled = !this._permissions.length;
   },
 
-  onAllPermissionsDeleted()
-  {
+  onAllPermissionsDeleted() {
     if (!this._view.rowCount)
       return;
     var removedPermissions = [];
     gTreeUtils.deleteAll(this._tree, this._view, this._permissions, removedPermissions);
     for (var i = 0; i < removedPermissions.length; ++i) {
       var p = removedPermissions[i];
       this._removePermission(p);
     }
     document.getElementById("removePermission").disabled = true;
     document.getElementById("removeAllPermissions").disabled = true;
   },
 
-  onPermissionKeyPress(aEvent)
-  {
+  onPermissionKeyPress(aEvent) {
     if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) {
       this.onPermissionDeleted();
     } else if (AppConstants.platform == "macosx" &&
                aEvent.keyCode == KeyEvent.DOM_VK_BACK_SPACE) {
       this.onPermissionDeleted();
     }
   },
 
   _lastPermissionSortColumn: "",
   _lastPermissionSortAscending: false,
-  _permissionsComparator(a, b)
-  {
+  _permissionsComparator(a, b) {
     return a.toLowerCase().localeCompare(b.toLowerCase());
   },
 
 
-  onPermissionSort(aColumn)
-  {
+  onPermissionSort(aColumn) {
     this._lastPermissionSortAscending = gTreeUtils.sort(this._tree,
                                                         this._view,
                                                         this._permissions,
                                                         aColumn,
                                                         this._permissionsComparator,
                                                         this._lastPermissionSortColumn,
                                                         this._lastPermissionSortAscending);
     this._lastPermissionSortColumn = aColumn;
   },
 
-  onApplyChanges()
-  {
+  onApplyChanges() {
     // Stop observing permission changes since we are about
     // to write out the pending adds/deletes and don't need
     // to update the UI
     this.uninit();
 
     for (let permissionParams of this._permissionsToAdd.values()) {
       Services.perms.addFromPrincipal(permissionParams.principal, permissionParams.type, permissionParams.capability);
     }
 
     for (let p of this._permissionsToDelete.values()) {
       Services.perms.removeFromPrincipal(p.principal, p.type);
     }
 
     window.close();
   },
 
-  _loadPermissions()
-  {
+  _loadPermissions() {
     this._tree = document.getElementById("permissionsTree");
     this._permissions = [];
 
     // load permissions into a table
     var enumerator = Services.perms.enumerator;
     while (enumerator.hasMoreElements()) {
       var nextPermission = enumerator.getNext().QueryInterface(Components.interfaces.nsIPermission);
       this._addPermissionToList(nextPermission);
@@ -412,51 +385,46 @@ var gPermissionManager = {
     // sort and display the table
     this._tree.view = this._view;
     this.onPermissionSort("origin");
 
     // disable "remove all" button if there are none
     document.getElementById("removeAllPermissions").disabled = this._permissions.length == 0;
   },
 
-  _addPermissionToList(aPermission)
-  {
+  _addPermissionToList(aPermission) {
     if (aPermission.type == this._type &&
         (!this._manageCapability ||
          (aPermission.capability == this._manageCapability))) {
 
       var principal = aPermission.principal;
       var capabilityString = this._getCapabilityString(aPermission.capability);
       var p = new Permission(principal,
                              aPermission.type,
                              capabilityString);
       this._permissions.push(p);
     }
   },
 
-  _removePermissionFromList(aPrincipal)
-  {
+  _removePermissionFromList(aPrincipal) {
     for (let i = 0; i < this._permissions.length; ++i) {
       if (this._permissions[i].principal.equals(aPrincipal)) {
         this._permissions.splice(i, 1);
         this._view._rowCount--;
         this._tree.treeBoxObject.rowCountChanged(this._view.rowCount - 1, -1);
         this._tree.treeBoxObject.invalidate();
         break;
       }
     }
   },
 
-  setOrigin(aOrigin)
-  {
+  setOrigin(aOrigin) {
     document.getElementById("url").value = aOrigin;
   }
 };
 
-function setOrigin(aOrigin)
-{
+function setOrigin(aOrigin) {
   gPermissionManager.setOrigin(aOrigin);
 }
 
-function initWithParams(aParams)
-{
+function initWithParams(aParams) {
   gPermissionManager.init(aParams);
 }
--- a/browser/components/preferences/selectBookmark.js
+++ b/browser/components/preferences/selectBookmark.js
@@ -67,17 +67,16 @@ var SelectBookmarkDialog = {
       for (var i = 0; i < cc; ++i) {
         var node = contents.getChild(i);
         if (PlacesUtils.nodeIsURI(node)) {
           urls.push(node.uri);
           names.push(node.title);
         }
       }
       contents.containerOpen = false;
-    }
-    else {
+    } else {
       urls.push(selectedNode.uri);
       names.push(selectedNode.title);
     }
     window.arguments[0].urls = urls;
     window.arguments[0].names = names;
   }
 };
--- a/browser/components/preferences/translation.js
+++ b/browser/components/preferences/translation.js
@@ -11,18 +11,17 @@ Cu.import("resource://gre/modules/XPCOMU
 Cu.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "gLangBundle", () =>
   Services.strings.createBundle("chrome://global/locale/languageNames.properties"));
 
 const kPermissionType = "translate";
 const kLanguagesPref = "browser.translation.neverForLanguages";
 
-function Tree(aId, aData)
-{
+function Tree(aId, aData) {
   this._data = aData;
   this._tree = document.getElementById(aId);
   this._tree.view = this;
 }
 
 Tree.prototype = {
   get boxObject() {
     return this._tree.treeBoxObject;
@@ -75,18 +74,17 @@ Tree.prototype = {
     return "";
   },
   getCellProperties(row, column) {
     return "";
   },
   QueryInterface: XPCOMUtils.generateQI([Ci.nsITreeView])
 };
 
-function Lang(aCode)
-{
+function Lang(aCode) {
   this.langCode = aCode;
   this._label = gLangBundle.GetStringFromName(aCode);
 }
 
 Lang.prototype = {
   toString() {
     return this._label;
   }
@@ -136,44 +134,41 @@ var gTranslationExceptions = {
 
   observe(aSubject, aTopic, aData) {
     if (aTopic == "perm-changed") {
       if (aData == "cleared") {
         if (!this._sites.length)
           return;
         let removed = this._sites.splice(0, this._sites.length);
         this._siteTree.boxObject.rowCountChanged(0, -removed.length);
-      }
-      else {
+      } else {
         let perm = aSubject.QueryInterface(Ci.nsIPermission);
         if (perm.type != kPermissionType)
           return;
 
         if (aData == "added") {
           if (perm.capability != Services.perms.DENY_ACTION)
             return;
           this._sites.push(perm.principal.origin);
           this._sites.sort();
           let boxObject = this._siteTree.boxObject;
           boxObject.rowCountChanged(0, 1);
           boxObject.invalidate();
-        }
-        else if (aData == "deleted") {
+        } else if (aData == "deleted") {
           let index = this._sites.indexOf(perm.principal.origin);
           if (index == -1)
             return;
           this._sites.splice(index, 1);
           this._siteTree.boxObject.rowCountChanged(index, -1);
           this.onSiteSelected();
           return;
         }
       }
       this.onSiteSelected();
-    }
-    else if (aTopic == "nsPref:changed") {
+    } else if (aTopic == "nsPref:changed") {
       this._langs = this.getLanguageExceptions();
       let change = this._langs.length - this._langTree.rowCount;
       this._langTree._data = this._langs;
       let boxObject = this._langTree.boxObject;
       if (change)
         boxObject.rowCountChanged(0, change);
       boxObject.invalidate();
       this.onLanguageSelected();
--- a/browser/components/safebrowsing/content/test/head.js
+++ b/browser/components/safebrowsing/content/test/head.js
@@ -14,18 +14,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
  * @param [optional] url
  *        The url to load, or the current url.
  * @param [optional] event
  *        The load event type to wait for.  Defaults to "load".
  * @return {Promise} resolved when the event is handled.
  * @resolves to the received event
  * @rejects if a valid load event is not received within a meaningful interval
  */
-function promiseTabLoadEvent(tab, url, eventType = "load")
-{
+function promiseTabLoadEvent(tab, url, eventType = "load") {
   info(`Wait tab event: ${eventType}`);
 
   function handle(loadedUrl) {
     if (loadedUrl === "about:blank" || (url && loadedUrl !== url)) {
       info(`Skipping spurious load event for ${loadedUrl}`);
       return false;
     }
 
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -296,18 +296,17 @@
             return;
 
           this._textbox.showHistoryPopup();
 
           if (this._textbox.value) {
             // showHistoryPopup does a startSearch("") call, ensure the
             // controller handles the text from the input box instead:
             this._textbox.mController.handleText();
-          }
-          else if (aShowOnlySettingsIfEmpty) {
+          } else if (aShowOnlySettingsIfEmpty) {
             this.setAttribute("showonlysettings", "true");
           }
         ]]></body>
       </method>
 
       <method name="selectEngine">
         <parameter name="aEvent"/>
         <parameter name="isNextEngine"/>
@@ -335,23 +334,21 @@
           var where = "current";
           let params;
 
           // Open ctrl/cmd clicks on one-off buttons in a new background tab.
           if (aEvent && aEvent.originalTarget.getAttribute("anonid") == "search-go-button") {
             if (aEvent.button == 2)
               return;
             where = whereToOpenLink(aEvent, false, true);
-          }
-          else if (aForceNewTab) {
+          } else if (aForceNewTab) {
             where = "tab";
             if (Services.prefs.getBoolPref("browser.tabs.loadInBackground"))
               where += "-background";
-          }
-          else {
+          } else {
             var newTabPref = Services.prefs.getBoolPref("browser.search.openintab");
             if (((aEvent instanceof KeyboardEvent) && aEvent.altKey) ^ newTabPref)
               where = "tab";
             if ((aEvent instanceof MouseEvent) &&
                 (aEvent.button == 1 || aEvent.getModifierState("Accel"))) {
               where = "tab";
               params = {
                 inBackground: true,
@@ -467,18 +464,17 @@
         } else if (target.classList.contains("addengine-item")) {
           // Select the installed engine if the installation succeeds
           var installCallback = {
             onSuccess: engine => this.currentEngine = engine
           }
           Services.search.addEngine(target.getAttribute("uri"), null,
                                     target.getAttribute("src"), false,
                                     installCallback);
-        }
-        else
+        } else
           return;
 
         this.focus();
         this.select();
       ]]></handler>
 
       <handler event="DOMMouseScroll"
                phase="capturing"
@@ -1026,18 +1022,17 @@
       </field>
 
       <method name="updateHeader">
         <body><![CDATA[
           let currentEngine = Services.search.currentEngine;
           let uri = currentEngine.iconURI;
           if (uri) {
             this.setAttribute("src", uri.spec);
-          }
-          else {
+          } else {
             // If the default has just been changed to a provider without icon,
             // avoid showing the icon of the previous default provider.
             this.removeAttribute("src");
           }
 
           let headerText = this.bundle.formatStringFromName("searchHeader",
                                                             [currentEngine.name], 1);
           document.getAnonymousElementByAttribute(this, "anonid", "searchbar-engine-name")
@@ -1093,18 +1088,17 @@
                                                            "tree")
         if (searchbar.hasAttribute("showonlysettings")) {
           searchbar.removeAttribute("showonlysettings");
           this.setAttribute("showonlysettings", "true");
 
           // Setting this with an xbl-inherited attribute gets overridden the
           // second time the user clicks the glass icon for some reason...
           tree.collapsed = true;
-        }
-        else {
+        } else {
           this.removeAttribute("showonlysettings");
           // Uncollapse as long as we have a tree with a view which has >= 1 row.
           // The autocomplete binding itself will take care of uncollapsing later,
           // if we currently have no rows but end up having some in the future
           // when the search string changes
           tree.collapsed = !tree.view || !tree.view.rowCount;
         }
 
@@ -1431,18 +1425,17 @@
           if (this.selectedButton && !isOneOffSelected)
             this.selectedButton = null;
           if (this.query) {
             groupText = headerSearchText.previousSibling.value +
                         '"' + headerSearchText.value + '"' +
                         headerSearchText.nextSibling.value;
             if (!isOneOffSelected)
               headerPanel.selectedIndex = 1;
-          }
-          else {
+          } else {
             let noSearchHeader =
               document.getAnonymousElementByAttribute(this, "anonid",
                                                       "searchbar-oneoffheader-search");
             groupText = noSearchHeader.value;
             if (!isOneOffSelected)
               headerPanel.selectedIndex = 0;
           }
           list.setAttribute("aria-label", groupText);
@@ -1725,18 +1718,17 @@
             val.setAttribute("selected", "true");
             if (val.classList.contains("searchbar-engine-one-off-item") &&
                 val.engine) {
               let headerEngineText =
                 document.getAnonymousElementByAttribute(this, "anonid",
                                                         "searchbar-oneoffheader-engine");
               header.selectedIndex = 2;
               headerEngineText.value = val.engine.name;
-            }
-            else {
+            } else {
               header.selectedIndex = this.query ? 1 : 0;
             }
             if (this.textbox) {
               this.textbox.setAttribute("aria-activedescendant", val.id);
             }
           } else {
             val = null;
             header.selectedIndex = this.query ? 1 : 0;
@@ -1803,18 +1795,17 @@
           // Open ctrl/cmd clicks on one-off buttons in a new background tab.
           if (aForceNewTab) {
             where = "tab";
             if (Services.prefs.getBoolPref("browser.tabs.loadInBackground")) {
               params = {
                 inBackground: true,
               };
             }
-          }
-          else {
+          } else {
             var newTabPref = Services.prefs.getBoolPref("browser.search.openintab");
             if (((aEvent instanceof KeyboardEvent) && aEvent.altKey) ^ newTabPref)
               where = "tab";
             if ((aEvent instanceof MouseEvent) &&
                 (aEvent.button == 1 || aEvent.getModifierState("Accel"))) {
               where = "tab";
               params = {
                 inBackground: true,
@@ -1940,29 +1931,25 @@
           // But only if non-Shift modifiers aren't also pressed, to avoid
           // clobbering other shortcuts.
           if (event.keyCode == KeyEvent.DOM_VK_TAB &&
               !event.altKey &&
               !event.ctrlKey &&
               !event.metaKey &&
               this.getAttribute("disabletab") != "true") {
             stopEvent = this.advanceSelection(!event.shiftKey, false, true);
-          }
-
-          // Alt + up/down is very similar to (shift +) tab but differs in that
-          // it loops through the list, whereas tab will move the focus out.
-          else if (event.altKey &&
-                   (event.keyCode == KeyEvent.DOM_VK_DOWN ||
-                    event.keyCode == KeyEvent.DOM_VK_UP)) {
+          } else if (event.altKey &&
+                     (event.keyCode == KeyEvent.DOM_VK_DOWN ||
+                      event.keyCode == KeyEvent.DOM_VK_UP)) {
+            // Alt + up/down is very similar to (shift +) tab but differs in that
+            // it loops through the list, whereas tab will move the focus out.
             stopEvent =
               this.advanceSelection(event.keyCode == KeyEvent.DOM_VK_DOWN,
                                     true, false);
-          }
-
-          else if (event.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_UP) {
+          } else if (event.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_UP) {
             if (numListItems > 0) {
               if (this.popup.selectedIndex > 0) {
                 // The autocomplete controller should handle this case.
               } else if (this.popup.selectedIndex == 0) {
                 if (!allowEmptySelection) {
                   // Wrap around the selection to the last one-off.
                   this.selectedButton = null;
                   this.popup.selectedIndex = -1;
@@ -1980,19 +1967,17 @@
                   this.selectedButton = null;
                 } else {
                   stopEvent = this.advanceSelection(false, true, true);
                 }
               }
             } else {
               stopEvent = this.advanceSelection(false, true, true);
             }
-          }
-
-          else if (event.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_DOWN) {
+          } else if (event.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_DOWN) {
             if (numListItems > 0) {
               if (this.popup.selectedIndex >= 0 &&
                   this.popup.selectedIndex < numListItems - 1) {
                 // The autocomplete controller should handle this case.
               } else if (this.popup.selectedIndex == numListItems - 1) {
                 this.selectedButton = null;
                 if (!allowEmptySelection) {
                   this.popup.selectedIndex = -1;
@@ -2017,30 +2002,28 @@
                   stopEvent = this.advanceSelection(true, true, true);
                 } else {
                   // The autocomplete controller should handle this case.
                 }
               }
             } else {
               stopEvent = this.advanceSelection(true, true, true);
             }
-          }
-
-          // If the add-engine overflow menu item is selected and the user
-          // presses the right arrow key, open the submenu.  Unfortunately
-          // handling the left arrow key -- to close the popup -- isn't
-          // straightforward.  Once the popup is open, it consumes all key
-          // events.  Setting ignorekeys=handled on it doesn't help, since the
-          // popup handles all arrow keys.  Setting ignorekeys=true on it does
-          // mean that the popup no longer consumes the left arrow key, but then
-          // it no longer handles up/down keys to select items in the popup.
-          else if (this.selectedButton &&
-                   this.selectedButton.getAttribute("anonid") ==
-                     "addengine-menu-button" &&
-                   event.keyCode == KeyEvent.DOM_VK_RIGHT) {
+          } else if (this.selectedButton &&
+                     this.selectedButton.getAttribute("anonid") ==
+                       "addengine-menu-button" &&
+                     event.keyCode == KeyEvent.DOM_VK_RIGHT) {
+            // If the add-engine overflow menu item is selected and the user
+            // presses the right arrow key, open the submenu.  Unfortunately
+            // handling the left arrow key -- to close the popup -- isn't
+            // straightforward.  Once the popup is open, it consumes all key
+            // events.  Setting ignorekeys=handled on it doesn't help, since the
+            // popup handles all arrow keys.  Setting ignorekeys=true on it does
+            // mean that the popup no longer consumes the left arrow key, but then
+            // it no longer handles up/down keys to select items in the popup.
             this.selectedButton.open = true;
             stopEvent = true;
           }
 
           if (stopEvent) {
             event.preventDefault();
             event.stopPropagation();
             return true;
--- a/browser/components/search/test/browser_426329.js
+++ b/browser/components/search/test/browser_426329.js
@@ -6,21 +6,21 @@ function expectedURL(aSearchTerms) {
   var textToSubURI = Cc["@mozilla.org/intl/texttosuburi;1"].
                      getService(Ci.nsITextToSubURI);
   var searchArg = textToSubURI.ConvertAndEscape("utf-8", aSearchTerms);
   return ENGINE_HTML_BASE + "?test=" + searchArg;
 }
 
 function simulateClick(aEvent, aTarget) {
   var event = document.createEvent("MouseEvent");
-  var ctrlKeyArg  = aEvent.ctrlKey  || false;
-  var altKeyArg   = aEvent.altKey   || false;
+  var ctrlKeyArg  = aEvent.ctrlKey || false;
+  var altKeyArg   = aEvent.altKey || false;
   var shiftKeyArg = aEvent.shiftKey || false;
-  var metaKeyArg  = aEvent.metaKey  || false;
-  var buttonArg   = aEvent.button   || 0;
+  var metaKeyArg  = aEvent.metaKey || false;
+  var buttonArg   = aEvent.button || 0;
   event.initMouseEvent("click", true, true, window,
                         0, 0, 0, 0, 0,
                         ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg,
                         buttonArg, null);
   aTarget.dispatchEvent(event);
 }
 
 // modified from toolkit/components/satchel/test/test_form_autocomplete.html
--- a/browser/components/search/test/browser_aboutSearchReset.js
+++ b/browser/components/search/test/browser_aboutSearchReset.js
@@ -120,18 +120,17 @@ var gTests = [
     yield promiseTabLoadEvent(gBrowser.selectedTab, "about:mozilla");
 
     checkTelemetryRecords(TELEMETRY_RESULT_ENUM.CLOSED_PAGE);
   }
 },
 
 ];
 
-function test()
-{
+function test() {
   waitForExplicitFinish();
   Task.spawn(function* () {
     let oldCanRecord = Services.telemetry.canRecordExtended;
     Services.telemetry.canRecordExtended = true;
     checkTelemetryRecords();
 
     for (let testCase of gTests) {
       info(testCase.desc);
--- a/browser/components/search/test/browser_amazon_behavior.js
+++ b/browser/components/search/test/browser_amazon_behavior.js
@@ -93,18 +93,17 @@ function test() {
           }
           tab.linkedBrowser.removeEventListener("load", load, true);
 
           // Observe page setup
           let win = gBrowser.contentWindowAsCPOW;
           if (win.gSearch.currentEngineName ==
               Services.search.currentEngine.name) {
             doSearch(win.document);
-          }
-          else {
+          } else {
             info("Waiting for newtab search init");
             win.addEventListener("ContentSearchService", function done(contentSearchServiceEvent) {
               info("Got newtab search event " + contentSearchServiceEvent.detail.type);
               if (contentSearchServiceEvent.detail.type == "State") {
                 win.removeEventListener("ContentSearchService", done);
                 // Let gSearch respond to the event before continuing.
                 executeSoon(() => doSearch(win.document));
               }
--- a/browser/components/search/test/browser_bing_behavior.js
+++ b/browser/components/search/test/browser_bing_behavior.js
@@ -93,18 +93,17 @@ function test() {
           }
           tab.linkedBrowser.removeEventListener("load", load, true);
 
           // Observe page setup
           let win = gBrowser.contentWindowAsCPOW;
           if (win.gSearch.currentEngineName ==
               Services.search.currentEngine.name) {
             doSearch(win.document);
-          }
-          else {
+          } else {
             info("Waiting for newtab search init");
             win.addEventListener("ContentSearchService", function done(contentSearchServiceEvent) {
               info("Got newtab search event " + contentSearchServiceEvent.detail.type);
               if (contentSearchServiceEvent.detail.type == "State") {
                 win.removeEventListener("ContentSearchService", done);
                 // Let gSearch respond to the event before continuing.
                 executeSoon(() => doSearch(win.document));
               }
--- a/browser/components/search/test/browser_google_behavior.js
+++ b/browser/components/search/test/browser_google_behavior.js
@@ -91,18 +91,17 @@ function test() {
           }
           tab.linkedBrowser.removeEventListener("load", load, true);
 
           // Observe page setup
           let win = gBrowser.contentWindowAsCPOW;
           if (win.gSearch.currentEngineName ==
               Services.search.currentEngine.name) {
             doSearch(win.document);
-          }
-          else {
+          } else {
             info("Waiting for newtab search init");
             win.addEventListener("ContentSearchService", function done(searchServiceEvent) {
               info("Got newtab search event " + searchServiceEvent.detail.type);
               if (searchServiceEvent.detail.type == "State") {
                 win.removeEventListener("ContentSearchService", done);
                 // Let gSearch respond to the event before continuing.
                 executeSoon(() => doSearch(win.document));
               }
--- a/browser/components/search/test/browser_google_codes.js
+++ b/browser/components/search/test/browser_google_codes.js
@@ -7,18 +7,17 @@ const kUrlPref = "geoSpecificDefaults.ur
 const BROWSER_SEARCH_PREF = "browser.search.";
 
 var originalGeoURL;
 
 /**
  * Clean the profile of any cache file left from a previous run.
  * Returns a boolean indicating if the cache file existed.
  */
-function removeCacheFile()
-{
+function removeCacheFile() {
   const CACHE_FILENAME = "search.json.mozlz4";
 
   let file =  Services.dirsvc.get("ProfD", Ci.nsIFile);
   file.append(CACHE_FILENAME);
   if (file.exists()) {
     file.remove(false);
     return true;
   }
--- a/browser/components/search/test/browser_oneOffHeader.js
+++ b/browser/components/search/test/browser_oneOffHeader.js
@@ -39,18 +39,17 @@ const scale = utils.screenPixelsPerCSSPi
 function* synthesizeNativeMouseMove(aElement) {
   let rect = aElement.getBoundingClientRect();
   let win = aElement.ownerGlobal;
   let x = win.mozInnerScreenX + (rect.left + rect.right) / 2;
   let y = win.mozInnerScreenY + (rect.top + rect.bottom) / 2;
 
   // Wait for the mouseup event to occur before continuing.
   return new Promise((resolve, reject) => {
-    function eventOccurred(e)
-    {
+    function eventOccurred(e) {
       aElement.removeEventListener("mouseover", eventOccurred, true);
       resolve();
     }
 
     aElement.addEventListener("mouseover", eventOccurred, true);
 
     utils.sendNativeMouseEvent(x * scale, y * scale, msg, 0, null);
   });
--- a/browser/components/search/test/browser_searchbar_keyboard_navigation.js
+++ b/browser/components/search/test/browser_searchbar_keyboard_navigation.js
@@ -30,26 +30,28 @@ add_task(function* init() {
     info("cleanup the search history");
     searchbar.FormHistory.update({op: "remove", fieldname: "searchbar-history"},
                                  {handleCompletion: resolve,
                                   handleError: reject});
   });
 
   yield new Promise((resolve, reject) => {
     info("adding search history values: " + kValues);
-    let addOps = kValues.map(value => { return {op: "add",
+    let addOps = kValues.map(value => {
+ return {op: "add",
                                              fieldname: "searchbar-history",
                                              value}
                                    });
     searchbar.FormHistory.update(addOps, {
       handleCompletion() {
         registerCleanupFunction(() => {
           info("removing search history values: " + kValues);
           let removeOps =
-            kValues.map(value => { return {op: "remove",
+            kValues.map(value => {
+ return {op: "remove",
                                            fieldname: "searchbar-history",
                                            value}
                                  });
           searchbar.FormHistory.update(removeOps);
         });
         resolve();
       },
       handleError: reject
--- a/browser/components/search/test/browser_searchbar_openpopup.js
+++ b/browser/components/search/test/browser_searchbar_openpopup.js
@@ -25,18 +25,17 @@ const scale = utils.screenPixelsPerCSSPi
 function* synthesizeNativeMouseClick(aElement) {
   let rect = aElement.getBoundingClientRect();
   let win = aElement.ownerGlobal;
   let x = win.mozInnerScreenX + (rect.left + rect.right) / 2;
   let y = win.mozInnerScreenY + (rect.top + rect.bottom) / 2;
 
   // Wait for the mouseup event to occur before continuing.
   return new Promise((resolve, reject) => {
-    function eventOccurred(e)
-    {
+    function eventOccurred(e) {
       aElement.removeEventListener("mouseup", eventOccurred, true);
       resolve();
     }
 
     aElement.addEventListener("mouseup", eventOccurred, true);
 
     utils.sendNativeMouseEvent(x * scale, y * scale, mouseDown, 0, null);
     utils.sendNativeMouseEvent(x * scale, y * scale, mouseUp, 0, null);
@@ -51,26 +50,28 @@ add_task(function* init() {
     info("cleanup the search history");
     searchbar.FormHistory.update({op: "remove", fieldname: "searchbar-history"},
                                  {handleCompletion: resolve,
                                   handleError: reject});
   });
 
   yield new Promise((resolve, reject) => {
     info("adding search history values: " + kValues);
-    let addOps = kValues.map(value => { return {op: "add",
+    let addOps = kValues.map(value => {
+ return {op: "add",
                                              fieldname: "searchbar-history",
                                              value}
                                    });
     searchbar.FormHistory.update(addOps, {
       handleCompletion() {
         registerCleanupFunction(() => {
           info("removing search history values: " + kValues);
           let removeOps =
-            kValues.map(value => { return {op: "remove",
+            kValues.map(value => {
+ return {op: "remove",
                                            fieldname: "searchbar-history",
                                            value}
                                  });
           searchbar.FormHistory.update(removeOps);
         });
         resolve();
       },
       handleError: reject
--- a/browser/components/search/test/browser_searchbar_smallpanel_keyboard_navigation.js
+++ b/browser/components/search/test/browser_searchbar_smallpanel_keyboard_navigation.js
@@ -31,26 +31,28 @@ add_task(function* init() {
     info("cleanup the search history");
     searchbar.FormHistory.update({op: "remove", fieldname: "searchbar-history"},
                                  {handleCompletion: resolve,
                                   handleError: reject});
   });
 
   yield new Promise((resolve, reject) => {
     info("adding search history values: " + kValues);
-    let addOps = kValues.map(value => { return {op: "add",
+    let addOps = kValues.map(value => {
+ return {op: "add",
                                              fieldname: "searchbar-history",
                                              value}
                                    });
     searchbar.FormHistory.update(addOps, {
       handleCompletion() {
         registerCleanupFunction(() => {
           info("removing search history values: " + kValues);
           let removeOps =
-            kValues.map(value => { return {op: "remove",
+            kValues.map(value => {
+ return {op: "remove",
                                            fieldname: "searchbar-history",
                                            value}
                                  });
           searchbar.FormHistory.update(removeOps);
         });
         resolve();
       },
       handleError: reject
--- a/browser/components/search/test/browser_yahoo_behavior.js
+++ b/browser/components/search/test/browser_yahoo_behavior.js
@@ -93,18 +93,17 @@ function test() {
           }
           tab.linkedBrowser.removeEventListener("load", load, true);
 
           // Observe page setup
           let win = gBrowser.contentWindowAsCPOW;
           if (win.gSearch.currentEngineName ==
               Services.search.currentEngine.name) {
             doSearch(win.document);
-          }
-          else {
+          } else {
             info("Waiting for newtab search init");
             win.addEventListener("ContentSearchService", function done(searchServiceEvent) {
               info("Got newtab search event " + searchServiceEvent.detail.type);
               if (searchServiceEvent.detail.type == "State") {
                 win.removeEventListener("ContentSearchService", done);
                 // Let gSearch respond to the event before continuing.
                 executeSoon(() => doSearch(win.document));
               }
--- a/browser/components/search/test/head.js
+++ b/browser/components/search/test/head.js
@@ -93,18 +93,17 @@ function promiseNewEngine(basename, opti
  * @param tab
  *        The tab to load into.
  * @param [optional] url
  *        The url to load, or the current url.
  * @return {Promise} resolved when the event is handled.
  * @resolves to the received event
  * @rejects if a valid load event is not received within a meaningful interval
  */
-function promiseTabLoadEvent(tab, url)
-{
+function promiseTabLoadEvent(tab, url) {
   info("Wait tab event: load");
 
   function handle(loadedUrl) {
     if (loadedUrl === "about:blank" || (url && loadedUrl !== url)) {
       info(`Skipping spurious load event for ${loadedUrl}`);
       return false;
     }
 
--- a/browser/components/selfsupport/test/browser_selfsupportAPI.js
+++ b/browser/components/selfsupport/test/browser_selfsupportAPI.js
@@ -41,18 +41,17 @@ function test_resetPref() {
   Assert.equal(Preferences.get(prefExistingName), prefExistingOriginalValue, "pref value should be the same as original");
 
   // 5. delete an existing pref
   // deleteBranch is implemented in such a way that
   // clearUserPref can't undo its action
   // see discussion in bug 1075160
 }
 
-function test_resetSearchEngines()
-{
+function test_resetSearchEngines() {
   const defaultEngineOriginal = Services.search.defaultEngine;
   const visibleEnginesOriginal = Services.search.getVisibleEngines();
 
   // 1. do nothing on unchanged search configuration
   MozSelfSupport.resetSearchEngines();
   Assert.equal(Services.search.defaultEngine, defaultEngineOriginal, "default engine should be reset");
   Assert.deepEqual(Services.search.getVisibleEngines(), visibleEnginesOriginal,
                    "default visible engines set should be reset");
@@ -76,13 +75,12 @@ function test_resetSearchEngines()
   Assert.equal(Services.search.defaultEngine, defaultEngineOriginal, "default engine should be reset");
   Assert.deepEqual(Services.search.getVisibleEngines(), visibleEnginesOriginal,
                    "default visible engines set should be reset");
 
   // 4. add an angine
   // we don't remove user-added engines as they are only used if selected
 }
 
-function test()
-{
+function test() {
   test_resetPref();
   test_resetSearchEngines();
 }
--- a/browser/components/shell/content/setDesktopBackground.js
+++ b/browser/components/shell/content/setDesktopBackground.js
@@ -9,24 +9,22 @@ var Ci = Components.interfaces;
 var gSetBackground = {
   _position        : AppConstants.platform == "macosx" ? "STRETCH" : "",
   _backgroundColor : AppConstants.platform != "macosx" ? 0 : undefined,
   _screenWidth     : 0,
   _screenHeight    : 0,
   _image           : null,
   _canvas          : null,
 
-  get _shell()
-  {
+  get _shell() {
     return Components.classes["@mozilla.org/browser/shell-service;1"]
                      .getService(Ci.nsIShellService);
   },
 
-  load()
-  {
+  load() {
     this._canvas = document.getElementById("screen");
     this._screenWidth = screen.width;
     this._screenHeight = screen.height;
     if (AppConstants.platform == "macosx") {
       document.documentElement.getButton("accept").hidden = true;
     }
     if (this._screenWidth / this._screenHeight >= 1.6)
       document.getElementById("monitor").setAttribute("aspectratio", "16:10");
@@ -44,18 +42,17 @@ var gSetBackground = {
     }
 
     // make sure that the correct dimensions will be used
     setTimeout(function(self) {
       self.init(window.arguments[0]);
     }, 0, this);
   },
 
-  init(aImage)
-  {
+  init(aImage) {
     this._image = aImage;
 
     // set the size of the coordinate space
     this._canvas.width = this._canvas.clientWidth;
     this._canvas.height = this._canvas.clientHeight;
 
     var ctx = this._canvas.getContext("2d");
     ctx.scale(this._canvas.clientWidth / this._screenWidth, this._canvas.clientHeight / this._screenHeight);
@@ -71,18 +68,17 @@ var gSetBackground = {
       setDesktopBackground.label = bundle.getString("DesktopBackgroundSet");
       setDesktopBackground.disabled = false;
 
       document.getElementById("showDesktopPreferences").hidden = true;
     }
     this.updatePosition();
   },
 
-  setDesktopBackground()
-  {
+  setDesktopBackground() {
     if (AppConstants.platform != "macosx") {
       document.persist("menuPosition", "value");
       this._shell.desktopBackgroundColor = this._hexStringToLong(this._backgroundColor);
     } else {
       Components.classes["@mozilla.org/observer-service;1"]
                 .getService(Ci.nsIObserverService)
                 .addObserver(this, "shell:desktop-background-changed", false);
 
@@ -90,18 +86,17 @@ var gSetBackground = {
       var setDesktopBackground = document.getElementById("setDesktopBackground");
       setDesktopBackground.disabled = true;
       setDesktopBackground.label = bundle.getString("DesktopBackgroundDownloading");
     }
     this._shell.setDesktopBackground(this._image,
                                      Ci.nsIShellService["BACKGROUND_" + this._position]);
   },
 
-  updatePosition()
-  {
+  updatePosition() {
     var ctx = this._canvas.getContext("2d");
     ctx.clearRect(0, 0, this._screenWidth, this._screenHeight);
 
     if (AppConstants.platform != "macosx") {
       this._position = document.getElementById("menuPosition").value;
     }
 
     switch (this._position) {
@@ -154,61 +149,55 @@ var gSetBackground = {
         ctx.drawImage(this._image, x, y, width, height);
         break;
       }
     }
   }
 };
 
 if (AppConstants.platform != "macosx") {
-  gSetBackground["_initColor"] = function()
-  {
+  gSetBackground["_initColor"] = function() {
     var color = this._shell.desktopBackgroundColor;
 
     const rMask = 4294901760;
     const gMask = 65280;
     const bMask = 255;
     var r = (color & rMask) >> 16;
     var g = (color & gMask) >> 8;
     var b = (color & bMask);
     this.updateColor(this._rgbToHex(r, g, b));
 
     var colorpicker = document.getElementById("desktopColor");
     colorpicker.color = this._backgroundColor;
   };
 
-  gSetBackground["updateColor"] = function(aColor)
-  {
+  gSetBackground["updateColor"] = function(aColor) {
     this._backgroundColor = aColor;
     this._canvas.style.backgroundColor = aColor;
   };
 
   // Converts a color string in the format "#RRGGBB" to an integer.
-  gSetBackground["_hexStringToLong"] = function(aString)
-  {
+  gSetBackground["_hexStringToLong"] = function(aString) {
     return parseInt(aString.substring(1, 3), 16) << 16 |
            parseInt(aString.substring(3, 5), 16) << 8 |
            parseInt(aString.substring(5, 7), 16);
   };
 
-  gSetBackground["_rgbToHex"] = function(aR, aG, aB)
-  {
+  gSetBackground["_rgbToHex"] = function(aR, aG, aB) {
     return "#" + [aR, aG, aB].map(aInt => aInt.toString(16).replace(/^(.)$/, "0$1"))
                              .join("").toUpperCase();
   };
 } else {
-  gSetBackground["observe"] = function(aSubject, aTopic, aData)
-  {
+  gSetBackground["observe"] = function(aSubject, aTopic, aData) {
     if (aTopic == "shell:desktop-background-changed") {
       document.getElementById("setDesktopBackground").hidden = true;
       document.getElementById("showDesktopPreferences").hidden = false;
 
       Components.classes["@mozilla.org/observer-service;1"]
                 .getService(Ci.nsIObserverService)
                 .removeObserver(this, "shell:desktop-background-changed");
     }
   };
 
-  gSetBackground["showDesktopPrefs"] = function()
-  {
+  gSetBackground["showDesktopPrefs"] = function() {
     this._shell.openApplication(Ci.nsIMacShellService.APPLICATION_DESKTOP);
   };
 }
--- a/browser/components/tests/browser/browser_bug538331.js
+++ b/browser/components/tests/browser/browser_bug538331.js
@@ -108,18 +108,17 @@ var gOriginalMStone;
 var gOriginalOverrideURL;
 
 this.__defineGetter__("gBG", function() {
   delete this.gBG;
   return this.gBG = Cc["@mozilla.org/browser/browserglue;1"].
                     getService(Ci.nsIObserver);
 });
 
-function test()
-{
+function test() {
   waitForExplicitFinish();
 
   // Reset the startup page pref since it may have been set by other tests
   // and we will assume it is default.
   Services.prefs.clearUserPref('browser.startup.page');
 
   if (gPrefService.prefHasUserValue(PREF_MSTONE)) {
     gOriginalMStone = gPrefService.getCharPref(PREF_MSTONE);
@@ -170,18 +169,17 @@ var gWindowCatcher = {
     info("window catcher caught window opening: " + win.document.documentURI);
     win.addEventListener("load", function() {
       win.removeEventListener("load", arguments.callee, false);
       gWindowCatcher.windowLoad(win);
     }, false);
   }
 };
 
-function finish_test()
-{
+function finish_test() {
   // Reset browser.startup.homepage_override.mstone to the original value or
   // clear it if it didn't exist.
   if (gOriginalMStone) {
     gPrefService.setCharPref(PREF_MSTONE, gOriginalMStone);
   } else if (gPrefService.prefHasUserValue(PREF_MSTONE)) {
     gPrefService.clearUserPref(PREF_MSTONE);
   }
 
@@ -195,18 +193,17 @@ function finish_test()
 
   writeUpdatesToXMLFile(XML_EMPTY);
   reloadUpdateManagerData();
 
   finish();
 }
 
 // Test the defaultArgs returned by nsBrowserContentHandler after an update
-function testDefaultArgs()
-{
+function testDefaultArgs() {
   // Clear any pre-existing override in defaultArgs that are hanging around.
   // This will also set the browser.startup.homepage_override.mstone preference
   // if it isn't already set.
   Cc["@mozilla.org/browser/clh;1"].getService(Ci.nsIBrowserHandler).defaultArgs;
 
   let originalMstone = gPrefService.getCharPref(PREF_MSTONE);
 
   gPrefService.setCharPref(PREF_OVERRIDE_URL, DEFAULT_PREF_URL);
@@ -295,18 +292,17 @@ const BG_NOTIFY_TESTS = [
     notificationURL: DEFAULT_UPDATE_URL,
     notificationButtonLabel: "button label",
     notificationButtonAccessKey: "b"
   }
 ];
 
 // Test showing a notification after an update
 // _showUpdateNotification in nsBrowserGlue.js
-function testShowNotification()
-{
+function testShowNotification() {
   let notifyBox = document.getElementById("high-priority-global-notificationbox");
 
   // Catches any windows opened by these tests (e.g. alert windows) and closes
   // them
   gWindowCatcher.start();
 
   for (let i = 0; i < BG_NOTIFY_TESTS.length; i++) {
     let testCase = BG_NOTIFY_TESTS[i];
@@ -377,39 +373,36 @@ function testShowNotification()
 
     let prefHasUserValue = gPrefService.prefHasUserValue(PREF_POSTUPDATE);
     is(prefHasUserValue, false, "preference " + PREF_POSTUPDATE +
        " shouldn't have a user value");
   }
 }
 
 // Test opening the url provided by the updates.xml in the last test
-function testNotificationURL()
-{
+function testNotificationURL() {
   ok(true, "Test testNotificationURL: clicking the notification button " +
            "opened the url specified by the update");
   let href = gBrowser.currentURI.spec;
   let expectedURL = BG_NOTIFY_TESTS[BG_NOTIFY_TESTS.length - 1].notificationURL;
   is(href, expectedURL, "The url opened from the notification should be the " +
      "url provided by the update");
   gBrowser.removeCurrentTab();
   window.focus();
   finish_test();
 }
 
 /* Reloads the update metadata from disk */
-function reloadUpdateManagerData()
-{
+function reloadUpdateManagerData() {
   Cc["@mozilla.org/updates/update-manager;1"].getService(Ci.nsIUpdateManager).
   QueryInterface(Ci.nsIObserver).observe(null, "um-reload-update-data", "");
 }
 
 
-function writeUpdatesToXMLFile(aText)
-{
+function writeUpdatesToXMLFile(aText) {
   const PERMS_FILE = 0o644;
 
   const MODE_WRONLY   = 0x02;
   const MODE_CREATE   = 0x08;
   const MODE_TRUNCATE = 0x20;
 
   let file = Cc["@mozilla.org/file/directory_service;1"].
              getService(Ci.nsIProperties).
--- a/browser/components/translation/Translation.jsm
+++ b/browser/components/translation/Translation.jsm
@@ -250,17 +250,17 @@ TranslationUI.prototype = {
       Services.prefs.getCharPref("browser.translation.neverForLanguages");
     if (neverForLangs.split(",").indexOf(this.detectedLanguage) != -1) {
       TranslationTelemetry.recordAutoRejectedTranslationOffer();
       return false;
     }
 
     // or if we should never show the infobar for this domain.
     let perms = Services.perms;
-    if (perms.testExactPermission(aURI, "translate") ==  perms.DENY_ACTION) {
+    if (perms.testExactPermission(aURI, "translate") == perms.DENY_ACTION) {
       TranslationTelemetry.recordAutoRejectedTranslationOffer();
       return false;
     }
 
     return true;
   },
 
   receiveMessage(msg) {
--- a/browser/components/translation/TranslationDocument.jsm
+++ b/browser/components/translation/TranslationDocument.jsm
@@ -274,18 +274,17 @@ TranslationItem.prototype = {
   isRoot: false,
   isSimpleRoot: false,
 
   toString() {
     let rootType = "";
     if (this.isRoot) {
       if (this.isSimpleRoot) {
         rootType = " (simple root)";
-      }
-      else {
+      } else {
         rootType = " (non simple root)";
       }
     }
     return "[object TranslationItem: <" + this.nodeRef.localName + ">"
            + rootType + "]";
   },
 
   /**
--- a/browser/components/uitour/test/browser_UITour3.js
+++ b/browser/components/uitour/test/browser_UITour3.js
@@ -21,17 +21,17 @@ add_UITour_task(function* test_info_icon
 
   yield showInfoPromise("urlbar", "a title", "some text", "image.png");
 
   is(title.textContent, "a title", "Popup should have correct title");
   is(desc.textContent, "some text", "Popup should have correct description text");
 
   let imageURL = getRootDirectory(gTestPath) + "image.png";
   imageURL = imageURL.replace("chrome://mochitests/content/", "https://example.org/");
-  is(icon.src, imageURL,  "Popup should have correct icon shown");
+  is(icon.src, imageURL, "Popup should have correct icon shown");
 
   is(buttons.hasChildNodes(), false, "Popup should have no buttons");
 }),
 
 add_UITour_task(function* test_info_buttons_1() {
   let popup = document.getElementById("UITourTooltip");
   let title = document.getElementById("UITourTooltipTitle");
   let desc = document.getElementById("UITourTooltipDescription");
@@ -39,17 +39,17 @@ add_UITour_task(function* test_info_butt
 
   yield showInfoPromise("urlbar", "another title", "moar text", "./image.png", "makeButtons");
 
   is(title.textContent, "another title", "Popup should have correct title");
   is(desc.textContent, "moar text", "Popup should have correct description text");
 
   let imageURL = getRootDirectory(gTestPath) + "image.png";
   imageURL = imageURL.replace("chrome://mochitests/content/", "https://example.org/");
-  is(icon.src, imageURL,  "Popup should have correct icon shown");
+  is(icon.src, imageURL, "Popup should have correct icon shown");
 
   let buttons = document.getElementById("UITourTooltipButtons");
   is(buttons.childElementCount, 4, "Popup should have four buttons");
 
   is(buttons.childNodes[0].nodeName, "label", "Text label should be a <label>");
   is(buttons.childNodes[0].getAttribute("value"), "Regular text", "Text label should have correct value");
   is(buttons.childNodes[0].getAttribute("image"), "", "Text should have no image");
   is(buttons.childNodes[0].className, "", "Text should have no class");
@@ -87,17 +87,17 @@ add_UITour_task(function* test_info_butt
 
   yield showInfoPromise("urlbar", "another title", "moar text", "./image.png", "makeButtons");
 
   is(title.textContent, "another title", "Popup should have correct title");
   is(desc.textContent, "moar text", "Popup should have correct description text");
 
   let imageURL = getRootDirectory(gTestPath) + "image.png";
   imageURL = imageURL.replace("chrome://mochitests/content/", "https://example.org/");
-  is(icon.src, imageURL,  "Popup should have correct icon shown");
+  is(icon.src, imageURL, "Popup should have correct icon shown");
 
   let buttons = document.getElementById("UITourTooltipButtons");
   is(buttons.childElementCount, 4, "Popup should have four buttons");
 
   is(buttons.childNodes[1].getAttribute("label"), "Link", "Link should have correct label");
   is(buttons.childNodes[1].getAttribute("image"), "", "Link should have no image");
   ok(buttons.childNodes[1].classList.contains("button-link"), "Link should have button-link class");
 
--- a/browser/experiments/Experiments.jsm
+++ b/browser/experiments/Experiments.jsm
@@ -1230,21 +1230,19 @@ Experiments.Experiments.prototype = {
         if (expireReasons.indexOf(shouldStopResult.reason[0]) != -1) {
           kind = TELEMETRY_LOG.TERMINATION.EXPIRED;
           reason = null;
         } else {
           kind = TELEMETRY_LOG.TERMINATION.RECHECK;
           reason = shouldStopResult.reason;
         }
         changes = yield activeExperiment.stop(kind, reason);
-      }
-      else if (this._terminateReason) {
+      } else if (this._terminateReason) {
         changes = yield activeExperiment.stop(this._terminateReason);
-      }
-      else {
+      } else {
         changes = yield activeExperiment.reconcileAddonState();
       }
 
       if (changes) {
         this._dirty = true;
         activeChanged = true;
       }
 
@@ -1257,18 +1255,17 @@ Experiments.Experiments.prototype = {
     this._terminateReason = null;
 
     if (!activeExperiment && gExperimentsEnabled) {
       for (let [id, experiment] of this._experiments) {
         let applicable;
         let reason = null;
         try {
           applicable = yield experiment.isApplicable();
-        }
-        catch (e) {
+        } catch (e) {
           applicable = false;
           reason = e;
         }
 
         if (!applicable && reason && reason[0] != "was-active") {
           // Report this from here to avoid over-reporting.
           let data = [TELEMETRY_LOG.ACTIVATION.REJECTED, id];
           data = data.concat(reason);
@@ -1730,23 +1727,21 @@ Experiments.ExperimentEntry.prototype = 
     let currentEnvironment = yield TelemetryEnvironment.onInitialized();
 
     Object.defineProperty(sandbox, "_e",
       { get: () => Cu.cloneInto(currentEnvironment, sandbox) });
 
     let result = false;
     try {
       result = !!Cu.evalInSandbox("filter({get telemetryEnvironment() { return _e; } })", sandbox);
-    }
-    catch (e) {
+    } catch (e) {
       this._log.debug("runFilterFunction() - filter function failed: "
                       + e.message + ", " + e.stack);
       throw ["jsfilter-threw", e.message];
-    }
-    finally {
+    } finally {
       Cu.nukeSandbox(sandbox);
     }
 
     if (!result) {
       throw ["jsfilter-false"];
     }
 
     return true;
@@ -2077,17 +2072,17 @@ Experiments.ExperimentEntry.prototype = 
   /*
    * Get next date (in epoch-ms) to schedule a re-evaluation for this.
    * Returns 0 if it doesn't need one.
    */
   getScheduleTime() {
     if (this._enabled) {
       let startTime = this._startDate.getTime();
       let maxActiveTime = startTime + 1000 * this._manifestData.maxActiveSeconds;
-      return Math.min(1000 * this._manifestData.endTime,  maxActiveTime);
+      return Math.min(1000 * this._manifestData.endTime, maxActiveTime);
     }
 
     if (this._endDate) {
       return this._endDate.getTime();
     }
 
     return 1000 * this._manifestData.startTime;
   },
--- a/browser/experiments/test/xpcshell/test_activate.js
+++ b/browser/experiments/test/xpcshell/test_activate.js
@@ -9,23 +9,23 @@ Cu.import("resource:///modules/experimen
 const SEC_IN_ONE_DAY  = 24 * 60 * 60;
 const MS_IN_ONE_DAY   = SEC_IN_ONE_DAY * 1000;
 
 var gHttpServer = null;
 var gHttpRoot   = null;
 var gPolicy     = null;
 
 function ManifestEntry(data) {
-  this.id        = data.id        || EXPERIMENT1_ID;
-  this.xpiURL    = data.xpiURL    || gHttpRoot + EXPERIMENT1_XPI_NAME;
-  this.xpiHash   = data.xpiHash   || EXPERIMENT1_XPI_SHA1;
-  this.appName   = data.appName   || ["XPCShell"];
-  this.channel   = data.appName   || ["nightly"];
+  this.id        = data.id || EXPERIMENT1_ID;
+  this.xpiURL    = data.xpiURL || gHttpRoot + EXPERIMENT1_XPI_NAME;
+  this.xpiHash   = data.xpiHash || EXPERIMENT1_XPI_SHA1;
+  this.appName   = data.appName || ["XPCShell"];
+  this.channel   = data.appName || ["nightly"];
   this.startTime = data.startTime || new Date(2010, 0, 1, 12).getTime() / 1000;
-  this.endTime   = data.endTime   || new Date(9001, 0, 1, 12).getTime() / 1000;
+  this.endTime   = data.endTime || new Date(9001, 0, 1, 12).getTime() / 1000;
   this.maxActiveSeconds = data.maxActiveSeconds || 5 * SEC_IN_ONE_DAY;
 }
 
 function run_test() {
   run_next_test();
 }
 
 add_task(function* test_setup() {
--- a/browser/experiments/test/xpcshell/test_api.js
+++ b/browser/experiments/test/xpcshell/test_api.js
@@ -85,17 +85,17 @@ add_task(function* test_getExperiments()
   let observerFireCount = 0;
   let expectedObserverFireCount = 0;
   let observer = () => ++observerFireCount;
   Services.obs.addObserver(observer, OBSERVER_TOPIC, false);
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate1 = futureDate(baseDate,  50 * MS_IN_ONE_DAY);
+  let startDate1 = futureDate(baseDate, 50 * MS_IN_ONE_DAY);
   let endDate1   = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
   let startDate2 = futureDate(baseDate, 150 * MS_IN_ONE_DAY);
   let endDate2   = futureDate(baseDate, 200 * MS_IN_ONE_DAY);
 
   // The manifest data we test with.
 
   gManifestObject = {
     "version": 1,
@@ -156,18 +156,17 @@ add_task(function* test_getExperiments()
   let list = yield experiments.getExperiments();
   Assert.equal(list.length, 0, "Experiment list should be empty.");
   let addons = yield getExperimentAddons();
   Assert.equal(addons.length, 0, "Precondition: No experiment add-ons are installed.");
 
   try {
     yield experiments.getExperimentBranch();
     Assert.ok(false, "getExperimentBranch should fail with no experiment");
-  }
-  catch (e) {
+  } catch (e) {
     Assert.ok(true, "getExperimentBranch correctly threw");
   }
 
   // Trigger update, clock set for experiment 1 to start.
 
   now = futureDate(startDate1, 5 * MS_IN_ONE_DAY);
   gTimerScheduleOffset = -1;
   defineNow(gPolicy, now);
@@ -302,17 +301,17 @@ add_task(function* test_getExperiments()
 
 add_task(function* test_getActiveExperimentID() {
   // Check that getActiveExperimentID returns the correct result even
   // after .uninit()
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate1 = futureDate(baseDate,  50 * MS_IN_ONE_DAY);
+  let startDate1 = futureDate(baseDate, 50 * MS_IN_ONE_DAY);
   let endDate1   = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
 
   gManifestObject = {
     "version": 1,
     experiments: [
       {
         id:               EXPERIMENT1_ID,
         xpiURL:           gDataRoot + EXPERIMENT1_XPI_NAME,
@@ -352,17 +351,17 @@ add_task(function* test_addonAlreadyInst
   let observerFireCount = 0;
   let expectedObserverFireCount = 0;
   let observer = () => ++observerFireCount;
   Services.obs.addObserver(observer, OBSERVER_TOPIC, false);
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate  = futureDate(baseDate,   100 * MS_IN_ONE_DAY);
+  let startDate  = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
   let endDate    = futureDate(baseDate, 10000 * MS_IN_ONE_DAY);
 
   // The manifest data we test with.
 
   gManifestObject = {
     "version": 1,
     experiments: [
       {
@@ -631,17 +630,17 @@ add_task(function* test_installFailure()
   let observerFireCount = 0;
   let expectedObserverFireCount = 0;
   let observer = () => ++observerFireCount;
   Services.obs.addObserver(observer, OBSERVER_TOPIC, false);
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate = futureDate(baseDate,   100 * MS_IN_ONE_DAY);
+  let startDate = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
   let endDate   = futureDate(baseDate, 10000 * MS_IN_ONE_DAY);
 
   // The manifest data we test with.
 
   gManifestObject = {
     "version": 1,
     experiments: [
       {
@@ -762,17 +761,17 @@ add_task(function* test_userDisabledAndU
   let observerFireCount = 0;
   let expectedObserverFireCount = 0;
   let observer = () => ++observerFireCount;
   Services.obs.addObserver(observer, OBSERVER_TOPIC, false);
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate = futureDate(baseDate,   100 * MS_IN_ONE_DAY);
+  let startDate = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
   let endDate   = futureDate(baseDate, 10000 * MS_IN_ONE_DAY);
 
   // The manifest data we test with.
 
   gManifestObject = {
     "version": 1,
     experiments: [
       {
@@ -861,17 +860,17 @@ add_task(function* test_updateActiveExpe
   let observerFireCount = 0;
   let expectedObserverFireCount = 0;
   let observer = () => ++observerFireCount;
   Services.obs.addObserver(observer, OBSERVER_TOPIC, false);
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate = futureDate(baseDate,   100 * MS_IN_ONE_DAY);
+  let startDate = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
   let endDate   = futureDate(baseDate, 10000 * MS_IN_ONE_DAY);
 
   // The manifest data we test with.
 
   gManifestObject = {
     "version": 1,
     experiments: [
       {
@@ -952,17 +951,17 @@ add_task(function* test_disableActiveExp
   let observerFireCount = 0;
   let expectedObserverFireCount = 0;
   let observer = () => ++observerFireCount;
   Services.obs.addObserver(observer, OBSERVER_TOPIC, false);
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate = futureDate(baseDate,   100 * MS_IN_ONE_DAY);
+  let startDate = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
   let endDate   = futureDate(baseDate, 10000 * MS_IN_ONE_DAY);
 
   // The manifest data we test with.
 
   gManifestObject = {
     "version": 1,
     experiments: [
       {
@@ -1045,17 +1044,17 @@ add_task(function* test_freezePendingExp
   let observerFireCount = 0;
   let expectedObserverFireCount = 0;
   let observer = () => ++observerFireCount;
   Services.obs.addObserver(observer, OBSERVER_TOPIC, false);
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate = futureDate(baseDate,   100 * MS_IN_ONE_DAY);
+  let startDate = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
   let endDate   = futureDate(baseDate, 10000 * MS_IN_ONE_DAY);
 
   // The manifest data we test with.
 
   gManifestObject = {
     "version": 1,
     experiments: [
       {
@@ -1123,17 +1122,17 @@ add_task(function* test_freezeActiveExpe
   let observerFireCount = 0;
   let expectedObserverFireCount = 0;
   let observer = () => ++observerFireCount;
   Services.obs.addObserver(observer, OBSERVER_TOPIC, false);
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate = futureDate(baseDate,   100 * MS_IN_ONE_DAY);
+  let startDate = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
   let endDate   = futureDate(baseDate, 10000 * MS_IN_ONE_DAY);
 
   // The manifest data we test with.
 
   gManifestObject = {
     "version": 1,
     experiments: [
       {
@@ -1203,17 +1202,17 @@ add_task(function* test_removeActiveExpe
   let observerFireCount = 0;
   let expectedObserverFireCount = 0;
   let observer = () => ++observerFireCount;
   Services.obs.addObserver(observer, OBSERVER_TOPIC, false);
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate  = futureDate(baseDate,   100 * MS_IN_ONE_DAY);
+  let startDate  = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
   let endDate    = futureDate(baseDate, 10000 * MS_IN_ONE_DAY);
   let startDate2 = futureDate(baseDate, 20000 * MS_IN_ONE_DAY);
   let endDate2   = futureDate(baseDate, 30000 * MS_IN_ONE_DAY);
 
   // The manifest data we test with.
 
   gManifestObject = {
     "version": 1,
@@ -1294,17 +1293,17 @@ add_task(function* test_invalidUrl() {
   let observerFireCount = 0;
   let expectedObserverFireCount = 0;
   let observer = () => ++observerFireCount;
   Services.obs.addObserver(observer, OBSERVER_TOPIC, false);
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate = futureDate(baseDate,   100 * MS_IN_ONE_DAY);
+  let startDate = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
   let endDate   = futureDate(baseDate, 10000 * MS_IN_ONE_DAY);
 
   // The manifest data we test with.
 
   gManifestObject = {
     "version": 1,
     experiments: [
       {
@@ -1350,17 +1349,17 @@ add_task(function* test_unexpectedUninst
   let observerFireCount = 0;
   let expectedObserverFireCount = 0;
   let observer = () => ++observerFireCount;
   Services.obs.addObserver(observer, OBSERVER_TOPIC, false);
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate  = futureDate(baseDate,   100 * MS_IN_ONE_DAY);
+  let startDate  = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
   let endDate    = futureDate(baseDate, 10000 * MS_IN_ONE_DAY);
 
   // The manifest data we test with.
 
   gManifestObject = {
     "version": 1,
     experiments: [
       {
@@ -1531,18 +1530,18 @@ add_task(function* testEnabledAfterResta
 // anymore. Ensure that if maxStartTime is passed but experiment has started
 // already, maxStartTime does not cause deactivation.
 
 add_task(function* testMaxStartTimeEvaluation() {
 
   // Dates the following tests are based on.
 
   let startDate    = new Date(2014, 5, 1, 12);
-  let now          = futureDate(startDate, 10   * MS_IN_ONE_DAY);
-  let maxStartDate = futureDate(startDate, 100  * MS_IN_ONE_DAY);
+  let now          = futureDate(startDate, 10 * MS_IN_ONE_DAY);
+  let maxStartDate = futureDate(startDate, 100 * MS_IN_ONE_DAY);
   let endDate      = futureDate(startDate, 1000 * MS_IN_ONE_DAY);
 
   defineNow(gPolicy, now);
 
   // The manifest data we test with.
   // We set a value for maxStartTime.
 
   gManifestObject = {
--- a/browser/experiments/test/xpcshell/test_cache.js
+++ b/browser/experiments/test/xpcshell/test_cache.js
@@ -125,17 +125,17 @@ add_task(function* test_cache() {
 
   let baseDate   = new Date(2014, 5, 1, 12);
   let startDates = [];
   let endDates   = [];
 
   for (let i = 0; i < gManifestObject.experiments.length; ++i) {
     let experiment = gManifestObject.experiments[i];
     startDates.push(futureDate(baseDate, (50 + (150 * i)) * MS_IN_ONE_DAY));
-    endDates  .push(futureDate(startDates[i], 50 * MS_IN_ONE_DAY));
+    endDates .push(futureDate(startDates[i], 50 * MS_IN_ONE_DAY));
     experiment.startTime = dateToSeconds(startDates[i]);
     experiment.endTime   = dateToSeconds(endDates[i]);
   }
 
   // Data to compare the result of Experiments.getExperiments() against.
 
   let experimentListData = [
     {
@@ -306,17 +306,17 @@ add_task(function* test_expiration() {
   let startDates = [];
   let endDates   = [];
 
   for (let i = 0; i < gManifestObject.experiments.length; ++i) {
     let experiment = gManifestObject.experiments[i];
     // Spread out experiments in time so that one experiment can end and expire while
     // the next is still running.
     startDates.push(futureDate(baseDate, (50 + (200 * i)) * MS_IN_ONE_DAY));
-    endDates  .push(futureDate(startDates[i], 50 * MS_IN_ONE_DAY));
+    endDates .push(futureDate(startDates[i], 50 * MS_IN_ONE_DAY));
     experiment.startTime = dateToSeconds(startDates[i]);
     experiment.endTime   = dateToSeconds(endDates[i]);
   }
 
   let now = null;
   let experiments = null;
 
   let setDateAndRestartExperiments = new Task.async(function* (newDate) {
--- a/browser/experiments/test/xpcshell/test_conditions.js
+++ b/browser/experiments/test/xpcshell/test_conditions.js
@@ -231,54 +231,54 @@ add_task(function* test_times() {
   let now = new Date(2014, 5, 6, 12);
   let nowSec = now.getTime() / 1000;
   let testData = [
     // "expected applicable?", rejection reason or null, fake now date, manifest data
 
     // start time
 
     [true,  null, now,
-      {startTime: nowSec -  5 * SEC_IN_ONE_DAY,
+      {startTime: nowSec - 5 * SEC_IN_ONE_DAY,
          endTime: nowSec + 10 * SEC_IN_ONE_DAY}],
     [true,  null, now,
       {startTime: nowSec,
          endTime: nowSec + 10 * SEC_IN_ONE_DAY}],
     [false,  "startTime", now,
-      {startTime: nowSec +  5 * SEC_IN_ONE_DAY,
+      {startTime: nowSec + 5 * SEC_IN_ONE_DAY,
          endTime: nowSec + 10 * SEC_IN_ONE_DAY}],
 
     // end time
 
     [false,  "endTime", now,
-      {startTime: nowSec -  5 * SEC_IN_ONE_DAY,
+      {startTime: nowSec - 5 * SEC_IN_ONE_DAY,
          endTime: nowSec - 10 * SEC_IN_ONE_DAY}],
     [false,  "endTime", now,
-      {startTime: nowSec -  5 * SEC_IN_ONE_DAY,
-         endTime: nowSec -  5 * SEC_IN_ONE_DAY}],
+      {startTime: nowSec - 5 * SEC_IN_ONE_DAY,
+         endTime: nowSec - 5 * SEC_IN_ONE_DAY}],
 
     // max start time
 
     [false,  "maxStartTime", now,
       {maxStartTime: nowSec - 15 * SEC_IN_ONE_DAY,
           startTime: nowSec - 10 * SEC_IN_ONE_DAY,
             endTime: nowSec + 10 * SEC_IN_ONE_DAY}],
     [false,  "maxStartTime", now,
-      {maxStartTime: nowSec -  1 * SEC_IN_ONE_DAY,
+      {maxStartTime: nowSec - 1 * SEC_IN_ONE_DAY,
           startTime: nowSec - 10 * SEC_IN_ONE_DAY,
             endTime: nowSec + 10 * SEC_IN_ONE_DAY}],
     [false,  "maxStartTime", now,
       {maxStartTime: nowSec - 10 * SEC_IN_ONE_DAY,
           startTime: nowSec - 10 * SEC_IN_ONE_DAY,
             endTime: nowSec + 10 * SEC_IN_ONE_DAY}],
     [true,  null, now,
       {maxStartTime: nowSec,
           startTime: nowSec - 10 * SEC_IN_ONE_DAY,
             endTime: nowSec + 10 * SEC_IN_ONE_DAY}],
     [true,  null, now,
-      {maxStartTime: nowSec +  1 * SEC_IN_ONE_DAY,
+      {maxStartTime: nowSec + 1 * SEC_IN_ONE_DAY,
           startTime: nowSec - 10 * SEC_IN_ONE_DAY,
             endTime: nowSec + 10 * SEC_IN_ONE_DAY}],
 
     // max active seconds
 
     [true,  null, now,
       {maxActiveSeconds:           5 * SEC_IN_ONE_DAY,
               startTime: nowSec - 10 * SEC_IN_ONE_DAY,
--- a/browser/experiments/test/xpcshell/test_disableExperiments.js
+++ b/browser/experiments/test/xpcshell/test_disableExperiments.js
@@ -63,17 +63,17 @@ add_task(function* test_disableExperimen
   let observerFireCount = 0;
   let expectedObserverFireCount = 0;
   let observer = () => ++observerFireCount;
   Services.obs.addObserver(observer, OBSERVER_TOPIC, false);
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate1 = futureDate(baseDate,  50 * MS_IN_ONE_DAY);
+  let startDate1 = futureDate(baseDate, 50 * MS_IN_ONE_DAY);
   let endDate1   = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
   let startDate2 = futureDate(baseDate, 150 * MS_IN_ONE_DAY);
   let endDate2   = futureDate(baseDate, 200 * MS_IN_ONE_DAY);
 
   // The manifest data we test with.
 
   gManifestObject = {
     "version": 1,
--- a/browser/experiments/test/xpcshell/test_previous_provider.js
+++ b/browser/experiments/test/xpcshell/test_previous_provider.js
@@ -162,18 +162,16 @@ add_task(function* test_active_and_previ
   });
   experimentAddons = yield deferred.promise;
   Assert.equal(experimentAddons.length, 2, "2 experiment add-ons known.");
 
   for (let addon of experimentAddons) {
     if (addon.id == EXPERIMENT1_ID) {
       Assert.equal(addon.isActive, false, "Add-on is not active.");
       Assert.ok(addon.appDisabled, "Should be a previous experiment.");
-    }
-    else if (addon.id == EXPERIMENT2_ID) {
+    } else if (addon.id == EXPERIMENT2_ID) {
       Assert.ok(addon.isActive, "Add-on is active.");
       Assert.ok(!addon.appDisabled, "Should not be a previous experiment.");
-    }
-    else {
+    } else {
       throw new Error("Unexpected add-on ID: " + addon.id);
     }
   }
 });
--- a/browser/experiments/test/xpcshell/test_telemetry.js
+++ b/browser/experiments/test/xpcshell/test_telemetry.js
@@ -18,18 +18,17 @@ var gHttpServer          = null;
 var gHttpRoot            = null;
 var gDataRoot            = null;
 var gPolicy              = null;
 var gManifestObject      = null;
 var gManifestHandlerURI  = null;
 
 const TLOG = bsp.TELEMETRY_LOG;
 
-function checkEvent(event, id, data)
-{
+function checkEvent(event, id, data) {
   do_print("Checking message " + id);
   Assert.equal(event[0], id, "id should match");
   Assert.ok(event[1] > 0, "timestamp should be greater than 0");
 
   if (data === undefined) {
    Assert.equal(event.length, 2, "event array should have 2 entries");
   } else {
     Assert.equal(event.length, data.length + 2, "event entry count should match expected count");
@@ -84,17 +83,17 @@ add_task(function* test_telemetryBasics(
   // Check TelemetryLog instead of TelemetrySession.getPayload().log because
   // TelemetrySession gets Experiments.instance() and side-effects log entries.
 
   let expectedLogLength = 0;
 
   // Dates the following tests are based on.
 
   let baseDate   = new Date(2014, 5, 1, 12);
-  let startDate1 = futureDate(baseDate,  50 * MS_IN_ONE_DAY);
+  let startDate1 = futureDate(baseDate, 50 * MS_IN_ONE_DAY);
   let endDate1   = futureDate(baseDate, 100 * MS_IN_ONE_DAY);
   let startDate2 = futureDate(baseDate, 150 * MS_IN_ONE_DAY);
   let endDate2   = futureDate(baseDate, 200 * MS_IN_ONE_DAY);
 
   // The manifest data we test with.
 
   gManifestObject = {
     "version": 1,
--- a/browser/extensions/pocket/content/main.js
+++ b/browser/extensions/pocket/content/main.js
@@ -114,57 +114,48 @@ var pktUI = (function() {
 
     // -- Panel UI -- //
 
     /**
      * Show the sign-up panel
      */
     function showSignUp() {
         // AB test: Direct logged-out users to tab vs panel
-        if (pktApi.getSignupPanelTabTestVariant() == 'v2')
-        {
+        if (pktApi.getSignupPanelTabTestVariant() == 'v2') {
             let site = Services.prefs.getCharPref("extensions.pocket.site");
             openTabWithUrl('https://' + site + '/firefox_learnmore?s=ffi&t=autoredirect&tv=page_learnmore&src=ff_ext', true);
 
             // force the panel closed before it opens
             getPanel().hidePopup();
 
             return;
         }
 
         // Control: Show panel as normal
-        getFirefoxAccountSignedInUser(function(userdata)
-        {
+        getFirefoxAccountSignedInUser(function(userdata) {
             var fxasignedin = (typeof userdata == 'object' && userdata !== null) ? '1' : '0';
             var startheight = 490;
             var inOverflowMenu = isInOverflowMenu();
             var controlvariant = pktApi.getSignupPanelTabTestVariant() == 'control';
 
-            if (inOverflowMenu)
-            {
+            if (inOverflowMenu) {
                 startheight = overflowMenuHeight;
-            }
-            else
-            {
+            } else {
                 startheight = 460;
-                if (fxasignedin == '1')
-                {
+                if (fxasignedin == '1') {
                     startheight = 406;
                 }
             }
             if (!controlvariant) {
                 startheight = 427;
             }
             var variant;
-            if (inOverflowMenu)
-            {
+            if (inOverflowMenu) {
                 variant = 'overflow';
-            }
-            else
-            {
+            } else {
                 variant = 'storyboard_lm';
             }
 
             showPanel("about:pocket-signup?pockethost="
                 + Services.prefs.getCharPref("extensions.pocket.site")
                 + "&fxasignedin="
                 + fxasignedin
                 + "&variant="
@@ -318,17 +309,17 @@ var pktUI = (function() {
         var subview = getSubview();
 
         if (subview) {
           // Use the subview's size
           iframe.style.width = "100%";
           iframe.style.height = subview.parentNode.clientHeight + "px";
         } else {
           // Set an explicit size, panel will adapt.
-          iframe.style.width  = options.width  + "px";
+          iframe.style.width  = options.width + "px";
           iframe.style.height = options.height + "px";
         }
     }
 
     /**
      * Called when the signup and saved panel was hidden
      */
     function panelDidHide() {
--- a/browser/extensions/pocket/content/panels/js/saved.js
+++ b/browser/extensions/pocket/content/panels/js/saved.js
@@ -1,14 +1,13 @@
 /*
 PKT_SAVED_OVERLAY is the view itself and contains all of the methods to manipute the overlay and messaging.
 It does not contain any logic for saving or communication with the extension or server.
 */
-var PKT_SAVED_OVERLAY = function(options)
-{
+var PKT_SAVED_OVERLAY = function(options) {
     var myself = this;
     this.inited = false;
     this.active = false;
     this.wrapper = null;
     this.pockethost = "getpocket.com";
     this.savedItemId = 0;
     this.savedUrl = '';
     this.premiumStatus = false;
@@ -33,53 +32,45 @@ var PKT_SAVED_OVERLAY = function(options
             var newtag = $('<li><a href="#" class="token_tag"></a></li>');
             newtag.find('a').text(tags[i]);
             newtag.addClass(tagclass);
             container.append(newtag);
             this.cxt_suggested_available++;
         }
     };
     this.fillUserTags = function() {
-        thePKT_SAVED.sendMessage("getTags", {}, function(resp)
-        {
-            if (typeof resp == 'object' && typeof resp.tags == 'object')
-            {
+        thePKT_SAVED.sendMessage("getTags", {}, function(resp) {
+            if (typeof resp == 'object' && typeof resp.tags == 'object') {
                 myself.userTags = resp.tags;
             }
         });
     };
-    this.fillSuggestedTags = function()
-    {
-        if (!$('.pkt_ext_suggestedtag_detail').length)
-        {
+    this.fillSuggestedTags = function() {
+        if (!$('.pkt_ext_suggestedtag_detail').length) {
             myself.suggestedTagsLoaded = true;
             myself.startCloseTimer();
             return;
         }
 
         thePKT_SAVED.sendMessage("getSuggestedTags",
         {
             url: myself.savedUrl
-        }, function(resp)
-        {
+        }, function(resp) {
             $('.pkt_ext_suggestedtag_detail').removeClass('pkt_ext_suggestedtag_detail_loading');
-            if (resp.status == 'success')
-            {
+            if (resp.status == 'success') {
                 var newtags = [];
-                for (var i = 0; i < resp.value.suggestedTags.length; i++)
-                {
+                for (var i = 0; i < resp.value.suggestedTags.length; i++) {
                     newtags.push(resp.value.suggestedTags[i].tag);
                 }
                 myself.suggestedTagsLoaded = true;
                 if (!myself.mouseInside) {
                     myself.startCloseTimer();
                 }
                 myself.fillTagContainer(newtags, $('.pkt_ext_suggestedtag_detail ul'), 'token_suggestedtag');
-            }
-            else if (resp.status == 'error') {
+            } else if (resp.status == 'error') {
                 var msg = $('<p class="suggestedtag_msg">');
                 msg.text(resp.error.message);
                 $('.pkt_ext_suggestedtag_detail').append(msg);
                 this.suggestedTagsLoaded = true;
                 if (!myself.mouseInside) {
                     myself.startCloseTimer();
                 }
             }
@@ -93,79 +84,64 @@ var PKT_SAVED_OVERLAY = function(options
         this.wrapper.on('mouseleave', function() {
             myself.mouseInside = false;
             myself.startCloseTimer();
         });
         this.wrapper.on('click', function(e) {
             myself.closeValid = false;
         });
     };
-    this.startCloseTimer = function(manualtime)
-    {
+    this.startCloseTimer = function(manualtime) {
         var settime = manualtime ? manualtime : myself.autocloseTiming;
-        if (typeof myself.autocloseTimer == 'number')
-        {
+        if (typeof myself.autocloseTimer == 'number') {
             clearTimeout(myself.autocloseTimer);
         }
-        myself.autocloseTimer = setTimeout(function()
-        {
-            if (myself.closeValid || myself.preventCloseTimerCancel)
-            {
+        myself.autocloseTimer = setTimeout(function() {
+            if (myself.closeValid || myself.preventCloseTimerCancel) {
                 myself.preventCloseTimerCancel = false;
                 myself.closePopup();
             }
         }, settime);
     };
-    this.stopCloseTimer = function()
-    {
-        if (myself.preventCloseTimerCancel)
-        {
+    this.stopCloseTimer = function() {
+        if (myself.preventCloseTimerCancel) {
             return;
         }
         clearTimeout(myself.autocloseTimer);
     };
     this.closePopup = function() {
         myself.stopCloseTimer();
         thePKT_SAVED.sendMessage("close");
     };
     this.checkValidTagSubmit = function() {
         var inputlength = $.trim($('.pkt_ext_tag_input_wrapper').find('.token-input-input-token').children('input').val()).length;
-        if ($('.pkt_ext_containersaved').find('.token-input-token').length || (inputlength > 0 && inputlength < 26))
-        {
+        if ($('.pkt_ext_containersaved').find('.token-input-token').length || (inputlength > 0 && inputlength < 26)) {
             $('.pkt_ext_containersaved').find('.pkt_ext_btn').removeClass('pkt_ext_btn_disabled');
-        }
-        else
-        {
+        } else {
             $('.pkt_ext_containersaved').find('.pkt_ext_btn').addClass('pkt_ext_btn_disabled');
         }
         myself.updateSlidingTagList();
     };
     this.updateSlidingTagList = function() {
         var inputleft = $('.token-input-input-token input').position().left;
         var listleft = $('.token-input-list').position().left;
         var listleftmanual = parseInt($('.token-input-list').css('left'));
         var listleftnatural = listleft - listleftmanual;
         var leftwidth = $('.pkt_ext_tag_input_wrapper').outerWidth();
 
-        if ((inputleft + listleft + 20) > leftwidth)
-        {
+        if ((inputleft + listleft + 20) > leftwidth) {
             $('.token-input-list').css('left', Math.min(((inputleft + listleftnatural - leftwidth + 20) * -1), 0) + 'px');
-        }
-        else
-        {
+        } else {
             $('.token-input-list').css('left', '0');
         }
     };
     this.checkPlaceholderStatus = function() {
-        if (this.wrapper.find('.pkt_ext_tag_input_wrapper').find('.token-input-token').length)
-        {
+        if (this.wrapper.find('.pkt_ext_tag_input_wrapper').find('.token-input-token').length) {
             this.wrapper.find('.token-input-input-token input').attr('placeholder', '');
-        }
-        else
-        {
+        } else {
             this.wrapper.find('.token-input-input-token input').attr('placeholder', $('.pkt_ext_tag_input').attr('placeholder')).css('width', '200px');
         }
     };
     this.initTagInput = function() {
         var inputwrapper = $('.pkt_ext_tag_input_wrapper');
         inputwrapper.find('.pkt_ext_tag_input').tokenInput([], {
             searchDelay: 200,
             minChars: 1,
@@ -260,18 +236,17 @@ var PKT_SAVED_OVERLAY = function(options
             var key = e.keyCode || e.which;
             if (key == 8) {
                 var selected = $('.token-input-selected-token');
                 if (selected.length) {
                     e.preventDefault();
                     e.stopImmediatePropagation();
                     inputwrapper.find('.pkt_ext_tag_input').tokenInput('remove', {name:selected.find('p').text()});
                 }
-            }
-            else if ($(e.target).parent().hasClass('token-input-input-token')) {
+            } else if ($(e.target).parent().hasClass('token-input-input-token')) {
                 e.stopImmediatePropagation();
             }
         });
     };
     this.disableInput = function() {
         this.wrapper.find('.pkt_ext_item_actions').addClass('pkt_ext_item_actions_disabled');
         this.wrapper.find('.pkt_ext_btn').addClass('pkt_ext_btn_disabled');
         this.wrapper.find('.pkt_ext_tag_input_wrapper').addClass('pkt_ext_tag_input_wrapper_disabled');
@@ -285,44 +260,37 @@ var PKT_SAVED_OVERLAY = function(options
         this.wrapper.find('.pkt_ext_tag_input_wrapper').removeClass('pkt_ext_tag_input_wrapper_disabled');
         if (this.wrapper.find('.pkt_ext_suggestedtag_detail').length) {
             this.wrapper.find('.pkt_ext_suggestedtag_detail').removeClass('pkt_ext_suggestedtag_detail_disabled');
         }
     };
     this.initAddTagInput = function() {
         $('.pkt_ext_btn').click(function(e) {
             e.preventDefault();
-            if ($(this).hasClass('pkt_ext_btn_disabled') || $('.pkt_ext_edit_msg_active').filter('.pkt_ext_edit_msg_error').length)
-            {
+            if ($(this).hasClass('pkt_ext_btn_disabled') || $('.pkt_ext_edit_msg_active').filter('.pkt_ext_edit_msg_error').length) {
                 return;
             }
             myself.disableInput();
             $('.pkt_ext_containersaved').find('.pkt_ext_detail h2').text(myself.dictJSON.processingtags);
             var originaltags = [];
-            $('.token-input-token').each(function()
-            {
+            $('.token-input-token').each(function() {
                 var text = $.trim($(this).find('p').text());
-                if (text.length)
-                {
+                if (text.length) {
                     originaltags.push(text);
                 }
             });
 
             thePKT_SAVED.sendMessage("addTags",
             {
                 url: myself.savedUrl,
                 tags: originaltags
-            }, function(resp)
-            {
-                if (resp.status == 'success')
-                {
+            }, function(resp) {
+                if (resp.status == 'success') {
                     myself.showStateFinalMsg(myself.dictJSON.tagssaved);
-                }
-                else if (resp.status == 'error')
-                {
+                } else if (resp.status == 'error') {
                     $('.pkt_ext_edit_msg').addClass('pkt_ext_edit_msg_error pkt_ext_edit_msg_active').text(resp.error.message);
                 }
             });
         });
     };
     this.initRemovePageInput = function() {
         $('.pkt_ext_removeitem').click(function(e) {
             if ($(this).parents('.pkt_ext_item_actions_disabled').length) {
@@ -335,27 +303,25 @@ var PKT_SAVED_OVERLAY = function(options
                 $('.pkt_ext_containersaved').find('.pkt_ext_detail h2').text(myself.dictJSON.processingremove);
 
                 thePKT_SAVED.sendMessage("deleteItem",
                 {
                     itemId: myself.savedItemId
                 }, function(resp) {
                     if (resp.status == 'success') {
                         myself.showStateFinalMsg(myself.dictJSON.pageremoved);
-                    }
-                    else if (resp.status == 'error') {
+                    } else if (resp.status == 'error') {
                         $('.pkt_ext_edit_msg').addClass('pkt_ext_edit_msg_error pkt_ext_edit_msg_active').text(resp.error.message);
                     }
                 });
             }
         });
     };
     this.initOpenListInput = function() {
-        $('.pkt_ext_openpocket').click(function(e)
-        {
+        $('.pkt_ext_openpocket').click(function(e) {
             e.preventDefault();
             thePKT_SAVED.sendMessage("openTabWithUrl",
             {
                 url: $(this).attr('href'),
                 activate: true
             });
             myself.closePopup();
         });
@@ -397,94 +363,85 @@ var PKT_SAVED_OVERLAY = function(options
             if (activetokenstext.indexOf('|' + $(element).text() + '|') > -1) {
                 $(element).addClass('token_tag_inactive');
             }
         });
     };
     this.showStateSaved = function(initobj) {
         this.wrapper.find('.pkt_ext_detail h2').text(this.dictJSON.pagesaved);
         this.wrapper.find('.pkt_ext_btn').addClass('pkt_ext_btn_disabled');
-        if (typeof initobj.item == 'object')
-        {
+        if (typeof initobj.item == 'object') {
             this.savedItemId = initobj.item.item_id;
             this.savedUrl = initobj.item.given_url;
         }
         $('.pkt_ext_containersaved').addClass('pkt_ext_container_detailactive').removeClass('pkt_ext_container_finalstate');
 
         myself.fillUserTags();
         if (myself.suggestedTagsLoaded) {
             myself.startCloseTimer();
-        }
-        else {
+        } else {
             myself.fillSuggestedTags();
         }
     };
     this.sanitizeText = function(s) {
         var sanitizeMap = {
             "&": "&amp;",
             "<": "&lt;",
             ">": "&gt;",
             '"': '&quot;',
             "'": '&#39;'
         };
-        if (typeof s !== 'string')
-        {
+        if (typeof s !== 'string') {
             return '';
         }
         return String(s).replace(/[&<>"']/g, function(str) {
             return sanitizeMap[str];
         });
     };
     this.showStateFinalMsg = function(msg) {
-        this.wrapper.find('.pkt_ext_tag_detail').one('webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd', function(e)
-        {
+        this.wrapper.find('.pkt_ext_tag_detail').one('webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd', function(e) {
             $(this).off('webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd');
             myself.preventCloseTimerCancel = true;
             myself.startCloseTimer(myself.autocloseTimingFinalState);
             myself.wrapper.find('.pkt_ext_detail h2').text(msg);
         });
         this.wrapper.addClass('pkt_ext_container_finalstate');
     };
     this.showStateError = function(headline, detail) {
         this.wrapper.find('.pkt_ext_detail h2').text(headline);
         this.wrapper.find('.pkt_ext_detail h3').text(detail);
         this.wrapper.addClass('pkt_ext_container_detailactive pkt_ext_container_finalstate pkt_ext_container_finalerrorstate');
         this.preventCloseTimerCancel = true;
         this.startCloseTimer(myself.autocloseTimingFinalState);
     }
-    this.getTranslations = function()
-    {
+    this.getTranslations = function() {
         this.dictJSON = window.pocketStrings;
     };
 };
 
 PKT_SAVED_OVERLAY.prototype = {
-    create()
-    {
-        if (this.active)
-        {
+    create() {
+        if (this.active) {
             return;
         }
         this.active = true;
 
         // set translations
         this.getTranslations();
 
         // set host
         this.dictJSON.pockethost = this.pockethost;
 
         // extra modifier class for collapsed state
-        if (this.inoverflowmenu)
-        {
+        if (this.inoverflowmenu) {
             $('body').addClass('pkt_ext_saved_overflow');
         }
 
         // extra modifier class for language
-        if (this.locale)
-        {
+        if (this.locale) {
             $('body').addClass('pkt_ext_saved_' + this.locale);
         }
 
         // Create actual content
         $('body').append(Handlebars.templates.saved_shell(this.dictJSON));
 
         // Add in premium content (if applicable based on premium status)
         this.createPremiumFunctionality();
@@ -492,20 +449,18 @@ PKT_SAVED_OVERLAY.prototype = {
         // Initialize functionality for overlay
         this.wrapper = $('.pkt_ext_containersaved');
         this.initTagInput();
         this.initAddTagInput();
         this.initRemovePageInput();
         this.initOpenListInput();
         this.initAutoCloseEvents();
     },
-    createPremiumFunctionality()
-    {
-        if (this.premiumStatus && !$('.pkt_ext_suggestedtag_detail').length)
-        {
+    createPremiumFunctionality() {
+        if (this.premiumStatus && !$('.pkt_ext_suggestedtag_detail').length) {
             $('body').append(Handlebars.templates.saved_premiumshell(this.dictJSON));
             $('.pkt_ext_initload').append(Handlebars.templates.saved_premiumextras(this.dictJSON));
         }
     }
 };
 
 
 // Layer between Bookmarklet and Extensions
@@ -528,71 +483,59 @@ PKT_SAVED.prototype = {
 
     sendMessage(messageId, payload, callback) {
         pktPanelMessaging.sendMessage(this.panelId, messageId, payload, callback);
     },
 
     create() {
         var myself = this;
         var url = window.location.href.match(/premiumStatus=([\w|\d|\.]*)&?/);
-        if (url && url.length > 1)
-        {
+        if (url && url.length > 1) {
             myself.overlay.premiumStatus = (url[1] == '1');
         }
         var host = window.location.href.match(/pockethost=([\w|\.]*)&?/);
-        if (host && host.length > 1)
-        {
+        if (host && host.length > 1) {
             myself.overlay.pockethost = host[1];
         }
         var inoverflowmenu = window.location.href.match(/inoverflowmenu=([\w|\.]*)&?/);
-        if (inoverflowmenu && inoverflowmenu.length > 1)
-        {
+        if (inoverflowmenu && inoverflowmenu.length > 1) {
             myself.overlay.inoverflowmenu = (inoverflowmenu[1] == 'true');
         }
         var locale = window.location.href.match(/locale=([\w|\.]*)&?/);
-        if (locale && locale.length > 1)
-        {
+        if (locale && locale.length > 1) {
             myself.overlay.locale = locale[1].toLowerCase();
         }
 
         myself.overlay.create();
 
         // tell back end we're ready
         thePKT_SAVED.sendMessage("show");
 
         // wait confirmation of save before flipping to final saved state
-        thePKT_SAVED.addMessageListener("saveLink", function(resp)
-        {
+        thePKT_SAVED.addMessageListener("saveLink", function(resp) {
             if (resp.status == 'error') {
-                if (typeof resp.error == 'object')
-                {
-                    if (resp.error.localizedKey)
-                    {
+                if (typeof resp.error == 'object') {
+                    if (resp.error.localizedKey) {
                         myself.overlay.showStateError(myself.overlay.dictJSON.pagenotsaved, myself.overlay.dictJSON[resp.error.localizedKey]);
-                    }
-                    else
-                    {
+                    } else {
                         myself.overlay.showStateError(myself.overlay.dictJSON.pagenotsaved, resp.error.message);
                     }
-                }
-                else
-                {
+                } else {
                     myself.overlay.showStateError(myself.overlay.dictJSON.pagenotsaved, myself.overlay.dictJSON.errorgeneric);
                 }
                 return;
             }
 
             myself.overlay.showStateSaved(resp);
         });
 
     }
 }
 
-$(function()
-{
+$(function() {
     if (!window.thePKT_SAVED) {
         var thePKT_SAVED = new PKT_SAVED();
         window.thePKT_SAVED = thePKT_SAVED;
         thePKT_SAVED.init();
     }
 
     var pocketHost = thePKT_SAVED.overlay.pockethost;
     // send an async message to get string data
--- a/browser/extensions/pocket/content/panels/js/signup.js
+++ b/browser/extensions/pocket/content/panels/js/signup.js
@@ -1,14 +1,13 @@
 /*
 PKT_SIGNUP_OVERLAY is the view itself and contains all of the methods to manipute the overlay and messaging.
 It does not contain any logic for saving or communication with the extension or server.
 */
-var PKT_SIGNUP_OVERLAY = function(options)
-{
+var PKT_SIGNUP_OVERLAY = function(options) {
     var myself = this;
     this.inited = false;
     this.active = false;
     this.delayedStateSaved = false;
     this.wrapper = null;
     this.variant = window.___PKT__SIGNUP_VARIANT;
     this.tagline = window.___PKT__SIGNUP_TAGLINE || '';
     this.preventCloseTimerCancel = false;
@@ -18,18 +17,17 @@ var PKT_SIGNUP_OVERLAY = function(option
     this.autocloseTimer = null;
     this.variant = "";
     this.inoverflowmenu = false;
     this.controlvariant;
     this.pockethost = "getpocket.com";
     this.fxasignedin = false;
     this.dictJSON = {};
     this.initCloseTabEvents = function() {
-        $('.btn,.pkt_ext_learnmore,.alreadyhave > a').click(function(e)
-        {
+        $('.btn,.pkt_ext_learnmore,.alreadyhave > a').click(function(e) {
             e.preventDefault();
             thePKT_SIGNUP.sendMessage("openTabWithUrl",
             {
                 url: $(this).attr('href'),
                 activate: true
             });
             myself.closePopup();
         });
@@ -40,99 +38,84 @@ var PKT_SIGNUP_OVERLAY = function(option
     this.sanitizeText = function(s) {
         var sanitizeMap = {
             "&": "&amp;",
             "<": "&lt;",
             ">": "&gt;",
             '"': '&quot;',
             "'": '&#39;'
         };
-        if (typeof s !== 'string')
-        {
+        if (typeof s !== 'string') {
             return '';
         }
         return String(s).replace(/[&<>"']/g, function(str) {
             return sanitizeMap[str];
         });
     };
-    this.getTranslations = function()
-    {
+    this.getTranslations = function() {
         this.dictJSON = window.pocketStrings;
     };
 
 };
 
 PKT_SIGNUP_OVERLAY.prototype = {
-    create()
-    {
+    create() {
         var controlvariant = window.location.href.match(/controlvariant=([\w|\.]*)&?/);
-        if (controlvariant && controlvariant.length > 1)
-        {
+        if (controlvariant && controlvariant.length > 1) {
             this.controlvariant = controlvariant[1];
         }
         var variant = window.location.href.match(/variant=([\w|\.]*)&?/);
-        if (variant && variant.length > 1)
-        {
+        if (variant && variant.length > 1) {
             this.variant = variant[1];
         }
         var fxasignedin = window.location.href.match(/fxasignedin=([\w|\d|\.]*)&?/);
-        if (fxasignedin && fxasignedin.length > 1)
-        {
+        if (fxasignedin && fxasignedin.length > 1) {
             this.fxasignedin = (fxasignedin[1] == '1');
         }
         var host = window.location.href.match(/pockethost=([\w|\.]*)&?/);
-        if (host && host.length > 1)
-        {
+        if (host && host.length > 1) {
             this.pockethost = host[1];
         }
         var inoverflowmenu = window.location.href.match(/inoverflowmenu=([\w|\.]*)&?/);
-        if (inoverflowmenu && inoverflowmenu.length > 1)
-        {
+        if (inoverflowmenu && inoverflowmenu.length > 1) {
             this.inoverflowmenu = (inoverflowmenu[1] == 'true');
         }
         var locale = window.location.href.match(/locale=([\w|\.]*)&?/);
-        if (locale && locale.length > 1)
-        {
+        if (locale && locale.length > 1) {
            this.locale = locale[1].toLowerCase();
         }
 
-        if (this.active)
-        {
+        if (this.active) {
             return;
         }
         this.active = true;
 
         // set translations
         this.getTranslations();
         this.dictJSON.fxasignedin = this.fxasignedin ? 1 : 0;
         this.dictJSON.controlvariant = this.controlvariant == 'true' ? 1 : 0;
         this.dictJSON.variant = (this.variant ? this.variant : 'undefined');
         this.dictJSON.variant += this.fxasignedin ? '_fxa' : '_nonfxa';
         this.dictJSON.pockethost = this.pockethost;
         this.dictJSON.showlearnmore = true;
 
         // extra modifier class for collapsed state
-        if (this.inoverflowmenu)
-        {
+        if (this.inoverflowmenu) {
             $('body').addClass('pkt_ext_signup_overflow');
         }
 
         // extra modifier class for language
-        if (this.locale)
-        {
+        if (this.locale) {
             $('body').addClass('pkt_ext_signup_' + this.locale);
         }
 
         // Create actual content
-        if (this.variant == 'overflow')
-        {
+        if (this.variant == 'overflow') {
             $('body').append(Handlebars.templates.signup_shell(this.dictJSON));
-        }
-        else
-        {
+        } else {
             $('body').append(Handlebars.templates.signupstoryboard_shell(this.dictJSON));
         }
 
 
         // tell background we're ready
         thePKT_SIGNUP.sendMessage("show");
 
         // close events
@@ -166,18 +149,17 @@ PKT_SIGNUP.prototype = {
     create() {
         this.overlay.create();
 
         // tell back end we're ready
         thePKT_SIGNUP.sendMessage("show");
     }
 }
 
-$(function()
-{
+$(function() {
     if (!window.thePKT_SIGNUP) {
         var thePKT_SIGNUP = new PKT_SIGNUP();
         window.thePKT_SIGNUP = thePKT_SIGNUP;
         thePKT_SIGNUP.init();
     }
 
     var pocketHost = thePKT_SIGNUP.overlay.pockethost;
     // send an async message to get string data
--- a/browser/extensions/pocket/content/pktApi.jsm
+++ b/browser/extensions/pocket/content/pktApi.jsm
@@ -96,18 +96,17 @@ var pktApi = (function() {
 
             // Handle non-exception-throwing cases:
             // Neither JSON.parse(false) or JSON.parse(1234) throw errors, hence the type-checking,
             // but... JSON.parse(null) returns 'null', and typeof null === "object",
             // so we must check for that, too.
             if (o && typeof o === "object" && o !== null) {
                 return o;
             }
-        }
-        catch (e) { }
+        } catch (e) { }
 
         return undefined;
     };
 
     /**
      * Settings
      */
 
@@ -136,18 +135,17 @@ var pktApi = (function() {
       *                         the key you are creating/updating.
       */
     function setSetting(key, value) {
         // TODO : Move this to sqlite or a local file so it's not editable (and is safer)
         // https://developer.mozilla.org/en-US/Add-ons/Overlay_Extensions/XUL_School/Local_Storage
 
         if (!value)
             prefBranch.clearUserPref(key);
-        else
-        {
+        else {
             // We use complexValue as tags can have utf-8 characters in them
             var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
             str.data = value;
             prefBranch.setComplexValue(key, Components.interfaces.nsISupportsString, str);
         }
     }
 
     /**
@@ -615,18 +613,17 @@ var pktApi = (function() {
 
     function getMultipleTestOption(testName, testOptions) {
         // Get the test from preferences if we've already assigned the user to a test
         var settingName = 'test.' + testName;
         var assignedValue = getSetting(settingName);
         var valArray = [];
 
         // If not assigned yet, pick and store a value
-        if (!assignedValue)
-        {
+        if (!assignedValue) {
             // Get a weighted array of test variants from the testOptions object
             Object.keys(testOptions).forEach(function(key) {
               for (var i = 0; i < testOptions[key]; i++) {
                 valArray.push(key);
               }
             });
 
             // Get a random test variant and set the user to it
--- a/browser/modules/ContentLinkHandler.jsm
+++ b/browser/modules/ContentLinkHandler.jsm
@@ -115,18 +115,17 @@ this.ContentLinkHandler = {
           break;
         case "search":
           if (!searchAdded && event.type == "DOMLinkAdded") {
             var type = link.type && link.type.toLowerCase();
             type = type.replace(/^\s+|\s*(?:;.*)?$/g, "");
 
             let re = /^(?:https?|ftp):/i;
             if (type == "application/opensearchdescription+xml" && link.title &&
-                re.test(link.href))
-            {
+                re.test(link.href)) {
               let engine = { title: link.title, href: link.href };
               chromeGlobal.sendAsyncMessage("Link:AddSearch",
                                             {engine,
                                              url: link.ownerDocument.documentURI});
               searchAdded = true;
             }
           }
           break;
--- a/browser/modules/ContentSearch.jsm
+++ b/browser/modules/ContentSearch.jsm
@@ -459,18 +459,17 @@ this.ContentSearch = {
       });
     }
   },
 
   _onObserve: Task.async(function* (data) {
     if (data === "engine-current") {
       let engine = yield this._currentEngineObj();
       this._broadcast("CurrentEngine", engine);
-    }
-    else if (data !== "engine-default") {
+    } else if (data !== "engine-default") {
       // engine-default is always sent with engine-current and isn't otherwise
       // relevant to content searches.
       let state = yield this.currentStateObj();
       this._broadcast("CurrentState", state);
     }
   }),
 
   _suggestionDataForBrowser(browser, create = false) {
@@ -534,18 +533,17 @@ this.ContentSearch = {
       deferred.resolve(xhr.response);
     };
     xhr.onerror = xhr.onabort = xhr.ontimeout = () => {
       deferred.resolve(null);
     };
     try {
       // This throws if the URI is erroneously encoded.
       xhr.send();
-    }
-    catch (err) {
+    } catch (err) {
       return Promise.resolve(null);
     }
     return deferred.promise;
   },
 
   _ensureDataHasProperties(data, requiredProperties) {
     for (let prop of requiredProperties) {
       if (!(prop in data)) {
--- a/browser/modules/ContentWebRTC.jsm
+++ b/browser/modules/ContentWebRTC.jsm
@@ -303,26 +303,23 @@ function updateIndicators(aSubject, aTop
     let tabState = getTabStateForContentWindow(contentWindow);
     if (tabState.camera)
       state.showCameraIndicator = true;
     if (tabState.microphone)
       state.showMicrophoneIndicator = true;
     if (tabState.screen) {
       if (tabState.screen == "Screen") {
         state.showScreenSharingIndicator = "Screen";
-      }
-      else if (tabState.screen == "Window") {
+      } else if (tabState.screen == "Window") {
         if (state.showScreenSharingIndicator != "Screen")
           state.showScreenSharingIndicator = "Window";
-      }
-      else if (tabState.screen == "Application") {
+      } else if (tabState.screen == "Application") {
         if (!state.showScreenSharingIndicator)
           state.showScreenSharingIndicator = "Application";
-      }
-      else if (tabState.screen == "Browser") {
+      } else if (tabState.screen == "Browser") {
         if (!state.showScreenSharingIndicator)
           state.showScreenSharingIndicator = "Browser";
       }
     }
     let mm = getMessageManagerForWindow(contentWindow);
     mm.sendAsyncMessage("webrtc:UpdateBrowserIndicators", tabState);
   }
 
--- a/browser/modules/DirectoryLinksProvider.jsm
+++ b/browser/modules/DirectoryLinksProvider.jsm
@@ -171,69 +171,64 @@ var DirectoryLinksProvider = {
     });
   },
 
   get _linksURL() {
     if (!this.__linksURL) {
       try {
         this.__linksURL = Services.prefs.getCharPref(this._observedPrefs["linksURL"]);
         this.__linksURLModified = Services.prefs.prefHasUserValue(this._observedPrefs["linksURL"]);
-      }
-      catch (e) {
+      } catch (e) {
         Cu.reportError("Error fetching directory links url from prefs: " + e);
       }
     }
     return this.__linksURL;
   },
 
   /**
    * Gets the currently selected locale for display.
    * @return  the selected locale or "en-US" if none is selected
    */
   get locale() {
     let matchOS;
     try {
       matchOS = Services.prefs.getBoolPref(PREF_MATCH_OS_LOCALE);
-    }
-    catch (e) {}
+    } catch (e) {}
 
     if (matchOS) {
       return Services.locale.getLocaleComponentForUserAgent();
     }
 
     try {
       let locale = Services.prefs.getComplexValue(PREF_SELECTED_LOCALE,
                                                   Ci.nsIPrefLocalizedString);
       if (locale) {
         return locale.data;
       }
-    }
-    catch (e) {}
+    } catch (e) {}
 
     try {
       return Services.prefs.getCharPref(PREF_SELECTED_LOCALE);
-    }
-    catch (e) {}
+    } catch (e) {}
 
     return "en-US";
   },
 
   /**
    * Set appropriate default ping behavior controlled by enhanced pref
    */
   _setDefaultEnhanced: function DirectoryLinksProvider_setDefaultEnhanced() {
     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
@@ -386,19 +381,18 @@ var DirectoryLinksProvider = {
     let emptyOutput = {directory: [], suggested: [], enhanced: []};
     return OS.File.read(this._directoryFilePath).then(binaryData => {
       let output;
       try {
         let json = gTextDecoder.decode(binaryData);
         let linksObj = JSON.parse(json);
         output = {directory: linksObj.directory || [],
                   suggested: linksObj.suggested || [],
-                  enhanced:  linksObj.enhanced  || []};
-      }
-      catch (e) {
+                  enhanced:  linksObj.enhanced || []};
+      } catch (e) {
         Cu.reportError(e);
       }
       return output || emptyOutput;
     },
     error => {
       Cu.reportError(error);
       return emptyOutput;
     });
@@ -529,36 +523,34 @@ var DirectoryLinksProvider = {
     // Check if the suggested tile was shown
     if (action == "view") {
       sites.slice(0, triggeringSiteIndex + 1).filter(s => s).forEach(site => {
         let {targetedSite, url} = site.link;
         if (targetedSite) {
           this._addFrequencyCapView(url);
         }
       });
-    }
-    // any click action on a suggested tile should stop that tile suggestion
-    // click/block - user either removed a tile or went to a landing page
-    // pin - tile turned into history tile, should no longer be suggested
-    // unpin - the tile was pinned before, should not matter
-    else {
+    } else {
+      // any click action on a suggested tile should stop that tile suggestion
+      // click/block - user either removed a tile or went to a landing page
+      // pin - tile turned into history tile, should no longer be suggested
+      // unpin - the tile was pinned before, should not matter
       // suggested tile has targetedSite, or frecent_sites if it was pinned
       let {frecent_sites, targetedSite, url} = sites[triggeringSiteIndex].link;
       if (frecent_sites || targetedSite) {
         this._setFrequencyCapClick(url);
       }
     }
 
     let newtabEnhanced = false;
     let pingEndPoint = "";
     try {
       newtabEnhanced = Services.prefs.getBoolPref(PREF_NEWTAB_ENHANCED);
       pingEndPoint = Services.prefs.getCharPref(PREF_DIRECTORY_PING);
-    }
-    catch (ex) {}
+    } catch (ex) {}
 
     // Bug 1240245 - We no longer send pings, but frequency capping and fetching
     // tests depend on the following actions, so references to PING remain.
     let invalidAction = PING_ACTIONS.indexOf(action) == -1;
     if (!newtabEnhanced || pingEndPoint == "" || invalidAction) {
       return Promise.resolve();
     }
 
@@ -595,18 +587,17 @@ var DirectoryLinksProvider = {
     let scheme = "", base = "";
     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;',
@@ -960,18 +951,17 @@ var DirectoryLinksProvider = {
    * Loads inadjacent sites
    * @return a promise resolved when lookup Set for sites is built
    */
   _loadInadjacentSites: function DirectoryLinksProvider_loadInadjacentSites() {
     return this._downloadJsonData(this._inadjacentSitesUrl).then(jsonString => {
       let jsonObject = {};
       try {
         jsonObject = JSON.parse(jsonString);
-      }
-      catch (e) {
+      } catch (e) {
         Cu.reportError(e);
       }
 
       this._inadjacentSites = new Set(jsonObject.domains);
     });
   },
 
   /**
@@ -1023,18 +1013,17 @@ var DirectoryLinksProvider = {
    * @return a promise resolved to a valid object or undefined upon error
    */
   _readJsonFile: Task.async(function* (filePath, nullObject) {
     let jsonObj;
     try {
       let binaryData = yield OS.File.read(filePath);
       let json = gTextDecoder.decode(binaryData);
       jsonObj = JSON.parse(json);
-    }
-    catch (e) {}
+    } catch (e) {}
     return jsonObj || nullObject;
   }),
 
   /**
    * Loads frequency cap object from file and parses its content
    * @return a promise resolved upon load completion
    *         on error or non-exstent file _frequencyCaps is set to empty object
    */
@@ -1076,18 +1065,17 @@ var DirectoryLinksProvider = {
       this._frequencyCaps[link.url] = capsObject;
     }
     // set last updated timestamp
     capsObject.lastUpdated = Date.now();
     // check for link configuration
     if (link.frequency_caps) {
       capsObject.dailyCap = link.frequency_caps.daily || DEFAULT_DAILY_FREQUENCY_CAP;
       capsObject.totalCap = link.frequency_caps.total || DEFAULT_TOTAL_FREQUENCY_CAP;
-    }
-    else {
+    } else {
       // fallback to defaults
       capsObject.dailyCap = DEFAULT_DAILY_FREQUENCY_CAP;
       capsObject.totalCap = DEFAULT_TOTAL_FREQUENCY_CAP;
     }
   },
 
   /**
    * Prunes frequency cap objects for outdated links
--- a/browser/modules/E10SUtils.jsm
+++ b/browser/modules/E10SUtils.jsm
@@ -15,18 +15,17 @@ XPCOMUtils.defineLazyPreferenceGetter(th
                                       "extensions.webextensions.remote", false);
 
 function getAboutModule(aURL) {
   // Needs to match NS_GetAboutModuleName
   let moduleName = aURL.path.replace(/[#?].*/, "").toLowerCase();
   let contract = "@mozilla.org/network/protocol/about;1?what=" + moduleName;
   try {
     return Cc[contract].getService(Ci.nsIAboutModule);
-  }
-  catch (e) {
+  } catch (e) {
     // Either the about module isn't defined or it is broken. In either case
     // ignore it.
     return null;
   }
 }
 
 const NOT_REMOTE = null;
 
--- a/browser/modules/Feeds.jsm
+++ b/browser/modules/Feeds.jsm
@@ -88,17 +88,16 @@ this.Feeds = {
       // of creating a new one.
       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/FormSubmitObserver.jsm
+++ b/browser/modules/FormSubmitObserver.jsm
@@ -33,18 +33,17 @@ FormSubmitObserver.prototype =
   _validationMessage: "",
   _content: null,
   _element: null,
 
   /*
    * Public apis
    */
 
-  init(aWindow, aTabChildGlobal)
-  {
+  init(aWindow, aTabChildGlobal) {
     this._content = aWindow;
     this._tab = aTabChildGlobal;
     this._mm =
       this._content.QueryInterface(Ci.nsIInterfaceRequestor)
                    .getInterface(Ci.nsIDocShell)
                    .sameTypeRootTreeItem
                    .QueryInterface(Ci.nsIDocShell)
                    .QueryInterface(Ci.nsIInterfaceRequestor)
@@ -52,18 +51,17 @@ FormSubmitObserver.prototype =
 
     // nsIFormSubmitObserver callback about invalid forms. See HTMLFormElement
     // for details.
     Services.obs.addObserver(this, "invalidformsubmit", false);
     this._tab.addEventListener("pageshow", this, false);
     this._tab.addEventListener("unload", this, false);
   },
 
-  uninit()
-  {
+  uninit() {
     Services.obs.removeObserver(this, "invalidformsubmit");
     this._content.removeEventListener("pageshow", this, false);
     this._content.removeEventListener("unload", this, false);
     this._mm = null;
     this._element = null;
     this._content = null;
     this._tab = null;
   },
@@ -90,18 +88,17 @@ FormSubmitObserver.prototype =
         break;
     }
   },
 
   /*
    * nsIFormSubmitObserver
    */
 
-  notifyInvalidSubmit(aFormElement, aInvalidElements)
-  {
+  notifyInvalidSubmit(aFormElement, aInvalidElements) {
     // We are going to handle invalid form submission attempt by focusing the
     // first invalid element and show the corresponding validation message in a
     // panel attached to the element.
     if (!aInvalidElements.length) {
       return;
     }
 
     // Insure that this is the FormSubmitObserver associated with the
--- a/browser/modules/PluginContent.jsm
+++ b/browser/modules/PluginContent.jsm
@@ -38,48 +38,48 @@ PluginContent.prototype = {
     // Cache of plugin actions for the current page.
     this.pluginData = new Map();
     // Cache of plugin crash information sent from the parent
     this.pluginCrashData = new Map();
 
     // Note that the XBL binding is untrusted
     global.addEventListener("PluginBindingAttached", this, true, true);
     global.addEventListener("PluginPlaceholderReplaced", this, true, true);
-    global.addEventListener("PluginCrashed",         this, true);
-    global.addEventListener("PluginOutdated",        this, true);
-    global.addEventListener("PluginInstantiated",    this, true);
-    global.addEventListener("PluginRemoved",         this, true);
-    global.addEventListener("pagehide",              this, true);
-    global.addEventListener("pageshow",              this, true);
-    global.addEventListener("unload",                this);
-    global.addEventListener("HiddenPlugin",          this, true);
+    global.addEventListener("PluginCrashed", this, true);
+    global.addEventListener("PluginOutdated", this, true);
+    global.addEventListener("PluginInstantiated", this, true);
+    global.addEventListener("PluginRemoved", this, true);
+    global.addEventListener("pagehide", this, true);
+    global.addEventListener("pageshow", this, true);
+    global.addEventListener("unload", this);
+    global.addEventListener("HiddenPlugin", this, true);
 
     global.addMessageListener("BrowserPlugins:ActivatePlugins", this);
     global.addMessageListener("BrowserPlugins:NotificationShown", this);
     global.addMessageListener("BrowserPlugins:ContextMenuCommand", this);
     global.addMessageListener("BrowserPlugins:NPAPIPluginProcessCrashed", this);
     global.addMessageListener("BrowserPlugins:CrashReportSubmitted", this);
     global.addMessageListener("BrowserPlugins:Test:ClearCrashData", this);
 
     Services.obs.addObserver(this, "decoder-doctor-notification", false);
   },
 
   uninit() {
     let global = this.global;
 
     global.removeEventListener("PluginBindingAttached", this, true);
     global.removeEventListener("PluginPlaceholderReplaced", this, true, true);
-    global.removeEventListener("PluginCrashed",         this, true);
-    global.removeEventListener("PluginOutdated",        this, true);
-    global.removeEventListener("PluginInstantiated",    this, true);
-    global.removeEventListener("PluginRemoved",         this, true);
-    global.removeEventListener("pagehide",              this, true);
-    global.removeEventListener("pageshow",              this, true);
-    global.removeEventListener("unload",                this);
-    global.removeEventListener("HiddenPlugin",          this, true);
+    global.removeEventListener("PluginCrashed", this, true);
+    global.removeEventListener("PluginOutdated", this, true);
+    global.removeEventListener("PluginInstantiated", this, true);
+    global.removeEventListener("PluginRemoved", this, true);
+    global.removeEventListener("pagehide", this, true);
+    global.removeEventListener("pageshow", this, true);
+    global.removeEventListener("unload", this);
+    global.removeEventListener("HiddenPlugin", this, true);
 
     global.removeMessageListener("BrowserPlugins:ActivatePlugins", this);
     global.removeMessageListener("BrowserPlugins:NotificationShown", this);
     global.removeMessageListener("BrowserPlugins:ContextMenuCommand", this);
     global.removeMessageListener("BrowserPlugins:NPAPIPluginProcessCrashed", this);
     global.removeMessageListener("BrowserPlugins:CrashReportSubmitted", this);
     global.removeMessageListener("BrowserPlugins:Test:ClearCrashData", this);
 
@@ -854,18 +854,17 @@ PluginContent.prototype = {
         continue;
       }
 
       let permissionObj = Services.perms.
         getPermissionObject(principal, pluginInfo.permissionString, false);
       if (permissionObj) {
         pluginInfo.pluginPermissionPrePath = permissionObj.principal.originNoSuffix;
         pluginInfo.pluginPermissionType = permissionObj.expireType;
-      }
-      else {
+      } else {
         pluginInfo.pluginPermissionPrePath = principal.originNoSuffix;
         pluginInfo.pluginPermissionType = undefined;
       }
 
       this.pluginData.set(pluginInfo.permissionString, pluginInfo);
     }
 
     this.haveShownNotification = true;
--- a/browser/modules/WindowsJumpLists.jsm
+++ b/browser/modules/WindowsJumpLists.jsm
@@ -96,40 +96,40 @@ var tasksCfg = [
    * args        - Command line args to invoke the task.
    * iconIndex   - Optional win icon index into the main application for the
    *               list item.
    * open        - Boolean indicates if the command should be visible after the browser opens.
    * close       - Boolean indicates if the command should be visible after the browser closes.
    */
   // Open new tab
   {
-    get title()       { return _getString("taskbar.tasks.newTab.label"); },
+    get title() { return _getString("taskbar.tasks.newTab.label"); },
     get description() { return _getString("taskbar.tasks.newTab.description"); },
     args:             "-new-tab about:blank",
     iconIndex:        3, // New window icon
     open:             true,
     close:            true, // The jump list already has an app launch icon, but
                             // we don't always update the list on shutdown.
                             // Thus true for consistency.
   },
 
   // Open new window
   {
-    get title()       { return _getString("taskbar.tasks.newWindow.label"); },
+    get title() { return _getString("taskbar.tasks.newWindow.label"); },
     get description() { return _getString("taskbar.tasks.newWindow.description"); },
     args:             "-browser",
     iconIndex:        2, // New tab icon
     open:             true,
     close:            true, // No point, but we don't always update the list on
                             // shutdown. Thus true for consistency.
   },
 
   // Open new private window
   {
-    get title()       { return _getString("taskbar.tasks.newPrivateWindow.label"); },
+    get title() { return _getString("taskbar.tasks.newPrivateWindow.label"); },
     get description() { return _getString("taskbar.tasks.newPrivateWindow.description"); },
     args:             "-private-window",
     iconIndex:        4, // Private browsing mode icon
     open:             true,
     close:            true, // No point, but we don't always update the list on
                             // shutdown. Thus true for consistency.
   },
 ];
@@ -505,30 +505,28 @@ this.WinTaskbarJumpList =
   },
 
   _updateTimer: function WTBJL__updateTimer() {
     if (this._enabled && !this._shuttingDown && !this._timer) {
       this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
       this._timer.initWithCallback(this,
                                    _prefs.getIntPref(PREF_TASKBAR_REFRESH) * 1000,
                                    this._timer.TYPE_REPEATING_SLACK);
-    }
-    else if ((!this._enabled || this._shuttingDown) && this._timer) {
+    } else if ((!this._enabled || this._shuttingDown) && this._timer) {
       this._timer.cancel();
       delete this._timer;
     }
   },
 
   _hasIdleObserver: false,
   _updateIdleObserver: function WTBJL__updateIdleObserver() {
     if (this._enabled && !this._shuttingDown && !this._hasIdleObserver) {
       _idle.addIdleObserver(this, IDLE_TIMEOUT_SECONDS);
       this._hasIdleObserver = true;
-    }
-    else if ((!this._enabled || this._shuttingDown) && this._hasIdleObserver) {
+    } else if ((!this._enabled || this._shuttingDown) && this._hasIdleObserver) {
       _idle.removeIdleObserver(this, IDLE_TIMEOUT_SECONDS);
       this._hasIdleObserver = false;
     }
   },
 
   _free: function WTBJL__free() {
     this._freeObs();
     this._updateTimer();
--- a/browser/modules/WindowsPreviewPerTab.jsm
+++ b/browser/modules/WindowsPreviewPerTab.jsm
@@ -339,17 +339,18 @@ PreviewController.prototype = {
       case "TabAttrModified":
         this.updateTitleAndTooltip();
         break;
     }
   }
 };
 
 XPCOMUtils.defineLazyGetter(PreviewController.prototype, "canvasPreviewFlags",
-  function() { let canvasInterface = Ci.nsIDOMCanvasRenderingContext2D;
+  function() {
+ let canvasInterface = Ci.nsIDOMCanvasRenderingContext2D;
                 return canvasInterface.DRAWWINDOW_DRAW_VIEW
                      | canvasInterface.DRAWWINDOW_DRAW_CARET
                      | canvasInterface.DRAWWINDOW_ASYNC_DECODE_IMAGES
                      | canvasInterface.DRAWWINDOW_DO_NOT_FLUSH;
 });
 
 // TabWindow
 
--- a/browser/modules/test/browser_ContentSearch.js
+++ b/browser/modules/test/browser_ContentSearch.js
@@ -388,14 +388,13 @@ function arrayBufferFromDataURI(uri) {
   xhr.onerror = () => {
     deferred.resolve(null);
   };
   xhr.onload = () => {
     deferred.resolve(xhr.response);
   };
   try {
     xhr.send();
-  }
-  catch (err) {
+  } catch (err) {
     return Promise.resolve(null);
   }
   return deferred.promise;
 }
--- a/browser/modules/test/unit/social/head.js
+++ b/browser/modules/test/unit/social/head.js
@@ -174,18 +174,17 @@ AsyncRunner.prototype = {
 
     try {
       var { done, value: val } = this._iteratorQueue[0].next(arg);
       if (done) {
         this._iteratorQueue.shift();
         this.next();
         return;
       }
-    }
-    catch (err) {
+    } catch (err) {
       this._callbacks.error(err);
     }
 
     // val is an iterator => prepend it to the queue and start on it
     // val is otherwise truthy => call next
     if (val) {
       if (typeof(val) != "boolean")
         this._iteratorQueue.unshift(val);
@@ -197,14 +196,13 @@ AsyncRunner.prototype = {
     Cc["@mozilla.org/consoleservice;1"].
       getService(Ci.nsIConsoleService).
       unregisterListener(this);
     this.destroy = function alreadyDestroyed() {};
   },
 
   observe: function observe(msg) {
     if (msg instanceof Ci.nsIScriptError &&
-        !(msg.flags & Ci.nsIScriptError.warningFlag))
-    {
+        !(msg.flags & Ci.nsIScriptError.warningFlag)) {
       this._callbacks.consoleError(msg);
     }
   },
 };
--- a/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js
+++ b/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js
@@ -134,27 +134,25 @@ function getHttpHandler(path) {
     aResponse.setHeader("Content-Type", "application/json");
     aResponse.write(body);
   };
 }
 
 function isIdentical(actual, expected) {
   if (expected == null) {
     do_check_eq(actual, expected);
-  }
-  else if (typeof expected == "object") {
+  } else if (typeof expected == "object") {
     // Make sure all the keys match up
     do_check_eq(Object.keys(actual).sort() + "", Object.keys(expected).sort());
 
     // Recursively check each value individually
     Object.keys(expected).forEach(key => {
       isIdentical(actual[key], expected[key]);
     });
-  }
-  else {
+  } else {
     do_check_eq(actual, expected);
   }
 }
 
 function fetchData() {
   let deferred = Promise.defer();
 
   DirectoryLinksProvider.getLinks(linkData => {
@@ -1229,18 +1227,17 @@ add_task(function* test_timeSensetiveSug
         let timeDelta = Date.now() - testStartTime;
         if (!deleteFlag) {
           // this is start timeout corresponding to campaign start
           // a seconds must pass and targetedSite must be set
           do_print("TESTING START timeDelta: " + timeDelta);
           do_check_true(timeDelta >= 1000 / 2); // check for at least half time
           do_check_eq(link.targetedSite, "hrblock.com");
           do_check_true(DirectoryLinksProvider._campaignTimeoutID);
-        }
-        else {
+        } else {
           // this is the campaign end timeout, so 3 seconds must pass
           // and timeout should be cleared
           do_print("TESTING END timeDelta: " + timeDelta);
           do_check_true(timeDelta >= 3000 / 2); // check for at least half time
           do_check_false(link.targetedSite);
           do_check_false(DirectoryLinksProvider._campaignTimeoutID);
           resolve();
         }
--- a/browser/modules/webrtcUI.jsm
+++ b/browser/modules/webrtcUI.jsm
@@ -100,18 +100,20 @@ this.webrtcUI = {
     for (let [, indicators] of this.processIndicators) {
       if (indicators.showScreenSharingIndicator)
         list.push(indicators.showScreenSharingIndicator);
     }
 
     let precedence =
       ["Screen", "Window", "Application", "Browser", ""];
 
-    list.sort((a, b) => { return precedence.indexOf(a) -
-                                 precedence.indexOf(b); });
+    list.sort((a, b) => {
+ return precedence.indexOf(a) -
+                                 precedence.indexOf(b);
+});
 
     return list[0];
   },
 
   _streams: [],
   // The boolean parameters indicate which streams should be included in the result.
   getActiveStreams(aCamera, aMicrophone, aScreen) {
     return webrtcUI._streams.filter(aStream => {
@@ -517,18 +519,17 @@ function prompt(aBrowser, aRequest) {
           if (type == "screen") {
             if (device.name == "Primary Monitor") {
               name = stringBundle.getString("getUserMedia.shareEntireScreen.label");
             } else {
               name = stringBundle.getFormattedString("getUserMedia.shareMonitor.label",
                                                      [monitorIndex]);
               ++monitorIndex;
             }
-          }
-          else {
+          } else {
             name = device.name;
             if (type == "application") {
               // The application names returned by the platform are of the form:
               // <window count>\x1e<application name>
               let sepIndex = name.indexOf("\x1e");
               let count = name.slice(0, sepIndex);
               let sawcStringId = "getUserMedia.shareApplicationWindowCount.label";
               name = PluralForm.get(parseInt(count), stringBundle.getString(sawcStringId))
@@ -574,18 +575,17 @@ function prompt(aBrowser, aRequest) {
               Services.urlFormatter.formatURLPref("app.support.baseURL");
             let learnMore =
               "<label class='text-link' href='" + baseURL + "screenshare-safety'>" +
               learnMoreText + "</label>";
 
             if (type == "screen") {
               string = bundle.getFormattedString("getUserMedia.shareScreenWarning.message",
                                                  [learnMore]);
-            }
-            else {
+            } else {
               let brand =
                 doc.getElementById("bundle_brand").getString("brandShortName");
               string = bundle.getFormattedString("getUserMedia.shareFirefoxWarning.message",
                                                  [brand, learnMore]);
             }
             warning.innerHTML = string;
           }
 
@@ -750,21 +750,19 @@ function getGlobalIndicator() {
       webrtcUI.showSharingDoorhanger(aEvent.target.stream);
     },
 
     _popupShowing(aEvent) {
       let type = this.getAttribute("type");
       let activeStreams;
       if (type == "Camera") {
         activeStreams = webrtcUI.getActiveStreams(true, false, false);
-      }
-      else if (type == "Microphone") {
+      } else if (type == "Microphone") {
         activeStreams = webrtcUI.getActiveStreams(false, true, false);
-      }
-      else if (type == "Screen") {
+      } else if (type == "Screen") {
         activeStreams = webrtcUI.getActiveStreams(false, false, true);
         type = webrtcUI.showScreenSharingIndicator;
       }
 
       let bundle =
         Services.strings.createBundle("chrome://browser/locale/webrtcIndicator.properties");
 
       if (activeStreams.length == 1) {
@@ -828,18 +826,17 @@ function getGlobalIndicator() {
         let menupopup = this._hiddenDoc.createElement("menupopup");
         menupopup.setAttribute("type", aName);
         menupopup.addEventListener("popupshowing", this._popupShowing);
         menupopup.addEventListener("popuphiding", this._popupHiding);
         menupopup.addEventListener("command", this._command);
         menu.appendChild(menupopup);
 
         this[field] = menu;
-      }
-      else if (this[field] && !aState) {
+      } else if (this[field] && !aState) {
         this._statusBar.removeItem(this[field]);
         this[field].remove();
         this[field] = null
       }
     },
     updateIndicatorState() {
       this._setIndicatorState("Camera", webrtcUI.showCameraIndicator);
       this._setIndicatorState("Microphone", webrtcUI.showMicrophoneIndicator);
--- a/storage/test/unit/head_storage.js
+++ b/storage/test/unit/head_storage.js
@@ -13,70 +13,64 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 
 do_get_profile();
 var dirSvc = Cc["@mozilla.org/file/directory_service;1"].
              getService(Ci.nsIProperties);
 
 var gDBConn = null;
 
-function getTestDB()
-{
+function getTestDB() {
   var db = dirSvc.get("ProfD", Ci.nsIFile);
   db.append("test_storage.sqlite");
   return db;
 }
 
 /**
  * Obtains a corrupt database to test against.
  */
-function getCorruptDB()
-{
+function getCorruptDB() {
   return do_get_file("corruptDB.sqlite");
 }
 
 /**
  * Obtains a fake (non-SQLite format) database to test against.
  */
-function getFakeDB()
-{
+function getFakeDB() {
   return do_get_file("fakeDB.sqlite");
 }
 
 /**
  * Delete the test database file.
  */
-function deleteTestDB()
-{
+function deleteTestDB() {
   print("*** Storage Tests: Trying to remove file!");
   var dbFile = getTestDB();
   if (dbFile.exists())
     try { dbFile.remove(false); } catch (e) { /* stupid windows box */ }
 }
 
-function cleanup()
-{
+function cleanup() {
   // close the connection
   print("*** Storage Tests: Trying to close!");
   getOpenedDatabase().close();
 
   // we need to null out the database variable to get a new connection the next
   // time getOpenedDatabase is called
   gDBConn = null;
 
   // removing test db
   deleteTestDB();
 }
 
 /**
  * Use asyncClose to cleanup a connection.  Synchronous by means of internally
  * spinning an event loop.
  */
-function asyncCleanup()
-{
+function asyncCleanup() {
   let closed = false;
 
   // close the connection
   print("*** Storage Tests: Trying to asyncClose!");
   getOpenedDatabase().asyncClose(function() { closed = true; });
 
   let curThread = Components.classes["@mozilla.org/thread-manager;1"]
                             .getService().currentThread;
@@ -86,100 +80,92 @@ function asyncCleanup()
   // we need to null out the database variable to get a new connection the next
   // time getOpenedDatabase is called
   gDBConn = null;
 
   // removing test db
   deleteTestDB();
 }
 
-function getService()
-{
+function getService() {
   return Cc["@mozilla.org/storage/service;1"].getService(Ci.mozIStorageService);
 }
 
 /**
  * Get a connection to the test database.  Creates and caches the connection
  * if necessary, otherwise reuses the existing cached connection. This
  * connection shares its cache.
  *
  * @returns the mozIStorageConnection for the file.
  */
-function getOpenedDatabase()
-{
+function getOpenedDatabase() {
   if (!gDBConn) {
     gDBConn = getService().openDatabase(getTestDB());
   }
   return gDBConn;
 }
 
 /**
  * Get a connection to the test database.  Creates and caches the connection
  * if necessary, otherwise reuses the existing cached connection. This
  * connection doesn't share its cache.
  *
  * @returns the mozIStorageConnection for the file.
  */
-function getOpenedUnsharedDatabase()
-{
+function getOpenedUnsharedDatabase() {
   if (!gDBConn) {
     gDBConn = getService().openUnsharedDatabase(getTestDB());
   }
   return gDBConn;
 }
 
 /**
  * Obtains a specific database to use.
  *
  * @param aFile
  *        The nsIFile representing the db file to open.
  * @returns the mozIStorageConnection for the file.
  */
-function getDatabase(aFile)
-{
+function getDatabase(aFile) {
   return getService().openDatabase(aFile);
 }
 
-function createStatement(aSQL)
-{
+function createStatement(aSQL) {
   return getOpenedDatabase().createStatement(aSQL);
 }
 
 /**
  * Creates an asynchronous SQL statement.
  *
  * @param aSQL
  *        The SQL to parse into a statement.
  * @returns a mozIStorageAsyncStatement from aSQL.
  */
-function createAsyncStatement(aSQL)
-{
+function createAsyncStatement(aSQL) {
   return getOpenedDatabase().createAsyncStatement(aSQL);
 }
 
 /**
  * Invoke the given function and assert that it throws an exception expressing
  * the provided error code in its 'result' attribute.  JS function expressions
  * can be used to do this concisely.
  *
  * Example:
  *  expectError(Cr.NS_ERROR_INVALID_ARG, () => explodingFunction());
  *
  * @param aErrorCode
  *        The error code to expect from invocation of aFunction.
  * @param aFunction
  *        The function to invoke and expect an XPCOM-style error from.
  */
-function expectError(aErrorCode, aFunction)
-{
+function expectError(aErrorCode, aFunction) {
   let exceptionCaught = false;
   try {
     aFunction();
-  }
-  catch (e) {
+  } catch (e) {
     if (e.result != aErrorCode) {
       do_throw("Got an exception, but the result code was not the expected " +
                "one.  Expected " + aErrorCode + ", got " + e.result);
     }
     exceptionCaught = true;
   }
   if (!exceptionCaught)
     do_throw(aFunction + " should have thrown an exception but did not!");
@@ -191,82 +177,74 @@ function expectError(aErrorCode, aFuncti
  * @param aSQLString
  *        The SQL string for the query.
  * @param aBind
  *        The value to bind at index 0.
  * @param aResults
  *        A list of the expected values returned in the sole result row.
  *        Express blobs as lists.
  */
-function verifyQuery(aSQLString, aBind, aResults)
-{
+function verifyQuery(aSQLString, aBind, aResults) {
   let stmt = getOpenedDatabase().createStatement(aSQLString);
   stmt.bindByIndex(0, aBind);
   try {
     do_check_true(stmt.executeStep());
     let nCols = stmt.numEntries;
     if (aResults.length != nCols)
       do_throw("Expected " + aResults.length + " columns in result but " +
                "there are only " + aResults.length + "!");
     for (let iCol = 0; iCol < nCols; iCol++) {
       let expectedVal = aResults[iCol];
       let valType = stmt.getTypeOfIndex(iCol);
       if (expectedVal === null) {
         do_check_eq(stmt.VALUE_TYPE_NULL, valType);
         do_check_true(stmt.getIsNull(iCol));
-      }
-      else if (typeof expectedVal == "number") {
+      } else if (typeof expectedVal == "number") {
         if (Math.floor(expectedVal) == expectedVal) {
           do_check_eq(stmt.VALUE_TYPE_INTEGER, valType);
           do_check_eq(expectedVal, stmt.getInt32(iCol));
-        }
-        else {
+        } else {
           do_check_eq(stmt.VALUE_TYPE_FLOAT, valType);
           do_check_eq(expectedVal, stmt.getDouble(iCol));
         }
-      }
-      else if (typeof expectedVal == "string") {
+      } else if (typeof expectedVal == "string") {
         do_check_eq(stmt.VALUE_TYPE_TEXT, valType);
         do_check_eq(expectedVal, stmt.getUTF8String(iCol));
-      }
-      else { // blob
+      } else { // blob
         do_check_eq(stmt.VALUE_TYPE_BLOB, valType);
         let count = { value: 0 }, blob = { value: null };
         stmt.getBlob(iCol, count, blob);
         do_check_eq(count.value, expectedVal.length);
         for (let i = 0; i < count.value; i++) {
           do_check_eq(expectedVal[i], blob.value[i]);
         }
       }
     }
-  }
-  finally {
+  } finally {
     stmt.finalize();
   }
 }
 
 /**
  * Return the number of rows in the able with the given name using a synchronous
  * query.
  *
  * @param aTableName
  *        The name of the table.
  * @return The number of rows.
  */
-function getTableRowCount(aTableName)
-{
+function getTableRowCount(aTableName) {
   var currentRows = 0;
   var countStmt = getOpenedDatabase().createStatement(
     "SELECT COUNT(1) AS count FROM " + aTableName
   );
   try {
     do_check_true(countStmt.executeStep());
     currentRows = countStmt.row.count;
-  }
-  finally {
+  } finally {
     countStmt.finalize();
   }
   return currentRows;
 }
 
 // Promise-Returning Functions
 
 function asyncClone(db, readOnly) {
--- a/storage/test/unit/test_bug-365166.js
+++ b/storage/test/unit/test_bug-365166.js
@@ -1,17 +1,16 @@
 // Testcase for bug 365166 - crash [@ strlen] calling
 // mozIStorageStatement::getColumnName of a statement created with
 // "PRAGMA user_version" or "PRAGMA schema_version"
 function run_test() {
   test('user');
   test('schema');
 
-  function test(param)
-  {
+  function test(param) {
     var colName = param + "_version";
     var sql = "PRAGMA " + colName;
 
     var file = getTestDB();
     var storageService = Components.classes["@mozilla.org/storage/service;1"].
                          getService(Components.interfaces.mozIStorageService);
     var conn = storageService.openDatabase(file);
     var statement = conn.createStatement(sql);
--- a/storage/test/unit/test_bug-393952.js
+++ b/storage/test/unit/test_bug-393952.js
@@ -1,38 +1,35 @@
 /* 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/. */
 
 // Testcase for bug 393952:  crash when I try to VACUUM and one of the tables
 // has a UNIQUE text column.   StorageUnicodeFunctions::likeFunction()
 // needs to handle null aArgv[0] and aArgv[1]
 
-function setup()
-{
+function setup() {
   getOpenedDatabase().createTable("t1", "x TEXT UNIQUE");
 
   var stmt = createStatement("INSERT INTO t1 (x) VALUES ('a')");
   stmt.execute();
   stmt.reset();
   stmt.finalize();
 }
 
-function test_vacuum()
-{
+function test_vacuum() {
   var stmt = createStatement("VACUUM;");
   stmt.executeStep();
   stmt.reset();
   stmt.finalize();
 }
 
 var tests = [test_vacuum];
 
-function run_test()
-{
+function run_test() {
   setup();
 
   for (var i = 0; i < tests.length; i++)
     tests[i]();
 
   cleanup();
 }
 
--- a/storage/test/unit/test_cache_size.js
+++ b/storage/test/unit/test_cache_size.js
@@ -13,18 +13,17 @@
  *        function that opens the DB specified in file
  * @param file
  *        file holding the database
  * @param pageSize
  *        the DB's page size
  * @param expectedCacheSize
  *        the expected cache size for the given page size
  */
-function check_size(dbOpener, file, pageSize, expectedCacheSize)
-{
+function check_size(dbOpener, file, pageSize, expectedCacheSize) {
   // Open the DB, immediately change its page size.
   let db = dbOpener(file);
   db.executeSimpleSQL("PRAGMA page_size = " + pageSize);
 
   // Check the page size change worked.
   let stmt = db.createStatement("PRAGMA page_size");
   do_check_true(stmt.executeStep());
   do_check_eq(stmt.row.page_size, pageSize);
@@ -39,26 +38,24 @@ function check_size(dbOpener, file, page
 
   // Check cache size is as expected.
   stmt = db.createStatement("PRAGMA cache_size");
   do_check_true(stmt.executeStep());
   do_check_eq(stmt.row.cache_size, expectedCacheSize);
   stmt.finalize();
 }
 
-function new_file(name)
-{
+function new_file(name) {
   let file = dirSvc.get("ProfD", Ci.nsIFile);
   file.append(name + ".sqlite");
   do_check_false(file.exists());
   return file;
 }
 
-function run_test()
-{
+function run_test() {
   const kExpectedCacheSize = -2048; // 2MiB
 
   let pageSizes = [
     1024,
     4096,
     32768,
   ];
 
--- a/storage/test/unit/test_connection_executeAsync.js
+++ b/storage/test/unit/test_connection_executeAsync.js
@@ -69,30 +69,28 @@ add_task(function* test_first_create_and
     do_check_eq(REAL, stmt.getDouble(1));
     do_check_true(stmt.getIsNull(2));
     let count = { value: 0 };
     let blob = { value: null };
     stmt.getBlob(3, count, blob);
     do_check_eq(BLOB.length, count.value);
     for (let i = 0; i < BLOB.length; i++)
       do_check_eq(BLOB[i], blob.value[i]);
-  }
-  finally {
+  } finally {
     stmt.finalize();
   }
 
   // Make sure we have two rows in the table
   stmt = db.createStatement(
     "SELECT COUNT(1) FROM test"
   );
   try {
     do_check_true(stmt.executeStep());
     do_check_eq(2, stmt.getInt32(0));
-  }
-  finally {
+  } finally {
     stmt.finalize();
   }
 
   stmts[0].finalize();
   stmts[1].finalize();
 });
 
 add_task(function* test_last_multiple_bindings_on_statements() {
@@ -129,18 +127,17 @@ add_task(function* test_last_multiple_bi
   // Get our current number of rows in the table.
   let currentRows = 0;
   let countStmt = getOpenedDatabase().createStatement(
     "SELECT COUNT(1) AS count FROM test"
   );
   try {
     do_check_true(countStmt.executeStep());
     currentRows = countStmt.row.count;
-  }
-  finally {
+  } finally {
     countStmt.reset();
   }
 
   // Execute asynchronously.
   let execResult = yield executeMultipleStatementsAsync(
     db,
     stmts,
     function(aResultSet) {
@@ -149,18 +146,17 @@ add_task(function* test_last_multiple_bi
   equal(Ci.mozIStorageStatementCallback.REASON_FINISHED, execResult,
         'execution should have finished successfully.');
 
   // Check to make sure we added all of our rows.
   try {
     do_check_true(countStmt.executeStep());
     do_check_eq(currentRows + (ITERATIONS * AMOUNT_TO_ADD),
                 countStmt.row.count);
-  }
-  finally {
+  } finally {
     countStmt.finalize();
   }
 
   stmts.forEach(stmt => stmt.finalize());
 
   // we are the last test using this connection and since it has gone async
   // we *must* call asyncClose on it.
   yield asyncClose(db);
--- a/storage/test/unit/test_js_helpers.js
+++ b/storage/test/unit/test_js_helpers.js
@@ -6,65 +6,61 @@
  */
 
 /**
  * This file tests that the JS language helpers in various ways.
  */
 
 // Test Functions
 
-function test_params_enumerate()
-{
+function test_params_enumerate() {
   let stmt = createStatement(
     "SELECT * FROM test WHERE id IN (:a, :b, :c)"
   );
 
   // Make sure they are right.
   let expected = ["a", "b", "c"];
   let index = 0;
   for (let name in stmt.params) {
     if (name == "QueryInterface")
       continue;
     do_check_eq(name, expected[index++]);
   }
 }
 
-function test_params_prototype()
-{
+function test_params_prototype() {
   let stmt = createStatement(
     "SELECT * FROM sqlite_master"
   );
 
   // Set a property on the prototype and make sure it exist (will not be a
   // bindable parameter, however).
   Object.getPrototypeOf(stmt.params).test = 2;
   do_check_eq(stmt.params.test, 2);
   stmt.finalize();
 }
 
-function test_row_prototype()
-{
+function test_row_prototype() {
   let stmt = createStatement(
     "SELECT * FROM sqlite_master"
   );
 
   do_check_true(stmt.executeStep());
 
   // Set a property on the prototype and make sure it exists (will not be in the
   // results, however).
   Object.getPrototypeOf(stmt.row).test = 2;
   do_check_eq(stmt.row.test, 2);
 
   // Clean up after ourselves.
   delete Object.getPrototypeOf(stmt.row).test;
   stmt.finalize();
 }
 
-function test_params_gets_sync()
-{
+function test_params_gets_sync() {
   // Added for bug 562866.
   /*
   let stmt = createStatement(
     "SELECT * FROM test WHERE id IN (:a, :b, :c)"
   );
 
   // Make sure we do not assert in getting the value.
   let originalCount = Object.getOwnPropertyNames(stmt.params).length;
@@ -74,18 +70,17 @@ function test_params_gets_sync()
   }
 
   // Now make sure we didn't magically get any additional properties.
   let finalCount = Object.getOwnPropertyNames(stmt.params).length;
   do_check_eq(originalCount + expected.length, finalCount);
   */
 }
 
-function test_params_gets_async()
-{
+function test_params_gets_async() {
   // Added for bug 562866.
   /*
   let stmt = createAsyncStatement(
     "SELECT * FROM test WHERE id IN (:a, :b, :c)"
   );
 
   // Make sure we do not assert in getting the value.
   let originalCount = Object.getOwnPropertyNames(stmt.params).length;
@@ -104,18 +99,17 @@ function test_params_gets_async()
 
 var tests = [
   test_params_enumerate,
   test_params_prototype,
   test_row_prototype,
   test_params_gets_sync,
   test_params_gets_async,
 ];
-function run_test()
-{
+function run_test() {
   cleanup();
 
   // Create our database.
   getOpenedDatabase().executeSimpleSQL(
     "CREATE TABLE test (" +
       "id INTEGER PRIMARY KEY " +
     ")"
   );
--- a/storage/test/unit/test_levenshtein.js
+++ b/storage/test/unit/test_levenshtein.js
@@ -1,48 +1,45 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This file tests the Levenshtein Distance function we've registered.
 
-function createUtf16Database()
-{
+function createUtf16Database() {
   print("Creating the in-memory UTF-16-encoded database.");
   let conn = getService().openSpecialDatabase("memory");
   conn.executeSimpleSQL("PRAGMA encoding = 'UTF-16'");
 
   print("Make sure the encoding was set correctly and is now UTF-16.");
   let stmt = conn.createStatement("PRAGMA encoding");
   do_check_true(stmt.executeStep());
   let enc = stmt.getString(0);
   stmt.finalize();
 
   // The value returned will actually be UTF-16le or UTF-16be.
   do_check_true(enc === "UTF-16le" || enc === "UTF-16be");
 
   return conn;
 }
 
-function check_levenshtein(db, s, t, expectedDistance)
-{
+function check_levenshtein(db, s, t, expectedDistance) {
   var stmt = db.createStatement("SELECT levenshteinDistance(:s, :t) AS result");
   stmt.params.s = s;
   stmt.params.t = t;
   try {
     do_check_true(stmt.executeStep());
     do_check_eq(expectedDistance, stmt.row.result);
   } finally {
     stmt.reset();
     stmt.finalize();
   }
 }
 
-function testLevenshtein(db)
-{
+function testLevenshtein(db) {
   // Basic tests.
   check_levenshtein(db, "", "", 0);
   check_levenshtein(db, "foo", "", 3);
   check_levenshtein(db, "", "bar", 3);
   check_levenshtein(db, "yellow", "hello", 2);
   check_levenshtein(db, "gumbo", "gambol", 2);
   check_levenshtein(db, "kitten", "sitten", 1);
   check_levenshtein(db, "sitten", "sittin", 1);
@@ -58,17 +55,16 @@ function testLevenshtein(db)
 
   // The levenshteinDistance function allocates temporary memory on the stack
   // if it can.  Test some strings long enough to force a heap allocation.
   var dots1000 = Array(1001).join(".");
   var dashes1000 = Array(1001).join("-");
   check_levenshtein(db, dots1000, dashes1000, 1000);
 }
 
-function run_test()
-{
+function run_test() {
   testLevenshtein(getOpenedDatabase());
   testLevenshtein(createUtf16Database());
 }
 
 
 
 
--- a/storage/test/unit/test_like.js
+++ b/storage/test/unit/test_like.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This file tests our LIKE implementation since we override it for unicode
 
-function setup()
-{
+function setup() {
   getOpenedDatabase().createTable("t1", "x TEXT");
 
   var stmt = createStatement("INSERT INTO t1 (x) VALUES ('a')");
   stmt.execute();
   stmt.finalize();
 
   stmt = createStatement("INSERT INTO t1 (x) VALUES ('ab')");
   stmt.execute();
@@ -52,150 +51,140 @@ function setup()
   stmt.execute();
   stmt.finalize();
 
   stmt = createStatement("INSERT INTO t1 (x) VALUES ('ABC abc xyz')");
   stmt.execute();
   stmt.finalize();
 }
 
-function test_count()
-{
+function test_count() {
   var stmt = createStatement("SELECT count(*) FROM t1;");
   do_check_true(stmt.executeStep());
   do_check_eq(stmt.getInt32(0), 12);
   stmt.reset();
   stmt.finalize();
 }
 
-function test_like_1()
-{
+function test_like_1() {
   var stmt = createStatement("SELECT x FROM t1 WHERE x LIKE ?;");
   stmt.bindByIndex(0, 'abc');
   var solutions = ["abc", "ABC"];
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_false(stmt.executeStep());
   stmt.reset();
   stmt.finalize();
 }
 
-function test_like_2()
-{
+function test_like_2() {
   var stmt = createStatement("SELECT x FROM t1 WHERE x LIKE ?;");
   stmt.bindByIndex(0, 'ABC');
   var solutions = ["abc", "ABC"];
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_false(stmt.executeStep());
   stmt.reset();
   stmt.finalize();
 }
 
-function test_like_3()
-{
+function test_like_3() {
   var stmt = createStatement("SELECT x FROM t1 WHERE x LIKE ?;");
   stmt.bindByIndex(0, 'aBc');
   var solutions = ["abc", "ABC"];
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_false(stmt.executeStep());
   stmt.reset();
   stmt.finalize();
 }
 
-function test_like_4()
-{
+function test_like_4() {
   var stmt = createStatement("SELECT x FROM t1 WHERE x LIKE ?;");
   stmt.bindByIndex(0, 'abc%');
   var solutions = ["abc", "abcd", "ABC", "ABC abc xyz"];
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_false(stmt.executeStep());
   stmt.reset();
   stmt.finalize();
 }
 
-function test_like_5()
-{
+function test_like_5() {
   var stmt = createStatement("SELECT x FROM t1 WHERE x LIKE ?;");
   stmt.bindByIndex(0, 'a_c');
   var solutions = ["abc", "ABC"];
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_false(stmt.executeStep());
   stmt.reset();
   stmt.finalize();
 }
 
-function test_like_6()
-{
+function test_like_6() {
   var stmt = createStatement("SELECT x FROM t1 WHERE x LIKE ?;");
   stmt.bindByIndex(0, 'ab%d');
   var solutions = ["abcd", "abd"];
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_false(stmt.executeStep());
   stmt.reset();
   stmt.finalize();
 }
 
-function test_like_7()
-{
+function test_like_7() {
   var stmt = createStatement("SELECT x FROM t1 WHERE x LIKE ?;");
   stmt.bindByIndex(0, 'a_c%');
   var solutions = ["abc", "abcd", "ABC", "ABC abc xyz"];
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_false(stmt.executeStep());
   stmt.reset();
   stmt.finalize();
 }
 
-function test_like_8()
-{
+function test_like_8() {
   var stmt = createStatement("SELECT x FROM t1 WHERE x LIKE ?;");
   stmt.bindByIndex(0, '%bcd');
   var solutions = ["abcd", "bcd"];
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_true(stmt.executeStep());
   do_check_true(solutions.indexOf(stmt.getString(0)) != -1);
   do_check_false(stmt.executeStep());
   stmt.reset();
   stmt.finalize();
 }
 
 var tests = [test_count, test_like_1, test_like_2, test_like_3, test_like_4,
              test_like_5, test_like_6, test_like_7, test_like_8];
 
-function run_test()
-{
+function run_test() {
   setup();
 
   for (var i = 0; i < tests.length; i++) {
     tests[i]();
   }
 
   cleanup();
 }
--- a/storage/test/unit/test_like_escape.js
+++ b/storage/test/unit/test_like_escape.js
@@ -1,60 +1,56 @@
 /* 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/. */
 
 const LATIN1_AE = "\xc6";
 const LATIN1_ae = "\xe6";
 
-function setup()
-{
+function setup() {
   getOpenedDatabase().createTable("t1", "x TEXT");
 
   var stmt = createStatement("INSERT INTO t1 (x) VALUES ('foo/bar_baz%20cheese')");
   stmt.execute();
   stmt.finalize();
 
   stmt = createStatement("INSERT INTO t1 (x) VALUES (?1)");
   // insert LATIN_ae, but search on LATIN_AE
   stmt.bindByIndex(0, "foo%20" + LATIN1_ae + "/_bar");
   stmt.execute();
   stmt.finalize();
 }
 
-function test_escape_for_like_ascii()
-{
+function test_escape_for_like_ascii() {
   var stmt = createStatement("SELECT x FROM t1 WHERE x LIKE ?1 ESCAPE '/'");
   var paramForLike = stmt.escapeStringForLIKE("oo/bar_baz%20chees", '/');
   // verify that we escaped / _ and %
   do_check_eq(paramForLike, "oo//bar/_baz/%20chees");
   // prepend and append with % for "contains"
   stmt.bindByIndex(0, "%" + paramForLike + "%");
   stmt.executeStep();
   do_check_eq("foo/bar_baz%20cheese", stmt.getString(0));
   stmt.finalize();
 }
 
-function test_escape_for_like_non_ascii()
-{
+function test_escape_for_like_non_ascii() {
   var stmt = createStatement("SELECT x FROM t1 WHERE x LIKE ?1 ESCAPE '/'");
   var paramForLike = stmt.escapeStringForLIKE("oo%20" + LATIN1_AE + "/_ba", '/');
   // verify that we escaped / _ and %
   do_check_eq(paramForLike, "oo/%20" + LATIN1_AE + "///_ba");
   // prepend and append with % for "contains"
   stmt.bindByIndex(0, "%" + paramForLike + "%");
   stmt.executeStep();
   do_check_eq("foo%20" + LATIN1_ae + "/_bar", stmt.getString(0));
   stmt.finalize();
 }
 
 var tests = [test_escape_for_like_ascii, test_escape_for_like_non_ascii];
 
-function run_test()
-{
+function run_test() {
   setup();
 
   for (var i = 0; i < tests.length; i++) {
     tests[i]();
   }
 
   cleanup();
 }
--- a/storage/test/unit/test_locale_collation.js
+++ b/storage/test/unit/test_locale_collation.js
@@ -25,31 +25,29 @@ var gLocaleCollation;
 var gUtf16Conn;
 
 // Helper Functions
 
 /**
  * Since we create a UTF-16 database we have to clean it up, in addition to
  * the normal cleanup of Storage tests.
  */
-function cleanupLocaleTests()
-{
+function cleanupLocaleTests() {
   print("-- Cleaning up test_locale_collation.js suite.");
   gUtf16Conn.close();
   cleanup();
 }
 
 /**
  * Creates a test database similar to the default one created in
  * head_storage.js, except that this one uses UTF-16 encoding.
  *
  * @return A connection to the database.
  */
-function createUtf16Database()
-{
+function createUtf16Database() {
   print("Creating the in-memory UTF-16-encoded database.");
   let conn = getService().openSpecialDatabase("memory");
   conn.executeSimpleSQL("PRAGMA encoding = 'UTF-16'");
 
   print("Make sure the encoding was set correctly and is now UTF-16.");
   let stmt = conn.createStatement("PRAGMA encoding");
   do_check_true(stmt.executeStep());
   let enc = stmt.getString(0);
@@ -65,18 +63,17 @@ function createUtf16Database()
  * Compares aActual to aExpected, ensuring that the numbers and orderings of
  * the two arrays' elements are the same.
  *
  * @param aActual
  *        An array of strings retrieved from the database.
  * @param aExpected
  *        An array of strings to which aActual should be equivalent.
  */
-function ensureResultsAreCorrect(aActual, aExpected)
-{
+function ensureResultsAreCorrect(aActual, aExpected) {
   print("Actual results:   " + aActual);
   print("Expected results: " + aExpected);
 
   do_check_eq(aActual.length, aExpected.length);
   for (let i = 0; i < aActual.length; i++)
     do_check_eq(aActual[i], aExpected[i]);
 }
 
@@ -86,18 +83,17 @@ function ensureResultsAreCorrect(aActual
  *
  * @param  aCollation
  *         The name of one of our custom locale collations.  The rows are
  *         ordered by this collation.
  * @param  aConn
  *         A connection to either the UTF-8 database or the UTF-16 database.
  * @return The resulting strings in an array.
  */
-function getResults(aCollation, aConn)
-{
+function getResults(aCollation, aConn) {
   let results = [];
   let stmt = aConn.createStatement("SELECT t FROM test " +
                                    "ORDER BY t COLLATE " + aCollation + " ASC");
   while (stmt.executeStep())
     results.push(stmt.row.t);
   stmt.finalize();
   return results;
 }
@@ -105,18 +101,17 @@ function getResults(aCollation, aConn)
 /**
  * Inserts strings into our test table of the given database in the order given.
  *
  * @param aStrings
  *        An array of strings.
  * @param aConn
  *        A connection to either the UTF-8 database or the UTF-16 database.
  */
-function initTableWithStrings(aStrings, aConn)
-{
+function initTableWithStrings(aStrings, aConn) {
   print("Initializing test table.");
 
   aConn.executeSimpleSQL("DROP TABLE IF EXISTS test");
   aConn.createTable("test", "t TEXT");
   let stmt = aConn.createStatement("INSERT INTO test (t) VALUES (:t)");
   aStrings.forEach(function(str) {
     stmt.params.t = str;
     stmt.execute();
@@ -129,18 +124,17 @@ function initTableWithStrings(aStrings, 
  * Returns a sorting function suitable for passing to Array.prototype.sort().
  * The returned function uses the application's locale to compare strings.
  *
  * @param  aCollation
  *         The name of one of our custom locale collations.  The sorting
  *         strength is computed from this value.
  * @return A function to use as a sorting callback.
  */
-function localeCompare(aCollation)
-{
+function localeCompare(aCollation) {
   var strength;
 
   switch (aCollation) {
     case "locale":
       strength = Ci.nsICollation.kCollationCaseInSensitive;
       break;
     case "locale_case_sensitive":
       strength = Ci.nsICollation.kCollationAccentInsenstive;
@@ -161,18 +155,17 @@ function localeCompare(aCollation)
 }
 
 /**
  * Reads in the test data from the file DATA_BASENAME and returns it as an array
  * of strings.
  *
  * @return The test data as an array of strings.
  */
-function readTestData()
-{
+function readTestData() {
   print("Reading in test data.");
 
   let file = do_get_file(DATA_BASENAME);
 
   let istream = Cc["@mozilla.org/network/file-input-stream;1"].
                 createInstance(Ci.nsIFileInputStream);
   istream.init(file, -1, -1, 0);
   istream.QueryInterface(Components.interfaces.nsILineInputStream);
@@ -192,53 +185,49 @@ function readTestData()
  * ensures that they match gStrings sorted by the same collation.
  *
  * @param aCollation
  *        The name of one of our custom locale collations.  The rows from the
  *        database and the expected results are ordered by this collation.
  * @param aConn
  *        A connection to either the UTF-8 database or the UTF-16 database.
  */
-function runTest(aCollation, aConn)
-{
+function runTest(aCollation, aConn) {
   ensureResultsAreCorrect(getResults(aCollation, aConn),
                           gStrings.slice(0).sort(localeCompare(aCollation)));
 }
 
 /**
  * Gets the results from the UTF-8 database using the given collation and
  * ensures that they match gStrings sorted by the same collation.
  *
  * @param aCollation
  *        The name of one of our custom locale collations.  The rows from the
  *        database and the expected results are ordered by this collation.
  */
-function runUtf8Test(aCollation)
-{
+function runUtf8Test(aCollation) {
   runTest(aCollation, getOpenedDatabase());
 }
 
 /**
  * Gets the results from the UTF-16 database using the given collation and
  * ensures that they match gStrings sorted by the same collation.
  *
  * @param aCollation
  *        The name of one of our custom locale collations.  The rows from the
  *        database and the expected results are ordered by this collation.
  */
-function runUtf16Test(aCollation)
-{
+function runUtf16Test(aCollation) {
   runTest(aCollation, gUtf16Conn);
 }
 
 /**
  * Sets up the test suite.
  */
-function setup()
-{
+function setup() {
   print("-- Setting up the test_locale_collation.js suite.");
 
   gStrings = readTestData();
 
   initTableWithStrings(gStrings, getOpenedDatabase());
 
   gUtf16Conn = createUtf16Database();
   initTableWithStrings(gStrings, gUtf16Conn);
@@ -289,16 +278,15 @@ var gTests = [
   },
 
   {
     desc: "Case and accent insensitive UTF-16",
     run:   () => runUtf16Test("locale")
   },
 ];
 
-function run_test()
-{
+function run_test() {
   setup();
   gTests.forEach(function(test) {
     print("-- Running test: " + test.desc);
     test.run();
   });
 }
--- a/storage/test/unit/test_page_size_is_32k.js
+++ b/storage/test/unit/test_page_size_is_32k.js
@@ -2,34 +2,31 @@
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 // This file tests that dbs are using 32k pagesize
 
 const kExpectedPageSize = 32768; // 32K
 const kExpectedCacheSize = -2048; // 2MiB
 
-function check_size(db)
-{
+function check_size(db) {
   var stmt = db.createStatement("PRAGMA page_size");
   stmt.executeStep();
   do_check_eq(stmt.getInt32(0), kExpectedPageSize);
   stmt.finalize();
   stmt = db.createStatement("PRAGMA cache_size");
   stmt.executeStep();
   do_check_eq(stmt.getInt32(0), kExpectedCacheSize);
   stmt.finalize();
 }
 
-function new_file(name)
-{
+function new_file(name) {
   var file = dirSvc.get("ProfD", Ci.nsIFile);
   file.append(name + ".sqlite");
   do_check_false(file.exists());
   return file;
 }
 
-function run_test()
-{
+function run_test() {
   check_size(getDatabase(new_file("shared32k")));
   check_size(getService().openUnsharedDatabase(new_file("unshared32k")));
 }
 
--- a/storage/test/unit/test_sqlite_secure_delete.js
+++ b/storage/test/unit/test_sqlite_secure_delete.js
@@ -13,18 +13,17 @@
 
 /**
  * Reads the contents of a file and returns it as a string.
  *
  * @param aFile
  *        The file to return from.
  * @return the contents of the file in the form of a string.
  */
-function getFileContents(aFile)
-{
+function getFileContents(aFile) {
   let fstream = Cc["@mozilla.org/network/file-input-stream;1"].
                 createInstance(Ci.nsIFileInputStream);
   fstream.init(aFile, -1, 0, 0);
 
   let bstream = Cc["@mozilla.org/binaryinputstream;1"].
                 createInstance(Ci.nsIBinaryInputStream);
   bstream.setInputStream(fstream);
   return bstream.readBytes(bstream.available());
@@ -39,42 +38,39 @@ add_test(function test_delete_removes_da
   let db = getService().openDatabase(file);
 
   // Create the table and insert the data.
   db.createTable("test", "data TEXT");
   let stmt = db.createStatement("INSERT INTO test VALUES(:data)");
   stmt.params.data = TEST_STRING;
   try {
     stmt.execute();
-  }
-  finally {
+  } finally {
     stmt.finalize();
   }
 
   // Make sure this test is actually testing what it thinks by making sure the
   // string shows up in the database.  Because the previous statement was
   // automatically wrapped in a transaction, the contents are already on disk.
   let contents = getFileContents(file);
   do_check_neq(-1, contents.indexOf(TEST_STRING));
 
   // Delete the data, and then close the database.
   stmt = db.createStatement("DELETE FROM test WHERE data = :data");
   stmt.params.data = TEST_STRING;
   try {
     stmt.execute();
-  }
-  finally {
+  } finally {
     stmt.finalize();
   }
   db.close();
 
   // Check the file to see if the string can be found.
   contents = getFileContents(file);
   do_check_eq(-1, contents.indexOf(TEST_STRING));
 
   run_next_test();
 });
 
-function run_test()
-{
+function run_test() {
   cleanup();
   run_next_test();
 }
--- a/storage/test/unit/test_statement_executeAsync.js
+++ b/storage/test/unit/test_statement_executeAsync.js
@@ -37,34 +37,30 @@ const BLOB = [1, 2];
  *        number, we assume it is the number of results rows expected.  If it is
  *        a function, we assume it is a function that takes the 1) result row
  *        number, 2) result tuple, 3) call stack for the original call to
  *        execAsync as arguments.  If it is a list, we currently assume it is a
  *        list of functions where each function is intended to evaluate the
  *        result row at that ordinal position and takes the result tuple and
  *        the call stack for the original call.
  */
-function execAsync(aStmt, aOptions, aResults)
-{
+function execAsync(aStmt, aOptions, aResults) {
   let caller = Components.stack.caller;
   if (aOptions == null)
     aOptions = {};
 
   let resultsExpected;
   let resultsChecker;
   if (aResults == null) {
     resultsExpected = 0;
-  }
-  else if (typeof aResults == "number") {
+  } else if (typeof aResults == "number") {
     resultsExpected = aResults;
-  }
-  else if (typeof aResults == "function") {
+  } else if (typeof aResults == "function") {
     resultsChecker = aResults;
-  }
-  else { // array
+  } else { // array
     resultsExpected = aResults.length;
     resultsChecker = function(aResultNum, aTup, aCaller) {
       aResults[aResultNum](aTup, aCaller);
     };
   }
   let resultsSeen = 0;
 
   let errorCodeExpected = false;
@@ -78,37 +74,34 @@ function execAsync(aStmt, aOptions, aRes
   let errorCodeSeen = false;
 
   if ("cancel" in aOptions && aOptions.cancel)
     altReasonExpected = Ci.mozIStorageStatementCallback.REASON_CANCELED;
 
   let completed = false;
 
   let listener = {
-    handleResult(aResultSet)
-    {
+    handleResult(aResultSet) {
       let row, resultsSeenThisCall = 0;
       while ((row = aResultSet.getNextRow()) != null) {
         if (resultsChecker)
           resultsChecker(resultsSeen, row, caller);
         resultsSeen++;
         resultsSeenThisCall++;
       }
 
       if (!resultsSeenThisCall)
         do_throw("handleResult invoked with 0 result rows!");
     },
-    handleError(aError)
-    {
+    handleError(aError) {
       if (errorCodeSeen != false)
         do_throw("handleError called when we already had an error!");
       errorCodeSeen = aError.result;
     },
-    handleCompletion(aReason)
-    {
+    handleCompletion(aReason) {
       if (completed) // paranoia check
         do_throw("Received a second handleCompletion notification!", caller);
 
       if (resultsSeen != resultsExpected)
         do_throw("Expected " + resultsExpected + " rows of results but " +
                  "got " + resultsSeen + " rows!", caller);
 
       if (errorCodeExpected == true && errorCodeSeen == false)
@@ -127,18 +120,17 @@ function execAsync(aStmt, aOptions, aRes
   };
 
   let pending;
   // Only get a pending reference if we're supposed to do.
   // (note: This does not stop XPConnect from holding onto one currently.)
   if (("cancel" in aOptions && aOptions.cancel) ||
       ("returnPending" in aOptions && aOptions.returnPending)) {
     pending = aStmt.executeAsync(listener);
-  }
-  else {
+  } else {
     aStmt.executeAsync(listener);
   }
 
   if ("cancel" in aOptions && aOptions.cancel)
     pending.cancel();
 
   let curThread = Components.classes["@mozilla.org/thread-manager;1"]
                             .getService().currentThread;
@@ -148,34 +140,32 @@ function execAsync(aStmt, aOptions, aRes
   return pending;
 }
 
 /**
  * Make sure that illegal SQL generates the expected runtime error and does not
  * result in any crashes.  Async-only since the synchronous case generates the
  * error synchronously (and is tested elsewhere).
  */
-function test_illegal_sql_async_deferred()
-{
+function test_illegal_sql_async_deferred() {
   // gibberish
   let stmt = makeTestStatement("I AM A ROBOT. DO AS I SAY.");
   execAsync(stmt, {error: Ci.mozIStorageError.ERROR});
   stmt.finalize();
 
   // legal SQL syntax, but with semantics issues.
   stmt = makeTestStatement("SELECT destination FROM funkytown");
   execAsync(stmt, {error: Ci.mozIStorageError.ERROR});
   stmt.finalize();
 
   run_next_test();
 }
 test_illegal_sql_async_deferred.asyncOnly = true;
 
-function test_create_table()
-{
+function test_create_table() {
   // Ensure our table doesn't exist
   do_check_false(getOpenedDatabase().tableExists("test"));
 
   var stmt = makeTestStatement(
     "CREATE TABLE test (" +
       "id INTEGER, " +
       "string TEXT, " +
       "number REAL, " +
@@ -192,18 +182,17 @@ function test_create_table()
   // Verify that it's created correctly (this will throw if it wasn't)
   let checkStmt = getOpenedDatabase().createStatement(
     "SELECT id, string, number, nuller, blober FROM test"
   );
   checkStmt.finalize();
   run_next_test();
 }
 
-function test_add_data()
-{
+function test_add_data() {
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
     "VALUES (?, ?, ?, ?, ?)"
   );
   stmt.bindBlobByIndex(4, BLOB, BLOB.length);
   stmt.bindByIndex(3, null);
   stmt.bindByIndex(2, REAL);
   stmt.bindByIndex(1, TEXT);
@@ -214,18 +203,17 @@ function test_add_data()
 
   // Check that the result is in the table
   verifyQuery("SELECT string, number, nuller, blober FROM test WHERE id = ?",
               INTEGER,
               [TEXT, REAL, null, BLOB]);
   run_next_test();
 }
 
-function test_get_data()
-{
+function test_get_data() {
   var stmt = makeTestStatement(
     "SELECT string, number, nuller, blober, id FROM test WHERE id = ?"
   );
   stmt.bindByIndex(0, INTEGER);
   execAsync(stmt, {}, [
     function(tuple) {
       do_check_neq(null, tuple);
 
@@ -271,18 +259,17 @@ function test_get_data()
       do_check_eq(INTEGER, tuple.getResultByName("id"));
       do_check_eq(Ci.mozIStorageValueArray.VALUE_TYPE_INTEGER,
                   tuple.getTypeOfIndex(4));
     }]);
   stmt.finalize();
   run_next_test();
 }
 
-function test_tuple_out_of_bounds()
-{
+function test_tuple_out_of_bounds() {
   var stmt = makeTestStatement(
     "SELECT string FROM test"
   );
   execAsync(stmt, {}, [
     function(tuple) {
       do_check_neq(null, tuple);
 
       // Check all out of bounds - should throw
@@ -294,78 +281,72 @@ function test_tuple_out_of_bounds()
         "getUTF8String",
         "getString",
         "getIsNull",
       ];
       for (var i in methods) {
         try {
           tuple[methods[i]](tuple.numEntries);
           do_throw("did not throw :(");
-        }
-        catch (e) {
+        } catch (e) {
           do_check_eq(Cr.NS_ERROR_ILLEGAL_VALUE, e.result);
         }
       }
 
       // getBlob requires more args...
       try {
         var blob = { value: null };
         var size = { value: 0 };
         tuple.getBlob(tuple.numEntries, blob, size);
         do_throw("did not throw :(");
-      }
-      catch (e) {
+      } catch (e) {
         do_check_eq(Cr.NS_ERROR_ILLEGAL_VALUE, e.result);
       }
     }]);
   stmt.finalize();
   run_next_test();
 }
 
-function test_no_listener_works_on_success()
-{
+function test_no_listener_works_on_success() {
   var stmt = makeTestStatement(
     "DELETE FROM test WHERE id = ?"
   );
   stmt.bindByIndex(0, 0);
   stmt.executeAsync();
   stmt.finalize();
 
   // Run the next test.
   run_next_test();
 }
 
-function test_no_listener_works_on_results()
-{
+function test_no_listener_works_on_results() {
   var stmt = makeTestStatement(
     "SELECT ?"
   );
   stmt.bindByIndex(0, 1);
   stmt.executeAsync();
   stmt.finalize();
 
   // Run the next test.
   run_next_test();
 }
 
-function test_no_listener_works_on_error()
-{
+function test_no_listener_works_on_error() {
   // commit without a transaction will trigger an error
   var stmt = makeTestStatement(
     "COMMIT"
   );
   stmt.executeAsync();
   stmt.finalize();
 
   // Run the next test.
   run_next_test();
 }
 
-function test_partial_listener_works()
-{
+function test_partial_listener_works() {
   var stmt = makeTestStatement(
     "DELETE FROM test WHERE id = ?"
   );
   stmt.bindByIndex(0, 0);
   stmt.executeAsync({
     handleResult(aResultSet) {}
   });
   stmt.executeAsync({
@@ -381,32 +362,30 @@ function test_partial_listener_works()
 }
 
 /**
  * Dubious cancellation test that depends on system loading may or may not
  * succeed in canceling things.  It does at least test if calling cancel blows
  * up.  test_AsyncCancellation in test_true_async.cpp is our test that canceling
  * actually works correctly.
  */
-function test_immediate_cancellation()
-{
+function test_immediate_cancellation() {
   var stmt = makeTestStatement(
     "DELETE FROM test WHERE id = ?"
   );
   stmt.bindByIndex(0, 0);
   execAsync(stmt, {cancel: true});
   stmt.finalize();
   run_next_test();
 }
 
 /**
  * Test that calling cancel twice throws the second time.
  */
-function test_double_cancellation()
-{
+function test_double_cancellation() {
   var stmt = makeTestStatement(
     "DELETE FROM test WHERE id = ?"
   );
   stmt.bindByIndex(0, 0);
   let pendingStatement = execAsync(stmt, {cancel: true});
   // And cancel again - expect an exception
   expectError(Cr.NS_ERROR_UNEXPECTED,
               () => pendingStatement.cancel());
@@ -414,18 +393,17 @@ function test_double_cancellation()
   stmt.finalize();
   run_next_test();
 }
 
 /**
  * Verify that nothing untoward happens if we try and cancel something after it
  * has fully run to completion.
  */
-function test_cancellation_after_execution()
-{
+function test_cancellation_after_execution() {
   var stmt = makeTestStatement(
     "DELETE FROM test WHERE id = ?"
   );
   stmt.bindByIndex(0, 0);
   let pendingStatement = execAsync(stmt, {returnPending: true});
   // (the statement has fully executed at this point)
   // canceling after the statement has run to completion should not throw!
   pendingStatement.cancel();
@@ -435,29 +413,27 @@ function test_cancellation_after_executi
 }
 
 /**
  * Verifies that a single statement can be executed more than once.  Might once
  * have been intended to also ensure that callback notifications were not
  * incorrectly interleaved, but that part was brittle (it's totally fine for
  * handleResult to get called multiple times) and not comprehensive.
  */
-function test_double_execute()
-{
+function test_double_execute() {
   var stmt = makeTestStatement(
     "SELECT 1"
   );
   execAsync(stmt, null, 1);
   execAsync(stmt, null, 1);
   stmt.finalize();
   run_next_test();
 }
 
-function test_finalized_statement_does_not_crash()
-{
+function test_finalized_statement_does_not_crash() {
   var stmt = makeTestStatement(
     "SELECT * FROM TEST"
   );
   stmt.finalize();
   // we are concerned about a crash here; an error is fine.
   try {
     stmt.executeAsync();
   } catch (ex) {
@@ -466,18 +442,17 @@ function test_finalized_statement_does_n
 
   // Run the next test.
   run_next_test();
 }
 
 /**
  * Bind by mozIStorageBindingParams on the mozIStorageBaseStatement by index.
  */
-function test_bind_direct_binding_params_by_index()
-{
+function test_bind_direct_binding_params_by_index() {
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
     "VALUES (?, ?, ?, ?, ?)"
   );
   let insertId = nextUniqueId++;
   stmt.bindByIndex(0, insertId);
   stmt.bindByIndex(1, TEXT);
   stmt.bindByIndex(2, REAL);
@@ -489,18 +464,17 @@ function test_bind_direct_binding_params
               insertId,
               [TEXT, REAL, null, BLOB]);
   run_next_test();
 }
 
 /**
  * Bind by mozIStorageBindingParams on the mozIStorageBaseStatement by name.
  */
-function test_bind_direct_binding_params_by_name()
-{
+function test_bind_direct_binding_params_by_name() {
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
     "VALUES (:int, :text, :real, :null, :blob)"
   );
   let insertId = nextUniqueId++;
   stmt.bindByName("int", insertId);
   stmt.bindByName("text", TEXT);
   stmt.bindByName("real", REAL);
@@ -509,18 +483,17 @@ function test_bind_direct_binding_params
   execAsync(stmt);
   stmt.finalize();
   verifyQuery("SELECT string, number, nuller, blober FROM test WHERE id = ?",
               insertId,
               [TEXT, REAL, null, BLOB]);
   run_next_test();
 }
 
-function test_bind_js_params_helper_by_index()
-{
+function test_bind_js_params_helper_by_index() {
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
     "VALUES (?, ?, ?, ?, NULL)"
   );
   let insertId = nextUniqueId++;
   // we cannot bind blobs this way; no blober
   stmt.params[3] = null;
   stmt.params[2] = REAL;
@@ -528,18 +501,17 @@ function test_bind_js_params_helper_by_i
   stmt.params[0] = insertId;
   execAsync(stmt);
   stmt.finalize();
   verifyQuery("SELECT string, number, nuller FROM test WHERE id = ?", insertId,
               [TEXT, REAL, null]);
   run_next_test();
 }
 
-function test_bind_js_params_helper_by_name()
-{
+function test_bind_js_params_helper_by_name() {
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
     "VALUES (:int, :text, :real, :null, NULL)"
   );
   let insertId = nextUniqueId++;
   // we cannot bind blobs this way; no blober
   stmt.params.null = null;
   stmt.params.real = REAL;
@@ -547,18 +519,17 @@ function test_bind_js_params_helper_by_n
   stmt.params.int = insertId;
   execAsync(stmt);
   stmt.finalize();
   verifyQuery("SELECT string, number, nuller FROM test WHERE id = ?", insertId,
               [TEXT, REAL, null]);
   run_next_test();
 }
 
-function test_bind_multiple_rows_by_index()
-{
+function test_bind_multiple_rows_by_index() {
   const AMOUNT_TO_ADD = 5;
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
     "VALUES (?, ?, ?, ?, ?)"
   );
   var array = stmt.newBindingParamsArray();
   for (let i = 0; i < AMOUNT_TO_ADD; i++) {
     let bp = array.newBindingParams();
@@ -574,18 +545,17 @@ function test_bind_multiple_rows_by_inde
 
   let rowCount = getTableRowCount("test");
   execAsync(stmt);
   do_check_eq(rowCount + AMOUNT_TO_ADD, getTableRowCount("test"));
   stmt.finalize();
   run_next_test();
 }
 
-function test_bind_multiple_rows_by_name()
-{
+function test_bind_multiple_rows_by_name() {
   const AMOUNT_TO_ADD = 5;
   var stmt = makeTestStatement(
     "INSERT INTO test (id, string, number, nuller, blober) " +
     "VALUES (:int, :text, :real, :null, :blob)"
   );
   var array = stmt.newBindingParamsArray();
   for (let i = 0; i < AMOUNT_TO_ADD; i++) {
     let bp = array.newBindingParams();
@@ -605,18 +575,17 @@ function test_bind_multiple_rows_by_name
   stmt.finalize();
   run_next_test();
 }
 
 /**
  * Verify that a mozIStorageStatement instance throws immediately when we
  * try and bind to an illegal index.
  */
-function test_bind_out_of_bounds_sync_immediate()
-{
+function test_bind_out_of_bounds_sync_immediate() {
   let stmt = makeTestStatement(
     "INSERT INTO test (id) " +
     "VALUES (?)"
   );
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
 
@@ -631,18 +600,17 @@ function test_bind_out_of_bounds_sync_im
   run_next_test();
 }
 test_bind_out_of_bounds_sync_immediate.syncOnly = true;
 
 /**
  * Verify that a mozIStorageAsyncStatement reports an error asynchronously when
  * we bind to an illegal index.
  */
-function test_bind_out_of_bounds_async_deferred()
-{
+function test_bind_out_of_bounds_async_deferred() {
   let stmt = makeTestStatement(
     "INSERT INTO test (id) " +
     "VALUES (?)"
   );
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
 
@@ -652,18 +620,17 @@ function test_bind_out_of_bounds_async_d
   stmt.bindParameters(array);
   execAsync(stmt, {error: Ci.mozIStorageError.RANGE});
 
   stmt.finalize();
   run_next_test();
 }
 test_bind_out_of_bounds_async_deferred.asyncOnly = true;
 
-function test_bind_no_such_name_sync_immediate()
-{
+function test_bind_no_such_name_sync_immediate() {
   let stmt = makeTestStatement(
     "INSERT INTO test (id) " +
     "VALUES (:foo)"
   );
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
 
@@ -674,18 +641,17 @@ function test_bind_no_such_name_sync_imm
   expectError(Cr.NS_ERROR_INVALID_ARG,
               () => bp.bindBlobByName("doesnotexist", BLOB, BLOB.length));
 
   stmt.finalize();
   run_next_test();
 }
 test_bind_no_such_name_sync_immediate.syncOnly = true;
 
-function test_bind_no_such_name_async_deferred()
-{
+function test_bind_no_such_name_async_deferred() {
   let stmt = makeTestStatement(
     "INSERT INTO test (id) " +
     "VALUES (:foo)"
   );
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
 
@@ -694,50 +660,47 @@ function test_bind_no_such_name_async_de
   stmt.bindParameters(array);
   execAsync(stmt, {error: Ci.mozIStorageError.RANGE});
 
   stmt.finalize();
   run_next_test();
 }
 test_bind_no_such_name_async_deferred.asyncOnly = true;
 
-function test_bind_bogus_type_by_index()
-{
+function test_bind_bogus_type_by_index() {
   // We try to bind a JS Object here that should fail to bind.
   let stmt = makeTestStatement(
     "INSERT INTO test (blober) " +
     "VALUES (?)"
   );
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
   Assert.throws(() => bp.bindByIndex(0, run_test), /NS_ERROR_UNEXPECTED/);
 
   stmt.finalize();
   run_next_test();
 }
 
-function test_bind_bogus_type_by_name()
-{
+function test_bind_bogus_type_by_name() {
   // We try to bind a JS Object here that should fail to bind.
   let stmt = makeTestStatement(
     "INSERT INTO test (blober) " +
     "VALUES (:blob)"
   );
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
   Assert.throws(() => bp.bindByName("blob", run_test), /NS_ERROR_UNEXPECTED/);
 
   stmt.finalize();
   run_next_test();
 }
 
-function test_bind_params_already_locked()
-{
+function test_bind_params_already_locked() {
   let stmt = makeTestStatement(
     "INSERT INTO test (id) " +
     "VALUES (:int)"
   );
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
   bp.bindByName("int", INTEGER);
@@ -746,18 +709,17 @@ function test_bind_params_already_locked
   // We should get an error after we call addParams and try to bind again.
   expectError(Cr.NS_ERROR_UNEXPECTED,
               () => bp.bindByName("int", INTEGER));
 
   stmt.finalize();
   run_next_test();
 }
 
-function test_bind_params_array_already_locked()
-{
+function test_bind_params_array_already_locked() {
   let stmt = makeTestStatement(
     "INSERT INTO test (id) " +
     "VALUES (:int)"
   );
 
   let array = stmt.newBindingParamsArray();
   let bp1 = array.newBindingParams();
   bp1.bindByName("int", INTEGER);
@@ -769,18 +731,17 @@ function test_bind_params_array_already_
   // We should get an error after we have bound the array to the statement.
   expectError(Cr.NS_ERROR_UNEXPECTED,
               () => array.addParams(bp2));
 
   stmt.finalize();
   run_next_test();
 }
 
-function test_no_binding_params_from_locked_array()
-{
+function test_no_binding_params_from_locked_array() {
   let stmt = makeTestStatement(
     "INSERT INTO test (id) " +
     "VALUES (:int)"
   );
 
   let array = stmt.newBindingParamsArray();
   let bp = array.newBindingParams();
   bp.bindByName("int", INTEGER);
@@ -791,18 +752,17 @@ function test_no_binding_params_from_loc
   // to the statement.
   expectError(Cr.NS_ERROR_UNEXPECTED,
               () => array.newBindingParams());
 
   stmt.finalize();
   run_next_test();
 }
 
-function test_not_right_owning_array()
-{
+function test_not_right_owning_array() {
   let stmt = makeTestStatement(
     "INSERT INTO test (id) " +
     "VALUES (:int)"
   );
 
   let array1 = stmt.newBindingParamsArray();
   let array2 = stmt.newBindingParamsArray();
   let bp = array1.newBindingParams();
@@ -811,18 +771,17 @@ function test_not_right_owning_array()
   // We should not be able to add bp to array2 since it was created from array1.
   expectError(Cr.NS_ERROR_UNEXPECTED,
               () => array2.addParams(bp));
 
   stmt.finalize();
   run_next_test();
 }
 
-function test_not_right_owning_statement()
-{
+function test_not_right_owning_statement() {
   let stmt1 = makeTestStatement(
     "INSERT INTO test (id) " +
     "VALUES (:int)"
   );
   let stmt2 = makeTestStatement(
     "INSERT INTO test (id) " +
     "VALUES (:int)"
   );
@@ -837,36 +796,34 @@ function test_not_right_owning_statement
   expectError(Cr.NS_ERROR_UNEXPECTED,
               () => stmt2.bindParameters(array1));
 
   stmt1.finalize();
   stmt2.finalize();
   run_next_test();
 }
 
-function test_bind_empty_array()
-{
+function test_bind_empty_array() {
   let stmt = makeTestStatement(
     "INSERT INTO test (id) " +
     "VALUES (:int)"
   );
 
   let paramsArray = stmt.newBindingParamsArray();
 
   // We should not be able to bind this array to the statement because it is
   // empty.
   expectError(Cr.NS_ERROR_UNEXPECTED,
               () => stmt.bindParameters(paramsArray));
 
   stmt.finalize();
   run_next_test();
 }
 
-function test_multiple_results()
-{
+function test_multiple_results() {
   let expectedResults = getTableRowCount("test");
   // Sanity check - we should have more than one result, but let's be sure.
   do_check_true(expectedResults > 1);
 
   // Now check that we get back two rows of data from our async query.
   let stmt = makeTestStatement("SELECT * FROM test");
   execAsync(stmt, {}, expectedResults);
 
@@ -938,34 +895,32 @@ var tests = [
   test_not_right_owning_statement,
   test_multiple_results,
 ];
 var index = 0;
 
 const STARTING_UNIQUE_ID = 2;
 var nextUniqueId = STARTING_UNIQUE_ID;
 
-function run_next_test()
-{
+function run_next_test() {
   function _run_next_test() {
     // use a loop so we can skip tests...
     while (index < tests.length) {
       let test = tests[index++];
       // skip tests not appropriate to the current test pass
       if ((testPass == TEST_PASS_SYNC && ("asyncOnly" in test)) ||
           (testPass == TEST_PASS_ASYNC && ("syncOnly" in test)))
         continue;
 
       // Asynchronous tests means that exceptions don't kill the test.
       try {
         print("****** Running the next test: " + test.name);
         test();
         return;
-      }
-      catch (e) {
+      } catch (e) {
         do_throw(e);
       }
     }
 
     // if we only completed the first pass, move to the next pass
     if (testPass == TEST_PASS_SYNC) {
       print("********* Beginning mozIStorageAsyncStatement pass.");
       testPass++;
@@ -984,15 +939,14 @@ function run_next_test()
 
   // Don't actually schedule another test if we're quitting.
   if (!_quit) {
     // For saner stacks, we execute this code RSN.
     do_execute_soon(_run_next_test);
   }
 }
 
-function run_test()
-{
+function run_test() {
   cleanup();
 
   do_test_pending();
   run_next_test();
 }
--- a/storage/test/unit/test_statement_wrapper_automatically.js
+++ b/storage/test/unit/test_statement_wrapper_automatically.js
@@ -1,18 +1,17 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
    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/. */
 
 // This file tests the functions of mozIStorageStatementWrapper
 
-function setup()
-{
+function setup() {
   getOpenedDatabase().createTable("test", "id INTEGER PRIMARY KEY, val NONE," +
                                           "alt_val NONE");
 }
 
 /**
  * A convenience wrapper for do_check_eq.  Calls do_check_eq on aActualVal
  * and aReturnedVal, with one caveat.
  *
@@ -27,59 +26,55 @@ function setup()
  * Should any other types require conversion in the future, their conversions
  * may also be abstracted away here.
  *
  * @param aActualVal
  *        the value inserted into the database
  * @param aReturnedVal
  *        the value retrieved from the database
  */
-function checkVal(aActualVal, aReturnedVal)
-{
+function checkVal(aActualVal, aReturnedVal) {
   if (aActualVal instanceof Date) aActualVal = aActualVal.valueOf() * 1000.0;
   do_check_eq(aActualVal, aReturnedVal);
 }
 
 /**
  * Removes all rows from our test table.
  */
-function clearTable()
-{
+function clearTable() {
   var stmt = createStatement("DELETE FROM test");
   stmt.execute();
   stmt.finalize();
   ensureNumRows(0);
 }
 
 /**
  * Ensures that the number of rows in our test table is equal to aNumRows.
  * Calls do_check_eq on aNumRows and the value retrieved by SELECT'ing COUNT(*).
  *
  * @param aNumRows
  *        the number of rows our test table should contain
  */
-function ensureNumRows(aNumRows)
-{
+function ensureNumRows(aNumRows) {
   var stmt = createStatement("SELECT COUNT(*) AS number FROM test");
   do_check_true(stmt.step());
   do_check_eq(aNumRows, stmt.row.number);
   stmt.reset();
   stmt.finalize();
 }
 
 /**
  * Inserts aVal into our test table and checks that insertion was successful by
  * retrieving the newly inserted value from the database and comparing it
  * against aVal.  aVal is bound to a single parameter.
  *
  * @param aVal
  *        value to insert into our test table and check
  */
-function insertAndCheckSingleParam(aVal)
-{
+function insertAndCheckSingleParam(aVal) {
   clearTable();
 
   var stmt = createStatement("INSERT INTO test (val) VALUES (:val)");
   stmt.params.val = aVal;
   stmt.execute();
   stmt.finalize();
 
   ensureNumRows(1);
@@ -95,18 +90,17 @@ function insertAndCheckSingleParam(aVal)
  * Inserts aVal into our test table and checks that insertion was successful by
  * retrieving the newly inserted value from the database and comparing it
  * against aVal.  aVal is bound to two separate parameters, both of which are
  * checked against aVal.
  *
  * @param aVal
  *        value to insert into our test table and check
  */
-function insertAndCheckMultipleParams(aVal)
-{
+function insertAndCheckMultipleParams(aVal) {
   clearTable();
 
   var stmt = createStatement("INSERT INTO test (val, alt_val) " +
                              "VALUES (:val, :val)");
   stmt.params.val = aVal;
   stmt.execute();
   stmt.finalize();
 
@@ -122,45 +116,42 @@ function insertAndCheckMultipleParams(aV
 
 /**
  * A convenience function that prints out a description of aVal using
  * aVal.toString and aVal.toSource.  Output is useful when the test fails.
  *
  * @param aVal
  *        a value inserted or to be inserted into our test table
  */
-function printValDesc(aVal)
-{
+function printValDesc(aVal) {
   try {
     var toSource = aVal.toSource();
   } catch (ex) {
     toSource = "";
   }
   print("Testing value: toString=" + aVal +
         (toSource ? " toSource=" + toSource : ""));
 }
 
-function run_test()
-{
+function run_test() {
   setup();
 
   // function JSValStorageStatementBinder in
   // storage/mozStorageStatementParams.cpp tells us that the following types
   // and only the following types are valid as statement parameters:
   var vals = [
     1337,       // int
     3.1337,     // double
     "foo",      // string
     true,       // boolean
     null,       // null
     new Date(), // Date object
   ];
 
-  vals.forEach(function(val)
-  {
+  vals.forEach(function(val) {
     printValDesc(val);
     print("Single parameter");
     insertAndCheckSingleParam(val);
     print("Multiple parameters");
     insertAndCheckMultipleParams(val);
   });
 
   cleanup();
--- a/storage/test/unit/test_storage_aggregates.js
+++ b/storage/test/unit/test_storage_aggregates.js
@@ -1,18 +1,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/. */
 
 // This file tests the custom aggregate functions
 
 var testNums = [1, 2, 3, 4];
 
-function setup()
-{
+function setup() {
   getOpenedDatabase().createTable("function_tests", "id INTEGER PRIMARY KEY");
 
   var stmt = createStatement("INSERT INTO function_tests (id) VALUES(?1)");
   for (let i = 0; i < testNums.length; ++i) {
     stmt.bindByIndex(0, testNums[i]);
     stmt.execute();
   }
   stmt.reset();
@@ -35,82 +34,75 @@ var testSquareAndSumFunction = {
 
   onFinal() {
     var retval = this._sas;
     this._sas = 0; // Prepare for next group
     return retval;
   }
 };
 
-function test_aggregate_registration()
-{
+function test_aggregate_registration() {
   var msc = getOpenedDatabase();
   msc.createAggregateFunction("test_sas_aggr", 1, testSquareAndSumFunction);
 }
 
-function test_aggregate_no_double_registration()
-{
+function test_aggregate_no_double_registration() {
   var msc = getOpenedDatabase();
   try {
     msc.createAggregateFunction("test_sas_aggr", 2, testSquareAndSumFunction);
     do_throw("We shouldn't get here!");
   } catch (e) {
     do_check_eq(Cr.NS_ERROR_FAILURE, e.result);
   }
 }
 
-function test_aggregate_removal()
-{
+function test_aggregate_removal() {
   var msc = getOpenedDatabase();
   msc.removeFunction("test_sas_aggr");
   // Should be Ok now
   msc.createAggregateFunction("test_sas_aggr", 1, testSquareAndSumFunction);
 }
 
-function test_aggregate_no_aliases()
-{
+function test_aggregate_no_aliases() {
   var msc = getOpenedDatabase();
   try {
     msc.createAggregateFunction("test_sas_aggr2", 1, testSquareAndSumFunction);
     do_throw("We shouldn't get here!");
   } catch (e) {
     do_check_eq(Cr.NS_ERROR_FAILURE, e.result);
   }
 }
 
-function test_aggregate_call()
-{
+function test_aggregate_call() {
   var stmt = createStatement("SELECT test_sas_aggr(id) FROM function_tests");
   while (stmt.executeStep()) {
     // Do nothing.
   }
   do_check_eq(testNums.length, testSquareAndSumFunction.calls);
   testSquareAndSumFunction.reset();
   stmt.finalize();
 }
 
-function test_aggregate_result()
-{
+function test_aggregate_result() {
   var sas = 0;
   for (var i = 0; i < testNums.length; ++i) {
     sas += testNums[i] * testNums[i];
   }
   var stmt = createStatement("SELECT test_sas_aggr(id) FROM function_tests");
   stmt.executeStep();
   do_check_eq(sas, stmt.getInt32(0));
   testSquareAndSumFunction.reset();
   stmt.finalize();
 }
 
 var tests = [test_aggregate_registration, test_aggregate_no_double_registration,
              test_aggregate_removal, test_aggregate_no_aliases, test_aggregate_call,
              test_aggregate_result];
 
-function run_test()
-{
+function run_test() {
   setup();
 
   for (var i = 0; i < tests.length; i++) {
     tests[i]();
   }
 
   cleanup();
 }
--- a/storage/test/unit/test_storage_connection.js
+++ b/storage/test/unit/test_storage_connection.js
@@ -181,18 +181,17 @@ add_task(function* test_createTable() {
 });
 
 add_task(function* test_defaultSynchronousAtNormal() {
   getOpenedDatabase();
   var stmt = createStatement("PRAGMA synchronous;");
   try {
     stmt.executeStep();
     do_check_eq(1, stmt.getInt32(0));
-  }
-  finally {
+  } finally {
     stmt.reset();
     stmt.finalize();
   }
 });
 
 // must be ran before executeAsync tests
 add_task(function* test_close_does_not_spin_event_loop() {
   // We want to make sure that the event loop on the calling thread does not
--- a/storage/test/unit/test_storage_fulltextindex.js
+++ b/storage/test/unit/test_storage_fulltextindex.js
@@ -2,28 +2,26 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This file tests support for the fts3 (full-text index) module.
 
 // Example statements in these tests are taken from the Full Text Index page
 // on the SQLite wiki: http://www.sqlite.org/cvstrac/wiki?p=FullTextIndex
 
-function test_table_creation()
-{
+function test_table_creation() {
   var msc = getOpenedUnsharedDatabase();
 
   msc.executeSimpleSQL(
     "CREATE VIRTUAL TABLE recipe USING fts3(name, ingredients)");
 
   do_check_true(msc.tableExists("recipe"));
 }
 
-function test_insertion()
-{
+function test_insertion() {
   var msc = getOpenedUnsharedDatabase();
 
   msc.executeSimpleSQL("INSERT INTO recipe (name, ingredients) VALUES " +
                        "('broccoli stew', 'broccoli peppers cheese tomatoes')");
   msc.executeSimpleSQL("INSERT INTO recipe (name, ingredients) VALUES " +
                        "('pumpkin stew', 'pumpkin onions garlic celery')");
   msc.executeSimpleSQL("INSERT INTO recipe (name, ingredients) VALUES " +
                        "('broccoli pie', 'broccoli cheese onions flour')");
@@ -34,18 +32,17 @@ function test_insertion()
   stmt.executeStep();
 
   do_check_eq(stmt.getInt32(0), 4);
 
   stmt.reset();
   stmt.finalize();
 }
 
-function test_selection()
-{
+function test_selection() {
   var msc = getOpenedUnsharedDatabase();
 
   var stmt = msc.createStatement(
     "SELECT rowid, name, ingredients FROM recipe WHERE name MATCH 'pie'");
 
   do_check_true(stmt.executeStep());
   do_check_eq(stmt.getInt32(0), 3);
   do_check_eq(stmt.getString(1), "broccoli pie");
@@ -59,28 +56,26 @@ function test_selection()
   do_check_false(stmt.executeStep());
 
   stmt.reset();
   stmt.finalize();
 }
 
 var tests = [test_table_creation, test_insertion, test_selection];
 
-function run_test()
-{
+function run_test() {
   // It's extra important to start from scratch, since these tests won't work
   // with an existing shared cache connection, so we do it even though the last
   // test probably did it already.
   cleanup();
 
   try {
     for (var i = 0; i < tests.length; i++) {
       tests[i]();
     }
-  }
-  // It's extra important to clean up afterwards, since later tests that use
-  // a shared cache connection will not be able to read the database we create,
-  // so we do this in a finally block to ensure it happens even if some of our
-  // tests fail.
-  finally {
+  } finally {
+    // It's extra important to clean up afterwards, since later tests that use
+    // a shared cache connection will not be able to read the database we create,
+    // so we do this in a finally block to ensure it happens even if some of our
+    // tests fail.
     cleanup();
   }
 }
--- a/storage/test/unit/test_storage_function.js
+++ b/storage/test/unit/test_storage_function.js
@@ -1,18 +1,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/. */
 
 // This file tests the custom functions
 
 var testNums = [1, 2, 3, 4];
 
-function setup()
-{
+function setup() {
   getOpenedDatabase().createTable("function_tests", "id INTEGER PRIMARY KEY");
 
   var stmt = createStatement("INSERT INTO function_tests (id) VALUES(?1)");
   for (let i = 0; i < testNums.length; ++i) {
     stmt.bindByIndex(0, testNums[i]);
     stmt.execute();
   }
   stmt.reset();
@@ -23,73 +22,66 @@ var testSquareFunction = {
   calls: 0,
 
   onFunctionCall(val) {
     ++this.calls;
     return val.getInt32(0) * val.getInt32(0);
   }
 };
 
-function test_function_registration()
-{
+function test_function_registration() {
   var msc = getOpenedDatabase();
   msc.createFunction("test_square", 1, testSquareFunction);
 }
 
-function test_function_no_double_registration()
-{
+function test_function_no_double_registration() {
   var msc = getOpenedDatabase();
   try {
     msc.createFunction("test_square", 2, testSquareFunction);
     do_throw("We shouldn't get here!");
   } catch (e) {
     do_check_eq(Cr.NS_ERROR_FAILURE, e.result);
   }
 }
 
-function test_function_removal()
-{
+function test_function_removal() {
   var msc = getOpenedDatabase();
   msc.removeFunction("test_square");
   // Should be Ok now
   msc.createFunction("test_square", 1, testSquareFunction);
 }
 
-function test_function_aliases()
-{
+function test_function_aliases() {
   var msc = getOpenedDatabase();
   msc.createFunction("test_square2", 1, testSquareFunction);
 }
 
-function test_function_call()
-{
+function test_function_call() {
   var stmt = createStatement("SELECT test_square(id) FROM function_tests");
   while (stmt.executeStep()) {
     // Do nothing.
   }
   do_check_eq(testNums.length, testSquareFunction.calls);
   testSquareFunction.calls = 0;
   stmt.finalize();
 }
 
-function test_function_result()
-{
+function test_function_result() {
   var stmt = createStatement("SELECT test_square(42) FROM function_tests");
   stmt.executeStep();
   do_check_eq(42 * 42, stmt.getInt32(0));
   testSquareFunction.calls = 0;
   stmt.finalize();
 }
 
 var tests = [test_function_registration, test_function_no_double_registration,
              test_function_removal, test_function_aliases, test_function_call,
              test_function_result];
 
-function run_test()
-{
+function run_test() {
   setup();
 
   for (var i = 0; i < tests.length; i++) {
     tests[i]();
   }
 
   cleanup();
 }
--- a/storage/test/unit/test_storage_progresshandler.js
+++ b/storage/test/unit/test_storage_progresshandler.js
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This file tests the custom progress handlers
 
-function setup()
-{
+function setup() {
   var msc = getOpenedDatabase();
   msc.createTable("handler_tests", "id INTEGER PRIMARY KEY, num INTEGER");
   msc.beginTransaction();
 
   var stmt = createStatement("INSERT INTO handler_tests (id, num) VALUES(?1, ?2)");
   for (let i = 0; i < 100; ++i) {
     stmt.bindByIndex(0, i);
     stmt.bindByIndex(1, Math.floor(Math.random() * 1000));
@@ -26,53 +25,48 @@ var testProgressHandler = {
   abort: false,
 
   onProgress(comm) {
     ++this.calls;
     return this.abort;
   }
 };
 
-function test_handler_registration()
-{
+function test_handler_registration() {
   var msc = getOpenedDatabase();
   msc.setProgressHandler(10, testProgressHandler);
 }
 
-function test_handler_return()
-{
+function test_handler_return() {
   var msc = getOpenedDatabase();
   var oldH = msc.setProgressHandler(5, testProgressHandler);
   do_check_true(oldH instanceof Ci.mozIStorageProgressHandler);
 }
 
-function test_handler_removal()
-{
+function test_handler_removal() {
   var msc = getOpenedDatabase();
   msc.removeProgressHandler();
   var oldH = msc.removeProgressHandler();
   do_check_eq(oldH, null);
 }
 
-function test_handler_call()
-{
+function test_handler_call() {
   var msc = getOpenedDatabase();
   msc.setProgressHandler(50, testProgressHandler);
   // Some long-executing request
   var stmt = createStatement(
     "SELECT SUM(t1.num * t2.num) FROM handler_tests AS t1, handler_tests AS t2");
   while (stmt.executeStep()) {
     // Do nothing.
   }
   do_check_true(testProgressHandler.calls > 0);
   stmt.finalize();
 }
 
-function test_handler_abort()
-{
+function test_handler_abort() {
   var msc = getOpenedDatabase();
   testProgressHandler.abort = true;
   msc.setProgressHandler(50, testProgressHandler);
   // Some long-executing request
   var stmt = createStatement(
     "SELECT SUM(t1.num * t2.num) FROM handler_tests AS t1, handler_tests AS t2");
 
   const SQLITE_INTERRUPT = 9;
@@ -94,18 +88,17 @@ function test_handler_abort()
     do_check_eq(SQLITE_INTERRUPT, msc.lastError);
   }
 }
 
 var tests = [test_handler_registration, test_handler_return,
              test_handler_removal, test_handler_call,
              test_handler_abort];
 
-function run_test()
-{
+function run_test() {
   setup();
 
   for (var i = 0; i < tests.length; i++) {
     tests[i]();
   }
 
   cleanup();
 }
--- a/storage/test/unit/test_storage_service.js
+++ b/storage/test/unit/test_storage_service.js
@@ -2,112 +2,100 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This file tests the functions of mozIStorageService except for
 // openUnsharedDatabase, which is tested by test_storage_service_unshared.js.
 
 const BACKUP_FILE_NAME = "test_storage.sqlite.backup";
 
-function test_openSpecialDatabase_invalid_arg()
-{
+function test_openSpecialDatabase_invalid_arg() {
   try {
     getService().openSpecialDatabase("abcd");
     do_throw("We should not get here!");
   } catch (e) {
     print(e);
     print("e.result is " + e.result);
     do_check_eq(Cr.NS_ERROR_INVALID_ARG, e.result);
   }
 }
 
-function test_openDatabase_null_file()
-{
+function test_openDatabase_null_file() {
   try {
     getService().openDatabase(null);
     do_throw("We should not get here!");
   } catch (e) {
     print(e);
     print("e.result is " + e.result);
     do_check_eq(Cr.NS_ERROR_INVALID_ARG, e.result);
   }
 }
 
-function test_openUnsharedDatabase_null_file()
-{
+function test_openUnsharedDatabase_null_file() {
   try {
     getService().openUnsharedDatabase(null);
     do_throw("We should not get here!");
   } catch (e) {
     print(e);
     print("e.result is " + e.result);
     do_check_eq(Cr.NS_ERROR_INVALID_ARG, e.result);
   }
 }
 
-function test_openDatabase_file_DNE()
-{
+function test_openDatabase_file_DNE() {
   // the file should be created after calling
   var db = getTestDB();
   do_check_false(db.exists());
   getService().openDatabase(db);
   do_check_true(db.exists());
 }
 
-function test_openDatabase_file_exists()
-{
+function test_openDatabase_file_exists() {
   // it should already exist from our last test
   var db = getTestDB();
   do_check_true(db.exists());
   getService().openDatabase(db);
   do_check_true(db.exists());
 }
 
-function test_corrupt_db_throws_with_openDatabase()
-{
+function test_corrupt_db_throws_with_openDatabase() {
   try {
     getDatabase(getCorruptDB());
     do_throw("should not be here");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_eq(Cr.NS_ERROR_FILE_CORRUPTED, e.result);
   }
 }
 
-function test_fake_db_throws_with_openDatabase()
-{
+function test_fake_db_throws_with_openDatabase() {
   try {
     getDatabase(getFakeDB());
     do_throw("should not be here");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_eq(Cr.NS_ERROR_FILE_CORRUPTED, e.result);
   }
 }
 
-function test_backup_not_new_filename()
-{
+function test_backup_not_new_filename() {
   const fname = getTestDB().leafName;
 
   var backup = getService().backupDatabaseFile(getTestDB(), fname);
   do_check_neq(fname, backup.leafName);
 
   backup.remove(false);
 }
 
-function test_backup_new_filename()
-{
+function test_backup_new_filename() {
   var backup = getService().backupDatabaseFile(getTestDB(), BACKUP_FILE_NAME);
   do_check_eq(BACKUP_FILE_NAME, backup.leafName);
 
   backup.remove(false);
 }
 
-function test_backup_new_folder()
-{
+function test_backup_new_folder() {
   var parentDir = getTestDB().parent;
   parentDir.append("test_storage_temp");
   if (parentDir.exists())
     parentDir.remove(true);
   parentDir.create(Ci.nsIFile.DIRECTORY_TYPE, 0o755);
   do_check_true(parentDir.exists());
 
   var backup = getService().backupDatabaseFile(getTestDB(), BACKUP_FILE_NAME,
@@ -126,17 +114,16 @@ var tests = [
   test_openDatabase_file_exists,
   test_corrupt_db_throws_with_openDatabase,
   test_fake_db_throws_with_openDatabase,
   test_backup_not_new_filename,
   test_backup_new_filename,
   test_backup_new_folder,
 ];
 
-function run_test()
-{
+function run_test() {
   for (var i = 0; i < tests.length; i++) {
     tests[i]();
   }
 
   cleanup();
 }
 
--- a/storage/test/unit/test_storage_service_unshared.js
+++ b/storage/test/unit/test_storage_service_unshared.js
@@ -1,35 +1,32 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This file tests the openUnsharedDatabase function of mozIStorageService.
 
-function test_openUnsharedDatabase_file_DNE()
-{
+function test_openUnsharedDatabase_file_DNE() {
   // the file should be created after calling
   var db = getTestDB();
   do_check_false(db.exists());
   getService().openUnsharedDatabase(db);
   do_check_true(db.exists());
 }
 
-function test_openUnsharedDatabase_file_exists()
-{
+function test_openUnsharedDatabase_file_exists() {
   // it should already exist from our last test
   var db = getTestDB();
   do_check_true(db.exists());
   getService().openUnsharedDatabase(db);
   do_check_true(db.exists());
 }
 
 var tests = [test_openUnsharedDatabase_file_DNE,
              test_openUnsharedDatabase_file_exists];
 
-function run_test()
-{
+function run_test() {
   for (var i = 0; i < tests.length; i++)
     tests[i]();
 
   cleanup();
 }
 
--- a/storage/test/unit/test_storage_statement.js
+++ b/storage/test/unit/test_storage_statement.js
@@ -1,88 +1,78 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This file tests the functions of mozIStorageStatement
 
-function setup()
-{
+function setup() {
   getOpenedDatabase().createTable("test", "id INTEGER PRIMARY KEY, name TEXT");
 }
 
-function test_parameterCount_none()
-{
+function test_parameterCount_none() {
   var stmt = createStatement("SELECT * FROM test");
   do_check_eq(0, stmt.parameterCount);
   stmt.reset();
   stmt.finalize();
 }
 
-function test_parameterCount_one()
-{
+function test_parameterCount_one() {
   var stmt = createStatement("SELECT * FROM test WHERE id = ?1");
   do_check_eq(1, stmt.parameterCount);
   stmt.reset();
   stmt.finalize();
 }
 
-function test_getParameterName()
-{
+function test_getParameterName() {
   var stmt = createStatement("SELECT * FROM test WHERE id = :id");
   do_check_eq(":id", stmt.getParameterName(0));
   stmt.reset();
   stmt.finalize();
 }
 
-function test_getParameterIndex_different()
-{
+function test_getParameterIndex_different() {
   var stmt = createStatement("SELECT * FROM test WHERE id = :id OR name = :name");
   do_check_eq(0, stmt.getParameterIndex("id"));
   do_check_eq(1, stmt.getParameterIndex("name"));
   stmt.reset();
   stmt.finalize();
 }
 
-function test_getParameterIndex_same()
-{
+function test_getParameterIndex_same() {
   var stmt = createStatement("SELECT * FROM test WHERE id = :test OR name = :test");
   do_check_eq(0, stmt.getParameterIndex("test"));
   stmt.reset();
   stmt.finalize();
 }
 
-function test_columnCount()
-{
+function test_columnCount() {
   var stmt = createStatement("SELECT * FROM test WHERE id = ?1 OR name = ?2");
   do_check_eq(2, stmt.columnCount);
   stmt.reset();
   stmt.finalize();
 }
 
-function test_getColumnName()
-{
+function test_getColumnName() {
   var stmt = createStatement("SELECT name, id FROM test");
   do_check_eq("id", stmt.getColumnName(1));
   do_check_eq("name", stmt.getColumnName(0));
   stmt.reset();
   stmt.finalize();
 }
 
-function test_getColumnIndex_same_case()
-{
+function test_getColumnIndex_same_case() {
   var stmt = createStatement("SELECT name, id FROM test");
   do_check_eq(0, stmt.getColumnIndex("name"));
   do_check_eq(1, stmt.getColumnIndex("id"));
   stmt.reset();
   stmt.finalize();
 }
 
-function test_getColumnIndex_different_case()
-{
+function test_getColumnIndex_different_case() {
   var stmt = createStatement("SELECT name, id FROM test");
   try {
     do_check_eq(0, stmt.getColumnIndex("NaMe"));
     do_throw("should not get here");
   } catch (e) {
     do_check_eq(Cr.NS_ERROR_INVALID_ARG, e.result);
   }
   try {
@@ -90,26 +80,24 @@ function test_getColumnIndex_different_c
     do_throw("should not get here");
   } catch (e) {
     do_check_eq(Cr.NS_ERROR_INVALID_ARG, e.result);
   }
   stmt.reset();
   stmt.finalize();
 }
 
-function test_state_ready()
-{
+function test_state_ready() {
   var stmt = createStatement("SELECT name, id FROM test");
   do_check_eq(Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_READY, stmt.state);
   stmt.reset();
   stmt.finalize();
 }
 
-function test_state_executing()
-{
+function test_state_executing() {
   var stmt = createStatement("INSERT INTO test (name) VALUES ('foo')");
   stmt.execute();
   stmt.execute();
   stmt.finalize();
 
   stmt = createStatement("SELECT name, id FROM test");
   stmt.executeStep();
   do_check_eq(Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_EXECUTING,
@@ -117,47 +105,43 @@ function test_state_executing()
   stmt.executeStep();
   do_check_eq(Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_EXECUTING,
               stmt.state);
   stmt.reset();
   do_check_eq(Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_READY, stmt.state);
   stmt.finalize();
 }
 
-function test_state_after_finalize()
-{
+function test_state_after_finalize() {
   var stmt = createStatement("SELECT name, id FROM test");
   stmt.executeStep();
   stmt.finalize();
   do_check_eq(Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_INVALID, stmt.state);
 }
 
-function test_failed_execute()
-{
+function test_failed_execute() {
   var stmt = createStatement("INSERT INTO test (name) VALUES ('foo')");
   stmt.execute();
   stmt.finalize();
   var id = getOpenedDatabase().lastInsertRowID;
   stmt = createStatement("INSERT INTO test(id, name) VALUES(:id, 'bar')");
   stmt.params.id = id;
   try {
     // Should throw a constraint error
     stmt.execute();
     do_throw("Should have seen a constraint error");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_eq(getOpenedDatabase().lastError, Ci.mozIStorageError.CONSTRAINT);
   }
   do_check_eq(Ci.mozIStorageStatement.MOZ_STORAGE_STATEMENT_READY, stmt.state);
   // Should succeed without needing to reset the statement manually
   stmt.finalize();
 }
 
-function test_bind_undefined()
-{
+function test_bind_undefined() {
   var stmt = createStatement("INSERT INTO test (name) VALUES ('foo')");
 
   expectError(Cr.NS_ERROR_ILLEGAL_VALUE,
               () => stmt.bindParameters(undefined));
 
   stmt.finalize();
 }
 
@@ -166,18 +150,17 @@ var tests = [test_parameterCount_none, t
              test_getParameterIndex_same, test_columnCount,
              test_getColumnName, test_getColumnIndex_same_case,
              test_getColumnIndex_different_case, test_state_ready,
              test_state_executing, test_state_after_finalize,
              test_failed_execute,
              test_bind_undefined,
 ];
 
-function run_test()
-{
+function run_test() {
   setup();
 
   for (var i = 0; i < tests.length; i++) {
     tests[i]();
   }
 
   cleanup();
 }
--- a/storage/test/unit/test_telemetry_vfs.js
+++ b/storage/test/unit/test_telemetry_vfs.js
@@ -5,24 +5,22 @@
 // Make sure that there are telemetry entries created by sqlite io
 
 function run_sql(d, sql) {
   var stmt = d.createStatement(sql);
   stmt.execute();
   stmt.finalize();
 }
 
-function new_file(name)
-{
+function new_file(name) {
   var file = dirSvc.get("ProfD", Ci.nsIFile);
   file.append(name);
   return file;
 }
-function run_test()
-{
+function run_test() {
   const Telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
   let read_hgram = Telemetry.getHistogramById("MOZ_SQLITE_OTHER_READ_B");
   let old_sum = read_hgram.snapshot().sum;
   const file = new_file("telemetry.sqlite");
   var d = getDatabase(file);
   run_sql(d, "CREATE TABLE bloat(data varchar)");
   run_sql(d, "DROP TABLE bloat");
   do_check_true(read_hgram.snapshot().sum > old_sum);
--- a/storage/test/unit/test_vacuum.js
+++ b/storage/test/unit/test_vacuum.js
@@ -7,18 +7,17 @@
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 /**
  * Loads a test component that will register as a vacuum-participant.
  * If other participants are found they will be unregistered, to avoid conflicts
  * with the test itself.
  */
-function load_test_vacuum_component()
-{
+function load_test_vacuum_component() {
   const CATEGORY_NAME = "vacuum-participant";
 
   do_load_manifest("vacuumParticipant.manifest");
 
   // This is a lazy check, there could be more participants than just this test
   // we just mind that the test exists though.
   const EXPECTED_ENTRIES = ["vacuumParticipant"];
   let catMan = Cc["@mozilla.org/categorymanager;1"].
@@ -27,75 +26,69 @@ function load_test_vacuum_component()
   let entries = catMan.enumerateCategory(CATEGORY_NAME);
   while (entries.hasMoreElements()) {
     let entry = entries.getNext().QueryInterface(Ci.nsISupportsCString).data;
     print("Check if the found category entry (" + entry + ") is expected.");
     if (EXPECTED_ENTRIES.indexOf(entry) != -1) {
       print("Check that only one test entry exists.");
       do_check_false(found);
       found = true;
-    }
-    else {
+    } else {
       // Temporary unregister other participants for this test.
       catMan.deleteCategoryEntry("vacuum-participant", entry, false);
     }
   }
   print("Check the test entry exists.");
   do_check_true(found);
 }
 
 /**
  * Sends a fake idle-daily notification to the VACUUM Manager.
  */
-function synthesize_idle_daily()
-{
+function synthesize_idle_daily() {
   let vm = Cc["@mozilla.org/storage/vacuum;1"].getService(Ci.nsIObserver);
   vm.observe(null, "idle-daily", null);
 }
 
 /**
  * Returns a new nsIFile reference for a profile database.
  * @param filename for the database, excluded the .sqlite extension.
  */
-function new_db_file(name)
-{
+function new_db_file(name) {
   let file = Services.dirsvc.get("ProfD", Ci.nsIFile);
   file.append(name + ".sqlite");
   return file;
 }
 
-function run_test()
-{
+function run_test() {
   do_test_pending();
 
   // Change initial page size.  Do it immediately since it would require an
   // additional vacuum op to do it later.  As a bonus this makes the page size
   // change test really fast since it only has to check results.
   let conn = getDatabase(new_db_file("testVacuum"));
   conn.executeSimpleSQL("PRAGMA page_size = 1024");
   print("Check current page size.");
   let stmt = conn.createStatement("PRAGMA page_size");
   try {
     while (stmt.executeStep()) {
       do_check_eq(stmt.row.page_size, 1024);
     }
-  }
-  finally {
+  } finally {
     stmt.finalize();
   }
 
   load_test_vacuum_component();
 
   run_next_test();
 }
 
 const TESTS = [
 
-  function test_common_vacuum()
-  {
+  function test_common_vacuum() {
     print("\n*** Test that a VACUUM correctly happens and all notifications are fired.");
     // Wait for VACUUM begin.
     let beginVacuumReceived = false;
     Services.obs.addObserver(function onVacuum(aSubject, aTopic, aData) {
       Services.obs.removeObserver(onVacuum, aTopic);
       beginVacuumReceived = true;
     }, "test-begin-vacuum", false);
 
@@ -104,18 +97,17 @@ const TESTS = [
     let heavyIOTaskEndReceived = false;
     Services.obs.addObserver(function onVacuum(aSubject, aTopic, aData) {
       if (heavyIOTaskBeginReceived && heavyIOTaskEndReceived) {
         Services.obs.removeObserver(onVacuum, aTopic);
       }
 
       if (aData == "vacuum-begin") {
         heavyIOTaskBeginReceived = true;
-      }
-      else if (aData == "vacuum-end") {
+      } else if (aData == "vacuum-end") {
         heavyIOTaskEndReceived = true;
       }
     }, "heavy-io-task", false);
 
     // Wait for VACUUM end.
     Services.obs.addObserver(function onVacuum(aSubject, aTopic, aData) {
       Services.obs.removeObserver(onVacuum, aTopic);
       print("Check we received onBeginVacuum");
@@ -125,18 +117,17 @@ const TESTS = [
       do_check_true(heavyIOTaskEndReceived);
       print("Received onEndVacuum");
       run_next_test();
     }, "test-end-vacuum", false);
 
     synthesize_idle_daily();
   },
 
-  function test_skipped_if_recent_vacuum()
-  {
+  function test_skipped_if_recent_vacuum() {
     print("\n*** Test that a VACUUM is skipped if it was run recently.");
     Services.prefs.setIntPref("storage.vacuum.last.testVacuum.sqlite",
                               parseInt(Date.now() / 1000));
 
     // Wait for VACUUM begin.
     let vacuumObserver = {
       gotNotification: false,
       observe: function VO_observe(aSubject, aTopic, aData) {
@@ -152,39 +143,36 @@ const TESTS = [
       do_check_false(vacuumObserver.gotNotification);
       Services.obs.removeObserver(vacuumObserver, "test-begin-vacuum");
       run_next_test();
     });
 
     synthesize_idle_daily();
   },
 
-  function test_page_size_change()
-  {
+  function test_page_size_change() {
     print("\n*** Test that a VACUUM changes page_size");
 
     // We did setup the database with a small page size, the previous vacuum
     // should have updated it.
     print("Check that page size was updated.");
     let conn = getDatabase(new_db_file("testVacuum"));
     let stmt = conn.createStatement("PRAGMA page_size");
     try {
       while (stmt.executeStep()) {
         do_check_eq(stmt.row.page_size, conn.defaultPageSize);
       }
-    }
-    finally {
+    } finally {
       stmt.finalize();
     }
 
     run_next_test();
   },
 
-  function test_skipped_optout_vacuum()
-  {
+  function test_skipped_optout_vacuum() {
     print("\n*** Test that a VACUUM is skipped if the participant wants to opt-out.");
     Services.obs.notifyObservers(null, "test-options", "opt-out");
 
     // Wait for VACUUM begin.
     let vacuumObserver = {
       gotNotification: false,
       observe: function VO_observe(aSubject, aTopic, aData) {
         this.gotNotification = true;
@@ -266,18 +254,17 @@ const TESTS = [
       QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
     }
     Services.obs.addObserver(vacuumObserver, "test-end-vacuum", false);
 
     synthesize_idle_daily();
   },
   */
 
-  function test_memory_database_crash()
-  {
+  function test_memory_database_crash() {
     print("\n*** Test that we don't crash trying to vacuum a memory database");
     Services.obs.notifyObservers(null, "test-options", "memory");
 
     // Wait for VACUUM begin.
     let vacuumObserver = {
       gotNotification: false,
       observe: function VO_observe(aSubject, aTopic, aData) {
         this.gotNotification = true;
@@ -315,21 +302,19 @@ const TESTS = [
     }
     Services.obs.addObserver(vacuumObserver, "test-end-vacuum", false);
 
     synthesize_idle_daily();
   },
   */
 ];
 
-function run_next_test()
-{
+function run_next_test() {
   if (TESTS.length == 0) {
     Services.obs.notifyObservers(null, "test-options", "dispose");
     do_test_finished();
-  }
-  else {
+  } else {
     // Set last VACUUM to a date in the past.
     Services.prefs.setIntPref("storage.vacuum.last.testVacuum.sqlite",
                               parseInt(Date.now() / 1000 - 31 * 86400));
     do_execute_soon(TESTS.shift());
   }
 }
--- a/storage/test/unit/vacuumParticipant.js
+++ b/storage/test/unit/vacuumParticipant.js
@@ -9,35 +9,32 @@ const Ci = Components.interfaces;
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 /**
  * Returns a new nsIFile reference for a profile database.
  * @param filename for the database, excluded the .sqlite extension.
  */
-function new_db_file(name)
-{
+function new_db_file(name) {
   let file = Services.dirsvc.get("ProfD", Ci.nsIFile);
   file.append(name + ".sqlite");
   return file;
 }
 
 /**
  * Opens and returns a connection to the provided database file.
  * @param nsIFile interface to the database file.
  */
-function getDatabase(aFile)
-{
+function getDatabase(aFile) {
   return Cc["@mozilla.org/storage/service;1"].getService(Ci.mozIStorageService)
                                              .openDatabase(aFile);
 }
 
-function vacuumParticipant()
-{
+function vacuumParticipant() {
   this._dbConn = getDatabase(new_db_file("testVacuum"));
   Services.obs.addObserver(this, "test-options", false);
 }
 
 vacuumParticipant.prototype =
 {
   classDescription: "vacuumParticipant",
   classID: Components.ID("{52aa0b22-b82f-4e38-992a-c3675a3355d2}"),
@@ -46,71 +43,64 @@ vacuumParticipant.prototype =
   get expectedDatabasePageSize() {
     return this._dbConn.defaultPageSize;
   },
   get databaseConnection() {
     return this._dbConn;
   },
 
   _grant: true,
-  onBeginVacuum: function TVP_onBeginVacuum()
-  {
+  onBeginVacuum: function TVP_onBeginVacuum() {
     if (!this._grant) {
       this._grant = true;
       return false;
     }
     Services.obs.notifyObservers(null, "test-begin-vacuum", null);
     return true;
   },
-  onEndVacuum: function TVP_EndVacuum(aSucceeded)
-  {
+  onEndVacuum: function TVP_EndVacuum(aSucceeded) {
     if (this._stmt) {
       this._stmt.finalize();
     }
     Services.obs.notifyObservers(null, "test-end-vacuum", aSucceeded);
   },
 
-  observe: function TVP_observe(aSubject, aTopic, aData)
-  {
+  observe: function TVP_observe(aSubject, aTopic, aData) {
     if (aData == "opt-out") {
       this._grant = false;
-    }
-    else if (aData == "wal") {
+    } else if (aData == "wal") {
       try {
         this._dbConn.close();
       } catch (e) {
         // Do nothing.
       }
       this._dbConn = getDatabase(new_db_file("testVacuum2"));
-    }
-    else if (aData == "wal-fail") {
+    } else if (aData == "wal-fail") {
       try {
         this._dbConn.close();
       } catch (e) {
         // Do nothing.
       }
       this._dbConn = getDatabase(new_db_file("testVacuum3"));
       // Use WAL journal mode.
       this._dbConn.executeSimpleSQL("PRAGMA journal_mode = WAL");
       // Create a not finalized statement.
       this._stmt = this._dbConn.createStatement("SELECT :test");
       this._stmt.params.test = 1;
       this._stmt.executeStep();
-    }
-    else if (aData == "memory") {
+    } else if (aData == "memory") {
       try {
         this._dbConn.asyncClose();
       } catch (e) {
         // Do nothing.
       }
       this._dbConn = Cc["@mozilla.org/storage/service;1"].
                      getService(Ci.mozIStorageService).
                      openSpecialDatabase("memory");
-    }
-    else if (aData == "dispose") {
+    } else if (aData == "dispose") {
       Services.obs.removeObserver(this, "test-options");
       try {
         this._dbConn.asyncClose();
       } catch (e) {
         // Do nothing.
       }
     }
   },
--- a/toolkit/.eslintrc.js
+++ b/toolkit/.eslintrc.js
@@ -9,17 +9,17 @@ module.exports = {
 
     // Require spacing around =>
     "arrow-spacing": "error",
 
     // Always require spacing around a single line block
     "block-spacing": "error",
 
     // No newline before open brace for a block
-    // "brace-style": "error",
+    "brace-style": ["error", "1tbs", { "allowSingleLine": true }],
 
     // No space before always a space after a comma
     "comma-spacing": ["error", {"before": false, "after": true}],
 
     // Commas at the end of the line not the start
     // "comma-style": "error",
 
     // Don't require spaces around computed properties
@@ -104,17 +104,17 @@ module.exports = {
 
     // No single if block inside an else block
     "no-lonely-if": "error",
 
     // No mixing spaces and tabs in indent
     "no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
 
     // No unnecessary spacing
-    // "no-multi-spaces": ["error", { exceptions: { "AssignmentExpression": true, "VariableDeclarator": true, "ArrayExpression": true, "ObjectExpression": true } }],
+    "no-multi-spaces": ["error", { exceptions: { "AssignmentExpression": true, "VariableDeclarator": true, "ArrayExpression": true, "ObjectExpression": true } }],
 
     // No reassigning native JS objects
     "no-native-reassign": "error",
 
     // Nested ternary statements are confusing
     "no-nested-ternary": "error",
 
     // Use {} instead of new Object()
--- a/toolkit/components/aboutcache/content/aboutCache.js
+++ b/toolkit/components/aboutcache/content/aboutCache.js
@@ -23,18 +23,17 @@ addEventListener('DOMContentLoaded', fun
   $('anon').checked = !!isAnon;
   $('inbrowser').checked = !!isInBrowser;
   $('appid').value = appId || '';
   $('priv').checked = !!isPrivate;
 }, false);
 
 // When user presses the [Update] button, we build a new context key according the UI control
 // values and navigate to a new about:cache?storage=<name>&context=<key> URL.
-function navigate()
-{
+function navigate() {
   context = '';
   if ($('anon').checked)
     context += 'a,';
   if ($('inbrowser').checked)
     context += 'b,';
   if ($('appid').value)
     context += 'i' + $('appid').value + ',';
   if ($('priv').checked)
--- a/toolkit/components/aboutmemory/content/aboutMemory.js
+++ b/toolkit/components/aboutmemory/content/aboutMemory.js
@@ -61,74 +61,67 @@ const gUnnamedProcessStr = "Main Process
 
 var gIsDiff = false;
 
 // ---------------------------------------------------------------------------
 
 // Forward slashes in URLs in paths are represented with backslashes to avoid
 // being mistaken for path separators.  Paths/names where this hasn't been
 // undone are prefixed with "unsafe"; the rest are prefixed with "safe".
-function flipBackslashes(aUnsafeStr)
-{
+function flipBackslashes(aUnsafeStr) {
   // Save memory by only doing the replacement if it's necessary.
   return (aUnsafeStr.indexOf('\\') === -1)
          ? aUnsafeStr
          : aUnsafeStr.replace(/\\/g, '/');
 }
 
 const gAssertionFailureMsgPrefix = "aboutMemory.js assertion failed: ";
 
 // This is used for things that should never fail, and indicate a defect in
 // this file if they do.
-function assert(aCond, aMsg)
-{
+function assert(aCond, aMsg) {
   if (!aCond) {
     reportAssertionFailure(aMsg)
     throw new Error(gAssertionFailureMsgPrefix + aMsg);
   }
 }
 
 // This is used for malformed input from memory reporters.
-function assertInput(aCond, aMsg)
-{
+function assertInput(aCond, aMsg) {
   if (!aCond) {
     throw new Error("Invalid memory report(s): " + aMsg);
   }
 }
 
-function handleException(ex)
-{
+function handleException(ex) {
   let str = "" + ex;
   if (str.startsWith(gAssertionFailureMsgPrefix)) {
     // Argh, assertion failure within this file!  Give up.
     throw ex;
   } else {
     // File or memory reporter problem.  Print a message.
     updateMainAndFooter(str, HIDE_FOOTER, "badInputWarning");
   }
 }
 
-function reportAssertionFailure(aMsg)
-{
+function reportAssertionFailure(aMsg) {
   let debug = Cc["@mozilla.org/xpcom/debug;1"].getService(Ci.nsIDebug2);
   if (debug.isDebugBuild) {
     debug.assertion(aMsg, "false", "aboutMemory.js", 0);
   }
 }
 
-function debug(x)
-{
+function debug(x) {
   let section = appendElement(document.body, 'div', 'section');
   appendElementWithText(section, "div", "debug", JSON.stringify(x));
 }
 
 // ---------------------------------------------------------------------------
 
-function onUnload()
-{
+function onUnload() {
 }
 
 // ---------------------------------------------------------------------------
 
 // The <div> holding everything but the header and footer (if they're present).
 // It's what is updated each time the page changes.
 var gMain;
 
@@ -140,18 +133,17 @@ var gVerbose;
 
 // The "anonymize" checkbox.
 var gAnonymize;
 
 // Values for the |aFooterAction| argument to updateTitleMainAndFooter.
 var HIDE_FOOTER = 0;
 var SHOW_FOOTER = 1;
 
-function updateTitleMainAndFooter(aTitleNote, aMsg, aFooterAction, aClassName)
-{
+function updateTitleMainAndFooter(aTitleNote, aMsg, aFooterAction, aClassName) {
   document.title = gPageName;
   if (aTitleNote) {
     document.title += " (" + aTitleNote + ")";
   }
 
   // Clear gMain by replacing it with an empty node.
   let tmp = gMain.cloneNode(false);
   gMain.parentNode.replaceChild(tmp, gMain);
@@ -169,47 +161,43 @@ function updateTitleMainAndFooter(aTitle
     let className = "section"
     if (aClassName) {
       className = className + " " + aClassName;
     }
     msgElement = appendElementWithText(gMain, 'div', className, aMsg);
   }
 
   switch (aFooterAction) {
-   case HIDE_FOOTER:   gFooter.classList.add('hidden');    break;
-   case SHOW_FOOTER:   gFooter.classList.remove('hidden'); break;
+   case HIDE_FOOTER: gFooter.classList.add('hidden'); break;
+   case SHOW_FOOTER: gFooter.classList.remove('hidden'); break;
    default: assert(false, "bad footer action in updateTitleMainAndFooter");
   }
   return msgElement;
 }
 
-function updateMainAndFooter(aMsg, aFooterAction, aClassName)
-{
+function updateMainAndFooter(aMsg, aFooterAction, aClassName) {
   return updateTitleMainAndFooter("", aMsg, aFooterAction, aClassName);
 }
 
-function appendTextNode(aP, aText)
-{
+function appendTextNode(aP, aText) {
   let e = document.createTextNode(aText);
   aP.appendChild(e);
   return e;
 }
 
-function appendElement(aP, aTagName, aClassName)
-{
+function appendElement(aP, aTagName, aClassName) {
   let e = document.createElement(aTagName);
   if (aClassName) {
     e.className = aClassName;
   }
   aP.appendChild(e);
   return e;
 }
 
-function appendElementWithText(aP, aTagName, aClassName, aText)
-{
+function appendElementWithText(aP, aTagName, aClassName, aText) {
   let e = appendElement(aP, aTagName, aClassName);
   // Setting textContent clobbers existing children, but there are none.  More
   // importantly, it avoids creating a JS-land object for the node, saving
   // memory.
   e.textContent = aText;
   return e;
 }
 
@@ -231,38 +219,35 @@ It excludes memory that is mapped implic
 and thread stacks. \
 \n\n\
 'explicit' is not guaranteed to cover every explicit allocation, but it does cover \
 most (including the entire heap), and therefore it is the single best number to \
 focus on when trying to reduce memory usage.";
 
 // ---------------------------------------------------------------------------
 
-function appendButton(aP, aTitle, aOnClick, aText, aId)
-{
+function appendButton(aP, aTitle, aOnClick, aText, aId) {
   let b = appendElementWithText(aP, "button", "", aText);
   b.title = aTitle;
   b.onclick = aOnClick;
   if (aId) {
     b.id = aId;
   }
   return b;
 }
 
-function appendHiddenFileInput(aP, aId, aChangeListener)
-{
+function appendHiddenFileInput(aP, aId, aChangeListener) {
   let input = appendElementWithText(aP, "input", "hidden", "");
   input.type = "file";
   input.id = aId;      // used in testing
   input.addEventListener("change", aChangeListener);
   return input;
 }
 
-function onLoad()
-{
+function onLoad() {
   // Generate the header.
 
   let header = appendElement(document.body, "div", "ancillary");
 
   // A hidden file input element that can be invoked when necessary.
   let fileInput1 = appendHiddenFileInput(header, "fileInput1", function() {
     let file = this.files[0];
     let filename = file.mozFullPath;
@@ -350,18 +335,18 @@ function onLoad()
   let label2 = appendElementWithText(labelDiv2, "label", "");
   gAnonymize = appendElement(label2, "input", "");
   gAnonymize.type = "checkbox";
   appendTextNode(label2, "anonymize");
 
   let row3 = appendElement(ops, "div", "opsRow");
 
   appendElementWithText(row3, "div", "opsRowLabel", "Free memory");
-  appendButton(row3, GCDesc, doGC,  "GC");
-  appendButton(row3, CCDesc, doCC,  "CC");
+  appendButton(row3, GCDesc, doGC, "GC");
+  appendButton(row3, CCDesc, doCC, "CC");
   appendButton(row3, MMDesc, doMMU, "Minimize memory usage");
 
   let row4 = appendElement(ops, "div", "opsRow");
 
   appendElementWithText(row4, "div", "opsRowLabel", "Save GC & CC logs");
   appendButton(row4, GCAndCCLogDesc,
                saveGCLogAndConciseCCLog, "Save concise", 'saveLogsConcise');
   appendButton(row4, GCAndCCAllLogDesc,
@@ -418,74 +403,66 @@ function onLoad()
         return;
       }
     }
   }
 }
 
 // ---------------------------------------------------------------------------
 
-function doGC()
-{
+function doGC() {
   Services.obs.notifyObservers(null, "child-gc-request", null);
   Cu.forceGC();
   updateMainAndFooter("Garbage collection completed", HIDE_FOOTER);
 }
 
-function doCC()
-{
+function doCC() {
   Services.obs.notifyObservers(null, "child-cc-request", null);
   window.QueryInterface(Ci.nsIInterfaceRequestor)
         .getInterface(Ci.nsIDOMWindowUtils)
         .cycleCollect();
   updateMainAndFooter("Cycle collection completed", HIDE_FOOTER);
 }
 
-function doMMU()
-{
+function doMMU() {
   Services.obs.notifyObservers(null, "child-mmu-request", null);
   gMgr.minimizeMemoryUsage(
     () => updateMainAndFooter("Memory minimization completed", HIDE_FOOTER));
 }
 
-function doMeasure()
-{
+function doMeasure() {
   updateAboutMemoryFromReporters();
 }
 
-function saveGCLogAndConciseCCLog()
-{
+function saveGCLogAndConciseCCLog() {
   dumpGCLogAndCCLog(false);
 }
 
-function saveGCLogAndVerboseCCLog()
-{
+function saveGCLogAndVerboseCCLog() {
   dumpGCLogAndCCLog(true);
 }
 
-function doDMD()
-{
+function doDMD() {
   updateMainAndFooter("Saving memory reports and DMD output...", HIDE_FOOTER);
   try {
     let dumper = Cc["@mozilla.org/memory-info-dumper;1"]
                    .getService(Ci.nsIMemoryInfoDumper);
 
     dumper.dumpMemoryInfoToTempDir(/* identifier = */ "",
                                    gAnonymize.checked,
                                    /* minimize = */ false);
     updateMainAndFooter("Saved memory reports and DMD reports analysis " +
                         "to the temp directory",
                         HIDE_FOOTER);
   } catch (ex) {
     updateMainAndFooter(ex.toString(), HIDE_FOOTER);
   }
 }
 
-function dumpGCLogAndCCLog(aVerbose)
-{
+function dumpGCLogAndCCLog(aVerbose) {
   let dumper = Cc["@mozilla.org/memory-info-dumper;1"]
                 .getService(Ci.nsIMemoryInfoDumper);
 
   let inProgress = updateMainAndFooter("Saving logs...", HIDE_FOOTER);
   let section = appendElement(gMain, 'div', "section");
 
   function displayInfo(gcLog, ccLog, isParent) {
     appendElementWithText(section, 'div', "",
@@ -503,18 +480,17 @@ function dumpGCLogAndCCLog(aVerbose)
                                  }
                                });
 }
 
 /**
  * Top-level function that does the work of generating the page from the memory
  * reporters.
  */
-function updateAboutMemoryFromReporters()
-{
+function updateAboutMemoryFromReporters() {
   updateMainAndFooter("Measuring...", HIDE_FOOTER);
 
   try {
     let processLiveMemoryReports =
         function(aHandleReport, aDisplayReports) {
       let handleReport = function(aProcess, aUnsafePath, aKind, aUnits,
                                   aAmount, aDescription) {
         aHandleReport(aProcess, aUnsafePath, aKind, aUnits, aAmount,
@@ -564,18 +540,17 @@ function parseAndUnwrapIfCrashDump(aStr)
 
 /**
  * Populate about:memory using the data in the given JSON object.
  *
  * @param aObj
  *        An object that (hopefully!) conforms to the JSON schema used by
  *        nsIMemoryInfoDumper.
  */
-function updateAboutMemoryFromJSONObject(aObj)
-{
+function updateAboutMemoryFromJSONObject(aObj) {
   try {
     assertInput(aObj.version === gCurrentFileFormatVersion,
                 "data version number missing or doesn't match");
     assertInput(aObj.hasMozMallocUsableSize !== undefined,
                 "missing 'hasMozMallocUsableSize' property");
     assertInput(aObj.reports && aObj.reports instanceof Array,
                 "missing or non-array 'reports' property");
 
@@ -608,18 +583,17 @@ function updateAboutMemoryFromJSONObject
 
 /**
  * Populate about:memory using the data in the given JSON string.
  *
  * @param aStr
  *        A string containing JSON data conforming to the schema used by
  *        nsIMemoryReporterManager::dumpReports.
  */
-function updateAboutMemoryFromJSONString(aStr)
-{
+function updateAboutMemoryFromJSONString(aStr) {
   try {
     let obj = parseAndUnwrapIfCrashDump(aStr);
     updateAboutMemoryFromJSONObject(obj);
   } catch (ex) {
     handleException(ex);
   }
 }
 
@@ -628,18 +602,17 @@ function updateAboutMemoryFromJSONString
  *
  * @param aFilename
  *        The name of the file being read from.
  * @param aTitleNote
  *        A description to put in the page title upon completion.
  * @param aFn
  *        The function to call and pass the read string to upon completion.
  */
-function loadMemoryReportsFromFile(aFilename, aTitleNote, aFn)
-{
+function loadMemoryReportsFromFile(aFilename, aTitleNote, aFn) {
   updateMainAndFooter("Loading...", HIDE_FOOTER);
 
   try {
     let reader = new FileReader();
     reader.onerror = () => { throw new Error("FileReader.onerror"); };
     reader.onabort = () => { throw new Error("FileReader.onabort"); };
     reader.onload = (aEvent) => {
       // Clear "Loading..." from above.
@@ -689,33 +662,31 @@ function loadMemoryReportsFromFile(aFile
 /**
  * Like updateAboutMemoryFromReporters(), but gets its data from a file instead
  * of the memory reporters.
  *
  * @param aFilename
  *        The name of the file being read from.  The expected format of the
  *        file's contents is described in a comment in nsIMemoryInfoDumper.idl.
  */
-function updateAboutMemoryFromFile(aFilename)
-{
+function updateAboutMemoryFromFile(aFilename) {
   loadMemoryReportsFromFile(aFilename, /* title note */ aFilename,
                             updateAboutMemoryFromJSONString);
 }
 
 /**
  * Like updateAboutMemoryFromFile(), but gets its data from a two files and
  * diffs them.
  *
  * @param aFilename1
  *        The name of the first file being read from.
  * @param aFilename2
  *        The name of the first file being read from.
  */
-function updateAboutMemoryFromTwoFiles(aFilename1, aFilename2)
-{
+function updateAboutMemoryFromTwoFiles(aFilename1, aFilename2) {
   let titleNote = "diff of " + aFilename1 + " and " + aFilename2;
   loadMemoryReportsFromFile(aFilename1, titleNote, function(aStr1) {
     loadMemoryReportsFromFile(aFilename2, titleNote, function(aStr2) {
       try {
         let obj1 = parseAndUnwrapIfCrashDump(aStr1);
         let obj2 = parseAndUnwrapIfCrashDump(aStr2);
         gIsDiff = true;
         updateAboutMemoryFromJSONObject(diffJSONObjects(obj1, obj2));
@@ -728,32 +699,30 @@ function updateAboutMemoryFromTwoFiles(a
 }
 
 // ---------------------------------------------------------------------------
 
 // Something unlikely to appear in a process name.
 var kProcessPathSep = "^:^:^";
 
 // Short for "diff report".
-function DReport(aKind, aUnits, aAmount, aDescription, aNMerged, aPresence)
-{
+function DReport(aKind, aUnits, aAmount, aDescription, aNMerged, aPresence) {
   this._kind = aKind;
   this._units = aUnits;
   this._amount = aAmount;
   this._description = aDescription;
   this._nMerged = aNMerged;
   if (aPresence !== undefined) {
     this._presence = aPresence;
   }
 }
 
 DReport.prototype = {
-  assertCompatible(aKind, aUnits)
-  {
-    assert(this._kind  == aKind,  "Mismatched kinds");
+  assertCompatible(aKind, aUnits) {
+    assert(this._kind == aKind, "Mismatched kinds");
     assert(this._units == aUnits, "Mismatched units");
 
     // We don't check that the "description" properties match.  This is because
     // on Linux we can get cases where the paths are the same but the
     // descriptions differ, like this:
     //
     //   "path": "size/other-files/icon-theme.cache/[r--p]",
     //   "description": "/usr/share/icons/gnome/icon-theme.cache (read-only, not executable, private)"
@@ -795,27 +764,26 @@ DReport.ADDED_FOR_BALANCE = 3;
 /**
  * Make a report map, which has combined path+process strings for keys, and
  * DReport objects for values.
  *
  * @param aJSONReports
  *        The |reports| field of a JSON object.
  * @return The constructed report map.
  */
-function makeDReportMap(aJSONReports)
-{
+function makeDReportMap(aJSONReports) {
   let dreportMap = {};
   for (let i = 0; i < aJSONReports.length; i++) {
     let jr = aJSONReports[i];
 
-    assert(jr.process     !== undefined, "Missing process");
-    assert(jr.path        !== undefined, "Missing path");
-    assert(jr.kind        !== undefined, "Missing kind");
-    assert(jr.units       !== undefined, "Missing units");
-    assert(jr.amount      !== undefined, "Missing amount");
+    assert(jr.process !== undefined, "Missing process");
+    assert(jr.path !== undefined, "Missing path");
+    assert(jr.kind !== undefined, "Missing kind");
+    assert(jr.units !== undefined, "Missing units");
+    assert(jr.amount !== undefined, "Missing amount");
     assert(jr.description !== undefined, "Missing description");
 
     // Strip out some non-deterministic stuff that prevents clean diffs.
     // Ideally the memory reports themselves would contain information about
     // which parts of the the process and path need to be stripped -- saving us
     // from hardwiring knowledge of specific reporters here -- but we have no
     // mechanism for that. (Any future redesign of how memory reporters work
     // should include such a mechanism.)
@@ -860,18 +828,17 @@ function makeDReportMap(aJSONReports)
       rOld.merge(jr);
     }
   }
   return dreportMap;
 }
 
 // Return a new dreportMap which is the diff of two dreportMaps.  Empties
 // aDReportMap2 along the way.
-function diffDReportMaps(aDReportMap1, aDReportMap2)
-{
+function diffDReportMaps(aDReportMap1, aDReportMap2) {
   let result = {};
 
   for (let processPath in aDReportMap1) {
     let r1 = aDReportMap1[processPath];
     let r2 = aDReportMap2[processPath];
     let r2_amount, r2_nMerged;
     let presence;
     if (r2 !== undefined) {
@@ -895,18 +862,17 @@ function diffDReportMaps(aDReportMap1, a
     result[processPath] = new DReport(r2._kind, r2._units, r2._amount,
                                       r2._description, r2._nMerged,
                                       DReport.PRESENT_IN_SECOND_ONLY);
   }
 
   return result;
 }
 
-function makeJSONReports(aDReportMap)
-{
+function makeJSONReports(aDReportMap) {
   let reports = [];
   for (let processPath in aDReportMap) {
     let r = aDReportMap[processPath];
     if (r._amount !== 0) {
       // If _nMerged > 1, we give the full (aggregated) amount in the first
       // copy, and then use amount=0 in the remainder.  When viewed in
       // about:memory, this shows up as an entry with a "[2]"-style suffix
       // and the correct amount.
@@ -920,20 +886,18 @@ function makeJSONReports(aDReportMap)
       }
     }
   }
 
   return reports;
 }
 
 // Diff two JSON objects holding memory reports.
-function diffJSONObjects(aJson1, aJson2)
-{
-  function simpleProp(aProp)
-  {
+function diffJSONObjects(aJson1, aJson2) {
+  function simpleProp(aProp) {
     assert(aJson1[aProp] !== undefined && aJson1[aProp] === aJson2[aProp],
            aProp + " properties don't match");
     return aJson1[aProp];
   }
 
   return {
     version: simpleProp("version"),
 
@@ -942,40 +906,37 @@ function diffJSONObjects(aJson1, aJson2)
     reports: makeJSONReports(diffDReportMaps(makeDReportMap(aJson1.reports),
                                              makeDReportMap(aJson2.reports)))
   };
 }
 
 // ---------------------------------------------------------------------------
 
 // |PColl| is short for "process collection".
-function PColl()
-{
+function PColl() {
   this._trees = {};
   this._degenerates = {};
   this._heapTotal = 0;
 }
 
 /**
  * Processes reports (whether from reporters or from a file) and append the
  * main part of the page.
  *
  * @param aProcessReports
  *        Function that extracts the memory reports from the reporters or from
  *        file.
  * @param aHasMozMallocUsableSize
  *        Boolean indicating if moz_malloc_usable_size works.
  */
-function appendAboutMemoryMain(aProcessReports, aHasMozMallocUsableSize)
-{
+function appendAboutMemoryMain(aProcessReports, aHasMozMallocUsableSize) {
   let pcollsByProcess = {};
 
   function handleReport(aProcess, aUnsafePath, aKind, aUnits, aAmount,
-                        aDescription, aPresence)
-  {
+                        aDescription, aPresence) {
     if (aUnsafePath.startsWith("explicit/")) {
       assertInput(aKind === KIND_HEAP || aKind === KIND_NONHEAP,
                   "bad explicit kind");
       assertInput(aUnits === UNITS_BYTES, "bad explicit units");
     }
 
     assert(aPresence === undefined ||
            aPresence == DReport.PRESENT_IN_FIRST_ONLY ||
@@ -1033,18 +994,17 @@ function appendAboutMemoryMain(aProcessR
       t._amount = aAmount;
       t._description = aDescription;
       if (aPresence !== undefined) {
         t._presence = aPresence;
       }
     }
   }
 
-  function displayReports()
-  {
+  function displayReports() {
     // Sort the processes.
     let processes = Object.keys(pcollsByProcess);
     processes.sort(function(aProcessA, aProcessB) {
       assert(aProcessA != aProcessB,
              "Elements of Object.keys() should be unique, but " +
              "saw duplicate '" + aProcessA + "' elem.");
 
       // Always put the main process first.
@@ -1098,18 +1058,17 @@ function appendAboutMemoryMain(aProcessR
 // ---------------------------------------------------------------------------
 
 // There are two kinds of TreeNode.
 // - Leaf TreeNodes correspond to reports.
 // - Non-leaf TreeNodes are just scaffolding nodes for the tree;  their values
 //   are derived from their children.
 // Some trees are "degenerate", i.e. they contain a single node, i.e. they
 // correspond to a report whose path has no '/' separators.
-function TreeNode(aUnsafeName, aUnits, aIsDegenerate)
-{
+function TreeNode(aUnsafeName, aUnits, aIsDegenerate) {
   this._units = aUnits;
   this._unsafeName = aUnsafeName;
   if (aIsDegenerate) {
     this._isDegenerate = true;
   }
 
   // Leaf TreeNodes have these properties added immediately after construction:
   // - _amount
@@ -1160,20 +1119,20 @@ TreeNode.prototype = {
       max = Math.max(max, this._kids[i].maxAbsDescendant());
     }
     this._maxAbsDescendant = max;
     return max;
   },
 
   toString() {
     switch (this._units) {
-      case UNITS_BYTES:            return formatBytes(this._amount);
+      case UNITS_BYTES: return formatBytes(this._amount);
       case UNITS_COUNT:
       case UNITS_COUNT_CUMULATIVE: return formatInt(this._amount);
-      case UNITS_PERCENTAGE:       return formatPercentage(this._amount);
+      case UNITS_PERCENTAGE: return formatPercentage(this._amount);
       default:
         throw "Invalid memory report(s): bad units in TreeNode.toString";
     }
   }
 };
 
 // Sort TreeNodes first by size, then by name.  The latter is important for the
 // about:memory tests, which need a predictable ordering of reporters which
@@ -1203,21 +1162,19 @@ TreeNode.compareUnsafeNames = function(a
 
 /**
  * Fill in the remaining properties for the specified tree in a bottom-up
  * fashion.
  *
  * @param aRoot
  *        The tree root.
  */
-function fillInTree(aRoot)
-{
+function fillInTree(aRoot) {
   // Fill in the remaining properties bottom-up.
-  function fillInNonLeafNodes(aT)
-  {
+  function fillInNonLeafNodes(aT) {
     if (!aT._kids) {
       // Leaf node.  Has already been filled in.
 
     } else if (aT._kids.length === 1 && aT != aRoot) {
       // Non-root, non-leaf node with one child.  Merge the child with the node
       // to avoid redundant entries.
       let kid = aT._kids[0];
       let kidBytes = fillInNonLeafNodes(kid);
@@ -1277,18 +1234,17 @@ function fillInTree(aRoot)
  * @param aT
  *        The "explicit" tree.
  * @param aHeapAllocatedNode
  *        The "heap-allocated" tree node.
  * @param aHeapTotal
  *        The sum of all explicit HEAP reports for this process.
  * @return A boolean indicating if "heap-allocated" is known for the process.
  */
-function addHeapUnclassifiedNode(aT, aHeapAllocatedNode, aHeapTotal)
-{
+function addHeapUnclassifiedNode(aT, aHeapAllocatedNode, aHeapTotal) {
   if (aHeapAllocatedNode === undefined)
     return false;
 
   if (aT.findKid("heap-unclassified")) {
     // heap-unclassified was already calculated, there's nothing left to do.
     // This can happen when memory reports are exported from areweslimyet.com.
     return true;
   }
@@ -1310,22 +1266,20 @@ function addHeapUnclassifiedNode(aT, aHe
  * Sort all kid nodes from largest to smallest, and insert aggregate nodes
  * where appropriate.
  *
  * @param aTotalBytes
  *        The size of the tree's root node.
  * @param aT
  *        The tree.
  */
-function sortTreeAndInsertAggregateNodes(aTotalBytes, aT)
-{
+function sortTreeAndInsertAggregateNodes(aTotalBytes, aT) {
   const kSignificanceThresholdPerc = 1;
 
-  function isInsignificant(aT)
-  {
+  function isInsignificant(aT) {
     if (gVerbose.checked)
       return false;
 
     let perc = gIsDiff
              ? 100 * aT.maxAbsDescendant() / Math.abs(aTotalBytes)
              : 100 * aT._amount / aTotalBytes;
     return perc < kSignificanceThresholdPerc;
   }
@@ -1389,18 +1343,17 @@ function sortTreeAndInsertAggregateNodes
 }
 
 // Global variable indicating if we've seen any invalid values for this
 // process;  it holds the unsafePaths of any such reports.  It is reset for
 // each new process.
 var gUnsafePathsWithInvalidValuesForThisProcess = [];
 
 function appendWarningElements(aP, aHasKnownHeapAllocated,
-                               aHasMozMallocUsableSize)
-{
+                               aHasMozMallocUsableSize) {
   if (!aHasKnownHeapAllocated && !aHasMozMallocUsableSize) {
     appendElementWithText(aP, "p", "",
       "WARNING: the 'heap-allocated' memory reporter and the " +
       "moz_malloc_usable_size() function do not work for this platform " +
       "and/or configuration.  This means that 'heap-unclassified' is not " +
       "shown and the 'explicit' tree shows much less memory than it should.\n\n");
 
   } else if (!aHasKnownHeapAllocated) {
@@ -1420,18 +1373,17 @@ function appendWarningElements(aP, aHasK
   if (gUnsafePathsWithInvalidValuesForThisProcess.length > 0) {
     let div = appendElement(aP, "div");
     appendElementWithText(div, "p", "",
       "WARNING: the following values are negative or unreasonably large.\n");
 
     let ul = appendElement(div, "ul");
     for (let i = 0;
          i < gUnsafePathsWithInvalidValuesForThisProcess.length;
-         i++)
-    {
+         i++) {
       appendTextNode(ul, " ");
       appendElementWithText(ul, "li", "",
         flipBackslashes(gUnsafePathsWithInvalidValuesForThisProcess[i]) + "\n");
     }
 
     appendElementWithText(div, "p", "",
       "This indicates a defect in one or more memory reporters.  The " +
       "invalid values are highlighted.\n\n");
@@ -1453,18 +1405,17 @@ function appendWarningElements(aP, aHasK
  * @param aDegenerates
  *        The table of degenerate trees for this process.
  * @param aHasMozMallocUsableSize
  *        Boolean indicating if moz_malloc_usable_size works.
  * @return The generated text.
  */
 function appendProcessAboutMemoryElements(aP, aN, aProcess, aTrees,
                                           aDegenerates, aHeapTotal,
-                                          aHasMozMallocUsableSize)
-{
+                                          aHasMozMallocUsableSize) {
   const kUpwardsArrow   = "\u2191",
         kDownwardsArrow = "\u2193";
 
   let appendLink = function(aHere, aThere, aArrow) {
     let link = appendElementWithText(aP, "a", "upDownArrow", aArrow);
     link.href = "#" + aThere + aN;
     link.id = aHere + aN;
     link.title = "Go to the " + aThere + " of " + aProcess;
@@ -1569,18 +1520,17 @@ function appendProcessAboutMemoryElement
 /**
  * Determines if a number has a negative sign when converted to a string.
  * Works even for -0.
  *
  * @param aN
  *        The number.
  * @return A boolean.
  */
-function hasNegativeSign(aN)
-{
+function hasNegativeSign(aN) {
   if (aN === 0) {                   // this succeeds for 0 and -0
     return 1 / aN === -Infinity;    // this succeeds for -0
   }
   return aN < 0;
 }
 
 /**
  * Formats an int as a human-readable string.
@@ -1590,18 +1540,17 @@ function hasNegativeSign(aN)
  * @param aExtra
  *        An extra string to tack onto the end.
  * @return A human-readable string representing the int.
  *
  * Note: building an array of chars and converting that to a string with
  * Array.join at the end is more memory efficient than using string
  * concatenation.  See bug 722972 for details.
  */
-function formatInt(aN, aExtra)
-{
+function formatInt(aN, aExtra) {
   let neg = false;
   if (hasNegativeSign(aN)) {
     neg = true;
     aN = -aN;
   }
   let s = [];
   while (true) {
     let k = aN % 1000;
@@ -1630,18 +1579,17 @@ function formatInt(aN, aExtra)
 
 /**
  * Converts a byte count to an appropriate string representation.
  *
  * @param aBytes
  *        The byte count.
  * @return The string representation.
  */
-function formatBytes(aBytes)
-{
+function formatBytes(aBytes) {
   let unit = gVerbose.checked ? " B" : " MB";
 
   let s;
   if (gVerbose.checked) {
     s = formatInt(aBytes, unit);
   } else {
     let mbytes = (aBytes / (1024 * 1024)).toFixed(2);
     let a = String(mbytes).split(".");
@@ -1653,34 +1601,32 @@ function formatBytes(aBytes)
 
 /**
  * Converts a percentage to an appropriate string representation.
  *
  * @param aPerc100x
  *        The percentage, multiplied by 100 (see nsIMemoryReporter).
  * @return The string representation
  */
-function formatPercentage(aPerc100x)
-{
+function formatPercentage(aPerc100x) {
   return (aPerc100x / 100).toFixed(2) + "%";
 }
 
 /**
  * Right-justifies a string in a field of a given width, padding as necessary.
  *
  * @param aS
  *        The string.
  * @param aN
  *        The field width.
  * @param aC
  *        The char used to pad.
  * @return The string representation.
  */
-function pad(aS, aN, aC)
-{
+function pad(aS, aN, aC) {
   let padding = "";
   let n2 = aN - aS.length;
   for (let i = 0; i < n2; i++) {
     padding += aC;
   }
   return padding + aS;
 }
 
@@ -1696,18 +1642,17 @@ const kHorizontal                   = "\
       kVerticalAndRight_Right_Right = "\u251c\u2500\u2500",
       kVertical_Space_Space         = "\u2502  ";
 
 const kNoKidsSep                    = " \u2500\u2500 ",
       kHideKidsSep                  = " ++ ",
       kShowKidsSep                  = " -- ";
 
 function appendMrNameSpan(aP, aDescription, aUnsafeName, aIsInvalid, aNMerged,
-                          aPresence)
-{
+                          aPresence) {
   let safeName = flipBackslashes(aUnsafeName);
   if (!aIsInvalid && !aNMerged && !aPresence) {
     safeName += "\n";
   }
   let nameSpan = appendElementWithText(aP, "span", "mrName", safeName);
   nameSpan.title = aDescription;
 
   if (aIsInvalid) {
@@ -1767,18 +1712,17 @@ function appendMrNameSpan(aP, aDescripti
 // state.
 var gShowSubtreesBySafeTreeId = {};
 
 function assertClassListContains(e, className) {
   assert(e, "undefined " + className);
   assert(e.classList.contains(className), "classname isn't " + className);
 }
 
-function toggle(aEvent)
-{
+function toggle(aEvent) {
   // This relies on each line being a span that contains at least four spans:
   // mrValue, mrPerc, mrSep, mrName, and then zero or more mrNotes.  All
   // whitespace must be within one of these spans for this function to find the
   // right nodes.  And the span containing the children of this line must
   // immediately follow.  Assertions check this.
 
   // |aEvent.target| will be one of the spans.  Get the outer span.
   let outerSpan = aEvent.target.parentNode;
@@ -1807,18 +1751,17 @@ function toggle(aEvent)
   let safeTreeId = outerSpan.id;
   if (gShowSubtreesBySafeTreeId[safeTreeId] !== undefined) {
     delete gShowSubtreesBySafeTreeId[safeTreeId];
   } else {
     gShowSubtreesBySafeTreeId[safeTreeId] = isExpansion;
   }
 }
 
-function expandPathToThisElement(aElement)
-{
+function expandPathToThisElement(aElement) {
   if (aElement.classList.contains("kids")) {
     // Unhide the kids.
     aElement.classList.remove("hidden");
     expandPathToThisElement(aElement.previousSibling);  // hasKids
 
   } else if (aElement.classList.contains("hasKids")) {
     // Change the separator to '--'.
     let sepSpan = aElement.childNodes[2];
@@ -1838,18 +1781,17 @@ function expandPathToThisElement(aElemen
  *        The parent DOM node.
  * @param aRoot
  *        The tree root.
  * @param aProcess
  *        The process the tree corresponds to.
  * @param aPadText
  *        A string to pad the start of each entry.
  */
-function appendTreeElements(aP, aRoot, aProcess, aPadText)
-{
+function appendTreeElements(aP, aRoot, aProcess, aPadText) {
   /**
    * Appends the elements for a particular tree, without a heading.
    *
    * @param aP
    *        The parent DOM node.
    * @param aProcess
    *        The process the tree corresponds to.
    * @param aUnsafeNames
@@ -1865,35 +1807,33 @@ function appendTreeElements(aP, aRoot, a
    *        The second part of the treeline for this entry.
    * @param aTreelineText2b
    *        The second part of the treeline for this entry's children.
    * @param aParentStringLength
    *        The length of the formatted byte count of the top node in the tree.
    */
   function appendTreeElements2(aP, aProcess, aUnsafeNames, aRoot, aT,
                                aTreelineText1, aTreelineText2a,
-                               aTreelineText2b, aParentStringLength)
-  {
-    function appendN(aS, aC, aN)
-    {
+                               aTreelineText2b, aParentStringLength) {
+    function appendN(aS, aC, aN) {
       for (let i = 0; i < aN; i++) {
         aS += aC;
       }
       return aS;
     }
 
     // The tree line.  Indent more if this entry is narrower than its parent.
     let valueText = aT.toString();
     let extraTreelineLength =
       Math.max(aParentStringLength - valueText.length, 0);
     if (extraTreelineLength > 0) {
       aTreelineText2a =
         appendN(aTreelineText2a, kHorizontal, extraTreelineLength);
       aTreelineText2b =
-        appendN(aTreelineText2b, " ",         extraTreelineLength);
+        appendN(aTreelineText2b, " ", extraTreelineLength);
     }
     let treelineText = aTreelineText1 + aTreelineText2a;
     appendElementWithText(aP, "span", "treeline", treelineText);
 
     // Detect and record invalid values.  But not if gIsDiff is true, because
     // we expect negative values in that case.
     assertInput(aRoot._units === aT._units,
                 "units within a tree are inconsistent");
@@ -1986,26 +1926,24 @@ function appendTreeElements(aP, aRoot, a
 
   let rootStringLength = aRoot.toString().length;
   appendTreeElements2(aP, aProcess, [aRoot._unsafeName], aRoot, aRoot,
                       aPadText, "", "", rootStringLength);
 }
 
 // ---------------------------------------------------------------------------
 
-function appendSectionHeader(aP, aText)
-{
+function appendSectionHeader(aP, aText) {
   appendElementWithText(aP, "h2", "", aText + "\n");
   return appendElement(aP, "pre", "entries");
 }
 
 // ---------------------------------------------------------------------------
 
-function saveReportsToFile()
-{
+function saveReportsToFile() {
   let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
   fp.appendFilter("Zipped JSON files", "*.json.gz");
   fp.appendFilters(Ci.nsIFilePicker.filterAll);
   fp.filterIndex = 0;
   fp.addToRecentDocs = true;
   fp.defaultString = "memory-report.json.gz";
 
   let fpFinish = function(file) {
--- a/toolkit/components/addoncompat/CompatWarning.jsm
+++ b/toolkit/components/addoncompat/CompatWarning.jsm
@@ -10,18 +10,17 @@ const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Preferences.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "console",
                                   "resource://gre/modules/Console.jsm");
 
-function section(number, url)
-{
+function section(number, url) {
   const baseURL = "https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Limitations_of_chrome_scripts";
   return { number, url: baseURL + url };
 }
 
 var CompatWarning = {
   // Sometimes we want to generate a warning, but put off issuing it
   // until later. For example, if someone registers a listener, we
   // might only want to warn about it if the listener actually
--- a/toolkit/components/addoncompat/Prefetcher.jsm
+++ b/toolkit/components/addoncompat/Prefetcher.jsm
@@ -86,39 +86,36 @@ const PREF_PREFETCHING_ENABLED = "extens
 
 function isPrimitive(v) {
   if (!v)
     return true;
   let type = typeof(v);
   return type !== "object" && type !== "function";
 }
 
-function objAddr(obj)
-{
+function objAddr(obj) {
 /*
   if (!isPrimitive(obj)) {
     return String(obj) + "[" + Cu.getJSTestingFunctions().objectAddress(obj) + "]";
   }
   return String(obj);
 */
 }
 
-function log(/* ...args*/)
-{
+function log(/* ...args*/) {
 /*
   for (let arg of args) {
     dump(arg);
     dump(" ");
   }
   dump("\n");
 */
 }
 
-function logPrefetch(/* kind, value1, component, value2*/)
-{
+function logPrefetch(/* kind, value1, component, value2*/) {
 /*
   log("prefetching", kind, objAddr(value1) + "." + component, "=", objAddr(value2));
 */
 }
 
 /*
  * All the Op classes (representing Datalog rules) have the same interface:
  *   outputTable: Table that objects generated by the rule are added to.
@@ -129,25 +126,23 @@ function logPrefetch(/* kind, value1, co
  *     Data to be cached should be stored by calling database.cache.
  *   makeCacheEntry(item, cache):
  *     Called by the chrome process to create the two-level map of
  *     prefetched objects. |item| holds the cached data
  *     generated by the content process. |cache| is the map to be
  *     generated.
  */
 
-function PropertyOp(outputTable, inputTable, prop)
-{
+function PropertyOp(outputTable, inputTable, prop) {
   this.outputTable = outputTable;
   this.inputTable = inputTable;
   this.prop = prop;
 }
 
-PropertyOp.prototype.addObject = function(database, obj)
-{
+PropertyOp.prototype.addObject = function(database, obj) {
   let has = false, propValue;
   try {
     if (this.prop in obj) {
       has = true;
       propValue = obj[this.prop];
     }
   } catch (e) {
     // Don't cache anything if an exception is thrown.
@@ -156,56 +151,52 @@ PropertyOp.prototype.addObject = functio
 
   logPrefetch("prop", obj, this.prop, propValue);
   database.cache(this.index, obj, has, propValue);
   if (has && !isPrimitive(propValue) && this.outputTable) {
     database.add(this.outputTable, propValue);
   }
 }
 
-PropertyOp.prototype.makeCacheEntry = function(item, cache)
-{
+PropertyOp.prototype.makeCacheEntry = function(item, cache) {
   let [, obj, , propValue] = item;
 
   let desc = { configurable: false, enumerable: true, writable: false, value: propValue };
 
   if (!cache.has(obj)) {
     cache.set(obj, new Map());
   }
   let propMap = cache.get(obj);
   propMap.set(this.prop, desc);
 }
 
-function MethodOp(outputTable, inputTable, method, ...args)
-{
+function MethodOp(outputTable, inputTable, method, ...args) {
   this.outputTable = outputTable;
   this.inputTable = inputTable;
   this.method = method;
   this.args = args;
 }
 
-MethodOp.prototype.addObject = function(database, obj)
-{
+MethodOp.prototype.addObject = function(database, obj) {
   let result;
   try {
     result = obj[this.method].apply(obj, this.args);
   } catch (e) {
     // Don't cache anything if an exception is thrown.
     return;
   }
 
   logPrefetch("method", obj, this.method + "(" + this.args + ")", result);
   database.cache(this.index, obj, result);
   if (!isPrimitive(result) && this.outputTable) {
     database.add(this.outputTable, result);
   }
 }
 
-MethodOp.prototype.makeCacheEntry = function(item, cache)
-{
+MethodOp.prototype.makeCacheEntry = function(item, cache) {
   let [, obj, result] = item;
 
   if (!cache.has(obj)) {
     cache.set(obj, new Map());
   }
   let propMap = cache.get(obj);
   let fallback = propMap.get(this.method);
 
@@ -221,24 +212,22 @@ MethodOp.prototype.makeCacheEntry = func
     }
     return obj[method](...args);
   };
 
   let desc = { configurable: false, enumerable: true, writable: false, value: methodImpl };
   propMap.set(this.method, desc);
 }
 
-function CollectionOp(outputTable, inputTable)
-{
+function CollectionOp(outputTable, inputTable) {
   this.outputTable = outputTable;
   this.inputTable = inputTable;
 }
 
-CollectionOp.prototype.addObject = function(database, obj)
-{
+CollectionOp.prototype.addObject = function(database, obj) {
   let elements = [];
   try {
     let len = obj.length;
     for (let i = 0; i < len; i++) {
       logPrefetch("index", obj, i, obj[i]);
       elements.push(obj[i]);
     }
   } catch (e) {
@@ -249,47 +238,43 @@ CollectionOp.prototype.addObject = funct
   database.cache(this.index, obj, ...elements);
   for (let i = 0; i < elements.length; i++) {
     if (!isPrimitive(elements[i]) && this.outputTable) {
       database.add(this.outputTable, elements[i]);
     }
   }
 }
 
-CollectionOp.prototype.makeCacheEntry = function(item, cache)
-{
+CollectionOp.prototype.makeCacheEntry = function(item, cache) {
   let [, obj, ...elements] = item;
 
   if (!cache.has(obj)) {
     cache.set(obj, new Map());
   }
   let propMap = cache.get(obj);
 
   let lenDesc = { configurable: false, enumerable: true, writable: false, value: elements.length };
   propMap.set("length", lenDesc);
 
   for (let i = 0; i < elements.length; i++) {
     let desc = { configurable: false, enumerable: true, writable: false, value: elements[i] };
     propMap.set(i, desc);
   }
 }
 
-function CopyOp(outputTable, inputTable)
-{
+function CopyOp(outputTable, inputTable) {
   this.outputTable = outputTable;
   this.inputTable = inputTable;
 }
 
-CopyOp.prototype.addObject = function(database, obj)
-{
+CopyOp.prototype.addObject = function(database, obj) {
   database.add(this.outputTable, obj);
 }
 
-function Database(trigger, addons)
-{
+function Database(trigger, addons) {
   // Create a map of rules that apply to this specific trigger and set
   // of add-ons. The rules are indexed based on their inputTable.
   this.rules = new Map();
   for (let addon of addons) {
     let addonRules = PrefetcherRules[addon] || {};
     let triggerRules = addonRules[trigger] || [];
     for (let rule of triggerRules) {
       let inTable = rule.inputTable;
--- a/toolkit/components/addoncompat/RemoteAddonsChild.jsm
+++ b/toolkit/components/addoncompat/RemoteAddonsChild.jsm
@@ -21,18 +21,17 @@ XPCOMUtils.defineLazyServiceGetter(this,
                                    "@mozilla.org/systemprincipal;1", "nsIPrincipal");
 
 XPCOMUtils.defineLazyServiceGetter(this, "contentSecManager",
                                    "@mozilla.org/contentsecuritymanager;1",
                                    "nsIContentSecurityManager");
 
 // Similar to Python. Returns dict[key] if it exists. Otherwise,
 // sets dict[key] to default_ and returns default_.
-function setDefault(dict, key, default_)
-{
+function setDefault(dict, key, default_) {
   if (key in dict) {
     return dict[key];
   }
   dict[key] = default_;
   return default_;
 }
 
 // This code keeps track of a set of paths of the form [component_1,
@@ -209,18 +208,17 @@ var ContentPolicyChild = {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
     return this.QueryInterface(iid);
   },
 };
 
 // This is a shim channel whose only purpose is to return some string
 // data from an about: protocol handler.
-function AboutProtocolChannel(uri, contractID, loadInfo)
-{
+function AboutProtocolChannel(uri, contractID, loadInfo) {
   this.URI = uri;
   this.originalURI = uri;
   this._contractID = contractID;
   this._loadingPrincipal = loadInfo.loadingPrincipal;
   this._securityFlags = loadInfo.securityFlags;
   this._contentPolicyType = loadInfo.externalContentPolicyType;
 }
 
@@ -306,18 +304,17 @@ AboutProtocolChannel.prototype = {
   resume() {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannel, Ci.nsIRequest])
 };
 
 // This shim protocol handler is used when content fetches an about: URL.
-function AboutProtocolInstance(contractID)
-{
+function AboutProtocolInstance(contractID) {
   this._contractID = contractID;
   this._uriFlags = undefined;
 }
 
 AboutProtocolInstance.prototype = {
   createInstance(outer, iid) {
     if (outer != null) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
@@ -419,18 +416,17 @@ var ObserverChild = {
       data
     });
   }
 };
 
 // There is one of these objects per browser tab in the child. When an
 // add-on in the parent listens for an event, this child object
 // listens for that event in the child.
-function EventTargetChild(childGlobal)
-{
+function EventTargetChild(childGlobal) {
   this._childGlobal = childGlobal;
   this.capturingHandler = (event) => this.handleEvent(true, event);
   this.nonCapturingHandler = (event) => this.handleEvent(false, event);
   NotificationTracker.watch("event", this);
 }
 
 EventTargetChild.prototype = {
   uninit() {
@@ -469,18 +465,17 @@ EventTargetChild.prototype = {
 // The parent can create a sandbox to run code in the child
 // process. We actually create the sandbox in the child so that the
 // code runs there. However, managing the lifetime of these sandboxes
 // can be tricky. The parent references these sandboxes using CPOWs,
 // which only keep weak references. So we need to create a strong
 // reference in the child. For simplicity, we kill off these strong
 // references whenever we navigate away from the page for which the
 // sandbox was created.
-function SandboxChild(chromeGlobal)
-{
+function SandboxChild(chromeGlobal) {
   this.chromeGlobal = chromeGlobal;
   this.sandboxes = [];
 }
 
 SandboxChild.prototype = {
   uninit() {
     this.clearSandboxes();
   },
--- a/toolkit/components/addoncompat/RemoteAddonsParent.jsm
+++ b/toolkit/components/addoncompat/RemoteAddonsParent.jsm
@@ -21,18 +21,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/Prefetcher.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "CompatWarning",
                                   "resource://gre/modules/CompatWarning.jsm");
 
 Cu.permitCPOWsInScope(this);
 
 // Similar to Python. Returns dict[key] if it exists. Otherwise,
 // sets dict[key] to default_ and returns default_.
-function setDefault(dict, key, default_)
-{
+function setDefault(dict, key, default_) {
   if (key in dict) {
     return dict[key];
   }
   dict[key] = default_;
   return default_;
 }
 
 // This code keeps track of a set of paths of the form [component_1,
@@ -83,18 +82,17 @@ var NotificationTracker = {
   },
 };
 NotificationTracker.init();
 
 // An interposition is an object with three properties: methods,
 // getters, and setters. See multiprocessShims.js for an explanation
 // of how these are used. The constructor here just allows one
 // interposition to inherit members from another.
-function Interposition(name, base)
-{
+function Interposition(name, base) {
   this.name = name;
   if (base) {
     this.methods = Object.create(base.methods);
     this.getters = Object.create(base.getters);
     this.setters = Object.create(base.setters);
   } else {
     this.methods = Object.create(null);
     this.getters = Object.create(null);
@@ -592,18 +590,17 @@ var EventTargetParent = {
 };
 EventTargetParent.init();
 
 // This function returns a listener that will not fire on events where
 // the target is a remote xul:browser element itself. We'd rather let
 // the child process handle the event and pass it up via
 // EventTargetParent.
 var filteringListeners = new WeakMap();
-function makeFilteringListener(eventType, listener)
-{
+function makeFilteringListener(eventType, listener) {
   // Some events are actually targeted at the <browser> element
   // itself, so we only handle the ones where know that won't happen.
   let eventTypes = ["mousedown", "mouseup", "click"];
   if (!eventTypes.includes(eventType) || !listener ||
       (typeof listener != "object" && typeof listener != "function")) {
     return listener;
   }
 
@@ -675,18 +672,17 @@ ContentDocShellTreeItemInterposition.get
     let chromeWin = browser.ownerDocument.defaultView;
 
     // Return that window's docshell.
     return chromeWin.QueryInterface(Ci.nsIInterfaceRequestor)
       .getInterface(Ci.nsIWebNavigation)
       .QueryInterface(Ci.nsIDocShellTreeItem);
   };
 
-function chromeGlobalForContentWindow(window)
-{
+function chromeGlobalForContentWindow(window) {
     return window
       .QueryInterface(Ci.nsIInterfaceRequestor)
       .getInterface(Ci.nsIWebNavigation)
       .QueryInterface(Ci.nsIDocShellTreeItem)
       .rootTreeItem
       .QueryInterface(Ci.nsIInterfaceRequestor)
       .getInterface(Ci.nsIContentFrameMessageManager);
 }
@@ -853,18 +849,17 @@ RemoteBrowserElementInterposition.getter
   // and immediately set contentWindow.location.
   if (!target.contentWindowAsCPOW) {
     CompatWarning.warn("CPOW to the content window does not exist yet, dummy content window is created.");
     return makeDummyContentWindow(target);
   }
   return target.contentWindowAsCPOW;
 };
 
-function getContentDocument(addon, browser)
-{
+function getContentDocument(addon, browser) {
   if (!browser.contentWindowAsCPOW) {
     return makeDummyContentWindow(browser).document;
   }
 
   let doc = Prefetcher.lookupInCache(addon, browser.contentWindowAsCPOW, "document");
   if (doc) {
     return doc;
   }
@@ -921,18 +916,17 @@ TabBrowserElementInterposition.getters.s
   return getSessionHistory(browser);
 };
 
 // This function returns a wrapper around an
 // nsIWebProgressListener. When the wrapper is invoked, it calls the
 // real listener but passes CPOWs for the nsIWebProgress and
 // nsIRequest arguments.
 var progressListeners = {global: new WeakMap(), tabs: new WeakMap()};
-function wrapProgressListener(kind, listener)
-{
+function wrapProgressListener(kind, listener) {
   if (progressListeners[kind].has(listener)) {
     return progressListeners[kind].get(listener);
   }
 
   let ListenerHandler = {
     get(target, name) {
       if (name.startsWith("on")) {
         return function(...args) {
--- a/toolkit/components/addoncompat/multiprocessShims.js
+++ b/toolkit/components/addoncompat/multiprocessShims.js
@@ -56,18 +56,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
  * The values in |getters| and |setters| should also be
  * functions. They are called immediately when the given property is
  * accessed. The functions in |getters| take two parameters: the
  * add-on ID and the original target object. The functions in
  * |setters| take those arguments plus the value that the property is
  * being set to.
  */
 
-function AddonInterpositionService()
-{
+function AddonInterpositionService() {
   Prefetcher.init();
   RemoteAddonsParent.init();
 
   // These maps keep track of the interpositions for all different
   // kinds of objects.
   this._interfaceInterpositions = RemoteAddonsParent.getInterfaceInterpositions();
   this._taggedInterpositions = RemoteAddonsParent.getTaggedInterpositions();
 
@@ -136,18 +135,17 @@ AddonInterpositionService.prototype = {
 
   interposeProperty(addon, target, iid, prop) {
     let interp;
     if (iid) {
       interp = this._interfaceInterpositions[iid];
     } else {
       try {
         interp = this._taggedInterpositions[this.getObjectTag(target)];
-      }
-      catch (e) {
+      } catch (e) {
         Cu.reportError(new Components.Exception("Failed to interpose object", e.result, Components.stack.caller));
       }
     }
 
     if (!interp) {
       return Prefetcher.lookupInCache(addon, target, prop);
     }
 
--- a/toolkit/components/addoncompat/tests/addon/bootstrap.js
+++ b/toolkit/components/addoncompat/tests/addon/bootstrap.js
@@ -8,52 +8,48 @@ Cu.import("resource://gre/modules/Browse
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const baseURL = "http://mochi.test:8888/browser/" +
   "toolkit/components/addoncompat/tests/browser/";
 
 var contentSecManager = Cc["@mozilla.org/contentsecuritymanager;1"]
                           .getService(Ci.nsIContentSecurityManager);
 
-function forEachWindow(f)
-{
+function forEachWindow(f) {
   let wins = Services.wm.getEnumerator("navigator:browser");
   while (wins.hasMoreElements()) {
     let win = wins.getNext();
     f(win);
   }
 }
 
-function addLoadListener(target, listener)
-{
+function addLoadListener(target, listener) {
   target.addEventListener("load", function handler(event) {
     target.removeEventListener("load", handler, true);
     return listener(event);
   }, true);
 }
 
 var gWin;
 var gBrowser;
 var ok, is, info;
 
-function removeTab(tab, done)
-{
+function removeTab(tab, done) {
   // Remove the tab in a different turn of the event loop. This way
   // the nested event loop in removeTab doesn't conflict with the
   // event listener shims.
   gWin.setTimeout(() => {
     gBrowser.removeTab(tab);
     done();
   }, 0);
 }
 
 // Make sure that the shims for window.content, browser.contentWindow,
 // and browser.contentDocument are working.
-function testContentWindow()
-{
+function testContentWindow() {
   return new Promise(function(resolve, reject) {
     const url = baseURL + "browser_addonShims_testpage.html";
     let tab = gBrowser.addTab(url);
     gBrowser.selectedTab = tab;
     let browser = tab.linkedBrowser;
     addLoadListener(browser, function handler() {
       ok(gWin.content, "content is defined on chrome window");
       ok(browser.contentWindow, "contentWindow is defined");
@@ -68,18 +64,17 @@ function testContentWindow()
 
       removeTab(tab, resolve);
     });
   });
 }
 
 // Test for bug 1060046 and bug 1072607. We want to make sure that
 // adding and removing listeners works as expected.
-function testListeners()
-{
+function testListeners() {
   return new Promise(function(resolve, reject) {
     const url1 = baseURL + "browser_addonShims_testpage.html";
     const url2 = baseURL + "browser_addonShims_testpage2.html";
 
     let tab = gBrowser.addTab(url2);
     let browser = tab.linkedBrowser;
     addLoadListener(browser, function handler() {
       function dummyHandler() {}
@@ -124,18 +119,17 @@ function testListeners()
       browser.loadURI(url1);
     });
   });
 }
 
 // Test for bug 1059207. We want to make sure that adding a capturing
 // listener and a non-capturing listener to the same element works as
 // expected.
-function testCapturing()
-{
+function testCapturing() {
   return new Promise(function(resolve, reject) {
     let capturingCount = 0;
     let nonCapturingCount = 0;
 
     function capturingHandler(event) {
       is(capturingCount, 0, "capturing handler called once");
       is(nonCapturingCount, 0, "capturing handler called before bubbling handler");
       capturingCount++;
@@ -172,18 +166,17 @@ function testCapturing()
 
       removeTab(tab, resolve);
     });
   });
 }
 
 // Make sure we get observer notifications that normally fire in the
 // child.
-function testObserver()
-{
+function testObserver() {
   return new Promise(function(resolve, reject) {
     let observerFired = 0;
 
     function observer(subject, topic, data) {
       Services.obs.removeObserver(observer, "document-element-inserted");
       observerFired++;
     }
     Services.obs.addObserver(observer, "document-element-inserted", false);
@@ -205,18 +198,17 @@ function testObserver()
       }
     }, true);
   });
 }
 
 // Test for bug 1072472. Make sure that creating a sandbox to run code
 // in the content window works. This is essentially a test for
 // Greasemonkey.
-function testSandbox()
-{
+function testSandbox() {
   return new Promise(function(resolve, reject) {
     const url = baseURL + "browser_addonShims_testpage.html";
     let tab = gBrowser.addTab(url);
     let browser = tab.linkedBrowser;
     browser.addEventListener("load", function handler() {
       browser.removeEventListener("load", handler);
 
       let sandbox = Cu.Sandbox(browser.contentWindow,
@@ -240,18 +232,17 @@ function testSandbox()
 
       removeTab(tab, resolve);
     }, true);
   });
 }
 
 // Test for bug 1095305. We just want to make sure that loading some
 // unprivileged content from an add-on package doesn't crash.
-function testAddonContent()
-{
+function testAddonContent() {
   let chromeRegistry = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
     .getService(Components.interfaces.nsIChromeRegistry);
   let base = chromeRegistry.convertChromeURL(BrowserUtils.makeURI("chrome://addonshim1/content/"));
 
   let res = Services.io.getProtocolHandler("resource")
     .QueryInterface(Ci.nsIResProtocolHandler);
   res.setSubstitution("addonshim1", base);
 
@@ -265,18 +256,17 @@ function testAddonContent()
     });
   });
 }
 
 
 // Test for bug 1102410. We check that multiple nsIAboutModule's can be
 // registered in the parent, and that the child can browse to each of
 // the registered about: pages.
-function testAboutModuleRegistration()
-{
+function testAboutModuleRegistration() {
   let Registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
 
   let modulesToUnregister = new Map();
 
   function TestChannel(uri, aLoadInfo, aboutName) {
     this.aboutName = aboutName;
     this.loadInfo = aLoadInfo;
     this.URI = this.originalURI = uri;
@@ -304,24 +294,22 @@ function testAboutModuleRegistration()
     asyncOpen2(listener) {
       // throws an error if security checks fail
       var outListener = contentSecManager.performSecurityCheck(this, listener);
       return this.asyncOpen(outListener, null);
     },
 
     open() {
       function getWindow(channel) {
-        try
-        {
+        try {
           if (channel.notificationCallbacks)
             return channel.notificationCallbacks.getInterface(Ci.nsILoadContext).associatedWindow;
         } catch (e) {}
 
-        try
-        {
+        try {
           if (channel.loadGroup && channel.loadGroup.notificationCallbacks)
             return channel.loadGroup.notificationCallbacks.getInterface(Ci.nsILoadContext).associatedWindow;
         } catch (e) {}
 
         return null;
       }
 
       let data = `<html><h1>${this.aboutName}</h1></html>`;
@@ -506,18 +494,17 @@ function testAboutModuleRegistration()
       testAboutModulesWork(browser).then(() => {
         unregisterModules();
         removeTab(newTab, resolve);
       });
     });
   });
 }
 
-function testProgressListener()
-{
+function testProgressListener() {
   const url = baseURL + "browser_addonShims_testpage.html";
 
   let sawGlobalLocChange = false;
   let sawTabsLocChange = false;
 
   let globalListener = {
     onLocationChange(webProgress, request, uri) {
       if (uri.spec == url) {
@@ -549,18 +536,17 @@ function testProgressListener()
 
       gBrowser.removeProgressListener(globalListener);
       gBrowser.removeTabsProgressListener(tabsListener);
       removeTab(tab, resolve);
     });
   });
 }
 
-function testRootTreeItem()
-{
+function testRootTreeItem() {
   return new Promise(function(resolve, reject) {
     const url = baseURL + "browser_addonShims_testpage.html";
     let tab = gBrowser.addTab(url);
     gBrowser.selectedTab = tab;
     let browser = tab.linkedBrowser;
     addLoadListener(browser, function handler() {
       let win = browser.contentWindow;
 
@@ -573,18 +559,17 @@ function testRootTreeItem()
                     .getInterface(Components.interfaces.nsIDOMWindow);
       is(root, gWin, "got correct chrome window");
 
       removeTab(tab, resolve);
     });
   });
 }
 
-function testImportNode()
-{
+function testImportNode() {
   return new Promise(function(resolve, reject) {
     const url = baseURL + "browser_addonShims_testpage.html";
     let tab = gBrowser.addTab(url);
     gBrowser.selectedTab = tab;
     let browser = tab.linkedBrowser;
     addLoadListener(browser, function handler() {
       let node = gWin.document.createElement("div");
       let doc = browser.contentDocument;
@@ -598,18 +583,17 @@ function testImportNode()
         is(result, node, "got expected import result");
       }
 
       removeTab(tab, resolve);
     });
   });
 }
 
-function runTests(win, funcs)
-{
+function runTests(win, funcs) {
   ok = funcs.ok;
   is = funcs.is;
   info = funcs.info;
 
   gWin = win;
   gBrowser = win.gBrowser;
 
   return testContentWindow().
@@ -624,30 +608,26 @@ function runTests(win, funcs)
     then(testImportNode).
     then(Promise.resolve());
 }
 
 /*
  bootstrap.js API
 */
 
-function startup(aData, aReason)
-{
+function startup(aData, aReason) {
   forEachWindow(win => {
     win.runAddonShimTests = (funcs) => runTests(win, funcs);
   });
 }
 
-function shutdown(aData, aReason)
-{
+function shutdown(aData, aReason) {
   forEachWindow(win => {
     delete win.runAddonShimTests;
   });
 }
 
-function install(aData, aReason)
-{
+function install(aData, aReason) {
 }
 
-function uninstall(aData, aReason)
-{
+function uninstall(aData, aReason) {
 }
 
--- a/toolkit/components/addoncompat/tests/browser/browser_addonShims.js
+++ b/toolkit/components/addoncompat/tests/browser/browser_addonShims.js
@@ -1,18 +1,17 @@
 var {AddonManager} = Cu.import("resource://gre/modules/AddonManager.jsm", {});
 var {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
 
 const ADDON_URL = "http://example.com/browser/toolkit/components/addoncompat/tests/browser/addon.xpi";
 const COMPAT_ADDON_URL = "http://example.com/browser/toolkit/components/addoncompat/tests/browser/compat-addon.xpi";
 
 // Install a test add-on that will exercise e10s shims.
 //   url: Location of the add-on.
-function addAddon(url)
-{
+function addAddon(url) {
   info("Installing add-on: " + url);
 
   return new Promise(function(resolve, reject) {
     AddonManager.getInstallForURL(url, installer => {
       installer.install();
       let listener = {
         onInstallEnded(addon, addonInstall) {
           installer.removeListener(listener);
@@ -25,18 +24,17 @@ function addAddon(url)
       };
       installer.addListener(listener);
     }, "application/x-xpinstall");
   });
 }
 
 // Uninstall a test add-on.
 //   addon: The addon reference returned from addAddon.
-function removeAddon(addon)
-{
+function removeAddon(addon) {
   info("Removing addon.");
 
   return new Promise(function(resolve, reject) {
     let listener = {
       onUninstalled(uninstalledAddon) {
         if (uninstalledAddon != addon) {
           return;
         }
--- a/toolkit/components/addoncompat/tests/compat-addon/bootstrap.js
+++ b/toolkit/components/addoncompat/tests/compat-addon/bootstrap.js
@@ -5,27 +5,25 @@ var Cr = Components.results;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/BrowserUtils.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const baseURL = "http://mochi.test:8888/browser/" +
   "toolkit/components/addoncompat/tests/browser/";
 
-function forEachWindow(f)
-{
+function forEachWindow(f) {
   let wins = Services.wm.getEnumerator("navigator:browser");
   while (wins.hasMoreElements()) {
     let win = wins.getNext();
     f(win);
   }
 }
 
-function addLoadListener(target, listener)
-{
+function addLoadListener(target, listener) {
   function frameScript() {
     addEventListener("load", function handler(event) {
       removeEventListener("load", handler, true);
       sendAsyncMessage("compat-test:loaded");
     }, true);
   }
   target.messageManager.loadFrameScript("data:,(" + frameScript.toString() + ")()", false);
   target.messageManager.addMessageListener("compat-test:loaded", function handler() {
@@ -35,18 +33,17 @@ function addLoadListener(target, listene
 }
 
 var gWin;
 var gBrowser;
 var ok, is, info;
 
 // Make sure that the shims for window.content, browser.contentWindow,
 // and browser.contentDocument are working.
-function testContentWindow()
-{
+function testContentWindow() {
   return new Promise(function(resolve, reject) {
     const url = baseURL + "browser_addonShims_testpage.html";
     let tab = gBrowser.addTab("about:blank");
     gBrowser.selectedTab = tab;
     let browser = tab.linkedBrowser;
     addLoadListener(browser, function handler() {
       ok(!gWin.content, "content is defined on chrome window");
       ok(!browser.contentWindow, "contentWindow is defined");
@@ -54,46 +51,41 @@ function testContentWindow()
 
       gBrowser.removeTab(tab);
       resolve();
     });
     browser.loadURI(url);
   });
 }
 
-function runTests(win, funcs)
-{
+function runTests(win, funcs) {
   ok = funcs.ok;
   is = funcs.is;
   info = funcs.info;
 
   gWin = win;
   gBrowser = win.gBrowser;
 
   return testContentWindow();
 }
 
 /*
  bootstrap.js API
 */
 
-function startup(aData, aReason)
-{
+function startup(aData, aReason) {
   forEachWindow(win => {
     win.runAddonTests = (funcs) => runTests(win, funcs);
   });
 }
 
-function shutdown(aData, aReason)
-{
+function shutdown(aData, aReason) {
   forEachWindow(win => {
     delete win.runAddonTests;
   });
 }
 
-function install(aData, aReason)
-{
+function install(aData, aReason) {
 }
 
-function uninstall(aData, aReason)
-{
+function uninstall(aData, aReason) {
 }
 
--- a/toolkit/components/asyncshutdown/AsyncShutdown.jsm
+++ b/toolkit/components/asyncshutdown/AsyncShutdown.jsm
@@ -922,17 +922,17 @@ Barrier.prototype = Object.freeze({
          || options.crashAfterMS == null) {
         // Change the delay or deactivate crashAfterMS
         crashAfterMS = options.crashAfterMS;
       } else {
         throw new TypeError("Wrong option value for crashAfterMS");
       }
     }
 
-    if (crashAfterMS  > 0) {
+    if (crashAfterMS > 0) {
       let timeToCrash = null;
 
       // If after |crashAfterMS| milliseconds (adjusted to take into
       // account sleep and otherwise busy computer) we have not finished
       // this shutdown phase, we assume that the shutdown is somehow
       // frozen, presumably deadlocked. At this stage, the only thing we
       // can do to avoid leaving the user's computer in an unstable (and
       // battery-sucking) situation is report the issue and crash.
--- a/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js
+++ b/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js
@@ -19,17 +19,18 @@ add_task(function* test_phase_simple_asy
   for (let kind of ["phase", "barrier", "xpcom-barrier", "xpcom-barrier-unwrapped"]) {
     for (let arg of [undefined, null, "foo", 100, new Error("BOOM")]) {
       for (let resolution of [arg, Promise.reject(arg)]) {
         for (let success of [false, true]) {
           for (let state of [[null],
                              [],
                              [() => "some state"],
                              [function() {
-                               throw new Error("State BOOM"); }],
+                               throw new Error("State BOOM");
+}],
                              [function() {
                                return {
                                  toJSON() {
                                    throw new Error("State.toJSON BOOM");
                                  }
                                };
                              }]]) {
             // Asynchronous phase
--- a/toolkit/components/autocomplete/tests/unit/test_378079.js
+++ b/toolkit/components/autocomplete/tests/unit/test_378079.js
@@ -160,18 +160,17 @@ AutoCompleteSearch.prototype = {
 
 
   /**
    * Return the same result set for every search
    */
   startSearch(aSearchString,
                         aSearchParam,
                         aPreviousResult,
-                        aListener)
-  {
+                        aListener) {
     aListener.onSearchResult(this, this._result);
   },
 
   stopSearch() {},
 
   // nsISupports implementation
   QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
--- a/toolkit/components/autocomplete/tests/unit/test_393191.js
+++ b/toolkit/components/autocomplete/tests/unit/test_393191.js
@@ -159,18 +159,17 @@ AutoCompleteSearch.prototype = {
 
 
   /**
    * Return the same result set for every search
    */
   startSearch(aSearchString,
                         aSearchParam,
                         aPreviousResult,
-                        aListener)
-  {
+                        aListener) {
     aListener.onSearchResult(this, this._result);
   },
 
   stopSearch() {},
 
   // nsISupports implementation
   QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
--- a/toolkit/components/autocomplete/tests/unit/test_440866.js
+++ b/toolkit/components/autocomplete/tests/unit/test_440866.js
@@ -158,18 +158,17 @@ AutoCompleteSearch.prototype = {
 
 
   /**
    * Return the same result set for every search
    */
   startSearch(aSearchString,
                         aSearchParam,
                         aPreviousResult,
-                        aListener)
-  {
+                        aListener) {
     aListener.onSearchResult(this, this._result);
   },
 
   stopSearch() {},
 
   // nsISupports implementation
   QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
--- a/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js
+++ b/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js
@@ -147,18 +147,17 @@ AutoCompleteSearch.prototype = {
 
 
   /**
    * Return the same result set for every search
    */
   startSearch(aSearchString,
                         aSearchParam,
                         aPreviousResult,
-                        aListener)
-  {
+                        aListener) {
     var result = this._result;
     if (result._values.length > 0) {
       result.searchResult = Ci.nsIAutoCompleteResult.RESULT_SUCCESS_ONGOING;
     } else {
       result.searchResult = Ci.nsIAutoCompleteResult.RESULT_NOMATCH_ONGOING;
     }
     aListener.onSearchResult(this, result);
 
--- a/toolkit/components/autocomplete/tests/unit/test_previousResult.js
+++ b/toolkit/components/autocomplete/tests/unit/test_previousResult.js
@@ -159,18 +159,17 @@ AutoCompleteSearch.prototype = {
 
 
   /**
    * Return the same result set for every search
    */
   startSearch(aSearchString,
                         aSearchParam,
                         aPreviousResult,
-                        aListener)
-  {
+                        aListener) {
     this._previousResult = aPreviousResult;
     aListener.onSearchResult(this, this._result);
   },
 
   stopSearch() {},
 
   // nsISupports implementation
   QueryInterface(iid) {
--- a/toolkit/components/autocomplete/tests/unit/test_stopSearch.js
+++ b/toolkit/components/autocomplete/tests/unit/test_stopSearch.js
@@ -12,18 +12,17 @@ Components.utils.import("resource://gre/
 
 
 /**
  * Dummy nsIAutoCompleteInput source that returns
  * the given list of AutoCompleteSearch names.
  *
  * Implements only the methods needed for this test.
  */
-function AutoCompleteInput(aSearches)
-{
+function AutoCompleteInput(aSearches) {
   this.searches = aSearches;
 }
 AutoCompleteInput.prototype = {
   constructor: AutoCompleteInput,
   minResultsForPopup: 0,
   timeout: 10,
   searchParam: "",
   textValue: "hello",
@@ -46,50 +45,45 @@ AutoCompleteInput.prototype = {
   },
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput])
 }
 
 
 /**
  * nsIAutoCompleteSearch implementation.
  */
-function AutoCompleteSearch(aName)
-{
+function AutoCompleteSearch(aName) {
   this.name = aName;
 }
 AutoCompleteSearch.prototype = {
   constructor: AutoCompleteSearch,
   stopSearchInvoked: true,
-  startSearch(aSearchString, aSearchParam, aPreviousResult, aListener)
-  {
+  startSearch(aSearchString, aSearchParam, aPreviousResult, aListener) {
     print("Check stop search has been called");
     do_check_true(this.stopSearchInvoked);
     this.stopSearchInvoked = false;
   },
-  stopSearch()
-  {
+  stopSearch() {
     this.stopSearchInvoked = true;
   },
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsIFactory
   , Ci.nsIAutoCompleteSearch
   ]),
-  createInstance(outer, iid)
-  {
+  createInstance(outer, iid) {
     return this.QueryInterface(iid);
   }
 }
 
 
 /**
  * Helper to register an AutoCompleteSearch with the given name.
  * Allows the AutoCompleteController to find the search.
  */
-function registerAutoCompleteSearch(aSearch)
-{
+function registerAutoCompleteSearch(aSearch) {
   let name = "@mozilla.org/autocomplete/search;1?name=" + aSearch.name;
   let uuidGenerator = Cc["@mozilla.org/uuid-generator;1"].
                       getService(Ci.nsIUUIDGenerator);
   let cid = uuidGenerator.generateUUID();
   let desc = "Test AutoCompleteSearch";
   let componentManager = Components.manager
                                    .QueryInterface(Ci.nsIComponentRegistrar);
   componentManager.registerFactory(cid, desc, name, aSearch);
--- a/toolkit/components/captivedetect/test/unit/head_setprefs.js
+++ b/toolkit/components/captivedetect/test/unit/head_setprefs.js
@@ -29,18 +29,17 @@ function setupPrefs() {
                 .getService(Components.interfaces.nsIPrefService)
                 .QueryInterface(Components.interfaces.nsIPrefBranch);
   prefs.setCharPref(kPrefsCanonicalURL, gServerURL + kCanonicalSitePath);
   prefs.setCharPref(kPrefsCanonicalContent, kCanonicalSiteContent);
   prefs.setIntPref(kPrefsMaxWaitingTime, 0);
   prefs.setIntPref(kPrefsPollingTime, 1);
 }
 
-function run_captivedetect_test(xhr_handler, fakeUIResponse, testfun)
-{
+function run_captivedetect_test(xhr_handler, fakeUIResponse, testfun) {
   gServer = new HttpServer();
   gServer.registerPathHandler(kCanonicalSitePath, xhr_handler);
   gServer.start(-1);
   gServerURL = 'http://localhost:' + gServer.identity.primaryPort;
 
   setupPrefs();
 
   fakeUIResponse();
--- a/toolkit/components/contentprefs/ContentPrefService2.jsm
+++ b/toolkit/components/contentprefs/ContentPrefService2.jsm
@@ -295,18 +295,17 @@ ContentPrefService2.prototype = {
            WHERE groups.name = :group AND settings.name = :name),
           (SELECT id FROM groups WHERE name = :group),
           (SELECT id FROM settings WHERE name = :name),
           :value,
           :now
         )
       `);
       stmt.params.group = group;
-    }
-    else {
+    } else {
       stmt = this._stmt(`
         INSERT OR REPLACE INTO prefs (id, groupID, settingID, value, timestamp)
         VALUES(
           (SELECT prefs.id
            FROM prefs
            JOIN settings ON settings.id = prefs.settingID
            WHERE prefs.groupID IS NULL AND settings.name = :name),
           NULL,
@@ -473,18 +472,17 @@ ContentPrefService2.prototype = {
       `));
       stmts.push(this._stmtWithGroupClause(group, includeSubdomains,
         `DELETE FROM groups WHERE id IN (${GROUP_CLAUSE})`
       ));
       stmts.push(this._stmt(`
         DELETE FROM prefs
         WHERE groupID NOTNULL AND groupID NOT IN (SELECT id FROM groups)
       `));
-    }
-    else {
+    } else {
       stmts.push(this._stmt(`
         SELECT NULL AS grp, settings.name AS name
         FROM prefs
         JOIN settings ON settings.id = prefs.settingID
         WHERE prefs.groupID IS NULL
       `));
       stmts.push(this._stmt(
         "DELETE FROM prefs WHERE groupID IS NULL"
@@ -734,39 +732,36 @@ ContentPrefService2.prototype = {
       handleResult: function handleResult(results) {
         try {
           let row = null;
           while ((row = results.getNextRow())) {
             gotRow = true;
             if (callbacks.onRow)
               callbacks.onRow.call(self, row);
           }
-        }
-        catch (err) {
+        } catch (err) {
           Cu.reportError(err);
         }
       },
       handleCompletion: function handleCompletion(reason) {
         try {
           let ok = reason == Ci.mozIStorageStatementCallback.REASON_FINISHED;
           callbacks.onDone.call(self,
                                 ok ? Ci.nsIContentPrefCallback2.COMPLETE_OK :
                                   Ci.nsIContentPrefCallback2.COMPLETE_ERROR,
                                 ok, gotRow);
-        }
-        catch (err) {
+        } catch (err) {
           Cu.reportError(err);
         }
       },
       handleError: function handleError(error) {
         try {
           if (callbacks.onError)
             callbacks.onError.call(self, Cr.NS_ERROR_FAILURE);
-        }
-        catch (err) {
+        } catch (err) {
           Cu.reportError(err);
         }
       }
     });
   },
 
   /**
    * Parses the domain (the "group", to use the database's term) from the given
@@ -777,18 +772,17 @@ ContentPrefService2.prototype = {
    *                  that URL.  If groupStr is some other nonempty string,
    *                  returns groupStr itself.  Otherwise returns null.
    */
   _parseGroup: function CPS2__parseGroup(groupStr) {
     if (!groupStr)
       return null;
     try {
       var groupURI = Services.io.newURI(groupStr, null, null);
-    }
-    catch (err) {
+    } catch (err) {
       return groupStr;
     }
     return this._cps._grouper.group(groupURI);
   },
 
   _schedule: function CPS2__schedule(fn) {
     Services.tm.mainThread.dispatch(fn.bind(this),
                                     Ci.nsIThread.DISPATCH_NORMAL);
--- a/toolkit/components/contentprefs/ContentPrefStore.jsm
+++ b/toolkit/components/contentprefs/ContentPrefStore.jsm
@@ -13,18 +13,17 @@ function ContentPrefStore() {
 
 ContentPrefStore.prototype = {
 
   set: function CPS_set(group, name, val) {
     if (group) {
       if (!this._groups.has(group))
         this._groups.set(group, new Map());
       this._groups.get(group).set(name, val);
-    }
-    else {
+    } else {
       this._globalNames.set(name, val);
     }
   },
 
   setWithCast: function CPS_setWithCast(group, name, val) {
     if (typeof(val) == "boolean")
       val = val ? 1 : 0;
     else if (val === undefined)
@@ -48,27 +47,25 @@ ContentPrefStore.prototype = {
 
   remove: function CPS_remove(group, name) {
     if (group) {
       if (this._groups.has(group)) {
         this._groups.get(group).delete(name);
         if (this._groups.get(group).size == 0)
           this._groups.delete(group);
       }
-    }
-    else {
+    } else {
       this._globalNames.delete(name);
     }
   },
 
   removeGroup: function CPS_removeGroup(group) {
     if (group) {
       this._groups.delete(group);
-    }
-    else {
+    } else {
       this._globalNames.clear();
     }
   },
 
   removeAllGroups: function CPS_removeAllGroups() {
     this._groups.clear();
   },
 
@@ -106,18 +103,16 @@ ContentPrefStore.prototype = {
       if (includeSubdomains) {
         for (let [sgroup, , ] of this) {
           if (sgroup) {
             if (this.groupsMatchIncludingSubdomains(group, sgroup)) {
               yield sgroup;
             }
           }
         }
-      }
-      else if (this._groups.has(group)) {
+      } else if (this._groups.has(group)) {
         yield group;
       }
-    }
-    else if (this._globalNames.size) {
+    } else if (this._globalNames.size) {
       yield null;
     }
   },
 };
--- a/toolkit/components/contentprefs/ContentPrefUtils.jsm
+++ b/toolkit/components/contentprefs/ContentPrefUtils.jsm
@@ -40,13 +40,12 @@ function cbHandleError(callback, nsresul
   safeCallback(callback, "handleError", [nsresult]);
 }
 
 function safeCallback(callbackObj, methodName, args) {
   if (!callbackObj || typeof(callbackObj[methodName]) != "function")
     return;
   try {
     callbackObj[methodName].apply(callbackObj, args);
-  }
-  catch (err) {
+  } catch (err) {
     Cu.reportError(err);
   }
 }
--- a/toolkit/components/contentprefs/nsContentPrefService.js
+++ b/toolkit/components/contentprefs/nsContentPrefService.js
@@ -254,18 +254,17 @@ ContentPrefService.prototype = {
       return;
     }
 
     var settingID = this._selectSettingID(aName) || this._insertSetting(aName);
     var groupID, prefID;
     if (group == null) {
       groupID = null;
       prefID = this._selectGlobalPrefID(settingID);
-    }
-    else {
+    } else {
       groupID = this._selectGroupID(group) || this._insertGroup(group);
       prefID = this._selectPrefID(groupID, settingID);
     }
 
     // Update the existing record, if any, or create a new one.
     if (prefID)
       this._updatePref(prefID, aValue);
     else
@@ -312,18 +311,17 @@ ContentPrefService.prototype = {
       return;
     }
 
     var settingID = this._selectSettingID(aName);
     var groupID, prefID;
     if (group == null) {
       groupID = null;
       prefID = this._selectGlobalPrefID(settingID);
-    }
-    else {
+    } else {
       groupID = this._selectGroupID(group);
       prefID = this._selectPrefID(groupID, settingID);
     }
 
     this._deletePref(prefID);
 
     // Get rid of extraneous records that are no longer being used.
     this._deleteSettingIfUnused(settingID);
@@ -347,18 +345,17 @@ ContentPrefService.prototype = {
     try {
       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();
 
@@ -390,18 +387,17 @@ ContentPrefService.prototype = {
     var groupIDs = [];
     try {
       selectGroupsStmt.params.setting = settingID;
 
       while (selectGroupsStmt.executeStep()) {
         groupIDs.push(selectGroupsStmt.row["groupID"]);
         groupNames.push(selectGroupsStmt.row["groupName"]);
       }
-    }
-    finally {
+    } finally {
       selectGroupsStmt.reset();
     }
 
     if (this.hasPref(null, aName)) {
       groupNames.push(null);
     }
 
     this._dbConnection.executeSimpleSQL("DELETE FROM prefs WHERE settingID = " + settingID);
@@ -468,18 +464,17 @@ ContentPrefService.prototype = {
   },
 
   _addObserver: function ContentPrefService__addObserver(aName, aObserver) {
     var observers;
     if (aName) {
       if (!this._observers[aName])
         this._observers[aName] = [];
       observers = this._observers[aName];
-    }
-    else
+    } else
       observers = this._genericObservers;
 
     if (observers.indexOf(aObserver) == -1)
       observers.push(aObserver);
   },
 
   removeObserver: function ContentPrefService_removeObserver(aName, aObserver) {
     warnDeprecated();
@@ -487,18 +482,17 @@ ContentPrefService.prototype = {
   },
 
   _removeObserver: function ContentPrefService__removeObserver(aName, aObserver) {
     var observers;
     if (aName) {
       if (!this._observers[aName])
         return;
       observers = this._observers[aName];
-    }
-    else
+    } else
       observers = this._genericObservers;
 
     if (observers.indexOf(aObserver) != -1)
       observers.splice(observers.indexOf(aObserver), 1);
   },
 
   /**
    * Construct a list of observers to notify about a change to some setting,
@@ -519,32 +513,30 @@ 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;
@@ -601,25 +593,23 @@ ContentPrefService.prototype = {
       this._stmtSelectPref.params.setting = aSetting;
 
       if (aCallback) {
         let cache = this._cache;
         new AsyncStatement(this._stmtSelectPref).execute({onResult(aResult) {
           cache.set(aGroup, aSetting, aResult);
           aCallback.onResult(aResult);
         }});
-      }
-      else {
+      } else {
         if (this._stmtSelectPref.executeStep()) {
           value = this._stmtSelectPref.row["value"];
         }
         this._cache.set(aGroup, aSetting, value);
       }
-    }
-    finally {
+    } finally {
       this._stmtSelectPref.reset();
     }
 
     return value;
   },
 
   __stmtSelectGlobalPref: null,
   get _stmtSelectGlobalPref() {
@@ -650,25 +640,23 @@ ContentPrefService.prototype = {
       this._stmtSelectGlobalPref.params.name = aName;
 
       if (aCallback) {
         let cache = this._cache;
         new AsyncStatement(this._stmtSelectGlobalPref).execute({onResult(aResult) {
           cache.set(null, aName, aResult);
           aCallback.onResult(aResult);
         }});
-      }
-      else {
+      } else {
         if (this._stmtSelectGlobalPref.executeStep()) {
           value = this._stmtSelectGlobalPref.row["value"];
         }
         this._cache.set(null, aName, value);
       }
-    }
-    finally {
+    } finally {
       this._stmtSelectGlobalPref.reset();
     }
 
     return value;
   },
 
   __stmtSelectGroupID: null,
   get _stmtSelectGroupID() {
@@ -685,18 +673,17 @@ ContentPrefService.prototype = {
   _selectGroupID: function ContentPrefService__selectGroupID(aName) {
     var id;
 
     try {
       this._stmtSelectGroupID.params.name = aName;
 
       if (this._stmtSelectGroupID.executeStep())
         id = this._stmtSelectGroupID.row["id"];
-    }
-    finally {
+    } finally {
       this._stmtSelectGroupID.reset();
     }
 
     return id;
   },
 
   __stmtInsertGroup: null,
   get _stmtInsertGroup() {
@@ -727,18 +714,17 @@ ContentPrefService.prototype = {
   _selectSettingID: function ContentPrefService__selectSettingID(aName) {
     var id;
 
     try {
       this._stmtSelectSettingID.params.name = aName;
 
       if (this._stmtSelectSettingID.executeStep())
         id = this._stmtSelectSettingID.row["id"];
-    }
-    finally {
+    } finally {
       this._stmtSelectSettingID.reset();
     }
 
     return id;
   },
 
   __stmtInsertSetting: null,
   get _stmtInsertSetting() {
@@ -770,18 +756,17 @@ ContentPrefService.prototype = {
     var id;
 
     try {
       this._stmtSelectPrefID.params.groupID = aGroupID;
       this._stmtSelectPrefID.params.settingID = aSettingID;
 
       if (this._stmtSelectPrefID.executeStep())
         id = this._stmtSelectPrefID.row["id"];
-    }
-    finally {
+    } finally {
       this._stmtSelectPrefID.reset();
     }
 
     return id;
   },
 
   __stmtSelectGlobalPrefID: null,
   get _stmtSelectGlobalPrefID() {
@@ -796,18 +781,17 @@ ContentPrefService.prototype = {
   _selectGlobalPrefID: function ContentPrefService__selectGlobalPrefID(aSettingID) {
     var id;
 
     try {
       this._stmtSelectGlobalPrefID.params.settingID = aSettingID;
 
       if (this._stmtSelectGlobalPrefID.executeStep())
         id = this._stmtSelectGlobalPrefID.row["id"];
-    }
-    finally {
+    } finally {
       this._stmtSelectGlobalPrefID.reset();
     }
 
     return id;
   },
 
   __stmtInsertPref: null,
   get _stmtInsertPref() {
@@ -910,18 +894,17 @@ ContentPrefService.prototype = {
                 createInstance(Ci.nsIWritablePropertyBag);
 
     try {
       this._stmtSelectPrefs.params.group = aGroup;
 
       while (this._stmtSelectPrefs.executeStep())
         prefs.setProperty(this._stmtSelectPrefs.row["name"],
                           this._stmtSelectPrefs.row["value"]);
-    }
-    finally {
+    } finally {
       this._stmtSelectPrefs.reset();
     }
 
     return prefs;
   },
 
   __stmtSelectGlobalPrefs: null,
   get _stmtSelectGlobalPrefs() {
@@ -939,18 +922,17 @@ ContentPrefService.prototype = {
   _selectGlobalPrefs: function ContentPrefService__selectGlobalPrefs() {
     var prefs = Cc["@mozilla.org/hash-property-bag;1"].
                 createInstance(Ci.nsIWritablePropertyBag);
 
     try {
       while (this._stmtSelectGlobalPrefs.executeStep())
         prefs.setProperty(this._stmtSelectGlobalPrefs.row["name"],
                           this._stmtSelectGlobalPrefs.row["value"]);
-    }
-    finally {
+    } finally {
       this._stmtSelectGlobalPrefs.reset();
     }
 
     return prefs;
   },
 
   __stmtSelectPrefsByName: null,
   get _stmtSelectPrefsByName() {
@@ -971,18 +953,17 @@ ContentPrefService.prototype = {
                 createInstance(Ci.nsIWritablePropertyBag);
 
     try {
       this._stmtSelectPrefsByName.params.setting = aName;
 
       while (this._stmtSelectPrefsByName.executeStep())
         prefs.setProperty(this._stmtSelectPrefsByName.row["groupName"],
                           this._stmtSelectPrefsByName.row["value"]);
-    }
-    finally {
+    } finally {
       this._stmtSelectPrefsByName.reset();
     }
 
     var global = this._selectGlobalPref(aName);
     if (typeof global != "undefined") {
       prefs.setProperty(null, global);
     }
 
@@ -1024,18 +1005,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;
   },
@@ -1056,36 +1036,34 @@ ContentPrefService.prototype = {
 
     var dbConnection;
 
     if (!dbFile.exists())
       dbConnection = this._dbCreate(dbService, dbFile);
     else {
       try {
         dbConnection = dbService.openDatabase(dbFile);
-      }
-      // If the connection isn't ready after we open the database, that means
-      // the database has been corrupted, so we back it up and then recreate it.
-      catch (e) {
+      } catch (e) {
+        // If the connection isn't ready after we open the database, that means
+        // the database has been corrupted, so we back it up and then recreate it.
         if (e.result != Cr.NS_ERROR_FILE_CORRUPTED)
           throw e;
         dbConnection = this._dbBackUpAndRecreate(dbService, dbFile,
                                                  dbConnection);
       }
 
       // Get the version of the schema in the file.
       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
@@ -1106,18 +1084,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;
     }
 
@@ -1267,35 +1244,33 @@ HostnameGrouper.prototype = {
       // 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");
-    }
-    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_cps2/AsyncRunner.jsm
+++ b/toolkit/components/contentprefs/tests/unit_cps2/AsyncRunner.jsm
@@ -33,18 +33,17 @@ AsyncRunner.prototype = {
 
     try {
       var { done, value } = this._iteratorQueue[0].next(arg);
       if (done) {
         this._iteratorQueue.shift();
         this.next();
         return;
       }
-    }
-    catch (err) {
+    } catch (err) {
       this._callbacks.error(err);
     }
 
     // val is truthy => call next
     // val is an iterator => prepend it to the queue and start on it
     if (value) {
       if (typeof(value) != "boolean")
         this._iteratorQueue.unshift(value);
@@ -56,14 +55,13 @@ AsyncRunner.prototype = {
     Cc["@mozilla.org/consoleservice;1"].
       getService(Ci.nsIConsoleService).
       unregisterListener(this);
     this.destroy = function AR_alreadyDestroyed() {};
   },
 
   observe: function AR_consoleServiceListener(msg) {
     if (msg instanceof Ci.nsIScriptError &&
-        !(msg.flags & Ci.nsIScriptError.warningFlag))
-    {
+        !(msg.flags & Ci.nsIScriptError.warningFlag)) {
       this._callbacks.consoleError(msg);
     }
   },
 };
--- a/toolkit/components/contentprefs/tests/unit_cps2/head.js
+++ b/toolkit/components/contentprefs/tests/unit_cps2/head.js
@@ -45,17 +45,17 @@ function runAsyncTests(tests, dontResetB
       // error conditions on the JS-implemented XPCOM component (see erroneous()
       // in test_getSubdomains.js, for example). In the old world, we got lucky,
       // and the errors were never reported to the console due to happenstantial
       // JSContext reasons that aren't really worth going into.
       //
       // So. We make sure to dump this stuff so that it shows up in the logs, but
       // don't turn them into duplicate failures of the exception that was already
       // propagated to the caller.
-      dump("AsyncRunner.jsm observed console error: " +  scriptErr + "\n");
+      dump("AsyncRunner.jsm observed console error: " + scriptErr + "\n");
     }
   });
 
   next = asyncRunner.next.bind(asyncRunner);
 
   do_register_cleanup(function() {
     asyncRunner.destroy();
     asyncRunner = null;
@@ -101,18 +101,17 @@ function makeCallback(callbacks, success
     };
   return callbacks;
 }
 
 function do_check_throws(fn) {
   let threw = false;
   try {
     fn();
-  }
-  catch (err) {
+  } catch (err) {
     threw = true;
   }
   ok(threw);
 }
 
 function sendMessage(msg, callback) {
   let obj = callback || {};
   let ref = Cu.getWeakReference(obj);
--- a/toolkit/components/cookie/content/cookieAcceptDialog.js
+++ b/toolkit/components/cookie/content/cookieAcceptDialog.js
@@ -13,18 +13,17 @@ Components.utils.import("resource://gre/
 
 var params;
 var cookieBundle;
 
 var showDetails = "";
 var hideDetails = "";
 var detailsAccessKey = "";
 
-function onload()
-{
+function onload() {
   doSetOKCancel(cookieAcceptNormal, cookieDeny, cookieAcceptSession);
 
   var dialog = document.documentElement;
 
   document.getElementById("Button2").collapsed = false;
 
   document.getElementById("ok").label = dialog.getAttribute("acceptLabel");
   document.getElementById("ok").accessKey = dialog.getAttribute("acceptKey");
@@ -125,50 +124,46 @@ function onload()
     if (window.opener && PrivateBrowsingUtils.isWindowPrivate(window.opener)) {
       var persistCheckbox = document.getElementById("persistDomainAcceptance");
       persistCheckbox.removeAttribute("checked");
       persistCheckbox.setAttribute("disabled", "true");
     }
   } catch (ex) {}
 }
 
-function showhideinfo()
-{
+function showhideinfo() {
   var infobox = document.getElementById('infobox');
 
   if (infobox.hidden) {
     infobox.setAttribute("hidden", "false");
     document.getElementById('disclosureButton').setAttribute("label", hideDetails);
   } else {
     infobox.setAttribute("hidden", "true");
     document.getElementById('disclosureButton').setAttribute("label", showDetails);
   }
   sizeToContent();
 }
 
-function cookieAcceptNormal()
-{
+function cookieAcceptNormal() {
   // accept the cookie normally
   params.SetInt(nsICookieAcceptDialog.ACCEPT_COOKIE, nsICookiePromptService.ACCEPT_COOKIE);
   // And remember that when needed
   params.SetInt(nsICookieAcceptDialog.REMEMBER_DECISION, document.getElementById('persistDomainAcceptance').checked);
   window.close();
 }
 
-function cookieAcceptSession()
-{
+function cookieAcceptSession() {
   // accept for the session only
   params.SetInt(nsICookieAcceptDialog.ACCEPT_COOKIE, nsICookiePromptService.ACCEPT_SESSION_COOKIE);
   // And remember that when needed
   params.SetInt(nsICookieAcceptDialog.REMEMBER_DECISION, document.getElementById('persistDomainAcceptance').checked);
   window.close();
 }
 
-function cookieDeny()
-{
+function cookieDeny() {
   // say that the cookie was rejected
   params.SetInt(nsICookieAcceptDialog.ACCEPT_COOKIE, nsICookiePromptService.DENY_COOKIE);
   // And remember that when needed
   params.SetInt(nsICookieAcceptDialog.REMEMBER_DECISION, document.getElementById('persistDomainAcceptance').checked);
   window.close();
 }
 
 function GetExpiresString(secondsUntilExpires) {
--- a/toolkit/components/crashmonitor/test/unit/head.js
+++ b/toolkit/components/crashmonitor/test/unit/head.js
@@ -7,16 +7,15 @@ Components.utils.import("resource://gre/
 XPCOMUtils.defineLazyModuleGetter(this, "OS",
                                   "resource://gre/modules/osfile.jsm");
 
 var sessionCheckpointsPath;
 
 /**
  * Start the tasks of the different tests
  */
-function run_test()
-{
+function run_test() {
   do_get_profile();
   sessionCheckpointsPath = OS.Path.join(OS.Constants.Path.profileDir,
                                         "sessionCheckpoints.json");
   Components.utils.import("resource://gre/modules/CrashMonitor.jsm");
   run_next_test();
 }
--- a/toolkit/components/ctypes/tests/unit/head.js
+++ b/toolkit/components/ctypes/tests/unit/head.js
@@ -1,17 +1,16 @@
 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) {
 }
 
-function open_ctypes_test_lib()
-{
+function open_ctypes_test_lib() {
   return ctypes.open(do_get_file(ctypes.libraryName("jsctypes-test")).path);
 }
 
 /**
  * A weak set of CDataFinalizer values that need to be cleaned up before
  * proceeding to the next test.
  */
 function ResourceCleaner() {
--- a/toolkit/components/ctypes/tests/unit/test_errno.js
+++ b/toolkit/components/ctypes/tests/unit/test_errno.js
@@ -1,28 +1,26 @@
 Components.utils.import("resource://gre/modules/ctypes.jsm");
 
 // Scope used to relaunch the tests with |ctypes| opened in a limited scope.
 var scope = {};
 var ctypes = ctypes;
 
-function run_test()
-{
+function run_test() {
   // Launch the test with regular loading of ctypes.jsm
   main_test();
 
   // Relaunch the test with exotic loading of ctypes.jsm
   Components.utils.unload("resource://gre/modules/ctypes.jsm");
   Components.utils.import("resource://gre/modules/ctypes.jsm", scope);
   ctypes = scope.ctypes;
   main_test();
 }
 
-function main_test()
-{
+function main_test() {
   "use strict";
   let library = open_ctypes_test_lib();
   let set_errno = library.declare("set_errno", ctypes.default_abi,
                                    ctypes.void_t,
                                    ctypes.int);
   let get_errno = library.declare("get_errno", ctypes.default_abi,
                                    ctypes.int);
 
--- a/toolkit/components/ctypes/tests/unit/test_finalizer.js
+++ b/toolkit/components/ctypes/tests/unit/test_finalizer.js
@@ -1,12 +1,11 @@
 var TEST_SIZE = 100;
 
-function run_test()
-{
+function run_test() {
   let library = open_ctypes_test_lib();
 
   let start = library.declare("test_finalizer_start", ctypes.default_abi,
                           ctypes.void_t,
                           ctypes.size_t);
   let stop = library.declare("test_finalizer_stop", ctypes.default_abi,
                          ctypes.void_t);
   let status = library.declare("test_finalizer_resource_is_acquired",
@@ -292,18 +291,17 @@ function count_finalized(size, tc) {
   return finalizedItems;
 }
 
 /**
  * Test:
  * - that (some) finalizers are executed;
  * - that no finalizer is executed twice (this is done on the C side).
  */
-function test_executing_finalizers(size, tc, cleanup)
-{
+function test_executing_finalizers(size, tc, cleanup) {
   dump("test_executing_finalizers " + tc.name + "\n");
   // Allocate |size| items without references
   for (let i = 0; i < size; ++i) {
     cleanup.add(ctypes.CDataFinalizer(tc.acquire(i), tc.release));
   }
   trigger_gc(); // This should trigger some finalizations, hopefully all
 
   // Check that _something_ has been finalized
@@ -338,18 +336,17 @@ function test_result_dispose(size, tc, c
 }
 
 
 /**
  * Check that
  * - |dispose| is executed properly
  * - finalizers are not executed after |dispose|
  */
-function test_executing_dispose(size, tc, cleanup)
-{
+function test_executing_dispose(size, tc, cleanup) {
   dump("test_executing_dispose " + tc.name + "\n");
   let ref = [];
   // Allocate |size| items with references
   for (let i = 0; i < size; ++i) {
     let value = ctypes.CDataFinalizer(tc.acquire(i), tc.release);
     cleanup.add(value);
     ref.push(value);
   }
@@ -382,18 +379,17 @@ function test_executing_dispose(size, tc
 
 
 /**
  * Check that
  * - |forget| does not dispose
  * - |forget| has the right content
  * - finalizers are not executed after |forget|
  */
-function test_executing_forget(size, tc, cleanup)
-{
+function test_executing_forget(size, tc, cleanup) {
   dump("test_executing_forget " + tc.name + "\n");
   let ref = [];
   // Allocate |size| items with references
   for (let i = 0; i < size; ++i) {
     let original = tc.acquire(i);
     let finalizer = ctypes.CDataFinalizer(original, tc.release);
     ref.push(
       {
@@ -428,18 +424,17 @@ function test_executing_forget(size, tc,
 
   do_check_eq(count_finalized(size, tc), 0);
 }
 
 
 /**
  * Check that finalizers are not executed
  */
-function test_do_not_execute_finalizers_on_referenced_stuff(size, tc, cleanup)
-{
+function test_do_not_execute_finalizers_on_referenced_stuff(size, tc, cleanup) {
   dump("test_do_not_execute_finalizers_on_referenced_stuff " + tc.name + "\n");
 
   let ref = [];
   // Allocate |size| items without references
   for (let i = 0; i < size; ++i) {
     let value = ctypes.CDataFinalizer(tc.acquire(i), tc.release);
     cleanup.add(value);
     ref.push(value);
--- a/toolkit/components/ctypes/tests/unit/test_finalizer_shouldaccept.js
+++ b/toolkit/components/ctypes/tests/unit/test_finalizer_shouldaccept.js
@@ -5,18 +5,17 @@ try {
 } 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()
-{
+function run_test() {
   let library = open_ctypes_test_lib();
 
   let start = library.declare("test_finalizer_start", ctypes.default_abi,
                           ctypes.void_t,
                           ctypes.size_t);
   let stop = library.declare("test_finalizer_stop", ctypes.default_abi,
                              ctypes.void_t);
   let tester = new ResourceTester(start, stop);
@@ -58,35 +57,33 @@ function run_test()
   tester.launch(10, test_errno);
   tester.launch(10, test_to_pointer);
   tester.launch(10, test_readstring);
 }
 
 /**
  * Check that toString succeeds before/after forget/dispose.
  */
-function test_to_string()
-{
+function test_to_string() {
   do_print("Starting test_to_string");
   let a = ctypes.CDataFinalizer(acquire(0), dispose);
   do_check_eq(a.toString(), "0");
 
   a.forget();
   do_check_eq(a.toString(), "[CDataFinalizer - empty]");
 
   a = ctypes.CDataFinalizer(acquire(0), dispose);
   a.dispose();
   do_check_eq(a.toString(), "[CDataFinalizer - empty]");
 }
 
 /**
  * Check that toSource succeeds before/after forget/dispose.
  */
-function test_to_source()
-{
+function test_to_source() {
   do_print("Starting test_to_source");
   let value = acquire(0);
   let a = ctypes.CDataFinalizer(value, dispose);
   do_check_eq(a.toSource(),
               "ctypes.CDataFinalizer("
               + ctypes.size_t(value).toSource()
               + ", "
               + dispose.toSource()
@@ -99,18 +96,17 @@ function test_to_source()
   a = ctypes.CDataFinalizer(acquire(0), dispose);
   a.dispose();
   do_check_eq(a.toSource(), "ctypes.CDataFinalizer()");
 }
 
 /**
  * Test conversion to int32
  */
-function test_to_int()
-{
+function test_to_int() {
   let value = 2;
   let wrapped, converted, finalizable;
   wrapped = ctypes.int32_t(value);
   finalizable = ctypes.CDataFinalizer(acquire(value), dispose);
   converted = ctypes.int32_t(finalizable);
 
   structural_check_eq(converted, wrapped);
   structural_check_eq(converted, ctypes.int32_t(finalizable.forget()));
@@ -120,18 +116,17 @@ function test_to_int()
   converted = ctypes.int64_t(finalizable);
   structural_check_eq(converted, wrapped);
   finalizable.dispose();
 }
 
 /**
  * Test that dispose can change errno but finalization cannot
  */
-function test_errno(size, tc, cleanup)
-{
+function test_errno(size, tc, cleanup) {
   reset_errno();
   do_check_eq(ctypes.errno, 0);
 
   let finalizable = ctypes.CDataFinalizer(acquire(3), dispose_errno);
   finalizable.dispose();
   do_check_eq(ctypes.errno, 10);
   reset_errno();
 
@@ -143,32 +138,30 @@ function test_errno(size, tc, cleanup)
 
   trigger_gc();
   do_check_eq(ctypes.errno, 0);
 }
 
 /**
  * Check that a finalizable of a pointer can be used as a pointer
  */
-function test_to_pointer()
-{
+function test_to_pointer() {
   let ptr = ctypes.int32_t(2).address();
   let finalizable = ctypes.CDataFinalizer(ptr, dispose_ptr);
   let unwrapped = ctypes.int32_t.ptr(finalizable);
 
   do_check_eq("" + ptr, "" + unwrapped);
 
   finalizable.forget(); // Do not dispose: This is not a real pointer.
 }
 
 /**
  * Test that readstring can be applied to a finalizer
  */
-function test_readstring(size)
-{
+function test_readstring(size) {
   for (let i = 0; i < size; ++i) {
     let acquired = acquire_string(i);
     let finalizable = ctypes.CDataFinalizer(acquired,
       dispose_string);
     do_check_eq(finalizable.readString(), acquired.readString());
     finalizable.dispose();
   }
 }
--- a/toolkit/components/ctypes/tests/unit/test_finalizer_shouldfail.js
+++ b/toolkit/components/ctypes/tests/unit/test_finalizer_shouldfail.js
@@ -2,18 +2,17 @@ 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) {
 }
 
 var acquire, dispose, null_dispose, compare, dispose_64;
 
-function run_test()
-{
+function run_test() {
   let library = open_ctypes_test_lib();
 
   let start = library.declare("test_finalizer_start", ctypes.default_abi,
                           ctypes.void_t,
                           ctypes.size_t);
   let stop = library.declare("test_finalizer_stop", ctypes.default_abi,
                              ctypes.void_t);
   let tester = new ResourceTester(start, stop);
@@ -102,35 +101,33 @@ function test_double_dispose() {
   test_one_combination(2, call_forget, call_dispose);
   test_one_combination(3, call_forget, call_forget);
 }
 
 
 /**
  * Test that nothing (too) bad happens when the finalizer is NULL
  */
-function test_null_dispose()
-{
+function test_null_dispose() {
   let exception;
 
   exception = false;
   try {
     ctypes.CDataFinalizer(acquire(0), null_dispose);
   } catch (x) {
     exception = true;
   }
   do_check_true(exception);
 }
 
 /**
  * Test that conversion of a disposed/forgotten CDataFinalizer to a C
  * value fails nicely.
  */
-function test_pass_disposed()
-{
+function test_pass_disposed() {
   let exception, v;
 
   exception = false;
   v = ctypes.CDataFinalizer(acquire(0), dispose);
   do_check_true(compare(v, 0));
   v.forget();
 
   try {
@@ -156,18 +153,17 @@ function test_pass_disposed()
   try {
     ctypes.int32_t(ctypes.CDataFinalizer(v, dispose));
   } catch (x) {
     exception = true;
   }
   do_check_true(exception);
 }
 
-function test_wrong_type()
-{
+function test_wrong_type() {
   let int32_v = ctypes.int32_t(99);
   let exception;
   try {
     ctypes.CDataFinalizer(int32_v, dispose_64);
   } catch (x) {
     exception = x;
   }
 
--- a/toolkit/components/ctypes/tests/unit/test_jsctypes.js
+++ b/toolkit/components/ctypes/tests/unit/test_jsctypes.js
@@ -8,18 +8,17 @@ try {
   // harness to give us the 'ctypes' object.
   Components.utils.import("resource://gre/modules/ctypes.jsm");
 } catch (e) {
 }
 
 const CTYPES_TEST_LIB = ctypes.libraryName("jsctypes-test");
 const CTYPES_UNICODE_LIB = ctypes.libraryName("jsctyp\u00E8s-t\u00EB\u00DFt");
 
-function do_check_throws(f, type, stack)
-{
+function do_check_throws(f, type, stack) {
   if (!stack) {
     try {
       // We might not have a 'Components' object.
       stack = Components.stack.caller;
     } catch (e) {
     }
   }
 
@@ -30,18 +29,17 @@ function do_check_throws(f, type, stack)
       do_check_true(true);
       return;
     }
     do_throw("expected " + type.name + " exception, caught " + exc, stack);
   }
   do_throw("expected " + type.name + " exception, none thrown", stack);
 }
 
-function run_test()
-{
+function run_test() {
   // Test ctypes.CType and ctypes.CData are set up correctly.
   run_abstract_class_tests();
 
   // open the library
   let libfile = do_get_file(CTYPES_TEST_LIB);
   let library = ctypes.open(libfile.path);
 
   // Make sure we can call a function in the library.
@@ -213,18 +211,17 @@ function run_test()
     libfile.copyTo(null, unicodefile.leafName);
   library = ctypes.open(unicodefile.path);
   run_void_tests(library);
   library.close();
   if (copy)
     unicodefile.remove(false);
 }
 
-function run_abstract_class_tests()
-{
+function run_abstract_class_tests() {
   // Test that ctypes.CType is an abstract constructor that throws.
   do_check_throws(function() { ctypes.CType(); }, TypeError);
   do_check_throws(function() { new ctypes.CType() }, TypeError);
 
   do_check_true(ctypes.CType.hasOwnProperty("prototype"));
   do_check_throws(function() { ctypes.CType.prototype(); }, TypeError);
   do_check_throws(function() { new ctypes.CType.prototype() }, TypeError);
 
@@ -715,18 +712,17 @@ function offsetof(struct, member) {
   let chararray = ctypes.cast(instance, ctypes.char.array(struct.size));
   let offset = 0;
   while (memberptr != ptrValue(chararray.addressOfElement(offset)))
     ++offset;
   return offset;
 }
 
 // Test the class and prototype hierarchy for a given basic type 't'.
-function run_basic_class_tests(t)
-{
+function run_basic_class_tests(t) {
   do_check_true(t.__proto__ === ctypes.CType.prototype);
   do_check_true(t instanceof ctypes.CType);
 
   do_check_true(t.prototype.__proto__ === ctypes.CData.prototype);
   do_check_true(t.prototype instanceof ctypes.CData);
   do_check_true(t.prototype.constructor === t);
 
   // Check that the shared properties and functions on 't.prototype' throw.
@@ -946,18 +942,17 @@ function run_float_tests(library, t, nam
   // don't convert anything else
   let vals = [true, false, null, undefined, "", "0", {}, [], new Number(16),
               {toString() { return 7; }},
               {valueOf() { return 7; }}];
   for (let i = 0; i < vals.length; i++)
     do_check_throws(function() { d.value = vals[i]; }, TypeError);
 
   // Check that values roundtrip through toSource() correctly.
-  function test_roundtrip(tFn, val)
-  {
+  function test_roundtrip(tFn, val) {
     let f1 = tFn(val);
     eval("var f2 = " + f1.toSource());
     do_check_eq(f1.value, f2.value);
   }
   vals = [Infinity, -Infinity, -0, 0, 1, -1, 1 / 3, -1 / 3, 1 / 4, -1 / 4,
           1e-14, -1e-14, 0xfffffffffffff000, -0xfffffffffffff000];
   for (let i = 0; i < vals.length; i++)
     test_roundtrip(t, vals[i]);
@@ -1255,18 +1250,17 @@ function run_char16_tests(library, t, na
         0, 0, 0, 0, 0, 0, 0, 0, 0,
         0 ],
       [ 1, 1, 1, 1, 1, 1, 1, 1, 1,
         1, 1, 1, 1, 1, 1, 1, 1, 1,
         18 ] ]);
 }
 
 // Test the class and prototype hierarchy for a given type constructor 'c'.
-function run_type_ctor_class_tests(c, t, t2, props = [], fns = [], instanceProps = [], instanceFns = [], specialProps = [])
-{
+function run_type_ctor_class_tests(c, t, t2, props = [], fns = [], instanceProps = [], instanceFns = [], specialProps = []) {
   do_check_true(c.prototype.__proto__ === ctypes.CType.prototype);
   do_check_true(c.prototype instanceof ctypes.CType);
   do_check_true(c.prototype.constructor === c);
 
   // Check that 'c.prototype' has the correct properties and functions.
   for (let p of props)
     do_check_true(c.prototype.hasOwnProperty(p));
   for (let f of fns)
@@ -2076,79 +2070,79 @@ function run_type_toString_tests() {
   var haveWinAPIABI;
   try {
       c.FunctionType(c.winapi_abi, c.int);
       haveWinAPIABI = true;
   } catch (x) {
       haveWinAPIABI = false;
   }
 
-  do_check_eq(c.char.toString(),        "type char");
-  do_check_eq(c.short.toString(),       "type short");
-  do_check_eq(c.int.toString(),         "type int");
-  do_check_eq(c.long.toString(),        "type long");
-  do_check_eq(c.long_long.toString(),   "type long_long");
-  do_check_eq(c.ssize_t.toString(),     "type ssize_t");
-  do_check_eq(c.int8_t.toString(),      "type int8_t");
-  do_check_eq(c.int16_t.toString(),     "type int16_t");
-  do_check_eq(c.int32_t.toString(),     "type int32_t");
-  do_check_eq(c.int64_t.toString(),     "type int64_t");
-  do_check_eq(c.intptr_t.toString(),    "type intptr_t");
-
-  do_check_eq(c.unsigned_char.toString(),       "type unsigned_char");
-  do_check_eq(c.unsigned_short.toString(),      "type unsigned_short");
-  do_check_eq(c.unsigned_int.toString(),        "type unsigned_int");
-  do_check_eq(c.unsigned_long.toString(),       "type unsigned_long");
-  do_check_eq(c.unsigned_long_long.toString(),  "type unsigned_long_long");
-  do_check_eq(c.size_t.toString(),              "type size_t");
-  do_check_eq(c.uint8_t.toString(),             "type uint8_t");
-  do_check_eq(c.uint16_t.toString(),            "type uint16_t");
-  do_check_eq(c.uint32_t.toString(),            "type uint32_t");
-  do_check_eq(c.uint64_t.toString(),            "type uint64_t");
-  do_check_eq(c.uintptr_t.toString(),           "type uintptr_t");
-
-  do_check_eq(c.float.toString(),               "type float");
-  do_check_eq(c.double.toString(),              "type double");
-  do_check_eq(c.bool.toString(),                "type bool");
-  do_check_eq(c.void_t.toString(),              "type void");
-  do_check_eq(c.voidptr_t.toString(),           "type void*");
-  do_check_eq(c.char16_t.toString(),            "type char16_t");
+  do_check_eq(c.char.toString(), "type char");
+  do_check_eq(c.short.toString(), "type short");
+  do_check_eq(c.int.toString(), "type int");
+  do_check_eq(c.long.toString(), "type long");
+  do_check_eq(c.long_long.toString(), "type long_long");
+  do_check_eq(c.ssize_t.toString(), "type ssize_t");
+  do_check_eq(c.int8_t.toString(), "type int8_t");
+  do_check_eq(c.int16_t.toString(), "type int16_t");
+  do_check_eq(c.int32_t.toString(), "type int32_t");
+  do_check_eq(c.int64_t.toString(), "type int64_t");
+  do_check_eq(c.intptr_t.toString(), "type intptr_t");
+
+  do_check_eq(c.unsigned_char.toString(), "type unsigned_char");
+  do_check_eq(c.unsigned_short.toString(), "type unsigned_short");
+  do_check_eq(c.unsigned_int.toString(), "type unsigned_int");
+  do_check_eq(c.unsigned_long.toString(), "type unsigned_long");
+  do_check_eq(c.unsigned_long_long.toString(), "type unsigned_long_long");
+  do_check_eq(c.size_t.toString(), "type size_t");
+  do_check_eq(c.uint8_t.toString(), "type uint8_t");
+  do_check_eq(c.uint16_t.toString(), "type uint16_t");
+  do_check_eq(c.uint32_t.toString(), "type uint32_t");
+  do_check_eq(c.uint64_t.toString(), "type uint64_t");
+  do_check_eq(c.uintptr_t.toString(), "type uintptr_t");
+
+  do_check_eq(c.float.toString(), "type float");
+  do_check_eq(c.double.toString(), "type double");
+  do_check_eq(c.bool.toString(), "type bool");
+  do_check_eq(c.void_t.toString(), "type void");
+  do_check_eq(c.voidptr_t.toString(), "type void*");
+  do_check_eq(c.char16_t.toString(), "type char16_t");
 
   var simplestruct = c.StructType("simplestruct", [{"smitty":c.voidptr_t}]);
-  do_check_eq(simplestruct.toString(),          "type simplestruct");
+  do_check_eq(simplestruct.toString(), "type simplestruct");
 
   // One type modifier, int base type.
-  do_check_eq(c.int.ptr.toString(),                                     "type int*");
-  do_check_eq(c.ArrayType(c.int).toString(),                            "type int[]");
-  do_check_eq(c.ArrayType(c.int, 4).toString(),                         "type int[4]");
-  do_check_eq(c.FunctionType(c.default_abi, c.int).toString(),          "type int()");
+  do_check_eq(c.int.ptr.toString(), "type int*");
+  do_check_eq(c.ArrayType(c.int).toString(), "type int[]");
+  do_check_eq(c.ArrayType(c.int, 4).toString(), "type int[4]");
+  do_check_eq(c.FunctionType(c.default_abi, c.int).toString(), "type int()");
   do_check_eq(c.FunctionType(c.default_abi, c.int, [c.bool]).toString(), "type int(bool)");
   do_check_eq(c.FunctionType(c.default_abi, c.int, [c.bool, c.short]).toString(),
                                                                         "type int(bool, short)");
   if (haveStdCallABI)
-     do_check_eq(c.FunctionType(c.stdcall_abi, c.int).toString(),       "type int __stdcall()");
+     do_check_eq(c.FunctionType(c.stdcall_abi, c.int).toString(), "type int __stdcall()");
   if (haveWinAPIABI)
-     do_check_eq(c.FunctionType(c.winapi_abi, c.int).toString(),        "type int WINAPI()");
+     do_check_eq(c.FunctionType(c.winapi_abi, c.int).toString(), "type int WINAPI()");
 
   // One type modifier, struct base type.
-  do_check_eq(simplestruct.ptr.toString(),                              "type simplestruct*");
-  do_check_eq(c.ArrayType(simplestruct).toString(),                     "type simplestruct[]");
-  do_check_eq(c.ArrayType(simplestruct, 4).toString(),                  "type simplestruct[4]");
-  do_check_eq(c.FunctionType(c.default_abi, simplestruct).toString(),   "type simplestruct()");
+  do_check_eq(simplestruct.ptr.toString(), "type simplestruct*");
+  do_check_eq(c.ArrayType(simplestruct).toString(), "type simplestruct[]");
+  do_check_eq(c.ArrayType(simplestruct, 4).toString(), "type simplestruct[4]");
+  do_check_eq(c.FunctionType(c.default_abi, simplestruct).toString(), "type simplestruct()");
 
   // Two levels of type modifiers, int base type.
-  do_check_eq(c.int.ptr.ptr.toString(),                                 "type int**");
-  do_check_eq(c.ArrayType(c.int.ptr).toString(),                        "type int*[]");
-  do_check_eq(c.FunctionType(c.default_abi, c.int.ptr).toString(),      "type int*()");
-
-  do_check_eq(c.ArrayType(c.int).ptr.toString(),                        "type int(*)[]");
-  do_check_eq(c.ArrayType(c.ArrayType(c.int, 4)).toString(),            "type int[][4]");
+  do_check_eq(c.int.ptr.ptr.toString(), "type int**");
+  do_check_eq(c.ArrayType(c.int.ptr).toString(), "type int*[]");
+  do_check_eq(c.FunctionType(c.default_abi, c.int.ptr).toString(), "type int*()");
+
+  do_check_eq(c.ArrayType(c.int).ptr.toString(), "type int(*)[]");
+  do_check_eq(c.ArrayType(c.ArrayType(c.int, 4)).toString(), "type int[][4]");
   // Functions can't return arrays.
 
-  do_check_eq(c.FunctionType(c.default_abi, c.int).ptr.toString(),      "type int(*)()");
+  do_check_eq(c.FunctionType(c.default_abi, c.int).ptr.toString(), "type int(*)()");
   // You can't have an array of functions.
   // Functions can't return functions.
 
   // We don't try all the permissible three-deep combinations, but this is fun.
   do_check_eq(c.FunctionType(c.default_abi, c.FunctionType(c.default_abi, c.int).ptr).toString(),
                                                                         "type int(*())()");
 }
 
@@ -2310,30 +2304,30 @@ function run_readstring_tests(library) {
   mixed_string[8] = 0xB4;
   mixed_string[9] = 0xD9;
   mixed_string[10] = 0x74;
   mixed_string[11] = 0x65;
   mixed_string[12] = 0x73;
   mixed_string[13] = 0x74;
   mixed_string[14] = 0x00;
   let mixed_result = mixed_string.readStringReplaceMalformed();
-  do_check_eq(0x74,   mixed_result.charCodeAt(0));
-  do_check_eq(0x65,   mixed_result.charCodeAt(1));
-  do_check_eq(0x73,   mixed_result.charCodeAt(2));
-  do_check_eq(0x74,   mixed_result.charCodeAt(3));
+  do_check_eq(0x74, mixed_result.charCodeAt(0));
+  do_check_eq(0x65, mixed_result.charCodeAt(1));
+  do_check_eq(0x73, mixed_result.charCodeAt(2));
+  do_check_eq(0x74, mixed_result.charCodeAt(3));
   do_check_eq(0xFFFD, mixed_result.charCodeAt(4));
   do_check_eq(0xFFFD, mixed_result.charCodeAt(5));
   do_check_eq(0xFFFD, mixed_result.charCodeAt(6));
   do_check_eq(0xFFFD, mixed_result.charCodeAt(7));
   do_check_eq(0xFFFD, mixed_result.charCodeAt(8));
   do_check_eq(0xFFFD, mixed_result.charCodeAt(9));
-  do_check_eq(0x74,   mixed_result.charCodeAt(10));
-  do_check_eq(0x65,   mixed_result.charCodeAt(11));
-  do_check_eq(0x73,   mixed_result.charCodeAt(12));
-  do_check_eq(0x74,   mixed_result.charCodeAt(13));
+  do_check_eq(0x74, mixed_result.charCodeAt(10));
+  do_check_eq(0x65, mixed_result.charCodeAt(11));
+  do_check_eq(0x73, mixed_result.charCodeAt(12));
+  do_check_eq(0x74, mixed_result.charCodeAt(13));
 
   // Test of all posible invalid encoded sequence
   let invalid_string = ctypes.unsigned_char.array(27)();
   invalid_string[0] = 0x80;  // 10000000
   invalid_string[1] = 0xD0;  // 11000000 01110100
   invalid_string[2] = 0x74;
   invalid_string[3] = 0xE0;  // 11100000 01110100
   invalid_string[4] = 0x74;
@@ -2357,36 +2351,36 @@ function run_readstring_tests(library) {
   invalid_string[22] = 0x80;
   invalid_string[23] = 0x74;
   invalid_string[24] = 0xF0; // 11110000 01110100
   invalid_string[25] = 0x74;
   invalid_string[26] = 0x00;
   let invalid_result = invalid_string.readStringReplaceMalformed();
   do_check_eq(0xFFFD, invalid_result.charCodeAt(0));  // 10000000
   do_check_eq(0xFFFD, invalid_result.charCodeAt(1));  // 11000000 01110100
-  do_check_eq(0x74,   invalid_result.charCodeAt(2));
+  do_check_eq(0x74, invalid_result.charCodeAt(2));
   do_check_eq(0xFFFD, invalid_result.charCodeAt(3));  // 11100000 01110100
-  do_check_eq(0x74,   invalid_result.charCodeAt(4));
+  do_check_eq(0x74, invalid_result.charCodeAt(4));
   do_check_eq(0xFFFD, invalid_result.charCodeAt(5));  // 11100000 10100000 01110100
-  do_check_eq(0x74,   invalid_result.charCodeAt(6));
+  do_check_eq(0x74, invalid_result.charCodeAt(6));
   do_check_eq(0xFFFD, invalid_result.charCodeAt(7));  // 11100000 10000000 01110100
   do_check_eq(0xFFFD, invalid_result.charCodeAt(8));
-  do_check_eq(0x74,   invalid_result.charCodeAt(9));
+  do_check_eq(0x74, invalid_result.charCodeAt(9));
   do_check_eq(0xFFFD, invalid_result.charCodeAt(10)); // 11110000 01110100
-  do_check_eq(0x74,   invalid_result.charCodeAt(11));
+  do_check_eq(0x74, invalid_result.charCodeAt(11));
   do_check_eq(0xFFFD, invalid_result.charCodeAt(12)); // 11110000 10010000 01110100
-  do_check_eq(0x74,   invalid_result.charCodeAt(13));
+  do_check_eq(0x74, invalid_result.charCodeAt(13));
   do_check_eq(0xFFFD, invalid_result.charCodeAt(14)); // 11110000 10010000 10000000 01110100
-  do_check_eq(0x74,   invalid_result.charCodeAt(15));
+  do_check_eq(0x74, invalid_result.charCodeAt(15));
   do_check_eq(0xFFFD, invalid_result.charCodeAt(16)); // 11110000 10000000 10000000 01110100
   do_check_eq(0xFFFD, invalid_result.charCodeAt(17));
   do_check_eq(0xFFFD, invalid_result.charCodeAt(18));
-  do_check_eq(0x74,   invalid_result.charCodeAt(19));
+  do_check_eq(0x74, invalid_result.charCodeAt(19));
   do_check_eq(0xFFFD, invalid_result.charCodeAt(20)); // 11110000 01110100
-  do_check_eq(0x74,   invalid_result.charCodeAt(21));
+  do_check_eq(0x74, invalid_result.charCodeAt(21));
 
   // Test decoding of UTF-8 and CESU-8
   let utf8_cesu8_string = ctypes.unsigned_char.array(10)();
   utf8_cesu8_string[0] = 0xF0;  // U+10400 in UTF-8
   utf8_cesu8_string[1] = 0x90;
   utf8_cesu8_string[2] = 0x90;
   utf8_cesu8_string[3] = 0x80;
   utf8_cesu8_string[4] = 0xED;  // U+10400 in CESU-8
@@ -2456,18 +2450,17 @@ function run_struct_tests(library) {
 
   // test passing a struct by pointer
   let test_init_pt = library.declare("test_init_pt", ctypes.default_abi, ctypes.void_t, point_t.ptr, ctypes.int32_t, ctypes.int32_t);
   test_init_pt(pt1.address(), 9, 10);
   do_check_eq(pt1.x, 9);
   do_check_eq(pt1.y, 10);
 }
 
-function run_small_struct_test(library, rect_t, bytes)
-{
+function run_small_struct_test(library, rect_t, bytes) {
   let fields = [];
   for (let i = 0; i < bytes; ++i) {
     let field = {};
     field["f" + i] = ctypes.uint8_t;
     fields.push(field);
   }
   const small_t = new ctypes.StructType("SMALL", fields);
 
@@ -2478,18 +2471,17 @@ function run_small_struct_test(library, 
   let j = 0;
   for (let i = 0; i < bytes; ++i) {
     do_check_eq(ret["f" + i], exp[j]);
     if (++j == 4)
       j = 0;
   }
 }
 
-function run_function_tests(library)
-{
+function run_function_tests(library) {
   let test_ansi_len = library.declare("test_ansi_len", ctypes.default_abi,
     ctypes.int32_t, ctypes.char.ptr);
   let fn_t = ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t,
     [ ctypes.char.ptr ]).ptr;
 
   let test_fnptr = library.declare("test_fnptr", ctypes.default_abi, fn_t);
 
   // Test that the value handed back by test_fnptr matches the function pointer
@@ -2529,38 +2521,34 @@ function run_function_tests(library)
   do_check_true(test_ansi_len_2.constructor === fn_t);
   do_check_eq(ptrValue(test_ansi_len), ptrValue(test_ansi_len_2));
 /* disabled temporarily per bug 598225.
   do_check_throws(function() { test_ansi_len_2.value = null; }, Error);
   do_check_eq(ptrValue(test_ansi_len_2), ptrValue(ptr));
 */
 }
 
-function run_closure_tests(library)
-{
+function run_closure_tests(library) {
   run_single_closure_tests(library, ctypes.default_abi, "cdecl");
   if ("winLastError" in ctypes) {
     run_single_closure_tests(library, ctypes.stdcall_abi, "stdcall");
 
     // Check that attempting to construct a ctypes.winapi_abi closure throws.
-    function closure_fn()
-    {
+    function closure_fn() {
       return 1;
     }
     let fn_t = ctypes.FunctionType(ctypes.winapi_abi, ctypes.int32_t, []).ptr;
     do_check_throws(function() { fn_t(closure_fn) }, Error);
   }
 }
 
-function run_single_closure_tests(library, abi, suffix)
-{
+function run_single_closure_tests(library, abi, suffix) {
   let b = 23;
 
-  function closure_fn(i)
-  {
+  function closure_fn(i) {
     if (i == 42)
       throw "7.5 million years for that?";
     return "a" in this ? i + this.a : i + b;
   }
 
   do_check_eq(closure_fn(7), 7 + b);
   let thisobj = { a: 5 };
   do_check_eq(closure_fn.call(thisobj, 7), 7 + thisobj.a);
@@ -2584,18 +2572,17 @@ function run_single_closure_tests(librar
   let closure3 = fn_t(closure_fn, null, 54);
   do_check_eq(closure3(42), 54);
   do_check_eq(test_closure(42, closure3), 54);
 
   // Check what happens when the return type is bigger than a word.
   var fn_64_t = ctypes.FunctionType(ctypes.default_abi, ctypes.uint64_t, [ctypes.bool]).ptr;
   var bignum1 = ctypes.UInt64.join(0xDEADBEEF, 0xBADF00D);
   var bignum2 = ctypes.UInt64.join(0xDEFEC8ED, 0xD15EA5E);
-  function closure_fn_64(fail)
-  {
+  function closure_fn_64(fail) {
     if (fail)
       throw "Just following orders, sir!";
     return bignum1;
   }
   var closure64 = fn_64_t(closure_fn_64, null, bignum2);
   do_check_eq(ctypes.UInt64.compare(closure64(false), bignum1), 0);
   do_check_eq(ctypes.UInt64.compare(closure64(true), bignum2), 0);
 
@@ -2707,18 +2694,17 @@ function run_variadic_tests(library) {
   let sum_notva_type = ctypes.FunctionType(sum_va_type.targetType.abi,
                                            sum_va_type.targetType.returnType,
                                            [ctypes.uint8_t]).ptr;
   do_check_throws(function() {
     sum_va_type().value = sum_notva_type();
   }, TypeError);
 }
 
-function run_static_data_tests(library)
-{
+function run_static_data_tests(library) {
   const rect_t = new ctypes.StructType("myRECT",
                        [{ top   : ctypes.int32_t },
                         { left  : ctypes.int32_t },
                         { bottom: ctypes.int32_t },
                         { right : ctypes.int32_t }]);
 
   let data_rect = library.declare("data_rect", rect_t);
 
@@ -2743,18 +2729,17 @@ function run_static_data_tests(library)
   let data_rect_2 = library.declare("data_rect", rect_t);
   do_check_eq(data_rect_2.top, 9);
   do_check_eq(data_rect_2.left, 8);
   do_check_eq(data_rect_2.bottom, -11);
   do_check_eq(data_rect_2.right, -12);
   do_check_eq(ptrValue(data_rect.address()), ptrValue(data_rect_2.address()));
 }
 
-function run_cpp_class_tests(library)
-{
+function run_cpp_class_tests(library) {
   // try the gcc mangling, unless we're using MSVC.
   let OS = get_os();
   let ctor_symbol;
   let add_symbol;
   let abi;
   if (OS == "WINNT") {
     // for compatibility for Win32 vs Win64
     abi = ctypes.thiscall_abi;
@@ -2780,18 +2765,17 @@ function run_cpp_class_tests(library)
   let test_class_add = library.declare(add_symbol, abi, ctypes.int32_t,
                                        ctypes.int32_t.ptr, ctypes.int32_t);
   let j = test_class_add(i.address(), 5);
   do_check_eq(j, 13);
   do_check_eq(i.value, 13);
 }
 
 // bug 522360 - try loading system library without full path
-function run_load_system_library()
-{
+function run_load_system_library() {
   let syslib;
   let OS = get_os();
   if (OS == "WINNT") {
     syslib = ctypes.open("user32.dll");
   } else if (OS == "Darwin") {
     syslib = ctypes.open("libm.dylib");
   } else if (OS == "Linux" || OS == "Android" || OS.match(/BSD$/)) {
     try {
--- a/toolkit/components/downloads/test/unit/head_download_manager.js
+++ b/toolkit/components/downloads/test/unit/head_download_manager.js
@@ -12,15 +12,14 @@ var Cr = Components.results;
 do_get_profile();
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://testing-common/httpd.js");
 XPCOMUtils.defineLazyModuleGetter(this, "Promise",
                                   "resource://gre/modules/Promise.jsm");
 
-function createURI(aObj)
-{
+function createURI(aObj) {
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
   return (aObj instanceof Ci.nsIFile) ? ios.newFileURI(aObj) :
                                         ios.newURI(aObj, null, null);
 }
--- a/toolkit/components/downloads/test/unit/tail_download_manager.js
+++ b/toolkit/components/downloads/test/unit/tail_download_manager.js
@@ -7,17 +7,16 @@
 /**
  * Provides infrastructure for automated download components tests.
  */
 
 "use strict";
 
 // Termination functions common to all tests
 
-add_task(function* test_common_terminate()
-{
+add_task(function* test_common_terminate() {
   // Stop the HTTP server.  We must do this inside a task in "tail.js" until the
   // xpcshell testing framework supports asynchronous termination functions.
   let deferred = Promise.defer();
   gHttpServer.stop(deferred.resolve);
   yield deferred.promise;
 });
 
--- a/toolkit/components/downloads/test/unit/test_app_rep_maclinux.js
+++ b/toolkit/components/downloads/test/unit/test_app_rep_maclinux.js
@@ -60,23 +60,21 @@ function registerTableUpdate(aTable, aFi
                        "application/vnd.google.safebrowsing-update", false);
     response.setStatusLine(request.httpVersion, 200, "OK");
     response.bodyOutputStream.write(contents, contents.length);
   });
 }
 
 // Tests
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function test_setup()
-{
+add_task(function test_setup() {
   // Wait 10 minutes, that is half of the external xpcshell timeout.
   do_timeout(10 * 60 * 1000, function() {
     if (gStillRunning) {
       do_throw("Test timed out.");
     }
   });
   // Set up a local HTTP server to return bad verdicts.
   Services.prefs.setCharPref(appRepURLPref,
@@ -205,62 +203,57 @@ function promiseQueryReputation(query, e
     do_check_eq(Cr.NS_OK, aStatus);
     do_check_eq(aShouldBlock, expectedShouldBlock);
     deferred.resolve(true);
   }
   gAppRep.queryReputation(query, onComplete);
   return deferred.promise;
 }
 
-add_task(function* ()
-{
+add_task(function* () {
   // Wait for Safebrowsing local list updates to complete.
   yield waitForUpdates();
 });
 
-add_task(function* test_blocked_binary()
-{
+add_task(function* test_blocked_binary() {
   // We should reach the remote server for a verdict.
   Services.prefs.setBoolPref(remoteEnabledPref,
                              true);
   Services.prefs.setCharPref(appRepURLPref,
                              "http://localhost:4444/download");
   // evil.com should return a malware verdict from the remote server.
   yield promiseQueryReputation({sourceURI: createURI("http://evil.com"),
                                 suggestedFileName: "noop.bat",
                                 fileSize: 12}, true);
 });
 
-add_task(function* test_non_binary()
-{
+add_task(function* test_non_binary() {
   // We should not reach the remote server for a verdict for non-binary files.
   Services.prefs.setBoolPref(remoteEnabledPref,
                              true);
   Services.prefs.setCharPref(appRepURLPref,
                              "http://localhost:4444/throw");
   yield promiseQueryReputation({sourceURI: createURI("http://evil.com"),
                                 suggestedFileName: "noop.txt",
                                 fileSize: 12}, false);
 });
 
-add_task(function* test_good_binary()
-{
+add_task(function* test_good_binary() {
   // We should reach the remote server for a verdict.
   Services.prefs.setBoolPref(remoteEnabledPref,
                              true);
   Services.prefs.setCharPref(appRepURLPref,
                              "http://localhost:4444/download");
   // mozilla.com should return a not-guilty verdict from the remote server.
   yield promiseQueryReputation({sourceURI: createURI("http://mozilla.com"),
                                 suggestedFileName: "noop.bat",
                                 fileSize: 12}, false);
 });
 
-add_task(function* test_disabled()
-{
+add_task(function* test_disabled() {
   // Explicitly disable remote checks
   Services.prefs.setBoolPref(remoteEnabledPref,
                              false);
   Services.prefs.setCharPref(appRepURLPref,
                              "http://localhost:4444/throw");
   let query = {sourceURI: createURI("http://example.com"),
                suggestedFileName: "noop.bat",
                fileSize: 12};
@@ -271,18 +264,17 @@ add_task(function* test_disabled()
       do_check_eq(Cr.NS_ERROR_NOT_AVAILABLE, aStatus);
       do_check_false(aShouldBlock);
       deferred.resolve(true);
     }
   );
   yield deferred.promise;
 });
 
-add_task(function* test_disabled_through_lists()
-{
+add_task(function* test_disabled_through_lists() {
   Services.prefs.setBoolPref(remoteEnabledPref,
                              false);
   Services.prefs.setCharPref(appRepURLPref,
                              "http://localhost:4444/download");
   Services.prefs.setCharPref("urlclassifier.downloadBlockTable", "");
   let query = {sourceURI: createURI("http://example.com"),
                suggestedFileName: "noop.bat",
                fileSize: 12};
@@ -292,12 +284,11 @@ add_task(function* test_disabled_through
       // We should be getting NS_ERROR_NOT_AVAILABLE if the service is disabled
       do_check_eq(Cr.NS_ERROR_NOT_AVAILABLE, aStatus);
       do_check_false(aShouldBlock);
       deferred.resolve(true);
     }
   );
   yield deferred.promise;
 });
-add_task(function* test_teardown()
-{
+add_task(function* test_teardown() {
   gStillRunning = false;
 });
--- a/toolkit/components/downloads/test/unit/test_app_rep_windows.js
+++ b/toolkit/components/downloads/test/unit/test_app_rep_windows.js
@@ -74,24 +74,22 @@ function readFileToString(aFilename) {
  *
  * @return {Promise}
  * @resolves When onSaveComplete is called with a success code.
  * @rejects With an exception, if onSaveComplete is called with a failure code.
  */
 function promiseSaverComplete(aSaver, aOnTargetChangeFn) {
   let deferred = Promise.defer();
   aSaver.observer = {
-    onTargetChange: function BFSO_onSaveComplete(unused, aTarget)
-    {
+    onTargetChange: function BFSO_onSaveComplete(unused, aTarget) {
       if (aOnTargetChangeFn) {
         aOnTargetChangeFn(aTarget);
       }
     },
-    onSaveComplete: function BFSO_onSaveComplete(unused, aStatus)
-    {
+    onSaveComplete: function BFSO_onSaveComplete(unused, aStatus) {
       if (Components.isSuccessCode(aStatus)) {
         deferred.resolve();
       } else {
         deferred.reject(new Components.Exception("Saver failed.", aStatus));
       }
     },
   };
   return deferred.promise;
@@ -115,18 +113,17 @@ function promiseCopyToSaver(aSourceStrin
   let deferred = Promise.defer();
   let inputStream = new StringInputStream(aSourceString, aSourceString.length);
   let copier = Cc["@mozilla.org/network/async-stream-copier;1"]
                .createInstance(Ci.nsIAsyncStreamCopier);
   copier.init(inputStream, aSaverOutputStream, null, false, true, 0x8000, true,
               aCloseWhenDone);
   copier.asyncCopy({
     onStartRequest() { },
-    onStopRequest(aRequest, aContext, aStatusCode)
-    {
+    onStopRequest(aRequest, aContext, aStatusCode) {
       if (Components.isSuccessCode(aStatusCode)) {
         deferred.resolve();
       } else {
         deferred.reject(new Components.Exception(aResult));
       }
     },
   }, null);
   return deferred.promise;
@@ -156,23 +153,21 @@ function registerTableUpdate(aTable, aFi
                        "application/vnd.google.safebrowsing-update", false);
     response.setStatusLine(request.httpVersion, 200, "OK");
     response.bodyOutputStream.write(contents, contents.length);
   });
 }
 
 // Tests
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_setup()
-{
+add_task(function* test_setup() {
   // Wait 10 minutes, that is half of the external xpcshell timeout.
   do_timeout(10 * 60 * 1000, function() {
     if (gStillRunning) {
       do_throw("Test timed out.");
     }
   });
   // Set up a local HTTP server to return bad verdicts.
   Services.prefs.setCharPref(appRepURLPref,
@@ -305,24 +300,22 @@ function promiseQueryReputation(query, e
     do_check_eq(Cr.NS_OK, aStatus);
     do_check_eq(aShouldBlock, expectedShouldBlock);
     deferred.resolve(true);
   }
   gAppRep.queryReputation(query, onComplete);
   return deferred.promise;
 }
 
-add_task(function* ()
-{
+add_task(function* () {
   // Wait for Safebrowsing local list updates to complete.
   yield waitForUpdates();
 });
 
-add_task(function* test_signature_whitelists()
-{
+add_task(function* test_signature_whitelists() {
   // We should never get to the remote server.
   Services.prefs.setBoolPref(remoteEnabledPref,
                              true);
   Services.prefs.setCharPref(appRepURLPref,
                              "http://localhost:4444/throw");
 
   // Use BackgroundFileSaver to extract the signature on Windows.
   let destFile = getTempFile(TEST_FILE_NAME_1);
@@ -342,56 +335,52 @@ add_task(function* test_signature_whitel
 
   // evil.com is not on the allowlist, but this binary is signed by an entity
   // whose certificate information is on the allowlist.
   yield promiseQueryReputation({sourceURI: createURI("http://evil.com"),
                                 signatureInfo: saver.signatureInfo,
                                 fileSize: 12}, false);
 });
 
-add_task(function* test_blocked_binary()
-{
+add_task(function* test_blocked_binary() {
   // We should reach the remote server for a verdict.
   Services.prefs.setBoolPref(remoteEnabledPref,
                              true);
   Services.prefs.setCharPref(appRepURLPref,
                              "http://localhost:4444/download");
   // evil.com should return a malware verdict from the remote server.
   yield promiseQueryReputation({sourceURI: createURI("http://evil.com"),
                                 suggestedFileName: "noop.bat",
                                 fileSize: 12}, true);
 });
 
-add_task(function* test_non_binary()
-{
+add_task(function* test_non_binary() {
   // We should not reach the remote server for a verdict for non-binary files.
   Services.prefs.setBoolPref(remoteEnabledPref,
                              true);
   Services.prefs.setCharPref(appRepURLPref,
                              "http://localhost:4444/throw");
   yield promiseQueryReputation({sourceURI: createURI("http://evil.com"),
                                 suggestedFileName: "noop.txt",
                                 fileSize: 12}, false);
 });
 
-add_task(function* test_good_binary()
-{
+add_task(function* test_good_binary() {
   // We should reach the remote server for a verdict.
   Services.prefs.setBoolPref(remoteEnabledPref,
                              true);
   Services.prefs.setCharPref(appRepURLPref,
                              "http://localhost:4444/download");
   // mozilla.com should return a not-guilty verdict from the remote server.
   yield promiseQueryReputation({sourceURI: createURI("http://mozilla.com"),
                                 suggestedFileName: "noop.bat",
                                 fileSize: 12}, false);
 });
 
-add_task(function* test_disabled()
-{
+add_task(function* test_disabled() {
   // Explicitly disable remote checks
   Services.prefs.setBoolPref(remoteEnabledPref,
                              false);
   Services.prefs.setCharPref(appRepURLPref,
                              "http://localhost:4444/throw");
   let query = {sourceURI: createURI("http://example.com"),
                suggestedFileName: "noop.bat",
                fileSize: 12};
@@ -402,18 +391,17 @@ add_task(function* test_disabled()
       do_check_eq(Cr.NS_ERROR_NOT_AVAILABLE, aStatus);
       do_check_false(aShouldBlock);
       deferred.resolve(true);
     }
   );
   yield deferred.promise;
 });
 
-add_task(function* test_disabled_through_lists()
-{
+add_task(function* test_disabled_through_lists() {
   Services.prefs.setBoolPref(remoteEnabledPref,
                              false);
   Services.prefs.setCharPref(appRepURLPref,
                              "http://localhost:4444/download");
   Services.prefs.setCharPref("urlclassifier.downloadBlockTable", "");
   let query = {sourceURI: createURI("http://example.com"),
                suggestedFileName: "noop.bat",
                fileSize: 12};
@@ -423,12 +411,11 @@ add_task(function* test_disabled_through
       // We should be getting NS_ERROR_NOT_AVAILABLE if the service is disabled
       do_check_eq(Cr.NS_ERROR_NOT_AVAILABLE, aStatus);
       do_check_false(aShouldBlock);
       deferred.resolve(true);
     }
   );
   yield deferred.promise;
 });
-add_task(function* test_teardown()
-{
+add_task(function* test_teardown() {
   gStillRunning = false;
 });
--- a/toolkit/components/exthelper/extApplication.js
+++ b/toolkit/components/exthelper/extApplication.js
@@ -624,26 +624,23 @@ extApplication.prototype = {
   get version() {
     return this._info.version;
   },
 
   // for nsIObserver
   observe: function app_observe(aSubject, aTopic, aData) {
     if (aTopic == "app-startup") {
       this.events.dispatch("load", "application");
-    }
-    else if (aTopic == "final-ui-startup") {
+    } else if (aTopic == "final-ui-startup") {
       this.events.dispatch("ready", "application");
-    }
-    else if (aTopic == "quit-application-requested") {
+    } else if (aTopic == "quit-application-requested") {
       // we can stop the quit by checking the return value
       if (this.events.dispatch("quit", "application") == false)
         aSubject.data = true;
-    }
-    else if (aTopic == "xpcom-shutdown") {
+    } else if (aTopic == "xpcom-shutdown") {
       this.events.dispatch("unload", "application");
       gExtensionObserver = null;
       gPreferenceObserver = null;
     }
   },
 
   get console() {
     let console = new Console();
--- a/toolkit/components/feeds/FeedProcessor.js
+++ b/toolkit/components/feeds/FeedProcessor.js
@@ -50,18 +50,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;
 }
 
@@ -73,18 +72,17 @@ function isFunction(a) {
   return typeof a == "function";
 }
 
 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);
 }
 
@@ -141,28 +139,26 @@ function arrayContains(array, element) {
   return false;
 }
 
 // XXX add hasKey to nsIPropertyBag
 function bagHasKey(bag, key) {
   try {
     bag.getProperty(key);
     return true;
-  }
-  catch (e) {
+  } catch (e) {
     return false;
   }
 }
 
 function makePropGetter(key) {
   return function FeedPropGetter(bag) {
     try {
       return 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 = {
@@ -353,18 +349,17 @@ Feed.prototype = {
       this.image.setPropertyAsAString("url", url.spec);
   },
 
   _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) {
@@ -710,18 +705,17 @@ function fieldsToObj(container, fields) 
   for (var key in 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;
       }
     }
   }
 }
@@ -785,27 +779,24 @@ function rssAuthor(s, author) {
   if (matches) {
     var match1 = matches[1].trim();
     var match2 = matches[2].trim();
     if (match2.indexOf("mailto:") == 0)
       match2 = match2.substring(7);
     if (emailCheck.test(match1)) {
       author.email = match1;
       author.name = match2;
-    }
-    else if (emailCheck.test(match2)) {
+    } else if (emailCheck.test(match2)) {
       author.email = match2;
       author.name = match1;
-    }
-    else {
+    } else {
       // put it back together
       author.name = match1 + " (" + match2 + ")";
     }
-  }
-  else {
+  } else {
     author.name = chars;
     if (chars.indexOf('@'))
       author.email = chars;
   }
   return author;
 }
 
 //
@@ -1165,17 +1156,17 @@ function FeedProcessor() {
     },
 
     /** ******* ATOM 1.0 **********/
     "IN_ATOM": {
       "atom:author": new ElementInfo("authors", Cc[PERSON_CONTRACTID],
                                      null, true),
       "atom:generator": new ElementInfo("generator", Cc[GENERATOR_CONTRACTID],
                                         atomGenerator, false),
-      "atom:contributor": new ElementInfo("contributors",  Cc[PERSON_CONTRACTID],
+      "atom:contributor": new ElementInfo("contributors", Cc[PERSON_CONTRACTID],
                                           null, true),
       "atom:link": new ElementInfo("links", null, null, true),
       "atom:logo": new ElementInfo("atom:logo", null, atomLogo, false),
       "atom:entry": new ElementInfo("entries", Cc[ENTRY_CONTRACTID],
                                     null, true)
     },
 
     "IN_ENTRIES": {
@@ -1242,26 +1233,24 @@ FeedProcessor.prototype = {
   // When we're done with the feed, let the listener know what
   // happened.
   _sendResult: function FP_sendResult() {
     this._haveSentResult = true;
     try {
       // Can be null when a non-feed is fed to us
       if (this._result.doc)
         this._result.doc.normalize();
-    }
-    catch (e) {
+    } catch (e) {
       LOG("FIXME: " + e);
     }
 
     try {
       if (this.listener != null)
         this.listener.handleResult(this._result);
-    }
-    finally {
+    } finally {
       this._result = null;
     }
   },
 
   // Parsing functions
   parseFromStream: function FP_parseFromStream(stream, uri) {
     this._init(uri);
     this._reader.parseFromStream(stream, null, stream.available(),
@@ -1289,18 +1278,17 @@ FeedProcessor.prototype = {
     var channel = request.QueryInterface(Ci.nsIChannel);
     channel.contentType = "application/vnd.mozilla.maybe.feed";
     this._reader.onStartRequest(request, context);
   },
 
   onStopRequest: function FP_onStopRequest(request, context, statusCode) {
     try {
       this._reader.onStopRequest(request, context, statusCode);
-    }
-    finally {
+    } finally {
       this._reader = null;
     }
   },
 
   onDataAvailable:
   function FP_onDataAvailable(request, context, inputStream, offset, count) {
     this._reader.onDataAvailable(request, context, inputStream, offset, count);
   },
@@ -1407,46 +1395,43 @@ FeedProcessor.prototype = {
       }
     }
 
     // Check our current state, and see if that state has a defined
     // transition. For example, this._trans["atom:entry"]["atom:author"]
     // will have one, and it tells us to add an item to our authors array.
     if (this._trans[this._state] && this._trans[this._state][key]) {
       elementInfo = this._trans[this._state][key];
-    }
-    else {
+    } else {
       // If we don't have a transition, hand off to extension handler
       this._extensionHandler = new ExtensionHandler(this);
       this._reader.contentHandler = this._extensionHandler;
       this._extensionHandler.startElement(uri, localName, qName, attributes);
       return;
     }
 
     // This distinguishes wrappers like 'channel' from elements
     // we'd actually like to do something with (which will test true).
     this._handlerStack[this._depth] = elementInfo;
     if (elementInfo.isWrapper) {
       this._state = "IN_" + elementInfo.fieldName.toUpperCase();
       this._stack.push([this._feed, this._state]);
-    }
-    else if (elementInfo.feedVersion) {
+    } else if (elementInfo.feedVersion) {
       this._state = "IN_" + elementInfo.fieldName.toUpperCase();
 
       // Check for the older RSS2 variants
       if (elementInfo.feedVersion == "rss2")
         elementInfo.feedVersion = this._findRSSVersion(attributes);
       else if (uri == RSS090NS)
         elementInfo.feedVersion = "rss090";
 
       this._docVerified(elementInfo.feedVersion);
       this._stack.push([this._feed, this._state]);
       this._mapAttributes(this._feed, attributes);
-    }
-    else {
+    } else {
       this._state = this._processComplexElement(elementInfo, attributes);
     }
   },
 
   // In the endElement handler, we decrement the stack and look
   // for cleanup/transition functions to execute. The second part
   // of the state transition works as above in startElement, but
   // the state we're looking for is prefixed with an underscore
@@ -1499,41 +1484,38 @@ FeedProcessor.prototype = {
     var obj;
 
     // If the container is an entry/item, it'll need to have its
     // more esoteric properties put in the 'fields' property bag.
     if (elementInfo.containerClass == Cc[ENTRY_CONTRACTID]) {
       obj = elementInfo.containerClass.createInstance(Ci.nsIFeedEntry);
       obj.baseURI = this._xmlBaseStack[this._xmlBaseStack.length - 1];
       this._mapAttributes(obj.fields, attributes);
-    }
-    else if (elementInfo.containerClass) {
+    } else if (elementInfo.containerClass) {
       obj = elementInfo.containerClass.createInstance(Ci.nsIFeedElementBase);
       obj.baseURI = this._xmlBaseStack[this._xmlBaseStack.length - 1];
       obj.attributes = attributes; // just set the SAX attributes
-    }
-    else {
+    } else {
       obj = Cc[BAG_CONTRACTID].createInstance(Ci.nsIWritablePropertyBag2);
       this._mapAttributes(obj, attributes);
     }
 
     // We should have a container/propertyBag that's had its
     // attributes processed. Now we need to attach it to its
     // container.
     var newProp;
 
     // 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));
       }
@@ -1545,18 +1527,17 @@ FeedProcessor.prototype = {
       newProp.QueryInterface(Ci.nsIMutableArray);
       newProp.appendElement(obj, false);
 
       // If new object is an nsIFeedContainer, we want to deal with
       // its member nsIPropertyBag instead.
       if (isIFeedContainer(obj))
         newProp = obj.fields;
 
-    }
-    else {
+    } else {
       // If it doesn't, set it.
       if (!prop) {
         container.setPropertyAsInterface(elementInfo.fieldName, obj);
       }
       newProp = container.getProperty(elementInfo.fieldName);
     }
 
     // make our new state name, and push the property onto the stack
@@ -1682,18 +1663,17 @@ FeedProcessor.prototype = {
             var propValue = chars;
             // 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);
     }
@@ -1708,39 +1688,35 @@ FeedProcessor.prototype = {
       var newProp = Cc[TEXTCONSTRUCT_CONTRACTID].
                     createInstance(Ci.nsIFeedTextConstruct);
       newProp.text = chars;
       // Look up the default type in our table
       var type = this._textConstructs[propName];
       var typeAttribute = attributes.getValueFromName("", "type");
       if (this._result.version == "atom" && typeAttribute != null) {
         type = typeAttribute;
-      }
-      else if (this._result.version == "atom03" && typeAttribute != null) {
+      } else if (this._result.version == "atom03" && typeAttribute != null) {
         if (typeAttribute.toLowerCase().indexOf("xhtml") >= 0) {
           type = "xhtml";
-        }
-        else if (typeAttribute.toLowerCase().indexOf("html") >= 0) {
+        } else if (typeAttribute.toLowerCase().indexOf("html") >= 0) {
           type = "html";
-        }
-        else if (typeAttribute.toLowerCase().indexOf("text") >= 0) {
+        } else if (typeAttribute.toLowerCase().indexOf("text") >= 0) {
           type = "text";
         }
       }
 
       // If it's rss feed-level description, it's not supposed to have html
       if (this._result.version.indexOf("rss") >= 0 &&
           this._handlerStack[this._depth].containerClass != ENTRY_CONTRACTID) {
         type = "text";
       }
       newProp.type = type;
       newProp.base = this._xmlBaseStack[this._xmlBaseStack.length - 1];
       container.setPropertyAsInterface(propName, newProp);
-    }
-    else {
+    } else {
       container.setPropertyAsAString(propName, chars);
     }
   },
 
   // Sometimes, we'll hand off SAX handling duties to an XHTMLHandler
   // (see above) that will scrape out non-XHTML stuff, normalize
   // namespaces, and remove the wrapper div from Atom 1.0. When the
   // XHTMLHandler is done, it'll callback here.
--- a/toolkit/components/feeds/test/head.js
+++ b/toolkit/components/feeds/test/head.js
@@ -38,17 +38,17 @@ function readTestData(testFile) {
         testcase.path = 'xml/' + testFile.parent.leafName + '/' + testFile.leafName;
         testcase.file = testFile;
         break;
       }
 
     } while (hasmore);
 
   } catch (e) {
-    Assert.ok(false, "FAILED! Error reading testFile case in file " + testFile.leafName  + " ---- " + e);
+    Assert.ok(false, "FAILED! Error reading testFile case in file " + testFile.leafName + " ---- " + e);
   } finally {
     istream.close();
   }
 
   return testcase;
 }
 
 function iterateDir(dir, recurse, callback) {
--- a/toolkit/components/filepicker/content/filepicker.js
+++ b/toolkit/components/filepicker/content/filepicker.js
@@ -131,18 +131,17 @@ function filepickerLoad() {
   okButton.disabled = filePickerMode != nsIFilePicker.modeGetFolder;
 
   // This allows the window to show onscreen before we begin
   // loading the file list
 
   setTimeout(setInitialDirectory, 0, directory);
 }
 
-function setInitialDirectory(directory)
-{
+function setInitialDirectory(directory) {
   // Start in the user's home directory
   var dirService = Components.classes[NS_DIRECTORYSERVICE_CONTRACTID]
                              .getService(nsIProperties);
   homeDir = dirService.get("Home", Components.interfaces.nsIFile);
 
   if (directory) {
     sfile.initWithPath(directory);
     if (!sfile.exists() || !sfile.isDirectory())
@@ -150,54 +149,49 @@ function setInitialDirectory(directory)
   }
   if (!directory) {
     sfile.initWithPath(homeDir.path);
   }
 
   gotoDirectory(sfile);
 }
 
-function onFilterChanged(target)
-{
+function onFilterChanged(target) {
   // Do this on a timeout callback so the filter list can roll up
   // and we don't keep the mouse grabbed while we are refiltering.
 
   setTimeout(changeFilter, 0, target.getAttribute("filters"));
 }
 
-function changeFilter(filterTypes)
-{
+function changeFilter(filterTypes) {
   window.setCursor("wait");
   treeView.setFilter(filterTypes);
   window.setCursor("auto");
 }
 
-function showErrorDialog(titleStrName, messageStrName, file)
-{
+function showErrorDialog(titleStrName, messageStrName, file) {
   var errorTitle =
     gFilePickerBundle.getFormattedString(titleStrName, [file.path]);
   var errorMessage =
     gFilePickerBundle.getFormattedString(messageStrName, [file.path]);
   var promptService =
     Components.classes[NS_PROMPTSERVICE_CONTRACTID].getService(Components.interfaces.nsIPromptService);
 
   promptService.alert(window, errorTitle, errorMessage);
 }
 
-function openOnOK()
-{
+function openOnOK() {
   var dir = treeView.selectedFiles.queryElementAt(0, nsIFile);
   if (dir)
     gotoDirectory(dir);
 
   return false;
 }
 
-function selectOnOK()
-{
+function selectOnOK() {
   var errorTitle, errorMessage, promptService;
   var ret = nsIFilePicker.returnOK;
 
   var isDir = false;
   var isFile = false;
 
   retvals.filterIndex = document.getElementById("filterMenuList").selectedIndex;
   retvals.fileURL = null;
@@ -363,30 +357,27 @@ function selectOnOK()
 
   return (ret != nsIFilePicker.returnCancel);
 }
 
 var gFilesEnumerator = {
   mFiles: null,
   mIndex: 0,
 
-  hasMoreElements()
-  {
+  hasMoreElements() {
     return (this.mIndex < this.mFiles.length);
   },
-  getNext()
-  {
+  getNext() {
     if (this.mIndex >= this.mFiles.length)
       throw Components.results.NS_ERROR_FAILURE;
     return this.mFiles[this.mIndex++];
   }
 };
 
-function onCancel()
-{
+function onCancel() {
   // Close the window.
   retvals.buttonStatus = nsIFilePicker.returnCancel;
   retvals.file = null;
   retvals.files = null;
   return true;
 }
 
 function onDblClick(e) {
@@ -483,18 +474,17 @@ function onTreeFocus(event) {
 
 function setOKAction(file) {
   var buttonLabel;
   var buttonIcon = "open"; // used in all but one case
 
   if (file && file.isDirectory()) {
     document.documentElement.setAttribute("ondialogaccept", "return openOnOK();");
     buttonLabel = gFilePickerBundle.getString("openButtonLabel");
-  }
-  else {
+  } else {
     document.documentElement.setAttribute("ondialogaccept", "return selectOnOK();");
     switch (filePickerMode) {
     case nsIFilePicker.modeGetFolder:
       buttonLabel = gFilePickerBundle.getString("selectFolderButtonLabel");
       break;
     case nsIFilePicker.modeOpen:
     case nsIFilePicker.modeOpenMultiple:
       buttonLabel = gFilePickerBundle.getString("openButtonLabel");
@@ -546,18 +536,17 @@ function onFileSelected(/* nsIArray */ s
 
   if (validFileSelected) {
     setOKAction(file);
     okButton.disabled = invalidSelection;
   } else if (filePickerMode != nsIFilePicker.modeGetFolder)
     okButton.disabled = (textInput.value == "");
 }
 
-function addToTextFieldValue(path)
-{
+function addToTextFieldValue(path) {
   var newValue = "";
 
   if (textInput.value == "")
     newValue = path.replace(/\"/g, "\\\"");
   else {
     // Quote the existing text if needed,
     // then append the new filename (quoted and escaped)
     if (textInput.value[0] != '"')
@@ -571,18 +560,17 @@ function addToTextFieldValue(path)
   textInput.value = newValue;
 }
 
 function onTextFieldFocus() {
   setOKAction(null);
   doEnabling();
 }
 
-function onDirectoryChanged(target)
-{
+function onDirectoryChanged(target) {
   var path = target.getAttribute("label");
 
   var file = Components.classes[NS_LOCAL_FILE_CONTRACTID].createInstance(nsILocalFile);
   file.initWithPath(path);
 
   if (!sfile.equals(file)) {
     // Do this on a timeout callback so the directory list can roll up
     // and we don't keep the mouse grabbed while we are loading.
@@ -722,18 +710,17 @@ function toggleShowHidden(event) {
 
 // from the current directory and whatever was entered
 // in the entry field, try to make a new path. This
 // uses "/" as the directory separator, "~" as a shortcut
 // for the home directory (but only when seen at the start
 // of a path), and ".." to denote the parent directory.
 // returns an array of the files listed,
 // or false if an error occurred.
-function processPath(path)
-{
+function processPath(path) {
   var fileArray = new Array();
   var strLength = path.length;
 
   if (path[0] == '"' && filePickerMode == nsIFilePicker.modeOpenMultiple &&
       strLength > 1) {
     // we have a quoted list of filenames, separated by spaces.
     // iterate the list and process each file.
 
@@ -776,18 +763,17 @@ function processPath(path)
   } else if (!processPathEntry(path, fileArray)) {
     // If we didn't start with a quote, assume we just have a single file.
     return false;
   }
 
   return fileArray;
 }
 
-function processPathEntry(path, fileArray)
-{
+function processPathEntry(path, fileArray) {
   var filePath;
   var file;
 
   try {
     file = sfile.clone().QueryInterface(nsILocalFile);
   } catch (e) {
     dump("Couldn't clone\n" + e);
     return false;
@@ -813,18 +799,17 @@ function processPathEntry(path, fileArra
            (filePath == "..")) {
     /* appendRelativePath doesn't allow .. */
     try {
       file.initWithPath(file.path + "/" + filePath);
     } catch (e) {
       dump("Couldn't init path\n" + e);
       return false;
     }
-  }
-  else {
+  } else {
     try {
       file.appendRelativePath(filePath);
     } catch (e) {
       dump("Couldn't append path\n" + e);
       return false;
     }
   }
 
--- a/toolkit/components/filepicker/nsFilePicker.js
+++ b/toolkit/components/filepicker/nsFilePicker.js
@@ -34,22 +34,21 @@ const nsIFactory            = Components
 const nsIFilePicker         = Components.interfaces.nsIFilePicker;
 const nsIInterfaceRequestor = Components.interfaces.nsIInterfaceRequestor;
 const nsIDOMWindow          = Components.interfaces.nsIDOMWindow;
 const nsIStringBundleService = Components.interfaces.nsIStringBundleService;
 const nsIWebNavigation      = Components.interfaces.nsIWebNavigation;
 const nsIDocShellTreeItem   = Components.interfaces.nsIDocShellTreeItem;
 const nsIBaseWindow         = Components.interfaces.nsIBaseWindow;
 
-var   titleBundle           = null;
-var   filterBundle          = null;
-var   lastDirectory         = null;
+var titleBundle           = null;
+var filterBundle          = null;
+var lastDirectory         = null;
 
-function nsFilePicker()
-{
+function nsFilePicker() {
   if (!titleBundle)
     titleBundle = srGetStrBundle("chrome://global/locale/filepicker.properties");
   if (!filterBundle)
     filterBundle = srGetStrBundle("chrome://global/content/filepicker.properties");
 
   /* attributes */
   this.mDefaultString = "";
   this.mFilterIndex = 0;
@@ -77,36 +76,36 @@ nsFilePicker.prototype = {
   },
 
 
   /* attribute nsILocalFile displayDirectory; */
   set displayDirectory(a) {
     this.mDisplayDirectory = a &&
       a.clone().QueryInterface(nsILocalFile);
   },
-  get displayDirectory()  {
+  get displayDirectory() {
     return this.mDisplayDirectory &&
            this.mDisplayDirectory.clone()
                .QueryInterface(nsILocalFile);
   },
 
   /* readonly attribute nsILocalFile file; */
-  get file()  { return this.mFilesEnumerator.mFiles[0]; },
+  get file() { return this.mFilesEnumerator.mFiles[0]; },
 
   /* readonly attribute nsISimpleEnumerator files; */
-  get files()  { return this.mFilesEnumerator; },
+  get files() { return this.mFilesEnumerator; },
 
   /* we don't support directories, yet */
-  get domFileOrDirectory()  {
+  get domFileOrDirectory() {
     let enumerator = this.domFileOrDirectoryEnumerator;
     return enumerator ? enumerator.mFiles[0] : null;
   },
 
   /* readonly attribute nsISimpleEnumerator domFileOrDirectoryEnumerator; */
-  get domFileOrDirectoryEnumerator()  {
+  get domFileOrDirectoryEnumerator() {
     if (!this.mFilesEnumerator) {
       return null;
     }
 
     if (!this.mDOMFilesEnumerator) {
       this.mDOMFilesEnumerator = {
         QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsISimpleEnumerator]),
 
@@ -133,44 +132,44 @@ nsFilePicker.prototype = {
         this.mDOMFilesEnumerator.mFiles.push(file);
       }
     }
 
     return this.mDOMFilesEnumerator;
   },
 
   /* readonly attribute nsIURI fileURL; */
-  get fileURL()  {
+  get fileURL() {
     if (this.mFileURL)
       return this.mFileURL;
 
     if (!this.mFilesEnumerator)
       return null;
 
       var ioService = Components.classes["@mozilla.org/network/io-service;1"]
                     .getService(Components.interfaces.nsIIOService);
 
     return this.mFileURL = ioService.newFileURI(this.file);
   },
 
   /* attribute wstring defaultString; */
   set defaultString(a) { this.mDefaultString = a; },
-  get defaultString()  { return this.mDefaultString; },
+  get defaultString() { return this.mDefaultString; },
 
   /* attribute wstring defaultExtension */
   set defaultExtension(ext) { },
   get defaultExtension() { return ""; },
 
   /* attribute long filterIndex; */
   set filterIndex(a) { this.mFilterIndex = a; },
   get filterIndex() { return this.mFilterIndex; },
 
   /* attribute boolean addToRecentDocs; */
   set addToRecentDocs(a) {},
-  get addToRecentDocs()  { return false; },
+  get addToRecentDocs() { return false; },
 
   /* readonly attribute short mode; */
   get mode() { return this.mMode; },
 
   /* members */
   mFilesEnumerator: undefined,
   mDOMFilesEnumerator: undefined,
   mParentWindow: null,
@@ -294,18 +293,17 @@ else
   debug = function(s) {};
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([nsFilePicker]);
 
 /* crap from strres.js that I want to use for string bundles since I can't include another .js file.... */
 
 var strBundleService = null;
 
-function srGetStrBundle(path)
-{
+function srGetStrBundle(path) {
   var strBundle = null;
 
   if (!strBundleService) {
     try {
       strBundleService = Components.classes[STRBUNDLE_SERV_CONTRACTID].getService(nsIStringBundleService);
     } catch (ex) {
       dump("\n--** strBundleService createInstance failed **--\n");
       return null;
--- a/toolkit/components/filepicker/test/unit/test_filecomplete.js
+++ b/toolkit/components/filepicker/test/unit/test_filecomplete.js
@@ -32,14 +32,13 @@ var gListener = {
     do_check_eq(aResult.getStyleAt(0), "directory");
     // Check that the second result is the file we created.
     do_check_eq(aResult.getValueAt(1), "test_file");
     // Check that the second result has file style.
     do_check_eq(aResult.getStyleAt(1), "file");
   }
 };
 
-function run_test()
-{
+function run_test() {
   Components.classes["@mozilla.org/autocomplete/search;1?name=file"]
             .getService(Components.interfaces.nsIAutoCompleteSearch)
             .startSearch("test", path, null, gListener);
 }
--- a/toolkit/components/gfx/SanityTest.js
+++ b/toolkit/components/gfx/SanityTest.js
@@ -263,18 +263,17 @@ SanityTest.prototype = {
         reportTestReason(reason);
       }
       return false;
     }
 
     // TODO: Handle dual GPU setups
     if (checkPref(DRIVER_PREF, gfxinfo.adapterDriverVersion, REASON_DRIVER_CHANGED) &&
         checkPref(DEVICE_PREF, gfxinfo.adapterDeviceID, REASON_DEVICE_CHANGED) &&
-        checkPref(VERSION_PREF, buildId, REASON_FIREFOX_CHANGED))
-    {
+        checkPref(VERSION_PREF, buildId, REASON_FIREFOX_CHANGED)) {
       return false;
     }
 
     // Enable hardware decoding so we can test again
     // and record the driver version to detect if the driver changes.
     Preferences.set(DISABLE_VIDEO_PREF, false);
     Preferences.set(DRIVER_PREF, gfxinfo.adapterDriverVersion);
     Preferences.set(DEVICE_PREF, gfxinfo.adapterDeviceID);
--- a/toolkit/components/jsdownloads/src/DownloadCore.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadCore.jsm
@@ -103,32 +103,30 @@ function isString(aValue) {
   // We cannot use the "instanceof" operator reliably across module boundaries.
   return (typeof aValue == "string") ||
          (typeof aValue == "object" && "charAt" in aValue);
 }
 
 /**
  * Serialize the unknown properties of aObject into aSerializable.
  */
-function serializeUnknownProperties(aObject, aSerializable)
-{
+function serializeUnknownProperties(aObject, aSerializable) {
   if (aObject._unknownProperties) {
     for (let property in aObject._unknownProperties) {
       aSerializable[property] = aObject._unknownProperties[property];
     }
   }
 }
 
 /**
  * Check for any unknown properties in aSerializable and preserve those in the
  * _unknownProperties field of aObject. aFilterFn is called for each property
  * name of aObject and should return true only for unknown properties.
  */
-function deserializeUnknownProperties(aObject, aSerializable, aFilterFn)
-{
+function deserializeUnknownProperties(aObject, aSerializable, aFilterFn) {
   for (let property in aSerializable) {
     if (aFilterFn(property)) {
       if (!aObject._unknownProperties) {
         aObject._unknownProperties = { };
       }
 
       aObject._unknownProperties[property] = aSerializable[property];
     }
@@ -144,18 +142,17 @@ const kProgressUpdateIntervalMs = 400;
 
 // Download
 
 /**
  * Represents a single download, with associated state and actions.  This object
  * is transient, though it can be included in a DownloadList so that it can be
  * managed by the user interface and persisted across sessions.
  */
-this.Download = function()
-{
+this.Download = function() {
   this._deferSucceeded = Promise.defer();
 }
 
 this.Download.prototype = {
   /**
    * DownloadSource object associated with this download.
    */
   source: null,
@@ -346,18 +343,17 @@ this.Download.prototype = {
    * @note If you need to start a new download from the same source, rather than
    *       restarting a failed or canceled one, you should create a separate
    *       Download object with the same source as the current one.
    *
    * @return {Promise}
    * @resolves When the download has finished successfully.
    * @rejects JavaScript exception if the download failed.
    */
-  start: function D_start()
-  {
+  start: function D_start() {
     // If the download succeeded, it's the final state, we have nothing to do.
     if (this.succeeded) {
       return Promise.resolve();
     }
 
     // If the download already started and hasn't failed or hasn't been
     // canceled, return the same promise as the previous call, allowing the
     // caller to wait for the current attempt to finish.
@@ -397,29 +393,27 @@ this.Download.prototype = {
 
     // Restart the progress and speed calculations from scratch.
     this._lastProgressTimeMs = 0;
 
     // This function propagates progress from the DownloadSaver object, unless
     // it comes in late from a download attempt that was replaced by a new one.
     // If the cancellation process for the download has started, then the update
     // is ignored.
-    function DS_setProgressBytes(aCurrentBytes, aTotalBytes, aHasPartialData)
-    {
+    function DS_setProgressBytes(aCurrentBytes, aTotalBytes, aHasPartialData) {
       if (this._currentAttempt == currentAttempt) {
         this._setBytes(aCurrentBytes, aTotalBytes, aHasPartialData);
       }
     }
 
     // This function propagates download properties from the DownloadSaver
     // object, unless it comes in late from a download attempt that was
     // replaced by a new one.  If the cancellation process for the download has
     // started, then the update is ignored.
-    function DS_setProperties(aOptions)
-    {
+    function DS_setProperties(aOptions) {
       if (this._currentAttempt != currentAttempt) {
         return;
       }
 
       let changeMade = false;
 
       for (let property of ["contentType", "progress", "hasPartialData",
                             "hasBlockedData"]) {
@@ -768,18 +762,17 @@ this.Download.prototype = {
    * resolved promise.  This behavior is designed for the case where the call
    * to "cancel" happens asynchronously, and is consistent with the case where
    * the cancellation request could not be processed in time.
    *
    * @return {Promise}
    * @resolves When the cancellation process has finished.
    * @rejects Never.
    */
-  cancel: function D_cancel()
-  {
+  cancel: function D_cancel() {
     // If the download is currently stopped, we have nothing to do.
     if (this.stopped) {
       return Promise.resolve();
     }
 
     if (!this._promiseCanceled) {
       // Start a new cancellation request.
       let deferCanceled = Promise.defer();
@@ -840,18 +833,17 @@ this.Download.prototype = {
    * After this method has been called, if the tryToKeepPartialData property is
    * still true when the download is restarted, partial data will be retained
    * during the new download attempt.
    *
    * @return {Promise}
    * @resolves When the partial data has been successfully removed.
    * @rejects JavaScript exception if the operation could not be completed.
    */
-  removePartialData()
-  {
+  removePartialData() {
     if (!this.canceled && !this.error) {
       return Promise.resolve();
     }
 
     let promiseRemovePartialData = this._promiseRemovePartialData;
 
     if (!promiseRemovePartialData) {
       let deferRemovePartialData = Promise.defer();
@@ -897,36 +889,34 @@ this.Download.prototype = {
    * current session, for downloads that are controlled interactively.  If the
    * download is not controlled interactively, you should use the promise
    * returned by the "start" method instead, to check for success or failure.
    *
    * @return {Promise}
    * @resolves When the download has finished successfully.
    * @rejects Never.
    */
-  whenSucceeded: function D_whenSucceeded()
-  {
+  whenSucceeded: function D_whenSucceeded() {
     return this._deferSucceeded.promise;
   },
 
   /**
    * Updates the state of a finished, failed, or canceled download based on the
    * current state in the file system.  If the download is in progress or it has
    * been finalized, this method has no effect, and it returns a resolved
    * promise.
    *
    * This allows the properties of the download to be updated in case the user
    * moved or deleted the target file or its associated ".part" file.
    *
    * @return {Promise}
    * @resolves When the operation has completed.
    * @rejects Never.
    */
-  refresh()
-  {
+  refresh() {
     return Task.spawn(function* () {
       if (!this.stopped || this._finalized) {
         return;
       }
 
       if (this.succeeded) {
         let oldExists = this.target.exists;
         let oldSize = this.target.size;
@@ -994,18 +984,17 @@ this.Download.prototype = {
    *        Whether any partially downloaded data should be removed after the
    *        download has been stopped.
    *
    * @return {Promise}
    * @resolves When the operation has finished successfully.
    * @rejects JavaScript exception if an error occurred while removing the
    *          partially downloaded data.
    */
-  finalize(aRemovePartialData)
-  {
+  finalize(aRemovePartialData) {
     // Prevents the download from starting again after having been stopped.
     this._finalized = true;
 
     if (aRemovePartialData) {
       // Cancel the download, in case it is currently in progress, then remove
       // any partially downloaded data.  The removal operation waits for
       // cancellation to be completed before resolving the promise it returns.
       this.cancel();
@@ -1091,18 +1080,17 @@ this.Download.prototype = {
     }
   },
 
   /**
    * Returns a static representation of the current object state.
    *
    * @return A JavaScript object that can be serialized to JSON.
    */
-  toSerializable()
-  {
+  toSerializable() {
     let serializable = {
       source: this.source.toSerializable(),
       target: this.target.toSerializable(),
     };
 
     let saver = this.saver.toSerializable();
     if (!serializable.source || !saver) {
       // If we are unable to serialize either the source or the saver,
@@ -1143,18 +1131,17 @@ this.Download.prototype = {
    * object that should be saved into a file also change.  This excludes
    * properties whose value doesn't usually change during the download lifetime.
    *
    * This function is used to determine whether the download should be
    * serialized after a property change notification has been received.
    *
    * @return String representing the relevant download state.
    */
-  getSerializationHash()
-  {
+  getSerializationHash() {
     // The "succeeded", "canceled", "error", and startTime properties are not
     // taken into account because they all change before the "stopped" property
     // changes, and are not altered in other cases.
     return this.stopped + "," + this.totalBytes + "," + this.hasPartialData +
            "," + this.contentType;
   },
 };
 
@@ -1291,18 +1278,17 @@ this.DownloadSource.prototype = {
    */
    adjustChannel: null,
 
   /**
    * Returns a static representation of the current object state.
    *
    * @return A JavaScript object that can be serialized to JSON.
    */
-  toSerializable()
-  {
+  toSerializable() {
     if (this.adjustChannel) {
       // If the callback was used, we can't reproduce this across sessions.
       return null;
     }
 
     // Simplify the representation if we don't have other details.
     if (!this.isPrivate && !this.referrer && !this._unknownProperties) {
       return this.url;
@@ -1447,18 +1433,17 @@ this.DownloadTarget.prototype = {
     }
   }),
 
   /**
    * Returns a static representation of the current object state.
    *
    * @return A JavaScript object that can be serialized to JSON.
    */
-  toSerializable()
-  {
+  toSerializable() {
     // Simplify the representation if we don't have other details.
     if (!this.partFilePath && !this._unknownProperties) {
       return this.path;
     }
 
     let serializable = { path: this.path,
                          partFilePath: this.partFilePath };
     serializeUnknownProperties(this, serializable);
@@ -1517,18 +1502,17 @@ this.DownloadTarget.fromSerializable = f
  *                        download is a network failure or a local file failure,
  *                        based on a set of known values of the result code.
  *                        This is useful when the error is received by a
  *                        component that handles both aspects of the download.
  *          }
  *        The properties object may also contain any of the DownloadError's
  *        because properties, which will be set accordingly in the error object.
  */
-this.DownloadError = function(aProperties)
-{
+this.DownloadError = function(aProperties) {
   const NS_ERROR_MODULE_BASE_OFFSET = 0x45;
   const NS_ERROR_MODULE_NETWORK = 6;
   const NS_ERROR_MODULE_FILES = 13;
 
   // Set the error name used by the Error object prototype first.
   this.name = "DownloadError";
   this.result = aProperties.result || Cr.NS_ERROR_FAILURE;
   if (aProperties.message) {
@@ -1542,18 +1526,17 @@ this.DownloadError = function(aPropertie
     let exception = new Components.Exception("", this.result);
     this.message = exception.toString();
   }
   if (aProperties.inferCause) {
     let module = ((this.result & 0x7FFF0000) >> 16) -
                  NS_ERROR_MODULE_BASE_OFFSET;
     this.becauseSourceFailed = (module == NS_ERROR_MODULE_NETWORK);
     this.becauseTargetFailed = (module == NS_ERROR_MODULE_FILES);
-  }
-  else {
+  } else {
     if (aProperties.becauseSourceFailed) {
       this.becauseSourceFailed = true;
     }
     if (aProperties.becauseTargetFailed) {
       this.becauseTargetFailed = true;
     }
   }
 
@@ -1649,18 +1632,17 @@ this.DownloadError.prototype = {
    */
   innerException: null,
 
   /**
    * Returns a static representation of the current object state.
    *
    * @return A JavaScript object that can be serialized to JSON.
    */
-  toSerializable()
-  {
+  toSerializable() {
     let serializable = {
       result: this.result,
       message: this.message,
       becauseSourceFailed: this.becauseSourceFailed,
       becauseTargetFailed: this.becauseTargetFailed,
       becauseBlocked: this.becauseBlocked,
       becauseBlockedByParentalControls: this.becauseBlockedByParentalControls,
       becauseBlockedByReputationCheck: this.becauseBlockedByReputationCheck,
@@ -1730,70 +1712,65 @@ this.DownloadSaver.prototype = {
    *        download process. It takes an object where the keys represents
    *        the names of the properties to set, and the value represents the
    *        value to set.
    *
    * @return {Promise}
    * @resolves When the download has finished successfully.
    * @rejects JavaScript exception if the download failed.
    */
-  execute: function DS_execute(aSetProgressBytesFn, aSetPropertiesFn)
-  {
+  execute: function DS_execute(aSetProgressBytesFn, aSetPropertiesFn) {
     throw new Error("Not implemented.");
   },
 
   /**
    * Cancels the download.
    */
-  cancel: function DS_cancel()
-  {
+  cancel: function DS_cancel() {
     throw new Error("Not implemented.");
   },
 
   /**
    * Removes any partial data kept as part of a canceled or failed download.
    *
    * This method is never called until the promise returned by "execute" is
    * either resolved or rejected, and the "execute" method is not called again
    * until the promise returned by this method is resolved or rejected.
    *
    * @return {Promise}
    * @resolves When the operation has finished successfully.
    * @rejects JavaScript exception.
    */
-  removePartialData: function DS_removePartialData()
-  {
+  removePartialData: function DS_removePartialData() {
     return Promise.resolve();
   },
 
   /**
    * This can be called by the saver implementation when the download is already
    * started, to add it to the browsing history.  This method has no effect if
    * the download is private.
    */
-  addToHistory()
-  {
+  addToHistory() {
     if (this.download.source.isPrivate) {
       return;
     }
 
     let sourceUri = NetUtil.newURI(this.download.source.url);
     let referrer = this.download.source.referrer;
     let referrerUri = referrer ? NetUtil.newURI(referrer) : null;
     let targetUri = NetUtil.newURI(new FileUtils.File(
                                        this.download.target.path));
 
     // 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!
@@ -1801,31 +1778,28 @@ this.DownloadSaver.prototype = {
     }
   },
 
   /**
    * Returns a static representation of the current object state.
    *
    * @return A JavaScript object that can be serialized to JSON.
    */
-  toSerializable()
-  {
+  toSerializable() {
     throw new Error("Not implemented.");
   },
 
   /**
    * Returns the SHA-256 hash of the downloaded file, if it exists.
    */
-  getSha256Hash()
-  {
+  getSha256Hash() {
     throw new Error("Not implemented.");
   },
 
-  getSignatureInfo()
-  {
+  getSignatureInfo() {
     throw new Error("Not implemented.");
   },
 }; // DownloadSaver
 
 /**
  * Creates a new DownloadSaver object from its serializable representation.
  *
  * @param aSerializable
@@ -1905,18 +1879,17 @@ this.DownloadCopySaver.prototype = {
    * used to execute the download, or null if the channel was not resumable or
    * the saver was instructed not to keep partially downloaded data.
    */
   entityID: null,
 
   /**
    * Implements "DownloadSaver.execute".
    */
-  execute: function DCS_execute(aSetProgressBytesFn, aSetPropertiesFn)
-  {
+  execute: function DCS_execute(aSetProgressBytesFn, aSetPropertiesFn) {
     let copySaver = this;
 
     this._canceled = false;
 
     let download = this.download;
     let targetPath = download.target.path;
     let partFilePath = download.target.partFilePath;
     let keepPartialData = download.tryToKeepPartialData;
@@ -2020,18 +1993,17 @@ this.DownloadCopySaver.prototype = {
               }
             }
           }
 
           channel.notificationCallbacks = {
             QueryInterface: XPCOMUtils.generateQI([Ci.nsIInterfaceRequestor]),
             getInterface: XPCOMUtils.generateQI([Ci.nsIProgressEventSink]),
             onProgress: function DCSE_onProgress(aRequest, aContext, aProgress,
-                                                 aProgressMax)
-            {
+                                                 aProgressMax) {
               let currentBytes = resumeFromBytes + aProgress;
               let totalBytes = aProgressMax == -1 ? -1 : (resumeFromBytes +
                                                           aProgressMax);
               aSetProgressBytesFn(currentBytes, totalBytes, aProgress > 0 &&
                                   partFilePath && keepPartialData);
             },
             onStatus() { },
           };
@@ -2240,80 +2212,74 @@ this.DownloadCopySaver.prototype = {
     if (partFilePath) {
       yield OS.File.move(partFilePath, targetPath);
     }
   }),
 
   /**
    * Implements "DownloadSaver.cancel".
    */
-  cancel: function DCS_cancel()
-  {
+  cancel: function DCS_cancel() {
     this._canceled = true;
     if (this._backgroundFileSaver) {
       this._backgroundFileSaver.finish(Cr.NS_ERROR_FAILURE);
       this._backgroundFileSaver = null;
     }
   },
 
   /**
    * Implements "DownloadSaver.removePartialData".
    */
-  removePartialData()
-  {
+  removePartialData() {
     return Task.spawn(function* task_DCS_removePartialData() {
       if (this.download.target.partFilePath) {
         try {
           yield OS.File.remove(this.download.target.partFilePath);
         } catch (ex) {
           if (!(ex instanceof OS.File.Error) || !ex.becauseNoSuchFile) {
             throw ex;
           }
         }
       }
     }.bind(this));
   },
 
   /**
    * Implements "DownloadSaver.toSerializable".
    */
-  toSerializable()
-  {
+  toSerializable() {
     // Simplify the representation if we don't have other details.
     if (!this.entityID && !this._unknownProperties) {
       return "copy";
     }
 
     let serializable = { type: "copy",
                          entityID: this.entityID };
     serializeUnknownProperties(this, serializable);
     return serializable;
   },
 
   /**
    * Implements "DownloadSaver.getSha256Hash"
    */
-  getSha256Hash()
-  {
+  getSha256Hash() {
     return this._sha256Hash;
   },
 
   /*
    * Implements DownloadSaver.getSignatureInfo.
    */
-  getSignatureInfo()
-  {
+  getSignatureInfo() {
     return this._signatureInfo;
   },
 
   /*
    * Implements DownloadSaver.getRedirects.
    */
-  getRedirects()
-  {
+  getRedirects() {
     return this._redirects;
   }
 };
 
 /**
  * Creates a new DownloadCopySaver object, with its initial state derived from
  * its serializable representation.
  *
@@ -2336,18 +2302,17 @@ this.DownloadCopySaver.fromSerializable 
 
 // DownloadLegacySaver
 
 /**
  * Saver object that integrates with the legacy nsITransfer interface.
  *
  * For more background on the process, see the DownloadLegacyTransfer object.
  */
-this.DownloadLegacySaver = function()
-{
+this.DownloadLegacySaver = function() {
   this.deferExecuted = Promise.defer();
   this.deferCanceled = Promise.defer();
 }
 
 this.DownloadLegacySaver.prototype = {
   __proto__: DownloadSaver.prototype,
 
   /**
@@ -2400,18 +2365,17 @@ this.DownloadLegacySaver.prototype = {
   /**
    * Called by the nsITransfer implementation while the download progresses.
    *
    * @param aCurrentBytes
    *        Number of bytes transferred until now.
    * @param aTotalBytes
    *        Total number of bytes to be transferred, or -1 if unknown.
    */
-  onProgressBytes: function DLS_onProgressBytes(aCurrentBytes, aTotalBytes)
-  {
+  onProgressBytes: function DLS_onProgressBytes(aCurrentBytes, aTotalBytes) {
     this.progressWasNotified = true;
 
     // Ignore progress notifications until we are ready to process them.
     if (!this.setProgressBytesFn) {
       // Keep the data from the last progress notification that was received.
       this.currentBytes = aCurrentBytes;
       this.totalBytes = aTotalBytes;
       return;
@@ -2435,18 +2399,17 @@ this.DownloadLegacySaver.prototype = {
    *        nsIRequest associated to the status update.
    * @param aAlreadyAddedToHistory
    *        Indicates that the nsIExternalHelperAppService component already
    *        added the download to the browsing history, unless it was started
    *        from a private browsing window.  When this parameter is false, the
    *        download is added to the browsing history here.  Private downloads
    *        are never added to history even if this parameter is false.
    */
-  onTransferStarted(aRequest, aAlreadyAddedToHistory)
-  {
+  onTransferStarted(aRequest, aAlreadyAddedToHistory) {
     // Store the entity ID to use for resuming if required.
     if (this.download.tryToKeepPartialData &&
         aRequest instanceof Ci.nsIResumableChannel) {
       try {
         // If reading the ID succeeds, the source is resumable.
         this.entityID = aRequest.entityID;
       } catch (ex) {
         if (!(ex instanceof Components.Exception) ||
@@ -2469,18 +2432,17 @@ this.DownloadLegacySaver.prototype = {
   /**
    * Called by the nsITransfer implementation when the request has finished.
    *
    * @param aRequest
    *        nsIRequest associated to the status update.
    * @param aStatus
    *        Status code received by the nsITransfer implementation.
    */
-  onTransferFinished: function DLS_onTransferFinished(aRequest, aStatus)
-  {
+  onTransferFinished: function DLS_onTransferFinished(aRequest, aStatus) {
     // Store a reference to the request, used when handling completion.
     this.request = aRequest;
 
     if (Components.isSuccessCode(aStatus)) {
       this.deferExecuted.resolve();
     } else {
       // Infer the origin of the error from the failure code, because more
       // specific data is not available through the nsITransfer implementation.
@@ -2508,18 +2470,17 @@ this.DownloadLegacySaver.prototype = {
    * used to execute the download, or null if the channel was not resumable or
    * the saver was instructed not to keep partially downloaded data.
    */
   entityID: null,
 
   /**
    * Implements "DownloadSaver.execute".
    */
-  execute: function DLS_execute(aSetProgressBytesFn, aSetPropertiesFn)
-  {
+  execute: function DLS_execute(aSetProgressBytesFn, aSetPropertiesFn) {
     // Check if this is not the first execution of the download.  The Download
     // object guarantees that this function is not re-entered during execution.
     if (this.firstExecutionFinished) {
       if (!this.copySaver) {
         this.copySaver = new DownloadCopySaver();
         this.copySaver.download = this.download;
         this.copySaver.entityID = this.entityID;
         this.copySaver.alreadyAddedToHistory = true;
@@ -2606,109 +2567,100 @@ this.DownloadLegacySaver.prototype = {
   _checkReputationAndMove() {
     return DownloadCopySaver.prototype._checkReputationAndMove
                                       .apply(this, arguments);
   },
 
   /**
    * Implements "DownloadSaver.cancel".
    */
-  cancel: function DLS_cancel()
-  {
+  cancel: function DLS_cancel() {
     // We may be using a DownloadCopySaver to handle resuming.
     if (this.copySaver) {
       return this.copySaver.cancel.apply(this.copySaver, arguments);
     }
 
     // If the download hasn't stopped already, resolve deferCanceled so that the
     // operation is canceled as soon as a cancellation handler is registered.
     // Note that the handler might not have been registered yet.
     if (this.deferCanceled) {
       this.deferCanceled.resolve();
     }
   },
 
   /**
    * Implements "DownloadSaver.removePartialData".
    */
-  removePartialData()
-  {
+  removePartialData() {
     // DownloadCopySaver and DownloadLeagcySaver use the same logic for removing
     // partially downloaded data, though this implementation isn't shared by
     // other saver types, thus it isn't found on their shared prototype.
     return DownloadCopySaver.prototype.removePartialData.call(this);
   },
 
   /**
    * Implements "DownloadSaver.toSerializable".
    */
-  toSerializable()
-  {
+  toSerializable() {
     // This object depends on legacy components that are created externally,
     // thus it cannot be rebuilt during deserialization.  To support resuming
     // across different browser sessions, this object is transformed into a
     // DownloadCopySaver for the purpose of serialization.
     return DownloadCopySaver.prototype.toSerializable.call(this);
   },
 
   /**
    * Implements "DownloadSaver.getSha256Hash".
    */
-  getSha256Hash()
-  {
+  getSha256Hash() {
     if (this.copySaver) {
       return this.copySaver.getSha256Hash();
     }
     return this._sha256Hash;
   },
 
   /**
    * Called by the nsITransfer implementation when the hash is available.
    */
-  setSha256Hash(hash)
-  {
+  setSha256Hash(hash) {
     this._sha256Hash = hash;
   },
 
   /**
    * Implements "DownloadSaver.getSignatureInfo".
    */
-  getSignatureInfo()
-  {
+  getSignatureInfo() {
     if (this.copySaver) {
       return this.copySaver.getSignatureInfo();
     }
     return this._signatureInfo;
   },
 
   /**
    * Called by the nsITransfer implementation when the hash is available.
    */
-  setSignatureInfo(signatureInfo)
-  {
+  setSignatureInfo(signatureInfo) {
     this._signatureInfo = signatureInfo;
   },
 
   /**
    * Implements "DownloadSaver.getRedirects".
    */
-  getRedirects()
-  {
+  getRedirects() {
     if (this.copySaver) {
       return this.copySaver.getRedirects();
     }
     return this._redirects;
   },
 
   /**
    * Called by the nsITransfer implementation when the redirect chain is
    * available.
    */
-  setRedirects(redirects)
-  {
+  setRedirects(redirects) {
     this._redirects = redirects;
   },
 };
 
 /**
  * Returns a new DownloadLegacySaver object.  This saver type has a
  * deserializable form only when creating a new object in memory, because it
  * cannot be serialized to disk.
@@ -2741,18 +2693,17 @@ this.DownloadPDFSaver.prototype = {
    * This is null when saving has not started or has completed,
    * or while the operation is being canceled.
    */
   _webBrowserPrint: null,
 
   /**
    * Implements "DownloadSaver.execute".
    */
-  execute(aSetProgressBytesFn, aSetPropertiesFn)
-  {
+  execute(aSetProgressBytesFn, aSetPropertiesFn) {
     return Task.spawn(function* task_DCS_execute() {
       if (!this.download.source.windowRef) {
         throw new DownloadError({
           message: "PDF saver must be passed an open window, and cannot be restarted.",
           becauseSourceFailed: true,
         });
       }
 
@@ -2829,29 +2780,27 @@ this.DownloadPDFSaver.prototype = {
       let fileInfo = yield OS.File.stat(targetPath);
       aSetProgressBytesFn(fileInfo.size, fileInfo.size, false);
     }.bind(this));
   },
 
   /**
    * Implements "DownloadSaver.cancel".
    */
-  cancel: function DCS_cancel()
-  {
+  cancel: function DCS_cancel() {
     if (this._webBrowserPrint) {
       this._webBrowserPrint.cancel();
       this._webBrowserPrint = null;
     }
   },
 
   /**
    * Implements "DownloadSaver.toSerializable".
    */
-  toSerializable()
-  {
+  toSerializable() {
     if (this.download.succeeded) {
       return DownloadCopySaver.prototype.toSerializable.call(this);
     }
 
     // This object needs a window to recreate itself. If it didn't succeded
     // it will not be possible to restart. Returning null here will
     // prevent us from serializing it at all.
     return null;
--- a/toolkit/components/jsdownloads/src/DownloadImport.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadImport.jsm
@@ -46,18 +46,17 @@ const DOWNLOAD_QUEUED = 5;
 /**
  * Provides an object that has a method to import downloads
  * from the previous SQLite storage format.
  *
  * @param aList   A DownloadList where each successfully
  *                imported download will be added.
  * @param aPath   The path to the database file.
  */
-this.DownloadImport = function(aList, aPath)
-{
+this.DownloadImport = function(aList, aPath) {
   this.list = aList;
   this.path = aPath;
 }
 
 this.DownloadImport.prototype = {
   /**
    * Imports unfinished downloads from the previous SQLite storage
    * format (supporting schemas 7 and up), to the new Download object
--- a/toolkit/components/jsdownloads/src/DownloadLegacy.js
+++ b/toolkit/components/jsdownloads/src/DownloadLegacy.js
@@ -55,35 +55,33 @@ XPCOMUtils.defineLazyModuleGetter(this, 
  * The component that executes the download implements nsICancelable to receive
  * cancellation requests, but after cancellation it cannot be reused again.
  *
  * Since the components that execute the download may be different and they
  * don't always give consistent results, this bridge takes care of enforcing the
  * expectations, for example by ensuring the target file exists when the
  * download is successful, even if the source has a size of zero bytes.
  */
-function DownloadLegacyTransfer()
-{
+function DownloadLegacyTransfer() {
   this._deferDownload = Promise.defer();
 }
 
 DownloadLegacyTransfer.prototype = {
   classID: Components.ID("{1b4c85df-cbdd-4bb6-b04e-613caece083c}"),
 
   // nsISupports
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
                                          Ci.nsIWebProgressListener2,
                                          Ci.nsITransfer]),
 
   // nsIWebProgressListener
 
   onStateChange: function DLT_onStateChange(aWebProgress, aRequest, aStateFlags,
-                                            aStatus)
-  {
+                                            aStatus) {
     if (!Components.isSuccessCode(aStatus)) {
       this._componentFailed = true;
     }
 
     if ((aStateFlags & Ci.nsIWebProgressListener.STATE_START) &&
         (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK)) {
 
       let blockedByParentalControls = false;
@@ -154,28 +152,26 @@ DownloadLegacyTransfer.prototype = {
       this._cancelable = null;
     }
   },
 
   onProgressChange: function DLT_onProgressChange(aWebProgress, aRequest,
                                                   aCurSelfProgress,
                                                   aMaxSelfProgress,
                                                   aCurTotalProgress,
-                                                  aMaxTotalProgress)
-  {
+                                                  aMaxTotalProgress) {
     this.onProgressChange64(aWebProgress, aRequest, aCurSelfProgress,
                             aMaxSelfProgress, aCurTotalProgress,
                             aMaxTotalProgress);
   },
 
   onLocationChange() { },
 
   onStatusChange: function DLT_onStatusChange(aWebProgress, aRequest, aStatus,
-                                              aMessage)
-  {
+                                              aMessage) {
     // The status change may optionally be received in addition to the state
     // change, but if no network request actually started, it is possible that
     // we only receive a status change with an error status code.
     if (!Components.isSuccessCode(aStatus)) {
       this._componentFailed = true;
 
       // Wait for the associated Download object to be available.
       this._deferDownload.promise.then(function DLT_OSC_onDownload(aDownload) {
@@ -187,37 +183,34 @@ DownloadLegacyTransfer.prototype = {
   onSecurityChange() { },
 
   // nsIWebProgressListener2
 
   onProgressChange64: function DLT_onProgressChange64(aWebProgress, aRequest,
                                                       aCurSelfProgress,
                                                       aMaxSelfProgress,
                                                       aCurTotalProgress,
-                                                      aMaxTotalProgress)
-  {
+                                                      aMaxTotalProgress) {
     // Wait for the associated Download object to be available.
     this._deferDownload.promise.then(function DLT_OPC64_onDownload(aDownload) {
       aDownload.saver.onProgressBytes(aCurTotalProgress, aMaxTotalProgress);
     }).then(null, Cu.reportError);
   },
 
   onRefreshAttempted: function DLT_onRefreshAttempted(aWebProgress, aRefreshURI,
-                                                      aMillis, aSameURI)
-  {
+                                                      aMillis, aSameURI) {
     // Indicate that refreshes and redirects are allowed by default.  However,
     // note that download components don't usually call this method at all.
     return true;
   },
 
   // nsITransfer
 
   init: function DLT_init(aSource, aTarget, aDisplayName, aMIMEInfo, aStartTime,
-                          aTempFile, aCancelable, aIsPrivate)
-  {
+                          aTempFile, aCancelable, aIsPrivate) {
     this._cancelable = aCancelable;
 
     let launchWhenSucceeded = false, contentType = null, launcherPath = null;
 
     if (aMIMEInfo instanceof Ci.nsIMIMEInfo) {
       launchWhenSucceeded =
                 aMIMEInfo.preferredAction != Ci.nsIMIMEInfo.saveToDisk;
       contentType = aMIMEInfo.type;
@@ -252,28 +245,25 @@ DownloadLegacyTransfer.prototype = {
       // Start processing all the other events received through nsITransfer.
       this._deferDownload.resolve(aDownload);
 
       // Add the download to the list, allowing it to be seen and canceled.
       return Downloads.getList(Downloads.ALL).then(list => list.add(aDownload));
     }.bind(this)).then(null, Cu.reportError);
   },
 
-  setSha256Hash(hash)
-  {
+  setSha256Hash(hash) {
     this._sha256Hash = hash;
   },
 
-  setSignatureInfo(signatureInfo)
-  {
+  setSignatureInfo(signatureInfo) {
     this._signatureInfo = signatureInfo;
   },
 
-  setRedirects(redirects)
-  {
+  setRedirects(redirects) {
     this._redirects = redirects;
   },
 
   // Private methods and properties
 
   /**
    * This deferred object contains a promise that is resolved with the Download
    * object associated with this nsITransfer instance, when it is available.
--- a/toolkit/components/jsdownloads/src/DownloadList.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadList.jsm
@@ -41,18 +41,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/Task.jsm");
 
 // DownloadList
 
 /**
  * Represents a collection of Download objects that can be viewed and managed by
  * the user interface, and persisted across sessions.
  */
-this.DownloadList = function()
-{
+this.DownloadList = function() {
   this._downloads = [];
   this._views = new Set();
 }
 
 this.DownloadList.prototype = {
   /**
    * Array of Download objects currently in the list.
    */
@@ -156,18 +155,17 @@ this.DownloadList.prototype = {
    *          },
    *        }
    *
    * @return {Promise}
    * @resolves When the view has been registered and all the onDownloadAdded
    *           notifications for the existing downloads have been sent.
    * @rejects JavaScript exception.
    */
-  addView: function DL_addView(aView)
-  {
+  addView: function DL_addView(aView) {
     this._views.add(aView);
 
     if ("onDownloadAdded" in aView) {
       for (let download of this._downloads) {
         try {
           aView.onDownloadAdded(download);
         } catch (ex) {
           Cu.reportError(ex);
@@ -184,18 +182,17 @@ this.DownloadList.prototype = {
    * @param aView
    *        The view object to remove.
    *
    * @return {Promise}
    * @resolves When the view has been removed.  At this point, the removed view
    *           will not receive any more notifications.
    * @rejects JavaScript exception.
    */
-  removeView: function DL_removeView(aView)
-  {
+  removeView: function DL_removeView(aView) {
     this._views.delete(aView);
 
     return Promise.resolve();
   },
 
   /**
    * Notifies all the views of a download addition, change, or removal.
    *
@@ -262,18 +259,17 @@ this.DownloadList.prototype = {
  * underlying lists, based on their "source.isPrivate" property.  Views on this
  * list will receive notifications for both public and private downloads.
  *
  * @param aPublicList
  *        Underlying DownloadList containing public downloads.
  * @param aPrivateList
  *        Underlying DownloadList containing private downloads.
  */
-this.DownloadCombinedList = function(aPublicList, aPrivateList)
-{
+this.DownloadCombinedList = function(aPublicList, aPrivateList) {
   DownloadList.call(this);
   this._publicList = aPublicList;
   this._privateList = aPrivateList;
   aPublicList.addView(this).then(null, Cu.reportError);
   aPrivateList.addView(this).then(null, Cu.reportError);
 }
 
 this.DownloadCombinedList.prototype = {
@@ -300,18 +296,17 @@ this.DownloadCombinedList.prototype = {
    *
    * @param aDownload
    *        The Download object to add.
    *
    * @return {Promise}
    * @resolves When the download has been added.
    * @rejects JavaScript exception.
    */
-  add(aDownload)
-  {
+  add(aDownload) {
     if (aDownload.source.isPrivate) {
       return this._privateList.add(aDownload);
     }
     return this._publicList.add(aDownload);
   },
 
   /**
    * Removes a download from the list.  If the download was already removed,
@@ -324,54 +319,49 @@ this.DownloadCombinedList.prototype = {
    *
    * @param aDownload
    *        The Download object to remove.
    *
    * @return {Promise}
    * @resolves When the download has been removed.
    * @rejects JavaScript exception.
    */
-  remove(aDownload)
-  {
+  remove(aDownload) {
     if (aDownload.source.isPrivate) {
       return this._privateList.remove(aDownload);
     }
     return this._publicList.remove(aDownload);
   },
 
   // DownloadList view
 
-  onDownloadAdded(aDownload)
-  {
+  onDownloadAdded(aDownload) {
     this._downloads.push(aDownload);
     this._notifyAllViews("onDownloadAdded", aDownload);
   },
 
-  onDownloadChanged(aDownload)
-  {
+  onDownloadChanged(aDownload) {
     this._notifyAllViews("onDownloadChanged", aDownload);
   },
 
-  onDownloadRemoved(aDownload)
-  {
+  onDownloadRemoved(aDownload) {
     let index = this._downloads.indexOf(aDownload);
     if (index != -1) {
       this._downloads.splice(index, 1);
     }
     this._notifyAllViews("onDownloadRemoved", aDownload);
   },
 };
 
 // DownloadSummary
 
 /**
  * Provides an aggregated view on the contents of a DownloadList.
  */
-this.DownloadSummary = function()
-{
+this.DownloadSummary = function() {
   this._downloads = [];
   this._views = new Set();
 }
 
 this.DownloadSummary.prototype = {
   /**
    * Array of Download objects that are currently part of the summary.
    */
@@ -391,18 +381,17 @@ this.DownloadSummary.prototype = {
    *
    * @param aList
    *        Underlying DownloadList whose contents should be summarized.
    *
    * @return {Promise}
    * @resolves When the view on the underlying list has been registered.
    * @rejects JavaScript exception.
    */
-  bindToList(aList)
-  {
+  bindToList(aList) {
     if (this._list) {
       throw new Error("bindToList may be called only once.");
     }
 
     return aList.addView(this).then(() => {
       // Set the list reference only after addView has returned, so that we don't
       // send a notification to our views for each download that is added.
       this._list = aList;
@@ -427,18 +416,17 @@ this.DownloadSummary.prototype = {
    *          },
    *        }
    *
    * @return {Promise}
    * @resolves When the view has been registered and the onSummaryChanged
    *           notification has been sent.
    * @rejects JavaScript exception.
    */
-  addView(aView)
-  {
+  addView(aView) {
     this._views.add(aView);
 
     if ("onSummaryChanged" in aView) {
       try {
         aView.onSummaryChanged();
       } catch (ex) {
         Cu.reportError(ex);
       }
@@ -453,18 +441,17 @@ this.DownloadSummary.prototype = {
    * @param aView
    *        The view object to remove.
    *
    * @return {Promise}
    * @resolves When the view has been removed.  At this point, the removed view
    *           will not receive any more notifications.
    * @rejects JavaScript exception.
    */
-  removeView(aView)
-  {
+  removeView(aView) {
     this._views.delete(aView);
 
     return Promise.resolve();
   },
 
   /**
    * Indicates whether all the downloads are currently stopped.
    */
@@ -530,30 +517,27 @@ this.DownloadSummary.prototype = {
       } catch (ex) {
         Cu.reportError(ex);
       }
     }
   },
 
   // DownloadList view
 
-  onDownloadAdded(aDownload)
-  {
+  onDownloadAdded(aDownload) {
     this._downloads.push(aDownload);
     if (this._list) {
       this._onListChanged();
     }
   },
 
-  onDownloadChanged(aDownload)
-  {
+  onDownloadChanged(aDownload) {
     this._onListChanged();
   },
 
-  onDownloadRemoved(aDownload)
-  {
+  onDownloadRemoved(aDownload) {
     let index = this._downloads.indexOf(aDownload);
     if (index != -1) {
       this._downloads.splice(index, 1);
     }
     this._onListChanged();
   },
 };
--- a/toolkit/components/jsdownloads/src/DownloadStore.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadStore.jsm
@@ -64,18 +64,17 @@ XPCOMUtils.defineLazyGetter(this, "gText
  * Handles serialization of Download objects and persistence into a file, so
  * that the state of downloads can be restored across sessions.
  *
  * @param aList
  *        DownloadList object to be populated or serialized.
  * @param aPath
  *        String containing the file path where data should be saved.
  */
-this.DownloadStore = function(aList, aPath)
-{
+this.DownloadStore = function(aList, aPath) {
   this.list = aList;
   this.path = aPath;
 }
 
 this.DownloadStore.prototype = {
   /**
    * DownloadList object to be populated or serialized.
    */
@@ -94,18 +93,17 @@ this.DownloadStore.prototype = {
 
   /**
    * Loads persistent downloads from the file to the list.
    *
    * @return {Promise}
    * @resolves When the operation finished successfully.
    * @rejects JavaScript exception.
    */
-  load: function DS_load()
-  {
+  load: function DS_load() {
     return Task.spawn(function* task_DS_load() {
       let bytes;
       try {
         bytes = yield OS.File.read(this.path);
       } catch (ex) {
         if (!(ex instanceof OS.File.Error) || !ex.becauseNoSuchFile) {
           throw ex;
         }
@@ -147,18 +145,17 @@ this.DownloadStore.prototype = {
    * Saves persistent downloads from the list to the file.
    *
    * If an error occurs, the previous file is not deleted.
    *
    * @return {Promise}
    * @resolves When the operation finished successfully.
    * @rejects JavaScript exception.
    */
-  save: function DS_save()
-  {
+  save: function DS_save() {
     return Task.spawn(function* task_DS_save() {
       let downloads = yield this.list.getAll();
 
       // Take a static snapshot of the current state of all the downloads.
       let storeData = { list: [] };
       let atLeastOneDownload = false;
       for (let download of downloads) {
         try {
--- a/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
@@ -58,18 +58,17 @@ this.DownloadUIHelper = {
    *
    * @param aParent
    *        If specified, should reference the nsIDOMWindow to which the prompts
    *        should be attached.  If omitted, the prompts will be attached to the
    *        most recently active window.
    *
    * @return A DownloadPrompter object.
    */
-  getPrompter(aParent)
-  {
+  getPrompter(aParent) {
     return new DownloadPrompter(aParent || null);
   },
 };
 
 /**
  * Returns an object whose keys are the string names from the downloads string
  * bundle, and whose values are either the translated strings or functions
  * returning formatted strings.
@@ -99,18 +98,17 @@ XPCOMUtils.defineLazyGetter(DownloadUIHe
 
 /**
  * Allows displaying prompts related to downloads.
  *
  * @param aParent
  *        The nsIDOMWindow to which prompts should be attached, or null to
  *        attach prompts to the most recently active window.
  */
-this.DownloadPrompter = function(aParent)
-{
+this.DownloadPrompter = function(aParent) {
   if (AppConstants.MOZ_B2G) {
     // On B2G there is no prompter implementation.
     this._prompter = null;
   } else {
     this._prompter = Services.ww.getNewPrompter(aParent);
   }
 }
 
@@ -134,18 +132,17 @@ this.DownloadPrompter.prototype = {
    *
    * @param aPath
    *        String containing the full path to the file to be opened.
    *
    * @return {Promise}
    * @resolves Boolean indicating whether the launch operation can continue.
    * @rejects JavaScript exception.
    */
-  confirmLaunchExecutable(aPath)
-  {
+  confirmLaunchExecutable(aPath) {
     const kPrefAlertOnEXEOpen = "browser.download.manager.alertOnEXEOpen";
 
     try {
       // Always launch in case we have no prompter implementation.
       if (!this._prompter) {
         return Promise.resolve(true);
       }
 
@@ -185,18 +182,17 @@ this.DownloadPrompter.prototype = {
    *        The current downloads count.
    * @param aPromptType
    *        The type of prompt notification depending on the observer.
    *
    * @return False to cancel the downloads and continue, true to abort the
    *         operation.
    */
   confirmCancelDownloads: function DP_confirmCancelDownload(aDownloadsCount,
-                                                            aPromptType)
-  {
+                                                            aPromptType) {
     // Always continue in case we have no prompter implementation, or if there
     // are no active downloads.
     if (!this._prompter || aDownloadsCount <= 0) {
       return false;
     }
 
     let s = DownloadUIHelper.strings;
     let buttonFlags = (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_0) +
--- a/toolkit/components/jsdownloads/src/Downloads.jsm
+++ b/toolkit/components/jsdownloads/src/Downloads.jsm
@@ -97,18 +97,17 @@ this.Downloads = {
    *                 If omitted, defaults to "copy".  Alternatively, may be the
    *                 serializable representation of a DownloadSaver object.
    *        }
    *
    * @return {Promise}
    * @resolves The newly created Download object.
    * @rejects JavaScript exception.
    */
-  createDownload: function D_createDownload(aProperties)
-  {
+  createDownload: function D_createDownload(aProperties) {
     try {
       return Promise.resolve(Download.fromSerializable(aProperties));
     } catch (ex) {
       return Promise.reject(ex);
     }
   },
 
   /**
@@ -165,18 +164,17 @@ this.Downloads = {
    *        are reflected in the Downloads.ALL list, and downloads added to the
    *        Downloads.ALL list are also added to either the Downloads.PUBLIC or
    *        the Downloads.PRIVATE list based on their properties.
    *
    * @return {Promise}
    * @resolves The requested DownloadList or DownloadCombinedList object.
    * @rejects JavaScript exception.
    */
-  getList(aType)
-  {
+  getList(aType) {
     if (!this._promiseListsInitialized) {
       this._promiseListsInitialized = Task.spawn(function* () {
         let publicList = new DownloadList();
         let privateList = new DownloadList();
         let combinedList = new DownloadCombinedList(publicList, privateList);
 
         try {
           yield DownloadIntegration.addListObservers(publicList, false);
@@ -227,18 +225,17 @@ this.Downloads = {
    *
    * @param aType
    *        This can be Downloads.PUBLIC, Downloads.PRIVATE, or Downloads.ALL.
    *
    * @return {Promise}
    * @resolves The requested DownloadList or DownloadCombinedList object.
    * @rejects JavaScript exception.
    */
-  getSummary(aType)
-  {
+  getSummary(aType) {
     if (aType != Downloads.PUBLIC && aType != Downloads.PRIVATE &&
         aType != Downloads.ALL) {
       throw new Error("Invalid aType argument.");
     }
 
     if (!(aType in this._summaries)) {
       this._summaries[aType] = new DownloadSummary();
     }
--- a/toolkit/components/jsdownloads/test/browser/head.js
+++ b/toolkit/components/jsdownloads/test/browser/head.js
@@ -50,18 +50,17 @@ var gFileCounter = Math.floor(Math.rando
  *
  * @return nsIFile pointing to a non-existent file in a temporary directory.
  *
  * @note It is not enough to delete the file if it exists, or to delete the file
  *       after calling nsIFile.createUnique, because on Windows the delete
  *       operation in the file system may still be pending, preventing a new
  *       file with the same name to be created.
  */
-function getTempFile(aLeafName)
-{
+function getTempFile(aLeafName) {
   // Prepend a serial number to the extension in the suggested leaf name.
   let [base, ext] = DownloadPaths.splitBaseNameAndExtension(aLeafName);
   let leafName = base + "-" + gFileCounter + ext;
   gFileCounter++;
 
   // Get a file reference under the temporary directory for this test file.
   let file = FileUtils.getFile("TmpD", [leafName]);
   ok(!file.exists(), "Temp file does not exist");
--- a/toolkit/components/jsdownloads/test/unit/common_test_Download.js
+++ b/toolkit/components/jsdownloads/test/unit/common_test_Download.js
@@ -173,18 +173,17 @@ function waitForDirectoryShown() {
 
 // Tests
 
 /**
  * Executes a download and checks its basic properties after construction.
  * The download is started by constructing the simplest Download object with
  * the "copy" saver, or using the legacy nsITransfer interface.
  */
-add_task(function* test_basic()
-{
+add_task(function* test_basic() {
   let targetFile = getTempFile(TEST_TARGET_FILE_NAME);
 
   let download;
   if (!gUseLegacySaver) {
     // When testing DownloadCopySaver, we have control over the download, thus
     // we can check its basic properties before it starts.
     download = yield Downloads.createDownload({
       source: { url: httpUrl("source.txt") },
@@ -214,33 +213,31 @@ add_task(function* test_basic()
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
 });
 
 /**
  * Executes a download with the tryToKeepPartialData property set, and ensures
  * that the file is saved correctly.  When testing DownloadLegacySaver, the
  * download is executed using the nsIExternalHelperAppService component.
  */
-add_task(function* test_basic_tryToKeepPartialData()
-{
+add_task(function* test_basic_tryToKeepPartialData() {
   let download = yield promiseStartDownload_tryToKeepPartialData();
   continueResponses();
   yield promiseDownloadStopped(download);
 
   // The target file should now have been created, and the ".part" file deleted.
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
   do_check_false(yield OS.File.exists(download.target.partFilePath));
   do_check_eq(32, download.saver.getSha256Hash().length);
 });
 
 /**
  * Tests the permissions of the final target file once the download finished.
  */
-add_task(function* test_unix_permissions()
-{
+add_task(function* test_unix_permissions() {
   // This test is only executed on some Desktop systems.
   if (Services.appinfo.OS != "Darwin" && Services.appinfo.OS != "Linux" &&
       Services.appinfo.OS != "WINNT") {
     do_print("Skipping test.");
     return;
   }
 
   let launcherPath = getTempFile("app-launcher").path;
@@ -292,18 +289,17 @@ add_task(function* test_unix_permissions
 
   // Clean up the changes to the preference.
   Services.prefs.clearUserPref(kDeleteTempFileOnExit);
 });
 
 /**
  * Checks the referrer for downloads.
  */
-add_task(function* test_referrer()
-{
+add_task(function* test_referrer() {
   let sourcePath = "/test_referrer.txt";
   let sourceUrl = httpUrl("test_referrer.txt");
   let targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
 
   function cleanup() {
     gHttpServer.registerPathHandler(sourcePath, null);
   }
   do_register_cleanup(cleanup);
@@ -339,18 +335,17 @@ add_task(function* test_referrer()
   yield download.start();
 
   cleanup();
 });
 
 /**
  * Checks the adjustChannel callback for downloads.
  */
-add_task(function* test_adjustChannel()
-{
+add_task(function* test_adjustChannel() {
   const sourcePath = "/test_post.txt";
   const sourceUrl = httpUrl("test_post.txt");
   const targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
   const customHeader = { name: "X-Answer", value: "42" };
   const postData = "Don't Panic";
 
   function cleanup() {
     gHttpServer.registerPathHandler(sourcePath, null);
@@ -391,18 +386,17 @@ add_task(function* test_adjustChannel()
   yield download.start();
 
   cleanup();
 });
 
 /**
  * Checks initial and final state and progress for a successful download.
  */
-add_task(function* test_initial_final_state()
-{
+add_task(function* test_initial_final_state() {
   let download;
   if (!gUseLegacySaver) {
     // When testing DownloadCopySaver, we have control over the download, thus
     // we can check its state before it starts.
     download = yield promiseNewDownload();
 
     do_check_true(download.stopped);
     do_check_false(download.succeeded);
@@ -429,18 +423,17 @@ add_task(function* test_initial_final_st
   do_check_true(isValidDate(download.startTime));
   do_check_true(download.target.exists);
   do_check_eq(download.target.size, TEST_DATA_SHORT.length);
 });
 
 /**
  * Checks the notification of the final download state.
  */
-add_task(function* test_final_state_notified()
-{
+add_task(function* test_final_state_notified() {
   mustInterruptResponses();
 
   let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
 
   let onchangeNotified = false;
   let lastNotifiedStopped;
   let lastNotifiedProgress;
   download.onchange = function() {
@@ -458,18 +451,17 @@ add_task(function* test_final_state_noti
   do_check_true(onchangeNotified);
   do_check_true(lastNotifiedStopped);
   do_check_eq(lastNotifiedProgress, 100);
 });
 
 /**
  * Checks intermediate progress for a successful download.
  */
-add_task(function* test_intermediate_progress()
-{
+add_task(function* test_intermediate_progress() {
   mustInterruptResponses();
 
   let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
 
   yield promiseDownloadMidway(download);
 
   do_check_true(download.hasProgress);
   do_check_eq(download.currentBytes, TEST_DATA_SHORT.length);
@@ -487,18 +479,17 @@ add_task(function* test_intermediate_pro
   do_check_eq(download.progress, 100);
 
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
 });
 
 /**
  * Downloads a file with a "Content-Length" of 0 and checks the progress.
  */
-add_task(function* test_empty_progress()
-{
+add_task(function* test_empty_progress() {
   let download = yield promiseStartDownload(httpUrl("empty.txt"));
   yield promiseDownloadStopped(download);
 
   do_check_true(download.stopped);
   do_check_true(download.hasProgress);
   do_check_eq(download.progress, 100);
   do_check_eq(download.currentBytes, 0);
   do_check_eq(download.totalBytes, 0);
@@ -510,18 +501,17 @@ add_task(function* test_empty_progress()
   do_check_true(download.target.exists);
   do_check_eq(download.target.size, 0);
 });
 
 /**
  * Downloads a file with a "Content-Length" of 0 with the tryToKeepPartialData
  * property set, and ensures that the file is saved correctly.
  */
-add_task(function* test_empty_progress_tryToKeepPartialData()
-{
+add_task(function* test_empty_progress_tryToKeepPartialData() {
   // Start a new download and configure it to keep partially downloaded data.
   let download;
   if (!gUseLegacySaver) {
     let targetFilePath = getTempFile(TEST_TARGET_FILE_NAME).path;
     download = yield Downloads.createDownload({
       source: httpUrl("empty.txt"),
       target: { path: targetFilePath,
                 partFilePath: targetFilePath + ".part" },
@@ -543,18 +533,17 @@ add_task(function* test_empty_progress_t
 
   do_check_false(yield OS.File.exists(download.target.partFilePath));
   do_check_eq(32, download.saver.getSha256Hash().length);
 });
 
 /**
  * Downloads an empty file with no "Content-Length" and checks the progress.
  */
-add_task(function* test_empty_noprogress()
-{
+add_task(function* test_empty_noprogress() {
   let sourcePath = "/test_empty_noprogress.txt";
   let sourceUrl = httpUrl("test_empty_noprogress.txt");
   let deferRequestReceived = Promise.defer();
 
   // Register an interruptible handler that notifies us when the request occurs.
   function cleanup() {
     gHttpServer.registerPathHandler(sourcePath, null);
   }
@@ -620,18 +609,17 @@ add_task(function* test_empty_noprogress
   do_check_eq(download.target.size, 0);
 
   do_check_eq((yield OS.File.stat(download.target.path)).size, 0);
 });
 
 /**
  * Calls the "start" method two times before the download is finished.
  */
-add_task(function* test_start_twice()
-{
+add_task(function* test_start_twice() {
   mustInterruptResponses();
 
   let download;
   if (!gUseLegacySaver) {
     // When testing DownloadCopySaver, we have control over the download, thus
     // we can start the download later during the test.
     download = yield promiseNewDownload(httpUrl("interruptible.txt"));
   } else {
@@ -657,18 +645,17 @@ add_task(function* test_start_twice()
   do_check_true(download.error === null);
 
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
 });
 
 /**
  * Cancels a download and verifies that its state is reported correctly.
  */
-add_task(function* test_cancel_midway()
-{
+add_task(function* test_cancel_midway() {
   mustInterruptResponses();
 
   // In this test case, we execute different checks that are only possible with
   // DownloadCopySaver or DownloadLegacySaver respectively.
   let download;
   let options = {};
   if (!gUseLegacySaver) {
     download = yield promiseNewDownload(httpUrl("interruptible.txt"));
@@ -737,18 +724,17 @@ add_task(function* test_cancel_midway()
     }
   }
 });
 
 /**
  * Cancels a download while keeping partially downloaded data, and verifies that
  * both the target file and the ".part" file are deleted.
  */
-add_task(function* test_cancel_midway_tryToKeepPartialData()
-{
+add_task(function* test_cancel_midway_tryToKeepPartialData() {
   let download = yield promiseStartDownload_tryToKeepPartialData();
 
   do_check_true(yield OS.File.exists(download.target.path));
   do_check_true(yield OS.File.exists(download.target.partFilePath));
 
   yield download.cancel();
   yield download.removePartialData();
 
@@ -758,18 +744,17 @@ add_task(function* test_cancel_midway_tr
 
   do_check_false(yield OS.File.exists(download.target.path));
   do_check_false(yield OS.File.exists(download.target.partFilePath));
 });
 
 /**
  * Cancels a download right after starting it.
  */
-add_task(function* test_cancel_immediately()
-{
+add_task(function* test_cancel_immediately() {
   mustInterruptResponses();
 
   let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
 
   let promiseAttempt = download.start();
   do_check_false(download.stopped);
 
   let promiseCancel = download.cancel();
@@ -797,18 +782,17 @@ add_task(function* test_cancel_immediate
 
   // Check that the promise returned by the "cancel" method has been resolved.
   yield promiseCancel;
 });
 
 /**
  * Cancels and restarts a download sequentially.
  */
-add_task(function* test_cancel_midway_restart()
-{
+add_task(function* test_cancel_midway_restart() {
   mustInterruptResponses();
 
   let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
 
   // The first time, cancel the download midway.
   yield promiseDownloadMidway(download);
   yield download.cancel();
 
@@ -839,18 +823,17 @@ add_task(function* test_cancel_midway_re
   do_check_true(download.error === null);
 
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
 });
 
 /**
  * Cancels a download and restarts it from where it stopped.
  */
-add_task(function* test_cancel_midway_restart_tryToKeepPartialData()
-{
+add_task(function* test_cancel_midway_restart_tryToKeepPartialData() {
   let download = yield promiseStartDownload_tryToKeepPartialData();
   yield download.cancel();
 
   do_check_true(download.stopped);
   do_check_true(download.hasPartialData);
 
   // The target file should not exist, but we should have kept the partial data.
   do_check_false(yield OS.File.exists(download.target.path));
@@ -893,18 +876,17 @@ add_task(function* test_cancel_midway_re
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
   do_check_false(yield OS.File.exists(download.target.partFilePath));
 });
 
 /**
  * Cancels a download while keeping partially downloaded data, then removes the
  * data and restarts the download from the beginning.
  */
-add_task(function* test_cancel_midway_restart_removePartialData()
-{
+add_task(function* test_cancel_midway_restart_removePartialData() {
   let download = yield promiseStartDownload_tryToKeepPartialData();
   yield download.cancel();
 
   do_check_true(download.hasPartialData);
   yield promiseVerifyContents(download.target.partFilePath, TEST_DATA_SHORT);
   do_check_false(download.target.exists);
   do_check_eq(download.target.size, 0);
 
@@ -927,18 +909,17 @@ add_task(function* test_cancel_midway_re
   do_check_false(yield OS.File.exists(download.target.partFilePath));
 });
 
 /**
  * Cancels a download while keeping partially downloaded data, then removes the
  * data and restarts the download from the beginning without keeping the partial
  * data anymore.
  */
-add_task(function* test_cancel_midway_restart_tryToKeepPartialData_false()
-{
+add_task(function* test_cancel_midway_restart_tryToKeepPartialData_false() {
   let download = yield promiseStartDownload_tryToKeepPartialData();
   yield download.cancel();
 
   download.tryToKeepPartialData = false;
 
   // The above property change does not affect existing partial data.
   do_check_true(download.hasPartialData);
   yield promiseVerifyContents(download.target.partFilePath, TEST_DATA_SHORT);
@@ -980,18 +961,17 @@ add_task(function* test_cancel_midway_re
   // The target file should now have been created, and the ".part" file deleted.
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
   do_check_false(yield OS.File.exists(download.target.partFilePath));
 });
 
 /**
  * Cancels a download right after starting it, then restarts it immediately.
  */
-add_task(function* test_cancel_immediately_restart_immediately()
-{
+add_task(function* test_cancel_immediately_restart_immediately() {
   mustInterruptResponses();
 
   let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
   let promiseAttempt = download.start();
 
   do_check_false(download.stopped);
 
   download.cancel();
@@ -1035,18 +1015,17 @@ add_task(function* test_cancel_immediate
   do_check_true(download.error === null);
 
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
 });
 
 /**
  * Cancels a download midway, then restarts it immediately.
  */
-add_task(function* test_cancel_midway_restart_immediately()
-{
+add_task(function* test_cancel_midway_restart_immediately() {
   mustInterruptResponses();
 
   let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
   let promiseAttempt = download.start();
 
   // The first time, cancel the download midway.
   yield promiseDownloadMidway(download);
   download.cancel();
@@ -1086,18 +1065,17 @@ add_task(function* test_cancel_midway_re
   do_check_true(download.error === null);
 
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
 });
 
 /**
  * Calls the "cancel" method on a successful download.
  */
-add_task(function* test_cancel_successful()
-{
+add_task(function* test_cancel_successful() {
   let download = yield promiseStartDownload();
   yield promiseDownloadStopped(download);
 
   // The cancel method should succeed with no effect.
   yield download.cancel();
 
   do_check_true(download.stopped);
   do_check_true(download.succeeded);
@@ -1105,18 +1083,17 @@ add_task(function* test_cancel_successfu
   do_check_true(download.error === null);
 
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
 });
 
 /**
  * Calls the "cancel" method two times in a row.
  */
-add_task(function* test_cancel_twice()
-{
+add_task(function* test_cancel_twice() {
   mustInterruptResponses();
 
   let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
 
   let promiseAttempt = download.start();
   do_check_false(download.stopped);
 
   let promiseCancel1 = download.cancel();
@@ -1144,18 +1121,17 @@ add_task(function* test_cancel_twice()
   do_check_true(download.error === null);
 
   do_check_false(yield OS.File.exists(download.target.path));
 });
 
 /**
  * Checks the "refresh" method for succeeded downloads.
  */
-add_task(function* test_refresh_succeeded()
-{
+add_task(function* test_refresh_succeeded() {
   let download = yield promiseStartDownload();
   yield promiseDownloadStopped(download);
 
   // The DownloadTarget properties should be the same after calling "refresh".
   yield download.refresh();
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
 
   // If the file is removed, only the "exists" property should change, and the
@@ -1169,18 +1145,17 @@ add_task(function* test_refresh_succeede
   yield OS.File.move(download.target.path + ".old", download.target.path);
   yield download.refresh();
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
 });
 
 /**
  * Checks that a download cannot be restarted after the "finalize" method.
  */
-add_task(function* test_finalize()
-{
+add_task(function* test_finalize() {
   mustInterruptResponses();
 
   let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
 
   let promiseFinalized = download.finalize();
 
   try {
     yield download.start();
@@ -1195,18 +1170,17 @@ add_task(function* test_finalize()
   do_check_true(download.error === null);
 
   do_check_false(yield OS.File.exists(download.target.path));
 });
 
 /**
  * Checks that the "finalize" method can remove partially downloaded data.
  */
-add_task(function* test_finalize_tryToKeepPartialData()
-{
+add_task(function* test_finalize_tryToKeepPartialData() {
   // Check finalization without removing partial data.
   let download = yield promiseStartDownload_tryToKeepPartialData();
   yield download.finalize();
 
   do_check_true(download.hasPartialData);
   do_check_true(yield OS.File.exists(download.target.partFilePath));
 
   // Clean up.
@@ -1218,18 +1192,17 @@ add_task(function* test_finalize_tryToKe
 
   do_check_false(download.hasPartialData);
   do_check_false(yield OS.File.exists(download.target.partFilePath));
 });
 
 /**
  * Checks that whenSucceeded returns a promise that is resolved after a restart.
  */
-add_task(function* test_whenSucceeded_after_restart()
-{
+add_task(function* test_whenSucceeded_after_restart() {
   mustInterruptResponses();
 
   let promiseSucceeded;
 
   let download;
   if (!gUseLegacySaver) {
     // When testing DownloadCopySaver, we have control over the download, thus
     // we can verify getting a reference before the first download attempt.
@@ -1259,18 +1232,17 @@ add_task(function* test_whenSucceeded_af
   do_check_true(download.error === null);
 
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT + TEST_DATA_SHORT);
 });
 
 /**
  * Ensures download error details are reported on network failures.
  */
-add_task(function* test_error_source()
-{
+add_task(function* test_error_source() {
   let serverSocket = startFakeServer();
   try {
     let sourceUrl = "http://localhost:" + serverSocket.port + "/source.txt";
 
     let download;
     try {
       if (!gUseLegacySaver) {
         // When testing DownloadCopySaver, we want to check that the promise
@@ -1310,18 +1282,17 @@ add_task(function* test_error_source()
     serverSocket.close();
   }
 });
 
 /**
  * Ensures a download error is reported when receiving less bytes than what was
  * specified in the Content-Length header.
  */
-add_task(function* test_error_source_partial()
-{
+add_task(function* test_error_source_partial() {
   let sourceUrl = httpUrl("shorter-than-content-length-http-1-1.txt");
 
   let enforcePref = Services.prefs.getBoolPref("network.http.enforce-framing.http1");
   Services.prefs.setBoolPref("network.http.enforce-framing.http1", true);
 
   function cleanup() {
     Services.prefs.setBoolPref("network.http.enforce-framing.http1", enforcePref);
   }
@@ -1364,18 +1335,17 @@ add_task(function* test_error_source_par
   do_check_false(yield OS.File.exists(download.target.path));
   do_check_false(download.target.exists);
   do_check_eq(download.target.size, 0);
 });
 
 /**
  * Ensures download error details are reported on local writing failures.
  */
-add_task(function* test_error_target()
-{
+add_task(function* test_error_target() {
   // Create a file without write access permissions before downloading.
   let targetFile = getTempFile(TEST_TARGET_FILE_NAME);
   targetFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0);
   try {
     let download;
     try {
       if (!gUseLegacySaver) {
         // When testing DownloadCopySaver, we want to check that the promise
@@ -1415,18 +1385,17 @@ add_task(function* test_error_target()
       targetFile.remove(false);
     }
   }
 });
 
 /**
  * Restarts a failed download.
  */
-add_task(function* test_error_restart()
-{
+add_task(function* test_error_restart() {
   let download;
 
   // Create a file without write access permissions before downloading.
   let targetFile = getTempFile(TEST_TARGET_FILE_NAME);
   targetFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0);
   try {
     // Use DownloadCopySaver or DownloadLegacySaver based on the test run,
     // specifying the target file we created.
@@ -1470,18 +1439,17 @@ add_task(function* test_error_restart()
   do_check_eq(download.progress, 100);
 
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
 });
 
 /**
  * Executes download in both public and private modes.
  */
-add_task(function* test_public_and_private()
-{
+add_task(function* test_public_and_private() {
   let sourcePath = "/test_public_and_private.txt";
   let sourceUrl = httpUrl("test_public_and_private.txt");
   let testCount = 0;
 
   // Apply pref to allow all cookies.
   Services.prefs.setIntPref("network.cookie.cookieBehavior", 0);
 
   function cleanup() {
@@ -1499,17 +1467,17 @@ add_task(function* test_public_and_priva
       do_check_false(aRequest.hasHeader("Cookie"));
       aResponse.setHeader("Set-Cookie", "foobar=1", false);
       testCount++;
     } else if (testCount == 1) {
       // The cookie should exists for second public download.
       do_check_true(aRequest.hasHeader("Cookie"));
       do_check_eq(aRequest.getHeader("Cookie"), "foobar=1");
       testCount++;
-    } else if (testCount == 2)  {
+    } else if (testCount == 2) {
       // No cookies should exist for first private download.
       do_check_false(aRequest.hasHeader("Cookie"));
     }
   });
 
   let targetFile = getTempFile(TEST_TARGET_FILE_NAME);
   yield Downloads.fetch(sourceUrl, targetFile);
   yield Downloads.fetch(sourceUrl, targetFile);
@@ -1527,18 +1495,17 @@ add_task(function* test_public_and_priva
   }
 
   cleanup();
 });
 
 /**
  * Checks the startTime gets updated even after a restart.
  */
-add_task(function* test_cancel_immediately_restart_and_check_startTime()
-{
+add_task(function* test_cancel_immediately_restart_and_check_startTime() {
   let download = yield promiseStartDownload();
 
   let startTime = download.startTime;
   do_check_true(isValidDate(download.startTime));
 
   yield download.cancel();
   do_check_eq(download.startTime.getTime(), startTime.getTime());
 
@@ -1547,18 +1514,17 @@ add_task(function* test_cancel_immediate
 
   yield download.start();
   do_check_true(download.startTime.getTime() > startTime.getTime());
 });
 
 /**
  * Executes download with content-encoding.
  */
-add_task(function* test_with_content_encoding()
-{
+add_task(function* test_with_content_encoding() {
   let sourcePath = "/test_with_content_encoding.txt";
   let sourceUrl = httpUrl("test_with_content_encoding.txt");
 
   function cleanup() {
     gHttpServer.registerPathHandler(sourcePath, null);
   }
   do_register_cleanup(cleanup);
 
@@ -1583,18 +1549,17 @@ add_task(function* test_with_content_enc
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
 
   cleanup();
 });
 
 /**
  * Checks that the file is not decoded if the extension matches the encoding.
  */
-add_task(function* test_with_content_encoding_ignore_extension()
-{
+add_task(function* test_with_content_encoding_ignore_extension() {
   let sourcePath = "/test_with_content_encoding_ignore_extension.gz";
   let sourceUrl = httpUrl("test_with_content_encoding_ignore_extension.gz");
 
   function cleanup() {
     gHttpServer.registerPathHandler(sourcePath, null);
   }
   do_register_cleanup(cleanup);
 
@@ -1622,18 +1587,17 @@ add_task(function* test_with_content_enc
         String.fromCharCode.apply(String, TEST_DATA_SHORT_GZIP_ENCODED));
 
   cleanup();
 });
 
 /**
  * Cancels and restarts a download sequentially with content-encoding.
  */
-add_task(function* test_cancel_midway_restart_with_content_encoding()
-{
+add_task(function* test_cancel_midway_restart_with_content_encoding() {
   mustInterruptResponses();
 
   let download = yield promiseStartDownload(httpUrl("interruptible_gzip.txt"));
 
   // The first time, cancel the download midway.
   let deferCancel = Promise.defer();
   let onchange = function() {
     if (!download.stopped && !download.canceled &&
@@ -1660,18 +1624,17 @@ add_task(function* test_cancel_midway_re
   do_check_eq(download.totalBytes, TEST_DATA_SHORT_GZIP_ENCODED.length);
 
   yield promiseVerifyTarget(download.target, TEST_DATA_SHORT);
 });
 
 /**
  * Download with parental controls enabled.
  */
-add_task(function* test_blocked_parental_controls()
-{
+add_task(function* test_blocked_parental_controls() {
   let blockFn = base => ({
     shouldBlockForParentalControls: () => Promise.resolve(true),
   });
 
   Integration.downloads.register(blockFn);
   function cleanup() {
     Integration.downloads.unregister(blockFn);
   }
@@ -1706,25 +1669,23 @@ add_task(function* test_blocked_parental
 
   cleanup();
 });
 
 /**
  * Test a download that will be blocked by Windows parental controls by
  * resulting in an HTTP status code of 450.
  */
-add_task(function* test_blocked_parental_controls_httpstatus450()
-{
+add_task(function* test_blocked_parental_controls_httpstatus450() {
   let download;
   try {
     if (!gUseLegacySaver) {
       download = yield promiseNewDownload(httpUrl("parentalblocked.zip"));
       yield download.start();
-    }
-    else {
+    } else {
       download = yield promiseStartLegacyDownload(httpUrl("parentalblocked.zip"));
       yield promiseDownloadStopped(download);
     }
     do_throw("The download should have blocked.");
   } catch (ex) {
     if (!(ex instanceof Downloads.Error) || !ex.becauseBlocked) {
       throw ex;
     }
@@ -1734,18 +1695,17 @@ add_task(function* test_blocked_parental
   }
 
   do_check_false(yield OS.File.exists(download.target.path));
 });
 
 /**
  * Download with runtime permissions
  */
-add_task(function* test_blocked_runtime_permissions()
-{
+add_task(function* test_blocked_runtime_permissions() {
   let blockFn = base => ({
     shouldBlockForRuntimePermissions: () => Promise.resolve(true),
   });
 
   Integration.downloads.register(blockFn);
   function cleanup() {
     Integration.downloads.unregister(blockFn);
   }
@@ -1781,18 +1741,17 @@ add_task(function* test_blocked_runtime_
   cleanup();
 });
 
 /**
  * Check that DownloadCopySaver can always retrieve the hash.
  * DownloadLegacySaver can only retrieve the hash when
  * nsIExternalHelperAppService is invoked.
  */
-add_task(function* test_getSha256Hash()
-{
+add_task(function* test_getSha256Hash() {
   if (!gUseLegacySaver) {
     let download = yield promiseStartDownload(httpUrl("source.txt"));
     yield promiseDownloadStopped(download);
     do_check_true(download.stopped);
     do_check_eq(32, download.saver.getSha256Hash().length);
   }
 });
 
@@ -1858,18 +1817,17 @@ var promiseBlockedDownload = Task.async(
   cleanup();
   return download;
 });
 
 /**
  * Checks that application reputation blocks the download and the target file
  * does not exist.
  */
-add_task(function* test_blocked_applicationReputation()
-{
+add_task(function* test_blocked_applicationReputation() {
   let download = yield promiseBlockedDownload({
     keepPartialData: false,
     keepBlockedData: false,
   });
 
   // Now that the download is blocked, the target file should not exist.
   do_check_false(yield OS.File.exists(download.target.path));
   do_check_false(download.target.exists);
@@ -1878,18 +1836,17 @@ add_task(function* test_blocked_applicat
   // There should also be no blocked data in this case
   do_check_false(download.hasBlockedData);
 });
 
 /**
  * Checks that if a download restarts while processing an application reputation
  * request, the status is handled correctly.
  */
-add_task(function* test_blocked_applicationReputation_race()
-{
+add_task(function* test_blocked_applicationReputation_race() {
   let isFirstShouldBlockCall = true;
 
   let blockFn = base => ({
     shouldBlockForReputationCheck(download) {
       if (isFirstShouldBlockCall) {
         isFirstShouldBlockCall = false;
 
         // 2. Cancel and restart the download before the first attempt has a
@@ -1951,18 +1908,17 @@ add_task(function* test_blocked_applicat
 
   cleanup();
 });
 
 /**
  * Checks that application reputation blocks the download but maintains the
  * blocked data, which will be deleted when the block is confirmed.
  */
-add_task(function* test_blocked_applicationReputation_confirmBlock()
-{
+add_task(function* test_blocked_applicationReputation_confirmBlock() {
   let download = yield promiseBlockedDownload({
     keepPartialData: true,
     keepBlockedData: true,
   });
 
   do_check_true(download.hasBlockedData);
   do_check_true(yield OS.File.exists(download.target.partFilePath));
 
@@ -1978,18 +1934,17 @@ add_task(function* test_blocked_applicat
   do_check_false(download.target.exists);
   do_check_eq(download.target.size, 0);
 });
 
 /**
  * Checks that application reputation blocks the download but maintains the
  * blocked data, which will be used to complete the download when unblocking.
  */
-add_task(function* test_blocked_applicationReputation_unblock()
-{
+add_task(function* test_blocked_applicationReputation_unblock() {
   let download = yield promiseBlockedDownload({
     keepPartialData: true,
     keepBlockedData: true,
   });
 
   do_check_true(download.hasBlockedData);
   do_check_true(yield OS.File.exists(download.target.partFilePath));
 
@@ -2008,18 +1963,17 @@ add_task(function* test_blocked_applicat
   do_check_true(download.error instanceof Downloads.Error);
   do_check_true(download.error.becauseBlocked);
   do_check_true(download.error.becauseBlockedByReputationCheck);
 });
 
 /**
  * Check that calling cancel on a blocked download will not cause errors
  */
-add_task(function* test_blocked_applicationReputation_cancel()
-{
+add_task(function* test_blocked_applicationReputation_cancel() {
   let download = yield promiseBlockedDownload({
     keepPartialData: true,
     keepBlockedData: true,
   });
 
   // This call should succeed on a blocked download.
   yield download.cancel();
 
@@ -2029,18 +1983,17 @@ add_task(function* test_blocked_applicat
   do_check_true(download.stopped);
   do_check_false(download.succeeded);
   do_check_true(download.hasBlockedData);
 });
 
 /**
  * Checks that unblock and confirmBlock cannot race on a blocked download
  */
-add_task(function* test_blocked_applicationReputation_decisionRace()
-{
+add_task(function* test_blocked_applicationReputation_decisionRace() {
   let download = yield promiseBlockedDownload({
     keepPartialData: true,
     keepBlockedData: true,
   });
 
   let unblockPromise = download.unblock();
   let confirmBlockPromise = download.confirmBlock();
 
@@ -2082,18 +2035,17 @@ add_task(function* test_blocked_applicat
   do_check_false(download.target.exists);
   do_check_eq(download.target.size, 0);
 });
 
 /**
  * Checks that unblocking a blocked download fails if the blocked data has been
  * removed.
  */
-add_task(function* test_blocked_applicationReputation_unblock()
-{
+add_task(function* test_blocked_applicationReputation_unblock() {
   let download = yield promiseBlockedDownload({
     keepPartialData: true,
     keepBlockedData: true,
   });
 
   do_check_true(download.hasBlockedData);
   do_check_true(yield OS.File.exists(download.target.partFilePath));
 
@@ -2302,18 +2254,17 @@ add_task(function* test_contentType() {
 
   do_check_eq("text/plain", download.contentType);
 });
 
 /**
  * Tests that the serialization/deserialization of the startTime Date
  * object works correctly.
  */
-add_task(function* test_toSerializable_startTime()
-{
+add_task(function* test_toSerializable_startTime() {
   let download1 = yield promiseStartDownload(httpUrl("source.txt"));
   yield promiseDownloadStopped(download1);
 
   let serializable = download1.toSerializable();
   let reserialized = JSON.parse(JSON.stringify(serializable));
 
   let download2 = yield Downloads.createDownload(reserialized);
 
@@ -2322,18 +2273,17 @@ add_task(function* test_toSerializable_s
   do_check_eq(download1.startTime.toJSON(), download2.startTime.toJSON());
 });
 
 /**
  * This test will call the platform specific operations within
  * DownloadPlatform::DownloadDone. While there is no test to verify the
  * specific behaviours, this at least ensures that there is no error or crash.
  */
-add_task(function* test_platform_integration()
-{
+add_task(function* test_platform_integration() {
   let downloadFiles = [];
   let oldDeviceStorageEnabled = false;
   try {
      oldDeviceStorageEnabled = Services.prefs.getBoolPref("device.storage.enabled");
   } catch (e) {
     // This happens if the pref doesn't exist.
   }
   let downloadWatcherNotified = false;
@@ -2379,18 +2329,17 @@ add_task(function* test_platform_integra
                                   "test" + (Math.floor(Math.random() * 1000000)));
     let targetFile = new FileUtils.File(targetFilePath);
     downloadFiles.push(targetFile);
 
     let download;
     if (gUseLegacySaver) {
       download = yield promiseStartLegacyDownload(httpUrl("source.txt"),
                                                   { isPrivate, targetFile });
-    }
-    else {
+    } else {
       download = yield Downloads.createDownload({
         source: { url: httpUrl("source.txt"), isPrivate },
         target: targetFile,
       });
       download.start().catch(() => {});
     }
 
     // Wait for the whenSucceeded promise to be resolved first.
@@ -2407,18 +2356,17 @@ add_task(function* test_platform_integra
   }
 
   cleanup();
 });
 
 /**
  * Checks that downloads are added to browsing history when they start.
  */
-add_task(function* test_history()
-{
+add_task(function* test_history() {
   mustInterruptResponses();
 
   // We will wait for the visit to be notified during the download.
   yield PlacesTestUtils.clearHistory();
   let promiseVisit = promiseWaitForVisit(httpUrl("interruptible.txt"));
 
   // Start a download that is not allowed to finish yet.
   let download = yield promiseStartDownload(httpUrl("interruptible.txt"));
@@ -2437,18 +2385,17 @@ add_task(function* test_history()
   // The restart should not have added a new history visit.
   do_check_false(yield promiseIsURIVisited(httpUrl("interruptible.txt")));
 });
 
 /**
  * Checks that downloads started by nsIHelperAppService are added to the
  * browsing history when they start.
  */
-add_task(function* test_history_tryToKeepPartialData()
-{
+add_task(function* test_history_tryToKeepPartialData() {
   // We will wait for the visit to be notified during the download.
   yield PlacesTestUtils.clearHistory();
   let promiseVisit =
       promiseWaitForVisit(httpUrl("interruptible_resumable.txt"));
 
   // Start a download that is not allowed to finish yet.
   let beforeStartTimeMs = Date.now();
   let download = yield promiseStartDownload_tryToKeepPartialData();
--- a/toolkit/components/jsdownloads/test/unit/head.js
+++ b/toolkit/components/jsdownloads/test/unit/head.js
@@ -79,18 +79,17 @@ const TEST_DATA_SHORT_GZIP_ENCODED_SECON
   75, 87, 0, 114, 83, 242, 203, 243, 114, 242, 19, 83, 82, 83, 244, 0, 151, 222, 109, 43, 31, 0, 0, 0
 ];
 const TEST_DATA_SHORT_GZIP_ENCODED =
   TEST_DATA_SHORT_GZIP_ENCODED_FIRST.concat(TEST_DATA_SHORT_GZIP_ENCODED_SECOND);
 
 /**
  * All the tests are implemented with add_task, this starts them automatically.
  */
-function run_test()
-{
+function run_test() {
   do_get_profile();
   run_next_test();
 }
 
 // Support functions
 
 /**
  * HttpServer object initialized before tests start.
@@ -121,18 +120,17 @@ var gFileCounter = Math.floor(Math.rando
  *
  * @return nsIFile pointing to a non-existent file in a temporary directory.
  *
  * @note It is not enough to delete the file if it exists, or to delete the file
  *       after calling nsIFile.createUnique, because on Windows the delete
  *       operation in the file system may still be pending, preventing a new
  *       file with the same name to be created.
  */
-function getTempFile(aLeafName)
-{
+function getTempFile(aLeafName) {
   // Prepend a serial number to the extension in the suggested leaf name.
   let [base, ext] = DownloadPaths.splitBaseNameAndExtension(aLeafName);
   let leafName = base + "-" + gFileCounter + ext;
   gFileCounter++;
 
   // Get a file reference under the temporary directory for this test file.
   let file = FileUtils.getFile("TmpD", [leafName]);
   do_check_false(file.exists());
@@ -159,49 +157,46 @@ function getTempFile(aLeafName)
 
 /**
  * Waits for pending events to be processed.
  *
  * @return {Promise}
  * @resolves When pending events have been processed.
  * @rejects Never.
  */
-function promiseExecuteSoon()
-{
+function promiseExecuteSoon() {
   let deferred = Promise.defer();
   do_execute_soon(deferred.resolve);
   return deferred.promise;
 }
 
 /**
  * Waits for a pending events to be processed after a timeout.
  *
  * @return {Promise}
  * @resolves When pending events have been processed.
  * @rejects Never.
  */
-function promiseTimeout(aTime)
-{
+function promiseTimeout(aTime) {
   let deferred = Promise.defer();
   do_timeout(aTime, deferred.resolve);
   return deferred.promise;
 }
 
 /**
  * Waits for a new history visit to be notified for the specified URI.
  *
  * @param aUrl
  *        String containing the URI that will be visited.
  *
  * @return {Promise}
  * @resolves Array [aTime, aTransitionType] from nsINavHistoryObserver.onVisit.
  * @rejects Never.
  */
-function promiseWaitForVisit(aUrl)
-{
+function promiseWaitForVisit(aUrl) {
   let deferred = Promise.defer();
 
   let uri = NetUtil.newURI(aUrl);
 
   PlacesUtils.history.addObserver({
     QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver]),
     onBeginUpdateBatch() {},
     onEndUpdateBatch() {},
@@ -412,32 +407,29 @@ function promiseStartExternalHelperAppSe
       uri: sourceURI,
       loadUsingSystemPrincipal: true
     });
 
     // Start the actual download process.
     channel.asyncOpen2({
       contentListener: null,
 
-      onStartRequest(aRequest, aContext)
-      {
+      onStartRequest(aRequest, aContext) {
         let requestChannel = aRequest.QueryInterface(Ci.nsIChannel);
         this.contentListener = gExternalHelperAppService.doContent(
                                      requestChannel.contentType, aRequest, null, true);
         this.contentListener.onStartRequest(aRequest, aContext);
       },
 
-      onStopRequest(aRequest, aContext, aStatusCode)
-      {
+      onStopRequest(aRequest, aContext, aStatusCode) {
         this.contentListener.onStopRequest(aRequest, aContext, aStatusCode);
       },
 
       onDataAvailable(aRequest, aContext, aInputStream, aOffset,
-                                aCount)
-      {
+                                aCount) {
         this.contentListener.onDataAvailable(aRequest, aContext, aInputStream,
                                              aOffset, aCount);
       },
     });
   }.bind(this)).then(null, do_report_unexpected_exception);
 
   return deferred.promise;
 }
@@ -502,18 +494,17 @@ function promiseDownloadStopped(aDownloa
  *
  * @param aIsPrivate
  *        True for the private list, false or undefined for the public list.
  *
  * @return {Promise}
  * @resolves The newly created DownloadList object.
  * @rejects JavaScript exception.
  */
-function promiseNewList(aIsPrivate)
-{
+function promiseNewList(aIsPrivate) {
   // We need to clear all the internal state for the list and summary objects,
   // since all the objects are interdependent internally.
   Downloads._promiseListsInitialized = null;
   Downloads._lists = {};
   Downloads._summaries = {};
 
   return Downloads.getList(aIsPrivate ? Downloads.PRIVATE : Downloads.PUBLIC);
 }
@@ -526,18 +517,17 @@ function promiseNewList(aIsPrivate)
  *        verified.
  * @param aExpectedContents
  *        String containing the octets that are expected in the file.
  *
  * @return {Promise}
  * @resolves When the operation completes.
  * @rejects Never.
  */
-function promiseVerifyContents(aPath, aExpectedContents)
-{
+function promiseVerifyContents(aPath, aExpectedContents) {
   return Task.spawn(function* () {
     let file = new FileUtils.File(aPath);
 
     if (!(yield OS.File.exists(aPath))) {
       do_throw("File does not exist: " + aPath);
     }
 
     if ((yield OS.File.stat(aPath)).size == 0) {
@@ -568,18 +558,17 @@ function promiseVerifyContents(aPath, aE
 }
 
 /**
  * Starts a socket listener that closes each incoming connection.
  *
  * @returns nsIServerSocket that listens for connections.  Call its "close"
  *          method to stop listening and free the server port.
  */
-function startFakeServer()
-{
+function startFakeServer() {
   let serverSocket = new ServerSocket(-1, true, -1);
   serverSocket.asyncListen({
     onSocketAccepted(aServ, aTransport) {
       aTransport.close(Cr.NS_BINDING_ABORTED);
     },
     onStopListening() { },
   });
   return serverSocket;
@@ -603,51 +592,48 @@ var _gDeferResponses = Promise.defer();
  * For example, the handler accessible at the httpUri("interruptible.txt")
  * address returns the TEST_DATA_SHORT text, then it may block until the
  * continueResponses method is called.  At this point, the handler sends the
  * TEST_DATA_SHORT text again to complete the response.
  *
  * If an interruptible request is started before the function is called, it may
  * or may not be blocked depending on the actual sequence of events.
  */
-function mustInterruptResponses()
-{
+function mustInterruptResponses() {
   // If there are pending blocked requests, allow them to complete.  This is
   // done to prevent requests from being blocked forever, but should not affect
   // the test logic, since previously started requests should not be monitored
   // on the client side anymore.
   _gDeferResponses.resolve();
 
   do_print("Interruptible responses will be blocked midway.");
   _gDeferResponses = Promise.defer();
 }
 
 /**
  * Allows all the current and future interruptible requests to complete.
  */
-function continueResponses()
-{
+function continueResponses() {
   do_print("Interruptible responses are now allowed to continue.");
   _gDeferResponses.resolve();
 }
 
 /**
  * Registers an interruptible response handler.
  *
  * @param aPath
  *        Path passed to nsIHttpServer.registerPathHandler.
  * @param aFirstPartFn
  *        This function is called when the response is received, with the
  *        aRequest and aResponse arguments of the server.
  * @param aSecondPartFn
  *        This function is called with the aRequest and aResponse arguments of
  *        the server, when the continueResponses function is called.
  */
-function registerInterruptibleHandler(aPath, aFirstPartFn, aSecondPartFn)
-{
+function registerInterruptibleHandler(aPath, aFirstPartFn, aSecondPartFn) {
   gHttpServer.registerPathHandler(aPath, function(aRequest, aResponse) {
     do_print("Interruptible request started.");
 
     // Process the first part of the response.
     aResponse.processAsync();
     aFirstPartFn(aRequest, aResponse);
 
     // Wait on the current deferred object, then finish the request.
@@ -672,18 +658,17 @@ function isValidDate(aDate) {
 /**
  * Position of the first byte served by the "interruptible_resumable.txt"
  * handler during the most recent response.
  */
 var gMostRecentFirstBytePos;
 
 // Initialization functions common to all tests
 
-add_task(function test_common_initialize()
-{
+add_task(function test_common_initialize() {
   // Start the HTTP server.
   gHttpServer = new HttpServer();
   gHttpServer.registerDirectory("/", do_get_file("../data"));
   gHttpServer.start(-1);
   do_register_cleanup(() => {
     return new Promise(resolve => {
       // Ensure all the pending HTTP requests have a chance to finish.
       continueResponses();
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadCore.js
+++ b/toolkit/components/jsdownloads/test/unit/test_DownloadCore.js
@@ -19,18 +19,17 @@ var gUseLegacySaver = false;
 var scriptFile = do_get_file("common_test_Download.js");
 Services.scriptloader.loadSubScript(NetUtil.newURI(scriptFile).spec);
 
 // Tests
 
 /**
  * Tests the DownloadError object.
  */
-add_task(function test_DownloadError()
-{
+add_task(function test_DownloadError() {
   let error = new DownloadError({ result: Cr.NS_ERROR_NOT_RESUMABLE,
                                   message: "Not resumable."});
   do_check_eq(error.result, Cr.NS_ERROR_NOT_RESUMABLE);
   do_check_eq(error.message, "Not resumable.");
   do_check_false(error.becauseSourceFailed);
   do_check_false(error.becauseTargetFailed);
   do_check_false(error.becauseBlocked);
   do_check_false(error.becauseBlockedByParentalControls);
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadImport.js
+++ b/toolkit/components/jsdownloads/test/unit/test_DownloadImport.js
@@ -528,18 +528,17 @@ add_task(function* prepareDownloadsToImp
     },
   ];
 });
 
 /**
  * Prepares the list of downloads to be added to the database that should
  * *not* be imported by the import procedure.
  */
-add_task(function* prepareNonImportableDownloads()
-{
+add_task(function* prepareNonImportableDownloads() {
   gDownloadsRowNonImportable = [
     // Download with no source (should never happen in normal circumstances).
     {
       source: "",
       target: "nonimportable1.txt",
       tempPath: "",
       startTime: getStartTime(1),
       state: DOWNLOAD_PAUSED,
@@ -652,18 +651,17 @@ add_task(function* prepareNonImportableD
 
 // Test
 
 /**
  * Creates a temporary Sqlite database with download data and perform an
  * import of that data to the new Downloads API to verify that the import
  * worked correctly.
  */
-add_task(function* test_downloadImport()
-{
+add_task(function* test_downloadImport() {
   let connection = null;
   let downloadsSqlite = getTempFile("downloads.sqlite").path;
 
   try {
     // Set up the database.
     connection = yield promiseEmptyDatabaseConnection({
       aPath: downloadsSqlite,
       aSchemaVersion: 9
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js
+++ b/toolkit/components/jsdownloads/test/unit/test_DownloadIntegration.js
@@ -63,18 +63,17 @@ XPCOMUtils.defineLazyGetter(this, "gStri
 });
 
 /**
  * Tests that getSystemDownloadsDirectory returns an existing directory or
  * creates a new directory depending on the platform. Instead of the real
  * directory, this test is executed in the temporary directory so we can safely
  * delete the created folder to check whether it is created again.
  */
-add_task(function* test_getSystemDownloadsDirectory_exists_or_creates()
-{
+add_task(function* test_getSystemDownloadsDirectory_exists_or_creates() {
   let tempDir = Services.dirsvc.get("TmpD", Ci.nsIFile);
   let downloadDir;
 
   // OSX / Linux / Windows but not XP/2k
   if (Services.appinfo.OS == "Darwin" ||
       Services.appinfo.OS == "Linux" ||
       (Services.appinfo.OS == "WINNT" &&
        parseFloat(Services.sysinfo.getProperty("version")) >= 6)) {
@@ -100,33 +99,31 @@ add_task(function* test_getSystemDownloa
   }
 });
 
 /**
  * Tests that the real directory returned by getSystemDownloadsDirectory is not
  * the one that is used during unit tests. Since this is the actual downloads
  * directory of the operating system, we don't try to delete it afterwards.
  */
-add_task(function* test_getSystemDownloadsDirectory_real()
-{
+add_task(function* test_getSystemDownloadsDirectory_real() {
   let fakeDownloadDir = yield DownloadIntegration.getSystemDownloadsDirectory();
 
   let cleanup = allowDirectoriesInTest();
   let realDownloadDir = yield DownloadIntegration.getSystemDownloadsDirectory();
   cleanup();
 
   do_check_neq(fakeDownloadDir, realDownloadDir);
 });
 
 /**
  * Tests that the getPreferredDownloadsDirectory returns a valid download
  * directory string path.
  */
-add_task(function* test_getPreferredDownloadsDirectory()
-{
+add_task(function* test_getPreferredDownloadsDirectory() {
   let cleanupDirectories = allowDirectoriesInTest();
 
   let folderListPrefName = "browser.download.folderList";
   let dirPrefName = "browser.download.dir";
   function cleanupPrefs() {
     Services.prefs.clearUserPref(folderListPrefName);
     Services.prefs.clearUserPref(dirPrefName);
   }
@@ -154,17 +151,17 @@ add_task(function* test_getPreferredDown
 
   // Should return the directory which is listed in the dir preference.
   let time = (new Date()).getTime();
   let tempDir = Services.dirsvc.get("TmpD", Ci.nsIFile);
   tempDir.append(time);
   Services.prefs.setComplexValue("browser.download.dir", Ci.nsIFile, tempDir);
   downloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
   do_check_neq(downloadDir, "");
-  do_check_eq(downloadDir,  tempDir.path);
+  do_check_eq(downloadDir, tempDir.path);
   do_check_true(yield OS.File.exists(downloadDir));
   yield OS.File.removeEmptyDir(tempDir.path);
 
   // Should return the system downloads directory beacause the path is invalid
   // in the dir preference.
   tempDir = Services.dirsvc.get("TmpD", Ci.nsIFile);
   tempDir.append("dir_not_exist");
   tempDir.append(time);
@@ -181,18 +178,17 @@ add_task(function* test_getPreferredDown
   cleanupPrefs();
   cleanupDirectories();
 });
 
 /**
  * Tests that the getTemporaryDownloadsDirectory returns a valid download
  * directory string path.
  */
-add_task(function* test_getTemporaryDownloadsDirectory()
-{
+add_task(function* test_getTemporaryDownloadsDirectory() {
   let cleanup = allowDirectoriesInTest();
 
   let downloadDir = yield DownloadIntegration.getTemporaryDownloadsDirectory();
   do_check_neq(downloadDir, "");
 
   if ("nsILocalFileMac" in Ci) {
     let preferredDownloadDir = yield DownloadIntegration.getPreferredDownloadsDirectory();
     do_check_eq(downloadDir, preferredDownloadDir);
@@ -207,30 +203,28 @@ add_task(function* test_getTemporaryDown
 // Tests DownloadObserver
 
 /**
  * Re-enables the default observers for the following tests.
  *
  * This takes effect the first time a DownloadList object is created, and lasts
  * until this test file has completed.
  */
-add_task(function* test_observers_setup()
-{
+add_task(function* test_observers_setup() {
   DownloadIntegration.allowObservers = true;
   do_register_cleanup(function() {
     DownloadIntegration.allowObservers = false;
   });
 });
 
 /**
  * Tests notifications prompts when observers are notified if there are public
  * and private active downloads.
  */
-add_task(function* test_notifications()
-{
+add_task(function* test_notifications() {
   for (let isPrivate of [false, true]) {
     mustInterruptResponses();
 
     let list = yield promiseNewList(isPrivate);
     let download1 = yield promiseNewDownload(httpUrl("interruptible.txt"));
     let download2 = yield promiseNewDownload(httpUrl("interruptible.txt"));
     let download3 = yield promiseNewDownload(httpUrl("interruptible.txt"));
     let promiseAttempt1 = download1.start();
@@ -257,18 +251,17 @@ add_task(function* test_notifications()
     yield list.remove(download3);
   }
 });
 
 /**
  * Tests that notifications prompts observers are not notified if there are no
  * public or private active downloads.
  */
-add_task(function* test_no_notifications()
-{
+add_task(function* test_no_notifications() {
   for (let isPrivate of [false, true]) {
     let list = yield promiseNewList(isPrivate);
     let download1 = yield promiseNewDownload(httpUrl("interruptible.txt"));
     let download2 = yield promiseNewDownload(httpUrl("interruptible.txt"));
     download1.start().catch(() => {});
     download2.start().catch(() => {});
 
     // Add downloads to list.
@@ -285,18 +278,17 @@ add_task(function* test_no_notifications
     yield list.remove(download2);
   }
 });
 
 /**
  * Tests notifications prompts when observers are notified if there are public
  * and private active downloads at the same time.
  */
-add_task(function* test_mix_notifications()
-{
+add_task(function* test_mix_notifications() {
   mustInterruptResponses();
 
   let publicList = yield promiseNewList();
   let privateList = yield Downloads.getList(Downloads.PRIVATE);
   let download1 = yield promiseNewDownload(httpUrl("interruptible.txt"));
   let download2 = yield promiseNewDownload(httpUrl("interruptible.txt"));
   let promiseAttempt1 = download1.start();
   let promiseAttempt2 = download2.start();
@@ -316,24 +308,22 @@ add_task(function* test_mix_notification
   yield publicList.remove(download1);
   yield privateList.remove(download2);
 });
 
 /**
  * Tests suspending and resuming as well as going offline and then online again.
  * The downloads should stop when suspending and start again when resuming.
  */
-add_task(function* test_suspend_resume()
-{
+add_task(function* test_suspend_resume() {
   // The default wake delay is 10 seconds, so set the wake delay to be much
   // faster for these tests.
   Services.prefs.setIntPref("browser.download.manager.resumeOnWakeDelay", 5);
 
-  let addDownload = function(list)
-  {
+  let addDownload = function(list) {
     return Task.spawn(function* () {
       let download = yield promiseNewDownload(httpUrl("interruptible.txt"));
       download.start().catch(() => {});
       list.add(download);
       return download;
     });
   }
 
@@ -395,18 +385,17 @@ add_task(function* test_suspend_resume()
 
   Services.prefs.clearUserPref("browser.download.manager.resumeOnWakeDelay");
 });
 
 /**
  * Tests both the downloads list and the in-progress downloads are clear when
  * private browsing observer is notified.
  */
-add_task(function* test_exit_private_browsing()
-{
+add_task(function* test_exit_private_browsing() {
   mustInterruptResponses();
 
   let privateList = yield promiseNewList(true);
   let download1 = yield promiseNewDownload(httpUrl("source.txt"));
   let download2 = yield promiseNewDownload(httpUrl("interruptible.txt"));
   let promiseAttempt1 = download1.start();
   download2.start();
 
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadList.js
+++ b/toolkit/components/jsdownloads/test/unit/test_DownloadList.js
@@ -12,18 +12,17 @@
 // Globals
 
 /**
  * Returns a PRTime in the past usable to add expirable visits.
  *
  * @note Expiration ignores any visit added in the last 7 days, but it's
  *       better be safe against DST issues, by going back one day more.
  */
-function getExpirablePRTime()
-{
+function getExpirablePRTime() {
   let dateObj = new Date();
   // Normalize to midnight
   dateObj.setHours(0);
   dateObj.setMinutes(0);
   dateObj.setSeconds(0);
   dateObj.setMilliseconds(0);
   dateObj = new Date(dateObj.getTime() - 8 * 86400000);
   return dateObj.getTime() * 1000;
@@ -34,18 +33,17 @@ function getExpirablePRTime()
  *
  * @param aSourceUrl
  *        String containing the URI for the download source, or null to use
  *        httpUrl("source.txt").
  *
  * @return {Promise}
  * @rejects JavaScript exception.
  */
-function promiseExpirableDownloadVisit(aSourceUrl)
-{
+function promiseExpirableDownloadVisit(aSourceUrl) {
   let deferred = Promise.defer();
   PlacesUtils.asyncHistory.updatePlaces(
     {
       uri: NetUtil.newURI(aSourceUrl || httpUrl("source.txt")),
       visits: [{
         transitionType: Ci.nsINavHistoryService.TRANSITION_DOWNLOAD,
         visitDate: getExpirablePRTime(),
       }]
@@ -64,33 +62,31 @@ function promiseExpirableDownloadVisit(a
   return deferred.promise;
 }
 
 // Tests
 
 /**
  * Checks the testing mechanism used to build different download lists.
  */
-add_task(function* test_construction()
-{
+add_task(function* test_construction() {
   let downloadListOne = yield promiseNewList();
   let downloadListTwo = yield promiseNewList();
   let privateDownloadListOne = yield promiseNewList(true);
   let privateDownloadListTwo = yield promiseNewList(true);
 
   do_check_neq(downloadListOne, downloadListTwo);
   do_check_neq(privateDownloadListOne, privateDownloadListTwo);
   do_check_neq(downloadListOne, privateDownloadListOne);
 });
 
 /**
  * Checks the methods to add and retrieve items from the list.
  */
-add_task(function* test_add_getAll()
-{
+add_task(function* test_add_getAll() {
   let list = yield promiseNewList();
 
   let downloadOne = yield promiseNewDownload();
   yield list.add(downloadOne);
 
   let itemsOne = yield list.getAll();
   do_check_eq(itemsOne.length, 1);
   do_check_eq(itemsOne[0], downloadOne);
@@ -105,18 +101,17 @@ add_task(function* test_add_getAll()
 
   // The first snapshot should not have been modified.
   do_check_eq(itemsOne.length, 1);
 });
 
 /**
  * Checks the method to remove items from the list.
  */
-add_task(function* test_remove()
-{
+add_task(function* test_remove() {
   let list = yield promiseNewList();
 
   yield list.add(yield promiseNewDownload());
   yield list.add(yield promiseNewDownload());
 
   let items = yield list.getAll();
   yield list.remove(items[0]);
 
@@ -127,18 +122,17 @@ add_task(function* test_remove()
   do_check_eq(items.length, 1);
 });
 
 /**
  * Tests that the "add", "remove", and "getAll" methods on the global
  * DownloadCombinedList object combine the contents of the global DownloadList
  * objects for public and private downloads.
  */
-add_task(function* test_DownloadCombinedList_add_remove_getAll()
-{
+add_task(function* test_DownloadCombinedList_add_remove_getAll() {
   let publicList = yield promiseNewList();
   let privateList = yield Downloads.getList(Downloads.PRIVATE);
   let combinedList = yield Downloads.getList(Downloads.ALL);
 
   let publicDownload = yield promiseNewDownload();
   let privateDownload = yield Downloads.createDownload({
     source: { url: httpUrl("source.txt"), isPrivate: true },
     target: getTempFile(TEST_TARGET_FILE_NAME).path,
@@ -167,18 +161,17 @@ add_task(function* test_DownloadCombined
   do_check_eq((yield combinedList.getAll()).length, 0);
 });
 
 /**
  * Checks that views receive the download add and remove notifications, and that
  * adding and removing views works as expected, both for a normal and a combined
  * list.
  */
-add_task(function* test_notifications_add_remove()
-{
+add_task(function* test_notifications_add_remove() {
   for (let isCombined of [false, true]) {
     // Force creating a new list for both the public and combined cases.
     let list = yield promiseNewList();
     if (isCombined) {
       list = yield Downloads.getList(Downloads.ALL);
     }
 
     let downloadOne = yield promiseNewDownload();
@@ -232,18 +225,17 @@ add_task(function* test_notifications_ad
     do_check_eq(addNotifications, 3);
   }
 });
 
 /**
  * Checks that views receive the download change notifications, both for a
  * normal and a combined list.
  */
-add_task(function* test_notifications_change()
-{
+add_task(function* test_notifications_change() {
   for (let isCombined of [false, true]) {
     // Force creating a new list for both the public and combined cases.
     let list = yield promiseNewList();
     if (isCombined) {
       list = yield Downloads.getList(Downloads.ALL);
     }
 
     let downloadOne = yield promiseNewDownload();
@@ -271,18 +263,17 @@ add_task(function* test_notifications_ch
     yield downloadTwo.start();
     do_check_false(receivedOnDownloadChanged);
   }
 });
 
 /**
  * Checks that the reference to "this" is correct in the view callbacks.
  */
-add_task(function* test_notifications_this()
-{
+add_task(function* test_notifications_this() {
   let list = yield promiseNewList();
 
   // Check that we receive change notifications.
   let receivedOnDownloadAdded = false;
   let receivedOnDownloadChanged = false;
   let receivedOnDownloadRemoved = false;
   let view = {
     onDownloadAdded() {
@@ -312,18 +303,17 @@ add_task(function* test_notifications_th
   do_check_true(receivedOnDownloadAdded);
   do_check_true(receivedOnDownloadChanged);
   do_check_true(receivedOnDownloadRemoved);
 });
 
 /**
  * Checks that download is removed on history expiration.
  */
-add_task(function* test_history_expiration()
-{
+add_task(function* test_history_expiration() {
   mustInterruptResponses();
 
   function cleanup() {
     Services.prefs.clearUserPref("places.history.expiration.max_pages");
   }
   do_register_cleanup(cleanup);
 
   // Set max pages to 0 to make the download expire.
@@ -367,18 +357,17 @@ add_task(function* test_history_expirati
   yield deferred.promise;
 
   cleanup();
 });
 
 /**
  * Checks all downloads are removed after clearing history.
  */
-add_task(function* test_history_clear()
-{
+add_task(function* test_history_clear() {
   let list = yield promiseNewList();
   let downloadOne = yield promiseNewDownload();
   let downloadTwo = yield promiseNewDownload();
   yield list.add(downloadOne);
   yield list.add(downloadTwo);
 
   let deferred = Promise.defer();
   let removeNotifications = 0;
@@ -399,18 +388,17 @@ add_task(function* test_history_clear()
   // Wait for the removal notifications that may still be pending.
   yield deferred.promise;
 });
 
 /**
  * Tests the removeFinished method to ensure that it only removes
  * finished downloads.
  */
-add_task(function* test_removeFinished()
-{
+add_task(function* test_removeFinished() {
   let list = yield promiseNewList();
   let downloadOne = yield promiseNewDownload();
   let downloadTwo = yield promiseNewDownload();
   let downloadThree = yield promiseNewDownload();
   let downloadFour = yield promiseNewDownload();
   yield list.add(downloadOne);
   yield list.add(downloadTwo);
   yield list.add(downloadThree);
@@ -445,18 +433,17 @@ add_task(function* test_removeFinished()
   let downloads = yield list.getAll()
   do_check_eq(downloads.length, 1);
 });
 
 /**
  * Tests the global DownloadSummary objects for the public, private, and
  * combined download lists.
  */
-add_task(function* test_DownloadSummary()
-{
+add_task(function* test_DownloadSummary() {
   mustInterruptResponses();
 
   let publicList = yield promiseNewList();
   let privateList = yield Downloads.getList(Downloads.PRIVATE);
 
   let publicSummary = yield Downloads.getSummary(Downloads.PUBLIC);
   let privateSummary = yield Downloads.getSummary(Downloads.PRIVATE);
   let combinedSummary = yield Downloads.getSummary(Downloads.ALL);
@@ -539,18 +526,17 @@ add_task(function* test_DownloadSummary(
   do_check_eq(combinedSummary.progressCurrentBytes, 0);
 });
 
 /**
  * Checks that views receive the summary change notification.  This is tested on
  * the combined summary when adding a public download, as we assume that if we
  * pass the test in this case we will also pass it in the others.
  */
-add_task(function* test_DownloadSummary_notifications()
-{
+add_task(function* test_DownloadSummary_notifications() {
   let list = yield promiseNewList();
   let summary = yield Downloads.getSummary(Downloads.ALL);
 
   let download = yield promiseNewDownload();
   yield list.add(download);
 
   // Check that we receive change notifications.
   let receivedOnSummaryChanged = false;
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadStore.js
+++ b/toolkit/components/jsdownloads/test/unit/test_DownloadStore.js
@@ -23,32 +23,30 @@ XPCOMUtils.defineLazyModuleGetter(this, 
  *        String pointing to the file to be associated with the DownloadStore,
  *        or undefined to use a non-existing temporary file.  In this case, the
  *        temporary file is deleted when the test file execution finishes.
  *
  * @return {Promise}
  * @resolves Array [ Newly created DownloadList , associated DownloadStore ].
  * @rejects JavaScript exception.
  */
-function promiseNewListAndStore(aStorePath)
-{
+function promiseNewListAndStore(aStorePath) {
   return promiseNewList().then(function(aList) {
     let path = aStorePath || getTempFile(TEST_STORE_FILE_NAME).path;
     let store = new DownloadStore(aList, path);
     return [aList, store];
   });
 }
 
 // Tests
 
 /**
  * Saves downloads to a file, then reloads them.
  */
-add_task(function* test_save_reload()
-{
+add_task(function* test_save_reload() {
   let [listForSave, storeForSave] = yield promiseNewListAndStore();
   let [listForLoad, storeForLoad] = yield promiseNewListAndStore(
                                                  storeForSave.path);
 
   listForSave.add(yield promiseNewDownload(httpUrl("source.txt")));
   listForSave.add(yield Downloads.createDownload({
     source: { url: httpUrl("empty.txt"),
               referrer: TEST_REFERRER_URL },
@@ -104,53 +102,50 @@ add_task(function* test_save_reload()
     do_check_eq(itemsForSave[i].saver.toSerializable(),
                 itemsForLoad[i].saver.toSerializable());
   }
 });
 
 /**
  * Checks that saving an empty list deletes any existing file.
  */
-add_task(function* test_save_empty()
-{
+add_task(function* test_save_empty() {
   let [, store] = yield promiseNewListAndStore();
 
   let createdFile = yield OS.File.open(store.path, { create: true });
   yield createdFile.close();
 
   yield store.save();
 
   do_check_false(yield OS.File.exists(store.path));
 
   // If the file does not exist, saving should not generate exceptions.
   yield store.save();
 });
 
 /**
  * Checks that loading from a missing file results in an empty list.
  */
-add_task(function* test_load_empty()
-{
+add_task(function* test_load_empty() {
   let [list, store] = yield promiseNewListAndStore();
 
   do_check_false(yield OS.File.exists(store.path));
 
   yield store.load();
 
   let items = yield list.getAll();
   do_check_eq(items.length, 0);
 });
 
 /**
  * Loads downloads from a string in a predefined format.  The purpose of this
  * test is to verify that the JSON format used in previous versions can be
  * loaded, assuming the file is reloaded on the same platform.
  */
-add_task(function* test_load_string_predefined()
-{
+add_task(function* test_load_string_predefined() {
   let [list, store] = yield promiseNewListAndStore();
 
   // The platform-dependent file name should be generated dynamically.
   let targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
   let filePathLiteral = JSON.stringify(targetPath);
   let sourceUriLiteral = JSON.stringify(httpUrl("source.txt"));
   let emptyUriLiteral = JSON.stringify(httpUrl("empty.txt"));
   let referrerUriLiteral = JSON.stringify(TEST_REFERRER_URL);
@@ -177,18 +172,17 @@ add_task(function* test_load_string_pred
   do_check_eq(items[1].source.url, httpUrl("empty.txt"));
   do_check_eq(items[1].source.referrer, TEST_REFERRER_URL);
   do_check_eq(items[1].target.path, targetPath);
 });
 
 /**
  * Loads downloads from a well-formed JSON string containing unrecognized data.
  */
-add_task(function* test_load_string_unrecognized()
-{
+add_task(function* test_load_string_unrecognized() {
   let [list, store] = yield promiseNewListAndStore();
 
   // The platform-dependent file name should be generated dynamically.
   let targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
   let filePathLiteral = JSON.stringify(targetPath);
   let sourceUriLiteral = JSON.stringify(httpUrl("source.txt"));
 
   let string = "{\"list\":[{\"source\":null," +
@@ -209,18 +203,17 @@ add_task(function* test_load_string_unre
 
   do_check_eq(items[0].source.url, httpUrl("source.txt"));
   do_check_eq(items[0].target.path, targetPath);
 });
 
 /**
  * Loads downloads from a malformed JSON string.
  */
-add_task(function* test_load_string_malformed()
-{
+add_task(function* test_load_string_malformed() {
   let [list, store] = yield promiseNewListAndStore();
 
   let string = "{\"list\":[{\"source\":null,\"target\":null}," +
                 "{\"source\":{\"url\":\"about:blank\"}}}";
 
   yield OS.File.writeAtomic(store.path, new TextEncoder().encode(string),
                             { tmpPath: store.path + ".tmp" });
 
@@ -238,18 +231,17 @@ add_task(function* test_load_string_malf
 
   do_check_eq(items.length, 0);
 });
 
 /**
  * Saves downloads with unknown properties to a file and then reloads
  * them to ensure that these properties are preserved.
  */
-add_task(function* test_save_reload_unknownProperties()
-{
+add_task(function* test_save_reload_unknownProperties() {
   let [listForSave, storeForSave] = yield promiseNewListAndStore();
   let [listForLoad, storeForLoad] = yield promiseNewListAndStore(
                                                  storeForSave.path);
 
   let download1 = yield promiseNewDownload(httpUrl("source.txt"));
   // startTime should be ignored as it is a known property, and error
   // is ignored by serialization
   download1._unknownProperties = { peanut: "butter",
--- a/toolkit/components/jsdownloads/test/unit/test_Downloads.js
+++ b/toolkit/components/jsdownloads/test/unit/test_Downloads.js
@@ -10,44 +10,41 @@
 "use strict";
 
 // Tests
 
 /**
  * Tests that the createDownload function exists and can be called.  More
  * detailed tests are implemented separately for the DownloadCore module.
  */
-add_task(function* test_createDownload()
-{
+add_task(function* test_createDownload() {
   // Creates a simple Download object without starting the download.
   yield Downloads.createDownload({
     source: { url: "about:blank" },
     target: { path: getTempFile(TEST_TARGET_FILE_NAME).path },
     saver: { type: "copy" },
   });
 });
 
 /**
  * Tests createDownload for private download.
  */
-add_task(function* test_createDownload_private()
-{
+add_task(function* test_createDownload_private() {
   let download = yield Downloads.createDownload({
     source: { url: "about:blank", isPrivate: true },
     target: { path: getTempFile(TEST_TARGET_FILE_NAME).path },
     saver: { type: "copy" }
   });
   do_check_true(download.source.isPrivate);
 });
 
 /**
  * Tests createDownload for normal (public) download.
  */
-add_task(function* test_createDownload_public()
-{
+add_task(function* test_createDownload_public() {
   let tempPath = getTempFile(TEST_TARGET_FILE_NAME).path;
   let download = yield Downloads.createDownload({
     source: { url: "about:blank", isPrivate: false },
     target: { path: tempPath },
     saver: { type: "copy" }
   });
   do_check_false(download.source.isPrivate);
 
@@ -57,18 +54,17 @@ add_task(function* test_createDownload_p
     saver: { type: "copy" }
   });
   do_check_false(download.source.isPrivate);
 });
 
 /**
  * Tests createDownload for a pdf saver throws if only given a url.
  */
-add_task(function* test_createDownload_pdf()
-{
+add_task(function* test_createDownload_pdf() {
   let download = yield Downloads.createDownload({
     source: { url: "about:blank" },
     target: { path: getTempFile(TEST_TARGET_FILE_NAME).path },
     saver: { type: "pdf" },
   });
 
   try {
     yield download.start();
@@ -86,56 +82,52 @@ add_task(function* test_createDownload_p
   do_check_true(download.error.becauseSourceFailed);
   do_check_false(download.error.becauseTargetFailed);
   do_check_false(yield OS.File.exists(download.target.path));
 });
 
 /**
  * Tests "fetch" with nsIURI and nsIFile as arguments.
  */
-add_task(function* test_fetch_uri_file_arguments()
-{
+add_task(function* test_fetch_uri_file_arguments() {
   let targetFile = getTempFile(TEST_TARGET_FILE_NAME);
   yield Downloads.fetch(NetUtil.newURI(httpUrl("source.txt")), targetFile);
   yield promiseVerifyContents(targetFile.path, TEST_DATA_SHORT);
 });
 
 /**
  * Tests "fetch" with DownloadSource and DownloadTarget as arguments.
  */
-add_task(function* test_fetch_object_arguments()
-{
+add_task(function* test_fetch_object_arguments() {
   let targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
   yield Downloads.fetch({ url: httpUrl("source.txt") }, { path: targetPath });
   yield promiseVerifyContents(targetPath, TEST_DATA_SHORT);
 });
 
 /**
  * Tests "fetch" with string arguments.
  */
-add_task(function* test_fetch_string_arguments()
-{
+add_task(function* test_fetch_string_arguments() {
   let targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
   yield Downloads.fetch(httpUrl("source.txt"), targetPath);
   yield promiseVerifyContents(targetPath, TEST_DATA_SHORT);
 
   targetPath = getTempFile(TEST_TARGET_FILE_NAME).path;
   yield Downloads.fetch(new String(httpUrl("source.txt")),
                         new String(targetPath));
   yield promiseVerifyContents(targetPath, TEST_DATA_SHORT);
 });
 
 /**
  * Tests that the getList function returns the same list when called multiple
  * times with the same argument, but returns different lists when called with
  * different arguments.  More detailed tests are implemented separately for the
  * DownloadList module.
  */
-add_task(function* test_getList()
-{
+add_task(function* test_getList() {
   let publicListOne = yield Downloads.getList(Downloads.PUBLIC);
   let privateListOne = yield Downloads.getList(Downloads.PRIVATE);
 
   let publicListTwo = yield Downloads.getList(Downloads.PUBLIC);
   let privateListTwo = yield Downloads.getList(Downloads.PRIVATE);
 
   do_check_eq(publicListOne, publicListTwo);
   do_check_eq(privateListOne, privateListTwo);
@@ -144,51 +136,47 @@ add_task(function* test_getList()
 });
 
 /**
  * Tests that the getSummary function returns the same summary when called
  * multiple times with the same argument, but returns different summaries when
  * called with different arguments.  More detailed tests are implemented
  * separately for the DownloadSummary object in the DownloadList module.
  */
-add_task(function* test_getSummary()
-{
+add_task(function* test_getSummary() {
   let publicSummaryOne = yield Downloads.getSummary(Downloads.PUBLIC);
   let privateSummaryOne = yield Downloads.getSummary(Downloads.PRIVATE);
 
   let publicSummaryTwo = yield Downloads.getSummary(Downloads.PUBLIC);
   let privateSummaryTwo = yield Downloads.getSummary(Downloads.PRIVATE);
 
   do_check_eq(publicSummaryOne, publicSummaryTwo);
   do_check_eq(privateSummaryOne, privateSummaryTwo);
 
   do_check_neq(publicSummaryOne, privateSummaryOne);
 });
 
 /**
  * Tests that the getSystemDownloadsDirectory returns a non-empty download
  * directory string.
  */
-add_task(function* test_getSystemDownloadsDirectory()
-{
+add_task(function* test_getSystemDownloadsDirectory() {
   let downloadDir = yield Downloads.getSystemDownloadsDirectory();
   do_check_neq(downloadDir, "");
 });
 
 /**
  * Tests that the getPreferredDownloadsDirectory returns a non-empty download
  * directory string.
  */
-add_task(function* test_getPreferredDownloadsDirectory()
-{
+add_task(function* test_getPreferredDownloadsDirectory() {
   let downloadDir = yield Downloads.getPreferredDownloadsDirectory();
   do_check_neq(downloadDir, "");
 });
 
 /**
  * Tests that the getTemporaryDownloadsDirectory returns a non-empty download
  * directory string.
  */
-add_task(function* test_getTemporaryDownloadsDirectory()
-{
+add_task(function* test_getTemporaryDownloadsDirectory() {
   let downloadDir = yield Downloads.getTemporaryDownloadsDirectory();
   do_check_neq(downloadDir, "");
 });
--- a/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
+++ b/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
@@ -62,18 +62,17 @@ var listener = {
   },
 
   onStopRequest(request, context, status) {
     testRan++;
     runNext();
   }
 };
 
-function setupChannel(url, flags)
-{
+function setupChannel(url, flags) {
   let uri = "http://localhost:" +
              httpserver.identity.primaryPort + url;
   var chan = NetUtil.newChannel({
     uri,
     loadUsingSystemPrincipal: true,
     contentPolicyType: Ci.nsIContentPolicy.TYPE_MEDIA
   });
   chan.loadFlags |= flags;
--- a/toolkit/components/microformats/microformat-shiv.js
+++ b/toolkit/components/microformats/microformat-shiv.js
@@ -3340,17 +3340,17 @@ var Microformats; // jshint ignore:line
         toString( format ) {
             var output = '';
 
             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) {
                     output += this.dsep + this.dM;
                     if (this.dD > 0 && this.dD < 32) {
                         output += this.dsep + this.dD;
                         if (this.tH > -1 && this.tH < 25) {
                             output += this.sep + this.toTimeString( format );
                         }
@@ -3556,17 +3556,17 @@ var Microformats; // jshint ignore:line
          * @param  {String} text
          * @return {Boolean}
          */
         isTime( 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]/) &&
                     ( this.hasAM(text) || this.hasPM(text) )) {
                     return true;
                 }
                 // contains time delimiter but not datetime delimiter
@@ -3921,17 +3921,17 @@ var Microformats; // jshint ignore:line
             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 + '"';
+                    out += ' ' + attrs[j].name + '=' + '"' + attrs[j].value + '"';
                 }
 
                 if (this.selfClosingElt.indexOf(node.tagName.toLowerCase()) === -1) {
                     out += '>';
                 }
 
                 // get the text of the child nodes
                 if (node.childNodes && node.childNodes.length > 0) {
--- a/toolkit/components/microformats/update/update.js
+++ b/toolkit/components/microformats/update/update.js
@@ -188,17 +188,17 @@ 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 {
 		  console.log(error, response, body);
 		  callback('fail to get last build state', null);
 	  }
 	});
--- a/toolkit/components/nsDefaultCLH.js
+++ b/toolkit/components/nsDefaultCLH.js
@@ -21,18 +21,17 @@ const nsISimpleEnumerator      = Compone
  * It opens the chrome window specified by the pref "toolkit.defaultChromeURI"
  * with the flags specified by the pref "toolkit.defaultChromeFeatures"
  * or "chrome,dialog=no,all" is it is not available.
  * The arguments passed to the window are the nsICommandLine instance.
  *
  * It doesn't do anything if the pref "toolkit.defaultChromeURI" is unset.
  */
 
-function getDirectoryService()
-{
+function getDirectoryService() {
   return Components.classes["@mozilla.org/file/directory_service;1"]
                    .getService(nsIProperties);
 }
 
 function nsDefaultCLH() { }
 nsDefaultCLH.prototype = {
   classID: Components.ID("{6ebc941a-f2ff-4d56-b3b6-f7d0b9d73344}"),
 
@@ -43,36 +42,34 @@ nsDefaultCLH.prototype = {
   /* nsICommandLineHandler */
 
   handle : function clh_handle(cmdLine) {
     var printDir;
     while ((printDir = cmdLine.handleFlagWithParam("print-xpcom-dir", false))) {
       var out = "print-xpcom-dir(\"" + printDir + "\"): ";
       try {
         out += getDirectoryService().get(printDir, nsIFile).path;
-      }
-      catch (e) {
+      } catch (e) {
         out += "<Not Provided>";
       }
 
       dump(out + "\n");
       Components.utils.reportError(out);
     }
 
     var printDirList;
     while ((printDirList = cmdLine.handleFlagWithParam("print-xpcom-dirlist",
                                                        false))) {
       out = "print-xpcom-dirlist(\"" + printDirList + "\"): ";
       try {
         var list = getDirectoryService().get(printDirList,
                                              nsISimpleEnumerator);
         while (list.hasMoreElements())
           out += list.getNext().QueryInterface(nsIFile).path + ";";
-      }
-      catch (e) {
+      } catch (e) {
         out += "<Not Provided>";
       }
 
       dump(out + "\n");
       Components.utils.reportError(out);
     }
 
     if (cmdLine.handleFlag("silent", false)) {
@@ -93,33 +90,30 @@ nsDefaultCLH.prototype = {
                           .getService(Components.interfaces.nsIWindowMediator);
 
       var win = windowMediator.getMostRecentWindow(singletonWindowType);
       if (win) {
         win.focus();
         cmdLine.preventDefault = true;
         return;
       }
-    }
-    catch (e) { }
+    } catch (e) { }
 
     // if the pref is missing, ignore the exception
     try {
       var chromeURI = prefs.getCharPref("toolkit.defaultChromeURI");
 
       var flags = "chrome,dialog=no,all";
       try {
         flags = prefs.getCharPref("toolkit.defaultChromeFeatures");
-      }
-      catch (e) { }
+      } catch (e) { }
 
       var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
                             .getService(nsIWindowWatcher);
       wwatch.openWindow(null, chromeURI, "_blank",
                         flags, cmdLine);
-    }
-    catch (e) { }
+    } catch (e) { }
   },
 
   helpInfo : "",
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([nsDefaultCLH]);
--- a/toolkit/components/passwordmgr/LoginHelper.jsm
+++ b/toolkit/components/passwordmgr/LoginHelper.jsm
@@ -91,19 +91,19 @@ this.LoginHelper = {
    * sure certain field values or characters do not cause the file to
    * be parsed incorrectly.  Reject logins that we can't store correctly.
    *
    * @throws String with English message in case validation failed.
    */
   checkLoginValues(aLogin) {
     function badCharacterPresent(l, c) {
       return ((l.formSubmitURL && l.formSubmitURL.indexOf(c) != -1) ||
-              (l.httpRealm     && l.httpRealm.indexOf(c)     != -1) ||
-                                  l.hostname.indexOf(c)      != -1  ||
-                                  l.usernameField.indexOf(c) != -1  ||
+              (l.httpRealm && l.httpRealm.indexOf(c) != -1) ||
+                                  l.hostname.indexOf(c) != -1 ||
+                                  l.usernameField.indexOf(c) != -1 ||
                                   l.passwordField.indexOf(c) != -1);
     }
 
     // Nulls are invalid, as they don't round-trip well.
     // Mostly not a formatting problem, although ".\0" can be quirky.
     if (badCharacterPresent(aLogin, "\0")) {
       throw new Error("login values can't contain nulls");
     }
@@ -532,20 +532,20 @@ this.LoginHelper = {
    */
   isUsernameFieldType(element) {
     if (!(element instanceof Ci.nsIDOMHTMLInputElement))
       return false;
 
     let fieldType = (element.hasAttribute("type") ?
                      element.getAttribute("type").toLowerCase() :
                      element.type);
-    if (fieldType == "text"  ||
+    if (fieldType == "text" ||
         fieldType == "email" ||
-        fieldType == "url"   ||
-        fieldType == "tel"   ||
+        fieldType == "url" ||
+        fieldType == "tel" ||
         fieldType == "number") {
       return true;
     }
     return false;
   },
 
   /**
    * Add the login to the password manager if a similar one doesn't already exist. Merge it
@@ -564,17 +564,17 @@ this.LoginHelper = {
                loginData.username,
                loginData.password,
                loginData.usernameElement || "",
                loginData.passwordElement || "");
 
     login.QueryInterface(Ci.nsILoginMetaInfo);
     login.timeCreated = loginData.timeCreated;
     login.timeLastUsed = loginData.timeLastUsed || loginData.timeCreated;
-    login.timePasswordChanged = loginData.timePasswordChanged  || loginData.timeCreated;
+    login.timePasswordChanged = loginData.timePasswordChanged || loginData.timeCreated;
     login.timesUsed = loginData.timesUsed || 1;
     // While here we're passing formSubmitURL and httpRealm, they could be empty/null and get
     // ignored in that case, leading to multiple logins for the same username.
     let existingLogins = Services.logins.findLogins({}, login.hostname,
                                                     login.formSubmitURL,
                                                     login.httpRealm);
     // Check for an existing login that matches *including* the password.
     // If such a login exists, we do not need to add a new login.
--- a/toolkit/components/passwordmgr/LoginManagerContent.jsm
+++ b/toolkit/components/passwordmgr/LoginManagerContent.jsm
@@ -733,17 +733,17 @@ var LoginManagerContent = {
         newPasswordField = pwFields[0].element;
         oldPasswordField = null;
       } else if (pw1 == pw2) {
         newPasswordField = pwFields[0].element;
         oldPasswordField = pwFields[2].element;
       } else if (pw2 == pw3) {
         oldPasswordField = pwFields[0].element;
         newPasswordField = pwFields[2].element;
-      } else  if (pw1 == pw3) {
+      } else if (pw1 == pw3) {
         // A bit odd, but could make sense with the right page layout.
         newPasswordField = pwFields[0].element;
         oldPasswordField = pwFields[1].element;
       } else {
         // We can't tell which of the 3 passwords should be saved.
         log("(form ignored -- all 3 pw fields differ)");
         return [null, null, null];
       }
@@ -1272,17 +1272,17 @@ UserAutoCompleteResult.prototype = {
     function loginSort(a, b) {
       var userA = a.username.toLowerCase();
       var userB = b.username.toLowerCase();
 
       if (userA < userB)
         return -1;
 
       if (userA > userB)
-        return  1;
+        return 1;
 
       return 0;
     }
 
     function findDuplicates(loginList) {
       let seen = new Set();
       let duplicates = new Set();
       for (let login of loginList) {
--- a/toolkit/components/passwordmgr/LoginManagerParent.jsm
+++ b/toolkit/components/passwordmgr/LoginManagerParent.jsm
@@ -315,17 +315,17 @@ var LoginManagerParent = {
       return;
     }
 
     var formLogin = Cc["@mozilla.org/login-manager/loginInfo;1"].
                     createInstance(Ci.nsILoginInfo);
     formLogin.init(hostname, formSubmitURL, null,
                    (usernameField ? usernameField.value : ""),
                    newPasswordField.value,
-                   (usernameField ? usernameField.name  : ""),
+                   (usernameField ? usernameField.name : ""),
                    newPasswordField.name);
 
     let logins = LoginHelper.searchLoginsWithObject({
       formSubmitURL,
       hostname,
       schemeUpgrades: LoginHelper.schemeUpgrades,
     });
 
--- a/toolkit/components/passwordmgr/nsLoginInfo.js
+++ b/toolkit/components/passwordmgr/nsLoginInfo.js
@@ -25,17 +25,17 @@ nsLoginInfo.prototype = {
   formSubmitURL : null,
   httpRealm     : null,
   username      : null,
   password      : null,
   usernameField : null,
   passwordField : null,
 
   init(aHostname, aFormSubmitURL, aHttpRealm,
-                  aUsername,      aPassword,
+                  aUsername, aPassword,
                   aUsernameField, aPasswordField) {
     this.hostname      = aHostname;
     this.formSubmitURL = aFormSubmitURL;
     this.httpRealm     = aHttpRealm;
     this.username      = aUsername;
     this.password      = aPassword;
     this.usernameField = aUsernameField;
     this.passwordField = aPasswordField;
@@ -43,21 +43,21 @@ nsLoginInfo.prototype = {
 
   matches(aLogin, ignorePassword) {
     return LoginHelper.doLoginsMatch(this, aLogin, {
       ignorePassword,
     });
   },
 
   equals(aLogin) {
-    if (this.hostname      != aLogin.hostname      ||
+    if (this.hostname != aLogin.hostname ||
         this.formSubmitURL != aLogin.formSubmitURL ||
-        this.httpRealm     != aLogin.httpRealm     ||
-        this.username      != aLogin.username      ||
-        this.password      != aLogin.password      ||
+        this.httpRealm != aLogin.httpRealm ||
+        this.username != aLogin.username ||
+        this.password != aLogin.password ||
         this.usernameField != aLogin.usernameField ||
         this.passwordField != aLogin.passwordField)
       return false;
 
     return true;
   },
 
   clone() {
--- a/toolkit/components/passwordmgr/storage-mozStorage.js
+++ b/toolkit/components/passwordmgr/storage-mozStorage.js
@@ -94,37 +94,37 @@ LoginManagerStorage_mozStorage.prototype
     return this.__uuidService;
   },
 
 
   // The current database schema.
   _dbSchema: {
     tables: {
       moz_logins:         "id                  INTEGER PRIMARY KEY," +
-                          "hostname            TEXT NOT NULL,"       +
-                          "httpRealm           TEXT,"                +
-                          "formSubmitURL       TEXT,"                +
-                          "usernameField       TEXT NOT NULL,"       +
-                          "passwordField       TEXT NOT NULL,"       +
-                          "encryptedUsername   TEXT NOT NULL,"       +
-                          "encryptedPassword   TEXT NOT NULL,"       +
-                          "guid                TEXT,"                +
-                          "encType             INTEGER,"             +
-                          "timeCreated         INTEGER,"             +
-                          "timeLastUsed        INTEGER,"             +
-                          "timePasswordChanged INTEGER,"             +
+                          "hostname            TEXT NOT NULL," +
+                          "httpRealm           TEXT," +
+                          "formSubmitURL       TEXT," +
+                          "usernameField       TEXT NOT NULL," +
+                          "passwordField       TEXT NOT NULL," +
+                          "encryptedUsername   TEXT NOT NULL," +
+                          "encryptedPassword   TEXT NOT NULL," +
+                          "guid                TEXT," +
+                          "encType             INTEGER," +
+                          "timeCreated         INTEGER," +
+                          "timeLastUsed        INTEGER," +
+                          "timePasswordChanged INTEGER," +
                           "timesUsed           INTEGER",
       // Changes must be reflected in this._dbAreExpectedColumnsPresent(),
       // this._searchLogins(), and this.modifyLogin().
 
       moz_disabledHosts:  "id                 INTEGER PRIMARY KEY," +
                           "hostname           TEXT UNIQUE ON CONFLICT REPLACE",
 
       moz_deleted_logins: "id                  INTEGER PRIMARY KEY," +
-                          "guid                TEXT,"                +
+                          "guid                TEXT," +
                           "timeDeleted         INTEGER",
     },
     indices: {
       moz_logins_hostname_index: {
         table: "moz_logins",
         columns: ["hostname"]
       },
       moz_logins_hostname_formSubmitURL_index: {
@@ -924,17 +924,17 @@ LoginManagerStorage_mozStorage.prototype
 
     try {
       for (let v = oldVersion + 1; v <= DB_VERSION; v++) {
         this.log("Upgrading to version " + v + "...");
         let migrateFunction = "_dbMigrateToVersion" + v;
         this[migrateFunction]();
       }
     } catch (e) {
-      this.log("Migration failed: "  + e);
+      this.log("Migration failed: " + e);
       transaction.rollback();
       throw e;
     }
 
     this._dbConnection.schemaVersion = DB_VERSION;
     transaction.commit();
     this.log("DB migration completed.");
   },
--- a/toolkit/components/passwordmgr/test/browser/browser_context_menu_iframe.js
+++ b/toolkit/components/passwordmgr/test/browser/browser_context_menu_iframe.js
@@ -39,17 +39,17 @@ add_task(function* test_context_menu_ifr
     let contextMenuShownPromise = BrowserTestUtils.waitForEvent(window, "popupshown");
     let eventDetails = {type: "contextmenu", button: 2};
 
     // To click at the right point we have to take into account the iframe offset.
     let iframeRect = iframe.getBoundingClientRect();
     let inputRect = passwordInput.getBoundingClientRect();
     let clickPos = {
       offsetX: iframeRect.left + inputRect.width / 2,
-      offsetY: iframeRect.top  + inputRect.height / 2,
+      offsetY: iframeRect.top + inputRect.height / 2,
     };
 
     // Synthesize a right mouse click over the password input element.
     BrowserTestUtils.synthesizeMouse(passwordInput, clickPos.offsetX, clickPos.offsetY, eventDetails, browser);
     yield contextMenuShownPromise;
 
     // Synthesize a mouse click over the fill login menu header.
     let popupHeader = document.getElementById("fill-login");
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw.html
@@ -143,22 +143,22 @@ function startTest() {
     checkForm(f++, "testpass");
     checkForm(f++, "testpass");
     checkForm(f++, "xxxxxxxx");
 
     // 4-8
     checkForm(f++, "testuser", "testpass");
     checkForm(f++, "testuser", "testpass");
     checkForm(f++, "xxxxxxxx", "");
-    checkForm(f++, "",         "testpass");
-    checkForm(f++, "",         "xxxxxxxx");
+    checkForm(f++, "", "testpass");
+    checkForm(f++, "", "xxxxxxxx");
 
     // 9-14
     checkForm(f++, "testpass", "");
-    checkForm(f++, "",         "testuser", "testpass");
+    checkForm(f++, "", "testuser", "testpass");
     checkForm(f++, "testuser", "testpass", "");
     checkForm(f++, "testpass", "xxxxxxxx");
     checkForm(f++, "xxxxxxxx", "testuser", "testpass");
     checkForm(f++, "testuser", "testpass", "xxxxxxxx");
 
     SimpleTest.finish();
 }
 </script>
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw_2.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_1pw_2.html
@@ -89,17 +89,17 @@ runChecksAfterCommonInit(() => startTest
 function startTest() {
     var f;
 
     // Test various combinations of disabled/readonly inputs
     checkForm(1, "testpass"); // control
     checkUnmodifiedForm(2);
     checkUnmodifiedForm(3);
     checkForm(4, "testuser", "testpass"); // control
-    for (f = 5;  f <= 8;  f++) { checkUnmodifiedForm(f); }
+    for (f = 5; f <= 8; f++) { checkUnmodifiedForm(f); }
     // Test case-insensitive comparison of username field
     checkForm(9, "testuser", "testpass");
     checkForm(10, "TESTUSER", "testpass");
     checkForm(11, "TESTUSER", "testpass");
 
     SimpleTest.finish();
 }
 </script>
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_2pw_1.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_2pw_1.html
@@ -170,18 +170,18 @@ function startTest() {
     // 7-15 with username
     checkForm(f++, "testuser", "testpass", "");
     checkForm(f++, "testuser", "testpass", "");
     checkForm(f++, "testuser", "testpass", "");
     checkForm(f++, "xxxxxxxx", "", "");
     checkForm(f++, "testuser", "xxxxxxxx", "");
     checkForm(f++, "testuser", "testpass", "xxxxxxxx");
     checkForm(f++, "testuser", "testpass", "");
-    checkForm(f++, "",         "xxxxxxxx", "testpass");
-    checkForm(f++, "testpass", "",         "");
-    checkForm(f++, "xxxxxxxx", "",         "");
+    checkForm(f++, "", "xxxxxxxx", "testpass");
+    checkForm(f++, "testpass", "", "");
+    checkForm(f++, "xxxxxxxx", "", "");
 
     SimpleTest.finish();
 }
 </script>
 </pre>
 </body>
 </html>
--- a/toolkit/components/passwordmgr/test/mochitest/test_basic_form_3pw_1.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_basic_form_3pw_1.html
@@ -116,59 +116,59 @@ runChecksAfterCommonInit(() => startTest
 /** Test for Login Manager: form fill, 3 password fields **/
 
 // Test to make sure 3-password forms are filled properly.
 
 function startTest() {
   // Check form 1
   is($_(1, "uname").value, "testuser", "Checking username 1");
   is($_(1, "pword").value, "testpass", "Checking password 1");
-  is($_(1, "qword").value, "",         "Checking password 1 (q)");
-  is($_(1, "rword").value, "",         "Checking password 1 (r)");
+  is($_(1, "qword").value, "", "Checking password 1 (q)");
+  is($_(1, "rword").value, "", "Checking password 1 (r)");
   // Check form 2
   is($_(2, "uname").value, "testuser", "Checking username 2");
   is($_(2, "pword").value, "testpass", "Checking password 2");
-  is($_(2, "qword").value, "",         "Checking password 2 (q)");
-  is($_(2, "rword").value, "",         "Checking password 2 (r)");
+  is($_(2, "qword").value, "", "Checking password 2 (q)");
+  is($_(2, "rword").value, "", "Checking password 2 (r)");
   // Check form 3
   is($_(3, "uname").value, "testuser", "Checking username 3");
   is($_(3, "pword").value, "testpass", "Checking password 3");
-  is($_(3, "qword").value, "",         "Checking password 3 (q)");
-  is($_(3, "rword").value, "",         "Checking password 3 (r)");
+  is($_(3, "qword").value, "", "Checking password 3 (q)");
+  is($_(3, "rword").value, "", "Checking password 3 (r)");
 
   // Check form 4
   is($_(4, "uname").value, "testuser", "Checking username 4");
-  todo_is($_(4, "qword").value, "",         "Checking password 4 (q)");
+  todo_is($_(4, "qword").value, "", "Checking password 4 (q)");
   todo_is($_(4, "pword").value, "testpass", "Checking password 4");
-  is($_(4, "rword").value, "",         "Checking password 4 (r)");
+  is($_(4, "rword").value, "", "Checking password 4 (r)");
   // Check form 5
   is($_(5, "uname").value, "testuser", "Checking username 5");
-  todo_is($_(5, "qword").value, "",         "Checking password 5 (q)");
+  todo_is($_(5, "qword").value, "", "Checking password 5 (q)");
   todo_is($_(5, "pword").value, "testpass", "Checking password 5");
-  is($_(5, "rword").value, "",         "Checking password 5 (r)");
+  is($_(5, "rword").value, "", "Checking password 5 (r)");
   // Check form 6
   is($_(6, "uname").value, "testuser", "Checking username 6");
-  todo_is($_(6, "qword").value, "",         "Checking password 6 (q)");
+  todo_is($_(6, "qword").value, "", "Checking password 6 (q)");
   is($_(6, "pword").value, "testpass", "Checking password 6");
-  is($_(6, "rword").value, "",         "Checking password 6 (r)");
+  is($_(6, "rword").value, "", "Checking password 6 (r)");
 
   // Check form 7
   is($_(7, "uname").value, "testuser", "Checking username 7");
-  todo_is($_(7, "qword").value, "",         "Checking password 7 (q)");
-  is($_(7, "rword").value, "",         "Checking password 7 (r)");
+  todo_is($_(7, "qword").value, "", "Checking password 7 (q)");
+  is($_(7, "rword").value, "", "Checking password 7 (r)");
   todo_is($_(7, "pword").value, "testpass", "Checking password 7");
   // Check form 8
   is($_(8, "uname").value, "testuser", "Checking username 8");
-  todo_is($_(8, "qword").value, "",         "Checking password 8 (q)");
-  is($_(8, "rword").value, "",         "Checking password 8 (r)");
+  todo_is($_(8, "qword").value, "", "Checking password 8 (q)");
+  is($_(8, "rword").value, "", "Checking password 8 (r)");
   todo_is($_(8, "pword").value, "testpass", "Checking password 8");
   // Check form 9
   is($_(9, "uname").value, "testuser", "Checking username 9");
-  todo_is($_(9, "qword").value, "",         "Checking password 9 (q)");
-  is($_(9, "rword").value, "",         "Checking password 9 (r)");
+  todo_is($_(9, "qword").value, "", "Checking password 9 (q)");
+  is($_(9, "rword").value, "", "Checking password 9 (r)");
   is($_(9, "pword").value, "testpass", "Checking password 9");
 
   // TODO: as with the 2-password cases, add tests to check for creating new
   // logins and changing passwords.
   SimpleTest.finish();
 }
 </script>
 </pre>
--- a/toolkit/components/passwordmgr/test/mochitest/test_form_action_2.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_form_action_2.html
@@ -137,32 +137,32 @@ runChecksAfterCommonInit(() => startTest
 function startTest() {
   for (var i = 1; i <= 8; i++) {
     // Check form i
     is($_(i, "uname").value, "", "Checking for unfilled username " + i);
     is($_(i, "pword").value, "", "Checking for unfilled password " + i);
   }
 
   is($_(9, "uname").value, "testuser", "Checking for unmodified username 9");
-  is($_(9, "pword").value, "",         "Checking for unfilled password 9");
+  is($_(9, "pword").value, "", "Checking for unfilled password 9");
 
   is($_("10-A", "uname").value, "", "Checking for unfilled username 10A");
   is($_("10-A", "pword").value, "", "Checking for unfilled password 10A");
 
   // The DOM indicates this form could be filled, as the evil inner form
   // is discarded. And yet pwmgr seems not to fill it. Not sure why.
   todo(false, "Mangled form combo not being filled when maybe it could be?");
   is($_("11-A", "uname").value, "testuser", "Checking filled username 11A");
   is($_("11-A", "pword").value, "testpass", "Checking filled password 11A");
 
   // Verify this by making sure there are no extra forms in the document, and
   // that the submit button for the neutered forms don't do anything.
   // If the test finds extra forms the submit() causes the test to timeout, then
   // there may be a security issue.
-  is(document.forms.length,  11,  "Checking for unexpected forms");
+  is(document.forms.length, 11, "Checking for unexpected forms");
   $("neutered_submit10").click();
   $("neutered_submit11").click();
 
   SimpleTest.finish();
 }
 </script>
 </pre>
 </body>
--- a/toolkit/components/passwordmgr/test/mochitest/test_passwords_in_type_password.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_passwords_in_type_password.html
@@ -107,16 +107,16 @@ function startTest() {
 
   is($_(5, "uname").value, "", "Checking for unfilled username 5");
   is($_(5, "pword").value, "testpass", "Checking for filled password 5");
 
   is($_(6, "uname").value, "", "Checking for unfilled username 6");
   is($_(6, "pword").value, "", "Checking for unfilled password 6");
 
   is($_(7, "uname").value, "testuser", "Checking for unmodified username 7");
-  is($_(7, "pword").value, "",         "Checking for unfilled password 7");
+  is($_(7, "pword").value, "", "Checking for unfilled password 7");
 
   SimpleTest.finish();
 }
 </script>
 </pre>
 </body>
 </html>
--- a/toolkit/components/passwordmgr/test/pwmgr_common.js
+++ b/toolkit/components/passwordmgr/test/pwmgr_common.js
@@ -110,20 +110,20 @@ function doKey(aKey, modifier) {
   if (!modifier)
     modifier = null;
 
   // Window utils for sending fake sey events.
   var wutils = SpecialPowers.wrap(window).
                QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor).
                getInterface(SpecialPowers.Ci.nsIDOMWindowUtils);
 
-  if (wutils.sendKeyEvent("keydown",  key, 0, modifier)) {
+  if (wutils.sendKeyEvent("keydown", key, 0, modifier)) {
     wutils.sendKeyEvent("keypress", key, 0, modifier);
   }
-  wutils.sendKeyEvent("keyup",    key, 0, modifier);
+  wutils.sendKeyEvent("keyup", key, 0, modifier);
 }
 
 /**
  * Init with a common login
  * If selfFilling is true or non-undefined, fires an event at the page so that
  * the test can start checking filled-in values. Tests that check observer
  * notifications might be confused by this.
  */
--- a/toolkit/components/passwordmgr/test/unit/test_OSCrypto_win.js
+++ b/toolkit/components/passwordmgr/test/unit/test_OSCrypto_win.js
@@ -1,17 +1,17 @@
 /**
  * Tests the OSCrypto object.
  */
 
 "use strict";
 
 // Globals
 
-XPCOMUtils.defineLazyModuleGetter(this,  "OSCrypto",
+XPCOMUtils.defineLazyModuleGetter(this, "OSCrypto",
                                   "resource://gre/modules/OSCrypto.jsm");
 
 var crypto = new OSCrypto();
 
 // Tests
 
 add_task(function test_getIELoginHash()
 {
--- a/toolkit/components/passwordmgr/test/unit/test_module_LoginImport.js
+++ b/toolkit/components/passwordmgr/test/unit/test_module_LoginImport.js
@@ -34,35 +34,35 @@ XPCOMUtils.defineLazyServiceGetter(this,
  * the most recent schema version (excluding indices).
  */
 function promiseCreateDatabaseSchema(aConnection)
 {
   return Task.spawn(function* () {
     yield aConnection.setSchemaVersion(5);
     yield aConnection.execute("CREATE TABLE moz_logins (" +
                               "id                  INTEGER PRIMARY KEY," +
-                              "hostname            TEXT NOT NULL,"       +
-                              "httpRealm           TEXT,"                +
-                              "formSubmitURL       TEXT,"                +
-                              "usernameField       TEXT NOT NULL,"       +
-                              "passwordField       TEXT NOT NULL,"       +
-                              "encryptedUsername   TEXT NOT NULL,"       +
-                              "encryptedPassword   TEXT NOT NULL,"       +
-                              "guid                TEXT,"                +
-                              "encType             INTEGER,"             +
-                              "timeCreated         INTEGER,"             +
-                              "timeLastUsed        INTEGER,"             +
-                              "timePasswordChanged INTEGER,"             +
+                              "hostname            TEXT NOT NULL," +
+                              "httpRealm           TEXT," +
+                              "formSubmitURL       TEXT," +
+                              "usernameField       TEXT NOT NULL," +
+                              "passwordField       TEXT NOT NULL," +
+                              "encryptedUsername   TEXT NOT NULL," +
+                              "encryptedPassword   TEXT NOT NULL," +
+                              "guid                TEXT," +
+                              "encType             INTEGER," +
+                              "timeCreated         INTEGER," +
+                              "timeLastUsed        INTEGER," +
+                              "timePasswordChanged INTEGER," +
                               "timesUsed           INTEGER)");
-    yield aConnection.execute("CREATE TABLE moz_disabledHosts ("         +
+    yield aConnection.execute("CREATE TABLE moz_disabledHosts (" +
                               "id                  INTEGER PRIMARY KEY," +
                               "hostname            TEXT UNIQUE)");
-    yield aConnection.execute("CREATE TABLE moz_deleted_logins ("        +
+    yield aConnection.execute("CREATE TABLE moz_deleted_logins (" +
                               "id                  INTEGER PRIMARY KEY," +
-                              "guid                TEXT,"                +
+                              "guid                TEXT," +
                               "timeDeleted         INTEGER)");
   });
 }
 
 /**
  * Inserts a new entry in the database resembling the given nsILoginInfo object.
  */
 function promiseInsertLoginInfo(aConnection, aLoginInfo)
--- a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js
+++ b/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js
@@ -38,21 +38,23 @@ function burnCPU() {
  * Spend some time in CPOW.
  */
 function burnCPOW() {
   gBurnCPOW();
 }
 let gBurnCPOW = null;
 
 function burnContentCPU() {
-  setTimeout(() => { try {
+  setTimeout(() => {
+ try {
     gBurnContentCPU()
   } catch (ex) {
     dump(`test-addon error: ${ex}\n`);
-  } }, 0);
+  }
+}, 0);
 }
 let gBurnContentCPU = null;
 
 let gTab = null;
 let gTabBrowser = null;
 
 function startup() {
   Services.obs.addObserver(burnCPU, TOPIC_BURNCPU, false);
--- a/toolkit/components/places/BookmarkHTMLUtils.jsm
+++ b/toolkit/components/places/BookmarkHTMLUtils.jsm
@@ -1037,17 +1037,17 @@ BookmarkExporter.prototype = {
 
   _converterOut: null,
 
   _write(aText) {
     this._converterOut.writeString(aText || "");
   },
 
   _writeAttribute(aName, aValue) {
-    this._write(' ' +  aName + '="' + aValue + '"');
+    this._write(' ' + aName + '="' + aValue + '"');
   },
 
   _writeLine(aText) {
     this._write(aText + "\n");
   },
 
   _writeHeader() {
     this._writeLine("<!DOCTYPE NETSCAPE-Bookmark-file-1>");
@@ -1058,18 +1058,17 @@ BookmarkExporter.prototype = {
                     'charset=UTF-8">');
     this._writeLine("<TITLE>Bookmarks</TITLE>");
   },
 
   *_writeContainer(aItem, aIndent = "") {
     if (aItem == this._root) {
       this._writeLine("<H1>" + escapeHtmlEntities(this._root.title) + "</H1>");
       this._writeLine("");
-    }
-    else {
+    } else {
       this._write(aIndent + "<DT><H3");
       this._writeDateAttributes(aItem);
 
       if (aItem.root === "toolbarFolder")
         this._writeAttribute("PERSONAL_TOOLBAR_FOLDER", "true");
       else if (aItem.root === "unfiledBookmarksFolder")
         this._writeAttribute("UNFILED_BOOKMARKS_FOLDER", "true");
       this._writeLine(">" + escapeHtmlEntities(aItem.title) + "</H3>");
--- a/toolkit/components/places/PlacesCategoriesStarter.js
+++ b/toolkit/components/places/PlacesCategoriesStarter.js
@@ -23,18 +23,17 @@ Components.utils.import("resource://gre/
 Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PlacesDBUtils",
                                   "resource://gre/modules/PlacesDBUtils.jsm");
 
 /**
  * This component can be used as a starter for modules that have to run when
  * certain categories are invoked.
  */
-function PlacesCategoriesStarter()
-{
+function PlacesCategoriesStarter() {
   Services.obs.addObserver(this, TOPIC_GATHER_TELEMETRY, false);
   Services.obs.addObserver(this, PlacesUtils.TOPIC_SHUTDOWN, false);
 
   // nsINavBookmarkObserver implementation.
   let notify = () => {
     if (!this._notifiedBookmarksSvcReady) {
       // TODO (bug 1145424): for whatever reason, even if we remove this
       // component from the category (and thus from the category cache we use
@@ -53,18 +52,17 @@ function PlacesCategoriesStarter()
   [ "onItemAdded", "onItemRemoved", "onItemChanged", "onBeginUpdateBatch",
     "onEndUpdateBatch", "onItemVisited", "onItemMoved"
   ].forEach(aMethod => this[aMethod] = notify);
 }
 
 PlacesCategoriesStarter.prototype = {
   // nsIObserver
 
-  observe: function PCS_observe(aSubject, aTopic, aData)
-  {
+  observe: function PCS_observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case PlacesUtils.TOPIC_SHUTDOWN:
         Services.obs.removeObserver(this, PlacesUtils.TOPIC_SHUTDOWN);
         Services.obs.removeObserver(this, TOPIC_GATHER_TELEMETRY);
         let globalObj =
           Cu.getGlobalForObject(PlacesCategoriesStarter.prototype);
         let descriptor =
           Object.getOwnPropertyDescriptor(globalObj, "PlacesDBUtils");
--- a/toolkit/components/places/PlacesDBUtils.jsm
+++ b/toolkit/components/places/PlacesDBUtils.jsm
@@ -33,28 +33,26 @@ this.PlacesDBUtils = {
   /**
    * Executes a list of maintenance tasks.
    * Once finished it will pass a array log to the callback attached to tasks.
    * FINISHED_MAINTENANCE_TOPIC is notified through observer service on finish.
    *
    * @param aTasks
    *        Tasks object to execute.
    */
-  _executeTasks: function PDBU__executeTasks(aTasks)
-  {
+  _executeTasks: function PDBU__executeTasks(aTasks) {
     if (PlacesDBUtils._isShuttingDown) {
       aTasks.log("- We are shutting down. Will not schedule the tasks.");
       aTasks.clear();
     }
 
     let task = aTasks.pop();
     if (task) {
       task.call(PlacesDBUtils, aTasks);
-    }
-    else {
+    } else {
       // All tasks have been completed.
       // Telemetry the time it took for maintenance, if a start time exists.
       if (aTasks._telemetryStart) {
         Services.telemetry.getHistogramById("PLACES_IDLE_MAINTENANCE_TIME_MS")
                           .add(Date.now() - aTasks._telemetryStart);
         aTasks._telemetryStart = 0;
       }
 
@@ -77,18 +75,17 @@ this.PlacesDBUtils = {
    * Executes integrity check and common maintenance tasks.
    *
    * @param [optional] aCallback
    *        Callback to be invoked when done.  The callback will get a array
    *        of log messages.
    * @param [optional] aScope
    *        Scope for the callback.
    */
-  maintenanceOnIdle: function PDBU_maintenanceOnIdle(aCallback, aScope)
-  {
+  maintenanceOnIdle: function PDBU_maintenanceOnIdle(aCallback, aScope) {
     let tasks = new Tasks([
       this.checkIntegrity
     , this.checkCoherence
     , this._refreshUI
     ]);
     tasks._telemetryStart = Date.now();
     tasks.callback = function() {
       Services.prefs.setIntPref("places.database.lastMaintenance",
@@ -105,18 +102,17 @@ this.PlacesDBUtils = {
    * expiration and vacuum).  Will also collect statistics on the database.
    *
    * @param [optional] aCallback
    *        Callback to be invoked when done.  The callback will get a array
    *        of log messages.
    * @param [optional] aScope
    *        Scope for the callback.
    */
-  checkAndFixDatabase: function PDBU_checkAndFixDatabase(aCallback, aScope)
-  {
+  checkAndFixDatabase: function PDBU_checkAndFixDatabase(aCallback, aScope) {
     let tasks = new Tasks([
       this.checkIntegrity
     , this.checkCoherence
     , this.expire
     , this.vacuum
     , this.stats
     , this._refreshUI
     ]);
@@ -126,55 +122,50 @@ this.PlacesDBUtils = {
   },
 
   /**
    * Forces a full refresh of Places views.
    *
    * @param [optional] aTasks
    *        Tasks object to execute.
    */
-  _refreshUI: function PDBU__refreshUI(aTasks)
-  {
+  _refreshUI: function PDBU__refreshUI(aTasks) {
     let tasks = new Tasks(aTasks);
 
     // Send batch update notifications to update the UI.
     PlacesUtils.history.runInBatchMode({
       runBatched(aUserData) {}
     }, null);
     PlacesDBUtils._executeTasks(tasks);
   },
 
-  _handleError: function PDBU__handleError(aError)
-  {
+  _handleError: function PDBU__handleError(aError) {
     Cu.reportError("Async statement execution returned with '" +
                    aError.result + "', '" + aError.message + "'");
   },
 
   /**
    * Tries to execute a REINDEX on the database.
    *
    * @param [optional] aTasks
    *        Tasks object to execute.
    */
-  reindex: function PDBU_reindex(aTasks)
-  {
+  reindex: function PDBU_reindex(aTasks) {
     let tasks = new Tasks(aTasks);
     tasks.log("> Reindex");
 
     let stmt = DBConn.createAsyncStatement("REINDEX");
     stmt.executeAsync({
       handleError: PlacesDBUtils._handleError,
       handleResult() {},
 
-      handleCompletion(aReason)
-      {
+      handleCompletion(aReason) {
         if (aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED) {
           tasks.log("+ The database has been reindexed");
-        }
-        else {
+        } else {
           tasks.log("- Unable to reindex database");
         }
 
         PlacesDBUtils._executeTasks(tasks);
       }
     });
     stmt.finalize();
   },
@@ -192,99 +183,89 @@ this.PlacesDBUtils = {
   /**
    * Checks integrity and tries to fix the database through a reindex.
    *
    * @param [optional] aTasks
    *        Tasks object to execute.
    * @param [optional] aSkipdReindex
    *        Whether to try to reindex database or not.
    */
-  checkIntegrity: function PDBU_checkIntegrity(aTasks, aSkipReindex)
-  {
+  checkIntegrity: function PDBU_checkIntegrity(aTasks, aSkipReindex) {
     let tasks = new Tasks(aTasks);
     tasks.log("> Integrity check");
 
     // Run a integrity check, but stop at the first error.
     let stmt = DBConn.createAsyncStatement("PRAGMA integrity_check(1)");
     stmt.executeAsync({
       handleError: PlacesDBUtils._handleError,
 
       _corrupt: false,
-      handleResult(aResultSet)
-      {
+      handleResult(aResultSet) {
         let row = aResultSet.getNextRow();
         this._corrupt = row.getResultByIndex(0) != "ok";
       },
 
-      handleCompletion(aReason)
-      {
+      handleCompletion(aReason) {
         if (aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED) {
           if (this._corrupt) {
             tasks.log("- The database is corrupt");
             if (aSkipReindex) {
               tasks.log("- Unable to fix corruption, database will be replaced on next startup");
               Services.prefs.setBoolPref("places.database.replaceOnStartup", true);
               tasks.clear();
-            }
-            else {
+            } else {
               // Try to reindex, this often fixed simple indices corruption.
               // We insert from the top of the queue, they will run inverse.
               tasks.push(PlacesDBUtils._checkIntegritySkipReindex);
               tasks.push(PlacesDBUtils.reindex);
             }
-          }
-          else {
+          } else {
             tasks.log("+ The database is sane");
           }
-        }
-        else {
+        } else {
           tasks.log("- Unable to check database status");
           tasks.clear();
         }
 
         PlacesDBUtils._executeTasks(tasks);
       }
     });
     stmt.finalize();
   },
 
   /**
    * Checks data coherence and tries to fix most common errors.
    *
    * @param [optional] aTasks
    *        Tasks object to execute.
    */
-  checkCoherence: function PDBU_checkCoherence(aTasks)
-  {
+  checkCoherence: function PDBU_checkCoherence(aTasks) {
     let tasks = new Tasks(aTasks);
     tasks.log("> Coherence check");
 
     let stmts = PlacesDBUtils._getBoundCoherenceStatements();
     DBConn.executeAsync(stmts, stmts.length, {
       handleError: PlacesDBUtils._handleError,
       handleResult() {},
 
-      handleCompletion(aReason)
-      {
+      handleCompletion(aReason) {
         if (aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED) {
           tasks.log("+ The database is coherent");
-        }
-        else {
+        } else {
           tasks.log("- Unable to check database coherence");
           tasks.clear();
         }
 
         PlacesDBUtils._executeTasks(tasks);
       }
     });
     stmts.forEach(aStmt => aStmt.finalize());
   },
 
-  _getBoundCoherenceStatements: function PDBU__getBoundCoherenceStatements()
-  {
+  _getBoundCoherenceStatements: function PDBU__getBoundCoherenceStatements() {
     let cleanupStatements = [];
 
     // MOZ_ANNO_ATTRIBUTES
     // A.1 remove obsolete annotations from moz_annos.
     // The 'weave0' idiom exploits character ordering (0 follows /) to
     // efficiently select all annos with a 'weave/' prefix.
     let deleteObsoleteAnnos = DBConn.createAsyncStatement(
       `DELETE FROM moz_annos
@@ -730,59 +711,55 @@ this.PlacesDBUtils = {
   },
 
   /**
    * Tries to vacuum the database.
    *
    * @param [optional] aTasks
    *        Tasks object to execute.
    */
-  vacuum: function PDBU_vacuum(aTasks)
-  {
+  vacuum: function PDBU_vacuum(aTasks) {
     let tasks = new Tasks(aTasks);
     tasks.log("> Vacuum");
 
     let DBFile = Services.dirsvc.get("ProfD", Ci.nsILocalFile);
     DBFile.append("places.sqlite");
     tasks.log("Initial database size is " +
               parseInt(DBFile.fileSize / 1024) + " KiB");
 
     let stmt = DBConn.createAsyncStatement("VACUUM");
     stmt.executeAsync({
       handleError: PlacesDBUtils._handleError,
       handleResult() {},
 
-      handleCompletion(aReason)
-      {
+      handleCompletion(aReason) {
         if (aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED) {
           tasks.log("+ The database has been vacuumed");
           let vacuumedDBFile = Services.dirsvc.get("ProfD", Ci.nsILocalFile);
           vacuumedDBFile.append("places.sqlite");
           tasks.log("Final database size is " +
                     parseInt(vacuumedDBFile.fileSize / 1024) + " KiB");
-        }
-        else {
+        } else {
           tasks.log("- Unable to vacuum database");
           tasks.clear();
         }
 
         PlacesDBUtils._executeTasks(tasks);
       }
     });
     stmt.finalize();
   },
 
   /**
    * Forces a full expiration on the database.
    *
    * @param [optional] aTasks
    *        Tasks object to execute.
    */
-  expire: function PDBU_expire(aTasks)
-  {
+  expire: function PDBU_expire(aTasks) {
     let tasks = new Tasks(aTasks);
     tasks.log("> Orphans expiration");
 
     let expiration = Cc["@mozilla.org/places/expiration;1"].
                      getService(Ci.nsIObserver);
 
     Services.obs.addObserver(function(aSubject, aTopic, aData) {
       Services.obs.removeObserver(arguments.callee, aTopic);
@@ -795,18 +772,17 @@ this.PlacesDBUtils = {
   },
 
   /**
    * Collects statistical data on the database.
    *
    * @param [optional] aTasks
    *        Tasks object to execute.
    */
-  stats: function PDBU_stats(aTasks)
-  {
+  stats: function PDBU_stats(aTasks) {
     let tasks = new Tasks(aTasks);
     tasks.log("> Statistics");
 
     let DBFile = Services.dirsvc.get("ProfD", Ci.nsILocalFile);
     DBFile.append("places.sqlite");
     tasks.log("Database size is " + parseInt(DBFile.fileSize / 1024) + " KiB");
 
     [ "user_version"
@@ -857,18 +833,17 @@ this.PlacesDBUtils = {
   },
 
   /**
    * Collects telemetry data and reports it to Telemetry.
    *
    * @param [optional] aTasks
    *        Tasks object to execute.
    */
-  telemetry: function PDBU_telemetry(aTasks)
-  {
+  telemetry: function PDBU_telemetry(aTasks) {
     let tasks = new Tasks(aTasks);
 
     // This will be populated with one integer property for each probe result,
     // using the histogram name as key.
     let probeValues = {};
 
     // The following array contains an ordered list of entries that are
     // processed to collect telemetry data.  Each entry has these properties:
@@ -1049,26 +1024,24 @@ this.PlacesDBUtils = {
 };
 
 /**
  * LIFO tasks stack.
  *
  * @param [optional] aTasks
  *        Array of tasks or another Tasks object to clone.
  */
-function Tasks(aTasks)
-{
+function Tasks(aTasks) {
   if (aTasks) {
     if (Array.isArray(aTasks)) {
       this._list = aTasks.slice(0, aTasks.length);
-    }
-    // This supports passing in a Tasks-like object, with a "list" property,
-    // for compatibility reasons.
-    else if (typeof(aTasks) == "object" &&
-             (Tasks instanceof Tasks || "list" in aTasks)) {
+    } else if (typeof(aTasks) == "object" &&
+               (Tasks instanceof Tasks || "list" in aTasks)) {
+      // This supports passing in a Tasks-like object, with a "list" property,
+      // for compatibility reasons.
       this._list = aTasks.list;
       this._log = aTasks.messages;
       this.callback = aTasks.callback;
       this.scope = aTasks.scope;
       this._telemetryStart = aTasks._telemetryStart;
     }
   }
 }
@@ -1081,58 +1054,52 @@ Tasks.prototype = {
   _telemetryStart: 0,
 
   /**
    * Adds a task to the top of the list.
    *
    * @param aNewElt
    *        Task to be added.
    */
-  push: function T_push(aNewElt)
-  {
+  push: function T_push(aNewElt) {
     this._list.unshift(aNewElt);
   },
 
   /**
    * Returns and consumes next task.
    *
    * @return next task or undefined if no task is left.
    */
-  pop: function T_pop()
-  {
+  pop: function T_pop() {
     return this._list.shift();
   },
 
   /**
    * Removes all tasks.
    */
-  clear: function T_clear()
-  {
+  clear: function T_clear() {
     this._list.length = 0;
   },
 
   /**
    * Returns array of tasks ordered from the next to be run to the latest.
    */
-  get list()
-  {
+  get list() {
     return this._list.slice(0, this._list.length);
   },
 
   /**
    * Adds a message to the log.
    *
    * @param aMsg
    *        String message to be added.
    */
-  log: function T_log(aMsg)
-  {
+  log: function T_log(aMsg) {
     this._log.push(aMsg);
   },
 
   /**
    * Returns array of log messages ordered from oldest to newest.
    */
-  get messages()
-  {
+  get messages() {
     return this._log.slice(0, this._log.length);
   },
 }
--- a/toolkit/components/places/PlacesTransactions.jsm
+++ b/toolkit/components/places/PlacesTransactions.jsm
@@ -267,18 +267,17 @@ TransactionsHistory.__proto__ = {
    */
   add(aProxifiedTransaction, aForceNewEntry = false) {
     if (!this.isProxifiedTransactionObject(aProxifiedTransaction))
       throw new Error("aProxifiedTransaction is not a proxified transaction");
 
     if (this.length == 0 || aForceNewEntry) {
       this.clearRedoEntries();
       this.unshift([aProxifiedTransaction]);
-    }
-    else {
+    } else {
       this[this.undoPosition].unshift(aProxifiedTransaction);
     }
   },
 
   /**
    * Clear all undo entries.
    */
   clearUndoEntries() {
@@ -320,18 +319,17 @@ var PlacesTransactions = {
       if (aToBatch.some(
            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);
     }
@@ -539,18 +537,17 @@ var TransactionsManager = {
   batch(aTask) {
     return this._mainEnqueuer.enqueue(function* () {
       this._batching = true;
       this._createdBatchEntry = false;
       let rv;
       try {
         // We should return here, but bug 958949 makes that impossible.
         rv = (yield Task.spawn(aTask));
-      }
-      finally {
+      } finally {
         this._batching = false;
         this._createdBatchEntry = false;
       }
       return rv;
     }.bind(this));
   },
 
   /**
@@ -560,18 +557,17 @@ var TransactionsManager = {
     let promise = this._mainEnqueuer.enqueue(function* () {
       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;
         }
       }
@@ -593,18 +589,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;
         }
       }
@@ -635,18 +630,17 @@ var TransactionsManager = {
   // Updates commands in the undo group of the active window commands.
   // 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
@@ -744,18 +738,17 @@ DefineTransaction.defineInputProps =
 function(aNames, aValidationFunction, aDefaultValue) {
   for (let name of aNames) {
     this.inputProps.set(name, {
       validateValue(aValue) {
         if (aValue === undefined)
           return aDefaultValue;
         try {
           return aValidationFunction(aValue);
-        }
-        catch (ex) {
+        } catch (ex) {
           throw new Error(`Invalid value for input property ${name}`);
         }
       },
 
       validateInput(aInput, aRequired) {
         if (aRequired && !(name in aInput))
           throw new Error(`Required input property is missing: ${name}`);
         return this.validateValue(aInput[name]);
@@ -1016,18 +1009,17 @@ function* createItemsFromBookmarksTree(a
               parentId, aItem.title, aIndex, guid);
           if (guid === undefined)
             guid = yield PlacesUtils.promiseItemGuid(itemId);
           if ("children" in aItem) {
             for (let child of aItem.children) {
               yield createItem(child, guid);
             }
           }
-        }
-        else {
+        } else {
           let livemark =
             yield PlacesUtils.livemarks.addLivemark({ title: aItem.title
                                                     , feedURI
                                                     , siteURI
                                                     , parentId
                                                     , index: aIndex
                                                     , guid});
           itemId = livemark.id;
@@ -1122,17 +1114,17 @@ PT.NewBookmark.prototype = Object.seal({
  * Optional Input Properties: index, annotations.
  *
  * When this transaction is executed, it's resolved to the new folder's GUID.
  */
 PT.NewFolder = DefineTransaction(["parentGuid", "title"],
                                  ["index", "annotations"]);
 PT.NewFolder.prototype = Object.seal({
   execute(aParentGuid, aTitle, aIndex, aAnnos) {
-    return ExecuteCreateItem(this,  aParentGuid,
+    return ExecuteCreateItem(this, aParentGuid,
       function* (parentId, guidToRestore = "") {
         let itemId = PlacesUtils.bookmarks.createFolder(
           parentId, aTitle, aIndex, guidToRestore);
         if (aAnnos.length > 0)
           PlacesUtils.setAnnotationsForItem(itemId, aAnnos);
         return itemId;
       });
   }
@@ -1308,18 +1300,17 @@ PT.Annotate.prototype = {
       let itemId = yield PlacesUtils.promiseItemId(guid);
       let currentAnnos = PlacesUtils.getAnnotationsForItem(itemId);
 
       let undoAnnos = [];
       for (let newAnno of aNewAnnos) {
         let currentAnno = currentAnnos.find(a => a.name == newAnno.name);
         if (currentAnno) {
           undoAnnos.push(currentAnno);
-        }
-        else {
+        } else {
           // An unset value removes the annotation.
           undoAnnos.push({ name: newAnno.name });
         }
       }
       undoAnnosForItem.set(itemId, undoAnnos);
 
       PlacesUtils.setAnnotationsForItem(itemId, aNewAnnos);
     }
@@ -1406,18 +1397,17 @@ PT.SortByName.prototype = {
       oldOrder[node.itemId] = i;
       if (PlacesUtils.nodeIsSeparator(node)) {
         if (preSep.length > 0) {
           preSep.sort(sortingMethod);
           newOrder = newOrder.concat(preSep);
           preSep.splice(0, preSep.length);
         }
         newOrder.push(node);
-      }
-      else
+      } else
         preSep.push(node);
     }
     contents.containerOpen = false;
 
     if (preSep.length > 0) {
       preSep.sort(sortingMethod);
       newOrder = newOrder.concat(preSep);
     }
@@ -1451,18 +1441,17 @@ PT.SortByName.prototype = {
  * Required Input Properties: guids.
  */
 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));
@@ -1527,18 +1516,17 @@ PT.Tag.prototype = {
         // Tagging is only allowed for bookmarked URIs (but see 424160).
         let createTxn = TransactionsHistory.getRawTransaction(
           PT.NewBookmark({ url: uri
                          , tags: aTags
                          , parentGuid: PlacesUtils.bookmarks.unfiledGuid }));
         yield createTxn.execute();
         onUndo.unshift(createTxn.undo.bind(createTxn));
         onRedo.push(createTxn.redo.bind(createTxn));
-      }
-      else {
+      } else {
         let currentTags = PlacesUtils.tagging.getTagsForURI(uri);
         let newTags = aTags.filter(t => !currentTags.includes(t));
         PlacesUtils.tagging.tagURI(uri, newTags);
         onUndo.unshift(() => {
           PlacesUtils.tagging.untagURI(uri, newTags);
         });
         onRedo.push(() => {
           PlacesUtils.tagging.tagURI(uri, newTags);
@@ -1606,18 +1594,17 @@ PT.Untag.prototype = {
  */
 PT.Copy = DefineTransaction(["guid", "newParentGuid"],
                             ["newIndex", "excludingAnnotations"]);
 PT.Copy.prototype = {
   *execute(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
@@ -63,18 +63,17 @@ const MIN_TRANSACTIONS_FOR_BATCH = 5;
 // we really just want "\n". On other platforms, the transferable system
 // converts "\r\n" to "\n".
 const NEWLINE = AppConstants.platform == "macosx" ? "\n" : "\r\n";
 
 function QI_node(aNode, aIID) {
   var result = null;
   try {
     result = aNode.QueryInterface(aIID);
-  }
-  catch (e) {
+  } catch (e) {
   }
   return result;
 }
 function asContainer(aNode) {
   return QI_node(aNode, Ci.nsINavHistoryContainerResultNode);
 }
 function asQuery(aNode) {
   return QI_node(aNode, Ci.nsINavHistoryQueryResultNode);
@@ -170,43 +169,39 @@ function serializeNode(aNode, aIsLivemar
     if (data.parent == PlacesUtils.tagsFolderId)
       throw new Error("Unexpected node type");
 
     data.type = PlacesUtils.TYPE_X_MOZ_PLACE;
     data.uri = aNode.uri;
 
     if (aNode.tags)
       data.tags = aNode.tags;
-  }
-  else if (PlacesUtils.nodeIsContainer(aNode)) {
+  } else if (PlacesUtils.nodeIsContainer(aNode)) {
     // Tag containers accept only uri nodes.
     if (data.grandParentId == PlacesUtils.tagsFolderId)
       throw new Error("Unexpected node type");
 
     let concreteId = PlacesUtils.getConcreteItemId(aNode);
     if (concreteId != -1) {
       // This is a bookmark or a tag container.
       if (PlacesUtils.nodeIsQuery(aNode) || concreteId != aNode.itemId) {
         // This is a folder shortcut.
         data.type = PlacesUtils.TYPE_X_MOZ_PLACE;
         data.uri = aNode.uri;
         data.concreteId = concreteId;
-      }
-      else {
+      } else {
         // This is a bookmark folder.
         data.type = PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER;
       }
-    }
-    else {
+    } else {
       // This is a grouped container query, dynamically generated.
       data.type = PlacesUtils.TYPE_X_MOZ_PLACE;
       data.uri = aNode.uri;
     }
-  }
-  else if (PlacesUtils.nodeIsSeparator(aNode)) {
+  } else if (PlacesUtils.nodeIsSeparator(aNode)) {
     // Tag containers don't accept separators.
     if (data.parent == PlacesUtils.tagsFolderId ||
         data.grandParentId == PlacesUtils.tagsFolderId)
       throw new Error("Unexpected node type");
 
     data.type = PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR;
   }
 
@@ -580,28 +575,26 @@ this.PlacesUtils = {
   SYNC_CHANGE_RECORD_VALIDATORS,
 
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsIObserver
   , Ci.nsITransactionListener
   ]),
 
   _shutdownFunctions: [],
-  registerShutdownFunction: function PU_registerShutdownFunction(aFunc)
-  {
+  registerShutdownFunction: function PU_registerShutdownFunction(aFunc) {
     // If this is the first registered function, add the shutdown observer.
     if (this._shutdownFunctions.length == 0) {
       Services.obs.addObserver(this, this.TOPIC_SHUTDOWN, false);
     }
     this._shutdownFunctions.push(aFunc);
   },
 
   // nsIObserver
-  observe: function PU_observe(aSubject, aTopic, aData)
-  {
+  observe: function PU_observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case this.TOPIC_SHUTDOWN:
         Services.obs.removeObserver(this, this.TOPIC_SHUTDOWN);
         while (this._shutdownFunctions.length > 0) {
           this._shutdownFunctions.shift().apply(this);
         }
         if (this._bookmarksServiceObserversQueue.length > 0) {
           // Since we are shutting down, there's no reason to add the observers.
@@ -624,33 +617,29 @@ this.PlacesUtils = {
   },
 
   onPageAnnotationSet() {},
   onPageAnnotationRemoved() {},
 
 
   // nsITransactionListener
 
-  didDo: function PU_didDo(aManager, aTransaction, aDoResult)
-  {
+  didDo: function PU_didDo(aManager, aTransaction, aDoResult) {
     updateCommandsOnActiveWindow();
   },
 
-  didUndo: function PU_didUndo(aManager, aTransaction, aUndoResult)
-  {
+  didUndo: function PU_didUndo(aManager, aTransaction, aUndoResult) {
     updateCommandsOnActiveWindow();
   },
 
-  didRedo: function PU_didRedo(aManager, aTransaction, aRedoResult)
-  {
+  didRedo: function PU_didRedo(aManager, aTransaction, aRedoResult) {
     updateCommandsOnActiveWindow();
   },
 
-  didBeginBatch: function PU_didBeginBatch(aManager, aResult)
-  {
+  didBeginBatch: function PU_didBeginBatch(aManager, aResult) {
     // A no-op transaction is pushed to the stack, in order to make safe and
     // easy to implement "Undo" an unknown number of transactions (including 0),
     // "above" beginBatch and endBatch. Otherwise,implementing Undo that way
     // head to dataloss: for example, if no changes were done in the
     // edit-item panel, the last transaction on the undo stack would be the
     // initial createItem transaction, or even worse, the batched editing of
     // some other item.
     // DO NOT MOVE this to the window scope, that would leak (bug 490068)!
@@ -941,18 +930,17 @@ this.PlacesUtils = {
           let titleString = "";
           if (parts.length > i + 1)
             titleString = parts[i + 1];
           else {
             // for drag and drop of files, try to use the leafName as title
             try {
               titleString = this._uri(uriString).QueryInterface(Ci.nsIURL)
                                 .fileName;
-            }
-            catch (e) {}
+            } catch (e) {}
           }
           // note:  this._uri() will throw if uriString is not a valid URI
           if (this._uri(uriString)) {
             nodes.push({ uri: uriString,
                          title: titleString ? titleString : uriString,
                          type: this.TYPE_X_MOZ_URL });
           }
         }
@@ -1065,18 +1053,17 @@ this.PlacesUtils = {
    *        name, flags, expires.
    *        If the value for an annotation is not set it will be removed.
    */
   setAnnotationsForURI: function PU_setAnnotationsForURI(aURI, aAnnos) {
     var annosvc = this.annotations;
     aAnnos.forEach(function(anno) {
       if (anno.value === undefined || anno.value === null) {
         annosvc.removePageAnnotation(aURI, anno.name);
-      }
-      else {
+      } else {
         let flags = ("flags" in anno) ? anno.flags : 0;
         let expires = ("expires" in anno) ?
           anno.expires : Ci.nsIAnnotationService.EXPIRE_NEVER;
         annosvc.setPageAnnotation(aURI, anno.name, anno.value, flags, expires);
       }
     });
   },
 
@@ -1090,18 +1077,17 @@ this.PlacesUtils = {
    *        If the value for an annotation is not set it will be removed.
    */
   setAnnotationsForItem: function PU_setAnnotationsForItem(aItemId, aAnnos, aSource) {
     var annosvc = this.annotations;
 
     aAnnos.forEach(function(anno) {
       if (anno.value === undefined || anno.value === null) {
         annosvc.removeItemAnnotation(aItemId, anno.name, aSource);
-      }
-      else {
+      } else {
         let flags = ("flags" in anno) ? anno.flags : 0;
         let expires = ("expires" in anno) ?
           anno.expires : Ci.nsIAnnotationService.EXPIRE_NEVER;
         annosvc.setItemAnnotation(aItemId, anno.name, anno.value, flags,
                                   expires, aSource);
       }
     });
   },
@@ -1174,18 +1160,17 @@ this.PlacesUtils = {
                    JOIN moz_bookmarks b ON b.fk = k.place_id
                    WHERE b.id = :item_id
                    AND post_data ISNULL
                    LIMIT 1)`);
     stmt.params.item_id = aBookmarkId;
     stmt.params.post_data = aPostData;
     try {
       stmt.execute();
-    }
-    finally {
+    } finally {
       stmt.finalize();
     }
 
     // Update the cache.
     return Task.spawn(function* () {
       let guid = yield PlacesUtils.promiseItemGuid(aBookmarkId);
       let bm = yield PlacesUtils.bookmarks.fetch(guid);
 
@@ -1214,18 +1199,17 @@ this.PlacesUtils = {
        JOIN moz_places h ON h.id = k.place_id
        JOIN moz_bookmarks b ON b.fk = h.id
        WHERE b.id = :item_id`);
     stmt.params.item_id = aBookmarkId;
     try {
       if (!stmt.executeStep())
         return null;
       return stmt.row.post_data;
-    }
-    finally {
+    } finally {
       stmt.finalize();
     }
   },
 
   /**
    * Get the URI (and any associated POST data) for a given keyword.
    * @param aKeyword string keyword
    * @returns an array containing a string URL and a string of POST data
@@ -1242,18 +1226,17 @@ this.PlacesUtils = {
        FROM moz_keywords k
        JOIN moz_places h ON h.id = k.place_id
        WHERE k.keyword = :keyword`);
     stmt.params.keyword = aKeyword.toLowerCase();
     try {
       if (!stmt.executeStep())
         return [ null, null ];
       return [ stmt.row.url, stmt.row.post_data ];
-    }
-    finally {
+    } finally {
       stmt.finalize();
     }
   },
 
   /**
    * Get all bookmarks for a URL, excluding items under tags.
    */
   getBookmarksForURI:
@@ -1483,18 +1466,17 @@ this.PlacesUtils = {
    *        The function will receive an array of itemIds associated to aURI and
    *        aURI itself.
    *
    * @return A object with a .cancel() method allowing to cancel the request.
    *
    * @note Children of live bookmarks folders are excluded. The callback function is
    *       not invoked if the request is cancelled or hits an error.
    */
-  asyncGetBookmarkIds: function PU_asyncGetBookmarkIds(aURI, aCallback)
-  {
+  asyncGetBookmarkIds: function PU_asyncGetBookmarkIds(aURI, aCallback) {
     let abort = false;
     let itemIds = [];
     Task.spawn(function* () {
       let conn = yield this.promiseDBConnection();
       const QUERY_STR = `SELECT b.id FROM moz_bookmarks b
                          JOIN moz_places h on h.id = b.fk
                          WHERE h.url_hash = hash(:url) AND h.url = :url`;
       let spec = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
@@ -2240,17 +2222,17 @@ var Keywords = {
       throw new Error("undefined is not a valid URL");
     let { keyword, url,
           source = Ci.nsINavBookmarksService.SOURCE_DEFAULT } = keywordEntry;
     keyword = keyword.trim().toLowerCase();
     let postData = keywordEntry.postData || null;
     // This also checks href for validity
     url = new URL(url);
 
-    return PlacesUtils.withConnectionWrapper("Keywords.insert",  Task.async(function*(db) {
+    return PlacesUtils.withConnectionWrapper("Keywords.insert", Task.async(function*(db) {
         let cache = yield gKeywordsCachePromise;
 
         // Trying to set the same keyword is a no-op.
         let oldEntry = cache.get(keyword);
         if (oldEntry && oldEntry.url.href == url.href &&
                         oldEntry.postData == keywordEntry.postData) {
           return;
         }
@@ -2309,17 +2291,17 @@ var Keywords = {
 
     if (keywordOrEntry === null || typeof(keywordOrEntry) != "object" ||
         !keywordOrEntry.keyword || typeof keywordOrEntry.keyword != "string")
       throw new Error("Invalid keyword");
 
     let { keyword,
           source = Ci.nsINavBookmarksService.SOURCE_DEFAULT } = keywordOrEntry;
     keyword = keywordOrEntry.keyword.trim().toLowerCase();
-    return PlacesUtils.withConnectionWrapper("Keywords.remove",  Task.async(function*(db) {
+    return PlacesUtils.withConnectionWrapper("Keywords.remove", Task.async(function*(db) {
       let cache = yield gKeywordsCachePromise;
       if (!cache.has(keyword))
         return;
       let { url } = cache.get(keyword);
       cache.delete(keyword);
 
       yield db.execute(`DELETE FROM moz_keywords WHERE keyword = :keyword`,
                        { keyword });
@@ -2574,34 +2556,32 @@ var GuidHelper = {
 };
 
 // Transactions handlers.
 
 /**
  * Updates commands in the undo group of the active window commands.
  * Inactive windows commands will be updated on focus.
  */
-function updateCommandsOnActiveWindow()
-{
+function updateCommandsOnActiveWindow() {
   let win = Services.focus.activeWindow;
   if (win && win instanceof Ci.nsIDOMWindow) {
     // Updating "undo" will cause a group update including "redo".
     win.updateCommands("undo");
   }
 }
 
 
 /**
  * Used to cache bookmark information in transactions.
  *
  * @note To avoid leaks any non-primitive property should be copied.
  * @note Used internally, DO NOT EXPORT.
  */
-function TransactionItemCache()
-{
+function TransactionItemCache() {
 }
 
 TransactionItemCache.prototype = {
   set id(v) {
     this._id = (parseInt(v) > 0 ? v : null);
   },
   get id() {
     return this._id || -1;
@@ -2658,18 +2638,17 @@ TransactionItemCache.prototype = {
 };
 
 
 /**
  * Base transaction implementation.
  *
  * @note used internally, DO NOT EXPORT.
  */
-function BaseTransaction()
-{
+function BaseTransaction() {
 }
 
 BaseTransaction.prototype = {
   name: null,
   set childTransactions(v) {
     this._childTransactions = (Array.isArray(v) ? Array.prototype.slice.call(v) : null);
   },
   get childTransactions() {
@@ -2698,28 +2677,26 @@ BaseTransaction.prototype = {
  * @param aName
  *        title of the aggregate transactions
  * @param aTransactions
  *        an array of transactions to perform
  *
  * @return nsITransaction object
  */
 this.PlacesAggregatedTransaction =
- function PlacesAggregatedTransaction(aName, aTransactions)
-{
+ function PlacesAggregatedTransaction(aName, aTransactions) {
   // Copy the transactions array to decouple it from its prototype, which
   // otherwise keeps alive its associated global object.
   this.childTransactions = aTransactions;
   this.name = aName;
   this.item = new TransactionItemCache();
 
   // Check child transactions number.  We will batch if we have more than
   // MIN_TRANSACTIONS_FOR_BATCH total number of transactions.
-  let countTransactions = function(aTransactions, aTxnCount)
-  {
+  let countTransactions = function(aTransactions, aTxnCount) {
     for (let i = 0;
          i < aTransactions.length && aTxnCount < MIN_TRANSACTIONS_FOR_BATCH;
          ++i, ++aTxnCount) {
       let txn = aTransactions[i];
       if (txn.childTransactions && txn.childTransactions.length > 0)
         aTxnCount = countTransactions(txn.childTransactions, aTxnCount);
     }
     return aTxnCount;
@@ -2727,36 +2704,33 @@ this.PlacesAggregatedTransaction =
 
   let txnCount = countTransactions(this.childTransactions, 0);
   this._useBatch = txnCount >= MIN_TRANSACTIONS_FOR_BATCH;
 }
 
 PlacesAggregatedTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function ATXN_doTransaction()
-  {
+  doTransaction: function ATXN_doTransaction() {
     this._isUndo = false;
     if (this._useBatch)
       PlacesUtils.bookmarks.runInBatchMode(this, null);
     else
       this.runBatched(false);
   },
 
-  undoTransaction: function ATXN_undoTransaction()
-  {
+  undoTransaction: function ATXN_undoTransaction() {
     this._isUndo = true;
     if (this._useBatch)
       PlacesUtils.bookmarks.runInBatchMode(this, null);
     else
       this.runBatched(true);
   },
 
-  runBatched: function ATXN_runBatched()
-  {
+  runBatched: function ATXN_runBatched() {
     // Use a copy of the transactions array, so we won't reverse the original
     // one on undoing.
     let transactions = this.childTransactions.slice(0);
     if (this._isUndo)
       transactions.reverse();
     for (let i = 0; i < transactions.length; ++i) {
       let txn = transactions[i];
       if (this.item.parentId != -1)
@@ -2783,31 +2757,29 @@ PlacesAggregatedTransaction.prototype = 
  *        array of annotations to set for the new folder
  * @param [optional] aChildTransactions
  *        array of transactions for items to be created in the new folder
  *
  * @return nsITransaction object
  */
 this.PlacesCreateFolderTransaction =
  function PlacesCreateFolderTransaction(aTitle, aParentId, aIndex, aAnnotations,
-                                        aChildTransactions)
-{
+                                        aChildTransactions) {
   this.item = new TransactionItemCache();
   this.item.title = aTitle;
   this.item.parentId = aParentId;
   this.item.index = aIndex;
   this.item.annotations = aAnnotations;
   this.childTransactions = aChildTransactions;
 }
 
 PlacesCreateFolderTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function CFTXN_doTransaction()
-  {
+  doTransaction: function CFTXN_doTransaction() {
     this.item.id = PlacesUtils.bookmarks.createFolder(this.item.parentId,
                                                       this.item.title,
                                                       this.item.index);
     if (this.item.annotations && this.item.annotations.length > 0)
       PlacesUtils.setAnnotationsForItem(this.item.id, this.item.annotations);
 
     if (this.childTransactions && this.childTransactions.length > 0) {
       // Set the new parent id into child transactions.
@@ -2816,18 +2788,17 @@ PlacesCreateFolderTransaction.prototype 
       }
 
       let txn = new PlacesAggregatedTransaction("Create folder childTxn",
                                                 this.childTransactions);
       txn.doTransaction();
     }
   },
 
-  undoTransaction: function CFTXN_undoTransaction()
-  {
+  undoTransaction: function CFTXN_undoTransaction() {
     if (this.childTransactions && this.childTransactions.length > 0) {
       let txn = new PlacesAggregatedTransaction("Create folder childTxn",
                                                 this.childTransactions);
       txn.undoTransaction();
     }
 
     // Remove item only after all child transactions have been reverted.
     PlacesUtils.bookmarks.removeItem(this.item.id);
@@ -2860,34 +2831,32 @@ PlacesCreateFolderTransaction.prototype 
  * @param [optional] aPostData
  *        keyword's POST data, if available.
  *
  * @return nsITransaction object
  */
 this.PlacesCreateBookmarkTransaction =
  function PlacesCreateBookmarkTransaction(aURI, aParentId, aIndex, aTitle,
                                           aKeyword, aAnnotations,
-                                          aChildTransactions, aPostData)
-{
+                                          aChildTransactions, aPostData) {
   this.item = new TransactionItemCache();
   this.item.uri = aURI;
   this.item.parentId = aParentId;
   this.item.index = aIndex;
   this.item.title = aTitle;
   this.item.keyword = aKeyword;
   this.item.postData = aPostData;
   this.item.annotations = aAnnotations;
   this.childTransactions = aChildTransactions;
 }
 
 PlacesCreateBookmarkTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function CITXN_doTransaction()
-  {
+  doTransaction: function CITXN_doTransaction() {
     this.item.id = PlacesUtils.bookmarks.insertBookmark(this.item.parentId,
                                                         this.item.uri,
                                                         this.item.index,
                                                         this.item.title);
     if (this.item.keyword) {
       PlacesUtils.bookmarks.setKeywordForBookmark(this.item.id,
                                                   this.item.keyword);
       if (this.item.postData) {
@@ -2904,18 +2873,17 @@ PlacesCreateBookmarkTransaction.prototyp
         this.childTransactions[i].item.id = this.item.id;
       }
       let txn = new PlacesAggregatedTransaction("Create item childTxn",
                                                 this.childTransactions);
       txn.doTransaction();
     }
   },
 
-  undoTransaction: function CITXN_undoTransaction()
-  {
+  undoTransaction: function CITXN_undoTransaction() {
     if (this.childTransactions && this.childTransactions.length > 0) {
       // Undo transactions should always be done in reverse order.
       let txn = new PlacesAggregatedTransaction("Create item childTxn",
                                                 this.childTransactions);
       txn.undoTransaction();
     }
 
     // Remove item only after all child transactions have been reverted.
@@ -2930,34 +2898,31 @@ PlacesCreateBookmarkTransaction.prototyp
  * @param aParentId
  *        the id of the folder in which the separator should be added
  * @param [optional] aIndex
  *        the index of the item in aParentId
  *
  * @return nsITransaction object
  */
 this.PlacesCreateSeparatorTransaction =
- function PlacesCreateSeparatorTransaction(aParentId, aIndex)
-{
+ function PlacesCreateSeparatorTransaction(aParentId, aIndex) {
   this.item = new TransactionItemCache();
   this.item.parentId = aParentId;
   this.item.index = aIndex;
 }
 
 PlacesCreateSeparatorTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function CSTXN_doTransaction()
-  {
+  doTransaction: function CSTXN_doTransaction() {
     this.item.id =
       PlacesUtils.bookmarks.insertSeparator(this.item.parentId, this.item.index);
   },
 
-  undoTransaction: function CSTXN_undoTransaction()
-  {
+  undoTransaction: function CSTXN_undoTransaction() {
     PlacesUtils.bookmarks.removeItem(this.item.id);
   }
 };
 
 
 /**
  * Transaction for creating a new livemark item.
  *
@@ -2975,49 +2940,46 @@ PlacesCreateSeparatorTransaction.prototy
  *        the index of the livemark in aParentId
  * @param [optional] aAnnotations
  *        array of annotations to set for the new livemark.
  *
  * @return nsITransaction object
  */
 this.PlacesCreateLivemarkTransaction =
  function PlacesCreateLivemarkTransaction(aFeedURI, aSiteURI, aTitle, aParentId,
-                                          aIndex, aAnnotations)
-{
+                                          aIndex, aAnnotations) {
   this.item = new TransactionItemCache();
   this.item.feedURI = aFeedURI;
   this.item.siteURI = aSiteURI;
   this.item.title = aTitle;
   this.item.parentId = aParentId;
   this.item.index = aIndex;
   this.item.annotations = aAnnotations;
 }
 
 PlacesCreateLivemarkTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function CLTXN_doTransaction()
-  {
+  doTransaction: function CLTXN_doTransaction() {
     this._promise = PlacesUtils.livemarks.addLivemark(
       { title: this.item.title
       , feedURI: this.item.feedURI
       , parentId: this.item.parentId
       , index: this.item.index
       , siteURI: this.item.siteURI
       }).then(aLivemark => {
         this.item.id = aLivemark.id;
         if (this.item.annotations && this.item.annotations.length > 0) {
           PlacesUtils.setAnnotationsForItem(this.item.id,
                                             this.item.annotations);
         }
       }, Cu.reportError);
   },
 
-  undoTransaction: function CLTXN_undoTransaction()
-  {
+  undoTransaction: function CLTXN_undoTransaction() {
     // The getLivemark callback may fail, but it is used just to serialize,
     // so it doesn't matter.
     this._promise = PlacesUtils.livemarks.getLivemark({ id: this.item.id })
       .then(null, null).then( () => {
         PlacesUtils.bookmarks.removeItem(this.item.id);
       });
   }
 };
@@ -3027,18 +2989,17 @@ PlacesCreateLivemarkTransaction.prototyp
  * Transaction for removing a livemark item.
  *
  * @param aLivemarkId
  *        the identifier of the folder for the livemark.
  *
  * @return nsITransaction object
  * @note used internally by PlacesRemoveItemTransaction, DO NOT EXPORT.
  */
-function PlacesRemoveLivemarkTransaction(aLivemarkId)
-{
+function PlacesRemoveLivemarkTransaction(aLivemarkId) {
   this.item = new TransactionItemCache();
   this.item.id = aLivemarkId;
   this.item.title = PlacesUtils.bookmarks.getItemTitle(this.item.id);
   this.item.parentId = PlacesUtils.bookmarks.getFolderIdForItem(this.item.id);
 
   let annos = PlacesUtils.getAnnotationsForItem(this.item.id);
   // Exclude livemark service annotations, those will be recreated automatically
   let annosToExclude = [PlacesUtils.LMANNO_FEEDURI,
@@ -3049,28 +3010,26 @@ function PlacesRemoveLivemarkTransaction
   this.item.dateAdded = PlacesUtils.bookmarks.getItemDateAdded(this.item.id);
   this.item.lastModified =
     PlacesUtils.bookmarks.getItemLastModified(this.item.id);
 }
 
 PlacesRemoveLivemarkTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function RLTXN_doTransaction()
-  {
+  doTransaction: function RLTXN_doTransaction() {
     PlacesUtils.livemarks.getLivemark({ id: this.item.id })
       .then(aLivemark => {
         this.item.feedURI = aLivemark.feedURI;
         this.item.siteURI = aLivemark.siteURI;
         PlacesUtils.bookmarks.removeItem(this.item.id);
       }, Cu.reportError);
   },
 
-  undoTransaction: function RLTXN_undoTransaction()
-  {
+  undoTransaction: function RLTXN_undoTransaction() {
     // Undo work must be serialized, otherwise won't be able to know the
     // feedURI and siteURI of the livemark.
     // The getLivemark callback is expected to receive a failure status but it
     // is used just to serialize, so doesn't matter.
     PlacesUtils.livemarks.getLivemark({ id: this.item.id })
       .then(null, () => {
         PlacesUtils.livemarks.addLivemark({ parentId: this.item.parentId
                                           , title: this.item.title
@@ -3097,65 +3056,60 @@ PlacesRemoveLivemarkTransaction.prototyp
  * @param aNewParentId
  *        id of the new parent to move to
  * @param aNewIndex
  *        index of the new position to move to
  *
  * @return nsITransaction object
  */
 this.PlacesMoveItemTransaction =
- function PlacesMoveItemTransaction(aItemId, aNewParentId, aNewIndex)
-{
+ function PlacesMoveItemTransaction(aItemId, aNewParentId, aNewIndex) {
   this.item = new TransactionItemCache();
   this.item.id = aItemId;
   this.item.parentId = PlacesUtils.bookmarks.getFolderIdForItem(this.item.id);
   this.new = new TransactionItemCache();
   this.new.parentId = aNewParentId;
   this.new.index = aNewIndex;
 }
 
 PlacesMoveItemTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function MITXN_doTransaction()
-  {
+  doTransaction: function MITXN_doTransaction() {
     this.item.index = PlacesUtils.bookmarks.getItemIndex(this.item.id);
     PlacesUtils.bookmarks.moveItem(this.item.id,
                                    this.new.parentId, this.new.index);
     this._undoIndex = PlacesUtils.bookmarks.getItemIndex(this.item.id);
   },
 
-  undoTransaction: function MITXN_undoTransaction()
-  {
+  undoTransaction: function MITXN_undoTransaction() {
     // moving down in the same parent takes in count removal of the item
     // so to revert positions we must move to oldIndex + 1
     if (this.new.parentId == this.item.parentId &&
         this.item.index > this._undoIndex) {
       PlacesUtils.bookmarks.moveItem(this.item.id, this.item.parentId,
                                      this.item.index + 1);
-    }
-    else {
+    } else {
       PlacesUtils.bookmarks.moveItem(this.item.id, this.item.parentId,
                                      this.item.index);
     }
   }
 };
 
 
 /**
  * Transaction for removing an Item
  *
  * @param aItemId
  *        id of the item to remove
  *
  * @return nsITransaction object
  */
 this.PlacesRemoveItemTransaction =
- function PlacesRemoveItemTransaction(aItemId)
-{
+ function PlacesRemoveItemTransaction(aItemId) {
   if (PlacesUtils.isRootItem(aItemId))
     throw Cr.NS_ERROR_INVALID_ARG;
 
   // if the item lives within a tag container, use the tagging transactions
   let parent = PlacesUtils.bookmarks.getFolderIdForItem(aItemId);
   let grandparent = PlacesUtils.bookmarks.getFolderIdForItem(parent);
   if (grandparent == PlacesUtils.tagsFolderId) {
     let uri = PlacesUtils.bookmarks.getBookmarkURI(aItemId);
@@ -3170,18 +3124,17 @@ this.PlacesRemoveItemTransaction =
   this.item = new TransactionItemCache();
   this.item.id = aItemId;
   this.item.itemType = PlacesUtils.bookmarks.getItemType(this.item.id);
   if (this.item.itemType == Ci.nsINavBookmarksService.TYPE_FOLDER) {
     this.childTransactions = this._getFolderContentsTransactions();
     // Remove this folder itself.
     let txn = PlacesUtils.bookmarks.getRemoveFolderTransaction(this.item.id);
     this.childTransactions.push(txn);
-  }
-  else if (this.item.itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK) {
+  } else if (this.item.itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK) {
     this.item.uri = PlacesUtils.bookmarks.getBookmarkURI(this.item.id);
     this.item.keyword =
       PlacesUtils.bookmarks.getKeywordForBookmark(this.item.id);
     if (this.item.keyword)
       this.item.postData = PlacesUtils.getPostDataForBookmark(this.item.id);
   }
 
   if (this.item.itemType != Ci.nsINavBookmarksService.TYPE_SEPARATOR)
@@ -3192,63 +3145,58 @@ this.PlacesRemoveItemTransaction =
   this.item.dateAdded = PlacesUtils.bookmarks.getItemDateAdded(this.item.id);
   this.item.lastModified =
     PlacesUtils.bookmarks.getItemLastModified(this.item.id);
 }
 
 PlacesRemoveItemTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function RITXN_doTransaction()
-  {
+  doTransaction: function RITXN_doTransaction() {
     this.item.index = PlacesUtils.bookmarks.getItemIndex(this.item.id);
 
     if (this.item.itemType == Ci.nsINavBookmarksService.TYPE_FOLDER) {
       let txn = new PlacesAggregatedTransaction("Remove item childTxn",
                                                 this.childTransactions);
       txn.doTransaction();
-    }
-    else {
+    } else {
       // Before removing the bookmark, save its tags.
       let tags = this.item.uri ?
         PlacesUtils.tagging.getTagsForURI(this.item.uri) : null;
 
       PlacesUtils.bookmarks.removeItem(this.item.id);
 
       // If this was the last bookmark (excluding tag-items) for this url,
       // persist the tags.
       if (tags && PlacesUtils.getMostRecentBookmarkForURI(this.item.uri) == -1) {
         this.item.tags = tags;
       }
     }
   },
 
-  undoTransaction: function RITXN_undoTransaction()
-  {
+  undoTransaction: function RITXN_undoTransaction() {
     if (this.item.itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK) {
       this.item.id = PlacesUtils.bookmarks.insertBookmark(this.item.parentId,
                                                           this.item.uri,
                                                           this.item.index,
                                                           this.item.title);
       if (this.item.tags && this.item.tags.length > 0)
         PlacesUtils.tagging.tagURI(this.item.uri, this.item.tags);
       if (this.item.keyword) {
         PlacesUtils.bookmarks.setKeywordForBookmark(this.item.id,
                                                     this.item.keyword);
         if (this.item.postData) {
           PlacesUtils.bookmarks.setPostDataForBookmark(this.item.id);
         }
       }
-    }
-    else if (this.item.itemType == Ci.nsINavBookmarksService.TYPE_FOLDER) {
+    } else if (this.item.itemType == Ci.nsINavBookmarksService.TYPE_FOLDER) {
       let txn = new PlacesAggregatedTransaction("Remove item childTxn",
                                                 this.childTransactions);
       txn.undoTransaction();
-    }
-    else { // TYPE_SEPARATOR
+    } else { // TYPE_SEPARATOR
       this.item.id = PlacesUtils.bookmarks.insertSeparator(this.item.parentId,
                                                             this.item.index);
     }
 
     if (this.item.annotations && this.item.annotations.length > 0)
       PlacesUtils.setAnnotationsForItem(this.item.id, this.item.annotations);
 
     PlacesUtils.bookmarks.setItemDateAdded(this.item.id, this.item.dateAdded);
@@ -3256,18 +3204,17 @@ PlacesRemoveItemTransaction.prototype = 
                                               this.item.lastModified);
   },
 
   /**
   * Returns a flat, ordered list of transactions for a depth-first recreation
   * of items within this folder.
   */
   _getFolderContentsTransactions:
-  function RITXN__getFolderContentsTransactions()
-  {
+  function RITXN__getFolderContentsTransactions() {
     let transactions = [];
     let contents =
       PlacesUtils.getFolderContents(this.item.id, false, false).root;
     for (let i = 0; i < contents.childCount; ++i) {
       let txn = new PlacesRemoveItemTransaction(contents.getChild(i).itemId);
       transactions.push(txn);
     }
     contents.containerOpen = false;
@@ -3283,35 +3230,32 @@ PlacesRemoveItemTransaction.prototype = 
  * @param aItemId
  *        id of the item to edit
  * @param aNewTitle
  *        new title for the item to edit
  *
  * @return nsITransaction object
  */
 this.PlacesEditItemTitleTransaction =
- function PlacesEditItemTitleTransaction(aItemId, aNewTitle)
-{
+ function PlacesEditItemTitleTransaction(aItemId, aNewTitle) {
   this.item = new TransactionItemCache();
   this.item.id = aItemId;
   this.new = new TransactionItemCache();
   this.new.title = aNewTitle;
 }
 
 PlacesEditItemTitleTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function EITTXN_doTransaction()
-  {
+  doTransaction: function EITTXN_doTransaction() {
     this.item.title = PlacesUtils.bookmarks.getItemTitle(this.item.id);
     PlacesUtils.bookmarks.setItemTitle(this.item.id, this.new.title);
   },
 
-  undoTransaction: function EITTXN_undoTransaction()
-  {
+  undoTransaction: function EITTXN_undoTransaction() {
     PlacesUtils.bookmarks.setItemTitle(this.item.id, this.item.title);
   }
 };
 
 
 /**
  * Transaction for editing a bookmark's uri.
  *
@@ -3328,32 +3272,30 @@ this.PlacesEditBookmarkURITransaction =
   this.item.id = aItemId;
   this.new = new TransactionItemCache();
   this.new.uri = aNewURI;
 }
 
 PlacesEditBookmarkURITransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function EBUTXN_doTransaction()
-  {
+  doTransaction: function EBUTXN_doTransaction() {
     this.item.uri = PlacesUtils.bookmarks.getBookmarkURI(this.item.id);
     PlacesUtils.bookmarks.changeBookmarkURI(this.item.id, this.new.uri);
     // move tags from old URI to new URI
     this.item.tags = PlacesUtils.tagging.getTagsForURI(this.item.uri);
     if (this.item.tags.length > 0) {
       // only untag the old URI if this is the only bookmark
       if (PlacesUtils.getBookmarksForURI(this.item.uri, {}).length == 0)
         PlacesUtils.tagging.untagURI(this.item.uri, this.item.tags);
       PlacesUtils.tagging.tagURI(this.new.uri, this.item.tags);
     }
   },
 
-  undoTransaction: function EBUTXN_undoTransaction()
-  {
+  undoTransaction: function EBUTXN_undoTransaction() {
     PlacesUtils.bookmarks.changeBookmarkURI(this.item.id, this.item.uri);
     // move tags from new URI to old URI
     if (this.item.tags.length > 0) {
       // only untag the new URI if this is the only bookmark
       if (PlacesUtils.getBookmarksForURI(this.new.uri, {}).length == 0)
         PlacesUtils.tagging.untagURI(this.new.uri, this.item.tags);
       PlacesUtils.tagging.tagURI(this.item.uri, this.item.tags);
     }
@@ -3369,56 +3311,52 @@ PlacesEditBookmarkURITransaction.prototy
  * @param aAnnotationObject
  *        Object representing an annotation, containing the following
  *        properties: name, flags, expires, value.
  *        If value is null the annotation will be removed
  *
  * @return nsITransaction object
  */
 this.PlacesSetItemAnnotationTransaction =
- function PlacesSetItemAnnotationTransaction(aItemId, aAnnotationObject)
-{
+ function PlacesSetItemAnnotationTransaction(aItemId, aAnnotationObject) {
   this.item = new TransactionItemCache();
   this.item.id = aItemId;
   this.new = new TransactionItemCache();
   this.new.annotations = [aAnnotationObject];
 }
 
 PlacesSetItemAnnotationTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function SIATXN_doTransaction()
-  {
+  doTransaction: function SIATXN_doTransaction() {
     let annoName = this.new.annotations[0].name;
     if (PlacesUtils.annotations.itemHasAnnotation(this.item.id, annoName)) {
       // fill the old anno if it is set
       let flags = {}, expires = {}, type = {};
       PlacesUtils.annotations.getItemAnnotationInfo(this.item.id, annoName, flags,
                                                     expires, type);
       let value = PlacesUtils.annotations.getItemAnnotation(this.item.id,
                                                             annoName);
       this.item.annotations = [{ name: annoName,
                                 type: type.value,
                                 flags: flags.value,
                                 value,
                                 expires: expires.value }];
-    }
-    else {
+    } else {
       // create an empty old anno
       this.item.annotations = [{ name: annoName,
                                 flags: 0,
                                 value: null,
                                 expires: Ci.nsIAnnotationService.EXPIRE_NEVER }];
     }
 
     PlacesUtils.setAnnotationsForItem(this.item.id, this.new.annotations);
   },
 
-  undoTransaction: function SIATXN_undoTransaction()
-  {
+  undoTransaction: function SIATXN_undoTransaction() {
     PlacesUtils.setAnnotationsForItem(this.item.id, this.item.annotations);
   }
 };
 
 
 /**
  * Transaction for setting/unsetting a page annotation
  *
@@ -3427,56 +3365,52 @@ PlacesSetItemAnnotationTransaction.proto
  * @param aAnnotationObject
  *        Object representing an annotation, containing the following
  *        properties: name, flags, expires, value.
  *        If value is null the annotation will be removed
  *
  * @return nsITransaction object
  */
 this.PlacesSetPageAnnotationTransaction =
- function PlacesSetPageAnnotationTransaction(aURI, aAnnotationObject)
-{
+ function PlacesSetPageAnnotationTransaction(aURI, aAnnotationObject) {
   this.item = new TransactionItemCache();
   this.item.uri = aURI;
   this.new = new TransactionItemCache();
   this.new.annotations = [aAnnotationObject];
 }
 
 PlacesSetPageAnnotationTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function SPATXN_doTransaction()
-  {
+  doTransaction: function SPATXN_doTransaction() {
     let annoName = this.new.annotations[0].name;
     if (PlacesUtils.annotations.pageHasAnnotation(this.item.uri, annoName)) {
       // fill the old anno if it is set
       let flags = {}, expires = {}, type = {};
       PlacesUtils.annotations.getPageAnnotationInfo(this.item.uri, annoName, flags,
                                                     expires, type);
       let value = PlacesUtils.annotations.getPageAnnotation(this.item.uri,
                                                             annoName);
       this.item.annotations = [{ name: annoName,
                                 flags: flags.value,
                                 value,
                                 expires: expires.value }];
-    }
-    else {
+    } else {
       // create an empty old anno
       this.item.annotations = [{ name: annoName,
                                 type: Ci.nsIAnnotationService.TYPE_STRING,
                                 flags: 0,
                                 value: null,
                                 expires: Ci.nsIAnnotationService.EXPIRE_NEVER }];
     }
 
     PlacesUtils.setAnnotationsForURI(this.item.uri, this.new.annotations);
   },
 
-  undoTransaction: function SPATXN_undoTransaction()
-  {
+  undoTransaction: function SPATXN_undoTransaction() {
     PlacesUtils.setAnnotationsForURI(this.item.uri, this.item.annotations);
   }
 };
 
 
 /**
  * Transaction for editing a bookmark's keyword.
  *
@@ -3501,18 +3435,17 @@ this.PlacesEditBookmarkKeywordTransactio
   this.new = new TransactionItemCache();
   this.new.keyword = aNewKeyword;
   this.new.postData = aNewPostData
 }
 
 PlacesEditBookmarkKeywordTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function EBKTXN_doTransaction()
-  {
+  doTransaction: function EBKTXN_doTransaction() {
     let done = false;
     Task.spawn(function* () {
       if (this.item.keyword) {
         let oldEntry = yield PlacesUtils.keywords.fetch(this.item.keyword);
         this.item.postData = oldEntry.postData;
         yield PlacesUtils.keywords.remove(this.item.keyword);
       }
 
@@ -3528,18 +3461,17 @@ PlacesEditBookmarkKeywordTransaction.pro
     // TODO: Until we can move to PlacesTransactions.jsm, we must spin the
     // events loop :(
     let thread = Services.tm.currentThread;
     while (!done) {
       thread.processNextEvent(true);
     }
   },
 
-  undoTransaction: function EBKTXN_undoTransaction()
-  {
+  undoTransaction: function EBKTXN_undoTransaction() {
 
     let done = false;
     Task.spawn(function* () {
       if (this.new.keyword) {
         yield PlacesUtils.keywords.remove(this.new.keyword);
       }
 
       if (this.item.keyword) {
@@ -3567,18 +3499,17 @@ PlacesEditBookmarkKeywordTransaction.pro
  * @param aItemId
  *        id of the bookmark to edit
  * @param aPostData
  *        post data
  *
  * @return nsITransaction object
  */
 this.PlacesEditBookmarkPostDataTransaction =
- function PlacesEditBookmarkPostDataTransaction(aItemId, aPostData)
-{
+ function PlacesEditBookmarkPostDataTransaction(aItemId, aPostData) {
   this.item = new TransactionItemCache();
   this.item.id = aItemId;
   this.new = new TransactionItemCache();
   this.new.postData = aPostData;
 }
 
 PlacesEditBookmarkPostDataTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
@@ -3606,107 +3537,99 @@ PlacesEditBookmarkPostDataTransaction.pr
  * @param aItemId
  *        id of the item to edit
  * @param aNewDateAdded
  *        new date added for the item
  *
  * @return nsITransaction object
  */
 this.PlacesEditItemDateAddedTransaction =
- function PlacesEditItemDateAddedTransaction(aItemId, aNewDateAdded)
-{
+ function PlacesEditItemDateAddedTransaction(aItemId, aNewDateAdded) {
   this.item = new TransactionItemCache();
   this.item.id = aItemId;
   this.new = new TransactionItemCache();
   this.new.dateAdded = aNewDateAdded;
 }
 
 PlacesEditItemDateAddedTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function EIDATXN_doTransaction()
-  {
+  doTransaction: function EIDATXN_doTransaction() {
     // Child transactions have the id set as parentId.
     if (this.item.id == -1 && this.item.parentId != -1)
       this.item.id = this.item.parentId;
     this.item.dateAdded =
       PlacesUtils.bookmarks.getItemDateAdded(this.item.id);
     PlacesUtils.bookmarks.setItemDateAdded(this.item.id, this.new.dateAdded);
   },
 
-  undoTransaction: function EIDATXN_undoTransaction()
-  {
+  undoTransaction: function EIDATXN_undoTransaction() {
     PlacesUtils.bookmarks.setItemDateAdded(this.item.id, this.item.dateAdded);
   }
 };
 
 
 /**
  * Transaction for editing an item's last modified time.
  *
  * @param aItemId
  *        id of the item to edit
  * @param aNewLastModified
  *        new last modified date for the item
  *
  * @return nsITransaction object
  */
 this.PlacesEditItemLastModifiedTransaction =
- function PlacesEditItemLastModifiedTransaction(aItemId, aNewLastModified)
-{
+ function PlacesEditItemLastModifiedTransaction(aItemId, aNewLastModified) {
   this.item = new TransactionItemCache();
   this.item.id = aItemId;
   this.new = new TransactionItemCache();
   this.new.lastModified = aNewLastModified;
 }
 
 PlacesEditItemLastModifiedTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
   doTransaction:
-  function EILMTXN_doTransaction()
-  {
+  function EILMTXN_doTransaction() {
     // Child transactions have the id set as parentId.
     if (this.item.id == -1 && this.item.parentId != -1)
       this.item.id = this.item.parentId;
     this.item.lastModified =
       PlacesUtils.bookmarks.getItemLastModified(this.item.id);
     PlacesUtils.bookmarks.setItemLastModified(this.item.id,
                                               this.new.lastModified);
   },
 
   undoTransaction:
-  function EILMTXN_undoTransaction()
-  {
+  function EILMTXN_undoTransaction() {
     PlacesUtils.bookmarks.setItemLastModified(this.item.id,
                                               this.item.lastModified);
   }
 };
 
 
 /**
  * Transaction for sorting a folder by name
  *
  * @param aFolderId
  *        id of the folder to sort
  *
  * @return nsITransaction object
  */
 this.PlacesSortFolderByNameTransaction =
- function PlacesSortFolderByNameTransaction(aFolderId)
-{
+ function PlacesSortFolderByNameTransaction(aFolderId) {
   this.item = new TransactionItemCache();
   this.item.id = aFolderId;
 }
 
 PlacesSortFolderByNameTransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function SFBNTXN_doTransaction()
-  {
+  doTransaction: function SFBNTXN_doTransaction() {
     this._oldOrder = [];
 
     let contents =
       PlacesUtils.getFolderContents(this.item.id, false, false).root;
     let count = contents.childCount;
 
     // sort between separators
     let newOrder = [];
@@ -3725,18 +3648,17 @@ PlacesSortFolderByNameTransaction.protot
       this._oldOrder[item.itemId] = i;
       if (PlacesUtils.nodeIsSeparator(item)) {
         if (preSep.length > 0) {
           preSep.sort(sortingMethod);
           newOrder = newOrder.concat(preSep);
           preSep.splice(0, preSep.length);
         }
         newOrder.push(item);
-      }
-      else
+      } else
         preSep.push(item);
     }
     contents.containerOpen = false;
 
     if (preSep.length > 0) {
       preSep.sort(sortingMethod);
       newOrder = newOrder.concat(preSep);
     }
@@ -3747,18 +3669,17 @@ PlacesSortFolderByNameTransaction.protot
         for (let i = 0; i < newOrder.length; ++i) {
           PlacesUtils.bookmarks.setItemIndex(newOrder[i].itemId, i);
         }
       }
     };
     PlacesUtils.bookmarks.runInBatchMode(callback, null);
   },
 
-  undoTransaction: function SFBNTXN_undoTransaction()
-  {
+  undoTransaction: function SFBNTXN_undoTransaction() {
     let callback = {
       _self: this,
       runBatched() {
         for (let item in this._self._oldOrder)
           PlacesUtils.bookmarks.setItemIndex(item, this._self._oldOrder[item]);
       }
     };
     PlacesUtils.bookmarks.runInBatchMode(callback, null);
@@ -3773,43 +3694,40 @@ PlacesSortFolderByNameTransaction.protot
  * transaction removes them all from aURL!
  *
  * @param aURI
  *        the URL to tag.
  * @param aTags
  *        Array of tags to set for the given URL.
  */
 this.PlacesTagURITransaction =
- function PlacesTagURITransaction(aURI, aTags)
-{
+ function PlacesTagURITransaction(aURI, aTags) {
   this.item = new TransactionItemCache();
   this.item.uri = aURI;
   this.item.tags = aTags;
 }
 
 PlacesTagURITransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function TUTXN_doTransaction()
-  {
+  doTransaction: function TUTXN_doTransaction() {
     if (PlacesUtils.getMostRecentBookmarkForURI(this.item.uri) == -1) {
       // There is no bookmark for this uri, but we only allow to tag bookmarks.
       // Force an unfiled bookmark first.
       this.item.id =
         PlacesUtils.bookmarks
                    .insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                                    this.item.uri,
                                    PlacesUtils.bookmarks.DEFAULT_INDEX,
                                    PlacesUtils.history.getPageTitle(this.item.uri));
     }
     PlacesUtils.tagging.tagURI(this.item.uri, this.item.tags);
   },
 
-  undoTransaction: function TUTXN_undoTransaction()
-  {
+  undoTransaction: function TUTXN_undoTransaction() {
     if (this.item.id != -1) {
       PlacesUtils.bookmarks.removeItem(this.item.id);
       this.item.id = -1;
     }
     PlacesUtils.tagging.untagURI(this.item.uri, this.item.tags);
   }
 };
 
@@ -3821,18 +3739,17 @@ PlacesTagURITransaction.prototype = {
  *
  * @param aURI
  *        the URL to un-tag.
  * @param aTags
  *        Array of tags to unset. pass null to remove all tags from the given
  *        url.
  */
 this.PlacesUntagURITransaction =
- function PlacesUntagURITransaction(aURI, aTags)
-{
+ function PlacesUntagURITransaction(aURI, aTags) {
   this.item = new TransactionItemCache();
   this.item.uri = aURI;
   if (aTags) {
     // Within this transaction, we cannot rely on tags given by itemId
     // since the tag containers may be gone after we call untagURI.
     // Thus, we convert each tag given by its itemId to name.
     let tags = [];
     for (let i = 0; i < aTags.length; ++i) {
@@ -3843,29 +3760,27 @@ this.PlacesUntagURITransaction =
     }
     this.item.tags = tags;
   }
 }
 
 PlacesUntagURITransaction.prototype = {
   __proto__: BaseTransaction.prototype,
 
-  doTransaction: function UTUTXN_doTransaction()
-  {
+  doTransaction: function UTUTXN_doTransaction() {
     // Filter tags existing on the bookmark, otherwise on undo we may try to
     // set nonexistent tags.
     let tags = PlacesUtils.tagging.getTagsForURI(this.item.uri);
     this.item.tags = this.item.tags.filter(function(aTag) {
       return tags.includes(aTag);
     });
     PlacesUtils.tagging.untagURI(this.item.uri, this.item.tags);
   },
 
-  undoTransaction: function UTUTXN_undoTransaction()
-  {
+  undoTransaction: function UTUTXN_undoTransaction() {
     PlacesUtils.tagging.tagURI(this.item.uri, this.item.tags);
   }
 };
 
 /**
  * Executes a boolean validate function, throwing if it returns false.
  *
  * @param boolValidateFn
--- a/toolkit/components/places/UnifiedComplete.js
+++ b/toolkit/components/places/UnifiedComplete.js
@@ -569,18 +569,17 @@ function getUnfilteredSearchTokens(searc
 
 /**
  * Strip prefixes from the URI that we don't care about for searching.
  *
  * @param spec
  *        The text to modify.
  * @return the modified spec.
  */
-function stripPrefix(spec)
-{
+function stripPrefix(spec) {
   ["http://", "https://", "ftp://"].some(scheme => {
     // Strip protocol if not directly followed by a space
     if (spec.startsWith(scheme) && spec[scheme.length] != " ") {
       spec = spec.slice(scheme.length);
       return true;
     }
     return false;
   });
@@ -1703,18 +1702,17 @@ Search.prototype = {
     if (!match.style) {
       // It is possible that we already have a style set (from a keyword
       // search or because of the user's preferences), so only set it if we
       // haven't already done so.
       if (showTags) {
         // If we're not suggesting bookmarks, then this shouldn't
         // display as one.
         match.style = this.hasBehavior("bookmark") ? "bookmark-tag" : "tag";
-      }
-      else if (bookmarked) {
+      } else if (bookmarked) {
         match.style = "bookmark";
       }
     }
 
     if (action)
       match.style = "action " + action;
 
     match.value = url;
@@ -1995,18 +1993,20 @@ UnifiedComplete.prototype = {
         // indices.  A larger cache helps reducing IO and improving performance.
         // The value used here is larger than the default Storage value defined
         // as MAX_CACHE_SIZE_BYTES in storage/mozStorageConnection.cpp.
         yield conn.execute("PRAGMA cache_size = -6144"); // 6MiB
 
         yield SwitchToTabStorage.initDatabase(conn);
 
         return conn;
-      }.bind(this)).then(null, ex => { dump("Couldn't get database handle: " + ex + "\n");
-                                       Cu.reportError(ex); });
+      }.bind(this)).then(null, ex => {
+ dump("Couldn't get database handle: " + ex + "\n");
+                                       Cu.reportError(ex);
+});
     }
     return this._promiseDatabase;
   },
 
   // mozIPlacesAutoComplete
 
   registerOpenPage(uri, userContextId) {
     SwitchToTabStorage.add(uri, userContextId);
--- a/toolkit/components/places/nsLivemarkService.js
+++ b/toolkit/components/places/nsLivemarkService.js
@@ -118,18 +118,17 @@ function LivemarkService() {
 LivemarkService.prototype = {
   // This is just an helper for code readability.
   _promiseLivemarksMap: () => gLivemarksCachePromised,
 
   _reloading: false,
   _startReloadTimer(livemarksMap, forceUpdate, reloaded) {
     if (this._reloadTimer) {
       this._reloadTimer.cancel();
-    }
-    else {
+    } else {
       this._reloadTimer = Cc["@mozilla.org/timer;1"]
                             .createInstance(Ci.nsITimer);
     }
 
     this._reloading = true;
     this._reloadTimer.initWithCallback(() => {
       // Find first livemark to be reloaded.
       for (let [ guid, livemark ] of livemarksMap) {
@@ -410,18 +409,17 @@ LivemarkService.prototype = {
  * Object used internally to represent a livemark.
  *
  * @param aLivemarkInfo
  *        Object containing information on the livemark.  If the livemark is
  *        not included in the object, a new livemark will be created.
  *
  * @note terminate() must be invoked before getting rid of this object.
  */
-function Livemark(aLivemarkInfo)
-{
+function Livemark(aLivemarkInfo) {
   this.id = aLivemarkInfo.id;
   this.guid = aLivemarkInfo.guid;
   this.feedURI = aLivemarkInfo.feedURI;
   this.siteURI = aLivemarkInfo.siteURI || null;
   this.title = aLivemarkInfo.title;
   this.parentId = aLivemarkInfo.parentId;
   this.parentGuid = aLivemarkInfo.parentGuid;
   this.index = aLivemarkInfo.index;
@@ -476,18 +474,17 @@ Livemark.prototype = {
     }
 
     // Security check the site URI against the feed URI principal.
     let secMan = Services.scriptSecurityManager;
     let feedPrincipal = secMan.createCodebasePrincipal(this.feedURI, {});
     try {
       secMan.checkLoadURIWithPrincipal(feedPrincipal, aSiteURI,
                                        Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL);
-    }
-    catch (ex) {
+    } catch (ex) {
       return;
     }
 
     PlacesUtils.annotations
                .setItemAnnotation(this.id, PlacesUtils.LMANNO_SITEURI,
                                   aSiteURI.spec,
                                   0, PlacesUtils.annotations.EXPIRE_NEVER,
                                   aSource);
@@ -541,18 +538,17 @@ Livemark.prototype = {
       channel.setRequestHeader("X-Moz", "livebookmarks", false);
 
       // Stream the result to the feed parser with this listener
       let listener = new LivemarkLoadListener(this);
       channel.notificationCallbacks = listener;
       channel.asyncOpen2(listener);
 
       this.loadGroup = loadgroup;
-    }
-    catch (ex) {
+    } catch (ex) {
       this.status = Ci.mozILivemark.STATUS_FAILED;
     }
   },
 
   reload(aForceUpdate) {
     this.updateChildren(aForceUpdate);
   },
 
@@ -771,31 +767,28 @@ LivemarkLoadListener.prototype = {
         if (!uri) {
           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, title, visited: false });
       }
 
       this._livemark.children = livemarkChildren;
-    }
-    catch (ex) {
+    } catch (ex) {
       this.abort(ex);
-    }
-    finally {
+    } finally {
       this._processor.listener = null;
       this._processor = null;
     }
   },
 
   onDataAvailable(aRequest, aContext, aInputStream, aSourceOffset, aCount) {
     if (this._processor) {
       this._processor.onDataAvailable(aRequest, aContext, aInputStream,
@@ -811,18 +804,17 @@ LivemarkLoadListener.prototype = {
     let channel = aRequest.QueryInterface(Ci.nsIChannel);
     try {
       // Parse feed data as it comes in
       this._processor = Cc["@mozilla.org/feed-processor;1"].
                         createInstance(Ci.nsIFeedProcessor);
       this._processor.listener = this;
       this._processor.parseAsync(null, channel.URI);
       this._processor.onStartRequest(aRequest, aContext);
-    }
-    catch (ex) {
+    } catch (ex) {
       Components.utils.reportError("Livemark Service: feed processor received an invalid channel for " + channel.URI.spec);
       this.abort(ex);
     }
   },
 
   onStopRequest(aRequest, aContext, aStatus) {
     if (!Components.isSuccessCode(aStatus)) {
       this.abort();
@@ -847,21 +839,19 @@ LivemarkLoadListener.prototype = {
           if (expireTime > nowTime) {
             this._setResourceTTL(Math.max((expireTime - nowTime),
                                           EXPIRE_TIME_MS));
             return;
           }
         }
       }
       this._setResourceTTL(EXPIRE_TIME_MS);
-    }
-    catch (ex) {
+    } catch (ex) {
       this.abort(ex);
-    }
-    finally {
+    } finally {
       if (this._livemark.status == Ci.mozILivemark.STATUS_LOADING) {
         this._livemark.status = Ci.mozILivemark.STATUS_READY;
       }
       this._livemark.locked = false;
       this._livemark.loadGroup = null;
     }
   },
 
--- a/toolkit/components/places/nsPlacesExpiration.js
+++ b/toolkit/components/places/nsPlacesExpiration.js
@@ -449,18 +449,17 @@ function notify(observers, notification,
     try {
       observer[notification](...args);
     } catch (ex) {}
   }
 }
 
 // nsPlacesExpiration definition
 
-function nsPlacesExpiration()
-{
+function nsPlacesExpiration() {
   // Smart Getters
 
   XPCOMUtils.defineLazyGetter(this, "_db", function() {
     let db = Cc["@mozilla.org/browser/nav-history-service;1"].
              getService(Ci.nsPIPlacesDatabase).
              DBConnection;
 
     // Create the temporary notifications table.
@@ -502,18 +501,17 @@ function nsPlacesExpiration()
   Services.obs.addObserver(this, TOPIC_DEBUG_START_EXPIRATION, true);
   Services.obs.addObserver(this, TOPIC_IDLE_DAILY, true);
 }
 
 nsPlacesExpiration.prototype = {
 
   // nsIObserver
 
-  observe: function PEX_observe(aSubject, aTopic, aData)
-  {
+  observe: function PEX_observe(aSubject, aTopic, aData) {
     if (this._shuttingDown) {
       return;
     }
 
     if (aTopic == TOPIC_SHUTDOWN) {
       this._shuttingDown = true;
       this.expireOnIdle = false;
 
@@ -527,89 +525,79 @@ nsPlacesExpiration.prototype = {
       let hasRecentClearHistory =
         Date.now() - this._lastClearHistoryTime <
           SHUTDOWN_WITH_RECENT_CLEARHISTORY_TIMEOUT_SECONDS * 1000;
       if (!hasRecentClearHistory && this.status == STATUS.DIRTY) {
         this._expireWithActionAndLimit(ACTION.SHUTDOWN_DIRTY, LIMIT.LARGE);
       }
 
       this._finalizeInternalStatements();
-    }
-    else if (aTopic == TOPIC_PREF_CHANGED) {
+    } else if (aTopic == TOPIC_PREF_CHANGED) {
       this._loadPrefs().then(() => {
         if (aData == PREF_INTERVAL_SECONDS) {
           // Renew the timer with the new interval value.
           this._newTimer();
         }
       }, Cu.reportError);
-    }
-    else if (aTopic == TOPIC_DEBUG_START_EXPIRATION) {
+    } else if (aTopic == TOPIC_DEBUG_START_EXPIRATION) {
       // The passed-in limit is the maximum number of visits to expire when
       // history is over capacity.  Mind to correctly handle the NaN value.
       let limit = parseInt(aData);
       if (limit == -1) {
         // Everything should be expired without any limit.  If history is over
         // capacity then all existing visits will be expired.
         // Should only be used in tests, since may cause dataloss.
         this._expireWithActionAndLimit(ACTION.DEBUG, LIMIT.UNLIMITED);
-      }
-      else if (limit > 0) {
+      } else if (limit > 0) {
         // The number of expired visits is limited by this amount.  It may be
         // used for testing purposes, like checking that limited queries work.
         this._debugLimit = limit;
         this._expireWithActionAndLimit(ACTION.DEBUG, LIMIT.DEBUG);
-      }
-      else {
+      } else {
         // Any other value is intended as a 0 limit, that means no visits
         // will be expired.  Even if this doesn't touch visits, it will remove
         // any orphan pages, icons, annotations and similar from the database,
         // so it may be used for cleanup purposes.
         this._debugLimit = -1;
         this._expireWithActionAndLimit(ACTION.DEBUG, LIMIT.DEBUG);
       }
-    }
-    else if (aTopic == TOPIC_IDLE_BEGIN) {
+    } else if (aTopic == TOPIC_IDLE_BEGIN) {
       // Stop the expiration timer.  We don't want to keep up expiring on idle
       // to preserve batteries on mobile devices and avoid killing stand-by.
       if (this._timer) {
         this._timer.cancel();
         this._timer = null;
       }
       if (this.expireOnIdle)
         this._expireWithActionAndLimit(ACTION.IDLE_DIRTY, LIMIT.LARGE);
-    }
-    else if (aTopic == TOPIC_IDLE_END) {
+    } else if (aTopic == TOPIC_IDLE_END) {
       // Restart the expiration timer.
       if (!this._timer)
         this._newTimer();
-    }
-    else if (aTopic == TOPIC_IDLE_DAILY) {
+    } else if (aTopic == TOPIC_IDLE_DAILY) {
       this._expireWithActionAndLimit(ACTION.IDLE_DAILY, LIMIT.LARGE);
-    }
-    else if (aTopic == TOPIC_TESTING_MODE) {
+    } else if (aTopic == TOPIC_TESTING_MODE) {
       this._testingMode = true;
     }
   },
 
   // nsINavHistoryObserver
 
   _inBatchMode: false,
-  onBeginUpdateBatch: function PEX_onBeginUpdateBatch()
-  {
+  onBeginUpdateBatch: function PEX_onBeginUpdateBatch() {
     this._inBatchMode = true;
 
     // We do not want to expire while we are doing batch work.
     if (this._timer) {
       this._timer.cancel();
       this._timer = null;
     }
   },
 
-  onEndUpdateBatch: function PEX_onEndUpdateBatch()
-  {
+  onEndUpdateBatch: function PEX_onEndUpdateBatch() {
     this._inBatchMode = false;
 
     // Restore timer.
     if (!this._timer)
       this._newTimer();
   },
 
   _lastClearHistoryTime: 0,
@@ -623,18 +611,17 @@ nsPlacesExpiration.prototype = {
   onVisit() {},
   onTitleChanged() {},
   onDeleteURI() {},
   onPageChanged() {},
   onDeleteVisits() {},
 
   // nsITimerCallback
 
-  notify: function PEX_timerCallback()
-  {
+  notify: function PEX_timerCallback() {
     // Check if we are over history capacity, if so visits must be expired.
     this._getPagesStats((function onPagesCount(aPagesCount, aStatsCount) {
       let overLimitPages = aPagesCount - this._urisLimit;
       this._overLimit = overLimitPages > 0;
 
       let action = this._overLimit ? ACTION.TIMED_OVERLIMIT : ACTION.TIMED;
       // If the number of pages changed significantly from the last ANALYZE
       // update SQLite statistics.
@@ -647,18 +634,17 @@ nsPlacesExpiration.prototype = {
                                                              : LIMIT.SMALL;
 
       this._expireWithActionAndLimit(action, limit);
     }).bind(this));
   },
 
   // mozIStorageStatementCallback
 
-  handleResult: function PEX_handleResult(aResultSet)
-  {
+  handleResult: function PEX_handleResult(aResultSet) {
     // We don't want to notify after shutdown.
     if (this._shuttingDown)
       return;
 
     let row;
     while ((row = aResultSet.getNextRow())) {
       // expected_results is set to the number of expected visits by
       // QUERY_FIND_VISITS_TO_EXPIRE.  We decrease that counter for each found
@@ -682,41 +668,38 @@ nsPlacesExpiration.prototype = {
       let mostRecentExpiredVisit = row.getResultByName("most_recent_expired_visit");
       let reason = Ci.nsINavHistoryObserver.REASON_EXPIRED;
       let observers = PlacesUtils.history.getObservers();
 
       if (mostRecentExpiredVisit) {
         let days = parseInt((Date.now() - (mostRecentExpiredVisit / 1000)) / MSECS_PER_DAY);
         if (!this._mostRecentExpiredVisitDays) {
           this._mostRecentExpiredVisitDays = days;
-        }
-        else if (days < this._mostRecentExpiredVisitDays) {
+        } else if (days < this._mostRecentExpiredVisitDays) {
           this._mostRecentExpiredVisitDays = days;
         }
       }
 
       // Dispatch expiration notifications to history.
       if (wholeEntry) {
         notify(observers, "onDeleteURI", [uri, guid, reason]);
       } else {
         notify(observers, "onDeleteVisits", [uri, visitDate, guid, reason, 0]);
       }
     }
   },
 
-  handleError: function PEX_handleError(aError)
-  {
+  handleError: function PEX_handleError(aError) {
     Cu.reportError("Async statement execution returned with '" +
                    aError.result + "', '" + aError.message + "'");
   },
 
   // Number of expiration steps needed to reach a CLEAN status.
   _telemetrySteps: 1,
-  handleCompletion: function PEX_handleCompletion(aReason)
-  {
+  handleCompletion: function PEX_handleCompletion(aReason) {
     if (aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED) {
 
       if (this._mostRecentExpiredVisitDays) {
         try {
           Services.telemetry
                   .getHistogramById("PLACES_MOST_RECENT_EXPIRED_VISIT_DAYS")
                   .add(this._mostRecentExpiredVisitDays);
         } catch (ex) {
@@ -732,18 +715,17 @@ nsPlacesExpiration.prototype = {
         // our countdown to zero, while a clean one will not.
         let oldStatus = this.status;
         this.status = this._expectedResultsCount == 0 ? STATUS.DIRTY
                                                       : STATUS.CLEAN;
 
         // Collect or send telemetry data.
         if (this.status == STATUS.DIRTY) {
           this._telemetrySteps++;
-        }
-        else {
+        } else {
           // Avoid reporting the common cases where the database is clean, or
           // a single step is needed.
           if (oldStatus == STATUS.DIRTY) {
             try {
               Services.telemetry
                       .getHistogramById("PLACES_EXPIRATION_STEPS_TO_CLEAN2")
                       .add(this._telemetrySteps);
             } catch (ex) {
@@ -786,18 +768,17 @@ nsPlacesExpiration.prototype = {
   _isIdleObserver: false,
   _expireOnIdle: false,
   set expireOnIdle(aExpireOnIdle) {
     // Observe idle regardless aExpireOnIdle, since we always want to stop
     // timed expiration on idle, to preserve mobile battery life.
     if (!this._isIdleObserver && !this._shuttingDown) {
       this._idle.addIdleObserver(this, IDLE_TIMEOUT_SECONDS);
       this._isIdleObserver = true;
-    }
-    else if (this._isIdleObserver && this._shuttingDown) {
+    } else if (this._isIdleObserver && this._shuttingDown) {
       this._idle.removeIdleObserver(this, IDLE_TIMEOUT_SECONDS);
       this._isIdleObserver = false;
     }
 
     // If running a debug expiration we need full control of what happens
     // but idle cleanup could activate in the middle, since tinderboxes are
     // permanently idle.  That would cause unexpected oranges, so disable it.
     if (this._debugLimit !== undefined)
@@ -924,18 +905,17 @@ nsPlacesExpiration.prototype = {
    *
    * @param aAction
    *        The ACTION we are expiring for.  See the ACTION const for values.
    * @param aLimit
    *        Whether to use small, large or no limits when expiring.  See the
    *        LIMIT const for values.
    */
   _expireWithActionAndLimit:
-  function PEX__expireWithActionAndLimit(aAction, aLimit)
-  {
+  function PEX__expireWithActionAndLimit(aAction, aLimit) {
     // Skip expiration during batch mode.
     if (this._inBatchMode)
       return;
     // Don't try to further expire after shutdown.
     if (this._shuttingDown && aAction != ACTION.SHUTDOWN_DIRTY) {
       return;
     }
 
@@ -948,18 +928,17 @@ nsPlacesExpiration.prototype = {
     // Execute statements asynchronously in a transaction.
     this._db.executeAsync(boundStatements, boundStatements.length, this);
   },
 
   /**
    * Finalizes all of our mozIStorageStatements so we can properly close the
    * database.
    */
-  _finalizeInternalStatements: function PEX__finalizeInternalStatements()
-  {
+  _finalizeInternalStatements: function PEX__finalizeInternalStatements() {
     for (let queryType in this._cachedStatements) {
       let stmt = this._cachedStatements[queryType];
       stmt.finalize();
     }
   },
 
   /**
    * Generate the statement used for expiration.
@@ -968,18 +947,17 @@ nsPlacesExpiration.prototype = {
    *        Type of the query to build statement for.
    * @param aLimit
    *        Whether to use small, large or no limits when expiring.  See the
    *        LIMIT const for values.
    * @param aAction
    *        Current action causing the expiration.  See the ACTION const.
    */
   _cachedStatements: {},
-  _getBoundStatement: function PEX__getBoundStatement(aQueryType, aLimit, aAction)
-  {
+  _getBoundStatement: function PEX__getBoundStatement(aQueryType, aLimit, aAction) {
     // Statements creation can be expensive, so we want to cache them.
     let stmt = this._cachedStatements[aQueryType];
     if (stmt === undefined) {
       stmt = this._cachedStatements[aQueryType] =
         this._db.createAsyncStatement(EXPIRATION_QUERIES[aQueryType].sql);
     }
 
     let baseLimit;
@@ -1060,18 +1038,17 @@ nsPlacesExpiration.prototype = {
     return stmt;
   },
 
   /**
    * Creates a new timer based on this._interval.
    *
    * @return a REPEATING_SLACK nsITimer that runs every this._interval.
    */
-  _newTimer: function PEX__newTimer()
-  {
+  _newTimer: function PEX__newTimer() {
     if (this._timer)
       this._timer.cancel();
     if (this._shuttingDown)
       return undefined;
     let interval = this.status != STATUS.DIRTY ?
       this._interval * EXPIRE_AGGRESSIVITY_MULTIPLIER : this._interval;
 
     let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
--- a/toolkit/components/places/nsTaggingService.js
+++ b/toolkit/components/places/nsTaggingService.js
@@ -72,18 +72,17 @@ TaggingService.prototype = {
        AND fk = (SELECT id FROM moz_places WHERE url_hash = hash(:page_url) AND url = :page_url)`
     );
     stmt.params.tag_id = tagId;
     stmt.params.page_url = aURI.spec;
     try {
       if (stmt.executeStep()) {
         return stmt.row.id;
       }
-    }
-    finally {
+    } finally {
       stmt.finalize();
     }
     return -1;
   },
 
   /**
    * Returns the folder id for a tag, or -1 if not found.
    * @param [in] aTag
@@ -116,35 +115,32 @@ TaggingService.prototype = {
                 .map(idOrName => {
       let tag = {};
       if (typeof(idOrName) == "number" && this._tagFolders[idOrName]) {
         // This is a tag folder id.
         tag.id = idOrName;
         // We can't know the name at this point, since a previous tag could
         // want to change it.
         tag.__defineGetter__("name", () => this._tagFolders[tag.id]);
-      }
-      else if (typeof(idOrName) == "string" && idOrName.length > 0 &&
+      } else if (typeof(idOrName) == "string" && idOrName.length > 0 &&
                idOrName.length <= Ci.nsITaggingService.MAX_TAG_LENGTH) {
         // This is a tag name.
         tag.name = trim ? idOrName.trim() : idOrName;
         // We can't know the id at this point, since a previous tag could
         // have created it.
         tag.__defineGetter__("id", () => this._getItemIdForTag(tag.name));
-      }
-      else {
+      } else {
         throw Cr.NS_ERROR_INVALID_ARG;
       }
       return tag;
     });
   },
 
   // nsITaggingService
-  tagURI: function TS_tagURI(aURI, aTags, aSource)
-  {
+  tagURI: function TS_tagURI(aURI, aTags, aSource) {
     if (!aURI || !aTags || !Array.isArray(aTags)) {
       throw Cr.NS_ERROR_INVALID_ARG;
     }
 
     // This also does some input validation.
     let tags = this._convertInputMixedTagsArray(aTags, true);
 
     let taggingFunction = () => {
@@ -203,29 +199,27 @@ TaggingService.prototype = {
       `SELECT count(*) AS count FROM moz_bookmarks
        WHERE parent = :tag_id`
     );
     stmt.params.tag_id = aTagId;
     try {
       if (stmt.executeStep()) {
         count = stmt.row.count;
       }
-    }
-    finally {
+    } finally {
       stmt.finalize();
     }
 
     if (count == 0) {
       PlacesUtils.bookmarks.removeItem(aTagId, aSource);
     }
   },
 
   // nsITaggingService
-  untagURI: function TS_untagURI(aURI, aTags, aSource)
-  {
+  untagURI: function TS_untagURI(aURI, aTags, aSource) {
     if (!aURI || (aTags && !Array.isArray(aTags))) {
       throw Cr.NS_ERROR_INVALID_ARG;
     }
 
     if (!aTags) {
       // Passing null should clear all tags for aURI, see the IDL.
       // XXXmano: write a perf-sensitive version of this code path...
       aTags = this.getTagsForURI(aURI);
@@ -285,18 +279,17 @@ TaggingService.prototype = {
     );
     stmt.params.tag_id = tagId;
     try {
       while (stmt.executeStep()) {
         try {
           uris.push(Services.io.newURI(stmt.row.url, null, null));
         } catch (ex) {}
       }
-    }
-    finally {
+    } finally {
       stmt.finalize();
     }
 
     return uris;
   },
 
   // nsITaggingService
   getTagsForURI: function TS_getTagsForURI(aURI, aCount) {
@@ -330,18 +323,17 @@ TaggingService.prototype = {
       let stmt = db.createStatement(
         "SELECT id, title FROM moz_bookmarks WHERE parent = :tags_root "
       );
       stmt.params.tags_root = PlacesUtils.tagsFolderId;
       try {
         while (stmt.executeStep()) {
           this.__tagFolders[stmt.row.id] = stmt.row.title;
         }
-      }
-      finally {
+      } finally {
         stmt.finalize();
       }
     }
 
     return this.__tagFolders;
   },
 
   // nsITaggingService
@@ -395,24 +387,22 @@ TaggingService.prototype = {
        WHERE fk = (SELECT id FROM moz_places WHERE url_hash = hash(:page_url) AND url = :page_url)`
     );
     stmt.params.page_url = aURI.spec;
     try {
       while (stmt.executeStep() && !isBookmarked) {
         if (this._tagFolders[stmt.row.parent]) {
           // This is a tag entry.
           itemIds.push(stmt.row.id);
-        }
-        else {
+        } else {
           // This is a real bookmark, so the bookmarked URI is not an orphan.
           isBookmarked = true;
         }
       }
-    }
-    finally {
+    } finally {
       stmt.finalize();
     }
 
     return isBookmarked ? [] : itemIds;
   },
 
   // nsINavBookmarkObserver
   onItemAdded: function TS_onItemAdded(aItemId, aFolderId, aIndex, aItemType,
@@ -426,31 +416,29 @@ TaggingService.prototype = {
   },
 
   onItemRemoved: function TS_onItemRemoved(aItemId, aFolderId, aIndex,
                                            aItemType, aURI, aGuid, aParentGuid,
                                            aSource) {
     // Item is a tag folder.
     if (aFolderId == PlacesUtils.tagsFolderId && this._tagFolders[aItemId]) {
       delete this._tagFolders[aItemId];
-    }
-    // Item is a bookmark that was removed from a non-tag folder.
-    else if (aURI && !this._tagFolders[aFolderId]) {
+    } else if (aURI && !this._tagFolders[aFolderId]) {
+      // Item is a bookmark that was removed from a non-tag folder.
       // If the only bookmark items now associated with the bookmark's URI are
       // contained in tag folders, the URI is no longer properly bookmarked, so
       // untag it.
       let itemIds = this._getTaggedItemIdsIfUnbookmarkedURI(aURI);
       for (let i = 0; i < itemIds.length; i++) {
         try {
           PlacesUtils.bookmarks.removeItem(itemIds[i], aSource);
         } catch (ex) {}
       }
-    }
-    // Item is a tag entry.  If this was the last entry for this tag, remove it.
-    else if (aURI && this._tagFolders[aFolderId]) {
+    } else if (aURI && this._tagFolders[aFolderId]) {
+      // Item is a tag entry.  If this was the last entry for this tag, remove it.
       this._removeTagIfEmpty(aFolderId, aSource);
     }
   },
 
   onItemChanged: function TS_onItemChanged(aItemId, aProperty,
                                            aIsAnnotationProperty, aNewValue,
                                            aLastModified, aItemType) {
     if (aProperty == "title" && this._tagFolders[aItemId])
--- a/toolkit/components/places/tests/PlacesTestUtils.jsm
+++ b/toolkit/components/places/tests/PlacesTestUtils.jsm
@@ -39,18 +39,17 @@ this.PlacesTestUtils = Object.freeze({
   addVisits: Task.async(function* (placeInfo) {
     let places = [];
     let infos = [];
 
     if (placeInfo instanceof Ci.nsIURI ||
         placeInfo instanceof URL ||
         typeof placeInfo == "string") {
       places.push({ uri: placeInfo });
-    }
-    else if (Array.isArray(placeInfo)) {
+    } else if (Array.isArray(placeInfo)) {
       places = places.concat(placeInfo);
     } else if (typeof placeInfo == "object" && placeInfo.uri) {
       places.push(placeInfo)
     } else {
       throw new Error("Unsupported type passed to addVisits");
     }
 
     // Create a PageInfo for each entry.
--- a/toolkit/components/places/tests/bookmarks/test_417228-exclude-from-backup.js
+++ b/toolkit/components/places/tests/bookmarks/test_417228-exclude-from-backup.js
@@ -81,18 +81,17 @@ var test = {
       var excludeRootNode = rootNode.getChild(excludeRootIndex);
       do_check_eq(this._excludeRootTitle, excludeRootNode.title);
       excludeRootNode.QueryInterface(Ci.nsINavHistoryQueryResultNode);
       excludeRootNode.containerOpen = true;
       do_check_eq(excludeRootNode.childCount, 1);
       var excludeRootChildNode = excludeRootNode.getChild(0);
       do_check_eq(excludeRootChildNode.uri, this._restoreRootExcludeURI.spec);
       excludeRootNode.containerOpen = false;
-    }
-    else {
+    } else {
       // exclude root should not exist anymore
       do_check_eq(rootNode.childCount, PLACES_ROOTS_COUNT + 1);
       restoreRootIndex = PLACES_ROOTS_COUNT;
     }
 
     var restoreRootNode = rootNode.getChild(restoreRootIndex);
     do_check_eq(this._restoreRootTitle, restoreRootNode.title);
     restoreRootNode.QueryInterface(Ci.nsINavHistoryQueryResultNode);
--- a/toolkit/components/places/tests/bookmarks/test_448584.js
+++ b/toolkit/components/places/tests/bookmarks/test_448584.js
@@ -5,18 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 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
 */
 
--- a/toolkit/components/places/tests/bookmarks/test_458683.js
+++ b/toolkit/components/places/tests/bookmarks/test_458683.js
@@ -5,18 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 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_818593-store-backup-metadata.js
+++ b/toolkit/components/places/tests/bookmarks/test_818593-store-backup-metadata.js
@@ -5,18 +5,17 @@
 /**
  * To confirm that metadata i.e. bookmark count is set and retrieved for
  * automatic backups.
  */
 function run_test() {
   run_next_test();
 }
 
-add_task(function* test_saveBookmarksToJSONFile_and_create()
-{
+add_task(function* test_saveBookmarksToJSONFile_and_create() {
   // Add a bookmark
   let uri = NetUtil.newURI("http://getfirefox.com/");
   let bookmarkId =
     PlacesUtils.bookmarks.insertBookmark(
       PlacesUtils.unfiledBookmarksFolderId, uri,
       PlacesUtils.bookmarks.DEFAULT_INDEX, "Get Firefox!");
 
   // Test saveBookmarksToJSONFile()
--- a/toolkit/components/places/tests/bookmarks/test_async_observers.js
+++ b/toolkit/components/places/tests/bookmarks/test_async_observers.js
@@ -13,72 +13,66 @@ var observer = {
   deferred: null,
 
   /**
    * Returns a promise that is resolved when the observer determines that the
    * test can continue.  This is required rather than calling run_next_test
    * directly in the observer because there are cases where we must wait for
    * other asynchronous events to be completed in addition to this.
    */
-  setupCompletionPromise()
-  {
+  setupCompletionPromise() {
     this.observedBookmarks = 0;
     this.deferred = Promise.defer();
     return this.deferred.promise;
   },
 
   onBeginUpdateBatch() {},
   onEndUpdateBatch() {},
   onItemAdded() {},
   onItemRemoved() {},
   onItemMoved() {},
   onItemChanged(aItemId, aProperty, aIsAnnotation, aNewValue,
-                          aLastModified, aItemType)
-  {
+                          aLastModified, aItemType) {
     do_print("Check that we got the correct change information.");
     do_check_neq(this.bookmarks.indexOf(aItemId), -1);
     if (aProperty == "favicon") {
       do_check_false(aIsAnnotation);
       do_check_eq(aNewValue, SMALLPNG_DATA_URI.spec);
       do_check_eq(aLastModified, 0);
       do_check_eq(aItemType, PlacesUtils.bookmarks.TYPE_BOOKMARK);
-    }
-    else if (aProperty == "cleartime") {
+    } else if (aProperty == "cleartime") {
       do_check_false(aIsAnnotation);
       do_check_eq(aNewValue, "");
       do_check_eq(aLastModified, 0);
       do_check_eq(aItemType, PlacesUtils.bookmarks.TYPE_BOOKMARK);
-    }
-    else {
+    } else {
       do_throw("Unexpected property change " + aProperty);
     }
 
     if (++this.observedBookmarks == this.bookmarks.length) {
       this.deferred.resolve();
     }
   },
-  onItemVisited(aItemId, aVisitId, aTime)
-  {
+  onItemVisited(aItemId, aVisitId, aTime) {
     do_print("Check that we got the correct visit information.");
     do_check_neq(this.bookmarks.indexOf(aItemId), -1);
     this.observedVisitId = aVisitId;
     do_check_eq(aTime, NOW);
     if (++this.observedBookmarks == this.bookmarks.length) {
       this.deferred.resolve();
     }
   },
 
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsINavBookmarkObserver,
   ])
 };
 PlacesUtils.bookmarks.addObserver(observer, false);
 
-add_task(function* test_add_visit()
-{
+add_task(function* test_add_visit() {
   let observerPromise = observer.setupCompletionPromise();
 
   // Add a visit to the bookmark and wait for the observer.
   let visitId;
   let deferUpdatePlaces = Promise.defer();
   PlacesUtils.asyncHistory.updatePlaces({
     uri: NetUtil.newURI("http://book.ma.rk/"),
     visits: [{ transitionType: TRANSITION_TYPED, visitDate: NOW }]
@@ -97,41 +91,37 @@ add_task(function* test_add_visit()
   // Wait for both the observer and the asynchronous update, in any order.
   yield deferUpdatePlaces.promise;
   yield observerPromise;
 
   // Check that both asynchronous results are consistent.
   do_check_eq(observer.observedVisitId, visitId);
 });
 
-add_task(function* test_add_icon()
-{
+add_task(function* test_add_icon() {
   let observerPromise = observer.setupCompletionPromise();
   PlacesUtils.favicons.setAndFetchFaviconForPage(NetUtil.newURI("http://book.ma.rk/"),
                                                  SMALLPNG_DATA_URI, true,
                                                  PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
                                                  null,
                                                  Services.scriptSecurityManager.getSystemPrincipal());
   yield observerPromise;
 });
 
-add_task(function* test_remove_page()
-{
+add_task(function* test_remove_page() {
   let observerPromise = observer.setupCompletionPromise();
   PlacesUtils.history.removePage(NetUtil.newURI("http://book.ma.rk/"));
   yield observerPromise;
 });
 
-add_task(function cleanup()
-{
+add_task(function cleanup() {
   PlacesUtils.bookmarks.removeObserver(observer, false);
 });
 
-add_task(function* shutdown()
-{
+add_task(function* shutdown() {
   // Check that async observers don't try to create async statements after
   // shutdown.  That would cause assertions, since the async thread is gone
   // already.  Note that in such a case the notifications are not fired, so we
   // cannot test for them.
   // Put an history notification that triggers AsyncGetBookmarksForURI between
   // asyncClose() and the actual connection closing.  Enqueuing a main-thread
   // event just after places-will-close-connection should ensure it runs before
   // places-connection-closed.
@@ -152,18 +142,17 @@ add_task(function* shutdown()
       deferred.resolve(promiseTopicObserved("places-connection-closed"));
     }, Ci.nsIThread.DISPATCH_NORMAL);
   }, "places-will-close-connection", false);
   shutdownPlaces();
 
   yield deferred.promise;
 });
 
-function run_test()
-{
+function run_test() {
   // Add multiple bookmarks to the same uri.
   observer.bookmarks.push(
     PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                                          NetUtil.newURI("http://book.ma.rk/"),
                                          PlacesUtils.bookmarks.DEFAULT_INDEX,
                                          "Bookmark")
   );
   observer.bookmarks.push(
--- a/toolkit/components/places/tests/bookmarks/test_bmindex.js
+++ b/toolkit/components/places/tests/bookmarks/test_bmindex.js
@@ -37,51 +37,48 @@ function run_test() {
     let randIndex = Math.round(MIN_RAND + (Math.random() * (MAX_RAND - MIN_RAND)));
     try {
       let id = bs.insertBookmark(bs.unfiledBookmarksFolder,
                                  uri("http://" + i + ".mozilla.org/"),
                                  randIndex, "Test bookmark " + i);
       if (randIndex < -1)
         do_throw("Creating a bookmark at an invalid index should throw");
       bookmarks.push(id);
-    }
-    catch (ex) {
+    } catch (ex) {
       if (randIndex >= -1)
         do_throw("Creating a bookmark at a valid index should not throw");
     }
   }
   check_contiguous_indexes(bookmarks);
 
   // Insert separators with random indexes.
   for (let i = 0; bookmarks.length < NUM_BOOKMARKS + NUM_SEPARATORS; i++) {
     let randIndex = Math.round(MIN_RAND + (Math.random() * (MAX_RAND - MIN_RAND)));
     try {
       let id = bs.insertSeparator(bs.unfiledBookmarksFolder, randIndex);
       if (randIndex < -1)
         do_throw("Creating a separator at an invalid index should throw");
       bookmarks.push(id);
-    }
-    catch (ex) {
+    } catch (ex) {
       if (randIndex >= -1)
         do_throw("Creating a separator at a valid index should not throw");
     }
   }
   check_contiguous_indexes(bookmarks);
 
   // Insert folders with random indexes.
   for (let i = 0; bookmarks.length < NUM_ITEMS; i++) {
     let randIndex = Math.round(MIN_RAND + (Math.random() * (MAX_RAND - MIN_RAND)));
     try {
       let id = bs.createFolder(bs.unfiledBookmarksFolder,
                                "Test folder " + i, randIndex);
       if (randIndex < -1)
         do_throw("Creating a folder at an invalid index should throw");
       bookmarks.push(id);
-    }
-    catch (ex) {
+    } catch (ex) {
       if (randIndex >= -1)
         do_throw("Creating a folder at a valid index should not throw");
     }
   }
   check_contiguous_indexes(bookmarks);
 
   // Execute some random bookmark delete.
   for (let i = 0; i < Math.ceil(NUM_ITEMS / 4); i++) {
@@ -97,18 +94,17 @@ function run_test() {
     let randIndex = Math.floor(Math.random() * bookmarks.length);
     let id = bookmarks[randIndex];
     let newIndex = Math.round(MIN_RAND + (Math.random() * (MAX_RAND - MIN_RAND)));
     dump("Moving item with id " + id + " to index " + newIndex + "\n");
     try {
       bs.moveItem(id, bs.unfiledBookmarksFolder, newIndex);
       if (newIndex < -1)
         do_throw("Moving an item to a negative index should throw\n");
-    }
-    catch (ex) {
+    } catch (ex) {
       if (newIndex >= -1)
         do_throw("Moving an item to a valid index should not throw\n");
     }
 
   }
   check_contiguous_indexes(bookmarks);
 
   // Ensure setItemIndex throws if we pass it a negative index.
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks.js
+++ b/toolkit/components/places/tests/bookmarks/test_bookmarks.js
@@ -381,24 +381,22 @@ add_task(function* test_bookmarks() {
     do_check_true(cc > 0);
     for (let i = 0; i < cc; ++i) {
       let node = rootNode.getChild(i);
       if (node.type == node.RESULT_TYPE_FOLDER ||
           node.type == node.RESULT_TYPE_URI ||
           node.type == node.RESULT_TYPE_SEPARATOR ||
           node.type == node.RESULT_TYPE_QUERY) {
         do_check_true(node.itemId > 0);
-      }
-      else {
+      } 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");
@@ -415,18 +413,17 @@ add_task(function* test_bookmarks() {
     let result = hs.executeQuery(query, options);
     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
@@ -508,18 +505,17 @@ add_task(function* test_bookmarks() {
     let rootNode = result.root;
     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 {
     options = hs.getNewQueryOptions();
     options.excludeQueries = 1;
@@ -535,18 +531,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 {
     options = hs.getNewQueryOptions();
     query = hs.getNewQuery();
@@ -564,18 +559,17 @@ add_task(function* test_bookmarks() {
         do_check_true(node.dateAdded > 0);
 
         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);
--- a/toolkit/components/places/tests/bookmarks/test_changeBookmarkURI.js
+++ b/toolkit/components/places/tests/bookmarks/test_changeBookmarkURI.js
@@ -14,18 +14,17 @@ var bmsvc = Cc["@mozilla.org/browser/nav
  *
  * @param aBookmarkId
  *        an item ID whose corresponding URI is aBookmarkedUri
  * @param aBookmarkedUri
  *        a bookmarked URI that has a corresponding item ID aBookmarkId
  * @param aUnbookmarkedUri
  *        a URI that is not currently bookmarked at all
  */
-function checkUris(aBookmarkId, aBookmarkedUri, aUnbookmarkedUri)
-{
+function checkUris(aBookmarkId, aBookmarkedUri, aUnbookmarkedUri) {
   // Ensure that aBookmarkedUri equals some URI that is bookmarked
   var uri = bmsvc.getBookmarkedURIFor(aBookmarkedUri);
   do_check_neq(uri, null);
   do_check_true(uri.equals(aBookmarkedUri));
 
   // Ensure that aBookmarkedUri is considered bookmarked
   do_check_true(bmsvc.isBookmarked(aBookmarkedUri));
 
--- a/toolkit/components/places/tests/bookmarks/test_nsINavBookmarkObserver.js
+++ b/toolkit/components/places/tests/bookmarks/test_nsINavBookmarkObserver.js
@@ -628,13 +628,12 @@ add_task(function* onItemRemoved_folder_
   PlacesUtils.bookmarks.insertBookmark(folder2,
                                        uri, PlacesUtils.bookmarks.DEFAULT_INDEX,
                                        BMTITLE);
 
   PlacesUtils.bookmarks.removeItem(folder);
   yield promise;
 });
 
-add_task(function cleanup()
-{
+add_task(function cleanup() {
   PlacesUtils.bookmarks.removeObserver(gBookmarksObserver);
   PlacesUtils.bookmarks.removeObserver(gBookmarkSkipObserver);
 });
--- a/toolkit/components/places/tests/bookmarks/test_protectRoots.js
+++ b/toolkit/components/places/tests/bookmarks/test_protectRoots.js
@@ -1,13 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-function run_test()
-{
+function run_test() {
   const ROOTS = [
     PlacesUtils.bookmarksMenuFolderId,
     PlacesUtils.toolbarFolderId,
     PlacesUtils.unfiledBookmarksFolderId,
     PlacesUtils.tagsFolderId,
     PlacesUtils.placesRootId,
     PlacesUtils.mobileFolderId,
   ];
--- a/toolkit/components/places/tests/bookmarks/test_savedsearches.js
+++ b/toolkit/components/places/tests/bookmarks/test_savedsearches.js
@@ -50,18 +50,17 @@ add_test(function test_savedsearches_boo
       let node = rootNode.getChild(i);
       // 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();
@@ -107,18 +106,17 @@ add_test(function test_savedsearches_boo
       do_check_eq(node.childCount, 1);
       // 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();
 });
@@ -197,13 +195,12 @@ add_task(function* test_savedsearches_hi
     PlacesUtils.bookmarks.removeItem(searchId);
     try {
       tmpFolderNode = root.getChild(1);
       do_throw("query was not removed");
     } 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_bug399606.js
+++ b/toolkit/components/places/tests/browser/browser_bug399606.js
@@ -63,15 +63,14 @@ function test() {
   }
 
   function check_next_uri() {
     if (URIs.length) {
       let uri = URIs.shift();
       loadCount = 0;
       gBrowser.addEventListener("DOMContentLoaded", handleLoad, true);
       gBrowser.loadURI(uri);
-    }
-    else {
+    } else {
       confirm_results();
     }
   }
   executeSoon(check_next_uri);
 }
--- a/toolkit/components/places/tests/browser/browser_settitle.js
+++ b/toolkit/components/places/tests/browser/browser_settitle.js
@@ -1,29 +1,26 @@
 var conn = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase).DBConnection;
 
 /**
  * Gets a single column value from either the places or historyvisits table.
  */
-function getColumn(table, column, url)
-{
+function getColumn(table, column, url) {
   var stmt = conn.createStatement(
     `SELECT ${column} FROM ${table} WHERE url_hash = hash(:val) AND url = :val`);
   try {
     stmt.params.val = url;
     stmt.executeStep();
     return stmt.row[column];
-  }
-  finally {
+  } finally {
     stmt.finalize();
   }
 }
 
-add_task(function* ()
-{
+add_task(function* () {
   // Make sure titles are correctly saved for a URI with the proper
   // notifications.
 
   // Create and add history observer.
   let titleChangedPromise = new Promise(resolve => {
     var historyObserver = {
       data: [],
       onBeginUpdateBatch() {},
--- a/toolkit/components/places/tests/browser/browser_visituri.js
+++ b/toolkit/components/places/tests/browser/browser_visituri.js
@@ -23,18 +23,17 @@ function getColumn(table, column, fromCo
              WHERE ${fromColumnName} = :val
              ${fromColumnName == "url" ? "AND url_hash = hash(:val)" : ""}
              LIMIT 1`;
   let stmt = conn.createStatement(sql);
   try {
     stmt.params.val = fromColumnValue;
     ok(stmt.executeStep(), "Expect to get a row");
     return stmt.row[column];
-  }
-  finally {
+  } finally {
     stmt.reset();
   }
 }
 
 add_task(function* () {
   // Make sure places visit chains are saved correctly with a redirect
   // transitions.
 
@@ -53,18 +52,17 @@ add_task(function* () {
     var expected = expectedUrls[currentIndex];
     is(uri.spec, expected, "Saved URL visit " + uri.spec);
 
     var placeId = getColumn("moz_places", "id", "url", uri.spec);
     var fromVisitId = getColumn("moz_historyvisits", "from_visit", "place_id", placeId);
 
     if (currentIndex == 0) {
       is(fromVisitId, 0, "First visit has no from visit");
-    }
-    else {
+    } else {
       var lastVisitId = getColumn("moz_historyvisits", "place_id", "id", fromVisitId);
       var fromVisitUrl = getColumn("moz_places", "url", "id", lastVisitId);
       is(fromVisitUrl, expectedUrls[currentIndex - 1],
          "From visit was " + expectedUrls[currentIndex - 1]);
     }
 
     currentIndex++;
     return (currentIndex >= expectedUrls.length);
--- a/toolkit/components/places/tests/browser/browser_visituri_nohistory.js
+++ b/toolkit/components/places/tests/browser/browser_visituri_nohistory.js
@@ -4,28 +4,26 @@
  */
 
 const INITIAL_URL = "http://example.com/tests/toolkit/components/places/tests/browser/begin.html";
 const FINAL_URL = "http://example.com/tests/toolkit/components/places/tests/browser/final.html";
 
 /**
  * One-time observer callback.
  */
-function promiseObserve(name)
-{
+function promiseObserve(name) {
   return new Promise(resolve => {
     Services.obs.addObserver(function observer(subject) {
       Services.obs.removeObserver(observer, name);
       resolve(subject);
     }, name, false);
   });
 }
 
-add_task(function* ()
-{
+add_task(function* () {
   yield SpecialPowers.pushPrefEnv({"set": [["places.history.enabled", false]]});
 
   let visitUriPromise = promiseObserve("uri-visit-saved");
 
   yield BrowserTestUtils.openNewForegroundTab(gBrowser, INITIAL_URL);
 
   yield SpecialPowers.popPrefEnv();
 
--- a/toolkit/components/places/tests/browser/head.js
+++ b/toolkit/components/places/tests/browser/head.js
@@ -18,18 +18,17 @@ const TRANSITION_DOWNLOAD = PlacesUtils.
 /**
  * Returns a moz_places field value for a url.
  *
  * @param aURI
  *        The URI or spec to get field for.
  * param aCallback
  *        Callback function that will get the property value.
  */
-function fieldForUrl(aURI, aFieldName, aCallback)
-{
+function fieldForUrl(aURI, aFieldName, aCallback) {
   let url = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
   let stmt = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                                 .DBConnection.createAsyncStatement(
     `SELECT ${aFieldName} FROM moz_places WHERE url_hash = hash(:page_url) AND url = :page_url`
   );
   stmt.params.page_url = url;
   stmt.executeAsync({
     _value: -1,
@@ -123,18 +122,17 @@ function waitForFaviconChanged(aExpected
  *        Function to be invoked on completion.
  * @param [optional] aStack
  *        The stack frame used to report errors.
  */
 function addVisits(aPlaceInfo, aWindow, aCallback, aStack) {
   let places = [];
   if (aPlaceInfo instanceof Ci.nsIURI) {
     places.push({ uri: aPlaceInfo });
-  }
-  else if (Array.isArray(aPlaceInfo)) {
+  } else if (Array.isArray(aPlaceInfo)) {
     places = places.concat(aPlaceInfo);
   } else {
     places.push(aPlaceInfo)
   }
 
   // Create mozIVisitInfo for each entry.
   let now = Date.now();
   for (let place of places) {
--- a/toolkit/components/places/tests/expiration/head_expiration.js
+++ b/toolkit/components/places/tests/expiration/head_expiration.js
@@ -18,18 +18,17 @@ Cu.import("resource://gre/modules/Servic
   let uri = Services.io.newFileURI(commonFile);
   Services.scriptloader.loadSubScript(uri.spec, this);
 }
 
 // Put any other stuff relative to this test folder below.
 
 
 // Simulates an expiration at shutdown.
-function shutdownExpiration()
-{
+function shutdownExpiration() {
   let expire = Cc["@mozilla.org/places/expiration;1"].getService(Ci.nsIObserver);
   expire.observe(null, "places-will-close-connection", null);
 }
 
 
 /**
  * Causes expiration component to start, otherwise it would wait for the first
  * history notification.
@@ -68,46 +67,43 @@ function setInterval(aNewInterval) {
   Services.prefs.setIntPref("places.history.expiration.interval_seconds", aNewInterval);
 }
 function getInterval() {
   return Services.prefs.getIntPref("places.history.expiration.interval_seconds");
 }
 function clearInterval() {
   try {
     Services.prefs.clearUserPref("places.history.expiration.interval_seconds");
-  }
-  catch (ex) {}
+  } catch (ex) {}
 }
 
 
 function setMaxPages(aNewMaxPages) {
   Services.prefs.setIntPref("places.history.expiration.max_pages", aNewMaxPages);
 }
 function getMaxPages() {
   return Services.prefs.getIntPref("places.history.expiration.max_pages");
 }
 function clearMaxPages() {
   try {
     Services.prefs.clearUserPref("places.history.expiration.max_pages");
-  }
-  catch (ex) {}
+  } catch (ex) {}
 }
 
 
 function setHistoryEnabled(aHistoryEnabled) {
   Services.prefs.setBoolPref("places.history.enabled", aHistoryEnabled);
 }
 function getHistoryEnabled() {
   return Services.prefs.getBoolPref("places.history.enabled");
 }
 function clearHistoryEnabled() {
   try {
     Services.prefs.clearUserPref("places.history.enabled");
-  }
-  catch (ex) {}
+  } catch (ex) {}
 }
 
 /**
  * Returns a PRTime in the past usable to add expirable visits.
  *
  * param [optional] daysAgo
  *       Expiration ignores any visit added in the last 7 days, so by default
  *       this will be set to 7.
--- a/toolkit/components/places/tests/expiration/test_analyze_runs.js
+++ b/toolkit/components/places/tests/expiration/test_analyze_runs.js
@@ -30,22 +30,20 @@ function do_check_analyze_ran(aTableName
   let db = DBConn();
   do_check_true(db.tableExists("sqlite_stat1"));
   let stmt = db.createStatement("SELECT idx FROM sqlite_stat1 WHERE tbl = :table");
   stmt.params.table = aTableName;
   try {
     if (aRan) {
       do_check_true(stmt.executeStep());
       do_check_neq(stmt.row.idx, null);
-    }
-    else {
+    } else {
       do_check_false(stmt.executeStep());
     }
-  }
-  finally {
+  } finally {
     stmt.finalize();
   }
 }
 
 // Tests
 
 function run_test() {
   run_next_test();
--- a/toolkit/components/places/tests/expiration/test_annos_expire_policy.js
+++ b/toolkit/components/places/tests/expiration/test_annos_expire_policy.js
@@ -39,39 +39,36 @@ function add_old_anno(aIdentifier, aName
   if (typeof(aIdentifier) == "number") {
     // Item annotation.
     as.setItemAnnotation(aIdentifier, aName, aValue, 0, aExpirePolicy);
     // Update dateAdded for the last added annotation.
     sql = "UPDATE moz_items_annos SET dateAdded = :expire_date, lastModified = :last_modified " +
           "WHERE id = (SELECT id FROM moz_items_annos " +
                       "WHERE item_id = :id " +
                       "ORDER BY dateAdded DESC LIMIT 1)";
-  }
-  else if (aIdentifier instanceof Ci.nsIURI) {
+  } else if (aIdentifier instanceof Ci.nsIURI) {
     // Page annotation.
     as.setPageAnnotation(aIdentifier, aName, aValue, 0, aExpirePolicy);
     // Update dateAdded for the last added annotation.
     sql = "UPDATE moz_annos SET dateAdded = :expire_date, lastModified = :last_modified " +
           "WHERE id = (SELECT a.id FROM moz_annos a " +
                       "LEFT JOIN moz_places h on h.id = a.place_id " +
                       "WHERE h.url_hash = hash(:id) AND h.url = :id " +
                       "ORDER BY a.dateAdded DESC LIMIT 1)";
-  }
-  else
+  } else
     do_throw("Wrong identifier type");
 
   let stmt = DBConn().createStatement(sql);
   stmt.params.id = (typeof(aIdentifier) == "number") ? aIdentifier
                                                      : aIdentifier.spec;
   stmt.params.expire_date = expireDate;
   stmt.params.last_modified = lastModifiedDate;
   try {
     stmt.executeStep();
-  }
-  finally {
+  } finally {
     stmt.finalize();
   }
 }
 
 function run_test() {
   run_next_test();
 }
 
--- a/toolkit/components/places/tests/expiration/test_clearHistory.js
+++ b/toolkit/components/places/tests/expiration/test_clearHistory.js
@@ -40,44 +40,41 @@ function add_old_anno(aIdentifier, aName
     sql = "UPDATE moz_items_annos SET dateAdded = :expire_date, lastModified = :last_modified " +
           "WHERE id = ( " +
             "SELECT a.id FROM moz_items_annos a " +
             "JOIN moz_anno_attributes n ON n.id = a.anno_attribute_id " +
             "WHERE a.item_id = :id " +
               "AND n.name = :anno_name " +
             "ORDER BY a.dateAdded DESC LIMIT 1 " +
           ")";
-  }
-  else if (aIdentifier instanceof Ci.nsIURI) {
+  } else if (aIdentifier instanceof Ci.nsIURI) {
     // Page annotation.
     as.setPageAnnotation(aIdentifier, aName, aValue, 0, aExpirePolicy);
     // Update dateAdded for the last added annotation.
     sql = "UPDATE moz_annos SET dateAdded = :expire_date, lastModified = :last_modified " +
           "WHERE id = ( " +
             "SELECT a.id FROM moz_annos a " +
             "JOIN moz_anno_attributes n ON n.id = a.anno_attribute_id " +
             "JOIN moz_places h on h.id = a.place_id " +
             "WHERE h.url_hash = hash(:id) AND h.url = :id " +
             "AND n.name = :anno_name " +
             "ORDER BY a.dateAdded DESC LIMIT 1 " +
           ")";
-  }
-  else
+  } else
     do_throw("Wrong identifier type");
 
   let stmt = DBConn().createStatement(sql);
   stmt.params.id = (typeof(aIdentifier) == "number") ? aIdentifier
                                                      : aIdentifier.spec;
   stmt.params.expire_date = expireDate;
   stmt.params.last_modified = lastModifiedDate;
   stmt.params.anno_name = aName;
   try {
     stmt.executeStep();
-  }
-  finally {
+  } finally {
     stmt.finalize();
   }
 }
 
 function run_test() {
   run_next_test();
 }
 
--- a/toolkit/components/places/tests/expiration/test_debug_expiration.js
+++ b/toolkit/components/places/tests/expiration/test_debug_expiration.js
@@ -5,18 +5,17 @@
  * What this is aimed to test:
  *
  * Expiration can be manually triggered through a debug topic, but that should
  * only expire orphan entries, unless -1 is passed as limit.
  */
 
 var gNow = getExpirablePRTime(60);
 
-add_task(function* test_expire_orphans()
-{
+add_task(function* test_expire_orphans() {
   // Add visits to 2 pages and force a orphan expiration. Visits should survive.
   yield PlacesTestUtils.addVisits({
     uri: uri("http://page1.mozilla.org/"),
     visitDate: gNow++
   });
   yield PlacesTestUtils.addVisits({
     uri: uri("http://page2.mozilla.org/"),
     visitDate: gNow++
@@ -36,18 +35,17 @@ add_task(function* test_expire_orphans()
   do_check_eq(visits_in_database("http://page1.mozilla.org/"), 1);
   do_check_eq(visits_in_database("http://page2.mozilla.org/"), 1);
   do_check_false(page_in_database("http://page3.mozilla.org/"));
 
   // Clean up.
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* test_expire_orphans_optionalarg()
-{
+add_task(function* test_expire_orphans_optionalarg() {
   // Add visits to 2 pages and force a orphan expiration. Visits should survive.
   yield PlacesTestUtils.addVisits({
     uri: uri("http://page1.mozilla.org/"),
     visitDate: gNow++
   });
   yield PlacesTestUtils.addVisits({
     uri: uri("http://page2.mozilla.org/"),
     visitDate: gNow++
@@ -67,18 +65,17 @@ add_task(function* test_expire_orphans_o
   do_check_eq(visits_in_database("http://page1.mozilla.org/"), 1);
   do_check_eq(visits_in_database("http://page2.mozilla.org/"), 1);
   do_check_false(page_in_database("http://page3.mozilla.org/"));
 
   // Clean up.
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* test_expire_limited()
-{
+add_task(function* test_expire_limited() {
   yield PlacesTestUtils.addVisits([
     { // Should be expired cause it's the oldest visit
       uri: "http://old.mozilla.org/",
       visitDate: gNow++
     },
     { // Should not be expired cause we limit 1
       uri: "http://new.mozilla.org/",
       visitDate: gNow++
@@ -92,18 +89,17 @@ add_task(function* test_expire_limited()
   do_check_eq(visits_in_database("http://new.mozilla.org/"), 1);
   // Other visits should have been expired.
   do_check_false(page_in_database("http://old.mozilla.org/"));
 
   // Clean up.
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* test_expire_limited_longurl()
-{
+add_task(function* test_expire_limited_longurl() {
   let longurl = "http://long.mozilla.org/" + "a".repeat(232);
   yield PlacesTestUtils.addVisits([
     { // Should be expired cause it's the oldest visit
       uri: "http://old.mozilla.org/",
       visitDate: gNow++
     },
     { // Should be expired cause it's a long url older than 60 days.
       uri: longurl,
@@ -121,18 +117,17 @@ add_task(function* test_expire_limited_l
   do_check_eq(visits_in_database(longurl), 1);
   // Other visits should have been expired.
   do_check_false(page_in_database("http://old.mozilla.org/"));
 
   // Clean up.
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* test_expire_limited_exoticurl()
-{
+add_task(function* test_expire_limited_exoticurl() {
   yield PlacesTestUtils.addVisits([
     { // Should be expired cause it's the oldest visit
       uri: "http://old.mozilla.org/",
       visitDate: gNow++
     },
     { // Should be expired cause it's a long url older than 60 days.
       uri: "http://download.mozilla.org",
       visitDate: gNow++,
@@ -155,18 +150,17 @@ add_task(function* test_expire_limited_e
   do_check_eq(visits_in_database("http://download.mozilla.org/"), 0);
   // Other visits should have been expired.
   do_check_false(page_in_database("http://old.mozilla.org/"));
 
   // Clean up.
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* test_expire_unlimited()
-{
+add_task(function* test_expire_unlimited() {
   let longurl = "http://long.mozilla.org/" + "a".repeat(232);
   yield PlacesTestUtils.addVisits([
     {
       uri: "http://old.mozilla.org/",
       visitDate: gNow++
     },
     {
       uri: "http://new.mozilla.org/",
@@ -209,17 +203,16 @@ add_task(function* test_expire_unlimited
   do_check_false(page_in_database("http://old.mozilla.org/"));
   do_check_false(page_in_database("http://download.mozilla.org/"));
   do_check_false(page_in_database("http://new.mozilla.org/"));
 
   // Clean up.
   yield PlacesTestUtils.clearHistory();
 });
 
-function run_test()
-{
+function run_test() {
   // Set interval to a large value so we don't expire on it.
   setInterval(3600); // 1h
   // Set maxPages to a low value, so it's easy to go over it.
   setMaxPages(1);
 
   run_next_test();
 }
--- a/toolkit/components/places/tests/expiration/test_outdated_analyze.js
+++ b/toolkit/components/places/tests/expiration/test_outdated_analyze.js
@@ -46,18 +46,18 @@ function run_test() {
 
   Services.obs.addObserver(function observeExpiration(aSubject, aTopic, aData) {
     Services.obs.removeObserver(observeExpiration,
                                 PlacesUtils.TOPIC_EXPIRATION_FINISHED);
 
     // Check that statistica are up-to-date.
     let stmt = DBConn().createAsyncStatement(
       "SELECT (SELECT COUNT(*) FROM moz_places) - "
-      +        "(SELECT SUBSTR(stat,1,LENGTH(stat)-2) FROM sqlite_stat1 "
-      +         "WHERE idx = 'moz_places_url_hashindex')"
+      + "(SELECT SUBSTR(stat,1,LENGTH(stat)-2) FROM sqlite_stat1 "
+      + "WHERE idx = 'moz_places_url_hashindex')"
     );
     stmt.executeAsync({
       handleResult(aResultSet) {
         let row = aResultSet.getNextRow();
         this._difference = row.getResultByIndex(0);
       },
       handleError(aError) {
         do_throw("Unexpected error (" + aError.result + "): " + aError.message);
--- a/toolkit/components/places/tests/expiration/test_pref_maxpages.js
+++ b/toolkit/components/places/tests/expiration/test_pref_maxpages.js
@@ -64,18 +64,17 @@ function run_test() {
   run_next_test();
 }
 
 add_task(function* test_pref_maxpages() {
   // The pref should not exist by default.
   try {
     getMaxPages();
     do_throw("interval pref should not exist by default");
-  }
-  catch (ex) {}
+  } catch (ex) {}
 
   // Set interval to a large value so we don't expire on it.
   setInterval(3600); // 1h
 
   for (let testIndex = 1; testIndex <= tests.length; testIndex++) {
     let currentTest = tests[testIndex - 1];
     print("\nTEST " + testIndex + ": " + currentTest.desc);
     currentTest.receivedNotifications = 0;
--- a/toolkit/components/places/tests/favicons/test_getFaviconDataForPage.js
+++ b/toolkit/components/places/tests/favicons/test_getFaviconDataForPage.js
@@ -8,25 +8,23 @@
 // Globals
 
 const FAVICON_URI = NetUtil.newURI(do_get_file("favicon-normal32.png"));
 const FAVICON_DATA = readFileData(do_get_file("favicon-normal32.png"));
 const FAVICON_MIMETYPE = "image/png";
 
 // Tests
 
-function run_test()
-{
+function run_test() {
   // Check that the favicon loaded correctly before starting the actual tests.
   do_check_eq(FAVICON_DATA.length, 344);
   run_next_test();
 }
 
-add_test(function test_normal()
-{
+add_test(function test_normal() {
   let pageURI = NetUtil.newURI("http://example.com/normal");
 
   PlacesTestUtils.addVisits(pageURI).then(function() {
     PlacesUtils.favicons.setAndFetchFaviconForPage(
       pageURI, FAVICON_URI, true,
         PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
         function() {
         PlacesUtils.favicons.getFaviconDataForPage(pageURI,
@@ -36,18 +34,17 @@ add_test(function test_normal()
             do_check_true(compareArrays(FAVICON_DATA, aData));
             do_check_eq(FAVICON_MIMETYPE, aMimeType);
             run_next_test();
           });
       }, Services.scriptSecurityManager.getSystemPrincipal());
   });
 });
 
-add_test(function test_missing()
-{
+add_test(function test_missing() {
   let pageURI = NetUtil.newURI("http://example.com/missing");
 
   PlacesUtils.favicons.getFaviconDataForPage(pageURI,
     function(aURI, aDataLen, aData, aMimeType) {
       // Check also the expected data types.
       do_check_true(aURI === null);
       do_check_true(aDataLen === 0);
       do_check_true(aData.length === 0);
--- a/toolkit/components/places/tests/favicons/test_getFaviconURLForPage.js
+++ b/toolkit/components/places/tests/favicons/test_getFaviconURLForPage.js
@@ -2,23 +2,21 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * This file tests getFaviconURLForPage.
  */
 
 // Tests
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_test(function test_normal()
-{
+add_test(function test_normal() {
   let pageURI = NetUtil.newURI("http://example.com/normal");
 
   PlacesTestUtils.addVisits(pageURI).then(function() {
     PlacesUtils.favicons.setAndFetchFaviconForPage(
       pageURI, SMALLPNG_DATA_URI, true,
         PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
         function() {
         PlacesUtils.favicons.getFaviconURLForPage(pageURI,
@@ -30,18 +28,17 @@ add_test(function test_normal()
             do_check_true(aData.length === 0);
             do_check_true(aMimeType === "");
             run_next_test();
           });
       }, Services.scriptSecurityManager.getSystemPrincipal());
   });
 });
 
-add_test(function test_missing()
-{
+add_test(function test_missing() {
   let pageURI = NetUtil.newURI("http://example.com/missing");
 
   PlacesUtils.favicons.getFaviconURLForPage(pageURI,
     function(aURI, aDataLen, aData, aMimeType) {
       // Check also the expected data types.
       do_check_true(aURI === null);
       do_check_true(aDataLen === 0);
       do_check_true(aData.length === 0);
--- a/toolkit/components/places/tests/favicons/test_moz-anno_favicon_mime_type.js
+++ b/toolkit/components/places/tests/favicons/test_moz-anno_favicon_mime_type.js
@@ -12,49 +12,44 @@
 // Constants
 Cu.import("resource://gre/modules/NetUtil.jsm");
 
 const testFaviconData = "data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%04gAMA%00%00%AF%C87%05%8A%E9%00%00%00%19tEXtSoftware%00Adobe%20ImageReadyq%C9e%3C%00%00%01%D6IDATx%DAb%FC%FF%FF%3F%03%25%00%20%80%98%909%EF%DF%BFg%EF%EC%EC%FC%AD%AC%AC%FC%DF%95%91%F1%BF%89%89%C9%7F%20%FF%D7%EA%D5%AB%B7%DF%BBwO%16%9B%01%00%01%C4%00r%01%08%9F9s%C6%CD%D8%D8%F8%BF%0B%03%C3%FF3%40%BC%0A%88%EF%02q%1A%10%BB%40%F1%AAU%ABv%C1%D4%C30%40%00%81%89%993g%3E%06%1A%F6%3F%14%AA%11D%97%03%F1%7Fc%08%0D%E2%2B))%FD%17%04%89%A1%19%00%10%40%0C%D00%F8%0F3%00%C8%F8%BF%1B%E4%0Ac%88a%E5%60%17%19%FF%0F%0D%0D%05%1B%02v%D9%DD%BB%0A0%03%00%02%08%AC%B9%A3%A3%E3%17%03%D4v%90%01%EF%18%106%C3%0Cz%07%C5%BB%A1%DE%82y%07%20%80%A0%A6%08B%FCn%0C1%60%26%D4%20d%C3VA%C3%06%26%BE%0A%EA-%80%00%82%B9%E0%F7L4%0D%EF%90%F8%C6%60%2F%0A%82%BD%01%13%07%0700%D0%01%02%88%11%E4%02P%B41%DC%BB%C7%D0%014%0D%E8l%06W%20%06%BA%88%A1%1C%1AS%15%40%7C%16%CA6.%2Fgx%BFg%0F%83%CB%D9%B3%0C%7B%80%7C%80%00%02%BB%00%E8%9F%ED%20%1B%3A%A0%A6%9F%81%DA%DC%01%C5%B0%80%ED%80%FA%BF%BC%BC%FC%3F%83%12%90%9D%96%F6%1F%20%80%18%DE%BD%7B%C7%0E%8E%05AD%20%FEGr%A6%A0%A0%E0%7F%25P%80%02%9D%0F%D28%13%18%23%C6%C0%B0%02E%3D%C8%F5%00%01%04%8F%05P%A8%BA%40my%87%E4%12c%A8%8D%20%8B%D0%D3%00%08%03%04%10%9C%01R%E4%82d%3B%C8%A0%99%C6%90%90%C6%A5%19%84%01%02%08%9E%17%80%C9x%F7%7B%A0%DBVC%F9%A0%C0%5C%7D%16%2C%CE%00%F4%C6O%5C%99%09%20%800L%04y%A5%03%1A%95%A0%80%05%05%14.%DBA%18%20%80%18)%CD%CE%00%01%06%00%0C'%94%C7%C0k%C9%2C%00%00%00%00IEND%AEB%60%82";
 const moz_anno_favicon_prefix = "moz-anno:favicon:";
 
 // streamListener
 
-function streamListener(aExpectedContentType)
-{
+function streamListener(aExpectedContentType) {
   this._expectedContentType = aExpectedContentType;
 }
 streamListener.prototype =
 {
-  onStartRequest(aRequest, aContext)
-  {
+  onStartRequest(aRequest, aContext) {
     // We have other tests that make sure the data is what we expect.  We just
     // need to check the content type here.
     let channel = aRequest.QueryInterface(Ci.nsIChannel);
     dump("*** Checking " + channel.URI.spec + "\n");
     do_check_eq(channel.contentType, this._expectedContentType);
 
     // If we somehow throw before doing the above check, the test will pass, so
     // we do this for extra sanity.
     this._checked = true;
   },
-  onStopRequest()
-  {
+  onStopRequest() {
     do_check_true(this._checked);
     do_test_finished();
   },
-  onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount)
-  {
+  onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount) {
     aRequest.cancel(Cr.NS_ERROR_ABORT);
   }
 };
 
 // Test Runner
 
-function run_test()
-{
+function run_test() {
   let fs = Cc["@mozilla.org/browser/favicon-service;1"].
            getService(Ci.nsIFaviconService);
 
   // Test that the default icon has the content type of image/png.
   let channel = NetUtil.newChannel({
     uri: fs.defaultFavicon,
     loadUsingSystemPrincipal: true,
     contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE_FAVICON
--- a/toolkit/components/places/tests/head_common.js
+++ b/toolkit/components/places/tests/head_common.js
@@ -241,18 +241,17 @@ function clearDB() {
 
 
 /**
  * Dumps the rows of a table out to the console.
  *
  * @param aName
  *        The name of the table or view to output.
  */
-function dump_table(aName)
-{
+function dump_table(aName) {
   let stmt = DBConn().createStatement("SELECT * FROM " + aName);
 
   print("\n*** Printing data from " + aName);
   let count = 0;
   while (stmt.executeStep()) {
     let columns = stmt.numEntries;
 
     if (count == 0) {
@@ -290,54 +289,50 @@ function dump_table(aName)
 
 
 /**
  * Checks if an address is found in the database.
  * @param aURI
  *        nsIURI or address to look for.
  * @return place id of the page or 0 if not found
  */
-function page_in_database(aURI)
-{
+function page_in_database(aURI) {
   let url = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
   let stmt = DBConn().createStatement(
     "SELECT id FROM moz_places WHERE url_hash = hash(:url) AND url = :url"
   );
   stmt.params.url = url;
   try {
     if (!stmt.executeStep())
       return 0;
     return stmt.getInt64(0);
-  }
-  finally {
+  } finally {
     stmt.finalize();
   }
 }
 
 /**
  * Checks how many visits exist for a specified page.
  * @param aURI
  *        nsIURI or address to look for.
  * @return number of visits found.
  */
-function visits_in_database(aURI)
-{
+function visits_in_database(aURI) {
   let url = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
   let stmt = DBConn().createStatement(
     `SELECT count(*) FROM moz_historyvisits v
      JOIN moz_places h ON h.id = v.place_id
      WHERE url_hash = hash(:url) AND url = :url`
   );
   stmt.params.url = url;
   try {
     if (!stmt.executeStep())
       return 0;
     return stmt.getInt64(0);
-  }
-  finally {
+  } finally {
     stmt.finalize();
   }
 }
 
 /**
  * Checks that we don't have any bookmark
  */
 function check_no_bookmarks() {
@@ -362,18 +357,17 @@ function check_no_bookmarks() {
  *
  * @param aTopic
  *        Notification topic to observe.
  *
  * @return {Promise}
  * @resolves The array [aSubject, aData] from the observed notification.
  * @rejects Never.
  */
-function promiseTopicObserved(aTopic)
-{
+function promiseTopicObserved(aTopic) {
   return new Promise(resolve => {
     Services.obs.addObserver(function observe(aObsSubject, aObsTopic, aObsData) {
       Services.obs.removeObserver(observe, aObsTopic);
       resolve([aObsSubject, aObsData]);
     }, aTopic, false);
   });
 }
 
@@ -527,18 +521,17 @@ function check_JSON_backup(aIsAutomaticB
 
 /**
  * Returns the frecency of a url.
  *
  * @param aURI
  *        The URI or spec to get frecency for.
  * @return the frecency value.
  */
-function frecencyForUrl(aURI)
-{
+function frecencyForUrl(aURI) {
   let url = aURI;
   if (aURI instanceof Ci.nsIURI) {
     url = aURI.spec;
   } else if (aURI instanceof URL) {
     url = aURI.href;
   }
   let stmt = DBConn().createStatement(
     "SELECT frecency FROM moz_places WHERE url_hash = hash(?1) AND url = ?1"
@@ -556,18 +549,17 @@ function frecencyForUrl(aURI)
 
 /**
  * Returns the hidden status of a url.
  *
  * @param aURI
  *        The URI or spec to get hidden for.
  * @return @return true if the url is hidden, false otherwise.
  */
-function isUrlHidden(aURI)
-{
+function isUrlHidden(aURI) {
   let url = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
   let stmt = DBConn().createStatement(
     "SELECT hidden FROM moz_places WHERE url_hash = hash(?1) AND url = ?1"
   );
   stmt.bindByIndex(0, url);
   if (!stmt.executeStep())
     throw new Error("No result for hidden.");
   let hidden = stmt.getInt32(0);
@@ -596,51 +588,48 @@ function is_time_ordered(before, after) 
 }
 
 /**
  * Shutdowns Places, invoking the callback when the connection has been closed.
  *
  * @param aCallback
  *        Function to be called when done.
  */
-function waitForConnectionClosed(aCallback)
-{
+function waitForConnectionClosed(aCallback) {
   promiseTopicObserved("places-connection-closed").then(aCallback);
   shutdownPlaces();
 }
 
 /**
  * Tests if a given guid is valid for use in Places or not.
  *
  * @param aGuid
  *        The guid to test.
  * @param [optional] aStack
  *        The stack frame used to report the error.
  */
 function do_check_valid_places_guid(aGuid,
-                                    aStack)
-{
+                                    aStack) {
   if (!aStack) {
     aStack = Components.stack.caller;
   }
   do_check_true(/^[a-zA-Z0-9\-_]{12}$/.test(aGuid), aStack);
 }
 
 /**
  * Retrieves the guid for a given uri.
  *
  * @param aURI
  *        The uri to check.
  * @param [optional] aStack
  *        The stack frame used to report the error.
  * @return the associated the guid.
  */
 function do_get_guid_for_uri(aURI,
-                             aStack)
-{
+                             aStack) {
   if (!aStack) {
     aStack = Components.stack.caller;
   }
   let stmt = DBConn().createStatement(
     `SELECT guid
      FROM moz_places
      WHERE url_hash = hash(:url) AND url = :url`
   );
@@ -656,18 +645,17 @@ function do_get_guid_for_uri(aURI,
  * Tests that a guid was set in moz_places for a given uri.
  *
  * @param aURI
  *        The uri to check.
  * @param [optional] aGUID
  *        The expected guid in the database.
  */
 function do_check_guid_for_uri(aURI,
-                               aGUID)
-{
+                               aGUID) {
   let caller = Components.stack.caller;
   let guid = do_get_guid_for_uri(aURI, caller);
   if (aGUID) {
     do_check_valid_places_guid(aGUID, caller);
     do_check_eq(guid, aGUID, caller);
   }
 }
 
@@ -676,18 +664,17 @@ function do_check_guid_for_uri(aURI,
  *
  * @param aId
  *        The bookmark id to check.
  * @param [optional] aStack
  *        The stack frame used to report the error.
  * @return the associated the guid.
  */
 function do_get_guid_for_bookmark(aId,
-                                  aStack)
-{
+                                  aStack) {
   if (!aStack) {
     aStack = Components.stack.caller;
   }
   let stmt = DBConn().createStatement(
     `SELECT guid
      FROM moz_bookmarks
      WHERE id = :item_id`
   );
@@ -703,18 +690,17 @@ function do_get_guid_for_bookmark(aId,
  * Tests that a guid was set in moz_places for a given bookmark.
  *
  * @param aId
  *        The bookmark id to check.
  * @param [optional] aGUID
  *        The expected guid in the database.
  */
 function do_check_guid_for_bookmark(aId,
-                                    aGUID)
-{
+                                    aGUID) {
   let caller = Components.stack.caller;
   let guid = do_get_guid_for_bookmark(aId, caller);
   if (aGUID) {
     do_check_valid_places_guid(aGUID, caller);
     do_check_eq(guid, aGUID, caller);
   }
 }
 
@@ -724,18 +710,17 @@ function do_check_guid_for_bookmark(aId,
  * @param a1
  *        First array to compare.
  * @param a2
  *        Second array to compare.
  * @param [optional] sorted
  *        Whether the comparison should take in count position of the elements.
  * @return true if the arrays contain the same elements, false otherwise.
  */
-function do_compare_arrays(a1, a2, sorted)
-{
+function do_compare_arrays(a1, a2, sorted) {
   if (a1.length != a2.length)
     return false;
 
   if (sorted) {
     return a1.every((e, i) => e == a2[i]);
   }
   return a1.filter(e => !a2.includes(e)).length == 0 &&
          a2.filter(e => !a1.includes(e)).length == 0;
--- a/toolkit/components/places/tests/history/test_insert.js
+++ b/toolkit/components/places/tests/history/test_insert.js
@@ -4,93 +4,93 @@
 // Tests for `History.insert` and `History.insertMany`, as implemented in History.jsm
 
 "use strict";
 
 add_task(function* test_insert_error_cases() {
   const TEST_URL = "http://mozilla.com";
 
   Assert.throws(
-    () =>  PlacesUtils.history.insert(),
+    () => PlacesUtils.history.insert(),
     /TypeError: pageInfo must be an object/,
     "passing a null into History.insert should throw a TypeError"
   );
   Assert.throws(
-    () =>  PlacesUtils.history.insert(1),
+    () => PlacesUtils.history.insert(1),
     /TypeError: pageInfo must be an object/,
     "passing a non object into History.insert should throw a TypeError"
   );
   Assert.throws(
-    () =>  PlacesUtils.history.insert({}),
+    () => PlacesUtils.history.insert({}),
     /TypeError: PageInfo object must have a url property/,
     "passing an object without a url to History.insert should throw a TypeError"
   );
   Assert.throws(
-    () =>  PlacesUtils.history.insert({url: 123}),
+    () => PlacesUtils.history.insert({url: 123}),
     /TypeError: Invalid url or guid: 123/,
     "passing an object with an invalid url to History.insert should throw a TypeError"
   );
   Assert.throws(
-    () =>  PlacesUtils.history.insert({url: TEST_URL}),
+    () => PlacesUtils.history.insert({url: TEST_URL}),
     /TypeError: PageInfo object must have an array of visits/,
     "passing an object without a visits property to History.insert should throw a TypeError"
   );
   Assert.throws(
-    () =>  PlacesUtils.history.insert({url: TEST_URL, visits: 1}),
+    () => PlacesUtils.history.insert({url: TEST_URL, visits: 1}),
     /TypeError: PageInfo object must have an array of visits/,
     "passing an object with a non-array visits property to History.insert should throw a TypeError"
   );
   Assert.throws(
-    () =>  PlacesUtils.history.insert({url: TEST_URL, visits: []}),
+    () => PlacesUtils.history.insert({url: TEST_URL, visits: []}),
     /TypeError: PageInfo object must have an array of visits/,
     "passing an object with an empty array as the visits property to History.insert should throw a TypeError"
   );
   Assert.throws(
-    () =>  PlacesUtils.history.insert({
+    () => PlacesUtils.history.insert({
       url: TEST_URL,
       visits: [
         {
           transition: TRANSITION_LINK,
           date: "a"
         }
       ]}),
     /TypeError: Expected a Date, got a/,
     "passing a visit object with an invalid date to History.insert should throw a TypeError"
   );
   Assert.throws(
-    () =>  PlacesUtils.history.insert({
+    () => PlacesUtils.history.insert({
       url: TEST_URL,
       visits: [
         {
           transition: TRANSITION_LINK
         },
         {
           transition: TRANSITION_LINK,
           date: "a"
         }
       ]}),
     /TypeError: Expected a Date, got a/,
     "passing a second visit object with an invalid date to History.insert should throw a TypeError"
   );
   let futureDate = new Date();
   futureDate.setDate(futureDate.getDate() + 1000);
   Assert.throws(
-    () =>  PlacesUtils.history.insert({
+    () => PlacesUtils.history.insert({
       url: TEST_URL,
       visits: [
         {
           transition: TRANSITION_LINK,
           date: futureDate,
         }
       ]}),
     `TypeError: date: ${futureDate} is not a valid date`,
     "passing a visit object with a future date to History.insert should throw a TypeError"
   );
   Assert.throws(
-    () =>  PlacesUtils.history.insert({
+    () => PlacesUtils.history.insert({
       url: TEST_URL,
       visits: [
         {transition: "a"}
       ]}),
     /TypeError: transition: a is not a valid transition type/,
     "passing a visit object with an invalid transition to History.insert should throw a TypeError"
   );
 });
@@ -154,27 +154,27 @@ add_task(function* test_insert_multiple_
   let validPageInfo = {
     url: "http://mozilla.com",
     visits: [
       {transition: TRANSITION_LINK}
     ]
   };
 
   Assert.throws(
-    () =>  PlacesUtils.history.insertMany(),
+    () => PlacesUtils.history.insertMany(),
     /TypeError: pageInfos must be an array/,
     "passing a null into History.insertMany should throw a TypeError"
   );
   Assert.throws(
-    () =>  PlacesUtils.history.insertMany([]),
+    () => PlacesUtils.history.insertMany([]),
     /TypeError: pageInfos may not be an empty array/,
     "passing an empty array into History.insertMany should throw a TypeError"
   );
   Assert.throws(
-    () =>  PlacesUtils.history.insertMany([validPageInfo, {}]),
+    () => PlacesUtils.history.insertMany([validPageInfo, {}]),
     /TypeError: PageInfo object must have a url property/,
     "passing a second invalid PageInfo object to History.insertMany should throw a TypeError"
   );
 });
 
 add_task(function* test_history_insertMany() {
   const BAD_URLS = ["about:config", "chrome://browser/content/browser.xul"];
   const GOOD_URLS = [1, 2, 3].map(x => { return `http://mozilla.com/${x}`; });
--- a/toolkit/components/places/tests/history/test_remove.js
+++ b/toolkit/components/places/tests/history/test_remove.js
@@ -211,17 +211,17 @@ add_task(function* test_remove_many() {
     },
     onClearHistory() {
       Assert.ok(false, "Unexpected call to onClearHistory");
     },
     onPageChanged(aURI) {
       Assert.ok(false, "Unexpected call to onPageChanged " + aURI.spec);
     },
     onFrecencyChanged(aURI) {
-      let origin = pages.find(x =>  x.uri.spec == aURI.spec);
+      let origin = pages.find(x => x.uri.spec == aURI.spec);
       Assert.ok(origin);
       Assert.ok(origin.hasBookmark, "Observing onFrecencyChanged on a page with a bookmark");
       origin.onFrecencyChangedCalled = true;
       // We do not make sure that `origin.onFrecencyChangedCalled` is `false`, as
     },
     onManyFrecenciesChanged() {
       Assert.ok(false, "Observing onManyFrecenciesChanges, this is most likely correct but not covered by this test");
     },
@@ -274,27 +274,27 @@ add_task(function* test_remove_many() {
 add_task(function* cleanup() {
   yield PlacesTestUtils.clearHistory();
   yield PlacesUtils.bookmarks.eraseEverything();
 });
 
 // Test the various error cases
 add_task(function* test_error_cases() {
   Assert.throws(
-    () =>  PlacesUtils.history.remove(),
+    () => PlacesUtils.history.remove(),
     /TypeError: Invalid url/,
     "History.remove with no argument should throw a TypeError"
   );
   Assert.throws(
-    () =>  PlacesUtils.history.remove(null),
+    () => PlacesUtils.history.remove(null),
     /TypeError: Invalid url/,
     "History.remove with `null` should throw a TypeError"
   );
   Assert.throws(
-    () =>  PlacesUtils.history.remove(undefined),
+    () => PlacesUtils.history.remove(undefined),
     /TypeError: Invalid url/,
     "History.remove with `undefined` should throw a TypeError"
   );
   Assert.throws(
     () => PlacesUtils.history.remove("not a guid, obviously"),
     /TypeError: .* is not a valid URL/,
     "History.remove with an ill-formed guid/url argument should throw a TypeError"
   );
@@ -341,17 +341,17 @@ add_task(function* test_error_cases() {
   }
 });
 
 add_task(function* test_orphans() {
   let uri = NetUtil.newURI("http://moz.org/");
   yield PlacesTestUtils.addVisits({ uri });
 
   PlacesUtils.favicons.setAndFetchFaviconForPage(
-    uri, SMALLPNG_DATA_URI, true,  PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
+    uri, SMALLPNG_DATA_URI, true, PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
     null, Services.scriptSecurityManager.getSystemPrincipal());
   PlacesUtils.annotations.setPageAnnotation(uri, "test", "restval", 0,
                                             PlacesUtils.annotations.EXPIRE_NEVER);
 
   yield PlacesUtils.history.remove(uri);
   Assert.ok(!(yield PlacesTestUtils.isPageInDB(uri)), "Page should have been removed");
   let db = yield PlacesUtils.promiseDBConnection();
   let rows = yield db.execute(`SELECT (SELECT count(*) FROM moz_annos) +
--- a/toolkit/components/places/tests/history/test_removeVisitsByFilter.js
+++ b/toolkit/components/places/tests/history/test_removeVisitsByFilter.js
@@ -325,17 +325,17 @@ add_task(function* test_error_cases() {
   );
 });
 
 add_task(function* test_orphans() {
   let uri = NetUtil.newURI("http://moz.org/");
   yield PlacesTestUtils.addVisits({ uri });
 
   PlacesUtils.favicons.setAndFetchFaviconForPage(
-    uri, SMALLPNG_DATA_URI, true,  PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
+    uri, SMALLPNG_DATA_URI, true, PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE,
     null, Services.scriptSecurityManager.getSystemPrincipal());
   PlacesUtils.annotations.setPageAnnotation(uri, "test", "restval", 0,
                                             PlacesUtils.annotations.EXPIRE_NEVER);
 
   yield PlacesUtils.history.removeVisitsByFilter({ beginDate: new Date(1999, 9, 9, 9, 9),
                                                    endDate: new Date() });
   Assert.ok(!(yield PlacesTestUtils.isPageInDB(uri)), "Page should have been removed");
   let db = yield PlacesUtils.promiseDBConnection();
--- a/toolkit/components/places/tests/migration/test_current_from_v19.js
+++ b/toolkit/components/places/tests/migration/test_current_from_v19.js
@@ -29,14 +29,13 @@ add_task(function* initial_state() {
 add_task(function* database_is_valid() {
   Assert.equal(PlacesUtils.history.databaseStatus,
                PlacesUtils.history.DATABASE_STATUS_UPGRADED);
 
   let db = yield PlacesUtils.promiseDBConnection();
   Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
 });
 
-add_task(function* test_bookmark_guid_annotation_removed()
-{
+add_task(function* test_bookmark_guid_annotation_removed() {
   let db = yield PlacesUtils.promiseDBConnection();
   Assert.equal((yield getTotalGuidAnnotationsCount(db)), 0,
                "There should be no more obsolete GUID annotations.");
 });
--- a/toolkit/components/places/tests/migration/test_current_from_v24.js
+++ b/toolkit/components/places/tests/migration/test_current_from_v24.js
@@ -8,18 +8,17 @@ add_task(function* setup() {
 add_task(function* database_is_valid() {
   Assert.equal(PlacesUtils.history.databaseStatus,
                PlacesUtils.history.DATABASE_STATUS_UPGRADED);
 
   let db = yield PlacesUtils.promiseDBConnection();
   Assert.equal((yield db.getSchemaVersion()), CURRENT_SCHEMA_VERSION);
 });
 
-add_task(function* test_bookmark_guid_annotation_removed()
-{
+add_task(function* test_bookmark_guid_annotation_removed() {
   yield PlacesUtils.bookmarks.eraseEverything();
 
   let db = yield PlacesUtils.promiseDBConnection();
   let m = new Map([
     [PlacesUtils.placesRootId, PlacesUtils.bookmarks.rootGuid],
     [PlacesUtils.bookmarksMenuFolderId, PlacesUtils.bookmarks.menuGuid],
     [PlacesUtils.toolbarFolderId, PlacesUtils.bookmarks.toolbarGuid],
     [PlacesUtils.unfiledBookmarksFolderId, PlacesUtils.bookmarks.unfiledGuid],
--- a/toolkit/components/places/tests/queries/head_queries.js
+++ b/toolkit/components/places/tests/queries/head_queries.js
@@ -34,18 +34,17 @@ const olderthansixmonths = today - (DAY_
 
 
 /**
  * Generalized function to pull in an array of objects of data and push it into
  * the database.  It does NOT do any checking to see that the input is
  * appropriate.  This function is an asynchronous task, it can be called using
  * "Task.spawn" or using the "yield" function inside another task.
  */
-function* task_populateDB(aArray)
-{
+function* task_populateDB(aArray) {
   // Iterate over aArray and execute all instructions.
   for (let arrayItem of aArray) {
     try {
       // make the data object into a query data object in order to create proper
       // default values for anything left unspecified
       var qdata = new queryData(arrayItem);
       if (qdata.isVisit) {
         // Then we should add a visit for this node
@@ -60,39 +59,35 @@ function* task_populateDB(aArray)
           // Set a fake visit_count, this is not a real count but can be used
           // to test sorting by visit_count.
           let stmt = DBConn().createAsyncStatement(
             "UPDATE moz_places SET visit_count = :vc WHERE url_hash = hash(:url) AND url = :url");
           stmt.params.vc = qdata.visitCount;
           stmt.params.url = qdata.uri;
           try {
             stmt.executeAsync();
-          }
-          catch (ex) {
+          } catch (ex) {
             print("Error while setting visit_count.");
-          }
-          finally {
+          } finally {
             stmt.finalize();
           }
         }
       }
 
       if (qdata.isRedirect) {
         // This must be async to properly enqueue after the updateFrecency call
         // done by the visit addition.
         let stmt = DBConn().createAsyncStatement(
           "UPDATE moz_places SET hidden = 1 WHERE url_hash = hash(:url) AND url = :url");
         stmt.params.url = qdata.uri;
         try {
           stmt.executeAsync();
-        }
-        catch (ex) {
+        } catch (ex) {
           print("Error while setting hidden.");
-        }
-        finally {
+        } finally {
           stmt.finalize();
         }
       }
 
       if (qdata.isDetails) {
         // Then we add extraneous page details for testing
         yield PlacesTestUtils.addVisits({
           uri: uri(qdata.uri),
--- a/toolkit/components/places/tests/queries/test_415716.js
+++ b/toolkit/components/places/tests/queries/test_415716.js
@@ -22,27 +22,25 @@ function modHistoryTypes(val) {
     case 7:
       return TRANSITION_DOWNLOAD;
     case 8:
       return TRANSITION_FRAMED_LINK;
   }
   return TRANSITION_TYPED;
 }
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
 /**
  * Builds a test database by hand using various times, annotations and
  * visit numbers for this test
  */
-add_task(function* test_buildTestDatabase()
-{
+add_task(function* test_buildTestDatabase() {
   // This is the set of visits that we will match - our min visit is 2 so that's
   // why we add more visits to the same URIs.
   let testURI = uri("http://www.foo.com");
   let places = [];
 
   for (let i = 0; i < 12; ++i) {
     places.push({
       uri: testURI,
@@ -72,18 +70,17 @@ add_task(function* test_buildTestDatabas
  * This test will test Queries that use relative Time Range, minVists, maxVisits,
  * annotation.
  * The Query:
  * Annotation == "moz-test-places/testing123" &&
  * TimeRange == "now() - 2d" &&
  * minVisits == 2 &&
  * maxVisits == 10
  */
-add_task(function test_execute()
-{
+add_task(function test_execute() {
   let query = PlacesUtils.history.getNewQuery();
   query.annotation = "moz-test-places/testing123";
   query.beginTime = daybefore * 1000;
   query.beginTimeReference = PlacesUtils.history.TIME_RELATIVE_NOW;
   query.endTime = today * 1000;
   query.endTimeReference = PlacesUtils.history.TIME_RELATIVE_NOW;
   query.minVisits = 2;
   query.maxVisits = 10;
--- a/toolkit/components/places/tests/queries/test_abstime-annotation-domain.js
+++ b/toolkit/components/places/tests/queries/test_abstime-annotation-domain.js
@@ -115,23 +115,21 @@ var testData = [
 
 /**
  * This test will test a Query using several terms and do a bit of negative
  * testing for items that should be ignored while querying over history.
  * The Query:WHERE absoluteTime(matches) AND searchTerms AND URI
  *                 AND annotationIsNot(match) GROUP BY Domain, Day SORT BY uri,ascending
  *                 excludeITems(should be ignored)
  */
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_abstime_annotation_domain()
-{
+add_task(function* test_abstime_annotation_domain() {
   // Initialize database
   yield task_populateDB(testData);
 
   // Query
   var query = PlacesUtils.history.getNewQuery();
   query.beginTime = beginTime;
   query.endTime = endTime;
   query.beginTimeReference = PlacesUtils.history.TIME_RELATIVE_EPOCH;
--- a/toolkit/components/places/tests/queries/test_abstime-annotation-uri.js
+++ b/toolkit/components/places/tests/queries/test_abstime-annotation-uri.js
@@ -95,23 +95,21 @@ var testData = [
 
 /**
  * This test will test a Query using several terms and do a bit of negative
  * testing for items that should be ignored while querying over history.
  * The Query:WHERE absoluteTime(matches) AND searchTerms AND URI
  *                 AND annotationIsNot(match) GROUP BY Domain, Day SORT BY uri,ascending
  *                 excludeITems(should be ignored)
  */
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_abstime_annotation_uri()
-{
+add_task(function* test_abstime_annotation_uri() {
   // Initialize database
   yield task_populateDB(testData);
 
   // Query
   var query = PlacesUtils.history.getNewQuery();
   query.beginTime = beginTime;
   query.endTime = endTime;
   query.beginTimeReference = PlacesUtils.history.TIME_RELATIVE_EPOCH;
--- a/toolkit/components/places/tests/queries/test_async.js
+++ b/toolkit/components/places/tests/queries/test_async.js
@@ -165,18 +165,17 @@ Test.prototype = {
    */
   checkState(aState, aExpectedMin, aExpectedMax) {
     let cnt = this.stateCounts[aState] || 0;
     if (aExpectedMax === undefined)
       aExpectedMax = aExpectedMin;
     if (aExpectedMin === aExpectedMax) {
       print(aState + " should be observed only " + aExpectedMin +
             " times (actual = " + cnt + ")");
-    }
-    else {
+    } else {
       print(aState + " should be observed at least " + aExpectedMin +
             " times and at most " + aExpectedMax + " times (actual = " +
             cnt + ")");
     }
     do_check_true(cnt >= aExpectedMin && cnt <= aExpectedMax);
     return cnt;
   },
 
@@ -202,18 +201,17 @@ Test.prototype = {
             self.opened(container, newState, oldState);
             break;
           case Ci.nsINavHistoryContainerResultNode.STATE_CLOSED:
             self.closed(container, newState, oldState);
             break;
           default:
             do_throw("Unexpected new state! " + newState);
           }
-        }
-        catch (err) {
+        } catch (err) {
           do_throw(err);
         }
       },
     };
     this.result.addObserver(this.observer, false);
 
     print("Opening container");
     this.result.root.containerOpen = true;
@@ -344,23 +342,21 @@ var DataHelper = {
     let dat = {};
     for (let [prop, val] of Object.entries(aDefaults)) {
       dat[prop] = aData.hasOwnProperty(prop) ? aData[prop] : val;
     }
     return dat;
   }
 };
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_async()
-{
+add_task(function* test_async() {
   for (let test of tests) {
     yield PlacesUtils.bookmarks.eraseEverything();
 
     test.__proto__ = new Test();
     yield test.setup();
 
     print("------ Running test: " + test.desc);
     yield test.run();
--- a/toolkit/components/places/tests/queries/test_containersQueries_sorting.js
+++ b/toolkit/components/places/tests/queries/test_containersQueries_sorting.js
@@ -81,18 +81,17 @@ var tags = [
  *
  * @param  aSequences
  *         an array that contains an arbitrary number of arrays
  * @param  aCallback
  *         a function that is passed each sequence of the product as it's
  *         computed
  * @return the total number of sequences in the product
  */
-function cartProd(aSequences, aCallback)
-{
+function cartProd(aSequences, aCallback) {
   if (aSequences.length === 0)
     return 0;
 
   // For each sequence in aSequences, we maintain a pointer (an array index,
   // really) to the element we're currently enumerating in that sequence
   var seqEltPtrs = aSequences.map(i => 0);
 
   var numProds = 0;
@@ -123,18 +122,17 @@ function cartProd(aSequences, aCallback)
       // The rightmost element pointer is past the end of its sequence.
       if (seqEltPtrs[seqPtr] >= aSequences[seqPtr].length) {
         seqEltPtrs[seqPtr] = 0;
         seqPtr--;
 
         // All element pointers are past the ends of their sequences.
         if (seqPtr < 0)
           done = true;
-      }
-      else break;
+      } else break;
     }
   }
   return numProds;
 }
 
 /**
  * Test a query based on passed-in options.
  *
@@ -174,18 +172,17 @@ function test_query_callback(aSequence) 
   var root = result.root;
   root.containerOpen = true;
 
   if (resultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_QUERY ||
       resultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY) {
     // Date containers are always sorted by date descending.
     check_children_sorting(root,
                            Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING);
-  }
-  else
+  } else
     check_children_sorting(root, sortingMode.value);
 
   // Now Check sorting of the first child container.
   var container = root.getChild(0)
                       .QueryInterface(Ci.nsINavHistoryContainerResultNode);
   container.containerOpen = true;
 
   if (resultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY) {
@@ -197,24 +194,22 @@ function test_query_callback(aSequence) 
     // since the above level does not inherit it, so they will be sorted by
     // title ascending.
     let innerContainer = container.getChild(0)
                                   .QueryInterface(Ci.nsINavHistoryContainerResultNode);
     innerContainer.containerOpen = true;
     check_children_sorting(innerContainer,
                            Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_ASCENDING);
     innerContainer.containerOpen = false;
-  }
-  else if (resultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_QUERY) {
+  } else if (resultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_QUERY) {
     // Sorting mode for tag contents is hardcoded for now, to allow for faster
     // duplicates filtering.
     check_children_sorting(container,
                            Ci.nsINavHistoryQueryOptions.SORT_BY_NONE);
-  }
-  else
+  } else
     check_children_sorting(container, sortingMode.value);
 
   container.containerOpen = false;
   root.containerOpen = false;
 
   test_result_sortingMode_change(result, resultType, sortingMode);
 }
 
@@ -241,25 +236,23 @@ function test_result_sortingMode_change(
     aResult.sortingMode = aForcedSortingMode.value;
     root.containerOpen = true;
 
     if (aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_QUERY ||
         aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY) {
       // Date containers are always sorted by date descending.
       check_children_sorting(root,
                              Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING);
-    }
-    else if (aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_SITE_QUERY &&
+    } else if (aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_SITE_QUERY &&
              (aOriginalSortingMode.value == Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_ASCENDING ||
               aOriginalSortingMode.value == Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING)) {
       // Site containers don't have a good time property to sort by.
       check_children_sorting(root,
                              Ci.nsINavHistoryQueryOptions.SORT_BY_NONE);
-    }
-    else
+    } else
       check_children_sorting(root, aOriginalSortingMode.value);
 
     // Now Check sorting of the first child container.
     var container = root.getChild(0)
                         .QueryInterface(Ci.nsINavHistoryContainerResultNode);
     container.containerOpen = true;
 
     if (aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY) {
@@ -269,31 +262,28 @@ function test_result_sortingMode_change(
                              Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_ASCENDING);
       // ...then we check sorting of the second level of containers, result
       // will sort them through recursiveSort.
       let innerContainer = container.getChild(0)
                                     .QueryInterface(Ci.nsINavHistoryContainerResultNode);
       innerContainer.containerOpen = true;
       check_children_sorting(innerContainer, aForcedSortingMode.value);
       innerContainer.containerOpen = false;
-    }
-    else {
+    } else {
       if (aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_QUERY ||
           aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY ||
           aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_SITE_QUERY) {
         // Date containers are always sorted by date descending.
         check_children_sorting(root, Ci.nsINavHistoryQueryOptions.SORT_BY_NONE);
-      }
-      else if (aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_SITE_QUERY &&
+      } else if (aResultType.value == Ci.nsINavHistoryQueryOptions.RESULTS_AS_SITE_QUERY &&
              (aOriginalSortingMode.value == Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_ASCENDING ||
               aOriginalSortingMode.value == Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING)) {
         // Site containers don't have a good time property to sort by.
         check_children_sorting(root, Ci.nsINavHistoryQueryOptions.SORT_BY_NONE);
-      }
-      else
+      } else
         check_children_sorting(root, aOriginalSortingMode.value);
 
       // Children should always be sorted.
       check_children_sorting(container, aForcedSortingMode.value);
     }
 
     container.containerOpen = false;
     root.containerOpen = false;
@@ -376,23 +366,21 @@ function check_children_sorting(aRootNod
       print(i + " index wrong, expected " + sortedResults[i].title +
             " found " + results[i].title);
     do_check_eq(sortedResults[i].title, results[i].title);
   }
 }
 
 // Main
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_containersQueries_sorting()
-{
+add_task(function* test_containersQueries_sorting() {
   // Add visits, bookmarks and tags to our database.
   var timeInMilliseconds = Date.now();
   var visitCount = 0;
   var dayOffset = 0;
   var visits = [];
   pages.forEach(aPageUrl => visits.push(
     { isVisit: true,
       isBookmark: true,
--- a/toolkit/components/places/tests/queries/test_history_queries_tags_liveUpdate.js
+++ b/toolkit/components/places/tests/queries/test_history_queries_tags_liveUpdate.js
@@ -39,113 +39,104 @@ var gTestData = [
     isInQuery: true,
     isBookmark: true,
     parentGuid: PlacesUtils.bookmarks.unfiledGuid,
     index: PlacesUtils.bookmarks.DEFAULT_INDEX,
     title: "example3",
   },
 ];
 
-function newQueryWithOptions()
-{
+function newQueryWithOptions() {
   return [ PlacesUtils.history.getNewQuery(),
            PlacesUtils.history.getNewQueryOptions() ];
 }
 
-function testQueryContents(aQuery, aOptions, aCallback)
-{
+function testQueryContents(aQuery, aOptions, aCallback) {
   let root = PlacesUtils.history.executeQuery(aQuery, aOptions).root;
   root.containerOpen = true;
   aCallback(root);
   root.containerOpen = false;
 }
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_initialize()
-{
+add_task(function* test_initialize() {
   yield task_populateDB(gTestData);
 });
 
-add_task(function pages_query()
-{
+add_task(function pages_query() {
   let [query, options] = newQueryWithOptions();
   testQueryContents(query, options, function(root) {
     compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
     for (let i = 0; i < root.childCount; i++) {
       let node = root.getChild(i);
       let uri = NetUtil.newURI(node.uri);
       do_check_eq(node.tags, null);
       PlacesUtils.tagging.tagURI(uri, ["test-tag"]);
       do_check_eq(node.tags, "test-tag");
       PlacesUtils.tagging.untagURI(uri, ["test-tag"]);
       do_check_eq(node.tags, null);
     }
   });
 });
 
-add_task(function visits_query()
-{
+add_task(function visits_query() {
   let [query, options] = newQueryWithOptions();
   options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT;
   testQueryContents(query, options, function(root) {
     compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
     for (let i = 0; i < root.childCount; i++) {
       let node = root.getChild(i);
       let uri = NetUtil.newURI(node.uri);
       do_check_eq(node.tags, null);
       PlacesUtils.tagging.tagURI(uri, ["test-tag"]);
       do_check_eq(node.tags, "test-tag");
       PlacesUtils.tagging.untagURI(uri, ["test-tag"]);
       do_check_eq(node.tags, null);
     }
   });
 });
 
-add_task(function bookmarks_query()
-{
+add_task(function bookmarks_query() {
   let [query, options] = newQueryWithOptions();
   query.setFolders([PlacesUtils.unfiledBookmarksFolderId], 1);
   testQueryContents(query, options, function(root) {
     compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
     for (let i = 0; i < root.childCount; i++) {
       let node = root.getChild(i);
       let uri = NetUtil.newURI(node.uri);
       do_check_eq(node.tags, null);
       PlacesUtils.tagging.tagURI(uri, ["test-tag"]);
       do_check_eq(node.tags, "test-tag");
       PlacesUtils.tagging.untagURI(uri, ["test-tag"]);
       do_check_eq(node.tags, null);
     }
   });
 });
 
-add_task(function pages_searchterm_query()
-{
+add_task(function pages_searchterm_query() {
   let [query, options] = newQueryWithOptions();
   query.searchTerms = "example";
   testQueryContents(query, options, function(root) {
     compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
     for (let i = 0; i < root.childCount; i++) {
       let node = root.getChild(i);
       let uri = NetUtil.newURI(node.uri);
       do_check_eq(node.tags, null);
       PlacesUtils.tagging.tagURI(uri, ["test-tag"]);
       do_check_eq(node.tags, "test-tag");
       PlacesUtils.tagging.untagURI(uri, ["test-tag"]);
       do_check_eq(node.tags, null);
     }
   });
 });
 
-add_task(function visits_searchterm_query()
-{
+add_task(function visits_searchterm_query() {
   let [query, options] = newQueryWithOptions();
   query.searchTerms = "example";
   options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT;
   testQueryContents(query, options, function(root) {
     compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
     for (let i = 0; i < root.childCount; i++) {
       let node = root.getChild(i);
       let uri = NetUtil.newURI(node.uri);
@@ -153,18 +144,17 @@ add_task(function visits_searchterm_quer
       PlacesUtils.tagging.tagURI(uri, ["test-tag"]);
       do_check_eq(node.tags, "test-tag");
       PlacesUtils.tagging.untagURI(uri, ["test-tag"]);
       do_check_eq(node.tags, null);
     }
   });
 });
 
-add_task(function pages_searchterm_is_tag_query()
-{
+add_task(function pages_searchterm_is_tag_query() {
   let [query, options] = newQueryWithOptions();
   query.searchTerms = "test-tag";
   testQueryContents(query, options, function(root) {
     compareArrayToResult([], root);
     gTestData.forEach(function(data) {
       let uri = NetUtil.newURI(data.uri);
       PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                                            uri,
@@ -173,18 +163,17 @@ add_task(function pages_searchterm_is_ta
       PlacesUtils.tagging.tagURI(uri, ["test-tag"]);
       compareArrayToResult([data], root);
       PlacesUtils.tagging.untagURI(uri, ["test-tag"]);
       compareArrayToResult([], root);
     });
   });
 });
 
-add_task(function visits_searchterm_is_tag_query()
-{
+add_task(function visits_searchterm_is_tag_query() {
   let [query, options] = newQueryWithOptions();
   query.searchTerms = "test-tag";
   options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT;
   testQueryContents(query, options, function(root) {
     compareArrayToResult([], root);
     gTestData.forEach(function(data) {
       let uri = NetUtil.newURI(data.uri);
       PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
--- a/toolkit/components/places/tests/queries/test_history_queries_titles_liveUpdate.js
+++ b/toolkit/components/places/tests/queries/test_history_queries_titles_liveUpdate.js
@@ -39,29 +39,26 @@ function searchNodeHavingUrl(aRoot, aUrl
   for (let i = 0; i < aRoot.childCount; i++) {
     if (aRoot.getChild(i).uri == aUrl) {
       return aRoot.getChild(i);
     }
   }
   return undefined;
 }
 
-function newQueryWithOptions()
-{
+function newQueryWithOptions() {
   return [ PlacesUtils.history.getNewQuery(),
            PlacesUtils.history.getNewQueryOptions() ];
 }
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* pages_query()
-{
+add_task(function* pages_query() {
   yield task_populateDB(gTestData);
 
   let [query, options] = newQueryWithOptions();
   let root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
 
   compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
   for (let i = 0; i < root.childCount; i++) {
@@ -73,18 +70,17 @@ add_task(function* pages_query()
     yield PlacesTestUtils.addVisits({uri, title: gTestData[i].title});
     do_check_eq(node.title, gTestData[i].title);
   }
 
   root.containerOpen = false;
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* visits_query()
-{
+add_task(function* visits_query() {
   yield task_populateDB(gTestData);
 
   let [query, options] = newQueryWithOptions();
   options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT;
   let root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
 
   compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
@@ -100,18 +96,17 @@ add_task(function* visits_query()
     node = searchNodeHavingUrl(root, testData.uri);
     do_check_eq(node.title, testData.title);
   }
 
   root.containerOpen = false;
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* pages_searchterm_query()
-{
+add_task(function* pages_searchterm_query() {
   yield task_populateDB(gTestData);
 
   let [query, options] = newQueryWithOptions();
   query.searchTerms = "example";
   let root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
 
   compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
@@ -124,18 +119,17 @@ add_task(function* pages_searchterm_quer
     yield PlacesTestUtils.addVisits({uri, title: gTestData[i].title});
     do_check_eq(node.title, gTestData[i].title);
   }
 
   root.containerOpen = false;
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* visits_searchterm_query()
-{
+add_task(function* visits_searchterm_query() {
   yield task_populateDB(gTestData);
 
   let [query, options] = newQueryWithOptions();
   query.searchTerms = "example";
   options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT;
   let root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
 
@@ -151,18 +145,17 @@ add_task(function* visits_searchterm_que
     node = searchNodeHavingUrl(root, testData.uri);
     do_check_eq(node.title, testData.title);
   }
 
   root.containerOpen = false;
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* pages_searchterm_is_title_query()
-{
+add_task(function* pages_searchterm_is_title_query() {
   yield task_populateDB(gTestData);
 
   let [query, options] = newQueryWithOptions();
   query.searchTerms = "match";
   let root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
   compareArrayToResult([], root);
   for (let data of gTestData) {
@@ -177,18 +170,17 @@ add_task(function* pages_searchterm_is_t
                                       visitDate: data.lastVisit });
     compareArrayToResult([], root);
   }
 
   root.containerOpen = false;
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* visits_searchterm_is_title_query()
-{
+add_task(function* visits_searchterm_is_title_query() {
   yield task_populateDB(gTestData);
 
   let [query, options] = newQueryWithOptions();
   query.searchTerms = "match";
   options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT;
   let root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
   compareArrayToResult([], root);
--- a/toolkit/components/places/tests/queries/test_onlyBookmarked.js
+++ b/toolkit/components/places/tests/queries/test_onlyBookmarked.js
@@ -38,23 +38,21 @@ var testData = [
 ];
 
 
 /**
  * run_test is where the magic happens.  This is automatically run by the test
  * harness.  It is where you do the work of creating the query, running it, and
  * playing with the result set.
  */
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_onlyBookmarked()
-{
+add_task(function* test_onlyBookmarked() {
   // This function in head_queries.js creates our database with the above data
   yield task_populateDB(testData);
 
   // Query
   var query = PlacesUtils.history.getNewQuery();
   query.setFolders([PlacesUtils.toolbarFolderId], 1);
   query.onlyBookmarked = true;
 
--- a/toolkit/components/places/tests/queries/test_querySerialization.js
+++ b/toolkit/components/places/tests/queries/test_querySerialization.js
@@ -483,18 +483,17 @@ const queryOptionSwitches = [
  *
  * @param  aSequences
  *         an array that contains an arbitrary number of arrays
  * @param  aCallback
  *         a function that is passed each sequence of the product as it's
  *         computed
  * @return the total number of sequences in the product
  */
-function cartProd(aSequences, aCallback)
-{
+function cartProd(aSequences, aCallback) {
   if (aSequences.length === 0)
     return 0;
 
   // For each sequence in aSequences, we maintain a pointer (an array index,
   // really) to the element we're currently enumerating in that sequence
   var seqEltPtrs = aSequences.map(i => 0);
 
   var numProds = 0;
@@ -525,18 +524,17 @@ function cartProd(aSequences, aCallback)
       // The rightmost element pointer is past the end of its sequence.
       if (seqEltPtrs[seqPtr] >= aSequences[seqPtr].length) {
         seqEltPtrs[seqPtr] = 0;
         seqPtr--;
 
         // All element pointers are past the ends of their sequences.
         if (seqPtr < 0)
           done = true;
-      }
-      else break;
+      } else break;
     }
   }
   return numProds;
 }
 
 /**
  * Enumerates all the subsets in aSet of size aHowMany.  There are
  * C(aSet.length, aHowMany) such subsets.  aCallback will be passed each subset
@@ -549,18 +547,17 @@ function cartProd(aSequences, aCallback)
  *   // [1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4]
  *
  * @param  aSet
  *         an array from which to choose elements, aSet.length > 0
  * @param  aHowMany
  *         the number of elements to choose, > 0 and <= aSet.length
  * @return the total number of sets chosen
  */
-function choose(aSet, aHowMany, aCallback)
-{
+function choose(aSet, aHowMany, aCallback) {
   // ptrs = indices of the elements in aSet we're currently choosing
   var ptrs = [];
   for (let i = 0; i < aHowMany; i++) {
     ptrs.push(i);
   }
 
   var numFound = 0;
   var done = false;
@@ -610,31 +607,28 @@ function choose(aSet, aHowMany, aCallbac
  * is attached to switch objects.  See querySwitches array above.
  *
  * @param  aQuery1
  *         an nsINavHistoryQuery object
  * @param  aQuery2
  *         another nsINavHistoryQuery object
  * @return true if this switch is the same in both aQuery1 and aQuery2
  */
-function flagSwitchMatches(aQuery1, aQuery2)
-{
+function flagSwitchMatches(aQuery1, aQuery2) {
   if (aQuery1[this.flag] && aQuery2[this.flag]) {
     for (let p in this.subswitches) {
       if (p in aQuery1 && p in aQuery2) {
         if (aQuery1[p] instanceof Ci.nsIURI) {
           if (!aQuery1[p].equals(aQuery2[p]))
             return false;
-        }
-        else if (aQuery1[p] !== aQuery2[p])
+        } else if (aQuery1[p] !== aQuery2[p])
           return false;
       }
     }
-  }
-  else if (aQuery1[this.flag] || aQuery2[this.flag])
+  } else if (aQuery1[this.flag] || aQuery2[this.flag])
     return false;
 
   return true;
 }
 
 /**
  * Tests if aObj1 and aObj2 are equal.  This function is general and may be used
  * for either nsINavHistoryQuery or nsINavHistoryQueryOptions objects.  aSwitches
@@ -645,35 +639,33 @@ function flagSwitchMatches(aQuery1, aQue
  *         determines which set of switches applies to aObj1 and aObj2, either
  *         querySwitches or queryOptionSwitches
  * @param  aObj1
  *         an nsINavHistoryQuery or nsINavHistoryQueryOptions object
  * @param  aObj2
  *         another nsINavHistoryQuery or nsINavHistoryQueryOptions object
  * @return true if aObj1 and aObj2 are equal
  */
-function queryObjsEqual(aSwitches, aObj1, aObj2)
-{
+function queryObjsEqual(aSwitches, aObj1, aObj2) {
   for (let i = 0; i < aSwitches.length; i++) {
     if (!aSwitches[i].matches(aObj1, aObj2))
       return false;
   }
   return true;
 }
 
 /**
  * This drives the test runs.  See the comment at the top of this file.
  *
  * @param aHowManyLo
  *        the size of the switch subsets to start with
  * @param aHowManyHi
  *        the size of the switch subsets to end with (inclusive)
  */
-function runQuerySequences(aHowManyLo, aHowManyHi)
-{
+function runQuerySequences(aHowManyLo, aHowManyHi) {
   var allSwitches = querySwitches.concat(queryOptionSwitches);
   var prevQueries = [];
   var prevOpts = [];
 
   // Choose aHowManyLo switches up to aHowManyHi switches.
   for (let howMany = aHowManyLo; howMany <= aHowManyHi; howMany++) {
     let numIters = 0;
     print("CHOOSING " + howMany + " SWITCHES");
@@ -734,18 +726,17 @@ function runQuerySequences(aHowManyLo, a
  * serialization, and ensures (using do_check_* functions) that the
  * de-serialized objects equal the originals.
  *
  * @param aQueryArr
  *        an array containing nsINavHistoryQuery objects
  * @param aQueryOptions
  *        an nsINavHistoryQueryOptions object
  */
-function serializeDeserialize(aQueryArr, aQueryOptions)
-{
+function serializeDeserialize(aQueryArr, aQueryOptions) {
   var queryStr = PlacesUtils.history.queriesToQueryString(aQueryArr,
                                                         aQueryArr.length,
                                                         aQueryOptions);
   print("  " + queryStr);
   var queryArr2 = {};
   var opts2 = {};
   PlacesUtils.history.queryStringToQueries(queryStr, queryArr2, {}, opts2);
   queryArr2 = queryArr2.value;
@@ -781,17 +772,15 @@ function serializeDeserialize(aQueryArr,
  * to switch objects.  See querySwitches and queryOptionSwitches arrays above.
  *
  * @param  aObj1
  *         an nsINavHistoryQuery or nsINavHistoryQueryOptions object
  * @param  aObj2
  *         another nsINavHistoryQuery or nsINavHistoryQueryOptions object
  * @return true if this switch is the same in both aObj1 and aObj2
  */
-function simplePropertyMatches(aObj1, aObj2)
-{
+function simplePropertyMatches(aObj1, aObj2) {
   return aObj1[this.property] === aObj2[this.property];
 }
 
-function run_test()
-{
+function run_test() {
   runQuerySequences(CHOOSE_HOW_MANY_SWITCHES_LO, CHOOSE_HOW_MANY_SWITCHES_HI);
 }
--- a/toolkit/components/places/tests/queries/test_redirects.js
+++ b/toolkit/components/places/tests/queries/test_redirects.js
@@ -17,18 +17,18 @@ var visits = [];
  */
 function check_results_callback(aSequence) {
   // Sanity check: we should receive 3 parameters.
   do_check_eq(aSequence.length, 3);
   let includeHidden = aSequence[0];
   let maxResults = aSequence[1];
   let sortingMode = aSequence[2];
   print("\nTESTING: includeHidden(" + includeHidden + ")," +
-                  " maxResults("    + maxResults    + ")," +
-                  " sortingMode("   + sortingMode   + ").");
+                  " maxResults(" + maxResults + ")," +
+                  " sortingMode(" + sortingMode + ").");
 
   function isHidden(aVisit) {
     return aVisit.transType == Ci.nsINavHistoryService.TRANSITION_FRAMED_LINK ||
            aVisit.isRedirect;
   }
 
   // Build expectedData array.
   let expectedData = visits.filter(function(aVisit, aIndex, aArray) {
@@ -123,18 +123,17 @@ function check_results_callback(aSequenc
  *
  * @param  aSequences
  *         an array that contains an arbitrary number of arrays
  * @param  aCallback
  *         a function that is passed each sequence of the product as it's
  *         computed
  * @return the total number of sequences in the product
  */
-function cartProd(aSequences, aCallback)
-{
+function cartProd(aSequences, aCallback) {
   if (aSequences.length === 0)
     return 0;
 
   // For each sequence in aSequences, we maintain a pointer (an array index,
   // really) to the element we're currently enumerating in that sequence
   let seqEltPtrs = aSequences.map(i => 0);
 
   let numProds = 0;
@@ -165,35 +164,32 @@ function cartProd(aSequences, aCallback)
       // The rightmost element pointer is past the end of its sequence.
       if (seqEltPtrs[seqPtr] >= aSequences[seqPtr].length) {
         seqEltPtrs[seqPtr] = 0;
         seqPtr--;
 
         // All element pointers are past the ends of their sequences.
         if (seqPtr < 0)
           done = true;
-      }
-      else break;
+      } else break;
     }
   }
   return numProds;
 }
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
 /**
  * Populate the visits array and add visits to the database.
  * We will generate visit-chains like:
  *   visit -> redirect_temp -> redirect_perm
  */
-add_task(function* test_add_visits_to_database()
-{
+add_task(function* test_add_visits_to_database() {
   yield PlacesUtils.bookmarks.eraseEverything();
 
   // We don't really bother on this, but we need a time to add visits.
   let timeInMicroseconds = Date.now() * 1000;
   let visitCount = 1;
 
   // Array of all possible transition types we could be redirected from.
   let t = [
@@ -282,18 +278,17 @@ add_task(function* test_add_visits_to_da
     index: PlacesUtils.bookmarks.DEFAULT_INDEX,
     title: "Unvisited Bookmark",
     isInQuery: false });
 
   // Put visits in the database.
   yield task_populateDB(visits);
 });
 
-add_task(function* test_redirects()
-{
+add_task(function* test_redirects() {
   // Frecency and hidden are updated asynchronously, wait for them.
   yield PlacesTestUtils.promiseAsyncUpdates();
 
   // This array will be used by cartProd to generate a matrix of all possible
   // combinations.
   let includeHidden_options = [true, false];
   let maxResults_options = [5, 10, 20, null];
   // These sortingMode are choosen to toggle using special queries for history
--- a/toolkit/components/places/tests/queries/test_results-as-tag-contents-query.js
+++ b/toolkit/components/places/tests/queries/test_results-as-tag-contents-query.js
@@ -54,23 +54,21 @@ function getIdForTag(aTagName) {
   }
   root.containerOpen = false;
   return id;
 }
 
  /**
   * This test will test Queries that use relative search terms and URI options
   */
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_results_as_tag_contents_query()
-{
+add_task(function* test_results_as_tag_contents_query() {
   yield task_populateDB(testData);
 
   // Get tag id.
   let tagId = getIdForTag("bugzilla");
   do_check_true(tagId > 0);
 
   var options = PlacesUtils.history.getNewQueryOptions();
   options.resultType = options.RESULTS_AS_TAG_CONTENTS;
--- a/toolkit/components/places/tests/queries/test_results-as-visit.js
+++ b/toolkit/components/places/tests/queries/test_results-as-visit.js
@@ -32,23 +32,21 @@ function createTestData() {
     { uri: "http://foo.mail.com/changeme3.html", title: "zydeco", visitCount: 5, inQuery: false },
   ];
   pages.forEach(generateVisits);
 }
 
 /**
  * This test will test Queries that use relative search terms and URI options
  */
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_results_as_visit()
-{
+add_task(function* test_results_as_visit() {
    createTestData();
    yield task_populateDB(testData);
    var query = PlacesUtils.history.getNewQuery();
    query.searchTerms = "moz";
    query.minVisits = 2;
 
    // Options
    var options = PlacesUtils.history.getNewQueryOptions();
--- a/toolkit/components/places/tests/queries/test_searchTerms_includeHidden.js
+++ b/toolkit/components/places/tests/queries/test_searchTerms_includeHidden.js
@@ -43,28 +43,25 @@ const TEST_DATA = [
     expectedResults: 1
   },
   { searchTerms: "red",
     includeHidden: true,
     expectedResults: 1
   }
 ];
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_initalize()
-{
+add_task(function* test_initalize() {
   yield task_populateDB(VISITS);
 });
 
-add_task(function* test_searchTerms_includeHidden()
-{
+add_task(function* test_searchTerms_includeHidden() {
   for (let data of TEST_DATA) {
     let query = PlacesUtils.history.getNewQuery();
     query.searchTerms = data.searchTerms;
     let options = PlacesUtils.history.getNewQueryOptions();
     options.includeHidden = data.includeHidden;
 
     let root = PlacesUtils.history.executeQuery(query, options).root;
     root.containerOpen = true;
--- a/toolkit/components/places/tests/queries/test_searchterms-bookmarklets.js
+++ b/toolkit/components/places/tests/queries/test_searchterms-bookmarklets.js
@@ -12,56 +12,51 @@ var testData = [
 
   { isInQuery: true
   , isBookmark: true
   , title: "bookmark 2"
   , uri: "javascript:alert('moz');"
   }
 ];
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_initalize()
-{
+add_task(function* test_initalize() {
   yield task_populateDB(testData);
 });
 
-add_test(function test_search_by_title()
-{
+add_test(function test_search_by_title() {
   let query = PlacesUtils.history.getNewQuery();
   query.searchTerms = "bookmark";
   let options = PlacesUtils.history.getNewQueryOptions();
   options.queryType = options.QUERY_TYPE_BOOKMARKS;
   let root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
   compareArrayToResult(testData, root);
   root.containerOpen = false;
 
   run_next_test();
 });
 
-add_test(function test_search_by_schemeToken()
-{
+add_test(function test_search_by_schemeToken() {
   let query = PlacesUtils.history.getNewQuery();
   query.searchTerms = "script";
   let options = PlacesUtils.history.getNewQueryOptions();
   options.queryType = options.QUERY_TYPE_BOOKMARKS;
   let root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
   compareArrayToResult(testData, root);
   root.containerOpen = false;
 
   run_next_test();
 });
 
-add_test(function test_search_by_uriAndTitle()
-{
+add_test(function test_search_by_uriAndTitle() {
   let query = PlacesUtils.history.getNewQuery();
   query.searchTerms = "moz";
   let options = PlacesUtils.history.getNewQueryOptions();
   options.queryType = options.QUERY_TYPE_BOOKMARKS;
   let root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
   compareArrayToResult(testData, root);
   root.containerOpen = false;
--- a/toolkit/components/places/tests/queries/test_searchterms-domain.js
+++ b/toolkit/components/places/tests/queries/test_searchterms-domain.js
@@ -50,23 +50,21 @@
 
    // Test another invalid title - for updating later
    {isInQuery: false, isVisit:true, isDetails: true, title: "m,oz",
     uri: "http://foo.com/changeme2.htm", lastVisit: yesterday}];
 
 /**
  * This test will test Queries that use relative search terms and domain options
  */
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_searchterms_domain()
-{
+add_task(function* test_searchterms_domain() {
   yield task_populateDB(testData);
   var query = PlacesUtils.history.getNewQuery();
   query.searchTerms = "moz";
   query.domain = "foo.com";
   query.domainIsHost = false;
 
   // Options
   var options = PlacesUtils.history.getNewQueryOptions();
--- a/toolkit/components/places/tests/queries/test_searchterms-uri.js
+++ b/toolkit/components/places/tests/queries/test_searchterms-uri.js
@@ -36,23 +36,21 @@
 
     // Test another invalid title - for updating later
     {isInQuery: false, isVisit:true, isDetails: true, title: "m,oz",
      uri: "http://foo.com/changeme2.htm", lastVisit: yesterday}];
 
 /**
  * This test will test Queries that use relative search terms and URI options
  */
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_searchterms_uri()
-{
+add_task(function* test_searchterms_uri() {
   yield task_populateDB(testData);
    var query = PlacesUtils.history.getNewQuery();
    query.searchTerms = "moz";
    query.uri = uri("http://foo.com");
 
    // Options
    var options = PlacesUtils.history.getNewQueryOptions();
    options.sortingMode = options.SORT_BY_DATE_ASCENDING;
--- a/toolkit/components/places/tests/queries/test_sort-date-site-grouping.js
+++ b/toolkit/components/places/tests/queries/test_sort-date-site-grouping.js
@@ -107,23 +107,21 @@ var testDataAddedLater = [
     uri: "file:///directory/3",
     lastVisit: today,
     title: "test visit",
     isInQuery: true,
     levels: [0, 0]
   }
 ];
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_sort_date_site_grouping()
-{
+add_task(function* test_sort_date_site_grouping() {
   yield task_populateDB(testData);
 
   // On Linux, the (local files) folder is shown after sites unlike Mac/Windows.
   // Thus, we avoid running this test on Linux but this should be re-enabled
   // after bug 624024 is resolved.
   let isLinux = ("@mozilla.org/gnome-gconf-service;1" in Components.classes);
   if (isLinux)
     return;
--- a/toolkit/components/places/tests/queries/test_sorting.js
+++ b/toolkit/components/places/tests/queries/test_sorting.js
@@ -1240,23 +1240,21 @@ tests.push({
 
   check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_FRECENCY_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_sorting()
-{
+add_task(function* test_sorting() {
   for (let test of tests) {
     yield test.setup();
     yield PlacesTestUtils.promiseAsyncUpdates();
     test.check();
     // sorting reversed, usually SORT_BY have ASC and DESC
     test.check_reverse();
     // Execute cleanup tasks
     yield PlacesUtils.bookmarks.eraseEverything();
--- a/toolkit/components/places/tests/queries/test_tags.js
+++ b/toolkit/components/places/tests/queries/test_tags.js
@@ -32,77 +32,67 @@ add_task(function* tags_getter_setter() 
 });
 
 add_task(function* invalid_setter_calls() {
   do_print("Invalid calls to tags setter should fail");
   try {
     var query = PlacesUtils.history.getNewQuery();
     query.tags = null;
     do_throw("Passing null to SetTags should fail");
-  }
-  catch (exc) {}
+  } catch (exc) {}
 
   try {
     query = PlacesUtils.history.getNewQuery();
     query.tags = "this should not work";
     do_throw("Passing a string to SetTags should fail");
-  }
-  catch (exc) {}
+  } catch (exc) {}
 
   try {
     makeQuery([null]);
     do_throw("Passing one-element array with null to SetTags should fail");
-  }
-  catch (exc) {}
+  } catch (exc) {}
 
   try {
     makeQuery([undefined]);
     do_throw("Passing one-element array with undefined to SetTags " +
              "should fail");
-  }
-  catch (exc) {}
+  } catch (exc) {}
 
   try {
     makeQuery(["foo", null, "bar"]);
     do_throw("Passing mixture of tags and null to SetTags should fail");
-  }
-  catch (exc) {}
+  } catch (exc) {}
 
   try {
     makeQuery(["foo", undefined, "bar"]);
     do_throw("Passing mixture of tags and undefined to SetTags " +
              "should fail");
-  }
-  catch (exc) {}
+  } catch (exc) {}
 
   try {
     makeQuery([1, 2, 3]);
     do_throw("Passing numbers to SetTags should fail");
-  }
-  catch (exc) {}
+  } catch (exc) {}
 
   try {
     makeQuery(["foo", 1, 2, 3]);
     do_throw("Passing mixture of tags and numbers to SetTags should fail");
-  }
-  catch (exc) {}
+  } catch (exc) {}
 
   try {
     var str = PlacesUtils.toISupportsString("foo");
     query = PlacesUtils.history.getNewQuery();
     query.tags = str;
     do_throw("Passing nsISupportsString to SetTags should fail");
-  }
-  catch (exc) {}
+  } catch (exc) {}
 
   try {
     makeQuery([str]);
     do_throw("Passing array of nsISupportsStrings to SetTags should fail");
-  }
-  catch (exc) {}
+  } catch (exc) {}
 });
 
 add_task(function* not_setting_tags() {
   do_print("Not setting tags at all should not affect query URI");
   checkQueryURI();
 });
 
 add_task(function* empty_array_tags() {
@@ -726,18 +716,17 @@ function queryURI(aQuery, aQueryOpts) {
  * same order.
  */
 function setsAreEqual(aArr1, aArr2, aIsOrdered) {
   do_check_eq(aArr1.length, aArr2.length);
   if (aIsOrdered) {
     for (let i = 0; i < aArr1.length; i++) {
       do_check_eq(aArr1[i], aArr2[i]);
     }
-  }
-  else {
+  } else {
     aArr1.forEach(u => do_check_true(aArr2.indexOf(u) >= 0));
     aArr2.forEach(u => do_check_true(aArr1.indexOf(u) >= 0));
   }
 }
 
 function run_test() {
   run_next_test();
 }
--- a/toolkit/components/places/tests/queries/test_transitions.js
+++ b/toolkit/components/places/tests/queries/test_transitions.js
@@ -83,23 +83,21 @@ var testDataTyped = [0, 5, 7, 9];
 var testDataDownload = [1, 2, 4, 6, 10];
 var testDataBookmark = [3, 8, 11];
 
 /**
  * run_test is where the magic happens.  This is automatically run by the test
  * harness.  It is where you do the work of creating the query, running it, and
  * playing with the result set.
  */
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_transitions()
-{
+add_task(function* test_transitions() {
   let timeNow = Date.now();
   for (let item of testData) {
     yield PlacesTestUtils.addVisits({
       uri: uri(item.uri),
       transition: item.transType,
       visitDate: timeNow++ * 1000,
       title: item.title
     });
--- a/toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
+++ b/toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
@@ -328,18 +328,17 @@ function resetRestrict(aType) {
 
 /**
  * Strip prefixes from the URI that we don't care about for searching.
  *
  * @param spec
  *        The text to modify.
  * @return the modified spec.
  */
-function stripPrefix(spec)
-{
+function stripPrefix(spec) {
   ["http://", "https://", "ftp://"].some(scheme => {
     if (spec.startsWith(scheme)) {
       spec = spec.slice(scheme.length);
       return true;
     }
     return false;
   });
 
--- a/toolkit/components/places/tests/unit/test_000_frecency.js
+++ b/toolkit/components/places/tests/unit/test_000_frecency.js
@@ -82,56 +82,52 @@ function* task_initializeBucket(bucket) 
         var visitCount = 1; // bonusName == "unvisitedBookmarkBonus" ? 1 : 0;
         frecency = Math.ceil(visitCount * points);
         calculatedURI = uri("http://" + searchTerm + ".com/" +
           bonusName + ":" + bonusValue + "/cutoff:" + cutoff +
           "/weight:" + weight + "/frecency:" + frecency);
         if (bonusName == "unvisitedBookmarkBonus") {
           matchTitle = searchTerm + "UnvisitedBookmark";
           bmsvc.insertBookmark(bmsvc.unfiledBookmarksFolder, calculatedURI, bmsvc.DEFAULT_INDEX, matchTitle);
-        }
-        else {
+        } else {
           matchTitle = searchTerm + "UnvisitedTyped";
           yield PlacesTestUtils.addVisits({
             uri: calculatedURI,
             title: matchTitle,
             transition: visitType,
             visitDate: now
           });
           histsvc.markPageAsTyped(calculatedURI);
         }
       }
-    }
-    else {
+    } else {
       // visited
       // visited bookmarks get the visited bookmark bonus twice
       if (visitType == Ci.nsINavHistoryService.TRANSITION_BOOKMARK)
         bonusValue = bonusValue * 2;
 
       let points = Math.ceil(1 * ((bonusValue / parseFloat(100.000000)).toFixed(6) * weight) / 1);
       if (!points) {
         if (visitType == Ci.nsINavHistoryService.TRANSITION_EMBED ||
             visitType == Ci.nsINavHistoryService.TRANSITION_FRAMED_LINK ||
             visitType == Ci.nsINavHistoryService.TRANSITION_DOWNLOAD ||
             visitType == Ci.nsINavHistoryService.TRANSITION_RELOAD ||
             bonusName == "defaultVisitBonus")
           frecency = 0;
         else
           frecency = -1;
-      }
-      else
+      } else
         frecency = points;
       calculatedURI = uri("http://" + searchTerm + ".com/" +
         bonusName + ":" + bonusValue + "/cutoff:" + cutoff +
         "/weight:" + weight + "/frecency:" + frecency);
       if (visitType == Ci.nsINavHistoryService.TRANSITION_BOOKMARK) {
         matchTitle = searchTerm + "Bookmarked";
         bmsvc.insertBookmark(bmsvc.unfiledBookmarksFolder, calculatedURI, bmsvc.DEFAULT_INDEX, matchTitle);
-      }
-      else
+      } else
         matchTitle = calculatedURI.spec.substr(calculatedURI.spec.lastIndexOf("/") + 1);
       yield PlacesTestUtils.addVisits({
         uri: calculatedURI,
         transition: visitType,
         visitDate: dateInPeriod
       });
     }
 
@@ -194,18 +190,17 @@ AutoCompleteInput.prototype = {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
-add_task(function* test_frecency()
-{
+add_task(function* test_frecency() {
   // Disable autoFill for this test.
   Services.prefs.setBoolPref("browser.urlbar.autoFill", false);
   do_register_cleanup(() => Services.prefs.clearUserPref("browser.urlbar.autoFill"));
   for (let bucket of bucketPrefs) {
     yield task_initializeBucket(bucket);
   }
 
   // sort results by frecency
--- a/toolkit/components/places/tests/unit/test_317472.js
+++ b/toolkit/components/places/tests/unit/test_317472.js
@@ -5,23 +5,21 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const charset = "UTF-8";
 const CHARSET_ANNO = "URIProperties/characterSet";
 
 const TEST_URI = uri("http://foo.com");
 const TEST_BOOKMARKED_URI = uri("http://bar.com");
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   // add pages to history
   yield PlacesTestUtils.addVisits(TEST_URI);
   yield PlacesTestUtils.addVisits(TEST_BOOKMARKED_URI);
 
   // create bookmarks on TEST_BOOKMARKED_URI
   PlacesUtils.bookmarks.insertBookmark(
               PlacesUtils.unfiledBookmarksFolderId,
               TEST_BOOKMARKED_URI, PlacesUtils.bookmarks.DEFAULT_INDEX,
--- a/toolkit/components/places/tests/unit/test_385397.js
+++ b/toolkit/components/places/tests/unit/test_385397.js
@@ -1,23 +1,21 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* 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/. */
 
 const TOTAL_SITES = 20;
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   let now = (Date.now() - 10000) * 1000;
 
   for (let i = 0; i < TOTAL_SITES; i++) {
     let site = "http://www.test-" + i + ".com/";
     let testURI = uri(site);
     let testImageURI = uri(site + "blank.gif");
     let when = now + (i * TOTAL_SITES * 1000);
     yield PlacesTestUtils.addVisits([
--- a/toolkit/components/places/tests/unit/test_399264_query_to_string.js
+++ b/toolkit/components/places/tests/unit/test_399264_query_to_string.js
@@ -6,29 +6,27 @@
 
 /**
  * Obtains the id of the folder obtained from the query.
  *
  * @param aFolderID
  *        The id of the folder we want to generate a query for.
  * @returns the string representation of the query for the given folder.
  */
-function query_string(aFolderID)
-{
+function query_string(aFolderID) {
   var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
            getService(Ci.nsINavHistoryService);
 
   var query = hs.getNewQuery();
   query.setFolders([aFolderID], 1);
   var options = hs.getNewQueryOptions();
   return hs.queriesToQueryString([query], 1, options);
 }
 
-function run_test()
-{
+function run_test() {
   var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
            getService(Ci.nsINavBookmarksService);
 
   const QUERIES = [
       "folder=PLACES_ROOT"
     , "folder=BOOKMARKS_MENU"
     , "folder=TAGS"
     , "folder=UNFILED_BOOKMARKS"
--- a/toolkit/components/places/tests/unit/test_399264_string_to_query.js
+++ b/toolkit/components/places/tests/unit/test_399264_string_to_query.js
@@ -6,18 +6,17 @@
 
 /**
  * Obtains the id of the folder obtained from the query.
  *
  * @param aQuery
  *        The query to obtain the folder id from.
  * @returns the folder id of the folder of the root node of the query.
  */
-function folder_id(aQuery)
-{
+function folder_id(aQuery) {
   var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
            getService(Ci.nsINavHistoryService);
 
   dump("Checking query '" + aQuery + "'\n");
   var options = { };
   var queries = { };
   var size = { };
   hs.queryStringToQueries(aQuery, queries, size, options);
@@ -25,18 +24,17 @@ function folder_id(aQuery)
   var root = result.root;
   root.containerOpen = true;
   do_check_true(root.hasChildren);
   var folderID = root.getChild(0).parent.itemId;
   root.containerOpen = false;
   return folderID;
 }
 
-function run_test()
-{
+function run_test() {
   var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
            getService(Ci.nsINavBookmarksService);
 
   const QUERIES = [
       "place:folder=PLACES_ROOT"
     , "place:folder=BOOKMARKS_MENU"
     , "place:folder=TAGS"
     , "place:folder=UNFILED_BOOKMARKS"
--- a/toolkit/components/places/tests/unit/test_399266.js
+++ b/toolkit/components/places/tests/unit/test_399266.js
@@ -1,23 +1,21 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* 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/. */
 
 const TOTAL_SITES = 20;
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   let places = [];
   for (let i = 0; i < TOTAL_SITES; i++) {
     for (let j = 0; j <= i; j++) {
       places.push({ uri: uri("http://www.test-" + i + ".com/"),
                     transition: TRANSITION_TYPED });
         // because these are embedded visits, they should not show up on our
         // query results.  If they do, we have a problem.
       places.push({ uri: uri("http://www.hidden.com/hidden.gif"),
--- a/toolkit/components/places/tests/unit/test_402799.js
+++ b/toolkit/components/places/tests/unit/test_402799.js
@@ -12,18 +12,17 @@ try {
 } catch (ex) {
   do_throw("Could not get history services\n");
 }
 
 // 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 the nav-bookmarks-service\n");
 }
 
 // Get tagging service
 try {
   var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
                 getService(Ci.nsITaggingService);
 } catch (ex) {
--- a/toolkit/components/places/tests/unit/test_405497.js
+++ b/toolkit/components/places/tests/unit/test_405497.js
@@ -14,26 +14,24 @@ var bs = Cc["@mozilla.org/browser/nav-bo
 /**
  * The callback object for runInBatchMode.
  *
  * @param aService
  *        Takes a reference to the history service or the bookmark service.
  *        This determines which service should be called when calling the second
  *        runInBatchMode the second time.
  */
-function callback(aService)
-{
+function callback(aService) {
   this.callCount = 0;
   this.service = aService;
 }
 callback.prototype = {
   // nsINavHistoryBatchCallback
 
-  runBatched(aUserData)
-  {
+  runBatched(aUserData) {
     this.callCount++;
 
     if (this.callCount == 1) {
       // We want to call run in batched once more.
       this.service.runInBatchMode(this, null);
       return;
     }
 
--- a/toolkit/components/places/tests/unit/test_408221.js
+++ b/toolkit/components/places/tests/unit/test_408221.js
@@ -61,18 +61,17 @@ AutoCompleteInput.prototype = {
 // Get tagging service
 try {
   var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
                 getService(Ci.nsITaggingService);
 } catch (ex) {
   do_throw("Could not get tagging service\n");
 }
 
-function ensure_tag_results(uris, searchTerm)
-{
+function ensure_tag_results(uris, searchTerm) {
   var controller = Components.classes["@mozilla.org/autocomplete/controller;1"].
                    getService(Components.interfaces.nsIAutoCompleteController);
 
   // Make an AutoCompleteInput that uses our searches
   // and confirms results on search complete
   var input = new AutoCompleteInput(["unifiedcomplete"]);
 
   controller.input = input;
--- a/toolkit/components/places/tests/unit/test_412132.js
+++ b/toolkit/components/places/tests/unit/test_412132.js
@@ -6,18 +6,17 @@
 
 /*
  * TEST DESCRIPTION:
  *
  * Tests patch to Bug 412132:
  * https://bugzilla.mozilla.org/show_bug.cgi?id=412132
  */
 
-add_task(function* changeuri_unvisited_bookmark()
-{
+add_task(function* changeuri_unvisited_bookmark() {
   do_print("After changing URI of bookmark, frecency of bookmark's " +
            "original URI should be zero if original URI is unvisited and " +
            "no longer bookmarked.");
   const TEST_URI = NetUtil.newURI("http://example.com/1");
   let id = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                                                 TEST_URI,
                                                 PlacesUtils.bookmarks.DEFAULT_INDEX,
                                                 "bookmark title");
@@ -32,18 +31,17 @@ add_task(function* changeuri_unvisited_b
 
   do_print("Unvisited URI no longer bookmarked => frecency should = 0");
   do_check_eq(frecencyForUrl(TEST_URI), 0);
 
   yield PlacesUtils.bookmarks.eraseEverything();
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* changeuri_visited_bookmark()
-{
+add_task(function* changeuri_visited_bookmark() {
   do_print("After changing URI of bookmark, frecency of bookmark's " +
            "original URI should not be zero if original URI is visited.");
   const TEST_URI = NetUtil.newURI("http://example.com/1");
   let id = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                                                 TEST_URI,
                                                 PlacesUtils.bookmarks.DEFAULT_INDEX,
                                                 "bookmark title");
 
@@ -62,18 +60,17 @@ add_task(function* changeuri_visited_boo
 
   do_print("*Visited* URI no longer bookmarked => frecency should != 0");
   do_check_neq(frecencyForUrl(TEST_URI), 0);
 
   yield PlacesUtils.bookmarks.eraseEverything();
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* changeuri_bookmark_still_bookmarked()
-{
+add_task(function* changeuri_bookmark_still_bookmarked() {
   do_print("After changing URI of bookmark, frecency of bookmark's " +
            "original URI should not be zero if original URI is still " +
            "bookmarked.");
   const TEST_URI = NetUtil.newURI("http://example.com/1");
   let id1 = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                                                  TEST_URI,
                                                  PlacesUtils.bookmarks.DEFAULT_INDEX,
                                                  "bookmark 1 title");
@@ -93,26 +90,23 @@ add_task(function* changeuri_bookmark_st
 
   do_print("URI still bookmarked => frecency should != 0");
   do_check_neq(frecencyForUrl(TEST_URI), 0);
 
   yield PlacesUtils.bookmarks.eraseEverything();
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* changeuri_nonexistent_bookmark()
-{
+add_task(function* changeuri_nonexistent_bookmark() {
   do_print("Changing the URI of a nonexistent bookmark should fail.");
-  function tryChange(itemId)
-  {
+  function tryChange(itemId) {
     try {
       PlacesUtils.bookmarks.changeBookmarkURI(itemId + 1, uri("http://example.com/2"));
       do_throw("Nonexistent bookmark should throw.");
-    }
-    catch (ex) {}
+    } catch (ex) {}
   }
 
   // First try a straight-up bogus item ID, one greater than the current max
   // ID.
   let stmt = DBConn().createStatement("SELECT MAX(id) FROM moz_bookmarks");
   stmt.executeStep();
   let maxId = stmt.getInt32(0);
   stmt.finalize();
@@ -125,12 +119,11 @@ add_task(function* changeuri_nonexistent
                                                 "bookmark title");
   PlacesUtils.bookmarks.removeItem(id);
   tryChange(id);
 
   yield PlacesUtils.bookmarks.eraseEverything();
   yield PlacesTestUtils.clearHistory();
 });
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
--- a/toolkit/components/places/tests/unit/test_413784.js
+++ b/toolkit/components/places/tests/unit/test_413784.js
@@ -72,24 +72,22 @@ AutoCompleteInput.prototype = {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
-function run_test()
-{
+function run_test() {
   do_test_pending();
   PlacesTestUtils.addVisits(url).then(continue_test);
 }
 
-function continue_test()
-{
+function continue_test() {
   var controller = Components.classes["@mozilla.org/autocomplete/controller;1"].
                    getService(Components.interfaces.nsIAutoCompleteController);
 
   // Make an AutoCompleteInput that uses our searches
   // and confirms results on search complete
   var input = new AutoCompleteInput(["unifiedcomplete"]);
 
   controller.input = input;
--- a/toolkit/components/places/tests/unit/test_415460.js
+++ b/toolkit/components/places/tests/unit/test_415460.js
@@ -9,35 +9,32 @@ var hs = Cc["@mozilla.org/browser/nav-hi
 
 /**
  * Checks to see that a search has exactly one result in the database.
  *
  * @param aTerms
  *        The terms to search for.
  * @returns true if the search returns one result, false otherwise.
  */
-function search_has_result(aTerms)
-{
+function search_has_result(aTerms) {
   var options = hs.getNewQueryOptions();
   options.maxResults = 1;
   options.resultType = options.RESULTS_AS_URI;
   var query = hs.getNewQuery();
   query.searchTerms = aTerms;
   var result = hs.executeQuery(query, options);
   var root = result.root;
   root.containerOpen = true;
   var cc = root.childCount;
   root.containerOpen = false;
   return (cc == 1);
 }
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   const SEARCH_TERM = "ユニコード";
   const TEST_URL = "http://example.com/" + SEARCH_TERM + "/";
   yield PlacesTestUtils.addVisits(uri(TEST_URL));
   do_check_true(search_has_result(SEARCH_TERM));
 });
--- a/toolkit/components/places/tests/unit/test_415757.js
+++ b/toolkit/components/places/tests/unit/test_415757.js
@@ -23,23 +23,21 @@ function uri_in_db(aURI) {
   var cc = root.childCount;
   root.containerOpen = false;
   return (cc == 1);
 }
 
 const TOTAL_SITES = 20;
 
 // main
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   // add pages to global history
   for (let i = 0; i < TOTAL_SITES; i++) {
     let site = "http://www.test-" + i + ".com/";
     let testURI = uri(site);
     let when = Date.now() * 1000 + (i * TOTAL_SITES);
     yield PlacesTestUtils.addVisits({ uri: testURI, visitDate: when });
   }
   for (let i = 0; i < TOTAL_SITES; i++) {
--- a/toolkit/components/places/tests/unit/test_425563.js
+++ b/toolkit/components/places/tests/unit/test_425563.js
@@ -1,21 +1,19 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* 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/. */
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   let count_visited_URIs = ["http://www.test-link.com/",
                             "http://www.test-typed.com/",
                             "http://www.test-bookmark.com/",
                             "http://www.test-redirect-permanent.com/",
                             "http://www.test-redirect-temporary.com/"];
 
   let notcount_visited_URIs = ["http://www.test-embed.com/",
                                "http://www.test-download.com/",
--- a/toolkit/components/places/tests/unit/test_433525_hasChildren_crash.js
+++ b/toolkit/components/places/tests/unit/test_433525_hasChildren_crash.js
@@ -1,21 +1,19 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* 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/. */
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   try {
     var histsvc = Cc["@mozilla.org/browser/nav-history-service;1"].
                   getService(Ci.nsINavHistoryService);
     var bmsvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
               getService(Ci.nsINavBookmarksService);
   } catch (ex) {
     do_throw("Unable to initialize Places services");
   }
--- a/toolkit/components/places/tests/unit/test_452777.js
+++ b/toolkit/components/places/tests/unit/test_452777.js
@@ -7,30 +7,28 @@
 /**
  * This test ensures that when removing a folder within a transaction, undoing
  * the transaction restores it with the same id (as received by the observers).
  */
 
 var bs = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
          getService(Ci.nsINavBookmarksService);
 
-function run_test()
-{
+function run_test() {
   const TITLE = "test folder";
 
   // Create two test folders; remove the first one.  This ensures that undoing
   // the removal will not get the same id by chance (the insert id's can be
   // reused in SQLite).
   let id = bs.createFolder(bs.placesRoot, TITLE, -1);
   bs.createFolder(bs.placesRoot, "test folder 2", -1);
   let transaction = bs.getRemoveFolderTransaction(id);
   transaction.doTransaction();
 
   // Now check to make sure it gets added with the right id
   bs.addObserver({
-    onItemAdded(aItemId, aFolder, aIndex, aItemType, aURI, aTitle)
-    {
+    onItemAdded(aItemId, aFolder, aIndex, aItemType, aURI, aTitle) {
       do_check_eq(aItemId, id);
       do_check_eq(aTitle, TITLE);
     }
   }, false);
   transaction.undoTransaction();
 }
--- a/toolkit/components/places/tests/unit/test_454977.js
+++ b/toolkit/components/places/tests/unit/test_454977.js
@@ -3,21 +3,19 @@
 /* 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/. */
 
 // Cache actual visit_count value, filled by add_visit, used by check_results
 var visit_count = 0;
 
 // Returns the Place ID corresponding to an added visit.
-function* task_add_visit(aURI, aVisitType)
-{
+function* task_add_visit(aURI, aVisitType) {
   // Add the visit asynchronously, and save its visit ID.
-  let deferUpdatePlaces = new Promise((resolve, reject) =>
-  {
+  let deferUpdatePlaces = new Promise((resolve, reject) => {
     PlacesUtils.asyncHistory.updatePlaces({
       uri: aURI,
       visits: [{ transitionType: aVisitType, visitDate: Date.now() * 1000 }]
     }, {
       handleError: function TAV_handleError() {
         reject(new Error("Unexpected error in adding visit."));
       },
       handleResult(aPlaceInfo) {
@@ -56,18 +54,17 @@ function* task_add_visit(aURI, aVisitTyp
 
 /**
  * Checks for results consistency, using visit_count as constraint
  * @param   aExpectedCount
  *          Number of history results we are expecting (excluded hidden ones)
  * @param   aExpectedCountWithHidden
  *          Number of history results we are expecting (included hidden ones)
  */
-function check_results(aExpectedCount, aExpectedCountWithHidden)
-{
+function check_results(aExpectedCount, aExpectedCountWithHidden) {
   let query = PlacesUtils.history.getNewQuery();
   // used to check visit_count
   query.minVisits = visit_count;
   query.maxVisits = visit_count;
   let options = PlacesUtils.history.getNewQueryOptions();
   options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY;
   let root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
@@ -81,23 +78,21 @@ function check_results(aExpectedCount, a
   root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
   // Children with hidden ones
   do_check_eq(root.childCount, aExpectedCountWithHidden);
   root.containerOpen = false;
 }
 
 // main
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   const TEST_URI = uri("http://test.mozilla.org/");
 
   // Add a visit that force hidden
   yield task_add_visit(TEST_URI, TRANSITION_EMBED);
   check_results(0, 0);
 
   let placeId = yield task_add_visit(TEST_URI, TRANSITION_FRAMED_LINK);
   check_results(0, 1);
--- a/toolkit/components/places/tests/unit/test_463863.js
+++ b/toolkit/components/places/tests/unit/test_463863.js
@@ -35,23 +35,21 @@ function runQuery(aResultType) {
     let node = root.getChild(i);
     // Check that all transition types but EMBED and FRAMED appear in results
     do_check_neq(node.uri.substr(6, 1), TRANSITION_EMBED);
     do_check_neq(node.uri.substr(6, 1), TRANSITION_FRAMED_LINK);
   }
   root.containerOpen = false;
 }
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   // add visits, one for each transition type
   for (let transition of transitions) {
     yield PlacesTestUtils.addVisits({
       uri: uri("http://" + transition + ".mozilla.org/"),
       transition
     });
   }
 
--- a/toolkit/components/places/tests/unit/test_486978_sort_by_date_queries.js
+++ b/toolkit/components/places/tests/unit/test_486978_sort_by_date_queries.js
@@ -21,23 +21,21 @@ var pages = [
   "http://a.mozilla.org/3/",
   "http://a.mozilla.org/4/",
   "http://b.mozilla.org/5/",
   "http://b.mozilla.org/6/",
   "http://b.mozilla.org/7/",
   "http://b.mozilla.org/8/",
 ];
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_initialize()
-{
+add_task(function* test_initialize() {
   var noon = new Date();
   noon.setHours(12);
 
   // Add visits.
   for (let pageIndex = 0; pageIndex < pages.length; ++pageIndex) {
     let page = pages[pageIndex];
     yield PlacesTestUtils.addVisits({
       uri: uri(page),
--- a/toolkit/components/places/tests/unit/test_536081.js
+++ b/toolkit/components/places/tests/unit/test_536081.js
@@ -9,23 +9,21 @@ var hs = Cc["@mozilla.org/browser/nav-hi
 var bh = hs.QueryInterface(Ci.nsIBrowserHistory);
 var db = hs.QueryInterface(Ci.nsPIPlacesDatabase).DBConnection;
 
 const URLS = [
   { u: "http://www.google.com/search?q=testing%3Bthis&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:unofficial&client=firefox-a",
     s: "goog" },
 ];
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   for (let url of URLS) {
     yield task_test_url(url);
   }
 });
 
 function* task_test_url(aURL) {
   print("Testing url: " + aURL.u);
   yield PlacesTestUtils.addVisits(uri(aURL.u));
@@ -44,13 +42,12 @@ function* task_test_url(aURL) {
 }
 
 function check_empty_table(table_name) {
   print("Checking url has been removed.");
   let stmt = db.createStatement("SELECT count(*) FROM " + table_name);
   try {
     stmt.executeStep();
     do_check_eq(stmt.getInt32(0), 0);
-  }
-  finally {
+  } finally {
     stmt.finalize();
   }
 }
--- a/toolkit/components/places/tests/unit/test_adaptive.js
+++ b/toolkit/components/places/tests/unit/test_adaptive.js
@@ -63,18 +63,17 @@ AutoCompleteInput.prototype = {
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput])
 }
 
 /**
  * Checks that autocomplete results are ordered correctly.
  */
-function ensure_results(expected, searchTerm)
-{
+function ensure_results(expected, searchTerm) {
   let controller = Cc["@mozilla.org/autocomplete/controller;1"].
                    getService(Ci.nsIAutoCompleteController);
 
   // Make an AutoCompleteInput that uses our searches
   // and confirms results on search complete.
   let input = new AutoCompleteInput(["unifiedcomplete"]);
 
   controller.input = input;
@@ -93,18 +92,17 @@ function ensure_results(expected, search
   };
 
   controller.startSearch(searchTerm);
 }
 
 /**
  * Asynchronous task that bumps up the rank for an uri.
  */
-function* task_setCountRank(aURI, aCount, aRank, aSearch, aBookmark)
-{
+function* task_setCountRank(aURI, aCount, aRank, aSearch, aBookmark) {
   // Bump up the visit count for the uri.
   let visits = [];
   for (let i = 0; i < aCount; i++) {
     visits.push({ uri: aURI, visitDate: d1, transition: TRANSITION_TYPED });
   }
   yield PlacesTestUtils.addVisits(visits);
 
   // Make a nsIAutoCompleteController and friends for instrumentation feedback.
@@ -143,18 +141,17 @@ function* task_setCountRank(aURI, aCount
       PlacesUtils.tagging.tagURI(aURI, ["test_tag"]);
     }
   }
 }
 
 /**
  * Decay the adaptive entries by sending the daily idle topic.
  */
-function doAdaptiveDecay()
-{
+function doAdaptiveDecay() {
   PlacesUtils.history.runInBatchMode({
     runBatched() {
       for (let i = 0; i < 10; i++) {
         PlacesUtils.history.QueryInterface(Ci.nsIObserver)
                            .observe(null, "idle-daily", null);
       }
     }
   }, this);
@@ -172,18 +169,17 @@ var c2 = 1;
 var s0 = "";
 var s1 = "si";
 var s2 = "site";
 
 var observer = {
   results: null,
   search: null,
   runCount: -1,
-  observe(aSubject, aTopic, aData)
-  {
+  observe(aSubject, aTopic, aData) {
     if (--this.runCount > 0)
       return;
     ensure_results(this.results, this.search);
   }
 };
 Services.obs.addObserver(observer, PlacesUtils.TOPIC_FEEDBACK_UPDATED, false);
 
 /**
@@ -374,18 +370,17 @@ var tests = [
  * This deferred object contains a promise that is resolved when the
  * ensure_results function has finished its execution.
  */
 var deferEnsureResults;
 
 /**
  * Test adaptive autocomplete.
  */
-add_task(function* test_adaptive()
-{
+add_task(function* test_adaptive() {
   // Disable autoFill for this test.
   Services.prefs.setBoolPref("browser.urlbar.autoFill", false);
   do_register_cleanup(() => Services.prefs.clearUserPref("browser.urlbar.autoFill"));
   for (let test of tests) {
     // Cleanup.
     PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.unfiledBookmarksFolderId);
     PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.tagsFolderId);
     observer.runCount = -1;
--- a/toolkit/components/places/tests/unit/test_annotations.js
+++ b/toolkit/components/places/tests/unit/test_annotations.js
@@ -45,23 +45,21 @@ var annoObserver = {
   ITEM_lastRemoved_AnnoName: "",
   onItemAnnotationRemoved(aItemId, aName) {
     this.ITEM_lastRemoved_Id = aItemId;
     this.ITEM_lastRemoved_AnnoName = aName;
   }
 };
 
 // main
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   var testURI = uri("http://mozilla.com/");
   var testItemId = bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, testURI, -1, "");
   var testAnnoName = "moz-test-places/annotations";
   var testAnnoVal = "test";
 
   annosvc.addObserver(annoObserver);
   // create new string annotation
   try {
@@ -287,27 +285,25 @@ add_task(function* test_execute()
   do_check_eq(annosvc.getPagesWithAnnotation(int32Key).length, 0);
 
   // Setting item annotations on invalid item ids should throw
   var invalidIds = [-1, 0, 37643];
   for (var id of invalidIds) {
     try {
       annosvc.setItemAnnotation(id, "foo", "bar", 0, 0);
       do_throw("setItemAnnotation* should throw for invalid item id: " + id)
-    }
-    catch (ex) { }
+    } catch (ex) { }
   }
 
   // setting an annotation with EXPIRE_HISTORY for an item should throw
   itemId = bmsvc.insertBookmark(bmsvc.bookmarksMenuFolder, testURI, -1, "");
   try {
     annosvc.setItemAnnotation(itemId, "foo", "bar", 0, annosvc.EXPIRE_WITH_HISTORY);
     do_throw("setting an item annotation with EXPIRE_HISTORY should throw");
-  }
-  catch (ex) {
+  } catch (ex) {
   }
 
   annosvc.removeObserver(annoObserver);
 });
 
 add_test(function test_getAnnotationsHavingName() {
   let uri = NetUtil.newURI("http://cat.mozilla.org");
   let id = PlacesUtils.bookmarks.insertBookmark(
@@ -347,17 +343,16 @@ add_test(function test_getAnnotationsHav
         do_check_true(result.itemId > 0);
 
       if (result.itemId != -1) {
         if (result.uri)
           do_check_eq(result.itemId, id);
         else
           do_check_eq(result.itemId, fid);
         do_check_guid_for_bookmark(result.itemId, result.guid);
-      }
-      else {
+      } else {
         do_check_guid_for_uri(result.uri, result.guid);
       }
     }
   }
 
   run_next_test();
 });
--- a/toolkit/components/places/tests/unit/test_asyncExecuteLegacyQueries.js
+++ b/toolkit/components/places/tests/unit/test_asyncExecuteLegacyQueries.js
@@ -63,26 +63,24 @@ function test_bookmarks_query() {
     handleCompletion(aReason) {
       run_next_test();
     },
   });
 },
 
 ];
 
-function bookmark(aURI, aTitle)
-{
+function bookmark(aURI, aTitle) {
   PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                                        aURI,
                                        PlacesUtils.bookmarks.DEFAULT_INDEX,
                                        aTitle);
 }
 
-function run_test()
-{
+function run_test() {
   do_test_pending();
   run_next_test();
 }
 
 function run_next_test() {
   if (tests.length == 0) {
     do_test_finished();
     return;
--- a/toolkit/components/places/tests/unit/test_async_history_api.js
+++ b/toolkit/components/places/tests/unit/test_async_history_api.js
@@ -80,32 +80,30 @@ TitleChangedObserver.prototype = {
  * @param aURI
  *        The URI of the page we expect a notification for.
  * @param aCallback
  *        The method to call when we have gotten the proper notification about
  *        being visited.
  */
 function VisitObserver(aURI,
                        aGUID,
-                       aCallback)
-{
+                       aCallback) {
   this.uri = aURI;
   this.guid = aGUID;
   this.callback = aCallback;
 }
 VisitObserver.prototype = {
   __proto__: NavHistoryObserver.prototype,
   onVisit(aURI,
                     aVisitId,
                     aTime,
                     aSessionId,
                     aReferringId,
                     aTransitionType,
-                    aGUID)
-  {
+                    aGUID) {
     do_print("onVisit(" + aURI.spec + ", " + aVisitId + ", " + aTime +
              ", " + aSessionId + ", " + aReferringId + ", " +
              aTransitionType + ", " + aGUID + ")");
     if (!this.uri.equals(aURI) || this.guid != aGUID) {
       return;
     }
     this.callback(aTime, aTransitionType);
   },
@@ -115,18 +113,17 @@ VisitObserver.prototype = {
  * Tests that a title was set properly in the database.
  *
  * @param aURI
  *        The uri to check.
  * @param aTitle
  *        The expected title in the database.
  */
 function do_check_title_for_uri(aURI,
-                                aTitle)
-{
+                                aTitle) {
   let stack = Components.stack.caller;
   let stmt = DBConn().createStatement(
     `SELECT title
      FROM moz_places
      WHERE url_hash = hash(:url) AND url = :url`
   );
   stmt.params.url = aURI.spec;
   do_check_true(stmt.executeStep(), stack);
@@ -146,66 +143,62 @@ add_task(function* test_invalid_uri_thro
   let place = {
     visits: [
       new VisitInfo(),
     ],
   };
   try {
     yield promiseUpdatePlaces(place);
     do_throw("Should have thrown!");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
   }
 
   // Now, test other bogus things.
   const TEST_VALUES = [
     null,
     undefined,
     {},
     [],
     TEST_DOMAIN + "test_invalid_id_throws",
   ];
   for (let i = 0; i < TEST_VALUES.length; i++) {
     place.uri = TEST_VALUES[i];
     try {
       yield promiseUpdatePlaces(place);
       do_throw("Should have thrown!");
-    }
-    catch (e) {
+    } catch (e) {
       do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
     }
   }
 });
 
 add_task(function* test_invalid_places_throws() {
   // First, test passing in nothing.
   try {
     PlacesUtils.asyncHistory.updatePlaces();
     do_throw("Should have thrown!");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_eq(e.result, Cr.NS_ERROR_XPC_NOT_ENOUGH_ARGS);
   }
 
   // Now, test other bogus things.
   const TEST_VALUES = [
     null,
     undefined,
     {},
     [],
     "",
   ];
   for (let i = 0; i < TEST_VALUES.length; i++) {
     let value = TEST_VALUES[i];
     try {
       yield promiseUpdatePlaces(value);
       do_throw("Should have thrown!");
-    }
-    catch (e) {
+    } catch (e) {
       do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
     }
   }
 });
 
 add_task(function* test_invalid_guid_throws() {
   // First check invalid length guid.
   let place = {
@@ -213,29 +206,27 @@ add_task(function* test_invalid_guid_thr
     uri: NetUtil.newURI(TEST_DOMAIN + "test_invalid_guid_throws"),
     visits: [
       new VisitInfo(),
     ],
   };
   try {
     yield promiseUpdatePlaces(place);
     do_throw("Should have thrown!");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
   }
 
   // Now check invalid character guid.
   place.guid = "__BADGUID+__";
   do_check_eq(place.guid.length, 12);
   try {
     yield promiseUpdatePlaces(place);
     do_throw("Should have thrown!");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
   }
 });
 
 add_task(function* test_no_visits_throws() {
   const TEST_URI =
     NetUtil.newURI(TEST_DOMAIN + "test_no_id_or_guid_no_visits_throws");
   const TEST_GUID = "_RANDOMGUID_";
@@ -260,18 +251,17 @@ add_task(function* test_no_visits_throws
 
       for (let visits = 1; visits >= 0; visits--) {
         place.visits = visits ? [] : undefined;
 
         log_test_conditions(place);
         try {
           yield promiseUpdatePlaces(place);
           do_throw("Should have thrown!");
-        }
-        catch (e) {
+        } catch (e) {
           do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
         }
       }
     }
   }
 });
 
 add_task(function* test_add_visit_no_date_throws() {
@@ -280,63 +270,59 @@ add_task(function* test_add_visit_no_dat
     visits: [
       new VisitInfo(),
     ],
   };
   delete place.visits[0].visitDate;
   try {
     yield promiseUpdatePlaces(place);
     do_throw("Should have thrown!");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
   }
 });
 
 add_task(function* test_add_visit_no_transitionType_throws() {
   let place = {
     uri: NetUtil.newURI(TEST_DOMAIN + "test_add_visit_no_transitionType_throws"),
     visits: [
       new VisitInfo(),
     ],
   };
   delete place.visits[0].transitionType;
   try {
     yield promiseUpdatePlaces(place);
     do_throw("Should have thrown!");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
   }
 });
 
 add_task(function* test_add_visit_invalid_transitionType_throws() {
   // First, test something that has a transition type lower than the first one.
   let place = {
     uri: NetUtil.newURI(TEST_DOMAIN +
                         "test_add_visit_invalid_transitionType_throws"),
     visits: [
       new VisitInfo(TRANSITION_LINK - 1),
     ],
   };
   try {
     yield promiseUpdatePlaces(place);
     do_throw("Should have thrown!");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
   }
 
   // Now, test something that has a transition type greater than the last one.
   place.visits[0] = new VisitInfo(TRANSITION_RELOAD + 1);
   try {
     yield promiseUpdatePlaces(place);
     do_throw("Should have thrown!");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_eq(e.result, Cr.NS_ERROR_INVALID_ARG);
   }
 });
 
 add_task(function* test_non_addable_uri_errors() {
   // Array of protocols that nsINavHistoryService::canAddURI returns false for.
   const URLS = [
     "about:config",
@@ -358,18 +344,17 @@ add_task(function* test_non_addable_uri_
       let place = {
         uri: NetUtil.newURI(url),
         title: "test for " + url,
         visits: [
           new VisitInfo(),
         ],
       };
       places.push(place);
-    }
-    catch (e) {
+    } catch (e) {
       if (e.result != Cr.NS_ERROR_FAILURE) {
         throw e;
       }
       // NetUtil.newURI() can throw if e.g. our app knows about imap://
       // but the account is not set up and so the URL is invalid for us.
       // Note this in the log but ignore as it's not the subject of this test.
       do_print("Could not construct URI for '" + url + "'; ignoring");
     }
@@ -663,19 +648,18 @@ add_task(function* test_add_visit() {
     // undefined.
     if (visit.transitionType == TRANSITION_EMBED) {
       // Check mozIPlaceInfo properties.
       do_check_eq(placeInfo.placeId, 0, '//');
       do_check_eq(placeInfo.guid, null);
 
       // Check mozIVisitInfo properties.
       do_check_eq(visit.visitId, 0);
-    }
-    // But they should be valid for non-embed visits.
-    else {
+    } else {
+      // But they should be valid for non-embed visits.
       // Check mozIPlaceInfo properties.
       do_check_true(placeInfo.placeId > 0);
       do_check_valid_places_guid(placeInfo.guid);
 
       // Check mozIVisitInfo properties.
       do_check_true(visit.visitId > 0);
     }
 
@@ -1061,18 +1045,17 @@ add_task(function* test_callbacks_not_su
       let place = {
         uri: NetUtil.newURI(url),
         title: "test for " + url,
         visits: [
           new VisitInfo(),
         ],
       };
       places.push(place);
-    }
-    catch (e) {
+    } catch (e) {
       if (e.result != Cr.NS_ERROR_FAILURE) {
         throw e;
       }
       // NetUtil.newURI() can throw if e.g. our app knows about imap://
       // but the account is not set up and so the URL is invalid for us.
       // Note this in the log but ignore as it's not the subject of this test.
       do_print("Could not construct URI for '" + url + "'; ignoring");
     }
@@ -1107,12 +1090,11 @@ add_task(function* test_typed_hidden_not
     "SELECT hidden, typed FROM moz_places WHERE url_hash = hash(:url) AND url = :url",
     { url: "http://mozilla.org/" });
   Assert.equal(rows[0].getResultByName("typed"), 1,
                "The page should be marked as typed");
   Assert.equal(rows[0].getResultByName("hidden"), 0,
                "The page should be marked as not hidden");
 });
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
--- a/toolkit/components/places/tests/unit/test_async_transactions.js
+++ b/toolkit/components/places/tests/unit/test_async_transactions.js
@@ -176,18 +176,17 @@ function ensureItemsAdded(...items) {
 }
 
 function ensureItemsRemoved(...items) {
   Assert.equal(observer.itemsRemoved.size, items.length);
   for (let item of items) {
     // We accept both guids and full info object here.
     if (typeof(item) == "string") {
       Assert.ok(observer.itemsRemoved.has(item));
-    }
-    else {
+    } else {
       Assert.ok(observer.itemsRemoved.has(item.guid));
       let info = observer.itemsRemoved.get(item.guid);
       Assert.equal(info.parentGuid, item.parentGuid);
       if ("index" in item)
         Assert.equal(info.index, item.index);
     }
   }
 }
@@ -277,33 +276,29 @@ function* ensureEqualBookmarksTrees(aOri
     if (property == "children") {
       Assert.equal(aOriginal.children.length, aNew.children.length);
       for (let i = 0; i < aOriginal.children.length; i++) {
         yield ensureEqualBookmarksTrees(aOriginal.children[i],
                                         aNew.children[i],
                                         false,
                                         true);
       }
-    }
-    else if (property == "guid") {
+    } else if (property == "guid") {
       // guid shouldn't be copied if the item was not restored.
       Assert.notEqual(aOriginal.guid, aNew.guid);
-    }
-    else if (property == "dateAdded") {
+    } else if (property == "dateAdded") {
       // dateAdded shouldn't be copied if the item was not restored.
       Assert.ok(is_time_ordered(aOriginal.dateAdded, aNew.dateAdded));
-    }
-    else if (property == "lastModified") {
+    } else if (property == "lastModified") {
       // same same, except for the never-changed case
       if (!aOriginal.lastModified)
         Assert.ok(!aNew.lastModified);
       else
         Assert.ok(is_time_ordered(aOriginal.lastModified, aNew.lastModified));
-    }
-    else if (aCheckParentAndPosition ||
+    } else if (aCheckParentAndPosition ||
              (property != "parentGuid" && property != "index")) {
       Assert.deepEqual(aOriginal[property], aNew[property]);
     }
   }
 
   if (isLivemarkTree(aNew))
     yield ensureLivemarkCreatedByAddLivemark(aNew.guid);
 }
@@ -323,18 +318,17 @@ function* ensureNonExistent(...aGuids) {
 }
 
 add_task(function* test_recycled_transactions() {
   function* ensureTransactThrowsFor(aTransaction) {
     let [txns, undoPosition] = getTransactionsHistoryState();
     try {
       yield aTransaction.transact();
       do_throw("Shouldn't be able to use the same transaction twice");
-    }
-    catch (ex) { }
+    } catch (ex) { }
     ensureUndoState(txns, undoPosition);
   }
 
   let txn_a = PT.NewFolder(createTestFolderInfo());
   yield txn_a.transact();
   ensureUndoState([[txn_a]], 0);
   yield ensureTransactThrowsFor(txn_a);
 
@@ -346,18 +340,17 @@ add_task(function* test_recycled_transac
   ensureUndoState();
   ensureTransactThrowsFor(txn_a);
 
   let txn_b = PT.NewFolder(createTestFolderInfo());
   yield PT.batch(function* () {
     try {
       yield txn_a.transact();
       do_throw("Shouldn't be able to use the same transaction twice");
-    }
-    catch (ex) { }
+    } catch (ex) { }
     ensureUndoState();
     yield txn_b.transact();
   });
   ensureUndoState([[txn_b]], 0);
 
   yield PT.undo();
   ensureUndoState([[txn_b]], 1);
   ensureTransactThrowsFor(txn_a);
@@ -1209,22 +1202,20 @@ add_task(function* test_untag_uri() {
     ensureTagsForURI(bm_info_b.url, [bm_info_b.tag]);
   });
 
   function* doTest(aInfo) {
     let urls, tagsRemoved;
     if (aInfo instanceof Ci.nsIURI) {
       urls = [aInfo];
       tagsRemoved = [];
-    }
-    else if (Array.isArray(aInfo)) {
+    } else if (Array.isArray(aInfo)) {
       urls = aInfo;
       tagsRemoved = [];
-    }
-    else {
+    } else {
       urls = "url" in aInfo ? [aInfo.url] : aInfo.urls;
       tagsRemoved = "tag" in aInfo ? [aInfo.tag] : aInfo.tags;
     }
 
     let preRemovalTags = new Map();
     for (let url of urls) {
       preRemovalTags.set(url, tagssvc.getTagsForURI(url));
     }
@@ -1580,23 +1571,23 @@ add_task(function* test_copy_excluding_a
   };
 
   yield ensureAnnosSet(folderGuid, "a", "b", "c");
 
   let excluding_a_dupeGuid =
     yield PT.Copy({ guid: folderGuid
                   , newParentGuid: rootGuid
                   , excludingAnnotation: "a" }).transact();
-  yield ensureAnnosSet(excluding_a_dupeGuid,  "b", "c");
+  yield ensureAnnosSet(excluding_a_dupeGuid, "b", "c");
 
   let excluding_ac_dupeGuid =
     yield PT.Copy({ guid: folderGuid
                   , newParentGuid: rootGuid
                   , excludingAnnotations: ["a", "c"] }).transact();
-  yield ensureAnnosSet(excluding_ac_dupeGuid,  "b");
+  yield ensureAnnosSet(excluding_ac_dupeGuid, "b");
 
   // Cleanup
   yield PT.undo();
   yield PT.undo();
   yield PT.undo();
   yield PT.clearTransactionsHistory();
 });
 
--- a/toolkit/components/places/tests/unit/test_autocomplete_stopSearch_no_throw.js
+++ b/toolkit/components/places/tests/unit/test_autocomplete_stopSearch_no_throw.js
@@ -13,27 +13,24 @@
 
 var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
           getService(Ci.nsINavHistoryService);
 var ac = Cc["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"].
          getService(Ci.nsIAutoCompleteSearch);
 
 // Test Functions
 
-function test_stopSearch()
-{
+function test_stopSearch() {
   try {
     ac.stopSearch();
-  }
-  catch (e) {
+  } catch (e) {
     do_throw("we should not have caught anything!");
   }
 }
 
 // Test Runner
 
 var tests = [
   test_stopSearch,
 ];
-function run_test()
-{
+function run_test() {
   tests.forEach(test => test());
 }
--- a/toolkit/components/places/tests/unit/test_bookmarks_html.js
+++ b/toolkit/components/places/tests/unit/test_bookmarks_html.js
@@ -68,18 +68,17 @@ var test_bookmarks = {
   ]
 };
 
 // Pre-Places bookmarks.html file pointer.
 var gBookmarksFileOld;
 // Places bookmarks.html file pointer.
 var gBookmarksFileNew;
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
 add_task(function* setup() {
   // Avoid creating smart bookmarks during the test.
   Services.prefs.setIntPref("browser.places.smartBookmarksVersion", -1);
 
   // File pointer to legacy bookmarks file.
@@ -101,32 +100,30 @@ add_task(function* setup() {
   yield PlacesTestUtils.promiseAsyncUpdates();
   yield testImportedBookmarks();
 
   yield BookmarkHTMLUtils.exportToFile(gBookmarksFileNew);
   yield PlacesTestUtils.promiseAsyncUpdates();
   yield PlacesUtils.bookmarks.eraseEverything();
 });
 
-add_task(function* test_import_new()
-{
+add_task(function* test_import_new() {
   // Test importing a Places bookmarks.html file.
   // 1. import bookmarks.exported.html
   // 2. run the test-suite
   yield BookmarkHTMLUtils.importFromFile(gBookmarksFileNew, true);
   yield PlacesTestUtils.promiseAsyncUpdates();
 
   yield testImportedBookmarks();
   yield PlacesTestUtils.promiseAsyncUpdates();
 
   yield PlacesUtils.bookmarks.eraseEverything();
 });
 
-add_task(function* test_emptytitle_export()
-{
+add_task(function* test_emptytitle_export() {
   // Test exporting and importing with an empty-titled bookmark.
   // 1. import bookmarks
   // 2. create an empty-titled bookmark.
   // 3. export to bookmarks.exported.html
   // 4. empty bookmarks db
   // 5. import bookmarks.exported.html
   // 6. run the test-suite
   // 7. remove the empty-titled bookmark
@@ -161,18 +158,17 @@ add_task(function* test_emptytitle_expor
   Assert.equal(reimportedBookmark.url.href, bookmark.url.href);
   yield PlacesUtils.bookmarks.remove(reimportedBookmark);
 
   yield BookmarkHTMLUtils.exportToFile(gBookmarksFileNew);
   yield PlacesTestUtils.promiseAsyncUpdates();
   yield PlacesUtils.bookmarks.eraseEverything();
 });
 
-add_task(function* test_import_chromefavicon()
-{
+add_task(function* test_import_chromefavicon() {
   // Test exporting and importing with a bookmark pointing to a chrome favicon.
   // 1. import bookmarks
   // 2. create a bookmark pointing to a chrome favicon.
   // 3. export to bookmarks.exported.html
   // 4. empty bookmarks db
   // 5. import bookmarks.exported.html
   // 6. run the test-suite
   // 7. remove the bookmark pointing to a chrome favicon.
@@ -243,18 +239,17 @@ add_task(function* test_import_chromefav
   });
   yield PlacesUtils.bookmarks.remove(reimportedBookmark);
 
   yield BookmarkHTMLUtils.exportToFile(gBookmarksFileNew);
   yield PlacesTestUtils.promiseAsyncUpdates();
   yield PlacesUtils.bookmarks.eraseEverything();
 });
 
-add_task(function* test_import_ontop()
-{
+add_task(function* test_import_ontop() {
   // Test importing the exported bookmarks.html file *on top of* the existing
   // bookmarks.
   // 1. empty bookmarks db
   // 2. import the exported bookmarks file
   // 3. export to file
   // 3. import the exported bookmarks file
   // 4. run the test-suite
 
@@ -265,18 +260,17 @@ add_task(function* test_import_ontop()
 
   yield BookmarkHTMLUtils.importFromFile(gBookmarksFileNew, true);
   yield PlacesTestUtils.promiseAsyncUpdates();
   yield testImportedBookmarks();
   yield PlacesTestUtils.promiseAsyncUpdates();
   yield PlacesUtils.bookmarks.eraseEverything();
 });
 
-function* testImportedBookmarks()
-{
+function* testImportedBookmarks() {
   for (let group in test_bookmarks) {
     do_print("[testImportedBookmarks()] Checking group '" + group + "'");
 
     let root;
     switch (group) {
       case "menu":
         root = PlacesUtils.getFolderContents(PlacesUtils.bookmarksMenuFolderId).root;
         break;
@@ -294,18 +288,17 @@ function* testImportedBookmarks()
     for (let key in items) {
       yield checkItem(items[key], root.getChild(key));
     }
 
     root.containerOpen = false;
   }
 }
 
-function* checkItem(aExpected, aNode)
-{
+function* checkItem(aExpected, aNode) {
   let id = aNode.itemId;
 
   return Task.spawn(function* () {
     for (let prop in aExpected) {
       switch (prop) {
         case "type":
           do_check_eq(aNode.type, aExpected.type);
           break;
--- a/toolkit/components/places/tests/unit/test_bookmarks_html_singleframe.js
+++ b/toolkit/components/places/tests/unit/test_bookmarks_html_singleframe.js
@@ -4,23 +4,21 @@
  * 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/. */
 
 // Test for bug #801450
 
 // Get Services
 Cu.import("resource://gre/modules/BookmarkHTMLUtils.jsm");
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_bookmarks_html_singleframe()
-{
+add_task(function* test_bookmarks_html_singleframe() {
   let bookmarksFile = OS.Path.join(do_get_cwd().path, "bookmarks_html_singleframe.html");
   yield BookmarkHTMLUtils.importFromFile(bookmarksFile, true);
 
   let root = PlacesUtils.getFolderContents(PlacesUtils.bookmarksMenuFolderId).root;
   do_check_eq(root.childCount, 1);
   let folder = root.getChild(0);
   PlacesUtils.asContainer(folder).containerOpen = true;
   do_check_eq(folder.title, "Subtitle");
--- a/toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js
+++ b/toolkit/components/places/tests/unit/test_broken_folderShortcut_result.js
@@ -1,18 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   PlacesUtils.bookmarks.insertBookmark(
     PlacesUtils.unfiledBookmarksFolderId, NetUtil.newURI("http://1.moz.org/"),
     PlacesUtils.bookmarks.DEFAULT_INDEX, "Bookmark 1"
   );
   let id1 = PlacesUtils.bookmarks.insertBookmark(
     PlacesUtils.unfiledBookmarksFolderId, NetUtil.newURI("place:folder=1234"),
     PlacesUtils.bookmarks.DEFAULT_INDEX, "Shortcut 1"
   );
--- a/toolkit/components/places/tests/unit/test_childlessTags.js
+++ b/toolkit/components/places/tests/unit/test_childlessTags.js
@@ -103,15 +103,14 @@ function ensureTagsExist(aTags) {
     var indexOfTag = tags.indexOf(tag);
     do_check_true(indexOfTag >= 0);
     tags.splice(indexOfTag, 1);
   }
 
   resultRoot.containerOpen = false;
 }
 
-function run_test()
-{
+function run_test() {
   tests.forEach(function(test) {
     print("Running test: " + test.desc);
     test.run();
   });
 }
--- a/toolkit/components/places/tests/unit/test_crash_476292.js
+++ b/toolkit/components/places/tests/unit/test_crash_476292.js
@@ -5,18 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * This tests a crash during startup found in bug 476292 that was caused by
  * getting the bookmarks service during nsNavHistory::Init when the bookmarks
  * service was created before the history service was.
  */
 
-function run_test()
-{
+function run_test() {
   // First, we need to move our old database file into our test profile
   // directory.  This will trigger DATABASE_STATUS_UPGRADED (CREATE is not
   // sufficient since there will be no entries to update frecencies for, which
   // causes us to get the bookmarks service in the first place).
   let dbFile = do_get_file("bug476292.sqlite");
   let profD = Cc["@mozilla.org/file/directory_service;1"].
              getService(Ci.nsIProperties).
              get(NS_APP_USER_PROFILE_50_DIR, Ci.nsIFile);
--- a/toolkit/components/places/tests/unit/test_download_history.js
+++ b/toolkit/components/places/tests/unit/test_download_history.js
@@ -59,31 +59,28 @@ function waitForOnDeleteVisits(aCallback
     onDeleteVisits: function HO_onDeleteVisits() {
       PlacesUtils.history.removeObserver(this);
       aCallback.apply(null, arguments);
     }
   };
   PlacesUtils.history.addObserver(historyObserver, false);
 }
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_test(function test_dh_is_from_places()
-{
+add_test(function test_dh_is_from_places() {
   // Test that this nsIDownloadHistory is the one places implements.
   do_check_true(gDownloadHistory instanceof Ci.mozIAsyncHistory);
 
   run_next_test();
 });
 
-add_test(function test_dh_addRemoveDownload()
-{
+add_test(function test_dh_addRemoveDownload() {
   waitForOnVisit(function DHAD_onVisit(aURI) {
     do_check_true(aURI.equals(DOWNLOAD_URI));
 
     // Verify that the URI is already available in results at this time.
     do_check_true(!!page_in_database(DOWNLOAD_URI));
 
     waitForOnDeleteURI(function DHRAD_onDeleteURI(aDeletedURI) {
       do_check_true(aDeletedURI.equals(DOWNLOAD_URI));
@@ -94,18 +91,17 @@ add_test(function test_dh_addRemoveDownl
       run_next_test();
     });
     gDownloadHistory.removeAllDownloads();
   });
 
   gDownloadHistory.addDownload(DOWNLOAD_URI, null, Date.now() * 1000);
 });
 
-add_test(function test_dh_addMultiRemoveDownload()
-{
+add_test(function test_dh_addMultiRemoveDownload() {
   PlacesTestUtils.addVisits({
     uri: DOWNLOAD_URI,
     transition: TRANSITION_TYPED
   }).then(function() {
     waitForOnVisit(function DHAD_onVisit(aURI) {
       do_check_true(aURI.equals(DOWNLOAD_URI));
       do_check_true(!!page_in_database(DOWNLOAD_URI));
 
@@ -117,18 +113,17 @@ add_test(function test_dh_addMultiRemove
       });
       gDownloadHistory.removeAllDownloads();
     });
 
     gDownloadHistory.addDownload(DOWNLOAD_URI, null, Date.now() * 1000);
   });
 });
 
-add_test(function test_dh_addBookmarkRemoveDownload()
-{
+add_test(function test_dh_addBookmarkRemoveDownload() {
   PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                                        DOWNLOAD_URI,
                                        PlacesUtils.bookmarks.DEFAULT_INDEX,
                                        "A bookmark");
   waitForOnVisit(function DHAD_onVisit(aURI) {
     do_check_true(aURI.equals(DOWNLOAD_URI));
     do_check_true(!!page_in_database(DOWNLOAD_URI));
 
@@ -139,18 +134,17 @@ add_test(function test_dh_addBookmarkRem
       PlacesTestUtils.clearHistory().then(run_next_test);
     });
     gDownloadHistory.removeAllDownloads();
   });
 
   gDownloadHistory.addDownload(DOWNLOAD_URI, null, Date.now() * 1000);
 });
 
-add_test(function test_dh_addDownload_referrer()
-{
+add_test(function test_dh_addDownload_referrer() {
   waitForOnVisit(function DHAD_prepareReferrer(aURI, aVisitID) {
     do_check_true(aURI.equals(REFERRER_URI));
     let referrerVisitId = aVisitID;
 
     waitForOnVisit(function DHAD_onVisit(aVisitedURI, unused, unused2, unused3,
                                          aReferringID) {
       do_check_true(aVisitedURI.equals(DOWNLOAD_URI));
       do_check_eq(aReferringID, referrerVisitId);
@@ -170,18 +164,17 @@ add_test(function test_dh_addDownload_re
     uri: REFERRER_URI,
     visits: [{
       transitionType: Ci.nsINavHistoryService.TRANSITION_TYPED,
       visitDate: Date.now() * 1000
     }]
   });
 });
 
-add_test(function test_dh_addDownload_disabledHistory()
-{
+add_test(function test_dh_addDownload_disabledHistory() {
   waitForOnVisit(function DHAD_onVisit(aURI) {
     // We should only receive the notification for the non-private URI.  This
     // test is based on the assumption that visit notifications are received in
     // the same order of the addDownload calls, which is currently true because
     // database access is serialized on the same worker thread.
     do_check_true(aURI.equals(DOWNLOAD_URI));
 
     do_check_true(!!page_in_database(DOWNLOAD_URI));
@@ -199,46 +192,42 @@ add_test(function test_dh_addDownload_di
   Services.prefs.setBoolPref("places.history.enabled", true);
   gDownloadHistory.addDownload(DOWNLOAD_URI, REFERRER_URI, Date.now() * 1000);
 });
 
 /**
  * Tests that nsIDownloadHistory::AddDownload saves the additional download
  * details if the optional destination URL is specified.
  */
-add_test(function test_dh_details()
-{
+add_test(function test_dh_details() {
   const REMOTE_URI = NetUtil.newURI("http://localhost/");
   const SOURCE_URI = NetUtil.newURI("http://example.com/test_dh_details");
   const DEST_FILE_NAME = "dest.txt";
 
   // We must build a real, valid file URI for the destination.
   let destFileUri = NetUtil.newURI(FileUtils.getFile("TmpD", [DEST_FILE_NAME]));
 
   let titleSet = false;
   let destinationFileUriSet = false;
   let destinationFileNameSet = false;
 
-  function checkFinished()
-  {
+  function checkFinished() {
     if (titleSet && destinationFileUriSet && destinationFileNameSet) {
       PlacesUtils.annotations.removeObserver(annoObserver);
       PlacesUtils.history.removeObserver(historyObserver);
 
       PlacesTestUtils.clearHistory().then(run_next_test);
     }
   }
 
   let annoObserver = {
-    onPageAnnotationSet: function AO_onPageAnnotationSet(aPage, aName)
-    {
+    onPageAnnotationSet: function AO_onPageAnnotationSet(aPage, aName) {
       if (aPage.equals(SOURCE_URI)) {
         let value = PlacesUtils.annotations.getPageAnnotation(aPage, aName);
-        switch (aName)
-        {
+        switch (aName) {
           case "downloads/destinationFileURI":
             destinationFileUriSet = true;
             do_check_eq(value, destFileUri.spec);
             break;
           case "downloads/destinationFileName":
             destinationFileNameSet = true;
             do_check_eq(value, DEST_FILE_NAME);
             break;
@@ -250,18 +239,17 @@ add_test(function test_dh_details()
     onPageAnnotationRemoved() {},
     onItemAnnotationRemoved() {}
   }
 
   let historyObserver = {
     onBeginUpdateBatch() {},
     onEndUpdateBatch() {},
     onVisit() {},
-    onTitleChanged: function HO_onTitleChanged(aURI, aPageTitle)
-    {
+    onTitleChanged: function HO_onTitleChanged(aURI, aPageTitle) {
       if (aURI.equals(SOURCE_URI)) {
         titleSet = true;
         do_check_eq(aPageTitle, DEST_FILE_NAME);
         checkFinished();
       }
     },
     onDeleteURI() {},
     onClearHistory() {},
--- a/toolkit/components/places/tests/unit/test_frecency.js
+++ b/toolkit/components/places/tests/unit/test_frecency.js
@@ -66,24 +66,22 @@ AutoCompleteInput.prototype = {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
-function ensure_results(uris, searchTerm)
-{
+function ensure_results(uris, searchTerm) {
   PlacesTestUtils.promiseAsyncUpdates()
                  .then(() => ensure_results_internal(uris, searchTerm));
 }
 
-function ensure_results_internal(uris, searchTerm)
-{
+function ensure_results_internal(uris, searchTerm) {
   var controller = Components.classes["@mozilla.org/autocomplete/controller;1"].
                    getService(Components.interfaces.nsIAutoCompleteController);
 
   // Make an AutoCompleteInput that uses our searches
   // and confirms results on search complete
   var input = new AutoCompleteInput(["unifiedcomplete"]);
 
   controller.input = input;
@@ -117,28 +115,26 @@ try {
   var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
                 getService(Ci.nsITaggingService);
   var bmksvc = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
                 getService(Ci.nsINavBookmarksService);
 } catch (ex) {
   do_throw("Could not get history service\n");
 }
 
-function* task_setCountDate(aURI, aCount, aDate)
-{
+function* task_setCountDate(aURI, aCount, aDate) {
   // We need visits so that frecency can be computed over multiple visits
   let visits = [];
   for (let i = 0; i < aCount; i++) {
     visits.push({ uri: aURI, visitDate: aDate, transition: TRANSITION_TYPED });
   }
   yield PlacesTestUtils.addVisits(visits);
 }
 
-function setBookmark(aURI)
-{
+function setBookmark(aURI) {
   bmksvc.insertBookmark(bmksvc.bookmarksMenuFolder, aURI, -1, "bleh");
 }
 
 function tagURI(aURI, aTags) {
   bmksvc.insertBookmark(bmksvc.unfiledBookmarksFolder, aURI,
                         bmksvc.DEFAULT_INDEX, "bleh");
   tagssvc.tagURI(aURI, aTags);
 }
@@ -263,18 +259,17 @@ function*() {
 ];
 
 /**
  * This deferred object contains a promise that is resolved when the
  * ensure_results_internal function has finished its execution.
  */
 var deferEnsureResults;
 
-add_task(function* test_frecency()
-{
+add_task(function* test_frecency() {
   // Disable autoFill for this test.
   Services.prefs.setBoolPref("browser.urlbar.autoFill", false);
   do_register_cleanup(() => Services.prefs.clearUserPref("browser.urlbar.autoFill"));
   // always search in history + bookmarks, no matter what the default is
   var prefs = Cc["@mozilla.org/preferences-service;1"].
               getService(Ci.nsIPrefBranch);
 
   prefs.setBoolPref("browser.urlbar.suggest.history", true);
--- a/toolkit/components/places/tests/unit/test_frecency_zero_updated.js
+++ b/toolkit/components/places/tests/unit/test_frecency_zero_updated.js
@@ -1,20 +1,18 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Tests a zero frecency is correctly updated when inserting new valid visits.
 
-function run_test()
-{
+function run_test() {
   run_next_test()
 }
 
-add_task(function* ()
-{
+add_task(function* () {
   const TEST_URI = NetUtil.newURI("http://example.com/");
   let id = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                                                 TEST_URI,
                                                 PlacesUtils.bookmarks.DEFAULT_INDEX,
                                                 "A title");
   yield PlacesTestUtils.promiseAsyncUpdates();
   do_check_true(frecencyForUrl(TEST_URI) > 0);
 
--- a/toolkit/components/places/tests/unit/test_getPlacesInfo.js
+++ b/toolkit/components/places/tests/unit/test_getPlacesInfo.js
@@ -59,18 +59,17 @@ function* test_promisedHelper() {
   yield PlacesTestUtils.addVisits(uri);
   let placeInfo = yield PlacesUtils.promisePlaceInfo(uri);
   do_check_true(placeInfo instanceof Ci.mozIPlaceInfo);
 
   uri = NetUtil.newURI("http://www.helper_non_existent_example.tld");
   try {
     yield PlacesUtils.promisePlaceInfo(uri);
     do_throw("PlacesUtils.promisePlaceInfo should have rejected the promise");
-  }
-  catch (ex) { }
+  } catch (ex) { }
 }
 add_task(test_promisedHelper);
 
 function* test_infoByGUID() {
   let testURI = NetUtil.newURI("http://www.guid_example.tld");
   yield PlacesTestUtils.addVisits(testURI);
 
   let placeInfoByURI = yield PlacesUtils.promisePlaceInfo(testURI);
@@ -78,18 +77,17 @@ function* test_infoByGUID() {
   ensurePlacesInfoObjectsAreEqual(placeInfoByURI, placeInfoByGUID);
 }
 add_task(test_infoByGUID);
 
 function* test_invalid_guid() {
   try {
     yield PlacesUtils.promisePlaceInfo("###");
     do_throw("getPlacesInfo should fail for invalid guids")
-  }
-  catch (ex) { }
+  } catch (ex) { }
 }
 add_task(test_invalid_guid);
 
 function* test_mixed_selection() {
   let placeInfo1, placeInfo2;
   let uri = NetUtil.newURI("http://www.mixed_selection_test_1.tld");
   yield PlacesTestUtils.addVisits(uri);
   placeInfo1 = yield PlacesUtils.promisePlaceInfo(uri);
--- a/toolkit/components/places/tests/unit/test_history.js
+++ b/toolkit/components/places/tests/unit/test_history.js
@@ -25,23 +25,21 @@ function uri_in_db(aURI) {
   var root = result.root;
   root.containerOpen = true;
   var cc = root.childCount;
   root.containerOpen = false;
   return (cc == 1);
 }
 
 // main
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   // we have a new profile, so we should have imported bookmarks
   do_check_eq(histsvc.databaseStatus, histsvc.DATABASE_STATUS_CREATE);
 
   // add a visit
   var testURI = uri("http://mozilla.com");
   yield PlacesTestUtils.addVisits(testURI);
 
   // now query for the visit, setting sorting and limit such that
@@ -160,18 +158,17 @@ add_task(function* test_execute()
   // get direct db connection
   var db = histsvc.QueryInterface(Ci.nsPIPlacesDatabase).DBConnection;
   var q = "SELECT id FROM moz_bookmarks";
   var statement;
   try {
      statement = db.createStatement(q);
   } catch (ex) {
     do_throw("bookmarks table does not have id field, schema is too old!");
-  }
-  finally {
+  } finally {
     statement.finalize();
   }
 
   // bug 394741 - regressed history text searches
   yield PlacesTestUtils.addVisits(uri("http://mozilla.com"));
   options = histsvc.getNewQueryOptions();
   // options.resultType = options.RESULTS_AS_VISIT;
   query = histsvc.getNewQuery();
--- a/toolkit/components/places/tests/unit/test_history_autocomplete_tags.js
+++ b/toolkit/components/places/tests/unit/test_history_autocomplete_tags.js
@@ -61,18 +61,17 @@ AutoCompleteInput.prototype = {
 // Get tagging service
 try {
   var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
                 getService(Ci.nsITaggingService);
 } catch (ex) {
   do_throw("Could not get tagging service\n");
 }
 
-function ensure_tag_results(uris, searchTerm)
-{
+function ensure_tag_results(uris, searchTerm) {
   print("Searching for '" + searchTerm + "'");
   var controller = Components.classes["@mozilla.org/autocomplete/controller;1"].
                    getService(Components.interfaces.nsIAutoCompleteController);
 
   // Make an AutoCompleteInput that uses our searches
   // and confirms results on search complete
   var input = new AutoCompleteInput(["unifiedcomplete"]);
 
--- a/toolkit/components/places/tests/unit/test_history_clear.js
+++ b/toolkit/components/places/tests/unit/test_history_clear.js
@@ -41,18 +41,17 @@ function run_test() {
   // places-init-complete is notified after run_test, and it will
   // run a first frecency fix through async statements.
   // To avoid random failures we have to run after all of this.
   promiseInit = promiseTopicObserved(PlacesUtils.TOPIC_INIT_COMPLETE);
 
   run_next_test();
 }
 
-add_task(function* test_history_clear()
-{
+add_task(function* test_history_clear() {
   yield promiseInit;
 
   yield PlacesTestUtils.addVisits([
     { uri: uri("http://typed.mozilla.org/"),
       transition: TRANSITION_TYPED },
     { uri: uri("http://link.mozilla.org/"),
       transition: TRANSITION_LINK },
     { uri: uri("http://download.mozilla.org/"),
--- a/toolkit/components/places/tests/unit/test_history_sidebar.js
+++ b/toolkit/components/places/tests/unit/test_history_sidebar.js
@@ -414,23 +414,21 @@ function* task_test_date_liveupdate(aRes
 
   dateContainer.containerOpen = false;
   root.containerOpen = false;
 
   // Cleanup.
   bs.removeItem(itemId);
 }
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_history_sidebar()
-{
+add_task(function* test_history_sidebar() {
   // If we're dangerously close to a date change, just bail out.
   if (nowObj.getHours() == 23 && nowObj.getMinutes() >= 50) {
     return;
   }
 
   yield task_fill_history();
   test_RESULTS_AS_DATE_SITE_QUERY();
   test_RESULTS_AS_DATE_QUERY();
--- a/toolkit/components/places/tests/unit/test_hosts_triggers.js
+++ b/toolkit/components/places/tests/unit/test_hosts_triggers.js
@@ -8,18 +8,17 @@
 XPCOMUtils.defineLazyServiceGetter(this, "gHistory",
                                    "@mozilla.org/browser/history;1",
                                    "mozIAsyncHistory");
 
 // add some visits and remove them, add a bookmark,
 // change its uri, then remove it, and
 // for each change check that moz_hosts has correctly been updated.
 
-function isHostInMozPlaces(aURI)
-{
+function isHostInMozPlaces(aURI) {
   let stmt = DBConn().createStatement(
     `SELECT url
        FROM moz_places
        WHERE url_hash = hash(:host) AND url = :host`
   );
   let result = false;
   stmt.params.host = aURI.spec;
   while (stmt.executeStep()) {
@@ -27,18 +26,17 @@ function isHostInMozPlaces(aURI)
       result = true;
       break;
     }
   }
   stmt.finalize();
   return result;
 }
 
-function isHostInMozHosts(aURI, aTyped, aPrefix)
-{
+function isHostInMozHosts(aURI, aTyped, aPrefix) {
   let stmt = DBConn().createStatement(
     `SELECT host, typed, prefix
        FROM moz_hosts
        WHERE host = fixup_url(:host)
        AND frecency NOTNULL`
   );
   let result = false;
   stmt.params.host = aURI.host;
@@ -63,48 +61,45 @@ var urls = [{uri: NetUtil.newURI("http:/
              expected: "foo.mozilla.org",
              typed: 1,
              prefix: "www."
             },
            ];
 
 const NEW_URL = "http://different.mozilla.org/";
 
-add_task(function* test_moz_hosts_update()
-{
+add_task(function* test_moz_hosts_update() {
   let places = [];
   urls.forEach(function(url) {
     let place = { uri: url.uri,
                   title: "test for " + url.url,
                   transition: url.typed ? TRANSITION_TYPED : undefined };
     places.push(place);
   });
 
   yield PlacesTestUtils.addVisits(places);
 
   do_check_true(isHostInMozHosts(urls[0].uri, urls[0].typed, urls[0].prefix));
   do_check_true(isHostInMozHosts(urls[1].uri, urls[1].typed, urls[1].prefix));
   do_check_true(isHostInMozHosts(urls[2].uri, urls[2].typed, urls[2].prefix));
 });
 
-add_task(function* test_remove_places()
-{
+add_task(function* test_remove_places() {
   for (let idx in urls) {
     PlacesUtils.history.removePage(urls[idx].uri);
   }
 
   yield PlacesTestUtils.clearHistory();
 
   for (let idx in urls) {
     do_check_false(isHostInMozHosts(urls[idx].uri, urls[idx].typed, urls[idx].prefix));
   }
 });
 
-add_task(function* test_bookmark_changes()
-{
+add_task(function* test_bookmark_changes() {
   let testUri = NetUtil.newURI("http://test.mozilla.org");
 
   let itemId = PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                                                      testUri,
                                                      PlacesUtils.bookmarks.DEFAULT_INDEX,
                                                      "bookmark title");
 
   do_check_true(isHostInMozPlaces(testUri));
@@ -115,46 +110,43 @@ add_task(function* test_bookmark_changes
   yield PlacesTestUtils.clearHistory();
 
   let newUri = NetUtil.newURI(NEW_URL);
   do_check_true(isHostInMozPlaces(newUri));
   do_check_true(isHostInMozHosts(newUri, false, null));
   do_check_false(isHostInMozHosts(NetUtil.newURI("http://test.mozilla.org"), false, null));
 });
 
-add_task(function* test_bookmark_removal()
-{
+add_task(function* test_bookmark_removal() {
   let itemId = PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId,
                                                     PlacesUtils.bookmarks.DEFAULT_INDEX);
   let newUri = NetUtil.newURI(NEW_URL);
   PlacesUtils.bookmarks.removeItem(itemId);
   yield PlacesTestUtils.clearHistory();
 
   do_check_false(isHostInMozHosts(newUri, false, null));
 });
 
-add_task(function* test_moz_hosts_typed_update()
-{
+add_task(function* test_moz_hosts_typed_update() {
   const TEST_URI = NetUtil.newURI("http://typed.mozilla.com");
   let places = [{ uri: TEST_URI
                 , title: "test for " + TEST_URI.spec
                 },
                 { uri: TEST_URI
                 , title: "test for " + TEST_URI.spec
                 , transition: TRANSITION_TYPED
                 }];
 
   yield PlacesTestUtils.addVisits(places);
 
   do_check_true(isHostInMozHosts(TEST_URI, true, null));
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* test_moz_hosts_www_remove()
-{
+add_task(function* test_moz_hosts_www_remove() {
   function* test_removal(aURIToRemove, aURIToKeep, aCallback) {
     let places = [{ uri: aURIToRemove
                   , title: "test for " + aURIToRemove.spec
                   , transition: TRANSITION_TYPED
                   },
                   { uri: aURIToKeep
                   , title: "test for " + aURIToKeep.spec
                   , transition: TRANSITION_TYPED
@@ -173,54 +165,50 @@ add_task(function* test_moz_hosts_www_re
 
   const TEST_URI = NetUtil.newURI("http://rem.mozilla.com");
   const TEST_WWW_URI = NetUtil.newURI("http://www.rem.mozilla.com");
   yield test_removal(TEST_URI, TEST_WWW_URI);
   yield test_removal(TEST_WWW_URI, TEST_URI);
   yield PlacesTestUtils.clearHistory();
 });
 
-add_task(function* test_moz_hosts_ftp_matchall()
-{
+add_task(function* test_moz_hosts_ftp_matchall() {
   const TEST_URI_1 = NetUtil.newURI("ftp://www.mozilla.com/");
   const TEST_URI_2 = NetUtil.newURI("ftp://mozilla.com/");
 
   yield PlacesTestUtils.addVisits([
     { uri: TEST_URI_1, transition: TRANSITION_TYPED },
     { uri: TEST_URI_2, transition: TRANSITION_TYPED }
   ]);
 
   do_check_true(isHostInMozHosts(TEST_URI_1, true, "ftp://"));
 });
 
-add_task(function* test_moz_hosts_ftp_not_matchall()
-{
+add_task(function* test_moz_hosts_ftp_not_matchall() {
   const TEST_URI_1 = NetUtil.newURI("http://mozilla.com/");
   const TEST_URI_2 = NetUtil.newURI("ftp://mozilla.com/");
 
   yield PlacesTestUtils.addVisits([
     { uri: TEST_URI_1, transition: TRANSITION_TYPED },
     { uri: TEST_URI_2, transition: TRANSITION_TYPED }
   ]);
 
   do_check_true(isHostInMozHosts(TEST_URI_1, true, null));
 });
 
-add_task(function* test_moz_hosts_update_2()
-{
+add_task(function* test_moz_hosts_update_2() {
   // Check that updating trigger takes into account prefixes for different
   // rev_hosts.
   const TEST_URI_1 = NetUtil.newURI("https://www.google.it/");
   const TEST_URI_2 = NetUtil.newURI("https://google.it/");
   let places = [{ uri: TEST_URI_1
                 , transition: TRANSITION_TYPED
                 },
                 { uri: TEST_URI_2
                 }];
   yield PlacesTestUtils.addVisits(places);
 
   do_check_true(isHostInMozHosts(TEST_URI_1, true, "https://www."));
 });
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
--- a/toolkit/components/places/tests/unit/test_isURIVisited.js
+++ b/toolkit/components/places/tests/unit/test_isURIVisited.js
@@ -19,25 +19,23 @@ const SCHEMES = {
   "chrome://browser/content/browser.xul?": false,
   "resource://": false,
   "data:,": false,
   "wyciwyg:/0/http://": false,
   "javascript:": false,
 };
 
 var gRunner;
-function run_test()
-{
+function run_test() {
   do_test_pending();
   gRunner = step();
   gRunner.next();
 }
 
-function* step()
-{
+function* step() {
   let history = Cc["@mozilla.org/browser/history;1"]
                   .getService(Ci.mozIAsyncHistory);
 
   for (let scheme in SCHEMES) {
     do_print("Testing scheme " + scheme);
     for (let t in PlacesUtils.history.TRANSITIONS) {
       do_print("With transition " + t);
       let transition = PlacesUtils.history.TRANSITIONS[t];
--- a/toolkit/components/places/tests/unit/test_isvisited.js
+++ b/toolkit/components/places/tests/unit/test_isvisited.js
@@ -1,21 +1,19 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* 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/. */
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   var referrer = uri("about:blank");
 
   // add a http:// uri
   var uri1 = uri("http://mozilla.com");
   yield PlacesTestUtils.addVisits({uri: uri1, referrer});
   do_check_guid_for_uri(uri1);
   do_check_true(yield promiseIsURIVisited(uri1));
 
@@ -50,18 +48,17 @@ add_task(function* test_execute()
     "data:,Hello%2C%20World!",
     "wyciwyg:/0/http://mozilla.org",
     "javascript:alert('hello wolrd!');",
     "http://localhost/" + "a".repeat(1984),
   ];
   for (let currentURL of URLS) {
     try {
       var cantAddUri = uri(currentURL);
-    }
-    catch (e) {
+    } catch (e) {
       // nsIIOService.newURI() can throw if e.g. our app knows about imap://
       // but the account is not set up and so the URL is invalid for us.
       // Note this in the log but ignore as it's not the subject of this test.
       do_print("Could not construct URI for '" + currentURL + "'; ignoring");
     }
     if (cantAddUri) {
       PlacesTestUtils.addVisits({uri: cantAddUri, referrer}).then(() => {
         do_throw("Should not have added history for invalid URI.");
--- a/toolkit/components/places/tests/unit/test_markpageas.js
+++ b/toolkit/components/places/tests/unit/test_markpageas.js
@@ -6,31 +6,28 @@
 
 var gVisits = [{url: "http://www.mozilla.com/",
                 transition: TRANSITION_TYPED},
                {url: "http://www.google.com/",
                 transition: TRANSITION_BOOKMARK},
                {url: "http://www.espn.com/",
                 transition: TRANSITION_LINK}];
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   let observer;
   let completionPromise = new Promise(resolveCompletionPromise => {
     observer = {
       __proto__: NavHistoryObserver.prototype,
       _visitCount: 0,
       onVisit(aURI, aVisitID, aTime, aSessionID, aReferringID,
-                        aTransitionType, aAdded)
-      {
+                        aTransitionType, aAdded) {
         do_check_eq(aURI.spec, gVisits[this._visitCount].url);
         do_check_eq(aTransitionType, gVisits[this._visitCount].transition);
         this._visitCount++;
 
         if (this._visitCount == gVisits.length) {
           resolveCompletionPromise();
         }
       },
--- a/toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js
+++ b/toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js
@@ -152,18 +152,17 @@ add_task(function* test_addLivemark_badG
   }
 });
 
 add_task(function* test_addLivemark_parentId_succeeds() {
   let onItemAddedCalled = false;
   PlacesUtils.bookmarks.addObserver({
     __proto__: NavBookmarkObserver.prototype,
     onItemAdded: function onItemAdded(aItemId, aParentId, aIndex, aItemType,
-                                      aURI, aTitle)
-    {
+                                      aURI, aTitle) {
       onItemAddedCalled = true;
       PlacesUtils.bookmarks.removeObserver(this);
       do_check_eq(aParentId, PlacesUtils.unfiledBookmarksFolderId);
       do_check_eq(aIndex, 0);
       do_check_eq(aItemType, Ci.nsINavBookmarksService.TYPE_FOLDER);
       do_check_eq(aTitle, "test");
     }
   }, false);
@@ -324,18 +323,17 @@ add_task(function* test_removeLivemark_n
     do_check_eq(ex.result, Cr.NS_ERROR_INVALID_ARG);
   }
 });
 
 add_task(function* test_removeLivemark_nonExistent_fails() {
   try {
     yield PlacesUtils.livemarks.removeLivemark({ id: 1337 });
     do_throw("Removing a non-existent livemark should fail");
-  }
-  catch (ex) {
+  } catch (ex) {
   }
 });
 
 add_task(function* test_removeLivemark_guid_succeeds() {
   let livemark = yield PlacesUtils.livemarks.addLivemark(
     { title: "test"
     , parentGuid: PlacesUtils.bookmarks.unfiledGuid
     , feedURI: FEED_URI
--- a/toolkit/components/places/tests/unit/test_multi_queries.js
+++ b/toolkit/components/places/tests/unit/test_multi_queries.js
@@ -15,23 +15,21 @@
 function* add_visit(aURI, aDayOffset, aTransition) {
   yield PlacesTestUtils.addVisits({
     uri: aURI,
     transition: aTransition,
     visitDate: (Date.now() + aDayOffset * 86400000) * 1000
   });
 }
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   yield add_visit(uri("http://mirror1.mozilla.com/a"), -1, TRANSITION_LINK);
   yield add_visit(uri("http://mirror2.mozilla.com/b"), -2, TRANSITION_LINK);
   yield add_visit(uri("http://mirror3.mozilla.com/c"), -4, TRANSITION_FRAMED_LINK);
   yield add_visit(uri("http://mirror1.google.com/b"), -1, TRANSITION_EMBED);
   yield add_visit(uri("http://mirror2.google.com/a"), -2, TRANSITION_LINK);
   yield add_visit(uri("http://mirror1.apache.org/b"), -3, TRANSITION_LINK);
   yield add_visit(uri("http://mirror2.apache.org/a"), -4, TRANSITION_FRAMED_LINK);
 
--- a/toolkit/components/places/tests/unit/test_multi_word_tags.js
+++ b/toolkit/components/places/tests/unit/test_multi_word_tags.js
@@ -11,18 +11,17 @@ try {
 } catch (ex) {
   do_throw("Could not get history service\n");
 }
 
 // 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 the nav-bookmarks-service\n");
 }
 
 // Get tagging service
 try {
   var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
                 getService(Ci.nsITaggingService);
 } catch (ex) {
--- a/toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js
+++ b/toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js
@@ -43,18 +43,17 @@ var resultObserver = {
   nodeMoved(node, oldParent, oldIndex, newParent, newIndex) {
     this.movedNode = node;
   },
   openedContainer: null,
   closedContainer: null,
   containerStateChanged(aNode, aOldState, aNewState) {
     if (aNewState == Ci.nsINavHistoryContainerResultNode.STATE_OPENED) {
       this.openedContainer = aNode;
-    }
-    else if (aNewState == Ci.nsINavHistoryContainerResultNode.STATE_CLOSED) {
+    } else if (aNewState == Ci.nsINavHistoryContainerResultNode.STATE_CLOSED) {
       this.closedContainer = aNode;
     }
   },
   invalidatedContainer: null,
   invalidateContainer(node) {
     this.invalidatedContainer = node;
   },
   sortingMode: null,
--- a/toolkit/components/places/tests/unit/test_null_interfaces.js
+++ b/toolkit/components/places/tests/unit/test_null_interfaces.js
@@ -20,18 +20,17 @@ var testServices = [
   ],
   ["browser/livemark-service;2", ["mozIAsyncLivemarks"], ["reloadLivemarks"]],
   ["browser/annotation-service;1", ["nsIAnnotationService"], ["getObservers"]],
   ["browser/favicon-service;1", ["nsIFaviconService"], []],
   ["browser/tagging-service;1", ["nsITaggingService"], []],
 ];
 do_print(testServices.join("\n"));
 
-function run_test()
-{
+function run_test() {
   for (let [cid, ifaces, nothrow] of testServices) {
     do_print(`Running test with ${cid} ${ifaces.join(", ")} ${nothrow}`);
     let s = Cc["@mozilla.org/" + cid].getService(Ci.nsISupports);
     for (let iface of ifaces) {
       s.QueryInterface(Ci[iface]);
     }
 
     let okName = function(name) {
@@ -69,18 +68,17 @@ function run_test()
           do_print(`Calling with args: ${JSON.stringify(args)}`);
           func.apply(s, args);
 
           do_print(`The function did not throw! Is it one of the nothrow? ${nothrow}`);
           Assert.notEqual(nothrow.indexOf(n), -1);
 
           do_print("Must have been an expected nothrow, so no need to try again");
           tryAgain = false;
-        }
-        catch (ex) {
+        } catch (ex) {
           if (ex.result == Cr.NS_ERROR_ILLEGAL_VALUE) {
             do_print(`Caught an expected exception: ${ex.name}`);
             do_print("Moving on to the next test..");
             tryAgain = false;
           } else if (ex.result == Cr.NS_ERROR_XPC_NEED_OUT_OBJECT) {
             let pos = Number(ex.message.match(/object arg (\d+)/)[1]);
             do_print(`Function call expects an out object at ${pos}`);
             args[pos] = {};
--- a/toolkit/components/places/tests/unit/test_pageGuid_bookmarkGuid.js
+++ b/toolkit/components/places/tests/unit/test_pageGuid_bookmarkGuid.js
@@ -109,33 +109,30 @@ add_task(function* test_addVisitAndCheck
 });
 
 add_task(function* test_addItemsWithInvalidGUIDsFails() {
   const INVALID_GUID = "XYZ";
   try {
     bmsvc.createFolder(bmsvc.placesRoot, "XYZ folder",
                        bmsvc.DEFAULT_INDEX, INVALID_GUID);
     do_throw("Adding a folder with an invalid guid should fail");
-  }
-  catch (ex) { }
+  } catch (ex) { }
 
   let folder = bmsvc.createFolder(bmsvc.placesRoot, "test folder",
                                   bmsvc.DEFAULT_INDEX);
   try {
     bmsvc.insertBookmark(folder, uri("http://test.tld"), bmsvc.DEFAULT_INDEX,
                          "title", INVALID_GUID);
     do_throw("Adding a bookmark with an invalid guid should fail");
-  }
-  catch (ex) { }
+  } catch (ex) { }
 
   try {
     bmsvc.insertSeparator(folder, bmsvc.DEFAULT_INDEX, INVALID_GUID);
     do_throw("Adding a separator with an invalid guid should fail");
-  }
-  catch (ex) { }
+  } catch (ex) { }
 
   yield PlacesUtils.bookmarks.eraseEverything();
 });
 
 add_task(function* test_addItemsWithGUIDs() {
   const FOLDER_GUID     = "FOLDER--GUID";
   const BOOKMARK_GUID   = "BM------GUID";
   const SEPARATOR_GUID  = "SEP-----GUID";
@@ -167,13 +164,12 @@ add_task(function* test_emptyGUIDIgnored
 add_task(function* test_usingSameGUIDFails() {
   const GUID = "XYZXYZXYZXYZ";
   bmsvc.createFolder(bmsvc.placesRoot, "test folder",
                      bmsvc.DEFAULT_INDEX, GUID);
   try {
     bmsvc.createFolder(bmsvc.placesRoot, "test folder 2",
                        bmsvc.DEFAULT_INDEX, GUID);
     do_throw("Using the same guid twice should fail");
-  }
-  catch (ex) { }
+  } catch (ex) { }
 
   yield PlacesUtils.bookmarks.eraseEverything();
 });
--- a/toolkit/components/places/tests/unit/test_placesTxn.js
+++ b/toolkit/components/places/tests/unit/test_placesTxn.js
@@ -895,18 +895,17 @@ add_task(function* test_create_item_with
     do_check_eq(observer._itemAddedId, newId);
     do_check_eq(observer._itemChangedProperty, "testAnno/testInt");
     do_check_eq(observer._itemChanged_isAnnotationProperty, true);
     do_check_true(annosvc.itemHasAnnotation(newId, itemChildAnnoObj.name))
     do_check_eq(annosvc.getItemAnnotation(newId, itemChildAnnoObj.name), itemChildAnnoObj.value);
 
     itemWChildTxn.undoTransaction();
     do_check_eq(observer._itemRemovedId, newId);
-  }
-  catch (ex) {
+  } catch (ex) {
     do_throw("Setting a child transaction in a createItem transaction did throw: " + ex);
   }
 });
 
 add_task(function* test_create_folder_with_child_itemTxn() {
   let childURI = NetUtil.newURI("http://test_create_folder_with_child_itemTxn.com");
   let childItemTxn = new PlacesCreateBookmarkTransaction(childURI, root,
                                                          bmStartIndex, "childItem");
@@ -925,13 +924,12 @@ add_task(function* test_create_folder_wi
     txn.redoTransaction();
     let newchildItemId = bmsvc.getBookmarkIdsForURI(childURI)[0];
     do_check_eq(observer._itemAddedIndex, 0);
     do_check_eq(observer._itemAddedId, newchildItemId);
     do_check_true(bmsvc.isBookmarked(childURI));
 
     txn.undoTransaction();
     do_check_false(bmsvc.isBookmarked(childURI));
-  }
-  catch (ex) {
+  } catch (ex) {
     do_throw("Setting a child item transaction in a createFolder transaction did throw: " + ex);
   }
 });
--- a/toolkit/components/places/tests/unit/test_preventive_maintenance.js
+++ b/toolkit/components/places/tests/unit/test_preventive_maintenance.js
@@ -1313,18 +1313,17 @@ tests.push({
         resolve();
       });
     });
   })
 });
 
 // ------------------------------------------------------------------------------
 
-add_task(function* test_preventive_maintenance()
-{
+add_task(function* test_preventive_maintenance() {
   // Get current bookmarks max ID for cleanup
   let stmt = mDBConn.createStatement("SELECT MAX(id) FROM moz_bookmarks");
   stmt.executeStep();
   defaultBookmarksMaxId = stmt.getInt32(0);
   stmt.finalize();
   do_check_true(defaultBookmarksMaxId > 0);
 
   for (let test of tests) {
--- a/toolkit/components/places/tests/unit/test_promiseBookmarksTree.js
+++ b/toolkit/components/places/tests/unit/test_promiseBookmarksTree.js
@@ -33,41 +33,38 @@ function* compareToNode(aItem, aNode, aI
       strict_eq_check(aItem[aItemProp], aValue);
   }
 
   // Bug 1013053 - bookmarkIndex is unavailable for the query's root
   if (aNode.bookmarkIndex == -1) {
     compare_prop_to_value("index",
                           PlacesUtils.bookmarks.getItemIndex(aNode.itemId),
                           false);
-  }
-  else {
+  } else {
     compare_prop("index", "bookmarkIndex");
   }
 
   compare_prop("dateAdded");
   compare_prop("lastModified");
 
   if (aIsRootItem && aNode.itemId != PlacesUtils.placesRootId) {
     do_check_true("parentGuid" in aItem);
     yield check_has_child(aItem.parentGuid, aItem.guid)
-  }
-  else {
+  } else {
     check_unset("parentGuid");
   }
 
   let expectedAnnos = PlacesUtils.getAnnotationsForItem(aItem.id);
   if (expectedAnnos.length > 0) {
     let annosToString = annos => {
       return annos.map(a => a.name + ":" + a.value).sort().join(",");
     };
     do_check_true(Array.isArray(aItem.annos))
     do_check_eq(annosToString(aItem.annos), annosToString(expectedAnnos));
-  }
-  else {
+  } else {
     check_unset("annos");
   }
   const BOOKMARK_ONLY_PROPS = ["uri", "iconuri", "tags", "charset", "keyword"];
   const FOLDER_ONLY_PROPS = ["children", "root"];
 
   let nodesCount = 1;
 
   switch (aNode.type) {
@@ -94,18 +91,17 @@ function* compareToNode(aItem, aNode, aI
       if (expectedChildrenNodes.length > 0) {
         do_check_true(Array.isArray(aItem.children));
         do_check_eq(aItem.children.length, expectedChildrenNodes.length);
         for (let i = 0; i < aItem.children.length; i++) {
           nodesCount +=
             yield compareToNode(aItem.children[i], expectedChildrenNodes[i],
                                 false, aExcludedGuids);
         }
-      }
-      else {
+      } else {
         check_unset("children");
       }
 
       switch (aItem.id) {
       case PlacesUtils.placesRootId:
         compare_prop_to_value("root", "placesRoot");
         break;
       case PlacesUtils.bookmarksMenuFolderId:
@@ -135,18 +131,17 @@ function* compareToNode(aItem, aNode, aI
       if (aNode.tags === null)
         check_unset("tags");
       else
         compare_prop_to_value("tags", aNode.tags.replace(/, /g, ","), false);
 
       if (aNode.icon) {
         let nodeIconData = aNode.icon.replace("moz-anno:favicon:", "");
         compare_prop_to_value("iconuri", nodeIconData);
-      }
-      else {
+      } else {
         check_unset(aItem.iconuri);
       }
 
       check_unset(...FOLDER_ONLY_PROPS);
 
       let itemURI = uri(aNode.uri);
       compare_prop_to_value("charset",
                             yield PlacesUtils.getCharsetForURI(itemURI));
@@ -240,17 +235,17 @@ add_task(function* () {
   // the bookmark we inserted under, and once for the menu (and not
   // at all for any of its descendants) and once for the unsorted bookmarks
   // folder.  However, promiseBookmarksTree is called multiple times, so
   // rather than counting the calls, we count the number of unique items
   // passed in.
   let guidsPassedToExcludeCallback = new Set();
   let placesRootWithoutTheMenu =
   yield test_promiseBookmarksTreeAgainstResult(PlacesUtils.bookmarks.rootGuid, {
-    excludeItemsCallback: aItem =>  {
+    excludeItemsCallback: aItem => {
       guidsPassedToExcludeCallback.add(aItem.guid);
       return aItem.root == "bookmarksMenuFolder";
     },
     includeItemIds: true
   }, [PlacesUtils.bookmarks.menuGuid]);
   do_check_eq(guidsPassedToExcludeCallback.size, 5);
   do_check_eq(placesRootWithoutTheMenu.children.length, 3);
 });
--- a/toolkit/components/places/tests/unit/test_sql_guid_functions.js
+++ b/toolkit/components/places/tests/unit/test_sql_guid_functions.js
@@ -7,27 +7,25 @@
  */
 
 /**
  * Checks all our invariants about our guids for a given result.
  *
  * @param aGuid
  *        The guid to check.
  */
-function check_invariants(aGuid)
-{
+function check_invariants(aGuid) {
   do_print("Checking guid '" + aGuid + "'");
 
   do_check_valid_places_guid(aGuid);
 }
 
 // Test Functions
 
-function test_guid_invariants()
-{
+function test_guid_invariants() {
   const kExpectedChars = 64;
   const kAllowedChars =
     "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"
   do_check_eq(kAllowedChars.length, kExpectedChars);
   const kGuidLength = 12;
 
   let checkedChars = [];
   for (let i = 0; i < kGuidLength; i++) {
@@ -62,30 +60,28 @@ function test_guid_invariants()
     for (let j = 0; j < kAllowedChars; j++) {
       do_check_true(checkedChars[i][kAllowedChars[j]]);
     }
   }
 
   run_next_test();
 }
 
-function test_guid_on_background()
-{
+function test_guid_on_background() {
   // We should not assert if we execute this asynchronously.
   let stmt = DBConn().createAsyncStatement("SELECT GENERATE_GUID()");
   let checked = false;
   stmt.executeAsync({
     handleResult(aResult) {
       try {
         let row = aResult.getNextRow();
         check_invariants(row.getResultByIndex(0));
         do_check_eq(aResult.getNextRow(), null);
         checked = true;
-      }
-      catch (e) {
+      } catch (e) {
         do_throw(e);
       }
     },
     handleCompletion(aReason) {
       do_check_eq(aReason, Ci.mozIStorageStatementCallback.REASON_FINISHED);
       do_check_true(checked);
       run_next_test();
     }
@@ -95,12 +91,11 @@ function test_guid_on_background()
 
 // Test Runner
 
 [
   test_guid_invariants,
   test_guid_on_background,
 ].forEach(add_test);
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
--- a/toolkit/components/places/tests/unit/test_tag_autocomplete_search.js
+++ b/toolkit/components/places/tests/unit/test_tag_autocomplete_search.js
@@ -61,18 +61,17 @@ AutoCompleteInput.prototype = {
 // Get tagging service
 try {
   var tagssvc = Cc["@mozilla.org/browser/tagging-service;1"].
                 getService(Ci.nsITaggingService);
 } catch (ex) {
   do_throw("Could not get tagging service\n");
 }
 
-function ensure_tag_results(results, searchTerm)
-{
+function ensure_tag_results(results, searchTerm) {
   var controller = Cc["@mozilla.org/autocomplete/controller;1"].
                    getService(Ci.nsIAutoCompleteController);
 
   // Make an AutoCompleteInput that uses our searches
   // and confirms results on search complete
   var input = new AutoCompleteInput(["places-tag-autocomplete"]);
 
   controller.input = input;
@@ -95,18 +94,17 @@ function ensure_tag_results(results, sea
     do_check_eq(controller.matchCount, results.length);
     for (var i = 0; i < controller.matchCount; i++) {
       do_check_eq(controller.getValueAt(i), results[i]);
     }
 
     if (current_test < (tests.length - 1)) {
       current_test++;
       tests[current_test]();
-    }
-    else {
+    } else {
       // finish once all tests have run
       do_test_finished();
     }
   };
 
   controller.startSearch(searchTerm);
 }
 
--- a/toolkit/components/places/tests/unit/test_telemetry.js
+++ b/toolkit/components/places/tests/unit/test_telemetry.js
@@ -58,18 +58,17 @@ function getExpirablePRTime(daysAgo = 7)
   dateObj.setHours(0);
   dateObj.setMinutes(0);
   dateObj.setSeconds(0);
   dateObj.setMilliseconds(0);
   dateObj = new Date(dateObj.getTime() - (daysAgo + 1) * 86400000);
   return dateObj.getTime() * 1000;
 }
 
-add_task(function* test_execute()
-{
+add_task(function* test_execute() {
   // Put some trash in the database.
   let uri = NetUtil.newURI("http://moz.org/");
 
   let folderId = PlacesUtils.bookmarks.createFolder(PlacesUtils.unfiledBookmarksFolderId,
                                                     "moz test",
                                                     PlacesUtils.bookmarks.DEFAULT_INDEX);
   let itemId = PlacesUtils.bookmarks.insertBookmark(folderId,
                                                     uri,
@@ -100,17 +99,17 @@ add_task(function* test_execute()
 
   function newTimeInMicroseconds() {
     timeInMicroseconds = timeInMicroseconds + 1000;
     return timeInMicroseconds;
   }
 
   for (let i = 0; i < 3; i++) {
     yield PlacesTestUtils.addVisits({
-      uri: NetUtil.newURI("http://" +  i + ".moz.org/"),
+      uri: NetUtil.newURI("http://" + i + ".moz.org/"),
       visitDate: newTimeInMicroseconds()
     });
   }
   Services.prefs.setIntPref("places.history.expiration.max_pages", 0);
   yield promiseForceExpirationStep(2);
   yield promiseForceExpirationStep(2);
 
   // Test autocomplete probes.
--- a/toolkit/components/places/tests/unit/test_utils_backups_create.js
+++ b/toolkit/components/places/tests/unit/test_utils_backups_create.js
@@ -62,18 +62,17 @@ add_task(function* () {
         let entry = files.getNext().QueryInterface(Ci.nsIFile);
         if (PlacesBackups.filenamesRegex.test(entry.leafName)) {
           backupFilename = entry.leafName;
           backupFile = entry;
           break;
         }
       }
       shouldExist = true;
-    }
-    else {
+    } else {
       backupFilename = PlacesBackups.getFilenameForDate(new Date(dates[i]));
       backupFile = bookmarksBackupDir.clone();
       backupFile.append(backupFilename);
       shouldExist = false;
     }
     if (backupFile.exists() != shouldExist)
       do_throw("Backup should " + (shouldExist ? "" : "not") + " exist: " + backupFilename);
   }
--- a/toolkit/components/printing/content/printPageSetup.js
+++ b/toolkit/components/printing/content/printPageSetup.js
@@ -11,18 +11,17 @@ var gPrintService  = null;
 var gPrintSettings = null;
 var gStringBundle  = null;
 var gDoingMetric   = false;
 
 var gPrintSettingsInterface = Components.interfaces.nsIPrintSettings;
 var gDoDebug = false;
 
 // ---------------------------------------------------
-function initDialog()
-{
+function initDialog() {
   gDialog = {};
 
   gDialog.orientation     = document.getElementById("orientation");
   gDialog.portrait        = document.getElementById("portrait");
   gDialog.landscape       = document.getElementById("landscape");
 
   gDialog.printBG         = document.getElementById("printBG");
 
@@ -58,72 +57,66 @@ function initDialog()
   gDialog.strings["marginUnits.inches"]  = document.getElementById("marginUnits.inches").childNodes[0].nodeValue;
   gDialog.strings["marginUnits.metric"]  = document.getElementById("marginUnits.metric").childNodes[0].nodeValue;
   gDialog.strings["customPrompt.title"]  = document.getElementById("customPrompt.title").childNodes[0].nodeValue;
   gDialog.strings["customPrompt.prompt"] = document.getElementById("customPrompt.prompt").childNodes[0].nodeValue;
 
 }
 
 // ---------------------------------------------------
-function isListOfPrinterFeaturesAvailable()
-{
+function isListOfPrinterFeaturesAvailable() {
   var has_printerfeatures = false;
 
   try {
     has_printerfeatures = gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".has_special_printerfeatures");
   } catch (ex) {
   }
 
   return has_printerfeatures;
 }
 
 // ---------------------------------------------------
-function checkDouble(element)
-{
+function checkDouble(element) {
   element.value = element.value.replace(/[^.0-9]/g, "");
 }
 
 // Theoretical paper width/height.
 var gPageWidth  = 8.5;
 var gPageHeight = 11.0;
 
 // ---------------------------------------------------
-function setOrientation()
-{
+function setOrientation() {
   var selection = gDialog.orientation.selectedItem;
 
   var style = "background-color:white;";
   if ((selection == gDialog.portrait && gPageWidth > gPageHeight) ||
       (selection == gDialog.landscape && gPageWidth < gPageHeight)) {
     // Swap width/height.
     var temp = gPageHeight;
     gPageHeight = gPageWidth;
     gPageWidth = temp;
   }
   var div = gDoingMetric ? 100 : 10;
   style += "width:" + gPageWidth / div + unitString() + ";height:" + gPageHeight / div + unitString() + ";";
   gDialog.marginPage.setAttribute( "style", style );
 }
 
 // ---------------------------------------------------
-function unitString()
-{
+function unitString() {
   return (gPrintSettings.paperSizeUnit == gPrintSettingsInterface.kPaperSizeInches) ? "in" : "mm";
 }
 
 // ---------------------------------------------------
-function checkMargin( value, max, other )
-{
+function checkMargin( value, max, other ) {
   // Don't draw this margin bigger than permitted.
   return Math.min(value, max - other.value);
 }
 
 // ---------------------------------------------------
-function changeMargin( node )
-{
+function changeMargin( node ) {
   // Correct invalid input.
   checkDouble(node);
 
   // Reset the margin height/width for this node.
   var val = node.value;
   var nodeToStyle;
   var attr = "width";
   if ( node == gDialog.topInput ) {
@@ -141,44 +134,41 @@ function changeMargin( node )
     nodeToStyle = gDialog.marginRight;
     val = checkMargin( val, gPageWidth, gDialog.leftInput );
   }
   var style = attr + ":" + (val / 10) + unitString() + ";";
   nodeToStyle.setAttribute( "style", style );
 }
 
 // ---------------------------------------------------
-function changeMargins()
-{
+function changeMargins() {
   changeMargin( gDialog.topInput );
   changeMargin( gDialog.bottomInput );
   changeMargin( gDialog.leftInput );
   changeMargin( gDialog.rightInput );
 }
 
 // ---------------------------------------------------
-function customize( node )
-{
+function customize( node ) {
   // If selection is now "Custom..." then prompt user for custom setting.
   if ( node.value == 6 ) {
     var prompter = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                      .getService( Components.interfaces.nsIPromptService );
     var title      = gDialog.strings["customPrompt.title"];
     var promptText = gDialog.strings["customPrompt.prompt"];
     var result = { value: node.custom };
     var ok = prompter.prompt(window, title, promptText, result, null, { value: false } );
     if ( ok ) {
         node.custom = result.value;
     }
   }
 }
 
 // ---------------------------------------------------
-function setHeaderFooter( node, value )
-{
+function setHeaderFooter( node, value ) {
   node.value = hfValueToId(value);
   if (node.value == 6) {
     // Remember current Custom... value.
     node.custom = value;
   } else {
     // Start with empty Custom... value.
     node.custom = "";
   }
@@ -186,29 +176,27 @@ function setHeaderFooter( node, value )
 
 var gHFValues = new Array;
 gHFValues["&T"] = 1;
 gHFValues["&U"] = 2;
 gHFValues["&D"] = 3;
 gHFValues["&P"] = 4;
 gHFValues["&PT"] = 5;
 
-function hfValueToId(val)
-{
+function hfValueToId(val) {
   if ( val in gHFValues ) {
       return gHFValues[val];
   }
   if ( val.length ) {
       return 6; // Custom...
   }
   return 0; // --blank--
 }
 
-function hfIdToValue(node)
-{
+function hfIdToValue(node) {
   var result = "";
   switch ( parseInt( node.value ) ) {
   case 0:
     break;
   case 1:
     result = "&T";
     break;
   case 2:
@@ -225,36 +213,34 @@ function hfIdToValue(node)
     break;
   case 6:
     result = node.custom;
     break;
   }
   return result;
 }
 
-function setPrinterDefaultsForSelectedPrinter()
-{
+function setPrinterDefaultsForSelectedPrinter() {
   if (gPrintSettings.printerName == "") {
     gPrintSettings.printerName = gPrintService.defaultPrinterName;
   }
 
   // First get any defaults from the printer
   gPrintService.initPrintSettingsFromPrinter(gPrintSettings.printerName, gPrintSettings);
 
   // now augment them with any values from last time
   gPrintService.initPrintSettingsFromPrefs(gPrintSettings, true, gPrintSettingsInterface.kInitSaveAll);
 
   if (gDoDebug) {
     dump("pagesetup/setPrinterDefaultsForSelectedPrinter: printerName='" + gPrintSettings.printerName + "', orientation='" + gPrintSettings.orientation + "'\n");
   }
 }
 
 // ---------------------------------------------------
-function loadDialog()
-{
+function loadDialog() {
   var print_orientation   = 0;
   var print_margin_top    = 0.5;
   var print_margin_left   = 0.5;
   var print_margin_bottom = 0.5;
   var print_margin_right  = 0.5;
 
   try {
     gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
@@ -343,18 +329,17 @@ function loadDialog()
   }
 
   // Give initial focus to the orientation radio group.
   // Done on a timeout due to to bug 103197.
   setTimeout( function() { gDialog.orientation.focus(); }, 0 );
 }
 
 // ---------------------------------------------------
-function onLoad()
-{
+function onLoad() {
   // Init gDialog.
   initDialog();
 
   if (window.arguments[0] != null) {
     gPrintSettings = window.arguments[0].QueryInterface(Components.interfaces.nsIPrintSettings);
     paramBlock     = window.arguments[1].QueryInterface(Components.interfaces.nsIDialogParamBlock);
   } else if (gDoDebug) {
     alert("window.arguments[0] == null!");
@@ -365,35 +350,32 @@ function onLoad()
 
   if (gPrintSettings) {
     loadDialog();
   } else if (gDoDebug) {
     alert("Could initialize gDialog, PrintSettings is null!");
   }
 }
 
-function convertUnitsMarginToInches(aVal, aIsMetric)
-{
+function convertUnitsMarginToInches(aVal, aIsMetric) {
   if (aIsMetric) {
     return aVal / 25.4;
   }
   return aVal;
 }
 
-function convertMarginInchesToUnits(aVal, aIsMetric)
-{
+function convertMarginInchesToUnits(aVal, aIsMetric) {
   if (aIsMetric) {
     return aVal * 25.4;
   }
   return aVal;
 }
 
 // ---------------------------------------------------
-function onAccept()
-{
+function onAccept() {
 
   if (gPrintSettings) {
     if ( gDialog.orientation.selectedItem == gDialog.portrait ) {
       gPrintSettings.orientation = gPrintSettingsInterface.kPortraitOrientation;
     } else {
       gPrintSettings.orientation = gPrintSettingsInterface.kLandscapeOrientation;
     }
 
@@ -459,18 +441,17 @@ function onAccept()
               gPrintSettingsInterface.kInitSaveScaling;
 
   gPrintService.savePrintSettingsToPrefs(gPrintSettings, true, flags);
 
   return true;
 }
 
 // ---------------------------------------------------
-function onCancel()
-{
+function onCancel() {
   // set return value to "cancel"
   if (paramBlock) {
     paramBlock.SetInt(0, 0);
   } else {
     dump("*** FATAL ERROR: No paramBlock\n");
   }
 
   return true;
--- a/toolkit/components/printing/content/printPreviewBindings.xml
+++ b/toolkit/components/printing/content/printPreviewBindings.xml
@@ -295,18 +295,17 @@
               }
               return;
             }
           }
 
           this.setScaleCombobox(aValue);
           this.mScaleCombobox.setAttribute('lastValidInx', this.mScaleCombobox.selectedIndex);
 
-          if (settings.scaling != aValue || settings.shrinkToFit)
-          {
+          if (settings.scaling != aValue || settings.shrinkToFit) {
             settings.shrinkToFit = false;
             settings.scaling = aValue;
             this.savePrintSettings(settings, settings.kInitSaveShrinkToFit | settings.kInitSaveScaling);
             PrintUtils.printPreview();
           }
         ]]>
         </body>
       </method>
@@ -314,18 +313,17 @@
       <method name="orient">
         <parameter name="aOrientation"/>
         <body>
         <![CDATA[
           const kIPrintSettings = Components.interfaces.nsIPrintSettings;
           var orientValue = (aOrientation == "portrait") ? kIPrintSettings.kPortraitOrientation :
                                                            kIPrintSettings.kLandscapeOrientation;
           var settings = PrintUtils.getPrintSettings();
-          if (settings.orientation != orientValue)
-          {
+          if (settings.orientation != orientValue) {
             settings.orientation = orientValue;
             this.savePrintSettings(settings, settings.kInitSaveOrientation);
             PrintUtils.printPreview();
           }
         ]]>
         </body>
       </method>
 
--- a/toolkit/components/printing/content/printPreviewProgress.js
+++ b/toolkit/components/printing/content/printPreviewProgress.js
@@ -12,42 +12,39 @@ var printProgress = null;
 
 // random global variables...
 var targetFile;
 
 var docTitle = "";
 var docURL   = "";
 var progressParams = null;
 
-function ellipseString(aStr, doFront)
-{
+function ellipseString(aStr, doFront) {
   if (aStr.length > 3 && (aStr.substr(0, 3) == "..." || aStr.substr(aStr.length - 4, 3) == "..."))
     return aStr;
 
   var fixedLen = 64;
   if (aStr.length <= fixedLen)
     return aStr;
 
   if (doFront)
     return "..." + aStr.substr(aStr.length - fixedLen, fixedLen);
 
   return aStr.substr(0, fixedLen) + "...";
 }
 
 // all progress notifications are done through the nsIWebProgressListener implementation...
 var progressListener = {
 
-  onStateChange(aWebProgress, aRequest, aStateFlags, aStatus)
-  {
+  onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
     if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
       window.close();
   },
 
-  onProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress)
-  {
+  onProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) {
     if (!progressParams)
       return;
     var docTitleStr = ellipseString(progressParams.docTitle, false);
     if (docTitleStr != docTitle) {
       docTitle = docTitleStr;
       dialog.title.value = docTitle;
     }
     var docURLStr = ellipseString(progressParams.docURL, true);
@@ -56,24 +53,22 @@ var progressListener = {
       if (docTitle == "")
         dialog.title.value = docURLStr;
     }
   },
 
   onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {},
   onSecurityChange(aWebProgress, aRequest, state) {},
 
-  onStatusChange(aWebProgress, aRequest, aStatus, aMessage)
-  {
+  onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
     if (aMessage)
       dialog.title.setAttribute("value", aMessage);
   },
 
-  QueryInterface(iid)
-  {
+  QueryInterface(iid) {
     if (iid.equals(Components.interfaces.nsIWebProgressListener) || iid.equals(Components.interfaces.nsISupportsWeakReference))
       return this;
     throw Components.results.NS_NOINTERFACE;
   }
 }
 
 function onLoad() {
   // Set global variables.
@@ -101,25 +96,23 @@ function onLoad() {
 
   // set our web progress listener on the helper app launcher
   printProgress.registerListener(progressListener);
 
   // We need to delay the set title else dom will overwrite it
   window.setTimeout(doneIniting, 100);
 }
 
-function onUnload()
-{
+function onUnload() {
   if (!printProgress)
     return;
   try {
     printProgress.unregisterListener(progressListener);
     printProgress = null;
-  }
-  catch (e) {}
+  } catch (e) {}
 }
 
 function getString(stringId) {
   // Check if we've fetched this string already.
   if (!(stringId in dialog.strings)) {
     // Try to get it.
     var elem = document.getElementById( "dialog.strings." + stringId);
     try {
@@ -130,25 +123,22 @@ function getString(stringId) {
       else
         dialog.strings[stringId] = "";
     } catch (e) { dialog.strings[stringId] = ""; }
   }
   return dialog.strings[stringId];
 }
 
 // If the user presses cancel, tell the app launcher and close the dialog...
-function onCancel()
-{
+function onCancel() {
   // Cancel app launcher.
   try {
     printProgress.processCanceledByUser = true;
-  }
-  catch (e) { return true; }
+  } catch (e) { return true; }
 
   // don't Close up dialog by returning false, the backend will close the dialog when everything will be aborted.
   return false;
 }
 
-function doneIniting()
-{
+function doneIniting() {
   // called by function timeout in onLoad
   printProgress.doneIniting();
 }
--- a/toolkit/components/printing/content/printProgress.js
+++ b/toolkit/components/printing/content/printProgress.js
@@ -13,18 +13,17 @@ var printProgress = null;
 // random global variables...
 var targetFile;
 
 var docTitle = "";
 var docURL   = "";
 var progressParams = null;
 var switchUI = true;
 
-function ellipseString(aStr, doFront)
-{
+function ellipseString(aStr, doFront) {
   if (aStr.length > 3 && (aStr.substr(0, 3) == "..." || aStr.substr(aStr.length - 4, 3) == "...")) {
     return aStr;
   }
 
   var fixedLen = 64;
   if (aStr.length > fixedLen) {
     if (doFront) {
       var endStr = aStr.substr(aStr.length - fixedLen, fixedLen);
@@ -33,27 +32,24 @@ function ellipseString(aStr, doFront)
     var frontStr = aStr.substr(0, fixedLen);
     return frontStr + "...";
   }
   return aStr;
 }
 
 // all progress notifications are done through the nsIWebProgressListener implementation...
 var progressListener = {
-    onStateChange(aWebProgress, aRequest, aStateFlags, aStatus)
-    {
-      if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_START)
-      {
+    onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
+      if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_START) {
         // Put progress meter in undetermined mode.
         // dialog.progress.setAttribute( "value", 0 );
         dialog.progress.setAttribute( "mode", "undetermined" );
       }
 
-      if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
-      {
+      if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP) {
         // we are done printing
         // Indicate completion in title area.
         var msg = getString( "printComplete" );
         dialog.title.setAttribute("value", msg);
 
         // Put progress meter at 100%.
         dialog.progress.setAttribute( "value", 100 );
         dialog.progress.setAttribute( "mode", "normal" );
@@ -79,91 +75,81 @@ var progressListener = {
           // progress dialog with the mouse long enough).
           opener.focus();
         }
 
         window.close();
       }
     },
 
-    onProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress)
-    {
-      if (switchUI)
-      {
+    onProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) {
+      if (switchUI) {
         dialog.tempLabel.setAttribute("hidden", "true");
         dialog.progress.setAttribute("hidden", "false");
 
         var progressLabel = getString("progress");
         if (progressLabel == "") {
           progressLabel = "Progress:"; // better than nothing
         }
         switchUI = false;
       }
 
-      if (progressParams)
-      {
+      if (progressParams) {
         var docTitleStr = ellipseString(progressParams.docTitle, false);
         if (docTitleStr != docTitle) {
           docTitle = docTitleStr;
           dialog.title.value = docTitle;
         }
         var docURLStr = progressParams.docURL;
         if (docURLStr != docURL && dialog.title != null) {
           docURL = docURLStr;
           if (docTitle == "") {
             dialog.title.value = ellipseString(docURLStr, true);
           }
         }
       }
 
       // Calculate percentage.
       var percent;
-      if ( aMaxTotalProgress > 0 )
-      {
+      if ( aMaxTotalProgress > 0 ) {
         percent = Math.round( (aCurTotalProgress * 100) / aMaxTotalProgress );
         if ( percent > 100 )
           percent = 100;
 
         dialog.progress.removeAttribute( "mode");
 
         // Advance progress meter.
         dialog.progress.setAttribute( "value", percent );
 
         // Update percentage label on progress meter.
         var percentPrint = getString( "progressText" );
         percentPrint = replaceInsert( percentPrint, 1, percent );
         dialog.progressText.setAttribute("value", percentPrint);
-      }
-      else
-      {
+      } else {
         // Progress meter should be barber-pole in this case.
         dialog.progress.setAttribute( "mode", "undetermined" );
         // Update percentage label on progress meter.
         dialog.progressText.setAttribute("value", "");
       }
     },
 
-	  onLocationChange(aWebProgress, aRequest, aLocation, aFlags)
-    {
+	  onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
       // we can ignore this notification
     },
 
-    onStatusChange(aWebProgress, aRequest, aStatus, aMessage)
-    {
+    onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
       if (aMessage != "")
         dialog.title.setAttribute("value", aMessage);
     },
 
-    onSecurityChange(aWebProgress, aRequest, state)
-    {
+    onSecurityChange(aWebProgress, aRequest, state) {
       // we can ignore this notification
     },
 
-    QueryInterface(iid)
-    {
+    QueryInterface(iid) {
      if (iid.equals(Components.interfaces.nsIWebProgressListener) || iid.equals(Components.interfaces.nsISupportsWeakReference))
       return this;
 
      throw Components.results.NS_NOINTERFACE;
     }
 };
 
 function getString( stringId ) {
@@ -184,36 +170,33 @@ function getString( stringId ) {
           // If unable to fetch string, use an empty string.
           dialog.strings[stringId] = "";
         }
       } catch (e) { dialog.strings[stringId] = ""; }
    }
    return dialog.strings[stringId];
 }
 
-function loadDialog()
-{
+function loadDialog() {
 }
 
 function replaceInsert( text, index, value ) {
    var result = text;
    var regExp = new RegExp( "#" + index );
    result = result.replace( regExp, value );
    return result;
 }
 
 function onLoad() {
 
     // Set global variables.
     printProgress = window.arguments[0];
-    if (window.arguments[1])
-    {
+    if (window.arguments[1]) {
       progressParams = window.arguments[1].QueryInterface(Components.interfaces.nsIPrintProgressParams)
-      if (progressParams)
-      {
+      if (progressParams) {
         docTitle = ellipseString(progressParams.docTitle, false);
         docURL   = ellipseString(progressParams.docURL, true);
       }
     }
 
     if ( !printProgress ) {
         dump( "Invalid argument to printProgress.xul\n" );
         window.close()
@@ -243,40 +226,31 @@ function onLoad() {
     loadDialog();
 
     // set our web progress listener on the helper app launcher
     printProgress.registerListener(progressListener);
     // We need to delay the set title else dom will overwrite it
     window.setTimeout(doneIniting, 500);
 }
 
-function onUnload()
-{
-  if (printProgress)
-  {
-   try
-   {
+function onUnload() {
+  if (printProgress) {
+   try {
      printProgress.unregisterListener(progressListener);
      printProgress = null;
-   }
-
-   catch ( exception ) {}
+   } catch ( exception ) {}
   }
 }
 
 // If the user presses cancel, tell the app launcher and close the dialog...
-function onCancel()
-{
+function onCancel() {
   // Cancel app launcher.
-   try
-   {
+   try {
      printProgress.processCanceledByUser = true;
-   }
-   catch ( exception ) { return true; }
+   } catch ( exception ) { return true; }
 
   // don't Close up dialog by returning false, the backend will close the dialog when everything will be aborted.
   return false;
 }
 
-function doneIniting()
-{
+function doneIniting() {
   printProgress.doneIniting();
 }
--- a/toolkit/components/printing/content/printUtils.js
+++ b/toolkit/components/printing/content/printUtils.js
@@ -103,33 +103,31 @@ var PrintUtils = {
   /**
    * Starts the process of printing the contents of a window.
    *
    * @param aWindowID
    *        The outer window ID of the nsIDOMWindow to print.
    * @param aBrowser
    *        The <xul:browser> that the nsIDOMWindow for aWindowID belongs to.
    */
-  printWindow(aWindowID, aBrowser)
-  {
+  printWindow(aWindowID, aBrowser) {
     let mm = aBrowser.messageManager;
     mm.sendAsyncMessage("Printing:Print", {
       windowID: aWindowID,
       simplifiedMode: this._shouldSimplify,
     });
   },
 
   /**
    * Deprecated.
    *
    * Starts the process of printing the contents of window.content.
    *
    */
-  print()
-  {
+  print() {
     if (gBrowser) {
       return this.printWindow(gBrowser.selectedBrowser.outerWindowID,
                               gBrowser.selectedBrowser);
     }
 
     if (this.usingRemoteTabs) {
       throw new Error("PrintUtils.print cannot be run in windows running with " +
                       "remote tabs. Use PrintUtils.printWindow instead.");
@@ -181,18 +179,17 @@ var PrintUtils = {
    *        onExit:
    *          Called upon exiting print preview.
    *
    *        These methods must be defined. printPreview can be called
    *        with aListenerObj as null iff this window is already displaying
    *        print preview (in which case, the previous aListenerObj passed
    *        to it will be used).
    */
-  printPreview(aListenerObj)
-  {
+  printPreview(aListenerObj) {
     // if we're already in PP mode, don't set the listener; chances
     // are it is null because someone is calling printPreview() to
     // get us to refresh the display.
     if (!this.inPrintPreview) {
       this._listener = aListenerObj;
       this._sourceBrowser = aListenerObj.getSourceBrowser();
       this._originalTitle = this._sourceBrowser.contentTitle;
       this._originalURL = this._sourceBrowser.currentURI.spec;
@@ -249,18 +246,17 @@ var PrintUtils = {
    * Returns the nsIWebBrowserPrint associated with some content window.
    * This method is being kept here for compatibility reasons, but should not
    * be called by code hoping to support e10s / remote browsers.
    *
    * @param aWindow
    *        The window from which to get the nsIWebBrowserPrint from.
    * @return nsIWebBrowserPrint
    */
-  getWebBrowserPrint(aWindow)
-  {
+  getWebBrowserPrint(aWindow) {
     let Deprecated = Components.utils.import("resource://gre/modules/Deprecated.jsm", {}).Deprecated;
     let text = "getWebBrowserPrint is now deprecated, and fully unsupported for " +
                "multi-process browsers. Please use a frame script to get " +
                "access to nsIWebBrowserPrint from content.";
     let url = "https://developer.mozilla.org/en-US/docs/Printing_from_a_XUL_App";
     Deprecated.warning(text, url);
 
     if (this.usingRemoteTabs) {
@@ -425,29 +421,27 @@ var PrintUtils = {
         return listener.onStateChange(null, null,
                                       data.stateFlags,
                                       data.status);
       }
     }
     return undefined;
   },
 
-  setPrinterDefaultsForSelectedPrinter(aPSSVC, aPrintSettings)
-  {
+  setPrinterDefaultsForSelectedPrinter(aPSSVC, aPrintSettings) {
     if (!aPrintSettings.printerName)
       aPrintSettings.printerName = aPSSVC.defaultPrinterName;
 
     // First get any defaults from the printer
     aPSSVC.initPrintSettingsFromPrinter(aPrintSettings.printerName, aPrintSettings);
     // now augment them with any values from last time
-    aPSSVC.initPrintSettingsFromPrefs(aPrintSettings, true,  aPrintSettings.kInitSaveAll);
+    aPSSVC.initPrintSettingsFromPrefs(aPrintSettings, true, aPrintSettings.kInitSaveAll);
   },
 
-  getPrintSettings()
-  {
+  getPrintSettings() {
     var pref = Components.classes["@mozilla.org/preferences-service;1"]
                          .getService(Components.interfaces.nsIPrefBranch);
     if (pref) {
       gPrintSettingsAreGlobal = pref.getBoolPref("print.use_global_printsettings", false);
       gSavePrintSettings = pref.getBoolPref("print.save_print_settings", false);
     }
 
     var printSettings;
@@ -464,39 +458,35 @@ var PrintUtils = {
       dump("getPrintSettings: " + e + "\n");
     }
     return printSettings;
   },
 
   // This observer is called once the progress dialog has been "opened"
   _obsPP:
   {
-    observe(aSubject, aTopic, aData)
-    {
+    observe(aSubject, aTopic, aData) {
       // delay the print preview to show the content of the progress dialog
       setTimeout(function() { PrintUtils.enterPrintPreview(); }, 0);
     },
 
-    QueryInterface(iid)
-    {
+    QueryInterface(iid) {
       if (iid.equals(Components.interfaces.nsIObserver) ||
           iid.equals(Components.interfaces.nsISupportsWeakReference) ||
           iid.equals(Components.interfaces.nsISupports))
         return this;
       throw Components.results.NS_NOINTERFACE;
     }
   },
 
-  setSimplifiedMode(shouldSimplify)
-  {
+  setSimplifiedMode(shouldSimplify) {
     this._shouldSimplify = shouldSimplify;
   },
 
-  enterPrintPreview()
-  {
+  enterPrintPreview() {
     // Send a message to the print preview browser to initialize
     // print preview. If we happen to have gotten a print preview
     // progress listener from nsIPrintingPromptService.showProgress
     // in printPreview, we add listeners to feed that progress
     // listener.
     let ppBrowser = this._listener.getPrintPreviewBrowser();
     let mm = ppBrowser.messageManager;
 
@@ -615,18 +605,17 @@ var PrintUtils = {
       ppBrowser.focus();
       // on Enter PP Call back
       this._listener.onEnter();
     };
 
     mm.addMessageListener("Printing:Preview:Entered", onEntered);
   },
 
-  exitPrintPreview()
-  {
+  exitPrintPreview() {
     let ppBrowser = this._listener.getPrintPreviewBrowser();
     let browserMM = ppBrowser.messageManager;
     browserMM.sendAsyncMessage("Printing:Preview:Exit");
     window.removeEventListener("keydown", this.onKeyDownPP, true);
     window.removeEventListener("keypress", this.onKeyPressPP, true);
 
     // restore the old close handler
     document.documentElement.setAttribute("onclose", this._closeHandlerPP);
@@ -644,45 +633,41 @@ var PrintUtils = {
       this._sourceBrowser.focus();
     gFocusedElement = null;
 
     this.setSimplifiedMode(false);
 
     this._listener.onExit();
   },
 
-  logTelemetry(ID)
-  {
+  logTelemetry(ID) {
     let histogram = Services.telemetry.getHistogramById(ID);
     histogram.add(true);
   },
 
-  onKeyDownPP(aEvent)
-  {
+  onKeyDownPP(aEvent) {
     // Esc exits the PP
     if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE) {
       PrintUtils.exitPrintPreview();
     }
   },
 
-  onKeyPressPP(aEvent)
-  {
+  onKeyPressPP(aEvent) {
     var closeKey;
     try {
       closeKey = document.getElementById("key_close")
                          .getAttribute("key");
       closeKey = aEvent["DOM_VK_" + closeKey];
     } catch (e) {}
     var isModif = aEvent.ctrlKey || aEvent.metaKey;
     // Ctrl-W exits the PP
     if (isModif &&
         (aEvent.charCode == closeKey || aEvent.charCode == closeKey + 32)) {
       PrintUtils.exitPrintPreview();
-    }
-    else if (isModif) {
+    } else if (isModif) {
       var printPreviewTB = document.getElementById("print-preview-toolbar");
       var printKey = document.getElementById("printKb").getAttribute("key").toUpperCase();
       var pressedKey = String.fromCharCode(aEvent.charCode).toUpperCase();
       if (printKey == pressedKey) {
         printPreviewTB.print();
       }
     }
     // cancel shortkeys
--- a/toolkit/components/printing/content/printdialog.js
+++ b/toolkit/components/printing/content/printdialog.js
@@ -11,18 +11,17 @@ var gOriginalNumCopies = 1;
 var paramBlock;
 var gPrefs             = null;
 var gPrintSettings     = null;
 var gWebBrowserPrint   = null;
 var gPrintSetInterface = Components.interfaces.nsIPrintSettings;
 var doDebug            = false;
 
 // ---------------------------------------------------
-function initDialog()
-{
+function initDialog() {
   dialog = {};
 
   dialog.propertiesButton = document.getElementById("properties");
   dialog.descText         = document.getElementById("descText");
 
   dialog.printrangeGroup = document.getElementById("printrangeGroup");
   dialog.allpagesRadio   = document.getElementById("allpagesRadio");
   dialog.rangeRadio      = document.getElementById("rangeRadio");
@@ -49,99 +48,91 @@ function initDialog()
   // <data> elements
   dialog.printName       = document.getElementById("printButton");
   dialog.fpDialog        = document.getElementById("fpDialog");
 
   dialog.enabled         = false;
 }
 
 // ---------------------------------------------------
-function checkInteger(element)
-{
+function checkInteger(element) {
   var value = element.value;
   if (value && value.length > 0) {
     value = value.replace(/[^0-9]/g, "");
     if (!value) value = "";
     element.value = value;
   }
   if (!value || value < 1 || value > 999)
     dialog.printButton.setAttribute("disabled", "true");
   else
     dialog.printButton.removeAttribute("disabled");
 }
 
 // ---------------------------------------------------
-function stripTrailingWhitespace(element)
-{
+function stripTrailingWhitespace(element) {
   var value = element.value;
   value = value.replace(/\s+$/, "");
   element.value = value;
 }
 
 // ---------------------------------------------------
-function getPrinterDescription(printerName)
-{
+function getPrinterDescription(printerName) {
   var s = "";
 
   try {
     /* This may not work with non-ASCII test (see bug 235763 comment #16) */
     s = gPrefs.getCharPref("print.printer_" + printerName + ".printer_description")
   } catch (e) {
   }
 
   return s;
 }
 
 // ---------------------------------------------------
-function listElement(aListElement)
-  {
+function listElement(aListElement) {
     this.listElement = aListElement;
   }
 
 listElement.prototype =
   {
-    clearList()
-        {
+    clearList() {
           // remove the menupopup node child of the menulist.
           var popup = this.listElement.firstChild;
           if (popup) {
             this.listElement.removeChild(popup);
           }
         },
 
-    appendPrinterNames(aDataObject)
-        {
+    appendPrinterNames(aDataObject) {
           if ((null == aDataObject) || !aDataObject.hasMore()) {
             // disable dialog
             this.listElement.setAttribute("value", "");
             this.listElement.setAttribute("label",
               document.getElementById("printingBundle")
                       .getString("noprinter"));
 
             this.listElement.setAttribute("disabled", "true");
             dialog.printerLabel.setAttribute("disabled", "true");
             dialog.propertiesButton.setAttribute("disabled", "true");
             dialog.fileCheck.setAttribute("disabled", "true");
             dialog.printButton.setAttribute("disabled", "true");
-          }
-          else {
+          } else {
             // build popup menu from printer names
             var list = document.getElementById("printerList");
             do {
               let printerNameStr = aDataObject.getNext();
               list.appendItem(printerNameStr, printerNameStr, getPrinterDescription(printerNameStr));
             } while (aDataObject.hasMore());
             this.listElement.removeAttribute("disabled");
           }
         }
   };
 
 // ---------------------------------------------------
-function getPrinters()
-{
+function getPrinters() {
   var selectElement = new listElement(dialog.printerList);
   selectElement.clearList();
 
   var printerEnumerator;
   try {
     printerEnumerator =
         Components.classes["@mozilla.org/gfx/printerenumerator;1"]
                   .getService(Components.interfaces.nsIPrinterEnumerator)
@@ -153,68 +144,64 @@ function getPrinters()
 
   // make sure we load the prefs for the initially selected printer
   setPrinterDefaultsForSelectedPrinter();
 }
 
 
 // ---------------------------------------------------
 // update gPrintSettings with the defaults for the selected printer
-function setPrinterDefaultsForSelectedPrinter()
-{
+function setPrinterDefaultsForSelectedPrinter() {
   gPrintSettings.printerName = dialog.printerList.value;
 
   dialog.descText.value = getPrinterDescription(gPrintSettings.printerName);
 
   // First get any defaults from the printer
   printService.initPrintSettingsFromPrinter(gPrintSettings.printerName, gPrintSettings);
 
   // now augment them with any values from last time
   printService.initPrintSettingsFromPrefs(gPrintSettings, true, gPrintSetInterface.kInitSaveAll);
 
   if (doDebug) {
     dump("setPrinterDefaultsForSelectedPrinter: printerName='" + gPrintSettings.printerName + "', paperName='" + gPrintSettings.paperName + "'\n");
   }
 }
 
 // ---------------------------------------------------
-function displayPropertiesDialog()
-{
+function displayPropertiesDialog() {
   gPrintSettings.numCopies = dialog.numCopiesInput.value;
   try {
     var printingPromptService = Components.classes["@mozilla.org/embedcomp/printingprompt-service;1"]
                                                  .getService(Components.interfaces.nsIPrintingPromptService);
     if (printingPromptService) {
       printingPromptService.showPrinterProperties(null, dialog.printerList.value, gPrintSettings);
       dialog.numCopiesInput.value = gPrintSettings.numCopies;
     }
   } catch (e) {
     dump("problems getting printingPromptService\n");
   }
 }
 
 // ---------------------------------------------------
-function doPrintRange(inx)
-{
+function doPrintRange(inx) {
   if (inx == 1) {
     dialog.frompageInput.removeAttribute("disabled");
     dialog.frompageLabel.removeAttribute("disabled");
     dialog.topageInput.removeAttribute("disabled");
     dialog.topageLabel.removeAttribute("disabled");
   } else {
     dialog.frompageInput.setAttribute("disabled", "true");
     dialog.frompageLabel.setAttribute("disabled", "true");
     dialog.topageInput.setAttribute("disabled", "true");
     dialog.topageLabel.setAttribute("disabled", "true");
   }
 }
 
 // ---------------------------------------------------
-function loadDialog()
-{
+function loadDialog() {
   var print_copies        = 1;
   var print_selection_radio_enabled = false;
   var print_frametype     = gPrintSetInterface.kSelectedFrame;
   var print_howToEnableUI = gPrintSetInterface.kFrameEnableNone;
   var print_tofile        = "";
 
   try {
     gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
@@ -291,18 +278,17 @@ function loadDialog()
     dialog.eachframesepRadio.setAttribute("disabled", "true");
     dialog.printframeGroupLabel.setAttribute("disabled", "true");
   }
 
   dialog.printButton.label = dialog.printName.getAttribute("label");
 }
 
 // ---------------------------------------------------
-function onLoad()
-{
+function onLoad() {
   // Init dialog.
   initDialog();
 
   // param[0]: nsIPrintSettings object
   // param[1]: container for return value (1 = print, 0 = cancel)
 
   gPrintSettings   = window.arguments[0].QueryInterface(gPrintSetInterface);
   gWebBrowserPrint = window.arguments[1].QueryInterface(Components.interfaces.nsIWebBrowserPrint);
@@ -310,18 +296,17 @@ function onLoad()
 
   // default return value is "cancel"
   paramBlock.SetInt(0, 0);
 
   loadDialog();
 }
 
 // ---------------------------------------------------
-function onAccept()
-{
+function onAccept() {
   if (gPrintSettings != null) {
     var print_howToEnableUI = gPrintSetInterface.kFrameEnableNone;
 
     // save these out so they can be picked up by the device spec
     gPrintSettings.printerName = dialog.printerList.value;
     print_howToEnableUI        = gPrintSettings.howToEnableFrameUI;
     gPrintSettings.printToFile = dialog.fileCheck.checked;
 
@@ -364,51 +349,49 @@ function onAccept()
     }
   }
 
   var saveToPrefs = false;
 
   saveToPrefs = gPrefs.getBoolPref("print.save_print_settings");
 
   if (saveToPrefs && printService != null) {
-    var flags = gPrintSetInterface.kInitSavePaperSize      |
-                gPrintSetInterface.kInitSaveEdges          |
-                gPrintSetInterface.kInitSaveInColor        |
-                gPrintSetInterface.kInitSaveShrinkToFit    |
+    var flags = gPrintSetInterface.kInitSavePaperSize |
+                gPrintSetInterface.kInitSaveEdges |
+                gPrintSetInterface.kInitSaveInColor |
+                gPrintSetInterface.kInitSaveShrinkToFit |
                 gPrintSetInterface.kInitSaveScaling;
     printService.savePrintSettingsToPrefs(gPrintSettings, true, flags);
   }
 
   // set return value to "print"
   if (paramBlock) {
     paramBlock.SetInt(0, 1);
   } else {
     dump("*** FATAL ERROR: No paramBlock\n");
   }
 
   return true;
 }
 
 // ---------------------------------------------------
-function onCancel()
-{
+function onCancel() {
   // set return value to "cancel"
   if (paramBlock) {
     paramBlock.SetInt(0, 0);
   } else {
     dump("*** FATAL ERROR: No paramBlock\n");
   }
 
   return true;
 }
 
 // ---------------------------------------------------
 const nsIFilePicker = Components.interfaces.nsIFilePicker;
-function chooseFile()
-{
+function chooseFile() {
   try {
     var fp = Components.classes["@mozilla.org/filepicker;1"]
                        .createInstance(nsIFilePicker);
     fp.init(window, dialog.fpDialog.getAttribute("label"), nsIFilePicker.modeSave);
     fp.appendFilters(nsIFilePicker.filterAll);
     if (fp.show() != Components.interfaces.nsIFilePicker.returnCancel &&
         fp.file && fp.file.path) {
       gPrintSettings.toFileName = fp.file.path;
--- a/toolkit/components/printing/content/printjoboptions.js
+++ b/toolkit/components/printing/content/printjoboptions.js
@@ -10,55 +10,51 @@ var gPrintSettings = null;
 var gPrintSettingsInterface  = Components.interfaces.nsIPrintSettings;
 var gPaperArray;
 var gPrefs;
 
 var gPrintSetInterface = Components.interfaces.nsIPrintSettings;
 var doDebug            = true;
 
 // ---------------------------------------------------
-function checkDouble(element, maxVal)
-{
+function checkDouble(element, maxVal) {
   var value = element.value;
   if (value && value.length > 0) {
     value = value.replace(/[^\.|^0-9]/g, "");
     if (!value) {
       element.value = "";
     } else if (value > maxVal) {
       element.value = maxVal;
     } else {
       element.value = value;
     }
   }
 }
 
 // ---------------------------------------------------
-function isListOfPrinterFeaturesAvailable()
-{
+function isListOfPrinterFeaturesAvailable() {
   var has_printerfeatures = false;
 
   try {
     has_printerfeatures = gPrefs.getBoolPref("print.tmp.printerfeatures." + gPrintSettings.printerName + ".has_special_printerfeatures");
   } catch (ex) {
   }
 
   return has_printerfeatures;
 }
 
 // ---------------------------------------------------
-function getDoubleStr(val, dec)
-{
+function getDoubleStr(val, dec) {
   var str = val.toString();
   var inx = str.indexOf(".");
   return str.substring(0, inx + dec + 1);
 }
 
 // ---------------------------------------------------
-function initDialog()
-{
+function initDialog() {
   gPrintBundle = document.getElementById("printBundle");
 
   dialog = {};
 
   dialog.paperList       = document.getElementById("paperList");
   dialog.paperGroup      = document.getElementById("paperGroup");
 
   dialog.jobTitleLabel   = document.getElementById("jobTitleLabel");
@@ -72,67 +68,60 @@ function initDialog()
 
   dialog.topInput        = document.getElementById("topInput");
   dialog.bottomInput     = document.getElementById("bottomInput");
   dialog.leftInput       = document.getElementById("leftInput");
   dialog.rightInput      = document.getElementById("rightInput");
 }
 
 // ---------------------------------------------------
-function round10(val)
-{
+function round10(val) {
   return Math.round(val * 10) / 10;
 }
 
 
 // ---------------------------------------------------
-function paperListElement(aPaperListElement)
-  {
+function paperListElement(aPaperListElement) {
     this.paperListElement = aPaperListElement;
   }
 
 paperListElement.prototype =
   {
-    clearPaperList()
-        {
+    clearPaperList() {
           // remove the menupopup node child of the menulist.
           this.paperListElement.removeChild(this.paperListElement.firstChild);
         },
 
-    appendPaperNames(aDataObject)
-        {
+    appendPaperNames(aDataObject) {
           var popupNode = document.createElement("menupopup");
-          for (var i = 0;i < aDataObject.length;i++)  {
+          for (var i = 0;i < aDataObject.length;i++) {
             var paperObj = aDataObject[i];
             var itemNode = document.createElement("menuitem");
             var label;
             try {
               label = gPrintBundle.getString(paperObj.name);
-            }
-            catch (e) {
+            } catch (e) {
               /* No name in string bundle ? Then build one manually (this
                * usually happens when gPaperArray was build by createPaperArrayFromPrinterFeatures() ...) */
               if (paperObj.inches) {
                 label = paperObj.name + " (" + round10(paperObj.width) + "x" + round10(paperObj.height) + " inch)";
-              }
-              else {
+              } else {
                 label = paperObj.name + " (" + paperObj.width + "x" + paperObj.height + " mm)";
               }
             }
             itemNode.setAttribute("label", label);
             itemNode.setAttribute("value", i);
             popupNode.appendChild(itemNode);
           }
           this.paperListElement.appendChild(popupNode);
         }
   };
 
 // ---------------------------------------------------
-function createPaperArrayFromDefaults()
-{
+function createPaperArrayFromDefaults() {
   var paperNames   = ["letterSize", "legalSize", "exectiveSize", "a5Size", "a4Size", "a3Size", "a2Size", "a1Size", "a0Size"];
   // var paperNames   = ["&letterRadio.label;", "&legalRadio.label;", "&exectiveRadio.label;", "&a4Radio.label;", "&a3Radio.label;"];
   var paperWidths  = [ 8.5,  8.5,  7.25, 148.0, 210.0, 287.0, 420.0, 594.0,  841.0];
   var paperHeights = [11.0, 14.0, 10.50, 210.0, 297.0, 420.0, 594.0, 841.0, 1189.0];
   var paperInches  = [true, true, true,  false, false, false, false, false, false];
 
   gPaperArray = new Array();
 
@@ -140,97 +129,90 @@ function createPaperArrayFromDefaults()
     var obj    = {};
     obj.name   = paperNames[i];
     obj.width  = paperWidths[i];
     obj.height = paperHeights[i];
     obj.inches = paperInches[i];
 
     /* Calculate the width/height in millimeters */
     if (paperInches[i]) {
-      obj.width_mm  = paperWidths[i]  * 25.4;
+      obj.width_mm  = paperWidths[i] * 25.4;
       obj.height_mm = paperHeights[i] * 25.4;
-    }
-    else {
+    } else {
       obj.width_mm  = paperWidths[i];
       obj.height_mm = paperHeights[i];
     }
     gPaperArray[i] = obj;
   }
 }
 
 // ---------------------------------------------------
-function createPaperArrayFromPrinterFeatures()
-{
+function createPaperArrayFromPrinterFeatures() {
   var printername = gPrintSettings.printerName;
   if (doDebug) {
     dump("createPaperArrayFromPrinterFeatures for " + printername + ".\n");
   }
 
   gPaperArray = new Array();
 
   var numPapers = gPrefs.getIntPref("print.tmp.printerfeatures." + printername + ".paper.count");
 
   if (doDebug) {
     dump("processing " + numPapers + " entries...\n");
   }
 
   for (var i = 0;i < numPapers;i++) {
     var obj       = {};
     obj.name      = gPrefs.getCharPref("print.tmp.printerfeatures." + printername + ".paper." + i + ".name");
-    obj.width_mm  = gPrefs.getIntPref("print.tmp.printerfeatures."  + printername + ".paper." + i + ".width_mm");
-    obj.height_mm = gPrefs.getIntPref("print.tmp.printerfeatures."  + printername + ".paper." + i + ".height_mm");
+    obj.width_mm  = gPrefs.getIntPref("print.tmp.printerfeatures." + printername + ".paper." + i + ".width_mm");
+    obj.height_mm = gPrefs.getIntPref("print.tmp.printerfeatures." + printername + ".paper." + i + ".height_mm");
     obj.inches    = gPrefs.getBoolPref("print.tmp.printerfeatures." + printername + ".paper." + i + ".is_inch");
 
     /* Calculate the width/height in paper's native units (either inches or millimeters) */
     if (obj.inches) {
-      obj.width  = obj.width_mm  / 25.4;
+      obj.width  = obj.width_mm / 25.4;
       obj.height = obj.height_mm / 25.4;
-    }
-    else {
+    } else {
       obj.width  = obj.width_mm;
       obj.height = obj.height_mm;
     }
 
     gPaperArray[i] = obj;
 
     if (doDebug) {
       dump("paper index=" + i + ", name=" + obj.name + ", width=" + obj.width + ", height=" + obj.height + ".\n");
     }
   }
 }
 
 // ---------------------------------------------------
-function createPaperArray()
-{
+function createPaperArray() {
   if (isListOfPrinterFeaturesAvailable()) {
     createPaperArrayFromPrinterFeatures();
-  }
-  else {
+  } else {
     createPaperArrayFromDefaults();
   }
 }
 
 // ---------------------------------------------------
-function createPaperSizeList(selectedInx)
-{
+function createPaperSizeList(selectedInx) {
   var selectElement = new paperListElement(dialog.paperList);
   selectElement.clearPaperList();
 
   selectElement.appendPaperNames(gPaperArray);
 
   if (selectedInx > -1) {
     selectElement.paperListElement.selectedIndex = selectedInx;
   }
 
   // dialog.paperList = selectElement;
 }
 
 // ---------------------------------------------------
-function loadDialog()
-{
+function loadDialog() {
   var print_paper_unit       = 0;
   var print_paper_width      = 0.0;
   var print_paper_height     = 0.0;
   var print_paper_name       = "";
   var print_color            = true;
   var print_jobtitle         = "";
 
   gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
@@ -318,18 +300,17 @@ function loadDialog()
 
   dialog.topInput.value    = gPrintSettings.edgeTop.toFixed(2);
   dialog.bottomInput.value = gPrintSettings.edgeBottom.toFixed(2);
   dialog.leftInput.value   = gPrintSettings.edgeLeft.toFixed(2);
   dialog.rightInput.value  = gPrintSettings.edgeRight.toFixed(2);
 }
 
 // ---------------------------------------------------
-function onLoad()
-{
+function onLoad() {
   // Init dialog.
   initDialog();
 
   gPrintSettings = window.arguments[0].QueryInterface(gPrintSetInterface);
   paramBlock = window.arguments[1].QueryInterface(Components.interfaces.nsIDialogParamBlock);
 
   if (doDebug) {
     if (gPrintSettings == null) alert("PrintSettings is null!");
@@ -338,18 +319,17 @@ function onLoad()
 
   // default return value is "cancel"
   paramBlock.SetInt(0, 0);
 
   loadDialog();
 }
 
 // ---------------------------------------------------
-function onAccept()
-{
+function onAccept() {
   var print_paper_unit        = gPrintSettingsInterface.kPaperSizeInches;
   var print_paper_width       = 0.0;
   var print_paper_height      = 0.0;
   var print_paper_name        = "";
 
   if (gPrintSettings != null) {
     var paperSelectedInx = dialog.paperList.selectedIndex;
     if (gPaperArray[paperSelectedInx].inches) {
--- a/toolkit/components/processsingleton/MainProcessSingleton.js
+++ b/toolkit/components/processsingleton/MainProcessSingleton.js
@@ -38,18 +38,17 @@ MainProcessSingleton.prototype = {
       // Make sure the URLs are HTTP, HTTPS, or FTP.
       let isWeb = ["https", "http", "ftp"];
 
       if (isWeb.indexOf(engineURL.scheme) < 0)
         throw "Unsupported search engine URL: " + engineURL;
 
       if (iconURL && isWeb.indexOf(iconURL.scheme) < 0)
         throw "Unsupported search icon URL: " + iconURL;
-    }
-    catch (ex) {
+    } catch (ex) {
       Cu.reportError("Invalid argument passed to window.external.AddSearchProvider: " + ex);
 
       var searchBundle = Services.strings.createBundle("chrome://global/locale/search/search.properties");
       var brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties");
       var brandName = brandBundle.GetStringFromName("brandShortName");
       var title = searchBundle.GetStringFromName("error_invalid_engine_title");
       var msg = searchBundle.formatStringFromName("error_invalid_engine_msg",
                                                   [brandName], 1);
--- a/toolkit/components/prompts/src/CommonDialog.jsm
+++ b/toolkit/components/prompts/src/CommonDialog.jsm
@@ -70,17 +70,17 @@ CommonDialog.prototype = {
             this.initTextbox("login", this.args.value);
             // Clear the label, since this isn't really a username prompt.
             this.ui.loginLabel.setAttribute("value", "");
             break;
           case "promptUserAndPass":
             this.numButtons = 2;
             this.iconClass  = ["authentication-icon", "question-icon"];
             this.soundID    = Ci.nsISound.EVENT_PROMPT_DIALOG_OPEN;
-            this.initTextbox("login",     this.args.user);
+            this.initTextbox("login", this.args.user);
             this.initTextbox("password1", this.args.pass);
             break;
           case "promptPassword":
             this.numButtons = 2;
             this.iconClass  = ["authentication-icon", "question-icon"];
             this.soundID    = Ci.nsISound.EVENT_PROMPT_DIALOG_OPEN;
             this.initTextbox("password1", this.args.pass);
             // Clear the label, since the message presumably indicates its purpose.
--- a/toolkit/components/prompts/src/nsPrompter.js
+++ b/toolkit/components/prompts/src/nsPrompter.js
@@ -71,17 +71,17 @@ Prompter.prototype = {
 
     confirmCheck(domWin, title, text, checkLabel, checkValue) {
         let p = this.pickPrompter(domWin);
         return p.confirmCheck(title, text, checkLabel, checkValue);
     },
 
     confirmEx(domWin, title, text, flags, button0, button1, button2, checkLabel, checkValue) {
         let p = this.pickPrompter(domWin);
-        return p.confirmEx(title, text,  flags, button0, button1, button2, checkLabel, checkValue);
+        return p.confirmEx(title, text, flags, button0, button1, button2, checkLabel, checkValue);
     },
 
     prompt(domWin, title, text, value, checkLabel, checkValue) {
         let p = this.pickPrompter(domWin);
         return p.nsIPrompt_prompt(title, text, value, checkLabel, checkValue);
     },
 
     promptUsernameAndPassword(domWin, title, text, user, pass, checkLabel, checkValue) {
--- a/toolkit/components/prompts/test/prompt_common.js
+++ b/toolkit/components/prompts/test/prompt_common.js
@@ -36,26 +36,26 @@ function handlePrompt(state, action) {
       resolve(true);
     });
     gChromeScript.sendAsyncMessage("handlePrompt", { action, isTabModal});
   });
 }
 
 function checkPromptState(promptState, expectedState) {
     // XXX check title? OS X has title in content
-    is(promptState.msg,         expectedState.msg,         "Checking expected message");
+    is(promptState.msg, expectedState.msg, "Checking expected message");
     if (isOSX && !isTabModal)
       ok(!promptState.titleHidden, "Checking title always visible on OS X");
     else
       is(promptState.titleHidden, expectedState.titleHidden, "Checking title visibility");
-    is(promptState.textHidden,  expectedState.textHidden,  "Checking textbox visibility");
-    is(promptState.passHidden,  expectedState.passHidden,  "Checking passbox visibility");
+    is(promptState.textHidden, expectedState.textHidden, "Checking textbox visibility");
+    is(promptState.passHidden, expectedState.passHidden, "Checking passbox visibility");
     is(promptState.checkHidden, expectedState.checkHidden, "Checking checkbox visibility");
-    is(promptState.checkMsg,    expectedState.checkMsg,    "Checking checkbox label");
-    is(promptState.checked,     expectedState.checked,     "Checking checkbox checked");
+    is(promptState.checkMsg, expectedState.checkMsg, "Checking checkbox label");
+    is(promptState.checked, expectedState.checked, "Checking checkbox checked");
     if (!isTabModal)
       is(promptState.iconClass, "spaced " + expectedState.iconClass, "Checking expected icon CSS class");
     is(promptState.textValue, expectedState.textValue, "Checking textbox value");
     is(promptState.passValue, expectedState.passValue, "Checking passbox value");
 
     if (expectedState.butt0Label) {
         is(promptState.butt0Label, expectedState.butt0Label, "Checking accept-button label");
     }
@@ -63,17 +63,17 @@ function checkPromptState(promptState, e
         is(promptState.butt1Label, expectedState.butt1Label, "Checking cancel-button label");
     }
     if (expectedState.butt2Label) {
         is(promptState.butt2Label, expectedState.butt2Label, "Checking extra1-button label");
     }
 
     // For prompts with a time-delay button.
     if (expectedState.butt0Disabled) {
-        is(promptState.butt0Disabled, true,  "Checking accept-button is disabled");
+        is(promptState.butt0Disabled, true, "Checking accept-button is disabled");
         is(promptState.butt1Disabled, false, "Checking cancel-button isn't disabled");
     }
 
     is(promptState.defButton0, expectedState.defButton == "button0", "checking button0 default");
     is(promptState.defButton1, expectedState.defButton == "button1", "checking button1 default");
     is(promptState.defButton2, expectedState.defButton == "button2", "checking button2 default");
 
     if (isOSX && expectedState.focused && expectedState.focused.startsWith("button")) {
--- a/toolkit/components/prompts/test/test_bug620145.html
+++ b/toolkit/components/prompts/test/test_bug620145.html
@@ -76,29 +76,27 @@ add_task(function* runTest() {
   dispatchMouseEvent(text, "mousedown");
   dispatchMouseEvent(text, "mouseup");
   // alert appears at this point, to be closed by the chrome script.
 
   yield promptDone;
   checkSelection();
 });
 
-function dispatchMouseEvent(target, type)
-{
+function dispatchMouseEvent(target, type) {
   var win = target.ownerDocument.defaultView;
   let e = document.createEvent("MouseEvent");
   e.initEvent(type, false, false, win, 0, 1, 1, 1, 1,
               false, false, false, false, 0, null);
   var utils = SpecialPowers.getDOMWindowUtils(win);
   utils.dispatchDOMEventViaPresShell(target, e, true);
   ok(true, type + " sent to " + target.id);
 }
 
-function checkSelection()
-{
+function checkSelection() {
   if (!selectionTest) {
     todo(false, "Selection test is disabled when tab modal prompts are not enabled.");
   } else {
     synthesizeMouse($("text"), 25, 55, { type: "mousemove" });
     is(window.getSelection().toString(), "", "selection not made");
   }
 }
 </script>
--- a/toolkit/components/prompts/test/test_subresources_prompts.html
+++ b/toolkit/components/prompts/test/test_subresources_prompts.html
@@ -30,18 +30,17 @@
 <pre id="test"></pre>
 
 <script class="testbody" type="text/javascript">
 /* import-globals-from prompt_common.js */
 var iframe1Loaded = onloadPromiseFor("iframe_diff_origin");
 var iframe2Loaded = onloadPromiseFor("iframe_same_origin");
 var iframe_prompt = document.getElementById("iframe_prompt");
 
-add_task(function* runTest()
-{
+add_task(function* runTest() {
   // This test depends on tab modal prompts being enabled.
   if (!isTabModal) {
     todo(false, "Test disabled when tab modal prompts are not enabled.");
     return;
   }
 
   info("Ensuring iframe1 has loaded...");
   yield iframe1Loaded;
@@ -104,18 +103,17 @@ add_task(function* runTest()
   promptDone = handlePrompt(state, action);
 
   button = iframe.contentWindow.document.getElementById("btn2");
   dispatchMouseEvent(button, "click");
 
   yield promptDone;
 });
 
-add_task(function* runTestAuth()
-{
+add_task(function* runTestAuth() {
   // Following tests chack prompt message for a cross-origin and not
   // cross-origin subresources load
 
   // Force parent to not look for tab-modal prompts, as they're not
   // used for auth prompts.
   isTabModal = false;
   let state, action;
 
@@ -185,18 +183,17 @@ add_task(function* runTestAuth()
   iframe3Loaded = onloadPromiseFor("iframe_prompt");
   iframe_prompt.src = "http://example.com/tests/toolkit/components/prompts/test/authenticate.sjs?user=mochiuser2&pass=mochipass2&realm=mochitest";
   yield promptDone;
   yield iframe3Loaded;
   checkEchoedAuthInfo({user: "mochiuser2", pass: "mochipass2"},
                       SpecialPowers.wrap(iframe_prompt.contentWindow).document);
 });
 
-function dispatchMouseEvent(target, type)
-{
+function dispatchMouseEvent(target, type) {
   var win = SpecialPowers.unwrap(target.ownerDocument.defaultView);
   var e = document.createEvent("MouseEvent");
   e.initEvent(type, false, false, win, 0, 1, 1, 1, 1,
               false, false, false, false, 0, null);
   var utils = SpecialPowers.getDOMWindowUtils(win);
   utils.dispatchDOMEventViaPresShell(SpecialPowers.unwrap(target), e, true);
 }
 </script>
--- a/toolkit/components/remotebrowserutils/RemoteWebNavigation.js
+++ b/toolkit/components/remotebrowserutils/RemoteWebNavigation.js
@@ -7,28 +7,25 @@ const { interfaces: Ci, classes: Cc, uti
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "Services",
   "resource://gre/modules/Services.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
   "resource://gre/modules/NetUtil.jsm");
 
-function makeURI(url)
-{
+function makeURI(url) {
   return Services.io.newURI(url, null, null);
 }
 
-function readInputStreamToString(aStream)
-{
+function readInputStreamToString(aStream) {
   return NetUtil.readInputStreamToString(aStream, aStream.available());
 }
 
-function RemoteWebNavigation()
-{
+function RemoteWebNavigation() {
   this.wrappedJSObject = this;
 }
 
 RemoteWebNavigation.prototype = {
   classDescription: "nsIWebNavigation for remote browsers",
   classID: Components.ID("{4b56964e-cdf3-4bb8-830c-0e2dad3f4ebd}"),
   contractID: "@mozilla.org/remote-web-navigation;1",
 
@@ -124,16 +121,15 @@ RemoteWebNavigation.prototype = {
   },
   set sessionHistory(aValue) {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
   _sendMessage(aMessage, aData) {
     try {
       this._browser.messageManager.sendAsyncMessage(aMessage, aData);
-    }
-    catch (e) {
+    } catch (e) {
       Cu.reportError(e);
     }
   },
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RemoteWebNavigation]);
--- a/toolkit/components/remotebrowserutils/tests/browser/browser_RemoteWebNavigation.js
+++ b/toolkit/components/remotebrowserutils/tests/browser/browser_RemoteWebNavigation.js
@@ -126,25 +126,23 @@ add_task(function* test_badarguments() {
   gBrowser.selectedTab = gBrowser.addTab();
   let browser = gBrowser.selectedBrowser;
 
   try {
     browser.webNavigation.loadURI(DUMMY1,
                                   Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
                                   null, {}, null);
     ok(false, "Should have seen an exception from trying to pass some postdata");
-  }
-  catch (e) {
+  } catch (e) {
     ok(true, "Should have seen an exception from trying to pass some postdata");
   }
 
   try {
     browser.webNavigation.loadURI(DUMMY1,
                                   Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
                                   null, null, {});
     ok(false, "Should have seen an exception from trying to pass some headers");
-  }
-  catch (e) {
+  } catch (e) {
     ok(true, "Should have seen an exception from trying to pass some headers");
   }
 
   gBrowser.removeCurrentTab();
 });
--- a/toolkit/components/satchel/FormHistory.jsm
+++ b/toolkit/components/satchel/FormHistory.jsm
@@ -130,24 +130,22 @@ function log(aMessage) {
 }
 
 function sendNotification(aType, aData) {
   if (typeof aData == "string") {
     let strWrapper = Cc["@mozilla.org/supports-string;1"].
                      createInstance(Ci.nsISupportsString);
     strWrapper.data = aData;
     aData = strWrapper;
-  }
-  else if (typeof aData == "number") {
+  } else if (typeof aData == "number") {
     let intWrapper = Cc["@mozilla.org/supports-PRInt64;1"].
                      createInstance(Ci.nsISupportsPRInt64);
     intWrapper.data = aData;
     aData = intWrapper;
-  }
-  else if (aData) {
+  } else if (aData) {
     throw Components.Exception("Invalid type " + (typeof aType) + " passed to sendNotification",
                                Cr.NS_ERROR_ILLEGAL_VALUE);
   }
 
   Services.obs.notifyObservers(aData, "satchel-storage-changed", aType);
 }
 
 /**
@@ -504,17 +502,17 @@ function dbMigrate(oldVersion) {
   _dbConnection.beginTransaction();
 
   try {
     for (let v = oldVersion + 1; v <= DB_SCHEMA_VERSION; v++) {
       this.log("Upgrading to version " + v + "...");
       Migrators["dbMigrateToVersion" + v]();
     }
   } catch (e) {
-    this.log("Migration failed: "  + e);
+    this.log("Migration failed: " + e);
     this.dbConnection.rollbackTransaction();
     throw e;
   }
 
   _dbConnection.schemaVersion = DB_SCHEMA_VERSION;
   _dbConnection.commitTransaction();
 
   log("DB migration completed.");
@@ -770,17 +768,17 @@ function expireOldEntriesVacuum(aExpireT
 
 this.FormHistory = {
   get enabled() {
     return Prefs.enabled;
   },
 
   search : function formHistorySearch(aSelectTerms, aSearchData, aCallbacks) {
     // if no terms selected, select everything
-    aSelectTerms = (aSelectTerms) ?  aSelectTerms : validFields;
+    aSelectTerms = (aSelectTerms) ? aSelectTerms : validFields;
     validateSearchData(aSearchData, "Search");
 
     let stmt = makeSearchStatement(aSearchData, aSelectTerms);
 
     let handlers = {
       handleResult(aResultSet) {
         for (let row = aResultSet.getNextRow(); row; row = aResultSet.getNextRow()) {
           let result = {};
@@ -946,18 +944,17 @@ this.FormHistory = {
             }
           },
 
           handleCompletion(aReason) {
             completedSearches++;
             if (completedSearches == numSearches) {
               if (!aReason && !searchFailed) {
                 updateFormHistoryWrite(aChanges, aCallbacks);
-              }
-              else if (aCallbacks && aCallbacks.handleCompletion) {
+              } else if (aCallbacks && aCallbacks.handleCompletion) {
                 aCallbacks.handleCompletion(1);
               }
             }
           }
         });
     }
 
     if (numSearches == 0) {
--- a/toolkit/components/satchel/FormHistoryStartup.js
+++ b/toolkit/components/satchel/FormHistoryStartup.js
@@ -39,18 +39,17 @@ FormHistoryStartup.prototype = {
       default:
         break;
     }
   },
 
   inited: false,
   pendingQuery: null,
 
-  init()
-  {
+  init() {
     if (this.inited)
       return;
     this.inited = true;
 
     Services.prefs.addObserver("browser.formfill.", this, true);
 
     // triggers needed service cleanup and db shutdown
     Services.obs.addObserver(this, "profile-before-change", true);
--- a/toolkit/components/satchel/formSubmitListener.js
+++ b/toolkit/components/satchel/formSubmitListener.js
@@ -173,18 +173,17 @@ var satchelFormListener = {
 
                 entries.push({ name, value });
             }
 
             if (entries.length) {
                 this.log("sending entries to parent process for form " + form.id);
                 sendAsyncMessage("FormHistory:FormSubmitEntries", entries);
             }
-        }
-        catch (e) {
+        } catch (e) {
             this.log("notify failed: " + e);
         }
     }
 };
 
 satchelFormListener.init();
 
 })();
--- a/toolkit/components/satchel/nsFormHistory.js
+++ b/toolkit/components/satchel/nsFormHistory.js
@@ -658,17 +658,17 @@ FormHistory.prototype = {
 
         try {
             for (let v = oldVersion + 1; v <= DB_VERSION; v++) {
                 this.log("Upgrading to version " + v + "...");
                 let migrateFunction = "dbMigrateToVersion" + v;
                 this[migrateFunction]();
             }
         } catch (e) {
-            this.log("Migration failed: "  + e);
+            this.log("Migration failed: " + e);
             this.dbConnection.rollbackTransaction();
             throw e;
         }
 
         this.dbConnection.schemaVersion = DB_VERSION;
         this.dbConnection.commitTransaction();
         this.log("DB migration completed.");
     },
--- a/toolkit/components/satchel/test/satchel_common.js
+++ b/toolkit/components/satchel/test/satchel_common.js
@@ -45,20 +45,20 @@ function doKey(aKey, modifier) {
 
     // undefined --> null
     if (!modifier)
         modifier = null;
 
     // Window utils for sending fake key events.
     var wutils = SpecialPowers.getDOMWindowUtils(window);
 
-    if (wutils.sendKeyEvent("keydown",  key, 0, modifier)) {
+    if (wutils.sendKeyEvent("keydown", key, 0, modifier)) {
       wutils.sendKeyEvent("keypress", key, 0, modifier);
     }
-    wutils.sendKeyEvent("keyup",    key, 0, modifier);
+    wutils.sendKeyEvent("keyup", key, 0, modifier);
 }
 
 function registerPopupShownListener(listener) {
   if (gPopupShownListener) {
     ok(false, "got too many popupshownlisteners");
     return;
   }
   gPopupShownListener = listener;
--- a/toolkit/components/satchel/test/test_bug_511615.html
+++ b/toolkit/components/satchel/test/test_bug_511615.html
@@ -88,33 +88,37 @@ function doKeyUnprivileged(key) {
       charcode = 0;
       alwaysval = keycode;
   }
 
   let dnEvent = document.createEvent('KeyboardEvent');
   let prEvent = document.createEvent('KeyboardEvent');
   let upEvent = document.createEvent('KeyboardEvent');
 
+  /* eslint-disable no-multi-spaces */
   dnEvent.initKeyEvent("keydown",  true, true, null, false, false, false, false, alwaysval, 0);
   prEvent.initKeyEvent("keypress", true, true, null, false, false, false, false, keycode, charcode);
   upEvent.initKeyEvent("keyup",    true, true, null, false, false, false, false, alwaysval, 0);
+  /* eslint-enable no-multi-spaces */
 
   input.dispatchEvent(dnEvent);
   input.dispatchEvent(prEvent);
   input.dispatchEvent(upEvent);
 }
 
 function doClickWithMouseEventUnprivileged() {
   let dnEvent = document.createEvent('MouseEvent');
   let upEvent = document.createEvent('MouseEvent');
   let ckEvent = document.createEvent('MouseEvent');
 
+  /* eslint-disable no-multi-spaces */
   dnEvent.initMouseEvent("mousedown",  true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
   upEvent.initMouseEvent("mouseup",    true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
   ckEvent.initMouseEvent("mouseclick", true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
+  /* eslint-enable no-multi-spaces */
 
   input.dispatchEvent(dnEvent);
   input.dispatchEvent(upEvent);
   input.dispatchEvent(ckEvent);
 }
 
 let input = $_(1, "field1");
 
--- a/toolkit/components/satchel/test/test_datalist_with_caching.html
+++ b/toolkit/components/satchel/test/test_datalist_with_caching.html
@@ -74,18 +74,17 @@ function expectPopup() {
 
 var testNum = 0;
 
 function popupShownListener() {
   info("popup shown for test " + testNum);
   if (expectingPopup) {
     expectingPopup();
     expectingPopup = null;
-  }
-  else {
+  } else {
     ok(false, "Autocomplete popup not expected during test " + testNum);
   }
 }
 
 function waitForMenuChange(expectedCount) {
   return new Promise(resolve => {
     notifyMenuChanged(expectedCount, null, resolve);
   });
--- a/toolkit/components/satchel/test/test_form_autocomplete.html
+++ b/toolkit/components/satchel/test/test_form_autocomplete.html
@@ -199,30 +199,27 @@ function restoreForm() {
 function checkForm(expectedValue) {
   var formID = input.parentNode.id;
   is(input.value, expectedValue, "Checking " + formID + " input");
 }
 
 var testNum = 0;
 var expectingPopup = false;
 
-function expectPopup()
-{
+function expectPopup() {
   info("expecting popup for test " + testNum);
   expectingPopup = true;
 }
 
-function popupShownListener()
-{
+function popupShownListener() {
   info("popup shown for test " + testNum);
   if (expectingPopup) {
     expectingPopup = false;
     SimpleTest.executeSoon(runTest);
-  }
-  else {
+  } else {
     ok(false, "Autocomplete popup not expected during test " + testNum);
   }
 }
 
 registerPopupShownListener(popupShownListener);
 
 /*
  * Main section of test...
@@ -1025,35 +1022,32 @@ function runTest() {
 
     default:
         ok(false, "Unexpected invocation of test #" + testNum);
         SimpleTest.finish();
         return;
   }
 }
 
-function addEntry(name, value)
-{
+function addEntry(name, value) {
   updateFormHistory({ op : "add", fieldname : name, value }, runTest);
 }
 
 // Runs the next test when scroll event occurs
-function waitForScroll()
-{
+function waitForScroll() {
   addEventListener("scroll", function() {
     if (!window.pageYOffset)
       return;
 
     removeEventListener("scroll", arguments.callee, false);
     setTimeout(runTest, 100);
   }, false);
 }
 
-function waitForMenuChange(expectedCount, expectedFirstValue)
-{
+function waitForMenuChange(expectedCount, expectedFirstValue) {
     notifyMenuChanged(expectedCount, expectedFirstValue, runTest);
 }
 
 function checkMenuEntries(expectedValues, testNumber) {
     var actualValues = getMenuEntries();
     is(actualValues.length, expectedValues.length, testNumber + " Checking length of expected menu");
     for (var i = 0; i < expectedValues.length; i++)
         is(actualValues[i], expectedValues[i], testNumber + " Checking menu entry #" + i);
--- a/toolkit/components/satchel/test/test_form_autocomplete_with_list.html
+++ b/toolkit/components/satchel/test/test_form_autocomplete_with_list.html
@@ -82,18 +82,17 @@ function expectPopup() {
   expectingPopup = true;
 }
 
 function popupShownListener() {
   info("popup shown for test " + testNum);
   if (expectingPopup) {
     expectingPopup = false;
     SimpleTest.executeSoon(runTest);
-  }
-  else {
+  } else {
     ok(false, "Autocomplete popup not expected during test " + testNum);
   }
 }
 
 registerPopupShownListener(popupShownListener);
 
 /*
 * Main section of test...
--- a/toolkit/components/satchel/test/test_form_submission.html
+++ b/toolkit/components/satchel/test/test_form_submission.html
@@ -95,33 +95,31 @@
     <input type="text" name="test1">
     <button type="submit">Submit</button>
   </form>
 
   <!-- input with sensitive data (16 digit credit card number) -->
   <form id="form15" onsubmit="return checkSubmit(15)">
     <script type="text/javascript">
       var form = document.getElementById('form15');
-      for (let i = 0; i != 10; i++)
-      {
+      for (let i = 0; i != 10; i++) {
         let input = document.createElement('input');
         input.type = 'text';
         input.name = 'test' + (i + 1);
         form.appendChild(input);
       }
     </script>
     <button type="submit">Submit</button>
   </form>
 
   <!-- input with sensitive data (15 digit credit card number) -->
   <form id="form16" onsubmit="return checkSubmit(16)">
     <script type="text/javascript">
       form = document.getElementById('form16');
-      for (let i = 0; i != 10; i++)
-      {
+      for (let i = 0; i != 10; i++) {
         let input = document.createElement('input');
         input.type = 'text';
         input.name = 'test' + (i + 1);
         form.appendChild(input);
       }
     </script>
     <button type="submit">Submit</button>
   </form>
@@ -212,34 +210,32 @@
     <button type="submit">Submit</button>
   </form>
 
   <!-- input that looks like sensitive data but doesn't
        satisfy the requirements (Luhn check fails for 16 chars) -->
   <form id="form107" onsubmit="return checkSubmit(107)">
     <script type="text/javascript">
       form = document.getElementById('form107');
-      for (let i = 0; i != 10; i++)
-      {
+      for (let i = 0; i != 10; i++) {
         let input = document.createElement('input');
         input.type = 'text';
         input.name = 'test7_' + (i + 1);
         form.appendChild(input);
       }
     </script>
     <button type="submit">Submit</button>
   </form>
 
   <!-- input that looks like sensitive data but doesn't
        satisfy the requirements (Luhn check fails for 15 chars) -->
   <form id="form108" onsubmit="return checkSubmit(108)">
     <script type="text/javascript">
       form = document.getElementById('form108');
-      for (let i = 0; i != 10; i++)
-      {
+      for (let i = 0; i != 10; i++) {
         let input = document.createElement('input');
         input.type = 'text';
         input.name = 'test8_' + (i + 1);
         form.appendChild(input);
       }
     </script>
     <button type="submit">Submit</button>
   </form>
@@ -447,18 +443,17 @@ function checkSubmit(formNum) {
     default:
         ok(false, "Unexpected form submission");
         break;
   }
 
   return submitForm(formNum);
 }
 
-function submitForm(formNum)
-{
+function submitForm(formNum) {
   // Forms 20 and 21 requires browser.formfill.saveHttpsForms to be false
   if (formNum == 19)
     SpecialPowers.setBoolPref("browser.formfill.saveHttpsForms", false);
   // Reset preference now that 20 and 21 are over
   if (formNum == 21)
     SpecialPowers.clearUserPref("browser.formfill.saveHttpsForms");
 
   // End the test now on SeaMonkey.
@@ -502,18 +497,17 @@ function submitForm(formNum)
     checkObserver.waitForChecks(function() {
       var nextFormNum = formNum == 24 ? 100 : (formNum + 1);
 
       // Submit the next form. Special cases are Forms 21 and 100, which happen
       // from an HTTPS domain in an iframe.
       if (nextFormNum == 21 || nextFormNum == 100) {
         ok(true, "submitting iframe test " + nextFormNum);
         document.getElementById("iframe").contentWindow.clickButton(nextFormNum);
-      }
-      else {
+      } else {
         var button = getFormSubmitButton(nextFormNum);
         button.click();
       }
     });
   }, 0);
 
   return false; // cancel current form submission
 }
--- a/toolkit/components/satchel/test/test_form_submission_cap2.html
+++ b/toolkit/components/satchel/test/test_form_submission_cap2.html
@@ -143,25 +143,23 @@ function startTest() {
 
   // submit the first form.
   var button = getFormSubmitButton(1);
   button.click();
 }
 
 // Make sure that the first (numInputFields - 1) were not saved (as they were not changed).
 // Call done() when finished.
-function checkCountEntries(formNum, index, done)
-{
+function checkCountEntries(formNum, index, done) {
   countEntries("test" + index, index,
     function(num) {
       ok(!num, "checking unsaved value " + index);
       if (index < numInputFields) {
         checkCountEntries(formNum, index + 1, done);
-      }
-      else {
+      } else {
         done(formNum);
       }
     });
 }
 
 // Called by each form's onsubmit handler.
 function checkSubmit(formNum) {
   ok(true, "form " + formNum + " submitted");
--- a/toolkit/components/satchel/test/unit/test_async_expire.js
+++ b/toolkit/components/satchel/test/unit/test_async_expire.js
@@ -32,29 +32,26 @@ function test_finished() {
   if (Services.prefs.prefHasUserValue("browser.formfill.expire_days"))
     Services.prefs.clearUserPref("browser.formfill.expire_days");
 
   do_test_finished();
 }
 
 var iter = tests();
 
-function run_test()
-{
+function run_test() {
   do_test_pending();
   iter.next();
 }
 
-function next_test()
-{
+function next_test() {
   iter.next();
 }
 
-function* tests()
-{
+function* tests() {
   Services.obs.addObserver(TestObserver, "satchel-storage-changed", true);
 
   // ===== test init =====
   var testfile = do_get_file("asyncformhistory_expire.sqlite");
   var profileDir = do_get_profile();
 
   // Cleanup from any previous tests or failures.
   dbFile = profileDir.clone();
@@ -77,18 +74,17 @@ function* tests()
 
   // Add a new entry
   yield countEntries("name-C", "value-C", checkNotExists);
   yield addEntry("name-C", "value-C", next_test);
   yield countEntries("name-C", "value-C", checkExists);
 
   // Update some existing entries to have ages relative to when the test runs.
   var now = 1000 * Date.now();
-  let updateLastUsed = function updateLastUsedFn(results, age)
-  {
+  let updateLastUsed = function updateLastUsedFn(results, age) {
     let lastUsed = now - age * 24 * PR_HOURS;
 
     let changes = [ ];
     for (let r = 0; r < results.length; r++) {
       changes.push({ op: "update", lastUsed, guid: results[r].guid });
     }
 
     return changes;
--- a/toolkit/components/satchel/test/unit/test_autocomplete.js
+++ b/toolkit/components/satchel/test/unit/test_autocomplete.js
@@ -126,17 +126,17 @@ add_test(function test4() {
 const timesUsedSamples = 20;
 
 add_test(function test5() {
     do_log_info("Begin tests with constant use dates and varying timesUsed");
 
     let changes =  [];
     for (let i = 0; i < timesUsedSamples; i++) {
         let timesUsed = (timesUsedSamples - i);
-        let change = { op : "add", fieldname: "field2", value: "value" + (timesUsedSamples - 1 -  i),
+        let change = { op : "add", fieldname: "field2", value: "value" + (timesUsedSamples - 1 - i),
                        timesUsed: timesUsed * timeGroupingSize, firstUsed: now, lastUsed: now };
         changes.push(change);
     }
     updateFormHistory(changes, run_next_test);
 });
 
 add_test(function test6() {
     do_log_info("Check search result ordering with empty search term");
--- a/toolkit/components/satchel/test/unit/test_db_update_v4.js
+++ b/toolkit/components/satchel/test/unit/test_db_update_v4.js
@@ -1,25 +1,23 @@
 /* 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/. */
 
 var testnum = 0;
 
 var iter;
 
-function run_test()
-{
+function run_test() {
   do_test_pending();
   iter = next_test();
   iter.next();
 }
 
-function* next_test()
-{
+function* next_test() {
   try {
 
   // ===== test init =====
   var testfile = do_get_file("formhistory_v3.sqlite");
   var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
 
   // Cleanup from any previous tests or failures.
   var destFile = profileDir.clone();
--- a/toolkit/components/satchel/test/unit/test_db_update_v4b.js
+++ b/toolkit/components/satchel/test/unit/test_db_update_v4b.js
@@ -1,25 +1,23 @@
 /* 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/. */
 
 var testnum = 0;
 
 var iter;
 
-function run_test()
-{
+function run_test() {
   do_test_pending();
   iter = next_test();
   iter.next();
 }
 
-function* next_test()
-{
+function* next_test() {
   try {
 
   // ===== test init =====
   var testfile = do_get_file("formhistory_v3v4.sqlite");
   var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
 
   // Cleanup from any previous tests or failures.
   var destFile = profileDir.clone();
--- a/toolkit/components/satchel/test/unit/test_db_update_v999a.js
+++ b/toolkit/components/satchel/test/unit/test_db_update_v999a.js
@@ -8,29 +8,26 @@
  * version as long as the expected columns are present.
  *
  * Part A tests this when the columns do match, so the DB is used.
  * Part B tests this when the columns do *not* match, so the DB is reset.
  */
 
 var iter = tests();
 
-function run_test()
-{
+function run_test() {
   do_test_pending();
   iter.next();
 }
 
-function next_test()
-{
+function next_test() {
   iter.next();
 }
 
-function* tests()
-{
+function* tests() {
   try {
   var testnum = 0;
 
   // ===== test init =====
   var testfile = do_get_file("formhistory_v999a.sqlite");
   var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
 
   // Cleanup from any previous tests or failures.
--- a/toolkit/components/satchel/test/unit/test_db_update_v999b.js
+++ b/toolkit/components/satchel/test/unit/test_db_update_v999b.js
@@ -8,29 +8,26 @@
  * version as long as the expected columns are present.
  *
  * Part A tests this when the columns do match, so the DB is used.
  * Part B tests this when the columns do *not* match, so the DB is reset.
  */
 
 var iter = tests();
 
-function run_test()
-{
+function run_test() {
   do_test_pending();
   iter.next();
 }
 
-function next_test()
-{
+function next_test() {
   iter.next();
 }
 
-function* tests()
-{
+function* tests() {
   try {
   var testnum = 0;
 
   // ===== test init =====
   var testfile = do_get_file("formhistory_v999b.sqlite");
   var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
 
   // Cleanup from any previous tests or failures.
--- a/toolkit/components/satchel/test/unit/test_history_api.js
+++ b/toolkit/components/satchel/test/unit/test_history_api.js
@@ -2,18 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var testnum = 0;
 var dbConnection; // used for deleted table tests
 
 Cu.import("resource://gre/modules/Promise.jsm");
 
-function countDeletedEntries(expected)
-{
+function countDeletedEntries(expected) {
   let deferred = Promise.defer();
   let stmt = dbConnection.createAsyncStatement("SELECT COUNT(*) AS numEntries FROM moz_deleted_formhistory");
   stmt.executeAsync({
     handleResult(resultSet) {
       do_check_eq(expected, resultSet.getNextRow().getResultByName("numEntries"));
       deferred.resolve();
     },
     handleError(error) {
@@ -22,18 +21,17 @@ function countDeletedEntries(expected)
     },
     handleCompletion() {
       stmt.finalize();
     }
   });
   return deferred.promise;
 }
 
-function checkTimeDeleted(guid, checkFunction)
-{
+function checkTimeDeleted(guid, checkFunction) {
   let deferred = Promise.defer();
   let stmt = dbConnection.createAsyncStatement("SELECT timeDeleted FROM moz_deleted_formhistory WHERE guid = :guid");
   stmt.params.guid = guid;
   stmt.executeAsync({
     handleResult(resultSet) {
       checkFunction(resultSet.getNextRow().getResultByName("timeDeleted"));
       deferred.resolve();
     },
@@ -43,18 +41,17 @@ function checkTimeDeleted(guid, checkFun
     },
     handleCompletion() {
       stmt.finalize();
     }
   });
   return deferred.promise;
 }
 
-function promiseUpdateEntry(op, name, value)
-{
+function promiseUpdateEntry(op, name, value) {
   var change = { op };
   if (name !== null)
     change.fieldname = name;
   if (value !== null)
     change.value = value;
   return promiseUpdate(change);
 }
 
@@ -70,40 +67,37 @@ function promiseUpdate(change) {
         } else {
           resolve();
         }
       }
     });
   });
 }
 
-function promiseSearchEntries(terms, params)
-{
+function promiseSearchEntries(terms, params) {
   let deferred = Promise.defer();
   let results = [];
   FormHistory.search(terms, params,
                      { handleResult: result => results.push(result),
                        handleError(error) {
                          do_throw("Error occurred searching form history: " + error);
                          deferred.reject(error);
                        },
                        handleCompletion(reason) { if (!reason) deferred.resolve(results); }
                      });
   return deferred.promise;
 }
 
-function promiseCountEntries(name, value, checkFn)
-{
+function promiseCountEntries(name, value, checkFn) {
   let deferred = Promise.defer();
   countEntries(name, value, function(result) { checkFn(result); deferred.resolve(); } );
   return deferred.promise;
 }
 
-add_task(function* ()
-{
+add_task(function* () {
   let oldSupportsDeletedTable = FormHistory._supportsDeletedTable;
   FormHistory._supportsDeletedTable = true;
 
   try {
 
   // ===== test init =====
   var testfile = do_get_file("formhistory_apitest.sqlite");
   var profileDir = dirSvc.get("ProfD", Ci.nsIFile);
@@ -253,18 +247,17 @@ add_task(function* ()
   yield promiseCountEntries("newname-A", "newvalue-A", checkNotExists);
 
   // ===== 10 =====
   // Add a single entry
   testnum++;
   yield promiseUpdateEntry("add", "field1", "value1");
   yield promiseCountEntries("field1", "value1", checkExists);
 
-  let processFirstResult = function processResults(results)
-  {
+  let processFirstResult = function processResults(results) {
     // Only handle the first result
     if (results.length > 0) {
       let result = results[0];
       return [result.timesUsed, result.firstUsed, result.lastUsed, result.guid];
     }
     return undefined;
   }
 
@@ -440,18 +433,17 @@ add_task(function* ()
 
   // Remove should work though.
   yield promiseUpdate([{ op: "remove", fieldname: "field5", value: null },
                        { op: "remove", fieldname: null, value: null }]);
   Services.prefs.clearUserPref("browser.formfill.enable");
 
   } catch (e) {
     throw "FAILED in test #" + testnum + " -- " + e;
-  }
-  finally {
+  } finally {
     FormHistory._supportsDeletedTable = oldSupportsDeletedTable;
     dbConnection.asyncClose(do_test_finished);
   }
 });
 
 function run_test() {
   return run_next_test();
 }
--- a/toolkit/components/satchel/test/unit/test_notify.js
+++ b/toolkit/components/satchel/test/unit/test_notify.js
@@ -36,18 +36,17 @@ var TestObserver = {
 var testIterator = null;
 
 function run_test() {
   do_test_pending();
   testIterator = run_test_steps();
   testIterator.next();
 }
 
-function next_test()
-{
+function next_test() {
   testIterator.next();
 }
 
 function* run_test_steps() {
 
 try {
 
 var testnum = 0;
--- a/toolkit/components/satchel/test/unit/test_previous_result.js
+++ b/toolkit/components/satchel/test/unit/test_previous_result.js
@@ -11,15 +11,14 @@ var aaaListener = {
 
 var aaListener = {
   onSearchResult(search, result) {
     do_check_eq(result.searchString, "aa");
     search.startSearch("aaa", "", result, aaaListener);
   }
 };
 
-function run_test()
-{
+function run_test() {
   do_test_pending();
   let search = Cc['@mozilla.org/autocomplete/search;1?name=form-history'].
                getService(Components.interfaces.nsIAutoCompleteSearch);
   search.startSearch("aa", "", null, aaListener);
 }
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -1005,26 +1005,24 @@ function QueryParameter(aName, aValue, a
  * @see http://opensearch.a9.com/spec/1.1/querysyntax/#core
  */
 function ParamSubstitution(aParamValue, aSearchTerms, aEngine) {
   var value = aParamValue;
 
   var distributionID = Services.appinfo.distributionID;
   try {
     distributionID = Services.prefs.getCharPref(BROWSER_SEARCH_PREF + "distributionID");
-  }
-  catch (ex) { }
+  } catch (ex) { }
   var official = MOZ_OFFICIAL;
   try {
     if (Services.prefs.getBoolPref(BROWSER_SEARCH_PREF + "official"))
       official = "official";
     else
       official = "unofficial";
-  }
-  catch (ex) { }
+  } catch (ex) { }
 
   // Custom search parameters. These are only available to default search
   // engines.
   if (aEngine._isDefault) {
     value = value.replace(MOZ_PARAM_LOCALE, getLocale());
     value = value.replace(MOZ_PARAM_DIST_ID, distributionID);
     value = value.replace(MOZ_PARAM_OFFICIAL, official);
   }
@@ -1189,18 +1187,17 @@ EngineURL.prototype = {
     for (let i = 0; i < aJson.params.length; ++i) {
       let param = aJson.params[i];
       if (param.mozparam) {
         if (param.condition == "pref") {
           let value = getMozParamPref(param.pref);
           this.addParam(param.name, value);
         }
         this._addMozParam(param);
-      }
-      else
+      } else
         this.addParam(param.name, param.value, param.purpose || undefined);
     }
   },
 
   /**
    * Creates a JavaScript object that represents this URL.
    * @returns An object suitable for serialization as JSON.
    **/
@@ -1270,18 +1267,17 @@ function Engine(aLocation, aIsReadOnly) 
           Cr.NS_ERROR_INVALID_ARG);
 
   if (!this._shortName) {
     // If we don't have a shortName at this point, it's the first time we load
     // this engine, so let's generate the shortName, id and loadPath values.
     let shortName;
     if (file) {
       shortName = file.leafName;
-    }
-    else if (uri && uri instanceof Ci.nsIURL) {
+    } else if (uri && uri instanceof Ci.nsIURL) {
       if (aIsReadOnly || (gEnvironment.get("XPCSHELL_TEST_PROFILE_DIR") &&
                           uri.scheme == "resource")) {
         shortName = uri.fileName;
       }
     }
     if (shortName && shortName.endsWith(".xml")) {
       this._shortName = shortName.slice(0, -4);
     }
@@ -1296,21 +1292,19 @@ function Engine(aLocation, aIsReadOnly) 
     // Build the id used for the legacy metadata storage, so that we
     // can do a one-time import of data from old profiles.
     if (this._isDefault ||
         (uri && uri.spec.startsWith(APP_SEARCH_PREFIX))) {
       // The second part of the check is to catch engines from language packs.
       // They aren't default engines (because they aren't app-shipped), but we
       // still need to give their id an [app] prefix for backward compat.
       this._id = "[app]/" + this._shortName + ".xml";
-    }
-    else if (!aIsReadOnly) {
+    } else if (!aIsReadOnly) {
       this._id = "[profile]/" + this._shortName + ".xml";
-    }
-    else {
+    } else {
       // If the engine is neither a default one, nor a user-installed one,
       // it must be extension-shipped, so use the full path as id.
       LOG("Setting _id to full path for engine from " + this._loadPath);
       this._id = file ? file.path : uri.spec;
     }
   }
 }
 
@@ -1539,17 +1533,17 @@ Engine.prototype = {
     if (!getBoolPref(BROWSER_SEARCH_PREF + "noCurrentEngine", false))
       checkboxMessage = stringBundle.GetStringFromName("addEngineAsCurrentText");
 
     var addButtonLabel =
         stringBundle.GetStringFromName("addEngineAddButtonLabel");
 
     var ps = Services.prompt;
     var buttonFlags = (ps.BUTTON_TITLE_IS_STRING * ps.BUTTON_POS_0) +
-                      (ps.BUTTON_TITLE_CANCEL    * ps.BUTTON_POS_1) +
+                      (ps.BUTTON_TITLE_CANCEL * ps.BUTTON_POS_1) +
                        ps.BUTTON_POS_0_DEFAULT;
 
     var checked = {value: false};
     // confirmEx returns the index of the button that was pressed.  Since "Add"
     // is button 0, we want to return the negation of that value.
     var confirm = !ps.confirmEx(null,
                                 titleMessage,
                                 dialogMessage,
@@ -2681,17 +2675,17 @@ SearchService.prototype = {
   // sync init before the async init finishes, we can avoid reading the cache
   // with sync disk I/O and handling lz4 decompression synchronously.
   // This is set back to null as soon as the initialization is finished.
   _cacheFileJSON: null,
 
   // If initialization has not been completed yet, perform synchronous
   // initialization.
   // Throws in case of initialization error.
-  _ensureInitialized: function  SRCH_SVC__ensureInitialized() {
+  _ensureInitialized: function SRCH_SVC__ensureInitialized() {
     if (gInitialized) {
       if (!Components.isSuccessCode(this._initRV)) {
         LOG("_ensureInitialized: failure");
         throw this._initRV;
       }
       return;
     }
 
@@ -3818,18 +3812,17 @@ SearchService.prototype = {
 
           engine = this._engines[engineName];
           if (!engine || engine.name in addedEngines)
             continue;
 
           this.__sortedEngines.push(engine);
           addedEngines[engine.name] = engine;
         }
-      }
-      catch (e) { }
+      } catch (e) { }
 
       let prefNameBase = getGeoSpecificPrefName(BROWSER_SEARCH_PREF + "order");
       while (true) {
         prefName = prefNameBase + "." + (++i);
         engineName = getLocalizedPref(prefName);
         if (!engineName)
           break;
 
--- a/toolkit/components/search/tests/xpcshell/head_search.js
+++ b/toolkit/components/search/tests/xpcshell/head_search.js
@@ -43,27 +43,25 @@ updateAppInfo({
 });
 
 var gProfD;
 if (!isChild) {
   // Need to create and register a profile folder.
   gProfD = do_get_profile();
 }
 
-function dumpn(text)
-{
+function dumpn(text) {
   dump("search test: " + text + "\n");
 }
 
 /**
  * Configure preferences to load engines from
  * chrome://testsearchplugin/locale/searchplugins/
  */
-function configureToLoadJarEngines()
-{
+function configureToLoadJarEngines() {
   let url = "chrome://testsearchplugin/locale/searchplugins/";
   let resProt = Services.io.getProtocolHandler("resource")
                         .QueryInterface(Ci.nsIResProtocolHandler);
   resProt.setSubstitution("search-plugins",
                           Services.io.newURI(url, null, null));
 
   // Ensure a test engine exists in the app dir anyway.
   let dir = Services.dirsvc.get(NS_APP_SEARCH_DIR, Ci.nsIFile);
@@ -71,18 +69,17 @@ function configureToLoadJarEngines()
     dir.create(dir.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
   do_get_file("data/engine-app.xml").copyTo(dir, "app.xml");
 }
 
 /**
  * Fake the installation of an add-on in the profile, by creating the
  * directory and registering it with the directory service.
  */
-function installAddonEngine(name = "engine-addon")
-{
+function installAddonEngine(name = "engine-addon") {
   const XRE_EXTENSIONS_DIR_LIST = "XREExtDL";
   const profD = do_get_profile().QueryInterface(Ci.nsILocalFile);
 
   let dir = profD.clone();
   dir.append("extensions");
   if (!dir.exists())
     dir.create(dir.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
 
@@ -122,18 +119,17 @@ function installAddonEngine(name = "engi
     }
   });
 }
 
 /**
  * Copy the engine-distribution.xml engine to a fake distribution
  * created in the profile, and registered with the directory service.
  */
-function installDistributionEngine()
-{
+function installDistributionEngine() {
   const XRE_APP_DISTRIBUTION_DIR = "XREAppDist";
 
   const profD = do_get_profile().QueryInterface(Ci.nsILocalFile);
 
   let dir = profD.clone();
   dir.append("distribution");
   dir.create(dir.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
   let distDir = dir.clone();
@@ -154,18 +150,17 @@ function installDistributionEngine()
       return null;
     }
   });
 }
 
 /**
  * Clean the profile of any metadata files left from a previous run.
  */
-function removeMetadata()
-{
+function removeMetadata() {
   let file = gProfD.clone();
   file.append("search-metadata.json");
   if (file.exists()) {
     file.remove(false);
   }
 
   file = gProfD.clone();
   file.append("search.sqlite");
@@ -222,18 +217,17 @@ var forceExpiration = Task.async(functio
   metadata.searchDefaultExpir = Date.now() - 1000;
   yield promiseSaveGlobalMetadata(metadata);
 });
 
 /**
  * Clean the profile of any cache file left from a previous run.
  * Returns a boolean indicating if the cache file existed.
  */
-function removeCacheFile()
-{
+function removeCacheFile() {
   let file = gProfD.clone();
   file.append(CACHE_FILENAME);
   if (file.exists()) {
     file.remove(false);
     return true;
   }
   return false;
 }
@@ -463,17 +457,17 @@ function setUpGeoDefaults() {
   do_get_file("data/engine.xml").copyTo(engineDir, "engine.xml");
 
   engineDummyFile = gProfD.clone();
   engineDummyFile.append("searchplugins");
   engineDummyFile.append("test-search-engine2.xml");
 
   do_get_file("data/engine2.xml").copyTo(engineDir, "engine2.xml");
 
-  setLocalizedDefaultPref("defaultenginename",    "Test search engine");
+  setLocalizedDefaultPref("defaultenginename", "Test search engine");
   setLocalizedDefaultPref("defaultenginename.US", "A second test engine");
 
   do_register_cleanup(function() {
     removeMetadata();
     removeCacheFile();
   });
 }
 
--- a/toolkit/components/search/tests/xpcshell/test_bug930456.js
+++ b/toolkit/components/search/tests/xpcshell/test_bug930456.js
@@ -1,11 +1,10 @@
 /* Any copyright is dedicated to the Public Domain.
  *    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-function run_test()
-{
+function run_test() {
   if (isChild) {
     do_check_false("@mozilla.org/browser/search-service;1" in Cc);
   } else {
     do_check_true("@mozilla.org/browser/search-service;1" in Cc);
   }
 }
--- a/toolkit/components/search/tests/xpcshell/test_nocache.js
+++ b/toolkit/components/search/tests/xpcshell/test_nocache.js
@@ -5,18 +5,17 @@
  * test_nocache: Start search engine
  * - without search.json.mozlz4
  *
  * Ensure that :
  * - nothing explodes;
  * - search.json.mozlz4 is created.
  */
 
-function run_test()
-{
+function run_test() {
   removeCacheFile();
   updateAppInfo();
   do_load_manifest("data/chrome.manifest");
   useHttpServer();
 
   run_next_test();
 }
 
--- a/toolkit/components/search/tests/xpcshell/test_nodb.js
+++ b/toolkit/components/search/tests/xpcshell/test_nodb.js
@@ -7,18 +7,17 @@
  * - without search.sqlite
  *
  * Ensure that :
  * - nothing explodes;
  * - no search-metadata.json is created.
  */
 
 
-function run_test()
-{
+function run_test() {
   removeMetadata();
   updateAppInfo();
 
   let search = Services.search;
 
   do_test_pending();
   search.init(function ss_initialized(rv) {
     do_check_true(Components.isSuccessCode(rv));
--- a/toolkit/components/search/tests/xpcshell/test_purpose.js
+++ b/toolkit/components/search/tests/xpcshell/test_purpose.js
@@ -27,39 +27,39 @@ add_task(function* test_purpose() {
   let engine = Services.search.getEngineByName("Test search engine");
 
   function check_submission(aExpected, aSearchTerm, aType, aPurpose) {
     do_check_eq(engine.getSubmission(aSearchTerm, aType, aPurpose).uri.spec,
                 base + aExpected);
   }
 
   let base = "http://www.google.com/search?q=foo&ie=utf-8&oe=utf-8&aq=t";
-  check_submission("",              "foo");
-  check_submission("",              "foo", null);
-  check_submission("",              "foo", "text/html");
-  check_submission("&channel=rcs",  "foo", null,        "contextmenu");
-  check_submission("&channel=rcs",  "foo", "text/html", "contextmenu");
-  check_submission("&channel=fflb", "foo", null,        "keyword");
+  check_submission("", "foo");
+  check_submission("", "foo", null);
+  check_submission("", "foo", "text/html");
+  check_submission("&channel=rcs", "foo", null, "contextmenu");
+  check_submission("&channel=rcs", "foo", "text/html", "contextmenu");
+  check_submission("&channel=fflb", "foo", null, "keyword");
   check_submission("&channel=fflb", "foo", "text/html", "keyword");
-  check_submission("",              "foo", "text/html", "invalid");
+  check_submission("", "foo", "text/html", "invalid");
 
   // Tests for a param that varies with a purpose but has a default value.
   base = "http://www.google.com/search?q=foo";
   check_submission("&channel=ffsb", "foo", "application/x-moz-default-purpose");
   check_submission("&channel=ffsb", "foo", "application/x-moz-default-purpose", null);
   check_submission("&channel=ffsb", "foo", "application/x-moz-default-purpose", "");
-  check_submission("&channel=rcs",  "foo", "application/x-moz-default-purpose", "contextmenu");
+  check_submission("&channel=rcs", "foo", "application/x-moz-default-purpose", "contextmenu");
   check_submission("&channel=fflb", "foo", "application/x-moz-default-purpose", "keyword");
   check_submission("&channel=ffsb", "foo", "application/x-moz-default-purpose", "searchbar");
   check_submission("&channel=ffsb", "foo", "application/x-moz-default-purpose", "invalid");
 
   // Tests for a purpose on the search form (ie. empty query).
   engine = Services.search.getEngineByName("engine-rel-searchform-purpose");
   base = "http://www.google.com/search?q=";
-  check_submission("&channel=sb", "", null,        "searchbar");
+  check_submission("&channel=sb", "", null, "searchbar");
   check_submission("&channel=sb", "", "text/html", "searchbar");
 
   // verify that the 'system' purpose falls back to the 'searchbar' purpose.
   base = "http://www.google.com/search?q=foo";
   check_submission("&channel=sb", "foo", "text/html", "system");
   check_submission("&channel=sb", "foo", "text/html", "searchbar");
   // Use an engine that actually defines the 'system' purpose...
   engine = Services.search.getEngineByName("engine-system-purpose");
--- a/toolkit/components/securityreporter/SecurityReporter.js
+++ b/toolkit/components/securityreporter/SecurityReporter.js
@@ -15,18 +15,17 @@ const { Services } = Cu.import("resource
 const TLS_ERROR_REPORT_TELEMETRY_SUCCESS = 6;
 const TLS_ERROR_REPORT_TELEMETRY_FAILURE = 7;
 const HISTOGRAM_ID = "TLS_ERROR_REPORT_UI";
 
 
 XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
                                   "resource://gre/modules/UpdateUtils.jsm");
 
-function getDERString(cert)
-{
+function getDERString(cert) {
   var length = {};
   var derArray = cert.getRawDER(length);
   var derString = '';
   for (var i = 0; i < derArray.length; i++) {
     derString += String.fromCharCode(derArray[i]);
   }
   return derString;
 }
--- a/toolkit/components/sqlite/sqlite_internal.js
+++ b/toolkit/components/sqlite/sqlite_internal.js
@@ -109,144 +109,85 @@ Constants.SQLITE_ROW = 100;
  */
 Constants.SQLITE_DONE = 101;
 
 var Sqlite3 = {
   Constants,
   Type
 };
 
-declareLazyFFI(Sqlite3, "open", lib, "sqlite3_open", null,
-               /* return*/    Type.int,
-               /* path*/      Type.char.in_ptr,
+declareLazyFFI(Sqlite3, "open", lib, "sqlite3_open", null, Type.int, Type.char.in_ptr,
                /* db handle*/ Type.sqlite3_ptr.out_ptr);
 
-declareLazyFFI(Sqlite3, "open_v2", lib, "sqlite3_open_v2", null,
-               /* return*/    Type.int,
-               /* path*/      Type.char.in_ptr,
-               /* db handle*/ Type.sqlite3_ptr.out_ptr,
-               /* flags*/     Type.int,
-               /* VFS*/       Type.char.in_ptr);
+declareLazyFFI(Sqlite3, "open_v2", lib, "sqlite3_open_v2", null, Type.int, Type.char.in_ptr,
+               /* db handle*/ Type.sqlite3_ptr.out_ptr, Type.int, Type.char.in_ptr);
 
-declareLazyFFI(Sqlite3, "close", lib, "sqlite3_close", null,
-               /* return*/    Type.int,
+declareLazyFFI(Sqlite3, "close", lib, "sqlite3_close", null, Type.int,
                /* db handle*/ Type.sqlite3_ptr);
 
-declareLazyFFI(Sqlite3, "prepare_v2", lib, "sqlite3_prepare_v2", null,
-               /* return*/    Type.int,
-               /* db handle*/ Type.sqlite3_ptr,
-               /* zSql*/      Type.char.in_ptr,
-               /* nByte*/     Type.int,
-               /* statement*/ Type.sqlite3_stmt_ptr.out_ptr,
-               /* unused*/    Type.cstring.out_ptr);
+declareLazyFFI(Sqlite3, "prepare_v2", lib, "sqlite3_prepare_v2", null, Type.int,
+               /* db handle*/ Type.sqlite3_ptr, Type.char.in_ptr, Type.int,
+               /* statement*/ Type.sqlite3_stmt_ptr.out_ptr, Type.cstring.out_ptr);
 
-declareLazyFFI(Sqlite3, "step", lib, "sqlite3_step", null,
-               /* return*/    Type.int,
+declareLazyFFI(Sqlite3, "step", lib, "sqlite3_step", null, Type.int,
                /* statement*/ Type.sqlite3_stmt_ptr);
 
-declareLazyFFI(Sqlite3, "finalize", lib, "sqlite3_finalize", null,
-               /* return*/    Type.int,
+declareLazyFFI(Sqlite3, "finalize", lib, "sqlite3_finalize", null, Type.int,
                /* statement*/ Type.sqlite3_stmt_ptr);
 
-declareLazyFFI(Sqlite3, "reset", lib, "sqlite3_reset", null,
-               /* return*/    Type.int,
+declareLazyFFI(Sqlite3, "reset", lib, "sqlite3_reset", null, Type.int,
                /* statement*/ Type.sqlite3_stmt_ptr);
 
-declareLazyFFI(Sqlite3, "column_int", lib, "sqlite3_column_int", null,
-               /* return*/    Type.int,
-               /* statement*/ Type.sqlite3_stmt_ptr,
-               /* col*/       Type.int);
+declareLazyFFI(Sqlite3, "column_int", lib, "sqlite3_column_int", null, Type.int,
+               /* statement*/ Type.sqlite3_stmt_ptr, Type.int);
 
-declareLazyFFI(Sqlite3, "column_blob", lib, "sqlite3_column_blob", null,
-               /* return*/    Type.voidptr_t,
-               /* statement*/ Type.sqlite3_stmt_ptr,
-               /* col*/       Type.int);
+declareLazyFFI(Sqlite3, "column_blob", lib, "sqlite3_column_blob", null, Type.voidptr_t,
+               /* statement*/ Type.sqlite3_stmt_ptr, Type.int);
 
-declareLazyFFI(Sqlite3, "column_bytes", lib, "sqlite3_column_bytes", null,
-               /* return*/    Type.int,
-               /* statement*/ Type.sqlite3_stmt_ptr,
-               /* col*/       Type.int);
+declareLazyFFI(Sqlite3, "column_bytes", lib, "sqlite3_column_bytes", null, Type.int,
+               /* statement*/ Type.sqlite3_stmt_ptr, Type.int);
 
 declareLazyFFI(Sqlite3, "column_bytes16", lib, "sqlite3_column_bytes16",
-                             null,
-               /* return*/    Type.int,
-               /* statement*/ Type.sqlite3_stmt_ptr,
-               /* col*/       Type.int);
+                             null, Type.int,
+               /* statement*/ Type.sqlite3_stmt_ptr, Type.int);
 
-declareLazyFFI(Sqlite3, "column_double", lib, "sqlite3_column_double", null,
-               /* return*/    Type.double,
-               /* statement*/ Type.sqlite3_stmt_ptr,
-               /* col*/       Type.int);
+declareLazyFFI(Sqlite3, "column_double", lib, "sqlite3_column_double", null, Type.double,
+               /* statement*/ Type.sqlite3_stmt_ptr, Type.int);
 
-declareLazyFFI(Sqlite3, "column_int64", lib, "sqlite3_column_int64", null,
-               /* return*/    Type.sqlite3_int64,
-               /* statement*/ Type.sqlite3_stmt_ptr,
-               /* col*/       Type.int);
+declareLazyFFI(Sqlite3, "column_int64", lib, "sqlite3_column_int64", null, Type.sqlite3_int64,
+               /* statement*/ Type.sqlite3_stmt_ptr, Type.int);
 
-declareLazyFFI(Sqlite3, "column_text", lib, "sqlite3_column_text", null,
-               /* return*/    Type.cstring,
-               /* statement*/ Type.sqlite3_stmt_ptr,
-               /* col*/       Type.int);
+declareLazyFFI(Sqlite3, "column_text", lib, "sqlite3_column_text", null, Type.cstring,
+               /* statement*/ Type.sqlite3_stmt_ptr, Type.int);
 
-declareLazyFFI(Sqlite3, "column_text16", lib, "sqlite3_column_text16", null,
-               /* return*/    Type.wstring,
-               /* statement*/ Type.sqlite3_stmt_ptr,
-               /* col*/       Type.int);
+declareLazyFFI(Sqlite3, "column_text16", lib, "sqlite3_column_text16", null, Type.wstring,
+               /* statement*/ Type.sqlite3_stmt_ptr, Type.int);
 
-declareLazyFFI(Sqlite3, "bind_int", lib, "sqlite3_bind_int", null,
-               /* return*/    Type.int,
-               /* statement*/ Type.sqlite3_stmt_ptr,
-               /* index*/     Type.int,
-               /* value*/     Type.int);
+declareLazyFFI(Sqlite3, "bind_int", lib, "sqlite3_bind_int", null, Type.int,
+               /* statement*/ Type.sqlite3_stmt_ptr, Type.int, Type.int);
 
-declareLazyFFI(Sqlite3, "bind_int64", lib, "sqlite3_bind_int64", null,
-               /* return*/    Type.int,
-               /* statement*/ Type.sqlite3_stmt_ptr,
-               /* index*/     Type.int,
-               /* value*/     Type.sqlite3_int64);
-
-declareLazyFFI(Sqlite3, "bind_double", lib, "sqlite3_bind_double", null,
-               /* return*/    Type.int,
-               /* statement*/ Type.sqlite3_stmt_ptr,
-               /* index*/     Type.int,
-               /* value*/     Type.double);
+declareLazyFFI(Sqlite3, "bind_int64", lib, "sqlite3_bind_int64", null, Type.int,
+               /* statement*/ Type.sqlite3_stmt_ptr, Type.int, Type.sqlite3_int64);
 
-declareLazyFFI(Sqlite3, "bind_null", lib, "sqlite3_bind_null", null,
-               /* return*/    Type.int,
-               /* statement*/ Type.sqlite3_stmt_ptr,
-               /* index*/     Type.int);
+declareLazyFFI(Sqlite3, "bind_double", lib, "sqlite3_bind_double", null, Type.int,
+               /* statement*/ Type.sqlite3_stmt_ptr, Type.int, Type.double);
 
-declareLazyFFI(Sqlite3, "bind_zeroblob", lib, "sqlite3_bind_zeroblob", null,
-               /* return*/    Type.int,
-               /* statement*/ Type.sqlite3_stmt_ptr,
-               /* index*/     Type.int,
-               /* nBytes*/    Type.int);
+declareLazyFFI(Sqlite3, "bind_null", lib, "sqlite3_bind_null", null, Type.int,
+               /* statement*/ Type.sqlite3_stmt_ptr, Type.int);
 
-declareLazyFFI(Sqlite3, "bind_text", lib, "sqlite3_bind_text", null,
-               /* return*/     Type.int,
-               /* statement*/  Type.sqlite3_stmt_ptr,
-               /* index*/      Type.int,
-               /* value*/      Type.cstring,
-               /* nBytes*/     Type.int,
+declareLazyFFI(Sqlite3, "bind_zeroblob", lib, "sqlite3_bind_zeroblob", null, Type.int,
+               /* statement*/ Type.sqlite3_stmt_ptr, Type.int, Type.int);
+
+declareLazyFFI(Sqlite3, "bind_text", lib, "sqlite3_bind_text", null, Type.int, Type.sqlite3_stmt_ptr, Type.int, Type.cstring, Type.int,
                /* destructor*/ Type.sqlite3_destructor_ptr);
 
-declareLazyFFI(Sqlite3, "bind_text16", lib, "sqlite3_bind_text16", null,
-               /* return*/     Type.int,
-               /* statement*/  Type.sqlite3_stmt_ptr,
-               /* index*/      Type.int,
-               /* value*/      Type.wstring,
-               /* nBytes*/     Type.int,
+declareLazyFFI(Sqlite3, "bind_text16", lib, "sqlite3_bind_text16", null, Type.int, Type.sqlite3_stmt_ptr, Type.int, Type.wstring, Type.int,
                /* destructor*/ Type.sqlite3_destructor_ptr);
 
-declareLazyFFI(Sqlite3, "bind_blob", lib, "sqlite3_bind_blob", null,
-               /* return*/     Type.int,
-               /* statement*/  Type.sqlite3_stmt_ptr,
-               /* index*/      Type.int,
-               /* value*/      Type.voidptr_t,
-               /* nBytes*/     Type.int,
+declareLazyFFI(Sqlite3, "bind_blob", lib, "sqlite3_bind_blob", null, Type.int, Type.sqlite3_stmt_ptr, Type.int, Type.voidptr_t, Type.int,
                /* destructor*/ Type.sqlite3_destructor_ptr);
 
 module.exports = {
   get Constants() {
     return Sqlite3.Constants;
   },
   get Type() {
     return Sqlite3.Type;
--- a/toolkit/components/telemetry/TelemetrySession.jsm
+++ b/toolkit/components/telemetry/TelemetrySession.jsm
@@ -1202,40 +1202,36 @@ var Impl = {
 
     histogram.add(new Date() - startTime);
   },
 
   handleMemoryReport(id, units, amount) {
     let val;
     if (units == Ci.nsIMemoryReporter.UNITS_BYTES) {
       val = Math.floor(amount / 1024);
-    }
-    else if (units == Ci.nsIMemoryReporter.UNITS_PERCENTAGE) {
+    } else if (units == Ci.nsIMemoryReporter.UNITS_PERCENTAGE) {
       // UNITS_PERCENTAGE amounts are 100x greater than their raw value.
       val = Math.floor(amount / 100);
-    }
-    else if (units == Ci.nsIMemoryReporter.UNITS_COUNT) {
+    } else if (units == Ci.nsIMemoryReporter.UNITS_COUNT) {
       val = amount;
-    }
-    else if (units == Ci.nsIMemoryReporter.UNITS_COUNT_CUMULATIVE) {
+    } else if (units == Ci.nsIMemoryReporter.UNITS_COUNT_CUMULATIVE) {
       // If the reporter gives us a cumulative count, we'll report the
       // difference in its value between now and our previous ping.
 
       if (!(id in this._prevValues)) {
         // If this is the first time we're reading this reporter, store its
         // current value but don't report it in the telemetry ping, so we
         // ignore the effect startup had on the reporter.
         this._prevValues[id] = amount;
         return;
       }
 
       val = amount - this._prevValues[id];
       this._prevValues[id] = amount;
-    }
-    else {
+    } else {
       NS_ASSERT(false, "Can't handle memory reporter with units " + units);
       return;
     }
 
     let h = this._histograms[id];
     if (!h) {
       h = Telemetry.getHistogramById(id);
       this._histograms[id] = h;
@@ -1302,18 +1298,17 @@ var Impl = {
       content: {
         histograms: histograms[HISTOGRAM_SUFFIXES.CONTENT],
         keyedHistograms: keyedHistograms[HISTOGRAM_SUFFIXES.CONTENT],
       },
     };
 
     // Only include the GPU process if we've accumulated data for it.
     if (HISTOGRAM_SUFFIXES.GPU in histograms ||
-        HISTOGRAM_SUFFIXES.GPU in keyedHistograms)
-    {
+        HISTOGRAM_SUFFIXES.GPU in keyedHistograms) {
       payloadObj.processes.gpu = {
         histograms: histograms[HISTOGRAM_SUFFIXES.GPU],
         keyedHistograms: keyedHistograms[HISTOGRAM_SUFFIXES.GPU],
       };
     }
 
     payloadObj.info = info;
 
--- a/toolkit/components/telemetry/TelemetryStopwatch.jsm
+++ b/toolkit/components/telemetry/TelemetryStopwatch.jsm
@@ -43,17 +43,17 @@ const NULL_KEY = {};
  */
 let Timers = {
   _timers: new Map(),
 
   _validTypes(histogram, obj, key) {
     let nonEmptyString = value => {
       return typeof value === "string" && value !== "" && value.length > 0;
     };
-    return  nonEmptyString(histogram) &&
+    return nonEmptyString(histogram) &&
             typeof obj == "object" &&
            (key === NULL_KEY || nonEmptyString(key));
   },
 
   get(histogram, obj, key) {
     key = key === null ? NULL_KEY : key;
     obj = obj || NULL_OBJECT;
 
--- a/toolkit/components/telemetry/TelemetryUtils.jsm
+++ b/toolkit/components/telemetry/TelemetryUtils.jsm
@@ -134,17 +134,17 @@ this.TelemetryUtils = {
       return number;
     }
 
     let sign = (n) => n >= 0 ? "+" : "-";
     // getTimezoneOffset counter-intuitively returns -60 for UTC+1.
     let tzOffset = -date.getTimezoneOffset();
 
     // YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)
-    return    padNumber(date.getFullYear(), 4)
+    return padNumber(date.getFullYear(), 4)
       + "-" + padNumber(date.getMonth() + 1, 2)
       + "-" + padNumber(date.getDate(), 2)
       + "T" + padNumber(date.getHours(), 2)
       + ":" + padNumber(date.getMinutes(), 2)
       + ":" + padNumber(date.getSeconds(), 2)
       + "." + date.getMilliseconds()
       + sign(tzOffset) + padNumber(Math.floor(Math.abs(tzOffset / 60)), 2)
       + ":" + padNumber(Math.abs(tzOffset % 60), 2);
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryControllerShutdown.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryControllerShutdown.js
@@ -12,18 +12,17 @@ Cu.import("resource://gre/modules/Teleme
 Cu.import("resource://gre/modules/Timer.jsm", this);
 Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
 Cu.import("resource://gre/modules/AsyncShutdown.jsm", this);
 Cu.import("resource://testing-common/httpd.js", this);
 
 const PREF_BRANCH = "toolkit.telemetry.";
 const PREF_FHR_UPLOAD_ENABLED = "datareporting.healthreport.uploadEnabled";
 
-function contentHandler(metadata, response)
-{
+function contentHandler(metadata, response) {
   dump("contentHandler called for path: " + metadata._path + "\n");
   // We intentionally don't finish writing the response here to let the
   // client time out.
   response.processAsync();
   response.setHeader("Content-Type", "text/plain");
 }
 
 add_task(function* test_setup() {
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
@@ -645,18 +645,17 @@ function checkSystemSection(data) {
       Assert.equal(GFX_DEVICE_ID, gfxData.adapters[0].deviceID);
     }
 
     let features = gfxInfo.getFeatures();
     Assert.equal(features.compositor, gfxData.features.compositor);
     Assert.equal(features.gpuProcess.status, gfxData.features.gpuProcess.status);
     Assert.equal(features.opengl, gfxData.features.opengl);
     Assert.equal(features.webgl, gfxData.features.webgl);
-  }
-  catch (e) {}
+  } catch (e) {}
 }
 
 function checkActiveAddon(data) {
   let signedState = mozinfo.addon_signing ? "number" : "undefined";
   // system add-ons have an undefined signState
   if (data.isSystem)
     signedState = "undefined";
 
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEvents.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEvents.js
@@ -191,23 +191,23 @@ add_task(function* test_storageLimit() {
 
 add_task(function* test_valueLimits() {
   Telemetry.clearEvents();
 
   // Record values that are at or over the limits for string lengths.
   let LIMIT = 80;
   let expected = [
     ["telemetry.test", "test1", "object1", "a".repeat(LIMIT - 10), null],
-    ["telemetry.test", "test1", "object1", "a".repeat(LIMIT     ), null],
-    ["telemetry.test", "test1", "object1", "a".repeat(LIMIT +  1), null],
+    ["telemetry.test", "test1", "object1", "a".repeat(LIMIT ), null],
+    ["telemetry.test", "test1", "object1", "a".repeat(LIMIT + 1), null],
     ["telemetry.test", "test1", "object1", "a".repeat(LIMIT + 10), null],
 
     ["telemetry.test", "test1", "object1", null, {key1: "a".repeat(LIMIT - 10)}],
-    ["telemetry.test", "test1", "object1", null, {key1: "a".repeat(LIMIT     )}],
-    ["telemetry.test", "test1", "object1", null, {key1: "a".repeat(LIMIT +  1)}],
+    ["telemetry.test", "test1", "object1", null, {key1: "a".repeat(LIMIT )}],
+    ["telemetry.test", "test1", "object1", null, {key1: "a".repeat(LIMIT + 1)}],
     ["telemetry.test", "test1", "object1", null, {key1: "a".repeat(LIMIT + 10)}],
   ];
 
   for (let event of expected) {
     Telemetry.recordEvent(...event);
     if (event[3]) {
       event[3] = event[3].substr(0, LIMIT);
     }
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryFlagClear.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryFlagClear.js
@@ -1,13 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-function run_test()
-{
+function run_test() {
   let testFlag = Services.telemetry.getHistogramById("TELEMETRY_TEST_FLAG");
   equal(JSON.stringify(testFlag.snapshot().counts), "[1,0,0]", "Original value is correct");
   testFlag.add(1);
   equal(JSON.stringify(testFlag.snapshot().counts), "[0,1,0]", "Value is correct after ping.");
   testFlag.clear();
   equal(JSON.stringify(testFlag.snapshot().counts), "[1,0,0]", "Value is correct after calling clear()");
   testFlag.add(1);
   equal(JSON.stringify(testFlag.snapshot().counts), "[0,1,0]", "Value is correct after ping.");
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryLateWrites.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryLateWrites.js
@@ -50,18 +50,17 @@ function write_string_to_file(file, cont
 
 function construct_file(suffix) {
   let profileDirectory = Services.dirsvc.get("ProfD", Ci.nsIFile);
   let file = profileDirectory.clone();
   file.append(LATE_WRITE_PREFIX + suffix);
   return file;
 }
 
-function write_late_writes_file(stack, suffix)
-{
+function write_late_writes_file(stack, suffix) {
   let file = construct_file(suffix);
   let contents = N_MODULES + "\n";
   for (let id in LOADED_MODULES) {
     contents += id + " " + LOADED_MODULES[id] + "\n";
   }
 
   contents += stack.length + "\n";
   for (let element of stack) {
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryLog.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryLog.js
@@ -2,35 +2,33 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 Cu.import("resource://gre/modules/TelemetryLog.jsm", this);
 Cu.import("resource://gre/modules/TelemetrySession.jsm", this);
 
 const TEST_PREFIX = "TEST-";
 const TEST_REGEX = new RegExp("^" + TEST_PREFIX);
 
-function check_event(event, id, data)
-{
+function check_event(event, id, data) {
   do_print("Checking message " + id);
   do_check_eq(event[0], id);
   do_check_true(event[1] > 0);
 
   if (data === undefined) {
     do_check_true(event.length == 2);
   } else {
     do_check_eq(event.length, data.length + 2);
     for (var i = 0; i < data.length; ++i) {
       do_check_eq(typeof(event[i + 2]), "string");
       do_check_eq(event[i + 2], data[i]);
     }
   }
 }
 
-add_task(function* ()
-{
+add_task(function* () {
   do_get_profile();
   // TODO: After Bug 1254550 lands we should not need to set the pref here.
   Services.prefs.setBoolPref(PREF_TELEMETRY_ENABLED, true);
   yield TelemetryController.testSetup();
 
   TelemetryLog.log(TEST_PREFIX + "1", ["val", 123, undefined]);
   TelemetryLog.log(TEST_PREFIX + "2", []);
   TelemetryLog.log(TEST_PREFIX + "3");
--- a/toolkit/components/telemetry/tests/unit/test_nsITelemetry.js
+++ b/toolkit/components/telemetry/tests/unit/test_nsITelemetry.js
@@ -2,18 +2,17 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const INT_MAX = 0x7FFFFFFF;
 
 Cu.import("resource://gre/modules/Services.jsm", this);
 Cu.import("resource://gre/modules/TelemetryUtils.jsm", this);
 
 // Return an array of numbers from lower up to, excluding, upper
-function numberRange(lower, upper)
-{
+function numberRange(lower, upper) {
   let a = [];
   for (let i = lower; i < upper; ++i) {
     a.push(i);
   }
   return a;
 }
 
 function expect_fail(f) {
@@ -195,18 +194,17 @@ add_task(function* test_count_histogram(
   do_check_eq(uneval(s.counts), uneval([1, 0, 0]));
   do_check_eq(s.sum, 1);
   h.add();
   s = h.snapshot();
   do_check_eq(uneval(s.counts), uneval([2, 0, 0]));
   do_check_eq(s.sum, 2);
 });
 
-add_task(function* test_categorical_histogram()
-{
+add_task(function* test_categorical_histogram() {
   let h1 = Telemetry.getHistogramById("TELEMETRY_TEST_CATEGORICAL");
   for (let v of ["CommonLabel", "Label2", "Label3", "Label3", 0, 0, 1]) {
     h1.add(v);
   }
   for (let s of ["", "Label4", "1234"]) {
     // The |add| method should not throw for unexpected values, but rather
     // print an error message in the console.
     h1.add(s);
--- a/toolkit/components/terminator/nsTerminatorTelemetry.js
+++ b/toolkit/components/terminator/nsTerminatorTelemetry.js
@@ -44,18 +44,17 @@ nsTerminatorTelemetry.prototype = {
   _xpcom_factory: XPCOMUtils.generateSingletonFactory(nsTerminatorTelemetry),
 
   // nsISupports
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
 
   // nsIObserver
 
-  observe: function DS_observe(aSubject, aTopic, aData)
-  {
+  observe: function DS_observe(aSubject, aTopic, aData) {
     Task.spawn(function*() {
       //
       // This data is hardly critical, reading it can wait for a few seconds.
       //
       yield new Promise(resolve => setTimeout(resolve, 3000));
 
       let PATH = OS.Path.join(OS.Constants.Path.localProfileDir,
         "ShutdownDuration.json");
--- a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
+++ b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
@@ -447,18 +447,17 @@ Capture.prototype = {
       }
     }
 
     let done = () => {
       captureCallback(this);
       for (let callback of doneCallbacks) {
         try {
           callback.call(options, this.url);
-        }
-        catch (err) {
+        } catch (err) {
           Cu.reportError(err);
         }
       }
 
       if (Services.prefs.getBoolPref(ABOUT_NEWTAB_SEGREGATION_PREF)) {
         // Clear the data in the private container for thumbnails.
         let privateIdentity =
           ContextualIdentityService.getPrivateIdentity("userContextIdInternal.thumbnail");
--- a/toolkit/components/thumbnails/PageThumbs.jsm
+++ b/toolkit/components/thumbnails/PageThumbs.jsm
@@ -509,18 +509,17 @@ this.PageThumbs = {
    */
   createCanvas: function PageThumbs_createCanvas(aWindow) {
     return PageThumbUtils.createCanvas(aWindow);
   },
 
   _prefEnabled: function PageThumbs_prefEnabled() {
     try {
       return !Services.prefs.getBoolPref("browser.pagethumbnails.capturing_disabled");
-    }
-    catch (e) {
+    } catch (e) {
       return true;
     }
   },
 };
 
 this.PageThumbsStorage = {
   // The path for the storage
   _path: null,
@@ -682,17 +681,17 @@ this.PageThumbsStorage = {
       blocker);
 
     // Start the work only now that `profileBeforeChange` has had
     // a chance to throw an error.
 
     let promise = PageThumbsWorker.post("wipe", [this.path]);
     try {
       yield promise;
-    }  finally {
+    } finally {
        // Generally, we will be done much before profileBeforeChange,
        // so let's not hoard blockers.
        if ("removeBlocker" in AsyncShutdown.profileBeforeChange) {
          // `removeBlocker` was added with bug 985655. In the interest
          // of backporting, let's degrade gracefully if `removeBlocker`
          // doesn't exist.
          AsyncShutdown.profileBeforeChange.removeBlocker(blocker);
        }
--- a/toolkit/components/thumbnails/content/backgroundPageThumbsContent.js
+++ b/toolkit/components/thumbnails/content/backgroundPageThumbsContent.js
@@ -110,29 +110,26 @@ const backgroundPageThumbsContent = {
         (flags & Ci.nsIWebProgressListener.STATE_STOP) &&
         this._currentCapture) {
       if (req.name == "about:blank") {
         if (this._state == STATE_CAPTURING) {
           // about:blank has loaded, ending the current capture.
           this._finishCurrentCapture();
           delete this._currentCapture;
           this._startNextCapture();
-        }
-        else if (this._state == STATE_CANCELED) {
+        } else if (this._state == STATE_CANCELED) {
           delete this._currentCapture;
           this._startNextCapture();
         }
-      }
-      else if (this._state == STATE_LOADING &&
+      } else if (this._state == STATE_LOADING &&
                Components.isSuccessCode(status)) {
         // The requested page has loaded.  Capture it.
         this._state = STATE_CAPTURING;
         this._captureCurrentPage();
-      }
-      else if (this._state != STATE_CANCELED) {
+      } else if (this._state != STATE_CANCELED) {
         // Something went wrong.  Cancel the capture.  Loading about:blank
         // while onStateChange is still on the stack does not actually stop
         // the request if it redirects, so do it asyncly.
         this._state = STATE_CANCELED;
         if (!this._cancelTimer) {
           this._cancelTimer =
             Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
           this._cancelTimer.init(() => {
--- a/toolkit/components/thumbnails/test/browser_thumbnails_bug727765.js
+++ b/toolkit/components/thumbnails/test/browser_thumbnails_bug727765.js
@@ -1,16 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const URL = "http://mochi.test:8888/browser/toolkit/components/thumbnails/" +
             "test/background_red_scroll.html";
 
-function isRedThumbnailFuzz(r, g, b, expectedR, expectedB, expectedG, aFuzz)
-{
+function isRedThumbnailFuzz(r, g, b, expectedR, expectedB, expectedG, aFuzz) {
   return (Math.abs(r - expectedR) <= aFuzz) &&
          (Math.abs(g - expectedG) <= aFuzz) &&
          (Math.abs(b - expectedB) <= aFuzz);
 }
 
 // Test for black borders caused by scrollbars.
 function* runTests() {
   // Create a tab with a page with a red background and scrollbars.
--- a/toolkit/components/utils/simpleServices.js
+++ b/toolkit/components/utils/simpleServices.js
@@ -19,18 +19,17 @@ const Cr = Components.results;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
                                   "resource://gre/modules/NetUtil.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Services",
                                   "resource://gre/modules/Services.jsm");
 
-function AddonPolicyService()
-{
+function AddonPolicyService() {
   this.wrappedJSObject = this;
   this.cspStrings = new Map();
   this.backgroundPageUrlCallbacks = new Map();
   this.checkHasPermissionCallbacks = new Map();
   this.mayLoadURICallbacks = new Map();
   this.localizeCallbacks = new Map();
 
   XPCOMUtils.defineLazyPreferenceGetter(
@@ -218,18 +217,17 @@ AddonPolicyService.prototype = {
 
 /*
  * This class provides a stream filter for locale messages in CSS files served
  * by the moz-extension: protocol handler.
  *
  * See SubstituteChannel in netwerk/protocol/res/ExtensionProtocolHandler.cpp
  * for usage.
  */
-function AddonLocalizationConverter()
-{
+function AddonLocalizationConverter() {
   this.aps = Cc["@mozilla.org/addons/policy-service;1"].getService(Ci.nsIAddonPolicyService)
     .wrappedJSObject;
 }
 
 AddonLocalizationConverter.prototype = {
   classID: Components.ID("{ded150e3-c92e-4077-a396-0dba9953e39f}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIStreamConverter]),
 
--- a/toolkit/components/viewconfig/content/config.js
+++ b/toolkit/components/viewconfig/content/config.js
@@ -81,18 +81,17 @@ var view = {
     var index = this.selection.currentIndex;
     if (col.id == gSortedColumn) {
       gSortDirection = -gSortDirection;
       gPrefArray.reverse();
       if (gPrefView != gPrefArray)
         gPrefView.reverse();
       if (index >= 0)
         index = gPrefView.length - index - 1;
-    }
-    else {
+    } else {
       var pref = null;
       if (index >= 0)
         pref = gPrefView[index];
 
       var old = document.getElementById(gSortedColumn);
       old.removeAttribute("sortDirection");
       gPrefArray.sort(gSortFunction = gSortFunctions[col.id]);
       if (gPrefView != gPrefArray)
@@ -117,84 +116,79 @@ var view = {
   performAction(action) {},
   performActionOnRow(action, row) {},
   performActionOnCell(action, row, col) {},
   isSeparator(index) { return false; }
 };
 
 // find the index in gPrefView of a pref object
 // or -1 if it does not exist in the filtered view
-function getViewIndexOfPref(pref)
-{
+function getViewIndexOfPref(pref) {
   var low = -1, high = gPrefView.length;
   var index = (low + high) >> 1;
   while (index > low) {
     var mid = gPrefView[index];
     if (mid == pref)
       return index;
     if (gSortFunction(mid, pref) < 0)
       low = index;
     else
       high = index;
     index = (low + high) >> 1;
   }
   return -1;
 }
 
 // find the index in gPrefView where a pref object belongs
-function getNearestViewIndexOfPref(pref)
-{
+function getNearestViewIndexOfPref(pref) {
   var low = -1, high = gPrefView.length;
   var index = (low + high) >> 1;
   while (index > low) {
     if (gSortFunction(gPrefView[index], pref) < 0)
       low = index;
     else
       high = index;
     index = (low + high) >> 1;
   }
   return high;
 }
 
 // find the index in gPrefArray of a pref object
-function getIndexOfPref(pref)
-{
+function getIndexOfPref(pref) {
   var low = -1, high = gPrefArray.length;
   var index = (low + high) >> 1;
   while (index > low) {
     var mid = gPrefArray[index];
     if (mid == pref)
       return index;
     if (gSortFunction(mid, pref) < 0)
       low = index;
     else
       high = index;
     index = (low + high) >> 1;
   }
   return index;
 }
 
-function getNearestIndexOfPref(pref)
-{
+function getNearestIndexOfPref(pref) {
   var low = -1, high = gPrefArray.length;
   var index = (low + high) >> 1;
   while (index > low) {
     if (gSortFunction(gPrefArray[index], pref) < 0)
       low = index;
     else
       high = index;
     index = (low + high) >> 1;
   }
   return high;
 }
 
 var gPrefListener =
 {
-  observe(subject, topic, prefName)
-  {
+  observe(subject, topic, prefName) {
     if (topic != "nsPref:changed")
       return;
 
     var arrayIndex = gPrefArray.length;
     var viewIndex = arrayIndex;
     var selectedIndex = view.selection.currentIndex;
     var pref;
     var updateView = false;
@@ -215,18 +209,17 @@ var gPrefListener =
       if (gSortedColumn == "lockCol" || gSortedColumn == "valueCol") {
         updateArray = true;
         gPrefArray.splice(arrayIndex, 1);
         if (gFilter && gFilter.test(pref.prefCol + ";" + pref.valueCol)) {
           updateView = true;
           gPrefView.splice(viewIndex, 1);
         }
       }
-    }
-    else {
+    } else {
       fetchPref(prefName, arrayIndex);
       pref = gPrefArray.pop();
       updateArray = true;
       addedRow = true;
       if (gFilter && gFilter.test(pref.prefCol + ";" + pref.valueCol)) {
         updateView = true;
       }
     }
@@ -234,59 +227,55 @@ var gPrefListener =
       // Reinsert in the data array
       var newIndex = getNearestIndexOfPref(pref);
       gPrefArray.splice(newIndex, 0, pref);
 
       if (updateView) {
         // View is filtered, reinsert in the view separately
         newIndex = getNearestViewIndexOfPref(pref);
         gPrefView.splice(newIndex, 0, pref);
-      }
-      else if (gFilter) {
+      } else if (gFilter) {
         // View is filtered, but nothing to update
         return;
       }
 
       if (addedRow)
         view.treebox.rowCountChanged(newIndex, 1);
 
       // Invalidate the changed range in the view
       var low = Math.min(viewIndex, newIndex);
       var high = Math.max(viewIndex, newIndex);
       view.treebox.invalidateRange(low, high);
 
       if (selectedIndex == viewIndex) {
         selectedIndex = newIndex;
-      }
-      else if (selectedIndex >= low && selectedIndex <= high) {
+      } else if (selectedIndex >= low && selectedIndex <= high) {
         selectedIndex += (newIndex > viewIndex) ? -1 : 1;
       }
       if (selectedIndex >= 0) {
         view.selection.select(selectedIndex);
         if (selectedIndex == newIndex)
           view.treebox.ensureRowIsVisible(selectedIndex);
       }
     }
   }
 };
 
-function prefObject(prefName, prefIndex)
-{
+function prefObject(prefName, prefIndex) {
   this.prefCol = prefName;
 }
 
 prefObject.prototype =
 {
   lockCol: PREF_IS_DEFAULT_VALUE,
   typeCol: nsIPrefBranch.PREF_STRING,
   valueCol: ""
 };
 
-function fetchPref(prefName, prefIndex)
-{
+function fetchPref(prefName, prefIndex) {
   var pref = new prefObject(prefName);
 
   gPrefHash[prefName] = pref;
   gPrefArray[prefIndex] = pref;
 
   if (gPrefBranch.prefIsLocked(prefName))
     pref.lockCol = PREF_IS_LOCKED;
   else if (gPrefBranch.prefHasUserValue(prefName))
@@ -314,18 +303,17 @@ function fetchPref(prefName, prefIndex)
         break;
     }
   } catch (e) {
     // Also catch obscure cases in which you can't tell in advance
     // that the pref exists but has no user or default value...
   }
 }
 
-function onConfigLoad()
-{
+function onConfigLoad() {
   // Load strings
   gConfigBundle = document.getElementById("configBundle");
 
   gLockStrs[PREF_IS_DEFAULT_VALUE] = gConfigBundle.getString("default");
   gLockStrs[PREF_IS_USER_SET] = gConfigBundle.getString("user");
   gLockStrs[PREF_IS_LOCKED] = gConfigBundle.getString("locked");
 
   gTypeStrs[nsIPrefBranch.PREF_STRING] = gConfigBundle.getString("string");
@@ -336,26 +324,24 @@ function onConfigLoad()
 
   if (showWarning)
     document.getElementById("warningButton").focus();
   else
     ShowPrefs();
 }
 
 // Unhide the warning message
-function ShowPrefs()
-{
+function ShowPrefs() {
   gPrefBranch.getChildList("").forEach(fetchPref);
 
   var descending = document.getElementsByAttribute("sortDirection", "descending");
   if (descending.item(0)) {
     gSortedColumn = descending[0].id;
     gSortDirection = -1;
-  }
-  else {
+  } else {
     var ascending = document.getElementsByAttribute("sortDirection", "ascending");
     if (ascending.item(0))
       gSortedColumn = ascending[0].id;
     else
       document.getElementById(gSortedColumn).setAttribute("sortDirection", "ascending");
   }
   gSortFunction = gSortFunctions[gSortedColumn];
   gPrefArray.sort(gSortFunction);
@@ -381,44 +367,40 @@ function ShowPrefs()
 
   // Even if we did not set the filter string via the URL query,
   // textbox might have been set via some other mechanism
   if (textbox.value)
     FilterPrefs();
   textbox.focus();
 }
 
-function onConfigUnload()
-{
+function onConfigUnload() {
   if (document.getElementById("configDeck").getAttribute("selectedIndex") == 1) {
     gPrefBranch.removeObserver("", gPrefListener);
     var configTree = document.getElementById("configTree");
     configTree.view = null;
     configTree.controllers.removeController(configController);
   }
 }
 
-function FilterPrefs()
-{
+function FilterPrefs() {
   if (document.getElementById("configDeck").getAttribute("selectedIndex") != 1) {
     return;
   }
 
   var substring = document.getElementById("textbox").value;
   // Check for "/regex/[i]"
   if (substring.charAt(0) == '/') {
     var r = substring.match(/^\/(.*)\/(i?)$/);
     try {
       gFilter = RegExp(r[1], r[2]);
-    }
-    catch (e) {
+    } catch (e) {
       return; // Do nothing on incomplete or bad RegExp
     }
-  }
-  else if (substring) {
+  } else if (substring) {
     gFilter = RegExp(substring.replace(/([^* \w])/g, "\\$1")
                               .replace(/^\*+/, "").replace(/\*+/g, ".*"), "i");
   } else {
     gFilter = null;
   }
 
   var prefCol = (view.selection && view.selection.currentIndex < 0) ?
                 null : gPrefView[view.selection.currentIndex].prefCol;
@@ -430,41 +412,37 @@ function FilterPrefs()
       if (gFilter.test(gPrefArray[i].prefCol + ";" + gPrefArray[i].valueCol))
         gPrefView.push(gPrefArray[i]);
   }
   view.treebox.invalidate();
   view.treebox.rowCountChanged(oldlen, gPrefView.length - oldlen);
   gotoPref(prefCol);
 }
 
-function prefColSortFunction(x, y)
-{
+function prefColSortFunction(x, y) {
   if (x.prefCol > y.prefCol)
     return gSortDirection;
   if (x.prefCol < y.prefCol)
     return -gSortDirection;
   return 0;
 }
 
-function lockColSortFunction(x, y)
-{
+function lockColSortFunction(x, y) {
   if (x.lockCol != y.lockCol)
     return gSortDirection * (y.lockCol - x.lockCol);
   return prefColSortFunction(x, y);
 }
 
-function typeColSortFunction(x, y)
-{
+function typeColSortFunction(x, y) {
   if (x.typeCol != y.typeCol)
     return gSortDirection * (y.typeCol - x.typeCol);
   return prefColSortFunction(x, y);
 }
 
-function valueColSortFunction(x, y)
-{
+function valueColSortFunction(x, y) {
   if (x.valueCol > y.valueCol)
     return gSortDirection;
   if (x.valueCol < y.valueCol)
     return -gSortDirection;
   return prefColSortFunction(x, y);
 }
 
 const gSortFunctions =
@@ -484,18 +462,17 @@ const configController = {
   },
   doCommand: function doCommand(command) {
     copyPref();
   },
   onEvent: function onEvent(event) {
   }
 }
 
-function updateContextMenu()
-{
+function updateContextMenu() {
   var lockCol = PREF_IS_LOCKED;
   var typeCol = nsIPrefBranch.PREF_STRING;
   var valueCol = "";
   var copyDisabled = true;
   var prefSelected = view.selection.currentIndex >= 0;
 
   if (prefSelected) {
     var prefRow = gPrefView[view.selection.currentIndex];
@@ -525,46 +502,40 @@ function updateContextMenu()
   modifySelected.setAttribute("disabled", isLocked);
   modifySelected.hidden = canToggle;
 
   var toggleSelected = document.getElementById("toggleSelected");
   toggleSelected.setAttribute("disabled", isLocked);
   toggleSelected.hidden = !canToggle;
 }
 
-function copyPref()
-{
+function copyPref() {
   var pref = gPrefView[view.selection.currentIndex];
   gClipboardHelper.copyString(pref.prefCol + ';' + pref.valueCol);
 }
 
-function copyName()
-{
+function copyName() {
   gClipboardHelper.copyString(gPrefView[view.selection.currentIndex].prefCol);
 }
 
-function copyValue()
-{
+function copyValue() {
   gClipboardHelper.copyString(gPrefView[view.selection.currentIndex].valueCol);
 }
 
-function ModifySelected()
-{
+function ModifySelected() {
   if (view.selection.currentIndex >= 0)
     ModifyPref(gPrefView[view.selection.currentIndex]);
 }
 
-function ResetSelected()
-{
+function ResetSelected() {
   var entry = gPrefView[view.selection.currentIndex];
   gPrefBranch.clearUserPref(entry.prefCol);
 }
 
-function NewPref(type)
-{
+function NewPref(type) {
   var result = { value: "" };
   var dummy = { value: 0 };
   if (Services.prompt.prompt(window,
                              gConfigBundle.getFormattedString("new_title",
                                                               [gTypeStrs[type]]),
                              gConfigBundle.getString("new_prompt"),
                              result,
                              null,
@@ -579,31 +550,29 @@ function NewPref(type)
       pref = gPrefHash[result.value];
     else
       pref = { prefCol: result.value, lockCol: PREF_IS_DEFAULT_VALUE, typeCol: type, valueCol: "" };
     if (ModifyPref(pref))
       setTimeout(gotoPref, 0, result.value);
   }
 }
 
-function gotoPref(pref)
-{
+function gotoPref(pref) {
   // make sure the pref exists and is displayed in the current view
   var index = pref in gPrefHash ? getViewIndexOfPref(gPrefHash[pref]) : -1;
   if (index >= 0) {
     view.selection.select(index);
     view.treebox.ensureRowIsVisible(index);
   } else {
     view.selection.clearSelection();
     view.selection.currentIndex = -1;
   }
 }
 
-function ModifyPref(entry)
-{
+function ModifyPref(entry) {
   if (entry.lockCol == PREF_IS_LOCKED)
     return false;
   var title = gConfigBundle.getFormattedString("modify_title", [gTypeStrs[entry.typeCol]]);
   if (entry.typeCol == nsIPrefBranch.PREF_BOOL) {
     var check = { value: entry.valueCol == "false" };
     if (!entry.valueCol && !Services.prompt.select(window, title, entry.prefCol, 2, [false, true], check))
       return false;
     gPrefBranch.setBoolPref(entry.prefCol, check.value);
--- a/toolkit/components/viewsource/content/viewSource-content.js
+++ b/toolkit/components/viewsource/content/viewSource-content.js
@@ -537,18 +537,17 @@ var ViewSourceContent = {
     if (!selection.isCollapsed) {
       selection.collapseToEnd();
 
       let offset = result.range.startOffset;
       let node = result.range.startContainer;
       if (offset < node.data.length) {
         // The same text node spans across the "\n", just focus where we were.
         selection.extend(node, offset);
-      }
-      else {
+      } else {
         // There is another tag just after the "\n", hook there. We need
         // to focus a safe point because there are edgy cases such as
         // <span>...\n</span><span>...</span> vs.
         // <span>...\n<span>...</span></span><span>...</span>
         node = node.nextSibling ? node.nextSibling : node.parentNode.nextSibling;
         selection.extend(node, 0);
       }
     }
@@ -761,18 +760,17 @@ var ViewSourceContent = {
   /**
    * Loads a view source selection showing the given view-source url and
    * highlight the selection.
    *
    * @param uri view-source uri to show
    * @param drawSelection true to highlight the selection
    * @param baseURI base URI of the original document
    */
-  viewSourceWithSelection(uri, drawSelection, baseURI)
-  {
+  viewSourceWithSelection(uri, drawSelection, baseURI) {
     this.needsDrawSelection = drawSelection;
 
     // all our content is held by the data:URI and URIs are internally stored as utf-8 (see nsIURI.idl)
     let loadFlags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
     let referrerPolicy = Ci.nsIHttpChannel.REFERRER_POLICY_DEFAULT;
     let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
     webNav.loadURIWithOptions(uri, loadFlags,
                               null, referrerPolicy,  // referrer
@@ -871,18 +869,17 @@ var ViewSourceContent = {
     // the default behavior of the selection is to scroll at the end of
     // the selection, whereas in this situation, it is more user-friendly
     // to scroll at the beginning. So we override the default behavior here
     try {
       this.selectionController.scrollSelectionIntoView(
                                  Ci.nsISelectionController.SELECTION_NORMAL,
                                  Ci.nsISelectionController.SELECTION_ANCHOR_REGION,
                                  true);
-    }
-    catch (e) { }
+    } catch (e) { }
 
     // restore the current find state
     findService.matchCase     = matchCase;
     findService.entireWord    = entireWord;
     findService.wrapFind      = wrapFind;
     findService.findBackwards = findBackwards;
     findService.searchString  = searchString;
     findService.replaceString = replaceString;
--- a/toolkit/components/viewsource/content/viewSource.js
+++ b/toolkit/components/viewsource/content/viewSource.js
@@ -779,18 +779,17 @@ this.__defineGetter__("gPageLoader", fun
     return null;
   delete this.gPageLoader;
   this.gPageLoader = (webnav instanceof Ci.nsIWebPageDescriptor) ? webnav
                                                                  : null;
   return this.gPageLoader;
 });
 
 // Strips the |view-source:| for internalSave()
-function ViewSourceSavePage()
-{
+function ViewSourceSavePage() {
   internalSave(gBrowser.currentURI.spec.replace(/^view-source:/i, ""),
                null, null, null, null, null, "SaveLinkTitle",
                null, null, gBrowser.contentDocumentAsCPOW, null,
                gPageLoader);
 }
 
 // Below are old deprecated functions and variables left behind for
 // compatibility reasons. These will be removed soon via bug 1159293.
@@ -825,18 +824,17 @@ function ViewSourceClose() {
 
 function ViewSourceReload() {
   Deprecated.warning("ViewSourceReload() is deprecated - please use " +
                      "viewSourceChrome.reload() instead.",
                      "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
   viewSourceChrome.reload();
 }
 
-function getWebNavigation()
-{
+function getWebNavigation() {
   Deprecated.warning("getWebNavigation() is deprecated - please use " +
                      "viewSourceChrome.webNav instead.",
                      "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
   // The original implementation returned null if anything threw during
   // the getting of the webNavigation.
   try {
     return viewSourceChrome.webNav;
   } catch (e) {
@@ -846,26 +844,24 @@ function getWebNavigation()
 
 function viewSource(url) {
   Deprecated.warning("viewSource() is deprecated - please use " +
                      "viewSourceChrome.loadURL() instead.",
                      "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
   viewSourceChrome.loadURL(url);
 }
 
-function ViewSourceGoToLine()
-{
+function ViewSourceGoToLine() {
   Deprecated.warning("ViewSourceGoToLine() is deprecated - please use " +
                      "viewSourceChrome.promptAndGoToLine() instead.",
                      "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
   viewSourceChrome.promptAndGoToLine();
 }
 
-function goToLine(line)
-{
+function goToLine(line) {
   Deprecated.warning("goToLine() is deprecated - please use " +
                      "viewSourceChrome.goToLine() instead.",
                      "https://developer.mozilla.org/en-US/Add-ons/Code_snippets/View_Source_for_XUL_Applications");
   viewSourceChrome.goToLine(line);
 }
 
 function BrowserForward(aEvent) {
   Deprecated.warning("BrowserForward() is deprecated - please use " +
--- a/toolkit/components/viewsource/content/viewSourceUtils.js
+++ b/toolkit/components/viewsource/content/viewSourceUtils.js
@@ -54,18 +54,17 @@ var gViewSourceUtils = {
    * @param aPageDescriptor (deprecated, optional)
    *        Accepted for compatibility reasons, but is otherwise ignored.
    * @param aDocument (deprecated, optional)
    *        The content document we would like to view the source of. This
    *        function will throw if aDocument is a CPOW.
    * @param aLineNumber (deprecated, optional)
    *        The line number to focus on once the source is loaded.
    */
-  viewSource(aArgsOrURL, aPageDescriptor, aDocument, aLineNumber)
-  {
+  viewSource(aArgsOrURL, aPageDescriptor, aDocument, aLineNumber) {
     var prefs = Components.classes["@mozilla.org/preferences-service;1"]
                           .getService(Components.interfaces.nsIPrefBranch);
     if (prefs.getBoolPref("view_source.editor.external")) {
       this.openInExternalEditor(aArgsOrURL, aPageDescriptor, aDocument, aLineNumber);
     } else {
       this._openInInternalViewer(aArgsOrURL, aPageDescriptor, aDocument, aLineNumber);
     }
   },
@@ -120,35 +119,33 @@ var gViewSourceUtils = {
       if (!message.data)
         return;
 
       let browserToOpenIn = aGetBrowserFn ? aGetBrowserFn() : null;
       if (browserToOpenIn) {
         let viewSourceBrowser = new ViewSourceBrowser(browserToOpenIn);
         viewSourceBrowser.loadViewSourceFromSelection(message.data.uri, message.data.drawSelection,
                                                       message.data.baseURI);
-      }
-      else {
+      } else {
         window.openDialog("chrome://global/content/viewPartialSource.xul",
                           "_blank", "all,dialog=no",
                           {
                             URI: message.data.uri,
                             drawSelection: message.data.drawSelection,
                             baseURI: message.data.baseURI,
                             partial: true,
                           });
       }
     });
 
     mm.sendAsyncMessage("ViewSource:GetSelection", { }, { target: aTarget });
   },
 
   // Opens the interval view source viewer
-  _openInInternalViewer(aArgsOrURL, aPageDescriptor, aDocument, aLineNumber)
-  {
+  _openInInternalViewer(aArgsOrURL, aPageDescriptor, aDocument, aLineNumber) {
     // try to open a view-source window while inheriting the charset (if any)
     var charset = null;
     var isForcedCharset = false;
     if (aDocument) {
       if (Components.utils.isCrossProcessWrapper(aDocument)) {
         throw new Error("View Source cannot accept a CPOW as a document.");
       }
 
@@ -338,53 +335,49 @@ var gViewSourceUtils = {
       // we failed loading it with the external editor.
       Components.utils.reportError(ex);
       this.handleCallBack(aCallBack, false, data);
       return;
     }
   },
 
   // Default callback - opens the internal viewer if the external editor failed
-  internalViewerFallback(result, data)
-  {
+  internalViewerFallback(result, data) {
     if (!result) {
       this._openInInternalViewer(data.url, data.pageDescriptor, data.doc, data.lineNumber);
     }
   },
 
   // Calls the callback, keeping in mind undefined or null values.
-  handleCallBack(aCallBack, result, data)
-  {
+  handleCallBack(aCallBack, result, data) {
     Services.telemetry
             .getHistogramById("VIEW_SOURCE_EXTERNAL_RESULT_BOOLEAN")
             .add(result);
     // if callback is undefined, default to the internal viewer
     if (aCallBack === undefined) {
       this.internalViewerFallback(result, data);
     } else if (aCallBack) {
       aCallBack(result, data);
     }
   },
 
   // Returns nsIProcess of the external view source editor or null
-  getExternalViewSourceEditor()
-  {
+  getExternalViewSourceEditor() {
     try {
       let viewSourceAppPath =
           Components.classes["@mozilla.org/preferences-service;1"]
                     .getService(Components.interfaces.nsIPrefBranch)
                     .getComplexValue("view_source.editor.path",
                                      Components.interfaces.nsIFile);
       let editor = Components.classes['@mozilla.org/process/util;1']
                              .createInstance(Components.interfaces.nsIProcess);
       editor.init(viewSourceAppPath);
 
       return editor;
-    }
-    catch (ex) {
+    } catch (ex) {
       Components.utils.reportError(ex);
     }
 
     return null;
   },
 
   viewSourceProgressListener: {
 
--- a/toolkit/content/aboutNetworking.js
+++ b/toolkit/content/aboutNetworking.js
@@ -184,17 +184,17 @@ function init() {
 
   let startLoggingButton = document.getElementById("start-logging-button");
   startLoggingButton.addEventListener("click", startLogging);
 
   let stopLoggingButton = document.getElementById("stop-logging-button");
   stopLoggingButton.addEventListener("click", stopLogging);
 
   try {
-    let file = gDirServ.getFile("TmpD",  {});
+    let file = gDirServ.getFile("TmpD", {});
     file.append("log.txt");
     document.getElementById("log-file").value = file.path;
   } catch (e) {
     console.error(e);
   }
 
   // Update the value of the log file.
   updateLogFile();
@@ -400,15 +400,14 @@ function displayDNSLookup(data) {
   new_cont.setAttribute("id", "dnslookuptool_content");
 
   if (data.answer) {
     for (let address of data.address) {
       let row = document.createElement("tr");
       row.appendChild(col(address));
       new_cont.appendChild(row);
     }
-  }
-  else {
+  } else {
     new_cont.appendChild(col(data.error));
   }
 
   parent.replaceChild(new_cont, cont);
 }
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -84,18 +84,17 @@ var snapshotFormatters = {
       PluralForm.get(daysRange, strings.GetStringFromName("crashesTitle"))
                 .replace("#1", daysRange);
     let reportURL;
     try {
       reportURL = Services.prefs.getCharPref("breakpad.reportURL");
       // Ignore any non http/https urls
       if (!/^https?:/i.test(reportURL))
         reportURL = null;
-    }
-    catch (e) { }
+    } catch (e) { }
     if (!reportURL) {
       $("crashes-noConfig").style.display = "block";
       $("crashes-noConfig").classList.remove("no-copy");
       return;
     }
     $("crashes-allReports").style.display = "block";
     $("crashes-allReports").classList.remove("no-copy");
 
@@ -105,32 +104,27 @@ var snapshotFormatters = {
                   .replace("#1", data.pending);
     }
 
     let dateNow = new Date();
     $.append($("crashes-tbody"), data.submitted.map(function(crash) {
       let date = new Date(crash.date);
       let timePassed = dateNow - date;
       let formattedDate;
-      if (timePassed >= 24 * 60 * 60 * 1000)
-      {
+      if (timePassed >= 24 * 60 * 60 * 1000) {
         let daysPassed = Math.round(timePassed / (24 * 60 * 60 * 1000));
         let daysPassedString = strings.GetStringFromName("crashesTimeDays");
         formattedDate = PluralForm.get(daysPassed, daysPassedString)
                                   .replace("#1", daysPassed);
-      }
-      else if (timePassed >= 60 * 60 * 1000)
-      {
+      } else if (timePassed >= 60 * 60 * 1000) {
         let hoursPassed = Math.round(timePassed / (60 * 60 * 1000));
         let hoursPassedString = strings.GetStringFromName("crashesTimeHours");
         formattedDate = PluralForm.get(hoursPassed, hoursPassedString)
                                   .replace("#1", hoursPassed);
-      }
-      else
-      {
+      } else {
         let minutesPassed = Math.max(Math.round(timePassed / (60 * 1000)), 1);
         let minutesPassedString = strings.GetStringFromName("crashesTimeMinutes");
         formattedDate = PluralForm.get(minutesPassed, minutesPassedString)
                                   .replace("#1", minutesPassed);
       }
       return $.new("tr", [
         $.new("td", [
           $.new("a", crash.id, null, {href : reportURL + crash.id})
@@ -198,29 +192,27 @@ var snapshotFormatters = {
     function localizedMsg(msgArray) {
       let nameOrMsg = msgArray.shift();
       if (msgArray.length) {
         // formatStringFromName logs an NS_ASSERTION failure otherwise that says
         // "use GetStringFromName".  Lame.
         try {
           return strings.formatStringFromName(nameOrMsg, msgArray,
                                               msgArray.length);
-        }
-        catch (err) {
+        } catch (err) {
           // Throws if nameOrMsg is not a name in the bundle.  This shouldn't
           // actually happen though, since msgArray.length > 1 => nameOrMsg is a
           // name in the bundle, not a message, and the remaining msgArray
           // elements are parameters.
           return nameOrMsg;
         }
       }
       try {
         return strings.GetStringFromName(nameOrMsg);
-      }
-      catch (err) {
+      } catch (err) {
         // Throws if nameOrMsg is not a name in the bundle.
       }
       return nameOrMsg;
     }
 
     // Read APZ info out of data.info, stripping it out in the process.
     let apzInfo = [];
     let formatApzInfo = function(info) {
@@ -615,18 +607,17 @@ var $ = document.getElementById.bind(doc
   children.forEach(c => parent.appendChild(c));
 };
 
 function stringBundle() {
   return Services.strings.createBundle(
            "chrome://global/locale/aboutSupport.properties");
 }
 
-function assembleFromGraphicsFailure(i, data)
-{
+function assembleFromGraphicsFailure(i, data) {
   // Only cover the cases we have today; for example, we do not have
   // log failures that assert and we assume the log level is 1/error.
   let message = data.failures[i];
   let index = data.indices[i];
   let what = "";
   if (message.search(/\[GFX1-\]: \(LF\)/) == 0) {
     // Non-asserting log failure - the message is substring(14)
     what = "LogFailure";
@@ -677,18 +668,17 @@ function copyRawDataToClipboard(button) 
         let message = {
           type: "Toast:Show",
           message: stringBundle().GetStringFromName("rawDataCopied"),
           duration: "short"
         };
         Services.androidBridge.handleGeckoMessage(message);
       }
     });
-  }
-  catch (err) {
+  } catch (err) {
     if (button)
       button.disabled = false;
     throw err;
   }
 }
 
 function getLoadContext() {
   return window.QueryInterface(Ci.nsIInterfaceRequestor)
@@ -788,18 +778,17 @@ Serializer.prototype = {
     // all other elements
 
     let hasText = false;
     for (let child of elem.childNodes) {
       if (child.nodeType == Node.TEXT_NODE) {
         let text = this._nodeText(child);
         this._appendText(text);
         hasText = hasText || !!text.trim();
-      }
-      else if (child.nodeType == Node.ELEMENT_NODE)
+      } else if (child.nodeType == Node.ELEMENT_NODE)
         this._serializeElement(child);
     }
 
     // For headings, draw a "line" underneath them so they stand out.
     if (/^h[0-9]+$/.test(elem.localName)) {
       let headerText = (this._currentLine || "").trim();
       if (headerText) {
         this._startNewLine();
@@ -979,18 +968,17 @@ function setupEventListeners() {
     copyContentsToClipboard();
   });
   $("profile-dir-button").addEventListener("click", function(event) {
     openProfileDirectory();
   });
   $("restart-in-safe-mode-button").addEventListener("click", function(event) {
     if (Services.obs.enumerateObservers("restart-in-safe-mode").hasMoreElements()) {
       Services.obs.notifyObservers(null, "restart-in-safe-mode", "");
-    }
-    else {
+    } else {
       safeModeRestart();
     }
   });
   $("verify-place-integrity-button").addEventListener("click", function(event) {
     PlacesDBUtils.checkAndFixDatabase(function(aLog) {
       let msg = aLog.join("\n");
       $("verify-place-result").style.display = "block";
       $("verify-place-result").classList.remove("no-copy");
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -1391,18 +1391,17 @@ var Histogram = {
     if (filter[0] != "/") { // Plain text: case insensitive, AND if multi-string
       isPassFunc = isPassText;
       filter = filter.toLowerCase().split(" ");
     } else {
       isPassFunc = isPassRegex;
       var r = filter.match(/^\/(.*)\/(i?)$/);
       try {
         filter = RegExp(r[1], r[2]);
-      }
-      catch (e) { // Incomplete or bad RegExp - always no match
+      } catch (e) { // Incomplete or bad RegExp - always no match
         isPassFunc = function() {
           return false;
         };
       }
     }
 
     let needLower = (isPassFunc === isPassText);
 
@@ -1763,18 +1762,17 @@ function toggleSection(aEvent) {
   if (statebox) {
     statebox.checked = parentElement.classList.contains("expanded");
   }
 }
 
 /**
  * Sets the text of the page header based on a config pref + bundle strings
  */
-function setupPageHeader()
-{
+function setupPageHeader() {
   let serverOwner = Preferences.get(PREF_TELEMETRY_SERVER_OWNER, "Mozilla");
   let brandName = brandBundle.GetStringFromName("brandFullName");
   let subtitleText = bundle.formatStringFromName(
     "pageSubtitle", [serverOwner, brandName], 2);
 
   let subtitleElement = document.getElementById("page-subtitle");
   subtitleElement.appendChild(document.createTextNode(subtitleText));
 }
--- a/toolkit/content/aboutwebrtc/aboutWebrtc.js
+++ b/toolkit/content/aboutwebrtc/aboutWebrtc.js
@@ -521,17 +521,17 @@ RTPStats.prototype = {
       div.appendChild(this.renderRTPStatSet(statSet));
     }
 
     return div;
   },
 
   generateRTPStats() {
     let remoteRtpStats = {};
-    let rtpStats = [].concat((this._report.inboundRTPStreamStats  || []),
+    let rtpStats = [].concat((this._report.inboundRTPStreamStats || []),
                              (this._report.outboundRTPStreamStats || []));
 
     // Generate an id-to-streamStat index for each streamStat that is marked
     // as a remote. This will be used next to link the remote to its local side.
     for (let stats of rtpStats) {
       if (stats.isRemote) {
         remoteRtpStats[stats.id] = stats;
       }
--- a/toolkit/content/browser-content.js
+++ b/toolkit/content/browser-content.js
@@ -905,17 +905,17 @@ let WebChannelMessageToChromeListener = 
         let objectsAllowed = this._getWhitelistedPrincipals().some(whitelisted =>
           principal.originNoSuffix == whitelisted.originNoSuffix);
         if (!objectsAllowed) {
           Cu.reportError("WebChannelMessageToChrome sent with an object from a non-whitelisted principal");
           return;
         }
       }
       sendAsyncMessage("WebChannelMessageToChrome", e.detail, { eventTarget: e.target }, principal);
-    } else  {
+    } else {
       Cu.reportError("WebChannel message failed. No message detail.");
     }
   }
 };
 
 WebChannelMessageToChromeListener.init();
 
 // This should be kept in sync with /browser/base/content.js.
@@ -1185,18 +1185,17 @@ var ViewSelectionSource = {
         else {
           tmpNode = dataDoc.createTextNode(MARK_SELECTION_END);
           endContainer = endContainer.parentNode;
           if (endOffset === 0)
             endContainer.parentNode.insertBefore(tmpNode, endContainer);
           else
             endContainer.parentNode.insertBefore(tmpNode, endContainer.nextSibling);
         }
-      }
-      else {
+      } else {
         tmpNode = dataDoc.createTextNode(MARK_SELECTION_END);
         endContainer.insertBefore(tmpNode, endContainer.childNodes.item(endOffset));
       }
 
       if (startContainer.nodeType == Node.TEXT_NODE ||
           startContainer.nodeType == Node.CDATA_SECTION_NODE) {
         // do some extra tweaks to try to avoid the view-source output to look like
         // ...<tag>[... or ...[</tag>... (where '[' marks the start of the selection).
@@ -1210,18 +1209,17 @@ var ViewSelectionSource = {
         else {
           tmpNode = dataDoc.createTextNode(MARK_SELECTION_START);
           startContainer = startContainer.parentNode;
           if (startOffset === 0)
             startContainer.parentNode.insertBefore(tmpNode, startContainer);
           else
             startContainer.parentNode.insertBefore(tmpNode, startContainer.nextSibling);
         }
-      }
-      else {
+      } else {
         tmpNode = dataDoc.createTextNode(MARK_SELECTION_START);
         startContainer.insertBefore(tmpNode, startContainer.childNodes.item(startOffset));
       }
     }
 
     // now extract and display the syntax highlighted source
     tmpNode = dataDoc.createElementNS("http://www.w3.org/1999/xhtml", "div");
     tmpNode.appendChild(ancestorContainer);
@@ -1269,17 +1267,17 @@ var ViewSelectionSource = {
     + '<html>'
     + '<head><title>' + title + '</title>'
     + '<link rel="stylesheet" type="text/css" href="' + VIEW_SOURCE_CSS + '">'
     + '<style type="text/css">'
     + '#target { border: dashed 1px; background-color: lightyellow; }'
     + '</style>'
     + '</head>'
     + '<body id="viewsource"' + wrapClass
-    +        ' onload="document.title=\'' + title + '\'; document.getElementById(\'target\').scrollIntoView(true)">'
+    + ' onload="document.title=\'' + title + '\'; document.getElementById(\'target\').scrollIntoView(true)">'
     + '<pre>'
     + this.getOuterMarkup(topNode, 0)
     + '</pre></body></html>'
     ; // end
 
     return { uri: "data:text/html;charset=utf-8," + encodeURIComponent(source),
              drawSelection: false, baseURI: node.ownerDocument.baseURI };
   },
@@ -1315,45 +1313,43 @@ var ViewSelectionSource = {
           this._lineCount != this._endTargetLine) {
         newline = "\n";
       }
       this._lineCount++;
       for (var k = 0; k < indent; k++) {
         padding += " ";
       }
       str += newline + padding
-          +  '&lt;<span class="start-tag">' + node.nodeName + '</span>';
+          + '&lt;<span class="start-tag">' + node.nodeName + '</span>';
       for (var i = 0; i < node.attributes.length; i++) {
         var attr = node.attributes.item(i);
         if (attr.nodeName.match(/^[-_]moz/)) {
           continue;
         }
         str += ' <span class="attribute-name">'
-            +  attr.nodeName
-            +  '</span>=<span class="attribute-value">"'
-            +  this.unicodeToEntity(attr.nodeValue)
-            +  '"</span>';
+            + attr.nodeName
+            + '</span>=<span class="attribute-value">"'
+            + this.unicodeToEntity(attr.nodeValue)
+            + '"</span>';
       }
       if (!node.hasChildNodes()) {
         str += "/&gt;";
-      }
-      else {
+      } else {
         str += "&gt;";
         var oldLine = this._lineCount;
         str += this.getInnerMarkup(node, indent + 2);
         if (oldLine == this._lineCount) {
           newline = "";
           padding = "";
-        }
-        else {
+        } else {
           newline = (this._lineCount == this._endTargetLine) ? "" : "\n";
           this._lineCount++;
         }
         str += newline + padding
-            +  '&lt;/<span class="end-tag">' + node.nodeName + '</span>&gt;';
+            + '&lt;/<span class="end-tag">' + node.nodeName + '</span>&gt;';
       }
       break;
     case Node.TEXT_NODE: // Text
       var tmp = node.nodeValue;
       tmp = tmp.replace(/(\n|\r|\t)+/g, " ");
       tmp = tmp.replace(/^ +/, "");
       tmp = tmp.replace(/ +$/, "");
       if (tmp.length != 0) {
--- a/toolkit/content/contentAreaUtils.js
+++ b/toolkit/content/contentAreaUtils.js
@@ -38,34 +38,31 @@ var ContentAreaUtils = {
 
   get stringBundle() {
     delete this.stringBundle;
     return this.stringBundle =
       Services.strings.createBundle("chrome://global/locale/contentAreaCommands.properties");
   }
 }
 
-function urlSecurityCheck(aURL, aPrincipal, aFlags)
-{
+function urlSecurityCheck(aURL, aPrincipal, aFlags) {
   return BrowserUtils.urlSecurityCheck(aURL, aPrincipal, aFlags);
 }
 
 /**
  * Determine whether or not a given focused DOMWindow is in the content area.
  **/
-function isContentFrame(aFocusedWindow)
-{
+function isContentFrame(aFocusedWindow) {
   if (!aFocusedWindow)
     return false;
 
   return (aFocusedWindow.top == window.content);
 }
 
-function forbidCPOW(arg, func, argname)
-{
+function forbidCPOW(arg, func, argname) {
   if (arg && (typeof(arg) == "object" || typeof(arg) == "function") &&
       Components.utils.isCrossProcessWrapper(arg)) {
     throw new Error(`no CPOWs allowed for argument ${argname} to ${func}`);
   }
 }
 
 // Clientele: (Make sure you don't break any of these)
 //  - File    ->  Save Page/Frame As...
@@ -81,18 +78,17 @@ function forbidCPOW(arg, func, argname)
 // - An image with an extension (e.g. .jpg) in its file name, using
 //   Context->Save Image As...
 // - An image without an extension (e.g. a banner ad on cnn.com) using
 //   the above method.
 // - A linked document using Save Link As...
 // - A linked document using Alt-click Save Link As...
 //
 function saveURL(aURL, aFileName, aFilePickerTitleKey, aShouldBypassCache,
-                 aSkipPrompt, aReferrer, aSourceDocument, aIsContentWindowPrivate)
-{
+                 aSkipPrompt, aReferrer, aSourceDocument, aIsContentWindowPrivate) {
   forbidCPOW(aURL, "saveURL", "aURL");
   forbidCPOW(aReferrer, "saveURL", "aReferrer");
   // Allow aSourceDocument to be a CPOW.
 
   internalSave(aURL, null, aFileName, null, null, aShouldBypassCache,
                aFilePickerTitleKey, null, aReferrer, aSourceDocument,
                aSkipPrompt, null, aIsContentWindowPrivate);
 }
@@ -132,18 +128,17 @@ const nsISupportsCString = Components.in
  * @param aContentDisp (string, optional)
  *        The content disposition of the image.
  * @param aIsContentWindowPrivate (bool)
  *        Whether or not the containing window is in private browsing mode.
  *        Does not need to be provided is aDoc is passed.
  */
 function saveImageURL(aURL, aFileName, aFilePickerTitleKey, aShouldBypassCache,
                       aSkipPrompt, aReferrer, aDoc, aContentType, aContentDisp,
-                      aIsContentWindowPrivate)
-{
+                      aIsContentWindowPrivate) {
   forbidCPOW(aURL, "saveImageURL", "aURL");
   forbidCPOW(aReferrer, "saveImageURL", "aReferrer");
 
   if (aDoc && aIsContentWindowPrivate == undefined) {
     if (Components.utils.isCrossProcessWrapper(aDoc)) {
       Deprecated.warning("saveImageURL should not be passed document CPOWs. " +
                          "The caller should pass in the content type and " +
                          "disposition themselves",
@@ -183,18 +178,17 @@ function saveImageURL(aURL, aFileName, a
   internalSave(aURL, null, aFileName, aContentDisp, aContentType,
                aShouldBypassCache, aFilePickerTitleKey, null, aReferrer,
                null, aSkipPrompt, null, aIsContentWindowPrivate);
 }
 
 // This is like saveDocument, but takes any browser/frame-like element
 // (nsIFrameLoaderOwner) and saves the current document inside it,
 // whether in-process or out-of-process.
-function saveBrowser(aBrowser, aSkipPrompt, aOuterWindowID = 0)
-{
+function saveBrowser(aBrowser, aSkipPrompt, aOuterWindowID = 0) {
   if (!aBrowser) {
     throw "Must have a browser when calling saveBrowser";
   }
   let persistable = aBrowser.QueryInterface(Ci.nsIFrameLoaderOwner)
                     .frameLoader
                     .QueryInterface(Ci.nsIWebBrowserPersistable);
   let stack = Components.stack.caller;
   persistable.startPersistence(aOuterWindowID, {
@@ -210,18 +204,17 @@ function saveBrowser(aBrowser, aSkipProm
 
 // Saves a document; aDocument can be an nsIWebBrowserPersistDocument
 // (see saveBrowser, above) or an nsIDOMDocument.
 //
 // aDocument can also be a CPOW for a remote nsIDOMDocument, in which
 // case "save as" modes that serialize the document's DOM are
 // unavailable.  This is a temporary measure for the "Save Frame As"
 // command (bug 1141337) and pre-e10s add-ons.
-function saveDocument(aDocument, aSkipPrompt)
-{
+function saveDocument(aDocument, aSkipPrompt) {
   const Ci = Components.interfaces;
 
   if (!aDocument)
     throw "Must have a document when calling saveDocument";
 
   let contentDisposition = null;
   let cacheKeyInt = null;
 
@@ -288,29 +281,27 @@ function DownloadListener(win, transfer)
   // Now... we need to forward all calls to our transfer
   for (var i in transfer) {
     if (i != "QueryInterface")
       this[i] = makeClosure(i);
   }
 }
 
 DownloadListener.prototype = {
-  QueryInterface: function dl_qi(aIID)
-  {
+  QueryInterface: function dl_qi(aIID) {
     if (aIID.equals(Components.interfaces.nsIInterfaceRequestor) ||
         aIID.equals(Components.interfaces.nsIWebProgressListener) ||
         aIID.equals(Components.interfaces.nsIWebProgressListener2) ||
         aIID.equals(Components.interfaces.nsISupports)) {
       return this;
     }
     throw Components.results.NS_ERROR_NO_INTERFACE;
   },
 
-  getInterface: function dl_gi(aIID)
-  {
+  getInterface: function dl_gi(aIID) {
     if (aIID.equals(Components.interfaces.nsIAuthPrompt) ||
         aIID.equals(Components.interfaces.nsIAuthPrompt2)) {
       var ww =
         Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
                   .getService(Components.interfaces.nsIPromptFactory);
       return ww.getPrompt(this.window, aIID);
     }
 
@@ -383,18 +374,17 @@ XPCOMUtils.defineConstant(this, "kSaveAs
  * @param aIsContentWindowPrivate [optional]
  *        This parameter is provided when the aInitiatingDocument is not a
  *        real document object. Stores whether aInitiatingDocument.defaultView
  *        was private or not.
  */
 function internalSave(aURL, aDocument, aDefaultFileName, aContentDisposition,
                       aContentType, aShouldBypassCache, aFilePickerTitleKey,
                       aChosenData, aReferrer, aInitiatingDocument, aSkipPrompt,
-                      aCacheKey, aIsContentWindowPrivate)
-{
+                      aCacheKey, aIsContentWindowPrivate) {
   forbidCPOW(aURL, "internalSave", "aURL");
   forbidCPOW(aReferrer, "internalSave", "aReferrer");
   forbidCPOW(aCacheKey, "internalSave", "aCacheKey");
   // Allow aInitiatingDocument to be a CPOW.
 
   if (aSkipPrompt == undefined)
     aSkipPrompt = false;
 
@@ -509,18 +499,17 @@ function internalSave(aURL, aDocument, a
  *        determines the final content type of the saved file, or null to use
  *        the same content type as the source document. Currently only
  *        "text/plain" is meaningful.
  * @param persistArgs.bypassCache
  *        If true, the document will always be refetched from the server
  * @param persistArgs.isPrivate
  *        Indicates whether this is taking place in a private browsing context.
  */
-function internalPersist(persistArgs)
-{
+function internalPersist(persistArgs) {
   var persist = makeWebBrowserPersist();
 
   // Calculate persist flags.
   const nsIWBP = Components.interfaces.nsIWebBrowserPersist;
   const flags = nsIWBP.PERSIST_FLAGS_REPLACE_EXISTING_FILES |
                 nsIWBP.PERSIST_FLAGS_FORCE_ALLOW_COOKIES;
   if (persistArgs.bypassCache)
     persist.persistFlags = flags | nsIWBP.PERSIST_FLAGS_BYPASS_CACHE;
@@ -554,18 +543,17 @@ function internalPersist(persistArgs)
       filesFolder.leafName = filesFolderLeafName;
     }
 
     var encodingFlags = 0;
     if (persistArgs.targetContentType == "text/plain") {
       encodingFlags |= nsIWBP.ENCODE_FLAGS_FORMATTED;
       encodingFlags |= nsIWBP.ENCODE_FLAGS_ABSOLUTE_LINKS;
       encodingFlags |= nsIWBP.ENCODE_FLAGS_NOFRAMES_CONTENT;
-    }
-    else {
+    } else {
       encodingFlags |= nsIWBP.ENCODE_FLAGS_ENCODE_BASIC_ENTITIES;
     }
 
     const kWrapColumn = 80;
     persist.saveDocument(persistArgs.sourceDocument, targetFileURL, filesFolder,
                          persistArgs.targetContentType, encodingFlags, kWrapColumn);
   } else {
     persist.savePrivacyAwareURI(persistArgs.sourceURI,
@@ -619,18 +607,17 @@ function FileInfo(aSuggestedFileName, aF
  * @param aURLCharset The charset of aURL.
  * @param aDocument The document to be saved
  * @param aContentType The content type we're saving, if it could be
  *        determined by the caller.
  * @param aContentDisposition The content-disposition header for the object
  *        we're saving, if it could be determined by the caller.
  */
 function initFileInfo(aFI, aURL, aURLCharset, aDocument,
-                      aContentType, aContentDisposition)
-{
+                      aContentType, aContentDisposition) {
   try {
     // Get an nsIURI object from aURL if possible:
     try {
       aFI.uri = makeURI(aURL, aURLCharset);
       // Assuming nsiUri is valid, calling QueryInterface(...) on it will
       // populate extra object fields (eg filename and file extension).
       var url = aFI.uri.QueryInterface(Components.interfaces.nsIURL);
       aFI.fileExt = url.fileExtension;
@@ -671,18 +658,17 @@ function initFileInfo(aFI, aURL, aURLCha
  * @param aRelatedURI
  *        An nsIURI associated with the download. The last used
  *        directory of the picker is retrieved from/stored in the
  *        Content Pref Service using this URI.
  * @return Promise
  * @resolve a boolean. When true, it indicates that the file picker dialog
  *          is accepted.
  */
-function promiseTargetFile(aFpP, /* optional */ aSkipPrompt, /* optional */ aRelatedURI)
-{
+function promiseTargetFile(aFpP, /* optional */ aSkipPrompt, /* optional */ aRelatedURI) {
   return Task.spawn(function*() {
     let downloadLastDir = new DownloadLastDir(window);
     let prefBranch = Services.prefs.getBranch("browser.download.");
     let useDownloadDir = prefBranch.getBoolPref("useDownloadDir");
 
     if (!aSkipPrompt)
       useDownloadDir = false;
 
@@ -735,18 +721,17 @@ function promiseTargetFile(aFpP, /* opti
     appendFiltersForContentType(fp, aFpP.contentType, aFpP.fileInfo.fileExt,
                                 aFpP.saveMode);
 
     // The index of the selected filter is only preserved and restored if there's
     // more than one filter in addition to "All Files".
     if (aFpP.saveMode != SAVEMODE_FILEONLY) {
       try {
         fp.filterIndex = prefBranch.getIntPref("save_converter_index");
-      }
-      catch (e) {
+      } catch (e) {
       }
     }
 
     let deferComplete = Promise.defer();
     fp.open(function(aResult) {
       deferComplete.resolve(aResult);
     });
     let result = yield deferComplete.promise;
@@ -772,30 +757,28 @@ function promiseTargetFile(aFpP, /* opti
 
 // Since we're automatically downloading, we don't get the file picker's
 // logic to check for existing files, so we need to do that here.
 //
 // Note - this code is identical to that in
 //   mozilla/toolkit/mozapps/downloads/src/nsHelperAppDlg.js.in
 // If you are updating this code, update that code too! We can't share code
 // here since that code is called in a js component.
-function uniqueFile(aLocalFile)
-{
+function uniqueFile(aLocalFile) {
   var collisionCount = 0;
   while (aLocalFile.exists()) {
     collisionCount++;
     if (collisionCount == 1) {
       // Append "(2)" before the last dot in (or at the end of) the filename
       // special case .ext.gz etc files so we don't wind up with .tar(2).gz
       if (aLocalFile.leafName.match(/\.[^\.]{1,3}\.(gz|bz2|Z)$/i))
         aLocalFile.leafName = aLocalFile.leafName.replace(/\.[^\.]{1,3}\.(gz|bz2|Z)$/i, "(2)$&");
       else
         aLocalFile.leafName = aLocalFile.leafName.replace(/(\.[^\.]*)?$/, "(2)$&");
-    }
-    else {
+    } else {
       // replace the last (n) in the filename with (n+1)
       aLocalFile.leafName = aLocalFile.leafName.replace(/^(.*\()\d+\)/, "$1" + (collisionCount + 1) + ")");
     }
   }
   return aLocalFile;
 }
 
 /**
@@ -855,18 +838,17 @@ XPCOMUtils.defineConstant(this, "SAVEMOD
 // We have a DOM which we can serialize as text.
 const SAVEMODE_COMPLETE_TEXT = 0x02;
 XPCOMUtils.defineConstant(this, "SAVEMODE_COMPLETE_TEXT", SAVEMODE_COMPLETE_TEXT);
 
 // If we are able to save a complete DOM, the 'save as complete' filter
 // must be the first filter appended.  The 'save page only' counterpart
 // must be the second filter appended.  And the 'save as complete text'
 // filter must be the third filter appended.
-function appendFiltersForContentType(aFilePicker, aContentType, aFileExtension, aSaveMode)
-{
+function appendFiltersForContentType(aFilePicker, aContentType, aFileExtension, aSaveMode) {
   // The bundle name for saving only a specific content type.
   var bundleName;
   // The corresponding filter string for a specific content type.
   var filterString;
 
   // Every case where GetSaveModeForContentType can return non-FILEONLY
   // modes must be handled here.
   if (aSaveMode != SAVEMODE_FILEONLY) {
@@ -928,18 +910,17 @@ function appendFiltersForContentType(aFi
 
   if (aSaveMode & SAVEMODE_COMPLETE_TEXT)
     aFilePicker.appendFilters(Components.interfaces.nsIFilePicker.filterText);
 
   // Always append the all files (*) filter
   aFilePicker.appendFilters(Components.interfaces.nsIFilePicker.filterAll);
 }
 
-function getPostData(aDocument)
-{
+function getPostData(aDocument) {
   const Ci = Components.interfaces;
 
   if (aDocument instanceof Ci.nsIWebBrowserPersistDocument) {
     return aDocument.postData;
   }
   try {
     // Find the session history entry corresponding to the given document. In
     // the current implementation, nsIWebPageDescriptor.currentDescriptor always
@@ -947,105 +928,91 @@ function getPostData(aDocument)
     let sessionHistoryEntry =
         aDocument.defaultView
                  .QueryInterface(Ci.nsIInterfaceRequestor)
                  .getInterface(Ci.nsIWebNavigation)
                  .QueryInterface(Ci.nsIWebPageDescriptor)
                  .currentDescriptor
                  .QueryInterface(Ci.nsISHEntry);
     return sessionHistoryEntry.postData;
-  }
-  catch (e) {
+  } catch (e) {
   }
   return null;
 }
 
-function makeWebBrowserPersist()
-{
+function makeWebBrowserPersist() {
   const persistContractID = "@mozilla.org/embedding/browser/nsWebBrowserPersist;1";
   const persistIID = Components.interfaces.nsIWebBrowserPersist;
   return Components.classes[persistContractID].createInstance(persistIID);
 }
 
-function makeURI(aURL, aOriginCharset, aBaseURI)
-{
+function makeURI(aURL, aOriginCharset, aBaseURI) {
   return BrowserUtils.makeURI(aURL, aOriginCharset, aBaseURI);
 }
 
-function makeFileURI(aFile)
-{
+function makeFileURI(aFile) {
   return BrowserUtils.makeFileURI(aFile);
 }
 
-function makeFilePicker()
-{
+function makeFilePicker() {
   const fpContractID = "@mozilla.org/filepicker;1";
   const fpIID = Components.interfaces.nsIFilePicker;
   return Components.classes[fpContractID].createInstance(fpIID);
 }
 
-function getMIMEService()
-{
+function getMIMEService() {
   const mimeSvcContractID = "@mozilla.org/mime;1";
   const mimeSvcIID = Components.interfaces.nsIMIMEService;
   const mimeSvc = Components.classes[mimeSvcContractID].getService(mimeSvcIID);
   return mimeSvc;
 }
 
 // Given aFileName, find the fileName without the extension on the end.
-function getFileBaseName(aFileName)
-{
+function getFileBaseName(aFileName) {
   // Remove the file extension from aFileName:
   return aFileName.replace(/\.[^.]*$/, "");
 }
 
-function getMIMETypeForURI(aURI)
-{
+function getMIMETypeForURI(aURI) {
   try {
     return getMIMEService().getTypeFromURI(aURI);
-  }
-  catch (e) {
+  } catch (e) {
   }
   return null;
 }
 
-function getMIMEInfoForType(aMIMEType, aExtension)
-{
+function getMIMEInfoForType(aMIMEType, aExtension) {
   if (aMIMEType || aExtension) {
     try {
       return getMIMEService().getFromTypeAndExtension(aMIMEType, aExtension);
-    }
-    catch (e) {
+    } catch (e) {
     }
   }
   return null;
 }
 
 function getDefaultFileName(aDefaultFileName, aURI, aDocument,
-                            aContentDisposition)
-{
+                            aContentDisposition) {
   // 1) look for a filename in the content-disposition header, if any
   if (aContentDisposition) {
     const mhpContractID = "@mozilla.org/network/mime-hdrparam;1";
     const mhpIID = Components.interfaces.nsIMIMEHeaderParam;
     const mhp = Components.classes[mhpContractID].getService(mhpIID);
     var dummy = { value: null };  // Need an out param...
     var charset = getCharsetforSave(aDocument);
 
     var fileName = null;
     try {
       fileName = mhp.getParameter(aContentDisposition, "filename", charset,
                                   true, dummy);
-    }
-    catch (e) {
+    } catch (e) {
       try {
         fileName = mhp.getParameter(aContentDisposition, "name", charset, true,
                                     dummy);
-      }
-      catch (e) {
+      } catch (e) {
       }
     }
     if (fileName)
       return fileName;
   }
 
   let docTitle;
   if (aDocument) {
@@ -1101,27 +1068,25 @@ function getDefaultFileName(aDefaultFile
     return ContentAreaUtils.stringBundle.GetStringFromName("DefaultSaveFileName");
   } catch (e) {
     // in case localized string cannot be found
   }
   // 9) If all else fails, use "index"
   return "index";
 }
 
-function validateFileName(aFileName)
-{
+function validateFileName(aFileName) {
   var re = /[\/]+/g;
   if (navigator.appVersion.indexOf("Windows") != -1) {
     re = /[\\\/\|]+/g;
     aFileName = aFileName.replace(/[\"]+/g, "'");
     aFileName = aFileName.replace(/[\*\:\?]+/g, " ");
     aFileName = aFileName.replace(/[\<]+/g, "(");
     aFileName = aFileName.replace(/[\>]+/g, ")");
-  }
-  else if (navigator.appVersion.indexOf("Macintosh") != -1)
+  } else if (navigator.appVersion.indexOf("Macintosh") != -1)
     re = /[\:\/]+/g;
   else if (navigator.appVersion.indexOf("Android") != -1) {
     // On mobile devices, the filesystem may be very limited in what
     // it considers valid characters. To avoid errors, we sanitize
     // conservatively.
     const dangerousChars = "*?<>|\":/\\[];,+=";
     var processed = "";
     for (var i = 0; i < aFileName.length; i++)
@@ -1150,18 +1115,17 @@ function validateFileName(aFileName)
       }
     }
     return processed;
   }
 
   return aFileName.replace(re, "_");
 }
 
-function getNormalizedLeafName(aFile, aDefaultExtension)
-{
+function getNormalizedLeafName(aFile, aDefaultExtension) {
   if (!aDefaultExtension)
     return aFile;
 
   if (AppConstants.platform == "win") {
     // Remove trailing dots and spaces on windows
     aFile = aFile.replace(/[\s.]+$/, "");
   }
 
@@ -1171,18 +1135,17 @@ function getNormalizedLeafName(aFile, aD
   // Fix up the file name we're saving to to include the default extension
   var i = aFile.lastIndexOf(".");
   if (aFile.substr(i + 1) != aDefaultExtension)
     return aFile + "." + aDefaultExtension;
 
   return aFile;
 }
 
-function getDefaultExtension(aFilename, aURI, aContentType)
-{
+function getDefaultExtension(aFilename, aURI, aContentType) {
   if (aContentType == "text/plain" || aContentType == "application/octet-stream" || aURI.scheme == "ftp")
     return "";   // temporary fix for bug 120327
 
   // First try the extension from the filename
   const stdURLContractID = "@mozilla.org/network/standard-url;1";
   const stdURLIID = Components.interfaces.nsIURL;
   var url = Components.classes[stdURLContractID].createInstance(stdURLIID);
   url.filePath = aFilename;
@@ -1206,26 +1169,24 @@ function getDefaultExtension(aFilename, 
   }
 
   if (urlext && mimeInfo && mimeInfo.extensionExists(urlext)) {
     return urlext;
   }
   try {
     if (mimeInfo)
       return mimeInfo.primaryExtension;
-  }
-  catch (e) {
+  } catch (e) {
   }
   // Fall back on the extensions in the filename and URI for lack
   // of anything better.
   return ext || urlext;
 }
 
-function GetSaveModeForContentType(aContentType, aDocument)
-{
+function GetSaveModeForContentType(aContentType, aDocument) {
   // We can only save a complete page if we have a loaded document,
   // and it's not a CPOW -- nsWebBrowserPersist needs a real document.
   if (!aDocument || Components.utils.isCrossProcessWrapper(aDocument))
     return SAVEMODE_FILEONLY;
 
   // Find the possible save modes using the provided content type
   var saveMode = SAVEMODE_FILEONLY;
   switch (aContentType) {
@@ -1238,46 +1199,43 @@ function GetSaveModeForContentType(aCont
   case "application/xml":
     saveMode |= SAVEMODE_COMPLETE_DOM;
     break;
   }
 
   return saveMode;
 }
 
-function getCharsetforSave(aDocument)
-{
+function getCharsetforSave(aDocument) {
   if (aDocument)
     return aDocument.characterSet;
 
   if (document.commandDispatcher.focusedWindow)
     return document.commandDispatcher.focusedWindow.document.characterSet;
 
   return window.content.document.characterSet;
 }
 
 /**
  * Open a URL from chrome, determining if we can handle it internally or need to
  *  launch an external application to handle it.
  * @param aURL The URL to be opened
  *
  * WARNING: Please note that openURL() does not perform any content security checks!!!
  */
-function openURL(aURL)
-{
+function openURL(aURL) {
   var uri = makeURI(aURL);
 
   var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
                               .getService(Components.interfaces.nsIExternalProtocolService);
 
   if (!protocolSvc.isExposedProtocol(uri.scheme)) {
     // If we're not a browser, use the external protocol service to load the URI.
     protocolSvc.loadUrl(uri);
-  }
-  else {
+  } else {
     var recentWindow = Services.wm.getMostRecentWindow("navigator:browser");
     if (recentWindow) {
       recentWindow.openUILinkIn(uri.spec, "tab");
       return;
     }
 
     var loadgroup = Components.classes["@mozilla.org/network/load-group;1"]
                               .createInstance(Components.interfaces.nsILoadGroup);
--- a/toolkit/content/customizeToolbar.js
+++ b/toolkit/content/customizeToolbar.js
@@ -7,32 +7,29 @@ var gToolbox = null;
 var gCurrentDragOverItem = null;
 var gToolboxChanged = false;
 var gToolboxSheet = false;
 var gPaletteBox = null;
 
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/AppConstants.jsm");
 
-function onLoad()
-{
+function onLoad() {
   if ("arguments" in window && window.arguments[0]) {
     InitWithToolbox(window.arguments[0]);
     repositionDialog(window);
-  }
-  else if (window.frameElement &&
+  } else if (window.frameElement &&
            "toolbox" in window.frameElement) {
     gToolboxSheet = true;
     InitWithToolbox(window.frameElement.toolbox);
     repositionDialog(window.frameElement.panel);
   }
 }
 
-function InitWithToolbox(aToolbox)
-{
+function InitWithToolbox(aToolbox) {
   gToolbox = aToolbox;
   dispatchCustomizationEvent("beforecustomization");
   gToolboxDocument = gToolbox.ownerDocument;
   gToolbox.customizing = true;
   forEachCustomizableToolbar(function(toolbar) {
     toolbar.setAttribute("customizing", "true");
   });
   gPaletteBox = document.getElementById("palette-box");
@@ -43,45 +40,41 @@ function InitWithToolbox(aToolbox)
     elts[i].addEventListener("dragover", onToolbarDragOver, true);
     elts[i].addEventListener("dragexit", onToolbarDragExit, true);
     elts[i].addEventListener("drop", onToolbarDrop, true);
   }
 
   initDialog();
 }
 
-function onClose()
-{
+function onClose() {
   if (!gToolboxSheet)
     window.close();
   else
     finishToolbarCustomization();
 }
 
-function onUnload()
-{
+function onUnload() {
   if (!gToolboxSheet)
     finishToolbarCustomization();
 }
 
-function finishToolbarCustomization()
-{
+function finishToolbarCustomization() {
   removeToolboxListeners();
   unwrapToolbarItems();
   persistCurrentSets();
   gToolbox.customizing = false;
   forEachCustomizableToolbar(function(toolbar) {
     toolbar.removeAttribute("customizing");
   });
 
   notifyParentComplete();
 }
 
-function initDialog()
-{
+function initDialog() {
   if (!gToolbox.toolbarset) {
     document.getElementById("newtoolbar").hidden = true;
   }
 
   var mode = gToolbox.getAttribute("mode");
   document.getElementById("modelist").value = mode;
   var smallIconsCheckbox = document.getElementById("smallicons");
   smallIconsCheckbox.checked = gToolbox.getAttribute("iconsize") == "small";
@@ -90,18 +83,17 @@ function initDialog()
 
   // Build up the palette of other items.
   buildPalette();
 
   // Wrap all the items on the toolbar in toolbarpaletteitems.
   wrapToolbarItems();
 }
 
-function repositionDialog(aWindow)
-{
+function repositionDialog(aWindow) {
   // Position the dialog touching the bottom of the toolbox and centered with
   // it.
   if (!aWindow)
     return;
 
   var width;
   if (aWindow != window)
     width = aWindow.getBoundingClientRect().width;
@@ -111,58 +103,54 @@ function repositionDialog(aWindow)
     width = parseInt(document.documentElement.style.width);
   var screenX = gToolbox.boxObject.screenX
                 + ((gToolbox.boxObject.width - width) / 2);
   var screenY = gToolbox.boxObject.screenY + gToolbox.boxObject.height;
 
   aWindow.moveTo(screenX, screenY);
 }
 
-function removeToolboxListeners()
-{
+function removeToolboxListeners() {
   var elts = getRootElements();
   for (let i = 0; i < elts.length; i++) {
     elts[i].removeEventListener("dragstart", onToolbarDragStart, true);
     elts[i].removeEventListener("dragover", onToolbarDragOver, true);
     elts[i].removeEventListener("dragexit", onToolbarDragExit, true);
     elts[i].removeEventListener("drop", onToolbarDrop, true);
   }
 }
 
 /**
  * Invoke a callback on the toolbox to notify it that the dialog is done
  * and going away.
  */
-function notifyParentComplete()
-{
+function notifyParentComplete() {
   if ("customizeDone" in gToolbox)
     gToolbox.customizeDone(gToolboxChanged);
   dispatchCustomizationEvent("aftercustomization");
 }
 
-function toolboxChanged(aType)
-{
+function toolboxChanged(aType) {
   gToolboxChanged = true;
   if ("customizeChange" in gToolbox)
     gToolbox.customizeChange(aType);
   dispatchCustomizationEvent("customizationchange");
 }
 
 function dispatchCustomizationEvent(aEventName) {
   var evt = document.createEvent("Events");
   evt.initEvent(aEventName, true, true);
   gToolbox.dispatchEvent(evt);
 }
 
 /**
  * Persist the current set of buttons in all customizable toolbars to
  * localstore.
  */
-function persistCurrentSets()
-{
+function persistCurrentSets() {
   if (!gToolboxChanged || gToolboxDocument.defaultView.closed)
     return;
 
   var customCount = 0;
   forEachCustomizableToolbar(function(toolbar) {
     // Calculate currentset and store it in the attribute.
     var currentSet = toolbar.currentSet;
     toolbar.setAttribute("currentset", currentSet);
@@ -191,73 +179,68 @@ function persistCurrentSets()
     gToolbox.toolbarset.removeAttribute("toolbar" + customCount);
     gToolboxDocument.persist(gToolbox.toolbarset.id, "toolbar" + customCount);
   }
 }
 
 /**
  * Wraps all items in all customizable toolbars in a toolbox.
  */
-function wrapToolbarItems()
-{
+function wrapToolbarItems() {
   forEachCustomizableToolbar(function(toolbar) {
     Array.forEach(toolbar.childNodes, function(item) {
       if (AppConstants.platform == "macosx") {
         if (item.firstChild && item.firstChild.localName == "menubar")
           return;
       }
       if (isToolbarItem(item)) {
         let wrapper = wrapToolbarItem(item);
         cleanupItemForToolbar(item, wrapper);
       }
     });
   });
 }
 
-function getRootElements()
-{
+function getRootElements() {
   return [gToolbox].concat(gToolbox.externalToolbars);
 }
 
 /**
  * Unwraps all items in all customizable toolbars in a toolbox.
  */
-function unwrapToolbarItems()
-{
+function unwrapToolbarItems() {
   let elts = getRootElements();
   for (let i = 0; i < elts.length; i++) {
     let paletteItems = elts[i].getElementsByTagName("toolbarpaletteitem");
     let paletteItem;
     while ((paletteItem = paletteItems.item(0)) != null) {
       let toolbarItem = paletteItem.firstChild;
       restoreItemForToolbar(toolbarItem, paletteItem);
       paletteItem.parentNode.replaceChild(toolbarItem, paletteItem);
     }
   }
 }
 
 /**
  * Creates a wrapper that can be used to contain a toolbaritem and prevent
  * it from receiving UI events.
  */
-function createWrapper(aId, aDocument)
-{
+function createWrapper(aId, aDocument) {
   var wrapper = aDocument.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
                                          "toolbarpaletteitem");
 
   wrapper.id = "wrapper-" + aId;
   return wrapper;
 }
 
 /**
  * Wraps an item that has been cloned from a template and adds
  * it to the end of the palette.
  */
-function wrapPaletteItem(aPaletteItem)
-{
+function wrapPaletteItem(aPaletteItem) {
   var wrapper = createWrapper(aPaletteItem.id, document);
 
   wrapper.appendChild(aPaletteItem);
 
   // XXX We need to call this AFTER the palette item has been appended
   // to the wrapper or else we crash dropping certain buttons on the
   // palette due to removal of the command and disabled attributes - JRH
   cleanUpItemForPalette(aPaletteItem, wrapper);
@@ -265,51 +248,48 @@ function wrapPaletteItem(aPaletteItem)
   gPaletteBox.appendChild(wrapper);
 }
 
 /**
  * Wraps an item that is currently on a toolbar and replaces the item
  * with the wrapper. This is not used when dropping items from the palette,
  * only when first starting the dialog and wrapping everything on the toolbars.
  */
-function wrapToolbarItem(aToolbarItem)
-{
+function wrapToolbarItem(aToolbarItem) {
   var wrapper = createWrapper(aToolbarItem.id, gToolboxDocument);
 
   wrapper.flex = aToolbarItem.flex;
 
   aToolbarItem.parentNode.replaceChild(wrapper, aToolbarItem);
 
   wrapper.appendChild(aToolbarItem);
 
   return wrapper;
 }
 
 /**
  * Get the list of ids for the current set of items on each toolbar.
  */
-function getCurrentItemIds()
-{
+function getCurrentItemIds() {
   var currentItems = {};
   forEachCustomizableToolbar(function(toolbar) {
     var child = toolbar.firstChild;
     while (child) {
       if (isToolbarItem(child))
         currentItems[child.id] = 1;
       child = child.nextSibling;
     }
   });
   return currentItems;
 }
 
 /**
  * Builds the palette of draggable items that are not yet in a toolbar.
  */
-function buildPalette()
-{
+function buildPalette() {
   // Empty the palette first.
   while (gPaletteBox.lastChild)
     gPaletteBox.removeChild(gPaletteBox.lastChild);
 
   // Add the toolbar separator item.
   var templateNode = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
                                               "toolbarseparator");
   templateNode.id = "separator";
@@ -342,18 +322,17 @@ function buildPalette()
   }
 }
 
 /**
  * Makes sure that an item that has been cloned from a template
  * is stripped of any attributes that may adversely affect its
  * appearance in the palette.
  */
-function cleanUpItemForPalette(aItem, aWrapper)
-{
+function cleanUpItemForPalette(aItem, aWrapper) {
   aWrapper.setAttribute("place", "palette");
   setWrapperType(aItem, aWrapper);
 
   if (aItem.hasAttribute("title"))
     aWrapper.setAttribute("title", aItem.getAttribute("title"));
   else if (aItem.hasAttribute("label"))
     aWrapper.setAttribute("title", aItem.getAttribute("label"));
   else if (isSpecialItem(aItem)) {
@@ -376,18 +355,17 @@ function cleanUpItemForPalette(aItem, aW
 }
 
 /**
  * Makes sure that an item that has been cloned from a template
  * is stripped of all properties that may adversely affect its
  * appearance in the toolbar.  Store critical properties on the
  * wrapper so they can be put back on the item when we're done.
  */
-function cleanupItemForToolbar(aItem, aWrapper)
-{
+function cleanupItemForToolbar(aItem, aWrapper) {
   setWrapperType(aItem, aWrapper);
   aWrapper.setAttribute("place", "toolbar");
 
   if (aItem.hasAttribute("command")) {
     aWrapper.setAttribute("itemcommand", aItem.getAttribute("command"));
     aItem.removeAttribute("command");
   }
 
@@ -400,18 +378,17 @@ function cleanupItemForToolbar(aItem, aW
     aWrapper.setAttribute("itemdisabled", "true");
     aItem.disabled = false;
   }
 }
 
 /**
  * Restore all the properties that we stripped off above.
  */
-function restoreItemForToolbar(aItem, aWrapper)
-{
+function restoreItemForToolbar(aItem, aWrapper) {
   if (aWrapper.hasAttribute("itemdisabled"))
     aItem.disabled = true;
 
   if (aWrapper.hasAttribute("itemchecked"))
     aItem.checked = true;
 
   if (aWrapper.hasAttribute("itemcommand")) {
     let commandID = aWrapper.getAttribute("itemcommand");
@@ -419,31 +396,29 @@ function restoreItemForToolbar(aItem, aW
 
     // XXX Bug 309953 - toolbarbuttons aren't in sync with their commands after customizing
     let command = gToolboxDocument.getElementById(commandID);
     if (command && command.hasAttribute("disabled"))
       aItem.setAttribute("disabled", command.getAttribute("disabled"));
   }
 }
 
-function setWrapperType(aItem, aWrapper)
-{
+function setWrapperType(aItem, aWrapper) {
   if (aItem.localName == "toolbarseparator") {
     aWrapper.setAttribute("type", "separator");
   } else if (aItem.localName == "toolbarspring") {
     aWrapper.setAttribute("type", "spring");
   } else if (aItem.localName == "toolbarspacer") {
     aWrapper.setAttribute("type", "spacer");
   } else if (aItem.localName == "toolbaritem" && aItem.firstChild) {
     aWrapper.setAttribute("type", aItem.firstChild.localName);
   }
 }
 
-function setDragActive(aItem, aValue)
-{
+function setDragActive(aItem, aValue) {
   var node = aItem;
   var direction = window.getComputedStyle(aItem, null).direction;
   var value = direction == "ltr" ? "left" : "right";
   if (aItem.localName == "toolbar") {
     node = aItem.lastChild;
     value = direction == "ltr" ? "right" : "left";
   }
 
@@ -453,18 +428,17 @@ function setDragActive(aItem, aValue)
   if (aValue) {
     if (!node.hasAttribute("dragover"))
       node.setAttribute("dragover", value);
   } else {
     node.removeAttribute("dragover");
   }
 }
 
-function addNewToolbar()
-{
+function addNewToolbar() {
   var promptService = Services.prompt;
   var stringBundle = document.getElementById("stringBundle");
   var message = stringBundle.getString("enterToolbarName");
   var title = stringBundle.getString("enterToolbarTitle");
 
   var name = {};
 
   // Quitting from the toolbar dialog while the new toolbar prompt is up
@@ -512,18 +486,17 @@ function addNewToolbar()
 
   doneButton.disabled = false;
 }
 
 /**
  * Restore the default set of buttons to fixed toolbars,
  * remove all custom toolbars, and rebuild the palette.
  */
-function restoreDefaultSet()
-{
+function restoreDefaultSet() {
   // Unwrap the items on the toolbar.
   unwrapToolbarItems();
 
   // Remove all of the customized toolbars.
   var child = gToolbox.lastChild;
   while (child) {
     if (child.hasAttribute("customindex")) {
       var thisChild = child;
@@ -591,69 +564,63 @@ function updateToolboxProperty(aProp, aV
   return aValue || toolboxDefault;
 }
 
 function forEachCustomizableToolbar(callback) {
   Array.filter(gToolbox.childNodes, isCustomizableToolbar).forEach(callback);
   Array.filter(gToolbox.externalToolbars, isCustomizableToolbar).forEach(callback);
 }
 
-function isCustomizableToolbar(aElt)
-{
+function isCustomizableToolbar(aElt) {
   return aElt.localName == "toolbar" &&
          aElt.getAttribute("customizable") == "true";
 }
 
-function isSpecialItem(aElt)
-{
+function isSpecialItem(aElt) {
   return aElt.localName == "toolbarseparator" ||
          aElt.localName == "toolbarspring" ||
          aElt.localName == "toolbarspacer";
 }
 
-function isToolbarItem(aElt)
-{
+function isToolbarItem(aElt) {
   return aElt.localName == "toolbarbutton" ||
          aElt.localName == "toolbaritem" ||
          aElt.localName == "toolbarseparator" ||
          aElt.localName == "toolbarspring" ||
          aElt.localName == "toolbarspacer";
 }
 
 // Drag and Drop observers
 
-function onToolbarDragExit(aEvent)
-{
+function onToolbarDragExit(aEvent) {
   if (isUnwantedDragEvent(aEvent)) {
     return;
   }
 
   if (gCurrentDragOverItem)
     setDragActive(gCurrentDragOverItem, false);
 }
 
-function onToolbarDragStart(aEvent)
-{
+function onToolbarDragStart(aEvent) {
   var item = aEvent.target;
   while (item && item.localName != "toolbarpaletteitem") {
     if (item.localName == "toolbar")
       return;
     item = item.parentNode;
   }
 
   item.setAttribute("dragactive", "true");
 
   var dt = aEvent.dataTransfer;
   var documentId = gToolboxDocument.documentElement.id;
   dt.setData("text/toolbarwrapper-id/" + documentId, item.firstChild.id);
   dt.effectAllowed = "move";
 }
 
-function onToolbarDragOver(aEvent)
-{
+function onToolbarDragOver(aEvent) {
   if (isUnwantedDragEvent(aEvent)) {
     return;
   }
 
   var documentId = gToolboxDocument.documentElement.id;
   if (!aEvent.dataTransfer.types.includes("text/toolbarwrapper-id/" + documentId.toLowerCase()))
     return;
 
@@ -698,18 +665,17 @@ function onToolbarDragOver(aEvent)
   }
 
   setDragActive(gCurrentDragOverItem, true);
 
   aEvent.preventDefault();
   aEvent.stopPropagation();
 }
 
-function onToolbarDrop(aEvent)
-{
+function onToolbarDrop(aEvent) {
   if (isUnwantedDragEvent(aEvent)) {
     return;
   }
 
   if (!gCurrentDragOverItem)
     return;
 
   setDragActive(gCurrentDragOverItem, false);
@@ -772,28 +738,26 @@ function onToolbarDrop(aEvent)
       gPaletteBox.removeChild(draggedPaletteWrapper);
   }
 
   gCurrentDragOverItem = null;
 
   toolboxChanged();
 }
 
-function onPaletteDragOver(aEvent)
-{
+function onPaletteDragOver(aEvent) {
   if (isUnwantedDragEvent(aEvent)) {
     return;
   }
   var documentId = gToolboxDocument.documentElement.id;
   if (aEvent.dataTransfer.types.includes("text/toolbarwrapper-id/" + documentId.toLowerCase()))
     aEvent.preventDefault();
 }
 
-function onPaletteDrop(aEvent)
-{
+function onPaletteDrop(aEvent) {
   if (isUnwantedDragEvent(aEvent)) {
     return;
   }
   var documentId = gToolboxDocument.documentElement.id;
   var itemId = aEvent.dataTransfer.getData("text/toolbarwrapper-id/" + documentId);
 
   var wrapper = gToolboxDocument.getElementById("wrapper-" + itemId);
   if (wrapper) {
--- a/toolkit/content/editMenuOverlay.js
+++ b/toolkit/content/editMenuOverlay.js
@@ -1,17 +1,16 @@
 // -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
 
 /* 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/. */
 
 // update menu items that rely on focus or on the current selection
-function goUpdateGlobalEditMenuItems()
-{
+function goUpdateGlobalEditMenuItems() {
   // Don't bother updating the edit commands if they aren't visible in any way
   // (i.e. the Edit menu isn't open, nor is the context menu open, nor have the
   // cut, copy, and paste buttons been added to the toolbars) for performance.
   // This only works in applications/on platforms that set the gEditUIVisible
   // flag, so we check to see if that flag is defined before using it.
   if (typeof gEditUIVisible != "undefined" && !gEditUIVisible)
     return;
 
@@ -21,19 +20,17 @@ function goUpdateGlobalEditMenuItems()
   goUpdateCommand("cmd_copy");
   goUpdateCommand("cmd_paste");
   goUpdateCommand("cmd_selectAll");
   goUpdateCommand("cmd_delete");
   goUpdateCommand("cmd_switchTextDirection");
 }
 
 // update menu items that relate to undo/redo
-function goUpdateUndoEditMenuItems()
-{
+function goUpdateUndoEditMenuItems() {
   goUpdateCommand("cmd_undo");
   goUpdateCommand("cmd_redo");
 }
 
 // update menu items that depend on clipboard contents
-function goUpdatePasteMenuItems()
-{
+function goUpdatePasteMenuItems() {
   goUpdateCommand("cmd_paste");
 }
--- a/toolkit/content/findUtils.js
+++ b/toolkit/content/findUtils.js
@@ -45,34 +45,30 @@ nsFindInstData.prototype =
   window,
   _root : null,
   _current : null
 }
 
 // browser is the <browser> element
 // rootSearchWindow is the window to constrain the search to (normally window.content)
 // currentSearchWindow is the frame to start searching (can be, and normally, rootSearchWindow)
-function findInPage(findInstData)
-{
+function findInPage(findInstData) {
   // is the dialog up already?
   if ("findDialog" in window && window.findDialog)
     window.findDialog.focus();
-  else
-  {
+  else {
     findInstData.init();
     window.findDialog = window.openDialog("chrome://global/content/finddialog.xul", "_blank", "chrome,resizable=no,dependent=yes", findInstData);
   }
 }
 
-function findAgainInPage(findInstData, reverse)
-{
+function findAgainInPage(findInstData, reverse) {
   if ("findDialog" in window && window.findDialog)
     window.findDialog.focus();
-  else
-  {
+  else {
     // get the find service, which stores global find state, and init the
     // nsIWebBrowser find with it. We don't assume that there was a previous
     // Find that set this up.
     var findService = Components.classes["@mozilla.org/find/find_service;1"]
                            .getService(Components.interfaces.nsIFindService);
 
     var searchString = findService.searchString;
     if (searchString.length == 0) {
@@ -97,15 +93,14 @@ function findAgainInPage(findInstData, r
       Services.prompt.alert(window, gFindBundle.getString("notFoundTitle"), gFindBundle.getString("notFoundWarning"));
     }
 
     // Reset to normal value, otherwise setting can get changed in find dialog
     findInst.findBackwards = findService.findBackwards;
   }
 }
 
-function canFindAgainInPage()
-{
+function canFindAgainInPage() {
     var findService = Components.classes["@mozilla.org/find/find_service;1"]
                            .getService(Components.interfaces.nsIFindService);
     return (findService.searchString.length > 0);
 }
 
--- a/toolkit/content/finddialog.js
+++ b/toolkit/content/finddialog.js
@@ -6,71 +6,66 @@
 
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/FormHistory.jsm");
 
 var dialog;     // Quick access to document/form elements.
 var gFindInst;   // nsIWebBrowserFind that we're going to use
 var gFindInstData; // use this to update the find inst data
 
-function initDialogObject()
-{
+function initDialogObject() {
   // Create dialog object and initialize.
   dialog = {};
   dialog.findKey         = document.getElementById("dialog.findKey");
   dialog.caseSensitive   = document.getElementById("dialog.caseSensitive");
   dialog.wrap            = document.getElementById("dialog.wrap");
   dialog.find            = document.getElementById("btnFind");
   dialog.up              = document.getElementById("radioUp");
   dialog.down            = document.getElementById("radioDown");
   dialog.rg              = dialog.up.radioGroup;
   dialog.bundle          = null;
 
   // Move dialog to center, if it not been shown before
   var windowElement = document.getElementById("findDialog");
-  if (!windowElement.hasAttribute("screenX") || !windowElement.hasAttribute("screenY"))
-  {
+  if (!windowElement.hasAttribute("screenX") || !windowElement.hasAttribute("screenY")) {
     sizeToContent();
     moveToAlertPosition();
   }
 }
 
-function fillDialog()
-{
+function fillDialog() {
   // get the find service, which stores global find state
   var findService = Components.classes["@mozilla.org/find/find_service;1"]
                               .getService(Components.interfaces.nsIFindService);
 
   // Set initial dialog field contents. Use the gFindInst attributes first,
   // this is necessary for window.find()
   dialog.findKey.value           = gFindInst.searchString ? gFindInst.searchString : findService.searchString;
   dialog.caseSensitive.checked   = gFindInst.matchCase ? gFindInst.matchCase : findService.matchCase;
   dialog.wrap.checked            = gFindInst.wrapFind ? gFindInst.wrapFind : findService.wrapFind;
   var findBackwards              = gFindInst.findBackwards ? gFindInst.findBackwards : findService.findBackwards;
   if (findBackwards)
     dialog.rg.selectedItem = dialog.up;
   else
     dialog.rg.selectedItem = dialog.down;
 }
 
-function saveFindData()
-{
+function saveFindData() {
   // get the find service, which stores global find state
   var findService = Components.classes["@mozilla.org/find/find_service;1"]
                          .getService(Components.interfaces.nsIFindService);
 
   // Set data attributes per user input.
   findService.searchString  = dialog.findKey.value;
   findService.matchCase     = dialog.caseSensitive.checked;
   findService.wrapFind      = dialog.wrap.checked;
   findService.findBackwards = dialog.up.selected;
 }
 
-function onLoad()
-{
+function onLoad() {
   initDialogObject();
 
   // get the find instance
   var arg0 = window.arguments[0];
   // If the dialog was opened from window.find(),
   // arg0 will be an instance of nsIWebBrowserFind
   if (arg0 instanceof Components.interfaces.nsIWebBrowserFind) {
     gFindInst = arg0;
@@ -82,23 +77,21 @@ function onLoad()
   fillDialog();
   doEnabling();
 
   if (dialog.findKey.value)
     dialog.findKey.select();
   dialog.findKey.focus();
 }
 
-function onUnload()
-{
+function onUnload() {
   window.opener.findDialog = 0;
 }
 
-function onAccept()
-{
+function onAccept() {
   if (gFindInstData && gFindInst != gFindInstData.webBrowserFind) {
     gFindInstData.init();
     gFindInst = gFindInstData.webBrowserFind;
   }
 
   // Transfer dialog contents to the find service.
   saveFindData();
   updateFormHistory();
@@ -107,35 +100,32 @@ function onAccept()
   gFindInst.searchString  = dialog.findKey.value;
   gFindInst.matchCase     = dialog.caseSensitive.checked;
   gFindInst.wrapFind      = dialog.wrap.checked;
   gFindInst.findBackwards = dialog.up.selected;
 
   // Search.
   var result = gFindInst.findNext();
 
-  if (!result)
-  {
+  if (!result) {
     if (!dialog.bundle)
       dialog.bundle = document.getElementById("findBundle");
     Services.prompt.alert(window, dialog.bundle.getString("notFoundTitle"),
                                   dialog.bundle.getString("notFoundWarning"));
     dialog.findKey.select();
     dialog.findKey.focus();
   }
   return false;
 }
 
-function doEnabling()
-{
+function doEnabling() {
   dialog.find.disabled = !dialog.findKey.value;
 }
 
-function updateFormHistory()
-{
+function updateFormHistory() {
   if (window.opener.PrivateBrowsingUtils &&
       window.opener.PrivateBrowsingUtils.isWindowPrivate(window.opener) ||
       !dialog.findKey.value)
     return;
 
   if (FormHistory.enabled) {
     FormHistory.update({
       op: "bump",
--- a/toolkit/content/globalOverlay.js
+++ b/toolkit/content/globalOverlay.js
@@ -1,14 +1,13 @@
 /* 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/. */
 
-function closeWindow(aClose, aPromptFunction)
-{
+function closeWindow(aClose, aPromptFunction) {
   let { AppConstants } = Components.utils.import("resource://gre/modules/AppConstants.jsm");
 
   // Closing the last window doesn't quit the application on OS X.
   if (AppConstants.platform != "macosx") {
     var windowCount = 0;
     var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                        .getService(Components.interfaces.nsIWindowMediator);
     var e = wm.getEnumerator(null);
@@ -34,132 +33,120 @@ function closeWindow(aClose, aPromptFunc
   if (aClose) {
     window.close();
     return window.closed;
   }
 
   return true;
 }
 
-function canQuitApplication(aData)
-{
+function canQuitApplication(aData) {
   var os = Components.classes["@mozilla.org/observer-service;1"]
                      .getService(Components.interfaces.nsIObserverService);
   if (!os) return true;
 
   try {
     var cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"]
                               .createInstance(Components.interfaces.nsISupportsPRBool);
     os.notifyObservers(cancelQuit, "quit-application-requested", aData || null);
 
     // Something aborted the quit process.
     if (cancelQuit.data)
       return false;
-  }
-  catch (ex) { }
+  } catch (ex) { }
   return true;
 }
 
-function goQuitApplication()
-{
+function goQuitApplication() {
   if (!canQuitApplication())
     return false;
 
   var appStartup = Components.classes['@mozilla.org/toolkit/app-startup;1'].
                      getService(Components.interfaces.nsIAppStartup);
 
   appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit);
   return true;
 }
 
 //
 // Command Updater functions
 //
-function goUpdateCommand(aCommand)
-{
+function goUpdateCommand(aCommand) {
   try {
     var controller = top.document.commandDispatcher
                         .getControllerForCommand(aCommand);
 
     var enabled = false;
     if (controller)
       enabled = controller.isCommandEnabled(aCommand);
 
     goSetCommandEnabled(aCommand, enabled);
-  }
-  catch (e) {
+  } catch (e) {
     Components.utils.reportError("An error occurred updating the " +
                                  aCommand + " command: " + e);
   }
 }
 
-function goDoCommand(aCommand)
-{
+function goDoCommand(aCommand) {
   try {
     var controller = top.document.commandDispatcher
                         .getControllerForCommand(aCommand);
     if (controller && controller.isCommandEnabled(aCommand))
       controller.doCommand(aCommand);
-  }
-  catch (e) {
+  } catch (e) {
     Components.utils.reportError("An error occurred executing the " +
                                  aCommand + " command: " + e);
   }
 }
 
 
-function goSetCommandEnabled(aID, aEnabled)
-{
+function goSetCommandEnabled(aID, aEnabled) {
   var node = document.getElementById(aID);
 
   if (node) {
     if (aEnabled)
       node.removeAttribute("disabled");
     else
       node.setAttribute("disabled", "true");
   }
 }
 
-function goSetMenuValue(aCommand, aLabelAttribute)
-{
+function goSetMenuValue(aCommand, aLabelAttribute) {
   var commandNode = top.document.getElementById(aCommand);
   if (commandNode) {
     var label = commandNode.getAttribute(aLabelAttribute);
     if (label)
       commandNode.setAttribute("label", label);
   }
 }
 
-function goSetAccessKey(aCommand, aValueAttribute)
-{
+function goSetAccessKey(aCommand, aValueAttribute) {
   var commandNode = top.document.getElementById(aCommand);
   if (commandNode) {
     var value = commandNode.getAttribute(aValueAttribute);
     if (value)
       commandNode.setAttribute("accesskey", value);
   }
 }
 
 // this function is used to inform all the controllers attached to a node that an event has occurred
 // (e.g. the tree controllers need to be informed of blur events so that they can change some of the
 // menu items back to their default values)
-function goOnEvent(aNode, aEvent)
-{
+function goOnEvent(aNode, aEvent) {
   var numControllers = aNode.controllers.getControllerCount();
   var controller;
 
   for (var controllerIndex = 0; controllerIndex < numControllers; controllerIndex++) {
     controller = aNode.controllers.getControllerAt(controllerIndex);
     if (controller)
       controller.onEvent(aEvent);
   }
 }
 
-function setTooltipText(aID, aTooltipText)
-{
+function setTooltipText(aID, aTooltipText) {
   var element = document.getElementById(aID);
   if (element)
     element.setAttribute("tooltiptext", aTooltipText);
 }
 
 this.__defineGetter__("NS_ASSERT", function() {
   delete this.NS_ASSERT;
   var tmpScope = {};
--- a/toolkit/content/macWindowMenu.js
+++ b/toolkit/content/macWindowMenu.js
@@ -1,51 +1,47 @@
 // -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
 
 /* 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/. */
 
-function macWindowMenuDidShow()
-{
+function macWindowMenuDidShow() {
   var windowManagerDS =
     Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator']
               .getService(Components.interfaces.nsIWindowDataSource);
   var sep = document.getElementById("sep-window-list");
   // Using double parens to avoid warning
   while ((sep = sep.nextSibling)) {
     var url = sep.getAttribute('id');
     var win = windowManagerDS.getWindowForResource(url);
     if (win.document.documentElement.getAttribute("inwindowmenu") == "false")
       sep.hidden = true;
     else if (win == window)
       sep.setAttribute("checked", "true");
   }
 }
 
-function toOpenWindow( aWindow )
-{
+function toOpenWindow( aWindow ) {
   // deminiaturize the window, if it's in the Dock
   if (aWindow.windowState == STATE_MINIMIZED)
     aWindow.restore();
   aWindow.document.commandDispatcher.focusedWindow.focus();
 }
 
-function ShowWindowFromResource( node )
-{
+function ShowWindowFromResource( node ) {
   var windowManagerDS =
     Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator']
               .getService(Components.interfaces.nsIWindowDataSource);
 
   var desiredWindow = null;
   var url = node.getAttribute('id');
   desiredWindow = windowManagerDS.getWindowForResource( url );
   if (desiredWindow)
     toOpenWindow(desiredWindow);
 }
 
-function zoomWindow()
-{
+function zoomWindow() {
   if (window.windowState == STATE_NORMAL)
     window.maximize();
   else
     window.restore();
 }
--- a/toolkit/content/tests/browser/browser_autoscroll_disabled.js
+++ b/toolkit/content/tests/browser/browser_autoscroll_disabled.js
@@ -1,10 +1,9 @@
-add_task(function* ()
-{
+add_task(function* () {
   const kPrefName_AutoScroll = "general.autoScroll";
   Services.prefs.setBoolPref(kPrefName_AutoScroll, false);
 
   let dataUri = 'data:text/html,<html><body id="i" style="overflow-y: scroll"><div style="height: 2000px"></div>\
       <iframe id="iframe" style="display: none;"></iframe>\
 </body></html>';
 
   let loadedPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
--- a/toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js
+++ b/toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js
@@ -1,11 +1,10 @@
 requestLongerTimeout(2);
-add_task(function* ()
-{
+add_task(function* () {
   function pushPref(name, value) {
     return SpecialPowers.pushPrefEnv({"set": [[name, value]]});
   }
 
   yield pushPref("general.autoScroll", true);
 
   const expectScrollNone = 0;
   const expectScrollVert = 1;
--- a/toolkit/content/tests/browser/browser_f7_caret_browsing.js
+++ b/toolkit/content/tests/browser/browser_f7_caret_browsing.js
@@ -67,28 +67,26 @@ function syncToggleCaretNoDialog(expecte
   if (!openedDialog) {
     Services.ww.unregisterNotification(gCaretPromptOpeningObserver);
     gCaretPromptOpeningObserver = null;
   }
   let prefVal = Services.prefs.getBoolPref(kPrefCaretBrowsingOn);
   is(prefVal, expected, "Caret browsing should now be " + expectedStr);
 }
 
-function waitForFocusOnInput(browser)
-{
+function waitForFocusOnInput(browser) {
   return ContentTask.spawn(browser, null, function* () {
     let textEl = content.document.getElementById("in");
     return ContentTaskUtils.waitForCondition(() => {
       return content.document.activeElement == textEl;
     }, "Input should get focused.");
   });
 }
 
-function focusInput(browser)
-{
+function focusInput(browser) {
   return ContentTask.spawn(browser, null, function* () {
     let textEl = content.document.getElementById("in");
     textEl.focus();
   });
 }
 
 add_task(function* checkTogglingCaretBrowsing() {
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, kURL);
--- a/toolkit/content/tests/browser/browser_keyevents_during_autoscrolling.js
+++ b/toolkit/content/tests/browser/browser_keyevents_during_autoscrolling.js
@@ -1,49 +1,45 @@
-add_task(function * ()
-{
+add_task(function * () {
   const kPrefName_AutoScroll = "general.autoScroll";
   Services.prefs.setBoolPref(kPrefName_AutoScroll, true);
 
   const kNoKeyEvents   = 0;
   const kKeyDownEvent  = 1;
   const kKeyPressEvent = 2;
   const kKeyUpEvent    = 4;
   const kAllKeyEvents  = 7;
 
   var expectedKeyEvents;
   var dispatchedKeyEvents;
   var key;
 
   /**
    * Encapsulates EventUtils.sendChar().
    */
-  function sendChar(aChar)
-  {
+  function sendChar(aChar) {
     key = aChar;
     dispatchedKeyEvents = kNoKeyEvents;
     EventUtils.sendChar(key);
     is(dispatchedKeyEvents, expectedKeyEvents,
        "unexpected key events were dispatched or not dispatched: " + key);
   }
 
   /**
    * Encapsulates EventUtils.sendKey().
    */
-  function sendKey(aKey)
-  {
+  function sendKey(aKey) {
     key = aKey;
     dispatchedKeyEvents = kNoKeyEvents;
     EventUtils.sendKey(key);
     is(dispatchedKeyEvents, expectedKeyEvents,
        "unexpected key events were dispatched or not dispatched: " + key);
   }
 
-  function onKey(aEvent)
-  {
+  function onKey(aEvent) {
 //    if (aEvent.target != root && aEvent.target != root.ownerDocument.body) {
 //      ok(false, "unknown target: " + aEvent.target.tagName);
 //      return;
 //    }
 
     var keyFlag;
     switch (aEvent.type) {
       case "keydown":
--- a/toolkit/content/tests/browser/browser_save_resend_postdata.js
+++ b/toolkit/content/tests/browser/browser_save_resend_postdata.js
@@ -125,21 +125,19 @@ function readShortFile(aFile) {
   inputStream.init(aFile, -1, 0, 0);
   try {
     var scrInputStream = Cc["@mozilla.org/scriptableinputstream;1"]
                            .createInstance(Ci.nsIScriptableInputStream);
     scrInputStream.init(inputStream);
     try {
       // Assume that the file is much shorter than 1 MiB.
       return scrInputStream.read(1048576);
-    }
-    finally {
+    } finally {
       // Close the scriptable stream after reading, even if the operation
       // failed.
       scrInputStream.close();
     }
-  }
-  finally {
+  } finally {
     // Close the stream after reading, if it is still open, even if the read
     // operation failed.
     inputStream.close();
   }
 }
--- a/toolkit/content/tests/browser/common/mockTransfer.js
+++ b/toolkit/content/tests/browser/common/mockTransfer.js
@@ -59,9 +59,9 @@ MockTransfer.prototype = {
 
 // Create an instance of a MockObjectRegisterer whose methods can be used to
 // temporarily replace the default "@mozilla.org/transfer;1" object factory with
 // one that provides the mock implementation above. To activate the mock object
 // factory, call the "register" method. Starting from that moment, all the
 // transfer objects that are requested will be mock objects, until the
 // "unregister" method is called.
 var mockTransferRegisterer =
-  new MockObjectRegisterer("@mozilla.org/transfer;1",  MockTransfer);
+  new MockObjectRegisterer("@mozilla.org/transfer;1", MockTransfer);
--- a/toolkit/content/tests/chrome/RegisterUnregisterChrome.js
+++ b/toolkit/content/tests/chrome/RegisterUnregisterChrome.js
@@ -11,29 +11,27 @@ var gDirSvc    = Cc["@mozilla.org/file/d
   getService(Ci.nsIDirectoryService).QueryInterface(Ci.nsIProperties);
 var gChromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"].
                     getService(Ci.nsIXULChromeRegistry);
 var gPrefs     = Cc["@mozilla.org/preferences-service;1"].
                     getService(Ci.nsIPrefBranch);
 
 // Create the temporary file in the profile, instead of in TmpD, because
 // we know the mochitest harness kills off the profile when it's done.
-function copyToTemporaryFile(f)
-{
+function copyToTemporaryFile(f) {
   let tmpd = gDirSvc.get("ProfD", Ci.nsIFile);
   tmpf = tmpd.clone();
   tmpf.append("temp.manifest");
   tmpf.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0o600);
   tmpf.remove(false);
   f.copyTo(tmpd, tmpf.leafName);
   return tmpf;
 }
 
-function* dirIter(directory)
-{
+function* dirIter(directory) {
   var ioSvc = Cc["@mozilla.org/network/io-service;1"].
               getService(Ci.nsIIOService);
   var testsDir = ioSvc.newURI(directory, null, null)
                   .QueryInterface(Ci.nsIFileURL).file;
 
   let en = testsDir.directoryEntries;
   while (en.hasMoreElements()) {
     let file = en.getNext();
@@ -72,43 +70,40 @@ function copyDirToTempProfile(path, subd
   var files = Array.from(dirIter('file://' + rootDir));
   for (f in files) {
     files[f].copyTo(tmpdir, "");
   }
   return tmpdir;
 
 }
 
-function convertChromeURI(chromeURI)
-{
+function convertChromeURI(chromeURI) {
   let uri = Cc["@mozilla.org/network/io-service;1"].
     getService(Ci.nsIIOService).newURI(chromeURI, null, null);
   return gChromeReg.convertChromeURL(uri);
 }
 
-function chromeURIToFile(chromeURI)
-{
+function chromeURIToFile(chromeURI) {
   var jar = getJar(chromeURI);
   if (jar) {
     var tmpDir = extractJarToTmp(jar);
     let parts = chromeURI.split('/');
     if (parts[parts.length - 1] != '') {
       tmpDir.append(parts[parts.length - 1]);
     }
     return tmpDir;
   }
 
   return convertChromeURI(chromeURI).
     QueryInterface(Ci.nsIFileURL).file;
 }
 
 // Register a chrome manifest temporarily and return a function which un-does
 // the registrarion when no longer needed.
-function createManifestTemporarily(tempDir, manifestText)
-{
+function createManifestTemporarily(tempDir, manifestText) {
   gPrefs.setBoolPref(XUL_CACHE_PREF, true);
 
   tempDir.append("temp.manifest");
 
   let foStream = Cc["@mozilla.org/network/file-output-stream;1"]
                    .createInstance(Ci.nsIFileOutputStream);
   foStream.init(tempDir,
                 0x02 | 0x08 | 0x20, 0o664, 0); // write, create, truncate
@@ -126,18 +121,17 @@ function createManifestTemporarily(tempD
     gChromeReg.checkForNewChrome();
     gChromeReg.refreshSkins();
     gPrefs.clearUserPref(XUL_CACHE_PREF);
   }
 }
 
 // Register a chrome manifest temporarily and return a function which un-does
 // the registrarion when no longer needed.
-function registerManifestTemporarily(manifestURI)
-{
+function registerManifestTemporarily(manifestURI) {
   gPrefs.setBoolPref(XUL_CACHE_PREF, true);
 
   let file = chromeURIToFile(manifestURI);
 
   let tempfile = copyToTemporaryFile(file);
   Components.manager.QueryInterface(Ci.nsIComponentRegistrar).
     autoRegister(tempfile);
 
@@ -146,16 +140,15 @@ function registerManifestTemporarily(man
   return function() {
     tempfile.fileSize = 0; // truncate the manifest
     gChromeReg.checkForNewChrome();
     gChromeReg.refreshSkins();
     gPrefs.clearUserPref(XUL_CACHE_PREF);
   }
 }
 
-function registerManifestPermanently(manifestURI)
-{
+function registerManifestPermanently(manifestURI) {
   var chromepath = chromeURIToFile(manifestURI);
 
   Components.manager.QueryInterface(Ci.nsIComponentRegistrar).
     autoRegister(chromepath);
   return chromepath;
 }
--- a/toolkit/content/tests/chrome/file_autocomplete_with_composition.js
+++ b/toolkit/content/tests/chrome/file_autocomplete_with_composition.js
@@ -13,18 +13,17 @@ function waitForCondition(condition, nex
 }
 
 function nsDoTestsForAutoCompleteWithComposition(aDescription,
                                                  aWindow,
                                                  aTarget,
                                                  aAutoCompleteController,
                                                  aIsFunc,
                                                  aGetTargetValueFunc,
-                                                 aOnFinishFunc)
-{
+                                                 aOnFinishFunc) {
   this._description = aDescription;
   this._window = aWindow;
   this._target = aTarget;
   this._controller = aAutoCompleteController;
 
   this._is = aIsFunc;
   this._getTargetValue = aGetTargetValueFunc;
   this._onFinish = aOnFinishFunc;
@@ -43,18 +42,17 @@ nsDoTestsForAutoCompleteWithComposition.
   _controller: null,
   _DefaultCompleteDefaultIndex: false,
   _description: "",
 
   _is: null,
   _getTargetValue() { return "not initialized"; },
   _onFinish: null,
 
-  _doTests()
-  {
+  _doTests() {
     if (++this._testingIndex == this._tests.length) {
       this._controller.input.completeDefaultIndex =
         this._DefaultCompleteDefaultIndex;
       this._onFinish();
       return;
     }
 
     var test = this._tests[this._testingIndex];
@@ -65,18 +63,17 @@ nsDoTestsForAutoCompleteWithComposition.
 
     waitForCondition(() => {
       return this._controller.searchStatus >=
              Components.interfaces.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH;
     },
     this._checkResult.bind(this));
   },
 
-  _checkResult()
-  {
+  _checkResult() {
     var test = this._tests[this._testingIndex];
     this._is(this._getTargetValue(), test.value,
              this._description + ", " + test.description + ": value");
     this._is(this._controller.searchString, test.searchString,
              this._description + ", " + test.description + ": searchString");
     this._is(this._controller.input.popupOpen, test.popup,
              this._description + ", " + test.description + ": popupOpen");
     this._doTests();
--- a/toolkit/content/tests/chrome/popup_trigger.js
+++ b/toolkit/content/tests/chrome/popup_trigger.js
@@ -1,32 +1,30 @@
 var gMenuPopup = null;
 var gTrigger = null;
 var gIsMenu = false;
 var gScreenX = -1, gScreenY = -1;
 var gCachedEvent = null;
 var gCachedEvent2 = null;
 
-function cacheEvent(modifiers)
-{
+function cacheEvent(modifiers) {
   var cachedEvent = null;
 
   var mouseFn = function(event) {
     cachedEvent = event;
   }
 
   window.addEventListener("mousedown", mouseFn, false);
   synthesizeMouse(document.documentElement, 0, 0, modifiers);
   window.removeEventListener("mousedown", mouseFn, false);
 
   return cachedEvent;
 }
 
-function runTests()
-{
+function runTests() {
   if (screen.height < 768) {
     ok(false, "popup tests are likely to fail for screen heights less than 768 pixels");
   }
 
   gMenuPopup = document.getElementById("thepopup");
   gTrigger = document.getElementById("trigger");
 
   gIsMenu = gTrigger.boxObject instanceof MenuBoxObject;
@@ -852,12 +850,11 @@ var popupTests = [
     submenupopup.parentNode.removeChild(submenupopup);
     var popup = document.getElementById("thepopup");
     popup.parentNode.removeChild(popup);
   }
 }
 
 ];
 
-function platformIsMac()
-{
+function platformIsMac() {
     return navigator.platform.indexOf("Mac") > -1;
 }
--- a/toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html
+++ b/toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html
@@ -17,18 +17,17 @@
   </form>
 </div>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 
-function runTests()
-{
+function runTests() {
   var formFillController =
     SpecialPowers.getFormFillController()
                  .QueryInterface(Components.interfaces.nsIAutoCompleteInput);
   var originalFormFillTimeout = formFillController.timeout;
 
   SpecialPowers.attachFormFillControllerTo(window);
   var target = document.getElementById("input");
 
--- a/toolkit/content/tests/chrome/xul_selectcontrol.js
+++ b/toolkit/content/tests/chrome/xul_selectcontrol.js
@@ -19,32 +19,30 @@ var behaviours = {
   menu: "win:activate-disabled-menuitem activate-disabled-menuitem-mousemove select-keynav-wraps select-extended-keynav",
   menulist: "allow-other-value other-value-clears-selection",
   listbox: "select-extended-keynav",
   richlistbox: "select-extended-keynav",
   radiogroup: "select-keynav-wraps dont-select-disabled allow-other-value",
   tabs: "select-extended-keynav mac:select-keynav-wraps allow-other-value selection-required keynav-leftright"
 };
 
-function behaviourContains(tag, behaviour)
-{
+function behaviourContains(tag, behaviour) {
   var platform = "none:";
   if (navigator.platform.indexOf("Mac") >= 0)
     platform = "mac:";
   else if (navigator.platform.indexOf("Win") >= 0)
     platform = "win:";
   else if (navigator.platform.indexOf("X") >= 0)
     platform = "gtk:";
 
   var re = new RegExp("\\s" + platform + behaviour + "\\s|\\s" + behaviour + "\\s");
   return re.test(" " + behaviours[tag] + " ");
 }
 
-function test_nsIDOMXULSelectControlElement(element, childtag, testprefix)
-{
+function test_nsIDOMXULSelectControlElement(element, childtag, testprefix) {
   var testid = (testprefix) ? testprefix + " " : "";
   testid += element.localName + " nsIDOMXULSelectControlElement ";
 
   // editable menulists use the label as the value instead
   var firstvalue = "first", secondvalue = "second", fourthvalue = "fourth";
   if (element.localName == "menulist" && element.editable) {
     firstvalue = "First Item";
     secondvalue = "Second Item"
@@ -195,18 +193,17 @@ function test_nsIDOMXULSelectControlElem
   // 'removeall' - check if all items are removed
   while (element.itemCount)
     element.removeItemAt(0);
   if (isnotradio)
     test_nsIDOMXULSelectControlElement_States(element, testid + "remove all", 0, null, -1,
                                               allowOtherValue ? "number8" : "");
 }
 
-function test_nsIDOMXULSelectControlElement_init(element, testprefix)
-{
+function test_nsIDOMXULSelectControlElement_init(element, testprefix) {
   // editable menulists use the label as the value
   var isEditable = (element.localName == "menulist" && element.editable);
 
   var id = element.id;
   element = document.getElementById(id + "-initwithvalue");
   if (element) {
     var seconditem = element.getItemAtIndex(1);
     test_nsIDOMXULSelectControlElement_States(element, testprefix + " value initialization",
@@ -220,32 +217,30 @@ function test_nsIDOMXULSelectControlElem
     test_nsIDOMXULSelectControlElement_States(element, testprefix + " selected initialization",
                                               3, thirditem, 2,
                                               isEditable ? thirditem.label : thirditem.value);
   }
 }
 
 function test_nsIDOMXULSelectControlElement_States(element, testid,
                                                    expectedcount, expecteditem,
-                                                   expectedindex, expectedvalue)
-{
+                                                   expectedindex, expectedvalue) {
   // need an itemCount property here
   var count = element.itemCount;
   is(count, expectedcount, testid + " item count");
   is(element.selectedItem, expecteditem, testid + " selectedItem");
   is(element.selectedIndex, expectedindex, testid + " selectedIndex");
   is(element.value, expectedvalue, testid + " value");
   if (element.selectedItem) {
     is(element.selectedItem.selected, true,
                   testid + " selectedItem marked as selected");
   }
 }
 
-function test_nsIDOMXULSelectControlElement_insertItemAt(element, index, expectedindex, testid, number)
-{
+function test_nsIDOMXULSelectControlElement_insertItemAt(element, index, expectedindex, testid, number) {
   var expectedCount = element.itemCount;
   var expectedSelItem = element.selectedItem;
   var expectedSelIndex = element.selectedIndex;
   var expectedSelValue = element.value;
 
   var newitem = element.insertItemAt(index, "Item " + number, "number" + number);
   is(element.getIndexOfItem(newitem), expectedindex,
                 testid + "insertItemAt " + expectedindex + " - get inserted item");
@@ -261,18 +256,17 @@ function test_nsIDOMXULSelectControlElem
 
 /** test_nsIDOMXULSelectControlElement_UI
   *
   * Test the UI aspects of an element which implements nsIDOMXULSelectControlElement
   *
   * Parameters:
   *   element - element to test
   */
-function test_nsIDOMXULSelectControlElement_UI(element, testprefix)
-{
+function test_nsIDOMXULSelectControlElement_UI(element, testprefix) {
   var testid = (testprefix) ? testprefix + " " : "";
   testid += element.localName + " nsIDOMXULSelectControlElement UI ";
 
   while (element.itemCount)
     element.removeItemAt(0);
 
   var firstitem = element.appendItem("First Item", "first");
   var seconditem = element.appendItem("Second Item", "second");
@@ -368,18 +362,17 @@ function test_nsIDOMXULSelectControlElem
     firstitem.disabled = true;
 
     synthesizeKeyExpectEvent(backKey, {}, keyWrap ? element : null, "select", testid + "key up disabled 2");
     expectedItem = keyWrap ? fourthitem : thirditem;
     expectedIndex = keyWrap ? 3 : 2;
     expectedValue = keyWrap ? "fourth" : "third";
     test_nsIDOMXULSelectControlElement_States(element, testid + "key up disabled 2", 4,
       expectedItem, expectedIndex, expectedValue);
-  }
-  else {
+  } else {
     // in this case, disabled items should behave the same as non-disabled items.
     element.selectedIndex = 0;
     synthesizeKeyExpectEvent(forwardKey, {}, element, "select", testid + "key down disabled");
     test_nsIDOMXULSelectControlElement_States(element, testid + "key down disabled", 4, seconditem, 1, "second");
     synthesizeKeyExpectEvent(forwardKey, {}, element, "select", testid + "key down disabled again");
     test_nsIDOMXULSelectControlElement_States(element, testid + "key down disabled again", 4, thirditem, 2, "third");
 
     synthesizeKeyExpectEvent(backKey, {}, element, "select", testid + "key up disabled");
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/BrowserView.js
+++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/BrowserView.js
@@ -177,17 +177,17 @@ function() {
 
   // function clampViewportWH(width, height, visibleRect) {
   //   let minW = visibleRect.width;
   //   let minH = visibleRect.height;
   //   return [Math.max(width, minW), Math.max(height, minH)];
   // }
 
   function resizeContainerToViewport(container, viewportRect) {
-    container.style.width  = viewportRect.width  + 'px';
+    container.style.width  = viewportRect.width + 'px';
     container.style.height = viewportRect.height + 'px';
   }
 
   // !!! --- RESIZE HACK BEGIN -----
   function simulateMozAfterSizeChange(browser, width, height) {
     let ev = document.createElement("MouseEvents");
     ev.initEvent("FakeMozAfterSizeChange", false, false, window, 0, width, height);
     browser.dispatchEvent(ev);
@@ -669,16 +669,16 @@ BrowserView.BrowserViewportState.prototy
     return new BrowserView.BrowserViewportState(this.viewportRect,
                                                 this.visibleX,
                                                 this.visibleY,
 						                                    this.zoomLevel);
   },
 
   toString: function toString() {
     let props = ['\tviewportRect=' + this.viewportRect.toString(),
-                 '\tvisibleX='     + this.visibleX,
-                 '\tvisibleY='     + this.visibleY,
-                 '\tzoomLevel='    + this.zoomLevel];
+                 '\tvisibleX=' + this.visibleX,
+                 '\tvisibleY=' + this.visibleY,
+                 '\tzoomLevel=' + this.zoomLevel];
 
     return '[BrowserViewportState] {\n' + props.join(',\n') + '\n}';
   }
 
 };
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/FooScript.js
+++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/FooScript.js
@@ -67,17 +67,17 @@ BrowserView.prototype = {
     this._leftbar = leftbar;
     this._rightbar = rightbar;
     this._topbar = topbar;
 
     scrollbox.scrollTo(Math.round(leftbar.getBoundingClientRect().right), 0);
 
     let tileContainer = document.getElementById("tile_container");
     tileContainer.addEventListener("mousedown", onMouseDown, true);
-    tileContainer.addEventListener("mouseup",   onMouseUp,   true);
+    tileContainer.addEventListener("mouseup", onMouseUp, true);
     tileContainer.addEventListener("mousemove", onMouseMove, true);
     this._tileContainer = tileContainer;
 
     let tileManager = new TileManager(this.appendTile, this.removeTile, window.innerWidth);
     this._tileManager = tileManager;
 
     let browser = document.getElementById("googlenews");
     this.setCurrentBrowser(browser, false);    // sets this._browser
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js
+++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js
@@ -177,20 +177,20 @@ TileManager.prototype = {
       // this._tileCache.forEachIntersectingRect(destCriticalRect, false, appendNonDirtyTile, this);
       let visited = {};
       if (create) {
 	evictGuard = function evictGuard(tile) {
 	  return !visited[tile.toString()];
 	};
       }
 
-      let starti = rect.left  >> kTileExponentWidth;
+      let starti = rect.left >> kTileExponentWidth;
       let endi   = rect.right >> kTileExponentWidth;
 
-      let startj = rect.top    >> kTileExponentHeight;
+      let startj = rect.top >> kTileExponentHeight;
       let endj   = rect.bottom >> kTileExponentHeight;
 
       let tile = null;
       let tc = this._tileCache;
 
       for (var j = startj; j <= endj; ++j) {
 	for (var i = starti; i <= endi; ++i) {
 
@@ -528,18 +528,17 @@ TileManager.TileCache.prototype = {
 
   _evictTile: function _evictTile(evictionGuard) {
     let k = this._nTiles - 1;
     let pool = this._tilePool;
     let victim = null;
 
     for (; k >= 0; --k) {
       if (pool[k].free &&
-          (!evictionGuard || evictionGuard(pool[k])))
-      {
+          (!evictionGuard || evictionGuard(pool[k]))) {
         victim = pool[k];
         break;
       }
     }
 
     return victim;
   },
 
@@ -673,20 +672,20 @@ TileManager.TileCache.prototype = {
     let visited = {};
     let evictGuard = null;
     if (create) {
       evictGuard = function evictGuard(tile) {
         return !visited[tile.toString()];
       };
     }
 
-    let starti = rect.left  >> kTileExponentWidth;
+    let starti = rect.left >> kTileExponentWidth;
     let endi   = rect.right >> kTileExponentWidth;
 
-    let startj = rect.top    >> kTileExponentHeight;
+    let startj = rect.top >> kTileExponentHeight;
     let endj   = rect.bottom >> kTileExponentHeight;
 
     let tile = null;
     for (var j = startj; j <= endj; ++j) {
       for (var i = starti; i <= endi; ++i) {
         tile = this.getTile(i, j, create, evictGuard);
         if (tile) {
           visited[tile.toString()] = true;
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js
+++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js
@@ -116,17 +116,17 @@ wsRect.prototype = {
     this.left = l;
     this.bottom = b;
     this.right = r;
 
     return this;
   },
 
   equals: function equals(r) {
-    return (r != null       &&
+    return (r != null &&
             this.top == r.top &&
             this.left == r.left &&
             this.bottom == r.bottom &&
             this.right == r.right);
   },
 
   clone: function clone() {
     return new wsRect(this.left, this.top, this.right - this.left, this.bottom - this.top);
@@ -971,22 +971,20 @@ WidgetStack.prototype = {
 
         // log2("alreadyKnownDistance", alreadyKnownDistance);
 
         let dbx = 0;
 
         // 100 <= 100 && 100-(-5) > 100
 
         if ((vr.left <= b.x && vr.left + dx > b.x) ||
-            (vr.left >= b.x && vr.left + dx < b.x))
-        {
+            (vr.left >= b.x && vr.left + dx < b.x)) {
           dbx = b.x - vr.left;
         } else if ((vr.right <= b.x && vr.right + dx > b.x) ||
-                   (vr.right >= b.x && vr.right + dx < b.x))
-        {
+                   (vr.right >= b.x && vr.right + dx < b.x)) {
           dbx = b.x - vr.right;
         } else {
           delete this._dragState.barrierState[i];
           continue;
         }
 
         let leftoverDistance = dbx - dx;
 
@@ -1025,22 +1023,20 @@ WidgetStack.prototype = {
 
         // log2("alreadyKnownDistance", alreadyKnownDistance);
 
         let dby = 0;
 
         // 100 <= 100 && 100-(-5) > 100
 
         if ((vr.top <= b.y && vr.top + dy > b.y) ||
-            (vr.top >= b.y && vr.top + dy < b.y))
-        {
+            (vr.top >= b.y && vr.top + dy < b.y)) {
           dby = b.y - vr.top;
         } else if ((vr.bottom <= b.y && vr.bottom + dy > b.y) ||
-                   (vr.bottom >= b.y && vr.bottom + dy < b.y))
-        {
+                   (vr.bottom >= b.y && vr.bottom + dy < b.y)) {
           dby = b.y - vr.bottom;
         } else {
           delete this._dragState.barrierState[i];
           continue;
         }
 
         let leftoverDistance = dby - dy;
 
@@ -1191,18 +1187,17 @@ WidgetStack.prototype = {
     if (w.hasAttribute("viewport")) {
       if (this._viewport)
         reportError("WidgetStack: more than one viewport canvas in stack!");
 
       this._viewport = state;
       state.viewport = true;
 
       if (w.hasAttribute("vptargetx") && w.hasAttribute("vptargety") &&
-          w.hasAttribute("vptargetw") && w.hasAttribute("vptargeth"))
-      {
+          w.hasAttribute("vptargetw") && w.hasAttribute("vptargeth")) {
         let wx = parseInt(w.getAttribute("vptargetx"));
         let wy = parseInt(w.getAttribute("vptargety"));
         let ww = parseInt(w.getAttribute("vptargetw"));
         let wh = parseInt(w.getAttribute("vptargeth"));
 
         state.offsetLeft = state.rect.left - wx;
         state.offsetTop = state.rect.top - wy;
         state.offsetRight = state.rect.right - (wx + ww);
@@ -1360,18 +1355,17 @@ WidgetStack.prototype = {
   _addNewBarrierFromSpacer(el) {
     let t = el.getAttribute("barriertype");
 
     // XXX implement these at some point
     // t != "lr" && t != "rl" &&
     // t != "tb" && t != "bt" &&
 
     if (t != "horizontal" &&
-        t != "vertical")
-    {
+        t != "vertical") {
       throw "Invalid barrier type: " + t;
     }
 
     let barrier = {};
     let vp = this._viewport;
 
     barrier.type = t;
 
--- a/toolkit/content/tests/mochitest/test_mousecapture.xhtml
+++ b/toolkit/content/tests/mochitest/test_mousecapture.xhtml
@@ -18,56 +18,51 @@ SimpleTest.expectAssertions(6, 12);
 
 SimpleTest.waitForExplicitFinish();
 
 var captureRetargetMode = false;
 var cachedMouseDown = null;
 var previousWidth = 0, originalWidth = 0;
 var loadInWindow = false;
 
-function splitterCallback(adjustment)
-{
+function splitterCallback(adjustment) {
   var newWidth = Number($("leftbox").width); // getBoundingClientRect().width;
   var expectedWidth = previousWidth + adjustment;
   if (expectedWidth > $("splitterbox").getBoundingClientRect().width)
     expectedWidth = $("splitterbox").getBoundingClientRect().width - $("splitter").getBoundingClientRect().width;
   is(newWidth, expectedWidth, "splitter left box size (" + adjustment + ")");
   previousWidth = newWidth;
 }
 
-function selectionCallback(adjustment)
-{
+function selectionCallback(adjustment) {
   if (adjustment == 4000) {
     is(frames[0].getSelection().toString(), "This is some text", "selection after drag (" + adjustment + ")");
     ok(frames[0].scrollY > 40, "selection caused scroll down (" + adjustment + ")");
-  }
-  else {
+  } else {
     if (adjustment == 0) {
       is(frames[0].getSelection().toString(), ".", "selection after drag (" + adjustment + ")");
     }
     is(frames[0].scrollY, 0, "selection scrollY (" + adjustment + ")");
   }
 }
 
-function framesetCallback(adjustment)
-{
+function framesetCallback(adjustment) {
   var newWidth = frames[1].frames[0].document.documentElement.clientWidth;
   var expectedWidth = originalWidth + adjustment;
   if (adjustment == 0)
     expectedWidth = originalWidth - 12;
   else if (expectedWidth >= 4000)
     expectedWidth = originalWidth * 2 - 2;
 
   ok(Math.abs(newWidth - expectedWidth) <= 1, "frameset after drag (" + adjustment + "), new width " + newWidth + ", expected " + expectedWidth);
 }
 
 var otherWindow = null;
 
-function selectionScrollCheck()
-{
+function selectionScrollCheck() {
   var element = otherWindow.document.documentElement;
 
   var count = 0;
   function selectionScrollDone() {
     // wait for 6 scroll events to occur
     if (count++ < 6)
       return;
 
@@ -88,18 +83,17 @@ function selectionScrollCheck()
     ok((scrollY % 20) == 0, "selection scroll position after timer is multiple of 20");
 
     synthesizeMouse(element, 4, otherWindow.innerHeight + 25, { type: "mouseup" }, otherWindow);
     disableNonTestMouseEvents(false);
     otherWindow.close();
 
     if (loadInWindow) {
       SimpleTest.finish();
-    }
-    else {
+    } else {
       // now try again, but open the page in a new window
       loadInWindow = true;
       synthesizeMouse(document.getElementById("custom"), 2, 2, { type: "mousedown" });
 
       // check to ensure that selection dragging scrolls the right scrollable area
       otherWindow = window.open("data:text/html,<html><p>One</p><p style='margin-top: 200px;'>Two</p><p style='margin-top: 4000px'>This is some text</p></html>", "_blank", "width=200,height=200,scrollbars=yes");
       SimpleTest.waitForFocus(selectionScrollCheck, otherWindow);
     }
@@ -108,18 +102,17 @@ function selectionScrollCheck()
   SimpleTest.executeSoon(function() {
     disableNonTestMouseEvents(true);
     synthesizeMouse(element, 2, 2, { type: "mousedown" }, otherWindow);
     synthesizeMouse(element, 100, otherWindow.innerHeight + 20, { type: "mousemove" }, otherWindow);
     otherWindow.addEventListener("scroll", selectionScrollDone, false);
   });
 }
 
-function runTests()
-{
+function runTests() {
   previousWidth = $("leftbox").getBoundingClientRect().width;
   runCaptureTest($("splitter"), splitterCallback);
 
   var custom = document.getElementById("custom");
   runCaptureTest(custom);
 
   synthesizeMouseExpectEvent($("rightbox"), 2, 2, { type: "mousemove" },
                              $("rightbox"), "mousemove", "setCapture and releaseCapture");
@@ -209,18 +202,17 @@ function runTests()
   // check to ensure that selection dragging scrolls the right scrollable area.
   // This should open the page in a new tab.
 
   var topPos = window.innerHeight;
   otherWindow = window.open("data:text/html,<html><p>One</p><p style='margin-top: " + topPos + "'>Two</p><p style='margin-top: 4000px'>This is some text</p></html>", "_blank");
   SimpleTest.waitForFocus(selectionScrollCheck, otherWindow);
 }
 
-function runCaptureTest(element, callback)
-{
+function runCaptureTest(element, callback) {
   var expectedTarget = null;
 
   var win = element.ownerDocument.defaultView;
 
   function mouseMoved(event) {
     is(event.originalTarget, expectedTarget,
        expectedTarget.id + " target for point " + event.clientX + "," + event.clientY);
   }
--- a/toolkit/content/tests/unit/test_contentAreaUtils.js
+++ b/toolkit/content/tests/unit/test_contentAreaUtils.js
@@ -20,36 +20,33 @@ function test_urlSecurityCheck() {
   const HTTP_URI = "http://www.mozilla.org/";
   const CHROME_URI = "chrome://browser/content/browser.xul";
   const DISALLOW_INHERIT_PRINCIPAL =
     Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL;
 
   try {
     urlSecurityCheck(makeURI(HTTP_URI), nullPrincipal,
                      DISALLOW_INHERIT_PRINCIPAL);
-  }
-  catch (ex) {
+  } catch (ex) {
     do_throw("urlSecurityCheck should not throw when linking to a http uri with a null principal");
   }
 
   // urlSecurityCheck also supports passing the url as a string
   try {
     urlSecurityCheck(HTTP_URI, nullPrincipal,
                      DISALLOW_INHERIT_PRINCIPAL);
-  }
-  catch (ex) {
+  } catch (ex) {
     do_throw("urlSecurityCheck failed to handle the http URI as a string (uri spec)");
   }
 
   let shouldThrow = true;
   try {
     urlSecurityCheck(CHROME_URI, nullPrincipal,
                      DISALLOW_INHERIT_PRINCIPAL);
-  }
-  catch (ex) {
+  } catch (ex) {
     shouldThrow = false;
   }
   if (shouldThrow)
     do_throw("urlSecurityCheck should throw when linking to a chrome uri with a null principal");
 }
 
 function test_stringBundle() {
   // This test verifies that the elements that can be used as file picker title
@@ -67,14 +64,13 @@ function test_stringBundle() {
     try {
       ContentAreaUtils.stringBundle.GetStringFromName(filePickerTitleKey);
     } catch (e) {
       do_throw("Error accessing file picker title key: " + filePickerTitleKey);
     }
   }
 }
 
-function run_test()
-{
+function run_test() {
   loadUtilsScript();
   test_urlSecurityCheck();
   test_stringBundle();
 }
--- a/toolkit/content/tests/widgets/popup_shared.js
+++ b/toolkit/content/tests/widgets/popup_shared.js
@@ -33,18 +33,17 @@ var gTestIndex = -1;
 var gTestStepIndex = 0;
 var gTestEventIndex = 0;
 var gAutoHide = false;
 var gExpectedEventDetails = null;
 var gExpectedTriggerNode = null;
 var gWindowUtils;
 var gPopupWidth = -1, gPopupHeight = -1;
 
-function startPopupTests(tests)
-{
+function startPopupTests(tests) {
   document.addEventListener("popupshowing", eventOccurred, false);
   document.addEventListener("popupshown", eventOccurred, false);
   document.addEventListener("popuphiding", eventOccurred, false);
   document.addEventListener("popuphidden", eventOccurred, false);
   document.addEventListener("command", eventOccurred, false);
   document.addEventListener("DOMMenuItemActive", eventOccurred, false);
   document.addEventListener("DOMMenuItemInactive", eventOccurred, false);
   document.addEventListener("DOMMenuInactive", eventOccurred, false);
@@ -52,18 +51,17 @@ function startPopupTests(tests)
   document.addEventListener("DOMMenuBarInactive", eventOccurred, false);
 
   gPopupTests = tests;
   gWindowUtils = SpecialPowers.getDOMWindowUtils(window);
 
   goNext();
 }
 
-function finish()
-{
+function finish() {
   if (window.opener) {
     window.close();
     window.opener.SimpleTest.finish();
     return;
   }
   SimpleTest.finish();
   return;
 }
@@ -81,18 +79,17 @@ function is(left, right, message) {
   else
     SimpleTest.is(left, right, message);
 }
 
 function disableNonTestMouse(aDisable) {
   gWindowUtils.disableNonTestMouseEvents(aDisable);
 }
 
-function eventOccurred(event)
-{
+function eventOccurred(event) {
   if (gPopupTests.length <= gTestIndex) {
     ok(false, "Extra " + event.type + " event fired");
     return;
   }
 
   var test = gPopupTests[gTestIndex];
   if ("autohide" in test && gAutoHide) {
     if (event.type == "DOMMenuInactive") {
@@ -166,18 +163,17 @@ function eventOccurred(event)
     if (matches) {
       gTestEventIndex++
       if (events.length <= gTestEventIndex)
         setTimeout(checkResult, 0);
     }
   }
 }
 
-function checkResult()
-{
+function checkResult() {
   var step = null;
   var test = gPopupTests[gTestIndex];
   if ("steps" in test)
     step = test.steps[gTestStepIndex];
 
   if ("result" in test)
     test.result(test.testname, step);
 
@@ -185,47 +181,44 @@ function checkResult()
     gAutoHide = true;
     document.getElementById(test.autohide).hidePopup();
     return;
   }
 
   goNextStep();
 }
 
-function goNextStep()
-{
+function goNextStep() {
   gTestEventIndex = 0;
 
   var step = null;
   var test = gPopupTests[gTestIndex];
   if ("steps" in test) {
     gTestStepIndex++;
     step = test.steps[gTestStepIndex];
     if (gTestStepIndex < test.steps.length) {
       test.test(test.testname, step);
       return;
     }
   }
 
   goNext();
 }
 
-function goNext()
-{
+function goNext() {
   // We want to continue after the next animation frame so that
   // we're in a stable state and don't get spurious mouse events at unexpected targets.
   window.requestAnimationFrame(
     function() {
       setTimeout(goNextStepSync, 0);
     }
   );
 }
 
-function goNextStepSync()
-{
+function goNextStepSync() {
   if (gTestIndex >= 0 && "end" in gPopupTests[gTestIndex] && gPopupTests[gTestIndex].end) {
     finish();
     return;
   }
 
   gTestIndex++;
   gTestStepIndex = 0;
   if (gTestIndex < gPopupTests.length) {
@@ -247,85 +240,76 @@ function goNextStepSync()
     test.test(test.testname, step);
 
     // no events to check for so just check the result
     if (!("events" in test)) {
       checkResult();
     } else if (typeof test.events == "function" && !test.events().length) {
       checkResult();
     }
-  }
-  else {
+  } else {
     finish();
   }
 }
 
-function openMenu(menu)
-{
+function openMenu(menu) {
   if ("open" in menu) {
     menu.open = true;
-  }
-  else {
+  } else {
     var bo = menu.boxObject;
     if (bo instanceof MenuBoxObject)
       bo.openMenu(true);
     else
       synthesizeMouse(menu, 4, 4, { });
   }
 }
 
-function closeMenu(menu, popup)
-{
+function closeMenu(menu, popup) {
   if ("open" in menu) {
     menu.open = false;
-  }
-  else {
+  } else {
     var bo = menu.boxObject;
     if (bo instanceof MenuBoxObject)
       bo.openMenu(false);
     else
       popup.hidePopup();
   }
 }
 
-function checkActive(popup, id, testname)
-{
+function checkActive(popup, id, testname) {
   var activeok = true;
   var children = popup.childNodes;
   for (var c = 0; c < children.length; c++) {
     var child = children[c];
     if ((id == child.id && child.getAttribute(menuactiveAttribute) != "true") ||
         (id != child.id && child.hasAttribute(menuactiveAttribute) != "")) {
       activeok = false;
       break;
     }
   }
   ok(activeok, testname + " item " + (id ? id : "none") + " active");
 }
 
-function checkOpen(menuid, testname)
-{
+function checkOpen(menuid, testname) {
   var menu = document.getElementById(menuid);
   if ("open" in menu)
     ok(menu.open, testname + " " + menuid + " menu is open");
   else if (menu.boxObject instanceof MenuBoxObject)
     ok(menu.getAttribute("open") == "true", testname + " " + menuid + " menu is open");
 }
 
-function checkClosed(menuid, testname)
-{
+function checkClosed(menuid, testname) {
   var menu = document.getElementById(menuid);
   if ("open" in menu)
     ok(!menu.open, testname + " " + menuid + " menu is open");
   else if (menu.boxObject instanceof MenuBoxObject)
     ok(!menu.hasAttribute("open"), testname + " " + menuid + " menu is closed");
 }
 
-function convertPosition(anchor, align)
-{
+function convertPosition(anchor, align) {
   if (anchor == "topleft" && align == "topleft") return "overlap";
   if (anchor == "topleft" && align == "topright") return "start_before";
   if (anchor == "topleft" && align == "bottomleft") return "before_start";
   if (anchor == "topright" && align == "topleft") return "end_before";
   if (anchor == "topright" && align == "bottomright") return "before_end";
   if (anchor == "bottomleft" && align == "bottomright") return "start_after";
   if (anchor == "bottomleft" && align == "topleft") return "after_start";
   if (anchor == "bottomright" && align == "bottomleft") return "end_after";
@@ -335,37 +319,34 @@ function convertPosition(anchor, align)
 
 /*
  * When checking position of the bottom or right edge of the popup's rect,
  * use this instead of strict equality check of rounded values,
  * because we snap the top/left edges to pixel boundaries,
  * which can shift the bottom/right up to 0.5px from its "ideal" location,
  * and could cause it to round differently. (See bug 622507.)
  */
-function isWithinHalfPixel(a, b)
-{
+function isWithinHalfPixel(a, b) {
   return Math.abs(a - b) <= 0.5;
 }
 
-function compareEdge(anchor, popup, edge, offsetX, offsetY, testname)
-{
+function compareEdge(anchor, popup, edge, offsetX, offsetY, testname) {
   testname += " " + edge;
 
   checkOpen(anchor.id, testname);
 
   var anchorrect = anchor.getBoundingClientRect();
   var popuprect = popup.getBoundingClientRect();
   var check1 = false, check2 = false;
 
   if (gPopupWidth == -1) {
     ok((Math.round(popuprect.right) - Math.round(popuprect.left)) &&
        (Math.round(popuprect.bottom) - Math.round(popuprect.top)),
        testname + " size");
-  }
-  else {
+  } else {
     is(Math.round(popuprect.width), gPopupWidth, testname + " width");
     is(Math.round(popuprect.height), gPopupHeight, testname + " height");
   }
 
   var spaceIdx = edge.indexOf(" ");
   if (spaceIdx > 0) {
     let cornerX, cornerY;
     let [position, align] = edge.split(" ");
--- a/toolkit/content/tests/widgets/test_mousecapture_area.html
+++ b/toolkit/content/tests/widgets/test_mousecapture_area.html
@@ -51,18 +51,17 @@
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.expectAssertions(3);
 
 SimpleTest.waitForExplicitFinish();
 
-function runTests()
-{
+function runTests() {
   // XXX We send a useless click to each image to force it to setup its image
   // map, because flushing layout won't do it. Hopefully bug 135040 will make
   // this not suck.
   synthesizeMouse($("image"), 5, 5, { type: "mousedown" });
   synthesizeMouse($("image"), 5, 5, { type: "mouseup" });
   synthesizeMouse($("img1"), 5, 5, { type: "mousedown" });
   synthesizeMouse($("img1"), 5, 5, { type: "mouseup" });
   synthesizeMouse($("img2"), 5, 5, { type: "mousedown" });
--- a/toolkit/content/tests/widgets/test_videocontrols.html
+++ b/toolkit/content/tests/widgets/test_videocontrols.html
@@ -103,103 +103,103 @@ function runTest(event) {
 
       // Click the play button
       SimpleTest.executeSoon(() => {
         synthesizeMouse(video, playButtonCenterX, playButtonCenterY, { });
       });
       break;
 
     case 2:
-      is(event.type, "play",  "checking event type");
+      is(event.type, "play", "checking event type");
       is(video.paused, false, "checking video play state");
-      is(video.muted, false,  "checking video mute state");
+      is(video.muted, false, "checking video mute state");
 
       // Click the pause button
       SimpleTest.executeSoon(() => {
         synthesizeMouse(video, playButtonCenterX, playButtonCenterY, { });
       });
       break;
 
     case 3:
       is(event.type, "pause", "checking event type");
-      is(video.paused, true,  "checking video play state");
-      is(video.muted, false,  "checking video mute state");
+      is(video.paused, true, "checking video play state");
+      is(video.muted, false, "checking video mute state");
 
       SimpleTest.executeSoon(() => {
         synthesizeMouse(video, muteButtonCenterX, muteButtonCenterY, { }); // Mute.
       });
       break;
 
     case 4:
       is(event.type, "volumechange", "checking event type");
-      is(video.paused, true,  "checking video play state");
-      is(video.muted,  true,  "checking video mute state");
+      is(video.paused, true, "checking video play state");
+      is(video.muted, true, "checking video mute state");
 
       SimpleTest.executeSoon(() => {
         synthesizeMouse(video, muteButtonCenterX, muteButtonCenterY, { }); // Unmute.
       });
       break;
 
     /*
      * Bug 470596: Make sure that having CSS border or padding doesn't
      * break the controls (though it should move them)
      */
     case 5:
       is(event.type, "volumechange", "checking event type");
-      is(video.paused, true,  "checking video play state");
-      is(video.muted,  false, "checking video mute state");
+      is(video.paused, true, "checking video play state");
+      is(video.muted, false, "checking video mute state");
 
       video.style.border = "medium solid purple";
       video.style.borderWidth = "30px 40px 50px 60px";
       video.style.padding = "10px 20px 30px 40px";
       // totals: top: 40px, right: 60px, bottom: 80px, left: 100px
 
       // Click the play button
       SimpleTest.executeSoon(() => {
         synthesizeMouse(video, 100 + playButtonCenterX, 40 + playButtonCenterY, { });
       });
       break;
 
     case 6:
-      is(event.type, "play",  "checking event type");
+      is(event.type, "play", "checking event type");
       is(video.paused, false, "checking video play state");
-      is(video.muted, false,  "checking video mute state");
+      is(video.muted, false, "checking video mute state");
       video.pause();
       break;
 
     case 7:
-      is(event.type, "pause",  "checking event type");
+      is(event.type, "pause", "checking event type");
       is(video.paused, true, "checking video play state");
-      is(video.muted, false,  "checking video mute state");
+      is(video.muted, false, "checking video mute state");
 
       // Click the mute button
       SimpleTest.executeSoon(() => {
         synthesizeMouse(video, 100 + muteButtonCenterX, 40 + muteButtonCenterY, { });
       });
       break;
 
     case 8:
       is(event.type, "volumechange", "checking event type");
-      is(video.paused, true,  "checking video play state");
-      is(video.muted,  true,  "checking video mute state");
+      is(video.paused, true, "checking video play state");
+      is(video.muted, true, "checking video mute state");
       // Clear the style set in test 5.
       video.style.border = "";
       video.style.borderWidth = "";
       video.style.padding = "";
 
       video.muted = false;
       break;
 
     /*
      * Previous tests have moved playback postion, reset it to 0.
      */
     case 9:
       is(event.type, "volumechange", "checking event type");
-      is(video.paused, true,  "checking video play state");
-      is(video.muted,  false,  "checking video mute state");
+      is(video.paused, true, "checking video play state");
+      is(video.muted, false, "checking video mute state");
       ok(true, "video position is at " + video.currentTime);
       video.currentTime = 0.0;
       break;
 
     case 10:
       is(event.type, "seeking", "checking event type");
       ok(true, "video position is at " + video.currentTime);
       break;
@@ -212,18 +212,18 @@ function runTest(event) {
       ok(true, "video position is at " + video.currentTime);
       // Bug 477434 -- sometimes we get 0.098999 here instead of 0!
       // is(video.currentTime, 0.0, "checking playback position");
 
       SimpleTest.executeSoon(() => {
         var beginDragX = scrubberOffsetX;
         var endDragX = scrubberOffsetX + (scrubberWidth / 2);
         synthesizeMouse(video, beginDragX, scrubberCenterY, { type: "mousedown", button: 0 });
-        synthesizeMouse(video, endDragX,   scrubberCenterY, { type: "mousemove", button: 0 });
-        synthesizeMouse(video, endDragX,   scrubberCenterY, { type: "mouseup",   button: 0 });
+        synthesizeMouse(video, endDragX, scrubberCenterY, { type: "mousemove", button: 0 });
+        synthesizeMouse(video, endDragX, scrubberCenterY, { type: "mouseup",   button: 0 });
       });
       break;
 
     case 12:
       is(event.type, "seeking", "checking event type");
       ok(true, "video position is at " + video.currentTime);
       break;
 
@@ -382,19 +382,19 @@ function runTest(event) {
   }
 
   testnum++;
 }
 
 
 
 function canplaythroughevent(event) {
-  video.removeEventListener("canplaythrough",  canplaythroughevent, false);
+  video.removeEventListener("canplaythrough", canplaythroughevent, false);
   // Other events expected by the test.
-  video.addEventListener("play",  runTest, false);
+  video.addEventListener("play", runTest, false);
   video.addEventListener("pause", runTest, false);
   video.addEventListener("volumechange", runTest, false);
   video.addEventListener("seeking", runTest, false);
   video.addEventListener("seeked", runTest, false);
   document.addEventListener("mozfullscreenchange", runTest, false);
   // Begin the test.
   runTest(event);
 }
@@ -404,16 +404,16 @@ function startMediaLoad() {
   video.src = "seek_with_sound.ogg";
   video.addEventListener("canplaythrough", canplaythroughevent, false);
 }
 
 function loadevent(event) {
   SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, startMediaLoad);
 }
 
-window.addEventListener("load",  loadevent, false);
+window.addEventListener("load", loadevent, false);
 
 SimpleTest.waitForExplicitFinish();
 
 </script>
 </pre>
 </body>
 </html>
--- a/toolkit/content/tests/widgets/test_videocontrols_onclickplay.html
+++ b/toolkit/content/tests/widgets/test_videocontrols_onclickplay.html
@@ -25,17 +25,17 @@ function startMediaLoad() {
   video.src = "seek_with_sound.ogg";
   video.addEventListener("canplaythrough", runTest, false);
 }
 
 function loadevent(event) {
   SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, startMediaLoad);
 }
 
-window.addEventListener("load",  loadevent, false);
+window.addEventListener("load", loadevent, false);
 
 function runTest() {
   video.addEventListener("click", function() {
     this.play();
   });
   ok(video.paused, "video should be paused initially");
 
   new Promise(resolve => {
--- a/toolkit/content/tests/widgets/tree_shared.js
+++ b/toolkit/content/tests/widgets/tree_shared.js
@@ -14,18 +14,17 @@ var columns_hiertree =
 
 // XXXndeakin still to add some tests for:
 //   cycler columns, checkbox cells, progressmeter cells
 
 // this test function expects a tree to have 8 rows in it when it isn't
 // expanded. The tree should only display four rows at a time. If editable,
 // the cell at row 1 and column 0 must be editable, and the cell at row 2 and
 // column 1 must not be editable.
-function testtag_tree(treeid, treerowinfoid, seltype, columnstype, testid)
-{
+function testtag_tree(treeid, treerowinfoid, seltype, columnstype, testid) {
   // Stop keystrokes that aren't handled by the tree from leaking out and
   // scrolling the main Mochitests window!
   function preventDefault(event) {
     event.preventDefault();
   }
   document.addEventListener("keypress", preventDefault, false);
 
   var multiple = (seltype == "multiple");
@@ -119,18 +118,17 @@ function testtag_tree(treeid, treerowinf
 
   testtag_tree_wheel(tree);
 
   document.removeEventListener("keypress", preventDefault, false);
 
   SimpleTest.finish();
 }
 
-function testtag_tree_columns(tree, expectedColumns, testid)
-{
+function testtag_tree_columns(tree, expectedColumns, testid) {
   testid += " ";
 
   var columns = tree.columns;
 
   is(columns instanceof TreeColumns, true, testid + "columns is a TreeColumns");
   is(columns.count, expectedColumns.length, testid + "TreeColumns count");
   is(columns.length, expectedColumns.length, testid + "TreeColumns length");
 
@@ -178,35 +176,34 @@ function testtag_tree_columns(tree, expe
     is(column.type, "type" in expectedColumn ? expectedColumn.type : 1, adjtestid + "type");
 
     is(column.getPrevious(), c > 0 ? columns[c - 1] : null, adjtestid + "getPrevious");
     is(column.getNext(), c < columns.length - 1 ? columns[c + 1] : null, adjtestid + "getNext");
 
     // check the view's getColumnProperties method
     var properties = tree.view.getColumnProperties(column);
     var expectedProperties = expectedColumn.properties;
-    is(properties,  expectedProperties ? expectedProperties : "", adjtestid + "getColumnProperties");
+    is(properties, expectedProperties ? expectedProperties : "", adjtestid + "getColumnProperties");
   }
 
   is(columns.getFirstColumn(), columns[0], testid + "getFirstColumn");
   is(columns.getLastColumn(), columns[columns.length - 1], testid + "getLastColumn");
   is(columns.getPrimaryColumn(), primary, testid + "getPrimaryColumn");
   is(columns.getSortedColumn(), sorted, testid + "getSortedColumn");
   is(columns.getKeyColumn(), key, testid + "getKeyColumn");
 
   is(columns.getColumnAt(-1), null, testid + "getColumnAt under");
   is(columns.getColumnAt(columns.length), null, testid + "getColumnAt over");
   is(columns.getNamedColumn(""), null, testid + "getNamedColumn null");
   is(columns.getNamedColumn("unknown"), null, testid + "getNamedColumn unknown");
   is(columns.getColumnFor(null), null, testid + "getColumnFor null");
   is(columns.getColumnFor(tree), null, testid + "getColumnFor other");
 }
 
-function testtag_tree_TreeSelection(tree, testid, multiple)
-{
+function testtag_tree_TreeSelection(tree, testid, multiple) {
   testid += " selection ";
 
   var selection = tree.view.selection;
   is(selection instanceof Components.interfaces.nsITreeSelection, true,
                 testid + "selection is a TreeSelection");
   is(selection.single, !multiple, testid + "single");
 
   testtag_tree_TreeSelection_State(tree, testid + "initial", -1, []);
@@ -315,29 +312,27 @@ function testtag_tree_TreeSelection(tree
   selection.select(-1);
   testtag_tree_TreeSelection_State(tree, testid + "rangedSelect augment -1", -1, []);
 
   selection.select(8);
   testtag_tree_TreeSelection_State(tree, testid + "rangedSelect augment 8", 3, [0]);
 */
 }
 
-function testtag_tree_TreeSelection_UI(tree, testid, multiple)
-{
+function testtag_tree_TreeSelection_UI(tree, testid, multiple) {
   testid += " selection UI ";
 
   var selection = tree.view.selection;
   selection.clearSelection();
   selection.currentIndex = 0;
   tree.focus();
 
   var keydownFired = 0;
   var keypressFired = 0;
-  function keydownListener(event)
-  {
+  function keydownListener(event) {
     keydownFired++;
   }
   function keypressListener(event) {
     keypressFired++;
   }
 
   // check that cursor up and down keys navigate up and down
   // select event fires after a delay so don't expect it. The reason it fires after a delay
@@ -613,18 +608,17 @@ function testtag_tree_TreeSelection_UI(t
   sendKey("HOME");
 
   window.removeEventListener("keydown", keydownListener, false);
   window.removeEventListener("keypress", keypressListener, false);
   is(keydownFired, multiple ? 63 : 40, "keydown event wasn't fired properly");
   is(keypressFired, multiple ? 2 : 1, "keypress event wasn't fired properly");
 }
 
-function testtag_tree_UI_editing(tree, testid, rowInfo)
-{
+function testtag_tree_UI_editing(tree, testid, rowInfo) {
   testid += " editing UI ";
 
   // check editing UI
   var ecolumn = tree.columns[0];
   var rowIndex = 2;
 
   // temporary make the tree editable to test mouse double click
   var wasEditable = tree.editable;
@@ -633,18 +627,17 @@ function testtag_tree_UI_editing(tree, t
 
   // if this is a container save its current open status
   var row = rowInfo.rows[rowIndex];
   var wasOpen = null;
   if (tree.view.isContainer(row))
     wasOpen = tree.view.isContainerOpen(row);
 
   // Test whether a keystroke can enter text entry, and another can exit.
-  if (tree.selType == "cell")
-  {
+  if (tree.selType == "cell") {
     tree.stopEditing(false);
     ok(!tree.editingColumn, "Should not be editing tree cell now");
     tree.view.selection.currentColumn = ecolumn;
     tree.currentIndex = rowIndex;
 
     const isMac = (navigator.platform.indexOf("Mac") >= 0);
     const StartEditingKey = isMac ? "RETURN" : "F2";
     sendKey(StartEditingKey);
@@ -688,18 +681,17 @@ function testtag_tree_UI_editing(tree, t
   // synthesizeKeyExpectEvent(inputField.inputField, "b", null, "");
   // tree.stopEditing(true);
   // is(tree.view.getCellText(0, ecolumn), "b", testid + "edit cell");
 
   // Restore initial state.
   tree.stopEditing(false);
 }
 
-function testtag_tree_TreeSelection_UI_cell(tree, testid, rowInfo)
-{
+function testtag_tree_TreeSelection_UI_cell(tree, testid, rowInfo) {
   testid += " selection UI cell ";
 
   var columns = tree.columns;
   var firstcolumn = columns[0];
   var secondcolumn = columns[1];
   var lastcolumn = columns[columns.length - 1];
   var secondlastcolumn = columns[columns.length - 2];
   var selection = tree.view.selection;
@@ -864,18 +856,17 @@ function testtag_tree_TreeSelection_UI_c
     testtag_tree_TreeSelection_State(tree, testid + "key up unselectable cell",
                                      3, [3], 3, secondcolumn);
   }
 
   // restore the scroll position to the start of the page
   sendKey("HOME");
 }
 
-function testtag_tree_TreeView(tree, testid, rowInfo)
-{
+function testtag_tree_TreeView(tree, testid, rowInfo) {
   testid += " view ";
 
   var columns = tree.columns;
   var view = tree.view;
 
   is(view instanceof Components.interfaces.nsITreeView, true, testid + "view is a TreeView");
   is(view.rowCount, rowInfo.rows.length, testid + "rowCount");
 
@@ -884,18 +875,17 @@ function testtag_tree_TreeView(tree, tes
   // note that this will only work for content trees currently
   view.setCellText(0, columns[1], "Changed Value");
   is(view.getCellText(0, columns[1]), "Changed Value", "setCellText");
 
   view.setCellValue(1, columns[0], "Another Changed Value");
   is(view.getCellValue(1, columns[0]), "Another Changed Value", "setCellText");
 }
 
-function testtag_tree_TreeView_rows(tree, testid, rowInfo, startRow)
-{
+function testtag_tree_TreeView_rows(tree, testid, rowInfo, startRow) {
   var r;
   var columns = tree.columns;
   var view = tree.view;
   var length = rowInfo.rows.length;
 
   // methods to test along with the functions which determine the expected value
   var checkRowMethods =
   {
@@ -939,18 +929,17 @@ function testtag_tree_TreeView_rows(tree
       }
     }
 
     // compare row properties
     for (checkMethod in checkRowMethods) {
       expected = checkRowMethods[checkMethod](row, r);
       if (checkMethod == "hasNextSibling") {
         actual = view[checkMethod](r, r);
-      }
-      else {
+      } else {
         actual = view[checkMethod](r);
       }
       if (actual !== expected) {
         failedMethods[checkMethod] = true;
         is(actual, expected, testid + "row " + r + " " + checkMethod + " is incorrect");
       }
     }
 /*
@@ -981,18 +970,17 @@ function testtag_tree_TreeView_rows(tree
   for (checkMethod in checkRowMethods)
     is(checkMethod + " ok", checkMethod + " ok", testid + checkMethod);
   for (checkMethod in checkCellMethods)
     is(checkMethod + " ok", checkMethod + " ok", testid + checkMethod);
   if (toggleOpenStateOK)
     is("toggleOpenState ok", "toggleOpenState ok", testid + "toggleOpenState");
 }
 
-function testtag_tree_TreeView_rows_sort(tree, testid, rowInfo)
-{
+function testtag_tree_TreeView_rows_sort(tree, testid, rowInfo) {
   // check if cycleHeader sorts the columns
   var columnIndex = 0;
   var view = tree.view;
   var column = tree.columns[columnIndex];
   var columnElement = column.element;
   var sortkey = columnElement.getAttribute("sort");
   if (sortkey) {
     view.cycleHeader(column);
@@ -1048,18 +1036,17 @@ function testtag_tree_TreeView_rows_sort
      "cycleHeader column sortDirection reset");
 }
 
 // checks if the current and selected rows are correct
 // current is the index of the current row
 // selected is an array of the indicies of the selected rows
 // column is the selected column
 // viewidx is the row that should be visible at the top of the tree
-function testtag_tree_TreeSelection_State(tree, testid, current, selected, viewidx, column)
-{
+function testtag_tree_TreeSelection_State(tree, testid, current, selected, viewidx, column) {
   var selection = tree.view.selection;
 
   if (!column)
     column = (tree.selType == "cell") ? tree.columns[0] : null;
 
   is(selection.count, selected.length, testid + " count");
   is(tree.currentIndex, current, testid + " currentIndex");
   is(selection.currentIndex, current, testid + " TreeSelection currentIndex");
@@ -1083,18 +1070,17 @@ function testtag_tree_TreeSelection_Stat
     selection.getRangeAt(r, start, end);
     for (var rs = start.value; rs <= end.value; rs++)
       actualSelected.push(rs);
   }
 
   is(compareArrays(selected, actualSelected), true, testid + " range selection [" + selected + "]");
 }
 
-function testtag_tree_column_reorder()
-{
+function testtag_tree_column_reorder() {
   // Make sure the tree is scrolled into the view, otherwise the test will
   // fail
   var testframe = window.parent.document.getElementById("testframe");
   if (testframe) {
     testframe.scrollIntoView();
   }
 
   var tree = document.getElementById("tree-column-reorder");
@@ -1151,37 +1137,32 @@ function testtag_tree_column_reorder()
   synthesizeColumnDrag(tree, 0, 0, true);
   checkColumns(tree, reference, "drag to itself");
   is(document.treecolDragging, null, "drag to itself completed");
 
   // XXX roc should this be here???
   SimpleTest.finish();
 }
 
-function testtag_tree_wheel(aTree)
-{
+function testtag_tree_wheel(aTree) {
   const deltaModes = [
     WheelEvent.DOM_DELTA_PIXEL,  // 0
     WheelEvent.DOM_DELTA_LINE,   // 1
     WheelEvent.DOM_DELTA_PAGE    // 2
   ];
-  function helper(aStart, aDelta, aIntDelta, aDeltaMode)
-  {
+  function helper(aStart, aDelta, aIntDelta, aDeltaMode) {
     aTree.treeBoxObject.scrollToRow(aStart);
     var expected;
     if (!aIntDelta) {
       expected = aStart;
-    }
-    else if (aDeltaMode != WheelEvent.DOM_DELTA_PAGE) {
+    } else if (aDeltaMode != WheelEvent.DOM_DELTA_PAGE) {
       expected = aStart + aIntDelta;
-    }
-    else if (aIntDelta > 0) {
+    } else if (aIntDelta > 0) {
       expected = aStart + aTree.treeBoxObject.getPageLength();
-    }
-    else {
+    } else {
       expected = aStart - aTree.treeBoxObject.getPageLength();
     }
 
     if (expected < 0) {
       expected = 0;
     }
     if (expected > aTree.view.rowCount - aTree.treeBoxObject.getPageLength()) {
       expected = aTree.view.rowCount - aTree.treeBoxObject.getPageLength();
@@ -1209,32 +1190,31 @@ function testtag_tree_wheel(aTree)
 
   function wheelListener(event) {
     defaultPrevented++;
   }
   window.addEventListener("wheel", wheelListener, false);
 
   deltaModes.forEach(function(aDeltaMode) {
     var delta = (aDeltaMode == WheelEvent.DOM_DELTA_PIXEL) ? 5.0 : 0.3;
-    helper(2, -delta,  0, aDeltaMode);
+    helper(2, -delta, 0, aDeltaMode);
     helper(2, -delta, -1, aDeltaMode);
-    helper(2,  delta,  0, aDeltaMode);
-    helper(2,  delta,  1, aDeltaMode);
-    helper(2, -2 * delta,  0, aDeltaMode);
+    helper(2, delta, 0, aDeltaMode);
+    helper(2, delta, 1, aDeltaMode);
+    helper(2, -2 * delta, 0, aDeltaMode);
     helper(2, -2 * delta, -1, aDeltaMode);
-    helper(2,  2 * delta,  0, aDeltaMode);
-    helper(2,  2 * delta,  1, aDeltaMode);
+    helper(2, 2 * delta, 0, aDeltaMode);
+    helper(2, 2 * delta, 1, aDeltaMode);
   });
 
   window.removeEventListener("wheel", wheelListener, false);
   is(defaultPrevented, 48, "wheel event default prevented");
 }
 
-function synthesizeColumnDrag(aTree, aMouseDownColumnNumber, aMouseUpColumnNumber, aAfter)
-{
+function synthesizeColumnDrag(aTree, aMouseDownColumnNumber, aMouseUpColumnNumber, aAfter) {
   var columns = getSortedColumnArray(aTree);
 
   var down = columns[aMouseDownColumnNumber].element;
   var up   = columns[aMouseUpColumnNumber].element;
 
   // Target the initial mousedown in the middle of the column header so we
   // avoid the extra hit test space given to the splitter
   var columnWidth = down.boxObject.width;
@@ -1246,128 +1226,118 @@ function synthesizeColumnDrag(aTree, aMo
     offsetX = columnWidth;
   }
 
   if (aMouseUpColumnNumber > aMouseDownColumnNumber) {
     for (let i = aMouseDownColumnNumber; i <= aMouseUpColumnNumber; i++) {
       let move = columns[i].element;
       synthesizeMouse(move, offsetX, 3, { type: "mousemove"});
     }
-  }
-  else {
+  } else {
     for (let i = aMouseDownColumnNumber; i >= aMouseUpColumnNumber; i--) {
       let move = columns[i].element;
       synthesizeMouse(move, offsetX, 3, { type: "mousemove"});
     }
   }
 
   synthesizeMouse(up, offsetX, 3, { type: "mouseup"});
 }
 
-function arrayMove(aArray, aFrom, aTo, aAfter)
-{
+function arrayMove(aArray, aFrom, aTo, aAfter) {
   var o = aArray.splice(aFrom, 1)[0];
   if (aTo > aFrom) {
     aTo--;
   }
 
   if (aAfter) {
     aTo++;
   }
 
   aArray.splice(aTo, 0, o);
 }
 
-function getSortedColumnArray(aTree)
-{
+function getSortedColumnArray(aTree) {
   var columns = aTree.columns;
   var array = [];
   for (let i = 0; i < columns.length; i++) {
     array.push(columns.getColumnAt(i));
   }
 
   array.sort(function(a, b) {
     var o1 = parseInt(a.element.getAttribute("ordinal"));
     var o2 = parseInt(b.element.getAttribute("ordinal"));
     return o1 - o2;
   });
   return array;
 }
 
-function checkColumns(aTree, aReference, aMessage)
-{
+function checkColumns(aTree, aReference, aMessage) {
   var columns = getSortedColumnArray(aTree);
   var ids = [];
   columns.forEach(function(e) {
     ids.push(e.element.id);
   });
   is(compareArrays(ids, aReference), true, aMessage);
 }
 
-function mouseOnCell(tree, row, column, testname)
-{
+function mouseOnCell(tree, row, column, testname) {
   var rect = tree.boxObject.getCoordsForCellItem(row, column, "text");
 
   synthesizeMouseExpectEvent(tree.body, rect.x, rect.y, {}, tree, "select", testname);
 }
 
-function mouseClickOnColumnHeader(aColumns, aColumnIndex, aButton, aClickCount)
-{
+function mouseClickOnColumnHeader(aColumns, aColumnIndex, aButton, aClickCount) {
   var columnHeader = aColumns[aColumnIndex].element;
   var columnHeaderRect = columnHeader.getBoundingClientRect();
   var columnWidth = columnHeaderRect.right - columnHeaderRect.left;
   // For multiple click we send separate click events, with increasing
   // clickCount.  This simulates the common behavior of multiple clicks.
   for (let i = 1; i <= aClickCount; i++) {
     // Target the middle of the column header.
     synthesizeMouse(columnHeader, columnWidth / 2, 3,
                     { button: aButton,
                       clickCount: i }, null);
   }
 }
 
-function mouseDblClickOnCell(tree, row, column, testname)
-{
+function mouseDblClickOnCell(tree, row, column, testname) {
   // select the row we will edit
   var selection = tree.view.selection;
   selection.select(row);
   tree.treeBoxObject.ensureRowIsVisible(row);
 
   // get cell coordinates
   var rect = tree.treeBoxObject.getCoordsForCellItem(row, column, "text");
 
   synthesizeMouse(tree.body, rect.x, rect.y, { clickCount: 2 }, null);
 }
 
-function compareArrays(arr1, arr2)
-{
+function compareArrays(arr1, arr2) {
   if (arr1.length != arr2.length)
     return false;
 
   for (let i = 0; i < arr1.length; i++) {
     if (arr1[i] != arr2[i])
       return false;
   }
 
   return true;
 }
 
-function convertProperties(arr)
-{
+function convertProperties(arr) {
   var results = [];
   var count = arr.Count();
   for (let i = 0; i < count; i++)
     results.push(arr.GetElementAt(i).QueryInterface(Components.interfaces.nsIAtom).toString());
 
   results.sort();
   return results.join(" ");
 }
 
-function convertDOMtoTreeRowInfo(treechildren, level, rowidx)
-{
+function convertDOMtoTreeRowInfo(treechildren, level, rowidx) {
   var obj = { rows: [] };
 
   var parentidx = rowidx.value;
 
   treechildren = treechildren.childNodes;
   for (var r = 0; r < treechildren.length; r++) {
     rowidx.value++;
 
--- a/toolkit/content/tests/widgets/videocontrols_direction_test.js
+++ b/toolkit/content/tests/widgets/videocontrols_direction_test.js
@@ -56,18 +56,17 @@ function runTest(index) {
       var expectedEqual = currentTest.op == "==";
       var result = canvases[0].compare(canvases[1], expectedEqual);
       ok(result, "Rendering of reftest " + currentTest.test + " should " +
         (expectedEqual ? "not " : "") + "be different to the reference");
 
       if (result) {
         canvases[0].cleanup();
         canvases[1].cleanup();
-      }
-      else {
+      } else {
         info("Snapshot of canvas 1: " + canvases[0].snapshot.toDataURL());
         info("Snapshot of canvas 2: " + canvases[1].snapshot.toDataURL());
       }
 
       if (index < tests.length - 1)
         runTest(index + 1);
       else
         SimpleTest.finish();
--- a/toolkit/content/treeUtils.js
+++ b/toolkit/content/treeUtils.js
@@ -1,27 +1,25 @@
 // -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
 
 /* 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/. */
 
 var gTreeUtils = {
-  deleteAll(aTree, aView, aItems, aDeletedItems)
-  {
+  deleteAll(aTree, aView, aItems, aDeletedItems) {
     for (var i = 0; i < aItems.length; ++i)
       aDeletedItems.push(aItems[i]);
     aItems.splice(0, aItems.length);
     var oldCount = aView.rowCount;
     aView._rowCount = 0;
     aTree.treeBoxObject.rowCountChanged(0, -oldCount);
   },
 
-  deleteSelectedItems(aTree, aView, aItems, aDeletedItems)
-  {
+  deleteSelectedItems(aTree, aView, aItems, aDeletedItems) {
     var selection = aTree.view.selection;
     selection.selectEventsSuppressed = true;
 
     var rc = selection.getRangeCount();
     for (var i = 0; i < rc; ++i) {
       var min = { }; var max = { };
       selection.getRangeAt(i, min, max);
       for (let j = min.value; j <= max.value; ++j) {
@@ -47,18 +45,17 @@ var gTreeUtils = {
       selection.select(nextSelection);
       aTree.treeBoxObject.ensureRowIsVisible(nextSelection);
       aTree.focus();
     }
     selection.selectEventsSuppressed = false;
   },
 
   sort(aTree, aView, aDataSet, aColumn, aComparator,
-                 aLastSortColumn, aLastSortAscending)
-  {
+                 aLastSortColumn, aLastSortAscending) {
     var ascending = (aColumn == aLastSortColumn) ? !aLastSortAscending : true;
     if (aDataSet.length == 0)
       return ascending;
 
     var sortFunction = null;
     if (aComparator) {
       sortFunction = function(a, b) { return aComparator(a[aColumn], b[aColumn]); };
     }
--- a/toolkit/content/widgets/autocomplete.xml
+++ b/toolkit/content/widgets/autocomplete.xml
@@ -1333,18 +1333,17 @@ extends="chrome://global/content/binding
                   item.adjustSiteIconStart(this._siteIconStart);
                   // The popup may have changed size between now and the last
                   // time the item was shown, so always handle over/underflow.
                   item.handleOverUnderflow();
                   this._currentIndex++;
                   continue;
                 }
               }
-            }
-            else {
+            } else {
               // need to create a new item
               item = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "richlistitem");
               item.setAttribute("dir", this.style.direction);
             }
 
             // set these attributes before we set the class
             // so that we can use them from the constructor
             let iconURI = controller.getImageAt(this._currentIndex);
@@ -1353,18 +1352,17 @@ extends="chrome://global/content/binding
             item.setAttribute("title", controller.getCommentAt(this._currentIndex));
             item.setAttribute("originaltype", controller.getStyleAt(this._currentIndex));
             item.setAttribute("text", trimmedSearchString);
 
             if (this._currentIndex < existingItemsCount) {
               // re-use the existing item
               item._adjustAcItem();
               item.collapsed = false;
-            }
-            else {
+            } else {
               // set the class at the end so we can use the attributes
               // in the xbl constructor
               item.className = "autocomplete-richlistitem";
               this.richlistbox.appendChild(item);
             }
 
             // The binding may have not been applied yet.
             setTimeout(() => {
--- a/toolkit/content/widgets/browser.xml
+++ b/toolkit/content/widgets/browser.xml
@@ -17,18 +17,17 @@
         <getter>
           <![CDATA[
             if (this.getAttribute("autoscroll") == "false")
               return false;
 
             var enabled = true;
             try {
               enabled = this.mPrefs.getBoolPref("general.autoScroll");
-            }
-            catch (ex) {
+            } catch (ex) {
             }
 
             return enabled;
           ]]>
         </getter>
       </property>
 
       <property name="canGoBack"
@@ -156,18 +155,17 @@
         </body>
       </method>
 
       <method name="goHome">
         <body>
           <![CDATA[
             try {
               this.loadURI(this.homePage);
-            }
-            catch (e) {
+            } catch (e) {
             }
           ]]>
         </body>
       </method>
 
       <property name="homePage">
         <getter>
           <![CDATA[
@@ -797,17 +795,17 @@
       </method>
 
       <method name="resumeMedia">
         <body>
           <![CDATA[
             this._audioBlocked = false;
             this.messageManager.sendAsyncMessage("AudioPlayback",
                                                  {type: "resumeMedia"});
-            let  event = document.createEvent("Events");
+            let event = document.createEvent("Events");
             event.initEvent("DOMAudioPlaybackBlockStopped", true, false);
             this.dispatchEvent(event);
           ]]>
         </body>
       </method>
 
       <property name="securityUI">
         <getter>
@@ -923,25 +921,23 @@
                 try {
                   this.docShell.useGlobalHistory = true;
                 } catch (ex) {
                   // This can occur if the Places database is locked
                   Components.utils.reportError("Error enabling browser global history: " + ex);
                 }
               }
             }
-          }
-          catch (e) {
+          } catch (e) {
             Components.utils.reportError(e);
           }
           try {
             // Ensures the securityUI is initialized.
             var securityUI = this.securityUI; // eslint-disable-line no-unused-vars
-          }
-          catch (e) {
+          } catch (e) {
           }
 
           // XXX tabbrowser.xml sets "relatedBrowser" as a direct property on
           // some browsers before they are put into a DOM (and get a binding).
           // This hack makes sure that we hold a weak reference to the other
           // browser (and go through the proper getter and setter).
           if (this.hasOwnProperty("relatedBrowser")) {
             var relatedBrowser = this.relatedBrowser;
@@ -1138,18 +1134,17 @@
         <parameter name="scrolldir"/>
         <parameter name="screenX"/>
         <parameter name="screenY"/>
         <body><![CDATA[
             if (!this._autoScrollPopup) {
               if (this.hasAttribute("autoscrollpopup")) {
                 // our creator provided a popup to share
                 this._autoScrollPopup = document.getElementById(this.getAttribute("autoscrollpopup"));
-              }
-              else {
+              } else {
                 // we weren't provided a popup; we have to use the global scope
                 this._autoScrollPopup = this._createAutoScrollPopup();
                 document.documentElement.appendChild(this._autoScrollPopup);
                 this._autoScrollNeedsCleanup = true;
               }
             }
 
             // we need these attributes so themers don't need to create per-platform packages
@@ -1369,18 +1364,17 @@
             aOtherBrowser[field] = ourFieldValues[field];
           }
 
           if (!this.isRemoteBrowser) {
             // Null the current nsITypeAheadFind instances so that they're
             // lazily re-created on access. We need to do this because they
             // might have attached the wrong docShell.
             this._fastFind = aOtherBrowser._fastFind = null;
-          }
-          else {
+          } else {
             // Rewire the remote listeners
             this._remoteWebNavigationImpl.swapBrowser(this);
             aOtherBrowser._remoteWebNavigationImpl.swapBrowser(aOtherBrowser);
 
             if (this._remoteWebProgressManager && aOtherBrowser._remoteWebProgressManager) {
               this._remoteWebProgressManager.swapBrowser(this);
               aOtherBrowser._remoteWebProgressManager.swapBrowser(aOtherBrowser);
             }
@@ -1508,18 +1502,17 @@
                 } catch (ex) {
                 }
               }
               return;
             }
             if (checkValue.value) {
               try {
                 this.mPrefs.setBoolPref(kPrefWarnOnEnable, false);
-              }
-              catch (ex) {
+              } catch (ex) {
               }
             }
           }
 
           // Toggle the pref
           try {
             this.mPrefs.setBoolPref(kPrefCaretBrowsingOn, !browseWithCaretOn);
           } catch (ex) {
--- a/toolkit/content/widgets/button.xml
+++ b/toolkit/content/widgets/button.xml
@@ -296,18 +296,17 @@
 
       <property name="buttonover" onget="return this.getAttribute('buttonover');">
         <setter>
         <![CDATA[
           var v = val || val == "true";
           if (!v && this.buttondown) {
             this.buttondown = false;
             this._pendingActive = true;
-          }
-          else if (this._pendingActive) {
+          } else if (this._pendingActive) {
             this.buttondown = true;
             this._pendingActive = false;
           }
 
           if (v)
             this.setAttribute("buttonover", "true");
           else
             this.removeAttribute("buttonover");
--- a/toolkit/content/widgets/colorpicker.xml
+++ b/toolkit/content/widgets/colorpicker.xml
@@ -207,18 +207,17 @@
                           encodeURIComponent(el.getAttribute("color")) +
                           "' xmlns='http://www.w3.org/2000/svg' />";
             el.setAttribute("src", dataURI);
           }
 
           this.hoverCell(this.mBox.childNodes[0].childNodes[0]);
 
           // used to capture keydown at the document level
-          this.mPickerKeyDown = function(aEvent)
-          {
+          this.mPickerKeyDown = function(aEvent) {
             document._focusedPicker.pickerKeyDown(aEvent);
           }
 
         ]]></body>
       </method>
 
       <method name="_fireEvent">
         <parameter name="aTarget"/>
@@ -231,18 +230,17 @@
             var cancel = !aTarget.dispatchEvent(event);
             if (aTarget.hasAttribute("on" + aEventName)) {
               var fn = new Function("event", aTarget.getAttribute("on" + aEventName));
               var rv = fn.call(aTarget, event);
               if (rv == false)
                 cancel = true;
             }
             return !cancel;
-          }
-          catch (e) {
+          } catch (e) {
             Components.utils.reportError(e);
           }
           return false;
         ]]>
         </body>
       </method>
 
       <method name="resetHover">
@@ -487,18 +485,17 @@
             var cancel = !aTarget.dispatchEvent(event);
             if (aTarget.hasAttribute("on" + aEventName)) {
               var fn = new Function("event", aTarget.getAttribute("on" + aEventName));
               var rv = fn.call(aTarget, event);
               if (rv == false)
                 cancel = true;
             }
             return !cancel;
-          }
-          catch (e) {
+          } catch (e) {
             dump(e);
           }
           return false;
         ]]>
         </body>
       </method>
 
       <method name="showPopup">
--- a/toolkit/content/widgets/datetimepicker.xml
+++ b/toolkit/content/widgets/datetimepicker.xml
@@ -292,18 +292,17 @@
             return (this.hour >= 12);
           ]]>
         </getter>
         <setter>
           <![CDATA[
             if (val) {
               if (this.hour < 12)
                 this.hour += 12;
-            }
-            else if (this.hour >= 12)
+            } else if (this.hour >= 12)
               this.hour -= 12;
             return val;
           ]]>
         </setter>
       </property>
       <property name="hideSeconds">
         <getter>
           return (this.getAttribute("hideseconds") == "true");
@@ -362,28 +361,25 @@
 
             var field = this._currentField;
             if (this._valueEntered)
               this._setValueOnChange(field);
 
             if (field == this._fieldAMPM) {
               this.isPM = !this.isPM;
               this._fireEvent("change", this);
-            }
-            else {
+            } else {
               var oldval;
               var change = aDir;
               if (field == this.hourField) {
                 oldval = this.hour;
-              }
-              else if (field == this.minuteField) {
+              } else if (field == this.minuteField) {
                 oldval = this.minute;
                 change *= this.increment;
-              }
-              else if (field == this.secondField) {
+              } else if (field == this.secondField) {
                 oldval = this.second;
               }
 
               var newval = this._constrainValue(field, oldval + change, false);
 
               if (field == this.hourField)
                 this.hour = newval;
               else if (field == this.minuteField)
@@ -428,28 +424,25 @@
             var prependZero = false;
             if (aField == this.hourField) {
               prependZero = this.hourLeadingZero;
               if (!this.is24HourClock) {
                 if (aValue >= 12) {
                   if (aValue > 12)
                     aValue -= 12;
                   this._fieldAMPM.value = this.pmIndicator;
-                }
-                else {
+                } else {
                   if (aValue == 0)
                     aValue = 12;
                   this._fieldAMPM.value = this.amIndicator;
                 }
               }
-            }
-            else if (aField == this.minuteField) {
+            } else if (aField == this.minuteField) {
               prependZero = this.minuteLeadingZero;
-            }
-            else if (aField == this.secondField) {
+            } else if (aField == this.secondField) {
               prependZero = this.secondLeadingZero;
             }
 
             if (prependZero && aValue < 10)
               aField.value = "0" + aValue;
             else
               aField.value = aValue;
           ]]>
@@ -509,18 +502,17 @@
                   var mcontainer = mfield.parentNode;
                   mcontainer.insertBefore(mfield, mcontainer.firstChild);
                 }
                 var size = (numberFields[1] || numberFields[7]).length;
                 if (this.pmIndicator.length > size)
                   size = this.pmIndicator.length;
                 this._fieldAMPM.size = size;
                 this._fieldAMPM.maxLength = size;
-              }
-              else {
+              } else {
                 this._fieldAMPM.parentNode.collapsed = true;
               }
             }
 
             this.hideSeconds = this.hideSeconds;
           ]]>
         </body>
       </method>
@@ -676,26 +668,24 @@
           <![CDATA[
             if (aField == this.yearField) {
               let oldDate = this.date;
               this._dateValue.setFullYear(aValue);
               if (oldDate != this.date) {
                 this._dateValue.setDate(0);
                 this._updateUI(this.dateField, this.date);
               }
-            }
-            else if (aField == this.monthField) {
+            } else if (aField == this.monthField) {
               let oldDate = this.date;
               this._dateValue.setMonth(aValue);
               if (oldDate != this.date) {
                 this._dateValue.setDate(0);
                 this._updateUI(this.dateField, this.date);
               }
-            }
-            else if (aField == this.dateField) {
+            } else if (aField == this.dateField) {
               this._dateValue.setDate(aValue);
             }
 
             this.setAttribute("value", this.value);
             this._updateUI(aField, aValue);
 
             if (this.attachedControl)
               this.attachedControl._setValueNoSync(this._dateValue);
@@ -710,22 +700,20 @@
             this._valueEntered = false;
 
             var prependZero = false;
             if (aField == this.yearField) {
               if (this.yearLeadingZero) {
                 aField.value = ("000" + aValue).slice(-4);
                 return;
               }
-            }
-            else if (aField == this.monthField) {
+            } else if (aField == this.monthField) {
               aValue++;
               prependZero = this.monthLeadingZero;
-            }
-            else if (aField == this.dateField) {
+            } else if (aField == this.dateField) {
               prependZero = this.dateLeadingZero;
             }
             if (prependZero && aValue < 10)
               aField.value = "0" + aValue;
             else
               aField.value = aValue;
           ]]>
         </body>
@@ -1047,33 +1035,31 @@
             var currentMonth;
             if (aCheckMonth) {
               if (!this._displayedDate)
                 this._displayedDate = this.dateValue;
 
               var expectedMonth = aValue;
               if (aField == this.monthField) {
                 this._displayedDate.setMonth(aValue);
-              }
-              else {
+              } else {
                 expectedMonth = this._displayedDate.getMonth();
                 this._displayedDate.setFullYear(aValue);
               }
 
               if (expectedMonth != -1 && expectedMonth != 12 &&
                   expectedMonth != this._displayedDate.getMonth()) {
                 // If the month isn't what was expected, then the month overflowed.
                 // Setting the date to 0 will go back to the last day of the right month.
                 this._displayedDate.setDate(0);
               }
 
               date = new Date(this._displayedDate);
               currentMonth = this._displayedDate.getMonth();
-            }
-            else {
+            } else {
               var samemonth = (this._displayedDate &&
                                this._displayedDate.getMonth() == this.month &&
                                this._displayedDate.getFullYear() == this.year);
               if (samemonth) {
                 var items = this.dateField.getElementsByAttribute("value", this.date);
                 if (items.length)
                   this.selectedItem = items[0];
                 return;
@@ -1118,18 +1104,17 @@
                     item.setAttribute("today", "true");
                   }
 
                   // highlight the selected date
                   if (this._isSameDay(this._dateValue, date)) {
                     this._selectedItem = item;
                     item.setAttribute("selected", "true");
                   }
-                }
-                else {
+                } else {
                   item.value = "";
                 }
 
                 date.setDate(date.getDate() + 1);
               }
             }
 
             this._fireEvent("monthchange", this);
--- a/toolkit/content/widgets/dialog.xml
+++ b/toolkit/content/widgets/dialog.xml
@@ -181,19 +181,18 @@
                 }
 
                 if (initialFocusedElt.localName == "tab") {
                   if (focusedElt.hasAttribute("dlgtype")) {
                     // We don't want to focus on anonymous OK, Cancel, etc. buttons,
                     // so return focus to the tab itself
                     initialFocusedElt.focus();
                   }
-                }
-                else if (!/Mac/.test(navigator.platform) &&
-                         focusedElt.hasAttribute("dlgtype") && focusedElt != defaultButton) {
+                } else if (!/Mac/.test(navigator.platform) &&
+                           focusedElt.hasAttribute("dlgtype") && focusedElt != defaultButton) {
                   defaultButton.focus();
                 }
               }
             }
 
             try {
               if (defaultButton)
                 window.notifyDefaultButtonLoaded(defaultButton);
@@ -326,21 +325,20 @@
           var oldDefaultButton = this.getButton(this.defaultButton);
           if (oldDefaultButton)
             oldDefaultButton.removeAttribute("default");
 
           var newDefaultButton = this.getButton(aNewDefault);
           if (newDefaultButton) {
             this.setAttribute("defaultButton", aNewDefault);
             newDefaultButton.setAttribute("default", "true");
-          }
-          else {
+          } else {
             this.setAttribute("defaultButton", "none");
             if (aNewDefault != "none")
-              dump("invalid new default button: " +  aNewDefault + ", assuming: none\n");
+              dump("invalid new default button: " + aNewDefault + ", assuming: none\n");
           }
         ]]>
         </body>
       </method>
 
       <method name="_handleButtonCommand">
         <parameter name="aEvent"/>
         <body>
--- a/toolkit/content/widgets/editor.xml
+++ b/toolkit/content/widgets/editor.xml
@@ -21,39 +21,34 @@
             this.makeEditable(this.editortype, true);
         ]]>
       </constructor>
       <destructor/>
 
       <field name="_editorContentListener">
         <![CDATA[
           ({
-            QueryInterface(iid)
-            {
+            QueryInterface(iid) {
               if (iid.equals(Components.interfaces.nsIURIContentListener) ||
                   iid.equals(Components.interfaces.nsISupportsWeakReference) ||
                   iid.equals(Components.interfaces.nsISupports))
               return this;
 
               throw Components.results.NS_ERROR_NO_INTERFACE;
             },
-            onStartURIOpen(uri)
-            {
+            onStartURIOpen(uri) {
               return false;
             },
-            doContent(contentType, isContentPreferred, request, contentHandler)
-            {
+            doContent(contentType, isContentPreferred, request, contentHandler) {
               return false;
             },
-            isPreferred(contentType, desiredContentType)
-            {
+            isPreferred(contentType, desiredContentType) {
               return false;
             },
-            canHandleContent(contentType, isContentPreferred, desiredContentType)
-            {
+            canHandleContent(contentType, isContentPreferred, desiredContentType) {
               return false;
             },
             loadCookie: null,
             parentContentListener: null
           })
         ]]>
       </field>
       <method name="makeEditable">
--- a/toolkit/content/widgets/filefield.xml
+++ b/toolkit/content/widgets/filefield.xml
@@ -32,44 +32,41 @@
       <field name="_file">null</field>
       <property name="file"  onget="return this._file">
         <setter>
         <![CDATA[
           this._file = val;
           if (val) {
             this.image = this._getIconURLForFile(val);
             this.label = this._getDisplayNameForFile(val);
-          }
-          else {
+          } else {
             this.removeAttribute("image");
             var bundle = document.getAnonymousElementByAttribute(this, "anonid", "bundle");
             this.label = bundle.getString("downloadHelperNoneSelected");
           }
           return val;
         ]]>
         </setter>
       </property>
       <method name="_getDisplayNameForFile">
         <parameter name="aFile"/>
         <body>
         <![CDATA[
           if (/Win/.test(navigator.platform)) {
             var lfw = aFile.QueryInterface(Components.interfaces.nsILocalFileWin);
             try {
               return lfw.getVersionInfoField("FileDescription");
-            }
-            catch (e) {
+            } catch (e) {
               // fall through to the filename
             }
           } else if (/Mac/.test(navigator.platform)) {
             var lfm = aFile.QueryInterface(Components.interfaces.nsILocalFileMac);
             try {
               return lfm.bundleDisplayName;
-            }
-            catch (e) {
+            } catch (e) {
               // fall through to the file name
             }
           }
           var ios = Components.classes["@mozilla.org/network/io-service;1"]
                               .getService(Components.interfaces.nsIIOService);
           var url = ios.newFileURI(aFile).QueryInterface(Components.interfaces.nsIURL);
           return url.fileName;
         ]]>
--- a/toolkit/content/widgets/findbar.xml
+++ b/toolkit/content/widgets/findbar.xml
@@ -798,18 +798,17 @@
               this._xulBrowserWindow =
                 window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                       .getInterface(Components.interfaces.nsIWebNavigation)
                       .QueryInterface(Components.interfaces.nsIDocShellTreeItem)
                       .treeOwner
                       .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                       .getInterface(Components.interfaces.nsIXULWindow)
                       .XULBrowserWindow;
-            }
-            catch (ex) { }
+            } catch (ex) { }
             if (!this._xulBrowserWindow)
               return false;
           }
 
           // Call this has the same effect like hovering over link,
           // the browser shows the URL as a tooltip.
           this._xulBrowserWindow.setOverLink(aFoundURL || "", null);
           return true;
--- a/toolkit/content/widgets/listbox.xml
+++ b/toolkit/content/widgets/listbox.xml
@@ -583,18 +583,17 @@
           this.toggleItemSelection(this.currentItem);
       ]]>
       </handler>
       <handler event="focus">
       <![CDATA[
         if (this.getRowCount() > 0) {
           if (this.currentIndex == -1) {
             this.currentIndex = this.getIndexOfFirstVisibleRow();
-          }
-          else {
+          } else {
             this.currentItem._fireEvent("DOMMenuItemActive");
           }
         }
         this._lastKeyTime = 0;
       ]]>
       </handler>
       <handler event="keypress" phase="target">
       <![CDATA[
@@ -821,18 +820,17 @@
     <handlers>
       <handler event="keypress" key=" " phase="target">
         <![CDATA[
           if (this.currentItem) {
             if (this.currentItem.getAttribute("type") != "checkbox") {
               this.addItemToSelection(this.currentItem);
               // Prevent page from scrolling on the space key.
               event.preventDefault();
-            }
-            else if (!this.currentItem.disabled) {
+            } else if (!this.currentItem.disabled) {
               this.currentItem.checked = !this.currentItem.checked;
               this.currentItem.doCommand();
               // Prevent page from scrolling on the space key.
               event.preventDefault();
             }
           }
         ]]>
       </handler>
@@ -986,26 +984,23 @@
       <handler event="click" button="0">
       <![CDATA[
         var control = this.control;
         if (!control || control.disabled)
           return;
         control._userSelecting = true;
         if (control.selType != "multiple") {
           control.selectItem(this);
-        }
-        else if (event.ctrlKey || event.metaKey) {
+        } else if (event.ctrlKey || event.metaKey) {
           control.toggleItemSelection(this);
           control.currentItem = this;
-        }
-        else if (event.shiftKey) {
+        } else if (event.shiftKey) {
           control.selectItemRange(null, this);
           control.currentItem = this;
-        }
-        else {
+        } else {
           /* We want to deselect all the selected items except what was
             clicked, UNLESS it was a right-click.  We have to do this
             in click rather than mousedown so that you can drag a
             selected group of items */
 
           // use selectItemRange instead of selectItem, because this
           // doesn't de- and reselect this item if it is selected
           control.selectItemRange(this, this);
--- a/toolkit/content/widgets/menulist.xml
+++ b/toolkit/content/widgets/menulist.xml
@@ -196,18 +196,17 @@
           ]]>
         </getter>
         <setter>
           <![CDATA[
             var popup = this.menupopup;
             if (popup && 0 <= val) {
               if (val < popup.childNodes.length)
                 this.selectedItem = popup.childNodes[val];
-            }
-            else
+            } else
               this.selectedItem = null;
             return val;
           ]]>
         </setter>
       </property>
 
       <property name="selectedItem">
         <getter>
@@ -231,26 +230,24 @@
 
             this.mSelectedInternal = val;
             let attributeFilter = ["value", "label", "image", "description"];
             if (val) {
               val.setAttribute('selected', 'true');
               for (let attr of attributeFilter) {
                 if (val.hasAttribute(attr)) {
                   this.setAttribute(attr, val.getAttribute(attr));
-                }
-                else {
+                } else {
                   this.removeAttribute(attr);
                 }
               }
 
               this.mAttributeObserver = new MutationObserver(this.handleMutation.bind(this));
               this.mAttributeObserver.observe(val, { attributeFilter });
-            }
-            else {
+            } else {
               for (let attr of attributeFilter) {
                 this.removeAttribute(attr);
               }
             }
 
             var event = document.createEvent("Events");
             event.initEvent("select", true, true);
             this.dispatchEvent(event);
@@ -274,18 +271,17 @@
                 let attrName = record.attributeName;
                 switch (attrName) {
                   case "value":
                   case "label":
                   case "image":
                   case "description":
                     if (t.hasAttribute(attrName)) {
                       this.setAttribute(attrName, t.getAttribute(attrName));
-                    }
-                    else {
+                    } else {
                       this.removeAttribute(attrName);
                     }
                 }
               }
             }
           ]]>
         </body>
       </method>
@@ -504,18 +500,17 @@
             // This doesn't touch inputField.value or "value" and "label" attributes
             this.setSelectionInternal(val);
             if (val) {
               // Editable menulist uses "label" as its "value"
               var label = val.getAttribute('label');
               this.inputField.value = label;
               this.setAttribute('value', label);
               this.setAttribute('label', label);
-            }
-            else {
+            } else {
               this.inputField.value = "";
               this.removeAttribute('value');
               this.removeAttribute('label');
             }
 
             var event = document.createEvent("Events");
             event.initEvent("select", true, true);
             this.dispatchEvent(event);
--- a/toolkit/content/widgets/notification.xml
+++ b/toolkit/content/widgets/notification.xml
@@ -275,18 +275,17 @@
               aNotification.style.removeProperty("top");
               aNotification.style.removeProperty("margin-top");
               aNotification.style.removeProperty("opacity");
 
               if (skipAnimation) {
                 this._setBlockingState(this.currentNotification);
                 return;
               }
-            }
-            else {
+            } else {
               this._closedNotification = aNotification;
               var notifications = this.allNotifications;
               var idx = notifications.length - 1;
               this.currentNotification = (idx >= 0) ? notifications[idx] : null;
 
               if (skipAnimation) {
                 this._removeNotificationElement(this._closedNotification);
                 this._closedNotification = null;
@@ -350,20 +349,18 @@
                                     getService(Components.interfaces.nsIPrefBranch);
                 bgcolor = prefService.getCharPref("browser.display.background_color");
 
                 var win = content.contentWindow;
                 var context = canvas.getContext("2d");
                 context.globalAlpha = 0.5;
                 context.drawWindow(win, win.scrollX, win.scrollY,
                                    width, height, bgcolor);
-              }
-              catch (ex) { }
-            }
-            else if (canvas) {
+              } catch (ex) { }
+            } else if (canvas) {
               canvas.parentNode.removeChild(canvas);
               this._blockingCanvas = null;
               let content = this.firstChild;
               if (content)
                 content.collapsed = false;
             }
           ]]>
         </body>
@@ -464,18 +461,17 @@
             if (!("buttonInfo" in aEvent.target))
               return;
 
             var button = aEvent.target.buttonInfo;
             if (button.popup) {
               document.getElementById(button.popup).
                 openPopup(aEvent.originalTarget, "after_start", 0, 0, false, false, aEvent);
               aEvent.stopPropagation();
-            }
-            else {
+            } else {
               var callback = button.callback;
               if (callback) {
                 var result = callback(this, button, aEvent.target);
                 if (!result)
                   this.close();
                 aEvent.stopPropagation();
               }
             }
--- a/toolkit/content/widgets/numberbox.xml
+++ b/toolkit/content/widgets/numberbox.xml
@@ -182,21 +182,19 @@
       </method>
 
       <method name="_enableDisableButtons">
         <body>
           <![CDATA[
             var buttons = this.spinButtons;
             if (this.wrapAround) {
               buttons.decreaseDisabled = buttons.increaseDisabled = false;
-            }
-            else if (this.disabled || this.readOnly) {
+            } else if (this.disabled || this.readOnly) {
               buttons.decreaseDisabled = buttons.increaseDisabled = true;
-            }
-            else {
+            } else {
               buttons.decreaseDisabled = (this.valueNumber <= this.min);
               buttons.increaseDisabled = (this.valueNumber >= this.max);
             }
           ]]>
         </body>
       </method>
 
       <method name="_validateValue">
--- a/toolkit/content/widgets/popup.xml
+++ b/toolkit/content/widgets/popup.xml
@@ -419,37 +419,34 @@
           arrowbox.style.transform = "translate(0, " + -offset + "px)";
 
           // The assigned side stays the same regardless of direction.
           var isRTL = (window.getComputedStyle(this).direction == "rtl");
 
           if (position.indexOf("start_") == 0) {
             container.dir = "reverse";
             this.setAttribute("side", isRTL ? "left" : "right");
-          }
-          else {
+          } else {
             container.dir = "";
             this.setAttribute("side", isRTL ? "right" : "left");
           }
-        }
-        else if (position.indexOf("before_") == 0 || position.indexOf("after_") == 0) {
+        } else if (position.indexOf("before_") == 0 || position.indexOf("after_") == 0) {
           container.orient = "";
           arrowbox.orient = "";
           if (position.indexOf("_end") > 0) {
             arrowbox.pack = "end";
           } else {
             arrowbox.pack = "start";
           }
           arrowbox.style.transform = "translate(" + -offset + "px, 0)";
 
           if (position.indexOf("before_") == 0) {
             container.dir = "reverse";
             this.setAttribute("side", "bottom");
-          }
-          else {
+          } else {
             container.dir = "";
             this.setAttribute("side", "top");
           }
         }
         ]]>
         </body>
       </method>
     </implementation>
@@ -467,37 +464,34 @@
           this.setAttribute("animate", "open");
         }
 
         // set fading
         var fade = this.getAttribute("fade");
         var fadeDelay = 0;
         if (fade == "fast") {
           fadeDelay = 1;
-        }
-        else if (fade == "slow") {
+        } else if (fade == "slow") {
           fadeDelay = 4000;
-        }
-        else {
+        } else {
           return;
         }
 
         this._fadeTimer = setTimeout(() => this.hidePopup(true), fadeDelay, this);
       ]]>
       </handler>
       <handler event="popuphiding" phase="target">
         let animate = (this.getAttribute("animate") != "false");
 
         if (this._fadeTimer) {
           clearTimeout(this._fadeTimer);
           if (animate) {
             this.setAttribute("animate", "fade");
           }
-        }
-        else if (animate) {
+        } else if (animate) {
           this.setAttribute("animate", "cancel");
         }
       </handler>
       <handler event="popupshown" phase="target">
         this.setAttribute("panelopen", "true");
       </handler>
       <handler event="popuphidden" phase="target">
         this.removeAttribute("panelopen");
--- a/toolkit/content/widgets/preferences.xml
+++ b/toolkit/content/widgets/preferences.xml
@@ -69,18 +69,17 @@
         <parameter name="aPreference"/>
         <body>
         <![CDATA[
           // Value changed, synthesize an event
           try {
             var event = document.createEvent("Events");
             event.initEvent("change", true, true);
             aPreference.dispatchEvent(event);
-          }
-          catch (e) {
+          } catch (e) {
             Components.utils.reportError(e);
           }
         ]]>
         </body>
       </method>
 
       <field name="service">
         Components.classes["@mozilla.org/preferences-service;1"]
@@ -149,18 +148,17 @@
             for (var l = 0; (l < parentPrefs.length && !preference); ++l) {
               if (parentPrefs[l].localName == "preference")
                 preference = parentPrefs[l];
             }
           }
 
           // Don't use the value setter here, we don't want updateElements to be prematurely fired.
           this._value = preference ? preference.value : this.valueFromPreferences;
-        }
-        else
+        } else
           this._value = this.valueFromPreferences;
         this.preferences._constructAfterChildren();
       ]]>
       </constructor>
       <destructor>
         this.preferences.rootBranchInternal
             .removeObserver(this.name, this.preferences);
       </destructor>
@@ -351,18 +349,17 @@
               return fontEnumerator.getStandardFamilyName(family);
             case "file":
               var f = this._branch
                           .getComplexValue(this.name, Components.interfaces.nsILocalFile);
               return f;
             default:
               this._reportUnknownType();
             }
-          }
-          catch (e) { }
+          } catch (e) { }
           return null;
         ]]>
         </getter>
         <setter>
         <![CDATA[
           // Exit early if nothing to do.
           if (this.readonly || this.valueFromPreferences == val)
             return val;
@@ -400,18 +397,17 @@
           case "file":
             var lf;
             if (typeof(val) == "string") {
               lf = Components.classes["@mozilla.org/file/local;1"]
                              .createInstance(Components.interfaces.nsILocalFile);
               lf.persistentDescriptor = val;
               if (!lf.exists())
                 lf.initWithPath(val);
-            }
-            else
+            } else
               lf = val.QueryInterface(Components.interfaces.nsILocalFile);
             this.preferences.rootBranch
                 .setComplexValue(this.name, Components.interfaces.nsILocalFile, lf);
             break;
           default:
             this._reportUnknownType();
           }
           if (!this.batching)
@@ -435,18 +431,17 @@
           if (aElement.hasAttribute("onsyncfrompreference")) {
             // Value changed, synthesize an event
             try {
               var event = document.createEvent("Events");
               event.initEvent("syncfrompreference", true, true);
               var f = new Function("event",
                                    aElement.getAttribute("onsyncfrompreference"));
               rv = f.call(aElement, event);
-            }
-            catch (e) {
+            } catch (e) {
               Components.utils.reportError(e);
             }
           }
           var val = rv;
           if (val === undefined)
             val = this.instantApply ? this.valueFromPreferences : this.value;
           // if the preference is marked for reset, show default value in UI
           if (val === undefined)
@@ -471,18 +466,17 @@
           else if (aElement.localName == "colorpicker")
             setValue(aElement, "color", val);
           else if (aElement.localName == "textbox") {
             // XXXmano Bug 303998: Avoid a caret placement issue if either the
             // preference observer or its setter calls updateElements as a result
             // of the input event handler.
             if (aElement.value !== val)
               setValue(aElement, "value", val);
-          }
-          else
+          } else
             setValue(aElement, "value", val);
         ]]>
         </body>
       </method>
 
       <method name="getElementValue">
         <parameter name="aElement"/>
         <body>
@@ -492,18 +486,17 @@
             try {
               var event = document.createEvent("Events");
               event.initEvent("synctopreference", true, true);
               var f = new Function("event",
                                    aElement.getAttribute("onsynctopreference"));
               var rv = f.call(aElement, event);
               if (rv !== undefined)
                 return rv;
-            }
-            catch (e) {
+            } catch (e) {
               Components.utils.reportError(e);
             }
           }
 
           /**
            * Read the value of an attribute from an element, assuming the
            * attribute is a property on the element's node API. If the property
            * is not present in the API, then assume its value is contained in
@@ -660,18 +653,17 @@
             this.lastSelected = "";
           }
         }
 
         var paneToLoad;
         if ("arguments" in window && window.arguments[0] && document.getElementById(window.arguments[0]) && document.getElementById(window.arguments[0]).nodeName == "prefpane") {
           paneToLoad = document.getElementById(window.arguments[0]);
           this.lastSelected = paneToLoad.id;
-        }
-        else if (lastPane)
+        } else if (lastPane)
           paneToLoad = lastPane;
         else
           paneToLoad = panes[0];
 
         for (var i = 0; i < panes.length; ++i) {
           this._makePaneButton(panes[i]);
           if (panes[i].loaded) {
             // Inline pane content, fire load event to force initialization.
@@ -758,34 +750,31 @@
         <parameter name="aPaneElement"/>
         <body>
         <![CDATA[
           if (!aPaneElement)
             return;
 
           this._selector.selectedItem = document.getAnonymousElementByAttribute(this, "pane", aPaneElement.id);
           if (!aPaneElement.loaded) {
-            let OverlayLoadObserver = function(aPane)
-            {
+            let OverlayLoadObserver = function(aPane) {
               this._pane = aPane;
             }
             OverlayLoadObserver.prototype = {
               _outer: this,
-              observe(aSubject, aTopic, aData)
-              {
+              observe(aSubject, aTopic, aData) {
                 this._pane.loaded = true;
                 this._outer._fireEvent("paneload", this._pane);
                 this._outer._selectPane(this._pane);
               }
             };
 
             var obs = new OverlayLoadObserver(aPaneElement);
             document.loadOverlay(aPaneElement.src, obs);
-          }
-          else
+          } else
             this._selectPane(aPaneElement);
         ]]>
         </body>
       </method>
 
       <method name="_fireEvent">
         <parameter name="aEventName"/>
         <parameter name="aTarget"/>
@@ -798,18 +787,17 @@
             var cancel = !aTarget.dispatchEvent(event);
             if (aTarget.hasAttribute("on" + aEventName)) {
               var fn = new Function("event", aTarget.getAttribute("on" + aEventName));
               var rv = fn.call(aTarget, event);
               if (rv == false)
                 cancel = true;
             }
             return !cancel;
-          }
-          catch (e) {
+          } catch (e) {
             Components.utils.reportError(e);
           }
           return false;
         ]]>
         </body>
       </method>
 
       <field name="_initialized">false</field>
@@ -853,18 +841,17 @@
                 this.lastSelected = aPaneElement.id;
                 this.currentPane = aPaneElement;
                 this._initialized = true;
 
                 // Only animate if we've switched between prefpanes
                 if (this._shouldAnimate && oldPane.id != aPaneElement.id) {
                   aPaneElement.style.opacity = 0.0;
                   this.animate(oldPane, aPaneElement);
-                }
-                else if (!this._shouldAnimate && prefpanes.length > 1) {
+                } else if (!this._shouldAnimate && prefpanes.length > 1) {
                   var targetHeight = parseInt(window.getComputedStyle(this._paneDeckContainer, "").height);
                   var verticalPadding = parseInt(window.getComputedStyle(aPaneElement, "").paddingTop);
                   verticalPadding += parseInt(window.getComputedStyle(aPaneElement, "").paddingBottom);
                   if (aPaneElement.contentHeight > targetHeight - verticalPadding) {
                     // To workaround the bottom border of a groupbox from being
                     // cutoff an hbox with a class of bottomBox may enclose it.
                     // This needs to include its padding to resize properly.
                     // See bug 394433
@@ -891,18 +878,17 @@
       <property name="_shouldAnimate">
         <getter>
         <![CDATA[
           var psvc = Components.classes["@mozilla.org/preferences-service;1"]
                                .getService(Components.interfaces.nsIPrefBranch);
           var animate = /Mac/.test(navigator.platform);
           try {
             animate = psvc.getBoolPref("browser.preferences.animateFadeIn");
-          }
-          catch (e) { }
+          } catch (e) { }
           return animate;
         ]]>
         </getter>
       </property>
 
       <method name="animate">
         <parameter name="aOldPane"/>
         <parameter name="aNewPane"/>
@@ -945,18 +931,17 @@
           if (!document)
             aTimer.cancel();
 
           if (aTimer == this._animateTimer) {
             var increment = this._sizeIncrement;
             if (increment != 0) {
               window.innerHeight += increment;
               this._currentHeight += increment;
-            }
-            else {
+            } else {
               aTimer.cancel();
               this._setUpFadeTimer();
             }
           } else if (aTimer == this._fadeTimer) {
             var elt = document.getElementById(this.lastSelected);
             var newOpacity = parseFloat(window.getComputedStyle(elt, "").opacity) + this._fadeIncrement;
             if (newOpacity < 1.0)
               elt.style.opacity = newOpacity;
@@ -1041,18 +1026,17 @@
         <![CDATA[
           var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                              .getService(Components.interfaces.nsIWindowMediator);
           var win = aWindowType ? wm.getMostRecentWindow(aWindowType) : null;
           if (win) {
             if ("initWithParams" in win)
               win.initWithParams(aParams);
             win.focus();
-          }
-          else {
+          } else {
             var features = "resizable,dialog=no,centerscreen" + (aFeatures != "" ? ("," + aFeatures) : "");
             var parentWindow = (this.instantApply || !window.opener || window.opener.closed) ? window : window.opener;
             win = parentWindow.openDialog(aURL, "_blank", features, aParams);
           }
           return win;
         ]]>
         </body>
       </method>
@@ -1068,18 +1052,17 @@
                     .getService(Components.interfaces.nsIScriptSecurityManager);
         if (this.type == "child" && window.opener &&
             secMan.isSystemPrincipal(window.opener.document.nodePrincipal)) {
           var pdocEl = window.opener.document.documentElement;
           if (pdocEl.instantApply) {
             let panes = this.preferencePanes;
             for (let i = 0; i < panes.length; ++i)
               panes[i].writePreferences(true);
-          }
-          else {
+          } else {
             // Clone all the preferences elements from the child document and
             // insert them into the pane collection of the parent.
             var pdoc = window.opener.document;
             if (pdoc.documentElement.localName == "prefwindow") {
               var currentPane = pdoc.documentElement.currentPane;
               var id = window.location.href + "#childprefs";
               var childPrefs = pdoc.getElementById(id);
               if (!childPrefs) {
@@ -1112,18 +1095,17 @@
                     preference.readonly = preferences[j].readonly;
                     preference.disabled = preferences[j].disabled;
                   }
                   preference.value = preferences[j].value;
                 }
               }
             }
           }
-        }
-        else {
+        } else {
           let panes = this.preferencePanes;
           for (var i = 0; i < panes.length; ++i)
             panes[i].writePreferences(false);
 
           let psvc = Components.classes["@mozilla.org/preferences-service;1"]
                                .getService(Components.interfaces.nsIPrefService);
           psvc.savePrefFile(null);
         }
@@ -1365,18 +1347,17 @@
       <handler event="paneload">
       <![CDATA[
         // Initialize all values from preferences.
         var elements = this.preferenceElements;
         for (var i = 0; i < elements.length; ++i) {
           try {
             var preference = this.preferenceForElement(elements[i]);
             preference.setElementValue(elements[i]);
-          }
-          catch (e) {
+          } catch (e) {
             dump("*** No preference found for " + elements[i].getAttribute("preference") + "\n");
           }
         }
       ]]>
       </handler>
     </handlers>
   </binding>
 
--- a/toolkit/content/widgets/radio.xml
+++ b/toolkit/content/widgets/radio.xml
@@ -119,18 +119,17 @@
           var focused = this.getAttribute("focused") == "true";
           var alreadySelected = false;
 
           if (val) {
             alreadySelected = val.getAttribute("selected") == "true";
             val.setAttribute("focused", focused);
             val.setAttribute("selected", "true");
             this.setAttribute("value", val.value);
-          }
-          else {
+          } else {
             this.removeAttribute("value");
           }
 
           // uncheck all other group nodes
           var children = this._getRadioChildren();
           var previousItem = null;
           for (var i = 0; i < children.length; ++i) {
             if (children[i] != val) {
@@ -213,18 +212,17 @@
               if (i == index)
                 break;
             }
             while (children[i].hidden || children[i].collapsed || children[i].disabled);
             // XXX check for display/visibility props too
 
             this.selectedItem = children[i];
             children[i].doCommand();
-          }
-          else {
+          } else {
             do {
               if (i == 0)
                 i = children.length;
               if (--i == index)
                 break;
             }
             while (children[i].hidden || children[i].collapsed || children[i].disabled);
             // XXX check for display/visibility props too
--- a/toolkit/content/widgets/richlistbox.xml
+++ b/toolkit/content/widgets/richlistbox.xml
@@ -369,18 +369,17 @@
                   this._currentIndex - 1, this.getRowCount()));
               if (currentItem) {
                 this.currentItem = currentItem;
                 if (this.selType != "multiple" && this.selectedCount == 0)
                   this.selectedItem = currentItem;
 
                 if (this.scrollBoxObject.height) {
                   this.ensureElementIsVisible(currentItem);
-                }
-                else {
+                } else {
                   // XXX hack around a bug in ensureElementIsVisible as it will
                   // scroll beyond the last element, bug 493645.
                   var previousElement = this.dir == "reverse" ? currentItem.nextSibling :
                                                                 currentItem.previousSibling;
                   this.ensureElementIsVisible(previousElement);
                 }
               }
               this._suppressOnSelect = suppressSelect;
--- a/toolkit/content/widgets/scrollbox.xml
+++ b/toolkit/content/widgets/scrollbox.xml
@@ -78,18 +78,17 @@
 
       <field name="_scrollIncrement">null</field>
       <property name="scrollIncrement" readonly="true">
         <getter><![CDATA[
           if (this._scrollIncrement === null) {
             try {
               this._scrollIncrement = this._prefBranch
                                           .getIntPref("toolkit.scrollbox.scrollIncrement");
-            }
-            catch (ex) {
+            } catch (ex) {
               this._scrollIncrement = 20;
             }
           }
           return this._scrollIncrement;
         ]]></getter>
       </property>
 
       <field name="_smoothScroll">null</field>
@@ -97,18 +96,17 @@
         <getter><![CDATA[
           if (this._smoothScroll === null) {
             if (this.hasAttribute("smoothscroll")) {
               this._smoothScroll = (this.getAttribute("smoothscroll") == "true");
             } else {
               try {
                 this._smoothScroll = this._prefBranch
                                          .getBoolPref("toolkit.scrollbox.smoothScroll");
-              }
-              catch (ex) {
+              } catch (ex) {
                 this._smoothScroll = true;
               }
             }
           }
           return this._smoothScroll;
         ]]></getter>
         <setter><![CDATA[
           this._smoothScroll = val;
@@ -599,26 +597,24 @@
       <method name="_updateScrollButtonsDisabledState">
         <body><![CDATA[
           var scrolledToStart = false;
           var scrolledToEnd = false;
 
           if (this.hasAttribute("notoverflowing")) {
             scrolledToStart = true;
             scrolledToEnd = true;
-          }
-          else if (this.scrollPosition == 0) {
+          } else if (this.scrollPosition == 0) {
             // In the RTL case, this means the _last_ element in the
             // scrollbox is visible
             if (this._isRTLScrollbox)
               scrolledToEnd = true;
             else
               scrolledToStart = true;
-          }
-          else if (this.scrollClientSize + this.scrollPosition == this.scrollSize) {
+          } else if (this.scrollClientSize + this.scrollPosition == this.scrollSize) {
             // In the RTL case, this means the _first_ element in the
             // scrollbox is visible
             if (this._isRTLScrollbox)
               scrolledToStart = true;
             else
               scrolledToEnd = true;
           }
 
@@ -643,26 +639,25 @@
         if (this.orient == "vertical") {
           doScroll = true;
           if (event.deltaMode == event.DOM_DELTA_PIXEL)
             scrollAmount = event.deltaY;
           else if (event.deltaMode == event.DOM_DELTA_PAGE)
             scrollAmount = event.deltaY * this.scrollClientSize;
           else
             scrollAmount = event.deltaY * this.lineScrollAmount;
-        }
-        // We allow vertical scrolling to scroll a horizontal scrollbox
-        // because many users have a vertical scroll wheel but no
-        // horizontal support.
-        // Because of this, we need to avoid scrolling chaos on trackpads
-        // and mouse wheels that support simultaneous scrolling in both axes.
-        // We do this by scrolling only when the last two scroll events were
-        // on the same axis as the current scroll event.
-        // For diagonal scroll events we only respect the dominant axis.
-        else {
+        } else {
+          // We allow vertical scrolling to scroll a horizontal scrollbox
+          // because many users have a vertical scroll wheel but no
+          // horizontal support.
+          // Because of this, we need to avoid scrolling chaos on trackpads
+          // and mouse wheels that support simultaneous scrolling in both axes.
+          // We do this by scrolling only when the last two scroll events were
+          // on the same axis as the current scroll event.
+          // For diagonal scroll events we only respect the dominant axis.
           let isVertical = Math.abs(event.deltaY) > Math.abs(event.deltaX);
           let delta = isVertical ? event.deltaY : event.deltaX;
           let scrollByDelta = isVertical && this._isRTLScrollbox ? -delta : delta;
 
           if (this._prevMouseScrolls.every(prev => prev == isVertical)) {
             doScroll = true;
             if (event.deltaMode == event.DOM_DELTA_PIXEL)
               scrollAmount = scrollByDelta;
@@ -730,34 +725,32 @@
         // Ignore events that doesn't match our orientation.
         // Scrollport event orientation:
         //   0: vertical
         //   1: horizontal
         //   2: both
         if (this.orient == "vertical") {
           if (event.detail == 1)
             return;
-        }
-        else if (event.detail == 0) {
+        } else if (event.detail == 0) {
           // horizontal scrollbox
           return;
         }
 
         this.setAttribute("notoverflowing", "true");
 
         try {
           // See bug 341047 and comments in overflow handler as to why
           // try..catch is needed here
           this._updateScrollButtonsDisabledState();
 
           let childNodes = this._getScrollableElements();
           if (childNodes && childNodes.length)
             this.ensureElementIsVisible(childNodes[0], false);
-        }
-        catch (e) {
+        } catch (e) {
           this.removeAttribute("notoverflowing");
         }
       ]]></handler>
 
       <handler event="overflow" phase="capturing"><![CDATA[
         // filter underflow events which were dispatched on nested scrollboxes
         if (event.target != this)
           return;
@@ -765,33 +758,31 @@
         // Ignore events that doesn't match our orientation.
         // Scrollport event orientation:
         //   0: vertical
         //   1: horizontal
         //   2: both
         if (this.orient == "vertical") {
           if (event.detail == 1)
             return;
-        }
-        else if (event.detail == 0) {
+        } else if (event.detail == 0) {
           // horizontal scrollbox
           return;
         }
 
         this.removeAttribute("notoverflowing");
 
         try {
           // See bug 341047, the overflow event is dispatched when the
           // scrollbox already is mostly destroyed. This causes some code in
           // _updateScrollButtonsDisabledState() to throw an error. It also
           // means that the notoverflowing attribute was removed erroneously,
           // as the whole overflow event should not be happening in that case.
           this._updateScrollButtonsDisabledState();
-        }
-        catch (e) {
+        } catch (e) {
           this.setAttribute("notoverflowing", "true");
         }
       ]]></handler>
 
       <handler event="scroll" action="this._updateScrollButtonsDisabledState()"/>
     </handlers>
   </binding>
 
@@ -830,18 +821,17 @@
                          onmouseover="_continueScroll(1);"
                          onmouseout="_pauseScroll();"/>
     </content>
     <implementation implements="nsITimerCallback, nsIDOMEventListener">
       <constructor><![CDATA[
         try {
           this._scrollDelay = this._prefBranch
                                   .getIntPref("toolkit.scrollbox.clickToScroll.scrollDelay");
-        }
-        catch (ex) {
+        } catch (ex) {
         }
       ]]></constructor>
 
       <destructor><![CDATA[
         // Release timer to avoid reference cycles.
         if (this._scrollTimer) {
           this._scrollTimer.cancel();
           this._scrollTimer = null;
--- a/toolkit/content/widgets/stringbundle.xml
+++ b/toolkit/content/widgets/stringbundle.xml
@@ -14,51 +14,48 @@
     <implementation name="XStringBundle">
 
       <method name="getString">
         <parameter name="aStringKey"/>
         <body>
           <![CDATA[
             try {
               return this.stringBundle.GetStringFromName(aStringKey);
-            }
-            catch (e) {
+            } catch (e) {
               dump("*** Failed to get string " + aStringKey + " in bundle: " + this.src + "\n");
               throw e;
             }
           ]]>
         </body>
       </method>
 
       <method name="getFormattedString">
         <parameter name="aStringKey"/>
         <parameter name="aStringsArray"/>
         <body>
           <![CDATA[
             try {
               return this.stringBundle.formatStringFromName(aStringKey, aStringsArray, aStringsArray.length);
-            }
-            catch (e) {
+            } catch (e) {
               dump("*** Failed to format string " + aStringKey + " in bundle: " + this.src + "\n");
               throw e;
             }
           ]]>
         </body>
       </method>
 
       <property name="stringBundle" readonly="true">
         <getter>
           <![CDATA[
             if (!this._bundle) {
               try {
                 this._bundle = Components.classes["@mozilla.org/intl/stringbundle;1"]
                                          .getService(Components.interfaces.nsIStringBundleService)
                                          .createBundle(this.src);
-              }
-              catch (e) {
+              } catch (e) {
                 dump("Failed to get stringbundle:\n");
                 dump(e + "\n");
               }
             }
             return this._bundle;
           ]]>
         </getter>
       </property>
--- a/toolkit/content/widgets/tabbox.xml
+++ b/toolkit/content/widgets/tabbox.xml
@@ -480,18 +480,17 @@
           var isTabFocused = false;
           try {
             isTabFocused =
               (document.commandDispatcher.focusedElement == this.selectedItem);
           } catch (e) {}
           this.selectedItem = aNewTab;
           if (isTabFocused) {
             aNewTab.focus();
-          }
-          else if (this.getAttribute("setfocus") != "false") {
+          } else if (this.getAttribute("setfocus") != "false") {
             let selectedPanel = this.tabbox.selectedPanel;
             document.commandDispatcher.advanceFocusIntoSubtree(selectedPanel);
 
             // Make sure that the focus doesn't move outside the tabbox
             if (this.tabbox) {
               try {
                 let el = document.commandDispatcher.focusedElement;
                 while (el && el != this.tabbox.tabpanels) {
--- a/toolkit/content/widgets/text.xml
+++ b/toolkit/content/widgets/text.xml
@@ -99,18 +99,17 @@
 
                 var val = prefs.getComplexValue(prefNameInsertSeparator,
                                                 nsIPrefLocalizedString).data;
                 this.mInsertSeparator = (val == "true");
 
                 val = prefs.getComplexValue(prefNameAlwaysAppendAccessKey,
                                             nsIPrefLocalizedString).data;
                 this.mAlwaysAppendAccessKey = (val == "true");
-              }
-              catch (e) {
+              } catch (e) {
                 this.mInsertSeparator = true;
               }
             }
 
             if (!this.mUnderlineAccesskey)
               return;
 
             var afterLabel = document.getAnonymousElementByAttribute(this, "anonid", "accessKeyParens");
@@ -211,18 +210,17 @@
       </method>
 
       <method name="mergeElement">
         <parameter name="element"/>
         <body>
           <![CDATA[
             if (element.previousSibling instanceof Text) {
               element.previousSibling.appendData(element.textContent)
-            }
-            else {
+            } else {
               element.parentNode.insertBefore(element.firstChild, element);
             }
             element.parentNode.removeChild(element);
           ]]>
         </body>
       </method>
 
       <field name="mUnderlineAccesskey">
@@ -318,18 +316,17 @@
             if (this.getAttribute("useoriginprincipal") == "true") {
               principal = this.nodePrincipal;
             } else {
               principal = secMan.createNullPrincipal({});
             }
             try {
               secMan.checkLoadURIWithPrincipal(principal, uri,
                                                nsISSM.DISALLOW_INHERIT_PRINCIPAL);
-            }
-            catch (ex) {
+            } catch (ex) {
               var msg = "Error: Cannot open a " + uri.scheme + ": link using \
                          the text-link binding.";
               Components.utils.reportError(msg);
               return;
             }
 
             const cID = "@mozilla.org/uriloader/external-protocol-service;1";
             const nsIEPS = Components.interfaces.nsIExternalProtocolService;
@@ -338,18 +335,17 @@
             // if the scheme is not an exposed protocol, then opening this link
             // should be deferred to the system's external protocol handler
             if (!protocolSvc.isExposedProtocol(uri.scheme)) {
               protocolSvc.loadUrl(uri);
               aEvent.preventDefault()
               return;
             }
 
-          }
-          catch (ex) {
+          } catch (ex) {
             Components.utils.reportError(ex);
           }
 
           aEvent.preventDefault();
           href = uri ? uri.spec : href;
 
           // Try handing off the link to the host application, e.g. for
           // opening it in a tabbed browser.
--- a/toolkit/content/widgets/textbox.xml
+++ b/toolkit/content/widgets/textbox.xml
@@ -96,18 +96,17 @@
       </property>
 
       <method name="reset">
         <body><![CDATA[
           this.value = this.defaultValue;
           try {
             this.editor.transactionManager.clear();
             return true;
-          }
-          catch (e) {}
+          } catch (e) {}
           return false;
         ]]></body>
       </method>
 
       <method name="select">
         <body>
           this.inputField.select();
         </body>
--- a/toolkit/content/widgets/tree.xml
+++ b/toolkit/content/widgets/tree.xml
@@ -266,18 +266,17 @@
 
       <method name="_getNextColumn">
         <parameter name="row"/>
         <parameter name="left"/>
         <body><![CDATA[
           var col = this.view.selection.currentColumn;
           if (col) {
             col = left ? col.getPrevious() : col.getNext();
-          }
-          else {
+          } else {
             col = this.columns.getKeyColumn();
           }
           while (col && (col.width == 0 || !col.selectable ||
                  !this.view.isSelectable(row, col)))
             col = left ? col.getPrevious() : col.getNext();
           return col;
         ]]></body>
       </method>
@@ -991,20 +990,19 @@
 
          if (event.charCode == ' '.charCodeAt(0)) {
            var c = this.currentIndex;
            if (!this.view.selection.isSelected(c) ||
                (!this.view.selection.single && this._isAccelPressed(event))) {
              this.view.selection.toggleSelect(c);
              event.preventDefault();
            }
-         }
-         else if (!this.disableKeyNavigation && event.charCode > 0 &&
-                  !event.altKey && !this._isAccelPressed(event) &&
-                  !event.metaKey && !event.ctrlKey) {
+         } else if (!this.disableKeyNavigation && event.charCode > 0 &&
+                    !event.altKey && !this._isAccelPressed(event) &&
+                    !event.metaKey && !event.ctrlKey) {
            var l = this._keyNavigate(event);
            if (l >= 0) {
              this.view.selection.timedSelect(l, this._selectDelay);
              this.treeBoxObject.ensureRowIsVisible(l);
            }
            event.preventDefault();
          }
          ]]>
@@ -1372,18 +1370,17 @@
               // Move the column only if it will result in a different column
               // ordering
               var move = true;
 
               // If this is a before move and the previous visible column is
               // the same as the column we're moving, don't move
               if (before && col == sib) {
                 move = false;
-              }
-              else if (!before && col == col.mTargetCol) {
+              } else if (!before && col == col.mTargetCol) {
                 // If this is an after move and the column we're moving is
                 // the same as the target column, don't move.
                 move = false;
               }
 
               if (move) {
                 col.parentNode.parentNode._reorderColumn(col, col.mTargetCol, before);
               }
@@ -1528,26 +1525,24 @@
 
     <handlers>
       <handler event="command">
         <![CDATA[
           if (event.originalTarget == this) {
             var popup = document.getAnonymousElementByAttribute(this, "anonid", "popup");
             this.buildPopup(popup);
             popup.showPopup(this, -1, -1, "popup", "bottomright", "topright");
-          }
-          else {
+          } else {
             var tree = this.parentNode.parentNode;
             tree.stopEditing(true);
             var menuitem = document.getAnonymousElementByAttribute(this, "anonid", "menuitem");
             if (event.originalTarget == menuitem) {
               tree.columns.restoreNaturalOrder();
               tree._ensureColumnOrder();
-            }
-            else {
+            } else {
               var colindex = event.originalTarget.getAttribute("colindex");
               var column = tree.columns[colindex];
               if (column) {
                 var element = column.element;
                 if (element.getAttribute("hidden") == "true")
                   element.setAttribute("hidden", "false");
                 else
                   element.setAttribute("hidden", "true");
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -27,17 +27,19 @@
       return this.scrubberNameFormat
                  .replace(/#1/, currTime)
                  .replace(/#2/, totalTime);
     </getter>
   </property>
 
   <constructor>
     <![CDATA[
+    /* eslint-disable no-multi-spaces */
     this.scrubberNameFormat = ]]>"&scrubberScale.nameFormat;"<![CDATA[;
+    /* eslint-enable no-multi-spaces */
     this.positionValue = "";
     this.durationValue = "";
     this.valueBar = null;
     this.isDragging = false;
     this.isPausedByDragging = false;
 
     this.type = this.getAttribute("class");
     this.Utils = document.getBindingParent(this.parentNode).Utils;
@@ -78,17 +80,17 @@
           break;
 
         case "minpos":
           this.setAttribute("min", newValue);
           break;
 
         case "maxpos":
           // Update the value bar to match the thumb position.
-          this.valueBar.value = Math.round(this.value / newValue  * 10000); // has max=10000
+          this.valueBar.value = Math.round(this.value / newValue * 10000); // has max=10000
           this.setAttribute("max", newValue);
           break;
       }
       ]]>
     </body>
   </method>
 
   <method name="dragStateChanged">
--- a/toolkit/crashreporter/CrashReports.jsm
+++ b/toolkit/crashreporter/CrashReports.jsm
@@ -7,26 +7,24 @@ Components.utils.import("resource://gre/
 this.EXPORTED_SYMBOLS = [
   "CrashReports"
 ];
 
 this.CrashReports = {
   pendingDir: null,
   reportsDir: null,
   submittedDir: null,
-  getReports: function CrashReports_getReports()
-  {
+  getReports: function CrashReports_getReports() {
     let reports = [];
 
     try {
       // Ignore any non http/https urls
       if (!/^https?:/i.test(Services.prefs.getCharPref("breakpad.reportURL")))
         return reports;
-    }
-    catch (e) { }
+    } catch (e) { }
 
     if (this.submittedDir.exists() && this.submittedDir.isDirectory()) {
       let entries = this.submittedDir.directoryEntries;
       while (entries.hasMoreElements()) {
         let file = entries.getNext().QueryInterface(Components.interfaces.nsIFile);
         let leaf = file.leafName;
         if (leaf.startsWith("bp-") &&
             leaf.endsWith(".txt")) {
@@ -58,33 +56,30 @@ this.CrashReports = {
       }
     }
 
     // Sort reports descending by date
     return reports.sort( (a, b) => b.date - a.date);
   }
 }
 
-function CrashReports_pendingDir()
-{
+function CrashReports_pendingDir() {
   let pendingDir = Services.dirsvc.get("UAppData", Components.interfaces.nsIFile);
   pendingDir.append("Crash Reports");
   pendingDir.append("pending");
   return pendingDir;
 }
 
-function CrashReports_reportsDir()
-{
+function CrashReports_reportsDir() {
   let reportsDir = Services.dirsvc.get("UAppData", Components.interfaces.nsIFile);
   reportsDir.append("Crash Reports");
   return reportsDir;
 }
 
-function CrashReports_submittedDir()
-{
+function CrashReports_submittedDir() {
   let submittedDir = Services.dirsvc.get("UAppData", Components.interfaces.nsIFile);
   submittedDir.append("Crash Reports");
   submittedDir.append("submitted");
   return submittedDir;
 }
 
 this.CrashReports.pendingDir = CrashReports_pendingDir();
 this.CrashReports.reportsDir = CrashReports_reportsDir();
--- a/toolkit/crashreporter/CrashSubmit.jsm
+++ b/toolkit/crashreporter/CrashSubmit.jsm
@@ -211,35 +211,33 @@ function Submitter(id, recordSubmission,
   this.recordSubmission = recordSubmission;
   this.noThrottle = noThrottle;
   this.additionalDumps = [];
   this.extraKeyVals = extraExtraKeyVals || {};
   this.deferredSubmit = PromiseUtils.defer();
 }
 
 Submitter.prototype = {
-  submitSuccess: function Submitter_submitSuccess(ret)
-  {
+  submitSuccess: function Submitter_submitSuccess(ret) {
     // Write out the details file to submitted/
     writeSubmittedReport(ret.CrashID, ret.ViewURL);
 
     // Delete from pending dir
     try {
       this.dump.remove(false);
       this.extra.remove(false);
 
       if (this.memory) {
         this.memory.remove(false);
       }
 
       for (let i of this.additionalDumps) {
         i.dump.remove(false);
       }
-    }
-    catch (ex) {
+    } catch (ex) {
       // report an error? not much the user can do here.
     }
 
     this.notifyStatus(SUCCESS, ret);
     this.cleanup();
   },
 
   cleanup: function Submitter_cleanup() {
@@ -250,18 +248,17 @@ Submitter.prototype = {
     this.memory = null;
     this.additionalDumps = null;
     // remove this object from the list of active submissions
     let idx = CrashSubmit._activeSubmissions.indexOf(this);
     if (idx != -1)
       CrashSubmit._activeSubmissions.splice(idx, 1);
   },
 
-  submitForm: function Submitter_submitForm()
-  {
+  submitForm: function Submitter_submitForm() {
     if (!('ServerURL' in this.extraKeyVals)) {
       return false;
     }
     let serverURL = this.extraKeyVals.ServerURL;
 
     // Override the submission URL from the environment
 
     var envOverride = Cc['@mozilla.org/process/environment;1'].
@@ -338,18 +335,17 @@ Submitter.prototype = {
       p = manager.ensureCrashIsPresent(id).then(() => {
         return manager.addSubmissionAttempt(id, submissionID, new Date());
       });
     }
     p.then(() => { xhr.send(formData); });
     return true;
   },
 
-  notifyStatus: function Submitter_notify(status, ret)
-  {
+  notifyStatus: function Submitter_notify(status, ret) {
     let propBag = Cc["@mozilla.org/hash-property-bag;1"].
                   createInstance(Ci.nsIWritablePropertyBag2);
     propBag.setPropertyAsAString("minidumpID", this.id);
     if (status == SUCCESS) {
       propBag.setPropertyAsAString("serverCrashID", ret.CrashID);
     }
 
     let extraKeyValsBag = Cc["@mozilla.org/hash-property-bag;1"].
@@ -368,18 +364,17 @@ Submitter.prototype = {
       case FAILED:
         this.deferredSubmit.reject();
         break;
       default:
         // no callbacks invoked.
     }
   },
 
-  submit: function Submitter_submit()
-  {
+  submit: function Submitter_submit() {
     let [dump, extra, memory] = getPendingMinidump(this.id);
 
     if (!dump.exists() || !extra.exists()) {
       this.notifyStatus(FAILED);
       this.cleanup();
       return this.deferredSubmit.promise;
     }
     this.dump = dump;
@@ -445,18 +440,17 @@ this.CrashSubmit = {
    *          An object whose key-value pairs will be merged with the data from
    *          the ".extra" file submitted with the report.  The properties of
    *          this object will override properties of the same name in the
    *          .extra file.
    *
    *  @return a Promise that is fulfilled with the server crash ID when the
    *          submission succeeds and rejected otherwise.
    */
-  submit: function CrashSubmit_submit(id, params)
-  {
+  submit: function CrashSubmit_submit(id, params) {
     params = params || {};
     let recordSubmission = false;
     let noThrottle = false;
     let extraExtraKeyVals = null;
 
     if ('recordSubmission' in params)
       recordSubmission = params.recordSubmission;
     if ('noThrottle' in params)
--- a/toolkit/crashreporter/content/crashes.js
+++ b/toolkit/crashreporter/content/crashes.js
@@ -56,18 +56,17 @@ function populateReportList() {
   var prefService = Cc["@mozilla.org/preferences-service;1"].
                     getService(Ci.nsIPrefBranch);
 
   try {
     reportURL = prefService.getCharPref("breakpad.reportURL");
     // Ignore any non http/https urls
     if (!/^https?:/i.test(reportURL))
       reportURL = null;
-  }
-  catch (e) { }
+  } catch (e) { }
   if (!reportURL) {
     document.getElementById("clear-reports").style.display = "none";
     document.getElementById("reportList").style.display = "none";
     document.getElementById("noConfig").style.display = "block";
     return;
   }
   let reports = CrashReports.getReports();
 
@@ -112,18 +111,17 @@ function populateReportList() {
   for (var i = 0; i < reports.length; i++) {
     var row = document.createElement("tr");
     var cell = document.createElement("td");
     row.appendChild(cell);
     var link = document.createElement("a");
     if (reports[i].pending) {
       link.setAttribute("href", aboutThrottling.spec);
       link.addEventListener("click", submitPendingReport, true);
-    }
-    else {
+    } else {
       link.setAttribute("href", reportURL + reports[i].id);
     }
     link.setAttribute("id", reports[i].id);
     link.classList.add("crashReport");
     link.appendChild(document.createTextNode(reports[i].id));
     cell.appendChild(link);
 
     var date = new Date(reports[i].date);
--- a/toolkit/crashreporter/test/CrashTestUtils.jsm
+++ b/toolkit/crashreporter/test/CrashTestUtils.jsm
@@ -39,18 +39,17 @@ CrashTestUtils.crash = lib.declare("Cras
 CrashTestUtils.saveAppMemory = lib.declare("SaveAppMemory",
                                            ctypes.default_abi,
                                            ctypes.uint64_t);
 
 try {
   CrashTestUtils.TryOverrideExceptionHandler = lib.declare("TryOverrideExceptionHandler",
                                                            ctypes.default_abi,
                                                            ctypes.void_t);
-}
-catch (ex) {}
+} catch (ex) {}
 
 CrashTestUtils.dumpHasStream = lib.declare("DumpHasStream",
                                            ctypes.default_abi,
                                            ctypes.bool,
                                            ctypes.char.ptr,
                                            ctypes.uint32_t);
 
 CrashTestUtils.dumpHasInstructionPointerMemory =
--- a/toolkit/crashreporter/test/unit/head_crashreporter.js
+++ b/toolkit/crashreporter/test/unit/head_crashreporter.js
@@ -29,18 +29,17 @@ function getEventDir() {
  *         and extra is an object containing the key,value pairs from
  *         the .extra file.
  *
  * @param canReturnZero
  *       If true, the subprocess may return with a zero exit code.
  *       Certain types of crashes may not cause the process to
  *       exit with an error.
  */
-function do_crash(setup, callback, canReturnZero)
-{
+function do_crash(setup, callback, canReturnZero) {
   // get current process filename (xpcshell)
   let ds = Components.classes["@mozilla.org/file/directory_service;1"]
     .getService(Components.interfaces.nsIProperties);
   let bin = ds.get("XREExeF", Components.interfaces.nsILocalFile);
   if (!bin.exists()) {
     // weird, can't find xpcshell binary?
     do_throw("Can't find xpcshell binary!");
   }
@@ -70,19 +69,19 @@ function do_crash(setup, callback, canRe
   if (!crashD.exists()) {
     crashD.create(crashD.DIRECTORY_TYPE, 0o700);
   }
 
   env.set("CRASHES_EVENTS_DIR", crashD.path);
 
   try {
       process.run(true, args, args.length);
-  }
-  catch (ex) {} // on Windows we exit with a -1 status when crashing.
-  finally {
+  } catch (ex) {
+    // on Windows we exit with a -1 status when crashing.
+  } finally {
     env.set("CRASHES_EVENTS_DIR", "");
   }
 
   if (!canReturnZero) {
     // should exit with an error (should have crashed)
     do_check_neq(process.exitValue, 0);
   }
 
@@ -96,18 +95,17 @@ function getMinidump() {
     if (f.leafName.substr(-4) == ".dmp") {
       return f;
     }
   }
 
   return null;
 }
 
-function handleMinidump(callback)
-{
+function handleMinidump(callback) {
   // find minidump
   let minidump = getMinidump();
 
   if (minidump == null) {
     do_throw("No minidump found!");
   }
 
   let extrafile = minidump.clone();
@@ -142,18 +140,17 @@ function handleMinidump(callback)
   if (extrafile.exists()) {
     extrafile.remove(false);
   }
   if (memoryfile.exists()) {
     memoryfile.remove(false);
   }
 }
 
-function do_content_crash(setup, callback)
-{
+function do_content_crash(setup, callback) {
   do_load_child_test_harness();
   do_test_pending();
 
   // Setting the minidump path won't work in the child, so we need to do
   // that here.
   let crashReporter =
       Components.classes["@mozilla.org/toolkit/crash-reporter;1"]
                 .getService(Components.interfaces.nsICrashReporter);
--- a/toolkit/crashreporter/test/unit/test_crash_abort.js
+++ b/toolkit/crashreporter/test/unit/test_crash_abort.js
@@ -1,13 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-function run_test()
-{
+function run_test() {
   // Try crashing with an abort().
   do_crash(function() {
              crashType = CrashTestUtils.CRASH_ABORT;
              crashReporter.annotateCrashReport("TestKey", "TestValue");
            },
            function(mdump, extra) {
              do_check_eq(extra.TestKey, "TestValue");
            },
--- a/toolkit/crashreporter/test/unit/test_crash_after_js_large_allocation_failure.js
+++ b/toolkit/crashreporter/test/unit/test_crash_after_js_large_allocation_failure.js
@@ -1,10 +1,9 @@
-function run_test()
-{
+function run_test() {
   if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) {
     dump("INFO | test_crash_after_js_large_allocation_failure.js | Can't test crashreporter in a non-libxul build.\n");
     return;
   }
 
   do_crash(
     function() {
       crashType = CrashTestUtils.CRASH_MOZ_CRASH;
--- a/toolkit/crashreporter/test/unit/test_crash_after_js_large_allocation_failure_reporting.js
+++ b/toolkit/crashreporter/test/unit/test_crash_after_js_large_allocation_failure_reporting.js
@@ -1,10 +1,9 @@
-function run_test()
-{
+function run_test() {
   if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) {
     dump("INFO | test_crash_after_js_oom_reporting.js | Can't test crashreporter in a non-libxul build.\n");
     return;
   }
 
   do_crash(
     function() {
       crashType = CrashTestUtils.CRASH_MOZ_CRASH;
--- a/toolkit/crashreporter/test/unit/test_crash_after_js_oom_recovered.js
+++ b/toolkit/crashreporter/test/unit/test_crash_after_js_oom_recovered.js
@@ -1,10 +1,9 @@
-function run_test()
-{
+function run_test() {
   if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) {
     dump("INFO | test_crash_after_js_oom_recovered.js | Can't test crashreporter in a non-libxul build.\n");
     return;
   }
 
   do_crash(
     function() {
       crashType = CrashTestUtils.CRASH_MOZ_CRASH;
--- a/toolkit/crashreporter/test/unit/test_crash_after_js_oom_reported.js
+++ b/toolkit/crashreporter/test/unit/test_crash_after_js_oom_reported.js
@@ -1,10 +1,9 @@
-function run_test()
-{
+function run_test() {
   if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) {
     dump("INFO | test_crash_after_js_oom_reported.js | Can't test crashreporter in a non-libxul build.\n");
     return;
   }
 
   do_crash(
     function() {
       crashType = CrashTestUtils.CRASH_MOZ_CRASH;
--- a/toolkit/crashreporter/test/unit/test_crash_after_js_oom_reported_2.js
+++ b/toolkit/crashreporter/test/unit/test_crash_after_js_oom_reported_2.js
@@ -1,10 +1,9 @@
-function run_test()
-{
+function run_test() {
   if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) {
     dump("INFO | test_crash_after_js_oom_reported_2.js | Can't test crashreporter in a non-libxul build.\n");
     return;
   }
 
   do_crash(
     function() {
       crashType = CrashTestUtils.CRASH_MOZ_CRASH;
--- a/toolkit/crashreporter/test/unit/test_crash_moz_crash.js
+++ b/toolkit/crashreporter/test/unit/test_crash_moz_crash.js
@@ -1,10 +1,9 @@
-function run_test()
-{
+function run_test() {
   // Try crashing with a runtime abort
   do_crash(function() {
              crashType = CrashTestUtils.CRASH_MOZ_CRASH;
              crashReporter.annotateCrashReport("TestKey", "TestValue");
            },
            function(mdump, extra) {
              do_check_eq(extra.TestKey, "TestValue");
              do_check_false("OOMAllocationSize" in extra);
--- a/toolkit/crashreporter/test/unit/test_crash_oom.js
+++ b/toolkit/crashreporter/test/unit/test_crash_oom.js
@@ -1,10 +1,9 @@
-function run_test()
-{
+function run_test() {
   if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) {
     dump("INFO | test_crash_oom.js | Can't test crashreporter in a non-libxul build.\n");
     return;
   }
 
   do_crash(
     function() {
       crashType = CrashTestUtils.CRASH_OOM;
--- a/toolkit/crashreporter/test/unit/test_crash_purevirtual.js
+++ b/toolkit/crashreporter/test/unit/test_crash_purevirtual.js
@@ -1,10 +1,9 @@
-function run_test()
-{
+function run_test() {
   if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) {
     dump("INFO | test_crash_purevirtual.js | Can't test crashreporter in a non-libxul build.\n");
     return;
   }
 
   var isOSX = ("nsILocalFileMac" in Components.interfaces);
   if (isOSX) {
      dump("INFO | test_crash_purevirtual.js | TODO: purecalls not caught on OS X\n");
--- a/toolkit/crashreporter/test/unit/test_crash_with_memory_report.js
+++ b/toolkit/crashreporter/test/unit/test_crash_with_memory_report.js
@@ -1,10 +1,9 @@
-function run_test()
-{
+function run_test() {
   if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) {
     dump("INFO | test_crash_oom.js | Can't test crashreporter in a non-libxul build.\n");
     return;
   }
 
   // This was shamelessly copied and stripped down from do_get_profile() in
   // head.js so that nsICrashReporter::saveMemoryReport can use a profile
   // within the crasher subprocess.
--- a/toolkit/crashreporter/test/unit/test_crashreporter.js
+++ b/toolkit/crashreporter/test/unit/test_crashreporter.js
@@ -1,22 +1,20 @@
-function run_test()
-{
+function run_test() {
   dump("INFO | test_crashreporter.js | Get crashreporter service.\n");
   var cr = Components.classes["@mozilla.org/toolkit/crash-reporter;1"]
                      .getService(Components.interfaces.nsICrashReporter);
   do_check_neq(cr, null);
 
   do_check_true(cr.enabled);
 
   try {
     cr.serverURL;
     do_throw("Getting serverURL when not set should have thrown!");
-  }
-  catch (ex) {
+  } catch (ex) {
     do_check_eq(ex.result, Components.results.NS_ERROR_FAILURE);
   }
 
   // check setting/getting serverURL
   var ios = Components.classes["@mozilla.org/network/io-service;1"]
                       .getService(Components.interfaces.nsIIOService);
 
   // try it with two different URLs, just for kicks
@@ -26,59 +24,54 @@ function run_test()
     cr.serverURL = ios.newURI(testspecs[i], null, null);
     do_check_eq(cr.serverURL.spec, testspecs[i]);
   }
 
   // should not allow setting non-http/https URLs
   try {
     cr.serverURL = ios.newURI("ftp://example.com/submit", null, null);
     do_throw("Setting serverURL to a non-http(s) URL should have thrown!");
-  }
-  catch (ex) {
+  } catch (ex) {
     do_check_eq(ex.result, Components.results.NS_ERROR_INVALID_ARG);
   }
 
   // check getting/setting minidumpPath
   // it should be $TEMP by default, but I'm not sure if we can exactly test that
   // this will at least test that it doesn't throw
   do_check_neq(cr.minidumpPath.path, "");
   var cwd = do_get_cwd();
   cr.minidumpPath = cwd;
   do_check_eq(cr.minidumpPath.path, cwd.path);
 
   try {
     cr.annotateCrashReport("equal=equal", "");
     do_throw("Calling annotateCrashReport() with an '=' in key should have thrown!");
-  }
-  catch (ex) {
+  } catch (ex) {
     do_check_eq(ex.result, Components.results.NS_ERROR_INVALID_ARG);
   }
   try {
     cr.annotateCrashReport("new\nline", "");
     do_throw("Calling annotateCrashReport() with a '\\n' in key should have thrown!");
-  }
-  catch (ex) {
+  } catch (ex) {
     do_check_eq(ex.result, Components.results.NS_ERROR_INVALID_ARG);
   }
   try {
     cr.annotateCrashReport("", "da\0ta");
     do_throw("Calling annotateCrashReport() with a '\\0' in data should have thrown!");
-  }
-  catch (ex) {
+  } catch (ex) {
     do_check_eq(ex.result, Components.results.NS_ERROR_INVALID_ARG);
   }
   cr.annotateCrashReport("testKey", "testData1");
   // Replace previous data.
   cr.annotateCrashReport("testKey", "testData2");
 
   try {
     cr.appendAppNotesToCrashReport("da\0ta");
     do_throw("Calling appendAppNotesToCrashReport() with a '\\0' in data should have thrown!");
-  }
-  catch (ex) {
+  } catch (ex) {
     do_check_eq(ex.result, Components.results.NS_ERROR_INVALID_ARG);
   }
   cr.appendAppNotesToCrashReport("additional testData3");
   // Add more data.
   cr.appendAppNotesToCrashReport("additional testData4");
 
   cr.minidumpPath = cwd;
   do_check_eq(cr.minidumpPath.path, cwd.path);
--- a/toolkit/crashreporter/test/unit/test_crashreporter_appmem.js
+++ b/toolkit/crashreporter/test/unit/test_crashreporter_appmem.js
@@ -1,10 +1,9 @@
-function run_test()
-{
+function run_test() {
   do_crash(function() {
 	     appAddr = CrashTestUtils.saveAppMemory();
 	     crashReporter.registerAppMemory(appAddr, 32);
            },
 	   function(mdump, extra) {
              do_check_true(mdump.exists());
              do_check_true(mdump.fileSize > 0);
              do_check_true(CrashTestUtils.dumpCheckMemory(mdump.path));
--- a/toolkit/crashreporter/test/unit/test_crashreporter_crash.js
+++ b/toolkit/crashreporter/test/unit/test_crashreporter_crash.js
@@ -1,10 +1,9 @@
-function run_test()
-{
+function run_test() {
   var is_win7_or_newer = false;
   var is_windows = false;
   var ph = Components.classes["@mozilla.org/network/protocol;1?name=http"]
              .getService(Components.interfaces.nsIHttpProtocolHandler);
   var match = ph.userAgent.match(/Windows NT (\d+).(\d+)/);
   if (match) {
       is_windows = true;
   }
--- a/toolkit/crashreporter/test/unit/test_oom_annotation_windows.js
+++ b/toolkit/crashreporter/test/unit/test_oom_annotation_windows.js
@@ -1,10 +1,9 @@
-function run_test()
-{
+function run_test() {
   if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) {
     dump("INFO | test_crash_oom.js | Can't test crashreporter in a non-libxul build.\n");
     return;
   }
 
   do_crash(
     function() {
       crashType = CrashTestUtils.CRASH_OOM;
--- a/toolkit/crashreporter/test/unit/test_override_exception_handler.js
+++ b/toolkit/crashreporter/test/unit/test_override_exception_handler.js
@@ -1,10 +1,9 @@
-function run_test()
-{
+function run_test() {
   // Ensure that attempting to override the exception handler doesn't cause
   // us to lose our exception handler.
   do_crash(
     function() {
         CrashTestUtils.TryOverrideExceptionHandler();
     },
     function(mdump, extra) {
     },
--- a/toolkit/crashreporter/test/unit_ipc/test_content_annotation.js
+++ b/toolkit/crashreporter/test/unit_ipc/test_content_annotation.js
@@ -1,12 +1,11 @@
 load("../unit/head_crashreporter.js");
 
-function run_test()
-{
+function run_test() {
   if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) {
     dump("INFO | test_content_annotation.js | Can't test crashreporter in a non-libxul build.\n");
     return;
   }
 
   // Try crashing with a runtime abort
   do_content_crash(function() {
                      crashType = CrashTestUtils.CRASH_MOZ_CRASH;
--- a/toolkit/crashreporter/test/unit_ipc/test_content_exception_time_annotation.js
+++ b/toolkit/crashreporter/test/unit_ipc/test_content_exception_time_annotation.js
@@ -1,12 +1,11 @@
 load("../unit/head_crashreporter.js");
 
-function run_test()
-{
+function run_test() {
   if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) {
     dump("INFO | test_content_annotation.js | Can't test crashreporter in a non-libxul build.\n");
     return;
   }
 
   // Try crashing with an OOM
   do_content_crash(function() {
                      crashType = CrashTestUtils.CRASH_OOM;
--- a/toolkit/crashreporter/test/unit_ipc/test_content_memory_list.js
+++ b/toolkit/crashreporter/test/unit_ipc/test_content_memory_list.js
@@ -1,15 +1,14 @@
 // Any copyright is dedicated to the Public Domain.
 // http://creativecommons.org/publicdomain/zero/1.0/
 
 load("../unit/head_crashreporter.js");
 
-function run_test()
-{
+function run_test() {
   var is_win7_or_newer = false;
   var ph = Components.classes["@mozilla.org/network/protocol;1?name=http"]
              .getService(Components.interfaces.nsIHttpProtocolHandler);
   var match = ph.userAgent.match(/Windows NT (\d+).(\d+)/);
   if (match && (parseInt(match[1]) > 6 ||
                 parseInt(match[1]) == 6 && parseInt(match[2]) >= 1)) {
       is_win7_or_newer = true;
   }
--- a/toolkit/crashreporter/test/unit_ipc/test_content_oom_annotation_windows.js
+++ b/toolkit/crashreporter/test/unit_ipc/test_content_oom_annotation_windows.js
@@ -1,12 +1,11 @@
 load("../unit/head_crashreporter.js");
 
-function run_test()
-{
+function run_test() {
   if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) {
     dump("INFO | test_content_annotation.js | Can't test crashreporter in a non-libxul build.\n");
     return;
   }
 
   // Try crashing with an OOM
   do_content_crash(function() {
                      crashType = CrashTestUtils.CRASH_OOM;
--- a/toolkit/forgetaboutsite/ForgetAboutSite.jsm
+++ b/toolkit/forgetaboutsite/ForgetAboutSite.jsm
@@ -16,18 +16,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 this.EXPORTED_SYMBOLS = ["ForgetAboutSite"];
 
 /**
  * Returns true if the string passed in is part of the root domain of the
  * current string.  For example, if this is "www.mozilla.org", and we pass in
  * "mozilla.org", this will return true.  It would return false the other way
  * around.
  */
-function hasRootDomain(str, aDomain)
-{
+function hasRootDomain(str, aDomain) {
   let index = str.indexOf(aDomain);
   // If aDomain is not found, we know we do not have it as a root domain.
   if (index == -1)
     return false;
 
   // If the strings are the same, we obviously have a match.
   if (str == aDomain)
     return true;
@@ -40,18 +39,17 @@ function hasRootDomain(str, aDomain)
          (prevChar == "." || prevChar == "/");
 }
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 this.ForgetAboutSite = {
-  removeDataFromDomain: function CRH_removeDataFromDomain(aDomain)
-  {
+  removeDataFromDomain: function CRH_removeDataFromDomain(aDomain) {
     PlacesUtils.history.removePagesFromHost(aDomain, true);
 
     // Cache
     let cs = Cc["@mozilla.org/netwerk/cache-storage-service;1"].
              getService(Ci.nsICacheStorageService);
     // NOTE: there is no way to clear just that domain, so we clear out
     //       everything)
     try {
@@ -116,20 +114,19 @@ this.ForgetAboutSite = {
     let lm = Cc["@mozilla.org/login-manager;1"].
              getService(Ci.nsILoginManager);
     // Clear all passwords for domain
     try {
       let logins = lm.getAllLogins();
       for (let i = 0; i < logins.length; i++)
         if (hasRootDomain(logins[i].hostname, aDomain))
           lm.removeLogin(logins[i]);
-    }
-    // XXXehsan: is there a better way to do this rather than this
-    // hacky comparison?
-    catch (ex) {
+    } catch (ex) {
+      // XXXehsan: is there a better way to do this rather than this
+      // hacky comparison?
       if (ex.message.indexOf("User canceled Master Password entry") == -1) {
         throw ex;
       }
     }
 
     // Permissions
     let pm = Cc["@mozilla.org/permissionmanager;1"].
              getService(Ci.nsIPermissionManager);
--- a/toolkit/forgetaboutsite/test/browser/browser_clearplugindata.html
+++ b/toolkit/forgetaboutsite/test/browser/browser_clearplugindata.html
@@ -4,18 +4,17 @@
 -->
 <html>
   <head>
     <title>Plugin Clear Site Data clear by domain test</title>
 
     <embed id="plugin1" type="application/x-test" width="200" height="200"></embed>
 
     <script type="application/javascript">
-      function testSteps()
-      {
+      function testSteps() {
         var p = document.getElementById("plugin1");
 
         p.setSitesWithData(
           "foo.com:0:0," +
           "bar.foo.com:0:0," +
           "baz.foo.com:0:0," +
           "bar.com:1:0," +
           "[192.168.1.1]:0:0," +
--- a/toolkit/forgetaboutsite/test/browser/browser_clearplugindata.js
+++ b/toolkit/forgetaboutsite/test/browser/browser_clearplugindata.js
@@ -36,20 +36,18 @@ function setTestPluginEnabledState(newEn
     plugin.enabledState = oldEnabledState;
   });
 }
 
 add_task(function* setup() {
   var tags = pluginHost.getPluginTags();
 
   // Find the test plugin
-  for (var i = 0; i < tags.length; i++)
-  {
-    if (tags[i].name == "Test Plug-in")
-    {
+  for (var i = 0; i < tags.length; i++) {
+    if (tags[i].name == "Test Plug-in") {
       pluginTag = tags[i];
     }
   }
   if (!pluginTag) {
     ok(false, "Test Plug-in not available, can't run test");
     finish();
   }
   setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, pluginTag);
--- a/toolkit/forgetaboutsite/test/unit/head_forgetaboutsite.js
+++ b/toolkit/forgetaboutsite/test/unit/head_forgetaboutsite.js
@@ -7,18 +7,17 @@ var Ci = Components.interfaces;
 var Cu = Components.utils;
 
 var dirSvc = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);
 var profileDir = do_get_profile();
 
 /**
  * Removes any files that could make our tests fail.
  */
-function cleanUp()
-{
+function cleanUp() {
   let files = [
     "places.sqlite",
     "cookies.sqlite",
     "signons.sqlite",
     "permissions.sqlite"
   ];
 
   for (let i = 0; i < files.length; i++) {
--- a/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
+++ b/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
@@ -39,116 +39,109 @@ const PREFERENCE_NAME = "test-pref";
 
 /**
  * Creates an nsIURI object for the given string representation of a URI.
  *
  * @param aURIString
  *        The spec of the URI to create.
  * @returns an nsIURI representing aURIString.
  */
-function uri(aURIString)
-{
+function uri(aURIString) {
   return Cc["@mozilla.org/network/io-service;1"].
          getService(Ci.nsIIOService).
          newURI(aURIString, null, null);
 }
 
 /**
  * Asynchronously check a url is visited.
  *
  * @param aURI
  *        The URI.
  *
  * @return {Promise}
  * @resolves When the check has been added successfully.
  * @rejects JavaScript exception.
  */
-function promiseIsURIVisited(aURI)
-{
+function promiseIsURIVisited(aURI) {
   let deferred = Promise.defer();
   PlacesUtils.asyncHistory.isURIVisited(aURI, function(unused, aIsVisited) {
     deferred.resolve(aIsVisited);
   });
 
   return deferred.promise;
 }
 
 /**
  * Add a cookie to the cookie service.
  *
  * @param aDomain
  */
-function add_cookie(aDomain)
-{
+function add_cookie(aDomain) {
   check_cookie_exists(aDomain, false);
   let cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager2);
   cm.add(aDomain, COOKIE_PATH, COOKIE_NAME, "", false, false, false,
          COOKIE_EXPIRY, {});
   check_cookie_exists(aDomain, true);
 }
 
 /**
  * Checks to ensure that a cookie exists or not for a domain.
  *
  * @param aDomain
  *        The domain to check for the cookie.
  * @param aExists
  *        True if the cookie should exist, false otherwise.
  */
-function check_cookie_exists(aDomain, aExists)
-{
+function check_cookie_exists(aDomain, aExists) {
   let cm = Cc["@mozilla.org/cookiemanager;1"].getService(Ci.nsICookieManager2);
   let cookie = {
     host: aDomain,
     name: COOKIE_NAME,
     path: COOKIE_PATH
   }
   let checker = aExists ? do_check_true : do_check_false;
   checker(cm.cookieExists(cookie));
 }
 
 /**
  * Adds a disabled host to the login manager.
  *
  * @param aHost
  *        The host to add to the list of disabled hosts.
  */
-function add_disabled_host(aHost)
-{
+function add_disabled_host(aHost) {
   check_disabled_host(aHost, false);
   let lm = Cc["@mozilla.org/login-manager;1"].
            getService(Ci.nsILoginManager);
   lm.setLoginSavingEnabled(aHost, false);
   check_disabled_host(aHost, true);
 }
 
 /**
  * Checks to see if a host is disabled for storing logins or not.
  *
  * @param aHost
  *        The host to check if it is disabled.
  * @param aIsDisabled
  *        True if the host should be disabled, false otherwise.
  */
-function check_disabled_host(aHost, aIsDisabled)
-{
+function check_disabled_host(aHost, aIsDisabled) {
   let lm = Cc["@mozilla.org/login-manager;1"].
            getService(Ci.nsILoginManager);
   let checker = aIsDisabled ? do_check_false : do_check_true;
   checker(lm.getLoginSavingEnabled(aHost));
 }
 
 /**
  * Adds a login for the specified host to the login manager.
  *
  * @param aHost
  *        The host to add the login for.
  */
-function add_login(aHost)
-{
+function add_login(aHost) {
   check_login_exists(aHost, false);
   let login = Cc["@mozilla.org/login-manager/loginInfo;1"].
               createInstance(Ci.nsILoginInfo);
   login.init(aHost, "", null, LOGIN_USERNAME, LOGIN_PASSWORD,
              LOGIN_USERNAME_FIELD, LOGIN_PASSWORD_FIELD);
   let lm = Cc["@mozilla.org/login-manager;1"].
            getService(Ci.nsILoginManager);
   lm.addLogin(login);
@@ -158,33 +151,31 @@ function add_login(aHost)
 /**
  * Checks to see if a login exists for a host.
  *
  * @param aHost
  *        The host to check for the test login.
  * @param aExists
  *        True if the login should exist, false otherwise.
  */
-function check_login_exists(aHost, aExists)
-{
+function check_login_exists(aHost, aExists) {
   let lm = Cc["@mozilla.org/login-manager;1"].
            getService(Ci.nsILoginManager);
   let count = { value: 0 };
   lm.findLogins(count, aHost, "", null);
   do_check_eq(count.value, aExists ? 1 : 0);
 }
 
 /**
  * Adds a permission for the specified URI to the permission manager.
  *
  * @param aURI
  *        The URI to add the test permission for.
  */
-function add_permission(aURI)
-{
+function add_permission(aURI) {
   check_permission_exists(aURI, false);
   let pm = Cc["@mozilla.org/permissionmanager;1"].
            getService(Ci.nsIPermissionManager);
   let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
               .getService(Ci.nsIScriptSecurityManager);
   let principal = ssm.createCodebasePrincipal(aURI, {});
 
   pm.addFromPrincipal(principal, PERMISSION_TYPE, PERMISSION_VALUE);
@@ -194,18 +185,17 @@ function add_permission(aURI)
 /**
  * Checks to see if a permission exists for the given URI.
  *
  * @param aURI
  *        The URI to check if a permission exists.
  * @param aExists
  *        True if the permission should exist, false otherwise.
  */
-function check_permission_exists(aURI, aExists)
-{
+function check_permission_exists(aURI, aExists) {
   let pm = Cc["@mozilla.org/permissionmanager;1"].
            getService(Ci.nsIPermissionManager);
   let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
               .getService(Ci.nsIScriptSecurityManager);
   let principal = ssm.createCodebasePrincipal(aURI, {});
 
   let perm = pm.testExactPermissionFromPrincipal(principal, PERMISSION_TYPE);
   let checker = aExists ? do_check_eq : do_check_neq;
@@ -213,276 +203,253 @@ function check_permission_exists(aURI, a
 }
 
 /**
  * Adds a content preference for the specified URI.
  *
  * @param aURI
  *        The URI to add a preference for.
  */
-function add_preference(aURI)
-{
+function add_preference(aURI) {
   let deferred = Promise.defer();
   let cp = Cc["@mozilla.org/content-pref/service;1"].
              getService(Ci.nsIContentPrefService2);
   cp.set(aURI.spec, PREFERENCE_NAME, "foo", null, {
     handleCompletion: () => deferred.resolve()
   });
   return deferred.promise;
 }
 
 /**
  * Checks to see if a content preference exists for the given URI.
  *
  * @param aURI
  *        The URI to check if a preference exists.
  */
-function preference_exists(aURI)
-{
+function preference_exists(aURI) {
   let deferred = Promise.defer();
   let cp = Cc["@mozilla.org/content-pref/service;1"].
              getService(Ci.nsIContentPrefService2);
   let exists = false;
   cp.getByDomainAndName(aURI.spec, PREFERENCE_NAME, null, {
     handleResult: () => exists = true,
     handleCompletion: () => deferred.resolve(exists)
   });
   return deferred.promise;
 }
 
 // Test Functions
 
 // History
-function* test_history_cleared_with_direct_match()
-{
+function* test_history_cleared_with_direct_match() {
   const TEST_URI = uri("http://mozilla.org/foo");
   do_check_false(yield promiseIsURIVisited(TEST_URI));
   yield PlacesTestUtils.addVisits(TEST_URI);
   do_check_true(yield promiseIsURIVisited(TEST_URI));
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   do_check_false(yield promiseIsURIVisited(TEST_URI));
 }
 
-function* test_history_cleared_with_subdomain()
-{
+function* test_history_cleared_with_subdomain() {
   const TEST_URI = uri("http://www.mozilla.org/foo");
   do_check_false(yield promiseIsURIVisited(TEST_URI));
   yield PlacesTestUtils.addVisits(TEST_URI);
   do_check_true(yield promiseIsURIVisited(TEST_URI));
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   do_check_false(yield promiseIsURIVisited(TEST_URI));
 }
 
-function* test_history_not_cleared_with_uri_contains_domain()
-{
+function* test_history_not_cleared_with_uri_contains_domain() {
   const TEST_URI = uri("http://ilovemozilla.org/foo");
   do_check_false(yield promiseIsURIVisited(TEST_URI));
   yield PlacesTestUtils.addVisits(TEST_URI);
   do_check_true(yield promiseIsURIVisited(TEST_URI));
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   do_check_true(yield promiseIsURIVisited(TEST_URI));
 
   // Clear history since we left something there from this test.
   yield PlacesTestUtils.clearHistory();
 }
 
 // Cookie Service
-function test_cookie_cleared_with_direct_match()
-{
+function test_cookie_cleared_with_direct_match() {
   const TEST_DOMAIN = "mozilla.org";
   add_cookie(TEST_DOMAIN);
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   check_cookie_exists(TEST_DOMAIN, false);
 }
 
-function test_cookie_cleared_with_subdomain()
-{
+function test_cookie_cleared_with_subdomain() {
   const TEST_DOMAIN = "www.mozilla.org";
   add_cookie(TEST_DOMAIN);
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   check_cookie_exists(TEST_DOMAIN, false);
 }
 
-function test_cookie_not_cleared_with_uri_contains_domain()
-{
+function test_cookie_not_cleared_with_uri_contains_domain() {
   const TEST_DOMAIN = "ilovemozilla.org";
   add_cookie(TEST_DOMAIN);
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   check_cookie_exists(TEST_DOMAIN, true);
 }
 
 // Login Manager
-function test_login_manager_disabled_hosts_cleared_with_direct_match()
-{
+function test_login_manager_disabled_hosts_cleared_with_direct_match() {
   const TEST_HOST = "http://mozilla.org";
   add_disabled_host(TEST_HOST);
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   check_disabled_host(TEST_HOST, false);
 }
 
-function test_login_manager_disabled_hosts_cleared_with_subdomain()
-{
+function test_login_manager_disabled_hosts_cleared_with_subdomain() {
   const TEST_HOST = "http://www.mozilla.org";
   add_disabled_host(TEST_HOST);
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   check_disabled_host(TEST_HOST, false);
 }
 
-function test_login_manager_disabled_hosts_not_cleared_with_uri_contains_domain()
-{
+function test_login_manager_disabled_hosts_not_cleared_with_uri_contains_domain() {
   const TEST_HOST = "http://ilovemozilla.org";
   add_disabled_host(TEST_HOST);
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   check_disabled_host(TEST_HOST, true);
 
   // Reset state
   let lm = Cc["@mozilla.org/login-manager;1"].
            getService(Ci.nsILoginManager);
   lm.setLoginSavingEnabled(TEST_HOST, true);
   check_disabled_host(TEST_HOST, false);
 }
 
-function test_login_manager_logins_cleared_with_direct_match()
-{
+function test_login_manager_logins_cleared_with_direct_match() {
   const TEST_HOST = "http://mozilla.org";
   add_login(TEST_HOST);
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   check_login_exists(TEST_HOST, false);
 }
 
-function test_login_manager_logins_cleared_with_subdomain()
-{
+function test_login_manager_logins_cleared_with_subdomain() {
   const TEST_HOST = "http://www.mozilla.org";
   add_login(TEST_HOST);
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   check_login_exists(TEST_HOST, false);
 }
 
-function test_login_manager_logins_not_cleared_with_uri_contains_domain()
-{
+function test_login_manager_logins_not_cleared_with_uri_contains_domain() {
   const TEST_HOST = "http://ilovemozilla.org";
   add_login(TEST_HOST);
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   check_login_exists(TEST_HOST, true);
 
   let lm = Cc["@mozilla.org/login-manager;1"].
            getService(Ci.nsILoginManager);
   lm.removeAllLogins();
   check_login_exists(TEST_HOST, false);
 }
 
 // Permission Manager
-function test_permission_manager_cleared_with_direct_match()
-{
+function test_permission_manager_cleared_with_direct_match() {
   const TEST_URI = uri("http://mozilla.org");
   add_permission(TEST_URI);
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   check_permission_exists(TEST_URI, false);
 }
 
-function test_permission_manager_cleared_with_subdomain()
-{
+function test_permission_manager_cleared_with_subdomain() {
   const TEST_URI = uri("http://www.mozilla.org");
   add_permission(TEST_URI);
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   check_permission_exists(TEST_URI, false);
 }
 
-function test_permission_manager_not_cleared_with_uri_contains_domain()
-{
+function test_permission_manager_not_cleared_with_uri_contains_domain() {
   const TEST_URI = uri("http://ilovemozilla.org");
   add_permission(TEST_URI);
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   check_permission_exists(TEST_URI, true);
 
   // Reset state
   let pm = Cc["@mozilla.org/permissionmanager;1"].
            getService(Ci.nsIPermissionManager);
   pm.removeAll();
   check_permission_exists(TEST_URI, false);
 }
 
 function waitForPurgeNotification() {
   let deferred = Promise.defer();
 
   let observer = {
-    observe(aSubject, aTopic, aData)
-    {
+    observe(aSubject, aTopic, aData) {
       Services.obs.removeObserver(observer, "browser:purge-domain-data");
       // test_storage_cleared needs this extra executeSoon because
       // the DOMStorage clean-up is also listening to this same observer
       // which is run synchronously.
       Services.tm.mainThread.dispatch(function() {
         deferred.resolve();
       }, Components.interfaces.nsIThread.DISPATCH_NORMAL);
     }
   };
   Services.obs.addObserver(observer, "browser:purge-domain-data", false);
 
   return deferred.promise;
 }
 
 // Content Preferences
-function* test_content_preferences_cleared_with_direct_match()
-{
+function* test_content_preferences_cleared_with_direct_match() {
   const TEST_URI = uri("http://mozilla.org");
   do_check_false(yield preference_exists(TEST_URI));
   yield add_preference(TEST_URI);
   do_check_true(yield preference_exists(TEST_URI));
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   yield waitForPurgeNotification();
   do_check_false(yield preference_exists(TEST_URI));
 }
 
-function* test_content_preferences_cleared_with_subdomain()
-{
+function* test_content_preferences_cleared_with_subdomain() {
   const TEST_URI = uri("http://www.mozilla.org");
   do_check_false(yield preference_exists(TEST_URI));
   yield add_preference(TEST_URI);
   do_check_true(yield preference_exists(TEST_URI));
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   yield waitForPurgeNotification();
   do_check_false(yield preference_exists(TEST_URI));
 }
 
-function* test_content_preferences_not_cleared_with_uri_contains_domain()
-{
+function* test_content_preferences_not_cleared_with_uri_contains_domain() {
   const TEST_URI = uri("http://ilovemozilla.org");
   do_check_false(yield preference_exists(TEST_URI));
   yield add_preference(TEST_URI);
   do_check_true(yield preference_exists(TEST_URI));
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   yield waitForPurgeNotification();
   do_check_true(yield preference_exists(TEST_URI));
 
   // Reset state
   ForgetAboutSite.removeDataFromDomain("ilovemozilla.org");
   yield waitForPurgeNotification();
   do_check_false(yield preference_exists(TEST_URI));
 }
 
-function push_registration_exists(aURL, ps)
-{
+function push_registration_exists(aURL, ps) {
   return new Promise(resolve => {
     let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
                 .getService(Ci.nsIScriptSecurityManager);
     let principal = ssm.createCodebasePrincipalFromOrigin(aURL);
     return ps.getSubscription(aURL, principal, (status, record) => {
       if (!Components.isSuccessCode(status)) {
         resolve(false);
       } else {
         resolve(!!record);
       }
     });
   });
 }
 
 // Push
-function* test_push_cleared()
-{
+function* test_push_cleared() {
   let ps;
   try {
     ps = Cc["@mozilla.org/push/Service;1"].
            getService(Ci.nsIPushService);
   } catch (e) {
     // No push service, skip test.
     return;
   }
@@ -530,46 +497,42 @@ function* test_push_cleared()
 
     do_check_false(yield push_registration_exists(TEST_URL, ps));
   } finally {
     yield PushService._shutdownService();
   }
 }
 
 // Cache
-function test_cache_cleared()
-{
+function test_cache_cleared() {
   // Because this test is asynchronous, it should be the last test
   do_check_true(tests[tests.length - 1] == arguments.callee);
 
   // NOTE: We could be more extensive with this test and actually add an entry
   //       to the cache, and then make sure it is gone.  However, we trust that
   //       the API is well tested, and that when we get the observer
   //       notification, we have actually cleared the cache.
   // This seems to happen asynchronously...
   let os = Cc["@mozilla.org/observer-service;1"].
            getService(Ci.nsIObserverService);
   let observer = {
-    observe(aSubject, aTopic, aData)
-    {
+    observe(aSubject, aTopic, aData) {
       os.removeObserver(observer, "cacheservice:empty-cache");
       // Shutdown the download manager.
       Services.obs.notifyObservers(null, "quit-application", null);
       do_test_finished();
     }
   };
   os.addObserver(observer, "cacheservice:empty-cache", false);
   ForgetAboutSite.removeDataFromDomain("mozilla.org");
   do_test_pending();
 }
 
-function* test_storage_cleared()
-{
-  function getStorageForURI(aURI)
-  {
+function* test_storage_cleared() {
+  function getStorageForURI(aURI) {
     let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
               .getService(Ci.nsIScriptSecurityManager);
     let principal = ssm.createCodebasePrincipal(aURI, {});
 
     let dsm = Cc["@mozilla.org/dom/localStorage-manager;1"].
               getService(Ci.nsIDOMStorageManager);
     return dsm.createStorage(null, principal, "");
   }
@@ -633,15 +596,14 @@ var tests = [
 
   // Storage
   test_storage_cleared,
 
   // Cache
   test_cache_cleared,
 ];
 
-function run_test()
-{
+function run_test() {
   for (let i = 0; i < tests.length; i++)
     add_task(tests[i]);
 
   run_next_test();
 }
--- a/toolkit/identity/IdentityProvider.jsm
+++ b/toolkit/identity/IdentityProvider.jsm
@@ -276,17 +276,17 @@ IdentityProviderService.prototype = {
 
     // look up provisioning caller, make sure it's valid.
     let provFlow = this.getProvisionFlow(aProvId);
 
     if (!provFlow.caller) {
       reportError("registerCertificate", "No provision flow or caller");
       return;
     }
-    if (!provFlow.kp)  {
+    if (!provFlow.kp) {
       let errStr = "Cannot register a certificate without a keypair";
       reportError("registerCertificate", errStr);
       provFlow.callback(errStr);
       return;
     }
 
     // store the keypair and certificate just provided in IDStore.
     this._store.addIdentity(provFlow.identity, provFlow.kp, aCert);
--- a/toolkit/identity/jwcrypto.jsm
+++ b/toolkit/identity/jwcrypto.jsm
@@ -78,18 +78,17 @@ function sign(aPayload, aKeypair, aCallb
       log("ERROR: signer.sign failed");
       return aCallback("Sign failed");
     }
     log("signer.sign: success");
     return aCallback(null, signature);
   });
 }
 
-function jwcryptoClass()
-{
+function jwcryptoClass() {
 }
 
 jwcryptoClass.prototype = {
   /*
    * Determine the expiration of the assertion.  Returns expiry date
    * in milliseconds as integer.
    *
    * @param localtimeOffsetMsec (optional)
--- a/toolkit/modules/BrowserUtils.jsm
+++ b/toolkit/modules/BrowserUtils.jsm
@@ -75,18 +75,17 @@ this.BrowserUtils = {
       if (aURL instanceof Ci.nsIURI)
         secMan.checkLoadURIWithPrincipal(aPrincipal, aURL, aFlags);
       else
         secMan.checkLoadURIStrWithPrincipal(aPrincipal, aURL, aFlags);
     } catch (e) {
       let principalStr = "";
       try {
         principalStr = " from " + aPrincipal.URI.spec;
-      }
-      catch (e2) { }
+      } catch (e2) { }
 
       throw "Load of " + aURL + principalStr + " denied.";
     }
   },
 
   /**
    * Return or create a principal with the codebase of one, and the originAttributes
    * of an existing principal (e.g. on a docshell, where the originAttributes ought
@@ -419,19 +418,18 @@ this.BrowserUtils = {
     if (selectionStr) {
       // Have some text, let's figure out if it looks like a URL that isn't
       // actually a link.
       linkText = selectionStr.trim();
       if (/^(?:https?|ftp):/i.test(linkText)) {
         try {
           url = this.makeURI(linkText);
         } catch (ex) {}
-      }
-      // Check if this could be a valid url, just missing the protocol.
-      else if (/^(?:[a-z\d-]+\.)+[a-z]+$/i.test(linkText)) {
+      } else if (/^(?:[a-z\d-]+\.)+[a-z]+$/i.test(linkText)) {
+        // Check if this could be a valid url, just missing the protocol.
         // Now let's see if this is an intentional link selection. Our guess is
         // based on whether the selection begins/ends with whitespace or is
         // preceded/followed by a non-word character.
 
         // selection.toString() trims trailing whitespace, so we look for
         // that explicitly in the first and last ranges.
         let beginRange = selection.getRangeAt(0);
         let delimitedAtStart = /^\s/.test(beginRange);
--- a/toolkit/modules/CertUtils.jsm
+++ b/toolkit/modules/CertUtils.jsm
@@ -149,17 +149,17 @@ this.checkCert =
   }
 
   var cert =
       aChannel.securityInfo.QueryInterface(Ci.nsISSLStatusProvider).
       SSLStatus.QueryInterface(Ci.nsISSLStatus).serverCert;
 
   validateCert(cert, aCerts);
 
-  if (aAllowNonBuiltInCerts ===  true)
+  if (aAllowNonBuiltInCerts === true)
     return;
 
   var issuerCert = cert;
   while (issuerCert.issuer && !issuerCert.issuer.equals(issuerCert))
     issuerCert = issuerCert.issuer;
 
   const certNotBuiltInErr = "Certificate issuer is not built-in.";
   if (!issuerCert)
--- a/toolkit/modules/Console.jsm
+++ b/toolkit/modules/Console.jsm
@@ -58,18 +58,17 @@ function fmt(aStr, aMaxLen, aMinLen, aOp
     aMinLen = aMaxLen;
   }
   if (aStr == null) {
     aStr = "";
   }
   if (aStr.length > aMaxLen) {
     if (aOptions && aOptions.truncate == "start") {
       return "_" + aStr.substring(aStr.length - aMaxLen + 1);
-    }
-    else if (aOptions && aOptions.truncate == "center") {
+    } else if (aOptions && aOptions.truncate == "center") {
       let start = aStr.substring(0, (aMaxLen / 2));
 
       let end = aStr.substring((aStr.length - (aMaxLen / 2)) + 1);
       return start + "_" + end;
     }
     return aStr.substring(0, aMaxLen - 1) + "_";
   }
   if (aStr.length < aMinLen) {
@@ -145,18 +144,17 @@ function stringify(aThing, aAllowNewLine
     let type = getCtorName(aThing);
     if (aThing instanceof Components.interfaces.nsIDOMNode && aThing.tagName) {
       return debugElement(aThing);
     }
     type = (type == "Object" ? "" : type + " ");
     let json;
     try {
       json = JSON.stringify(aThing);
-    }
-    catch (ex) {
+    } catch (ex) {
       // Can't use a real ellipsis here, because cmd.exe isn't unicode-enabled
       json = "{" + Object.keys(aThing).join(":..,") + ":.., " + "}";
     }
     return type + json;
   }
 
   if (typeof aThing == "function") {
     return aThing.toString().replace(/\s+/g, " ");
@@ -206,48 +204,43 @@ function log(aThing) {
   if (typeof aThing == "object") {
     let reply = "";
     let type = getCtorName(aThing);
     if (type == "Map") {
       reply += "Map\n";
       for (let [key, value] of aThing) {
         reply += logProperty(key, value);
       }
-    }
-    else if (type == "Set") {
+    } else if (type == "Set") {
       let i = 0;
       reply += "Set\n";
       for (let value of aThing) {
         reply += logProperty('' + i, value);
         i++;
       }
-    }
-    else if (isError(aThing)) {
+    } else if (isError(aThing)) {
       reply += "  Message: " + aThing + "\n";
       if (aThing.stack) {
         reply += "  Stack:\n";
         var frame = aThing.stack;
         while (frame) {
           reply += "    " + frame + "\n";
           frame = frame.caller;
         }
       }
-    }
-    else if (aThing instanceof Components.interfaces.nsIDOMNode && aThing.tagName) {
+    } else if (aThing instanceof Components.interfaces.nsIDOMNode && aThing.tagName) {
       reply += "  " + debugElement(aThing) + "\n";
-    }
-    else {
+    } else {
       let keys = Object.getOwnPropertyNames(aThing);
       if (keys.length > 0) {
         reply += type + "\n";
         keys.forEach(function(aProp) {
           reply += logProperty(aProp, aThing[aProp]);
         });
-      }
-      else {
+      } else {
         reply += type + "\n";
         let root = aThing;
         let logged = [];
         while (root != null) {
           let properties = Object.keys(root);
           properties.sort();
           properties.forEach(function(property) {
             if (!(property in logged)) {
@@ -281,18 +274,17 @@ function log(aThing) {
  * @return {string}
  *        Multi line output string describing the property/value pair
  */
 function logProperty(aProp, aValue) {
   let reply = "";
   if (aProp == "stack" && typeof value == "string") {
     let trace = parseStack(aValue);
     reply += formatTrace(trace);
-  }
-  else {
+  } else {
     reply += "    - " + aProp + " = " + stringify(aValue) + "\n";
   }
   return reply;
 }
 
 const LOG_LEVELS = {
   "all": Number.MIN_VALUE,
   "debug": 2,
@@ -456,17 +448,17 @@ function stopTimer(aName, aTimestamp) {
  * @param {string} aLevel
  *        The string identifier for the message log level
  * @param {string} aMessage
  *        The string message to print to stdout
  */
 function dumpMessage(aConsole, aLevel, aMessage) {
   aConsole.dump(
     "console." + aLevel + ": " +
-    (aConsole.prefix ? aConsole.prefix + ": " : "")  +
+    (aConsole.prefix ? aConsole.prefix + ": " : "") +
     aMessage + "\n"
   );
 }
 
 /**
  * Create a function which will output a concise level of output when used
  * as a logging function
  *
@@ -534,18 +526,17 @@ function createMultiLineDumper(aLevel) {
  *        The arguments given to the console method.
  * @param {object} aOptions
  *        Object properties depend on the console method that was invoked:
  *        - timer: for time() and timeEnd(). Holds the timer information.
  *        - groupName: for group(), groupCollapsed() and groupEnd().
  *        - stacktrace: for trace(). Holds the array of stack frames as given by
  *        getStack().
  */
-function sendConsoleAPIMessage(aConsole, aLevel, aFrame, aArgs, aOptions = {})
-{
+function sendConsoleAPIMessage(aConsole, aLevel, aFrame, aArgs, aOptions = {}) {
   let consoleEvent = {
     ID: "jsm",
     innerID: aConsole.innerID || aFrame.filename,
     consoleID: aConsole.consoleID,
     level: aLevel,
     filename: aFrame.filename,
     lineNumber: aFrame.lineNumber,
     functionName: aFrame.functionName,
@@ -564,18 +555,17 @@ function sendConsoleAPIMessage(aConsole,
     case "timeEnd":
       consoleEvent.timer = aOptions.timer;
       break;
     case "group":
     case "groupCollapsed":
     case "groupEnd":
       try {
         consoleEvent.groupName = Array.prototype.join.call(aArgs, " ");
-      }
-      catch (ex) {
+      } catch (ex) {
         Cu.reportError(ex);
         Cu.reportError(ex.stack);
         return;
       }
       break;
   }
 
   let ConsoleAPIStorage = Cc["@mozilla.org/consoleAPI-storage;1"]
--- a/toolkit/modules/DeferredTask.jsm
+++ b/toolkit/modules/DeferredTask.jsm
@@ -156,18 +156,17 @@ this.DeferredTask.prototype = {
    * nsITimer used for triggering the task after a delay, or null in case the
    * task is running or there is no task scheduled for execution.
    */
   _timer: null,
 
   /**
    * Actually starts the timer with the delay specified on construction.
    */
-  _startTimer()
-  {
+  _startTimer() {
     this._timer = new Timer(this._timerCallback.bind(this), this._delayMs,
                             Ci.nsITimer.TYPE_ONE_SHOT);
   },
 
   /**
    * Requests the execution of the task after the delay specified on
    * construction.  Multiple calls don't introduce further delays.  If the task
    * is running, the delay will start when the current execution finishes.
@@ -180,18 +179,17 @@ this.DeferredTask.prototype = {
    * @note By design, this method doesn't provide a way for the caller to detect
    *       when the next execution terminates, or collect a result.  In fact,
    *       doing that would often result in duplicate processing or logging.  If
    *       a special operation or error logging is needed on completion, it can
    *       be better handled from within the task itself, for example using a
    *       try/catch/finally clause in the task.  The "finalize" method can be
    *       used in the common case of waiting for completion on shutdown.
    */
-  arm()
-  {
+  arm() {
     if (this._finalized) {
       throw new Error("Unable to arm timer, the object has been finalized.");
     }
 
     this._armed = true;
 
     // In case the timer callback is running, do not create the timer now,
     // because this will be handled by the timer callback itself.  Also, the
@@ -257,18 +255,17 @@ this.DeferredTask.prototype = {
     }
     return Promise.resolve();
   },
   _finalized: false,
 
   /**
    * Timer callback used to run the delayed task.
    */
-  _timerCallback()
-  {
+  _timerCallback() {
     let runningDeferred = Promise.defer();
 
     // All these state changes must occur at the same time directly inside the
     // timer callback, to prevent race conditions and to ensure that all the
     // methods behave consistently even if called from inside the task.  This
     // means that the assignment of "this._runningPromise" must complete before
     // the task gets a chance to start.
     this._timer = null;
--- a/toolkit/modules/FileUtils.jsm
+++ b/toolkit/modules/FileUtils.jsm
@@ -143,34 +143,32 @@ this.FileUtils = {
    * @param   stream
    *          The stream to close.
    */
   closeAtomicFileOutputStream: function FileUtils_closeAtomicFileOutputStream(stream) {
     if (stream instanceof Ci.nsISafeOutputStream) {
       try {
         stream.finish();
         return;
-      }
-      catch (e) {
+      } catch (e) {
       }
     }
     stream.close();
   },
 
   /**
    * Closes a safe file output stream.
    * @param   stream
    *          The stream to close.
    */
   closeSafeFileOutputStream: function FileUtils_closeSafeFileOutputStream(stream) {
     if (stream instanceof Ci.nsISafeOutputStream) {
       try {
         stream.finish();
         return;
-      }
-      catch (e) {
+      } catch (e) {
       }
     }
     stream.close();
   },
 
   File: Components.Constructor("@mozilla.org/file/local;1", Ci.nsILocalFile, "initWithPath")
 };
--- a/toolkit/modules/GMPInstallManager.jsm
+++ b/toolkit/modules/GMPInstallManager.jsm
@@ -108,18 +108,17 @@ GMPInstallManager.prototype = {
     }
 
     let addonPromise = ProductAddonChecker
       .getProductAddonList(url, allowNonBuiltIn, certs);
 
     addonPromise.then(res => {
       if (!res || !res.gmpAddons) {
         this._deferred.resolve({gmpAddons: []});
-      }
-      else {
+      } else {
         res.gmpAddons = res.gmpAddons.map(a => new GMPAddon(a));
         this._deferred.resolve(res);
       }
       delete this._deferred;
     }, (ex) => {
       this._deferred.reject(ex);
       delete this._deferred;
     });
@@ -468,18 +467,17 @@ GMPExtractor.prototype = {
 };
 
 
 /**
  * Constructs an object which downloads and initiates an install of
  * the specified GMPAddon object.
  * @param gmpAddon The addon to install.
  */
-function GMPDownloader(gmpAddon)
-{
+function GMPDownloader(gmpAddon) {
   this._gmpAddon = gmpAddon;
 }
 
 GMPDownloader.prototype = {
   /**
    * Starts the download process for an addon.
    * @return a promise which will be resolved or rejected
    *         See GMPInstallManager.installAddon for resolve/rejected info
--- a/toolkit/modules/Geometry.jsm
+++ b/toolkit/modules/Geometry.jsm
@@ -306,19 +306,19 @@ Rect.prototype = {
   /**
    * Blends two rectangles together.
    * @param rect Rectangle to blend this one with
    * @param scalar Ratio from 0 (returns a clone of this rect) to 1 (clone of rect).
    * @return New blended rectangle.
    */
   blend: function blend(rect, scalar) {
     return new Rect(
-      this.left   + (rect.left   - this.left  ) * scalar,
-      this.top    + (rect.top    - this.top   ) * scalar,
-      this.width  + (rect.width  - this.width ) * scalar,
+      this.left + (rect.left - this.left ) * scalar,
+      this.top + (rect.top - this.top ) * scalar,
+      this.width + (rect.width - this.width ) * scalar,
       this.height + (rect.height - this.height) * scalar);
   },
 
   /**
    * Grows or shrinks the rectangle while keeping the center point.
    * Accepts single multipler, or separate for both axes.
    */
   inflate: function inflate(xscl, yscl) {
--- a/toolkit/modules/Http.jsm
+++ b/toolkit/modules/Http.jsm
@@ -42,18 +42,17 @@ function httpRequest(aUrl, aOptions) {
   xhr.onerror = function(aProgressEvent) {
     if (aOptions.onError) {
       // adapted from toolkit/mozapps/extensions/nsBlocklistService.js
       let request = aProgressEvent.target;
       let status;
       try {
         // may throw (local file or timeout)
         status = request.status;
-      }
-      catch (e) {
+      } catch (e) {
         request = request.channel.QueryInterface(Ci.nsIRequest);
         status = request.status;
       }
       // When status is 0 we don't have a valid channel.
       let statusText = status ? request.statusText : "offline";
       aOptions.onError(statusText, null, this);
     }
   };
--- a/toolkit/modules/InlineSpellChecker.jsm
+++ b/toolkit/modules/InlineSpellChecker.jsm
@@ -14,44 +14,41 @@ const Cu = Components.utils;
 
 this.InlineSpellChecker = function InlineSpellChecker(aEditor) {
   this.init(aEditor);
   this.mAddedWordStack = []; // We init this here to preserve it between init/uninit calls
 }
 
 InlineSpellChecker.prototype = {
   // Call this function to initialize for a given editor
-  init(aEditor)
-  {
+  init(aEditor) {
     this.uninit();
     this.mEditor = aEditor;
     try {
       this.mInlineSpellChecker = this.mEditor.getInlineSpellChecker(true);
       // note: this might have been NULL if there is no chance we can spellcheck
     } catch (e) {
       this.mInlineSpellChecker = null;
     }
   },
 
-  initFromRemote(aSpellInfo)
-  {
+  initFromRemote(aSpellInfo) {
     if (this.mRemote)
       throw new Error("Unexpected state");
     this.uninit();
 
     if (!aSpellInfo)
       return;
     this.mInlineSpellChecker = this.mRemote = new RemoteSpellChecker(aSpellInfo);
     this.mOverMisspelling = aSpellInfo.overMisspelling;
     this.mMisspelling = aSpellInfo.misspelling;
   },
 
   // call this to clear state
-  uninit()
-  {
+  uninit() {
     if (this.mRemote) {
       this.mRemote.uninit();
       this.mRemote = null;
     }
 
     this.mEditor = null;
     this.mInlineSpellChecker = null;
     this.mOverMisspelling = false;
@@ -62,18 +59,17 @@ InlineSpellChecker.prototype = {
     this.mDictionaryMenu = null;
     this.mDictionaryNames = [];
     this.mDictionaryItems = [];
     this.mWordNode = null;
   },
 
   // for each UI event, you must call this function, it will compute the
   // word the cursor is over
-  initFromEvent(rangeParent, rangeOffset)
-  {
+  initFromEvent(rangeParent, rangeOffset) {
     this.mOverMisspelling = false;
 
     if (!rangeParent || !this.mInlineSpellChecker)
       return;
 
     var selcon = this.mEditor.selectionController;
     var spellsel = selcon.getSelection(selcon.SELECTION_SPELLCHECK);
     if (spellsel.rangeCount == 0)
@@ -87,18 +83,17 @@ InlineSpellChecker.prototype = {
     this.mMisspelling = range.toString();
     this.mOverMisspelling = true;
     this.mWordNode = rangeParent;
     this.mWordOffset = rangeOffset;
   },
 
   // returns false if there should be no spellchecking UI enabled at all, true
   // means that you can at least give the user the ability to turn it on.
-  get canSpellCheck()
-  {
+  get canSpellCheck() {
     // inline spell checker objects will be created only if there are actual
     // dictionaries available
     if (this.mRemote)
       return this.mRemote.canSpellCheck;
     return this.mInlineSpellChecker != null;
   },
 
   get initialSpellCheckPending() {
@@ -106,41 +101,37 @@ InlineSpellChecker.prototype = {
       return this.mRemote.spellCheckPending;
     }
     return !!(this.mInlineSpellChecker &&
               !this.mInlineSpellChecker.spellChecker &&
               this.mInlineSpellChecker.spellCheckPending);
   },
 
   // Whether spellchecking is enabled in the current box
-  get enabled()
-  {
+  get enabled() {
     if (this.mRemote)
       return this.mRemote.enableRealTimeSpell;
     return (this.mInlineSpellChecker &&
             this.mInlineSpellChecker.enableRealTimeSpell);
   },
-  set enabled(isEnabled)
-  {
+  set enabled(isEnabled) {
     if (this.mRemote)
       this.mRemote.setSpellcheckUserOverride(isEnabled);
     else if (this.mInlineSpellChecker)
       this.mEditor.setSpellcheckUserOverride(isEnabled);
   },
 
   // returns true if the given event is over a misspelled word
-  get overMisspelling()
-  {
+  get overMisspelling() {
     return this.mOverMisspelling;
   },
 
   // this prepends up to "maxNumber" suggestions at the given menu position
   // for the word under the cursor. Returns the number of suggestions inserted.
-  addSuggestionsToMenu(menu, insertBefore, maxNumber)
-  {
+  addSuggestionsToMenu(menu, insertBefore, maxNumber) {
     if (!this.mRemote && (!this.mInlineSpellChecker || !this.mOverMisspelling))
       return 0; // nothing to do
 
     var spellchecker = this.mRemote || this.mInlineSpellChecker.spellChecker;
     try {
       if (!this.mRemote && !spellchecker.CheckCurrentWord(this.mMisspelling))
         return 0;  // word seems not misspelled after all (?)
     } catch (e) {
@@ -167,18 +158,17 @@ InlineSpellChecker.prototype = {
       item.setAttribute("class", "spell-suggestion");
       menu.insertBefore(item, insertBefore);
     }
     return this.mSpellSuggestions.length;
   },
 
   // undoes the work of addSuggestionsToMenu for the same menu
   // (call from popup hiding)
-  clearSuggestionsFromMenu()
-  {
+  clearSuggestionsFromMenu() {
     for (var i = 0; i < this.mSuggestionItems.length; i++) {
       this.mMenu.removeChild(this.mSuggestionItems[i]);
     }
     this.mSuggestionItems = [];
   },
 
   sortDictionaryList(list) {
     var sortedList = [];
@@ -194,32 +184,30 @@ InlineSpellChecker.prototype = {
       return 0;
     });
 
     return sortedList;
   },
 
   // returns the number of dictionary languages. If insertBefore is NULL, this
   // does an append to the given menu
-  addDictionaryListToMenu(menu, insertBefore)
-  {
+  addDictionaryListToMenu(menu, insertBefore) {
     this.mDictionaryMenu = menu;
     this.mDictionaryNames = [];
     this.mDictionaryItems = [];
 
     if (!this.enabled)
       return 0;
 
     var list;
     var curlang = "";
     if (this.mRemote) {
       list = this.mRemote.dictionaryList;
       curlang = this.mRemote.currentDictionary;
-    }
-    else if (this.mInlineSpellChecker) {
+    } else if (this.mInlineSpellChecker) {
       var spellchecker = this.mInlineSpellChecker.spellChecker;
       var o1 = {}, o2 = {};
       spellchecker.GetDictionaryList(o1, o2);
       list = o1.value;
       try {
         curlang = spellchecker.GetCurrentDictionary();
       } catch (e) {}
     }
@@ -313,95 +301,86 @@ InlineSpellChecker.prototype = {
       // XXX: See bug 666662 and bug 666731 for full implementation.
       displayName += " (" + variantSubtags.substr(1).split(/[-_]/).join(" / ") + ")"; // Collapse multiple variants.
 
     return displayName;
   },
 
   // undoes the work of addDictionaryListToMenu for the menu
   // (call on popup hiding)
-  clearDictionaryListFromMenu()
-  {
+  clearDictionaryListFromMenu() {
     for (var i = 0; i < this.mDictionaryItems.length; i++) {
       this.mDictionaryMenu.removeChild(this.mDictionaryItems[i]);
     }
     this.mDictionaryItems = [];
   },
 
   // callback for selecting a dictionary
-  selectDictionary(index)
-  {
+  selectDictionary(index) {
     if (this.mRemote) {
       this.mRemote.selectDictionary(index);
       return;
     }
     if (!this.mInlineSpellChecker || index < 0 || index >= this.mDictionaryNames.length)
       return;
     var spellchecker = this.mInlineSpellChecker.spellChecker;
     spellchecker.SetCurrentDictionary(this.mDictionaryNames[index]);
     this.mInlineSpellChecker.spellCheckRange(null); // causes recheck
   },
 
   // callback for selecting a suggested replacement
-  replaceMisspelling(index)
-  {
+  replaceMisspelling(index) {
     if (this.mRemote) {
       this.mRemote.replaceMisspelling(index);
       return;
     }
     if (!this.mInlineSpellChecker || !this.mOverMisspelling)
       return;
     if (index < 0 || index >= this.mSpellSuggestions.length)
       return;
     this.mInlineSpellChecker.replaceWord(this.mWordNode, this.mWordOffset,
                                          this.mSpellSuggestions[index]);
   },
 
   // callback for enabling or disabling spellchecking
-  toggleEnabled()
-  {
+  toggleEnabled() {
     if (this.mRemote)
       this.mRemote.toggleEnabled();
     else
       this.mEditor.setSpellcheckUserOverride(!this.mInlineSpellChecker.enableRealTimeSpell);
   },
 
   // callback for adding the current misspelling to the user-defined dictionary
-  addToDictionary()
-  {
+  addToDictionary() {
     // Prevent the undo stack from growing over the max depth
     if (this.mAddedWordStack.length == MAX_UNDO_STACK_DEPTH)
       this.mAddedWordStack.shift();
 
     this.mAddedWordStack.push(this.mMisspelling);
     if (this.mRemote)
       this.mRemote.addToDictionary();
     else {
       this.mInlineSpellChecker.addWordToDictionary(this.mMisspelling);
     }
   },
   // callback for removing the last added word to the dictionary LIFO fashion
-  undoAddToDictionary()
-  {
-    if (this.mAddedWordStack.length > 0)
-    {
+  undoAddToDictionary() {
+    if (this.mAddedWordStack.length > 0) {
       var word = this.mAddedWordStack.pop();
       if (this.mRemote)
         this.mRemote.undoAddToDictionary(word);
       else
         this.mInlineSpellChecker.removeWordFromDictionary(word);
     }
   },
-  canUndo()
-  {
+  canUndo() {
     // Return true if we have words on the stack
     return (this.mAddedWordStack.length > 0);
   },
-  ignoreWord()
-  {
+  ignoreWord() {
     if (this.mRemote)
       this.mRemote.ignoreWord();
     else
       this.mInlineSpellChecker.ignoreWord(this.mMisspelling);
   }
 };
 
 var SpellCheckHelper = {
@@ -499,18 +478,17 @@ var SpellCheckHelper = {
           var editingSession = win.QueryInterface(Ci.nsIInterfaceRequestor)
                                   .getInterface(Ci.nsIWebNavigation)
                                   .QueryInterface(Ci.nsIInterfaceRequestor)
                                   .getInterface(Ci.nsIEditingSession);
           if (editingSession.windowIsEditable(win) &&
               this.getComputedStyle(element, "-moz-user-modify") == "read-write") {
             isEditable = true;
           }
-        }
-        catch (ex) {
+        } catch (ex) {
           // If someone built with composer disabled, we can't get an editing session.
         }
 
         if (isEditable)
           flags |= this.CONTENTEDITABLE;
       }
     }
 
--- a/toolkit/modules/Locale.jsm
+++ b/toolkit/modules/Locale.jsm
@@ -19,18 +19,17 @@ this.Locale = {
    */
   getLocale() {
     if (Preferences.get(PREF_MATCH_OS_LOCALE, false))
       return Services.locale.getLocaleComponentForUserAgent();
     try {
       let locale = Preferences.get(PREF_SELECTED_LOCALE, null, Ci.nsIPrefLocalizedString);
       if (locale)
         return locale;
-    }
-    catch (e) {}
+    } catch (e) {}
     return Preferences.get(PREF_SELECTED_LOCALE, "en-US");
   },
 
   /**
    * Selects the closest matching locale from a list of locales.
    *
    * @param  aLocales
    *         An array of locales
--- a/toolkit/modules/Log.jsm
+++ b/toolkit/modules/Log.jsm
@@ -96,18 +96,17 @@ this.Log = {
   // logger.info(Log.enumerateInterfaces(someObject).join(","));
   enumerateInterfaces: function Log_enumerateInterfaces(aObject) {
     let interfaces = [];
 
     for (i in Ci) {
       try {
         aObject.QueryInterface(Ci[i]);
         interfaces.push(i);
-      }
-      catch (ex) {}
+      } catch (ex) {}
     }
 
     return interfaces;
   },
 
   // Logging helper:
   // let logger = Log.repository.getLogger("foo");
   // logger.info(Log.enumerateProperties(someObject).join(","));
@@ -115,18 +114,17 @@ this.Log = {
     let properties = [];
 
     for (p in aObject) {
       try {
         if (aExcludeComplexTypes &&
             (typeof(aObject[p]) == "object" || typeof(aObject[p]) == "function"))
           continue;
         properties.push(p + " = " + aObject[p]);
-      }
-      catch (ex) {
+      } catch (ex) {
         properties.push(p + " = " + ex);
       }
     }
 
     return properties;
   },
 
   _formatError: function _formatError(e) {
@@ -147,18 +145,17 @@ this.Log = {
   // This is for back compatibility with services/common/utils.js; we duplicate
   // some of the logic in ParameterFormatter
   exceptionStr: function exceptionStr(e) {
     if (!e) {
       return "" + e;
     }
     if (e instanceof Ci.nsIException) {
       return e.toString() + " " + Log.stackTrace(e);
-    }
-    else if (isError(e)) {
+    } else if (isError(e)) {
       return Log._formatError(e);
     }
     // else
     let message = e.message ? e.message : e;
     return message + " " + Log.stackTrace(e);
   },
 
   stackTrace: function stackTrace(e) {
@@ -658,30 +655,28 @@ ParameterFormatter.prototype = {
       }
       // Pass through primitive types and objects that unbox to primitive types.
       if ((typeof(ob) != "object" || typeof(ob.valueOf()) != "object") &&
           typeof(ob) != "function") {
         return ob;
       }
       if (ob instanceof Ci.nsIException) {
         return ob.toString() + " " + Log.stackTrace(ob);
-      }
-      else if (isError(ob)) {
+      } else if (isError(ob)) {
         return Log._formatError(ob);
       }
       // Just JSONify it. Filter out our internal fields and those the caller has
       // already handled.
       return JSON.stringify(ob, (key, val) => {
         if (INTERNAL_FIELDS.has(key)) {
           return undefined;
         }
         return val;
       });
-    }
-    catch (e) {
+    } catch (e) {
       dumpError("Exception trying to format object for log message: " + Log.exceptionStr(e));
     }
     // Fancy formatting failed. Just toSource() it - but even this may fail!
     try {
       return ob.toSource();
     } catch (_) { }
     try {
       return "" + ob;
--- a/toolkit/modules/NewTabUtils.jsm
+++ b/toolkit/modules/NewTabUtils.jsm
@@ -84,18 +84,17 @@ function LinksStorage() {
     if (this._storedVersion < this._version) {
       // This is either an upgrade, or version information is missing.
       if (this._storedVersion < 1) {
         // Version 1 moved data from DOM Storage to prefs.  Since migrating from
         // version 0 is no more supported, we just reportError a dataloss later.
         throw new Error("Unsupported newTab storage version");
       }
       // Add further migration steps here.
-    }
-    else {
+    } else {
       // This is a downgrade.  Since we cannot predict future, upgrades should
       // be backwards compatible.  We will set the version to the old value
       // regardless, so, on next upgrade, the migration steps will run again.
       // For this reason, they should also be able to run multiple times, even
       // on top of an already up-to-date storage.
     }
   } catch (ex) {
     // Something went wrong in the update process, we can't recover from here,
@@ -1188,18 +1187,17 @@ var Links = {
           insertionLink = existingLink;
         }
       }
       // Update our copy's title in O(1).
       if ("title" in aLink && aLink.title != existingLink.title) {
         existingLink.title = aLink.title;
         updatePages = true;
       }
-    }
-    else if (this._sortProperties.every(prop => prop in aLink)) {
+    } else if (this._sortProperties.every(prop => prop in aLink)) {
       // Before doing the O(lg n) insertion below, do an O(1) check for the
       // common case where the new link is too low-ranked to be in the list.
       if (sortedLinks.length && sortedLinks.length == aProvider.maxNumLinks) {
         let lastLink = sortedLinks[sortedLinks.length - 1];
         if (this.compareLinks(lastLink, aLink) < 0) {
           return;
         }
       }
--- a/toolkit/modules/ObjectUtils.jsm
+++ b/toolkit/modules/ObjectUtils.jsm
@@ -120,17 +120,17 @@ function isArguments(object) {
   return instanceOf(object, "Arguments");
 }
 
 function objEquiv(a, b) {
   if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) {
     return false;
   }
   // An identical 'prototype' property.
-  if ((a.prototype || undefined)  != (b.prototype || undefined)) {
+  if ((a.prototype || undefined) != (b.prototype || undefined)) {
     return false;
   }
   // Object.keys may be broken through screwy arguments passing. Converting to
   // an array solves the problem.
   if (isArguments(a)) {
     if (!isArguments(b)) {
       return false;
     }
--- a/toolkit/modules/PageMenu.jsm
+++ b/toolkit/modules/PageMenu.jsm
@@ -155,18 +155,17 @@ PageMenu.prototype = {
     let type = event.type;
     let target = event.target;
     if (type == "command" && target.hasAttribute(this.GENERATEDITEMID_ATTR)) {
       // If a builder is assigned, call click on it directly. Otherwise, this is
       // likely a menu with data from another process, so send a message to the
       // browser to execute the menuitem.
       if (this._builder) {
         this._builder.click(target.getAttribute(this.GENERATEDITEMID_ATTR));
-      }
-      else if (this._browser) {
+      } else if (this._browser) {
         let win = target.ownerDocument.defaultView;
         let windowUtils = win.QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIDOMWindowUtils);
         this._browser.messageManager.sendAsyncMessage("ContextMenu:DoCustomCommand", {
           generatedItemId: target.getAttribute(this.GENERATEDITEMID_ATTR),
           handlingUserInput: windowUtils.isHandlingUserInput
         });
       }
--- a/toolkit/modules/Preferences.jsm
+++ b/toolkit/modules/Preferences.jsm
@@ -24,18 +24,17 @@ this.Preferences =
     this._cachedPrefBranch = null;
     if (isObject(args)) {
       if (args.branch)
         this._branchStr = args.branch;
       if (args.defaultBranch)
         this._defaultBranch = args.defaultBranch;
       if (args.privacyContext)
         this._privacyContext = args.privacyContext;
-    }
-    else if (args)
+    } else if (args)
       this._branchStr = args;
   };
 
 /**
  * Get the value of a pref, if any; otherwise return the default value.
  *
  * @param   prefName  {String|Array}
  *          the pref to get, or an array of prefs to get
@@ -308,33 +307,32 @@ Preferences.observe = function(prefName,
  */
 Preferences.ignore = function(prefName, callback, thisObject) {
   let fullPrefName = this._branchStr + (prefName || "");
 
   // This seems fairly inefficient, but I'm not sure how much better we can
   // make it.  We could index by fullBranch, but we can't index by callback
   // or thisObject, as far as I know, since the keys to JavaScript hashes
   // (a.k.a. objects) can apparently only be primitive values.
-  let [observer] = observers.filter(v => v.prefName   == fullPrefName &&
-                                         v.callback   == callback &&
+  let [observer] = observers.filter(v => v.prefName == fullPrefName &&
+                                         v.callback == callback &&
                                          v.thisObject == thisObject);
 
   if (observer) {
     Preferences._prefBranch.removeObserver(fullPrefName, observer);
     observers.splice(observers.indexOf(observer), 1);
   } else {
     Cu.reportError(`Attempt to stop observing a preference "${prefName}" that's not being observed`);
   }
 };
 
 Preferences.resetBranch = function(prefBranch = "") {
   try {
     this._prefBranch.resetBranch(prefBranch);
-  }
-  catch (ex) {
+  } catch (ex) {
     // The current implementation of nsIPrefBranch in Mozilla
     // doesn't implement resetBranch, so we do it ourselves.
     if (ex.result == Cr.NS_ERROR_NOT_IMPLEMENTED)
       this.reset(this._prefBranch.getChildList(prefBranch, []));
     else
       throw ex;
   }
 },
@@ -409,18 +407,17 @@ PrefObserver.prototype = {
 
     if (typeof this.callback == "function") {
       let prefValue = Preferences.get(data);
 
       if (this.thisObject)
         this.callback.call(this.thisObject, prefValue);
       else
         this.callback(prefValue);
-    }
-    else // typeof this.callback == "object" (nsIObserver)
+    } else // typeof this.callback == "object" (nsIObserver)
       this.callback.observe(subject, topic, data);
   }
 };
 
 function isObject(val) {
   // We can't check for |val.constructor == Object| here, since the value
   // might be from a different context whose Object constructor is not the same
   // as ours, so instead we match based on the name of the constructor.
--- a/toolkit/modules/Promise-backend.js
+++ b/toolkit/modules/Promise-backend.js
@@ -329,18 +329,17 @@ const ERRORS_TO_REPORT = ["EvalError", "
 
 /**
  * The Promise constructor. Creates a new promise given an executor callback.
  * The executor callback is called with the resolve and reject handlers.
  *
  * @param aExecutor
  *        The callback that will be called with resolve and reject.
  */
-this.Promise = function Promise(aExecutor)
-{
+this.Promise = function Promise(aExecutor) {
   if (typeof(aExecutor) != "function") {
     throw new TypeError("Promise constructor must be called with an executor.");
   }
 
   /*
    * Object holding all of our internal values we associate with the promise.
    */
   Object.defineProperty(this, N_INTERNALS, { value: {
@@ -427,18 +426,17 @@ this.Promise = function Promise(aExecuto
  *          - If the callback returns a promise, the new promise will
  *            eventually assume the same state as the returned promise.
  *
  * @note If the aOnResolve callback throws an exception, the aOnReject
  *       callback is not invoked.  You can register a rejection callback on
  *       the returned promise instead, to process any exception occurred in
  *       either of the callbacks registered on this promise.
  */
-Promise.prototype.then = function(aOnResolve, aOnReject)
-{
+Promise.prototype.then = function(aOnResolve, aOnReject) {
   let handler = new Handler(this, aOnResolve, aOnReject);
   this[N_INTERNALS].handlers.push(handler);
 
   // Ensure the handler is scheduled for processing if this promise is already
   // resolved or rejected.
   if (this[N_INTERNALS].status != STATUS_PENDING) {
 
     // This promise is not the last in the chain anymore. Remove any watchdog.
@@ -461,47 +459,44 @@ Promise.prototype.then = function(aOnRes
  *
  * @param aOnReject
  *        The rejection handler.
  *
  * @return A new pending promise returned.
  *
  * @see Promise.prototype.then
  */
-Promise.prototype.catch = function(aOnReject)
-{
+Promise.prototype.catch = function(aOnReject) {
   return this.then(undefined, aOnReject);
 };
 
 /**
  * Creates a new pending promise and provides methods to resolve or reject it.
  *
  * @return A new object, containing the new promise in the "promise" property,
  *         and the methods to change its state in the "resolve" and "reject"
  *         properties.  See the Deferred documentation for details.
  */
-Promise.defer = function()
-{
+Promise.defer = function() {
   return new Deferred();
 };
 
 /**
  * Creates a new promise resolved with the specified value, or propagates the
  * state of an existing promise.
  *
  * @param aValue
  *        If this value is not a promise, including "undefined", it becomes
  *        the resolution value of the returned promise.  If this value is a
  *        promise, then the returned promise will eventually assume the same
  *        state as the provided promise.
  *
  * @return A promise that can be pending, resolved, or rejected.
  */
-Promise.resolve = function(aValue)
-{
+Promise.resolve = function(aValue) {
   if (aValue && typeof(aValue) == "function" && aValue.isAsyncFunction) {
     throw new TypeError(
       "Cannot resolve a promise with an async function. " +
       "You should either invoke the async function first " +
       "or use 'Task.spawn' instead of 'Task.async' to start " +
       "the Task and return its promise.");
   }
 
@@ -521,18 +516,17 @@ Promise.resolve = function(aValue)
  *        exception handling.
  *
  * @return A rejected promise.
  *
  * @note The aReason argument should not be a promise.  Using a rejected
  *       promise for the value of aReason would make the rejection reason
  *       equal to the rejected promise itself, and not its rejection reason.
  */
-Promise.reject = function(aReason)
-{
+Promise.reject = function(aReason) {
   return new Promise((_, aReject) => aReject(aReason));
 };
 
 /**
  * Returns a promise that is resolved or rejected when all values are
  * resolved or any is rejected.
  *
  * @param aValues
@@ -542,18 +536,17 @@ Promise.reject = function(aReason)
  *
  * @return A new promise that is fulfilled when all values are resolved or
  *         that is rejected when any of the values are rejected. Its
  *         resolution value will be an array of all resolved values in the
  *         given order, or undefined if aValues is an empty array. The reject
  *         reason will be forwarded from the first promise in the list of
  *         given promises to be rejected.
  */
-Promise.all = function(aValues)
-{
+Promise.all = function(aValues) {
   if (aValues == null || typeof(aValues[Symbol.iterator]) != "function") {
     throw new Error("Promise.all() expects an iterable.");
   }
 
   return new Promise((resolve, reject) => {
     let values = Array.isArray(aValues) ? aValues : [...aValues];
     let countdown = values.length;
     let resolutionValues = new Array(countdown);
@@ -593,18 +586,17 @@ Promise.all = function(aValues)
  *        Iterable of values or promises that may be pending, resolved, or
  *        rejected. When any is resolved or rejected, the returned promise will
  *        be resolved or rejected as to the given value or reason.
  *
  * @return A new promise that is fulfilled when any values are resolved or
  *         rejected. Its resolution value will be forwarded from the resolution
  *         value or rejection reason.
  */
-Promise.race = function(aValues)
-{
+Promise.race = function(aValues) {
   if (aValues == null || typeof(aValues[Symbol.iterator]) != "function") {
     throw new Error("Promise.race() expects an iterable.");
   }
 
   return new Promise((resolve, reject) => {
     for (let value of aValues) {
       Promise.resolve(value).then(resolve, reject);
     }
@@ -683,18 +675,17 @@ this.PromiseWalker = {
    * @param aPromise
    *        Promise that needs to change state.  If this is already resolved or
    *        rejected, this method has no effect.
    * @param aStatus
    *        New desired status, either STATUS_RESOLVED or STATUS_REJECTED.
    * @param aValue
    *        Associated resolution value or rejection reason.
    */
-  completePromise(aPromise, aStatus, aValue)
-  {
+  completePromise(aPromise, aStatus, aValue) {
     // Do nothing if the promise is already resolved or rejected.
     if (aPromise[N_INTERNALS].status != STATUS_PENDING) {
       return;
     }
 
     // Resolving with another promise will cause this promise to eventually
     // assume the state of the provided promise.
     if (aStatus == STATUS_RESOLVED && aValue &&
@@ -717,18 +708,17 @@ this.PromiseWalker = {
           FinalizationWitnessService.make("promise-finalization-witness", id);
       aPromise[N_INTERNALS].witness = [id, witness];
     }
   },
 
   /**
    * Sets up the PromiseWalker loop to start on the next tick of the event loop
    */
-  scheduleWalkerLoop()
-  {
+  scheduleWalkerLoop() {
     this.walkerLoopScheduled = true;
 
     // If this file is loaded on a worker thread, DOMPromise will not behave as
     // expected: because native promises are not aware of nested event loops
     // created by the debugger, their respective handlers will not be called
     // until after leaving the nested event loop. The debugger server relies
     // heavily on the use promises, so this could cause the debugger to hang.
     //
@@ -758,18 +748,17 @@ this.PromiseWalker = {
   /**
    * Schedules the resolution or rejection handlers registered on the provided
    * promise for processing.
    *
    * @param aPromise
    *        Resolved or rejected promise whose handlers should be processed.  It
    *        is expected that this promise has at least one handler to process.
    */
-  schedulePromise(aPromise)
-  {
+  schedulePromise(aPromise) {
     // Migrate the handlers from the provided promise to the global list.
     for (let handler of aPromise[N_INTERNALS].handlers) {
       this.handlers.push(handler);
     }
     aPromise[N_INTERNALS].handlers.length = 0;
 
     // Schedule the walker loop on the next tick of the event loop.
     if (!this.walkerLoopScheduled) {
@@ -785,18 +774,17 @@ this.PromiseWalker = {
 
   /**
    * Processes all the known handlers during this tick of the event loop.  This
    * eager processing is done to avoid unnecessarily exiting and re-entering the
    * JavaScript context for each handler on a resolved or rejected promise.
    *
    * This function is called with "this" bound to the PromiseWalker object.
    */
-  walkerLoop()
-  {
+  walkerLoop() {
     // If there is more than one handler waiting, reschedule the walker loop
     // immediately.  Otherwise, use walkerLoopScheduled to tell schedulePromise()
     // to reschedule the loop if it adds more handlers to the queue.  This makes
     // this walker resilient to the case where one handler does not return, but
     // starts a nested event loop.  In that case, the newly scheduled walker will
     // take over.  In the common case, the newly scheduled walker will be invoked
     // after this one has returned, with no actual handler to process.  This
     // small overhead is required to make nested event loops work correctly, but
@@ -819,18 +807,17 @@ this.PromiseWalker = {
 PromiseWalker.walkerLoop = PromiseWalker.walkerLoop.bind(PromiseWalker);
 
 // Deferred
 
 /**
  * Returned by "Promise.defer" to provide a new promise along with methods to
  * change its state.
  */
-function Deferred()
-{
+function Deferred() {
   this.promise = new Promise((aResolve, aReject) => {
     this.resolve = aResolve;
     this.reject = aReject;
   });
   Object.freeze(this);
 }
 
 Deferred.prototype = {
@@ -879,18 +866,17 @@ Deferred.prototype = {
   reject: null,
 };
 
 // Handler
 
 /**
  * Handler registered on a promise by the "then" function.
  */
-function Handler(aThisPromise, aOnResolve, aOnReject)
-{
+function Handler(aThisPromise, aOnResolve, aOnReject) {
   this.thisPromise = aThisPromise;
   this.onResolve = aOnResolve;
   this.onReject = aOnReject;
   this.nextPromise = new Promise(() => {});
 }
 
 Handler.prototype = {
   /**
@@ -912,18 +898,17 @@ Handler.prototype = {
    * New promise that will be returned by the "then" method.
    */
   nextPromise: null,
 
   /**
    * Called after thisPromise is resolved or rejected, invokes the appropriate
    * callback and propagates the result to nextPromise.
    */
-  process()
-  {
+  process() {
     // The state of this promise is propagated unless a handler is defined.
     let nextStatus = this.thisPromise[N_INTERNALS].status;
     let nextValue = this.thisPromise[N_INTERNALS].value;
 
     try {
       // If a handler is defined for either resolution or rejection, invoke it
       // to determine the state of the next promise, that will be resolved with
       // the returned value, that can also be another promise.
--- a/toolkit/modules/PropertyListUtils.jsm
+++ b/toolkit/modules/PropertyListUtils.jsm
@@ -104,25 +104,23 @@ this.PropertyListUtils = Object.freeze({
         let onLoadEnd = function() {
           let root = null;
           try {
             fileReader.removeEventListener("loadend", onLoadEnd, false);
             if (fileReader.readyState != fileReader.DONE)
               throw new Error("Could not read file contents: " + fileReader.error);
 
             root = this._readFromArrayBufferSync(fileReader.result);
-          }
-          finally {
+          } finally {
             aCallback(root);
           }
         }.bind(this);
         fileReader.addEventListener("loadend", onLoadEnd, false);
         fileReader.readAsArrayBuffer(file);
-      }
-      catch (ex) {
+      } catch (ex) {
         aCallback(null);
         throw ex;
       }
     }.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
   },
 
   /**
    * DO NOT USE ME.  Once Bug 718189 is fixed, this method won't be public.
@@ -136,18 +134,17 @@ this.PropertyListUtils = Object.freeze({
     // Convert the buffer into an XML tree.
     let domParser = Cc["@mozilla.org/xmlextras/domparser;1"].
                     createInstance(Ci.nsIDOMParser);
     let bytesView = new Uint8Array(aBuffer);
     try {
       let doc = domParser.parseFromBuffer(bytesView, bytesView.length,
                                           "application/xml");
       return new XMLPropertyListReader(doc).root;
-    }
-    catch (ex) {
+    } catch (ex) {
       throw new Error("aBuffer cannot be parsed as a DOM document: " + ex);
     }
   },
 
   TYPE_PRIMITIVE:    0,
   TYPE_DATE:         1,
   TYPE_UINT8_ARRAY:  2,
   TYPE_ARRAY:        3,
@@ -240,18 +237,17 @@ function BinaryPropertyListReader(aBuffe
   const JS_MAX_INT = Math.pow(2, 53);
   this._JS_MAX_INT_SIGNED = ctypes.Int64(JS_MAX_INT);
   this._JS_MAX_INT_UNSIGNED = ctypes.UInt64(JS_MAX_INT);
   this._JS_MIN_INT = ctypes.Int64(-JS_MAX_INT);
 
   try {
     this._readTrailerInfo();
     this._readObjectsOffsets();
-  }
-  catch (ex) {
+  } catch (ex) {
     throw new Error("Could not read aBuffer as a binary property list");
   }
   this._objects = [];
 }
 
 BinaryPropertyListReader.prototype = {
   /**
    * Checks if the given ArrayBuffer can be read as a binary property list.
@@ -399,46 +395,40 @@ BinaryPropertyListReader.prototype = {
   _readUnsignedInts:
   function BPLR__readUnsignedInts(aByteOffset, aIntSize, aLength, aBigIntAllowed) {
     let uints = [];
     for (let offset = aByteOffset;
          offset < aByteOffset + aIntSize * aLength;
          offset += aIntSize) {
       if (aIntSize == 1) {
         uints.push(this._dataView.getUint8(offset));
-      }
-      else if (aIntSize == 2) {
+      } else if (aIntSize == 2) {
         uints.push(this._dataView.getUint16(offset));
-      }
-      else if (aIntSize == 3) {
+      } else if (aIntSize == 3) {
         let int24 = Uint8Array(4);
         int24[3] = 0;
         int24[2] = this._dataView.getUint8(offset);
         int24[1] = this._dataView.getUint8(offset + 1);
         int24[0] = this._dataView.getUint8(offset + 2);
         uints.push(Uint32Array(int24.buffer)[0]);
-      }
-      else if (aIntSize == 4) {
+      } else if (aIntSize == 4) {
         uints.push(this._dataView.getUint32(offset));
-      }
-      else if (aIntSize == 8) {
+      } else if (aIntSize == 8) {
         let lo = this._dataView.getUint32(offset + 4);
         let hi = this._dataView.getUint32(offset);
         let uint64 = ctypes.UInt64.join(hi, lo);
         if (ctypes.UInt64.compare(uint64, this._JS_MAX_INT_UNSIGNED) == 1) {
           if (aBigIntAllowed === true)
             uints.push(PropertyListUtils.wrapInt64(uint64.toString()));
           else
             throw new Error("Integer too big to be read as float 64");
-        }
-        else {
+        } else {
           uints.push(parseInt(uint64, 10));
         }
-      }
-      else {
+      } else {
         throw new Error("Unsupported size: " + aIntSize);
       }
     }
 
     return uints;
   },
 
   /**
--- a/toolkit/modules/RemoteController.jsm
+++ b/toolkit/modules/RemoteController.jsm
@@ -7,18 +7,17 @@ this.EXPORTED_SYMBOLS = ["RemoteControll
 
 const Ci = Components.interfaces;
 const Cc = Components.classes;
 const Cu = Components.utils;
 const Cr = Components.results;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
-function RemoteController(browser)
-{
+function RemoteController(browser) {
   this._browser = browser;
 
   // A map of commands that have had their enabled/disabled state assigned. The
   // value of each key will be true if enabled, and false if disabled.
   this._supportedCommands = { };
 }
 
 RemoteController.prototype = {
--- a/toolkit/modules/RemoteFinder.jsm
+++ b/toolkit/modules/RemoteFinder.jsm
@@ -29,18 +29,17 @@ RemoteFinder.prototype = {
   destroy() {},
 
   swapBrowser(aBrowser) {
     if (this._messageManager) {
       this._messageManager.removeMessageListener("Finder:Result", this);
       this._messageManager.removeMessageListener("Finder:MatchesResult", this);
       this._messageManager.removeMessageListener("Finder:CurrentSelectionResult", this);
       this._messageManager.removeMessageListener("Finder:HighlightFinished", this);
-    }
-    else {
+    } else {
       aBrowser.messageManager.sendAsyncMessage("Finder:Initialize");
     }
 
     this._browser = aBrowser;
     this._messageManager = this._browser.messageManager;
     this._messageManager.addMessageListener("Finder:Result", this);
     this._messageManager.addMessageListener("Finder:MatchesResult", this);
     this._messageManager.addMessageListener("Finder:CurrentSelectionResult", this);
--- a/toolkit/modules/RemotePageManager.jsm
+++ b/toolkit/modules/RemotePageManager.jsm
@@ -28,18 +28,17 @@ MessageListener.prototype = {
     let listeners = this.listeners.get(message.name);
     if (!listeners) {
       return;
     }
 
     for (let listener of listeners.values()) {
       try {
         listener(message);
-      }
-      catch (e) {
+      } catch (e) {
         Cu.reportError(e);
       }
     }
   },
 
   addMessageListener(name, callback) {
     if (!this.listeners.has(name))
       this.listeners.set(name, new Set([callback]));
@@ -258,18 +257,17 @@ MessagePort.prototype = {
     });
   },
 
   // Called to destroy this port
   destroy() {
     try {
       // This can fail in the child process if the tab has already been closed
       this.messageManager.removeMessageListener("RemotePage:Message", this.message);
-    }
-    catch (e) { }
+    } catch (e) { }
     this.messageManager = null;
     this.destroyed = true;
     this.portID = null;
     this.listener = null;
   },
 };
 
 
@@ -342,18 +340,17 @@ ChromeMessagePort.prototype.message = fu
   if (messagedata.name == "RemotePage:Unload")
     this.destroy();
 };
 
 ChromeMessagePort.prototype.destroy = function() {
   try {
     this._browser.removeEventListener(
         "SwapDocShells", this.swapBrowsers, false);
-  }
-  catch (e) {
+  } catch (e) {
     // It's possible the browser instance is already dead so we can just ignore
     // this error.
   }
 
   this._browser = null;
   Services.obs.removeObserver(this, "message-manager-disconnect");
   MessagePort.prototype.destroy.call(this);
 };
@@ -385,18 +382,17 @@ function ChildMessagePort(contentFrame, 
     window.removeEventListener("load", loadListener, false);
   };
   window.addEventListener("load", loadListener, false);
 
   // Destroy the port when the window is unloaded
   window.addEventListener("unload", () => {
     try {
       this.sendAsyncMessage("RemotePage:Unload");
-    }
-    catch (e) {
+    } catch (e) {
       // If the tab has been closed the frame message manager has already been
       // destroyed
     }
     this.destroy();
   }, false);
 
   // Tell the main process to set up its side of the message pipe.
   this.messageManager.sendAsyncMessage("RemotePage:InitPort", {
--- a/toolkit/modules/RemoteSecurityUI.jsm
+++ b/toolkit/modules/RemoteSecurityUI.jsm
@@ -6,18 +6,17 @@
 this.EXPORTED_SYMBOLS = ["RemoteSecurityUI"];
 
 const Ci = Components.interfaces;
 const Cc = Components.classes;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
-function RemoteSecurityUI()
-{
+function RemoteSecurityUI() {
     this._SSLStatus = null;
     this._state = 0;
 }
 
 RemoteSecurityUI.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsISSLStatusProvider, Ci.nsISecureBrowserUI]),
 
   // nsISSLStatusProvider
--- a/toolkit/modules/RemoteWebProgress.jsm
+++ b/toolkit/modules/RemoteWebProgress.jsm
@@ -6,24 +6,22 @@
 this.EXPORTED_SYMBOLS = ["RemoteWebProgressManager"];
 
 const Ci = Components.interfaces;
 const Cc = Components.classes;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
-function newURI(spec)
-{
+function newURI(spec) {
     return Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService)
                                                     .newURI(spec, null, null);
 }
 
-function RemoteWebProgressRequest(spec, originalSpec, requestCPOW)
-{
+function RemoteWebProgressRequest(spec, originalSpec, requestCPOW) {
   this.wrappedJSObject = this;
 
   this._uri = newURI(spec);
   this._originalURI = newURI(originalSpec);
   this._requestCPOW = requestCPOW;
 }
 
 RemoteWebProgressRequest.prototype = {
--- a/toolkit/modules/SpatialNavigation.jsm
+++ b/toolkit/modules/SpatialNavigation.jsm
@@ -74,17 +74,17 @@ function _onInputKeyPress(event, callbac
     return;
   }
 
   // Use whatever key value is available (either keyCode or charCode).
   // It might be useful for addons or whoever wants to set different
   // key to be used here (e.g. "a", "F1", "arrowUp", ...).
   var key = event.which || event.keyCode;
 
-  if (key != PrefObserver['keyCodeDown']  &&
+  if (key != PrefObserver['keyCodeDown'] &&
       key != PrefObserver['keyCodeRight'] &&
       key != PrefObserver['keyCodeUp'] &&
       key != PrefObserver['keyCodeLeft'] &&
       key != PrefObserver['keyCodeReturn']) {
     return;
   }
 
   if (key == PrefObserver['keyCodeReturn']) {
@@ -295,18 +295,17 @@ function _getBestToFocus(nodes, key, cur
       continue;
     }
 
     // Of the remaining nodes, pick the one closest to the currently focused
     // node.
     let curDist = _spatialDistanceOfCorner(currentlyFocused, nodes[i], key);
     if ((curDist > bestDist) || curDist === -1) {
       continue;
-    }
-    else if (curDist === bestDist) {
+    } else if (curDist === bestDist) {
       let midCurDist = _spatialDistance(currentlyFocused, nodes[i]);
       let midBestDist = _spatialDistance(currentlyFocused, best);
       if (midCurDist > midBestDist)
         continue;
     }
 
     best = nodes[i];
     bestDist = curDist;
@@ -422,66 +421,58 @@ function _spatialDistanceOfCorner(from, 
       // Make sure the "to" node is really at the left side of "from" node by
       //  1. Check the mid point
       //  2. The right border of "to" node must be less than the "from" node
       if ((fromMid.x - toMid.x) < 0 || toRect.right >= fromRect.right)
         return -1;
       hDistance = Math.abs(fromRect.left - toRect.right);
       if (toRect.bottom <= fromRect.top) {
         vDistance = fromRect.top - toRect.bottom;
-      }
-      else if (fromRect.bottom <= toRect.top) {
+      } else if (fromRect.bottom <= toRect.top) {
         vDistance = toRect.top - fromRect.bottom;
-      }
-      else {
+      } else {
         vDistance = 0;
       }
       break;
 
     case PrefObserver['keyCodeRight']:
       if ((toMid.x - fromMid.x) < 0 || toRect.left <= fromRect.left)
         return -1;
       hDistance = Math.abs(toRect.left - fromRect.right);
       if (toRect.bottom <= fromRect.top) {
         vDistance = fromRect.top - toRect.bottom;
-      }
-      else if (fromRect.bottom <= toRect.top) {
+      } else if (fromRect.bottom <= toRect.top) {
         vDistance = toRect.top - fromRect.bottom;
-      }
-      else {
+      } else {
         vDistance = 0;
       }
       break;
 
     case PrefObserver['keyCodeUp']:
       if ((fromMid.y - toMid.y) < 0 || toRect.bottom >= fromRect.bottom)
         return -1;
       vDistance = Math.abs(fromRect.top - toRect.bottom);
       if (fromRect.right <= toRect.left) {
         hDistance = toRect.left - fromRect.right;
-      }
-      else if (toRect.right <= fromRect.left) {
+      } else if (toRect.right <= fromRect.left) {
         hDistance = fromRect.left - toRect.right;
-      }
-      else {
+      } else {
         hDistance = 0;
       }
       break;
 
     case PrefObserver['keyCodeDown']:
       if ((toMid.y - fromMid.y) < 0 || toRect.top <= fromRect.top)
         return -1;
       vDistance = Math.abs(toRect.top - fromRect.bottom);
       if (fromRect.right <= toRect.left) {
         hDistance = toRect.left - fromRect.right;
-      }
-      else if (toRect.right <= fromRect.left) {
+      } else if (toRect.right <= fromRect.left) {
         hDistance = fromRect.left - toRect.right;
-      }
-      else {
+      } else {
         hDistance = 0;
       }
       break;
   }
   return Math.round(Math.pow(hDistance, 2) +
                     Math.pow(vDistance, 2));
 }
 
--- a/toolkit/modules/Sqlite.jsm
+++ b/toolkit/modules/Sqlite.jsm
@@ -254,17 +254,17 @@ function ConnectionData(connection, iden
 
   // An AsyncShutdown barrier used to make sure that we wait until clients
   // are done before shutting down the connection.
   this._barrier = new AsyncShutdown.Barrier(`${this._identifier}: waiting for clients`);
 
   Barriers.connections.client.addBlocker(
     this._identifier + ": waiting for shutdown",
     this._deferredClose.promise,
-    () =>  ({
+    () => ({
       identifier: this._identifier,
       isCloseRequested: this._closeRequested,
       hasDbConn: !!this._dbConn,
       hasInProgressTransaction: this._hasInProgressTransaction,
       pendingStatements: this._pendingStatements.size,
       statementCounter: this._statementCounter,
     })
   );
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -10,18 +10,17 @@ const { classes: Cc, interfaces: Ci, uti
 
 Cu.import("resource://gre/modules/AddonManager.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/AppConstants.jsm");
 
 var Experiments;
 try {
   Experiments = Cu.import("resource:///modules/experiments/Experiments.jsm").Experiments;
-}
-catch (e) {
+} catch (e) {
 }
 
 // We use a preferences whitelist to make sure we only show preferences that
 // are useful for support and won't compromise the user's privacy.  Note that
 // entries are *prefixes*: for example, "accessibility." applies to all prefs
 // under the "accessibility.*" branch.
 const PREFS_WHITELIST = [
   "accessibility.",
@@ -153,18 +152,17 @@ this.Troubleshoot = {
       if (--numPending == 0)
         // Ensure that done is always and truly called asynchronously.
         Services.tm.mainThread.dispatch(done.bind(null, snapshot),
                                         Ci.nsIThread.DISPATCH_NORMAL);
     }
     for (let name in dataProviders) {
       try {
         dataProviders[name](providerDone.bind(null, name));
-      }
-      catch (err) {
+      } catch (err) {
         let msg = "Troubleshoot data provider failed: " + name + "\n" + err;
         Cu.reportError(msg);
         providerDone(name, msg);
       }
     }
   },
 
   kMaxCrashAge: 3 * 24 * 60 * 60 * 1000, // 3 days
@@ -193,24 +191,22 @@ var dataProviders = {
       safeMode: Services.appinfo.inSafeMode,
     };
 
     if (AppConstants.MOZ_UPDATER)
       data.updateChannel = Cu.import("resource://gre/modules/UpdateUtils.jsm", {}).UpdateUtils.UpdateChannel;
 
     try {
       data.vendor = Services.prefs.getCharPref("app.support.vendor");
-    }
-    catch (e) {}
+    } catch (e) {}
     let urlFormatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].
                        getService(Ci.nsIURLFormatter);
     try {
       data.supportURL = urlFormatter.formatURLPref("app.support.baseURL");
-    }
-    catch (e) {}
+    } catch (e) {}
 
     data.numTotalWindows = 0;
     data.numRemoteWindows = 0;
     let winEnumer = Services.wm.getEnumerator("navigator:browser");
     while (winEnumer.hasMoreElements()) {
       data.numTotalWindows++;
       let remote = winEnumer.getNext().
                    QueryInterface(Ci.nsIInterfaceRequestor).
@@ -287,50 +283,47 @@ var dataProviders = {
     function statusMsgForFeature(feature) {
       // We return an array because in the tryNewerDriver case we need to
       // include the suggested version, which the consumer likely needs to plug
       // into a format string from a localization file.  Rather than returning
       // a string in some cases and an array in others, return an array always.
       let msg = [""];
       try {
         var status = gfxInfo.getFeatureStatus(feature);
-      }
-      catch (e) {}
+      } catch (e) {}
       switch (status) {
       case Ci.nsIGfxInfo.FEATURE_BLOCKED_DEVICE:
       case Ci.nsIGfxInfo.FEATURE_DISCOURAGED:
         msg = ["blockedGfxCard"];
         break;
       case Ci.nsIGfxInfo.FEATURE_BLOCKED_OS_VERSION:
         msg = ["blockedOSVersion"];
         break;
       case Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION:
         try {
           var suggestedDriverVersion =
             gfxInfo.getFeatureSuggestedDriverVersion(feature);
-        }
-        catch (e) {}
+        } catch (e) {}
         msg = suggestedDriverVersion ?
               ["tryNewerDriver", suggestedDriverVersion] :
               ["blockedDriver"];
         break;
       case Ci.nsIGfxInfo.FEATURE_BLOCKED_MISMATCHED_VERSION:
         msg = ["blockedMismatchedVersion"];
         break;
       }
       return msg;
     }
 
     let data = {};
 
     try {
       // nsIGfxInfo may not be implemented on some platforms.
       var gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
-    }
-    catch (e) {}
+    } catch (e) {}
 
     let promises = [];
     // done will be called upon all pending promises being resolved.
     // add your pending promise to promises when adding new ones.
     function completed() {
       Promise.all(promises).then(() => done(data));
     }
 
@@ -344,18 +337,17 @@ var dataProviders = {
       try {
         // NOTE: windowless browser's windows should not be reported in the graphics troubleshoot report
         if (winUtils.layerManagerType == "None") {
           continue;
         }
         data.numTotalWindows++;
         data.windowLayerManagerType = winUtils.layerManagerType;
         data.windowLayerManagerRemote = winUtils.layerManagerRemote;
-      }
-      catch (e) {
+      } catch (e) {
         continue;
       }
       if (data.windowLayerManagerType != "Basic")
         data.numAcceleratedWindows++;
     }
 
     let winUtils = Services.wm.getMostRecentWindow("").
                    QueryInterface(Ci.nsIInterfaceRequestor).
@@ -409,18 +401,17 @@ var dataProviders = {
       DWriteEnabled: "directWriteEnabled",
       DWriteVersion: "directWriteVersion",
       cleartypeParameters: "clearTypeParameters",
     };
 
     for (let prop in gfxInfoProps) {
       try {
         data[gfxInfoProps[prop] || prop] = gfxInfo[prop];
-      }
-      catch (e) {}
+      } catch (e) {}
     }
 
     if (("direct2DEnabled" in data) && !data.direct2DEnabled)
       data.direct2DEnabledMessage =
         statusMsgForFeature(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
 
 
     let doc =
@@ -444,18 +435,17 @@ var dataProviders = {
             },
 
             false
         );
 
         let gl = null;
         try {
           gl = canvas.getContext(contextType);
-        }
-        catch (e) {
+        } catch (e) {
           if (!creationError) {
             creationError = e.toString();
           }
         }
         if (!gl)
             return creationError || "(no info)";
 
 
@@ -515,18 +505,17 @@ var dataProviders = {
   accessibility: function accessibility(done) {
     let data = {};
     data.isActive = Cc["@mozilla.org/xre/app-info;1"].
                     getService(Ci.nsIXULRuntime).
                     accessibilityEnabled;
     try {
       data.forceDisabled =
         Services.prefs.getIntPref("accessibility.force_disabled");
-    }
-    catch (e) {}
+    } catch (e) {}
     done(data);
   },
 
   libraryVersions: function libraryVersions(done) {
     let data = {};
     let verInfo = Cc["@mozilla.org/security/nssversion;1"].
                   getService(Ci.nsINSSVersion);
     for (let prop in verInfo) {
--- a/toolkit/modules/UpdateUtils.jsm
+++ b/toolkit/modules/UpdateUtils.jsm
@@ -262,18 +262,17 @@ XPCOMUtils.defineLazyGetter(this, "gWinC
 
   return arch;
 });
 
 XPCOMUtils.defineLazyGetter(UpdateUtils, "ABI", function() {
   let abi = null;
   try {
     abi = Services.appinfo.XPCOMABI;
-  }
-  catch (e) {
+  } catch (e) {
     Cu.reportError("XPCOM ABI unknown");
   }
 
   if (AppConstants.platform == "macosx") {
     // Mac universal build should report a different ABI than either macppc
     // or mactel.
     let macutils = Cc["@mozilla.org/xpcom/mac-utils;1"].
                    getService(Ci.nsIMacUtils);
@@ -288,18 +287,17 @@ XPCOMUtils.defineLazyGetter(UpdateUtils,
   return abi;
 });
 
 XPCOMUtils.defineLazyGetter(UpdateUtils, "OSVersion", function() {
   let osVersion;
   try {
     osVersion = Services.sysinfo.getProperty("name") + " " +
                 Services.sysinfo.getProperty("version");
-  }
-  catch (e) {
+  } catch (e) {
     Cu.reportError("OS Version unknown.");
   }
 
   if (osVersion) {
     if (AppConstants.platform == "win") {
       const BYTE = ctypes.uint8_t;
       const WORD = ctypes.uint16_t;
       const DWORD = ctypes.uint32_t;
@@ -360,16 +358,15 @@ XPCOMUtils.defineLazyGetter(UpdateUtils,
 
         // Add processor architecture
         osVersion += " (" + gWinCPUArch + ")";
       }
     }
 
     try {
       osVersion += " (" + Services.sysinfo.getProperty("secondaryLibrary") + ")";
-    }
-    catch (e) {
+    } catch (e) {
       // Not all platforms have a secondary widget library, so an error is nothing to worry about.
     }
     osVersion = encodeURIComponent(osVersion);
   }
   return osVersion;
 });
--- a/toolkit/modules/WindowDraggingUtils.jsm
+++ b/toolkit/modules/WindowDraggingUtils.jsm
@@ -67,18 +67,17 @@ WindowDraggingElement.prototype = {
           // window dragging, which must be used.
           this._window.beginWindowMove(aEvent, isPanel ? this._elem : null);
           break;
         }
         if (isPanel) {
           let screenRect = this._elem.getOuterScreenRect();
           this._deltaX = aEvent.screenX - screenRect.left;
           this._deltaY = aEvent.screenY - screenRect.top;
-        }
-        else {
+        } else {
           this._deltaX = aEvent.screenX - this._window.screenX;
           this._deltaY = aEvent.screenY - this._window.screenY;
         }
         this._draggingWindow = true;
         this._window.addEventListener("mousemove", this, false);
         this._window.addEventListener("mouseup", this, false);
         break;
       case "mousemove":
--- a/toolkit/modules/ZipUtils.jsm
+++ b/toolkit/modules/ZipUtils.jsm
@@ -51,18 +51,17 @@ function saveStreamAsync(aPath, aStream,
   let source = Cc["@mozilla.org/binaryinputstream;1"].
                createInstance(Ci.nsIBinaryInputStream);
   source.setInputStream(input);
 
 
   function readFailed(error) {
     try {
       aStream.close();
-    }
-    catch (e) {
+    } catch (e) {
       logger.error("Failed to close JAR stream for " + aPath);
     }
 
     aFile.close().then(function() {
       deferred.reject(error);
     }, function(e) {
       logger.error("Failed to close file for " + aPath);
       deferred.reject(error);
@@ -73,18 +72,17 @@ function saveStreamAsync(aPath, aStream,
     try {
       let count = Math.min(source.available(), EXTRACTION_BUFFER);
       let data = new Uint8Array(count);
       source.readArrayBuffer(count, data.buffer);
 
       aFile.write(data, { bytes: count }).then(function() {
         input.asyncWait(readData, 0, 0, Services.tm.currentThread);
       }, readFailed);
-    }
-    catch (e) {
+    } catch (e) {
       if (e.result == Cr.NS_BASE_STREAM_CLOSED)
         deferred.resolve(aFile.close());
       else
         readFailed(e);
     }
   }
 
   input.asyncWait(readData, 0, 0, Services.tm.currentThread);
@@ -105,18 +103,17 @@ this.ZipUtils = {
    *         The nsIFile to extract to.
    */
   extractFilesAsync: function ZipUtils_extractFilesAsync(aZipFile, aDir) {
     let zipReader = Cc["@mozilla.org/libjar/zip-reader;1"].
                     createInstance(Ci.nsIZipReader);
 
     try {
       zipReader.open(aZipFile);
-    }
-    catch (e) {
+    } catch (e) {
       return Promise.reject(e);
     }
 
     return Task.spawn(function* () {
       // Get all of the entries in the zip and sort them so we create directories
       // before files
       let entries = zipReader.findEntries(null);
       let names = [];
@@ -127,32 +124,29 @@ this.ZipUtils = {
       for (let name of names) {
         let entryName = name;
         let zipentry = zipReader.getEntry(name);
         let path = OS.Path.join(aDir.path, ...name.split("/"));
 
         if (zipentry.isDirectory) {
           try {
             yield OS.File.makeDir(path);
-          }
-          catch (e) {
+          } catch (e) {
             dump("extractFilesAsync: failed to create directory " + path + "\n");
             throw e;
           }
-        }
-        else {
+        } else {
           let options = { unixMode: zipentry.permissions | FileUtils.PERMS_FILE };
           try {
             let file = yield OS.File.open(path, { truncate: true }, options);
             if (zipentry.realSize == 0)
               yield file.close();
             else
               yield saveStreamAsync(path, zipReader.getInputStream(entryName), file);
-          }
-          catch (e) {
+          } catch (e) {
             dump("extractFilesAsync: failed to extract file " + path + "\n");
             throw e;
           }
         }
       }
 
       zipReader.close();
     }).then(null, (e) => {
@@ -187,37 +181,34 @@ this.ZipUtils = {
       let entries = zipReader.findEntries("*/");
       while (entries.hasMore()) {
         let entryName = entries.getNext();
         let target = getTargetFile(aDir, entryName);
         if (!target.exists()) {
           try {
             target.create(Ci.nsIFile.DIRECTORY_TYPE,
                           FileUtils.PERMS_DIRECTORY);
-          }
-          catch (e) {
+          } catch (e) {
             dump("extractFiles: failed to create target directory for extraction file = " + target.path + "\n");
           }
         }
       }
 
       entries = zipReader.findEntries(null);
       while (entries.hasMore()) {
         let entryName = entries.getNext();
         let target = getTargetFile(aDir, entryName);
         if (target.exists())
           continue;
 
         zipReader.extract(entryName, target);
         try {
           target.permissions |= FileUtils.PERMS_FILE;
-        }
-        catch (e) {
+        } catch (e) {
           dump("Failed to set permissions " + FileUtils.PERMS_FILE.toString(8) + " on " + target.path + " " + e + "\n");
         }
       }
-    }
-    finally {
+    } finally {
       zipReader.close();
     }
   }
 
 };
--- a/toolkit/modules/tests/browser/browser_Deprecated.js
+++ b/toolkit/modules/tests/browser/browser_Deprecated.js
@@ -132,18 +132,17 @@ function nextTest() {
         return;
       }
       ok(aMessage instanceof Ci.nsIScriptError,
         "Deprecation log message is an instance of type nsIScriptError.");
 
 
       if (test.expectedObservation === null) {
         ok(false, "Deprecated warning not expected");
-      }
-      else {
+      } else {
         test.expectedObservation(aMessage);
       }
 
       Services.console.unregisterListener(consoleListener);
       executeSoon(nextTest);
     }
   };
   Services.console.registerListener(consoleListener);
--- a/toolkit/modules/tests/browser/browser_RemotePageManager.js
+++ b/toolkit/modules/tests/browser/browser_RemotePageManager.js
@@ -76,26 +76,24 @@ add_task(function* init_navigate() {
   });
 
   yield waitForMessage(port, "RemotePage:Unload");
 
   // Port should be destroyed now
   try {
     port.addMessageListener("Foo", failOnMessage);
     ok(false, "Should have seen exception");
-  }
-  catch (e) {
+  } catch (e) {
     ok(true, "Should have seen exception");
   }
 
   try {
     port.sendAsyncMessage("Foo");
     ok(false, "Should have seen exception");
-  }
-  catch (e) {
+  } catch (e) {
     ok(true, "Should have seen exception");
   }
 
   yield loaded;
 
   gBrowser.goBack();
   port = yield waitForPort(TEST_URL, false);
 
@@ -115,26 +113,24 @@ add_task(function* init_close() {
   let unloadPromise = waitForMessage(port, "RemotePage:Unload");
   gBrowser.removeCurrentTab();
   yield unloadPromise;
 
   // Port should be destroyed now
   try {
     port.addMessageListener("Foo", failOnMessage);
     ok(false, "Should have seen exception");
-  }
-  catch (e) {
+  } catch (e) {
     ok(true, "Should have seen exception");
   }
 
   try {
     port.sendAsyncMessage("Foo");
     ok(false, "Should have seen exception");
-  }
-  catch (e) {
+  } catch (e) {
     ok(true, "Should have seen exception");
   }
 });
 
 // Tests that we can send messages to individual pages even when more than one
 // is open
 add_task(function* multiple_ports() {
   let port1 = yield waitForPort(TEST_URL);
@@ -159,18 +155,17 @@ add_task(function* multiple_ports() {
 
   let unloadPromise = waitForMessage(port2, "RemotePage:Unload");
   gBrowser.removeTab(gBrowser.getTabForBrowser(port2.browser));
   yield unloadPromise;
 
   try {
     port2.addMessageListener("Pong", failOnMessage);
     ok(false, "Should not have been able to add a new message listener to a destroyed port.");
-  }
-  catch (e) {
+  } catch (e) {
     ok(true, "Should not have been able to add a new message listener to a destroyed port.");
   }
 
   port1.sendAsyncMessage("Ping", { str: "foobar", counter: 0 });
   message = yield waitForMessage(port1, "Pong");
   is(message.data.str, "foobar", "String should pass through");
   is(message.data.counter, 1, "Counter should be incremented");
 
@@ -293,26 +288,24 @@ add_task(function* remote_pages_basic() 
   yield unloadPromise;
 
   pages.destroy();
 
   // RemotePages should be destroyed now
   try {
     pages.addMessageListener("Foo", failOnMessage);
     ok(false, "Should have seen exception");
-  }
-  catch (e) {
+  } catch (e) {
     ok(true, "Should have seen exception");
   }
 
   try {
     pages.sendAsyncMessage("Foo");
     ok(false, "Should have seen exception");
-  }
-  catch (e) {
+  } catch (e) {
     ok(true, "Should have seen exception");
   }
 });
 
 // Test sending messages to all remote pages works
 add_task(function* remote_pages_multiple() {
   let pages = new RemotePages(TEST_URL);
   let port1 = yield waitForPage(pages);
--- a/toolkit/modules/tests/browser/browser_Troubleshoot.js
+++ b/toolkit/modules/tests/browser/browser_Troubleshoot.js
@@ -30,18 +30,17 @@ registerCleanupFunction(function() {
 
 var tests = [
 
   function snapshotSchema(done) {
     Troubleshoot.snapshot(function(snapshot) {
       try {
         validateObject(snapshot, SNAPSHOT_SCHEMA);
         ok(true, "The snapshot should conform to the schema.");
-      }
-      catch (err) {
+      } catch (err) {
         ok(false, "Schema mismatch, " + err);
       }
       done();
     });
   },
 
   function modifiedPreferences(done) {
     let prefs = [
--- a/toolkit/modules/tests/browser/browser_WebNavigation.js
+++ b/toolkit/modules/tests/browser/browser_WebNavigation.js
@@ -26,18 +26,17 @@ const REQUIRED = [
 ];
 
 var expectedBrowser;
 var received = [];
 var completedResolve;
 var waitingURL, waitingEvent;
 var rootWindowID;
 
-function gotEvent(event, details)
-{
+function gotEvent(event, details) {
   if (!details.url.startsWith(BASE)) {
     return;
   }
   info(`Got ${event} ${details.url} ${details.windowId} ${details.parentWindowId}`);
 
   is(details.browser, expectedBrowser, "correct <browser> element");
 
   received.push({url: details.url, event});
@@ -56,18 +55,17 @@ function gotEvent(event, details)
   isnot(details.windowId, undefined);
   isnot(details.parentWindowId, undefined);
 
   if (details.url == waitingURL && event == waitingEvent) {
     completedResolve();
   }
 }
 
-function loadViaFrameScript(url, event, script)
-{
+function loadViaFrameScript(url, event, script) {
   // Loading via a frame script ensures that the chrome process never
   // "gets ahead" of frame scripts in non-e10s mode.
   received = [];
   waitingURL = url;
   waitingEvent = event;
   expectedBrowser.messageManager.loadFrameScript("data:," + script, false);
   return new Promise(resolve => { completedResolve = resolve; });
 }
--- a/toolkit/modules/tests/browser/browser_WebRequest.js
+++ b/toolkit/modules/tests/browser/browser_WebRequest.js
@@ -4,18 +4,17 @@ var { interfaces: Ci, classes: Cc, utils
 
 var {WebRequest} = Cu.import("resource://gre/modules/WebRequest.jsm", {});
 
 const BASE = "http://example.com/browser/toolkit/modules/tests/browser";
 const URL = BASE + "/file_WebRequest_page1.html";
 
 var expected_browser;
 
-function checkType(details)
-{
+function checkType(details) {
   let expected_type = "???";
   if (details.url.indexOf("style") != -1) {
     expected_type = "stylesheet";
   } else if (details.url.indexOf("image") != -1) {
     expected_type = "image";
   } else if (details.url.indexOf("script") != -1) {
     expected_type = "script";
   } else if (details.url.indexOf("page1") != -1) {
@@ -27,18 +26,17 @@ function checkType(details)
   }
   is(details.type, expected_type, "resource type is correct");
 }
 
 var windowIDs = new Map();
 
 var requested = [];
 
-function onBeforeRequest(details)
-{
+function onBeforeRequest(details) {
   info(`onBeforeRequest ${details.url}`);
   if (details.url.startsWith(BASE)) {
     requested.push(details.url);
 
     is(details.browser, expected_browser, "correct <browser> element");
     checkType(details);
 
     windowIDs.set(details.url, details.windowId);
@@ -51,18 +49,17 @@ function onBeforeRequest(details)
   if (details.url.indexOf("_bad.") != -1) {
     return {cancel: true};
   }
   return undefined;
 }
 
 var sendHeaders = [];
 
-function onBeforeSendHeaders(details)
-{
+function onBeforeSendHeaders(details) {
   info(`onBeforeSendHeaders ${details.url}`);
   if (details.url.startsWith(BASE)) {
     sendHeaders.push(details.url);
 
     is(details.browser, expected_browser, "correct <browser> element");
     checkType(details);
 
     let id = windowIDs.get(details.url);
@@ -71,18 +68,17 @@ function onBeforeSendHeaders(details)
   if (details.url.indexOf("_redirect.") != -1) {
     return {redirectUrl: details.url.replace("_redirect.", "_good.")};
   }
   return undefined;
 }
 
 var beforeRedirect = [];
 
-function onBeforeRedirect(details)
-{
+function onBeforeRedirect(details) {
   info(`onBeforeRedirect ${details.url} -> ${details.redirectUrl}`);
   checkType(details);
   if (details.url.startsWith(BASE)) {
     beforeRedirect.push(details.url);
 
     is(details.browser, expected_browser, "correct <browser> element");
     checkType(details);
 
@@ -93,18 +89,17 @@ function onBeforeRedirect(details)
   is(id, details.windowId, "window ID same in onBeforeRedirect as onBeforeRequest");
   // associate stored windowId with final url
   windowIDs.set(details.redirectUrl, details.windowId);
   return {};
 }
 
 var headersReceived = [];
 
-function onResponseStarted(details)
-{
+function onResponseStarted(details) {
   if (details.url.startsWith(BASE)) {
     headersReceived.push(details.url);
   }
 }
 
 const expected_requested = [BASE + "/file_WebRequest_page1.html",
                             BASE + "/file_style_good.css",
                             BASE + "/file_style_bad.css",
@@ -113,72 +108,69 @@ const expected_requested = [BASE + "/fil
                             BASE + "/file_image_bad.png",
                             BASE + "/file_image_redirect.png",
                             BASE + "/file_script_good.js",
                             BASE + "/file_script_bad.js",
                             BASE + "/file_script_redirect.js",
                             BASE + "/file_script_xhr.js",
                             BASE + "/file_WebRequest_page2.html",
                             BASE + "/nonexistent_script_url.js",
-                            BASE +  "/WebRequest_redirection.sjs",
+                            BASE + "/WebRequest_redirection.sjs",
                             BASE + "/dummy_page.html",
                             BASE + "/xhr_resource"];
 
 const expected_sendHeaders = [BASE + "/file_WebRequest_page1.html",
                               BASE + "/file_style_good.css",
                               BASE + "/file_style_redirect.css",
                               BASE + "/file_image_good.png",
                               BASE + "/file_image_redirect.png",
                               BASE + "/file_script_good.js",
                               BASE + "/file_script_redirect.js",
                               BASE + "/file_script_xhr.js",
                               BASE + "/file_WebRequest_page2.html",
                               BASE + "/nonexistent_script_url.js",
-                              BASE +  "/WebRequest_redirection.sjs",
+                              BASE + "/WebRequest_redirection.sjs",
                               BASE + "/dummy_page.html",
                               BASE + "/xhr_resource"];
 
 const expected_beforeRedirect = expected_sendHeaders.filter(u => /_redirect\./.test(u))
-                                  .concat(BASE +  "/WebRequest_redirection.sjs");
+                                  .concat(BASE + "/WebRequest_redirection.sjs");
 
 const expected_headersReceived = [BASE + "/file_WebRequest_page1.html",
                                   BASE + "/file_style_good.css",
                                   BASE + "/file_image_good.png",
                                   BASE + "/file_script_good.js",
                                   BASE + "/file_script_xhr.js",
                                   BASE + "/file_WebRequest_page2.html",
                                   BASE + "/nonexistent_script_url.js",
                                   BASE + "/dummy_page.html",
                                   BASE + "/xhr_resource"];
 
-function removeDupes(list)
-{
+function removeDupes(list) {
   let j = 0;
   for (let i = 1; i < list.length; i++) {
     if (list[i] != list[j]) {
       j++;
       if (i != j) {
         list[j] = list[i];
       }
     }
   }
   list.length = j + 1;
 }
 
-function compareLists(list1, list2, kind)
-{
+function compareLists(list1, list2, kind) {
   list1.sort();
   removeDupes(list1);
   list2.sort();
   removeDupes(list2);
   is(String(list1), String(list2), `${kind} URLs correct`);
 }
 
-function* test_once()
-{
+function* test_once() {
   WebRequest.onBeforeRequest.addListener(onBeforeRequest, null, ["blocking"]);
   WebRequest.onBeforeSendHeaders.addListener(onBeforeSendHeaders, null, ["blocking"]);
   WebRequest.onBeforeRedirect.addListener(onBeforeRedirect);
   WebRequest.onResponseStarted.addListener(onResponseStarted);
 
   yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" },
     function* (browser) {
       expected_browser = browser;
--- a/toolkit/modules/tests/browser/browser_WebRequest_cookies.js
+++ b/toolkit/modules/tests/browser/browser_WebRequest_cookies.js
@@ -5,18 +5,17 @@ var { interfaces: Ci, classes: Cc, utils
 var {WebRequest} = Cu.import("resource://gre/modules/WebRequest.jsm", {});
 
 const BASE = "http://example.com/browser/toolkit/modules/tests/browser";
 const URL = BASE + "/WebRequest_dynamic.sjs";
 
 var countBefore = 0;
 var countAfter = 0;
 
-function onBeforeSendHeaders(details)
-{
+function onBeforeSendHeaders(details) {
   if (details.url != URL) {
     return undefined;
   }
 
   countBefore++;
 
   info(`onBeforeSendHeaders ${details.url}`);
   let found = false;
@@ -31,18 +30,17 @@ function onBeforeSendHeaders(details)
       headers.push({name, value});
     }
   }
   ok(found, "Saw cookie header");
 
   return {requestHeaders: headers};
 }
 
-function onResponseStarted(details)
-{
+function onResponseStarted(details) {
   if (details.url != URL) {
     return;
   }
 
   countAfter++;
 
   info(`onResponseStarted ${details.url}`);
   let found = false;
--- a/toolkit/modules/tests/browser/browser_WebRequest_filtering.js
+++ b/toolkit/modules/tests/browser/browser_WebRequest_filtering.js
@@ -5,63 +5,58 @@ var { interfaces: Ci, classes: Cc, utils
 var {WebRequest} = Cu.import("resource://gre/modules/WebRequest.jsm", {});
 var {MatchPattern} = Cu.import("resource://gre/modules/MatchPattern.jsm", {});
 
 const BASE = "http://example.com/browser/toolkit/modules/tests/browser";
 const URL = BASE + "/file_WebRequest_page2.html";
 
 var requested = [];
 
-function onBeforeRequest(details)
-{
+function onBeforeRequest(details) {
   info(`onBeforeRequest ${details.url}`);
   if (details.url.startsWith(BASE)) {
     requested.push(details.url);
   }
 }
 
 var sendHeaders = [];
 
-function onBeforeSendHeaders(details)
-{
+function onBeforeSendHeaders(details) {
   info(`onBeforeSendHeaders ${details.url}`);
   if (details.url.startsWith(BASE)) {
     sendHeaders.push(details.url);
   }
 }
 
 var completed = [];
 
-function onResponseStarted(details)
-{
+function onResponseStarted(details) {
   if (details.url.startsWith(BASE)) {
     completed.push(details.url);
   }
 }
 
 const expected_urls = [BASE + "/file_style_good.css",
                        BASE + "/file_style_bad.css",
                        BASE + "/file_style_redirect.css"];
 
-function removeDupes(list)
-{
+function removeDupes(list) {
   let j = 0;
   for (let i = 1; i < list.length; i++) {
     if (list[i] != list[j]) {
       j++;
       if (i != j) {
         list[j] = list[i];
       }
     }
   }
   list.length = j + 1;
 }
 
-function compareLists(list1, list2, kind)
-{
+function compareLists(list1, list2, kind) {
   list1.sort();
   removeDupes(list1);
   list2.sort();
   removeDupes(list2);
   is(String(list1), String(list2), `${kind} URLs correct`);
 }
 
 add_task(function* filter_urls() {
--- a/toolkit/modules/tests/browser/head.js
+++ b/toolkit/modules/tests/browser/head.js
@@ -1,23 +1,21 @@
-function removeDupes(list)
-{
+function removeDupes(list) {
   let j = 0;
   for (let i = 1; i < list.length; i++) {
     if (list[i] != list[j]) {
       j++;
       if (i != j) {
         list[j] = list[i];
       }
     }
   }
   list.length = j + 1;
 }
 
-function compareLists(list1, list2, kind)
-{
+function compareLists(list1, list2, kind) {
   list1.sort();
   removeDupes(list1);
   list2.sort();
   removeDupes(list2);
   is(String(list1), String(list2), `${kind} URLs correct`);
 }
 
--- a/toolkit/modules/tests/xpcshell/test_DeferredTask.js
+++ b/toolkit/modules/tests/xpcshell/test_DeferredTask.js
@@ -22,43 +22,39 @@ XPCOMUtils.defineLazyModuleGetter(this, 
  * in milliseconds, that should be high enough to prevent intermittent failures,
  * but low enough to prevent an excessive overall test execution time.
  */
 const T = 100;
 
 /**
  * Waits for the specified timeout before resolving the returned promise.
  */
-function promiseTimeout(aTimeoutMs)
-{
+function promiseTimeout(aTimeoutMs) {
   let deferred = Promise.defer();
   do_timeout(aTimeoutMs, deferred.resolve);
   return deferred.promise;
 }
 
-function run_test()
-{
+function run_test() {
   run_next_test();
 }
 
 // Tests
 
 /**
  * Creates a simple DeferredTask and executes it once.
  */
-add_test(function test_arm_simple()
-{
+add_test(function test_arm_simple() {
   new DeferredTask(run_next_test, 10).arm();
 });
 
 /**
  * Checks that the delay set for the task is respected.
  */
-add_test(function test_arm_delay_respected()
-{
+add_test(function test_arm_delay_respected() {
   let executed1 = false;
   let executed2 = false;
 
   new DeferredTask(function() {
     executed1 = true;
     do_check_false(executed2);
   }, 1 * T).arm();
 
@@ -67,18 +63,17 @@ add_test(function test_arm_delay_respect
     do_check_true(executed1);
     run_next_test();
   }, 2 * T).arm();
 });
 
 /**
  * Checks that calling "arm" again does not introduce further delay.
  */
-add_test(function test_arm_delay_notrestarted()
-{
+add_test(function test_arm_delay_notrestarted() {
   let executed = false;
 
   // Create a task that will run later.
   let deferredTask = new DeferredTask(() => { executed = true; }, 4 * T);
   deferredTask.arm();
 
   // Before the task starts, call "arm" again.
   do_timeout(2 * T, () => deferredTask.arm());
@@ -88,53 +83,50 @@ add_test(function test_arm_delay_notrest
     do_check_true(executed);
     run_next_test();
   });
 });
 
 /**
  * Checks that a task runs only once when armed multiple times synchronously.
  */
-add_test(function test_arm_coalesced()
-{
+add_test(function test_arm_coalesced() {
   let executed = false;
 
   let deferredTask = new DeferredTask(function() {
     do_check_false(executed);
     executed = true;
     run_next_test();
   }, 50);
 
   deferredTask.arm();
   deferredTask.arm();
 });
 
 /**
  * Checks that a task runs only once when armed multiple times synchronously,
  * even when it has been created with a delay of zero milliseconds.
  */
-add_test(function test_arm_coalesced_nodelay()
-{
+add_test(function test_arm_coalesced_nodelay() {
   let executed = false;
 
   let deferredTask = new DeferredTask(function() {
     do_check_false(executed);
     executed = true;
     run_next_test();
   }, 0);
 
   deferredTask.arm();
   deferredTask.arm();
 });
 
 /**
  * Checks that a task can be armed again while running.
  */
-add_test(function test_arm_recursive()
-{
+add_test(function test_arm_recursive() {
   let executed = false;
 
   let deferredTask = new DeferredTask(function() {
     if (!executed) {
       executed = true;
       deferredTask.arm();
     } else {
       run_next_test();
@@ -143,18 +135,17 @@ add_test(function test_arm_recursive()
 
   deferredTask.arm();
 });
 
 /**
  * Checks that calling "arm" while an asynchronous task is running waits until
  * the task is finished before restarting the delay.
  */
-add_test(function test_arm_async()
-{
+add_test(function test_arm_async() {
   let finishedExecution = false;
   let finishedExecutionAgain = false;
 
   // Create a task that will run later.
   let deferredTask = new DeferredTask(function* () {
     yield promiseTimeout(4 * T);
     if (!finishedExecution) {
       finishedExecution = true;
@@ -192,36 +183,34 @@ add_test(function test_arm_async()
     do_check_true(finishedExecutionAgain);
     run_next_test();
   });
 });
 
 /**
  * Checks that an armed task can be disarmed.
  */
-add_test(function test_disarm()
-{
+add_test(function test_disarm() {
   // Create a task that will run later.
   let deferredTask = new DeferredTask(function() {
     do_throw("This task should not run.");
   }, 2 * T);
   deferredTask.arm();
 
   // Disable execution later, but before the task starts.
   do_timeout(1 * T, () => deferredTask.disarm());
 
   // Wait enough time to verify that the task did not run.
   do_timeout(3 * T, run_next_test);
 });
 
 /**
  * Checks that calling "disarm" allows the delay to be restarted.
  */
-add_test(function test_disarm_delay_restarted()
-{
+add_test(function test_disarm_delay_restarted() {
   let executed = false;
 
   let deferredTask = new DeferredTask(() => { executed = true; }, 4 * T);
   deferredTask.arm();
 
   do_timeout(2 * T, function() {
     deferredTask.disarm();
     deferredTask.arm();
@@ -236,18 +225,17 @@ add_test(function test_disarm_delay_rest
     run_next_test();
   });
 });
 
 /**
  * Checks that calling "disarm" while an asynchronous task is running does not
  * prevent the task to finish.
  */
-add_test(function test_disarm_async()
-{
+add_test(function test_disarm_async() {
   let finishedExecution = false;
 
   let deferredTask = new DeferredTask(function* () {
     deferredTask.arm();
     yield promiseTimeout(2 * T);
     finishedExecution = true;
   }, 1 * T);
   deferredTask.arm();
@@ -266,18 +254,17 @@ add_test(function test_disarm_async()
     run_next_test();
   });
 });
 
 /**
  * Checks that calling "arm" immediately followed by "disarm" while an
  * asynchronous task is running does not cause it to run again.
  */
-add_test(function test_disarm_immediate_async()
-{
+add_test(function test_disarm_immediate_async() {
   let executed = false;
 
   let deferredTask = new DeferredTask(function* () {
     do_check_false(executed);
     executed = true;
     yield promiseTimeout(2 * T);
   }, 1 * T);
   deferredTask.arm();
@@ -295,18 +282,17 @@ add_test(function test_disarm_immediate_
     do_check_false(deferredTask.isArmed);
     run_next_test();
   });
 });
 
 /**
  * Checks the isArmed and isRunning properties with a synchronous task.
  */
-add_test(function test_isArmed_isRunning()
-{
+add_test(function test_isArmed_isRunning() {
   let deferredTask = new DeferredTask(function() {
     do_check_true(deferredTask.isRunning);
     do_check_false(deferredTask.isArmed);
     deferredTask.arm();
     do_check_true(deferredTask.isArmed);
     deferredTask.disarm();
     do_check_false(deferredTask.isArmed);
     run_next_test();
@@ -316,18 +302,17 @@ add_test(function test_isArmed_isRunning
   deferredTask.arm();
   do_check_true(deferredTask.isArmed);
   do_check_false(deferredTask.isRunning);
 });
 
 /**
  * Checks that the "finalize" method executes a synchronous task.
  */
-add_test(function test_finalize()
-{
+add_test(function test_finalize() {
   let executed = false;
   let timePassed = false;
 
   let deferredTask = new DeferredTask(function() {
     do_check_false(timePassed);
     executed = true;
   }, 2 * T);
   deferredTask.arm();
@@ -340,18 +325,17 @@ add_test(function test_finalize()
     run_next_test();
   });
 });
 
 /**
  * Checks that the "finalize" method executes the task again from start to
  * finish in case it is already running.
  */
-add_test(function test_finalize_executes_entirely()
-{
+add_test(function test_finalize_executes_entirely() {
   let executed = false;
   let executedAgain = false;
   let timePassed = false;
 
   let deferredTask = new DeferredTask(function* () {
     // The first time, we arm the timer again and set up the finalization.
     if (!executed) {
       deferredTask.arm();
--- a/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
+++ b/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
@@ -13,17 +13,18 @@ Cu.import("resource://gre/modules/Promis
 Cu.import("resource://gre/modules/Preferences.jsm")
 Cu.import("resource://gre/modules/UpdateUtils.jsm");
 
 var { computeHash } = Cu.import("resource://gre/modules/addons/ProductAddonChecker.jsm");
 var ProductAddonCheckerScope = Cu.import("resource://gre/modules/addons/ProductAddonChecker.jsm");
 
 do_get_profile();
 
-function run_test() { Cu.import("resource://gre/modules/Preferences.jsm")
+function run_test() {
+ Cu.import("resource://gre/modules/Preferences.jsm")
   Preferences.set("media.gmp.log.dump", true);
   Preferences.set("media.gmp.log.level", 0);
   run_next_test();
 }
 
 /**
  * Tests that the helper used for preferences works correctly
  */
--- a/toolkit/modules/tests/xpcshell/test_JSONFile.js
+++ b/toolkit/modules/tests/xpcshell/test_JSONFile.js
@@ -30,18 +30,17 @@ let gFileCounter = Math.floor(Math.rando
  *
  * @return nsIFile pointing to a non-existent file in a temporary directory.
  *
  * @note It is not enough to delete the file if it exists, or to delete the file
  *       after calling nsIFile.createUnique, because on Windows the delete
  *       operation in the file system may still be pending, preventing a new
  *       file with the same name to be created.
  */
-function getTempFile(aLeafName)
-{
+function getTempFile(aLeafName) {
   // Prepend a serial number to the extension in the suggested leaf name.
   let [base, ext] = DownloadPaths.splitBaseNameAndExtension(aLeafName);
   let leafName = base + "-" + gFileCounter + ext;
   gFileCounter++;
 
   // Get a file reference under the temporary directory for this test file.
   let file = FileUtils.getFile("TmpD", [leafName]);
   do_check_false(file.exists());
@@ -63,18 +62,17 @@ const TEST_DATA = {
   object: {
     prop1: 1,
     prop2: 2,
   },
 };
 
 // Tests
 
-add_task(function* test_save_reload()
-{
+add_task(function* test_save_reload() {
   let storeForSave = new JSONFile({
     path: getTempFile(TEST_STORE_FILE_NAME).path,
   });
 
   yield storeForSave.load();
 
   do_check_true(storeForSave.dataReady);
   do_check_matches(storeForSave.data, {});
@@ -94,35 +92,33 @@ add_task(function* test_save_reload()
     path: storeForSave.path,
   });
 
   yield storeForLoad.load();
 
   Assert.deepEqual(storeForLoad.data, TEST_DATA);
 });
 
-add_task(function* test_load_sync()
-{
+add_task(function* test_load_sync() {
   let storeForSave = new JSONFile({
     path: getTempFile(TEST_STORE_FILE_NAME).path
   });
   yield storeForSave.load();
   Object.assign(storeForSave.data, TEST_DATA);
   yield storeForSave._save();
 
   let storeForLoad = new JSONFile({
     path: storeForSave.path,
   });
   storeForLoad.ensureDataReady();
 
   Assert.deepEqual(storeForLoad.data, TEST_DATA);
 });
 
-add_task(function* test_load_with_dataPostProcessor()
-{
+add_task(function* test_load_with_dataPostProcessor() {
   let storeForSave = new JSONFile({
     path: getTempFile(TEST_STORE_FILE_NAME).path
   });
   yield storeForSave.load();
   Object.assign(storeForSave.data, TEST_DATA);
   yield storeForSave._save();
 
   let random = Math.random();
@@ -136,50 +132,47 @@ add_task(function* test_load_with_dataPo
     },
   });
 
   yield storeForLoad.load();
 
   do_check_eq(storeForLoad.data.test, random);
 });
 
-add_task(function* test_load_with_dataPostProcessor_fails()
-{
+add_task(function* test_load_with_dataPostProcessor_fails() {
   let store = new JSONFile({
     path: getTempFile(TEST_STORE_FILE_NAME).path,
     dataPostProcessor: () => {
       throw new Error("dataPostProcessor fails.");
     },
   });
 
   yield Assert.rejects(store.load(), /dataPostProcessor fails\./);
 
   do_check_false(store.dataReady);
 });
 
-add_task(function* test_load_sync_with_dataPostProcessor_fails()
-{
+add_task(function* test_load_sync_with_dataPostProcessor_fails() {
   let store = new JSONFile({
     path: getTempFile(TEST_STORE_FILE_NAME).path,
     dataPostProcessor: () => {
       throw new Error("dataPostProcessor fails.");
     },
   });
 
   Assert.throws(() => store.ensureDataReady(), /dataPostProcessor fails\./);
 
   do_check_false(store.dataReady);
 });
 
 /**
  * Loads data from a string in a predefined format.  The purpose of this test is
  * to verify that the JSON format used in previous versions can be loaded.
  */
-add_task(function* test_load_string_predefined()
-{
+add_task(function* test_load_string_predefined() {
   let store = new JSONFile({
     path: getTempFile(TEST_STORE_FILE_NAME).path,
   });
 
   let string =
     "{\"number\":123,\"string\":\"test\",\"object\":{\"prop1\":1,\"prop2\":2}}";
 
   yield OS.File.writeAtomic(store.path, new TextEncoder().encode(string),
@@ -188,18 +181,17 @@ add_task(function* test_load_string_pred
   yield store.load();
 
   Assert.deepEqual(store.data, TEST_DATA);
 });
 
 /**
  * Loads data from a malformed JSON string.
  */
-add_task(function* test_load_string_malformed()
-{
+add_task(function* test_load_string_malformed() {
   let store = new JSONFile({
     path: getTempFile(TEST_STORE_FILE_NAME).path,
   });
 
   let string = "{\"number\":123,\"string\":\"test\",\"object\":{\"prop1\":1,";
 
   yield OS.File.writeAtomic(store.path, new TextEncoder().encode(string),
                             { tmpPath: store.path + ".tmp" });
@@ -214,18 +206,17 @@ add_task(function* test_load_string_malf
   do_check_true(store.dataReady);
   do_check_matches(store.data, {});
 });
 
 /**
  * Loads data from a malformed JSON string, using the synchronous initialization
  * path.
  */
-add_task(function* test_load_string_malformed_sync()
-{
+add_task(function* test_load_string_malformed_sync() {
   let store = new JSONFile({
     path: getTempFile(TEST_STORE_FILE_NAME).path,
   });
 
   let string = "{\"number\":123,\"string\":\"test\",\"object\":{\"prop1\":1,";
 
   yield OS.File.writeAtomic(store.path, new TextEncoder().encode(string),
                             { tmpPath: store.path + ".tmp" });
@@ -236,18 +227,17 @@ add_task(function* test_load_string_malf
   do_check_true(yield OS.File.exists(store.path + ".corrupt"));
   yield OS.File.remove(store.path + ".corrupt");
 
   // The store should be ready to accept new data.
   do_check_true(store.dataReady);
   do_check_matches(store.data, {});
 });
 
-add_task(function* test_overwrite_data()
-{
+add_task(function* test_overwrite_data() {
   let storeForSave = new JSONFile({
     path: getTempFile(TEST_STORE_FILE_NAME).path,
   });
 
   let string = `{"number":456,"string":"tset","object":{"prop1":3,"prop2":4}}`;
 
   yield OS.File.writeAtomic(storeForSave.path, new TextEncoder().encode(string),
                             { tmpPath: storeForSave.path + ".tmp" });
@@ -270,34 +260,32 @@ add_task(function* test_overwrite_data()
     path: storeForSave.path,
   });
 
   yield storeForLoad.load();
 
   Assert.deepEqual(storeForLoad.data, TEST_DATA);
 });
 
-add_task(function* test_beforeSave()
-{
+add_task(function* test_beforeSave() {
   let store;
   let promiseBeforeSave = new Promise((resolve) => {
     store = new JSONFile({
       path: getTempFile(TEST_STORE_FILE_NAME).path,
       beforeSave: resolve,
       saveDelayMs: 250,
     });
   });
 
   store.saveSoon();
 
   yield promiseBeforeSave;
 });
 
-add_task(function* test_beforeSave_rejects()
-{
+add_task(function* test_beforeSave_rejects() {
   let storeForSave = new JSONFile({
     path: getTempFile(TEST_STORE_FILE_NAME).path,
     beforeSave() {
       return Promise.reject(new Error("oops"));
     },
     saveDelayMs: 250,
   });
 
--- a/toolkit/modules/tests/xpcshell/test_Log.js
+++ b/toolkit/modules/tests/xpcshell/test_Log.js
@@ -498,18 +498,17 @@ add_task(function* test_log_err_only() {
   /*
    * Check that log.error(err) is treated the same as
    * log.error(null, err) by the logMessage constructor; the formatMessage()
    * tests above ensure that the combination of null text and an error object
    * is formatted correctly.
    */
   try {
     eval("javascript syntax error");
-  }
-  catch (e) {
+  } catch (e) {
     log.error(e);
     msg = appender.messages.pop();
     do_check_eq(msg.message, null);
     do_check_eq(msg.params, e);
   }
 });
 
 /*
@@ -573,18 +572,17 @@ add_task(function* format_errors() {
   do_check_true(str.includes("ReferenceError"));
   do_check_true(str.includes("ERROR_FILE:28"));
   do_check_true(str.includes("Ref Error"));
 
   // Test that JS-generated Errors are recognized and formatted.
   try {
     yield Promise.resolve();  // Scrambles the stack
     eval("javascript syntax error");
-  }
-  catch (e) {
+  } catch (e) {
     str = pFormat.format(e);
     do_check_true(str.includes("SyntaxError: missing ;"));
     // Make sure we identified it as an Error and formatted the error location as
     // lineNumber:columnNumber.
     do_check_true(str.includes(":1:11)"));
     // Make sure that we use human-readable stack traces
     // Check that the error doesn't contain any reference to "Promise.jsm" or "Task.jsm"
     do_check_false(str.includes("Promise.jsm"));
--- a/toolkit/modules/tests/xpcshell/test_Log_stackTrace.js
+++ b/toolkit/modules/tests/xpcshell/test_Log_stackTrace.js
@@ -6,18 +6,17 @@ function baz(v) { throw new Error(v + 1)
 print("Make sure lazy constructor calling/assignment works");
 Components.utils.import("resource://gre/modules/Log.jsm");
 
 function run_test() {
   print("Make sure functions, arguments, files are pretty printed in the trace");
   let trace = "";
   try {
     foo(0);
-  }
-  catch (ex) {
+  } catch (ex) {
     trace = Log.stackTrace(ex);
   }
   print(`Got trace: ${trace}`);
   do_check_neq(trace, "");
 
   let bazPos = trace.indexOf("baz@test_Log_stackTrace.js:4");
   let barPos = trace.indexOf("bar@test_Log_stackTrace.js:3");
   let fooPos = trace.indexOf("foo@test_Log_stackTrace.js:2");
--- a/toolkit/modules/tests/xpcshell/test_MatchPattern.js
+++ b/toolkit/modules/tests/xpcshell/test_MatchPattern.js
@@ -1,35 +1,31 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 Components.utils.import("resource://gre/modules/MatchPattern.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
-function test(url, pattern)
-{
+function test(url, pattern) {
   let uri = Services.io.newURI(url, null, null);
   let m = new MatchPattern(pattern);
   return m.matches(uri);
 }
 
-function pass({url, pattern})
-{
+function pass({url, pattern}) {
   do_check_true(test(url, pattern), `Expected match: ${JSON.stringify(pattern)}, ${url}`);
 }
 
-function fail({url, pattern})
-{
+function fail({url, pattern}) {
   do_check_false(test(url, pattern), `Expected no match: ${JSON.stringify(pattern)}, ${url}`);
 }
 
-function run_test()
-{
+function run_test() {
   // Invalid pattern.
   fail({url: "http://mozilla.org", pattern: ""});
 
   // Pattern must include trailing slash.
   fail({url: "http://mozilla.org", pattern: "http://mozilla.org"});
 
   // Protocol not allowed.
   fail({url: "http://mozilla.org", pattern: "gopher://wuarchive.wustl.edu/"});
--- a/toolkit/modules/tests/xpcshell/test_Preferences.js
+++ b/toolkit/modules/tests/xpcshell/test_Preferences.js
@@ -86,40 +86,37 @@ add_test(function test_set_get_unicode_p
   run_next_test();
 });
 
 add_test(function test_set_null_pref() {
   try {
     Preferences.set("test_set_null_pref", null);
     // We expect this to throw, so the test is designed to fail if it doesn't.
     do_check_true(false);
-  }
-  catch (ex) {}
+  } catch (ex) {}
 
   run_next_test();
 });
 
 add_test(function test_set_undefined_pref() {
   try {
     Preferences.set("test_set_undefined_pref");
     // We expect this to throw, so the test is designed to fail if it doesn't.
     do_check_true(false);
-  }
-  catch (ex) {}
+  } catch (ex) {}
 
   run_next_test();
 });
 
 add_test(function test_set_unsupported_pref() {
   try {
     Preferences.set("test_set_unsupported_pref", new Array());
     // We expect this to throw, so the test is designed to fail if it doesn't.
     do_check_true(false);
-  }
-  catch (ex) {}
+  } catch (ex) {}
 
   run_next_test();
 });
 
 // Make sure that we can get a string pref that we didn't set ourselves
 // (i.e. that the way we get a string pref using getComplexValue doesn't
 // hork us getting a string pref that wasn't set using setComplexValue).
 add_test(function test_get_string_pref() {
@@ -161,18 +158,17 @@ add_test(function test_set_get_number_pr
   Preferences.set("test_set_get_number_pref", 3.14159);
   do_check_eq(Preferences.get("test_set_get_number_pref"), 3);
 
   // Values outside the range -(2^31-1) to 2^31-1 overflow.
   try {
     Preferences.set("test_set_get_number_pref", Math.pow(2, 31));
     // We expect this to throw, so the test is designed to fail if it doesn't.
     do_check_true(false);
-  }
-  catch (ex) {}
+  } catch (ex) {}
 
   // Clean up.
   Preferences.reset("test_set_get_number_pref");
 
   run_next_test();
 });
 
 add_test(function test_reset_pref() {
--- a/toolkit/modules/tests/xpcshell/test_Promise.js
+++ b/toolkit/modules/tests/xpcshell/test_Promise.js
@@ -270,17 +270,17 @@ tests.push(make_promise_test(
 
     return result;
   }));
 
 // Test that throwing an exception from a onResolve listener
 // does not prevent other observers from receiving the notification
 // of success.
 tests.push(
-  make_promise_test(function exceptions_do_not_stop_notifications(test)  {
+  make_promise_test(function exceptions_do_not_stop_notifications(test) {
     let source = Promise.defer();
 
     let exception_thrown = false;
     let exception_content = new Error("Boom!");
 
     let observer_1 = source.promise.then(
       function onResolve() {
         exception_thrown = true;
@@ -1092,13 +1092,12 @@ tests.push(
     var p = new Promise(function executor(resolve) {
       do_execute_soon(resolve);
     });
     Object.freeze(p);
     return p;
   })
 );
 
-function run_test()
-{
+function run_test() {
   do_test_pending();
   run_promise_tests(tests, do_test_finished);
 }
--- a/toolkit/modules/tests/xpcshell/test_Services.js
+++ b/toolkit/modules/tests/xpcshell/test_Services.js
@@ -18,18 +18,17 @@ Cu.import("resource://gre/modules/Servic
 function checkService(service, interface) {
   do_print("Checking that Services." + service + " is an " + interface);
   do_check_true(service in Services);
   do_check_true(Services[service] instanceof interface);
 }
 
 // Tests
 
-function run_test()
-{
+function run_test() {
   do_get_profile();
 
   checkService("appShell", Ci.nsIAppShellService);
   checkService("appinfo", Ci.nsIXULRuntime);
   checkService("blocklist", Ci.nsIBlocklistService);
   checkService("cache", Ci.nsICacheService);
   checkService("cache2", Ci.nsICacheStorageService);
   checkService("clipboard", Ci.nsIClipboard);
--- a/toolkit/modules/tests/xpcshell/test_sqlite.js
+++ b/toolkit/modules/tests/xpcshell/test_sqlite.js
@@ -31,17 +31,17 @@ function sleep(ms) {
     },
   }, ms, timer.TYPE_ONE_SHOT);
 
   return deferred.promise;
 }
 
 // When testing finalization, use this to tell Sqlite.jsm to not throw
 // an uncatchable `Promise.reject`
-function failTestsOnAutoClose(enabled)  {
+function failTestsOnAutoClose(enabled) {
   Cu.getGlobalForObject(Sqlite).Debugging.failTestsOnAutoClose = enabled;
 }
 
 function getConnection(dbName, extraOptions = {}) {
   let path = dbName + ".sqlite";
   let options = {path};
   for (let [k, v] of Object.entries(extraOptions)) {
     options[k] = v;
--- a/toolkit/mozapps/downloads/DownloadLastDir.jsm
+++ b/toolkit/mozapps/downloads/DownloadLastDir.jsm
@@ -66,27 +66,25 @@ var observer = {
 var os = Components.classes["@mozilla.org/observer-service;1"]
                    .getService(Components.interfaces.nsIObserverService);
 os.addObserver(observer, "last-pb-context-exited", true);
 os.addObserver(observer, "browser:purge-session-history", true);
 
 function readLastDirPref() {
   try {
     return Services.prefs.getComplexValue(LAST_DIR_PREF, nsIFile);
-  }
-  catch (e) {
+  } catch (e) {
     return null;
   }
 }
 
 function isContentPrefEnabled() {
   try {
     return Services.prefs.getBoolPref(SAVE_PER_SITE_PREF);
-  }
-  catch (e) {
+  } catch (e) {
     return true;
   }
 }
 
 var gDownloadLastDirFile = readLastDirPref();
 
 this.DownloadLastDir = function DownloadLastDir(aWindow) {
   let loadContext = aWindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
--- a/toolkit/mozapps/downloads/DownloadUtils.jsm
+++ b/toolkit/mozapps/downloads/DownloadUtils.jsm
@@ -115,31 +115,29 @@ this.DownloadUtils = {
    *        Total number of bytes or -1 for unknown
    * @param [optional] aSpeed
    *        Current transfer rate in bytes/sec or -1 for unknown
    * @param [optional] aLastSec
    *        Last time remaining in seconds or Infinity for unknown
    * @return A pair: [download status text, new value of "last seconds"]
    */
   getDownloadStatus: function DU_getDownloadStatus(aCurrBytes, aMaxBytes,
-                                                   aSpeed, aLastSec)
-  {
+                                                   aSpeed, aLastSec) {
     let [transfer, timeLeft, newLast, normalizedSpeed]
       = this._deriveTransferRate(aCurrBytes, aMaxBytes, aSpeed, aLastSec);
 
     let [rate, unit] = DownloadUtils.convertByteUnits(normalizedSpeed);
 
     let status;
     if (rate === "Infinity") {
       // Infinity download speed doesn't make sense. Show a localized phrase instead.
       let params = [transfer, gBundle.GetStringFromName(gStr.infiniteRate), timeLeft];
       status = gBundle.formatStringFromName(gStr.statusFormatInfiniteRate, params,
                                             params.length);
-    }
-    else {
+    } else {
       let params = [transfer, rate, unit, timeLeft];
       status = gBundle.formatStringFromName(gStr.statusFormat, params,
                                             params.length);
     }
     return [status, newLast];
   },
 
   /**
@@ -155,18 +153,17 @@ this.DownloadUtils = {
    * @param [optional] aSpeed
    *        Current transfer rate in bytes/sec or -1 for unknown
    * @param [optional] aLastSec
    *        Last time remaining in seconds or Infinity for unknown
    * @return A pair: [download status text, new value of "last seconds"]
    */
   getDownloadStatusNoRate:
   function DU_getDownloadStatusNoRate(aCurrBytes, aMaxBytes, aSpeed,
-                                      aLastSec)
-  {
+                                      aLastSec) {
     let [transfer, timeLeft, newLast]
       = this._deriveTransferRate(aCurrBytes, aMaxBytes, aSpeed, aLastSec);
 
     let params = [transfer, timeLeft];
     let status = gBundle.formatStringFromName(gStr.statusFormatNoRate, params,
                                               params.length);
     return [status, newLast];
   },
@@ -182,18 +179,17 @@ this.DownloadUtils = {
    *        Current transfer rate in bytes/sec or -1 for unknown
    * @param [optional] aLastSec
    *        Last time remaining in seconds or Infinity for unknown
    * @return A triple: [amount transferred string, time remaining string,
    *                    new value of "last seconds"]
    */
   _deriveTransferRate: function DU__deriveTransferRate(aCurrBytes,
                                                        aMaxBytes, aSpeed,
-                                                       aLastSec)
-  {
+                                                       aLastSec) {
     if (aMaxBytes == null)
       aMaxBytes = -1;
     if (aSpeed == null)
       aSpeed = -1;
     if (aLastSec == null)
       aLastSec = Infinity;
 
     // Calculate the time remaining if we have valid values
@@ -211,18 +207,17 @@ this.DownloadUtils = {
    * current and max will be suppressed for the former.
    *
    * @param aCurrBytes
    *        Number of bytes transferred so far
    * @param [optional] aMaxBytes
    *        Total number of bytes or -1 for unknown
    * @return The transfer progress text
    */
-  getTransferTotal: function DU_getTransferTotal(aCurrBytes, aMaxBytes)
-  {
+  getTransferTotal: function DU_getTransferTotal(aCurrBytes, aMaxBytes) {
     if (aMaxBytes == null)
       aMaxBytes = -1;
 
     let [progress, progressUnits] = DownloadUtils.convertByteUnits(aCurrBytes);
     let [total, totalUnits] = DownloadUtils.convertByteUnits(aMaxBytes);
 
     // Figure out which byte progress string to display
     let name, values;
@@ -259,18 +254,17 @@ this.DownloadUtils = {
    * sub-second accuracy for current and future estimates.
    *
    * @param aSeconds
    *        Current estimate on number of seconds left for the download
    * @param [optional] aLastSec
    *        Last time remaining in seconds or Infinity for unknown
    * @return A pair: [time left text, new value of "last seconds"]
    */
-  getTimeLeft: function DU_getTimeLeft(aSeconds, aLastSec)
-  {
+  getTimeLeft: function DU_getTimeLeft(aSeconds, aLastSec) {
     if (aLastSec == null)
       aLastSec = Infinity;
 
     if (aSeconds < 0)
       return [gBundle.GetStringFromName(gStr.timeUnknown), aLastSec];
 
     // Try to find a cached lastSec for the given second
     aLastSec = gCachedLast.reduce((aResult, aItem) =>
@@ -338,18 +332,17 @@ this.DownloadUtils = {
    * @param aDate
    *        Date object representing the date and time to format. It is assumed
    *        that this value represents a past date.
    * @param [optional] aNow
    *        Date object representing the current date and time. The real date
    *        and time of invocation is used if this parameter is omitted.
    * @return A pair: [compact text, complete text]
    */
-  getReadableDates: function DU_getReadableDates(aDate, aNow)
-  {
+  getReadableDates: function DU_getReadableDates(aDate, aNow) {
     if (!aNow) {
       aNow = new Date();
     }
 
     let dts = Cc["@mozilla.org/intl/scriptabledateformat;1"]
               .getService(Ci.nsIScriptableDateFormat);
 
     // Figure out when today begins
@@ -405,18 +398,17 @@ this.DownloadUtils = {
   /**
    * Get the appropriate display host string for a URI string depending on if
    * the URI has an eTLD + 1, is an IP address, a local file, or other protocol
    *
    * @param aURIString
    *        The URI string to try getting an eTLD + 1, etc.
    * @return A pair: [display host for the URI string, full host name]
    */
-  getURIHost: function DU_getURIHost(aURIString)
-  {
+  getURIHost: function DU_getURIHost(aURIString) {
     let ioService = Cc["@mozilla.org/network/io-service;1"].
                     getService(Ci.nsIIOService);
     let eTLDService = Cc["@mozilla.org/network/effective-tld-service;1"].
                       getService(Ci.nsIEffectiveTLDService);
     let idnService = Cc["@mozilla.org/network/idn-service;1"].
                      getService(Ci.nsIIDNService);
 
     // Get a URI that knows about its components
@@ -474,18 +466,17 @@ this.DownloadUtils = {
   /**
    * Converts a number of bytes to the appropriate unit that results in an
    * internationalized number that needs fewer than 4 digits.
    *
    * @param aBytes
    *        Number of bytes to convert
    * @return A pair: [new value with 3 sig. figs., its unit]
    */
-  convertByteUnits: function DU_convertByteUnits(aBytes)
-  {
+  convertByteUnits: function DU_convertByteUnits(aBytes) {
     let unitIndex = 0;
 
     // Convert to next unit if it needs 4 digits (after rounding), but only if
     // we know the name of the next unit
     while ((aBytes >= 999.5) && (unitIndex < gStr.units.length - 1)) {
       aBytes /= 1024;
       unitIndex++;
     }
@@ -515,18 +506,17 @@ this.DownloadUtils = {
   /**
    * Converts a number of seconds to the two largest units. Time values are
    * whole numbers, and units have the correct plural/singular form.
    *
    * @param aSecs
    *        Seconds to convert into the appropriate 2 units
    * @return 4-item array [first value, its unit, second value, its unit]
    */
-  convertTimeUnits: function DU_convertTimeUnits(aSecs)
-  {
+  convertTimeUnits: function DU_convertTimeUnits(aSecs) {
     // These are the maximum values for seconds, minutes, hours corresponding
     // with gStr.timeUnits without the last item
     let timeSize = [60, 60, 24];
 
     let time = aSecs;
     let scale = 1;
     let unitIndex = 0;
 
@@ -557,44 +547,41 @@ this.DownloadUtils = {
 
 /**
  * Private helper for convertTimeUnits that gets the display value of a time
  *
  * @param aTime
  *        Time value for display
  * @return An integer value for the time rounded down
  */
-function convertTimeUnitsValue(aTime)
-{
+function convertTimeUnitsValue(aTime) {
   return Math.floor(aTime);
 }
 
 /**
  * Private helper for convertTimeUnits that gets the display units of a time
  *
  * @param aTime
  *        Time value for display
  * @param aIndex
  *        Index into gStr.timeUnits for the appropriate unit
  * @return The appropriate plural form of the unit for the time
  */
-function convertTimeUnitsUnits(aTime, aIndex)
-{
+function convertTimeUnitsUnits(aTime, aIndex) {
   // Negative index would be an invalid unit, so just give empty
   if (aIndex < 0)
     return "";
 
   return PluralForm.get(aTime, gBundle.GetStringFromName(gStr.timeUnits[aIndex]));
 }
 
 /**
  * Private helper function to log errors to the error console and command line
  *
  * @param aMsg
  *        Error message to log or an array of strings to concat
  */
-function log(aMsg)
-{
+function log(aMsg) {
   let msg = "DownloadUtils.jsm: " + (aMsg.join ? aMsg.join("") : aMsg);
   Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService).
     logStringMessage(msg);
   dump(msg + "\n");
 }
--- a/toolkit/mozapps/downloads/tests/unit/test_DownloadPaths.js
+++ b/toolkit/mozapps/downloads/tests/unit/test_DownloadPaths.js
@@ -18,85 +18,81 @@ var Cr = Components.results;
 
 Cu.import("resource://gre/modules/DownloadPaths.jsm");
 
 /**
  * Provides a temporary save directory.
  *
  * @returns nsIFile pointing to the new or existing directory.
  */
-function createTemporarySaveDirectory()
-{
+function createTemporarySaveDirectory() {
   var saveDir = Cc["@mozilla.org/file/directory_service;1"].
                 getService(Ci.nsIProperties).get("TmpD", Ci.nsIFile);
   saveDir.append("testsavedir");
   if (!saveDir.exists()) {
     saveDir.create(Ci.nsIFile.DIRECTORY_TYPE, 0o755);
   }
   return saveDir;
 }
 
-function testSplitBaseNameAndExtension(aLeafName, [aBase, aExt])
-{
+function testSplitBaseNameAndExtension(aLeafName, [aBase, aExt]) {
   var [base, ext] = DownloadPaths.splitBaseNameAndExtension(aLeafName);
   do_check_eq(base, aBase);
   do_check_eq(ext, aExt);
 
   // If we modify the base name and concatenate it with the extension again,
   // another roundtrip through the function should give a consistent result.
   // The only exception is when we introduce an extension in a file name that
   // didn't have one or that ended with one of the special cases like ".gz". If
   // we avoid using a dot and we introduce at least another special character,
   // the results are always consistent.
   [base, ext] = DownloadPaths.splitBaseNameAndExtension("(" + base + ")" + ext);
   do_check_eq(base, "(" + aBase + ")");
   do_check_eq(ext, aExt);
 }
 
-function testCreateNiceUniqueFile(aTempFile, aExpectedLeafName)
-{
+function testCreateNiceUniqueFile(aTempFile, aExpectedLeafName) {
   var createdFile = DownloadPaths.createNiceUniqueFile(aTempFile);
   do_check_eq(createdFile.leafName, aExpectedLeafName);
 }
 
-function run_test()
-{
+function run_test() {
   // Usual file names.
-  testSplitBaseNameAndExtension("base",             ["base", ""]);
-  testSplitBaseNameAndExtension("base.ext",         ["base", ".ext"]);
+  testSplitBaseNameAndExtension("base", ["base", ""]);
+  testSplitBaseNameAndExtension("base.ext", ["base", ".ext"]);
   testSplitBaseNameAndExtension("base.application", ["base", ".application"]);
-  testSplitBaseNameAndExtension("base.x.Z",         ["base", ".x.Z"]);
-  testSplitBaseNameAndExtension("base.ext.Z",       ["base", ".ext.Z"]);
-  testSplitBaseNameAndExtension("base.ext.gz",      ["base", ".ext.gz"]);
-  testSplitBaseNameAndExtension("base.ext.Bz2",     ["base", ".ext.Bz2"]);
-  testSplitBaseNameAndExtension("base..ext",        ["base.", ".ext"]);
-  testSplitBaseNameAndExtension("base..Z",          ["base.", ".Z"]);
-  testSplitBaseNameAndExtension("base. .Z",         ["base. ", ".Z"]);
-  testSplitBaseNameAndExtension("base.base.Bz2",    ["base.base", ".Bz2"]);
-  testSplitBaseNameAndExtension("base  .ext",       ["base  ", ".ext"]);
+  testSplitBaseNameAndExtension("base.x.Z", ["base", ".x.Z"]);
+  testSplitBaseNameAndExtension("base.ext.Z", ["base", ".ext.Z"]);
+  testSplitBaseNameAndExtension("base.ext.gz", ["base", ".ext.gz"]);
+  testSplitBaseNameAndExtension("base.ext.Bz2", ["base", ".ext.Bz2"]);
+  testSplitBaseNameAndExtension("base..ext", ["base.", ".ext"]);
+  testSplitBaseNameAndExtension("base..Z", ["base.", ".Z"]);
+  testSplitBaseNameAndExtension("base. .Z", ["base. ", ".Z"]);
+  testSplitBaseNameAndExtension("base.base.Bz2", ["base.base", ".Bz2"]);
+  testSplitBaseNameAndExtension("base  .ext", ["base  ", ".ext"]);
 
   // Corner cases. A name ending with a dot technically has no extension, but
   // we consider the ending dot separately from the base name so that modifying
   // the latter never results in an extension being introduced accidentally.
   // Names beginning with a dot are hidden files on Unix-like platforms and if
   // their name doesn't contain another dot they should have no extension, but
   // on Windows the whole name is considered as an extension.
-  testSplitBaseNameAndExtension("base.",            ["base", "."]);
-  testSplitBaseNameAndExtension(".ext",             ["", ".ext"]);
+  testSplitBaseNameAndExtension("base.", ["base", "."]);
+  testSplitBaseNameAndExtension(".ext", ["", ".ext"]);
 
   // Unusual file names (not recommended as input to the function).
-  testSplitBaseNameAndExtension("base. ",           ["base", ". "]);
-  testSplitBaseNameAndExtension("base ",            ["base ", ""]);
-  testSplitBaseNameAndExtension("",                 ["", ""]);
-  testSplitBaseNameAndExtension(" ",                [" ", ""]);
-  testSplitBaseNameAndExtension(" . ",              [" ", ". "]);
-  testSplitBaseNameAndExtension(" .. ",             [" .", ". "]);
-  testSplitBaseNameAndExtension(" .ext",            [" ", ".ext"]);
-  testSplitBaseNameAndExtension(" .ext. ",          [" .ext", ". "]);
-  testSplitBaseNameAndExtension(" .ext.gz ",        [" .ext", ".gz "]);
+  testSplitBaseNameAndExtension("base. ", ["base", ". "]);
+  testSplitBaseNameAndExtension("base ", ["base ", ""]);
+  testSplitBaseNameAndExtension("", ["", ""]);
+  testSplitBaseNameAndExtension(" ", [" ", ""]);
+  testSplitBaseNameAndExtension(" . ", [" ", ". "]);
+  testSplitBaseNameAndExtension(" .. ", [" .", ". "]);
+  testSplitBaseNameAndExtension(" .ext", [" ", ".ext"]);
+  testSplitBaseNameAndExtension(" .ext. ", [" .ext", ". "]);
+  testSplitBaseNameAndExtension(" .ext.gz ", [" .ext", ".gz "]);
 
   var destDir = createTemporarySaveDirectory();
   try {
     // Single extension.
     var tempFile = destDir.clone();
     tempFile.append("test.txt");
     testCreateNiceUniqueFile(tempFile, "test.txt");
     testCreateNiceUniqueFile(tempFile, "test(1).txt");
--- a/toolkit/mozapps/downloads/tests/unit/test_DownloadUtils.js
+++ b/toolkit/mozapps/downloads/tests/unit/test_DownloadUtils.js
@@ -5,36 +5,33 @@
 var Cu = Components.utils;
 Cu.import("resource://gre/modules/DownloadUtils.jsm");
 
 const gDecimalSymbol = Number(5.4).toLocaleString().match(/\D/);
 function _(str) {
   return str.replace(/\./g, gDecimalSymbol);
 }
 
-function testConvertByteUnits(aBytes, aValue, aUnit)
-{
+function testConvertByteUnits(aBytes, aValue, aUnit) {
   let [value, unit] = DownloadUtils.convertByteUnits(aBytes);
   do_check_eq(value, aValue);
   do_check_eq(unit, aUnit);
 }
 
-function testTransferTotal(aCurrBytes, aMaxBytes, aTransfer)
-{
+function testTransferTotal(aCurrBytes, aMaxBytes, aTransfer) {
   let transfer = DownloadUtils.getTransferTotal(aCurrBytes, aMaxBytes);
   do_check_eq(transfer, aTransfer);
 }
 
 // Get the em-dash character because typing it directly here doesn't work :(
 var gDash = DownloadUtils.getDownloadStatus(0)[0].match(/remaining (.) 0 bytes/)[1];
 
 var gVals = [0, 100, 2345, 55555, 982341, 23194134, 1482, 58, 9921949201, 13498132, Infinity];
 
-function testStatus(aFunc, aCurr, aMore, aRate, aTest)
-{
+function testStatus(aFunc, aCurr, aMore, aRate, aTest) {
   dump("Status Test: " + [aCurr, aMore, aRate, aTest] + "\n");
   let curr = gVals[aCurr];
   let max = curr + gVals[aMore];
   let speed = gVals[aRate];
 
   let [status, last] = aFunc(curr, max, speed);
 
   if (0) {
@@ -47,38 +44,35 @@ function testStatus(aFunc, aCurr, aMore,
 
   // Make sure the lastSeconds matches
   if (last == Infinity)
     do_check_eq(last, aTest[1]);
   else
     do_check_true(Math.abs(last - aTest[1]) < .1);
 }
 
-function testURI(aURI, aDisp, aHost)
-{
+function testURI(aURI, aDisp, aHost) {
   dump("URI Test: " + [aURI, aDisp, aHost] + "\n");
 
   let [disp, host] = DownloadUtils.getURIHost(aURI);
 
   // Make sure we have the right display host and full host
   do_check_eq(disp, aDisp);
   do_check_eq(host, aHost);
 }
 
 
-function testGetReadableDates(aDate, aCompactValue)
-{
+function testGetReadableDates(aDate, aCompactValue) {
   const now = new Date(2000, 11, 31, 11, 59, 59);
 
   let [dateCompact] = DownloadUtils.getReadableDates(aDate, now);
   do_check_eq(dateCompact, aCompactValue);
 }
 
-function testAllGetReadableDates()
-{
+function testAllGetReadableDates() {
   // This test cannot depend on the current date and time, or the date format.
   // It depends on being run with the English localization, however.
   const today_11_30     = new Date(2000, 11, 31, 11, 30, 15);
   const today_12_30     = new Date(2000, 11, 31, 12, 30, 15);
   const yesterday_11_30 = new Date(2000, 11, 30, 11, 30, 15);
   const yesterday_12_30 = new Date(2000, 11, 30, 12, 30, 15);
   const twodaysago      = new Date(2000, 11, 29, 11, 30, 15);
   const sixdaysago      = new Date(2000, 11, 25, 11, 30, 15);
@@ -115,18 +109,17 @@ function testAllGetReadableDates()
                        sevendaysago.getDate().toString().padStart(2, "0"));
 
   let [, dateTimeFull] = DownloadUtils.getReadableDates(today_11_30);
   do_check_eq(dateTimeFull, dts.FormatDateTime("", dts.dateFormatLong,
                                                    dts.timeFormatNoSeconds,
                                                    2000, 12, 31, 11, 30, 0));
 }
 
-function run_test()
-{
+function run_test() {
   testConvertByteUnits(-1, "-1", "bytes");
   testConvertByteUnits(1, _("1"), "bytes");
   testConvertByteUnits(42, _("42"), "bytes");
   testConvertByteUnits(123, _("123"), "bytes");
   testConvertByteUnits(1024, _("1.0"), "KB");
   testConvertByteUnits(8888, _("8.7"), "KB");
   testConvertByteUnits(59283, _("57.9"), "KB");
   testConvertByteUnits(640000, _("625"), "KB");
--- a/toolkit/mozapps/downloads/tests/unit/test_lowMinutes.js
+++ b/toolkit/mozapps/downloads/tests/unit/test_lowMinutes.js
@@ -34,18 +34,17 @@ var expectedTimes = [
   [5.3 * 60, "5 minutes remaining", "over 4min -> only show min"],
   [1.1 * 3600, "1 hour, 6 minutes remaining", "over 1hr -> show min/sec"],
   [2.5 * 3600, "2 hours, 30 minutes remaining", "over 1hr -> show min/sec"],
   [3.9 * 3600, "3 hours, 54 minutes remaining", "over 1hr -> show min/sec"],
   [5.3 * 3600, "5 hours, 18 minutes remaining", "over 1hr -> show min/sec"],
 ];
 _(expectedTimes.join("\n"));
 
-function run_test()
-{
+function run_test() {
   expectedTimes.forEach(function([time, expectStatus, comment]) {
     _("Running test with time", time);
     _("Test comment:", comment);
     let [status, last] = DownloadUtils.getTimeLeft(time);
 
     _("Got status:", status, "last:", last);
     _("Expecting..", expectStatus);
     do_check_eq(status, expectStatus);
--- a/toolkit/mozapps/downloads/tests/unit/test_syncedDownloadUtils.js
+++ b/toolkit/mozapps/downloads/tests/unit/test_syncedDownloadUtils.js
@@ -6,18 +6,17 @@
  * Test bug 420482 by making sure multiple consumers of DownloadUtils gets the
  * same time remaining time if they provide the same time left but a different
  * "last time".
  */
 
 var Cu = Components.utils;
 Cu.import("resource://gre/modules/DownloadUtils.jsm");
 
-function run_test()
-{
+function run_test() {
   // Simulate having multiple downloads requesting time left
   let downloadTimes = {};
   for (let time of [1, 30, 60, 3456, 9999])
     downloadTimes[time] = DownloadUtils.getTimeLeft(time)[0];
 
   // Pretend we're a download status bar also asking for a time left, but we're
   // using a different "last sec". We need to make sure we get the same time.
   let lastSec = 314;
--- a/toolkit/mozapps/downloads/tests/unit/test_unspecified_arguments.js
+++ b/toolkit/mozapps/downloads/tests/unit/test_unspecified_arguments.js
@@ -5,18 +5,17 @@
 /**
  * Make sure passing null and nothing to various variable-arg DownloadUtils
  * methods provide the same result.
  */
 
 var Cu = Components.utils;
 Cu.import("resource://gre/modules/DownloadUtils.jsm");
 
-function run_test()
-{
+function run_test() {
   do_check_eq(DownloadUtils.getDownloadStatus(1000, null, null, null) + "",
               DownloadUtils.getDownloadStatus(1000) + "");
   do_check_eq(DownloadUtils.getDownloadStatus(1000, null, null) + "",
               DownloadUtils.getDownloadStatus(1000, null) + "");
 
   do_check_eq(DownloadUtils.getTransferTotal(1000, null) + "",
               DownloadUtils.getTransferTotal(1000) + "");
 
--- a/toolkit/mozapps/extensions/AddonManager.jsm
+++ b/toolkit/mozapps/extensions/AddonManager.jsm
@@ -150,28 +150,25 @@ var PrefObserver = {
       Services.obs.addObserver(this, "xpcom-shutdown", false);
       this.observe(null, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, PREF_LOGGING_ENABLED);
     },
 
     observe(aSubject, aTopic, aData) {
       if (aTopic == "xpcom-shutdown") {
         Services.prefs.removeObserver(PREF_LOGGING_ENABLED, this);
         Services.obs.removeObserver(this, "xpcom-shutdown");
-      }
-      else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) {
+      } else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) {
         let debugLogEnabled = false;
         try {
           debugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED);
-        }
-        catch (e) {
+        } catch (e) {
         }
         if (debugLogEnabled) {
           parentLogger.level = Log.Level.Debug;
-        }
-        else {
+        } else {
           parentLogger.level = Log.Level.Warn;
         }
       }
     }
 };
 
 PrefObserver.init();
 
@@ -180,18 +177,17 @@ PrefObserver.init();
  * the callback parameter will be passed to the callback.
  *
  * @param  aCallback
  *         The callback method to call
  */
 function safeCall(aCallback, ...aArgs) {
   try {
     aCallback.apply(null, aArgs);
-  }
-  catch (e) {
+  } catch (e) {
     logger.warn("Exception calling callback", e);
   }
 }
 
 /**
  * Creates a function that will call the passed callback catching and logging
  * any exceptions.
  *
@@ -257,18 +253,17 @@ function reportProviderError(aProvider, 
  *         implement method or throws an error
  */
 function callProvider(aProvider, aMethod, aDefault, ...aArgs) {
   if (!(aMethod in aProvider))
     return aDefault;
 
   try {
     return aProvider[aMethod].apply(aProvider, aArgs);
-  }
-  catch (e) {
+  } catch (e) {
     reportProviderError(aProvider, aMethod, e);
     return aDefault;
   }
 }
 
 /**
  * Calls a method on a provider if it exists and consumes any thrown exception.
  * Parameters after aMethod are passed to aProvider.aMethod().
@@ -284,18 +279,17 @@ function callProvider(aProvider, aMethod
 function callProviderAsync(aProvider, aMethod, ...aArgs) {
   let callback = aArgs[aArgs.length - 1];
   if (!(aMethod in aProvider)) {
     callback(undefined);
     return undefined;
   }
   try {
     return aProvider[aMethod].apply(aProvider, aArgs);
-  }
-  catch (e) {
+  } catch (e) {
     reportProviderError(aProvider, aMethod, e);
     callback(undefined);
     return undefined;
   }
 }
 
 /**
  * Calls a method on a provider if it exists and consumes any thrown exception.
@@ -320,31 +314,28 @@ function promiseCallProvider(aProvider, 
 /**
  * Gets the currently selected locale for display.
  * @return  the selected locale or "en-US" if none is selected
  */
 function getLocale() {
   try {
     if (Services.prefs.getBoolPref(PREF_MATCH_OS_LOCALE))
       return Services.locale.getLocaleComponentForUserAgent();
-  }
-  catch (e) { }
+  } catch (e) { }
 
   try {
     let locale = Services.prefs.getComplexValue(PREF_SELECTED_LOCALE,
                                                 Ci.nsIPrefLocalizedString);
     if (locale)
       return locale;
-  }
-  catch (e) { }
+  } catch (e) { }
 
   try {
     return Services.prefs.getCharPref(PREF_SELECTED_LOCALE);
-  }
-  catch (e) { }
+  } catch (e) { }
 
   return "en-US";
 }
 
 function webAPIForAddon(addon) {
   if (!addon) {
     return null;
   }
@@ -407,18 +398,17 @@ BrowserListener.prototype = {
       install.removeListener(this);
     this.installs = null;
   },
 
   cancelInstalls() {
     for (let install of this.installs) {
       try {
         install.cancel();
-      }
-      catch (e) {
+      } catch (e) {
         // Some installs may have already failed or been cancelled, ignore these
       }
     }
   },
 
   observe(subject, topic, data) {
     if (subject != this.browser.messageManager)
       return;
@@ -629,18 +619,17 @@ function AddonType(aID, aLocaleURI, aLoc
   this.viewType = aViewType;
   this.flags = aFlags;
 
   if (aLocaleURI) {
     XPCOMUtils.defineLazyGetter(this, "name", () => {
       let bundle = Services.strings.createBundle(aLocaleURI);
       return bundle.GetStringFromName(aLocaleKey.replace("%ID%", aID));
     });
-  }
-  else {
+  } else {
     this.name = aLocaleKey;
   }
 }
 
 var gStarted = false;
 var gStartupComplete = false;
 var gCheckCompatibility = true;
 var gStrictCompatibility = true;
@@ -686,18 +675,17 @@ var AddonManagerInternal = {
 
     let profileBlocklist = FileUtils.getFile(KEY_PROFILEDIR, [FILE_BLOCKLIST]);
 
     // If there is no blocklist in the profile then copy the application shipped
     // one there
     if (!profileBlocklist.exists()) {
       try {
         appBlocklist.copyTo(profileBlocklist.parent, FILE_BLOCKLIST);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("Failed to copy the application shipped blocklist to the profile", e);
       }
       return;
     }
 
     let fileStream = Cc["@mozilla.org/network/file-input-stream;1"].
                      createInstance(Ci.nsIFileInputStream);
     try {
@@ -712,26 +700,23 @@ var AddonManagerInternal = {
       do {
         read = cstream.readString(0xffffffff, str);
         data += str.value;
       } while (read != 0);
 
       let parser = Cc["@mozilla.org/xmlextras/domparser;1"].
                    createInstance(Ci.nsIDOMParser);
       var doc = parser.parseFromString(data, "text/xml");
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("Application shipped blocklist could not be loaded", e);
       return;
-    }
-    finally {
+    } finally {
       try {
         fileStream.close();
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("Unable to close blocklist file stream", e);
       }
     }
 
     // If the namespace is incorrect then ignore the application shipped
     // blocklist
     if (doc.documentElement.namespaceURI != XMLURI_BLOCKLIST) {
       logger.warn("Application shipped blocklist has an unexpected namespace (" +
@@ -748,18 +733,17 @@ var AddonManagerInternal = {
     // then do nothing
     if (doc.documentElement.getAttribute("lastupdate") <=
         profileBlocklist.lastModifiedTime)
       return;
 
     // Otherwise copy the application shipped blocklist to the profile
     try {
       appBlocklist.copyTo(profileBlocklist.parent, FILE_BLOCKLIST);
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("Failed to copy the application shipped blocklist to the profile", e);
     }
   },
 
   /**
    * Start up a provider, and register its shutdown hook if it has one
    */
   _startProvider(aProvider, aAppChanged, aOldAppVersion, aOldPlatformVersion) {
@@ -824,26 +808,24 @@ var AddonManagerInternal = {
         delete this.telemetryDetails[provider];
 
       let appChanged = undefined;
 
       let oldAppVersion = null;
       try {
         oldAppVersion = Services.prefs.getCharPref(PREF_EM_LAST_APP_VERSION);
         appChanged = Services.appinfo.version != oldAppVersion;
-      }
-      catch (e) { }
+      } catch (e) { }
 
       Extension.browserUpdated = appChanged;
 
       let oldPlatformVersion = null;
       try {
         oldPlatformVersion = Services.prefs.getCharPref(PREF_EM_LAST_PLATFORM_VERSION);
-      }
-      catch (e) { }
+      } catch (e) { }
 
       if (appChanged !== false) {
         logger.debug("Application has been upgraded");
         Services.prefs.setCharPref(PREF_EM_LAST_APP_VERSION,
                                    Services.appinfo.version);
         Services.prefs.setCharPref(PREF_EM_LAST_PLATFORM_VERSION,
                                    Services.appinfo.platformVersion);
         Services.prefs.setIntPref(PREF_BLOCKLIST_PINGCOUNTVERSION,
@@ -912,18 +894,17 @@ var AddonManagerInternal = {
             // has a 'startup' method
             let syms = Object.keys(scope);
             if ((syms.length < 1) ||
                 (typeof scope[syms[0]].startup != "function")) {
               logger.warn("Provider " + url + " has no startup()");
               AddonManagerPrivate.recordException("AMI", "provider " + url, "no startup()");
             }
             logger.debug("Loaded provider scope for " + url + ": " + Object.keys(scope).toSource());
-          }
-          catch (e) {
+          } catch (e) {
             AddonManagerPrivate.recordException("AMI", "provider " + url + " load failed", e);
             logger.error("Exception loading default provider \"" + url + "\"", e);
           }
         }
       }
 
       // Load any providers registered in the category manager
       let catman = Cc["@mozilla.org/categorymanager;1"].
@@ -931,18 +912,17 @@ var AddonManagerInternal = {
       let entries = catman.enumerateCategory(CATEGORY_PROVIDER_MODULE);
       while (entries.hasMoreElements()) {
         let entry = entries.getNext().QueryInterface(Ci.nsISupportsCString).data;
         let url = catman.getCategoryEntry(CATEGORY_PROVIDER_MODULE, entry);
 
         try {
           Components.utils.import(url, {});
           logger.debug(`Loaded provider scope for ${url}`);
-        }
-        catch (e) {
+        } catch (e) {
           AddonManagerPrivate.recordException("AMI", "provider " + url + " load failed", e);
           logger.error("Exception loading provider " + entry + " from category \"" +
                 url + "\"", e);
         }
       }
 
       // Register our shutdown handler with the AsyncShutdown manager
       gShutdownBarrier = new AsyncShutdown.Barrier("AddonManager: Waiting for providers to shut down.");
@@ -967,18 +947,17 @@ var AddonManagerInternal = {
       // at the top because Services.appinfo is defined late in tests.
       let { RemotePages } = Cu.import("resource://gre/modules/RemotePageManager.jsm", {});
 
       gPluginPageListener = new RemotePages("about:plugins");
       gPluginPageListener.addMessageListener("RequestPlugins", this.requestPlugins);
 
       gStartupComplete = true;
       this.recordTimestamp("AMI_startup_end");
-    }
-    catch (e) {
+    } catch (e) {
       logger.error("startup failed", e);
       AddonManagerPrivate.recordException("AMI", "startup failed", e);
     }
 
     logger.debug("Completed startup sequence");
     this.callManagerListeners("onStartup");
   },
 
@@ -1012,18 +991,17 @@ var AddonManagerInternal = {
           this.types[type.id] = {
             type,
             providers: [aProvider]
           };
 
           let typeListeners = this.typeListeners.slice(0);
           for (let listener of typeListeners)
             safeCall(() => listener.onTypeAdded(type));
-        }
-        else {
+        } else {
           this.types[type.id].providers.push(aProvider);
         }
       }
     }
 
     // If we're registering after startup call this provider's startup.
     if (gStarted) {
       this._startProvider(aProvider);
@@ -1126,18 +1104,17 @@ var AddonManagerInternal = {
       throw Components.Exception("aMethod must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     let providers = [...this.providers];
     for (let provider of providers) {
       try {
         if (aMethod in provider)
           provider[aMethod].apply(provider, aArgs);
-      }
-      catch (e) {
+      } catch (e) {
         reportProviderError(provider, aMethod, e);
       }
     }
   },
 
   /**
    * Report the current state of asynchronous shutdown
    */
@@ -1178,31 +1155,29 @@ var AddonManagerInternal = {
     gPluginPageListener.destroy();
     gPluginPageListener = null;
 
     let savedError = null;
     // Only shut down providers if they've been started.
     if (gStarted) {
       try {
         yield gShutdownBarrier.wait();
-      }
-      catch (err) {
+      } catch (err) {
         savedError = err;
         logger.error("Failure during wait for shutdown barrier", err);
         AddonManagerPrivate.recordException("AMI", "Async shutdown of AddonManager providers", err);
       }
     }
 
     // Shut down AddonRepository after providers (if any).
     try {
       gRepoShutdownState = "in progress";
       yield AddonRepository.shutdown();
       gRepoShutdownState = "done";
-    }
-    catch (err) {
+    } catch (err) {
       savedError = err;
       logger.error("Failure during AddonRepository shutdown", err);
       AddonManagerPrivate.recordException("AMI", "Async shutdown of AddonRepository", err);
     }
 
     logger.debug("Async provider shutdown done");
     this.managerListeners.splice(0, this.managerListeners.length);
     this.installListeners.splice(0, this.installListeners.length);
@@ -1332,18 +1307,17 @@ var AddonManagerInternal = {
    * @param  aAddon
    *         The Addon representing the add-on
    * @param  aUri
    *         The string representation of the URI to escape
    * @param  aAppVersion
    *         The optional application version to use for %APP_VERSION%
    * @return The appropriately escaped URI.
    */
-  escapeAddonURI(aAddon, aUri, aAppVersion)
-  {
+  escapeAddonURI(aAddon, aUri, aAppVersion) {
     if (!aAddon || typeof aAddon != "object")
       throw Components.Exception("aAddon must be an Addon object",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     if (!aUri || typeof aUri != "string")
       throw Components.Exception("aUri must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -1387,18 +1361,17 @@ var AddonManagerInternal = {
         catMan = Cc["@mozilla.org/categorymanager;1"].
                  getService(Ci.nsICategoryManager);
       }
 
       try {
         var contractID = catMan.getCategoryEntry(CATEGORY_UPDATE_PARAMS, aParam);
         var paramHandler = Cc[contractID].getService(Ci.nsIPropertyBag2);
         return paramHandler.getPropertyAsAString(aParam);
-      }
-      catch (e) {
+      } catch (e) {
         return aMatch;
       }
     });
 
     // escape() does not properly encode + symbols in any embedded FVF strings.
     return uri.replace(/\+/g, "%2B");
   },
 
@@ -1466,18 +1439,17 @@ var AddonManagerInternal = {
         }
         yield Promise.all(updates);
       }
 
       if (checkHotfix) {
         var hotfixVersion = "";
         try {
           hotfixVersion = Services.prefs.getCharPref(PREF_EM_HOTFIX_LASTVERSION);
-        }
-        catch (e) { }
+        } catch (e) { }
 
         let url = null;
         if (Services.prefs.getPrefType(PREF_EM_HOTFIX_URL) == Ci.nsIPrefBranch.PREF_STRING)
           url = Services.prefs.getCharPref(PREF_EM_HOTFIX_URL);
         else
           url = Services.prefs.getCharPref(PREF_EM_UPDATE_BACKGROUND_URL);
 
         // Build the URI from a fake add-on data.
@@ -1523,27 +1495,25 @@ var AddonManagerInternal = {
                 // If XPIProvider has reported the hotfix as properly signed then
                 // there is nothing more to do here
                 if (aInstall.addon.signedState == AddonManager.SIGNEDSTATE_SIGNED)
                   return;
 
                 try {
                   if (!Services.prefs.getBoolPref(PREF_EM_CERT_CHECKATTRIBUTES))
                     return;
-                }
-                catch (e) {
+                } catch (e) {
                   // By default don't do certificate checks.
                   return;
                 }
 
                 try {
                   CertUtils.validateCert(aInstall.certificate,
                                          CertUtils.readCertPrefs(PREF_EM_HOTFIX_CERTS));
-                }
-                catch (e) {
+                } catch (e) {
                   logger.warn("The hotfix add-on was not signed by the expected " +
                        "certificate and so will not be installed.", e);
                   aInstall.cancel();
                 }
               },
 
               onInstallEnded(aInstall) {
                 // Remember the last successfully installed version.
@@ -1562,18 +1532,17 @@ var AddonManagerInternal = {
             aInstall.install();
           }
         }
       }
 
       if (appUpdateEnabled) {
         try {
           yield AddonManagerInternal._getProviderByName("XPIProvider").updateSystemAddons();
-        }
-        catch (e) {
+        } catch (e) {
           logger.warn("Failed to update system addons", e);
         }
       }
 
       logger.debug("Background update check complete");
       Services.obs.notifyObservers(null,
                                    "addons-background-update-complete",
                                    null);
@@ -1659,18 +1628,17 @@ var AddonManagerInternal = {
       throw Components.Exception("aMethod must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     let managerListeners = this.managerListeners.slice(0);
     for (let listener of managerListeners) {
       try {
         if (aMethod in listener)
           listener[aMethod].apply(listener, aArgs);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("AddonManagerListener threw exception when calling " + aMethod, e);
       }
     }
   },
 
   /**
    * Calls all registered InstallListeners with an event. Any parameters after
    * the extraListeners parameter are passed to the listener.
@@ -1703,18 +1671,17 @@ var AddonManagerInternal = {
       listeners = this.installListeners.slice(0);
 
     for (let listener of listeners) {
       try {
         if (aMethod in listener) {
           if (listener[aMethod].apply(listener, aArgs) === false)
             result = false;
         }
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("InstallListener threw exception when calling " + aMethod, e);
       }
     }
     return result;
   },
 
   /**
    * Calls all registered AddonListeners with an event. Any parameters after
@@ -1732,18 +1699,17 @@ var AddonManagerInternal = {
       throw Components.Exception("aMethod must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     let addonListeners = this.addonListeners.slice(0);
     for (let listener of addonListeners) {
       try {
         if (aMethod in listener)
           listener[aMethod].apply(listener, aArgs);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("AddonListener threw exception when calling " + aMethod, e);
       }
     }
   },
 
   /**
    * Notifies all providers that an add-on has been enabled when that type of
    * add-on only supports a single add-on being enabled at a time. This allows
@@ -2117,18 +2083,17 @@ var AddonManagerInternal = {
 
       if (!this.isInstallEnabled(aMimetype)) {
         for (let install of aInstalls)
           install.cancel();
 
         weblistener.onWebInstallDisabled(topBrowser, aInstallingPrincipal.URI,
                                          aInstalls, aInstalls.length);
         return;
-      }
-      else if (!aBrowser.contentPrincipal || !aInstallingPrincipal.subsumes(aBrowser.contentPrincipal)) {
+      } else if (!aBrowser.contentPrincipal || !aInstallingPrincipal.subsumes(aBrowser.contentPrincipal)) {
         for (let install of aInstalls)
           install.cancel();
 
         if (weblistener instanceof Ci.amIWebInstallListener2) {
           weblistener.onWebInstallOriginBlocked(topBrowser, aInstallingPrincipal.URI,
                                                 aInstalls, aInstalls.length);
         }
         return;
@@ -2140,24 +2105,22 @@ var AddonManagerInternal = {
       new BrowserListener(aBrowser, aInstallingPrincipal, aInstalls);
 
       if (!this.isInstallAllowed(aMimetype, aInstallingPrincipal)) {
         if (weblistener.onWebInstallBlocked(topBrowser, aInstallingPrincipal.URI,
                                             aInstalls, aInstalls.length)) {
           for (let install of aInstalls)
             install.install();
         }
-      }
-      else if (weblistener.onWebInstallRequested(topBrowser, aInstallingPrincipal.URI,
+      } else if (weblistener.onWebInstallRequested(topBrowser, aInstallingPrincipal.URI,
                                                  aInstalls, aInstalls.length)) {
         for (let install of aInstalls)
           install.install();
       }
-    }
-    catch (e) {
+    } catch (e) {
       // In the event that the weblistener throws during instantiation or when
       // calling onWebInstallBlocked or onWebInstallRequested all of the
       // installs should get cancelled.
       logger.warn("Failure calling web installer", e);
       for (let install of aInstalls)
         install.cancel();
     }
   },
@@ -2169,17 +2132,18 @@ var AddonManagerInternal = {
    *         The InstallListener to add
    */
   addInstallListener(aListener) {
     if (!aListener || typeof aListener != "object")
       throw Components.Exception("aListener must be a InstallListener object",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     if (!this.installListeners.some(function(i) {
-      return i == aListener; }))
+      return i == aListener;
+}))
       this.installListeners.push(aListener);
   },
 
   /**
    * Removes an InstallListener if the listener is registered.
    *
    * @param  aListener
    *         The InstallListener to remove
@@ -2363,18 +2327,17 @@ var AddonManagerInternal = {
         bestSize = size;
         continue;
       }
 
       if (size > aSize && bestSize > aSize) {
         // If both best size and current size are larger than the wanted size then choose
         // the one closest to the wanted size
         bestSize = Math.min(bestSize, size);
-      }
-      else {
+      } else {
         // Otherwise choose the largest of the two so we'll prefer sizes as close to below aSize
         // or above aSize
         bestSize = Math.max(bestSize, size);
       }
     }
 
     return icons[bestSize] || null;
   },
@@ -3004,18 +2967,17 @@ this.AddonManagerPrivate = {
   recordException(aModule, aContext, aException) {
     let report = {
       module: aModule,
       context: aContext
     };
 
     if (typeof aException == "number") {
       report.message = Components.Exception("", aException).name;
-    }
-    else {
+    } else {
       report.message = aException.toString();
       if (aException.fileName) {
         report.file = aException.fileName;
         report.line = aException.lineNumber;
       }
     }
 
     this._simpleMeasures.exception = report;
--- a/toolkit/mozapps/extensions/ChromeManifestParser.jsm
+++ b/toolkit/mozapps/extensions/ChromeManifestParser.jsm
@@ -107,18 +107,17 @@ this.ChromeManifestParser = {
         innerReader.openInner(reader, entries[i]);
         readers.push(innerReader);
         reader = innerReader;
       }
 
       // First entry is the actual file we want to read.
       let zis = reader.getInputStream(entries[0]);
       data = NetUtil.readInputStreamToString(zis, zis.available());
-    }
-    finally {
+    } finally {
       // Close readers in reverse order.
       for (let i = readers.length - 1; i >= 0; i--) {
         readers[i].close();
         flushJarCache(readers[i].file);
       }
     }
 
     return data;
--- a/toolkit/mozapps/extensions/DeferredSave.jsm
+++ b/toolkit/mozapps/extensions/DeferredSave.jsm
@@ -57,28 +57,25 @@ var PrefObserver = {
    Services.obs.addObserver(this, "xpcom-shutdown", false);
    this.observe(null, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, PREF_LOGGING_ENABLED);
  },
 
  observe(aSubject, aTopic, aData) {
    if (aTopic == "xpcom-shutdown") {
      Services.prefs.removeObserver(PREF_LOGGING_ENABLED, this);
      Services.obs.removeObserver(this, "xpcom-shutdown");
-   }
-   else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) {
+   } else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) {
      let debugLogEnabled = false;
      try {
        debugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED);
-     }
-     catch (e) {
+     } catch (e) {
      }
      if (debugLogEnabled) {
        parentLogger.level = Log.Level.Debug;
-     }
-     else {
+     } else {
        parentLogger.level = Log.Level.Warn;
      }
    }
  }
 };
 
 PrefObserver.init();
 
@@ -202,18 +199,17 @@ this.DeferredSave.prototype = {
     let writing = this._writing;
     this._writing = pending.promise;
 
     // In either the success or the exception handling case, we don't need to handle
     // the error from _writing here; it's already being handled in another then()
     let toSave = null;
     try {
       toSave = this._dataProvider();
-    }
-    catch (e) {
+    } catch (e) {
         this.logger.error("Deferred save dataProvider failed", e);
       writing.then(null, error => {})
         .then(count => {
           pending.reject(e);
         });
       return;
     }
 
--- a/toolkit/mozapps/extensions/LightweightThemeManager.jsm
+++ b/toolkit/mozapps/extensions/LightweightThemeManager.jsm
@@ -50,18 +50,17 @@ XPCOMUtils.defineLazyGetter(this, "_pref
   return Services.prefs.getBranch("lightweightThemes.");
 });
 
 Object.defineProperty(this, "_maxUsedThemes", {
   get() {
     delete this._maxUsedThemes;
     try {
       this._maxUsedThemes = _prefs.getIntPref("maxUsedThemes");
-    }
-    catch (e) {
+    } catch (e) {
       this._maxUsedThemes = DEFAULT_MAX_USED_THEMES_COUNT;
     }
     return this._maxUsedThemes;
   },
 
   set(val) {
     delete this._maxUsedThemes;
     return this._maxUsedThemes = val;
@@ -365,36 +364,33 @@ this.LightweightThemeManager = {
       let next = Services.prefs.getCharPref(PREF_LWTHEME_TO_SELECT);
       if (id == next && aPendingRestart)
         return;
 
       Services.prefs.clearUserPref(PREF_LWTHEME_TO_SELECT);
       if (next) {
         AddonManagerPrivate.callAddonListeners("onOperationCancelled",
                                                new AddonWrapper(this.getUsedTheme(next)));
-      }
-      else if (id == current.id) {
+      } else if (id == current.id) {
         AddonManagerPrivate.callAddonListeners("onOperationCancelled",
                                                new AddonWrapper(current));
         return;
       }
-    }
-    catch (e) {
+    } catch (e) {
     }
 
     if (current) {
       if (current.id == id)
         return;
       _themeIDBeingDisabled = current.id;
       let wrapper = new AddonWrapper(current);
       if (aPendingRestart) {
         Services.prefs.setCharPref(PREF_LWTHEME_TO_SELECT, "");
         AddonManagerPrivate.callAddonListeners("onDisabling", wrapper, true);
-      }
-      else {
+      } else {
         AddonManagerPrivate.callAddonListeners("onDisabling", wrapper, false);
         this.themeChanged(null);
         AddonManagerPrivate.callAddonListeners("onDisabled", wrapper);
       }
       _themeIDBeingDisabled = null;
     }
 
     if (id) {
@@ -402,18 +398,17 @@ this.LightweightThemeManager = {
       _themeIDBeingEnabled = id;
       let wrapper = new AddonWrapper(theme);
       if (aPendingRestart) {
         AddonManagerPrivate.callAddonListeners("onEnabling", wrapper, true);
         Services.prefs.setCharPref(PREF_LWTHEME_TO_SELECT, id);
 
         // Flush the preferences to disk so they survive any crash
         Services.prefs.savePrefFile(null);
-      }
-      else {
+      } else {
         AddonManagerPrivate.callAddonListeners("onEnabling", wrapper, false);
         this.themeChanged(theme);
         AddonManagerPrivate.callAddonListeners("onEnabled", wrapper);
       }
       _themeIDBeingEnabled = null;
     }
   },
 
@@ -514,18 +509,17 @@ AddonWrapper.prototype = {
 
   get operationsRequiringRestart() {
     // If a non-default theme is in use then a restart will be required to
     // enable lightweight themes unless dynamic theme switching is enabled
     if (Services.prefs.prefHasUserValue(PREF_GENERAL_SKINS_SELECTEDSKIN)) {
       try {
         if (Services.prefs.getBoolPref(PREF_EM_DSS_ENABLED))
           return AddonManager.OP_NEEDS_RESTART_NONE;
-      }
-      catch (e) {
+      } catch (e) {
       }
       return AddonManager.OP_NEEDS_RESTART_ENABLE;
     }
 
     return AddonManager.OP_NEEDS_RESTART_NONE;
   },
 
   get size() {
@@ -552,18 +546,17 @@ AddonWrapper.prototype = {
     if (_themeIDBeingEnabled == id)
       return false;
     if (_themeIDBeingDisabled == id)
       return true;
 
     try {
       let toSelect = Services.prefs.getCharPref(PREF_LWTHEME_TO_SELECT);
       return id != toSelect;
-    }
-    catch (e) {
+    } catch (e) {
       let current = LightweightThemeManager.currentTheme;
       return !current || current.id != id;
     }
   },
 
   set userDisabled(val) {
     if (val == this.userDisabled)
       return val;
@@ -735,18 +728,17 @@ function _sanitizeTheme(aData, aBaseURI,
     if (!/URL$/.test(prop))
       return val;
 
     try {
       val = _makeURI(val, aBaseURI ? _makeURI(aBaseURI) : null).spec;
       if ((prop == "updateURL" ? /^https:/ : resourceProtocolExp).test(val))
         return val;
       return null;
-    }
-    catch (e) {
+    } catch (e) {
       return null;
     }
   }
 
   let result = {};
   for (let mandatoryProperty of MANDATORY) {
     let val = sanitizeProperty(mandatoryProperty);
     if (!val)
@@ -813,18 +805,17 @@ var _previewTimerCallback = {
 /**
  * Called when any of the lightweightThemes preferences are changed.
  */
 function _prefObserver(aSubject, aTopic, aData) {
   switch (aData) {
     case "maxUsedThemes":
       try {
         _maxUsedThemes = _prefs.getIntPref(aData);
-      }
-      catch (e) {
+      } catch (e) {
         _maxUsedThemes = DEFAULT_MAX_USED_THEMES_COUNT;
       }
       // Update the theme list to remove any themes over the number we keep
       _updateUsedThemes(LightweightThemeManager.usedThemes);
       break;
   }
 }
 
--- a/toolkit/mozapps/extensions/addonManager.js
+++ b/toolkit/mozapps/extensions/addonManager.js
@@ -107,18 +107,17 @@ amManager.prototype = {
         AddonManager.installAddonsFromWebpage(aMimetype, aBrowser, aInstallingPrincipal, installs);
         return;
       }
       let uri = aUris.shift();
       AddonManager.getInstallForURL(uri, function(aInstall) {
         function callCallback(aUri, aStatus) {
           try {
             aCallback.onInstallEnded(aUri, aStatus);
-          }
-          catch (e) {
+          } catch (e) {
             Components.utils.reportError(e);
           }
         }
 
         if (aInstall) {
           installs.push(aInstall);
           if (aCallback) {
             aInstall.addListener({
@@ -137,18 +136,17 @@ amManager.prototype = {
                 callCallback(uri, EXECUTION_ERROR);
               },
 
               onInstallEnded(aInstall, aStatus) {
                 callCallback(uri, SUCCESS);
               }
             });
           }
-        }
-        else if (aCallback) {
+        } else if (aCallback) {
           aCallback.onInstallEnded(uri, UNSUPPORTED_TYPE);
         }
         buildNextInstall();
       }, aMimetype, aHashes.shift(), aNames.shift(), aIcons.shift(), null, aBrowser);
     }
     buildNextInstall();
 
     return retval;
@@ -236,18 +234,17 @@ amManager.prototype = {
             callbackID: payload.callbackID,
             reject: value
           });
         }
 
         let API = AddonManager.webAPI;
         if (payload.type in API) {
           API[payload.type](aMessage.target, ...payload.args).then(resolve, reject);
-        }
-        else {
+        } else {
           reject("Unknown Add-on API request.");
         }
         break;
       }
 
       case MSG_INSTALL_CLEANUP: {
         AddonManager.webAPI.clearInstalls(payload.ids);
         break;
--- a/toolkit/mozapps/extensions/amInstallTrigger.js
+++ b/toolkit/mozapps/extensions/amInstallTrigger.js
@@ -23,18 +23,17 @@ log.level = Log.Level[Preferences.get("e
 
 function CallbackObject(id, callback, urls, mediator) {
   this.id = id;
   this.callback = callback;
   this.urls = new Set(urls);
   this.callCallback = function(url, status) {
     try {
       this.callback(url, status);
-    }
-    catch (e) {
+    } catch (e) {
       log.warn("InstallTrigger callback threw an exception: " + e);
     }
 
     this.urls.delete(url);
     if (this.urls.size == 0)
       mediator._callbacks.delete(id);
   };
 }
@@ -219,18 +218,17 @@ InstallTrigger.prototype = {
 
   _checkLoadURIFromScript(uri) {
     let secman = Services.scriptSecurityManager;
     try {
       secman.checkLoadURIWithPrincipal(this._principal,
                                        uri,
                                        secman.DISALLOW_INHERIT_PRINCIPAL);
       return true;
-    }
-    catch (e) {
+    } catch (e) {
       return false;
     }
   },
 
   classID: Components.ID("{9df8ef2b-94da-45c9-ab9f-132eb55fddf1}"),
   contractID: "@mozilla.org/addons/installtrigger;1",
   QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports, Ci.nsIDOMGlobalPropertyInitializer])
 };
--- a/toolkit/mozapps/extensions/amWebInstallListener.js
+++ b/toolkit/mozapps/extensions/amWebInstallListener.js
@@ -147,18 +147,17 @@ Installer.prototype = {
     // Check for a custom installation prompt that may be provided by the
     // applicaton
     if ("@mozilla.org/addons/web-install-prompt;1" in Cc) {
       try {
         let prompt = Cc["@mozilla.org/addons/web-install-prompt;1"].
                      getService(Ci.amIWebInstallPrompt);
         prompt.confirm(this.browser, this.url, this.downloads, this.downloads.length);
         return;
-      }
-      catch (e) {}
+      } catch (e) {}
     }
 
     if (Preferences.get("xpinstall.customConfirmationUI", false)) {
       notifyObservers("addon-install-confirmation", this.browser, this.url, this.downloads);
       return;
     }
 
     let args = {};
--- a/toolkit/mozapps/extensions/content/blocklist.js
+++ b/toolkit/mozapps/extensions/content/blocklist.js
@@ -32,36 +32,34 @@ function init() {
   for (let listItem of list) {
     let item = document.createElement("richlistitem");
     item.setAttribute("name", listItem.name);
     item.setAttribute("version", listItem.version);
     item.setAttribute("icon", listItem.icon);
     if (listItem.blocked) {
       item.setAttribute("class", "hardBlockedAddon");
       hasHardBlocks = true;
-    }
-    else {
+    } else {
       item.setAttribute("class", "softBlockedAddon");
       hasSoftBlocks = true;
     }
     richlist.appendChild(item);
   }
 
   if (hasHardBlocks && hasSoftBlocks)
     document.getElementById("bothMessage").hidden = false;
   else if (hasHardBlocks)
     document.getElementById("hardBlockMessage").hidden = false;
   else
     document.getElementById("softBlockMessage").hidden = false;
 
   var link = document.getElementById("moreInfo");
   if (list.length == 1 && list[0].url) {
     link.setAttribute("href", list[0].url);
-  }
-  else {
+  } else {
     var url = Services.urlFormatter.formatURLPref("extensions.blocklist.detailsURL");
     link.setAttribute("href", url);
   }
 }
 
 function finish(shouldRestartNow) {
   gArgs.restart = shouldRestartNow;
   var list = gArgs.list;
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -484,18 +484,17 @@ var FakeHistory = {
 };
 
 // If the window has a session history then use the HTML5 History wrapper
 // otherwise use our fake history implementation
 if (window.QueryInterface(Ci.nsIInterfaceRequestor)
           .getInterface(Ci.nsIWebNavigation)
           .sessionHistory) {
   var gHistory = HTML5History;
-}
-else {
+} else {
   gHistory = FakeHistory;
 }
 
 var gEventManager = {
   _listeners: {},
   _installListeners: [],
 
   initialize() {
@@ -561,18 +560,17 @@ var gEventManager = {
 
       let tiptext = addonItem.getAttribute("name");
 
       if (addonItem.mAddon) {
         if (shouldShowVersionNumber(addonItem.mAddon)) {
           tiptext += " " + (addonItem.hasAttribute("upgrade") ? addonItem.mManualUpdate.version
                                                               : addonItem.mAddon.version);
         }
-      }
-      else if (shouldShowVersionNumber(addonItem.mInstall)) {
+      } else if (shouldShowVersionNumber(addonItem.mInstall)) {
         tiptext += " " + addonItem.mInstall.version;
       }
 
       addonTooltip.label = tiptext;
     }, false);
   },
 
   shutdown() {
@@ -750,18 +748,17 @@ var gViewController = {
 
     window.controllers.removeController(this);
   },
 
   updateState(state) {
     try {
       this.loadViewInternal(state.view, state.previousView, state);
       this.lastHistoryIndex = gHistory.index;
-    }
-    catch (e) {
+    } catch (e) {
       // The attempt to load the view failed, try moving further along history
       if (this.lastHistoryIndex > gHistory.index) {
         if (gHistory.canGoBack)
           gHistory.back();
         else
           gViewController.replaceView(gViewDefault);
       } else if (gHistory.canGoForward) {
         gHistory.forward();
@@ -938,17 +935,17 @@ var gViewController = {
                          createInstance(Ci.nsISupportsPRBool);
         Services.obs.notifyObservers(cancelQuit, "quit-application-requested",
                                      "restart");
         if (cancelQuit.data)
           return; // somebody canceled our quit request
 
         let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].
                          getService(Ci.nsIAppStartup);
-        appStartup.quit(Ci.nsIAppStartup.eAttemptQuit |  Ci.nsIAppStartup.eRestart);
+        appStartup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
       }
     },
 
     cmd_enableCheckCompatibility: {
       isEnabled() {
         return true;
       },
       doCommand() {
@@ -1920,18 +1917,17 @@ var gCategories = {
 
     var aViewId = "addons://" + aType.viewType + "/" + aType.id;
 
     var startHidden = false;
     if (aType.flags & AddonManager.TYPE_UI_HIDE_EMPTY) {
       var prefName = PREF_UI_TYPE_HIDDEN.replace("%TYPE%", aType.id);
       try {
         startHidden = Services.prefs.getBoolPref(prefName);
-      }
-      catch (e) {
+      } catch (e) {
         // Default to hidden
         startHidden = true;
       }
 
       gPendingInitializations++;
       getAddonsAndInstalls(aType.id, (aAddonsList, aInstallsList) => {
         var hidden = (aAddonsList.length == 0 && aInstallsList.length == 0);
         var item = this.get(aViewId);
@@ -2206,18 +2202,17 @@ var gDiscoverView = {
 
       setURL(url + "#" + JSON.stringify(list));
     });
   },
 
   destroy() {
     try {
       this._browser.removeProgressListener(this);
-    }
-    catch (e) {
+    } catch (e) {
       // Ignore the case when the listener wasn't already registered
     }
   },
 
   show(aParam, aRequest, aState, aIsRefresh) {
     gViewController.updateCommands();
 
     // If we're being told to load a specific URL then just do that
--- a/toolkit/mozapps/extensions/content/list.js
+++ b/toolkit/mozapps/extensions/content/list.js
@@ -55,42 +55,39 @@ function init() {
     var args = window.arguments[0];
     var softblocked = args.GetInt(0) == 1 ? true : false;
 
     var extensionsBundle = document.getElementById("extensionsBundle");
     try {
       var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
                                 .getService(Components.interfaces.nsIURLFormatter);
       var url = formatter.formatURLPref("extensions.blocklist.detailsURL");
-    }
-    catch (e) { }
+    } catch (e) { }
 
     var params = {
       moreInfoURL: url,
     };
 
     if (softblocked) {
       params.title = extensionsBundle.getString("softBlockedInstallTitle");
       params.message1 = extensionsBundle.getFormattedString("softBlockedInstallMsg",
                                                            [args.GetString(0)]);
       var accept = de.getButton("accept");
       accept.label = extensionsBundle.getString("softBlockedInstallAcceptLabel");
       accept.accessKey = extensionsBundle.getString("softBlockedInstallAcceptKey");
       de.getButton("cancel").focus();
       document.addEventListener("dialogaccept", allowInstall, false);
-    }
-    else {
+    } else {
       params.title = extensionsBundle.getString("blocklistedInstallTitle2");
       params.message1 = extensionsBundle.getFormattedString("blocklistedInstallMsg2",
                                                            [args.GetString(0)]);
       de.buttons = "accept";
       de.getButton("accept").focus();
     }
-  }
-  else {
+  } else {
     items = window.arguments[0];
     params = window.arguments[1];
   }
 
   var addons = document.getElementById("addonsChildren");
   if (items.length > 0)
     document.getElementById("addonsTree").hidden = false;
 
--- a/toolkit/mozapps/extensions/content/newaddon.js
+++ b/toolkit/mozapps/extensions/content/newaddon.js
@@ -79,18 +79,17 @@ function initialize() {
       locationLabel.setAttribute("tooltiptext", location);
     } else {
       document.getElementById("location").hidden = true;
     }
 
     // Only mark the add-on as seen if the page actually gets focus
     if (document.hasFocus()) {
       aAddon.markAsSeen();
-    }
-    else {
+    } else {
       document.addEventListener("focus", () => aAddon.markAsSeen(), false);
     }
 
     var event = document.createEvent("Events");
     event.initEvent("AddonDisplayed", true, true);
     document.dispatchEvent(event);
   });
 }
@@ -122,17 +121,17 @@ function restartClicked() {
                                "restart");
   if (cancelQuit.data)
     return; // somebody canceled our quit request
 
   window.close();
 
   let appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"].
                    getService(Components.interfaces.nsIAppStartup);
-  appStartup.quit(Ci.nsIAppStartup.eAttemptQuit |  Ci.nsIAppStartup.eRestart);
+  appStartup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
 }
 
 function cancelClicked() {
   gAddon.userDisabled = true;
   AddonManager.addAddonListener(EnableListener);
 
   document.getElementById("allow").disabled = false;
   document.getElementById("buttonDeck").selectedPanel = document.getElementById("continuePanel");
--- a/toolkit/mozapps/extensions/content/setting.xml
+++ b/toolkit/mozapps/extensions/content/setting.xml
@@ -60,18 +60,17 @@
             if (!body)
               return;
 
             try {
               let event = document.createEvent("Events");
               event.initEvent(eventName, true, true);
               let f = new Function("event", body);
               f.call(this, event);
-            }
-            catch (e) {
+            } catch (e) {
               Cu.reportError(e);
             }
           ]]>
         </body>
       </method>
 
       <method name="valueFromPreference">
         <body>
--- a/toolkit/mozapps/extensions/content/update.js
+++ b/toolkit/mozapps/extensions/content/update.js
@@ -48,88 +48,78 @@ var gUpdateWizard = {
   // metadata checks, and upgraded.
   disabled: 0,
   metadataEnabled: 0,
   metadataDisabled: 0,
   upgraded: 0,
   upgradeFailed: 0,
   upgradeDeclined: 0,
 
-  init()
-  {
+  init() {
     logger = Log.repository.getLogger("addons.update-dialog");
     // XXX could we pass the addons themselves rather than the IDs?
     this.affectedAddonIDs = new Set(window.arguments[0]);
 
     try {
       this.shouldSuggestAutoChecking =
         !Services.prefs.getBoolPref(PREF_UPDATE_EXTENSIONS_ENABLED);
-    }
-    catch (e) {
+    } catch (e) {
     }
 
     try {
       this.xpinstallEnabled = Services.prefs.getBoolPref(PREF_XPINSTALL_ENABLED);
       this.xpinstallLocked = Services.prefs.prefIsLocked(PREF_XPINSTALL_ENABLED);
-    }
-    catch (e) {
+    } catch (e) {
     }
 
     if (Services.io.offline)
       document.documentElement.currentPage = document.getElementById("offline");
     else
       document.documentElement.currentPage = document.getElementById("versioninfo");
   },
 
-  onWizardFinish: function gUpdateWizard_onWizardFinish()
-  {
+  onWizardFinish: function gUpdateWizard_onWizardFinish() {
     if (this.shouldSuggestAutoChecking)
       Services.prefs.setBoolPref(PREF_UPDATE_EXTENSIONS_ENABLED, this.shouldAutoCheck);
   },
 
-  _setUpButton(aButtonID, aButtonKey, aDisabled)
-  {
+  _setUpButton(aButtonID, aButtonKey, aDisabled) {
     var strings = document.getElementById("updateStrings");
     var button = document.documentElement.getButton(aButtonID);
     if (aButtonKey) {
       button.label = strings.getString(aButtonKey);
       try {
         button.setAttribute("accesskey", strings.getString(aButtonKey + "Accesskey"));
-      }
-      catch (e) {
+      } catch (e) {
       }
     }
     button.disabled = aDisabled;
   },
 
   setButtonLabels(aBackButton, aBackButtonIsDisabled,
                              aNextButton, aNextButtonIsDisabled,
-                             aCancelButton, aCancelButtonIsDisabled)
-  {
+                             aCancelButton, aCancelButtonIsDisabled) {
     this._setUpButton("back", aBackButton, aBackButtonIsDisabled);
     this._setUpButton("next", aNextButton, aNextButtonIsDisabled);
     this._setUpButton("cancel", aCancelButton, aCancelButtonIsDisabled);
   },
 
   // Update Errors
   errorItems: [],
 
-  checkForErrors(aElementIDToShow)
-  {
+  checkForErrors(aElementIDToShow) {
     if (this.errorItems.length > 0)
       document.getElementById(aElementIDToShow).hidden = false;
   },
 
-  onWizardClose(aEvent)
-  {
+  onWizardClose(aEvent) {
     return this.onWizardCancel();
   },
 
-  onWizardCancel()
-  {
+  onWizardCancel() {
     gUpdateWizard.shuttingDown = true;
     // Allow add-ons to continue downloading and installing
     // in the background, though some may require a later restart
     // Pages that are waiting for user input go into the background
     // on cancel
     if (gMismatchPage.waiting) {
       logger.info("Dialog closed in mismatch page");
       if (gUpdateWizard.addonInstalls.size > 0) {
@@ -138,33 +128,30 @@ var gUpdateWizard = {
       }
       return true;
     }
 
     // Pages that do asynchronous things will just keep running and check
     // gUpdateWizard.shuttingDown to trigger background behaviour
     if (!gInstallingPage.installing) {
       logger.info("Dialog closed while waiting for updated compatibility information");
-    }
-    else {
+    } else {
       logger.info("Dialog closed while downloading and installing updates");
     }
     return true;
   }
 };
 
 var gOfflinePage = {
-  onPageAdvanced()
-  {
+  onPageAdvanced() {
     Services.io.offline = false;
     return true;
   },
 
-  toggleOffline()
-  {
+  toggleOffline() {
     var nextbtn = document.documentElement.getButton("next");
     nextbtn.disabled = !nextbtn.disabled;
   }
 }
 
 // Addon listener to count addons enabled/disabled by metadata checks
 var listener = {
   onDisabled(aAddon) {
@@ -240,18 +227,17 @@ var gVersionInfoPage = {
     // Filter out any add-ons that are now enabled.
     let addonList = gUpdateWizard.addons.map(a => a.id + ":" + a.appDisabled);
     logger.debug("VersionInfo updates finished: found " + addonList.toSource());
     let filteredAddons = [];
     for (let a of gUpdateWizard.addons) {
       if (a.appDisabled) {
         logger.debug("Continuing with add-on " + a.id);
         filteredAddons.push(a);
-      }
-      else if (gUpdateWizard.addonInstalls.has(a.id)) {
+      } else if (gUpdateWizard.addonInstalls.has(a.id)) {
         gUpdateWizard.addonInstalls.get(a.id).cancel();
         gUpdateWizard.addonInstalls.delete(a.id);
       }
     }
     gUpdateWizard.addons = filteredAddons;
 
     if (gUpdateWizard.shuttingDown) {
       // jump directly to updating auto-update add-ons in the background
@@ -263,18 +249,17 @@ var gVersionInfoPage = {
     }
 
     if (filteredAddons.length > 0) {
       if (!gUpdateWizard.xpinstallEnabled && gUpdateWizard.xpinstallLocked) {
         document.documentElement.currentPage = document.getElementById("adminDisabled");
         return;
       }
       document.documentElement.currentPage = document.getElementById("mismatch");
-    }
-    else {
+    } else {
       logger.info("VersionInfo: No updates require further action");
       // VersionInfo compatibility updates resolved all compatibility problems,
       // close this window and continue starting the application...
       // XXX Bug 314754 - We need to use setTimeout to close the window due to
       // the EM using xmlHttpRequest when checking for updates.
       setTimeout(close, 0);
     }
   },
@@ -282,18 +267,17 @@ var gVersionInfoPage = {
   // UpdateListener
   onUpdateFinished(aAddon, status) {
     ++this._completeCount;
 
     if (status != AddonManager.UPDATE_STATUS_NO_ERROR) {
       logger.debug("VersionInfo update " + this._completeCount + " of " + this._totalCount +
            " failed for " + aAddon.id + ": " + status);
       gUpdateWizard.errorItems.push(aAddon);
-    }
-    else {
+    } else {
       logger.debug("VersionInfo update " + this._completeCount + " of " + this._totalCount +
            " finished for " + aAddon.id);
     }
 
     // If we're not in the background, just make a list of add-ons that have
     // updates available
     if (!gUpdateWizard.shuttingDown) {
       // If we're still in the update check window and the add-on is now active
@@ -323,18 +307,17 @@ var gVersionInfoPage = {
     logger.debug("VersionInfo got an install for " + aAddon.id + ": " + aAddon.version);
     gUpdateWizard.addonInstalls.set(aAddon.id, aInstall);
   },
 };
 
 var gMismatchPage = {
   waiting: false,
 
-  onPageShow()
-  {
+  onPageShow() {
     gMismatchPage.waiting = true;
     gUpdateWizard.setButtonLabels(null, true,
                                   "mismatchCheckNow", false,
                                   "mismatchDontCheck", false);
     document.documentElement.getButton("next").focus();
 
     var incompatible = document.getElementById("mismatch.incompatible");
     for (let addon of gUpdateWizard.addons) {
@@ -343,18 +326,17 @@ var gMismatchPage = {
       incompatible.appendChild(listitem);
     }
   }
 };
 
 var gUpdatePage = {
   _totalCount: 0,
   _completeCount: 0,
-  onPageShow()
-  {
+  onPageShow() {
     gMismatchPage.waiting = false;
     gUpdateWizard.setButtonLabels(null, true,
                                   "nextButtonText", true,
                                   "cancelButtonText", false);
     document.documentElement.getButton("next").focus();
 
     gUpdateWizard.errorItems = [];
 
@@ -401,53 +383,49 @@ var gUpdatePage = {
     }
 
     if (this._completeCount == this._totalCount)
       this.onAllUpdatesFinished()
   },
 };
 
 var gFoundPage = {
-  onPageShow()
-  {
+  onPageShow() {
     gUpdateWizard.setButtonLabels(null, true,
                                   "installButtonText", false,
                                   null, false);
 
     var foundUpdates = document.getElementById("found.updates");
     for (let install of gUpdateWizard.addonsToUpdate) {
       let listItem = foundUpdates.appendItem(install.name + " " + install.version);
       listItem.setAttribute("type", "checkbox");
       listItem.setAttribute("checked", "true");
       listItem.install = install;
     }
 
     if (!gUpdateWizard.xpinstallEnabled) {
       document.getElementById("xpinstallDisabledAlert").hidden = false;
       document.getElementById("enableXPInstall").focus();
       document.documentElement.getButton("next").disabled = true;
-    }
-    else {
+    } else {
       document.documentElement.getButton("next").focus();
       document.documentElement.getButton("next").disabled = false;
     }
   },
 
-  toggleXPInstallEnable(aEvent)
-  {
+  toggleXPInstallEnable(aEvent) {
     var enabled = aEvent.target.checked;
     gUpdateWizard.xpinstallEnabled = enabled;
     var pref = Components.classes["@mozilla.org/preferences-service;1"]
                          .getService(Components.interfaces.nsIPrefBranch);
     pref.setBoolPref(PREF_XPINSTALL_ENABLED, enabled);
     this.updateNextButton();
   },
 
-  updateNextButton()
-  {
+  updateNextButton() {
     if (!gUpdateWizard.xpinstallEnabled) {
       document.documentElement.getButton("next").disabled = true;
       return;
     }
 
     var oneChecked = false;
     var foundUpdates = document.getElementById("found.updates");
     var updates = foundUpdates.getElementsByTagName("listitem");
@@ -483,18 +461,17 @@ var gInstallingPage = {
     let installs = Array.from(aInstallList).map(a => a.existingAddon.id);
     logger.debug("Start installs for " + installs.toSource());
     this._errors = [];
     this._installs = aInstallList;
     this._installing = true;
     this.startNextInstall();
   },
 
-  onPageShow()
-  {
+  onPageShow() {
     gUpdateWizard.setButtonLabels(null, true,
                                   "nextButtonText", true,
                                   null, true);
 
     var foundUpdates = document.getElementById("found.updates");
     var updates = foundUpdates.getElementsByTagName("listitem");
     let toInstall = [];
     for (let update of updates) {
@@ -603,62 +580,56 @@ var gInstallingPage = {
     this._errors.push(aInstall);
 
     gUpdateWizard.upgradeFailed++;
     this.startNextInstall();
   }
 };
 
 var gInstallErrorsPage = {
-  onPageShow()
-  {
+  onPageShow() {
     gUpdateWizard.setButtonLabels(null, true, null, true, null, true);
     document.documentElement.getButton("finish").focus();
   },
 };
 
 // Displayed when there are incompatible add-ons and the xpinstall.enabled
 // pref is false and locked.
 var gAdminDisabledPage = {
-  onPageShow()
-  {
+  onPageShow() {
     gUpdateWizard.setButtonLabels(null, true, null, true,
                                   "cancelButtonText", true);
     document.documentElement.getButton("finish").focus();
   }
 };
 
 // Displayed when selected add-on updates have been installed without error.
 // There can still be add-ons that are not compatible and don't have an update.
 var gFinishedPage = {
-  onPageShow()
-  {
+  onPageShow() {
     gUpdateWizard.setButtonLabels(null, true, null, true, null, true);
     document.documentElement.getButton("finish").focus();
 
     if (gUpdateWizard.shouldSuggestAutoChecking) {
       document.getElementById("finishedCheckDisabled").hidden = false;
       gUpdateWizard.shouldAutoCheck = true;
-    }
-    else
+    } else
       document.getElementById("finishedCheckEnabled").hidden = false;
 
     document.documentElement.getButton("finish").focus();
   }
 };
 
 // Displayed when there are incompatible add-ons and there are no available
 // updates.
 var gNoUpdatesPage = {
-  onPageShow(aEvent)
-  {
+  onPageShow(aEvent) {
     gUpdateWizard.setButtonLabels(null, true, null, true, null, true);
     if (gUpdateWizard.shouldSuggestAutoChecking) {
       document.getElementById("noupdatesCheckDisabled").hidden = false;
       gUpdateWizard.shouldAutoCheck = true;
-    }
-    else
+    } else
       document.getElementById("noupdatesCheckEnabled").hidden = false;
 
     gUpdateWizard.checkForErrors("updateCheckErrorNotFound");
     document.documentElement.getButton("finish").focus();
   }
 };
--- a/toolkit/mozapps/extensions/content/xpinstallConfirm.js
+++ b/toolkit/mozapps/extensions/content/xpinstallConfirm.js
@@ -1,18 +1,17 @@
 // -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
 
 /* 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/. */
 
 var XPInstallConfirm = {};
 
-XPInstallConfirm.init = function()
-{
+XPInstallConfirm.init = function() {
   Components.utils.import("resource://gre/modules/AddonManager.jsm");
 
   var _installCountdown;
   var _installCountdownInterval;
   var _focused;
   var _timeout;
 
   // Default to cancelling the install when the window unloads
@@ -58,18 +57,17 @@ XPInstallConfirm.init = function()
     var icon = install.iconURL;
     if (icon)
       installItem.icon = icon;
     var type = install.type;
     if (type)
       installItem.type = type;
     if (install.certName) {
       installItem.cert = bundle.getFormattedString("signed", [install.certName]);
-    }
-    else {
+    } else {
       installItem.cert = bundle.getString("unverified");
     }
     installItem.signed = install.certName ? "true" : "false";
 
     installMap.set(install, installItem);
     install.addListener(installListener);
   }
 
@@ -87,18 +85,17 @@ XPInstallConfirm.init = function()
 
   function okButtonCountdown() {
     _installCountdown -= 1;
 
     if (_installCountdown < 1) {
       okButton.label = bundle.getString("installButtonLabel");
       okButton.disabled = false;
       clearInterval(_installCountdownInterval);
-    }
-    else
+    } else
       okButton.label = bundle.getFormattedString("installButtonDisabledLabel", [_installCountdown]);
   }
 
   function myfocus() {
     // Clear the timeout if it exists so only the last one will be used.
     if (_timeout)
       clearTimeout(_timeout);
 
@@ -150,47 +147,43 @@ XPInstallConfirm.init = function()
     for (let install of args.installs)
       install.removeListener(installListener);
 
     // Now perform the desired action - either install the
     // addons or cancel the installations
     if (XPInstallConfirm._installOK) {
       for (let install of args.installs)
         install.install();
-    }
-    else {
+    } else {
       for (let install of args.installs) {
         if (install.state != AddonManager.STATE_CANCELLED)
           install.cancel();
       }
     }
   }
 
   window.addEventListener("unload", myUnload, false);
 
   if (_installCountdownLength > 0) {
     document.addEventListener("focus", myfocus, true);
     document.addEventListener("blur", myblur, true);
 
     okButton.disabled = true;
     setWidgetsAfterFocus();
-  }
-  else
+  } else
     okButton.label = bundle.getString("installButtonLabel");
 }
 
-XPInstallConfirm.onOK = function()
-{
+XPInstallConfirm.onOK = function() {
   Components.classes["@mozilla.org/base/telemetry;1"].
     getService(Components.interfaces.nsITelemetry).
     getHistogramById("SECURITY_UI").
     add(Components.interfaces.nsISecurityUITelemetry.WARNING_CONFIRM_ADDON_INSTALL_CLICK_THROUGH);
   // Perform the install or cancel after the window has unloaded
   XPInstallConfirm._installOK = true;
   return true;
 }
 
-XPInstallConfirm.onCancel = function()
-{
+XPInstallConfirm.onCancel = function() {
   // Perform the install or cancel after the window has unloaded
   XPInstallConfirm._installOK = false;
   return true;
 }
--- a/toolkit/mozapps/extensions/internal/AddonLogging.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonLogging.jsm
@@ -60,18 +60,17 @@ function getStackDetails(aException) {
       }
     }
 
     let stackFrame = Components.stack.caller.caller.caller;
     return {
       sourceName: stackFrame.filename,
       lineNumber: stackFrame.lineNumber
     };
-  }
-  catch (e) {
+  } catch (e) {
     return {
       sourceName: null,
       lineNumber: 0
     };
   }
 }
 
 function AddonLogger(aName) {
@@ -115,18 +114,17 @@ AddonLogger.prototype = {
       stream.init(logfile, 0x02 | 0x08 | 0x10, LOGGER_FILE_PERM, 0); // write, create, append
       var writer = Cc["@mozilla.org/intl/converter-output-stream;1"].
                    createInstance(Ci.nsIConverterOutputStream);
       writer.init(stream, "UTF-8", 0, 0x0000);
       writer.writeString(formatTimestamp(tstamp) + " " +
                          message + " at " + stack.sourceName + ":" +
                          stack.lineNumber + "\n");
       writer.close();
-    }
-    catch (e) { }
+    } catch (e) { }
   },
 
   warn(aStr, aException) {
     let message = formatLogMessage("warn", this.name, aStr, aException);
 
     let stack = getStackDetails(aException);
 
     let consoleMessage = Cc["@mozilla.org/scripterror;1"].
@@ -172,21 +170,19 @@ var PrefObserver = {
     Services.obs.addObserver(this, "xpcom-shutdown", false);
     this.observe(null, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, PREF_LOGGING_ENABLED);
   },
 
   observe(aSubject, aTopic, aData) {
     if (aTopic == "xpcom-shutdown") {
       Services.prefs.removeObserver(PREF_LOGGING_ENABLED, this);
       Services.obs.removeObserver(this, "xpcom-shutdown");
-    }
-    else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) {
+    } else if (aTopic == NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) {
       try {
         gDebugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED);
-      }
-      catch (e) {
+      } catch (e) {
         gDebugLogEnabled = false;
       }
     }
   }
 };
 
 PrefObserver.init();
--- a/toolkit/mozapps/extensions/internal/AddonRepository.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonRepository.jsm
@@ -804,17 +804,17 @@ this.AddonRepository = {
                                            startupInfo.process;
           }
         }
       }
     }
 
     let url = this._formatURLPref(pref, params);
 
-    let  handleResults = (aElements, aTotalResults, aCompatData) => {
+    let handleResults = (aElements, aTotalResults, aCompatData) => {
       // Don't use this._parseAddons() so that, for example,
       // incompatible add-ons are not filtered out
       let results = [];
       for (let i = 0; i < aElements.length && results.length < this._maxResults; i++) {
         let result = this._parseAddon(aElements[i], null, aCompatData);
         if (result == null)
           continue;
 
@@ -1316,18 +1316,17 @@ this.AddonRepository = {
         if (pendingResults == 0)
           this._reportSuccess(results, aTotalResults);
       }
 
       if (result.xpiURL) {
         AddonManager.getInstallForURL(result.xpiURL, callback,
                                       "application/x-xpinstall", result.xpiHash,
                                       addon.name, addon.icons, addon.version);
-      }
-      else {
+      } else {
         callback(null);
       }
     }
   },
 
   // Parses addon_compatibility nodes, that describe compatibility overrides.
   _parseAddonCompatElement(aResultObj, aElement) {
     let guid = this._getDescendantTextContent(aElement, "guid");
@@ -1813,17 +1812,17 @@ var AddonDatabase = {
           typeof(aObj[expectedProperty]) === "function")
         continue;
 
       let value = aObj[expectedProperty];
 
       try {
         switch (expectedProperty) {
           case "sourceURI":
-            addon.sourceURI = value ? NetUtil.newURI(value) :  null;
+            addon.sourceURI = value ? NetUtil.newURI(value) : null;
             break;
 
           case "creator":
             addon.creator = value
                             ? this._makeDeveloper(value)
                             : null;
             break;
 
--- a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
@@ -141,26 +141,23 @@ RDFSerializer.prototype = {
       var targets = aDs.GetTargets(aResource, arc, true);
       while (targets.hasMoreElements()) {
         var target = targets.getNext();
         if (target instanceof Ci.nsIRDFResource) {
           var item = aIndent + "<em:" + prop + ">\n";
           item += this.serializeResource(aDs, target, aIndent + this.INDENT);
           item += aIndent + "</em:" + prop + ">\n";
           items.push(item);
-        }
-        else if (target instanceof Ci.nsIRDFLiteral) {
+        } else if (target instanceof Ci.nsIRDFLiteral) {
           items.push(aIndent + "<em:" + prop + ">" +
                      this.escapeEntities(target.Value) + "</em:" + prop + ">\n");
-        }
-        else if (target instanceof Ci.nsIRDFInt) {
+        } else if (target instanceof Ci.nsIRDFInt) {
           items.push(aIndent + "<em:" + prop + " NC:parseType=\"Integer\">" +
                      target.Value + "</em:" + prop + ">\n");
-        }
-        else {
+        } else {
           throw Components.Exception("Cannot serialize unknown literal type");
         }
       }
     }
     items.sort();
     result += items.join("");
     return result;
   },
@@ -189,22 +186,20 @@ RDFSerializer.prototype = {
       aIndent = "";
 
     this.resources.push(aResource);
     var container = null;
     var type = "Description";
     if (this.cUtils.IsSeq(aDs, aResource)) {
       type = "Seq";
       container = this.cUtils.MakeSeq(aDs, aResource);
-    }
-    else if (this.cUtils.IsAlt(aDs, aResource)) {
+    } else if (this.cUtils.IsAlt(aDs, aResource)) {
       type = "Alt";
       container = this.cUtils.MakeAlt(aDs, aResource);
-    }
-    else if (this.cUtils.IsBag(aDs, aResource)) {
+    } else if (this.cUtils.IsBag(aDs, aResource)) {
       type = "Bag";
       container = this.cUtils.MakeBag(aDs, aResource);
     }
 
     var result = aIndent + "<RDF:" + type;
     if (!gRDF.IsAnonymousResource(aResource))
       result += " about=\"" + this.escapeEntities(aResource.ValueUTF8) + "\"";
     result += ">\n";
@@ -336,30 +331,28 @@ function parseRDFManifest(aId, aUpdateKe
     let signature = getProperty(ds, addonRes, "signature");
     if (!signature)
       throw Components.Exception("Update manifest for " + aId + " does not contain a required signature");
     let serializer = new RDFSerializer();
     let updateString = null;
 
     try {
       updateString = serializer.serializeResource(ds, addonRes);
-    }
-    catch (e) {
+    } catch (e) {
       throw Components.Exception("Failed to generate signed string for " + aId + ". Serializer threw " + e,
                                  e.result);
     }
 
     let result = false;
 
     try {
       let verifier = Cc["@mozilla.org/security/datasignatureverifier;1"].
                      getService(Ci.nsIDataSignatureVerifier);
       result = verifier.verifyData(updateString, signature, aUpdateKey);
-    }
-    catch (e) {
+    } catch (e) {
       throw Components.Exception("The signature or updateKey for " + aId + " is malformed." +
                                  "Verifier threw " + e, e.result);
     }
 
     if (!result)
       throw Components.Exception("The signature for " + aId + " was not created by the add-on's updateKey");
   }
 
@@ -399,18 +392,17 @@ function parseRDFManifest(aId, aUpdateKe
     while (targetApps.hasMoreElements()) {
       let targetApp = targetApps.getNext().QueryInterface(Ci.nsIRDFResource);
 
       let appEntry = {};
       try {
         appEntry.id = getRequiredProperty(ds, targetApp, "id");
         appEntry.minVersion = getRequiredProperty(ds, targetApp, "minVersion");
         appEntry.maxVersion = getRequiredProperty(ds, targetApp, "maxVersion");
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn(e);
         continue;
       }
 
       let result = {
         id: aId,
         version,
         multiprocessCompatible: getBooleanProperty(ds, item, "multiprocessCompatible"),
@@ -570,18 +562,17 @@ function UpdateParser(aId, aUpdateKey, a
   this.id = aId;
   this.updateKey = aUpdateKey;
   this.observer = aObserver;
   this.url = aUrl;
 
   let requireBuiltIn = true;
   try {
     requireBuiltIn = Services.prefs.getBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS);
-  }
-  catch (e) {
+  } catch (e) {
   }
 
   logger.debug("Requesting " + aUrl);
   try {
     this.request = new ServiceRequest();
     this.request.open("GET", this.url, true);
     this.request.channel.notificationCallbacks = new CertUtils.BadCertHandler(!requireBuiltIn);
     this.request.channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE;
@@ -589,18 +580,17 @@ function UpdateParser(aId, aUpdateKey, a
     this.request.channel.loadFlags |= Ci.nsIRequest.INHIBIT_CACHING;
     this.request.overrideMimeType("text/plain");
     this.request.setRequestHeader("Moz-XPI-Update", "1", true);
     this.request.timeout = TIMEOUT;
     this.request.addEventListener("load", () => this.onLoad(), false);
     this.request.addEventListener("error", () => this.onError(), false);
     this.request.addEventListener("timeout", () => this.onTimeout(), false);
     this.request.send(null);
-  }
-  catch (e) {
+  } catch (e) {
     logger.error("Failed to request update manifest", e);
   }
 }
 
 UpdateParser.prototype = {
   id: null,
   updateKey: null,
   observer: null,
@@ -613,24 +603,22 @@ UpdateParser.prototype = {
   onLoad() {
     let request = this.request;
     this.request = null;
     this._doneAt = new Error("place holder");
 
     let requireBuiltIn = true;
     try {
       requireBuiltIn = Services.prefs.getBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS);
-    }
-    catch (e) {
+    } catch (e) {
     }
 
     try {
       CertUtils.checkCert(request.channel, !requireBuiltIn);
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("Request failed: " + this.url + " - " + e);
       this.notifyError(AddonUpdateChecker.ERROR_DOWNLOAD_ERROR);
       return;
     }
 
     if (!Components.isSuccessCode(request.status)) {
       logger.warn("Request failed: " + this.url + " - " + request.status);
       this.notifyError(AddonUpdateChecker.ERROR_DOWNLOAD_ERROR);
@@ -668,32 +656,29 @@ UpdateParser.prototype = {
       logger.warn("onUpdateCheckComplete failed to determine manifest type");
       this.notifyError(AddonUpdateChecker.ERROR_UNKNOWN_FORMAT);
       return;
     }
 
     let results;
     try {
       results = parser();
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("onUpdateCheckComplete failed to parse update manifest", e);
       this.notifyError(AddonUpdateChecker.ERROR_PARSE_ERROR);
       return;
     }
 
     if ("onUpdateCheckComplete" in this.observer) {
       try {
         this.observer.onUpdateCheckComplete(results);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("onUpdateCheckComplete notification failed", e);
       }
-    }
-    else {
+    } else {
       logger.warn("onUpdateCheckComplete may not properly cancel", new Error("stack marker"));
     }
   },
 
   /**
    * Called when the request times out
    */
   onTimeout() {
@@ -704,48 +689,44 @@ UpdateParser.prototype = {
   },
 
   /**
    * Called when the manifest failed to load.
    */
   onError() {
     if (!Components.isSuccessCode(this.request.status)) {
       logger.warn("Request failed: " + this.url + " - " + this.request.status);
-    }
-    else if (this.request.channel instanceof Ci.nsIHttpChannel) {
+    } else if (this.request.channel instanceof Ci.nsIHttpChannel) {
       try {
         if (this.request.channel.requestSucceeded) {
           logger.warn("Request failed: " + this.url + " - " +
                this.request.channel.responseStatus + ": " +
                this.request.channel.responseStatusText);
         }
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("HTTP Request failed for an unknown reason");
       }
-    }
-    else {
+    } else {
       logger.warn("Request failed for an unknown reason");
     }
 
     this.request = null;
     this._doneAt = new Error("UP_onError");
 
     this.notifyError(AddonUpdateChecker.ERROR_DOWNLOAD_ERROR);
   },
 
   /**
    * Helper method to notify the observer that an error occured.
    */
   notifyError(aStatus) {
     if ("onUpdateCheckError" in this.observer) {
       try {
         this.observer.onUpdateCheckError(aStatus);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("onUpdateCheckError notification failed", e);
       }
     }
   },
 
   /**
    * Called to cancel an in-progress update check.
    */
@@ -854,18 +835,17 @@ this.AddonUpdateChecker = {
     for (let update of aUpdates) {
       if (Services.vc.compare(update.version, aVersion) == 0) {
         if (aIgnoreCompatibility) {
           for (let targetApp of update.targetApplications) {
             let id = targetApp.id;
             if (id == Services.appinfo.ID || id == TOOLKIT_ID)
               return update;
           }
-        }
-        else if (matchesVersions(update, aAppVersion, aPlatformVersion,
+        } else if (matchesVersions(update, aAppVersion, aPlatformVersion,
                                  aIgnoreMaxVersion, aIgnoreStrictCompat)) {
           return update;
         }
       }
     }
     return null;
   },
 
--- a/toolkit/mozapps/extensions/internal/GMPProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/GMPProvider.jsm
@@ -162,18 +162,20 @@ GMPWrapper.prototype = {
   get isGMPlugin() { return true; },
   get name() { return this._plugin.name; },
   get creator() { return null; },
   get homepageURL() { return this._plugin.homepageURL; },
 
   get description() { return this._plugin.description; },
   get fullDescription() { return this._plugin.fullDescription; },
 
-  get version() { return GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, null,
-                                      this._plugin.id); },
+  get version() {
+ return GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, null,
+                                      this._plugin.id);
+},
 
   get isActive() {
     return !this.appDisabled &&
            !this.userDisabled &&
            !GMPUtils.isPluginHidden(this._plugin);
   },
   get appDisabled() {
     if (this._plugin.isEME && !GMPPrefs.get(GMPPrefs.KEY_EME_ENABLED, true)) {
@@ -181,19 +183,21 @@ GMPWrapper.prototype = {
       return true;
     }
     return false;
   },
 
   get userDisabled() {
     return !GMPPrefs.get(GMPPrefs.KEY_PLUGIN_ENABLED, true, this._plugin.id);
   },
-  set userDisabled(aVal) { GMPPrefs.set(GMPPrefs.KEY_PLUGIN_ENABLED,
+  set userDisabled(aVal) {
+ GMPPrefs.set(GMPPrefs.KEY_PLUGIN_ENABLED,
                                         aVal === false,
-                                        this._plugin.id); },
+                                        this._plugin.id);
+},
 
   get blocklistState() { return Ci.nsIBlocklistService.STATE_NOT_BLOCKED; },
   get size() { return 0; },
   get scope() { return AddonManager.SCOPE_APPLICATION; },
   get pendingOperations() { return AddonManager.PENDING_NONE; },
 
   get operationsRequiringRestart() { return AddonManager.OP_NEEDS_RESTART_NONE },
 
--- a/toolkit/mozapps/extensions/internal/PluginProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/PluginProvider.jsm
@@ -200,18 +200,17 @@ var PluginProvider = {
           id: getIDHashForString(tag.name + tag.description),
           name: tag.name,
           description: tag.description,
           tags: [tag]
         };
 
         seenPlugins[tag.name][tag.description] = plugin;
         list[plugin.id] = plugin;
-      }
-      else {
+      } else {
         seenPlugins[tag.name][tag.description].tags.push(tag);
       }
     }
 
     return list;
   },
 
   /**
--- a/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
+++ b/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
@@ -70,18 +70,17 @@ const HASH_CHUNK_SIZE = 8192;
  * @param  request
  *         The XMLHttpRequest.
  * @return an integer status value.
  */
 function getRequestStatus(request) {
   let status = null;
   try {
     status = request.status;
-  }
-  catch (e) {
+  } catch (e) {
   }
 
   if (status != null) {
     return status;
   }
 
   return request.channel.QueryInterface(Ci.nsIRequest).status;
 }
@@ -122,17 +121,17 @@ function downloadXML(url, allowNonBuiltI
     request.setRequestHeader("Cache-Control", "no-cache");
     // HTTP/1.0 servers might not implement Cache-Control and
     // might only implement Pragma: no-cache
     request.setRequestHeader("Pragma", "no-cache");
 
     let fail = (event) => {
       let request = event.target;
       let status = getRequestStatus(request);
-      let message = "Failed downloading XML, status: " + status +  ", reason: " + event.type;
+      let message = "Failed downloading XML, status: " + status + ", reason: " + event.type;
       logger.warn(message);
       let ex = new Error(message);
       ex.status = status;
       reject(ex);
     };
 
     let success = (event) => {
       logger.info("Completed downloading document");
@@ -306,17 +305,17 @@ function downloadFile(url) {
         yield OS.File.writeAtomic(path, new Uint8Array(xhr.response));
         return path;
       }).then(resolve, reject);
     };
 
     let fail = (event) => {
       let request = event.target;
       let status = getRequestStatus(request);
-      let message = "Failed downloading via XHR, status: " + status +  ", reason: " + event.type;
+      let message = "Failed downloading via XHR, status: " + status + ", reason: " + event.type;
       logger.warn(message);
       let ex = new Error(message);
       ex.status = status;
       reject(ex);
     };
     xhr.addEventListener("error", fail);
     xhr.addEventListener("abort", fail);
 
@@ -364,18 +363,17 @@ var computeHash = Task.async(function*(h
 
     let bytes;
     do {
       bytes = yield file.read(HASH_CHUNK_SIZE);
       hasher.update(bytes, bytes.length);
     } while (bytes.length == HASH_CHUNK_SIZE);
 
     return binaryToHex(hasher.finish(false));
-  }
-  finally {
+  } finally {
     yield file.close();
   }
 });
 
 /**
  * Verifies that a downloaded file matches what was expected.
  *
  * @param  properties
@@ -393,17 +391,17 @@ var verifyFile = Task.async(function*(pr
       throw new Error("Downloaded file was " + stat.size + " bytes but expected " + properties.size + " bytes.");
     }
   }
 
   if (properties.hashFunction !== undefined) {
     let expectedDigest = properties.hashValue.toLowerCase();
     let digest = yield computeHash(properties.hashFunction, path);
     if (digest != expectedDigest) {
-      throw new Error("Hash was `" + digest + "` but expected `" + expectedDigest +  "`.");
+      throw new Error("Hash was `" + digest + "` but expected `" + expectedDigest + "`.");
     }
   }
 });
 
 const ProductAddonChecker = {
   /**
    * Downloads a list of add-ons from a URL optionally testing the SSL
    * certificate for certain attributes.
@@ -434,15 +432,14 @@ const ProductAddonChecker = {
    * @return a promise that resolves to the temporary file downloaded or rejects
    *         with a JS exception in case of error.
    */
   downloadAddon: Task.async(function*(addon) {
     let path = yield downloadFile(addon.URL);
     try {
       yield verifyFile(addon, path);
       return path;
-    }
-    catch (e) {
+    } catch (e) {
       yield OS.File.remove(path);
       throw e;
     }
   })
 }
--- a/toolkit/mozapps/extensions/internal/WebExtensionBootstrap.js
+++ b/toolkit/mozapps/extensions/internal/WebExtensionBootstrap.js
@@ -16,26 +16,22 @@ const BOOTSTRAP_REASON_TO_STRING_MAP = {
   3: "ADDON_ENABLE",
   4: "ADDON_DISABLE",
   5: "ADDON_INSTALL",
   6: "ADDON_UNINSTALL",
   7: "ADDON_UPGRADE",
   8: "ADDON_DOWNGRADE",
 }
 
-function install(data, reason)
-{
+function install(data, reason) {
 }
 
-function startup(data, reason)
-{
+function startup(data, reason) {
   extension = new Extension(data, BOOTSTRAP_REASON_TO_STRING_MAP[reason]);
   extension.startup();
 }
 
-function shutdown(data, reason)
-{
+function shutdown(data, reason) {
   extension.shutdown();
 }
 
-function uninstall(data, reason)
-{
+function uninstall(data, reason) {
 }
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -400,18 +400,17 @@ function addonMap(addons) {
  * @param  aFile
  *         The file or directory to operate on.
  * @param  aPermissions
  *         The permisions to set
  */
 function setFilePermissions(aFile, aPermissions) {
   try {
     aFile.permissions = aPermissions;
-  }
-  catch (e) {
+  } catch (e) {
     logger.warn("Failed to set permissions " + aPermissions.toString(8) + " on " +
          aFile.path, e);
   }
 }
 
 /**
  * Write a given string to a file
  *
@@ -427,18 +426,17 @@ function writeStringToFile(file, string)
                   createInstance(Ci.nsIConverterOutputStream);
 
   try {
     stream.init(file, FileUtils.MODE_WRONLY | FileUtils.MODE_CREATE |
                             FileUtils.MODE_TRUNCATE, FileUtils.PERMS_FILE,
                            0);
     converter.init(stream, "UTF-8", 0, 0x0000);
     converter.writeString(string);
-  }
-  finally {
+  } finally {
     converter.close();
     stream.close();
   }
 }
 
 /**
  * A safe way to install a file or the contents of a directory to a new
  * directory. The file or directory is moved or copied recursively and if
@@ -465,22 +463,20 @@ SafeInstallOperation.prototype = {
       if (aCopy) {
         newFile.copyTo(aTargetDirectory, null);
         // copyTo does not update the nsIFile with the new.
         newFile = aTargetDirectory.clone();
         newFile.append(aFile.leafName);
         // Windows roaming profiles won't properly sync directories if a new file
         // has an older lastModifiedTime than a previous file, so update.
         newFile.lastModifiedTime = Date.now();
-      }
-      else {
+      } else {
         newFile.moveTo(aTargetDirectory, null);
       }
-    }
-    catch (e) {
+    } catch (e) {
       logger.error("Failed to " + (aCopy ? "copy" : "move") + " file " + aFile.path +
             " to " + aTargetDirectory.path, e);
       throw e;
     }
     this._installedFiles.push({ oldFile, newFile });
   },
 
   _installDirectory(aDirectory, aTargetDirectory, aCopy) {
@@ -489,84 +485,79 @@ SafeInstallOperation.prototype = {
       logger.error(err);
       throw err;
     }
 
     let newDir = aTargetDirectory.clone();
     newDir.append(aDirectory.leafName);
     try {
       newDir.create(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
-    }
-    catch (e) {
+    } catch (e) {
       logger.error("Failed to create directory " + newDir.path, e);
       throw e;
     }
     this._createdDirs.push(newDir);
 
     // Use a snapshot of the directory contents to avoid possible issues with
     // iterating over a directory while removing files from it (the YAFFS2
     // embedded filesystem has this issue, see bug 772238), and to remove
     // normal files before their resource forks on OSX (see bug 733436).
     let entries = getDirectoryEntries(aDirectory, true);
     for (let entry of entries) {
       try {
         this._installDirEntry(entry, newDir, aCopy);
-      }
-      catch (e) {
+      } catch (e) {
         logger.error("Failed to " + (aCopy ? "copy" : "move") + " entry " +
                      entry.path, e);
         throw e;
       }
     }
 
     // If this is only a copy operation then there is nothing else to do
     if (aCopy)
       return;
 
     // The directory should be empty by this point. If it isn't this will throw
     // and all of the operations will be rolled back
     try {
       setFilePermissions(aDirectory, FileUtils.PERMS_DIRECTORY);
       aDirectory.remove(false);
-    }
-    catch (e) {
+    } catch (e) {
       logger.error("Failed to remove directory " + aDirectory.path, e);
       throw e;
     }
 
     // Note we put the directory move in after all the file moves so the
     // directory is recreated before all the files are moved back
     this._installedFiles.push({ oldFile: aDirectory, newFile: newDir });
   },
 
   _installDirEntry(aDirEntry, aTargetDirectory, aCopy) {
     let isDir = null;
 
     try {
       isDir = aDirEntry.isDirectory() && !aDirEntry.isSymlink();
-    }
-    catch (e) {
+    } catch (e) {
       // If the file has already gone away then don't worry about it, this can
       // happen on OSX where the resource fork is automatically moved with the
       // data fork for the file. See bug 733436.
       if (e.result == Cr.NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)
         return;
 
       logger.error("Failure " + (aCopy ? "copying" : "moving") + " " + aDirEntry.path +
             " to " + aTargetDirectory.path);
       throw e;
     }
 
     try {
       if (isDir)
         this._installDirectory(aDirEntry, aTargetDirectory, aCopy);
       else
         this._installFile(aDirEntry, aTargetDirectory, aCopy);
-    }
-    catch (e) {
+    } catch (e) {
       logger.error("Failure " + (aCopy ? "copying" : "moving") + " " + aDirEntry.path +
             " to " + aTargetDirectory.path);
       throw e;
     }
   },
 
   /**
    * Moves a file or directory into a new directory. If an error occurs then all
@@ -576,18 +567,17 @@ SafeInstallOperation.prototype = {
    *         The file or directory to be moved.
    * @param  aTargetDirectory
    *         The directory to move into, this is expected to be an empty
    *         directory.
    */
   moveUnder(aFile, aTargetDirectory) {
     try {
       this._installDirEntry(aFile, aTargetDirectory, false);
-    }
-    catch (e) {
+    } catch (e) {
       this.rollback();
       throw e;
     }
   },
 
   /**
    * Renames a file to a new location.  If an error occurs then all
    * files that have been moved will be moved back to their original location.
@@ -597,18 +587,17 @@ SafeInstallOperation.prototype = {
    * @param  aNewLocation
    *         The new location of the file.
    */
   moveTo(aOldLocation, aNewLocation) {
     try {
       let oldFile = aOldLocation.clone(), newFile = aNewLocation.clone();
       oldFile.moveTo(newFile.parent, newFile.leafName);
       this._installedFiles.push({ oldFile, newFile, isMoveTo: true});
-    }
-    catch (e) {
+    } catch (e) {
       this.rollback();
       throw e;
     }
   },
 
   /**
    * Copies a file or directory into a new directory. If an error occurs then
    * all new files that have been created will be removed.
@@ -617,44 +606,40 @@ SafeInstallOperation.prototype = {
    *         The file or directory to be copied.
    * @param  aTargetDirectory
    *         The directory to copy into, this is expected to be an empty
    *         directory.
    */
   copy(aFile, aTargetDirectory) {
     try {
       this._installDirEntry(aFile, aTargetDirectory, true);
-    }
-    catch (e) {
+    } catch (e) {
       this.rollback();
       throw e;
     }
   },
 
   /**
    * Rolls back all the moves that this operation performed. If an exception
    * occurs here then both old and new directories are left in an indeterminate
    * state
    */
   rollback() {
     while (this._installedFiles.length > 0) {
       let move = this._installedFiles.pop();
       if (move.isMoveTo) {
         move.newFile.moveTo(move.oldDir.parent, move.oldDir.leafName);
-      }
-      else if (move.newFile.isDirectory() && !move.newFile.isSymlink()) {
+      } else if (move.newFile.isDirectory() && !move.newFile.isSymlink()) {
         let oldDir = move.oldFile.parent.clone();
         oldDir.append(move.oldFile.leafName);
         oldDir.create(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
-      }
-      else if (!move.oldFile) {
+      } else if (!move.oldFile) {
         // No old file means this was a copied file
         move.newFile.remove(true);
-      }
-      else {
+      } else {
         move.newFile.moveTo(move.oldFile.parent, null);
       }
     }
 
     while (this._createdDirs.length > 0)
       recursiveRemove(this._createdDirs.pop());
   }
 };
@@ -695,23 +680,21 @@ function applyBlocklistChanges(aOldAddon
   if (newBlocklistState == oldBlocklistState)
     return;
 
   if (newBlocklistState == Blocklist.STATE_SOFTBLOCKED) {
     if (aNewAddon.type != "theme") {
       // The add-on has become softblocked, set softDisabled if it isn't already
       // userDisabled
       aNewAddon.softDisabled = !aNewAddon.userDisabled;
-    }
-    else {
+    } else {
       // Themes just get userDisabled to switch back to the default theme
       aNewAddon.userDisabled = true;
     }
-  }
-  else {
+  } else {
     // If the new add-on is not softblocked then it cannot be softDisabled
     aNewAddon.softDisabled = false;
   }
 }
 
 /**
  * Evaluates whether an add-on is allowed to run in safe mode.
  *
@@ -786,18 +769,17 @@ function isUsableAddon(aAddon) {
       return false;
   }
 
   if (AddonManager.checkCompatibility) {
     if (!aAddon.isCompatible) {
       logger.warn(`Add-on ${aAddon.id} is not compatible with application version.`);
       return false;
     }
-  }
-  else {
+  } else {
     let app = aAddon.matchingTargetApplication;
     if (!app) {
       logger.warn(`Add-on ${aAddon.id} is not compatible with target application.`);
       return false;
     }
 
     // XXX Temporary solution to let applications opt-in to make themes safer
     //     following significant UI changes even if checkCompatibility=false has
@@ -1147,33 +1129,31 @@ let loadManifestFromRDF = Task.async(fun
     let pos = 0;
     let count = aStream.available();
     while (count > 0) {
       listener.onDataAvailable(channel, null, aStream, pos, count);
       pos += count;
       count = aStream.available();
     }
     listener.onStopRequest(channel, null, Components.results.NS_OK);
-  }
-  catch (e) {
+  } catch (e) {
     listener.onStopRequest(channel, null, e.result);
     throw e;
   }
 
   let root = gRDF.GetResource(RDFURI_INSTALL_MANIFEST_ROOT);
   let addon = new AddonInternal();
   for (let prop of PROP_METADATA) {
     addon[prop] = getRDFProperty(ds, root, prop);
   }
   addon.unpack = getRDFProperty(ds, root, "unpack") == "true";
 
   if (!addon.type) {
     addon.type = addon.internalName ? "theme" : "extension";
-  }
-  else {
+  } else {
     let type = addon.type;
     addon.type = null;
     for (let name in TYPES) {
       if (TYPES[name] == type) {
         addon.type = name;
         break;
       }
     }
@@ -1217,18 +1197,17 @@ let loadManifestFromRDF = Task.async(fun
         if (addon.optionsType || addon.optionsURL)
           logger.warn(`Addon ${addon.id} specifies optionsType or optionsURL ` +
                       `in both install.rdf and manifest.json`);
 
         addon.optionsURL = embeddedAddon.optionsURL;
         addon.optionsType = embeddedAddon.optionsType;
       }
     }
-  }
-  else {
+  } else {
     // Some add-on types are always restartless.
     if (RESTARTLESS_TYPES.has(addon.type)) {
       addon.bootstrap = true;
     }
 
     // Only extensions are allowed to provide an optionsURL, optionsType or aboutURL. For
     // all other types they are silently ignored
     addon.optionsURL = null;
@@ -1295,37 +1274,34 @@ let loadManifestFromRDF = Task.async(fun
       os: null,
       abi: null
     };
 
     let pos = targetPlatform.indexOf("_");
     if (pos != -1) {
       platform.os = targetPlatform.substring(0, pos);
       platform.abi = targetPlatform.substring(pos + 1);
-    }
-    else {
+    } else {
       platform.os = targetPlatform;
     }
 
     addon.targetPlatforms.push(platform);
   }
 
   // A theme's userDisabled value is true if the theme is not the selected skin
   // or if there is an active lightweight theme. We ignore whether softblocking
   // is in effect since it would change the active theme.
   if (addon.type == "theme") {
     addon.userDisabled = !!LightweightThemeManager.currentTheme ||
                          addon.internalName != XPIProvider.selectedSkin;
-  }
-  else if (addon.type == "experiment") {
+  } else if (addon.type == "experiment") {
     // Experiments are disabled by default. It is up to the Experiments Manager
     // to enable them (it drives installation).
     addon.userDisabled = true;
-  }
-  else {
+  } else {
     addon.userDisabled = false;
   }
 
   addon.softDisabled = addon.blocklistState == Blocklist.STATE_SOFTBLOCKED;
   addon.applyBackgroundUpdates = AddonManager.AUTOUPDATE_DEFAULT;
 
   // Experiments are managed and updated through an external "experiments
   // manager." So disable some built-in mechanisms.
@@ -1576,18 +1552,17 @@ var loadManifestFromZipFile = Task.async
   try {
     zipReader.open(aXPIFile);
 
     // Can't return this promise because that will make us close the zip reader
     // before it has finished loading the manifest. Wait for the result and then
     // return.
     let manifest = yield loadManifestFromZipReader(zipReader, aInstallLocation);
     return manifest;
-  }
-  finally {
+  } finally {
     zipReader.close();
   }
 });
 
 function loadManifestFromFile(aFile, aInstallLocation) {
   if (aFile.isFile())
     return loadManifestFromZipFile(aFile, aInstallLocation);
   return loadManifestFromDir(aFile, aInstallLocation);
@@ -1751,18 +1726,17 @@ function getSignedStatus(aRv, aCert, aAd
         return AddonManager.SIGNEDSTATE_BROKEN;
 
       let hotfixID = Preferences.get(PREF_EM_HOTFIX_ID, undefined);
       if (hotfixID && hotfixID == aAddonID && Preferences.get(PREF_EM_CERT_CHECKATTRIBUTES, false)) {
         // The hotfix add-on has some more rigorous certificate checks
         try {
           CertUtils.validateCert(aCert,
                                  CertUtils.readCertPrefs(PREF_EM_HOTFIX_CERTS));
-        }
-        catch (e) {
+        } catch (e) {
           logger.warn("The hotfix add-on was not signed by the expected " +
                       "certificate and so will not be installed.", e);
           return AddonManager.SIGNEDSTATE_BROKEN;
         }
       }
 
       if (aCert.organizationalUnit == "Mozilla Components")
         return AddonManager.SIGNEDSTATE_SYSTEM;
@@ -1916,18 +1890,17 @@ function verifyBundleSignedState(aBundle
  *         The uri to escape
  * @param  aUpdateType
  *         An optional number representing the type of update, only applicable
  *         when creating a url for retrieving an update manifest
  * @param  aAppVersion
  *         The optional application version to use for %APP_VERSION%
  * @return the appropriately escaped uri.
  */
-function escapeAddonURI(aAddon, aUri, aUpdateType, aAppVersion)
-{
+function escapeAddonURI(aAddon, aUri, aUpdateType, aAppVersion) {
   let uri = AddonManager.escapeAddonURI(aAddon, aUri, aAppVersion);
 
   // If there is an updateType then replace the UPDATE_TYPE string
   if (aUpdateType)
     uri = uri.replace(/%UPDATE_TYPE%/g, aUpdateType);
 
   // If this add-on has compatibility information for either the current
   // application or toolkit then replace the ITEM_MAXAPPVERSION with the
@@ -1953,18 +1926,17 @@ function removeAsync(aFile) {
   return Task.spawn(function*() {
     let info = null;
     try {
       info = yield OS.File.stat(aFile.path);
       if (info.isDir)
         yield OS.File.removeDir(aFile.path);
       else
         yield OS.File.remove(aFile.path);
-    }
-    catch (e) {
+    } catch (e) {
       if (!(e instanceof OS.File.Error) || !e.becauseNoSuchFile)
         throw e;
       // The file has already gone away
       return;
     }
   });
 }
 
@@ -1974,18 +1946,17 @@ function removeAsync(aFile) {
  * @param  aFile
  *         The nsIFile to remove
  */
 function recursiveRemove(aFile) {
   let isDir = null;
 
   try {
     isDir = aFile.isDirectory();
-  }
-  catch (e) {
+  } catch (e) {
     // If the file has already gone away then don't worry about it, this can
     // happen on OSX where the resource fork is automatically moved with the
     // data fork for the file. See bug 733436.
     if (e.result == Cr.NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)
       return;
     if (e.result == Cr.NS_ERROR_FILE_NOT_FOUND)
       return;
 
@@ -1993,35 +1964,33 @@ function recursiveRemove(aFile) {
   }
 
   setFilePermissions(aFile, isDir ? FileUtils.PERMS_DIRECTORY
                                   : FileUtils.PERMS_FILE);
 
   try {
     aFile.remove(true);
     return;
-  }
-  catch (e) {
+  } catch (e) {
     if (!aFile.isDirectory() || aFile.isSymlink()) {
       logger.error("Failed to remove file " + aFile.path, e);
       throw e;
     }
   }
 
   // Use a snapshot of the directory contents to avoid possible issues with
   // iterating over a directory while removing files from it (the YAFFS2
   // embedded filesystem has this issue, see bug 772238), and to remove
   // normal files before their resource forks on OSX (see bug 733436).
   let entries = getDirectoryEntries(aFile, true);
   entries.forEach(recursiveRemove);
 
   try {
     aFile.remove(true);
-  }
-  catch (e) {
+  } catch (e) {
     logger.error("Failed to remove empty directory " + aFile.path, e);
     throw e;
   }
 }
 
 /**
  * Returns the timestamp and leaf file name of the most recently modified
  * entry in a directory,
@@ -2049,18 +2018,17 @@ function recursiveLastModifiedTime(aFile
         if (subTime > modTime) {
           modTime = subTime;
           fileName = subName;
         }
       }
       entries.close();
       return [fileName, modTime, totalItems];
     }
-  }
-  catch (e) {
+  } catch (e) {
     logger.warn("Problem getting last modified time for " + aFile.path, e);
   }
 
   // If the file is something else, just ignore it.
   return ["", 0, 0];
 }
 
 /**
@@ -2082,22 +2050,20 @@ function getDirectoryEntries(aDir, aSort
 
     if (aSortEntries) {
       entries.sort(function(a, b) {
         return a.path > b.path ? -1 : 1;
       });
     }
 
     return entries
-  }
-  catch (e) {
+  } catch (e) {
     logger.warn("Can't iterate directory " + aDir.path, e);
     return [];
-  }
-  finally {
+  } finally {
     if (dirEnum) {
       dirEnum.close();
     }
   }
 }
 
 /**
  * Record a bit of per-addon telemetry
@@ -2324,18 +2290,17 @@ this.XPIStates = {
           changed = xpiState.getModTime(file, id) || changed;
 
           if (file.persistentDescriptor != xpiState.descriptor) {
             xpiState.descriptor = file.persistentDescriptor;
             changed = true;
           }
           if (changed) {
             logger.debug("Changed add-on ${id} in ${location}", {id, location: location.name});
-          }
-          else {
+          } else {
             logger.debug("Existing add-on ${id} in ${location}", {id, location: location.name});
           }
           foundAddons.set(id, xpiState);
         }
         XPIProvider.setTelemetry(id, "location", location.name);
       }
 
       // Anything left behind in oldState was removed from the file system.
@@ -2560,18 +2525,17 @@ this.XPIProvider = {
   },
 
   cancelAll() {
     // Cancelling one may alter _inProgress, so don't use a simple iterator
     while (this._inProgress.length > 0) {
       let c = this._inProgress.shift();
       try {
         c.cancel();
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("Cancel failed", e);
       }
     }
   },
 
   /**
    * Adds or updates a URI mapping for an Addon.id.
    *
@@ -2625,18 +2589,17 @@ this.XPIProvider = {
         }
 
         let chan;
         try {
           chan = NetUtil.newChannel({
             uri: aURI,
             loadUsingSystemPrincipal: true
           });
-        }
-        catch (ex) {
+        } catch (ex) {
           return null;
         }
         // Avoid looping
         if (chan.URI.equals(aURI)) {
           return null;
         }
         // We want to clone the channel URI to avoid accidentially keeping
         // unnecessary references to the channel or implementation details
@@ -2663,63 +2626,58 @@ this.XPIProvider = {
    * @param  aOldPlatformVersion
    *         The version of the platform last run with this profile or null
    *         if it is a new profile or the version is unknown
    */
   startup(aAppChanged, aOldAppVersion, aOldPlatformVersion) {
     function addDirectoryInstallLocation(aName, aKey, aPaths, aScope, aLocked) {
       try {
         var dir = FileUtils.getDir(aKey, aPaths);
-      }
-      catch (e) {
+      } catch (e) {
         // Some directories aren't defined on some platforms, ignore them
         logger.debug("Skipping unavailable install location " + aName);
         return;
       }
 
       try {
         var location = aLocked ? new DirectoryInstallLocation(aName, dir, aScope)
                                : new MutableDirectoryInstallLocation(aName, dir, aScope);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("Failed to add directory install location " + aName, e);
         return;
       }
 
       XPIProvider.installLocations.push(location);
       XPIProvider.installLocationsByName[location.name] = location;
     }
 
     function addSystemAddonInstallLocation(aName, aKey, aPaths, aScope) {
       try {
         var dir = FileUtils.getDir(aKey, aPaths);
-      }
-      catch (e) {
+      } catch (e) {
         // Some directories aren't defined on some platforms, ignore them
         logger.debug("Skipping unavailable install location " + aName);
         return;
       }
 
       try {
         var location = new SystemAddonInstallLocation(aName, dir, aScope, aAppChanged !== false);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("Failed to add system add-on install location " + aName, e);
         return;
       }
 
       XPIProvider.installLocations.push(location);
       XPIProvider.installLocationsByName[location.name] = location;
     }
 
     function addRegistryInstallLocation(aName, aRootkey, aScope) {
       try {
         var location = new WinRegInstallLocation(aName, aRootkey, aScope);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("Failed to add registry install location " + aName, e);
         return;
       }
 
       XPIProvider.installLocations.push(location);
       XPIProvider.installLocationsByName[location.name] = location;
     }
 
@@ -2880,25 +2838,23 @@ this.XPIProvider = {
             let reason = BOOTSTRAP_REASONS.APP_STARTUP;
             // Eventually set INSTALLED reason when a bootstrap addon
             // is dropped in profile folder and automatically installed
             if (AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_INSTALLED)
                             .indexOf(addon.id) !== -1)
               reason = BOOTSTRAP_REASONS.ADDON_INSTALL;
             this.callBootstrapMethod(createAddonDetails(addon.id, addon),
                                      file, "startup", reason);
-          }
-          catch (e) {
+          } catch (e) {
             logger.error("Failed to load bootstrap addon " + addon.id + " from " +
                          addon.descriptor, e);
           }
         }
         AddonManagerPrivate.recordTimestamp("XPI_bootstrap_addons_end");
-      }
-      catch (e) {
+      } catch (e) {
         logger.error("bootstrap startup failed", e);
         AddonManagerPrivate.recordException("XPI-BOOTSTRAP", "startup failed", e);
       }
 
       // Let these shutdown a little earlier when they still have access to most
       // of XPCOM
       Services.obs.addObserver({
         observe(aSubject, aTopic, aData) {
@@ -2915,18 +2871,17 @@ this.XPIProvider = {
             let addonDetails = createAddonDetails(addon.id, addon);
 
             // If the add-on was pending disable then shut it down and remove it
             // from the persisted data.
             if (addon.disable) {
               XPIProvider.callBootstrapMethod(addonDetails, file, "shutdown",
                                               BOOTSTRAP_REASONS.ADDON_DISABLE);
               delete XPIProvider.bootstrappedAddons[addon.id];
-            }
-            else {
+            } else {
               XPIProvider.callBootstrapMethod(addonDetails, file, "shutdown",
                                               BOOTSTRAP_REASONS.APP_SHUTDOWN);
             }
           }
           Services.obs.removeObserver(this, "quit-application-granted");
         }
       }, "quit-application-granted", false);
 
@@ -2944,18 +2899,17 @@ this.XPIProvider = {
       this.extensionsActive = true;
       this.runPhase = XPI_BEFORE_UI_STARTUP;
 
       let timerManager = Cc["@mozilla.org/updates/timer-manager;1"].
                          getService(Ci.nsIUpdateTimerManager);
       timerManager.registerTimer("xpi-signature-verification", () => {
         this.verifySignatures();
       }, XPI_SIGNATURE_CHECK_PERIOD);
-    }
-    catch (e) {
+    } catch (e) {
       logger.error("startup failed", e);
       AddonManagerPrivate.recordException("XPI", "startup failed", e);
     }
   },
 
   /**
    * Shuts down the database and releases all references.
    * Return: Promise{integer} resolves / rejects with the result of
@@ -3020,18 +2974,17 @@ this.XPIProvider = {
     // Tell the Chrome Registry which Skin to select
     try {
       this.selectedSkin = Preferences.get(PREF_DSS_SKIN_TO_SELECT);
       Services.prefs.setCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN,
                                  this.selectedSkin);
       Services.prefs.clearUserPref(PREF_DSS_SKIN_TO_SELECT);
       logger.debug("Changed skin to " + this.selectedSkin);
       this.currentSkin = this.selectedSkin;
-    }
-    catch (e) {
+    } catch (e) {
       logger.error("Error applying theme change", e);
     }
     Services.prefs.clearUserPref(PREF_DSS_SWITCHPENDING);
   },
 
   /**
    * If the application has been upgraded and there are add-ons outside the
    * application directory then we may need to synchronize compatibility
@@ -3185,27 +3138,25 @@ this.XPIProvider = {
             let path = OS.Path.join(OS.Constants.Path.tmpDir, "tmpaddon");
             let unique = yield OS.File.openUnique(path);
             unique.file.close();
             yield OS.File.copy(sourceAddon._sourceBundle.path, unique.path);
             // Make sure to update file modification times so this is detected
             // as a new add-on.
             yield OS.File.setDates(unique.path);
             item.path = unique.path;
-          }
-          catch (e) {
+          } catch (e) {
             logger.warn(`Failed make temporary copy of ${sourceAddon._sourceBundle.path}.`, e);
           }
         }
         if (!item.path) {
           item.path = yield ProductAddonChecker.downloadAddon(item.spec);
         }
         item.addon = yield loadManifestFromFile(nsIFile(item.path), systemAddonLocation);
-      }
-      catch (e) {
+      } catch (e) {
         logger.error(`Failed to download system add-on ${item.spec.id}`, e);
       }
     });
     yield Promise.all(Array.from(addonList.values()).map(downloadAddon));
 
     // The download promises all resolve regardless, now check if they all
     // succeeded
     let validateAddon = (item) => {
@@ -3310,18 +3261,17 @@ this.XPIProvider = {
     let data = this.enabledAddons;
     for (let id in this.bootstrappedAddons) {
       data += (data ? "," : "") + encodeURIComponent(id) + ":" +
               encodeURIComponent(this.bootstrappedAddons[id].version);
     }
 
     try {
       Services.appinfo.annotateCrashReport("Add-ons", data);
-    }
-    catch (e) { }
+    } catch (e) { }
 
     let TelemetrySession =
       Cu.import("resource://gre/modules/TelemetrySession.jsm", {}).TelemetrySession;
     TelemetrySession.setAddOns(data);
   },
 
   /**
    * Check the staging directories of install locations for any add-ons to be
@@ -3341,49 +3291,46 @@ this.XPIProvider = {
         continue;
       }
 
       let stagingDir = location.getStagingDir();
 
       try {
         if (!stagingDir || !stagingDir.exists() || !stagingDir.isDirectory())
           continue;
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("Failed to find staging directory", e);
         continue;
       }
 
       let seenFiles = [];
       // Use a snapshot of the directory contents to avoid possible issues with
       // iterating over a directory while removing files from it (the YAFFS2
       // embedded filesystem has this issue, see bug 772238), and to remove
       // normal files before their resource forks on OSX (see bug 733436).
       let stagingDirEntries = getDirectoryEntries(stagingDir, true);
       for (let stageDirEntry of stagingDirEntries) {
         let id = stageDirEntry.leafName;
 
         let isDir;
         try {
           isDir = stageDirEntry.isDirectory();
-        }
-        catch (e) {
+        } catch (e) {
           if (e.result != Cr.NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)
             throw e;
           // If the file has already gone away then don't worry about it, this
           // can happen on OSX where the resource fork is automatically moved
           // with the data fork for the file. See bug 733436.
           continue;
         }
 
         if (!isDir) {
           if (id.substring(id.length - 4).toLowerCase() == ".xpi") {
             id = id.substring(0, id.length - 4);
-          }
-          else {
+          } else {
             if (id.substring(id.length - 5).toLowerCase() != ".json") {
               logger.warn("Ignoring file: " + stageDirEntry.path);
               seenFiles.push(stageDirEntry.leafName);
             }
             continue;
           }
         }
 
@@ -3408,26 +3355,24 @@ this.XPIProvider = {
 
             try {
               let addonFile = location.getLocationForID(id);
               let addonToUninstall = syncLoadManifestFromFile(addonFile, location);
               if (addonToUninstall.bootstrap) {
                 this.callBootstrapMethod(addonToUninstall, addonToUninstall._sourceBundle,
                                          "uninstall", BOOTSTRAP_REASONS.ADDON_UNINSTALL);
               }
-            }
-            catch (e) {
+            } catch (e) {
               logger.warn("Failed to call uninstall for " + id, e);
             }
 
             try {
               location.uninstallAddon(id);
               seenFiles.push(stageDirEntry.leafName);
-            }
-            catch (e) {
+            } catch (e) {
               logger.error("Failed to uninstall add-on " + id + " in " + location.name, e);
             }
             // The file check later will spot the removal and cleanup the database
             continue;
           }
         }
 
         aManifests[location.name][id] = null;
@@ -3436,18 +3381,17 @@ this.XPIProvider = {
         let jsonfile = stagingDir.clone();
         jsonfile.append(id + ".json");
         // Assume this was a foreign install if there is no cached metadata file
         let foreignInstall = !jsonfile.exists();
         let addon;
 
         try {
           addon = syncLoadManifestFromFile(stageDirEntry, location);
-        }
-        catch (e) {
+        } catch (e) {
           logger.error("Unable to read add-on manifest from " + stageDirEntry.path, e);
           // This add-on can't be installed so just remove it now
           seenFiles.push(stageDirEntry.leafName);
           seenFiles.push(jsonfile.leafName);
           continue;
         }
 
         if (mustSign(addon.type) &&
@@ -3470,24 +3414,22 @@ this.XPIProvider = {
           try {
             fis.init(jsonfile, -1, 0, 0);
             let metadata = json.decodeFromStream(fis, jsonfile.fileSize);
             addon.importMetadata(metadata);
 
             // Pass this through to addMetadata so it knows this add-on was
             // likely installed through the UI
             aManifests[location.name][id] = addon;
-          }
-          catch (e) {
+          } catch (e) {
             // If some data can't be recovered from the cached metadata then it
             // is unlikely to be a problem big enough to justify throwing away
             // the install, just log an error and continue
             logger.error("Unable to read metadata from " + jsonfile.path, e);
-          }
-          finally {
+          } finally {
             fis.close();
           }
         }
         seenFiles.push(jsonfile.leafName);
 
         existingAddonID = addon.existingAddonID || id;
 
         var oldBootstrap = null;
@@ -3508,29 +3450,27 @@ this.XPIProvider = {
                                     BOOTSTRAP_REASONS.ADDON_DOWNGRADE;
 
               this.callBootstrapMethod(createAddonDetails(existingAddonID, oldBootstrap),
                                        existingAddon, "uninstall", uninstallReason,
                                        { newVersion });
               this.unloadBootstrapScope(existingAddonID);
               flushChromeCaches();
             }
-          }
-          catch (e) {
+          } catch (e) {
           }
         }
 
         try {
           addon._sourceBundle = location.installAddon({
             id,
             source: stageDirEntry,
             existingAddonID
           });
-        }
-        catch (e) {
+        } catch (e) {
           logger.error("Failed to install staged add-on " + id + " in " + location.name,
                 e);
           // Re-create the staged install
           new StagedAddonInstall(location, stageDirEntry, addon);
           // Make sure not to delete the cached manifest json file
           seenFiles.pop();
 
           delete aManifests[location.name][id];
@@ -3542,18 +3482,17 @@ this.XPIProvider = {
                                      BOOTSTRAP_REASONS.ADDON_INSTALL);
           }
           continue;
         }
       }
 
       try {
         location.cleanStagingDir(seenFiles);
-      }
-      catch (e) {
+      } catch (e) {
         // Non-critical, just saves some perf on startup if we clean this up.
         logger.debug("Error cleaning staging dir " + stagingDir.path, e);
       }
     }
     return changed;
   },
 
   /**
@@ -3568,18 +3507,17 @@ this.XPIProvider = {
    * @param  aAppChanged
    *         See checkForChanges
    * @return true if any new add-ons were installed
    */
   installDistributionAddons(aManifests, aAppChanged) {
     let distroDir;
     try {
       distroDir = FileUtils.getDir(KEY_APP_DISTRIBUTION, [DIR_EXTENSIONS]);
-    }
-    catch (e) {
+    } catch (e) {
       return false;
     }
 
     if (!distroDir.exists())
       return false;
 
     if (!distroDir.isDirectory())
       return false;
@@ -3592,23 +3530,21 @@ this.XPIProvider = {
     let entry;
     while ((entry = entries.nextFile)) {
 
       let id = entry.leafName;
 
       if (entry.isFile()) {
         if (id.substring(id.length - 4).toLowerCase() == ".xpi") {
           id = id.substring(0, id.length - 4);
-        }
-        else {
+        } else {
           logger.debug("Ignoring distribution add-on that isn't an XPI: " + entry.path);
           continue;
         }
-      }
-      else if (!entry.isDirectory()) {
+      } else if (!entry.isDirectory()) {
         logger.debug("Ignoring distribution add-on that isn't a file or directory: " +
             entry.path);
         continue;
       }
 
       if (!gIDTest.test(id)) {
         logger.debug("Ignoring distribution add-on whose name is not a valid add-on ID: " +
             entry.path);
@@ -3619,50 +3555,46 @@ this.XPIProvider = {
        * just continue */
       if (!aAppChanged && Preferences.isSet(PREF_BRANCH_INSTALLED_ADDON + id)) {
         continue;
       }
 
       let addon;
       try {
         addon = syncLoadManifestFromFile(entry, profileLocation);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("File entry " + entry.path + " contains an invalid add-on", e);
         continue;
       }
 
       if (addon.id != id) {
         logger.warn("File entry " + entry.path + " contains an add-on with an " +
              "incorrect ID")
         continue;
       }
 
       let existingEntry = null;
       try {
         existingEntry = profileLocation.getLocationForID(id);
-      }
-      catch (e) {
+      } catch (e) {
       }
 
       if (existingEntry) {
         let existingAddon;
         try {
           existingAddon = syncLoadManifestFromFile(existingEntry, profileLocation);
 
           if (Services.vc.compare(addon.version, existingAddon.version) <= 0)
             continue;
-        }
-        catch (e) {
+        } catch (e) {
           // Bad add-on in the profile so just proceed and install over the top
           logger.warn("Profile contains an add-on with a bad or missing install " +
                "manifest at " + existingEntry.path + ", overwriting", e);
         }
-      }
-      else if (Preferences.get(PREF_BRANCH_INSTALLED_ADDON + id, false)) {
+      } else if (Preferences.get(PREF_BRANCH_INSTALLED_ADDON + id, false)) {
         continue;
       }
 
       // Install the add-on
       try {
         addon._sourceBundle = profileLocation.installAddon({ id, source: entry, action: "copy" });
         logger.debug("Installed distribution add-on " + id);
 
@@ -3670,18 +3602,17 @@ this.XPIProvider = {
 
         // aManifests may contain a copy of a newly installed add-on's manifest
         // and we'll have overwritten that so instead cache our install manifest
         // which will later be put into the database in processFileChanges
         if (!(KEY_APP_PROFILE in aManifests))
           aManifests[KEY_APP_PROFILE] = {};
         aManifests[KEY_APP_PROFILE][id] = addon;
         changed = true;
-      }
-      catch (e) {
+      } catch (e) {
         logger.error("Failed to install distribution add-on " + entry.path, e);
       }
     }
 
     entries.close();
 
     return changed;
   },
@@ -3752,18 +3683,17 @@ this.XPIProvider = {
     // active state of add-ons but didn't commit them properly (normally due
     // to the application crashing)
     let hasPendingChanges = Preferences.get(PREF_PENDING_OPERATIONS);
     if (hasPendingChanges) {
       updateReasons.push("hasPendingChanges");
     }
 
     // If the application has changed then check for new distribution add-ons
-    if (Preferences.get(PREF_INSTALL_DISTRO_ADDONS, true))
-    {
+    if (Preferences.get(PREF_INSTALL_DISTRO_ADDONS, true)) {
       updated = this.installDistributionAddons(manifests, aAppChanged);
       if (updated) {
         updateReasons.push("installDistributionAddons");
       }
     }
 
     // Telemetry probe added around getInstallState() to check perf
     let telemetryCaptureTime = Cu.now();
@@ -3778,18 +3708,17 @@ this.XPIProvider = {
 
     // If the schema appears to have changed then we should update the database
     if (DB_SCHEMA != Preferences.get(PREF_DB_SCHEMA, 0)) {
       // If we don't have any add-ons, just update the pref, since we don't need to
       // write the database
       if (!haveAnyAddons) {
         logger.debug("Empty XPI database, setting schema version preference to " + DB_SCHEMA);
         Services.prefs.setIntPref(PREF_DB_SCHEMA, DB_SCHEMA);
-      }
-      else {
+      } else {
         updateReasons.push("schemaChanged");
       }
     }
 
     // If the database doesn't exist and there are add-ons installed then we
     // must update the database however if there are no add-ons then there is
     // no need to update the database.
     let dbFile = FileUtils.getFile(KEY_PROFILEDIR, [FILE_DATABASE], true);
@@ -3824,18 +3753,17 @@ this.XPIProvider = {
         AddonManagerPrivate.recordSimpleMeasure("XPIDB_startup_load_reasons", updateReasons);
         XPIDatabase.syncLoadDB(false);
         try {
           extensionListChanged = XPIDatabaseReconcile.processFileChanges(manifests,
                                                                          aAppChanged,
                                                                          aOldAppVersion,
                                                                          aOldPlatformVersion,
                                                                          updateReasons.includes("schemaChanged"));
-        }
-        catch (e) {
+        } catch (e) {
           logger.error("Failed to process extension changes at startup", e);
         }
       }
 
       if (aAppChanged) {
         // When upgrading the app and using a custom skin make sure it is still
         // compatible otherwise switch back the default
         if (this.currentSkin != this.defaultSkin) {
@@ -3845,18 +3773,17 @@ this.XPIProvider = {
         }
 
         // When upgrading remove the old extensions cache to force older
         // versions to rescan the entire list of extensions
         let oldCache = FileUtils.getFile(KEY_PROFILEDIR, [FILE_OLD_CACHE], true);
         try {
           if (oldCache.exists())
             oldCache.remove(true);
-        }
-        catch (e) {
+        } catch (e) {
           logger.warn("Unable to remove old extension cache " + oldCache.path, e);
         }
       }
 
       // If the application crashed before completing any pending operations then
       // we should perform them now.
       if (extensionListChanged || hasPendingChanges) {
         logger.debug("Updating database with changes to installed add-ons");
@@ -3864,18 +3791,17 @@ this.XPIProvider = {
         Services.prefs.setBoolPref(PREF_PENDING_OPERATIONS,
                                    !XPIDatabase.writeAddonsList());
         Services.prefs.setCharPref(PREF_BOOTSTRAP_ADDONS,
                                    JSON.stringify(this.bootstrappedAddons));
         return true;
       }
 
       logger.debug("No changes found");
-    }
-    catch (e) {
+    } catch (e) {
       logger.error("Error during startup file checks", e);
     }
 
     // Check that the add-ons list still exists
     let addonsList = FileUtils.getFile(KEY_PROFILEDIR, [FILE_XPI_ADDONS_LIST],
                                        true);
     // the addons list file should exist if and only if we have add-ons installed
     if (addonsList.exists() != haveAnyAddons) {
@@ -4102,18 +4028,17 @@ this.XPIProvider = {
     let installReason = BOOTSTRAP_REASONS.ADDON_INSTALL;
     let oldAddon = yield new Promise(
                    resolve => XPIDatabase.getVisibleAddonForID(addon.id, resolve));
     if (oldAddon) {
       if (!oldAddon.bootstrap) {
         logger.warn("Non-restartless Add-on is already installed", addon.id);
         throw new Error("Non-restartless add-on with ID "
                         + oldAddon.id + " is already installed");
-      }
-      else {
+      } else {
         logger.warn("Addon with ID " + oldAddon.id + " already installed,"
                     + " older version will be disabled");
 
         let existingAddonID = oldAddon.id;
         let existingAddon = oldAddon._sourceBundle;
 
         // We'll be replacing a currently active bootstrapped add-on so
         // call its uninstall method
@@ -4348,28 +4273,24 @@ this.XPIProvider = {
         newSkin = theme.internalName;
       else if (theme.userDisabled == false && !theme.pendingUninstall)
         previousTheme = theme;
     }
 
     if (aPendingRestart) {
       Services.prefs.setBoolPref(PREF_DSS_SWITCHPENDING, true);
       Services.prefs.setCharPref(PREF_DSS_SKIN_TO_SELECT, newSkin);
-    }
-    else if (newSkin == this.currentSkin) {
+    } else if (newSkin == this.currentSkin) {
       try {
         Services.prefs.clearUserPref(PREF_DSS_SWITCHPENDING);
-      }
-      catch (e) { }
+      } catch (e) { }
       try {
         Services.prefs.clearUserPref(PREF_DSS_SKIN_TO_SELECT);
-      }
-      catch (e) { }
-    }
-    else {
+      } catch (e) { }
+    } else {
       Services.prefs.setCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN, newSkin);
       this.currentSkin = newSkin;
     }
     this.selectedSkin = newSkin;
 
     // Flush the preferences to disk so they don't get out of sync with the
     // database
     Services.prefs.savePrefFile(null);
@@ -4430,32 +4351,29 @@ this.XPIProvider = {
    * to enable the default theme.
    */
   enableDefaultTheme() {
     logger.debug("Activating default theme");
     let addon = XPIDatabase.getVisibleAddonForInternalName(this.defaultSkin);
     if (addon) {
       if (addon.userDisabled) {
         this.updateAddonDisabledState(addon, false);
-      }
-      else if (!this.extensionsActive) {
+      } else if (!this.extensionsActive) {
         // During startup we may end up trying to enable the default theme when
         // the database thinks it is already enabled (see f.e. bug 638847). In
         // this case just force the theme preferences to be correct
         Services.prefs.setCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN,
                                    addon.internalName);
         this.currentSkin = this.selectedSkin = addon.internalName;
         Preferences.reset(PREF_DSS_SKIN_TO_SELECT);
         Preferences.reset(PREF_DSS_SWITCHPENDING);
-      }
-      else {
+      } else {
         logger.warn("Attempting to activate an already active default theme");
       }
-    }
-    else {
+    } else {
       logger.warn("Unable to activate the default theme");
     }
   },
 
   onDebugConnectionChange(aEvent, aWhat, aConnection) {
     if (aWhat != "opened")
       return;
 
@@ -4471,18 +4389,17 @@ this.XPIProvider = {
    * @see nsIObserver
    */
   observe(aSubject, aTopic, aData) {
     if (aTopic == NOTIFICATION_FLUSH_PERMISSIONS) {
       if (!aData || aData == XPI_PERMISSION) {
         this.importPermissions();
       }
       return;
-    }
-    else if (aTopic == NOTIFICATION_TOOLBOXPROCESS_LOADED) {
+    } else if (aTopic == NOTIFICATION_TOOLBOXPROCESS_LOADED) {
       Services.obs.removeObserver(this, NOTIFICATION_TOOLBOXPROCESS_LOADED, false);
       this._toolboxProcessLoaded = true;
       BrowserToolboxProcess.on("connectionchange",
                                this.onDebugConnectionChange.bind(this));
     }
 
     if (aTopic == "nsPref:changed") {
       switch (aData) {
@@ -4835,18 +4752,17 @@ this.XPIProvider = {
       // bootstrap file, we run loadSubScript within the context of the
       // sandbox with the latest JS version set explicitly.
       activeAddon.bootstrapScope.__SCRIPT_URI_SPEC__ = uri;
       Components.utils.evalInSandbox(
         "Components.classes['@mozilla.org/moz/jssubscript-loader;1'] \
                    .getService(Components.interfaces.mozIJSSubScriptLoader) \
                    .loadSubScript(__SCRIPT_URI_SPEC__);",
                    activeAddon.bootstrapScope, "ECMAv5");
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("Error loading bootstrap.js for " + aId, e);
     }
 
     // Only access BrowserToolboxProcess if ToolboxProcess.jsm has been
     // initialized as otherwise, when it will be initialized, all addons'
     // globals will be added anyways
     if (this._toolboxProcessLoaded) {
       BrowserToolboxProcess.setAddonOptions(aId,
@@ -4931,18 +4847,17 @@ this.XPIProvider = {
       // Nothing to call for locales
       if (aAddon.type == "locale")
         return;
 
       let method = undefined;
       try {
         method = Components.utils.evalInSandbox(`${aMethod};`,
           activeAddon.bootstrapScope, "ECMAv5");
-      }
-      catch (e) {
+      } catch (e) {
         // An exception will be caught if the expected method is not defined.
         // That will be logged below.
       }
 
       if (!method) {
         logger.warn("Add-on " + aAddon.id + " is missing bootstrap method " + aMethod);
         return;
       }
@@ -4979,22 +4894,20 @@ this.XPIProvider = {
           LegacyExtensionsUtils.getEmbeddedExtensionFor(params).shutdown();
         }
       }
 
       logger.debug("Calling bootstrap method " + aMethod + " on " + aAddon.id + " version " +
                    aAddon.version);
       try {
         method(params, aReason);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("Exception running bootstrap method " + aMethod + " on " + aAddon.id, e);
       }
-    }
-    finally {
+    } finally {
       // Extensions are automatically initialized in the correct order at startup.
       if (aMethod == "startup" && aReason != BOOTSTRAP_REASONS.APP_STARTUP) {
         for (let addon of this.getDependentAddons(aAddon))
           this.updateAddonDisabledState(addon);
       }
 
       if (CHROME_TYPES.has(aAddon.type) && aMethod == "shutdown" && aReason != BOOTSTRAP_REASONS.APP_SHUTDOWN) {
         logger.debug("Removing manifest for " + aFile.path);
@@ -5035,18 +4948,17 @@ this.XPIProvider = {
       throw new Error("Can only update addon states for installed addons.");
     if (aUserDisabled !== undefined && aSoftDisabled !== undefined) {
       throw new Error("Cannot change userDisabled and softDisabled at the " +
                       "same time");
     }
 
     if (aUserDisabled === undefined) {
       aUserDisabled = aAddon.userDisabled;
-    }
-    else if (!aUserDisabled) {
+    } else if (!aUserDisabled) {
       // If enabling the add-on then remove softDisabled
       aSoftDisabled = false;
     }
 
     // If not changing softDisabled or the add-on is already userDisabled then
     // use the existing value for softDisabled
     if (aSoftDisabled === undefined || aUserDisabled)
       aSoftDisabled = aAddon.softDisabled;
@@ -5086,55 +4998,50 @@ this.XPIProvider = {
       return undefined;
 
     // Flag that active states in the database need to be updated on shutdown
     Services.prefs.setBoolPref(PREF_PENDING_OPERATIONS, true);
 
     // Have we just gone back to the current state?
     if (isDisabled != aAddon.active) {
       AddonManagerPrivate.callAddonListeners("onOperationCancelled", wrapper);
-    }
-    else {
+    } else {
       if (isDisabled) {
         var needsRestart = this.disableRequiresRestart(aAddon);
         AddonManagerPrivate.callAddonListeners("onDisabling", wrapper,
                                                needsRestart);
-      }
-      else {
+      } else {
         needsRestart = this.enableRequiresRestart(aAddon);
         AddonManagerPrivate.callAddonListeners("onEnabling", wrapper,
                                                needsRestart);
       }
 
       if (!needsRestart) {
         XPIDatabase.updateAddonActive(aAddon, !isDisabled);
 
         if (isDisabled) {
           if (aAddon.bootstrap) {
             this.callBootstrapMethod(aAddon, aAddon._sourceBundle, "shutdown",
                                      BOOTSTRAP_REASONS.ADDON_DISABLE);
             this.unloadBootstrapScope(aAddon.id);
           }
           AddonManagerPrivate.callAddonListeners("onDisabled", wrapper);
-        }
-        else {
+        } else {
           if (aAddon.bootstrap) {
             this.callBootstrapMethod(aAddon, aAddon._sourceBundle, "startup",
                                      BOOTSTRAP_REASONS.ADDON_ENABLE);
           }
           AddonManagerPrivate.callAddonListeners("onEnabled", wrapper);
         }
-      }
-      else if (aAddon.bootstrap) {
+      } else if (aAddon.bootstrap) {
         // Something blocked the restartless add-on from enabling or disabling
         // make sure it happens on the next startup
         if (isDisabled) {
           this.bootstrappedAddons[aAddon.id].disable = true;
-        }
-        else {
+        } else {
           this.bootstrappedAddons[aAddon.id] = {
             version: aAddon.version,
             type: aAddon.type,
             descriptor: aAddon._sourceBundle.persistentDescriptor,
             multiprocessCompatible: aAddon.multiprocessCompatible,
             runInSafeMode: canRunInSafeMode(aAddon),
             dependencies: aAddon.dependencies,
             hasEmbeddedWebExtension: aAddon.hasEmbeddedWebExtension,
@@ -5255,18 +5162,17 @@ this.XPIProvider = {
 
       if (aAddon.bootstrap) {
         XPIProvider.callBootstrapMethod(aAddon, aAddon._sourceBundle,
                                         "install", BOOTSTRAP_REASONS.ADDON_INSTALL);
 
         if (aAddon.active) {
           XPIProvider.callBootstrapMethod(aAddon, aAddon._sourceBundle,
                                           "startup", BOOTSTRAP_REASONS.ADDON_INSTALL);
-        }
-        else {
+        } else {
           XPIProvider.unloadBootstrapScope(aAddon.id);
         }
       }
 
       // We always send onInstalled even if a restart is required to enable
       // the revealed add-on
       AddonManagerPrivate.callAddonListeners("onInstalled", wrappedAddon);
     }
@@ -5291,18 +5197,17 @@ this.XPIProvider = {
         flushChromeCaches();
       }
       aAddon._installLocation.uninstallAddon(aAddon.id);
       XPIDatabase.removeAddonMetadata(aAddon);
       XPIStates.removeAddon(aAddon.location, aAddon.id);
       AddonManagerPrivate.callAddonListeners("onUninstalled", wrapper);
 
       findAddonAndReveal(aAddon.id);
-    }
-    else if (aAddon.bootstrap && aAddon.active && !this.disableRequiresRestart(aAddon)) {
+    } else if (aAddon.bootstrap && aAddon.active && !this.disableRequiresRestart(aAddon)) {
       this.callBootstrapMethod(aAddon, aAddon._sourceBundle, "shutdown",
                                BOOTSTRAP_REASONS.ADDON_UNINSTALL);
       this.unloadBootstrapScope(aAddon.id);
       XPIDatabase.updateAddonActive(aAddon, false);
     }
 
     // Notify any other providers that a new theme has been enabled
     if (aAddon.type == "theme" && aAddon.active)
@@ -5555,18 +5460,17 @@ class AddonInstall {
       return;
     }
 
     try {
       this.logger.debug("removeTemporaryFile: " + this.sourceURI.spec + " removing temp file " +
           this.file.path);
       this.file.remove(true);
       this.ownsTempFile = false;
-    }
-    catch (e) {
+    } catch (e) {
       this.logger.warn("Failed to remove temporary file " + this.file.path + " for addon " +
           this.sourceURI.spec,
           e);
     }
   }
 
   /**
    * Updates the sourceURI and releaseNotesURI values on the Addon being
@@ -5588,27 +5492,25 @@ class AddonInstall {
    *         XPI is incorrectly signed
    */
   loadManifest(file) {
     return Task.spawn((function*() {
       let zipreader = Cc["@mozilla.org/libjar/zip-reader;1"].
           createInstance(Ci.nsIZipReader);
       try {
         zipreader.open(file);
-      }
-      catch (e) {
+      } catch (e) {
         zipreader.close();
         return Promise.reject([AddonManager.ERROR_CORRUPT_FILE, e]);
       }
 
       try {
         // loadManifestFromZipReader performs the certificate verification for us
         this.addon = yield loadManifestFromZipReader(zipreader, this.installLocation);
-      }
-      catch (e) {
+      } catch (e) {
         zipreader.close();
         return Promise.reject([AddonManager.ERROR_CORRUPT_FILE, e]);
       }
 
       if (!this.addon.id) {
         let err = new Error(`Cannot find id for addon ${file.path}`);
         return Promise.reject([AddonManager.ERROR_CORRUPT_FILE, err]);
       }
@@ -5638,18 +5540,17 @@ class AddonInstall {
 
           if (state == AddonManager.SIGNEDSTATE_MISSING)
             return Promise.reject([AddonManager.ERROR_SIGNEDSTATE_REQUIRED,
                                    "signature is required but missing"])
 
           return Promise.reject([AddonManager.ERROR_CORRUPT_FILE,
                                  "signature verification failed"])
         }
-      }
-      else if (this.addon.signedState == AddonManager.SIGNEDSTATE_UNKNOWN ||
+      } else if (this.addon.signedState == AddonManager.SIGNEDSTATE_UNKNOWN ||
                this.addon.signedState == AddonManager.SIGNEDSTATE_NOT_REQUIRED) {
         // Check object signing certificate, if any
         let x509 = zipreader.getSigningCert(null);
         if (x509) {
           logger.debug("Verifying XPI signature");
           if (verifyZipSigning(zipreader, x509)) {
             this.certificate = x509;
             if (this.certificate.commonName.length > 0) {
@@ -5803,18 +5704,17 @@ class AddonInstall {
 
       installedUnpacked = yield this.stageInstall(requiresRestart, stagedAddon, isUpgrade);
 
       if (requiresRestart) {
         this.state = AddonManager.STATE_INSTALLED;
         AddonManagerPrivate.callInstallListeners("onInstallEnded",
                                                  this.listeners, this.wrapper,
                                                  this.addon.wrapper);
-      }
-      else {
+      } else {
         // The install is completed so it should be removed from the active list
         XPIProvider.removeActiveInstall(this);
 
         // Deactivate and remove the old add-on as necessary
         let reason = BOOTSTRAP_REASONS.ADDON_INSTALL;
         if (this.existingAddon) {
           if (Services.vc.compare(this.existingAddon.version, this.addon.version) < 0)
             reason = BOOTSTRAP_REASONS.ADDON_UPGRADE;
@@ -5857,18 +5757,17 @@ class AddonInstall {
           this.addon =  XPIDatabase.updateAddonMetadata(this.existingAddon, this.addon,
                                                         file.persistentDescriptor);
           let state = XPIStates.getAddon(this.installLocation.name, this.addon.id);
           if (state) {
             state.syncWithDB(this.addon, true);
           } else {
             logger.warn("Unexpected missing XPI state for add-on ${id}", this.addon);
           }
-        }
-        else {
+        } else {
           this.addon.active = (this.addon.visible && !this.addon.disabled);
           this.addon = XPIDatabase.addAddonMetadata(this.addon, file.persistentDescriptor);
           XPIStates.addAddon(this.addon);
           this.addon.installDate = this.addon.updateDate;
           XPIDatabase.saveChanges();
         }
         XPIStates.save();
 
@@ -5890,18 +5789,17 @@ class AddonInstall {
         AddonManagerPrivate.callInstallListeners("onInstallEnded",
                                                  this.listeners, this.wrapper,
                                                  this.addon.wrapper);
 
         if (this.addon.bootstrap) {
           if (this.addon.active) {
             XPIProvider.callBootstrapMethod(this.addon, file, "startup",
                                             reason, extraParams);
-          }
-          else {
+          } else {
             // XXX this makes it dangerous to do some things in onInstallEnded
             // listeners because important cleanup hasn't been done yet
             XPIProvider.unloadBootstrapScope(this.addon.id);
           }
         }
         XPIProvider.setTelemetry(this.addon.id, "unpacked", installedUnpacked);
         recordAddonTelemetry(this.addon);
       }
@@ -5937,18 +5835,17 @@ class AddonInstall {
       // First stage the file regardless of whether restarting is necessary
       if (this.addon.unpack || Preferences.get(PREF_XPI_UNPACK, false)) {
         logger.debug("Addon " + this.addon.id + " will be installed as " +
                      "an unpacked directory");
         stagedAddon.leafName = this.addon.id;
         yield OS.File.makeDir(stagedAddon.path);
         yield ZipUtils.extractFilesAsync(this.file, stagedAddon);
         installedUnpacked = 1;
-      }
-      else {
+      } else {
         logger.debug(`Addon ${this.addon.id} will be installed as a packed xpi`);
         stagedAddon.leafName = this.addon.id + ".xpi";
 
         yield OS.File.copy(this.file.path, stagedAddon.path);
       }
 
       if (restartRequired) {
         // Point the add-on to its extracted files as the xpi may get deleted
@@ -6064,18 +5961,17 @@ class LocalAddonInstall extends AddonIns
       this.progress = this.file.fileSize;
       this.maxProgress = this.file.fileSize;
 
       if (this.hash) {
         let crypto = Cc["@mozilla.org/security/hash;1"].
             createInstance(Ci.nsICryptoHash);
         try {
           crypto.initWithString(this.hash.algorithm);
-        }
-        catch (e) {
+        } catch (e) {
           logger.warn("Unknown hash algorithm '" + this.hash.algorithm + "' for addon " + this.sourceURI.spec, e);
           this.state = AddonManager.STATE_DOWNLOAD_FAILED;
           this.error = AddonManager.ERROR_INCORRECT_HASH;
           XPIProvider.removeActiveInstall(this);
           return;
         }
 
         let fis = Cc["@mozilla.org/network/file-input-stream;1"].
@@ -6125,18 +6021,17 @@ class LocalAddonInstall extends AddonIns
               this.state = AddonManager.STATE_DOWNLOADED;
               AddonManagerPrivate.callInstallListeners("onNewInstall",
                                                        this.listeners,
                                                        this.wrapper);
               resolve();
             }
           }, AddonManager.UPDATE_WHEN_ADDON_INSTALLED);
         });
-      }
-      else {
+      } else {
         AddonManagerPrivate.callInstallListeners("onNewInstall",
                                                  this.listeners,
                                                  this.wrapper);
 
       }
     }).bind(this));
   }
 
@@ -6271,18 +6166,17 @@ class DownloadAddonInstall extends Addon
 
     try {
       this.file = getTemporaryFile();
       this.ownsTempFile = true;
       this.stream = Cc["@mozilla.org/network/file-output-stream;1"].
                     createInstance(Ci.nsIFileOutputStream);
       this.stream.init(this.file, FileUtils.MODE_WRONLY | FileUtils.MODE_CREATE |
                        FileUtils.MODE_TRUNCATE, FileUtils.PERMS_FILE, 0);
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("Failed to start download for addon " + this.sourceURI.spec, e);
       this.state = AddonManager.STATE_DOWNLOAD_FAILED;
       this.error = AddonManager.ERROR_FILE_ACCESS;
       XPIProvider.removeActiveInstall(this);
       AddonManagerPrivate.callInstallListeners("onDownloadFailed",
                                                this.listeners, this.wrapper);
       return;
     }
@@ -6302,18 +6196,17 @@ class DownloadAddonInstall extends Addon
       if (this.channel instanceof Ci.nsIHttpChannel) {
         this.channel.setRequestHeader("Moz-XPI-Update", "1", true);
         if (this.channel instanceof Ci.nsIHttpChannelInternal)
           this.channel.forceAllowThirdPartyCookie = true;
       }
       this.channel.asyncOpen2(listener);
 
       Services.obs.addObserver(this, "network:offline-about-to-go-offline", false);
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("Failed to start download for addon " + this.sourceURI.spec, e);
       this.state = AddonManager.STATE_DOWNLOAD_FAILED;
       this.error = AddonManager.ERROR_NETWORK_FAILURE;
       XPIProvider.removeActiveInstall(this);
       AddonManagerPrivate.callInstallListeners("onDownloadFailed",
                                                this.listeners, this.wrapper);
     }
   }
@@ -6343,18 +6236,17 @@ class DownloadAddonInstall extends Addon
         aOldChannel instanceof Ci.nsIHttpChannel) {
       try {
         let hashStr = aOldChannel.getResponseHeader("X-Target-Digest");
         let hashSplit = hashStr.toLowerCase().split(":");
         this.hash = {
           algorithm: hashSplit[0],
           data: hashSplit[1]
         };
-      }
-      catch (e) {
+      } catch (e) {
       }
     }
 
     // Verify that we don't end up on an insecure channel if we haven't got a
     // hash to verify with (see bug 537761 for discussion)
     if (!this.hash)
       this.badCertHandler.asyncOnChannelRedirect(aOldChannel, aNewChannel, aFlags, aCallback);
     else
@@ -6369,40 +6261,37 @@ class DownloadAddonInstall extends Addon
    * @see nsIStreamListener
    */
   onStartRequest(aRequest, aContext) {
     this.crypto = Cc["@mozilla.org/security/hash;1"].
                   createInstance(Ci.nsICryptoHash);
     if (this.hash) {
       try {
         this.crypto.initWithString(this.hash.algorithm);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("Unknown hash algorithm '" + this.hash.algorithm + "' for addon " + this.sourceURI.spec, e);
         this.state = AddonManager.STATE_DOWNLOAD_FAILED;
         this.error = AddonManager.ERROR_INCORRECT_HASH;
         XPIProvider.removeActiveInstall(this);
         AddonManagerPrivate.callInstallListeners("onDownloadFailed",
                                                  this.listeners, this.wrapper);
         aRequest.cancel(Cr.NS_BINDING_ABORTED);
         return;
       }
-    }
-    else {
+    } else {
       // We always need something to consume data from the inputstream passed
       // to onDataAvailable so just create a dummy cryptohasher to do that.
       this.crypto.initWithString("sha1");
     }
 
     this.progress = 0;
     if (aRequest instanceof Ci.nsIChannel) {
       try {
         this.maxProgress = aRequest.contentLength;
-      }
-      catch (e) {
+      } catch (e) {
       }
       logger.debug("Download started for " + this.sourceURI.spec + " to file " +
           this.file.path);
     }
   }
 
   /**
    * The download is complete.
@@ -6438,18 +6327,17 @@ class DownloadAddonInstall extends Addon
     logger.debug("Download of " + this.sourceURI.spec + " completed.");
 
     if (Components.isSuccessCode(aStatus)) {
       if (!(aRequest instanceof Ci.nsIHttpChannel) || aRequest.requestSucceeded) {
         if (!this.hash && (aRequest instanceof Ci.nsIChannel)) {
           try {
             CertUtils.checkCert(aRequest,
                                 !Preferences.get(PREF_INSTALL_REQUIREBUILTINCERTS, true));
-          }
-          catch (e) {
+          } catch (e) {
             this.downloadFailed(AddonManager.ERROR_NETWORK_FAILURE, e);
             return;
           }
         }
 
         // convert the binary hash data to a hex string.
         let calculatedHash = getHashStringForCrypto(this.crypto);
         this.crypto = null;
@@ -6458,39 +6346,35 @@ class DownloadAddonInstall extends Addon
                               "Downloaded file hash (" + calculatedHash +
                               ") did not match provided hash (" + this.hash.data + ")");
           return;
         }
 
         this.loadManifest(this.file).then(() => {
           if (this.addon.isCompatible) {
             this.downloadCompleted();
-          }
-          else {
+          } else {
             // TODO Should we send some event here (bug 557716)?
             this.state = AddonManager.STATE_CHECKING;
             new UpdateChecker(this.addon, {
               onUpdateFinished: aAddon => this.downloadCompleted(),
             }, AddonManager.UPDATE_WHEN_ADDON_INSTALLED);
           }
         }, ([error, message]) => {
           this.removeTemporaryFile();
           this.downloadFailed(error, message);
         });
-      }
-      else if (aRequest instanceof Ci.nsIHttpChannel) {
+      } else if (aRequest instanceof Ci.nsIHttpChannel) {
         this.downloadFailed(AddonManager.ERROR_NETWORK_FAILURE,
                             aRequest.responseStatus + " " +
                             aRequest.responseStatusText);
-      }
-      else {
+      } else {
         this.downloadFailed(AddonManager.ERROR_NETWORK_FAILURE, aStatus);
       }
-    }
-    else {
+    } else {
       this.downloadFailed(AddonManager.ERROR_NETWORK_FAILURE, aStatus);
     }
   }
 
   /**
    * Notify listeners that the download failed.
    *
    * @param  aReason
@@ -6506,18 +6390,17 @@ class DownloadAddonInstall extends Addon
     AddonManagerPrivate.callInstallListeners("onDownloadFailed", this.listeners,
                                              this.wrapper);
 
     // If the listener hasn't restarted the download then remove any temporary
     // file
     if (this.state == AddonManager.STATE_DOWNLOAD_FAILED) {
       logger.debug("downloadFailed: removing temp file for " + this.sourceURI.spec);
       this.removeTemporaryFile();
-    }
-    else
+    } else
       logger.debug("downloadFailed: listener changed AddonInstall state for " +
           this.sourceURI.spec + " to " + this.state);
   }
 
   /**
    * Notify listeners that the download completed.
    */
   downloadCompleted() {
@@ -6527,18 +6410,17 @@ class DownloadAddonInstall extends Addon
 
       this.state = AddonManager.STATE_DOWNLOADED;
       this.addon.updateDate = Date.now();
 
       if (this.existingAddon) {
         this.addon.existingAddonID = this.existingAddon.id;
         this.addon.installDate = this.existingAddon.installDate;
         applyBlocklistChanges(this.existingAddon, this.addon);
-      }
-      else {
+      } else {
         this.addon.installDate = this.addon.updateDate;
       }
 
       if (AddonManagerPrivate.callInstallListeners("onDownloadEnded",
                                                    this.listeners,
                                                    this.wrapper)) {
         // If a listener changed our state then do not proceed with the install
         if (this.state != AddonManager.STATE_DOWNLOADED)
@@ -6560,18 +6442,17 @@ class DownloadAddonInstall extends Addon
       let factory = Cc["@mozilla.org/prompter;1"].
                     getService(Ci.nsIPromptFactory);
       let prompt = factory.getPrompt(win, Ci.nsIAuthPrompt2);
 
       if (this.browser && prompt instanceof Ci.nsILoginManagerPrompter)
         prompt.browser = this.browser;
 
       return prompt;
-    }
-    else if (iid.equals(Ci.nsIChannelEventSink)) {
+    } else if (iid.equals(Ci.nsIChannelEventSink)) {
       return this;
     }
 
     return this.badCertHandler.getInterface(iid);
   }
 }
 
 /**
@@ -6616,18 +6497,17 @@ function createLocalInstall(file, locati
   if (!location) {
     location = XPIProvider.installLocationsByName[KEY_APP_PROFILE];
   }
   let url = Services.io.newFileURI(file);
 
   try {
     let install = new LocalAddonInstall(location, url);
     return install.init().then(() => install);
-  }
-  catch (e) {
+  } catch (e) {
     logger.error("Error creating install", e);
     XPIProvider.removeActiveInstall(this);
     return Promise.resolve(null);
   }
 }
 
 /**
  * Creates a new AddonInstall for an update.
@@ -6656,18 +6536,17 @@ function createUpdate(aCallback, aAddon,
       install = new LocalAddonInstall(aAddon._installLocation, url, opts);
       yield install.init();
     } else {
       install = new DownloadAddonInstall(aAddon._installLocation, url, opts);
     }
     try {
       if (aUpdate.updateInfoURL)
         install.releaseNotesURI = NetUtil.newURI(escapeAddonURI(aAddon, aUpdate.updateInfoURL));
-    }
-    catch (e) {
+    } catch (e) {
       // If the releaseNotesURI cannot be parsed then just ignore it.
     }
 
     aCallback(install);
   });
 }
 
 // This map is shared between AddonInstallWrapper and AddonWrapper
@@ -6809,18 +6688,17 @@ UpdateChecker.prototype = {
    *         The method to call on the listener
    */
   callListener(aMethod, ...aArgs) {
     if (!(aMethod in this.listener))
       return;
 
     try {
       this.listener[aMethod].apply(this.listener, aArgs);
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("Exception calling UpdateListener method " + aMethod, e);
     }
   },
 
   /**
    * Called when AddonUpdateChecker completes the update check
    *
    * @param  updates
@@ -6871,18 +6749,17 @@ UpdateChecker.prototype = {
       this.callListener("onCompatibilityUpdateAvailable", this.addon.wrapper);
     else
       this.callListener("onNoCompatibilityUpdateAvailable", this.addon.wrapper);
 
     function sendUpdateAvailableMessages(aSelf, aInstall) {
       if (aInstall) {
         aSelf.callListener("onUpdateAvailable", aSelf.addon.wrapper,
                            aInstall.wrapper);
-      }
-      else {
+      } else {
         aSelf.callListener("onNoUpdateAvailable", aSelf.addon.wrapper);
       }
       aSelf.callListener("onUpdateFinished", aSelf.addon.wrapper,
                          AddonManager.UPDATE_STATUS_NO_ERROR);
     }
 
     let compatOverrides = AddonManager.strictCompatibility ?
                             null :
@@ -6904,27 +6781,25 @@ UpdateChecker.prototype = {
           continue;
 
         // If the existing install has not yet started downloading then send an
         // available update notification. If it is already downloading then
         // don't send any available update notification
         if (currentInstall.state == AddonManager.STATE_AVAILABLE) {
           logger.debug("Found an existing AddonInstall for " + this.addon.id);
           sendUpdateAvailableMessages(this, currentInstall);
-        }
-        else
+        } else
           sendUpdateAvailableMessages(this, null);
         return;
       }
 
       createUpdate(aInstall => {
         sendUpdateAvailableMessages(this, aInstall);
       }, this.addon, update);
-    }
-    else {
+    } else {
       sendUpdateAvailableMessages(this, null);
     }
   },
 
   /**
    * Called when AddonUpdateChecker fails the update check
    *
    * @param  aError
@@ -7043,29 +6918,27 @@ AddonInternal.prototype = {
     // If any targetPlatform matches the OS and contains an ABI then we will
     // only match a targetPlatform that contains both the current OS and ABI
     let needsABI = false;
 
     // Some platforms do not specify an ABI, test against null in that case.
     let abi = null;
     try {
       abi = Services.appinfo.XPCOMABI;
-    }
-    catch (e) { }
+    } catch (e) { }
 
     // Something is causing errors in here
     try {
       for (let platform of this.targetPlatforms) {
         if (platform.os == Services.appinfo.OS) {
           if (platform.abi) {
             needsABI = true;
             if (platform.abi === abi)
               return true;
-          }
-          else {
+          } else {
             matchedOS = true;
           }
         }
       }
     } catch (e) {
       let message = "Problem with addon " + this.id + " targetPlatforms "
                     + JSON.stringify(this.targetPlatforms);
       logger.error(message, e);
@@ -7259,18 +7132,17 @@ AddonInternal.prototype = {
 
     // Add-ons that aren't installed cannot be modified in any way
     if (!(this.inDatabase))
       return permissions;
 
     if (!this.appDisabled) {
       if (this.userDisabled || this.softDisabled) {
         permissions |= AddonManager.PERM_CAN_ENABLE;
-      }
-      else if (this.type != "theme") {
+      } else if (this.type != "theme") {
         permissions |= AddonManager.PERM_CAN_DISABLE;
       }
     }
 
     // Add-ons that are in locked install locations, or are pending uninstall
     // cannot be upgraded or uninstalled
     if (!this._installLocation.locked && !this.pendingUninstall) {
       // Experiments cannot be upgraded.
@@ -7518,18 +7390,17 @@ AddonWrapper.prototype = {
     if (!(addon.inDatabase)) {
       // Add-on is pending install if there is no associated install (shouldn't
       // happen here) or if the install is in the process of or has successfully
       // completed the install. If an add-on is pending install then we ignore
       // any other pending operations.
       if (!addon._install || addon._install.state == AddonManager.STATE_INSTALLING ||
           addon._install.state == AddonManager.STATE_INSTALLED)
         return AddonManager.PENDING_INSTALL;
-    }
-    else if (addon.pendingUninstall) {
+    } else if (addon.pendingUninstall) {
       // If an add-on is pending uninstall then we ignore any other pending
       // operations
       return AddonManager.PENDING_UNINSTALL;
     }
 
     if (addon.active && addon.disabled)
       pending |= AddonManager.PENDING_DISABLE;
     else if (!addon.active && !addon.disabled)
@@ -7583,27 +7454,25 @@ AddonWrapper.prototype = {
       return val;
     }
 
     if (addon.inDatabase) {
       if (addon.type == "theme" && val) {
         if (addon.internalName == XPIProvider.defaultSkin)
           throw new Error("Cannot disable the default theme");
         XPIProvider.enableDefaultTheme();
-      }
-      else {
+      } else {
         // hidden and system add-ons should not be user disasbled,
         // as there is no UI to re-enable them.
         if (this.hidden) {
           throw new Error(`Cannot disable hidden add-on ${addon.id}`);
         }
         XPIProvider.updateAddonDisabledState(addon, val);
       }
-    }
-    else {
+    } else {
       addon.userDisabled = val;
       // When enabling remove the softDisabled flag
       if (!val)
         addon.softDisabled = false;
     }
 
     return val;
   },
@@ -7614,22 +7483,20 @@ AddonWrapper.prototype = {
       return val;
 
     if (addon.inDatabase) {
       // When softDisabling a theme just enable the active theme
       if (addon.type == "theme" && val && !addon.userDisabled) {
         if (addon.internalName == XPIProvider.defaultSkin)
           throw new Error("Cannot disable the default theme");
         XPIProvider.enableDefaultTheme();
-      }
-      else {
+      } else {
         XPIProvider.updateAddonDisabledState(addon, undefined, val);
       }
-    }
-    else if (!addon.userDisabled) {
+    } else if (!addon.userDisabled) {
       // Only set softDisabled if not already disabled
       addon.softDisabled = val;
     }
 
     return val;
   },
 
   get hidden() {
@@ -7720,22 +7587,20 @@ AddonWrapper.prototype = {
 
     let zipReader = Cc["@mozilla.org/libjar/zip-reader;1"].
                     createInstance(Ci.nsIZipReader);
     try {
       zipReader.open(bundle);
       let result = zipReader.hasEntry(aPath);
       addon._hasResourceCache.set(aPath, result);
       return result;
-    }
-    catch (e) {
+    } catch (e) {
       addon._hasResourceCache.set(aPath, false);
       return false;
-    }
-    finally {
+    } finally {
       zipReader.close();
     }
   },
 
   /**
    * Reloads the add-on.
    *
    * For temporarily installed add-ons, this uninstalls and re-installs the
@@ -7929,18 +7794,17 @@ PROP_LOCALE_SINGLE.forEach(function(aPro
     let result = null;
 
     if (addon.active) {
       try {
         let pref = PREF_EM_EXTENSION_FORMAT + addon.id + "." + aProp;
         let value = Preferences.get(pref, null, Ci.nsIPrefLocalizedString);
         if (value)
           result = value;
-      }
-      catch (e) {
+      } catch (e) {
       }
     }
 
     if (result == null)
       [result] = chooseValue(addon, addon.selectedLocale, aProp);
 
     if (aProp == "creator")
       return result ? new AddonManagerPrivate.AddonAuthor(result) : null;
@@ -8034,33 +7898,31 @@ DirectoryInstallLocation.prototype = {
       linkedDirectory = aFile.clone();
       try {
         linkedDirectory.normalize();
       } catch (e) {
         logger.warn("Symbolic link " + aFile.path + " points to a path" +
              " which does not exist");
         return null;
       }
-    }
-    else {
+    } else {
       let fis = Cc["@mozilla.org/network/file-input-stream;1"].
                 createInstance(Ci.nsIFileInputStream);
       fis.init(aFile, -1, -1, false);
       let line = { value: "" };
       if (fis instanceof Ci.nsILineInputStream)
         fis.readLine(line);
       fis.close();
       if (line.value) {
         linkedDirectory = Cc["@mozilla.org/file/local;1"].
                               createInstance(Ci.nsIFile);
 
         try {
           linkedDirectory.initWithPath(line.value);
-        }
-        catch (e) {
+        } catch (e) {
           linkedDirectory.setRelativeDescriptor(aFile.parent, line.value);
         }
       }
     }
 
     if (linkedDirectory) {
       if (!linkedDirectory.exists()) {
         logger.warn("File pointer " + aFile.path + " points to " + linkedDirectory.path +
@@ -8109,18 +7971,17 @@ DirectoryInstallLocation.prototype = {
       }
 
       if (!directLoad && (entry.isFile() || entry.isSymlink())) {
         let newEntry = this._readDirectoryFromFile(entry);
         if (!newEntry) {
           logger.debug("Deleting stale pointer file " + entry.path);
           try {
             entry.remove(true);
-          }
-          catch (e) {
+          } catch (e) {
             logger.warn("Failed to remove stale pointer file " + entry.path, e);
             // Failing to remove the stale pointer file is ignorable
           }
           continue;
         }
 
         entry = newEntry;
         this._linkedAddons.push(id);
@@ -8259,26 +8120,24 @@ Object.assign(MutableDirectoryInstallLoc
 
     if (this._stagingDirLock > 0)
       return;
 
     let dirEntries = dir.directoryEntries.QueryInterface(Ci.nsIDirectoryEnumerator);
     try {
       if (dirEntries.nextFile)
         return;
-    }
-    finally {
+    } finally {
       dirEntries.close();
     }
 
     try {
       setFilePermissions(dir, FileUtils.PERMS_DIRECTORY);
       dir.remove(false);
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("Failed to remove staging dir", e);
       // Failing to remove the staging directory is ignorable
     }
   },
 
   /**
    * Returns a directory that is normally on the same filesystem as the rest of
    * the install location and can be used for temporarily storing files during
@@ -8373,32 +8232,29 @@ Object.assign(MutableDirectoryInstallLoc
 
             transaction.moveTo(oldDataDir, newDataDir);
           }
         }
       }
 
       if (action == "copy") {
         transaction.copy(source, this._directory);
-      }
-      else if (action == "move") {
+      } else if (action == "move") {
         if (source.isFile())
           flushJarCache(source);
 
         transaction.moveUnder(source, this._directory);
       }
       // Do nothing for the proxy file as we sideload an addon permanently
-    }
-    finally {
+    } finally {
       // It isn't ideal if this cleanup fails but it isn't worth rolling back
       // the install because of it.
       try {
         recursiveRemove(trashDir);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("Failed to remove trash directory when installing " + id, e);
       }
     }
 
     let newFile = this._directory.clone();
 
     if (action == "proxy") {
       // When permanently installing sideloaded addon, we just put a proxy file
@@ -8407,17 +8263,17 @@ Object.assign(MutableDirectoryInstallLoc
 
       writeStringToFile(newFile, source.path);
     } else {
       newFile.append(source.leafName);
     }
 
     try {
       newFile.lastModifiedTime = Date.now();
-    } catch (e)  {
+    } catch (e) {
       logger.warn("failed to set lastModifiedTime on " + newFile.path, e);
     }
     this._IDToFileMap[id] = newFile;
     XPIProvider._addURIMapping(id, newFile);
 
     if (existingAddonID && existingAddonID != id &&
         existingAddonID in this._IDToFileMap) {
       delete this._IDToFileMap[existingAddonID];
@@ -8460,24 +8316,22 @@ Object.assign(MutableDirectoryInstallLoc
       logger.debug("uninstallAddon: flushing jar cache " + file.path + " for addon " + aId);
       flushJarCache(file);
     }
 
     let transaction = new SafeInstallOperation();
 
     try {
       transaction.moveUnder(file, trashDir);
-    }
-    finally {
+    } finally {
       // It isn't ideal if this cleanup fails, but it is probably better than
       // rolling back the uninstall at this point
       try {
         recursiveRemove(trashDir);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("Failed to remove trash directory when uninstalling " + aId, e);
       }
     }
 
     delete this._IDToFileMap[aId];
   },
 });
 
@@ -8507,18 +8361,17 @@ function SystemAddonInstallLocation(aNam
 
   this._addonSet = this._loadAddonSet();
 
   this._directory = null;
   if (this._addonSet.directory) {
     this._directory = aDirectory.clone();
     this._directory.append(this._addonSet.directory);
     logger.info("SystemAddonInstallLocation scanning directory " + this._directory.path);
-  }
-  else {
+  } else {
     logger.info("SystemAddonInstallLocation directory is missing");
   }
 
   DirectoryInstallLocation.call(this, aName, this._directory, aScope);
   this.locked = false;
 }
 
 SystemAddonInstallLocation.prototype = Object.create(DirectoryInstallLocation.prototype);
@@ -8542,26 +8395,24 @@ Object.assign(SystemAddonInstallLocation
 
     if (this._stagingDirLock > 0)
       return;
 
     let dirEntries = dir.directoryEntries.QueryInterface(Ci.nsIDirectoryEnumerator);
     try {
       if (dirEntries.nextFile)
         return;
-    }
-    finally {
+    } finally {
       dirEntries.close();
     }
 
     try {
       setFilePermissions(dir, FileUtils.PERMS_DIRECTORY);
       dir.remove(false);
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("Failed to remove staging dir", e);
       // Failing to remove the staging directory is ignorable
     }
   },
 
   /**
    * Gets the staging directory to put add-ons that are pending install and
    * uninstall into.
@@ -8571,18 +8422,17 @@ Object.assign(SystemAddonInstallLocation
   getStagingDir() {
     this._addonSet = this._loadAddonSet();
     let dir = null;
     if (this._addonSet.directory) {
       this._directory = this._baseDir.clone();
       this._directory.append(this._addonSet.directory);
       dir = this._directory.clone();
       dir.append(DIR_STAGE);
-    }
-    else {
+    } else {
       logger.info("SystemAddonInstallLocation directory is missing");
     }
 
     return dir;
   },
 
   requestStagingDir() {
     this._stagingDirLock++;
@@ -8622,18 +8472,17 @@ Object.assign(SystemAddonInstallLocation
   _loadAddonSet() {
     try {
       let setStr = Preferences.get(PREF_SYSTEM_ADDON_SET, null);
       if (setStr) {
         let addonSet = JSON.parse(setStr);
         if ((typeof addonSet == "object") && addonSet.schema == 1)
           return addonSet;
       }
-    }
-    catch (e) {
+    } catch (e) {
       logger.error("Malformed system add-on set, resetting.");
     }
 
     return { schema: 1, addons: {} };
   },
 
   /**
    * Saves the current set of system add-ons
@@ -8748,18 +8597,17 @@ Object.assign(SystemAddonInstallLocation
     // System add-ons directory does not exist
     if (!(yield OS.File.exists(this._baseDir.path))) {
       return;
     }
 
     let iterator;
     try {
       iterator = new OS.File.DirectoryIterator(this._baseDir.path);
-    }
-    catch (e) {
+    } catch (e) {
       logger.error("Failed to clean updated system add-ons directories.", e);
       return;
     }
 
     try {
       let entries = [];
 
       yield iterator.forEach(entry => {
@@ -8775,28 +8623,25 @@ Object.assign(SystemAddonInstallLocation
       });
 
       for (let entry of entries) {
         if (entry.isDir) {
           yield OS.File.removeDir(entry.path, {
             ignoreAbsent: true,
             ignorePermissions: true,
           });
-        }
-        else {
+        } else {
           yield OS.File.remove(entry.path, {
             ignoreAbsent: true,
           });
         }
       }
-    }
-    catch (e) {
+    } catch (e) {
       logger.error("Failed to clean updated system add-ons directories.", e);
-    }
-    finally {
+    } finally {
       iterator.close();
     }
   }),
 
   /**
    * Installs a new set of system add-ons into the location and updates the
    * add-on set in prefs.
    *
@@ -8822,18 +8667,17 @@ Object.assign(SystemAddonInstallLocation
     newDir.append("blank");
 
     while (true) {
       newDir.leafName = uuidGen.generateUUID().toString();
 
       try {
         yield OS.File.makeDir(newDir.path, { ignoreExisting: false });
         break;
-      }
-      catch (e) {
+      } catch (e) {
         logger.debug("Could not create new system add-on updates dir, retrying", e);
       }
     }
 
     // Record the new upgrade directory.
     let state = { schema: 1, directory: newDir.leafName, addons: {} };
     this._saveAddonSet(state);
 
@@ -8882,30 +8726,28 @@ Object.assign(SystemAddonInstallLocation
         addon => AddonManagerPrivate.hasUpgradeListener(addon.id)
       );
 
       if (blockers.length > 0) {
         yield waitForAllPromises(installs.map(postponeAddon));
       } else {
         yield waitForAllPromises(installs.map(installAddon));
       }
-    }
-    catch (e) {
+    } catch (e) {
       // Roll back to previous upgrade set (if present) on restart.
       if (previousState) {
         this._saveAddonSet(previousState);
       }
       // Otherwise, roll back to built-in set on restart.
       // TODO try to do these restartlessly
       this.resetAddonSet();
 
       try {
         yield OS.File.removeDir(newDir.path, { ignorePermissions: true });
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn(`Failed to remove failed system add-on directory ${newDir.path}.`, e);
       }
       throw e;
     }
   }),
 
  /**
   * Resumes upgrade of a previously-delayed add-on set.
@@ -8969,34 +8811,32 @@ Object.assign(SystemAddonInstallLocation
     // If any of these operations fails the finally block will clean up the
     // temporary directory
     try {
       if (source.isFile()) {
         flushJarCache(source);
       }
 
       transaction.moveUnder(source, this._directory);
-    }
-    finally {
+    } finally {
       // It isn't ideal if this cleanup fails but it isn't worth rolling back
       // the install because of it.
       try {
         recursiveRemove(trashDir);
-      }
-      catch (e) {
+      } catch (e) {
         logger.warn("Failed to remove trash directory when installing " + id, e);
       }
     }
 
     let newFile = this._directory.clone();
     newFile.append(source.leafName);
 
     try {
       newFile.lastModifiedTime = Date.now();
-    } catch (e)  {
+    } catch (e) {
       logger.warn("failed to set lastModifiedTime on " + newFile.path, e);
     }
     this._IDToFileMap[id] = newFile;
     XPIProvider._addURIMapping(id, newFile);
 
     return newFile;
   },
 
@@ -9040,18 +8880,17 @@ function WinRegInstallLocation(aName, aR
   let path = this._appKeyPath + "\\Extensions";
   let key = Cc["@mozilla.org/windows-registry-key;1"].
             createInstance(Ci.nsIWindowsRegKey);
 
   // Reading the registry may throw an exception, and that's ok.  In error
   // cases, we just leave ourselves in the empty state.
   try {
     key.open(this._rootKey, path, Ci.nsIWindowsRegKey.ACCESS_READ);
-  }
-  catch (e) {
+  } catch (e) {
     return;
   }
 
   this._readAddons(key);
   key.close();
 }
 
 WinRegInstallLocation.prototype = {
--- a/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
+++ b/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
@@ -164,18 +164,17 @@ function getRepositoryAddon(aAddon, aCal
 
 /**
  * Wrap an API-supplied function in an exception handler to make it safe to call
  */
 function makeSafe(aCallback) {
   return function(...aArgs) {
     try {
       aCallback(...aArgs);
-    }
-    catch (ex) {
+    } catch (ex) {
       logger.warn("XPI Database callback failed", ex);
     }
   }
 }
 
 /**
  * A helper method to asynchronously call a function on an array
  * of objects, calling a callback when function(x) has been gathered
@@ -207,36 +206,34 @@ function asyncMap(aObjects, aMethod, aCa
     }
   }
 
   aObjects.map(function(aObject, aIndex, aArray) {
     try {
       aMethod(aObject, function(aResult) {
         asyncMap_gotValue(aIndex, aResult);
       });
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("Async map function failed", e);
       asyncMap_gotValue(aIndex, undefined);
     }
   });
 }
 
 /**
  * A generator to synchronously return result rows from an mozIStorageStatement.
  *
  * @param  aStatement
  *         The statement to execute
  */
 function* resultRows(aStatement) {
   try {
     while (stepStatement(aStatement))
       yield aStatement.row;
-  }
-  finally {
+  } finally {
     aStatement.reset();
   }
 }
 
 /**
  * A helper function to log an SQL error.
  *
  * @param  aError
@@ -253,18 +250,17 @@ function logSQLError(aError, aErrorStrin
  * occurs.
  *
  * @param  aStatement
  *         A mozIStorageStatement to execute
  */
 function stepStatement(aStatement) {
   try {
     return aStatement.executeStep();
-  }
-  catch (e) {
+  } catch (e) {
     logSQLError(XPIDatabase.connection.lastError,
                 XPIDatabase.connection.lastErrorString);
     throw e;
   }
 }
 
 /**
  * Copies properties from one object to another. If no target object is passed
@@ -304,18 +300,17 @@ function DBAddonInternal(aLoaded) {
 
   if (!this.dependencies)
     this.dependencies = [];
   Object.freeze(this.dependencies);
 
   if (aLoaded._installLocation) {
     this._installLocation = aLoaded._installLocation;
     this.location = aLoaded._installLocation.name;
-  }
-  else if (aLoaded.location) {
+  } else if (aLoaded.location) {
     this._installLocation = XPIProvider.installLocationsByName[this.location];
   }
 
   this._key = this.location + ":" + this.id;
 
   if (!aLoaded._sourceBundle) {
     throw new Error("Expected passed argument to contain a descriptor");
   }
@@ -507,18 +502,17 @@ this.XPIDatabase = {
    *              if there is useful information
    */
   getMigrateDataFromSQLITE() {
     let connection = null;
     let dbfile = FileUtils.getFile(KEY_PROFILEDIR, [FILE_DATABASE], true);
     // Attempt to open the database
     try {
       connection = Services.storage.openUnsharedDatabase(dbfile);
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("Failed to open sqlite database " + dbfile.path + " for upgrade", e);
       return null;
     }
     logger.debug("Migrating data from sqlite");
     let migrateData = this.getMigrateDataFromDatabase(connection);
     connection.close();
     return migrateData;
   },
@@ -561,37 +555,32 @@ this.XPIDatabase = {
         let read = 0;
         do {
           read = cstream.readString(0xffffffff, str); // read as much as we can and put it in str.value
           data += str.value;
         } while (read != 0);
 
         readTimer.done();
         this.parseDB(data, aRebuildOnError);
-      }
-      catch (e) {
+      } catch (e) {
         logger.error("Failed to load XPI JSON data from profile", e);
         let rebuildTimer = AddonManagerPrivate.simpleTimer("XPIDB_rebuildReadFailed_MS");
         this.rebuildDatabase(aRebuildOnError);
         rebuildTimer.done();
-      }
-      finally {
+      } finally {
         if (cstream)
           cstream.close();
       }
-    }
-    catch (e) {
+    } catch (e) {
       if (e.result === Cr.NS_ERROR_FILE_NOT_FOUND) {
         this.upgradeDB(aRebuildOnError);
-      }
-      else {
+      } else {
         this.rebuildUnreadableDB(e, aRebuildOnError);
       }
-    }
-    finally {
+    } finally {
       if (fstream)
         fstream.close();
     }
     // If an async load was also in progress, record in telemetry.
     if (this._dbPromise) {
       AddonManagerPrivate.recordSimpleMeasure("XPIDB_overlapped_load", 1);
     }
     this._dbPromise = Promise.resolve(this.addonDB);
@@ -632,40 +621,37 @@ this.XPIDatabase = {
       }
       // If we got here, we probably have good data
       // Make AddonInternal instances from the loaded data and save them
       let addonDB = new Map();
       for (let loadedAddon of inputAddons.addons) {
         loadedAddon._sourceBundle = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
         try {
           loadedAddon._sourceBundle.persistentDescriptor = loadedAddon.descriptor;
-        }
-        catch (e) {
+        } catch (e) {
           // We can fail here when the descriptor is invalid, usually from the
           // wrong OS
           logger.warn("Could not find source bundle for add-on " + loadedAddon.id, e);
         }
 
         let newAddon = new DBAddonInternal(loadedAddon);
         addonDB.set(newAddon._key, newAddon);
       }
       parseTimer.done();
       this.addonDB = addonDB;
       logger.debug("Successfully read XPI database");
       this.initialized = true;
-    }
-    catch (e) {
+    } catch (e) {
       // If we catch and log a SyntaxError from the JSON
       // parser, the xpcshell test harness fails the test for us: bug 870828
       parseTimer.done();
       if (e.name == "SyntaxError") {
         logger.error("Syntax error parsing saved XPI JSON data");
         AddonManagerPrivate.recordSimpleMeasure("XPIDB_startupError", "syntax");
-      }
-      else {
+      } else {
         logger.error("Failed to load XPI JSON data from profile", e);
         AddonManagerPrivate.recordSimpleMeasure("XPIDB_startupError", "other");
       }
       let rebuildTimer = AddonManagerPrivate.simpleTimer("XPIDB_rebuildReadFailed_MS");
       this.rebuildDatabase(aRebuildOnError);
       rebuildTimer.done();
     }
   },
@@ -676,24 +662,22 @@ this.XPIDatabase = {
   upgradeDB(aRebuildOnError) {
     let upgradeTimer = AddonManagerPrivate.simpleTimer("XPIDB_upgradeDB_MS");
     try {
       let schemaVersion = Services.prefs.getIntPref(PREF_DB_SCHEMA);
       if (schemaVersion <= LAST_SQLITE_DB_SCHEMA) {
         // we should have an older SQLITE database
         logger.debug("Attempting to upgrade from SQLITE database");
         this.migrateData = this.getMigrateDataFromSQLITE();
-      }
-      else {
+      } else {
         // we've upgraded before but the JSON file is gone, fall through
         // and rebuild from scratch
         AddonManagerPrivate.recordSimpleMeasure("XPIDB_startupError", "dbMissing");
       }
-    }
-    catch (e) {
+    } catch (e) {
       // No schema version pref means either a really old upgrade (RDF) or
       // a new profile
       this.migrateData = this.getMigrateDataFromRDF();
     }
 
     this.rebuildDatabase(aRebuildOnError);
     upgradeTimer.done();
   },
@@ -754,18 +738,17 @@ this.XPIDatabase = {
     .catch(
       error => {
         if (this.addonDB) {
           logger.debug("Synchronous load completed while waiting for async load");
           return this.addonDB;
         }
         if (error.becauseNoSuchFile) {
           this.upgradeDB(true);
-        }
-        else {
+        } else {
           // it's there but unreadable
           this.rebuildUnreadableDB(error, true);
         }
         return this.addonDB;
       });
   },
 
   /**
@@ -791,18 +774,17 @@ this.XPIDatabase = {
     // that were active during the last run
     if (!this.migrateData)
       this.activeBundles = this.getActiveBundles();
 
     if (aRebuildOnError) {
       logger.warn("Rebuilding add-ons database from installed extensions.");
       try {
         XPIDatabaseReconcile.processFileChanges({}, false);
-      }
-      catch (e) {
+      } catch (e) {
         logger.error("Failed to rebuild XPI database from installed extensions", e);
       }
       // Make sure to update the active add-ons and add-ons list on shutdown
       Services.prefs.setBoolPref(PREF_PENDING_OPERATIONS, true);
     }
   },
 
   /**
@@ -828,18 +810,17 @@ this.XPIDatabase = {
     try {
       let iniFactory = Cc["@mozilla.org/xpcom/ini-parser-factory;1"]
                          .getService(Ci.nsIINIParserFactory);
       let parser = iniFactory.createINIParser(addonsList);
       let keys = parser.getKeys("ExtensionDirs");
 
       while (keys.hasMore())
         bundles.push(parser.getString("ExtensionDirs", keys.getNext()));
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("Failed to parse extensions.ini", e);
       return null;
     }
 
     // Also include the list of active bootstrapped extensions
     for (let id in XPIProvider.bootstrappedAddons)
       bundles.push(XPIProvider.bootstrappedAddons[id].descriptor);
 
@@ -895,27 +876,25 @@ this.XPIDatabase = {
             let appInfo = {
               id: getRDFProperty(ds, targetApp, "id")
             };
 
             let minVersion = getRDFProperty(ds, targetApp, "updatedMinVersion");
             if (minVersion) {
               appInfo.minVersion = minVersion;
               appInfo.maxVersion = getRDFProperty(ds, targetApp, "updatedMaxVersion");
-            }
-            else {
+            } else {
               appInfo.minVersion = getRDFProperty(ds, targetApp, "minVersion");
               appInfo.maxVersion = getRDFProperty(ds, targetApp, "maxVersion");
             }
             migrateData[location][id].targetApplications.push(appInfo);
           }
         }
       }
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("Error reading " + FILE_OLD_DATABASE, e);
       migrateData = null;
     }
 
     return migrateData;
   },
 
   /**
@@ -936,21 +915,19 @@ this.XPIDatabase = {
                         "installDate", "version"];
 
       let reqCount = 0;
       let props = [];
       for (let row of resultRows(stmt)) {
         if (REQUIRED.indexOf(row.name) != -1) {
           reqCount++;
           props.push(row.name);
-        }
-        else if (DB_METADATA.indexOf(row.name) != -1) {
+        } else if (DB_METADATA.indexOf(row.name) != -1) {
           props.push(row.name);
-        }
-        else if (DB_BOOL_METADATA.indexOf(row.name) != -1) {
+        } else if (DB_BOOL_METADATA.indexOf(row.name) != -1) {
           props.push(row.name);
         }
       }
 
       if (reqCount < REQUIRED.length) {
         logger.error("Unable to read anything useful from the database");
         return null;
       }
@@ -988,23 +965,21 @@ this.XPIDatabase = {
             migrateData[location][id].targetApplications.push({
               id: row.id,
               minVersion: row.minVersion,
               maxVersion: row.maxVersion
             });
           }
         }
       }
-    }
-    catch (e) {
+    } catch (e) {
       // An error here means the schema is too different to read
       logger.error("Error migrating data", e);
       return null;
-    }
-    finally {
+    } finally {
       if (taStmt)
         taStmt.finalize();
       if (stmt)
         stmt.finalize();
     }
 
     return migrateData;
   },
@@ -1454,18 +1429,17 @@ this.XPIDatabase = {
     let dssEnabled = false;
     try {
       dssEnabled = Services.prefs.getBoolPref(PREF_EM_DSS_ENABLED);
     } catch (e) {}
 
     let themes = [];
     if (dssEnabled) {
       themes = _filterDB(this.addonDB, aAddon => aAddon.type == "theme");
-    }
-    else {
+    } else {
       let activeTheme = _findAddon(
         this.addonDB,
         aAddon => (aAddon.type == "theme") &&
                   (aAddon.internalName == XPIProvider.selectedSkin));
       if (activeTheme) {
         themes.push(activeTheme);
       }
     }
@@ -1496,29 +1470,26 @@ this.XPIDatabase = {
         let addonsListTmp = FileUtils.getFile(KEY_PROFILEDIR, [FILE_XPI_ADDONS_LIST + ".tmp"],
                                               true);
         var fos = FileUtils.openFileOutputStream(addonsListTmp);
         fos.write(text, text.length);
         fos.close();
         addonsListTmp.moveTo(addonsListTmp.parent, FILE_XPI_ADDONS_LIST);
 
         Services.prefs.setCharPref(PREF_EM_ENABLED_ADDONS, enabledAddons.join(","));
-      }
-      catch (e) {
+      } catch (e) {
         logger.error("Failed to write add-ons list to profile directory", e);
         return false;
       }
-    }
-    else {
+    } else {
       if (addonsList.exists()) {
         logger.debug("Deleting add-ons list");
         try {
           addonsList.remove(false);
-        }
-        catch (e) {
+        } catch (e) {
           logger.error("Failed to remove " + addonsList.path, e);
           return false;
         }
       }
 
       Services.prefs.clearUserPref(PREF_EM_ENABLED_ADDONS);
     }
     return true;
@@ -1622,18 +1593,17 @@ this.XPIDatabaseReconcile = {
         file.persistentDescriptor = aAddonState.descriptor;
         aNewAddon = syncLoadManifestFromFile(file, aInstallLocation);
       }
       // The add-on in the manifest should match the add-on ID.
       if (aNewAddon.id != aId) {
         throw new Error("Invalid addon ID: expected addon ID " + aId +
                         ", found " + aNewAddon.id + " in manifest");
       }
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("addMetadata: Add-on " + aId + " is invalid", e);
 
       // Remove the invalid add-on from the install location if the install
       // location isn't locked, no restart will be necessary
       if (aInstallLocation.isLinkedAddon(aId))
         logger.warn("Not uninstalling invalid item because it is a proxy file");
       else if (aInstallLocation.locked)
         logger.warn("Could not uninstall invalid item from locked install location");
@@ -1758,18 +1728,17 @@ this.XPIDatabaseReconcile = {
         // change to the add-ons files.
         aNewAddon.pendingUninstall = aOldAddon.pendingUninstall;
       }
 
       // The ID in the manifest that was loaded must match the ID of the old
       // add-on.
       if (aNewAddon.id != aOldAddon.id)
         throw new Error("Incorrect id in install manifest for existing add-on " + aOldAddon.id);
-    }
-    catch (e) {
+    } catch (e) {
       logger.warn("updateMetadata: Add-on " + aOldAddon.id + " is invalid", e);
       XPIDatabase.removeAddonMetadata(aOldAddon);
       XPIStates.removeAddon(aOldAddon.location, aOldAddon.id);
       if (!aInstallLocation.locked)
         aInstallLocation.uninstallAddon(aOldAddon.id);
       else
         logger.warn("Could not uninstall invalid item from locked install location");
 
@@ -1901,18 +1870,17 @@ this.XPIDatabaseReconcile = {
       return aManifests[aInstallLocation.name][aId];
     };
 
     // Add-ons loaded from the database can have an uninitialized _sourceBundle
     // if the descriptor was invalid. Swallow that error and say they don't exist.
     let exists = (aAddon) => {
       try {
         return aAddon._sourceBundle.exists();
-      }
-      catch (e) {
+      } catch (e) {
         if (e.result == Cr.NS_ERROR_NOT_INITIALIZED)
           return false;
         throw e;
       }
     };
 
     // Get the previous add-ons from the database and put them into maps by location
     let previousAddons = new Map();
@@ -1969,37 +1937,33 @@ this.XPIDatabaseReconcile = {
             //
             // Also reload the metadata for add-ons in the application directory
             // when the application version has changed.
             let newAddon = loadedManifest(installLocation, id);
             if (newAddon || oldAddon.updateDate != xpiState.mtime ||
                 (aUpdateCompatibility && (installLocation.name == KEY_APP_GLOBAL ||
                                           installLocation.name == KEY_APP_SYSTEM_DEFAULTS))) {
               newAddon = this.updateMetadata(installLocation, oldAddon, xpiState, newAddon);
-            }
-            else if (oldAddon.descriptor != xpiState.descriptor) {
+            } else if (oldAddon.descriptor != xpiState.descriptor) {
               newAddon = this.updateDescriptor(installLocation, oldAddon, xpiState);
-            }
-            // Check compatility when the application version and/or schema
-            // version has changed. A schema change also reloads metadata from
-            // the manifests.
-            else if (aUpdateCompatibility || aSchemaChange) {
+            } else if (aUpdateCompatibility || aSchemaChange) {
+              // Check compatility when the application version and/or schema
+              // version has changed. A schema change also reloads metadata from
+              // the manifests.
               newAddon = this.updateCompatibility(installLocation, oldAddon, xpiState,
                                                   aOldAppVersion, aOldPlatformVersion,
                                                   aSchemaChange);
-            }
-            else {
+            } else {
               // No change
               newAddon = oldAddon;
             }
 
             if (newAddon)
               locationAddonMap.set(newAddon.id, newAddon);
-          }
-          else {
+          } else {
             // The add-on is in the DB, but not in xpiState (and thus not on disk).
             this.removeMetadata(oldAddon);
           }
         }
       }
 
       // Any add-on in our current location that we haven't seen needs to
       // be added to the database.
@@ -2080,33 +2044,31 @@ this.XPIDatabaseReconcile = {
           // then it was probably either softDisabled or userDisabled
           if (!isActive && !currentAddon.disabled) {
             // If the add-on is softblocked then assume it is softDisabled
             if (currentAddon.blocklistState == Blocklist.STATE_SOFTBLOCKED)
               currentAddon.softDisabled = true;
             else
               currentAddon.userDisabled = true;
           }
-        }
-        else {
+        } else {
           // This is a new install
           if (currentAddon.foreignInstall)
             AddonManagerPrivate.addStartupChange(AddonManager.STARTUP_CHANGE_INSTALLED, id);
 
           if (currentAddon.bootstrap) {
             AddonManagerPrivate.addStartupChange(AddonManager.STARTUP_CHANGE_INSTALLED, id);
             // Visible bootstrapped add-ons need to have their install method called
             XPIProvider.callBootstrapMethod(currentAddon, currentAddon._sourceBundle,
                                             "install", BOOTSTRAP_REASONS.ADDON_INSTALL);
             if (!isActive)
               XPIProvider.unloadBootstrapScope(currentAddon.id);
           }
         }
-      }
-      else {
+      } else {
         if (previousAddon !== currentAddon) {
           // This is an add-on that has changed, either the metadata was reloaded
           // or the version in a different location has become visible
           AddonManagerPrivate.addStartupChange(AddonManager.STARTUP_CHANGE_CHANGED, id);
 
           let installReason = Services.vc.compare(previousAddon.version, currentAddon.version) < 0 ?
                               BOOTSTRAP_REASONS.ADDON_UPGRADE :
                               BOOTSTRAP_REASONS.ADDON_DOWNGRADE;
--- a/toolkit/mozapps/extensions/nsBlocklistService.js
+++ b/toolkit/mozapps/extensions/nsBlocklistService.js
@@ -103,18 +103,17 @@ XPCOMUtils.defineLazyGetter(this, "gApp"
   }
   return appinfo;
 });
 
 XPCOMUtils.defineLazyGetter(this, "gABI", function() {
   let abi = null;
   try {
     abi = gApp.XPCOMABI;
-  }
-  catch (e) {
+  } catch (e) {
     LOG("BlockList Global gABI: XPCOM ABI unknown.");
   }
 
   if (AppConstants.platform == "macosx") {
     // Mac universal build should report a different ABI than either macppc
     // or mactel.
     let macutils = Cc["@mozilla.org/xpcom/mac-utils;1"].
                    getService(Ci.nsIMacUtils);
@@ -126,26 +125,24 @@ XPCOMUtils.defineLazyGetter(this, "gABI"
 });
 
 XPCOMUtils.defineLazyGetter(this, "gOSVersion", function() {
   let osVersion;
   let sysInfo = Cc["@mozilla.org/system-info;1"].
                 getService(Ci.nsIPropertyBag2);
   try {
     osVersion = sysInfo.getProperty("name") + " " + sysInfo.getProperty("version");
-  }
-  catch (e) {
+  } catch (e) {
     LOG("BlockList Global gOSVersion: OS Version unknown.");
   }
 
   if (osVersion) {
     try {
       osVersion += " (" + sysInfo.getProperty("secondaryLibrary") + ")";
-    }
-    catch (e) {
+    } catch (e) {
       // Not all platforms have a secondary widget library, so an error is nothing to worry about.
     }
     osVersion = encodeURIComponent(osVersion);
   }
   return osVersion;
 });
 
 // shared code for suppressing bad cert dialogs
@@ -177,18 +174,17 @@ function LOG(string) {
  *          The default value to return in the event the preference has
  *          no setting
  * @returns The value of the preference, or undefined if there was no
  *          user or default value.
  */
 function getPref(func, preference, defaultValue) {
   try {
     return gPref[func](preference);
-  }
-  catch (e) {
+  } catch (e) {
   }
   return defaultValue;
 }
 
 /**
  * Constructs a URI to a spec.
  * @param   spec
  *          The spec to construct a URI to
@@ -512,38 +508,35 @@ Blocklist.prototype = {
   },
 
   notify(aTimer) {
     if (!gBlocklistEnabled)
       return;
 
     try {
       var dsURI = gPref.getCharPref(PREF_BLOCKLIST_URL);
-    }
-    catch (e) {
+    } catch (e) {
       LOG("Blocklist::notify: The " + PREF_BLOCKLIST_URL + " preference" +
           " is missing!");
       return;
     }
 
     var pingCountVersion = getPref("getIntPref", PREF_BLOCKLIST_PINGCOUNTVERSION, 0);
     var pingCountTotal = getPref("getIntPref", PREF_BLOCKLIST_PINGCOUNTTOTAL, 1);
     var daysSinceLastPing = 0;
     if (pingCountVersion == 0) {
       daysSinceLastPing = "new";
-    }
-    else {
+    } else {
       // Seconds in one day is used because nsIUpdateTimerManager stores the
       // last update time in seconds.
       let secondsInDay = 60 * 60 * 24;
       let lastUpdateTime = getPref("getIntPref", PREF_BLOCKLIST_LASTUPDATETIME, 0);
       if (lastUpdateTime == 0) {
         daysSinceLastPing = "invalid";
-      }
-      else {
+      } else {
         let now = Math.round(Date.now() / 1000);
         daysSinceLastPing = Math.floor((now - lastUpdateTime) / secondsInDay);
       }
 
       if (daysSinceLastPing == 0 || daysSinceLastPing == "invalid") {
         pingCountVersion = pingCountTotal = "invalid";
       }
     }
@@ -597,18 +590,17 @@ Blocklist.prototype = {
         pingCountTotal = -1;
       }
       gPref.setIntPref(PREF_BLOCKLIST_PINGCOUNTTOTAL, pingCountTotal);
     }
 
     // Verify that the URI is valid
     try {
       var uri = newURI(dsURI);
-    }
-    catch (e) {
+    } catch (e) {
       LOG("Blocklist::notify: There was an error creating the blocklist URI\r\n" +
           "for: " + dsURI + ", error: " + e);
       return;
     }
 
     LOG("Blocklist::notify: Requesting " + uri.spec);
     let request = new ServiceRequest();
     request.open("GET", uri.spec, true);
@@ -637,18 +629,17 @@ Blocklist.prototype = {
       });
     }
   },
 
   onXMLLoad: Task.async(function*(aEvent) {
     let request = aEvent.target;
     try {
       gCertUtils.checkCert(request.channel);
-    }
-    catch (e) {
+    } catch (e) {
       LOG("Blocklist::onXMLLoad: " + e);
       return;
     }
     let responseXML = request.responseXML;
     if (!responseXML || responseXML.documentElement.namespaceURI == XMLURI_PARSE_ERROR ||
         (request.status != 200 && request.status != 0)) {
       LOG("Blocklist::onXMLLoad: there was an error during load");
       return;
@@ -673,18 +664,17 @@ Blocklist.prototype = {
     }
   }),
 
   onXMLError(aEvent) {
     try {
       var request = aEvent.target;
       // the following may throw (e.g. a local file or timeout)
       var status = request.status;
-    }
-    catch (e) {
+    } catch (e) {
       request = aEvent.target.channel.QueryInterface(Ci.nsIRequest);
       status = request.status;
     }
     var statusText = "nsIXMLHttpRequest channel unavailable";
     // When status is 0 we don't have a valid channel.
     if (status != 0) {
       try {
         statusText = request.statusText;
@@ -939,18 +929,17 @@ Blocklist.prototype = {
         }
       }
       if (populateCertBlocklist) {
         gCertBlocklistService.saveEntries();
       }
       if (this._gfxEntries.length > 0) {
         this._notifyObserversBlocklistGFX();
       }
-    }
-    catch (e) {
+    } catch (e) {
       LOG("Blocklist::_loadBlocklistFromFile: Error constructing blocklist " + e);
       return;
     }
   },
 
   _processItemNodes(itemNodes, itemName, handler) {
     var result = [];
     for (var i = 0; i < itemNodes.length; ++i) {
@@ -1025,18 +1014,17 @@ Blocklist.prototype = {
         let prefElements = childElement.childNodes;
         for (let i = 0; i < prefElements.length; i++) {
           let prefElement = prefElements.item(i);
           if (!(prefElement instanceof Ci.nsIDOMElement) ||
               prefElement.localName !== "pref")
             continue;
           blockEntry.prefs.push(prefElement.textContent);
         }
-      }
-      else if (childElement.localName === "versionRange")
+      } else if (childElement.localName === "versionRange")
         blockEntry.versions.push(new BlocklistItemData(childElement));
     }
     // if only the extension ID is specified block all versions of the
     // extension for the current application.
     if (blockEntry.versions.length == 0)
       blockEntry.versions.push(new BlocklistItemData(null));
 
     blockEntry.blockID = blocklistElement.getAttribute("blockID");
@@ -1067,18 +1055,17 @@ Blocklist.prototype = {
           blockEntry.matches[name] = new RegExp(exp, "m");
           hasMatch = true;
         } catch (e) {
           // Ignore invalid regular expressions
         }
       }
       if (matchElement.localName == "versionRange") {
         blockEntry.versions.push(new BlocklistItemData(matchElement));
-      }
-      else if (matchElement.localName == "infoURL") {
+      } else if (matchElement.localName == "infoURL") {
         blockEntry.infoURL = matchElement.textContent;
       }
     }
     // Plugin entries require *something* to match to an actual plugin
     if (!hasMatch)
       return;
     // Add a default versionRange if there wasn't one specified
     if (blockEntry.versions.length == 0)
@@ -1134,18 +1121,17 @@ Blocklist.prototype = {
           const childValue = trim(childElement.textContent);
           // Make sure no empty value is added.
           if (childValue) {
             if (/,/.test(childValue)) {
               // Devices can't contain comma.
               // (c.f serialization in _notifyObserversBlocklistGFX)
               const e = new Error(`Unsupported device name ${childValue}`);
               Components.utils.reportError(e);
-            }
-            else {
+            } else {
               value.push(childValue);
             }
           }
         }
       } else if (matchElement.localName == "versionRange") {
         value = {minVersion: trim(matchElement.getAttribute("minVersion")) || "0",
                  maxVersion: trim(matchElement.getAttribute("maxVersion")) || "*"};
       } else {
@@ -1409,18 +1395,17 @@ Blocklist.prototype = {
             oldState + " to " + state);
         // We don't want to re-warn about items
         if (state == oldState)
           continue;
 
         if (oldState == Ci.nsIBlocklistService.STATE_BLOCKED) {
           if (state == Ci.nsIBlocklistService.STATE_SOFTBLOCKED)
             plugin.enabledState = Ci.nsIPluginTag.STATE_DISABLED;
-        }
-        else if (!plugin.disabled && state != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) {
+        } else if (!plugin.disabled && state != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) {
           if (state != Ci.nsIBlocklistService.STATE_OUTDATED &&
               state != Ci.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE &&
               state != Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE) {
             addonList.push({
               name: plugin.name,
               version: plugin.version,
               icon: "chrome://mozapps/skin/plugins/pluginGeneric.png",
               disable: false,
--- a/toolkit/mozapps/extensions/test/browser/browser_bug573062.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug573062.js
@@ -81,17 +81,17 @@ function test() {
 
     // Check the buttons in the details view.
     function checkTooltips2(aItem, aEnable, aDisable, aRemove) {
         let detailEnable = aWindow.document.getElementById("detail-enable-btn");
     let detailDisable = aWindow.document.getElementById("detail-disable-btn");
     let detailUninstall = aWindow.document.getElementById("detail-uninstall-btn");
       ok(detailEnable.getAttribute("tooltiptext") == aEnable);
       ok(detailDisable.getAttribute("tooltiptext") == aDisable);
-      ok(detailUninstall.getAttribute("tooltiptext")  == aRemove);
+      ok(detailUninstall.getAttribute("tooltiptext") == aRemove);
     }
 
     function showInDetailView(aAddonId) {
       aWindow.gViewController.loadView("addons://detail/" +
                                        aWindow.encodeURIComponent(aAddonId));
     }
 
     // enable-disable:
--- a/toolkit/mozapps/extensions/test/browser/browser_discovery.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_discovery.js
@@ -100,18 +100,17 @@ function getHash(aBrowser) {
   return null;
 }
 
 function testHash(aBrowser, aTestAddonVisible, aCallback) {
   var hash = getHash(aBrowser);
   isnot(hash, null, "There should be a hash");
   try {
     var data = JSON.parse(hash);
-  }
-  catch (e) {
+  } catch (e) {
     ok(false, "Hash should have been valid JSON: " + e);
     aCallback();
     return;
   }
   is(typeof data, "object", "Hash should be a JS object");
 
   // Ensure that at least the test add-ons are present
   if (aTestAddonVisible[0])
@@ -511,17 +510,17 @@ add_test(function() {
     // This will actually stop the about:blank load
     browser.stop();
   });
 });
 
 // Test for Bug 703929 - Loading the discover view from a chrome XUL file fails when
 // the add-on manager is reopened.
 add_test(function() {
-  const url = "chrome://mochitests/content/" +  RELATIVE_DIR + "addon_about.xul";
+  const url = "chrome://mochitests/content/" + RELATIVE_DIR + "addon_about.xul";
   Services.prefs.setCharPref(PREF_DISCOVERURL, url);
 
   open_manager("addons://discover/", function(aWindow) {
     gManagerWindow = aWindow;
     gCategoryUtilities = new CategoryUtilities(gManagerWindow);
 
     var browser = gManagerWindow.document.getElementById("discover-browser");
     is(getURL(browser), url, "Loading a chrome XUL file should work");
@@ -536,17 +535,17 @@ add_test(function() {
       close_manager(gManagerWindow, run_next_test);
     });
   });
 });
 
 // Bug 711693 - Send the compatibility mode when loading the Discovery pane
 add_test(function() {
   info("Test '%COMPATIBILITY_MODE%' in the URL is correctly replaced by 'normal'");
-  Services.prefs.setCharPref(PREF_DISCOVERURL,  MAIN_URL + "?mode=%COMPATIBILITY_MODE%");
+  Services.prefs.setCharPref(PREF_DISCOVERURL, MAIN_URL + "?mode=%COMPATIBILITY_MODE%");
   Services.prefs.setBoolPref(PREF_STRICT_COMPAT, false);
 
   open_manager("addons://discover/", function(aWindow) {
     gManagerWindow = aWindow;
     var browser = gManagerWindow.document.getElementById("discover-browser");
     is(getURL(browser), MAIN_URL + "?mode=normal", "Should have loaded the right url");
     close_manager(gManagerWindow, run_next_test);
   });
--- a/toolkit/mozapps/extensions/test/browser/browser_installssl.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_installssl.js
@@ -31,27 +31,25 @@ function test() {
               getService(Ci.nsICertOverrideService);
     cos.clearValidityOverride("nocert.example.com", -1);
     cos.clearValidityOverride("self-signed.example.com", -1);
     cos.clearValidityOverride("untrusted.example.com", -1);
     cos.clearValidityOverride("expired.example.com", -1);
 
     try {
       Services.prefs.clearUserPref(PREF_INSTALL_REQUIREBUILTINCERTS);
-    }
-    catch (e) {
+    } catch (e) {
     }
 
     if (gPendingInstall) {
       gTests = [];
       ok(false, "Timed out in the middle of downloading " + gPendingInstall.sourceURI.spec);
       try {
         gPendingInstall.cancel();
-      }
-      catch (e) {
+      } catch (e) {
       }
     }
   });
 
   run_next_test();
 }
 
 function end_test() {
@@ -71,18 +69,17 @@ function run_install_tests(callback) {
     }
     gLast = Date.now();
 
     let [mainURL, redirectURL, expectedStatus] = gTests.shift();
     if (redirectURL) {
       var url = mainURL + redirect + redirectURL + xpi;
       var message = "Should have seen the right result for an install redirected from " +
                     mainURL + " to " + redirectURL;
-    }
-    else {
+    } else {
       url = mainURL + xpi;
       message = "Should have seen the right result for an install from " +
                 mainURL;
     }
 
     AddonManager.getInstallForURL(url, function(install) {
       gPendingInstall = install;
       install.addListener({
@@ -117,258 +114,258 @@ function addCertOverrides() {
   addCertOverride("untrusted.example.com", Ci.nsICertOverrideService.ERROR_UNTRUSTED);
   addCertOverride("expired.example.com", Ci.nsICertOverrideService.ERROR_TIME);
 }
 
 // Runs tests with built-in certificates required, no certificate exceptions
 // and no hashes
 add_test(function() {
   // Tests that a simple install works as expected.
-  add_install_test(HTTP,       null,       SUCCESS);
-  add_install_test(HTTPS,      null,       NETWORK_FAILURE);
-  add_install_test(NOCERT,     null,       NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, null,       NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  null,       NETWORK_FAILURE);
-  add_install_test(EXPIRED,    null,       NETWORK_FAILURE);
+  add_install_test(HTTP, null, SUCCESS);
+  add_install_test(HTTPS, null, NETWORK_FAILURE);
+  add_install_test(NOCERT, null, NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, null, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, null, NETWORK_FAILURE);
+  add_install_test(EXPIRED, null, NETWORK_FAILURE);
 
   // Tests that redirecting from http to other servers works as expected
-  add_install_test(HTTP,       HTTP,       SUCCESS);
-  add_install_test(HTTP,       HTTPS,      SUCCESS);
-  add_install_test(HTTP,       NOCERT,     NETWORK_FAILURE);
-  add_install_test(HTTP,       SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(HTTP,       UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(HTTP,       EXPIRED,    NETWORK_FAILURE);
+  add_install_test(HTTP, HTTP, SUCCESS);
+  add_install_test(HTTP, HTTPS, SUCCESS);
+  add_install_test(HTTP, NOCERT, NETWORK_FAILURE);
+  add_install_test(HTTP, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(HTTP, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(HTTP, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from valid https to other servers works as expected
-  add_install_test(HTTPS,      HTTP,       NETWORK_FAILURE);
-  add_install_test(HTTPS,      HTTPS,      NETWORK_FAILURE);
-  add_install_test(HTTPS,      NOCERT,     NETWORK_FAILURE);
-  add_install_test(HTTPS,      SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(HTTPS,      UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(HTTPS,      EXPIRED,    NETWORK_FAILURE);
+  add_install_test(HTTPS, HTTP, NETWORK_FAILURE);
+  add_install_test(HTTPS, HTTPS, NETWORK_FAILURE);
+  add_install_test(HTTPS, NOCERT, NETWORK_FAILURE);
+  add_install_test(HTTPS, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(HTTPS, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(HTTPS, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from nocert https to other servers works as expected
-  add_install_test(NOCERT,     HTTP,       NETWORK_FAILURE);
-  add_install_test(NOCERT,     HTTPS,      NETWORK_FAILURE);
-  add_install_test(NOCERT,     NOCERT,     NETWORK_FAILURE);
-  add_install_test(NOCERT,     SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(NOCERT,     UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(NOCERT,     EXPIRED,    NETWORK_FAILURE);
+  add_install_test(NOCERT, HTTP, NETWORK_FAILURE);
+  add_install_test(NOCERT, HTTPS, NETWORK_FAILURE);
+  add_install_test(NOCERT, NOCERT, NETWORK_FAILURE);
+  add_install_test(NOCERT, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(NOCERT, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(NOCERT, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from self-signed https to other servers works as expected
-  add_install_test(SELFSIGNED, HTTP,       NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, HTTPS,      NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, NOCERT,     NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, HTTP, NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, HTTPS, NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, NOCERT, NETWORK_FAILURE);
   add_install_test(SELFSIGNED, SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, EXPIRED,    NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from untrusted https to other servers works as expected
-  add_install_test(UNTRUSTED,  HTTP,       NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  HTTPS,      NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  NOCERT,     NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  EXPIRED,    NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, HTTP, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, HTTPS, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, NOCERT, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from expired https to other servers works as expected
-  add_install_test(EXPIRED,    HTTP,       NETWORK_FAILURE);
-  add_install_test(EXPIRED,    HTTPS,      NETWORK_FAILURE);
-  add_install_test(EXPIRED,    NOCERT,     NETWORK_FAILURE);
-  add_install_test(EXPIRED,    SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(EXPIRED,    UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(EXPIRED,    EXPIRED,    NETWORK_FAILURE);
+  add_install_test(EXPIRED, HTTP, NETWORK_FAILURE);
+  add_install_test(EXPIRED, HTTPS, NETWORK_FAILURE);
+  add_install_test(EXPIRED, NOCERT, NETWORK_FAILURE);
+  add_install_test(EXPIRED, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(EXPIRED, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(EXPIRED, EXPIRED, NETWORK_FAILURE);
 
   run_install_tests(run_next_test);
 });
 
 // Runs tests without requiring built-in certificates, no certificate
 // exceptions and no hashes
 add_test(function() {
   Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false);
 
   // Tests that a simple install works as expected.
-  add_install_test(HTTP,       null,       SUCCESS);
-  add_install_test(HTTPS,      null,       SUCCESS);
-  add_install_test(NOCERT,     null,       NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, null,       NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  null,       NETWORK_FAILURE);
-  add_install_test(EXPIRED,    null,       NETWORK_FAILURE);
+  add_install_test(HTTP, null, SUCCESS);
+  add_install_test(HTTPS, null, SUCCESS);
+  add_install_test(NOCERT, null, NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, null, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, null, NETWORK_FAILURE);
+  add_install_test(EXPIRED, null, NETWORK_FAILURE);
 
   // Tests that redirecting from http to other servers works as expected
-  add_install_test(HTTP,       HTTP,       SUCCESS);
-  add_install_test(HTTP,       HTTPS,      SUCCESS);
-  add_install_test(HTTP,       NOCERT,     NETWORK_FAILURE);
-  add_install_test(HTTP,       SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(HTTP,       UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(HTTP,       EXPIRED,    NETWORK_FAILURE);
+  add_install_test(HTTP, HTTP, SUCCESS);
+  add_install_test(HTTP, HTTPS, SUCCESS);
+  add_install_test(HTTP, NOCERT, NETWORK_FAILURE);
+  add_install_test(HTTP, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(HTTP, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(HTTP, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from valid https to other servers works as expected
-  add_install_test(HTTPS,      HTTP,       NETWORK_FAILURE);
-  add_install_test(HTTPS,      HTTPS,      SUCCESS);
-  add_install_test(HTTPS,      NOCERT,     NETWORK_FAILURE);
-  add_install_test(HTTPS,      SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(HTTPS,      UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(HTTPS,      EXPIRED,    NETWORK_FAILURE);
+  add_install_test(HTTPS, HTTP, NETWORK_FAILURE);
+  add_install_test(HTTPS, HTTPS, SUCCESS);
+  add_install_test(HTTPS, NOCERT, NETWORK_FAILURE);
+  add_install_test(HTTPS, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(HTTPS, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(HTTPS, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from nocert https to other servers works as expected
-  add_install_test(NOCERT,     HTTP,       NETWORK_FAILURE);
-  add_install_test(NOCERT,     HTTPS,      NETWORK_FAILURE);
-  add_install_test(NOCERT,     NOCERT,     NETWORK_FAILURE);
-  add_install_test(NOCERT,     SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(NOCERT,     UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(NOCERT,     EXPIRED,    NETWORK_FAILURE);
+  add_install_test(NOCERT, HTTP, NETWORK_FAILURE);
+  add_install_test(NOCERT, HTTPS, NETWORK_FAILURE);
+  add_install_test(NOCERT, NOCERT, NETWORK_FAILURE);
+  add_install_test(NOCERT, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(NOCERT, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(NOCERT, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from self-signed https to other servers works as expected
-  add_install_test(SELFSIGNED, HTTP,       NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, HTTPS,      NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, NOCERT,     NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, HTTP, NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, HTTPS, NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, NOCERT, NETWORK_FAILURE);
   add_install_test(SELFSIGNED, SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, EXPIRED,    NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from untrusted https to other servers works as expected
-  add_install_test(UNTRUSTED,  HTTP,       NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  HTTPS,      NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  NOCERT,     NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  EXPIRED,    NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, HTTP, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, HTTPS, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, NOCERT, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from expired https to other servers works as expected
-  add_install_test(EXPIRED,    HTTP,       NETWORK_FAILURE);
-  add_install_test(EXPIRED,    HTTPS,      NETWORK_FAILURE);
-  add_install_test(EXPIRED,    NOCERT,     NETWORK_FAILURE);
-  add_install_test(EXPIRED,    SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(EXPIRED,    UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(EXPIRED,    EXPIRED,    NETWORK_FAILURE);
+  add_install_test(EXPIRED, HTTP, NETWORK_FAILURE);
+  add_install_test(EXPIRED, HTTPS, NETWORK_FAILURE);
+  add_install_test(EXPIRED, NOCERT, NETWORK_FAILURE);
+  add_install_test(EXPIRED, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(EXPIRED, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(EXPIRED, EXPIRED, NETWORK_FAILURE);
 
   run_install_tests(run_next_test);
 });
 
 // Runs tests with built-in certificates required, all certificate exceptions
 // and no hashes
 add_test(function() {
   Services.prefs.clearUserPref(PREF_INSTALL_REQUIREBUILTINCERTS);
   addCertOverrides();
 
   // Tests that a simple install works as expected.
-  add_install_test(HTTP,       null,       SUCCESS);
-  add_install_test(HTTPS,      null,       NETWORK_FAILURE);
-  add_install_test(NOCERT,     null,       NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, null,       NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  null,       NETWORK_FAILURE);
-  add_install_test(EXPIRED,    null,       NETWORK_FAILURE);
+  add_install_test(HTTP, null, SUCCESS);
+  add_install_test(HTTPS, null, NETWORK_FAILURE);
+  add_install_test(NOCERT, null, NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, null, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, null, NETWORK_FAILURE);
+  add_install_test(EXPIRED, null, NETWORK_FAILURE);
 
   // Tests that redirecting from http to other servers works as expected
-  add_install_test(HTTP,       HTTP,       SUCCESS);
-  add_install_test(HTTP,       HTTPS,      SUCCESS);
-  add_install_test(HTTP,       NOCERT,     SUCCESS);
-  add_install_test(HTTP,       SELFSIGNED, SUCCESS);
-  add_install_test(HTTP,       UNTRUSTED,  SUCCESS);
-  add_install_test(HTTP,       EXPIRED,    SUCCESS);
+  add_install_test(HTTP, HTTP, SUCCESS);
+  add_install_test(HTTP, HTTPS, SUCCESS);
+  add_install_test(HTTP, NOCERT, SUCCESS);
+  add_install_test(HTTP, SELFSIGNED, SUCCESS);
+  add_install_test(HTTP, UNTRUSTED, SUCCESS);
+  add_install_test(HTTP, EXPIRED, SUCCESS);
 
   // Tests that redirecting from valid https to other servers works as expected
-  add_install_test(HTTPS,      HTTP,       NETWORK_FAILURE);
-  add_install_test(HTTPS,      HTTPS,      NETWORK_FAILURE);
-  add_install_test(HTTPS,      NOCERT,     NETWORK_FAILURE);
-  add_install_test(HTTPS,      SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(HTTPS,      UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(HTTPS,      EXPIRED,    NETWORK_FAILURE);
+  add_install_test(HTTPS, HTTP, NETWORK_FAILURE);
+  add_install_test(HTTPS, HTTPS, NETWORK_FAILURE);
+  add_install_test(HTTPS, NOCERT, NETWORK_FAILURE);
+  add_install_test(HTTPS, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(HTTPS, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(HTTPS, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from nocert https to other servers works as expected
-  add_install_test(NOCERT,     HTTP,       NETWORK_FAILURE);
-  add_install_test(NOCERT,     HTTPS,      NETWORK_FAILURE);
-  add_install_test(NOCERT,     NOCERT,     NETWORK_FAILURE);
-  add_install_test(NOCERT,     SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(NOCERT,     UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(NOCERT,     EXPIRED,    NETWORK_FAILURE);
+  add_install_test(NOCERT, HTTP, NETWORK_FAILURE);
+  add_install_test(NOCERT, HTTPS, NETWORK_FAILURE);
+  add_install_test(NOCERT, NOCERT, NETWORK_FAILURE);
+  add_install_test(NOCERT, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(NOCERT, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(NOCERT, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from self-signed https to other servers works as expected
-  add_install_test(SELFSIGNED, HTTP,       NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, HTTPS,      NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, NOCERT,     NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, HTTP, NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, HTTPS, NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, NOCERT, NETWORK_FAILURE);
   add_install_test(SELFSIGNED, SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, EXPIRED,    NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from untrusted https to other servers works as expected
-  add_install_test(UNTRUSTED,  HTTP,       NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  HTTPS,      NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  NOCERT,     NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  EXPIRED,    NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, HTTP, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, HTTPS, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, NOCERT, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, EXPIRED, NETWORK_FAILURE);
 
   // Tests that redirecting from expired https to other servers works as expected
-  add_install_test(EXPIRED,    HTTP,       NETWORK_FAILURE);
-  add_install_test(EXPIRED,    HTTPS,      NETWORK_FAILURE);
-  add_install_test(EXPIRED,    NOCERT,     NETWORK_FAILURE);
-  add_install_test(EXPIRED,    SELFSIGNED, NETWORK_FAILURE);
-  add_install_test(EXPIRED,    UNTRUSTED,  NETWORK_FAILURE);
-  add_install_test(EXPIRED,    EXPIRED,    NETWORK_FAILURE);
+  add_install_test(EXPIRED, HTTP, NETWORK_FAILURE);
+  add_install_test(EXPIRED, HTTPS, NETWORK_FAILURE);
+  add_install_test(EXPIRED, NOCERT, NETWORK_FAILURE);
+  add_install_test(EXPIRED, SELFSIGNED, NETWORK_FAILURE);
+  add_install_test(EXPIRED, UNTRUSTED, NETWORK_FAILURE);
+  add_install_test(EXPIRED, EXPIRED, NETWORK_FAILURE);
 
   run_install_tests(run_next_test);
 });
 
 // Runs tests without requiring built-in certificates, all certificate
 // exceptions and no hashes
 add_test(function() {
   Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false);
 
   // Tests that a simple install works as expected.
-  add_install_test(HTTP,       null,       SUCCESS);
-  add_install_test(HTTPS,      null,       SUCCESS);
-  add_install_test(NOCERT,     null,       SUCCESS);
-  add_install_test(SELFSIGNED, null,       SUCCESS);
-  add_install_test(UNTRUSTED,  null,       SUCCESS);
-  add_install_test(EXPIRED,    null,       SUCCESS);
+  add_install_test(HTTP, null, SUCCESS);
+  add_install_test(HTTPS, null, SUCCESS);
+  add_install_test(NOCERT, null, SUCCESS);
+  add_install_test(SELFSIGNED, null, SUCCESS);
+  add_install_test(UNTRUSTED, null, SUCCESS);
+  add_install_test(EXPIRED, null, SUCCESS);
 
   // Tests that redirecting from http to other servers works as expected
-  add_install_test(HTTP,       HTTP,       SUCCESS);
-  add_install_test(HTTP,       HTTPS,      SUCCESS);
-  add_install_test(HTTP,       NOCERT,     SUCCESS);
-  add_install_test(HTTP,       SELFSIGNED, SUCCESS);
-  add_install_test(HTTP,       UNTRUSTED,  SUCCESS);
-  add_install_test(HTTP,       EXPIRED,    SUCCESS);
+  add_install_test(HTTP, HTTP, SUCCESS);
+  add_install_test(HTTP, HTTPS, SUCCESS);
+  add_install_test(HTTP, NOCERT, SUCCESS);
+  add_install_test(HTTP, SELFSIGNED, SUCCESS);
+  add_install_test(HTTP, UNTRUSTED, SUCCESS);
+  add_install_test(HTTP, EXPIRED, SUCCESS);
 
   // Tests that redirecting from valid https to other servers works as expected
-  add_install_test(HTTPS,      HTTP,       NETWORK_FAILURE);
-  add_install_test(HTTPS,      HTTPS,      SUCCESS);
-  add_install_test(HTTPS,      NOCERT,     SUCCESS);
-  add_install_test(HTTPS,      SELFSIGNED, SUCCESS);
-  add_install_test(HTTPS,      UNTRUSTED,  SUCCESS);
-  add_install_test(HTTPS,      EXPIRED,    SUCCESS);
+  add_install_test(HTTPS, HTTP, NETWORK_FAILURE);
+  add_install_test(HTTPS, HTTPS, SUCCESS);
+  add_install_test(HTTPS, NOCERT, SUCCESS);
+  add_install_test(HTTPS, SELFSIGNED, SUCCESS);
+  add_install_test(HTTPS, UNTRUSTED, SUCCESS);
+  add_install_test(HTTPS, EXPIRED, SUCCESS);
 
   // Tests that redirecting from nocert https to other servers works as expected
-  add_install_test(NOCERT,     HTTP,       NETWORK_FAILURE);
-  add_install_test(NOCERT,     HTTPS,      SUCCESS);
-  add_install_test(NOCERT,     NOCERT,     SUCCESS);
-  add_install_test(NOCERT,     SELFSIGNED, SUCCESS);
-  add_install_test(NOCERT,     UNTRUSTED,  SUCCESS);
-  add_install_test(NOCERT,     EXPIRED,    SUCCESS);
+  add_install_test(NOCERT, HTTP, NETWORK_FAILURE);
+  add_install_test(NOCERT, HTTPS, SUCCESS);
+  add_install_test(NOCERT, NOCERT, SUCCESS);
+  add_install_test(NOCERT, SELFSIGNED, SUCCESS);
+  add_install_test(NOCERT, UNTRUSTED, SUCCESS);
+  add_install_test(NOCERT, EXPIRED, SUCCESS);
 
   // Tests that redirecting from self-signed https to other servers works as expected
-  add_install_test(SELFSIGNED, HTTP,       NETWORK_FAILURE);
-  add_install_test(SELFSIGNED, HTTPS,      SUCCESS);
-  add_install_test(SELFSIGNED, NOCERT,     SUCCESS);
+  add_install_test(SELFSIGNED, HTTP, NETWORK_FAILURE);
+  add_install_test(SELFSIGNED, HTTPS, SUCCESS);
+  add_install_test(SELFSIGNED, NOCERT, SUCCESS);
   add_install_test(SELFSIGNED, SELFSIGNED, SUCCESS);
-  add_install_test(SELFSIGNED, UNTRUSTED,  SUCCESS);
-  add_install_test(SELFSIGNED, EXPIRED,    SUCCESS);
+  add_install_test(SELFSIGNED, UNTRUSTED, SUCCESS);
+  add_install_test(SELFSIGNED, EXPIRED, SUCCESS);
 
   // Tests that redirecting from untrusted https to other servers works as expected
-  add_install_test(UNTRUSTED,  HTTP,       NETWORK_FAILURE);
-  add_install_test(UNTRUSTED,  HTTPS,      SUCCESS);
-  add_install_test(UNTRUSTED,  NOCERT,     SUCCESS);
-  add_install_test(UNTRUSTED,  SELFSIGNED, SUCCESS);
-  add_install_test(UNTRUSTED,  UNTRUSTED,  SUCCESS);
-  add_install_test(UNTRUSTED,  EXPIRED,    SUCCESS);
+  add_install_test(UNTRUSTED, HTTP, NETWORK_FAILURE);
+  add_install_test(UNTRUSTED, HTTPS, SUCCESS);
+  add_install_test(UNTRUSTED, NOCERT, SUCCESS);
+  add_install_test(UNTRUSTED, SELFSIGNED, SUCCESS);
+  add_install_test(UNTRUSTED, UNTRUSTED, SUCCESS);
+  add_install_test(UNTRUSTED, EXPIRED, SUCCESS);
 
   // Tests that redirecting from expired https to other servers works as expected
-  add_install_test(EXPIRED,    HTTP,       NETWORK_FAILURE);
-  add_install_test(EXPIRED,    HTTPS,      SUCCESS);
-  add_install_test(EXPIRED,    NOCERT,     SUCCESS);
-  add_install_test(EXPIRED,    SELFSIGNED, SUCCESS);
-  add_install_test(EXPIRED,    UNTRUSTED,  SUCCESS);
-  add_install_test(EXPIRED,    EXPIRED,    SUCCESS);
+  add_install_test(EXPIRED, HTTP, NETWORK_FAILURE);
+  add_install_test(EXPIRED, HTTPS, SUCCESS);
+  add_install_test(EXPIRED, NOCERT, SUCCESS);
+  add_install_test(EXPIRED, SELFSIGNED, SUCCESS);
+  add_install_test(EXPIRED, UNTRUSTED, SUCCESS);
+  add_install_test(EXPIRED, EXPIRED, SUCCESS);
 
   run_install_tests(run_next_test);
 });
--- a/toolkit/mozapps/extensions/test/browser/browser_list.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_list.js
@@ -770,18 +770,17 @@ add_task(function*() {
   EventUtils.synthesizeKey("VK_TAB", { shiftKey: true }, gManagerWindow);
   is(fm.focusedElement, addon.parentNode, "Focus should have moved to the list");
 
   EventUtils.synthesizeKey("VK_TAB", { shiftKey: true }, gManagerWindow);
   ok(!is_node_in_list(fm.focusedElement), "Focus should be outside the list");
 
   try {
     Services.prefs.clearUserPref("accessibility.tabfocus_applies_to_xul");
-  }
-  catch (e) { }
+  } catch (e) { }
 });
 
 
 add_task(function*() {
   info("Enabling lightweight theme");
   LightweightThemeManager.currentTheme = gLWTheme;
 
   gManagerWindow.loadView("addons://list/theme");
--- a/toolkit/mozapps/extensions/test/browser/browser_purchase.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_purchase.js
@@ -144,18 +144,17 @@ add_test(function() {
     BrowserTestUtils.browserLoaded(event.target.linkedBrowser, false, wantLoad).then(() => {
       is(gBrowser.currentURI.spec, TESTROOT + "releaseNotes.xhtml?addon5", "Should have loaded the right page");
 
       gBrowser.removeCurrentTab();
 
       if (gUseInContentUI) {
         is(gBrowser.currentURI.spec, "about:addons", "Should be back to the add-ons manager");
         run_next_test();
-      }
-      else {
+      } else {
         waitForFocus(run_next_test, gManagerWindow);
       }
     });
   }, true);
 
   var list = gManagerWindow.document.getElementById("search-list");
   EventUtils.synthesizeMouseAtCenter(get_purchase_btn(list.firstChild), { }, gManagerWindow);
 });
@@ -170,18 +169,17 @@ add_test(function() {
     BrowserTestUtils.browserLoaded(event.target.linkedBrowser, false, wantLoad).then(() => {
       is(gBrowser.currentURI.spec, TESTROOT + "releaseNotes.xhtml?addon4", "Should have loaded the right page");
 
       gBrowser.removeCurrentTab();
 
       if (gUseInContentUI) {
         is(gBrowser.currentURI.spec, "about:addons", "Should be back to the add-ons manager");
         run_next_test();
-      }
-      else {
+      } else {
         waitForFocus(run_next_test, gManagerWindow);
       }
     });
   }, true);
 
   var list = gManagerWindow.document.getElementById("search-list");
   var item = list.firstChild.nextSibling;
   list.ensureElementIsVisible(item);
--- a/toolkit/mozapps/extensions/test/browser/browser_searching.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_searching.js
@@ -175,26 +175,24 @@ function get_actual_results() {
       }
 
       let result = sourceURI.match(/^http:\/\/example\.com\/(.+)\.xpi$/);
       if (result != null) {
         is(item.mInstall.name.indexOf("PASS"), 0, "Install name should start with PASS");
         results.push({name: result[1], item});
         continue;
       }
-    }
-    else if (item.mAddon) {
+    } else if (item.mAddon) {
       let result = item.mAddon.id.match(/^(.+)@tests\.mozilla\.org$/);
       if (result != null) {
         is(item.mAddon.name.indexOf("PASS"), 0, "Addon name should start with PASS");
         results.push({name: result[1], item});
         continue;
       }
-    }
-    else {
+    } else {
       ok(false, "Found an item in the list that was neither installing or installed");
     }
   }
 
   return results;
 }
 
 /*
@@ -262,18 +260,17 @@ function get_expected_results(aSortBy, a
  * @param  aShowLocal
  *         Boolean representing if local results are being shown
  */
 function check_results(aQuery, aSortBy, aReverseOrder, aShowLocal) {
 
   var xpinstall_enabled = true;
   try {
     xpinstall_enabled = Services.prefs.getBoolPref(PREF_XPI_ENABLED);
-  }
-  catch (e) {}
+  } catch (e) {}
 
   // When XPI Instalation is disabled, those buttons are hidden and unused
   if (xpinstall_enabled) {
     var localFilterSelected = gManagerWindow.document.getElementById("search-filter-local").selected;
     var remoteFilterSelected = gManagerWindow.document.getElementById("search-filter-remote").selected;
     is(localFilterSelected, aShowLocal, "Local filter should be selected if showing local items");
     is(remoteFilterSelected, !aShowLocal, "Remote filter should be selected if showing remote items");
   }
--- a/toolkit/mozapps/extensions/test/browser/browser_updatessl.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_updatessl.js
@@ -76,18 +76,17 @@ function run_update_tests(callback) {
     }
     gLast = Date.now();
 
     let [mainURL, redirectURL, expectedStatus] = gTests.shift();
     if (redirectURL) {
       var url = mainURL + redirect + redirectURL + updaterdf;
       var message = "Should have seen the right result for an update check redirected from " +
                     mainURL + " to " + redirectURL;
-    }
-    else {
+    } else {
       url = mainURL + updaterdf;
       message = "Should have seen the right result for an update check from " +
                 mainURL;
     }
 
     AddonUpdateChecker.checkForUpdates("addon1@tests.mozilla.org",
                                        null, url, {
       onUpdateCheckComplete(updates) {
@@ -114,257 +113,257 @@ function addCertOverrides() {
   addCertOverride("self-signed.example.com", Ci.nsICertOverrideService.ERROR_UNTRUSTED);
   addCertOverride("untrusted.example.com", Ci.nsICertOverrideService.ERROR_UNTRUSTED);
   addCertOverride("expired.example.com", Ci.nsICertOverrideService.ERROR_TIME);
 }
 
 // Runs tests with built-in certificates required and no certificate exceptions.
 add_test(function() {
   // Tests that a simple update.rdf retrieval works as expected.
-  add_update_test(HTTP,       null,       SUCCESS);
-  add_update_test(HTTPS,      null,       DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     null,       DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, null,       DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  null,       DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    null,       DOWNLOAD_ERROR);
+  add_update_test(HTTP, null, SUCCESS);
+  add_update_test(HTTPS, null, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, null, DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, null, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, null, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, null, DOWNLOAD_ERROR);
 
   // Tests that redirecting from http to other servers works as expected
-  add_update_test(HTTP,       HTTP,       SUCCESS);
-  add_update_test(HTTP,       HTTPS,      SUCCESS);
-  add_update_test(HTTP,       NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(HTTP,       SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(HTTP,       UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(HTTP,       EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(HTTP, HTTP, SUCCESS);
+  add_update_test(HTTP, HTTPS, SUCCESS);
+  add_update_test(HTTP, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(HTTP, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(HTTP, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(HTTP, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from valid https to other servers works as expected
-  add_update_test(HTTPS,      HTTP,       DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(HTTPS, HTTP, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from nocert https to other servers works as expected
-  add_update_test(NOCERT,     HTTP,       DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(NOCERT, HTTP, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from self-signed https to other servers works as expected
-  add_update_test(SELFSIGNED, HTTP,       DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, NOCERT,     DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, HTTP, DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, NOCERT, DOWNLOAD_ERROR);
   add_update_test(SELFSIGNED, SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from untrusted https to other servers works as expected
-  add_update_test(UNTRUSTED,  HTTP,       DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, HTTP, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from expired https to other servers works as expected
-  add_update_test(EXPIRED,    HTTP,       DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, HTTP, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, EXPIRED, DOWNLOAD_ERROR);
 
   run_update_tests(run_next_test);
 });
 
 // Runs tests without requiring built-in certificates and no certificate
 // exceptions.
 add_test(function() {
   Services.prefs.setBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS, false);
 
   // Tests that a simple update.rdf retrieval works as expected.
-  add_update_test(HTTP,       null,       SUCCESS);
-  add_update_test(HTTPS,      null,       SUCCESS);
-  add_update_test(NOCERT,     null,       DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, null,       DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  null,       DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    null,       DOWNLOAD_ERROR);
+  add_update_test(HTTP, null, SUCCESS);
+  add_update_test(HTTPS, null, SUCCESS);
+  add_update_test(NOCERT, null, DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, null, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, null, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, null, DOWNLOAD_ERROR);
 
   // Tests that redirecting from http to other servers works as expected
-  add_update_test(HTTP,       HTTP,       SUCCESS);
-  add_update_test(HTTP,       HTTPS,      SUCCESS);
-  add_update_test(HTTP,       NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(HTTP,       SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(HTTP,       UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(HTTP,       EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(HTTP, HTTP, SUCCESS);
+  add_update_test(HTTP, HTTPS, SUCCESS);
+  add_update_test(HTTP, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(HTTP, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(HTTP, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(HTTP, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from valid https to other servers works as expected
-  add_update_test(HTTPS,      HTTP,       DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      HTTPS,      SUCCESS);
-  add_update_test(HTTPS,      NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(HTTPS, HTTP, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, HTTPS, SUCCESS);
+  add_update_test(HTTPS, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from nocert https to other servers works as expected
-  add_update_test(NOCERT,     HTTP,       DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(NOCERT, HTTP, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from self-signed https to other servers works as expected
-  add_update_test(SELFSIGNED, HTTP,       DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, NOCERT,     DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, HTTP, DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, NOCERT, DOWNLOAD_ERROR);
   add_update_test(SELFSIGNED, SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from untrusted https to other servers works as expected
-  add_update_test(UNTRUSTED,  HTTP,       DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, HTTP, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from expired https to other servers works as expected
-  add_update_test(EXPIRED,    HTTP,       DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, HTTP, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, EXPIRED, DOWNLOAD_ERROR);
 
   run_update_tests(run_next_test);
 });
 
 // Runs tests with built-in certificates required and all certificate exceptions.
 add_test(function() {
   Services.prefs.clearUserPref(PREF_UPDATE_REQUIREBUILTINCERTS);
   addCertOverrides();
 
   // Tests that a simple update.rdf retrieval works as expected.
-  add_update_test(HTTP,       null,       SUCCESS);
-  add_update_test(HTTPS,      null,       DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     null,       DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, null,       DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  null,       DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    null,       DOWNLOAD_ERROR);
+  add_update_test(HTTP, null, SUCCESS);
+  add_update_test(HTTPS, null, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, null, DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, null, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, null, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, null, DOWNLOAD_ERROR);
 
   // Tests that redirecting from http to other servers works as expected
-  add_update_test(HTTP,       HTTP,       SUCCESS);
-  add_update_test(HTTP,       HTTPS,      SUCCESS);
-  add_update_test(HTTP,       NOCERT,     SUCCESS);
-  add_update_test(HTTP,       SELFSIGNED, SUCCESS);
-  add_update_test(HTTP,       UNTRUSTED,  SUCCESS);
-  add_update_test(HTTP,       EXPIRED,    SUCCESS);
+  add_update_test(HTTP, HTTP, SUCCESS);
+  add_update_test(HTTP, HTTPS, SUCCESS);
+  add_update_test(HTTP, NOCERT, SUCCESS);
+  add_update_test(HTTP, SELFSIGNED, SUCCESS);
+  add_update_test(HTTP, UNTRUSTED, SUCCESS);
+  add_update_test(HTTP, EXPIRED, SUCCESS);
 
   // Tests that redirecting from valid https to other servers works as expected
-  add_update_test(HTTPS,      HTTP,       DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(HTTPS, HTTP, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from nocert https to other servers works as expected
-  add_update_test(NOCERT,     HTTP,       DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(NOCERT, HTTP, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from self-signed https to other servers works as expected
-  add_update_test(SELFSIGNED, HTTP,       DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, NOCERT,     DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, HTTP, DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, NOCERT, DOWNLOAD_ERROR);
   add_update_test(SELFSIGNED, SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from untrusted https to other servers works as expected
-  add_update_test(UNTRUSTED,  HTTP,       DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, HTTP, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, EXPIRED, DOWNLOAD_ERROR);
 
   // Tests that redirecting from expired https to other servers works as expected
-  add_update_test(EXPIRED,    HTTP,       DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    HTTPS,      DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    NOCERT,     DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    SELFSIGNED, DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    UNTRUSTED,  DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    EXPIRED,    DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, HTTP, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, HTTPS, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, NOCERT, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, SELFSIGNED, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, UNTRUSTED, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, EXPIRED, DOWNLOAD_ERROR);
 
   run_update_tests(run_next_test);
 });
 
 // Runs tests without requiring built-in certificates and all certificate
 // exceptions.
 add_test(function() {
   Services.prefs.setBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS, false);
 
   // Tests that a simple update.rdf retrieval works as expected.
-  add_update_test(HTTP,       null,       SUCCESS);
-  add_update_test(HTTPS,      null,       SUCCESS);
-  add_update_test(NOCERT,     null,       SUCCESS);
-  add_update_test(SELFSIGNED, null,       SUCCESS);
-  add_update_test(UNTRUSTED,  null,       SUCCESS);
-  add_update_test(EXPIRED,    null,       SUCCESS);
+  add_update_test(HTTP, null, SUCCESS);
+  add_update_test(HTTPS, null, SUCCESS);
+  add_update_test(NOCERT, null, SUCCESS);
+  add_update_test(SELFSIGNED, null, SUCCESS);
+  add_update_test(UNTRUSTED, null, SUCCESS);
+  add_update_test(EXPIRED, null, SUCCESS);
 
   // Tests that redirecting from http to other servers works as expected
-  add_update_test(HTTP,       HTTP,       SUCCESS);
-  add_update_test(HTTP,       HTTPS,      SUCCESS);
-  add_update_test(HTTP,       NOCERT,     SUCCESS);
-  add_update_test(HTTP,       SELFSIGNED, SUCCESS);
-  add_update_test(HTTP,       UNTRUSTED,  SUCCESS);
-  add_update_test(HTTP,       EXPIRED,    SUCCESS);
+  add_update_test(HTTP, HTTP, SUCCESS);
+  add_update_test(HTTP, HTTPS, SUCCESS);
+  add_update_test(HTTP, NOCERT, SUCCESS);
+  add_update_test(HTTP, SELFSIGNED, SUCCESS);
+  add_update_test(HTTP, UNTRUSTED, SUCCESS);
+  add_update_test(HTTP, EXPIRED, SUCCESS);
 
   // Tests that redirecting from valid https to other servers works as expected
-  add_update_test(HTTPS,      HTTP,       DOWNLOAD_ERROR);
-  add_update_test(HTTPS,      HTTPS,      SUCCESS);
-  add_update_test(HTTPS,      NOCERT,     SUCCESS);
-  add_update_test(HTTPS,      SELFSIGNED, SUCCESS);
-  add_update_test(HTTPS,      UNTRUSTED,  SUCCESS);
-  add_update_test(HTTPS,      EXPIRED,    SUCCESS);
+  add_update_test(HTTPS, HTTP, DOWNLOAD_ERROR);
+  add_update_test(HTTPS, HTTPS, SUCCESS);
+  add_update_test(HTTPS, NOCERT, SUCCESS);
+  add_update_test(HTTPS, SELFSIGNED, SUCCESS);
+  add_update_test(HTTPS, UNTRUSTED, SUCCESS);
+  add_update_test(HTTPS, EXPIRED, SUCCESS);
 
   // Tests that redirecting from nocert https to other servers works as expected
-  add_update_test(NOCERT,     HTTP,       DOWNLOAD_ERROR);
-  add_update_test(NOCERT,     HTTPS,      SUCCESS);
-  add_update_test(NOCERT,     NOCERT,     SUCCESS);
-  add_update_test(NOCERT,     SELFSIGNED, SUCCESS);
-  add_update_test(NOCERT,     UNTRUSTED,  SUCCESS);
-  add_update_test(NOCERT,     EXPIRED,    SUCCESS);
+  add_update_test(NOCERT, HTTP, DOWNLOAD_ERROR);
+  add_update_test(NOCERT, HTTPS, SUCCESS);
+  add_update_test(NOCERT, NOCERT, SUCCESS);
+  add_update_test(NOCERT, SELFSIGNED, SUCCESS);
+  add_update_test(NOCERT, UNTRUSTED, SUCCESS);
+  add_update_test(NOCERT, EXPIRED, SUCCESS);
 
   // Tests that redirecting from self-signed https to other servers works as expected
-  add_update_test(SELFSIGNED, HTTP,       DOWNLOAD_ERROR);
-  add_update_test(SELFSIGNED, HTTPS,      SUCCESS);
-  add_update_test(SELFSIGNED, NOCERT,     SUCCESS);
+  add_update_test(SELFSIGNED, HTTP, DOWNLOAD_ERROR);
+  add_update_test(SELFSIGNED, HTTPS, SUCCESS);
+  add_update_test(SELFSIGNED, NOCERT, SUCCESS);
   add_update_test(SELFSIGNED, SELFSIGNED, SUCCESS);
-  add_update_test(SELFSIGNED, UNTRUSTED,  SUCCESS);
-  add_update_test(SELFSIGNED, EXPIRED,    SUCCESS);
+  add_update_test(SELFSIGNED, UNTRUSTED, SUCCESS);
+  add_update_test(SELFSIGNED, EXPIRED, SUCCESS);
 
   // Tests that redirecting from untrusted https to other servers works as expected
-  add_update_test(UNTRUSTED,  HTTP,       DOWNLOAD_ERROR);
-  add_update_test(UNTRUSTED,  HTTPS,      SUCCESS);
-  add_update_test(UNTRUSTED,  NOCERT,     SUCCESS);
-  add_update_test(UNTRUSTED,  SELFSIGNED, SUCCESS);
-  add_update_test(UNTRUSTED,  UNTRUSTED,  SUCCESS);
-  add_update_test(UNTRUSTED,  EXPIRED,    SUCCESS);
+  add_update_test(UNTRUSTED, HTTP, DOWNLOAD_ERROR);
+  add_update_test(UNTRUSTED, HTTPS, SUCCESS);
+  add_update_test(UNTRUSTED, NOCERT, SUCCESS);
+  add_update_test(UNTRUSTED, SELFSIGNED, SUCCESS);
+  add_update_test(UNTRUSTED, UNTRUSTED, SUCCESS);
+  add_update_test(UNTRUSTED, EXPIRED, SUCCESS);
 
   // Tests that redirecting from expired https to other servers works as expected
-  add_update_test(EXPIRED,    HTTP,       DOWNLOAD_ERROR);
-  add_update_test(EXPIRED,    HTTPS,      SUCCESS);
-  add_update_test(EXPIRED,    NOCERT,     SUCCESS);
-  add_update_test(EXPIRED,    SELFSIGNED, SUCCESS);
-  add_update_test(EXPIRED,    UNTRUSTED,  SUCCESS);
-  add_update_test(EXPIRED,    EXPIRED,    SUCCESS);
+  add_update_test(EXPIRED, HTTP, DOWNLOAD_ERROR);
+  add_update_test(EXPIRED, HTTPS, SUCCESS);
+  add_update_test(EXPIRED, NOCERT, SUCCESS);
+  add_update_test(EXPIRED, SELFSIGNED, SUCCESS);
+  add_update_test(EXPIRED, UNTRUSTED, SUCCESS);
+  add_update_test(EXPIRED, EXPIRED, SUCCESS);
 
   run_update_tests(run_next_test);
 });
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -183,18 +183,17 @@ registerCleanupFunction(function() {
         install.cancel();
       }
     });
 });
 
 function log_exceptions(aCallback, ...aArgs) {
   try {
     return aCallback.apply(null, aArgs);
-  }
-  catch (e) {
+  } catch (e) {
     info("Exception thrown: " + e);
     throw e;
   }
 }
 
 function log_callback(aPromise, aCallback) {
   aPromise.then(aCallback)
     .then(null, e => info("Exception thrown: " + e));
@@ -675,18 +674,17 @@ CertOverrideListener.prototype = {
 
 // Add overrides for the bad certificates
 function addCertOverride(host, bits) {
   var req = new XMLHttpRequest();
   try {
     req.open("GET", "https://" + host + "/", false);
     req.channel.notificationCallbacks = new CertOverrideListener(host, bits);
     req.send(null);
-  }
-  catch (e) {
+  } catch (e) {
     // This request will fail since the SSL server is not trusted yet
   }
 }
 
 /** *** Mock Provider *****/
 
 function MockProvider(aUseAsyncCallbacks, aTypes) {
   this.addons = [];
@@ -1262,28 +1260,26 @@ MockAddon.prototype = {
 
   _updateActiveState(currentActive, newActive) {
     if (currentActive == newActive)
       return;
 
     if (newActive == this.isActive) {
       this.pendingOperations -= (newActive ? AddonManager.PENDING_DISABLE : AddonManager.PENDING_ENABLE);
       AddonManagerPrivate.callAddonListeners("onOperationCancelled", this);
-    }
-    else if (newActive) {
+    } else if (newActive) {
       let needsRestart = !!(this.operationsRequiringRestart & AddonManager.OP_NEEDS_RESTART_ENABLE);
       this.pendingOperations |= AddonManager.PENDING_ENABLE;
       AddonManagerPrivate.callAddonListeners("onEnabling", this, needsRestart);
       if (!needsRestart) {
         this.isActive = newActive;
         this.pendingOperations -= AddonManager.PENDING_ENABLE;
         AddonManagerPrivate.callAddonListeners("onEnabled", this);
       }
-    }
-    else {
+    } else {
       let needsRestart = !!(this.operationsRequiringRestart & AddonManager.OP_NEEDS_RESTART_DISABLE);
       this.pendingOperations |= AddonManager.PENDING_DISABLE;
       AddonManagerPrivate.callAddonListeners("onDisabling", this, needsRestart);
       if (!needsRestart) {
         this.isActive = newActive;
         this.pendingOperations -= AddonManager.PENDING_DISABLE;
         AddonManagerPrivate.callAddonListeners("onDisabled", this);
       }
@@ -1419,18 +1415,17 @@ MockInstall.prototype = {
 
     // Call test listeners after standard listeners to remove race condition
     // between standard and test listeners
     for (let listener of this.testListeners) {
       try {
         if (aMethod in listener)
           if (listener[aMethod].call(listener, this, this.addon) === false)
             result = false;
-      }
-      catch (e) {
+      } catch (e) {
         ok(false, "Test listener threw exception: " + e);
       }
     }
 
     return result;
   }
 };
 
--- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
@@ -162,21 +162,19 @@ function isManifestRegistered(file) {
   let manifests = Components.manager.getManifestLocations();
   for (let i = 0; i < manifests.length; i++) {
     let manifest = manifests.queryElementAt(i, AM_Ci.nsIURI);
 
     // manifest is the url to the manifest file either in an XPI or a directory.
     // We want the location of the XPI or directory itself.
     if (manifest instanceof AM_Ci.nsIJARURI) {
       manifest = manifest.JARFile.QueryInterface(AM_Ci.nsIFileURL).file;
-    }
-    else if (manifest instanceof AM_Ci.nsIFileURL) {
+    } else if (manifest instanceof AM_Ci.nsIFileURL) {
       manifest = manifest.file.parent;
-    }
-    else {
+    } else {
       continue;
     }
 
     if (manifest.equals(file))
       return true;
   }
   return false;
 }
@@ -284,18 +282,17 @@ this.BootstrapMonitor = {
     if (info.event == "install") {
       this.checkAddonNotInstalled(id);
 
       this.installed.set(id, info);
 
       for (let resolve of this.installPromises)
         resolve();
       this.installPromises = [];
-    }
-    else {
+    } else {
       this.checkMatches(this.installed.get(id), info);
     }
 
     // If this is the shutdown event than the add-on should already be started
     if (info.event == "shutdown") {
       this.checkMatches(this.started.get(id), info);
 
       this.started.delete(id);
@@ -305,30 +302,28 @@ this.BootstrapMonitor = {
       let isRegistered = isManifestRegistered(installPath);
       do_check_true(isRegistered);
 
       // XPIProvider doesn't bother unregistering chrome on app shutdown but
       // since we simulate restarts we must do so manually to keep the registry
       // consistent.
       if (info.reason == 2 /* APP_SHUTDOWN */)
         Components.manager.removeBootstrappedManifestLocation(installPath);
-    }
-    else {
+    } else {
       this.checkAddonNotStarted(id);
     }
 
     if (info.event == "uninstall") {
       // Chrome should be unregistered at this point
       let isRegistered = isManifestRegistered(installPath);
       do_check_false(isRegistered);
 
       this.installed.delete(id);
       this.uninstalled.set(id, info)
-    }
-    else if (info.event == "startup") {
+    } else if (info.event == "startup") {
       this.started.set(id, info);
 
       // Chrome should be registered at this point
       let isRegistered = isManifestRegistered(installPath);
       do_check_true(isRegistered);
 
       for (let resolve of this.startupPromises)
         resolve();
@@ -338,18 +333,17 @@ this.BootstrapMonitor = {
 }
 
 AddonTestUtils.on("addon-manager-shutdown", () => BootstrapMonitor.shutdownCheck());
 
 function isNightlyChannel() {
   var channel = "default";
   try {
     channel = Services.prefs.getCharPref("app.update.channel");
-  }
-  catch (e) { }
+  } catch (e) { }
 
   return channel != "aurora" && channel != "beta" && channel != "release" && channel != "esr";
 }
 
 /**
  * Tests that an add-on does appear in the crash report annotations, if
  * crash reporting is enabled. The test will fail if the add-on is not in the
  * annotation.
@@ -493,18 +487,17 @@ function do_check_addon(aActualAddon, aE
     if (!(aProperty in aExpectedAddon)) {
       if (actualValue !== undefined && actualValue !== null) {
         do_throw("Unexpected defined/non-null property for add-on " +
                  aExpectedAddon.id + " (addon[" + aProperty + "] = " +
                  actualValue.toSource() + ")");
       }
 
       return;
-    }
-    else if (expectedValue && !actualValue) {
+    } else if (expectedValue && !actualValue) {
       do_throw("Missing property for add-on " + aExpectedAddon.id +
         ": expected addon[" + aProperty + "] = " + expectedValue);
       return;
     }
 
     switch (aProperty) {
       case "creator":
         do_check_author(actualValue, expectedValue);
@@ -1195,18 +1188,17 @@ function remove_port(url) {
     return url.replace(/:\d+/, "");
   return url;
 }
 // Wrap a function (typically a callback) to catch and report exceptions
 function do_exception_wrap(func) {
   return function() {
     try {
       func.apply(null, arguments);
-    }
-    catch (e) {
+    } catch (e) {
       do_report_unexpected_exception(e);
     }
   };
 }
 
 /**
  * Change the schema version of the JSON extensions database
  */
@@ -1287,18 +1279,17 @@ function writeProxyFileToDir(aDir, aAddo
 
 function* serveSystemUpdate(xml, perform_update, testserver) {
   testserver.registerPathHandler("/data/update.xml", (request, response) => {
     response.write(xml);
   });
 
   try {
     yield perform_update();
-  }
-  finally {
+  } finally {
     testserver.registerPathHandler("/data/update.xml", null);
   }
 }
 
 // Runs an update check making it use the passed in xml string. Uses the direct
 // call to the update function so we get rejections on failure.
 function* installSystemAddons(xml, testserver) {
   do_print("Triggering system add-on update check.");
--- a/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository.js
@@ -395,18 +395,17 @@ function run_test() {
     mapUrlToFile(SEARCH_TEST.successfulURL,
                  do_get_file("data/test_AddonRepository.xml"),
                  gServer);
 
     // Create an active AddonInstall so can check that it isn't returned in the results
     AddonManager.getInstallForURL(BASE_URL + INSTALL_URL2, function addon_2_get(aInstall) {
       try {
         aInstall.install();
-      }
-      catch (e) {
+      } catch (e) {
         do_print("Failed to install add-on " + aInstall.sourceURI.spec);
         do_report_unexpected_exception(e);
       }
 
       // Create a non-active AddonInstall so can check that it is returned in the results
       AddonManager.getInstallForURL(BASE_URL + INSTALL_URL3,
                                     run_test_1, "application/x-xpinstall");
     }, "application/x-xpinstall");
--- a/toolkit/mozapps/extensions/test/xpcshell/test_LightweightThemeManager.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_LightweightThemeManager.js
@@ -306,48 +306,44 @@ function run_test() {
   do_check_eq(ltm.usedThemes.length, 0);
   do_check_eq(ltm.currentTheme, null);
 
   data = dummy();
   delete data.name;
   try {
     ltm.currentTheme = data;
     do_throw("Should have rejected a theme with no name");
-  }
-  catch (e) {
+  } catch (e) {
     // Expected exception
   }
 
   data = dummy();
   data.headerURL = "foo";
   try {
     ltm.currentTheme = data;
     do_throw("Should have rejected a theme with a bad headerURL");
-  }
-  catch (e) {
+  } catch (e) {
     // Expected exception
   }
 
   data = dummy();
   data.headerURL = "ftp://lwtest.invalid/test.png";
   try {
     ltm.currentTheme = data;
     do_throw("Should have rejected a theme with a non-http(s) headerURL");
-  }
-  catch (e) {
+  } catch (e) {
     // Expected exception
   }
 
   data = dummy();
   data.headerURL = "file:///test.png";
   try {
     ltm.currentTheme = data;
     do_throw("Should have rejected a theme with a non-http(s) headerURL");
-  }
-  catch (e) {
+  } catch (e) {
     // Expected exception
   }
 
   data = dummy();
   data.updateURL = "file:///test.json";
   ltm.setLocalTheme(data);
   do_check_eq(ltm.usedThemes.length, 1);
   do_check_eq(ltm.currentTheme.updateURL, undefined);
@@ -362,28 +358,26 @@ function run_test() {
   ltm.forgetUsedTheme(ltm.currentTheme.id);
   do_check_eq(ltm.usedThemes.length, 0);
 
   data = dummy();
   data.headerURL = "ftp://lwtest.invalid/test.png";
   try {
     ltm.setLocalTheme(data);
     do_throw("Should have rejected a theme with a non-http(s), non-file headerURL");
-  }
-  catch (e) {
+  } catch (e) {
     // Expected exception
   }
 
   data = dummy();
   delete data.id;
   try {
     ltm.currentTheme = data;
     do_throw("Should have rejected a theme with no ID");
-  }
-  catch (e) {
+  } catch (e) {
     // Expected exception
   }
 
   do_check_eq(ltm.usedThemes.length, 0);
   do_check_eq(ltm.currentTheme, null);
 
   // Force the theme into the prefs anyway
   let prefs = Cc["@mozilla.org/preferences-service;1"].
--- a/toolkit/mozapps/extensions/test/xpcshell/test_ProductAddonChecker.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_ProductAddonChecker.js
@@ -141,32 +141,30 @@ add_task(function* test_good_xml() {
 });
 
 add_task(function* test_download_nourl() {
   try {
     let path = yield ProductAddonChecker.downloadAddon({});
 
     yield OS.File.remove(path);
     do_throw("Should not have downloaded a file with a missing url");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_true(true, "Should have thrown when downloading a file with a missing url.");
   }
 });
 
 add_task(function* test_download_missing() {
   try {
     let path = yield ProductAddonChecker.downloadAddon({
       URL: root + "nofile.xpi",
     });
 
     yield OS.File.remove(path);
     do_throw("Should not have downloaded a missing file");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_true(true, "Should have thrown when downloading a missing file.");
   }
 });
 
 add_task(function* test_download_noverify() {
   let path = yield ProductAddonChecker.downloadAddon({
     URL: root + "unsigned.xpi",
   });
@@ -184,50 +182,47 @@ add_task(function* test_download_badsize
   try {
     let path = yield ProductAddonChecker.downloadAddon({
       URL: root + "unsigned.xpi",
       size: 400,
     });
 
     yield OS.File.remove(path);
     do_throw("Should not have downloaded a file with a bad size");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_true(true, "Should have thrown when downloading a file with a bad size.");
   }
 });
 
 add_task(function* test_download_badhashfn() {
   try {
     let path = yield ProductAddonChecker.downloadAddon({
       URL: root + "unsigned.xpi",
       hashFunction: "sha2567",
       hashValue: "9b9abf7ddfc1a6d7ffc7e0247481dcc202363e4445ad3494fb22036f1698c7f3",
     });
 
     yield OS.File.remove(path);
     do_throw("Should not have downloaded a file with a bad hash function");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_true(true, "Should have thrown when downloading a file with a bad hash function.");
   }
 });
 
 add_task(function* test_download_badhash() {
   try {
     let path = yield ProductAddonChecker.downloadAddon({
       URL: root + "unsigned.xpi",
       hashFunction: "sha256",
       hashValue: "8b9abf7ddfc1a6d7ffc7e0247481dcc202363e4445ad3494fb22036f1698c7f3",
     });
 
     yield OS.File.remove(path);
     do_throw("Should not have downloaded a file with a bad hash");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_true(true, "Should have thrown when downloading a file with a bad hash.");
   }
 });
 
 add_task(function* test_download_works() {
   let path = yield ProductAddonChecker.downloadAddon({
     URL: root + "unsigned.xpi",
     size: 452,
--- a/toolkit/mozapps/extensions/test/xpcshell/test_addon_path_service.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_addon_path_service.js
@@ -1,26 +1,23 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 var service = Components.classes["@mozilla.org/addon-path-service;1"].getService(Components.interfaces.amIAddonPathService);
 
-function insert(path, value)
-{
+function insert(path, value) {
   service.insertPath("/test/" + path, value);
 }
 
-function find(path)
-{
+function find(path) {
   return service.findAddonId("/test/" + path);
 }
 
-function run_test()
-{
+function run_test() {
   insert("abc", "10");
   insert("def", "11");
   insert("axy", "12");
   insert("defghij", "13");
   insert("defghi", "14");
 
   do_check_eq(find("abc"), "10");
   do_check_eq(find("abc123"), "10");
--- a/toolkit/mozapps/extensions/test/xpcshell/test_blocklistchange.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_blocklistchange.js
@@ -501,24 +501,22 @@ function check_addon(aAddon, aExpectedVe
   if (aAddon.softDisabled)
     do_check_true(aAddon.userDisabled);
 
   if (aExpectedState == Ci.nsIBlocklistService.STATE_BLOCKED) {
     do_print("blocked, PERM_CAN_ENABLE " + aAddon.id);
     do_check_false(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_ENABLE));
     do_print("blocked, PERM_CAN_DISABLE " + aAddon.id);
     do_check_false(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_DISABLE));
-  }
-  else if (aAddon.userDisabled) {
+  } else if (aAddon.userDisabled) {
     do_print("userDisabled, PERM_CAN_ENABLE " + aAddon.id);
     do_check_true(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_ENABLE));
     do_print("userDisabled, PERM_CAN_DISABLE " + aAddon.id);
     do_check_false(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_DISABLE));
-  }
-  else {
+  } else {
     do_print("other, PERM_CAN_ENABLE " + aAddon.id);
     do_check_false(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_ENABLE));
     if (aAddon.type != "theme") {
       do_print("other, PERM_CAN_DISABLE " + aAddon.id);
       do_check_true(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_DISABLE));
     }
   }
   do_check_eq(aAddon.appDisabled, aExpectedState == Ci.nsIBlocklistService.STATE_BLOCKED);
@@ -526,18 +524,17 @@ function check_addon(aAddon, aExpectedVe
   let willBeActive = aAddon.isActive;
   if (hasFlag(aAddon.pendingOperations, AddonManager.PENDING_DISABLE))
     willBeActive = false;
   else if (hasFlag(aAddon.pendingOperations, AddonManager.PENDING_ENABLE))
     willBeActive = true;
 
   if (aExpectedUserDisabled || aExpectedState == Ci.nsIBlocklistService.STATE_BLOCKED) {
     do_check_false(willBeActive);
-  }
-  else {
+  } else {
     do_check_true(willBeActive);
   }
 }
 
 function run_test() {
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1");
   run_next_test();
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug335238.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug335238.js
@@ -119,18 +119,17 @@ var updateListener = {
 
   onUpdateFinished() {
     if (--this.pendingCount == 0)
       server.stop(do_test_finished);
   }
 }
 
 var requestHandler = {
-  handle(metadata, response)
-  {
+  handle(metadata, response) {
     var expected = EXPECTED[metadata.path.substring(1)];
     var params = metadata.queryString.split("&");
     do_check_eq(params.length, 10);
     for (var k in params) {
       var pair = params[k].split("=");
       var name = decodeURIComponent(pair[0]);
       var value = decodeURIComponent(pair[1]);
       do_check_eq(expected[name], value);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug371495.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug371495.js
@@ -1,18 +1,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/.
  */
 
 const ADDON = "test_bug371495";
 const ID = "bug371495@tests.mozilla.org";
 
-function run_test()
-{
+function run_test() {
   // Setup for test
   do_test_pending();
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1");
 
   // Install test add-on
   startupManager();
   installAllFiles([do_get_addon(ADDON)], function() {
     AddonManager.getAddonByID(ID, callback_soon(function(addon) {
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug384052.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug384052.js
@@ -27,18 +27,17 @@ var paramHandlerFactory = {
     var bag = AM_Cc["@mozilla.org/hash-property-bag;1"].
               createInstance(AM_Ci.nsIWritablePropertyBag);
     bag.setProperty("CUSTOM1", "custom_parameter_1");
     bag.setProperty("CUSTOM2", "custom_parameter_2");
     return bag.QueryInterface(iid);
   }
 };
 
-function initTest()
-{
+function initTest() {
   do_test_pending();
   // Setup extension manager
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9");
 
   // Configure the HTTP server.
   testserver.registerPathHandler("/update.rdf", function(aRequest, aResponse) {
     gSeenExpectedURL = aRequest.queryString == gExpectedQuery;
     aResponse.setStatusLine(null, 404, "Not Found");
@@ -62,29 +61,27 @@ function initTest()
       minVersion: "1",
       maxVersion: "1"
     }],
   }, dir);
 
   startupManager();
 }
 
-function shutdownTest()
-{
+function shutdownTest() {
   shutdownManager();
 
   gComponentRegistrar.unregisterFactory(CLASS_ID, paramHandlerFactory);
   gCategoryManager.deleteCategoryEntry("extension-update-params", "CUSTOM1", false);
   gCategoryManager.deleteCategoryEntry("extension-update-params", "CUSTOM2", false);
 
   do_test_finished();
 }
 
-function run_test()
-{
+function run_test() {
   initTest();
 
   AddonManager.getAddonByID("test@mozilla.org", function(item) {
     // Initiate update
     item.findUpdates({
       onCompatibilityUpdateAvailable(addon) {
         do_throw("Should not have seen a compatibility update");
       },
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug394300.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug394300.js
@@ -22,18 +22,17 @@ var updateListener = {
   },
 
   onUpdateFinished: function onUpdateFinished() {
     if (++this._count == 2)
       server.stop(do_test_finished);
   },
 }
 
-function run_test()
-{
+function run_test() {
   // Setup for test
   do_test_pending();
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9");
   startupManager();
 
   installAllFiles([do_get_addon("test_bug394300_1"),
                    do_get_addon("test_bug394300_2")], function() {
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug397778.js
@@ -4,18 +4,17 @@
  */
 
 const PREF_MATCH_OS_LOCALE = "intl.locale.matchOS";
 const PREF_SELECTED_LOCALE = "general.useragent.locale";
 
 const ADDON = "test_bug397778";
 const ID = "bug397778@tests.mozilla.org";
 
-function run_test()
-{
+function run_test() {
   // Setup for test
   do_test_pending();
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1");
   Services.prefs.setBoolPref(PREF_MATCH_OS_LOCALE, false);
   Services.prefs.setCharPref(PREF_SELECTED_LOCALE, "fr-FR");
 
   // Install test add-on
   startupManager();
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug424262.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug424262.js
@@ -33,18 +33,17 @@ var RecommendedCallback = {
   },
 
   searchFailed() {
     server.stop(do_test_finished);
     do_throw("Recommended results failed");
   }
 };
 
-function run_test()
-{
+function run_test() {
   // EM needs to be running.
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9");
   startupManager();
 
   server = new HttpServer();
   server.start(-1);
   gPort = server.identity.primaryPort;
   mapFile("/data/test_bug424262.xml", server);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug425657.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug425657.js
@@ -1,18 +1,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/.
  */
 
 const ADDON = "test_bug425657";
 const ID = "bug425657@tests.mozilla.org";
 
-function run_test()
-{
+function run_test() {
   // Setup for test
   do_test_pending();
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1");
 
   // Install test add-on
   startupManager();
   installAllFiles([do_get_addon(ADDON)], function() {
     restartManager();
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js
@@ -80,23 +80,21 @@ function run_test() {
   var osVersion;
   var sysInfo = Components.classes["@mozilla.org/system-info;1"]
                           .getService(Components.interfaces.nsIPropertyBag2);
   try {
     osVersion = sysInfo.getProperty("name") + " " + sysInfo.getProperty("version");
     if (osVersion) {
       try {
         osVersion += " (" + sysInfo.getProperty("secondaryLibrary") + ")";
-      }
-      catch (e) {
+      } catch (e) {
       }
       gOSVersion = encodeURIComponent(osVersion);
     }
-  }
-  catch (e) {
+  } catch (e) {
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9");
 
   testserver = new HttpServer();
   testserver.registerPathHandler("/1", failHandler);
   testserver.registerPathHandler("/2", pathHandler);
   testserver.start(-1);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js
@@ -182,18 +182,17 @@ var ADDONS = [{
   id: "test_bug449027_25@tests.mozilla.org",
   name: "Bug 449027 Addon Test 25",
   version: "5",
   start: false,
   appBlocks: true,
   toolkitBlocks: true
 }];
 
-function MockPluginTag(name, version, start, appBlocks, toolkitBlocks)
-{
+function MockPluginTag(name, version, start, appBlocks, toolkitBlocks) {
   this.name = name;
   this.version = version;
   this.start = start;
   this.appBlocks = appBlocks;
   this.toolkitBlocks = toolkitBlocks;
 }
 Object.defineProperty(MockPluginTag.prototype, "blocklisted", {
   get: function MockPluginTag_getBlocklisted() {
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug455906.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug455906.js
@@ -309,18 +309,17 @@ function check_notification_pt2(args) {
           break;
         case "test_bug455906_3":
           do_check_false(addon.blocked);
           addon.disable = true;
           break;
         default:
           do_throw("Unknown addon: " + addon.item.name);
       }
-    }
-    else {
+    } else {
       switch (addon.item.id) {
         case "test_bug455906_2@tests.mozilla.org":
           do_check_false(addon.blocked);
           break;
         case "test_bug455906_3@tests.mozilla.org":
           do_check_false(addon.blocked);
           addon.disable = true;
           break;
@@ -390,18 +389,17 @@ function check_notification_pt3(args) {
           do_check_true(addon.blocked);
           break;
         case "test_bug455906_5":
           do_check_true(addon.blocked);
           break;
         default:
           do_throw("Unknown addon: " + addon.item.name);
       }
-    }
-    else {
+    } else {
       switch (addon.item.id) {
         case "test_bug455906_2@tests.mozilla.org":
           do_check_true(addon.blocked);
           break;
         case "test_bug455906_3@tests.mozilla.org":
           do_check_true(addon.blocked);
           break;
         case "test_bug455906_5@tests.mozilla.org":
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug465190.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug465190.js
@@ -20,18 +20,17 @@ var dirProvider2 = {
       return this;
     }
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 };
 Services.dirsvc.QueryInterface(Components.interfaces.nsIDirectoryService)
                .registerProvider(dirProvider2);
 
-function run_test()
-{
+function run_test() {
   var log = gProfD.clone();
   log.append("extensions.log");
   do_check_false(log.exists());
 
   // Setup for test
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1");
 
   startupManager();
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug554133.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug554133.js
@@ -51,23 +51,21 @@ var SearchCallback = {
   }
 };
 
 function run_current_test() {
   if (gCurrentTest < TESTS.length) {
     var query = TESTS[gCurrentTest].query;
     var maxResults = TESTS[gCurrentTest].maxResults;
     AddonRepository.searchAddons(query, maxResults, SearchCallback);
-  }
-  else
+  } else
     server.stop(do_test_finished);
 }
 
-function run_test()
-{
+function run_test() {
   // Setup for test
   do_test_pending();
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9");
 
   startupManager();
 
   server = new HttpServer();
   server.registerDirectory("/", do_get_file("data"));
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug587088.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug587088.js
@@ -25,18 +25,17 @@ function check_addon(aAddon, aVersion) {
   do_check_eq(aAddon.version, aVersion);
   do_check_true(aAddon.isActive);
   do_check_true(isExtensionInAddonsList(profileDir, aAddon.id));
 
   do_check_true(aAddon.hasResource("testfile"));
   if (aVersion == "1.0") {
     do_check_true(aAddon.hasResource("testfile1"));
     do_check_false(aAddon.hasResource("testfile2"));
-  }
-  else {
+  } else {
     do_check_false(aAddon.hasResource("testfile1"));
     do_check_true(aAddon.hasResource("testfile2"));
   }
 
   do_check_eq(aAddon.pendingOperations, AddonManager.PENDING_NONE);
 }
 
 function check_addon_upgrading(aAddon) {
@@ -56,18 +55,17 @@ function check_addon_upgrading(aAddon) {
 
 function check_addon_uninstalling(aAddon, aAfterRestart) {
   do_check_neq(aAddon, null);
   do_check_eq(aAddon.version, "1.0");
 
   if (aAfterRestart) {
     do_check_false(aAddon.isActive);
     do_check_false(isExtensionInAddonsList(profileDir, aAddon.id));
-  }
-  else {
+  } else {
     do_check_true(aAddon.isActive);
     do_check_true(isExtensionInAddonsList(profileDir, aAddon.id));
   }
 
   do_check_true(aAddon.hasResource("testfile"));
   do_check_true(aAddon.hasResource("testfile1"));
   do_check_false(aAddon.hasResource("testfile2"));
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_childprocess.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_childprocess.js
@@ -8,14 +8,13 @@ function run_test() {
   // Already loaded the module by head_addons.js. Need to unload this again, so
   // that overriding the app-info and re-importing the module works.
   Components.utils.unload("resource://gre/modules/AddonManager.jsm");
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
   gAppInfo.processType = AM_Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT;
   try {
     Components.utils.import("resource://gre/modules/AddonManager.jsm");
     do_throw("AddonManager should have refused to load");
-  }
-  catch (ex) {
+  } catch (ex) {
     do_print(ex.message);
     do_check_true(!!ex.message);
   }
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js
@@ -173,18 +173,17 @@ function check_test_1() {
       do_check_false(b1.hasResource("bootstrap.js"));
       do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0");
 
       let chromeReg = AM_Cc["@mozilla.org/chrome/chrome-registry;1"].
                       getService(AM_Ci.nsIChromeRegistry);
       try {
         chromeReg.convertChromeURL(NetUtil.newURI("chrome://dict/content/dict.xul"));
         do_throw("Chrome manifest should not have been registered");
-      }
-      catch (e) {
+      } catch (e) {
         // Expected the chrome url to not be registered
       }
 
       AddonManager.getAddonsWithOperationsByTypes(null, function(list) {
         do_check_eq(list.length, 0);
 
         run_test_2();
       });
--- a/toolkit/mozapps/extensions/test/xpcshell/test_dss.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_dss.js
@@ -269,18 +269,17 @@ function run_test_3() {
     do_check_true("isCompatibleWith" in p1);
     do_check_true("findUpdates" in p1);
 
     AddonManager.getAddonsByTypes(["theme"], function(addons) {
       let seen = false;
       addons.forEach(function(a) {
         if (a.id == "1@personas.mozilla.org") {
           seen = true;
-        }
-        else {
+        } else {
           dump("Checking theme " + a.id + "\n");
           do_check_false(a.isActive);
           do_check_true(a.userDisabled);
         }
       });
       do_check_true(seen);
 
       do_check_true(gLWThemeChanged);
@@ -339,18 +338,17 @@ function run_test_4() {
     do_check_eq(p1.pendingOperations, 0);
     do_check_eq(p1.permissions, AddonManager.PERM_CAN_UNINSTALL | AddonManager.PERM_CAN_ENABLE);
 
     AddonManager.getAddonsByTypes(["theme"], function(addons) {
       let seen = false;
       addons.forEach(function(a) {
         if (a.id == "2@personas.mozilla.org") {
           seen = true;
-        }
-        else {
+        } else {
           dump("Checking theme " + a.id + "\n");
           do_check_false(a.isActive);
           do_check_true(a.userDisabled);
         }
       });
       do_check_true(seen);
 
       do_check_true(gLWThemeChanged);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_duplicateplugins.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_duplicateplugins.js
@@ -120,34 +120,30 @@ function found_plugin(aNum, aId) {
 // Test that the plugins were coalesced and all appear in the returned list
 function run_test_1() {
   AddonManager.getAddonsByTypes(["plugin"], function(aAddons) {
     do_check_eq(aAddons.length, 5);
     aAddons.forEach(function(aAddon) {
       if (aAddon.name == "Duplicate Plugin 1") {
         found_plugin(0, aAddon.id);
         do_check_eq(aAddon.description, "A duplicate plugin");
-      }
-      else if (aAddon.name == "Duplicate Plugin 2") {
+      } else if (aAddon.name == "Duplicate Plugin 2") {
         found_plugin(1, aAddon.id);
         do_check_eq(aAddon.description, "Another duplicate plugin");
-      }
-      else if (aAddon.name == "Another Non-duplicate Plugin") {
+      } else if (aAddon.name == "Another Non-duplicate Plugin") {
         found_plugin(5, aAddon.id);
         do_check_eq(aAddon.description, "Not a duplicate plugin");
-      }
-      else if (aAddon.name == "Non-duplicate Plugin") {
+      } else if (aAddon.name == "Non-duplicate Plugin") {
         if (aAddon.description == "Not a duplicate plugin")
           found_plugin(3, aAddon.id);
         else if (aAddon.description == "Not a duplicate because the descriptions are different")
           found_plugin(4, aAddon.id);
         else
           do_throw("Found unexpected plugin with description " + aAddon.description);
-      }
-      else {
+      } else {
         do_throw("Found unexpected plugin " + aAddon.name);
       }
     });
 
     run_test_2();
   });
 }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_fuel.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_fuel.js
@@ -19,18 +19,17 @@ var Application = null
 function run_test() {
   var cm = AM_Cc["@mozilla.org/categorymanager;1"].
            getService(AM_Ci.nsICategoryManager);
 
   try {
     var contract = cm.getCategoryEntry("JavaScript-global-privileged-property",
                                        "Application");
     Application = AM_Cc[contract].getService(AM_Ci.extIApplication);
-  }
-  catch (e) {
+  } catch (e) {
     // This application does not include a FUEL variant.
     return;
   }
 
   do_test_pending();
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
 
   const profileDir = gProfD.clone();
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Device.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Device.js
@@ -67,18 +67,17 @@ function run_test() {
       break;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_CANVAS2D_ACCELERATION);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_DriverNew.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_DriverNew.js
@@ -66,18 +66,17 @@ function run_test() {
       break;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     gTestserver.stop(do_test_finished);
   }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Equal_DriverNew.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Equal_DriverNew.js
@@ -66,18 +66,17 @@ function run_test() {
       break;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "15.0", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     // Make sure unrelated features aren't affected
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_11_LAYERS);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Equal_DriverOld.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Equal_DriverOld.js
@@ -66,18 +66,17 @@ function run_test() {
       break;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     // Make sure unrelated features aren't affected
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     gTestserver.stop(do_test_finished);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Equal_OK.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Equal_OK.js
@@ -66,18 +66,17 @@ function run_test() {
       break;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION);
 
     // Make sure unrelated features aren't affected
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     gTestserver.stop(do_test_finished);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_GTE_DriverOld.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_GTE_DriverOld.js
@@ -66,18 +66,17 @@ function run_test() {
       break;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     // Make sure unrelated features aren't affected
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     gTestserver.stop(do_test_finished);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_GTE_OK.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_GTE_OK.js
@@ -66,18 +66,17 @@ function run_test() {
       break;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION);
 
     // Make sure unrelated features aren't affected
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     gTestserver.stop(do_test_finished);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_No_Comparison.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_No_Comparison.js
@@ -60,18 +60,17 @@ function run_test() {
       break;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     var driverVersion = gfxInfo.adapterDriverVersion;
     if (driverVersion) {
       var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
       do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DEVICE);
 
       // Make sure unrelated features aren't affected
       status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
       do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OK.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OK.js
@@ -67,18 +67,17 @@ function run_test() {
       break;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION);
 
     // Make sure unrelated features aren't affected
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     gTestserver.stop(do_test_finished);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OS.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OS.js
@@ -67,18 +67,17 @@ function run_test() {
       return;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     gTestserver.stop(do_test_finished);
   }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OSVersion_match.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OSVersion_match.js
@@ -67,18 +67,17 @@ function run_test() {
       return;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     if (get_platform() == "WINNT") {
       var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
       do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION);
     } else if (get_platform() == "Darwin") {
       status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_OPENGL_LAYERS);
       do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION);
     }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OSVersion_mismatch_DriverVersion.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OSVersion_mismatch_DriverVersion.js
@@ -67,18 +67,17 @@ function run_test() {
       return;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     if (get_platform() == "WINNT") {
       var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
       do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
     } else if (get_platform() == "Darwin") {
       status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_OPENGL_LAYERS);
       do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
     }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OSVersion_mismatch_OSVersion.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_OSVersion_mismatch_OSVersion.js
@@ -68,18 +68,17 @@ function run_test() {
       return;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     if (get_platform() == "WINNT") {
       var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
       do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
     } else if (get_platform() == "Darwin") {
       status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_OPENGL_LAYERS);
       do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
     }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Vendor.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Vendor.js
@@ -67,18 +67,17 @@ function run_test() {
       break;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     gTestserver.stop(do_test_finished);
   }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Version.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_Version.js
@@ -66,18 +66,17 @@ function run_test() {
       break;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "15.0", "8");
   startupManager();
 
   do_test_pending();
 
-  function checkBlacklist()
-  {
+  function checkBlacklist() {
     var failureId = {};
     var status;
 
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D, failureId);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION);
     do_check_eq(failureId.value, "FEATURE_FAILURE_DL_BLACKLIST_g1");
 
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS, failureId);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_prefs.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_gfxBlacklist_prefs.js
@@ -72,24 +72,22 @@ function run_test() {
       break;
   }
 
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "3", "8");
   startupManager();
 
   do_test_pending();
 
-  function blacklistAdded(aSubject, aTopic, aData)
-  {
+  function blacklistAdded(aSubject, aTopic, aData) {
     // If we wait until after we go through the event loop, gfxInfo is sure to
     // have processed the gfxItems event.
     do_execute_soon(ensureBlacklistSet);
   }
-  function ensureBlacklistSet()
-  {
+  function ensureBlacklistSet() {
     var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION);
 
     // Make sure unrelated features aren't affected
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     var prefs = Cc["@mozilla.org/preferences-service;1"].
@@ -97,24 +95,22 @@ function run_test() {
     do_check_eq(prefs.getIntPref("gfx.blacklist.direct2d"),
                 Ci.nsIGfxInfo.FEATURE_BLOCKED_DRIVER_VERSION);
 
     Services.obs.removeObserver(blacklistAdded, "blocklist-data-gfxItems");
     Services.obs.addObserver(blacklistRemoved, "blocklist-data-gfxItems", false);
     load_blocklist("test_gfxBlacklist2.xml");
   }
 
-  function blacklistRemoved(aSubject, aTopic, aData)
-  {
+  function blacklistRemoved(aSubject, aTopic, aData) {
     // If we wait until after we go through the event loop, gfxInfo is sure to
     // have processed the gfxItems event.
     do_execute_soon(ensureBlacklistUnset);
   }
-  function ensureBlacklistUnset()
-  {
+  function ensureBlacklistUnset() {
     var status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT2D);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     // Make sure unrelated features aren't affected
     status = gfxInfo.getFeatureStatus(Ci.nsIGfxInfo.FEATURE_DIRECT3D_9_LAYERS);
     do_check_eq(status, Ci.nsIGfxInfo.FEATURE_STATUS_OK);
 
     var prefs = Cc["@mozilla.org/preferences-service;1"].
--- a/toolkit/mozapps/extensions/test/xpcshell/test_install.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_install.js
@@ -125,22 +125,20 @@ function check_test_1(installSyncGUID) {
         let jarURI = uri.QueryInterface(AM_Ci.nsIJARURI);
         let archiveURI = jarURI.JARFile;
         let archiveFile = archiveURI.QueryInterface(AM_Ci.nsIFileURL).file;
         let zipReader = Cc["@mozilla.org/libjar/zip-reader;1"].
                         createInstance(Ci.nsIZipReader);
         try {
           zipReader.open(archiveFile);
           do_check_true(zipReader.hasEntry(jarURI.JAREntry));
-        }
-        finally {
+        } finally {
           zipReader.close();
         }
-      }
-      else {
+      } else {
         let iconFile = uri.QueryInterface(AM_Ci.nsIFileURL).file;
         do_check_true(iconFile.exists());
         // Make the iconFile predictably old.
         iconFile.lastModifiedTime = Date.now() - MAKE_FILE_OLD_DIFFERENCE;
       }
 
       // Make the pending install have a sensible date
       let updateDate = Date.now();
--- a/toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js
@@ -122,22 +122,20 @@ function check_test_1() {
         let jarURI = uri.QueryInterface(AM_Ci.nsIJARURI);
         let archiveURI = jarURI.JARFile;
         let archiveFile = archiveURI.QueryInterface(AM_Ci.nsIFileURL).file;
         let zipReader = Cc["@mozilla.org/libjar/zip-reader;1"].
                         createInstance(Ci.nsIZipReader);
         try {
           zipReader.open(archiveFile);
           do_check_true(zipReader.hasEntry(jarURI.JAREntry));
-        }
-        finally {
+        } finally {
           zipReader.close();
         }
-      }
-      else {
+      } else {
         let iconFile = uri.QueryInterface(AM_Ci.nsIFileURL).file;
         do_check_true(iconFile.exists());
       }
 
       // Make the pending install have a sensible date
       let updateDate = Date.now();
       let extURI = pendingAddons[0].getResourceURI("");
       let ext = extURI.QueryInterface(AM_Ci.nsIFileURL).file;
--- a/toolkit/mozapps/extensions/test/xpcshell/test_locked2.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_locked2.js
@@ -232,18 +232,17 @@ add_task(function*() {
   // these things happened when we had no access to the database so
   // they are seen as external changes when we get the database back
   if (shutdownError) {
     do_print("Previous XPI save failed");
     check_startup_changes(AddonManager.STARTUP_CHANGE_INSTALLED,
         ["addon6@tests.mozilla.org"]);
     check_startup_changes(AddonManager.STARTUP_CHANGE_UNINSTALLED,
         ["addon4@tests.mozilla.org"]);
-  }
-  else {
+  } else {
     do_print("Previous XPI save succeeded");
     check_startup_changes(AddonManager.STARTUP_CHANGE_INSTALLED, []);
     check_startup_changes(AddonManager.STARTUP_CHANGE_UNINSTALLED, []);
   }
 
   [a1, a2, a3, a4, a5, a6] =
     yield promiseAddonsByIDs(["addon1@tests.mozilla.org",
                               "addon2@tests.mozilla.org",
--- a/toolkit/mozapps/extensions/test/xpcshell/test_locked_strictcompat.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_locked_strictcompat.js
@@ -489,35 +489,33 @@ add_task(function* run_test_1() {
   // remember that this extension was changed to disabled. On Windows we
   // couldn't replace the old DB so we read the older version of the DB
   // where the extension is enabled
   if (shutdownError) {
     do_print("XPI save failed");
     do_check_true(a3.isActive);
     do_check_false(a3.appDisabled);
     do_check_true(isExtensionInAddonsList(profileDir, a3.id));
-  }
-  else {
+  } else {
     do_print("XPI save succeeded");
     do_check_false(a3.isActive);
     do_check_true(a3.appDisabled);
     do_check_false(isExtensionInAddonsList(profileDir, a3.id));
   }
   do_check_eq(a3.pendingOperations, AddonManager.PENDING_NONE);
 
   do_check_neq(a4, null);
   do_check_false(a4.isActive);
   // The reverse of the platform difference for a3 - Unix should
   // stay the same as the last iteration because the save succeeded,
   // Windows should still say userDisabled
   if (OS.Constants.Win) {
     do_check_true(a4.userDisabled);
     do_check_false(a4.appDisabled);
-  }
-  else {
+  } else {
     do_check_false(a4.userDisabled);
     do_check_true(a4.appDisabled);
   }
   do_check_false(isExtensionInAddonsList(profileDir, a4.id));
   do_check_eq(a4.pendingOperations, AddonManager.PENDING_NONE);
 
   do_check_neq(a5, null);
   do_check_false(a5.isActive);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_mapURIToAddonID.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_mapURIToAddonID.js
@@ -98,18 +98,17 @@ function run_test_early() {
 
 function run_test_nomapping() {
   do_check_eq(AddonManager.mapURIToAddonID(TestProvider.prototype.uri), null);
   try {
     let svc = Components.classes["@mozilla.org/addons/integration;1"].
               getService(Components.interfaces.amIAddonManager);
     let val = {};
     do_check_false(svc.mapURIToAddonID(TestProvider.prototype.uri, val));
-  }
-  catch (ex) {
+  } catch (ex) {
     do_throw(ex);
   }
 
   run_test_1();
 }
 
 
 // Tests that add-on URIs are mappable after an install
@@ -289,18 +288,17 @@ function run_test_invalidarg() {
                "string",
                "chrome://global/content/",
                function() {}
                ];
   for (var test of tests) {
     try {
       AddonManager.mapURIToAddonID(test);
       throw new Error("Shouldn't be able to map the URI in question");
-    }
-    catch (ex) {
+    } catch (ex) {
       if (ex.result) {
         do_check_eq(ex.result, Components.results.NS_ERROR_INVALID_ARG);
       } else {
         do_throw(ex);
       }
     }
   }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_no_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_no_addons.js
@@ -17,27 +17,25 @@ function run_test() {
   // Kick off the task-based tests...
   run_next_test();
 }
 
 // Test for a preference to either exist with a specified value, or not exist at all
 function checkPending() {
   try {
     do_check_false(Services.prefs.getBoolPref("extensions.pendingOperations"));
-  }
-  catch (e) {
+  } catch (e) {
     // OK
   }
 }
 
 function checkString(aPref, aValue) {
   try {
     do_check_eq(Services.prefs.getCharPref(aPref), aValue)
-  }
-  catch (e) {
+  } catch (e) {
     // OK
   }
 }
 
 // Make sure all our extension state is empty/nonexistent
 function check_empty_state() {
   do_check_false(gExtensionsJSON.exists());
   do_check_false(gExtensionsINI.exists());
--- a/toolkit/mozapps/extensions/test/xpcshell/test_overrideblocklist.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_overrideblocklist.js
@@ -66,18 +66,17 @@ function copyToProfile(file, tstamp) {
 
 function run_test() {
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1");
 
   let appBlocklist = FileUtils.getFile(KEY_APPDIR, [FILE_BLOCKLIST]);
   if (appBlocklist.exists()) {
     try {
       appBlocklist.moveTo(gAppDir, "blocklist.old");
-    }
-    catch (e) {
+    } catch (e) {
       todo(false, "Aborting test due to unmovable blocklist file: " + e);
       return;
     }
     do_register_cleanup(function() {
       clearBlocklists();
       appBlocklist.moveTo(gAppDir, FILE_BLOCKLIST);
     });
   }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_permissions_prefs.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_permissions_prefs.js
@@ -12,18 +12,17 @@ function newPrincipal(uri) {
   return Services.scriptSecurityManager.createCodebasePrincipal(NetUtil.newURI(uri), {});
 }
 
 function do_check_permission_prefs(preferences) {
   // Check preferences were emptied
   for (let pref of preferences) {
     try {
       do_check_eq(Services.prefs.getCharPref(pref), "");
-    }
-    catch (e) {
+    } catch (e) {
       // Successfully emptied
     }
   }
 }
 
 function clear_imported_preferences_cache() {
   let scope = Components.utils.import("resource://gre/modules/PermissionsUtils.jsm", {});
   scope.gImportedPrefBranches.clear();
--- a/toolkit/mozapps/extensions/test/xpcshell/test_proxies.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_proxies.js
@@ -101,18 +101,17 @@ function* run_proxy_tests() {
     addon.proxyFile.append(addon.dirId || addon.id);
 
     METADATA.id = addon.id;
     METADATA.name = addon.id;
     writeInstallRDFToDir(METADATA, gTmpD);
 
     if (addon.type == "proxy") {
       writeFile(addon.directory.path, addon.proxyFile)
-    }
-    else if (addon.type == "symlink") {
+    } else if (addon.type == "symlink") {
       yield createSymlink(addon.directory, addon.proxyFile)
     }
   }
 
   startupManager();
 
   // Check that all add-ons original sources still exist after invalid
   // add-ons have been removed at startup.
@@ -167,18 +166,17 @@ function* run_proxy_tests() {
       for (let addon of ADDONS) {
         equal(addon.proxyFile.exists(), addon.dirId != null,
               `Proxy file ${addon.proxyFile.path} should exist?`);
         addon.directory.remove(true);
         try {
           addon.proxyFile.remove(false);
         } catch (e) {}
       }
-    }
-    catch (e) {
+    } catch (e) {
       do_throw(e);
     }
   });
 }
 
 function* run_symlink_tests() {
   // Check that symlinks are not followed out of a directory tree
   // when deleting an add-on.
--- a/toolkit/mozapps/extensions/test/xpcshell/test_shutdown.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_shutdown.js
@@ -36,45 +36,42 @@ function test_functions() {
     // Getter functions need a callback and in some cases not having one will
     // throw before checking if the add-ons manager is initialized so pass in
     // an empty one.
     if (prop.startsWith("get")) {
       // For now all getter functions with more than one argument take the
       // callback in the second argument.
       if (AddonManager[prop].length > 1) {
         args.push(undefined, () => {});
-      }
-      else {
+      } else {
         args.push(() => {});
       }
     }
 
     try {
       do_print("AddonManager." + prop);
       AddonManager[prop](...args);
       do_throw(prop + " did not throw an exception");
-    }
-    catch (e) {
+    } catch (e) {
       if (e.result != Components.results.NS_ERROR_NOT_INITIALIZED)
         do_throw(prop + " threw an unexpected exception: " + e);
     }
   }
 
   for (let prop in AddonManagerPrivate) {
     if (typeof AddonManagerPrivate[prop] != "function")
       continue;
     if (IGNORE_PRIVATE.indexOf(prop) != -1)
       continue;
 
     try {
       do_print("AddonManagerPrivate." + prop);
       AddonManagerPrivate[prop]();
       do_throw(prop + " did not throw an exception");
-    }
-    catch (e) {
+    } catch (e) {
       if (e.result != Components.results.NS_ERROR_NOT_INITIALIZED)
         do_throw(prop + " threw an unexpected exception: " + e);
     }
   }
 }
 
 function run_test() {
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
--- a/toolkit/mozapps/extensions/test/xpcshell/test_signed_inject.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_signed_inject.js
@@ -22,18 +22,17 @@ const ID = "test@tests.mozilla.org";
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // Deletes a file from the test add-on in the profile
 function breakAddon(file) {
   if (TEST_UNPACKED) {
     file.append("test.txt");
     file.remove(true);
-  }
-  else {
+  } else {
     var zipW = AM_Cc["@mozilla.org/zipwriter;1"].
                createInstance(AM_Ci.nsIZipWriter);
     zipW.open(file, FileUtils.MODE_RDWR | FileUtils.MODE_APPEND);
     zipW.removeEntry("test.txt", false);
     zipW.close();
   }
 }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_signed_verify.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_signed_verify.js
@@ -107,18 +107,17 @@ function verify_enables([startFile, star
 
     let events = {};
     if (!needsRestart) {
       events[ID] = [
         ["onPropertyChanged", ["appDisabled"]],
         ["onEnabling", false],
         "onEnabled"
       ];
-    }
-    else {
+    } else {
       events[ID] = [
         ["onPropertyChanged", ["appDisabled"]],
         "onEnabling"
       ];
     }
 
     if (startState != endState)
       events[ID].unshift(["onPropertyChanged", ["signedState"]]);
@@ -169,18 +168,17 @@ function verify_disables([startFile, sta
 
     let events = {};
     if (!needsRestart) {
       events[ID] = [
         ["onPropertyChanged", ["appDisabled"]],
         ["onDisabling", false],
         "onDisabled"
       ];
-    }
-    else {
+    } else {
       events[ID] = [
         ["onPropertyChanged", ["appDisabled"]],
         "onDisabling"
       ];
     }
 
     if (startState != endState)
       events[ID].unshift(["onPropertyChanged", ["signedState"]]);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_syncGUID.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_syncGUID.js
@@ -88,18 +88,17 @@ add_test(function test_error_on_duplicat
         restartManager();
 
         AddonManager.getAddonsByIDs(installIDs, callback_soon(function(addons) {
           let initialGUID = addons[1].syncGUID;
 
           try {
             addons[1].syncGUID = addons[0].syncGUID;
             do_throw("Should not get here.");
-          }
-          catch (e) {
+          } catch (e) {
             do_check_true(e.message.startsWith("Addon sync GUID conflict"));
             restartManager();
 
             AddonManager.getAddonByID(installIDs[1], function(addon) {
               do_check_eq(initialGUID, addon.syncGUID);
               run_next_test();
             });
           }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_system_reset.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_system_reset.js
@@ -70,23 +70,21 @@ function* check_installed(conditions) {
       do_check_eq(uri.file.path, file.path);
 
       if (isUpgrade) {
         do_check_eq(addon.signedState, AddonManager.SIGNEDSTATE_SYSTEM);
       }
 
       // Verify the add-on actually started
       BootstrapMonitor.checkAddonStarted(id, version);
-    }
-    else {
+    } else {
       if (isUpgrade) {
         // Add-on should not be installed
         do_check_eq(addon, null);
-      }
-      else {
+      } else {
         // Either add-on should not be installed or it shouldn't be active
         do_check_true(!addon || !addon.isActive);
       }
 
       BootstrapMonitor.checkAddonNotStarted(id);
 
       if (addon)
         BootstrapMonitor.checkAddonInstalled(id);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_system_update.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_system_update.js
@@ -109,18 +109,17 @@ function* check_installed(conditions) {
       do_check_eq(uri.file.path, file.path);
 
       if (isUpgrade) {
         do_check_eq(addon.signedState, AddonManager.SIGNEDSTATE_SYSTEM);
       }
 
       // Verify the add-on actually started
       BootstrapMonitor.checkAddonStarted(id, version);
-    }
-    else {
+    } else {
       do_print(`Checking state of add-on ${id}, expecting it to be missing`);
 
       if (isUpgrade) {
         // Add-on should not be installed
         do_check_eq(addon, null);
       }
 
       BootstrapMonitor.checkAddonNotStarted(id);
@@ -521,18 +520,17 @@ function* verify_state(initialState, fin
   // still exist.
 
   if (initialState.some(a => a.isUpgrade)) {
     expectedDirs++;
   }
 
   if (finalState == undefined) {
     finalState = initialState;
-  }
-  else if (finalState.some(a => a.isUpgrade)) {
+  } else if (finalState.some(a => a.isUpgrade)) {
     // If the new state is using the profile then that directory will exist.
     expectedDirs++;
   }
 
   // Since upgrades are restartless now, the previous update dir hasn't been removed.
   if (alreadyUpgraded) {
     expectedDirs++;
   }
@@ -553,37 +551,34 @@ function* exec_test(setupName, testName)
   let setup = TEST_CONDITIONS[setupName];
   let test = TESTS[testName];
 
   yield setup_conditions(setup);
 
   try {
     if ("test" in test) {
       yield test.test();
-    }
-    else {
+    } else {
       yield installSystemAddons(yield buildSystemAddonUpdates(test.updateList, root), testserver);
     }
 
     if (test.fails) {
       do_throw("Expected this test to fail");
     }
-  }
-  catch (e) {
+  } catch (e) {
     if (!test.fails) {
       do_throw(e);
     }
   }
 
   // some tests have a different expected combination of default
   // and updated add-ons.
   if (test.finalState && setupName in test.finalState) {
     yield verify_state(setup.initialState, test.finalState[setupName]);
-  }
-  else {
+  } else {
     yield verify_state(setup.initialState, test.finalState);
   }
 
   yield promiseShutdownManager();
 }
 
 add_task(function*() {
   for (let setup of Object.keys(TEST_CONDITIONS)) {
--- a/toolkit/mozapps/extensions/test/xpcshell/test_theme.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_theme.js
@@ -292,18 +292,17 @@ function run_test_3() {
     else if (difference < 0)
       do_throw("Add-on was installed " + difference + "ms in the future");
 
     AddonManager.getAddonsByTypes(["theme"], function(addons) {
       let seen = false;
       addons.forEach(function(a) {
         if (a.id == "1@personas.mozilla.org") {
           seen = true;
-        }
-        else {
+        } else {
           dump("Checking theme " + a.id + "\n");
           do_check_false(a.isActive);
           do_check_true(a.userDisabled);
         }
       });
       do_check_true(seen);
 
       do_check_true(gLWThemeChanged);
@@ -370,18 +369,17 @@ function run_test_4() {
     do_check_eq(p1.pendingOperations, 0);
     do_check_eq(p1.permissions, AddonManager.PERM_CAN_UNINSTALL | AddonManager.PERM_CAN_ENABLE);
 
     AddonManager.getAddonsByTypes(["theme"], function(addons) {
       let seen = false;
       addons.forEach(function(a) {
         if (a.id == "2@personas.mozilla.org") {
           seen = true;
-        }
-        else {
+        } else {
           dump("Checking theme " + a.id + "\n");
           do_check_false(a.isActive);
           do_check_true(a.userDisabled);
         }
       });
       do_check_true(seen);
 
       do_check_true(gLWThemeChanged);
@@ -1033,18 +1031,17 @@ function run_test_20() {
   AddonManager.getAddonByID("default@tests.mozilla.org", function(d) {
     do_check_false(d.userDisabled);
     do_check_false(d.appDisabled);
     do_check_true(d.isActive);
 
     try {
       d.userDisabled = true;
       do_throw("Disabling the default theme should throw an exception");
-    }
-    catch (e) {
+    } catch (e) {
     }
 
     do_execute_soon(run_test_21);
   });
 }
 
 // Tests that cached copies of a lightweight theme have the right permissions
 // and pendingOperations during the onEnabling event
--- a/toolkit/mozapps/extensions/test/xpcshell/test_upgrade.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_upgrade.js
@@ -83,18 +83,17 @@ function run_test() {
   do_test_pending();
 
   run_test_1();
 }
 
 function end_test() {
   if (!gGlobalExisted) {
     globalDir.remove(true);
-  }
-  else {
+  } else {
     globalDir.append(do_get_expected_addon_name("addon4@tests.mozilla.org"));
     globalDir.remove(true);
   }
   do_execute_soon(do_test_finished);
 }
 
 // Test that the test extensions are all installed
 function run_test_1() {
--- a/toolkit/mozapps/extensions/test/xpcshell/test_upgrade_strictcompat.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_upgrade_strictcompat.js
@@ -83,18 +83,17 @@ function run_test() {
   Services.prefs.setBoolPref(PREF_EM_STRICT_COMPATIBILITY, true);
 
   run_test_1();
 }
 
 function end_test() {
   if (!gGlobalExisted) {
     globalDir.remove(true);
-  }
-  else {
+  } else {
     globalDir.append(do_get_expected_addon_name("addon4@tests.mozilla.org"));
     globalDir.remove(true);
   }
 
   Services.prefs.clearUserPref(PREF_EM_STRICT_COMPATIBILITY);
 
   do_execute_soon(do_test_finished);
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_webextension.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_webextension.js
@@ -47,18 +47,17 @@ add_task(function*() {
   equal(GlobalManager.extensionMap.size, 1);
   ok(GlobalManager.extensionMap.has(ID));
 
   let chromeReg = AM_Cc["@mozilla.org/chrome/chrome-registry;1"].
                   getService(AM_Ci.nsIChromeRegistry);
   try {
     chromeReg.convertChromeURL(NetUtil.newURI("chrome://webex/content/webex.xul"));
     do_throw("Chrome manifest should not have been registered");
-  }
-  catch (e) {
+  } catch (e) {
     // Expected the chrome url to not be registered
   }
 
   let addon = yield promiseAddonByID(ID);
   do_check_neq(addon, null);
   do_check_eq(addon.version, "1.0");
   do_check_eq(addon.name, "Web Extension Name");
   do_check_true(addon.isCompatible);
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js
@@ -1,16 +1,14 @@
 // ----------------------------------------------------------------------------
 // Test whether an InstallTrigger.enabled is working
-add_task(function * ()
-{
+add_task(function * () {
   let testtab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, TESTROOT + "bug638292.html");
 
-  function* verify(link, button)
-  {
+  function* verify(link, button) {
     info("Clicking " + link);
 
     let waitForNewTabPromise = BrowserTestUtils.waitForNewTab(gBrowser);
 
     yield BrowserTestUtils.synthesizeMouseAtCenter("#" + link, { button },
                                                    gBrowser.selectedBrowser);
 
     let newtab = yield waitForNewTabPromise;
--- a/toolkit/mozapps/extensions/test/xpinstall/concurrent_installs.html
+++ b/toolkit/mozapps/extensions/test/xpinstall/concurrent_installs.html
@@ -19,18 +19,17 @@ function installCallback(url, status) {
 
 function startInstall() {
   var root = location.href.replace("concurrent_installs.html", "");
   var triggers = {
     "Unsigned XPI": root + "amosigned.xpi"
   };
   try {
     document.getElementById("return").textContent = InstallTrigger.install(triggers, installCallback);
-  }
-  catch (e) {
+  } catch (e) {
     document.getElementById("return").textContent = "exception";
     throw e;
   }
 }
 </script>
 </head>
 <body>
 <p>InstallTrigger tests</p>
--- a/toolkit/mozapps/extensions/test/xpinstall/head.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/head.js
@@ -192,25 +192,23 @@ var Harness = {
       if (this.installConfirmCallback) {
         result = this.installConfirmCallback(window);
         if (result === this.leaveOpen)
           return;
       }
 
       if (!result) {
         window.document.documentElement.cancelDialog();
-      }
-      else {
+      } else {
         // Initially the accept button is disabled on a countdown timer
         var button = window.document.documentElement.getButton("accept");
         button.disabled = false;
         window.document.documentElement.acceptDialog();
       }
-    }
-    else if (window.document.location.href == PROMPT_URL) {
+    } else if (window.document.location.href == PROMPT_URL) {
         var promptType = window.args.promptType;
         switch (promptType) {
           case "alert":
           case "alertCheck":
           case "confirmCheck":
           case "confirm":
           case "confirmEx":
                 window.document.documentElement.acceptDialog();
@@ -219,22 +217,20 @@ var Harness = {
                   // This is a login dialog, hopefully an authentication prompt
                   // for the xpi.
                   if (this.authenticationCallback) {
                     var auth = this.authenticationCallback();
                     if (auth && auth.length == 2) {
                       window.document.getElementById("loginTextbox").value = auth[0];
                       window.document.getElementById("password1Textbox").value = auth[1];
                       window.document.documentElement.acceptDialog();
-                    }
-                    else {
+                    } else {
                       window.document.documentElement.cancelDialog();
                     }
-                  }
-                  else {
+                  } else {
                     window.document.documentElement.cancelDialog();
                   }
                 break;
           default:
                 ok(false, "prompt type " + promptType + " not handled in test.");
                 break;
       }
     }
@@ -268,18 +264,17 @@ var Harness = {
     this.endTest();
   },
 
   installBlocked(installInfo) {
     ok(!!this.installBlockedCallback, "Shouldn't have been blocked by the whitelist");
     if (this.installBlockedCallback && this.installBlockedCallback(installInfo)) {
       this.installBlockedCallback = null;
       installInfo.install();
-    }
-    else {
+    } else {
       this.expectingCancelled = true;
       installInfo.installs.forEach(function(install) {
         install.cancel();
       });
       this.expectingCancelled = false;
       this.endTest();
     }
   },
--- a/toolkit/mozapps/extensions/test/xpinstall/installtrigger.html
+++ b/toolkit/mozapps/extensions/test/xpinstall/installtrigger.html
@@ -22,18 +22,17 @@ function installCallback(url, status) {
 function startInstall() {
   var event = new CustomEvent("InstallTriggered");
   var text = decodeURIComponent(document.location.search.substring(1));
   var triggers = JSON.parse(text);
   try {
     document.getElementById("return").textContent = InstallTrigger.install(triggers, installCallback);
     dump("Sending InstallTriggered\n");
     window.dispatchEvent(event);
-  }
-  catch (e) {
+  } catch (e) {
     document.getElementById("return").textContent = "exception";
     dump("Sending InstallTriggered\n");
     window.dispatchEvent(event);
     throw e;
   }
 }
 </script>
 </head>
--- a/toolkit/mozapps/handling/content/dialog.js
+++ b/toolkit/mozapps/handling/content/dialog.js
@@ -46,18 +46,17 @@ var dialog = {
   _windowCtxt: null,
   _buttonDisabled: true,
 
   // Methods
 
  /**
   * This function initializes the content of the dialog.
   */
-  initialize: function initialize()
-  {
+  initialize: function initialize() {
     this._handlerInfo = window.arguments[7].QueryInterface(Ci.nsIHandlerInfo);
     this._URI         = window.arguments[8].QueryInterface(Ci.nsIURI);
     this._windowCtxt  = window.arguments[9];
     if (this._windowCtxt)
       this._windowCtxt.QueryInterface(Ci.nsIInterfaceRequestor);
     this._itemChoose  = document.getElementById("item-choose");
     this._okButton    = document.documentElement.getButton("accept");
 
@@ -98,52 +97,48 @@ var dialog = {
       },
       focusTarget: window
     });
   },
 
  /**
   * Populates the list that a user can choose from.
   */
-  populateList: function populateList()
-  {
+  populateList: function populateList() {
     var items = document.getElementById("items");
     var possibleHandlers = this._handlerInfo.possibleApplicationHandlers;
     var preferredHandler = this._handlerInfo.preferredApplicationHandler;
     var ios = Cc["@mozilla.org/network/io-service;1"].
               getService(Ci.nsIIOService);
     for (let i = possibleHandlers.length - 1; i >= 0; --i) {
       let app = possibleHandlers.queryElementAt(i, Ci.nsIHandlerApp);
       let elm = document.createElement("richlistitem");
       elm.setAttribute("type", "handler");
       elm.setAttribute("name", app.name);
       elm.obj = app;
 
       if (app instanceof Ci.nsILocalHandlerApp) {
         // See if we have an nsILocalHandlerApp and set the icon
         let uri = ios.newFileURI(app.executable);
         elm.setAttribute("image", "moz-icon://" + uri.spec + "?size=32");
-      }
-      else if (app instanceof Ci.nsIWebHandlerApp) {
+      } else if (app instanceof Ci.nsIWebHandlerApp) {
         let uri = ios.newURI(app.uriTemplate, null, null);
         if (/^https?/.test(uri.scheme)) {
           // Unfortunately we can't use the favicon service to get the favicon,
           // because the service looks for a record with the exact URL we give
           // it, and users won't have such records for URLs they don't visit,
           // and users won't visit the handler's URL template, they'll only
           // visit URLs derived from that template (i.e. with %s in the template
           // replaced by the URL of the content being handled).
           elm.setAttribute("image", uri.prePath + "/favicon.ico");
         }
         elm.setAttribute("description", uri.prePath);
-      }
-      else if (app instanceof Ci.nsIDBusHandlerApp) {
+      } else if (app instanceof Ci.nsIDBusHandlerApp) {
 	  elm.setAttribute("description", app.method);
-      }
-      else
+      } else
         throw "unknown handler type";
 
       items.insertBefore(elm, this._itemChoose);
       if (preferredHandler && app == preferredHandler)
         this.selectedItem = elm;
     }
 
     if (this._handlerInfo.hasDefaultHandler) {
@@ -158,18 +153,17 @@ var dialog = {
           this.selectedItem = elm;
     }
     items.ensureSelectedElementIsVisible();
   },
 
  /**
   * Brings up a filepicker and allows a user to choose an application.
   */
-  chooseApplication: function chooseApplication()
-  {
+  chooseApplication: function chooseApplication() {
     var bundle = document.getElementById("base-strings");
     var title = bundle.getString("choose.application.title");
 
     var fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
     fp.init(window, title, Ci.nsIFilePicker.modeOpen);
     fp.appendFilters(Ci.nsIFilePicker.filterApps);
 
     if (fp.show() == Ci.nsIFilePicker.returnOK && fp.file) {
@@ -201,78 +195,71 @@ var dialog = {
       parent.selectedItem = parent.insertBefore(elm, parent.firstChild);
       parent.ensureSelectedElementIsVisible();
     }
   },
 
  /**
   * Function called when the OK button is pressed.
   */
-  onAccept: function onAccept()
-  {
+  onAccept: function onAccept() {
     var checkbox = document.getElementById("remember");
     if (!checkbox.hidden) {
       // We need to make sure that the default is properly set now
       if (this.selectedItem.obj) {
         // default OS handler doesn't have this property
         this._handlerInfo.preferredAction = Ci.nsIHandlerInfo.useHelperApp;
         this._handlerInfo.preferredApplicationHandler = this.selectedItem.obj;
-      }
-      else
+      } else
         this._handlerInfo.preferredAction = Ci.nsIHandlerInfo.useSystemDefault;
     }
     this._handlerInfo.alwaysAskBeforeHandling = !checkbox.checked;
 
     var hs = Cc["@mozilla.org/uriloader/handler-service;1"].
              getService(Ci.nsIHandlerService);
     hs.store(this._handlerInfo);
 
     this._handlerInfo.launchWithURI(this._URI, this._windowCtxt);
 
     return true;
   },
 
  /**
   * Determines if the OK button should be disabled or not
   */
-  updateOKButton: function updateOKButton()
-  {
+  updateOKButton: function updateOKButton() {
     this._okButton.disabled = this._itemChoose.selected ||
                               this._buttonDisabled;
   },
 
  /**
   * Updates the UI based on the checkbox being checked or not.
   */
-  onCheck: function onCheck()
-  {
+  onCheck: function onCheck() {
     if (document.getElementById("remember").checked)
       document.getElementById("remember-text").setAttribute("visible", "true");
     else
       document.getElementById("remember-text").removeAttribute("visible");
   },
 
   /**
    * Function called when the user double clicks on an item of the list
    */
-  onDblClick: function onDblClick()
-  {
+  onDblClick: function onDblClick() {
     if (this.selectedItem == this._itemChoose)
       this.chooseApplication();
     else
       document.documentElement.acceptDialog();
   },
 
   // Getters / Setters
 
  /**
   * Returns/sets the selected element in the richlistbox
   */
-  get selectedItem()
-  {
+  get selectedItem() {
     return document.getElementById("items").selectedItem;
   },
-  set selectedItem(aItem)
-  {
+  set selectedItem(aItem) {
     return document.getElementById("items").selectedItem = aItem;
   }
 
 };
--- a/toolkit/mozapps/handling/nsContentDispatchChooser.js
+++ b/toolkit/mozapps/handling/nsContentDispatchChooser.js
@@ -10,28 +10,26 @@ const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 
 const CONTENT_HANDLING_URL = "chrome://mozapps/content/handling/dialog.xul";
 const STRINGBUNDLE_URL = "chrome://mozapps/locale/handling/handling.properties";
 
 // nsContentDispatchChooser class
 
-function nsContentDispatchChooser()
-{
+function nsContentDispatchChooser() {
 }
 
 nsContentDispatchChooser.prototype =
 {
   classID: Components.ID("e35d5067-95bc-4029-8432-e8f1e431148d"),
 
   // nsIContentDispatchChooser
 
-  ask: function ask(aHandler, aWindowContext, aURI, aReason)
-  {
+  ask: function ask(aHandler, aWindowContext, aURI, aReason) {
     var window = null;
     try {
       if (aWindowContext)
         window = aWindowContext.getInterface(Ci.nsIDOMWindow);
     } catch (e) { /* it's OK to not have a window */ }
 
     var sbs = Cc["@mozilla.org/intl/stringbundle;1"].
               getService(Ci.nsIStringBundleService);
--- a/toolkit/mozapps/preferences/changemp.js
+++ b/toolkit/mozapps/preferences/changemp.js
@@ -13,26 +13,24 @@ const nsPKCS11ModuleDB = "@mozilla.org/s
 const nsIPKCS11ModuleDB = Components.interfaces.nsIPKCS11ModuleDB;
 const nsIPKCS11Slot = Components.interfaces.nsIPKCS11Slot;
 const nsIPK11Token = Components.interfaces.nsIPK11Token;
 
 
 var params;
 var pw1;
 
-function init()
-{
+function init() {
   pw1 = document.getElementById("pw1");
 
   process();
 }
 
 
-function process()
-{
+function process() {
   let bundle = document.getElementById("bundlePreferences");
 
   // If the token is unitialized, don't use the old password box.
   // Otherwise, do.
 
   let tokenDB = Cc["@mozilla.org/security/pk11tokendb;1"]
                   .getService(Ci.nsIPK11TokenDB);
   let token = tokenDB.getInternalKeyToken();
@@ -64,18 +62,17 @@ function process()
   if (params) {
     // Return value 0 means "canceled"
     params.SetInt(1, 0);
   }
 
   checkPasswords();
 }
 
-function setPassword()
-{
+function setPassword() {
   var pk11db = Components.classes[nsPK11TokenDB].getService(nsIPK11TokenDB);
   var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                                 .getService(Components.interfaces.nsIPromptService);
   var token = pk11db.getInternalKeyToken();
 
   var oldpwbox = document.getElementById("oldpw");
   var initpw = oldpwbox.getAttribute("inited");
   var bundle = document.getElementById("bundlePreferences");
@@ -147,18 +144,17 @@ function setPassword()
     success = true;
   }
 
   // Terminate dialog
   if (success)
     window.close();
 }
 
-function setPasswordStrength()
-{
+function setPasswordStrength() {
 // Here is how we weigh the quality of the password
 // number of characters
 // numbers
 // non-alpha-numeric chars
 // upper and lower case characters
 
   var pw = document.getElementById('pw1').value;
 
@@ -199,18 +195,17 @@ function setPasswordStrength()
   }
 
   var mymeter = document.getElementById('pwmeter');
   mymeter.value = pwstrength;
 
   return;
 }
 
-function checkPasswords()
-{
+function checkPasswords() {
   var pw1 = document.getElementById('pw1').value;
   var pw2 = document.getElementById('pw2').value;
   var ok = document.documentElement.getButton("accept");
 
   var oldpwbox = document.getElementById("oldpw");
   if (oldpwbox) {
     var initpw = oldpwbox.getAttribute("inited");
 
@@ -221,14 +216,13 @@ function checkPasswords()
       // We will not allow changing the password from empty to empty.
       ok.setAttribute("disabled", "true");
       return;
     }
   }
 
   if (pw1 == pw2) {
     ok.setAttribute("disabled", "false");
-  } else
-  {
+  } else {
     ok.setAttribute("disabled", "true");
   }
 
 }
--- a/toolkit/mozapps/preferences/fontbuilder.js
+++ b/toolkit/mozapps/preferences/fontbuilder.js
@@ -1,29 +1,27 @@
 // -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
 
 /* 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/. */
 
 var FontBuilder = {
   _enumerator: null,
-  get enumerator()
-  {
+  get enumerator() {
     if (!this._enumerator) {
       this._enumerator = Components.classes["@mozilla.org/gfx/fontenumerator;1"]
                                    .createInstance(Components.interfaces.nsIFontEnumerator);
     }
     return this._enumerator;
   },
 
   _allFonts: null,
   _langGroupSupported: false,
-  buildFontList(aLanguage, aFontType, aMenuList)
-  {
+  buildFontList(aLanguage, aFontType, aMenuList) {
     // Reset the list
     while (aMenuList.hasChildNodes())
       aMenuList.removeChild(aMenuList.firstChild);
 
     var defaultFont = null;
     // Load Font Lists
     var fonts = this.enumerator.EnumerateFonts(aLanguage, aFontType, { } );
     if (fonts.length > 0)
@@ -74,28 +72,26 @@ var FontBuilder = {
       popup.appendChild(separator);
 
       for (i = 0; i < this._allFonts.length; ++i) {
         if (this._allFonts[i] != builtItemValue) {
           menuitem = document.createElement("menuitem");
           menuitem.setAttribute("value", this._allFonts[i]);
           menuitem.setAttribute("label", this._allFonts[i]);
           popup.appendChild(menuitem);
-        }
-        else {
+        } else {
           builtItem = builtItem.nextSibling;
           builtItemValue = builtItem ? builtItem.getAttribute("value") : null;
         }
       }
     }
     aMenuList.appendChild(popup);
   },
 
-  readFontSelection(aElement)
-  {
+  readFontSelection(aElement) {
     // Determine the appropriate value to select, for the following cases:
     // - there is no setting
     // - the font selected by the user is no longer present (e.g. deleted from
     //   fonts folder)
     let preference = document.getElementById(aElement.getAttribute("preference"));
     if (preference.value) {
       let fontItems = aElement.getElementsByAttribute("value", preference.value);
 
--- a/toolkit/mozapps/preferences/removemp.js
+++ b/toolkit/mozapps/preferences/removemp.js
@@ -5,18 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var gRemovePasswordDialog = {
   _token    : null,
   _bundle   : null,
   _prompt   : null,
   _okButton : null,
   _password : null,
-  init()
-  {
+  init() {
     this._prompt = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                              .getService(Components.interfaces.nsIPromptService);
     this._bundle = document.getElementById("bundlePreferences");
 
     this._okButton = document.documentElement.getButton("accept");
     this._okButton.label = this._bundle.getString("pw_remove_button");
 
     this._password = document.getElementById("password");
@@ -25,31 +24,28 @@ var gRemovePasswordDialog = {
                            .getService(Components.interfaces.nsIPK11TokenDB);
     this._token = pk11db.getInternalKeyToken();
 
     // Initialize the enabled state of the Remove button by checking the
     // initial value of the password ("" should be incorrect).
     this.validateInput();
   },
 
-  validateInput()
-  {
+  validateInput() {
     this._okButton.disabled = !this._token.checkPassword(this._password.value);
   },
 
-  removePassword()
-  {
+  removePassword() {
     if (this._token.checkPassword(this._password.value)) {
       this._token.changePassword(this._password.value, "");
       this._prompt.alert(window,
                          this._bundle.getString("pw_change_success_title"),
                          this._bundle.getString("pw_erased_ok")
                          + " " + this._bundle.getString("pw_empty_warning"));
-    }
-    else {
+    } else {
       this._password.value = "";
       this._password.focus();
       this._prompt.alert(window,
                          this._bundle.getString("pw_change_failed_title"),
                          this._bundle.getString("incorrect_pw"));
     }
   },
 };
--- a/toolkit/mozapps/update/content/updates.js
+++ b/toolkit/mozapps/update/content/updates.js
@@ -94,18 +94,17 @@ function openUpdateURL(event) {
  *          The default value to return in the event the preference has
  *          no setting
  * @returns The value of the preference, or undefined if there was no
  *          user or default value.
  */
 function getPref(func, preference, defaultValue) {
   try {
     return Services.prefs[func](preference);
-  }
-  catch (e) {
+  } catch (e) {
     LOG("General", "getPref - failed to get preference: " + preference);
   }
   return defaultValue;
 }
 
 /**
  * A set of shared data and control functions for the wizard as a whole.
  */
@@ -442,18 +441,17 @@ var gUpdates = {
         if (!aus.canApplyUpdates) {
           aCallback("manualUpdate");
           return;
         }
 
         aCallback(this.updatesFoundPageId);
         return;
       }
-    }
-    else {
+    } else {
       var um = CoC["@mozilla.org/updates/update-manager;1"].
                getService(CoI.nsIUpdateManager);
       if (um.activeUpdate) {
         this.setUpdate(um.activeUpdate);
         aCallback("downloading");
         return;
       }
     }
@@ -785,18 +783,17 @@ var gDownloadingPage = {
         gUpdates.wiz.goTo("errors");
         return;
       }
       // Add this UI as a listener for active downloads
       aus.addDownloadListener(this);
 
       if (activeUpdate)
         this._setUIState(!aus.isDownloading);
-    }
-    catch (e) {
+    } catch (e) {
       LOG("gDownloadingPage", "onPageShow - error: " + e);
     }
 
     gUpdates.setButtons("hideButton", null, null, false);
     gUpdates.wiz.getButton("extra1").focus();
   },
 
   /**
@@ -850,18 +847,17 @@ var gDownloadingPage = {
                                      gUpdates.getAUSString("pauseButtonResume"));
       this._pauseButton.setAttribute("paused", "true");
       var p = u.selectedPatch.QueryInterface(CoI.nsIPropertyBag);
       var status = p.getProperty("status");
       if (status) {
         let pausedStatus = gUpdates.getAUSString("downloadPausedStatus", [status]);
         this._setStatus(pausedStatus);
       }
-    }
-    else {
+    } else {
       if (this._downloadProgress.mode != "undetermined")
         this._downloadProgress.mode = "undetermined";
       this._pauseButton.setAttribute("paused", "false");
       this._pauseButton.setAttribute("tooltiptext",
                                      gUpdates.getAUSString("pauseButtonPause"));
       this._setStatus(this._label_downloadStatus);
     }
   },
--- a/toolkit/mozapps/update/nsUpdateService.js
+++ b/toolkit/mozapps/update/nsUpdateService.js
@@ -440,18 +440,17 @@ function getCanApplyUpdates() {
           try {
             // KEY_UPDROOT will fail and throw an exception if
             // appDir is not under the Program Files, so we rely on that
             Services.dirsvc.get(KEY_UPDROOT, Ci.nsIFile);
             // appDir is under Program Files, so check if the user can elevate
             userCanElevate = Services.appinfo.QueryInterface(Ci.nsIWinAppHelper).
                              userCanElevate;
             LOG("getCanApplyUpdates - on Vista, userCanElevate: " + userCanElevate);
-          }
-          catch (ex) {
+          } catch (ex) {
             // When the installation directory is not under Program Files,
             // fall through to checking if write access to the
             // installation directory is available.
             LOG("getCanApplyUpdates - on Vista, appDir is not under Program Files");
           }
         }
 
         /**
@@ -631,18 +630,17 @@ function LOG(string) {
  *          The default value to return in the event the preference has
  *          no setting
  * @return  The value of the preference, or undefined if there was no
  *          user or default value.
  */
 function getPref(func, preference, defaultValue) {
   try {
     return Services.prefs[func](preference);
-  }
-  catch (e) {
+  } catch (e) {
   }
   return defaultValue;
 }
 
 /**
  * Convert a string containing binary values to hex.
  */
 function binaryToHex(input) {
@@ -720,18 +718,17 @@ function getUpdateFile(pathArray) {
  * @return  A human readable status text string
  */
 function getStatusTextFromCode(code, defaultCode) {
   let reason;
   try {
     reason = gUpdateBundle.GetStringFromName("check_error-" + code);
     LOG("getStatusTextFromCode - transfer error: " + reason + ", code: " +
         code);
-  }
-  catch (e) {
+  } catch (e) {
     // Use the default reason
     reason = gUpdateBundle.GetStringFromName("check_error-" + defaultCode);
     LOG("getStatusTextFromCode - transfer error: " + reason +
         ", default code: " + defaultCode);
   }
   return reason;
 }
 
@@ -1281,18 +1278,17 @@ function handleFallbackToCompleteUpdate(
     // update in the background instead.
     LOG("handleFallbackToCompleteUpdate - install of partial patch " +
         "failed, downloading complete patch");
     var status = Cc["@mozilla.org/updates/update-service;1"].
                  getService(Ci.nsIApplicationUpdateService).
                  downloadUpdate(update, !postStaging);
     if (status == STATE_NONE)
       cleanupActiveUpdate();
-  }
-  else {
+  } else {
     LOG("handleFallbackToCompleteUpdate - install of complete or " +
         "only one patch offered failed.");
   }
   update.QueryInterface(Ci.nsIWritablePropertyBag);
   update.setProperty("patchingFailed", oldType);
 }
 
 function pingStateAndStatusCodes(aUpdate, aStartup, aStatus) {
@@ -1676,18 +1672,17 @@ Update.prototype = {
    * See nsIUpdateService.idl
    */
   get detailsURL() {
     if (!this._detailsURL) {
       try {
         // Try using a default details URL supplied by the distribution
         // if the update XML does not supply one.
         return Services.urlFormatter.formatURLPref(PREF_APP_UPDATE_URL_DETAILS);
-      }
-      catch (e) {
+      } catch (e) {
       }
     }
     return this._detailsURL || "";
   },
 
   /**
    * See nsIUpdateService.idl
    */
@@ -2818,18 +2813,17 @@ function UpdateManager() {
   if (updates.length > 0) {
     // Under some edgecases such as Windows system restore the active-update.xml
     // will contain a pending update without the status file which will return
     // STATE_NONE. To recover from this situation clean the updates dir and
     // rewrite the active-update.xml file without the broken update.
     if (readStatusFile(getUpdatesDir()) == STATE_NONE) {
       cleanUpUpdatesDir();
       this._writeUpdatesToXMLFile([], getUpdateFile([FILE_ACTIVE_UPDATE_XML]));
-    }
-    else
+    } else
       this._activeUpdate = updates[0];
   }
 }
 UpdateManager.prototype = {
   /**
    * All previously downloaded and installed updates, as an array of nsIUpdate
    * objects.
    */
@@ -2897,18 +2891,17 @@ UpdateManager.prototype = {
         try {
           update = new Update(updateElement);
         } catch (e) {
           LOG("UpdateManager:_loadXMLFileIntoArray - invalid update");
           continue;
         }
         result.push(update);
       }
-    }
-    catch (e) {
+    } catch (e) {
       LOG("UpdateManager:_loadXMLFileIntoArray - error constructing update " +
           "list. Exception: " + e);
     }
     fileStream.close();
     return result;
   },
 
   /**
@@ -2967,18 +2960,17 @@ UpdateManager.prototype = {
   },
   set activeUpdate(activeUpdate) {
     this._addUpdate(activeUpdate);
     this._activeUpdate = activeUpdate;
     if (!activeUpdate) {
       // If |activeUpdate| is null, we have updated both lists - the active list
       // and the history list, so we want to write both files.
       this.saveUpdates();
-    }
-    else
+    } else
       this._writeUpdatesToXMLFile([this._activeUpdate],
                                   getUpdateFile([FILE_ACTIVE_UPDATE_XML]));
     return activeUpdate;
   },
 
   /**
    * Add an update to the Updates list. If the item already exists in the list,
    * replace the existing value with the new value.
@@ -3325,18 +3317,17 @@ Checker.prototype = {
 
   /**
    * Returns the status code for the XMLHttpRequest
    */
   _getChannelStatus: function UC__getChannelStatus(request) {
     var status = 0;
     try {
       status = request.status;
-    }
-    catch (e) {
+    } catch (e) {
     }
 
     if (status == 0)
       status = request.channel.QueryInterface(Ci.nsIRequest).status;
     return status;
   },
 
   _isHttpStatusCode: function UC__isHttpStatusCode(status) {
@@ -4025,18 +4016,17 @@ Downloader.prototype = {
         }
         AUSTLMY.pingDownloadCode(this.isCompleteUpdate, AUSTLMY.DWNLD_SUCCESS);
 
         // Tell the updater.exe we're ready to apply.
         writeStatusFile(getUpdatesDir(), state);
         writeVersionFile(getUpdatesDir(), this._update.appVersion);
         this._update.installDate = (new Date()).getTime();
         this._update.statusText = gUpdateBundle.GetStringFromName("installPending");
-      }
-      else {
+      } else {
         LOG("Downloader:onStopRequest - download verification failed");
         state = STATE_DOWNLOAD_FAILED;
         status = Cr.NS_ERROR_CORRUPTED_CONTENT;
 
         // Yes, this code is a string.
         const vfCode = "verification_failed";
         var message = getStatusTextFromCode(vfCode, vfCode);
         this._update.statusText = message;
@@ -4111,18 +4101,17 @@ Downloader.prototype = {
     }
     LOG("Downloader:onStopRequest - setting state to: " + state);
     this._patch.state = state;
     var um = Cc["@mozilla.org/updates/update-manager;1"].
              getService(Ci.nsIUpdateManager);
     if (deleteActiveUpdate) {
       this._update.installDate = (new Date()).getTime();
       um.activeUpdate = null;
-    }
-    else if (um.activeUpdate) {
+    } else if (um.activeUpdate) {
       um.activeUpdate.state = state;
     }
     um.saveUpdates();
 
     // Only notify listeners about the stopped state if we
     // aren't handling an internal retry.
     if (!shouldRetrySoon && !shouldRegisterOnlineObserver) {
       var listeners = this._listeners.concat();
@@ -4523,18 +4512,17 @@ UpdatePrompt.prototype = {
       ary.appendElement(update, /* weak =*/ false);
     }
 
     var win = this._getUpdateWindow();
     if (win) {
       if (page && "setCurrentPage" in win)
         win.setCurrentPage(page);
       win.focus();
-    }
-    else {
+    } else {
       var openFeatures = "chrome,centerscreen,dialog=no,resizable=no,titlebar,toolbar=no";
       if (features)
         openFeatures += "," + features;
       Services.ww.openWindow(parent, uri, "", openFeatures, ary);
     }
   },
 
   classDescription: "Update Prompt",
--- a/toolkit/mozapps/update/tests/chrome/utils.js
+++ b/toolkit/mozapps/update/tests/chrome/utils.js
@@ -179,18 +179,17 @@ const gWindowObserver = {
         debugDump("domwindowclosed event for window not being tested - " +
                   "location: " + win.location + "... returning early");
         return;
       }
       // Allow tests the ability to provide their own function (it must be
       // named finishTest) for finishing the test.
       try {
         finishTest();
-      }
-      catch (e) {
+      } catch (e) {
         finishTestDefault();
       }
       return;
     }
 
     win.addEventListener("load", function WO_observe_onLoad() {
       win.removeEventListener("load", WO_observe_onLoad, false);
       // Ignore windows other than the update UI window.
@@ -243,18 +242,17 @@ function runTestDefault() {
  * up to the amount declared in CLOSE_WINDOW_TIMEOUT_MAXCOUNT until the update
  * window has closed before continuing the test.
  */
 function runTestDefaultWaitForWindowClosed() {
   gCloseWindowTimeoutCounter++;
   if (gCloseWindowTimeoutCounter > CLOSE_WINDOW_TIMEOUT_MAXCOUNT) {
     try {
       finishTest();
-    }
-    catch (e) {
+    } catch (e) {
       finishTestDefault();
     }
     return;
   }
 
   // The update window should not be open at this time. If it is the call to
   // |closeUpdateWindow| will close it and cause the test to fail.
   if (closeUpdateWindow()) {
@@ -318,18 +316,17 @@ function finishTestDefault() {
  *         The nsITimer that fired.
  */
 function finishTestTimeout(aTimer) {
   ok(false, "Test timed out. Maximum time allowed is " + (gTestTimeout / 1000) +
      " seconds");
 
   try {
     finishTest();
-  }
-  catch (e) {
+  } catch (e) {
     finishTestDefault();
   }
 }
 
 /**
  * When a test finishes this will repeatedly attempt to restore the real updater
  * for tests that use the test updater and then call
  * finishTestDefaultWaitForWindowClosed after the restore is successful.
@@ -840,18 +837,17 @@ function resetFiles() {
     updatedDir.append(DIR_PATCH);
   } else {
     updatedDir = getAppBaseDir();
   }
   updatedDir.append(DIR_UPDATED);
   if (updatedDir.exists()) {
     try {
       removeDirRecursive(updatedDir);
-    }
-    catch (e) {
+    } catch (e) {
       logTestInfo("Unable to remove directory. Path: " + updatedDir.path +
                   ", Exception: " + e);
     }
   }
 }
 
 /**
  * Resets the most common preferences used by tests to their original values.
@@ -908,18 +904,17 @@ function resetPrefs() {
   }
 
   if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDMAXERRORS)) {
     Services.prefs.clearUserPref(PREF_APP_UPDATE_BACKGROUNDMAXERRORS);
   }
 
   try {
     Services.prefs.deleteBranch(PREFBRANCH_APP_UPDATE_NEVER);
-  }
-  catch (e) {
+  } catch (e) {
   }
 }
 
 function setupTimer(aTestTimeout) {
   gTestTimeout = aTestTimeout;
   if (gTimeoutTimer) {
     gTimeoutTimer.cancel();
     gTimeoutTimer = null;
--- a/toolkit/profile/content/createProfileWizard.js
+++ b/toolkit/profile/content/createProfileWizard.js
@@ -16,38 +16,35 @@ var gDefaultProfileParent;
 
 // The directory where the profile will be created.
 var gProfileRoot;
 
 // Text node to display the location and name of the profile to create.
 var gProfileDisplay;
 
 // Called once when the wizard is opened.
-function initWizard()
-{
+function initWizard() {
   try {
     gProfileService = C[ToolkitProfileService].getService(I.nsIToolkitProfileService);
     gProfileManagerBundle = document.getElementById("bundle_profileManager");
 
     var dirService = C["@mozilla.org/file/directory_service;1"].getService(I.nsIProperties);
     gDefaultProfileParent = dirService.get("DefProfRt", I.nsIFile);
 
     // Initialize the profile location display.
     gProfileDisplay = document.getElementById("profileDisplay").firstChild;
     setDisplayToDefaultFolder();
-  }
-  catch (e) {
+  } catch (e) {
     window.close();
     throw (e);
   }
 }
 
 // Called every time the second wizard page is displayed.
-function initSecondWizardPage()
-{
+function initSecondWizardPage() {
   var profileName = document.getElementById("profileName");
   profileName.select();
   profileName.focus();
 
   // Initialize profile name validation.
   checkCurrentInput(profileName.value);
 }
 
@@ -57,37 +54,33 @@ const kSaltTable = [
   '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' ];
 
 var kSaltString = "";
 for (var i = 0; i < 8; ++i) {
   kSaltString += kSaltTable[Math.floor(Math.random() * kSaltTable.length)];
 }
 
 
-function saltName(aName)
-{
+function saltName(aName) {
   return kSaltString + "." + aName;
 }
 
-function setDisplayToDefaultFolder()
-{
+function setDisplayToDefaultFolder() {
   var defaultProfileDir = gDefaultProfileParent.clone();
   defaultProfileDir.append(saltName(document.getElementById("profileName").value));
   gProfileRoot = defaultProfileDir;
   document.getElementById("useDefault").disabled = true;
 }
 
-function updateProfileDisplay()
-{
+function updateProfileDisplay() {
   gProfileDisplay.data = gProfileRoot.path;
 }
 
 // Invoke a folder selection dialog for choosing the directory of profile storage.
-function chooseProfileFolder()
-{
+function chooseProfileFolder() {
   var newProfileRoot;
 
   var dirChooser = C["@mozilla.org/filepicker;1"].createInstance(I.nsIFilePicker);
   dirChooser.init(window, gProfileManagerBundle.getString("chooseFolder"),
                   I.nsIFilePicker.modeGetFolder);
   dirChooser.appendFilters(I.nsIFilePicker.filterAll);
 
   // default to the Profiles folder
@@ -101,104 +94,95 @@ function chooseProfileFolder()
   document.getElementById("useDefault").disabled =
     (newProfileRoot.parent.equals(gDefaultProfileParent));
 
   gProfileRoot = newProfileRoot;
   updateProfileDisplay();
 }
 
 // Checks the current user input for validity and triggers an error message accordingly.
-function checkCurrentInput(currentInput)
-{
+function checkCurrentInput(currentInput) {
   var finishButton = document.documentElement.getButton("finish");
   var finishText = document.getElementById("finishText");
   var canAdvance;
 
   var errorMessage = checkProfileName(currentInput);
 
   if (!errorMessage) {
     finishText.className = "";
     if (AppConstants.platform == "macosx") {
       finishText.firstChild.data = gProfileManagerBundle.getString("profileFinishTextMac");
-    }
-    else {
+    } else {
       finishText.firstChild.data = gProfileManagerBundle.getString("profileFinishText");
     }
     canAdvance = true;
-  }
-  else {
+  } else {
     finishText.className = "error";
     finishText.firstChild.data = errorMessage;
     canAdvance = false;
   }
 
   document.documentElement.canAdvance = canAdvance;
   finishButton.disabled = !canAdvance;
 
   updateProfileDisplay();
 
   return canAdvance;
 }
 
-function updateProfileName(aNewName)
-{
+function updateProfileName(aNewName) {
   if (checkCurrentInput(aNewName)) {
     gProfileRoot.leafName = saltName(aNewName);
     updateProfileDisplay();
   }
 }
 
 // Checks whether the given string is a valid profile name.
 // Returns an error message describing the error in the name or "" when it's valid.
-function checkProfileName(profileNameToCheck)
-{
+function checkProfileName(profileNameToCheck) {
   // Check for emtpy profile name.
   if (!/\S/.test(profileNameToCheck))
     return gProfileManagerBundle.getString("profileNameEmpty");
 
   // Check whether all characters in the profile name are allowed.
   if (/([\\*:?<>|\/\"])/.test(profileNameToCheck))
     return gProfileManagerBundle.getFormattedString("invalidChar", [RegExp.$1]);
 
   // Check whether a profile with the same name already exists.
   if (profileExists(profileNameToCheck))
     return gProfileManagerBundle.getString("profileExists");
 
   // profileNameToCheck is valid.
   return "";
 }
 
-function profileExists(aName)
-{
+function profileExists(aName) {
   var profiles = gProfileService.profiles;
   while (profiles.hasMoreElements()) {
     var profile = profiles.getNext().QueryInterface(I.nsIToolkitProfile);
     if (profile.name.toLowerCase() == aName.toLowerCase())
       return true;
   }
 
   return false;
 }
 
 // Called when the first wizard page is shown.
-function enableNextButton()
-{
+function enableNextButton() {
   document.documentElement.canAdvance = true;
 }
 
-function onFinish()
-{
+function onFinish() {
   var profileName = document.getElementById("profileName").value;
   var profile;
 
   // Create profile named profileName in profileRoot.
   try {
     profile = gProfileService.createProfile(gProfileRoot, profileName);
-  }
-  catch (e) {
+  } catch (e) {
     var profileCreationFailed =
       gProfileManagerBundle.getString("profileCreationFailed");
     var profileCreationFailedTitle =
       gProfileManagerBundle.getString("profileCreationFailedTitle");
     var promptService = C["@mozilla.org/embedcomp/prompt-service;1"].
       getService(I.nsIPromptService);
     promptService.alert(window, profileCreationFailedTitle,
                         profileCreationFailed + "\n" + e);
@@ -206,18 +190,17 @@ function onFinish()
     return false;
   }
 
   // window.opener is false if the Create Profile Wizard was opened from the
   // command line.
   if (window.opener) {
     // Add new profile to the list in the Profile Manager.
     window.opener.CreateProfile(profile);
-  }
-  else {
+  } else {
     // Use the newly created Profile.
     var profileLock = profile.lock(null);
 
     var dialogParams = window.arguments[0].QueryInterface(I.nsIDialogParamBlock);
     dialogParams.objects.insertElementAt(profileLock, 0, false);
   }
 
   // Exit the wizard.
--- a/toolkit/profile/content/profileSelection.js
+++ b/toolkit/profile/content/profileSelection.js
@@ -12,18 +12,17 @@ const I = Components.interfaces;
 
 const ToolkitProfileService = "@mozilla.org/toolkit/profile-service;1";
 
 var gDialogParams;
 var gProfileManagerBundle;
 var gBrandBundle;
 var gProfileService;
 
-function startup()
-{
+function startup() {
   try {
     gDialogParams = window.arguments[0].
       QueryInterface(I.nsIDialogParamBlock);
 
     gProfileService = C[ToolkitProfileService].getService(I.nsIToolkitProfileService);
 
     gProfileManagerBundle = document.getElementById("bundle_profileManager");
     gBrandBundle = document.getElementById("bundle_brand");
@@ -45,32 +44,29 @@ function startup()
       listitem.profile = profile;
       try {
         if (profile === gProfileService.selectedProfile) {
           setTimeout(function(a) {
             profilesElement.ensureElementIsVisible(a);
             profilesElement.selectItem(a);
           }, 0, listitem);
         }
-      }
-      catch (e) { }
+      } catch (e) { }
     }
 
     var autoSelectLastProfile = document.getElementById("autoSelectLastProfile");
     autoSelectLastProfile.checked = gProfileService.startWithLastProfile;
     profilesElement.focus();
-  }
-  catch (e) {
+  } catch (e) {
     window.close();
     throw (e);
   }
 }
 
-function acceptDialog()
-{
+function acceptDialog() {
   var appName = gBrandBundle.getString("brandShortName");
 
   var profilesElement = document.getElementById("profiles");
   var selectedProfile = profilesElement.selectedItem;
   if (!selectedProfile) {
     var pleaseSelectTitle = gProfileManagerBundle.getString("pleaseSelectTitle");
     var pleaseSelect =
       gProfileManagerBundle.getFormattedString("pleaseSelect", [appName]);
@@ -78,18 +74,17 @@ function acceptDialog()
 
     return false;
   }
 
   var profileLock;
 
   try {
     profileLock = selectedProfile.profile.lock({ value: null });
-  }
-  catch (e) {
+  } catch (e) {
     if (!selectedProfile.profile.rootDir.exists()) {
       var missingTitle = gProfileManagerBundle.getString("profileMissingTitle");
       var missing =
         gProfileManagerBundle.getFormattedString("profileMissing", [appName]);
       Services.prompt.alert(window, missingTitle, missing);
       return false;
     }
 
@@ -108,84 +103,76 @@ function acceptDialog()
 
   gDialogParams.SetInt(0, 1);
 
   gDialogParams.SetString(0, selectedProfile.profile.name);
 
   return true;
 }
 
-function exitDialog()
-{
+function exitDialog() {
   updateStartupPrefs();
 
   return true;
 }
 
-function updateStartupPrefs()
-{
+function updateStartupPrefs() {
   var autoSelectLastProfile = document.getElementById("autoSelectLastProfile");
   gProfileService.startWithLastProfile = autoSelectLastProfile.checked;
 
   /* Bug 257777 */
   gProfileService.startOffline = document.getElementById("offlineState").checked;
 }
 
 // handle key event on listboxes
-function onProfilesKey(aEvent)
-{
-  switch ( aEvent.keyCode )
-  {
+function onProfilesKey(aEvent) {
+  switch ( aEvent.keyCode ) {
   case KeyEvent.DOM_VK_BACK_SPACE:
     if (AppConstants.platform != "macosx")
       break;
   case KeyEvent.DOM_VK_DELETE:
     ConfirmDelete();
     break;
   case KeyEvent.DOM_VK_F2:
     RenameProfile();
     break;
   }
 }
 
-function onProfilesDblClick(aEvent)
-{
+function onProfilesDblClick(aEvent) {
   if (aEvent.target.localName == "listitem")
     document.documentElement.acceptDialog();
 }
 
 // invoke the createProfile Wizard
-function CreateProfileWizard()
-{
+function CreateProfileWizard() {
   window.openDialog('chrome://mozapps/content/profile/createProfileWizard.xul',
                     '', 'centerscreen,chrome,modal,titlebar', gProfileService);
 }
 
 /**
  * Called from createProfileWizard to update the display.
  */
-function CreateProfile(aProfile)
-{
+function CreateProfile(aProfile) {
   var profilesElement = document.getElementById("profiles");
 
   var listitem = profilesElement.appendItem(aProfile.name, "");
 
   var tooltiptext =
     gProfileManagerBundle.getFormattedString("profileTooltip", [aProfile.name, aProfile.rootDir.path]);
   listitem.setAttribute("tooltiptext", tooltiptext);
   listitem.setAttribute("class", "listitem-iconic");
   listitem.profile = aProfile;
 
   profilesElement.ensureElementIsVisible(listitem);
   profilesElement.selectItem(listitem);
 }
 
 // rename the selected profile
-function RenameProfile()
-{
+function RenameProfile() {
   var profilesElement = document.getElementById("profiles");
   var selectedItem = profilesElement.selectedItem;
   if (!selectedItem) {
     return false;
   }
 
   var selectedProfile = selectedItem.profile;
 
@@ -200,18 +187,17 @@ function RenameProfile()
     newName = newName.value;
 
     // User hasn't changed the profile name. Treat as if cancel was pressed.
     if (newName == oldName)
       return false;
 
     try {
       selectedProfile.name = newName;
-    }
-    catch (e) {
+    } catch (e) {
       var alTitle = gProfileManagerBundle.getString("profileNameInvalidTitle");
       var alMsg = gProfileManagerBundle.getFormattedString("profileNameInvalid", [newName]);
       Services.prompt.alert(window, alTitle, alMsg);
       return false;
     }
 
     selectedItem.label = newName;
     var tiptext = gProfileManagerBundle.
@@ -220,18 +206,17 @@ function RenameProfile()
     selectedItem.setAttribute("tooltiptext", tiptext);
 
     return true;
   }
 
   return false;
 }
 
-function ConfirmDelete()
-{
+function ConfirmDelete() {
   var profileList = document.getElementById( "profiles" );
 
   var selectedItem = profileList.selectedItem;
   if (!selectedItem) {
     return false;
   }
 
   var selectedProfile = selectedItem.profile;
--- a/toolkit/xre/test/test_fpuhandler.html
+++ b/toolkit/xre/test/test_fpuhandler.html
@@ -14,24 +14,22 @@
 
     for (i = 0 + x; i < 1000; ++i)
       z = y / x;
 
     z = x / y;
     return z;
   }
 
-  function runTest()
-  {
+  function runTest() {
     ok(isNaN(doDiv(0.0, 0.0)), "Undefined division-by-zero doesn't crash");
 
     try {
       document.getElementById('plugin1').enableFPExceptions();
-    }
-    catch (e) {
+    } catch (e) {
       ok(true, "No special code to set the FPU bit in the testplugin.");
       SimpleTest.finish();
       return;
     }
 
     ok(isNaN(doDiv(0.0, 0.0)), "Undefined division-by-zero doesn't crash again.");
     SimpleTest.finish();
   }