Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=mattn draft
authorJared Wein <jwein@mozilla.com>
Thu, 29 Dec 2016 18:34:54 -0500
changeset 454682 57d71f2bfb2deb868d69de9b1cbd0f43e3ad0647
parent 454661 f6b5a9337113f15aa47087d198a5d398df32a24d
child 454683 61eefcfa9fa7c6685b5e91ee96c850a89a01faf0
push id40002
push userbmo:jaws@mozilla.com
push dateThu, 29 Dec 2016 23:36:43 +0000
reviewersmattn
bugs1325464
milestone53.0a1
Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=mattn MozReview-Commit-ID: 7E7LPorrEje
browser/base/content/aboutDialog-appUpdater.js
browser/base/content/aboutaccounts/aboutaccounts.js
browser/base/content/abouthealthreport/abouthealth.js
browser/base/content/abouthome/aboutHome.js
browser/base/content/browser-addons.js
browser/base/content/browser-ctrlTab.js
browser/base/content/browser-customization.js
browser/base/content/browser-data-submission-info-bar.js
browser/base/content/browser-devedition.js
browser/base/content/browser-fullScreenAndPointerLock.js
browser/base/content/browser-fullZoom.js
browser/base/content/browser-fxaccounts.js
browser/base/content/browser-gestureSupport.js
browser/base/content/browser-media.js
browser/base/content/browser-places.js
browser/base/content/browser-plugins.js
browser/base/content/browser-refreshblocker.js
browser/base/content/browser-safebrowsing.js
browser/base/content/browser-sidebar.js
browser/base/content/browser-syncui.js
browser/base/content/browser-tabsintitlebar-stub.js
browser/base/content/browser-tabsintitlebar.js
browser/base/content/browser.js
browser/base/content/content.js
browser/base/content/contentSearchUI.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/social-content.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/tab-content.js
browser/base/content/test/general/browser_aboutAccounts.js
browser/base/content/test/general/browser_aboutHealthReport.js
browser/base/content/test/general/browser_aboutHome.js
browser/base/content/test/general/browser_alltabslistener.js
browser/base/content/test/general/browser_blockHPKP.js
browser/base/content/test/general/browser_bug321000.js
browser/base/content/test/general/browser_bug356571.js
browser/base/content/test/general/browser_bug424101.js
browser/base/content/test/general/browser_bug553455.js
browser/base/content/test/general/browser_bug561636.js
browser/base/content/test/general/browser_bug592338.js
browser/base/content/test/general/browser_bug676619.js
browser/base/content/test/general/browser_bug734076.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_devedition.js
browser/base/content/test/general/browser_documentnavigation.js
browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js
browser/base/content/test/general/browser_e10s_about_process.js
browser/base/content/test/general/browser_fullscreen-window-open.js
browser/base/content/test/general/browser_fxa_oauth.js
browser/base/content/test/general/browser_fxa_web_channel.js
browser/base/content/test/general/browser_fxaccounts.js
browser/base/content/test/general/browser_getshortcutoruri.js
browser/base/content/test/general/browser_homeDrop.js
browser/base/content/test/general/browser_keywordSearch.js
browser/base/content/test/general/browser_plainTextLinks.js
browser/base/content/test/general/browser_restore_isAppTab.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_link_when_window_navigates.js
browser/base/content/test/general/browser_save_private_link_perwindowpb.js
browser/base/content/test/general/browser_tabfocus.js
browser/base/content/test/general/browser_tabopen_reflows.js
browser/base/content/test/general/browser_trackingUI_4.js
browser/base/content/test/general/browser_trackingUI_6.js
browser/base/content/test/general/browser_viewSourceInTabOnViewSource.js
browser/base/content/test/general/browser_web_channel.js
browser/base/content/test/general/browser_windowactivation.js
browser/base/content/test/general/browser_windowopen_reflows.js
browser/base/content/test/general/contentSearchUI.js
browser/base/content/test/general/head.js
browser/base/content/test/general/offlineByDefault.js
browser/base/content/test/general/parsingTestHelpers.jsm
browser/base/content/test/newtab/browser_newtab_bug722273.js
browser/base/content/test/newtab/browser_newtab_bug725996.js
browser/base/content/test/newtab/browser_newtab_bug991210.js
browser/base/content/test/newtab/browser_newtab_drag_drop.js
browser/base/content/test/newtab/browser_newtab_search.js
browser/base/content/test/newtab/head.js
browser/base/content/test/plugins/blocklist_proxy.js
browser/base/content/test/plugins/browser_bug797677.js
browser/base/content/test/plugins/browser_pluginCrashReportNonDeterminism.js
browser/base/content/test/popupNotifications/browser_popupNotification.js
browser/base/content/test/popupNotifications/browser_popupNotification_2.js
browser/base/content/test/popupNotifications/browser_popupNotification_3.js
browser/base/content/test/popupNotifications/browser_popupNotification_4.js
browser/base/content/test/popupNotifications/browser_popupNotification_5.js
browser/base/content/test/popupNotifications/browser_popupNotification_checkbox.js
browser/base/content/test/popupNotifications/browser_popupNotification_no_anchors.js
browser/base/content/test/social/browser_aboutHome_activation.js
browser/base/content/test/social/browser_addons.js
browser/base/content/test/social/browser_blocklist.js
browser/base/content/test/social/browser_share.js
browser/base/content/test/social/browser_social_activation.js
browser/base/content/test/social/social_crash_content_helper.js
browser/base/content/test/urlbar/Panel.jsm
browser/base/content/test/urlbar/browser_autocomplete_no_title.js
browser/base/content/test/urlbar/browser_autocomplete_tag_star_visibility.js
browser/base/content/test/urlbar/browser_bug556061.js
browser/base/content/test/urlbar/browser_bug623155.js
browser/base/content/test/urlbar/browser_search_favicon.js
browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
browser/base/content/test/urlbar/browser_urlbarAddonIframe.js
browser/base/content/test/urlbar/browser_urlbarCopying.js
browser/base/content/test/urlbar/browser_urlbarSearchTelemetry.js
browser/base/content/test/urlbar/head.js
browser/base/content/test/urlbar/urlbarAddonIframe.js
browser/base/content/utilityOverlay.js
browser/base/content/web-panels.js
browser/base/content/webrtcIndicator.js
browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js
browser/components/contextualidentity/test/browser/browser_serviceworkers.js
browser/components/customizableui/CustomizableUI.jsm
browser/components/customizableui/CustomizableWidgets.jsm
browser/components/customizableui/CustomizeMode.jsm
browser/components/customizableui/DragPositionManager.jsm
browser/components/customizableui/PanelWideWidgetTracker.jsm
browser/components/customizableui/ScrollbarSampler.jsm
browser/components/customizableui/content/panelUI.js
browser/components/customizableui/test/browser_1003588_no_specials_in_panel.js
browser/components/customizableui/test/browser_877006_missing_view.js
browser/components/customizableui/test/browser_942581_unregisterArea_keeps_placements.js
browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js
browser/components/customizableui/test/browser_947914_button_newWindow.js
browser/components/customizableui/test/browser_973641_button_addon.js
browser/components/customizableui/test/browser_976792_insertNodeInWindow.js
browser/components/customizableui/test/browser_980155_add_overflow_toolbar.js
browser/components/customizableui/test/browser_981418-widget-onbeforecreated-handler.js
browser/components/customizableui/test/browser_987492_window_api.js
browser/components/customizableui/test/browser_995164_registerArea_during_customize_mode.js
browser/components/migration/360seProfileMigrator.js
browser/components/migration/ChromeProfileMigrator.js
browser/components/migration/ESEDBReader.jsm
browser/components/migration/EdgeProfileMigrator.js
browser/components/migration/FirefoxProfileMigrator.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/NewTabURL.jsm
browser/components/newtab/NewTabWebChannel.jsm
browser/components/newtab/PlacesProvider.jsm
browser/components/nsBrowserGlue.js
browser/components/originattributes/test/browser/browser_cache.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/moveBookmarks.js
browser/components/places/content/places.js
browser/components/places/content/treeView.js
browser/components/places/tests/browser/browser_423515.js
browser/components/places/tests/browser/browser_bookmarklet_windowOpen.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_left_pane_fixnames.js
browser/components/places/tests/browser/browser_library_middleclick.js
browser/components/places/tests/browser/browser_library_views_liveupdate.js
browser/components/places/tests/browser/browser_sidebarpanels_click.js
browser/components/places/tests/browser/browser_views_liveupdate.js
browser/components/places/tests/browser/head.js
browser/components/places/tests/unit/test_421483.js
browser/components/places/tests/unit/test_PUIU_makeTransaction.js
browser/components/places/tests/unit/test_clearHistory_shutdown.js
browser/components/preferences/SiteDataManager.jsm
browser/components/preferences/blocklists.js
browser/components/preferences/connection.js
browser/components/preferences/cookies.js
browser/components/preferences/fonts.js
browser/components/preferences/in-content/tests/browser_advanced_siteData.js
browser/components/preferences/in-content/tests/browser_advanced_update.js
browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js
browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js
browser/components/preferences/in-content/tests/browser_cookies_exceptions.js
browser/components/preferences/in-content/tests/head.js
browser/components/preferences/languages.js
browser/components/preferences/permissions.js
browser/components/preferences/sanitize.js
browser/components/preferences/translation.js
browser/components/search/test/browser_426329.js
browser/components/search/test/browser_aboutSearchReset.js
browser/components/search/test/browser_abouthome_behavior.js
browser/components/search/test/browser_addEngine.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_hiddenOneOffs_cleanup.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_webapi.js
browser/components/search/test/browser_yahoo_behavior.js
browser/components/search/test/head.js
browser/components/selfsupport/SelfSupportService.js
browser/components/shell/content/setDesktopBackground.js
browser/components/syncedtabs/SyncedTabsDeckComponent.js
browser/components/syncedtabs/SyncedTabsDeckStore.js
browser/components/syncedtabs/test/xpcshell/head.js
browser/components/tests/browser/browser_bug538331.js
browser/components/tests/unit/test_distribution.js
browser/components/translation/BingTranslator.jsm
browser/components/translation/LanguageDetector.jsm
browser/components/translation/Translation.jsm
browser/components/translation/TranslationContentHandler.jsm
browser/components/translation/TranslationDocument.jsm
browser/components/translation/YandexTranslator.jsm
browser/components/translation/test/browser_translation_infobar.js
browser/components/translation/test/browser_translation_telemetry.js
browser/components/uitour/UITour-lib.js
browser/components/uitour/UITour.jsm
browser/components/uitour/content-UITour.js
browser/components/uitour/test/browser_UITour_defaultBrowser.js
browser/components/uitour/test/browser_UITour_heartbeat.js
browser/components/uitour/test/browser_UITour_modalDialog.js
browser/components/uitour/test/browser_no_tabs.js
browser/experiments/Experiments.jsm
browser/experiments/ExperimentsService.js
browser/experiments/test/xpcshell/test_activate.js
browser/extensions/pocket/bootstrap.js
browser/extensions/pocket/content/AboutPocket.jsm
browser/extensions/pocket/content/main.js
browser/extensions/pocket/content/panels/js/messages.js
browser/extensions/pocket/content/panels/js/saved.js
browser/extensions/pocket/content/panels/js/signup.js
browser/extensions/pocket/content/pktApi.jsm
browser/extensions/pocket/test/head.js
browser/extensions/presentation/bootstrap.js
browser/extensions/presentation/content/PresentationDevicePrompt.jsm
browser/modules/AboutHome.jsm
browser/modules/AboutNewTab.jsm
browser/modules/BrowserUITelemetry.jsm
browser/modules/CastingApps.jsm
browser/modules/ContentClick.jsm
browser/modules/ContentCrashHandlers.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/FormValidationHandler.jsm
browser/modules/HiddenFrame.jsm
browser/modules/NetworkPrioritizer.jsm
browser/modules/PermissionUI.jsm
browser/modules/PluginContent.jsm
browser/modules/ProcessHangMonitor.jsm
browser/modules/ReaderParent.jsm
browser/modules/RemotePrompt.jsm
browser/modules/SelfSupportBackend.jsm
browser/modules/SitePermissions.jsm
browser/modules/Social.jsm
browser/modules/SocialService.jsm
browser/modules/TransientPrefs.jsm
browser/modules/URLBarZoom.jsm
browser/modules/Windows8WindowFrameColor.jsm
browser/modules/WindowsJumpLists.jsm
browser/modules/WindowsPreviewPerTab.jsm
browser/modules/offlineAppCache.jsm
browser/modules/test/browser_ContentSearch.js
browser/modules/test/browser_PermissionUI.js
browser/modules/test/browser_ProcessHangNotifications.js
browser/modules/test/contentSearch.js
browser/modules/test/unit/social/head.js
browser/modules/test/xpcshell/test_DirectoryLinksProvider.js
browser/modules/webrtcUI.jsm
browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm
browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm
storage/test/unit/head_storage.js
toolkit/.eslintrc.js
toolkit/components/aboutcheckerboard/content/aboutCheckerboard.js
toolkit/components/aboutmemory/content/aboutMemory.js
toolkit/components/aboutperformance/content/aboutPerformance.js
toolkit/components/addoncompat/CompatWarning.jsm
toolkit/components/addoncompat/Prefetcher.jsm
toolkit/components/addoncompat/RemoteAddonsChild.jsm
toolkit/components/addoncompat/RemoteAddonsParent.jsm
toolkit/components/addoncompat/ShimWaiver.jsm
toolkit/components/addoncompat/defaultShims.js
toolkit/components/addoncompat/multiprocessShims.js
toolkit/components/addoncompat/tests/addon/bootstrap.js
toolkit/components/addoncompat/tests/browser/browser_addonShims.js
toolkit/components/asyncshutdown/AsyncShutdown.jsm
toolkit/components/asyncshutdown/nsAsyncShutdown.js
toolkit/components/asyncshutdown/tests/xpcshell/head.js
toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js
toolkit/components/autocomplete/tests/unit/head_autocomplete.js
toolkit/components/autocomplete/tests/unit/test_330578.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/captivedetect.js
toolkit/components/contentprefs/ContentPrefService2.jsm
toolkit/components/contentprefs/ContentPrefServiceChild.jsm
toolkit/components/contentprefs/ContentPrefServiceParent.jsm
toolkit/components/contentprefs/nsContentPrefService.js
toolkit/components/contentprefs/tests/unit/test_bug679784.js
toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js
toolkit/components/contentprefs/tests/unit_cps2/head.js
toolkit/components/contentprefs/tests/unit_cps2/test_setGet.js
toolkit/components/crashes/CrashManager.jsm
toolkit/components/crashes/CrashManagerTest.jsm
toolkit/components/crashes/CrashService.js
toolkit/components/crashmonitor/CrashMonitor.jsm
toolkit/components/crashmonitor/nsCrashMonitor.js
toolkit/components/ctypes/tests/chrome/xpcshellTestHarnessAdaptor.js
toolkit/components/ctypes/tests/unit/head.js
toolkit/components/ctypes/tests/unit/test_finalizer.js
toolkit/components/ctypes/tests/unit/test_jsctypes.js
toolkit/components/downloads/test/unit/test_app_rep_windows.js
toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js
toolkit/components/exthelper/extApplication.js
toolkit/components/feeds/test/test_xml.js
toolkit/components/filepicker/content/filepicker.js
toolkit/components/filepicker/nsFilePicker.js
toolkit/components/filepicker/test/unit/test_filecomplete.js
toolkit/components/formautofill/FormAutofillContentService.js
toolkit/components/formautofill/FormAutofillStartup.js
toolkit/components/formautofill/content/RequestAutocompleteUI.jsm
toolkit/components/formautofill/content/requestAutocomplete.js
toolkit/components/formautofill/test/chrome/loader.js
toolkit/components/formautofill/test/head_common.js
toolkit/components/formautofill/test/loader_common.js
toolkit/components/gfx/SanityTest.js
toolkit/components/gfx/content/gfxFrameScript.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/DownloadUIHelper.jsm
toolkit/components/jsdownloads/src/Downloads.jsm
toolkit/components/jsdownloads/test/unit/common_test_Download.js
toolkit/components/jsdownloads/test/unit/head.js
toolkit/components/jsdownloads/test/unit/test_DownloadImport.js
toolkit/components/jsdownloads/test/unit/test_DownloadList.js
toolkit/components/lz4/lz4.js
toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js
toolkit/components/microformats/microformat-shiv.js
toolkit/components/narrate/NarrateControls.jsm
toolkit/components/narrate/Narrator.jsm
toolkit/components/narrate/VoiceSelect.jsm
toolkit/components/narrate/test/NarrateTestUtils.jsm
toolkit/components/passwordmgr/LoginHelper.jsm
toolkit/components/passwordmgr/LoginImport.jsm
toolkit/components/passwordmgr/LoginManagerContent.jsm
toolkit/components/passwordmgr/LoginManagerContextMenu.jsm
toolkit/components/passwordmgr/LoginManagerParent.jsm
toolkit/components/passwordmgr/content/passwordManager.js
toolkit/components/passwordmgr/crypto-SDR.js
toolkit/components/passwordmgr/nsLoginInfo.js
toolkit/components/passwordmgr/nsLoginManagerPrompter.js
toolkit/components/passwordmgr/storage-json.js
toolkit/components/passwordmgr/storage-mozStorage.js
toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js
toolkit/components/passwordmgr/test/browser/browser_passwordmgr_switchtab.js
toolkit/components/passwordmgr/test/prompt_common.js
toolkit/components/passwordmgr/test/unit/test_notifications.js
toolkit/components/passwordmgr/test/unit/test_storage.js
toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js
toolkit/components/perfmonitoring/AddonWatcher.jsm
toolkit/components/perfmonitoring/PerformanceStats.jsm
toolkit/components/perfmonitoring/PerformanceWatcher.jsm
toolkit/components/perfmonitoring/tests/browser/browser_compartments.js
toolkit/components/perfmonitoring/tests/browser/head.js
toolkit/components/places/BookmarkHTMLUtils.jsm
toolkit/components/places/BookmarkJSONUtils.jsm
toolkit/components/places/Bookmarks.jsm
toolkit/components/places/ClusterLib.js
toolkit/components/places/ColorAnalyzer.js
toolkit/components/places/ColorAnalyzer_worker.js
toolkit/components/places/History.jsm
toolkit/components/places/PlacesBackups.jsm
toolkit/components/places/PlacesDBUtils.jsm
toolkit/components/places/PlacesSearchAutocompleteProvider.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/bookmarks/test_1017502-bookmarks_foreign_count.js
toolkit/components/places/tests/bookmarks/test_393498.js
toolkit/components/places/tests/bookmarks/test_405938_restore_queries.js
toolkit/components/places/tests/bookmarks/test_424958-json-quoted-folders.js
toolkit/components/places/tests/bookmarks/test_448584.js
toolkit/components/places/tests/bookmarks/test_458683.js
toolkit/components/places/tests/bookmarks/test_675416.js
toolkit/components/places/tests/bookmarks/test_711914.js
toolkit/components/places/tests/bookmarks/test_async_observers.js
toolkit/components/places/tests/bookmarks/test_bookmarks.js
toolkit/components/places/tests/bookmarks/test_bookmarks_insert.js
toolkit/components/places/tests/bookmarks/test_bookmarks_notifications.js
toolkit/components/places/tests/bookmarks/test_keywords.js
toolkit/components/places/tests/bookmarks/test_nsINavBookmarkObserver.js
toolkit/components/places/tests/browser/browser_bug399606.js
toolkit/components/places/tests/browser/browser_bug646422.js
toolkit/components/places/tests/browser/browser_double_redirect.js
toolkit/components/places/tests/browser/browser_notfound.js
toolkit/components/places/tests/browser/browser_redirect.js
toolkit/components/places/tests/browser/browser_settitle.js
toolkit/components/places/tests/browser/browser_visited_notfound.js
toolkit/components/places/tests/browser/browser_visituri_privatebrowsing_perwindowpb.js
toolkit/components/places/tests/browser/head.js
toolkit/components/places/tests/expiration/test_analyze_runs.js
toolkit/components/places/tests/expiration/test_annos_expire_session.js
toolkit/components/places/tests/expiration/test_notifications.js
toolkit/components/places/tests/expiration/test_notifications_onDeleteURI.js
toolkit/components/places/tests/expiration/test_notifications_onDeleteVisits.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_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_downgraded.js
toolkit/components/places/tests/migration/test_current_from_v19.js
toolkit/components/places/tests/queries/test_async.js
toolkit/components/places/tests/queries/test_history_queries_titles_liveUpdate.js
toolkit/components/places/tests/queries/test_querySerialization.js
toolkit/components/places/tests/queries/test_sorting.js
toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
toolkit/components/places/tests/unifiedcomplete/test_416211.js
toolkit/components/places/tests/unifiedcomplete/test_avoid_stripping_to_empty_tokens.js
toolkit/components/places/tests/unifiedcomplete/test_enabled.js
toolkit/components/places/tests/unifiedcomplete/test_remote_tab_matches.js
toolkit/components/places/tests/unifiedcomplete/test_search_engine_host.js
toolkit/components/places/tests/unit/nsDummyObserver.js
toolkit/components/places/tests/unit/test_000_frecency.js
toolkit/components/places/tests/unit/test_405497.js
toolkit/components/places/tests/unit/test_408221.js
toolkit/components/places/tests/unit/test_413784.js
toolkit/components/places/tests/unit/test_418643_removeFolderChildren.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_PlacesUtils_lazyobservers.js
toolkit/components/places/tests/unit/test_adaptive.js
toolkit/components/places/tests/unit/test_adaptive_bug527311.js
toolkit/components/places/tests/unit/test_analyze.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_bookmarks_html.js
toolkit/components/places/tests/unit/test_bookmarks_json.js
toolkit/components/places/tests/unit/test_bookmarks_restore_notification.js
toolkit/components/places/tests/unit/test_browserhistory.js
toolkit/components/places/tests/unit/test_childlessTags.js
toolkit/components/places/tests/unit/test_download_history.js
toolkit/components/places/tests/unit/test_frecency.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_observer.js
toolkit/components/places/tests/unit/test_isURIVisited.js
toolkit/components/places/tests/unit/test_isvisited.js
toolkit/components/places/tests/unit/test_keywords.js
toolkit/components/places/tests/unit/test_markpageas.js
toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js
toolkit/components/places/tests/unit/test_onItemChanged_tags.js
toolkit/components/places/tests/unit/test_placesTxn.js
toolkit/components/places/tests/unit/test_preventive_maintenance.js
toolkit/components/places/tests/unit/test_sql_guid_functions.js
toolkit/components/places/tests/unit/test_tag_autocomplete_search.js
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/privatebrowsing/PrivateBrowsingTrackingProtectionWhitelist.js
toolkit/components/processsingleton/ContentProcessSingleton.js
toolkit/components/processsingleton/MainProcessSingleton.js
toolkit/components/promiseworker/PromiseWorker.jsm
toolkit/components/promiseworker/tests/xpcshell/data/worker.js
toolkit/components/promiseworker/worker/PromiseWorker.js
toolkit/components/prompts/src/CommonDialog.jsm
toolkit/components/prompts/src/SharedPromptUtils.jsm
toolkit/components/prompts/src/nsPrompter.js
toolkit/components/prompts/test/chromeScript.js
toolkit/components/prompts/test/prompt_common.js
toolkit/components/reader/AboutReader.jsm
toolkit/components/reader/ReaderMode.jsm
toolkit/components/reader/ReaderWorker.js
toolkit/components/remotebrowserutils/RemoteWebNavigation.js
toolkit/components/satchel/AutoCompletePopup.jsm
toolkit/components/satchel/FormHistory.jsm
toolkit/components/satchel/FormHistoryStartup.js
toolkit/components/satchel/formSubmitListener.js
toolkit/components/satchel/nsFormAutoComplete.js
toolkit/components/satchel/nsFormAutoCompleteResult.jsm
toolkit/components/satchel/nsFormHistory.js
toolkit/components/satchel/nsInputListAutoComplete.js
toolkit/components/satchel/test/parent_utils.js
toolkit/components/satchel/test/satchel_common.js
toolkit/components/satchel/test/unit/head_satchel.js
toolkit/components/satchel/test/unit/test_async_expire.js
toolkit/components/satchel/test/unit/test_autocomplete.js
toolkit/components/satchel/test/unit/test_db_corrupt.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/SearchStaticData.jsm
toolkit/components/search/SearchSuggestionController.jsm
toolkit/components/search/nsSearchService.js
toolkit/components/search/nsSearchSuggestions.js
toolkit/components/search/nsSidebar.js
toolkit/components/search/tests/xpcshell/head_search.js
toolkit/components/search/tests/xpcshell/test_addEngine_callback.js
toolkit/components/search/tests/xpcshell/test_location_malformed_json.js
toolkit/components/search/tests/xpcshell/test_location_sync.js
toolkit/components/search/tests/xpcshell/test_searchSuggest.js
toolkit/components/securityreporter/SecurityReporter.js
toolkit/components/sqlite/sqlite_internal.js
toolkit/components/startup/tests/unit/head_startup.js
toolkit/components/telemetry/TelemetryArchive.jsm
toolkit/components/telemetry/TelemetryController.jsm
toolkit/components/telemetry/TelemetryEnvironment.jsm
toolkit/components/telemetry/TelemetryLog.jsm
toolkit/components/telemetry/TelemetryReportingPolicy.jsm
toolkit/components/telemetry/TelemetrySend.jsm
toolkit/components/telemetry/TelemetrySession.jsm
toolkit/components/telemetry/TelemetryStopwatch.jsm
toolkit/components/telemetry/TelemetryStorage.jsm
toolkit/components/telemetry/TelemetryUtils.jsm
toolkit/components/telemetry/ThirdPartyCookieProbe.jsm
toolkit/components/telemetry/UITelemetry.jsm
toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm
toolkit/components/telemetry/tests/unit/head.js
toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
toolkit/components/thumbnails/BackgroundPageThumbs.jsm
toolkit/components/thumbnails/PageThumbUtils.jsm
toolkit/components/thumbnails/PageThumbs.jsm
toolkit/components/thumbnails/content/backgroundPageThumbsContent.js
toolkit/components/thumbnails/test/head.js
toolkit/components/thumbnails/test/thumbnails_crash_content_helper.js
toolkit/components/timermanager/nsUpdateTimerManager.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/components/viewsource/test/browser/browser_contextmenu.js
toolkit/components/viewsource/test/browser/head.js
toolkit/components/workerloader/require.js
toolkit/components/workerloader/tests/utils_worker.js
toolkit/components/xulstore/XULStore.js
toolkit/content/aboutProfiles.js
toolkit/content/aboutServiceWorkers.js
toolkit/content/aboutSupport.js
toolkit/content/aboutTelemetry.js
toolkit/content/aboutwebrtc/aboutWebrtc.js
toolkit/content/browser-child.js
toolkit/content/browser-content.js
toolkit/content/contentAreaUtils.js
toolkit/content/findUtils.js
toolkit/content/finddialog.js
toolkit/content/tests/browser/browser_bug1170531.js
toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js
toolkit/content/tests/browser/browser_content_url_annotation.js
toolkit/content/tests/browser/browser_isSynthetic.js
toolkit/content/tests/browser/common/mockTransfer.js
toolkit/content/tests/chrome/file_autocomplete_with_composition.js
toolkit/content/tests/chrome/popup_trigger.js
toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js
toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js
toolkit/content/tests/fennec-tile-testapp/chrome/content/overlay.js
toolkit/content/tests/widgets/tree_shared.js
toolkit/content/treeUtils.js
toolkit/crashreporter/CrashReports.jsm
toolkit/crashreporter/content/crashes.js
toolkit/crashreporter/test/browser/browser_bug471404.js
toolkit/crashreporter/test/browser/browser_clearReports.js
toolkit/crashreporter/test/browser/head.js
toolkit/crashreporter/test/unit/test_crash_with_memory_report.js
toolkit/forgetaboutsite/ForgetAboutSite.jsm
toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
toolkit/identity/Identity.jsm
toolkit/identity/IdentityProvider.jsm
toolkit/identity/MinimalIdentity.jsm
toolkit/identity/RelyingParty.jsm
toolkit/identity/jwcrypto.jsm
toolkit/identity/tests/unit/head_identity.js
toolkit/identity/tests/unit/test_authentication.js
toolkit/identity/tests/unit/test_firefox_accounts.js
toolkit/identity/tests/unit/test_jwcrypto.js
toolkit/identity/tests/unit/test_log_utils.js
toolkit/identity/tests/unit/test_provisioning.js
toolkit/modules/Battery.jsm
toolkit/modules/BinarySearch.jsm
toolkit/modules/BrowserUtils.jsm
toolkit/modules/CertUtils.jsm
toolkit/modules/CharsetMenu.jsm
toolkit/modules/ClientID.jsm
toolkit/modules/Console.jsm
toolkit/modules/DateTimePickerHelper.jsm
toolkit/modules/DeferredTask.jsm
toolkit/modules/Deprecated.jsm
toolkit/modules/Finder.jsm
toolkit/modules/FinderHighlighter.jsm
toolkit/modules/FinderIterator.jsm
toolkit/modules/GMPInstallManager.jsm
toolkit/modules/GMPUtils.jsm
toolkit/modules/Geometry.jsm
toolkit/modules/InlineSpellChecker.jsm
toolkit/modules/InlineSpellCheckerContent.jsm
toolkit/modules/Integration.jsm
toolkit/modules/LightweightThemeConsumer.jsm
toolkit/modules/Log.jsm
toolkit/modules/NewTabUtils.jsm
toolkit/modules/ObjectUtils.jsm
toolkit/modules/PageMenu.jsm
toolkit/modules/PageMetadata.jsm
toolkit/modules/PermissionsUtils.jsm
toolkit/modules/PopupNotifications.jsm
toolkit/modules/Preferences.jsm
toolkit/modules/PrivateBrowsingUtils.jsm
toolkit/modules/ProfileAge.jsm
toolkit/modules/Promise-backend.js
toolkit/modules/PromiseUtils.jsm
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/ResetProfile.jsm
toolkit/modules/SelectContentHelper.jsm
toolkit/modules/SelectParentHelper.jsm
toolkit/modules/SessionRecorder.jsm
toolkit/modules/ShortcutUtils.jsm
toolkit/modules/SpatialNavigation.jsm
toolkit/modules/Sqlite.jsm
toolkit/modules/Task.jsm
toolkit/modules/WebChannel.jsm
toolkit/modules/WindowDraggingUtils.jsm
toolkit/modules/WindowsRegistry.jsm
toolkit/modules/secondscreen/RokuApp.jsm
toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm
toolkit/modules/sessionstore/FormData.jsm
toolkit/modules/sessionstore/ScrollPosition.jsm
toolkit/modules/sessionstore/Utils.jsm
toolkit/modules/tests/browser/browser_Deprecated.js
toolkit/modules/tests/browser/browser_Finder.js
toolkit/modules/tests/browser/browser_FinderHighlighter.js
toolkit/modules/tests/browser/browser_Finder_hidden_textarea.js
toolkit/modules/tests/browser/browser_Geometry.js
toolkit/modules/tests/browser/browser_InlineSpellChecker.js
toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
toolkit/modules/tests/xpcshell/test_Http.js
toolkit/modules/tests/xpcshell/test_Log.js
toolkit/modules/tests/xpcshell/test_NewTabUtils.js
toolkit/modules/tests/xpcshell/test_ObjectUtils.js
toolkit/modules/tests/xpcshell/test_Preferences.js
toolkit/modules/tests/xpcshell/test_Promise.js
toolkit/modules/tests/xpcshell/test_client_id.js
toolkit/modules/tests/xpcshell/test_session_recorder.js
toolkit/modules/tests/xpcshell/test_sqlite.js
toolkit/modules/tests/xpcshell/test_sqlite_shutdown.js
toolkit/modules/tests/xpcshell/test_web_channel.js
toolkit/modules/tests/xpcshell/test_web_channel_broker.js
toolkit/mozapps/downloads/DownloadLastDir.jsm
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/amContentHandler.js
toolkit/mozapps/extensions/amInstallTrigger.js
toolkit/mozapps/extensions/amWebInstallListener.js
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/content/newaddon.js
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/AddonRepository_SQLiteMigrator.jsm
toolkit/mozapps/extensions/internal/AddonTestUtils.jsm
toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
toolkit/mozapps/extensions/internal/GMPProvider.jsm
toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm
toolkit/mozapps/extensions/internal/PluginProvider.jsm
toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
toolkit/mozapps/extensions/internal/XPIProvider.jsm
toolkit/mozapps/extensions/internal/XPIProviderUtils.js
toolkit/mozapps/extensions/nsBlocklistService.js
toolkit/mozapps/extensions/nsBlocklistServiceContent.js
toolkit/mozapps/extensions/test/AddonManagerTesting.jsm
toolkit/mozapps/extensions/test/browser/browser_addonrepository_performance.js
toolkit/mozapps/extensions/test/browser/browser_bug557956.js
toolkit/mozapps/extensions/test/browser/browser_bug562797.js
toolkit/mozapps/extensions/test/browser/browser_bug562992.js
toolkit/mozapps/extensions/test/browser/browser_bug567127.js
toolkit/mozapps/extensions/test/browser/browser_bug572561.js
toolkit/mozapps/extensions/test/browser/browser_bug577990.js
toolkit/mozapps/extensions/test/browser/browser_bug586574.js
toolkit/mozapps/extensions/test/browser/browser_bug587970.js
toolkit/mozapps/extensions/test/browser/browser_bug591663.js
toolkit/mozapps/extensions/test/browser/browser_bug593535.js
toolkit/mozapps/extensions/test/browser/browser_bug596336.js
toolkit/mozapps/extensions/test/browser/browser_bug608316.js
toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js
toolkit/mozapps/extensions/test/browser/browser_discovery.js
toolkit/mozapps/extensions/test/browser/browser_dragdrop.js
toolkit/mozapps/extensions/test/browser/browser_eula.js
toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js
toolkit/mozapps/extensions/test/browser/browser_inlinesettings.js
toolkit/mozapps/extensions/test/browser/browser_inlinesettings_custom.js
toolkit/mozapps/extensions/test/browser/browser_inlinesettings_info.js
toolkit/mozapps/extensions/test/browser/browser_install.js
toolkit/mozapps/extensions/test/browser/browser_installssl.js
toolkit/mozapps/extensions/test/browser/browser_manualupdates.js
toolkit/mozapps/extensions/test/browser/browser_searching.js
toolkit/mozapps/extensions/test/browser/browser_updatessl.js
toolkit/mozapps/extensions/test/browser/browser_webapi_install.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_AddonRepository_compatmode.js
toolkit/mozapps/extensions/test/xpcshell/test_DeferredSave.js
toolkit/mozapps/extensions/test/xpcshell/test_XPIcancel.js
toolkit/mozapps/extensions/test/xpcshell/test_backgroundupdate.js
toolkit/mozapps/extensions/test/xpcshell/test_badschema.js
toolkit/mozapps/extensions/test/xpcshell/test_blocklist_metadata_filters.js
toolkit/mozapps/extensions/test/xpcshell/test_blocklist_prefs.js
toolkit/mozapps/extensions/test/xpcshell/test_blocklist_regexp.js
toolkit/mozapps/extensions/test/xpcshell/test_blocklistchange.js
toolkit/mozapps/extensions/test/xpcshell/test_bug1180901_2.js
toolkit/mozapps/extensions/test/xpcshell/test_bug299716_2.js
toolkit/mozapps/extensions/test/xpcshell/test_bug335238.js
toolkit/mozapps/extensions/test/xpcshell/test_bug384052.js
toolkit/mozapps/extensions/test/xpcshell/test_bug393285.js
toolkit/mozapps/extensions/test/xpcshell/test_bug406118.js
toolkit/mozapps/extensions/test/xpcshell/test_bug424262.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_bug514327_3.js
toolkit/mozapps/extensions/test/xpcshell/test_bug542391.js
toolkit/mozapps/extensions/test/xpcshell/test_bug554133.js
toolkit/mozapps/extensions/test/xpcshell/test_bug594058.js
toolkit/mozapps/extensions/test/xpcshell/test_bug655254.js
toolkit/mozapps/extensions/test/xpcshell/test_bug757663.js
toolkit/mozapps/extensions/test/xpcshell/test_cache_certdb.js
toolkit/mozapps/extensions/test/xpcshell/test_cacheflush.js
toolkit/mozapps/extensions/test/xpcshell/test_corrupt.js
toolkit/mozapps/extensions/test/xpcshell/test_corrupt_strictcompat.js
toolkit/mozapps/extensions/test/xpcshell/test_dss.js
toolkit/mozapps/extensions/test/xpcshell/test_duplicateplugins.js
toolkit/mozapps/extensions/test/xpcshell/test_hotfix.js
toolkit/mozapps/extensions/test/xpcshell/test_install.js
toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js
toolkit/mozapps/extensions/test/xpcshell/test_json_updatecheck.js
toolkit/mozapps/extensions/test/xpcshell/test_locked.js
toolkit/mozapps/extensions/test/xpcshell/test_locked_strictcompat.js
toolkit/mozapps/extensions/test/xpcshell/test_mapURIToAddonID.js
toolkit/mozapps/extensions/test/xpcshell/test_metadata_update.js
toolkit/mozapps/extensions/test/xpcshell/test_migrate4.js
toolkit/mozapps/extensions/test/xpcshell/test_pluginchange.js
toolkit/mozapps/extensions/test/xpcshell/test_pref_properties.js
toolkit/mozapps/extensions/test/xpcshell/test_signed_migrate.js
toolkit/mozapps/extensions/test/xpcshell/test_softblocked.js
toolkit/mozapps/extensions/test/xpcshell/test_startup.js
toolkit/mozapps/extensions/test/xpcshell/test_system_update.js
toolkit/mozapps/extensions/test/xpcshell/test_theme.js
toolkit/mozapps/extensions/test/xpcshell/test_types.js
toolkit/mozapps/extensions/test/xpcshell/test_update.js
toolkit/mozapps/extensions/test/xpcshell/test_updateCancel.js
toolkit/mozapps/extensions/test/xpcshell/test_update_compatmode.js
toolkit/mozapps/extensions/test/xpcshell/test_update_ignorecompat.js
toolkit/mozapps/extensions/test/xpcshell/test_update_strictcompat.js
toolkit/mozapps/extensions/test/xpcshell/test_updatecheck.js
toolkit/mozapps/extensions/test/xpcshell/test_webextension.js
toolkit/mozapps/extensions/test/xpcshell/test_webextension_install.js
toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger.js
toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger_iframe.js
toolkit/mozapps/extensions/test/xpinstall/browser_badhash.js
toolkit/mozapps/extensions/test/xpinstall/browser_badhashtype.js
toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js
toolkit/mozapps/extensions/test/xpinstall/browser_concurrent_installs.js
toolkit/mozapps/extensions/test/xpinstall/browser_hash.js
toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js
toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js
toolkit/mozapps/extensions/test/xpinstall/browser_httphash2.js
toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js
toolkit/mozapps/extensions/test/xpinstall/browser_httphash4.js
toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js
toolkit/mozapps/extensions/test/xpinstall/browser_httphash6.js
toolkit/mozapps/extensions/test/xpinstall/browser_relative.js
toolkit/mozapps/extensions/test/xpinstall/browser_switchtab.js
toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger.js
toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_iframe.js
toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_xorigin.js
toolkit/mozapps/extensions/test/xpinstall/head.js
toolkit/mozapps/preferences/fontbuilder.js
toolkit/mozapps/preferences/removemp.js
toolkit/mozapps/update/content/history.js
toolkit/mozapps/update/content/updates.js
toolkit/mozapps/update/nsUpdateService.js
toolkit/mozapps/update/nsUpdateServiceStub.js
toolkit/mozapps/update/tests/chrome/utils.js
toolkit/mozapps/update/tests/data/shared.js
toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedRecovery.js
toolkit/mozapps/update/tests/unit_aus_update/uiAutoPref.js
toolkit/mozapps/update/tests/unit_aus_update/uiSilentPref.js
toolkit/mozapps/update/tests/unit_aus_update/uiUnsupportedAlreadyNotified.js
--- a/browser/base/content/aboutDialog-appUpdater.js
+++ b/browser/base/content/aboutDialog-appUpdater.js
@@ -163,17 +163,17 @@ appUpdater.prototype =
   },
 
   /**
    * Sets the panel of the updateDeck.
    *
    * @param  aChildID
    *         The id of the deck's child to select, e.g. "apply".
    */
-  selectPanel: function(aChildID) {
+  selectPanel(aChildID) {
     let panel = document.getElementById(aChildID);
 
     let button = panel.querySelector("button");
     if (button) {
       if (aChildID == "downloadAndInstall") {
         let updateVersion = gAppUpdater.update.displayVersion;
         button.label = this.bundle.formatStringFromName("update.downloadAndInstallButton.label", [updateVersion], 1);
         button.accessKey = this.bundle.GetStringFromName("update.downloadAndInstallButton.accesskey");
@@ -186,17 +186,17 @@ appUpdater.prototype =
     } else {
       this.updateDeck.selectedPanel = panel;
     }
   },
 
   /**
    * Check for updates
    */
-  checkForUpdates: function() {
+  checkForUpdates() {
     // Clear prefs that could prevent a user from discovering available updates.
     if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CANCELATIONS_OSX)) {
       Services.prefs.clearUserPref(PREF_APP_UPDATE_CANCELATIONS_OSX);
     }
     if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ELEVATE_NEVER)) {
       Services.prefs.clearUserPref(PREF_APP_UPDATE_ELEVATE_NEVER);
     }
     this.selectPanel("checkingForUpdates");
@@ -204,17 +204,17 @@ appUpdater.prototype =
     this.checker.checkForUpdates(this.updateCheckListener, true);
     // after checking, onCheckComplete() is called
   },
 
   /**
    * Handles oncommand for the "Restart to Update" button
    * which is presented after the download has been downloaded.
    */
-  buttonRestartAfterDownload: function() {
+  buttonRestartAfterDownload() {
     if (!this.isPending && !this.isApplied) {
       return;
     }
 
     gAppUpdater.selectPanel("restarting");
 
     // Notify all windows that an application quit has been requested.
     let cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"].
@@ -244,17 +244,17 @@ appUpdater.prototype =
    * Implements nsIUpdateCheckListener. The methods implemented by
    * nsIUpdateCheckListener are in a different scope from nsIIncrementalDownload
    * to make it clear which are used by each interface.
    */
   updateCheckListener: {
     /**
      * See nsIUpdateService.idl
      */
-    onCheckComplete: function(aRequest, aUpdates, aUpdateCount) {
+    onCheckComplete(aRequest, aUpdates, aUpdateCount) {
       gAppUpdater.isChecking = false;
       gAppUpdater.update = gAppUpdater.aus.
                            selectUpdate(aUpdates, aUpdates.length);
       if (!gAppUpdater.update) {
         gAppUpdater.selectPanel("noUpdatesFound");
         return;
       }
 
@@ -276,39 +276,39 @@ appUpdater.prototype =
         gAppUpdater.startDownload();
       else // ask
         gAppUpdater.selectPanel("downloadAndInstall");
     },
 
     /**
      * See nsIUpdateService.idl
      */
-    onError: function(aRequest, aUpdate) {
+    onError(aRequest, aUpdate) {
       // Errors in the update check are treated as no updates found. If the
       // update check fails repeatedly without a success the user will be
       // notified with the normal app update user interface so this is safe.
       gAppUpdater.isChecking = false;
       gAppUpdater.selectPanel("noUpdatesFound");
     },
 
     /**
      * See nsISupports.idl
      */
-    QueryInterface: function(aIID) {
+    QueryInterface(aIID) {
       if (!aIID.equals(Components.interfaces.nsIUpdateCheckListener) &&
           !aIID.equals(Components.interfaces.nsISupports))
         throw Components.results.NS_ERROR_NO_INTERFACE;
       return this;
     }
   },
 
   /**
    * Starts the download of an update mar.
    */
-  startDownload: function() {
+  startDownload() {
     if (!this.update)
       this.update = this.um.activeUpdate;
     this.update.QueryInterface(Components.interfaces.nsIWritablePropertyBag);
     this.update.setProperty("foregroundDownload", "true");
 
     this.aus.pauseDownload();
     let state = this.aus.downloadUpdate(this.update, false);
     if (state == "failed") {
@@ -317,40 +317,40 @@ appUpdater.prototype =
     }
 
     this.setupDownloadingUI();
   },
 
   /**
    * Switches to the UI responsible for tracking the download.
    */
-  setupDownloadingUI: function() {
+  setupDownloadingUI() {
     this.downloadStatus = document.getElementById("downloadStatus");
     this.downloadStatus.value =
       DownloadUtils.getTransferTotal(0, this.update.selectedPatch.size);
     this.selectPanel("downloading");
     this.aus.addDownloadListener(this);
   },
 
-  removeDownloadListener: function() {
+  removeDownloadListener() {
     if (this.aus) {
       this.aus.removeDownloadListener(this);
     }
   },
 
   /**
    * See nsIRequestObserver.idl
    */
-  onStartRequest: function(aRequest, aContext) {
+  onStartRequest(aRequest, aContext) {
   },
 
   /**
    * See nsIRequestObserver.idl
    */
-  onStopRequest: function(aRequest, aContext, aStatusCode) {
+  onStopRequest(aRequest, aContext, aStatusCode) {
     switch (aStatusCode) {
     case Components.results.NS_ERROR_UNEXPECTED:
       if (this.update.selectedPatch.state == "download-failed" &&
           (this.update.isCompleteUpdate || this.update.patchCount != 2)) {
         // Verification error of complete patch, informational text is held in
         // the update object.
         this.removeDownloadListener();
         this.selectPanel("downloadFailed");
@@ -399,30 +399,30 @@ appUpdater.prototype =
       this.selectPanel("downloadFailed");
       break;
     }
   },
 
   /**
    * See nsIProgressEventSink.idl
    */
-  onStatus: function(aRequest, aContext, aStatus, aStatusArg) {
+  onStatus(aRequest, aContext, aStatus, aStatusArg) {
   },
 
   /**
    * See nsIProgressEventSink.idl
    */
-  onProgress: function(aRequest, aContext, aProgress, aProgressMax) {
+  onProgress(aRequest, aContext, aProgress, aProgressMax) {
     this.downloadStatus.value =
       DownloadUtils.getTransferTotal(aProgress, aProgressMax);
   },
 
   /**
    * See nsISupports.idl
    */
-  QueryInterface: function(aIID) {
+  QueryInterface(aIID) {
     if (!aIID.equals(Components.interfaces.nsIProgressEventSink) &&
         !aIID.equals(Components.interfaces.nsIRequestObserver) &&
         !aIID.equals(Components.interfaces.nsISupports))
       throw Components.results.NS_ERROR_NO_INTERFACE;
     return this;
   }
 };
--- a/browser/base/content/aboutaccounts/aboutaccounts.js
+++ b/browser/base/content/aboutaccounts/aboutaccounts.js
@@ -96,17 +96,17 @@ function updateDisplayedEmail(user) {
   if (emailDiv && user) {
     emailDiv.textContent = user.email;
   }
 }
 
 var wrapper = {
   iframe: null,
 
-  init: function(url, urlParams) {
+  init(url, urlParams) {
     // If a master-password is enabled, we want to encourage the user to
     // unlock it.  Things still work if not, but the user will probably need
     // to re-auth next startup (in which case we will get here again and
     // re-prompt)
     Utils.ensureMPUnlocked();
 
     let iframe = document.getElementById("remote");
     this.iframe = iframe;
@@ -125,27 +125,27 @@ var wrapper = {
     this.url = url;
     // Set the iframe's location with loadURI/LOAD_FLAGS_REPLACE_HISTORY to
     // avoid having a new history entry being added. REPLACE_HISTORY is used
     // to replace the current entry, which is `about:blank`.
     let webNav = iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
     webNav.loadURI(url, Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY, null, null, null);
   },
 
-  retry: function() {
+  retry() {
     let webNav = this.iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
     webNav.loadURI(this.url, Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY, null, null, null);
   },
 
   iframeListener: {
     QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
                                          Ci.nsISupportsWeakReference,
                                          Ci.nsISupports]),
 
-    onStateChange: function(aWebProgress, aRequest, aState, aStatus) {
+    onStateChange(aWebProgress, aRequest, aState, aStatus) {
       let failure = false;
 
       // Captive portals sometimes redirect users
       if ((aState & Ci.nsIWebProgressListener.STATE_REDIRECTING)) {
         failure = true;
       } else if ((aState & Ci.nsIWebProgressListener.STATE_STOP)) {
         if (aRequest instanceof Ci.nsIHttpChannel) {
           try {
@@ -159,29 +159,29 @@ var wrapper = {
       // Calling cancel() will raise some OnStateChange notifications by itself,
       // so avoid doing that more than once
       if (failure && aStatus != Components.results.NS_BINDING_ABORTED) {
         aRequest.cancel(Components.results.NS_BINDING_ABORTED);
         setErrorPage("networkError");
       }
     },
 
-    onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {
+    onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
       if (aRequest && aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) {
         aRequest.cancel(Components.results.NS_BINDING_ABORTED);
         setErrorPage("networkError");
       }
     },
 
-    onProgressChange: function() {},
-    onStatusChange: function() {},
-    onSecurityChange: function() {},
+    onProgressChange() {},
+    onStatusChange() {},
+    onSecurityChange() {},
   },
 
-  handleEvent: function(evt) {
+  handleEvent(evt) {
     switch (evt.type) {
       case "load":
         this.iframe.contentWindow.addEventListener("FirefoxAccountsCommand", this);
         this.iframe.removeEventListener("load", this);
         break;
       case "FirefoxAccountsCommand":
         this.handleRemoteCommand(evt);
         break;
@@ -189,17 +189,17 @@ var wrapper = {
   },
 
   /**
    * onLogin handler receives user credentials from the jelly after a
    * sucessful login and stores it in the fxaccounts service
    *
    * @param accountData the user's account data and credentials
    */
-  onLogin: function(accountData) {
+  onLogin(accountData) {
     log("Received: 'login'. Data:" + JSON.stringify(accountData));
 
     if (accountData.customizeSync) {
       Services.prefs.setBoolPref(PREF_SYNC_SHOW_CUSTOMIZATION, true);
     }
     delete accountData.customizeSync;
     // sessionTokenContext is erroneously sent by the content server.
     // https://github.com/mozilla/fxa-content-server/issues/2766
@@ -246,35 +246,35 @@ var wrapper = {
       // the verification completes (the browser will begin syncing, but
       // won't notify the user). If the email has already been verified,
       // the jelly will say "Welcome! You are successfully signed in as
       // EMAIL", but it won't then say "syncing started".
     }, (err) => this.injectData("message", { status: "error", error: err })
     );
   },
 
-  onCanLinkAccount: function(accountData) {
+  onCanLinkAccount(accountData) {
     // We need to confirm a relink - see shouldAllowRelink for more
     let ok = shouldAllowRelink(accountData.email);
-    this.injectData("message", { status: "can_link_account", data: { ok: ok } });
+    this.injectData("message", { status: "can_link_account", data: { ok } });
   },
 
   /**
    * onSignOut handler erases the current user's session from the fxaccounts service
    */
-  onSignOut: function() {
+  onSignOut() {
     log("Received: 'sign_out'.");
 
     fxAccounts.signOut().then(
       () => this.injectData("message", { status: "sign_out" }),
       (err) => this.injectData("message", { status: "error", error: err })
     );
   },
 
-  handleRemoteCommand: function(evt) {
+  handleRemoteCommand(evt) {
     log('command: ' + evt.detail.command);
     let data = evt.detail.data;
 
     switch (evt.detail.command) {
       case "login":
         this.onLogin(data);
         break;
       case "can_link_account":
@@ -284,21 +284,21 @@ var wrapper = {
         this.onSignOut(data);
         break;
       default:
         log("Unexpected remote command received: " + evt.detail.command + ". Ignoring command.");
         break;
     }
   },
 
-  injectData: function(type, content) {
+  injectData(type, content) {
     return fxAccounts.promiseAccountsSignUpURI().then(authUrl => {
       let data = {
-        type: type,
-        content: content
+        type,
+        content
       };
       this.iframe.contentWindow.postMessage(data, authUrl);
     })
     .catch(e => {
       console.log("Failed to inject data", e);
       setErrorPage("configError");
     });
   },
--- a/browser/base/content/abouthealthreport/abouthealth.js
+++ b/browser/base/content/abouthealthreport/abouthealth.js
@@ -10,111 +10,111 @@ Cu.import("resource://gre/modules/Prefer
 Cu.import("resource://gre/modules/Services.jsm");
 
 const prefs = new Preferences("datareporting.healthreport.");
 
 const PREF_UNIFIED = "toolkit.telemetry.unified";
 const PREF_REPORTING_URL = "datareporting.healthreport.about.reportUrl";
 
 var healthReportWrapper = {
-  init: function() {
+  init() {
     let iframe = document.getElementById("remote-report");
     iframe.addEventListener("load", healthReportWrapper.initRemotePage, false);
     iframe.src = this._getReportURI().spec;
     prefs.observe("uploadEnabled", this.updatePrefState, healthReportWrapper);
   },
 
-  uninit: function() {
+  uninit() {
     prefs.ignore("uploadEnabled", this.updatePrefState, healthReportWrapper);
   },
 
-  _getReportURI: function() {
+  _getReportURI() {
     let url = Services.urlFormatter.formatURLPref(PREF_REPORTING_URL);
     return Services.io.newURI(url, null, null);
   },
 
-  setDataSubmission: function(enabled) {
+  setDataSubmission(enabled) {
     MozSelfSupport.healthReportDataSubmissionEnabled = enabled;
     this.updatePrefState();
   },
 
-  updatePrefState: function() {
+  updatePrefState() {
     try {
       let prefsObj = {
         enabled: MozSelfSupport.healthReportDataSubmissionEnabled,
       };
       healthReportWrapper.injectData("prefs", prefsObj);
     }
     catch (ex) {
       healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PREFS_FAILED);
     }
   },
 
-  sendTelemetryPingList: function() {
+  sendTelemetryPingList() {
     console.log("AboutHealthReport: Collecting Telemetry ping list.");
     MozSelfSupport.getTelemetryPingList().then((list) => {
       console.log("AboutHealthReport: Sending Telemetry ping list.");
       this.injectData("telemetry-ping-list", list);
     }).catch((ex) => {
       console.log("AboutHealthReport: Collecting ping list failed: " + ex);
     });
   },
 
-  sendTelemetryPingData: function(pingId) {
+  sendTelemetryPingData(pingId) {
     console.log("AboutHealthReport: Collecting Telemetry ping data.");
     MozSelfSupport.getTelemetryPing(pingId).then((ping) => {
       console.log("AboutHealthReport: Sending Telemetry ping data.");
       this.injectData("telemetry-ping-data", {
         id: pingId,
         pingData: ping,
       });
     }).catch((ex) => {
       console.log("AboutHealthReport: Loading ping data failed: " + ex);
       this.injectData("telemetry-ping-data", {
         id: pingId,
         error: "error-generic",
       });
     });
   },
 
-  sendCurrentEnvironment: function() {
+  sendCurrentEnvironment() {
     console.log("AboutHealthReport: Sending Telemetry environment data.");
     MozSelfSupport.getCurrentTelemetryEnvironment().then((environment) => {
       this.injectData("telemetry-current-environment-data", environment);
     }).catch((ex) => {
       console.log("AboutHealthReport: Collecting current environment data failed: " + ex);
     });
   },
 
-  sendCurrentPingData: function() {
+  sendCurrentPingData() {
     console.log("AboutHealthReport: Sending current Telemetry ping data.");
     MozSelfSupport.getCurrentTelemetrySubsessionPing().then((ping) => {
       this.injectData("telemetry-current-ping-data", ping);
     }).catch((ex) => {
       console.log("AboutHealthReport: Collecting current ping data failed: " + ex);
     });
   },
 
-  injectData: function(type, content) {
+  injectData(type, content) {
     let report = this._getReportURI();
 
     // file URIs can't be used for targetOrigin, so we use "*" for this special case
     // in all other cases, pass in the URL to the report so we properly restrict the message dispatch
     let reportUrl = report.scheme == "file" ? "*" : report.spec;
 
     let data = {
-      type: type,
-      content: content
+      type,
+      content
     }
 
     let iframe = document.getElementById("remote-report");
     iframe.contentWindow.postMessage(data, reportUrl);
   },
 
-  handleRemoteCommand: function(evt) {
+  handleRemoteCommand(evt) {
     // Do an origin check to harden against the frame content being loaded from unexpected locations.
     let allowedPrincipal = Services.scriptSecurityManager.getCodebasePrincipal(this._getReportURI());
     let targetPrincipal = evt.target.nodePrincipal;
     if (!allowedPrincipal.equals(targetPrincipal)) {
       Cu.reportError(`Origin check failed for message "${evt.detail.command}": ` +
                      `target origin is "${targetPrincipal.origin}", expected "${allowedPrincipal.origin}"`);
       return;
     }
@@ -142,39 +142,39 @@ var healthReportWrapper = {
         this.sendCurrentPingData();
         break;
       default:
         Cu.reportError("Unexpected remote command received: " + evt.detail.command + ". Ignoring command.");
         break;
     }
   },
 
-  initRemotePage: function() {
+  initRemotePage() {
     let iframe = document.getElementById("remote-report").contentDocument;
     iframe.addEventListener("RemoteHealthReportCommand",
                             function onCommand(e) { healthReportWrapper.handleRemoteCommand(e); },
                             false);
     healthReportWrapper.updatePrefState();
   },
 
   // error handling
   ERROR_INIT_FAILED:    1,
   ERROR_PAYLOAD_FAILED: 2,
   ERROR_PREFS_FAILED:   3,
 
-  reportFailure: function(error) {
+  reportFailure(error) {
     let details = {
       errorType: error,
     }
     healthReportWrapper.injectData("error", details);
   },
 
-  handleInitFailure: function() {
+  handleInitFailure() {
     healthReportWrapper.reportFailure(healthReportWrapper.ERROR_INIT_FAILED);
   },
 
-  handlePayloadFailure: function() {
+  handlePayloadFailure() {
     healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PAYLOAD_FAILED);
   },
 }
 
 window.addEventListener("load", function() { healthReportWrapper.init(); });
 window.addEventListener("unload", function() { healthReportWrapper.uninit(); });
--- a/browser/base/content/abouthome/aboutHome.js
+++ b/browser/base/content/abouthome/aboutHome.js
@@ -181,28 +181,28 @@ function ensureSnippetsMapThen(aCallback
         cache.set(cursor.key, cursor.value);
         cursor.continue();
         return;
       }
 
       // The cache has been filled up, create the snippets map.
       gSnippetsMap = Object.freeze({
         get: (aKey) => cache.get(aKey),
-        set: function(aKey, aValue) {
+        set(aKey, aValue) {
           db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite")
             .objectStore(SNIPPETS_OBJECTSTORE_NAME).put(aValue, aKey);
           return cache.set(aKey, aValue);
         },
         has: (aKey) => cache.has(aKey),
-        delete: function(aKey) {
+        delete(aKey) {
           db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite")
             .objectStore(SNIPPETS_OBJECTSTORE_NAME).delete(aKey);
           return cache.delete(aKey);
         },
-        clear: function() {
+        clear() {
           db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite")
             .objectStore(SNIPPETS_OBJECTSTORE_NAME).clear();
           return cache.clear();
         },
         get size() { return cache.size; },
       });
 
       setTimeout(invokeCallbacks, 0);
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -25,43 +25,43 @@ function removeNotificationOnEnd(notific
       onDownloadFailed: maybeRemove,
       onInstallFailed: maybeRemove,
       onInstallEnded: maybeRemove
     });
   }
 }
 
 const gXPInstallObserver = {
-  _findChildShell: function(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: function(aDocShell)
+  _getBrowser(aDocShell)
   {
     for (let browser of gBrowser.browsers) {
       if (this._findChildShell(browser.docShell, aDocShell))
         return browser;
     }
     return null;
   },
 
   pendingInstalls: new WeakMap(),
 
-  showInstallConfirmation: function(browser, installInfo, height = undefined) {
+  showInstallConfirmation(browser, installInfo, height = undefined) {
     // If the confirmation notification is already open cache the installInfo
     // and the new confirmation will be shown later
     if (PopupNotifications.getNotification("addon-install-confirmation", browser)) {
       let pending = this.pendingInstalls.get(browser);
       if (pending) {
         pending.push(installInfo);
       } else {
         this.pendingInstalls.set(browser, [installInfo]);
@@ -212,17 +212,17 @@ const gXPInstallObserver = {
 
     removeNotificationOnEnd(popup, installInfo.installs);
 
     Services.telemetry
             .getHistogramById("SECURITY_UI")
             .add(Ci.nsISecurityUITelemetry.WARNING_CONFIRM_ADDON_INSTALL);
   },
 
-  observe: function(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;
@@ -277,17 +277,17 @@ const gXPInstallObserver = {
     case "addon-install-blocked": {
       messageString = gNavigatorBundle.getFormattedString("xpinstallPromptMessage",
                         [brandShortName]);
 
       let secHistogram = Components.classes["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry).getHistogramById("SECURITY_UI");
       action = {
         label: gNavigatorBundle.getString("xpinstallPromptAllowButton"),
         accessKey: gNavigatorBundle.getString("xpinstallPromptAllowButton.accesskey"),
-        callback: function() {
+        callback() {
           secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED_CLICK_THROUGH);
           installInfo.install();
         }
       };
 
       secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED);
       let popup = PopupNotifications.show(browser, notificationID,
                                           messageString, anchorID,
@@ -428,17 +428,17 @@ const gXPInstallObserver = {
       let secondaryActions = null;
 
       if (needsRestart) {
         notificationID = "addon-install-restart";
         messageString = gNavigatorBundle.getString("addonsInstalledNeedsRestart");
         action = {
           label: gNavigatorBundle.getString("addonInstallRestartButton"),
           accessKey: gNavigatorBundle.getString("addonInstallRestartButton.accesskey"),
-          callback: function() {
+          callback() {
             BrowserUtils.restartApplication();
           }
         };
         secondaryActions = [{
           label: gNavigatorBundle.getString("addonInstallRestartIgnoreButton"),
           accessKey: gNavigatorBundle.getString("addonInstallRestartIgnoreButton.accesskey"),
           callback: () => {},
         }];
@@ -467,24 +467,24 @@ const gXPInstallObserver = {
   _removeProgressNotification(aBrowser) {
     let notification = PopupNotifications.getNotification("addon-progress", aBrowser);
     if (notification)
       notification.remove();
   }
 };
 
 var LightWeightThemeWebInstaller = {
-  init: function() {
+  init() {
     let mm = window.messageManager;
     mm.addMessageListener("LightWeightThemeWebInstaller:Install", this);
     mm.addMessageListener("LightWeightThemeWebInstaller:Preview", this);
     mm.addMessageListener("LightWeightThemeWebInstaller:ResetPreview", this);
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     // ignore requests from background tabs
     if (message.target != gBrowser.selectedBrowser) {
       return;
     }
 
     let data = message.data;
 
     switch (message.name) {
@@ -498,33 +498,33 @@ var LightWeightThemeWebInstaller = {
       }
       case "LightWeightThemeWebInstaller:ResetPreview": {
         this._resetPreview(data && data.baseURI);
         break;
       }
     }
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
       case "TabSelect": {
         this._resetPreview();
         break;
       }
     }
   },
 
   get _manager() {
     let temp = {};
     Cu.import("resource://gre/modules/LightweightThemeManager.jsm", temp);
     delete this._manager;
     return this._manager = temp.LightweightThemeManager;
   },
 
-  _installRequest: function(dataString, baseURI) {
+  _installRequest(dataString, baseURI) {
     let data = this._manager.parseTheme(dataString, baseURI);
 
     if (!data) {
       return;
     }
 
     let uri = makeURI(baseURI);
 
@@ -555,136 +555,136 @@ var LightWeightThemeWebInstaller = {
     let allowButtonAccesskey =
       gNavigatorBundle.getString("lwthemeInstallRequest.allowButton.accesskey");
     let message =
       gNavigatorBundle.getFormattedString("lwthemeInstallRequest.message",
                                           [uri.host]);
     let buttons = [{
       label: allowButtonText,
       accessKey: allowButtonAccesskey,
-      callback: function() {
+      callback() {
         LightWeightThemeWebInstaller._install(data, notify);
       }
     }];
 
     this._removePreviousNotifications();
 
     let notificationBox = gBrowser.getNotificationBox();
     let notificationBar =
       notificationBox.appendNotification(message, "lwtheme-install-request", "",
                                          notificationBox.PRIORITY_INFO_MEDIUM,
                                          buttons);
     notificationBar.persistence = 1;
   },
 
-  _install: function(newLWTheme, notify) {
+  _install(newLWTheme, notify) {
     let previousLWTheme = this._manager.currentTheme;
 
     let listener = {
-      onEnabling: function(aAddon, aRequiresRestart) {
+      onEnabling(aAddon, aRequiresRestart) {
         if (!aRequiresRestart) {
           return;
         }
 
         let messageString = gNavigatorBundle.getFormattedString("lwthemeNeedsRestart.message",
           [aAddon.name], 1);
 
         let action = {
           label: gNavigatorBundle.getString("lwthemeNeedsRestart.button"),
           accessKey: gNavigatorBundle.getString("lwthemeNeedsRestart.accesskey"),
-          callback: function() {
+          callback() {
             BrowserUtils.restartApplication();
           }
         };
 
         let options = {
           persistent: true
         };
 
         PopupNotifications.show(gBrowser.selectedBrowser, "addon-theme-change",
                                 messageString, "addons-notification-icon",
                                 action, null, options);
       },
 
-      onEnabled: function(aAddon) {
+      onEnabled(aAddon) {
         if (notify) {
           LightWeightThemeWebInstaller._postInstallNotification(newLWTheme, previousLWTheme);
         }
       }
     };
 
     AddonManager.addAddonListener(listener);
     this._manager.currentTheme = newLWTheme;
     AddonManager.removeAddonListener(listener);
   },
 
-  _postInstallNotification: function(newTheme, previousTheme) {
+  _postInstallNotification(newTheme, previousTheme) {
     function text(id) {
       return gNavigatorBundle.getString("lwthemePostInstallNotification." + id);
     }
 
     let buttons = [{
       label: text("undoButton"),
       accessKey: text("undoButton.accesskey"),
-      callback: function() {
+      callback() {
         LightWeightThemeWebInstaller._manager.forgetUsedTheme(newTheme.id);
         LightWeightThemeWebInstaller._manager.currentTheme = previousTheme;
       }
     }, {
       label: text("manageButton"),
       accessKey: text("manageButton.accesskey"),
-      callback: function() {
+      callback() {
         BrowserOpenAddonsMgr("addons://list/theme");
       }
     }];
 
     this._removePreviousNotifications();
 
     let notificationBox = gBrowser.getNotificationBox();
     let notificationBar =
       notificationBox.appendNotification(text("message"),
                                          "lwtheme-install-notification", "",
                                          notificationBox.PRIORITY_INFO_MEDIUM,
                                          buttons);
     notificationBar.persistence = 1;
     notificationBar.timeout = Date.now() + 20000; // 20 seconds
   },
 
-  _removePreviousNotifications: function() {
+  _removePreviousNotifications() {
     let box = gBrowser.getNotificationBox();
 
     ["lwtheme-install-request",
      "lwtheme-install-notification"].forEach(function(value) {
         let notification = box.getNotificationWithValue(value);
         if (notification)
           box.removeNotification(notification);
       });
   },
 
-  _preview: function(dataString, baseURI) {
+  _preview(dataString, baseURI) {
     if (!this._isAllowed(baseURI))
       return;
 
     let data = this._manager.parseTheme(dataString, baseURI);
     if (!data)
       return;
 
     this._resetPreview();
     gBrowser.tabContainer.addEventListener("TabSelect", this, false);
     this._manager.previewTheme(data);
   },
 
-  _resetPreview: function(baseURI) {
+  _resetPreview(baseURI) {
     if (baseURI && !this._isAllowed(baseURI))
       return;
     gBrowser.tabContainer.removeEventListener("TabSelect", this, false);
     this._manager.resetPreview();
   },
 
-  _isAllowed: function(srcURIString) {
+  _isAllowed(srcURIString) {
     let uri;
     try {
       uri = makeURI(srcURIString);
     }
     catch (e) {
       // makeURI fails if srcURIString is a nonsense URI
       return false;
     }
@@ -699,50 +699,50 @@ var LightWeightThemeWebInstaller = {
 };
 
 /*
  * Listen for Lightweight Theme styling changes and update the browser's theme accordingly.
  */
 var LightweightThemeListener = {
   _modifiedStyles: [],
 
-  init: function() {
+  init() {
     XPCOMUtils.defineLazyGetter(this, "styleSheet", function() {
       for (let i = document.styleSheets.length - 1; i >= 0; i--) {
         let sheet = document.styleSheets[i];
         if (sheet.href == "chrome://browser/skin/browser-lightweightTheme.css")
           return sheet;
       }
       return undefined;
     });
 
     Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
     Services.obs.addObserver(this, "lightweight-theme-optimized", false);
     if (document.documentElement.hasAttribute("lwtheme"))
       this.updateStyleSheet(document.documentElement.style.backgroundImage);
   },
 
-  uninit: function() {
+  uninit() {
     Services.obs.removeObserver(this, "lightweight-theme-styling-update");
     Services.obs.removeObserver(this, "lightweight-theme-optimized");
   },
 
   /**
    * Append the headerImage to the background-image property of all rulesets in
    * browser-lightweightTheme.css.
    *
    * @param headerImage - a string containing a CSS image for the lightweight theme header.
    */
-  updateStyleSheet: function(headerImage) {
+  updateStyleSheet(headerImage) {
     if (!this.styleSheet)
       return;
     this.substituteRules(this.styleSheet.cssRules, headerImage);
   },
 
-  substituteRules: function(ruleList, headerImage, existingStyleRulesModified = 0) {
+  substituteRules(ruleList, headerImage, existingStyleRulesModified = 0) {
     let styleRulesModified = 0;
     for (let i = 0; i < ruleList.length; i++) {
       let rule = ruleList[i];
       if (rule instanceof Ci.nsIDOMCSSGroupingRule) {
         // Add the number of modified sub-rules to the modified count
         styleRulesModified += this.substituteRules(rule.cssRules, headerImage, existingStyleRulesModified + styleRulesModified);
       } else if (rule instanceof Ci.nsIDOMCSSStyleRule) {
         if (!rule.style.backgroundImage)
@@ -756,17 +756,17 @@ var LightweightThemeListener = {
       } else {
         Cu.reportError("Unsupported rule encountered");
       }
     }
     return styleRulesModified;
   },
 
   // nsIObserver
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if ((aTopic != "lightweight-theme-styling-update" && aTopic != "lightweight-theme-optimized") ||
           !this.styleSheet)
       return;
 
     if (aTopic == "lightweight-theme-optimized" && aSubject != window)
       return;
 
     let themeData = JSON.parse(aData);
--- a/browser/base/content/browser-ctrlTab.js
+++ b/browser/base/content/browser-ctrlTab.js
@@ -91,39 +91,39 @@ var tabPreviews = {
       case "SSTabRestored":
         this.capture(event.target, true);
         break;
     }
   }
 };
 
 var tabPreviewPanelHelper = {
-  opening: function(host) {
+  opening(host) {
     host.panel.hidden = false;
 
     var handler = this._generateHandler(host);
     host.panel.addEventListener("popupshown", handler, false);
     host.panel.addEventListener("popuphiding", handler, false);
 
     host._prevFocus = document.commandDispatcher.focusedElement;
   },
-  _generateHandler: function(host) {
+  _generateHandler(host) {
     var self = this;
     return function(event) {
       if (event.target == host.panel) {
         host.panel.removeEventListener(event.type, arguments.callee, false);
         self["_" + event.type](host);
       }
     };
   },
-  _popupshown: function(host) {
+  _popupshown(host) {
     if ("setupGUI" in host)
       host.setupGUI();
   },
-  _popuphiding: function(host) {
+  _popuphiding(host) {
     if ("suspendGUI" in host)
       host.suspendGUI();
 
     if (host._prevFocus) {
       Services.focus.setFocus(host._prevFocus, Ci.nsIFocusManager.FLAG_NOSCROLL);
       host._prevFocus = null;
     } else
       gBrowser.selectedBrowser.focus();
@@ -214,17 +214,17 @@ var ctrlTab = {
       (!gPrefService.prefHasUserValue("browser.ctrlTab.disallowForScreenReaders") ||
        !gPrefService.getBoolPref("browser.ctrlTab.disallowForScreenReaders"));
 
     if (enable)
       this.init();
     else
       this.uninit();
   },
-  observe: function(aSubject, aTopic, aPrefName) {
+  observe(aSubject, aTopic, aPrefName) {
     this.readPref();
   },
 
   updatePreviews: function ctrlTab_updatePreviews() {
     for (let i = 0; i < this.previews.length; i++)
       this.updatePreview(this.previews[i], this.tabList[i]);
 
     var showAllLabel = gNavigatorBundle.getString("ctrlTab.listAllTabs.label");
@@ -502,31 +502,31 @@ var ctrlTab = {
         break;
       case "popupshowing":
         if (event.target.id == "menu_viewPopup")
           document.getElementById("menu_showAllTabs").hidden = !allTabs.canOpen;
         break;
     }
   },
 
-  filterForThumbnailExpiration: function(aCallback) {
+  filterForThumbnailExpiration(aCallback) {
     // Save a few more thumbnails than we actually display, so that when tabs
     // are closed, the previews we add instead still get thumbnails.
     const extraThumbnails = 3;
     const thumbnailCount = Math.min(this.tabPreviewCount + extraThumbnails,
                                     this.tabCount);
 
     let urls = [];
     for (let i = 0; i < thumbnailCount; i++)
       urls.push(this.tabList[i].linkedBrowser.currentURI.spec);
 
     aCallback(urls);
   },
 
-  _initRecentlyUsedTabs: function() {
+  _initRecentlyUsedTabs() {
     this._recentlyUsedTabs =
       Array.filter(gBrowser.tabs, tab => !tab.closing)
            .sort((tab1, tab2) => tab2.lastAccessed - tab1.lastAccessed);
   },
 
   _init: function ctrlTab__init(enable) {
     var toggleEventListener = enable ? "addEventListener" : "removeEventListener";
 
--- a/browser/base/content/browser-customization.js
+++ b/browser/base/content/browser-customization.js
@@ -4,35 +4,35 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Customization handler prepares this browser window for entering and exiting
  * customization mode by handling customizationstarting and customizationending
  * events.
  */
 var CustomizationHandler = {
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "customizationstarting":
         this._customizationStarting();
         break;
       case "customizationchange":
         this._customizationChange();
         break;
       case "customizationending":
         this._customizationEnding(aEvent.detail);
         break;
     }
   },
 
-  isCustomizing: function() {
+  isCustomizing() {
     return document.documentElement.hasAttribute("customizing");
   },
 
-  _customizationStarting: function() {
+  _customizationStarting() {
     // Disable the toolbar context menu items
     let menubar = document.getElementById("main-menubar");
     for (let childNode of menubar.childNodes)
       childNode.setAttribute("disabled", true);
 
     let cmd = document.getElementById("cmd_CustomizeToolbars");
     cmd.setAttribute("disabled", "true");
 
@@ -46,21 +46,21 @@ var CustomizationHandler = {
     // can cause the customize tab to get clipped.
     let tabContainer = gBrowser.tabContainer;
     if (tabContainer.getAttribute("overflow") == "true") {
       let tabstrip = tabContainer.mTabstrip;
       tabstrip.ensureElementIsVisible(gBrowser.selectedTab, true);
     }
   },
 
-  _customizationChange: function() {
+  _customizationChange() {
     PlacesToolbarHelper.customizeChange();
   },
 
-  _customizationEnding: function(aDetails) {
+  _customizationEnding(aDetails) {
     // Update global UI elements that may have been added or removed
     if (aDetails.changed) {
       gURLBar = document.getElementById("urlbar");
 
       gHomeButton.updateTooltip();
       XULBrowserWindow.init();
 
       if (AppConstants.platform != "macosx")
--- a/browser/base/content/browser-data-submission-info-bar.js
+++ b/browser/base/content/browser-data-submission-info-bar.js
@@ -22,33 +22,33 @@ var gDataNotificationInfoBar = {
   },
 
   get _log() {
     let Log = Cu.import("resource://gre/modules/Log.jsm", {}).Log;
     delete this._log;
     return this._log = Log.repository.getLoggerWithMessagePrefix(LOGGER_NAME, LOGGER_PREFIX);
   },
 
-  init: function() {
+  init() {
     window.addEventListener("unload", () => {
       for (let o of this._OBSERVERS) {
         Services.obs.removeObserver(this, o);
       }
     }, false);
 
     for (let o of this._OBSERVERS) {
       Services.obs.addObserver(this, o, true);
     }
   },
 
-  _getDataReportingNotification: function(name = this._DATA_REPORTING_NOTIFICATION) {
+  _getDataReportingNotification(name = this._DATA_REPORTING_NOTIFICATION) {
     return this._notificationBox.getNotificationWithValue(name);
   },
 
-  _displayDataPolicyInfoBar: function(request) {
+  _displayDataPolicyInfoBar(request) {
     if (this._getDataReportingNotification()) {
       return;
     }
 
     let brandBundle = document.getElementById("bundle_brand");
     let appName = brandBundle.getString("brandShortName");
     let vendorName = brandBundle.getString("vendorShortName");
 
@@ -83,25 +83,25 @@ var gDataNotificationInfoBar = {
     );
     // It is important to defer calling onUserNotifyComplete() until we're
     // actually sure the notification was displayed. If we ever called
     // onUserNotifyComplete() without showing anything to the user, that
     // would be very good for user choice. It may also have legal impact.
     request.onUserNotifyComplete();
   },
 
-  _clearPolicyNotification: function() {
+  _clearPolicyNotification() {
     let notification = this._getDataReportingNotification();
     if (notification) {
       this._log.debug("Closing notification.");
       notification.close();
     }
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case "datareporting:notify-data-policy:request":
         let request = subject.wrappedJSObject.object;
         try {
           this._displayDataPolicyInfoBar(request);
         } catch (ex) {
           request.onUserNotifyFailed(ex);
           return;
--- a/browser/base/content/browser-devedition.js
+++ b/browser/base/content/browser-devedition.js
@@ -16,55 +16,55 @@ var DevEdition = {
     return this.styleSheet && !this.styleSheet.sheet.disabled;
   },
 
   get isThemeCurrentlyApplied() {
     let theme = LightweightThemeManager.currentTheme;
     return theme && theme.id == "firefox-devedition@mozilla.org";
   },
 
-  init: function() {
+  init() {
     this.initialized = true;
     Services.prefs.addObserver(this._devtoolsThemePrefName, this, false);
     Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
     Services.obs.addObserver(this, "lightweight-theme-window-updated", false);
     this._updateDevtoolsThemeAttribute();
 
     if (this.isThemeCurrentlyApplied) {
       this._toggleStyleSheet(true);
     }
   },
 
-  createStyleSheet: function() {
+  createStyleSheet() {
     let styleSheetAttr = `href="${this.styleSheetLocation}" type="text/css"`;
     this.styleSheet = document.createProcessingInstruction(
       "xml-stylesheet", styleSheetAttr);
     this.styleSheet.addEventListener("load", this);
     document.insertBefore(this.styleSheet, document.documentElement);
     this.styleSheet.sheet.disabled = true;
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     if (topic == "lightweight-theme-styling-update") {
       let newTheme = JSON.parse(data);
       if (newTheme && newTheme.id == "firefox-devedition@mozilla.org") {
         this._toggleStyleSheet(true);
       } else {
         this._toggleStyleSheet(false);
       }
     } else if (topic == "lightweight-theme-window-updated" && subject == window) {
       this._updateLWTBrightness();
     }
 
     if (topic == "nsPref:changed" && data == this._devtoolsThemePrefName) {
       this._updateDevtoolsThemeAttribute();
     }
   },
 
-  _inferBrightness: function() {
+  _inferBrightness() {
     ToolbarIconColor.inferFromText();
     // Get an inverted full screen button if the dark theme is applied.
     if (this.isStyleSheetEnabled &&
         document.documentElement.getAttribute("devtoolstheme") == "dark") {
       document.documentElement.setAttribute("brighttitlebarforeground", "true");
     } else {
       document.documentElement.removeAttribute("brighttitlebarforeground");
     }
@@ -73,61 +73,61 @@ var DevEdition = {
   _updateLWTBrightness() {
     if (this.isThemeCurrentlyApplied) {
       let devtoolsTheme = Services.prefs.getCharPref(this._devtoolsThemePrefName);
       let textColor = devtoolsTheme == "dark" ? "bright" : "dark";
       document.documentElement.setAttribute("lwthemetextcolor", textColor);
     }
   },
 
-  _updateDevtoolsThemeAttribute: function() {
+  _updateDevtoolsThemeAttribute() {
     // Set an attribute on root element to make it possible
     // to change colors based on the selected devtools theme.
     let devtoolsTheme = Services.prefs.getCharPref(this._devtoolsThemePrefName);
     if (devtoolsTheme != "dark") {
       devtoolsTheme = "light";
     }
     document.documentElement.setAttribute("devtoolstheme", devtoolsTheme);
     this._updateLWTBrightness();
     this._inferBrightness();
   },
 
-  handleEvent: function(e) {
+  handleEvent(e) {
     if (e.type === "load") {
       this.styleSheet.removeEventListener("load", this);
       this.refreshBrowserDisplay();
     }
   },
 
-  refreshBrowserDisplay: function() {
+  refreshBrowserDisplay() {
     // Don't touch things on the browser if gBrowserInit.onLoad hasn't
     // yet fired.
     if (this.initialized) {
       gBrowser.tabContainer._positionPinnedTabs();
       this._inferBrightness();
     }
   },
 
-  _toggleStyleSheet: function(deveditionThemeEnabled) {
+  _toggleStyleSheet(deveditionThemeEnabled) {
     let wasEnabled = this.isStyleSheetEnabled;
     if (deveditionThemeEnabled && !wasEnabled) {
       // The stylesheet may not have been created yet if it wasn't
       // needed on initial load.  Make it now.
       if (!this.styleSheet) {
         this.createStyleSheet();
       }
       this.styleSheet.sheet.disabled = false;
       this.refreshBrowserDisplay();
     } else if (!deveditionThemeEnabled && wasEnabled) {
       this.styleSheet.sheet.disabled = true;
       this.refreshBrowserDisplay();
     }
   },
 
-  uninit: function() {
+  uninit() {
     Services.prefs.removeObserver(this._devtoolsThemePrefName, this);
     Services.obs.removeObserver(this, "lightweight-theme-styling-update", false);
     Services.obs.removeObserver(this, "lightweight-theme-window-updated", false);
     if (this.styleSheet) {
       this.styleSheet.removeEventListener("load", this);
     }
     this.styleSheet = null;
   }
--- a/browser/base/content/browser-fullScreenAndPointerLock.js
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js
@@ -3,65 +3,73 @@
  * 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 PointerlockFsWarning = {
 
   _element: null,
   _origin: null,
 
-  init: function() {
+  init() {
     this.Timeout.prototype = {
-      start: function() {
+      start() {
         this.cancel();
         this._id = setTimeout(() => this._handle(), this._delay);
       },
-      cancel: function() {
+      cancel() {
         if (this._id) {
           clearTimeout(this._id);
           this._id = 0;
         }
       },
-      _handle: function() {
+      _handle() {
         this._id = 0;
         this._func();
       },
       get delay() {
         return this._delay;
       }
     };
   },
 
+  /* eslint-disable object-shorthand */
+  /* The object-shorthand rule must be disabled for this constructor
+   * because the ES6 method syntax causes "this.Timeout is not a
+   * constructor" exception. Further, using the {ignoreConstructors: true}
+   * option causes "TypeError: Cannot read property 'charAt' of undefined"
+   * in eslint.
+   */
   /**
    * Timeout object for managing timeout request. If it is started when
    * the previous call hasn't finished, it would automatically cancelled
    * the previous one.
    */
   Timeout: function(func, delay) {
     this._id = 0;
     this._func = func;
     this._delay = delay;
   },
+  /* eslint-enable object-shorthand */
 
-  showPointerLock: function(aOrigin) {
+  showPointerLock(aOrigin) {
     if (!document.fullscreen) {
       let timeout = gPrefService.getIntPref("pointer-lock-api.warning.timeout");
       this.show(aOrigin, "pointerlock-warning", timeout, 0);
     }
   },
 
-  showFullScreen: function(aOrigin) {
+  showFullScreen(aOrigin) {
     let timeout = gPrefService.getIntPref("full-screen-api.warning.timeout");
     let delay = gPrefService.getIntPref("full-screen-api.warning.delay");
     this.show(aOrigin, "fullscreen-warning", timeout, delay);
   },
 
   // Shows a warning that the site has entered fullscreen or
   // pointer lock for a short duration.
-  show: function(aOrigin, elementId, timeout, delay) {
+  show(aOrigin, elementId, timeout, delay) {
 
     if (!this._element) {
       this._element = document.getElementById(elementId);
       // Setup event listeners
       this._element.addEventListener("transitionend", this);
       window.addEventListener("mousemove", this, true);
       // The timeout to hide the warning box after a while.
       this._timeoutHide = new this.Timeout(() => {
@@ -106,17 +114,17 @@ var PointerlockFsWarning = {
 
     // Explicitly set the last state to hidden to avoid the warning
     // box being hidden immediately because of mousemove.
     this._state = "onscreen";
     this._lastState = "hidden";
     this._timeoutHide.start();
   },
 
-  close: function() {
+  close() {
     if (!this._element) {
       return;
     }
     // Cancel any pending timeout
     this._timeoutHide.cancel();
     this._timeoutShow.cancel();
     // Reset state of the warning box
     this._state = "hidden";
@@ -175,17 +183,17 @@ var PointerlockFsWarning = {
               this._element.setAttribute(newState, true);
             }
           });
         });
       }
     }
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
     case "mousemove": {
       let state = this._state;
       if (state == "hidden") {
         // If the warning box is currently hidden, show it after
         // a short delay if the pointer is at the top.
         if (event.clientY != 0) {
           this._timeoutShow.cancel();
@@ -221,22 +229,22 @@ var PointerlockFsWarning = {
       break;
     }
     }
   }
 };
 
 var PointerLock = {
 
-  init: function() {
+  init() {
     window.messageManager.addMessageListener("PointerLock:Entered", this);
     window.messageManager.addMessageListener("PointerLock:Exited", this);
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     switch (aMessage.name) {
       case "PointerLock:Entered": {
         PointerlockFsWarning.showPointerLock(aMessage.data.originNoSuffix);
         break;
       }
       case "PointerLock:Exited": {
         PointerlockFsWarning.close();
         break;
@@ -248,41 +256,41 @@ var PointerLock = {
 var FullScreen = {
   _MESSAGES: [
     "DOMFullscreen:Request",
     "DOMFullscreen:NewOrigin",
     "DOMFullscreen:Exit",
     "DOMFullscreen:Painted",
   ],
 
-  init: function() {
+  init() {
     // called when we go into full screen, even if initiated by a web page script
     window.addEventListener("fullscreen", this, true);
     window.addEventListener("MozDOMFullscreen:Entered", this,
                             /* useCapture */ true,
                             /* wantsUntrusted */ false);
     window.addEventListener("MozDOMFullscreen:Exited", this,
                             /* useCapture */ true,
                             /* wantsUntrusted */ false);
     for (let type of this._MESSAGES) {
       window.messageManager.addMessageListener(type, this);
     }
 
     if (window.fullScreen)
       this.toggle();
   },
 
-  uninit: function() {
+  uninit() {
     for (let type of this._MESSAGES) {
       window.messageManager.removeMessageListener(type, this);
     }
     this.cleanup();
   },
 
-  toggle: function() {
+  toggle() {
     var enterFS = window.fullScreen;
 
     // Toggle the View:FullScreen command, which controls elements like the
     // fullscreen menuitem, and menubars.
     let fullscreenCommand = document.getElementById("View:FullScreen");
     if (enterFS) {
       fullscreenCommand.setAttribute("checked", enterFS);
     } else {
@@ -337,21 +345,21 @@ var FullScreen = {
     }
 
     if (enterFS && !document.fullscreenElement) {
       Services.telemetry.getHistogramById("FX_BROWSER_FULLSCREEN_USED")
                         .add(1);
     }
   },
 
-  exitDomFullScreen : function() {
+  exitDomFullScreen() {
     document.exitFullscreen();
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
       case "fullscreen":
         this.toggle();
         break;
       case "MozDOMFullscreen:Entered": {
         // The event target is the element which requested the DOM
         // fullscreen. If we were entering DOM fullscreen for a remote
         // browser, the target would be `gBrowser` and the original
@@ -372,17 +380,17 @@ var FullScreen = {
       }
       case "MozDOMFullscreen:Exited":
         TelemetryStopwatch.start("FULLSCREEN_CHANGE_MS");
         this.cleanupDomFullscreen();
         break;
     }
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     let browser = aMessage.target;
     switch (aMessage.name) {
       case "DOMFullscreen:Request": {
         this._windowUtils.remoteFrameFullscreenChanged(browser);
         break;
       }
       case "DOMFullscreen:NewOrigin": {
         // Don't show the warning if we've already exited fullscreen.
@@ -398,17 +406,17 @@ var FullScreen = {
       case "DOMFullscreen:Painted": {
         Services.obs.notifyObservers(window, "fullscreen-painted", "");
         TelemetryStopwatch.finish("FULLSCREEN_CHANGE_MS");
         break;
       }
     }
   },
 
-  enterDomFullscreen : function(aBrowser) {
+  enterDomFullscreen(aBrowser) {
 
     if (!document.fullscreenElement) {
       return;
     }
 
     // If we have a current pointerlock warning shown then hide it
     // before transition.
     PointerlockFsWarning.close();
@@ -451,77 +459,77 @@ var FullScreen = {
     gBrowser.tabContainer.addEventListener("TabSelect", this.exitDomFullScreen);
 
     // Add listener to detect when the fullscreen window is re-focused.
     // If a fullscreen window loses focus, we show a warning when the
     // fullscreen window is refocused.
     window.addEventListener("activate", this);
   },
 
-  cleanup: function() {
+  cleanup() {
     if (!window.fullScreen) {
       MousePosTracker.removeListener(this);
       document.removeEventListener("keypress", this._keyToggleCallback, false);
       document.removeEventListener("popupshown", this._setPopupOpen, false);
       document.removeEventListener("popuphidden", this._setPopupOpen, false);
     }
   },
 
-  cleanupDomFullscreen: function() {
+  cleanupDomFullscreen() {
     window.messageManager
           .broadcastAsyncMessage("DOMFullscreen:CleanUp");
 
     PointerlockFsWarning.close();
     gBrowser.tabContainer.removeEventListener("TabOpen", this.exitDomFullScreen);
     gBrowser.tabContainer.removeEventListener("TabClose", this.exitDomFullScreen);
     gBrowser.tabContainer.removeEventListener("TabSelect", this.exitDomFullScreen);
     window.removeEventListener("activate", this);
 
     document.documentElement.removeAttribute("inDOMFullscreen");
   },
 
-  _isRemoteBrowser: function(aBrowser) {
+  _isRemoteBrowser(aBrowser) {
     return gMultiProcessBrowser && aBrowser.getAttribute("remote") == "true";
   },
 
   get _windowUtils() {
     return window.QueryInterface(Ci.nsIInterfaceRequestor)
                  .getInterface(Ci.nsIDOMWindowUtils);
   },
 
-  getMouseTargetRect: function()
+  getMouseTargetRect()
   {
     return this._mouseTargetRect;
   },
 
   // Event callbacks
-  _expandCallback: function()
+  _expandCallback()
   {
     FullScreen.showNavToolbox();
   },
-  onMouseEnter: function()
+  onMouseEnter()
   {
     FullScreen.hideNavToolbox();
   },
-  _keyToggleCallback: function(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();
     }
     // 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: function() {
+  _safeToCollapse() {
     if (!gPrefService.getBoolPref("browser.fullscreen.autohide"))
       return false;
 
     // a popup menu is open in chrome: don't collapse chrome
     if (this._isPopupOpen)
       return false;
 
     // On OS X Lion we don't want to hide toolbars.
@@ -533,17 +541,17 @@ var FullScreen = {
         document.commandDispatcher.focusedElement.ownerDocument == document &&
         document.commandDispatcher.focusedElement.localName == "input") {
       return false;
     }
 
     return true;
   },
 
-  _setPopupOpen: function(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;
@@ -551,28 +559,28 @@ var FullScreen = {
              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: function(aItem)
+  getAutohide(aItem)
   {
     aItem.setAttribute("checked", gPrefService.getBoolPref("browser.fullscreen.autohide"));
   },
-  setAutohide: function()
+  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: function(trackMouse = true) {
+  showNavToolbox(trackMouse = true) {
     this._fullScrToggler.hidden = true;
     gNavToolbox.removeAttribute("fullscreenShouldAnimate");
     gNavToolbox.style.marginTop = "";
 
     if (!this._isChromeCollapsed) {
       return;
     }
 
@@ -586,17 +594,17 @@ var FullScreen = {
         right: rect.right
       };
       MousePosTracker.addListener(this);
     }
 
     this._isChromeCollapsed = false;
   },
 
-  hideNavToolbox: function(aAnimate = false) {
+  hideNavToolbox(aAnimate = false) {
     if (this._isChromeCollapsed || !this._safeToCollapse())
       return;
 
     this._fullScrToggler.hidden = false;
 
     if (aAnimate && gPrefService.getBoolPref("browser.fullscreen.animate")) {
       gNavToolbox.setAttribute("fullscreenShouldAnimate", true);
       // Hide the fullscreen toggler until the transition ends.
@@ -610,17 +618,17 @@ var FullScreen = {
     }
 
     gNavToolbox.style.marginTop =
       -gNavToolbox.getBoundingClientRect().height + "px";
     this._isChromeCollapsed = true;
     MousePosTracker.removeListener(this);
   },
 
-  _updateToolbars: function(aEnterFS) {
+  _updateToolbars(aEnterFS) {
     for (let el of document.querySelectorAll("toolbar[fullscreentoolbar=true]")) {
       if (aEnterFS) {
         // Give the main nav bar and the tab bar the fullscreen context menu,
         // otherwise remove context menu to prevent breakage
         el.setAttribute("saved-context", el.getAttribute("context"));
         if (el.id == "nav-bar" || el.id == "TabsToolbar")
           el.setAttribute("context", "autohide-context");
         else
--- a/browser/base/content/browser-fullZoom.js
+++ b/browser/base/content/browser-fullZoom.js
@@ -84,17 +84,17 @@ var FullZoom = {
         this._ignorePendingZoomAccesses(browser);
         this._applyZoomToPref(browser);
         break;
     }
   },
 
   // nsIObserver
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "nsPref:changed":
         switch (aData) {
           case "browser.zoom.siteSpecific":
             this._siteSpecificPref =
               gPrefService.getBoolPref("browser.zoom.siteSpecific");
             break;
           case "browser.zoom.updateBackgroundTabs":
@@ -149,17 +149,17 @@ var FullZoom = {
                           this._ensureValid(aValue);
 
     // If the current page doesn't have a site-specific preference, then its
     // zoom should be set to the new global preference now that the global
     // preference has changed.
     let hasPref = false;
     let token = this._getBrowserToken(browser);
     this._cps2.getByDomainAndName(browser.currentURI.spec, this.name, ctxt, {
-      handleResult: function() { hasPref = true; },
+      handleResult() { hasPref = true; },
       handleCompletion: function() {
         if (!hasPref && token.isCurrent)
           this._applyPrefToZoom(undefined, browser);
       }.bind(this)
     });
   },
 
   // location change observer
@@ -218,17 +218,17 @@ var FullZoom = {
                             this._notifyOnLocationChange.bind(this, browser));
       return;
     }
 
     // It's not cached, so we have to asynchronously fetch it.
     let value = undefined;
     let token = this._getBrowserToken(browser);
     this._cps2.getByDomainAndName(aURI.spec, this.name, ctxt, {
-      handleResult: function(resultPref) { value = resultPref.value; },
+      handleResult(resultPref) { value = resultPref.value; },
       handleCompletion: function() {
         if (!token.isCurrent) {
           this._notifyOnLocationChange(browser);
           return;
         }
         this._applyPrefToZoom(value, browser,
                               this._notifyOnLocationChange.bind(this, browser));
       }.bind(this)
@@ -264,17 +264,17 @@ var FullZoom = {
     this._ignorePendingZoomAccesses(browser);
     this._applyZoomToPref(browser);
   },
 
   /**
    * Sets the zoom level for the given browser to the given floating
    * point value, where 1 is the default zoom level.
    */
-  setZoom: function(value, browser = gBrowser.selectedBrowser) {
+  setZoom(value, browser = gBrowser.selectedBrowser) {
     ZoomManager.setZoomForBrowser(browser, value);
     this._ignorePendingZoomAccesses(browser);
     this._applyZoomToPref(browser);
   },
 
   /**
    * Sets the zoom level of the page in the given browser to the global zoom
    * level.
@@ -482,17 +482,17 @@ var FullZoom = {
     // * Otherwise, this._globalValue is a number, the global value.
     return new Promise(resolve => {
       if ("_globalValue" in this) {
         resolve(this._globalValue);
         return;
       }
       let value = undefined;
       this._cps2.getGlobal(this.name, this._loadContextFromBrowser(browser), {
-        handleResult: function(pref) { value = pref.value; },
+        handleResult(pref) { value = pref.value; },
         handleCompletion: (reason) => {
           this._globalValue = this._ensureValid(value);
           resolve(this._globalValue);
         }
       });
     });
   },
 
--- a/browser/base/content/browser-fxaccounts.js
+++ b/browser/base/content/browser-fxaccounts.js
@@ -83,17 +83,17 @@ var gFxAccounts = {
     return Services.prefs.getBoolPref("services.sync.sendTabToDevice.enabled");
   },
 
   get remoteClients() {
     return Weave.Service.clientsEngine.remoteClients
            .sort((a, b) => a.name.localeCompare(b.name));
   },
 
-  init: function() {
+  init() {
     // Bail out if we're already initialized and for pop-up windows.
     if (this._initialized || !window.toolbar.visible) {
       return;
     }
 
     for (let topic of this.topics) {
       Services.obs.addObserver(this, topic, false);
     }
@@ -102,43 +102,43 @@ var gFxAccounts = {
     gNavToolbox.addEventListener("customizationending", this);
 
     EnsureFxAccountsWebChannel();
     this._initialized = true;
 
     this.updateUI();
   },
 
-  uninit: function() {
+  uninit() {
     if (!this._initialized) {
       return;
     }
 
     for (let topic of this.topics) {
       Services.obs.removeObserver(this, topic);
     }
 
     this._initialized = false;
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case "fxa-migration:state-changed":
         this.onMigrationStateChanged(data, subject);
         break;
       case this.FxAccountsCommon.ONPROFILE_IMAGE_CHANGE_NOTIFICATION:
         this.updateUI();
         break;
       default:
         this.updateUI();
         break;
     }
   },
 
-  onMigrationStateChanged: function() {
+  onMigrationStateChanged() {
     // Since we nuked most of the migration code, this notification will fire
     // once after legacy Sync has been disconnected (and should never fire
     // again)
     let nb = window.document.getElementById("global-notificationbox");
 
     let msg = this.strings.GetStringFromName("autoDisconnectDescription")
     let signInLabel = this.strings.GetStringFromName("autoDisconnectSignIn.label");
     let signInAccessKey = this.strings.GetStringFromName("autoDisconnectSignIn.accessKey");
@@ -170,36 +170,36 @@ var gFxAccounts = {
                           undefined,
                           nb.PRIORITY_WARNING_LOW,
                           buttons);
 
     // ensure the hamburger menu reflects the newly disconnected state.
     this.updateAppMenuItem();
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     this._inCustomizationMode = event.type == "customizationstarting";
     this.updateAppMenuItem();
   },
 
-  updateUI: function() {
+  updateUI() {
     // It's possible someone signed in to FxA after seeing our notification
     // about "Legacy Sync migration" (which now is actually "Legacy Sync
     // auto-disconnect") so kill that notification if it still exists.
     let nb = window.document.getElementById("global-notificationbox");
     let n = nb.getNotificationWithValue(this.SYNC_MIGRATION_NOTIFICATION_TITLE);
     if (n) {
       nb.removeNotification(n, true);
     }
 
     this.updateAppMenuItem();
   },
 
   // Note that updateAppMenuItem() returns a Promise that's only used by tests.
-  updateAppMenuItem: function() {
+  updateAppMenuItem() {
     let profileInfoEnabled = false;
     try {
       profileInfoEnabled = Services.prefs.getBoolPref("identity.fxaccounts.profile_image.enabled");
     } catch (e) { }
 
     // Bail out if FxA is disabled.
     if (!this.weave.fxAccountsEnabled) {
       return Promise.resolve();
@@ -315,17 +315,17 @@ var gFxAccounts = {
       // The most likely scenario is a user logged out, so reflect that.
       // Bug 995134 calls for better errors so we could retry if we were
       // sure this was the failure reason.
       this.FxAccountsCommon.log.error("Error updating FxA account info", error);
       updateWithUserData(null);
     });
   },
 
-  onMenuPanelCommand: function() {
+  onMenuPanelCommand() {
 
     switch (this.panelUIFooter.getAttribute("fxastatus")) {
     case "signedin":
       this.openPreferences();
       break;
     case "error":
       if (this.panelUIFooter.getAttribute("unverified")) {
         this.openPreferences();
@@ -336,45 +336,45 @@ var gFxAccounts = {
     default:
       this.openPreferences();
       break;
     }
 
     PanelUI.hide();
   },
 
-  openPreferences: function() {
+  openPreferences() {
     openPreferences("paneSync", { urlParams: { entrypoint: "menupanel" } });
   },
 
-  openAccountsPage: function(action, urlParams = {}) {
+  openAccountsPage(action, urlParams = {}) {
     let params = new URLSearchParams();
     if (action) {
       params.set("action", action);
     }
     for (let name in urlParams) {
       if (urlParams[name] !== undefined) {
         params.set(name, urlParams[name]);
       }
     }
     let url = "about:accounts?" + params;
     switchToTabHavingURI(url, true, {
       replaceQueryString: true
     });
   },
 
-  openSignInAgainPage: function(entryPoint) {
+  openSignInAgainPage(entryPoint) {
     this.openAccountsPage("reauth", { entrypoint: entryPoint });
   },
 
-  sendTabToDevice: function(url, clientId, title) {
+  sendTabToDevice(url, clientId, title) {
     Weave.Service.clientsEngine.sendURIToClientForDisplay(url, clientId, title);
   },
 
-  populateSendTabToDevicesMenu: function(devicesPopup, url, title) {
+  populateSendTabToDevicesMenu(devicesPopup, url, title) {
     // remove existing menu items
     while (devicesPopup.hasChildNodes()) {
       devicesPopup.removeChild(devicesPopup.firstChild);
     }
 
     const fragment = document.createDocumentFragment();
 
     const onTargetDeviceCommand = (event) => {
@@ -405,27 +405,27 @@ var gFxAccounts = {
       fragment.appendChild(separator);
       const allDevicesLabel = this.strings.GetStringFromName("sendTabToAllDevices.menuitem");
       addTargetDevice("", allDevicesLabel);
     }
 
     devicesPopup.appendChild(fragment);
   },
 
-  updateTabContextMenu: function(aPopupMenu) {
+  updateTabContextMenu(aPopupMenu) {
     if (!this.sendTabToDeviceEnabled) {
       return;
     }
 
     const remoteClientPresent = this.remoteClients.length > 0;
     ["context_sendTabToDevice", "context_sendTabToDevice_separator"]
     .forEach(id => { document.getElementById(id).hidden = !remoteClientPresent });
   },
 
-  initPageContextMenu: function(contextMenu) {
+  initPageContextMenu(contextMenu) {
     if (!this.sendTabToDeviceEnabled) {
       return;
     }
 
     const remoteClientPresent = this.remoteClients.length > 0;
     // showSendLink and showSendPage are mutually exclusive
     const showSendLink = remoteClientPresent
                          && (contextMenu.onSaveableLink || contextMenu.onPlainTextLink);
--- a/browser/base/content/browser-gestureSupport.js
+++ b/browser/base/content/browser-gestureSupport.js
@@ -346,25 +346,25 @@ var gGestureSupport = {
 
   /**
    * Handle continual motion events.  This function will be set by
    * _setupGesture or _setupSwipe.
    *
    * @param aEvent
    *        The continual motion update event to handle
    */
-  _doUpdate: function(aEvent) {},
+  _doUpdate(aEvent) {},
 
   /**
    * Handle gesture end events.  This function will be set by _setupSwipe.
    *
    * @param aEvent
    *        The gesture end event to handle
    */
-  _doEnd: function(aEvent) {},
+  _doEnd(aEvent) {},
 
   /**
    * Convert the swipe gesture into a browser action based on the direction.
    *
    * @param aEvent
    *        The swipe event to handle
    */
   onSwipe: function GS_onSwipe(aEvent) {
@@ -439,17 +439,17 @@ var gGestureSupport = {
   },
 
   /**
    * Perform rotation for ImageDocuments
    *
    * @param aEvent
    *        The MozRotateGestureUpdate event triggering this call
    */
-  rotate: function(aEvent) {
+  rotate(aEvent) {
     if (!(content.document instanceof ImageDocument))
       return;
 
     let contentElement = content.document.body.firstElementChild;
     if (!contentElement)
       return;
     // If we're currently snapping, cancel that snap
     if (contentElement.classList.contains("completeRotation"))
@@ -458,17 +458,17 @@ var gGestureSupport = {
     this.rotation = Math.round(this.rotation + aEvent.delta);
     contentElement.style.transform = "rotate(" + this.rotation + "deg)";
     this._lastRotateDelta = aEvent.delta;
   },
 
   /**
    * Perform a rotation end for ImageDocuments
    */
-  rotateEnd: function() {
+  rotateEnd() {
     if (!(content.document instanceof ImageDocument))
       return;
 
     let contentElement = content.document.body.firstElementChild;
     if (!contentElement)
       return;
 
     let transitionRotation = 0;
@@ -526,17 +526,17 @@ var gGestureSupport = {
       this._currentRotation += 360;
     return this._currentRotation;
   },
 
   /**
    * When the location/tab changes, need to reload the current rotation for the
    * image
    */
-  restoreRotationState: function() {
+  restoreRotationState() {
     // Bug 863514 - Make gesture support work in electrolysis
     if (gMultiProcessBrowser)
       return;
 
     if (!(content.document instanceof ImageDocument))
       return;
 
     let contentElement = content.document.body.firstElementChild;
@@ -555,17 +555,17 @@ var gGestureSupport = {
                                    .split(",");
     this.rotation = Math.round(Math.atan2(transformValue[1], transformValue[0]) *
                                (180 / Math.PI));
   },
 
   /**
    * Removes the transition rule by removing the completeRotation class
    */
-  _clearCompleteRotation: function() {
+  _clearCompleteRotation() {
     let contentElement = content.document &&
                          content.document instanceof ImageDocument &&
                          content.document.body &&
                          content.document.body.firstElementChild;
     if (!contentElement)
       return;
     contentElement.classList.remove("completeRotation");
     contentElement.removeEventListener("transitionend", this._clearCompleteRotation);
@@ -726,17 +726,17 @@ var gHistorySwipeAnimation = {
       this._positionBox(this._curBox, 0);
       this._positionBox(this._nextBox, offset + aVal);
     } else {
       this._prevBox.collapsed = true;
       this._positionBox(this._curBox, aVal / dampValue);
     }
   },
 
-  _getCurrentHistoryIndex: function() {
+  _getCurrentHistoryIndex() {
     return SessionStore.getSessionHistory(gBrowser.selectedTab).index;
   },
 
   /**
    * Event handler for events relevant to the history swipe animation.
    *
    * @param aEvent
    *        An event to process.
--- a/browser/base/content/browser-media.js
+++ b/browser/base/content/browser-media.js
@@ -7,52 +7,52 @@ var gEMEHandler = {
   get uiEnabled() {
     let emeUIEnabled = Services.prefs.getBoolPref("browser.eme.ui.enabled");
     // Force-disable on WinXP:
     if (navigator.platform.toLowerCase().startsWith("win")) {
       emeUIEnabled = emeUIEnabled && parseFloat(Services.sysinfo.get("version")) >= 6;
     }
     return emeUIEnabled;
   },
-  ensureEMEEnabled: function(browser, keySystem) {
+  ensureEMEEnabled(browser, keySystem) {
     Services.prefs.setBoolPref("media.eme.enabled", true);
     if (keySystem) {
       if (keySystem.startsWith("com.adobe") &&
           Services.prefs.getPrefType("media.gmp-eme-adobe.enabled") &&
           !Services.prefs.getBoolPref("media.gmp-eme-adobe.enabled")) {
         Services.prefs.setBoolPref("media.gmp-eme-adobe.enabled", true);
       } else if (keySystem == "com.widevine.alpha" &&
                  Services.prefs.getPrefType("media.gmp-widevinecdm.enabled") &&
                  !Services.prefs.getBoolPref("media.gmp-widevinecdm.enabled")) {
         Services.prefs.setBoolPref("media.gmp-widevinecdm.enabled", true);
       }
     }
     browser.reload();
   },
-  isKeySystemVisible: function(keySystem) {
+  isKeySystemVisible(keySystem) {
     if (!keySystem) {
       return false;
     }
     if (keySystem.startsWith("com.adobe") &&
         Services.prefs.getPrefType("media.gmp-eme-adobe.visible")) {
       return Services.prefs.getBoolPref("media.gmp-eme-adobe.visible");
     }
     if (keySystem == "com.widevine.alpha" &&
         Services.prefs.getPrefType("media.gmp-widevinecdm.visible")) {
       return Services.prefs.getBoolPref("media.gmp-widevinecdm.visible");
     }
     return true;
   },
-  getLearnMoreLink: function(msgId) {
+  getLearnMoreLink(msgId) {
     let text = gNavigatorBundle.getString("emeNotifications." + msgId + ".learnMoreLabel");
     let baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL");
     return "<label class='text-link' href='" + baseURL + "drm-content'>" +
            text + "</label>";
   },
-  receiveMessage: function({target: browser, data: data}) {
+  receiveMessage({target: browser, data: data}) {
     let parsedData;
     try {
       parsedData = JSON.parse(data);
     } catch (ex) {
       Cu.reportError("Malformed EME video message with data: " + data);
       return;
     }
     let {status: status, keySystem: keySystem} = parsedData;
@@ -97,17 +97,17 @@ var gEMEHandler = {
         return;
       default:
         Cu.reportError(new Error("Unknown message ('" + status + "') dealing with EME key request: " + data));
         return;
     }
 
     this.showNotificationBar(browser, notificationId, keySystem, params, buttonCallback);
   },
-  showNotificationBar: function(browser, notificationId, keySystem, labelParams, callback) {
+  showNotificationBar(browser, notificationId, keySystem, labelParams, callback) {
     let box = gBrowser.getNotificationBox(browser);
     if (box.getNotificationWithValue(notificationId)) {
       return;
     }
 
     let msgPrefix = "emeNotifications." + notificationId + ".";
     let msgId = msgPrefix + "message";
 
@@ -117,34 +117,34 @@ var gEMEHandler = {
 
     let buttons = [];
     if (callback) {
       let btnLabelId = msgPrefix + "button.label";
       let btnAccessKeyId = msgPrefix + "button.accesskey";
       buttons.push({
         label: gNavigatorBundle.getString(btnLabelId),
         accessKey: gNavigatorBundle.getString(btnAccessKeyId),
-        callback: callback
+        callback
       });
     }
 
     let iconURL = "chrome://browser/skin/drm-icon.svg#chains-black";
 
     // Do a little dance to get rich content into the notification:
     let fragment = document.createDocumentFragment();
     let descriptionContainer = document.createElement("description");
     descriptionContainer.innerHTML = message;
     while (descriptionContainer.childNodes.length) {
       fragment.appendChild(descriptionContainer.childNodes[0]);
     }
 
     box.appendNotification(fragment, notificationId, iconURL, box.PRIORITY_WARNING_MEDIUM,
                            buttons);
   },
-  showPopupNotificationForSuccess: function(browser, keySystem) {
+  showPopupNotificationForSuccess(browser, keySystem) {
     // We're playing EME content! Remove any "we can't play because..." messages.
     var box = gBrowser.getNotificationBox(browser);
     ["drmContentDisabled",
      "drmContentCDMInstalling"
      ].forEach(function(value) {
         var notification = box.getNotificationWithValue(value);
         if (notification)
           box.removeNotification(notification);
@@ -169,17 +169,17 @@ var gEMEHandler = {
       Services.prefs.setBoolPref(firstPlayPref, true);
     } else {
       document.getElementById(anchorId).removeAttribute("firstplay");
     }
 
     let mainAction = {
       label: gNavigatorBundle.getString(btnLabelId),
       accessKey: gNavigatorBundle.getString(btnAccessKeyId),
-      callback: function() { openPreferences("paneContent"); },
+      callback() { openPreferences("paneContent"); },
       dismiss: true
     };
     let options = {
       dismissed: true,
       eventCallback: aTopic => aTopic == "swapping",
       learnMoreURL: Services.urlFormatter.formatURLPref("app.support.baseURL") + "drm-content",
     };
     PopupNotifications.show(browser, "drmContentPlaying", message, anchorId, mainAction, null, options);
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -4,17 +4,17 @@
 
 var StarUI = {
   _itemId: -1,
   uri: null,
   _batching: false,
   _isNewBookmark: false,
   _autoCloseTimer: 0,
 
-  _element: function(aID) {
+  _element(aID) {
     return document.getElementById(aID);
   },
 
   // Edit-bookmark panel
   get panel() {
     delete this.panel;
     var element = this._element("editBookmarkPanel");
     // initially the panel is hidden
@@ -628,20 +628,20 @@ var PlacesCommandHook = {
     let title = feedTitle || gBrowser.contentTitle;
     let description = feedSubtitle;
     if (!description) {
       description = (yield this._getPageDetails(gBrowser.selectedBrowser)).description;
     }
 
     PlacesUIUtils.showBookmarkDialog({ action: "add"
                                      , type: "livemark"
-                                     , feedURI: feedURI
+                                     , feedURI
                                      , siteURI: gBrowser.currentURI
-                                     , title: title
-                                     , description: description
+                                     , title
+                                     , description
                                      , defaultInsertionPoint: toolbarIP
                                      , hiddenRows: [ "feedLocation"
                                                    , "siteLocation"
                                                    , "description" ]
                                      }, window);
   }),
 
   /**
@@ -1138,56 +1138,56 @@ var PlacesToolbarHelper = {
 
   _getShouldWrap: function PTH_getShouldWrap() {
     let placement = CustomizableUI.getPlacementOfWidget("personal-bookmarks");
     let area = placement && placement.area;
     let areaType = area && CustomizableUI.getAreaType(area);
     return !area || CustomizableUI.TYPE_MENU_PANEL == areaType;
   },
 
-  onPlaceholderCommand: function() {
+  onPlaceholderCommand() {
     let widgetGroup = CustomizableUI.getWidget("personal-bookmarks");
     let widget = widgetGroup.forWindow(window);
     if (widget.overflowed ||
         widgetGroup.areaType == CustomizableUI.TYPE_MENU_PANEL) {
       PlacesCommandHook.showPlacesOrganizer("BookmarksToolbar");
     }
   },
 
-  _getParentToolbar: function(element) {
+  _getParentToolbar(element) {
     while (element) {
       if (element.localName == "toolbar") {
         return element;
       }
       element = element.parentNode;
     }
     return null;
   },
 
-  onWidgetUnderflow: function(aNode, aContainer) {
+  onWidgetUnderflow(aNode, aContainer) {
     // The view gets broken by being removed and reinserted by the overflowable
     // toolbar, so we have to force an uninit and reinit.
     let win = aNode.ownerGlobal;
     if (aNode.id == "personal-bookmarks" && win == window) {
       this._resetView();
     }
   },
 
-  onWidgetAdded: function(aWidgetId, aArea, aPosition) {
+  onWidgetAdded(aWidgetId, aArea, aPosition) {
     if (aWidgetId == "personal-bookmarks" && !this._isCustomizing) {
       // It's possible (with the "Add to Menu", "Add to Toolbar" context
       // options) that the Places Toolbar Items have been moved without
       // letting us prepare and handle it with with customizeStart and
       // customizeDone. If that's the case, we need to reset the views
       // since they're probably broken from the DOM reparenting.
       this._resetView();
     }
   },
 
-  _resetView: function() {
+  _resetView() {
     if (this._viewElt) {
       // It's possible that the placesView might not exist, and we need to
       // do a full init. This could happen if the Bookmarks Toolbar Items are
       // moved to the Menu Panel, and then to the toolbar with the "Add to Toolbar"
       // context menu option, outside of customize mode.
       if (this._viewElt._placesView) {
         this._viewElt._placesView.uninit();
       }
@@ -1269,30 +1269,30 @@ var BookmarkingUI = {
 
   get _unstarredTooltip()
   {
     delete this._unstarredTooltip;
     return this._unstarredTooltip =
       this._getFormattedTooltip("starButtonOff.tooltip2");
   },
 
-  _getFormattedTooltip: function(strId) {
+  _getFormattedTooltip(strId) {
     let args = [];
     let shortcut = document.getElementById(this.BOOKMARK_BUTTON_SHORTCUT);
     if (shortcut)
       args.push(ShortcutUtils.prettifyShortcut(shortcut));
     return gNavigatorBundle.getFormattedString(strId, args);
   },
 
   /**
    * The type of the area in which the button is currently located.
    * When in the panel, we don't update the button's icon.
    */
   _currentAreaType: null,
-  _shouldUpdateStarState: function() {
+  _shouldUpdateStarState() {
     return this._currentAreaType == CustomizableUI.TYPE_TOOLBAR;
   },
 
   /**
    * The popup contents must be updated when the user customizes the UI, or
    * changes the personal toolbar collapsed status.  In such a case, any needed
    * change should be handled in the popupshowing helper, for performance
    * reasons.
@@ -1344,17 +1344,17 @@ var BookmarkingUI = {
     if (viewToolbarMenuitem) {
       // Update View bookmarks toolbar checkbox menuitem.
       viewToolbarMenuitem.classList.add("subviewbutton");
       let personalToolbar = document.getElementById("PersonalToolbar");
       viewToolbarMenuitem.setAttribute("checked", !personalToolbar.collapsed);
     }
   },
 
-  attachPlacesView: function(event, node) {
+  attachPlacesView(event, node) {
     // If the view is already there, bail out early.
     if (node.parentNode._placesView)
       return;
 
     new PlacesMenu(event, "place:folder=BOOKMARKS_MENU", {
       extraClasses: {
         entry: "subviewbutton",
         footer: "panel-subview-footer"
@@ -1572,17 +1572,17 @@ var BookmarkingUI = {
 
   onCustomizeEnd: function BUI_customizeEnd(aWindow) {
     if (aWindow == window) {
       this._isCustomizing = false;
       this.onToolbarVisibilityChange();
     }
   },
 
-  init: function() {
+  init() {
     CustomizableUI.addListener(this);
     this._updateCustomizationState();
   },
 
   _hasBookmarksObserver: false,
   _itemIds: [],
   uninit: function BUI_uninit() {
     this._updateBookmarkPageMenuItem(true);
@@ -1752,17 +1752,17 @@ var BookmarkingUI = {
       this.dropmarkerNotifier.removeAttribute("notification");
       this.button.removeAttribute("notification");
 
       this.dropmarkerNotifier.style.transform = '';
       this.notifier.style.transform = '';
     }, 1000);
   },
 
-  _showSubview: function() {
+  _showSubview() {
     let view = document.getElementById("PanelUI-bookmarks");
     view.addEventListener("ViewShowing", this);
     view.addEventListener("ViewHiding", this);
     let anchor = document.getElementById(this.BOOKMARK_BUTTON_ID);
     anchor.setAttribute("closemenu", "none");
     PanelUI.showSubView("PanelUI-bookmarks", anchor,
                         CustomizableUI.AREA_PANEL);
   },
@@ -1897,51 +1897,51 @@ var BookmarkingUI = {
         // Only need to update the UI if it wasn't marked as starred before:
         if (this._itemIds.length == 1) {
           this._updateStar();
         }
       }
     }
   },
 
-  onBeginUpdateBatch: function() {},
-  onEndUpdateBatch: function() {},
-  onBeforeItemRemoved: function() {},
-  onItemVisited: function() {},
-  onItemMoved: function() {},
+  onBeginUpdateBatch() {},
+  onEndUpdateBatch() {},
+  onBeforeItemRemoved() {},
+  onItemVisited() {},
+  onItemMoved() {},
 
   // CustomizableUI events:
   _starButtonLabel: null,
   get _starButtonOverflowedLabel() {
     delete this._starButtonOverflowedLabel;
     return this._starButtonOverflowedLabel =
       gNavigatorBundle.getString("starButtonOverflowed.label");
   },
   get _starButtonOverflowedStarredLabel() {
     delete this._starButtonOverflowedStarredLabel;
     return this._starButtonOverflowedStarredLabel =
       gNavigatorBundle.getString("starButtonOverflowedStarred.label");
   },
-  onWidgetOverflow: function(aNode, aContainer) {
+  onWidgetOverflow(aNode, aContainer) {
     let win = aNode.ownerGlobal;
     if (aNode.id != this.BOOKMARK_BUTTON_ID || win != window)
       return;
 
     let currentLabel = aNode.getAttribute("label");
     if (!this._starButtonLabel)
       this._starButtonLabel = currentLabel;
 
     if (currentLabel == this._starButtonLabel) {
       let desiredLabel = this._itemIds.length > 0 ? this._starButtonOverflowedStarredLabel
                                                  : this._starButtonOverflowedLabel;
       aNode.setAttribute("label", desiredLabel);
     }
   },
 
-  onWidgetUnderflow: function(aNode, aContainer) {
+  onWidgetUnderflow(aNode, aContainer) {
     let win = aNode.ownerGlobal;
     if (aNode.id != this.BOOKMARK_BUTTON_ID || win != window)
       return;
 
     // The view gets broken by being removed and reinserted. Uninit
     // here so popupshowing will generate a new one:
     this._uninitView();
 
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -12,39 +12,39 @@ var gPluginHandler = {
     "PluginContent:UpdateHiddenPluginUI",
     "PluginContent:HideNotificationBar",
     "PluginContent:InstallSinglePlugin",
     "PluginContent:ShowPluginCrashedNotification",
     "PluginContent:SubmitReport",
     "PluginContent:LinkClickCallback",
   ],
 
-  init: function() {
+  init() {
     const mm = window.messageManager;
     for (let msg of this.MESSAGES) {
       mm.addMessageListener(msg, this);
     }
     window.addEventListener("unload", this);
   },
 
-  uninit: function() {
+  uninit() {
     const mm = window.messageManager;
     for (let msg of this.MESSAGES) {
       mm.removeMessageListener(msg, this);
     }
     window.removeEventListener("unload", this);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (event.type == "unload") {
       this.uninit();
     }
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "PluginContent:ShowClickToPlayNotification":
         this.showClickToPlayNotification(msg.target, msg.data.plugins, msg.data.showNow,
                                          msg.principal, msg.data.location);
         break;
       case "PluginContent:RemoveNotification":
         this.removeNotification(msg.target, msg.data.name);
         break;
@@ -78,45 +78,45 @@ var gPluginHandler = {
         break;
       default:
         Cu.reportError("gPluginHandler did not expect to handle message " + msg.name);
         break;
     }
   },
 
   // Callback for user clicking on a disabled plugin
-  managePlugins: function() {
+  managePlugins() {
     BrowserOpenAddonsMgr("addons://list/plugin");
   },
 
   // Callback for user clicking on the link in a click-to-play plugin
   // (where the plugin has an update)
-  openPluginUpdatePage: function(pluginTag) {
+  openPluginUpdatePage(pluginTag) {
     let url = Services.blocklist.getPluginInfoURL(pluginTag);
     if (!url) {
       url = Services.blocklist.getPluginBlocklistURL(pluginTag);
     }
     openUILinkIn(url, "tab");
   },
 
   submitReport: function submitReport(runID, keyVals, submitURLOptIn) {
     if (!AppConstants.MOZ_CRASHREPORTER) {
       return;
     }
     Services.prefs.setBoolPref("dom.ipc.plugins.reportCrashURL", submitURLOptIn);
     PluginCrashReporter.submitCrashReport(runID, keyVals);
   },
 
   // Callback for user clicking a "reload page" link
-  reloadPage: function(browser) {
+  reloadPage(browser) {
     browser.reload();
   },
 
   // Callback for user clicking the help icon
-  openHelpPage: function() {
+  openHelpPage() {
     openHelpLink("plugin-crashed", false);
   },
 
   _clickToPlayNotificationEventCallback: function PH_ctpEventCallback(event) {
     if (event == "showing") {
       Services.telemetry.getHistogramById("PLUGINS_NOTIFICATION_SHOWN")
         .add(!this.options.primaryPlugin);
       // Histograms always start at 0, even though our data starts at 1
@@ -134,17 +134,17 @@ var gPluginHandler = {
     }
   },
 
   /**
    * Called from the plugin doorhanger to set the new permissions for a plugin
    * and activate plugins if necessary.
    * aNewState should be either "allownow" "allowalways" or "block"
    */
-  _updatePluginPermission: function(aNotification, aPluginInfo, aNewState) {
+  _updatePluginPermission(aNotification, aPluginInfo, aNewState) {
     let permission;
     let expireType;
     let expireTime;
     let histogram =
       Services.telemetry.getHistogramById("PLUGINS_NOTIFICATION_USER_ACTION");
 
     // Update the permission manager.
     // Also update the current state of pluginInfo.fallbackType so that
@@ -203,17 +203,17 @@ var gPluginHandler = {
     }
 
     browser.messageManager.sendAsyncMessage("BrowserPlugins:ActivatePlugins", {
       pluginInfo: aPluginInfo,
       newState: aNewState,
     });
   },
 
-  showClickToPlayNotification: function(browser, plugins, showNow,
+  showClickToPlayNotification(browser, plugins, showNow,
                                         principal, location) {
     // It is possible that we've received a message from the frame script to show
     // a click to play notification for a principal that no longer matches the one
     // that the browser's content now has assigned (ie, the browser has browsed away
     // after the message was sent, but before the message was received). In that case,
     // we should just ignore the message.
     if (!principal.equals(browser.contentPrincipal)) {
       return;
@@ -276,39 +276,39 @@ var gPluginHandler = {
       return;
     }
 
     let options = {
       dismissed: !showNow,
       persistent: showNow,
       eventCallback: this._clickToPlayNotificationEventCallback,
       primaryPlugin: primaryPluginPermission,
-      pluginData: pluginData,
-      principal: principal,
+      pluginData,
+      principal,
     };
     PopupNotifications.show(browser, "click-to-play-plugins",
                             "", "plugins-notification-icon",
                             null, null, options);
     browser.messageManager.sendAsyncMessage("BrowserPlugins:NotificationShown");
   },
 
-  removeNotification: function(browser, name) {
+  removeNotification(browser, name) {
     let notification = PopupNotifications.getNotification(name, browser);
     if (notification)
       PopupNotifications.remove(notification);
   },
 
-  hideNotificationBar: function(browser, name) {
+  hideNotificationBar(browser, name) {
     let notificationBox = gBrowser.getNotificationBox(browser);
     let notification = notificationBox.getNotificationWithValue(name);
     if (notification)
       notificationBox.removeNotification(notification, true);
   },
 
-  updateHiddenPluginUI: function(browser, haveInsecure, actions,
+  updateHiddenPluginUI(browser, haveInsecure, actions,
                                  principal, location) {
     let origin = principal.originNoSuffix;
 
     // It is possible that we've received a message from the frame script to show
     // the hidden plugin notification for a principal that no longer matches the one
     // that the browser's content now has assigned (ie, the browser has browsed away
     // after the message was sent, but before the message was received). In that case,
     // we should just ignore the message.
@@ -386,29 +386,29 @@ var gPluginHandler = {
         message = gNavigatorBundle.getFormattedString(
           "pluginActivateMultiple.message", [origin]);
       }
 
       let buttons = [
         {
           label: gNavigatorBundle.getString("pluginContinueBlocking.label"),
           accessKey: gNavigatorBundle.getString("pluginContinueBlocking.accesskey"),
-          callback: function() {
+          callback() {
             Services.telemetry.getHistogramById("PLUGINS_INFOBAR_BLOCK").
               add(true);
 
             Services.perms.addFromPrincipal(principal,
                                             "plugin-hidden-notification",
                                             Services.perms.DENY_ACTION);
           }
         },
         {
           label: gNavigatorBundle.getString("pluginActivateTrigger.label"),
           accessKey: gNavigatorBundle.getString("pluginActivateTrigger.accesskey"),
-          callback: function() {
+          callback() {
             Services.telemetry.getHistogramById("PLUGINS_INFOBAR_ALLOW").
               add(true);
 
             let curNotification =
               PopupNotifications.getNotification("click-to-play-plugins",
                                                  browser);
             if (curNotification) {
               curNotification.reshow();
@@ -432,24 +432,24 @@ var gPluginHandler = {
       if (notificationPermission == Ci.nsIPermissionManager.DENY_ACTION) {
         hideNotification();
       } else {
         showNotification();
       }
     }
   },
 
-  contextMenuCommand: function(browser, plugin, command) {
+  contextMenuCommand(browser, plugin, command) {
     browser.messageManager.sendAsyncMessage("BrowserPlugins:ContextMenuCommand",
-      { command: command }, { plugin: plugin });
+      { command }, { plugin });
   },
 
   // Crashed-plugin observer. Notified once per plugin crash, before events
   // are dispatched to individual plugin instances.
-  NPAPIPluginCrashed : function(subject, topic, data) {
+  NPAPIPluginCrashed(subject, topic, data) {
     let propertyBag = subject;
     if (!(propertyBag instanceof Ci.nsIPropertyBag2) ||
         !(propertyBag instanceof Ci.nsIWritablePropertyBag2) ||
         !propertyBag.hasKey("runID") ||
         !propertyBag.hasKey("pluginName")) {
       Cu.reportError("A NPAPI plugin crashed, but the properties of this plugin " +
                      "cannot be read.");
       return;
@@ -488,17 +488,17 @@ var gPluginHandler = {
    *        The browser to show the notification for.
    * @param messageString
    *        The string to put in the notification bar
    * @param pluginID
    *        The unique-per-process identifier for the NPAPI plugin or GMP.
    *        For a GMP, this is the pluginID. For NPAPI plugins (where "pluginID"
    *        means something different), this is the runID.
    */
-  showPluginCrashedNotification: function(browser, messageString, pluginID) {
+  showPluginCrashedNotification(browser, messageString, pluginID) {
     // If there's already an existing notification bar, don't do anything.
     let notificationBox = gBrowser.getNotificationBox(browser);
     let notification = notificationBox.getNotificationWithValue("plugin-crashed");
     if (notification) {
       return;
     }
 
     // Configure the notification bar
@@ -506,17 +506,17 @@ var gPluginHandler = {
     let iconURL = "chrome://mozapps/skin/plugins/notifyPluginCrashed.png";
     let reloadLabel = gNavigatorBundle.getString("crashedpluginsMessage.reloadButton.label");
     let reloadKey   = gNavigatorBundle.getString("crashedpluginsMessage.reloadButton.accesskey");
 
     let buttons = [{
       label: reloadLabel,
       accessKey: reloadKey,
       popup: null,
-      callback: function() { browser.reload(); },
+      callback() { browser.reload(); },
     }];
 
     if (AppConstants.MOZ_CRASHREPORTER &&
         PluginCrashReporter.hasCrashReport(pluginID)) {
       let submitLabel = gNavigatorBundle.getString("crashedpluginsMessage.submitButton.label");
       let submitKey   = gNavigatorBundle.getString("crashedpluginsMessage.submitButton.accesskey");
       let submitButton = {
         label: submitLabel,
--- a/browser/base/content/browser-refreshblocker.js
+++ b/browser/base/content/browser-refreshblocker.js
@@ -12,17 +12,17 @@ var RefreshBlocker = {
   init() {
     gBrowser.addEventListener("RefreshBlocked", this);
   },
 
   uninit() {
     gBrowser.removeEventListener("RefreshBlocked", this);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (event.type == "RefreshBlocked") {
       this.block(event.originalTarget, event.detail);
     }
   },
 
   /**
    * Shows the blocked refresh / redirect notification for some browser.
    *
@@ -63,17 +63,17 @@ var RefreshBlocker = {
       let refreshButtonText =
         gNavigatorBundle.getString("refreshBlocked.goButton");
       let refreshButtonAccesskey =
         gNavigatorBundle.getString("refreshBlocked.goButton.accesskey");
 
       let buttons = [{
         label: refreshButtonText,
         accessKey: refreshButtonAccesskey,
-        callback: function() {
+        callback() {
           if (browser.messageManager) {
             browser.messageManager.sendAsyncMessage("RefreshBlocker:Refresh", data);
           }
         }
       }];
 
       notificationBox.appendNotification(message, "refresh-blocked",
                                          "chrome://browser/skin/Info.png",
--- a/browser/base/content/browser-safebrowsing.js
+++ b/browser/base/content/browser-safebrowsing.js
@@ -1,15 +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/. */
 
 var gSafeBrowsing = {
 
-  setReportPhishingMenu: function() {
+  setReportPhishingMenu() {
     // In order to detect whether or not we're at the phishing warning
     // page, we have to check the documentURI instead of the currentURI.
     // This is because when the DocShell loads an error page, the
     // currentURI stays at the original target, while the documentURI
     // will point to the internal error page we loaded instead.
     var docURI = gBrowser.selectedBrowser.documentURI;
     var isPhishingPage =
       docURI && docURI.spec.startsWith("about:blocked?e=deceptiveBlocked");
@@ -37,12 +37,12 @@ var gSafeBrowsing = {
       broadcaster.setAttribute("disabled", true);
   },
 
   /**
    * Used to report a phishing page or a false positive
    * @param name String One of "Phish", "Error", "Malware" or "MalwareError"
    * @return String the report phishing URL.
    */
-  getReportURL: function(name) {
+  getReportURL(name) {
     return SafeBrowsing.getReportURL(name, gBrowser.currentURI);
   }
 }
--- a/browser/base/content/browser-sidebar.js
+++ b/browser/base/content/browser-sidebar.js
@@ -253,17 +253,17 @@ var SidebarUI = {
       } else {
         // Older code handled this case, so we do it too.
         this._fireFocusedEvent();
         resolve();
       }
 
       let selBrowser = gBrowser.selectedBrowser;
       selBrowser.messageManager.sendAsyncMessage("Sidebar:VisibilityChange",
-        {commandID: commandID, isOpen: true}
+        {commandID, isOpen: true}
       );
       BrowserUITelemetry.countSidebarEvent(commandID, "show");
     });
   },
 
   /**
    * Hide the sidebar.
    */
@@ -291,17 +291,17 @@ var SidebarUI = {
     this._box.setAttribute("sidebarcommand", "");
     this._title.value = "";
     this._box.hidden = true;
     this._splitter.hidden = true;
 
     let selBrowser = gBrowser.selectedBrowser;
     selBrowser.focus();
     selBrowser.messageManager.sendAsyncMessage("Sidebar:VisibilityChange",
-      {commandID: commandID, isOpen: false}
+      {commandID, isOpen: false}
     );
     BrowserUITelemetry.countSidebarEvent(commandID, "hide");
   },
 };
 
 /**
  * This exists for backards compatibility - it will be called once a sidebar is
  * ready, following any request to show it.
--- a/browser/base/content/browser-syncui.js
+++ b/browser/base/content/browser-syncui.js
@@ -34,17 +34,17 @@ var gSyncUI = {
   ],
 
   _unloaded: false,
   // The last sync start time. Used to calculate the leftover animation time
   // once syncing completes (bug 1239042).
   _syncStartTime: 0,
   _syncAnimationTimer: 0,
 
-  init: function() {
+  init() {
     Cu.import("resource://services-common/stringbundle.js");
 
     // Proceed to set up the UI if Sync has already started up.
     // Otherwise we'll do it when Sync is firing up.
     if (this.weaveService.ready) {
       this.initUI();
       return;
     }
@@ -132,17 +132,17 @@ var gSyncUI = {
     // Otherwise we are configured for legacy Sync, which has no verification
     // concept.
     return Promise.resolve(false);
   },
 
   // Note that we don't show login errors in a notification bar here, but do
   // still need to track a login-failed state so the "Tools" menu updates
   // with the correct state.
-  _loginFailed: function() {
+  _loginFailed() {
     // If Sync isn't already ready, we don't want to force it to initialize
     // by referencing Weave.Status - and it isn't going to be accurate before
     // Sync is ready anyway.
     if (!this.weaveService.ready) {
       this.log.debug("_loginFailed has sync not ready, so returning false");
       return false;
     }
     this.log.debug("_loginFailed has sync state=${sync}",
@@ -237,17 +237,17 @@ var gSyncUI = {
     // the hamburger menu.
     this.updateUI();
   },
 
   onLogout: function SUI_onLogout() {
     this.updateUI();
   },
 
-  _getAppName: function() {
+  _getAppName() {
     let brand = new StringBundle("chrome://branding/locale/brand.properties");
     return brand.get("brandShortName");
   },
 
   // Commands
   // doSync forces a sync - it *does not* return a promise as it is called
   // via the various UI components.
   doSync() {
@@ -299,33 +299,33 @@ var gSyncUI = {
         window.openDialog("chrome://browser/content/sync/setup.xul",
                           "weaveSetup", "centerscreen,chrome,resizable=no",
                           wizardType);
       }
     }
   },
 
   // Open the legacy-sync device pairing UI. Note used for FxA Sync.
-  openAddDevice: function() {
+  openAddDevice() {
     if (!Weave.Utils.ensureMPUnlocked())
       return;
 
     let win = Services.wm.getMostRecentWindow("Sync:AddDevice");
     if (win)
       win.focus();
     else
       window.openDialog("chrome://browser/content/sync/addDevice.xul",
                         "syncAddDevice", "centerscreen,chrome,resizable=no");
   },
 
-  openPrefs: function(entryPoint) {
+  openPrefs(entryPoint) {
     openPreferences("paneSync", { urlParams: { entrypoint: entryPoint } });
   },
 
-  openSignInAgainPage: function(entryPoint = "syncbutton") {
+  openSignInAgainPage(entryPoint = "syncbutton") {
     gFxAccounts.openSignInAgainPage(entryPoint);
   },
 
   openSyncedTabsPanel() {
     let placement = CustomizableUI.getPlacementOfWidget("sync-button");
     let area = placement ? placement.area : CustomizableUI.AREA_NAVBAR;
     let anchor = document.getElementById("sync-button") ||
                  document.getElementById("PanelUI-menu-button");
@@ -418,17 +418,17 @@ var gSyncUI = {
       if (tooltiptext) {
         broadcaster.setAttribute("tooltiptext", tooltiptext);
       } else {
         broadcaster.removeAttribute("tooltiptext");
       }
     }
   }),
 
-  formatLastSyncDate: function(date) {
+  formatLastSyncDate(date) {
     let dateFormat;
     let sixDaysAgo = (() => {
       let tempDate = new Date();
       tempDate.setDate(tempDate.getDate() - 6);
       tempDate.setHours(0, 0, 0, 0);
       return tempDate;
     })();
     // It may be confusing for the user to see "Last Sync: Monday" when the last sync was a indeed a Monday but 3 weeks ago
@@ -436,17 +436,17 @@ var gSyncUI = {
       dateFormat = {month: 'long', day: 'numeric'};
     } else {
       dateFormat = {weekday: 'long', hour: 'numeric', minute: 'numeric'};
     }
     let lastSyncDateString = date.toLocaleDateString(undefined, dateFormat);
     return this._stringBundle.formatStringFromName("lastSync2.label", [lastSyncDateString], 1);
   },
 
-  onClientsSynced: function() {
+  onClientsSynced() {
     let broadcaster = document.getElementById("sync-syncnow-state");
     if (broadcaster) {
       if (Weave.Service.clientsEngine.stats.numClients > 1) {
         broadcaster.setAttribute("devices-status", "multi");
       } else {
         broadcaster.setAttribute("devices-status", "single");
       }
     }
--- a/browser/base/content/browser-tabsintitlebar-stub.js
+++ b/browser/base/content/browser-tabsintitlebar-stub.js
@@ -2,16 +2,16 @@
  * 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 is used as a stub object for platforms which
 // don't have CAN_DRAW_IN_TITLEBAR defined.
 
 var TabsInTitlebar = {
-  init: function() {},
-  uninit: function() {},
-  allowedBy: function(condition, allow) {},
+  init() {},
+  uninit() {},
+  allowedBy(condition, allow) {},
   updateAppearance: function updateAppearance(aForce) {},
   get enabled() {
     return document.documentElement.getAttribute("tabsintitlebar") == "true";
   },
 };
--- a/browser/base/content/browser-tabsintitlebar.js
+++ b/browser/base/content/browser-tabsintitlebar.js
@@ -2,17 +2,17 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Note: the file browser-tabsintitlebar-stub.js is used instead of
 // this one on platforms which don't have CAN_DRAW_IN_TITLEBAR defined.
 
 var TabsInTitlebar = {
-  init: function() {
+  init() {
     if (this._initialized) {
       return;
     }
     this._readPref();
     Services.prefs.addObserver(this._prefName, this, false);
 
     // We need to update the appearance of the titlebar when the menu changes
     // from the active to the inactive state. We can't, however, rely on
@@ -44,17 +44,17 @@ var TabsInTitlebar = {
     if (this._updateOnInit) {
       // We don't need to call this with 'true', even if original calls
       // (before init()) did, because this will be the first call and so
       // we will update anyway.
       this._update();
     }
   },
 
-  allowedBy: function(condition, allow) {
+  allowedBy(condition, allow) {
     if (allow) {
       if (condition in this._disallowed) {
         delete this._disallowed[condition];
         this._update(true);
       }
     } else if (!(condition in this._disallowed)) {
       this._disallowed[condition] = null;
       this._update(true);
@@ -64,49 +64,49 @@ var TabsInTitlebar = {
   updateAppearance: function updateAppearance(aForce) {
     this._update(aForce);
   },
 
   get enabled() {
     return document.documentElement.getAttribute("tabsintitlebar") == "true";
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     if (topic == "nsPref:changed")
       this._readPref();
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     if (aEvent.type == "resolutionchange" && aEvent.target == window) {
       this._update(true);
     }
   },
 
-  _onMenuMutate: function(aMutations) {
+  _onMenuMutate(aMutations) {
     for (let mutation of aMutations) {
       if (mutation.attributeName == "inactive" ||
           mutation.attributeName == "autohide") {
         TabsInTitlebar._update(true);
         return;
       }
     }
   },
 
   _initialized: false,
   _updateOnInit: false,
   _disallowed: {},
   _prefName: "browser.tabs.drawInTitlebar",
   _lastSizeMode: null,
 
-  _readPref: function() {
+  _readPref() {
     this.allowedBy("pref",
                    Services.prefs.getBoolPref(this._prefName));
   },
 
-  _update: function(aForce = false) {
+  _update(aForce = false) {
     let $ = id => document.getElementById(id);
     let rect = ele => ele.getBoundingClientRect();
     let verticalMargins = cstyle => parseFloat(cstyle.marginBottom) + parseFloat(cstyle.marginTop);
 
     if (window.fullScreen)
       return;
 
     // In some edgecases it is possible for this to fire before we've initialized.
@@ -248,22 +248,22 @@ var TabsInTitlebar = {
     }
 
     ToolbarIconColor.inferFromText();
     if (CustomizationHandler.isCustomizing()) {
       gCustomizeMode.updateLWTStyling();
     }
   },
 
-  _sizePlaceholder: function(type, width) {
+  _sizePlaceholder(type, width) {
     Array.forEach(document.querySelectorAll(".titlebar-placeholder[type='" + type + "']"),
                   function(node) { node.width = width; });
   },
 
-  uninit: function() {
+  uninit() {
     this._initialized = false;
     removeEventListener("resolutionchange", this);
     Services.prefs.removeObserver(this._prefName, this);
     this._menuObserver.disconnect();
     CustomizableUI.removeListener(this);
   }
 };
 
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -165,20 +165,20 @@ XPCOMUtils.defineLazyGetter(this, "Win7F
   if (AppConstants.platform != "win")
     return null;
 
   const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
   if (WINTASKBAR_CONTRACTID in Cc &&
       Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available) {
     let AeroPeek = Cu.import("resource:///modules/WindowsPreviewPerTab.jsm", {}).AeroPeek;
     return {
-      onOpenWindow: function() {
+      onOpenWindow() {
         AeroPeek.onOpenWindow(window);
       },
-      onCloseWindow: function() {
+      onCloseWindow() {
         AeroPeek.onCloseWindow(window);
       }
     };
   }
   return null;
 });
 
 const nsIWebNavigation = Ci.nsIWebNavigation;
@@ -403,17 +403,17 @@ const gClickAndHoldListenersOnElement = 
     this._timers.delete(aElm);
 
     aElm.addEventListener("mousedown", this, true);
     aElm.addEventListener("click", this, true);
   }
 };
 
 const gSessionHistoryObserver = {
-  observe: function(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,28 +454,28 @@ function findChildShell(aDocument, aDocS
       return docShell;
   }
   return null;
 }
 
 var gPopupBlockerObserver = {
   _reportButton: null,
 
-  onReportButtonMousedown: function(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: function(aEvent)
+  handleEvent(aEvent)
   {
     if (aEvent.originalTarget != gBrowser.selectedBrowser)
       return;
 
     if (!this._reportButton)
       this._reportButton = document.getElementById("page-report-button");
 
     if (!gBrowser.selectedBrowser.blockedPopups ||
@@ -536,30 +536,30 @@ 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: function(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: function(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
@@ -652,50 +652,50 @@ var gPopupBlockerObserver = {
 
       // Show the separator if we added any
       // showable popup addresses to the menu.
       if (foundUsablePopupURI)
         blockedPopupsSeparator.removeAttribute("hidden");
     }, null);
   },
 
-  onPopupHiding: function(aEvent) {
+  onPopupHiding(aEvent) {
     if (aEvent.target.anchorNode.id == "page-report-button")
       aEvent.target.anchorNode.removeAttribute("open");
 
     this.isPopupHidingTick = true;
     setTimeout(() => this.isPopupHidingTick = false, 0);
 
     let item = aEvent.target.lastChild;
     while (item && item.getAttribute("observes") != "blockedPopupsSeparator") {
       let next = item.previousSibling;
       item.parentNode.removeChild(item);
       item = next;
     }
   },
 
-  showBlockedPopup: function(aEvent)
+  showBlockedPopup(aEvent)
   {
     var target = aEvent.target;
     var popupReportIndex = target.getAttribute("popupReportIndex");
     let browser = target.popupReportBrowser;
     browser.unblockPopup(popupReportIndex);
   },
 
-  showAllBlockedPopups: function(aBrowser)
+  showAllBlockedPopups(aBrowser)
   {
     aBrowser.retrieveListOfBlockedPopups().then(popups => {
       for (let i = 0; i < popups.length; i++) {
         if (popups[i].popupWindowURIspec)
           aBrowser.unblockPopup(i);
       }
     }, null);
   },
 
-  editPopupSettings: function()
+  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) {
@@ -724,17 +724,17 @@ var gPopupBlockerObserver = {
       existingWindow.initWithParams(params);
       existingWindow.focus();
     }
     else
       window.openDialog("chrome://browser/content/preferences/permissions.xul",
                         "_blank", "resizable,dialog=no,centerscreen", params);
   },
 
-  dontShowMessage: function()
+  dontShowMessage()
   {
     var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
     gPrefService.setBoolPref("privacy.popups.showBrowserMessage", !showMessage);
     gBrowser.getNotificationBox().removeCurrentNotification();
   }
 };
 
 function gKeywordURIFixup({ target: browser, data: fixupInfo }) {
@@ -819,29 +819,29 @@ function gKeywordURIFixup({ target: brow
       "keywordURIFixup.message", [hostName]);
     let yesMessage = gNavigatorBundle.getFormattedString(
       "keywordURIFixup.goTo", [hostName])
 
     let buttons = [
       {
         label: yesMessage,
         accessKey: gNavigatorBundle.getString("keywordURIFixup.goTo.accesskey"),
-        callback: function() {
+        callback() {
           // Do not set this preference while in private browsing.
           if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
             let pref = "browser.fixup.domainwhitelist." + asciiHost;
             Services.prefs.setBoolPref(pref, true);
           }
           openUILinkIn(alternativeURI.spec, "current");
         }
       },
       {
         label: gNavigatorBundle.getString("keywordURIFixup.dismiss"),
         accessKey: gNavigatorBundle.getString("keywordURIFixup.dismiss.accesskey"),
-        callback: function() {
+        callback() {
           let notification = notificationBox.getNotificationWithValue("keyword-uri-fixup");
           notificationBox.removeNotification(notification, true);
         }
       }
     ];
     let notification =
       notificationBox.appendNotification(message, "keyword-uri-fixup", null,
                                          notificationBox.PRIORITY_INFO_HIGH,
@@ -891,21 +891,21 @@ function _loadURIWithFlags(browser, uri,
                                                referrer, referrerPolicy,
                                                postData, null, null);
     } else {
       if (postData) {
         postData = NetUtil.readInputStreamToString(postData, postData.available());
       }
 
       let loadParams = {
-        uri: uri,
-        flags: flags,
+        uri,
+        flags,
         referrer: referrer ? referrer.spec : null,
-        referrerPolicy: referrerPolicy,
-        postData: postData
+        referrerPolicy,
+        postData
       }
 
       if (params.userContextId) {
         loadParams.userContextId = params.userContextId;
       }
 
       LoadInOtherProcess(browser, loadParams);
     }
@@ -996,17 +996,17 @@ addEventListener("DOMContentLoaded", fun
   }
 
   gBrowser.updateBrowserRemoteness(initBrowser, gMultiProcessBrowser);
 });
 
 var gBrowserInit = {
   delayedStartupFinished: false,
 
-  onLoad: function() {
+  onLoad() {
     gBrowser.addEventListener("DOMUpdatePageReport", gPopupBlockerObserver, false);
 
     Services.obs.addObserver(gPluginHandler.NPAPIPluginCrashed, "plugin-crashed", false);
 
     window.addEventListener("AppCommand", HandleAppCommandEvent, true);
 
     // These routines add message listeners. They must run before
     // loading the frame script to ensure that we don't miss any
@@ -1099,22 +1099,22 @@ var gBrowserInit = {
 
     // Wait until chrome is painted before executing code not critical to making the window visible
     this._boundDelayedStartup = this._delayedStartup.bind(this);
     window.addEventListener("MozAfterPaint", this._boundDelayedStartup);
 
     this._loadHandled = true;
   },
 
-  _cancelDelayedStartup: function() {
+  _cancelDelayedStartup() {
     window.removeEventListener("MozAfterPaint", this._boundDelayedStartup);
     this._boundDelayedStartup = null;
   },
 
-  _delayedStartup: function() {
+  _delayedStartup() {
     let tmp = {};
     Cu.import("resource://gre/modules/TelemetryTimestamps.jsm", tmp);
     let TelemetryTimestamps = tmp.TelemetryTimestamps;
     TelemetryTimestamps.add("delayedStartupStarted");
 
     this._cancelDelayedStartup();
 
     // We need to set the OfflineApps message listeners up before we
@@ -1465,17 +1465,17 @@ var gBrowserInit = {
 
     this.delayedStartupFinished = true;
 
     Services.obs.notifyObservers(window, "browser-delayed-startup-finished", "");
     TelemetryTimestamps.add("delayedStartupFinished");
   },
 
   // Returns the URI(s) to load at startup.
-  _getUriToLoad: function() {
+  _getUriToLoad() {
     // window.arguments[0]: URI to load (string), or an nsIArray of
     //                      nsISupportsStrings to load, or a xul:tab of
     //                      a tabbrowser, which will be replaced by this
     //                      window (for this case, all other arguments are
     //                      ignored).
     if (!window.arguments || !window.arguments[0])
       return null;
 
@@ -1489,17 +1489,17 @@ var gBrowserInit = {
     // If the given URI matches defaultArgs (the default homepage) we want
     // to block its load if we're going to restore a session anyway.
     if (uri == defaultArgs && sessionStartup.willOverrideHomepage)
       return null;
 
     return uri;
   },
 
-  onUnload: function() {
+  onUnload() {
     // In certain scenarios it's possible for unload to be fired before onload,
     // (e.g. if the window is being closed after browser.js loads but before the
     // load completes). In that case, there's nothing to do here.
     if (!this._loadHandled)
       return;
 
     // First clean up services initialized in gBrowserInit.onLoad (or those whose
     // uninit methods don't depend on the services having been initialized).
@@ -2049,17 +2049,17 @@ var gLastOpenDirectory = {
     }
     this._lastDir = val.clone();
 
     // Don't save the last open directory pref inside the Private Browsing mode
     if (!PrivateBrowsingUtils.isWindowPrivate(window))
       gPrefService.setComplexValue("browser.open.lastDir", Ci.nsILocalFile,
                                    this._lastDir);
   },
-  reset: function() {
+  reset() {
     this._lastDir = null;
   }
 };
 
 function BrowserOpenFileWindow()
 {
   // Get filepicker component.
   try {
@@ -2106,20 +2106,20 @@ function BrowserTryToCloseWindow()
     window.close();     // WindowIsClosing does all the necessary checks
 }
 
 function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
                  userContextId, originPrincipal, forceAboutBlankViewerInCurrent) {
   try {
     openLinkIn(uri, "current",
                { referrerURI: referrer,
-                 referrerPolicy: referrerPolicy,
-                 postData: postData,
-                 allowThirdPartyFixup: allowThirdPartyFixup,
-                 userContextId: userContextId,
+                 referrerPolicy,
+                 postData,
+                 allowThirdPartyFixup,
+                 userContextId,
                  originPrincipal,
                  forceAboutBlankViewerInCurrent,
                });
   } catch (e) {}
 }
 
 /**
  * Given a string, will generate a more appropriate urlbar value if a Places
@@ -2362,17 +2362,17 @@ function BrowserViewSourceOfDocument(aAr
  * top-level document of the browser. This is really just a
  * convenience wrapper around BrowserViewSourceOfDocument.
  *
  * @param browser
  *        The browser that we want to load the source of.
  */
 function BrowserViewSource(browser) {
   BrowserViewSourceOfDocument({
-    browser: browser,
+    browser,
     outerWindowID: browser.outerWindowID,
     URL: browser.currentURI.spec,
   });
 }
 
 // documentURL - URL of the document to view, or null for this window's document
 // initialTab - name of the initial tab to display, or null for the first tab
 // imageElement - image to load in the Media Tab of the Page Info window; can be null/omitted
@@ -2611,127 +2611,127 @@ var gMenuButtonBadgeManager = {
   BADGEID_APPUPDATE: "update",
   BADGEID_DOWNLOAD: "download",
   BADGEID_FXA: "fxa",
 
   fxaBadge: null,
   downloadBadge: null,
   appUpdateBadge: null,
 
-  init: function() {
+  init() {
     PanelUI.panel.addEventListener("popupshowing", this, true);
   },
 
-  uninit: function() {
+  uninit() {
     PanelUI.panel.removeEventListener("popupshowing", this, true);
   },
 
-  handleEvent: function(e) {
+  handleEvent(e) {
     if (e.type === "popupshowing") {
       this.clearBadges();
     }
   },
 
-  _showBadge: function() {
+  _showBadge() {
     let badgeToShow = this.downloadBadge || this.appUpdateBadge || this.fxaBadge;
 
     if (badgeToShow) {
       PanelUI.menuButton.setAttribute("badge-status", badgeToShow);
     } else {
       PanelUI.menuButton.removeAttribute("badge-status");
     }
   },
 
-  _changeBadge: function(badgeId, badgeStatus = null) {
+  _changeBadge(badgeId, badgeStatus = null) {
     if (badgeId == this.BADGEID_APPUPDATE) {
       this.appUpdateBadge = badgeStatus;
     } else if (badgeId == this.BADGEID_DOWNLOAD) {
       this.downloadBadge = badgeStatus;
     } else if (badgeId == this.BADGEID_FXA) {
       this.fxaBadge = badgeStatus;
     } else {
       Cu.reportError("The badge ID '" + badgeId + "' is unknown!");
     }
     this._showBadge();
   },
 
-  addBadge: function(badgeId, badgeStatus) {
+  addBadge(badgeId, badgeStatus) {
     if (!badgeStatus) {
       Cu.reportError("badgeStatus must be defined");
       return;
     }
     this._changeBadge(badgeId, badgeStatus);
   },
 
-  removeBadge: function(badgeId) {
+  removeBadge(badgeId) {
     this._changeBadge(badgeId);
   },
 
-  clearBadges: function() {
+  clearBadges() {
     this.appUpdateBadge = null;
     this.downloadBadge = null;
     this.fxaBadge = null;
     this._showBadge();
   }
 };
 
 // Setup the hamburger button badges for updates, if enabled.
 var gMenuButtonUpdateBadge = {
   enabled: false,
   badgeWaitTime: 0,
   timer: null,
   cancelObserverRegistered: false,
 
-  init: function() {
+  init() {
     try {
       this.enabled = Services.prefs.getBoolPref("app.update.badge");
     } catch (e) {}
     if (this.enabled) {
       try {
         this.badgeWaitTime = Services.prefs.getIntPref("app.update.badgeWaitTime");
       } catch (e) {
         this.badgeWaitTime = 345600; // 4 days
       }
       Services.obs.addObserver(this, "update-staged", false);
       Services.obs.addObserver(this, "update-downloaded", false);
     }
   },
 
-  uninit: function() {
+  uninit() {
     if (this.timer)
       this.timer.cancel();
     if (this.enabled) {
       Services.obs.removeObserver(this, "update-staged");
       Services.obs.removeObserver(this, "update-downloaded");
       this.enabled = false;
     }
     if (this.cancelObserverRegistered) {
       Services.obs.removeObserver(this, "update-canceled");
       this.cancelObserverRegistered = false;
     }
   },
 
-  onMenuPanelCommand: function(event) {
+  onMenuPanelCommand(event) {
     if (event.originalTarget.getAttribute("update-status") === "succeeded") {
       // restart the app
       let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"]
                        .createInstance(Ci.nsISupportsPRBool);
       Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
 
       if (!cancelQuit.data) {
         Services.startup.quit(Services.startup.eAttemptQuit | Services.startup.eRestart);
       }
     } else {
       // open the page for manual update
       let url = Services.urlFormatter.formatURLPref("app.update.url.manual");
       openUILinkIn(url, "tab");
     }
   },
 
-  observe: function(subject, topic, status) {
+  observe(subject, topic, status) {
     if (topic == "update-canceled") {
       this.reset();
       return;
     }
     if (status == "failed") {
       // Background update has failed, let's show the UI responsible for
       // prompting the user to update manually.
       this.uninit();
@@ -2741,25 +2741,25 @@ var gMenuButtonUpdateBadge = {
 
     // Give the user badgeWaitTime seconds to react before prompting.
     this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     this.timer.initWithCallback(this, this.badgeWaitTime * 1000,
                                 this.timer.TYPE_ONE_SHOT);
     // The timer callback will call uninit() when it completes.
   },
 
-  notify: function() {
+  notify() {
     // If the update is successfully applied, or if the updater has fallen back
     // to non-staged updates, add a badge to the hamburger menu to indicate an
     // update will be applied once the browser restarts.
     this.uninit();
     this.displayBadge(true);
   },
 
-  displayBadge: function(succeeded) {
+  displayBadge(succeeded) {
     let status = succeeded ? "succeeded" : "failed";
     let badgeStatus = "update-" + status;
     gMenuButtonBadgeManager.addBadge(gMenuButtonBadgeManager.BADGEID_APPUPDATE, badgeStatus);
 
     let stringId;
     let updateButtonText;
     if (succeeded) {
       let brandBundle = document.getElementById("bundle_brand");
@@ -2775,17 +2775,17 @@ var gMenuButtonUpdateBadge = {
     }
 
     let updateButton = document.getElementById("PanelUI-update-status");
     updateButton.setAttribute("label", updateButtonText);
     updateButton.setAttribute("update-status", status);
     updateButton.hidden = false;
   },
 
-  reset: function() {
+  reset() {
     gMenuButtonBadgeManager.removeBadge(
       gMenuButtonBadgeManager.BADGEID_APPUPDATE);
     let updateButton = document.getElementById("PanelUI-update-status");
     updateButton.hidden = true;
     this.uninit();
     this.init();
   }
 };
@@ -2803,61 +2803,61 @@ const PREF_SSL_IMPACT = PREF_SSL_IMPACT_
 }, []);
 
 /**
  * Handle command events bubbling up from error page content
  * or from about:newtab or from remote error pages that invoke
  * us via async messaging.
  */
 var BrowserOnClick = {
-  init: function() {
+  init() {
     let mm = window.messageManager;
     mm.addMessageListener("Browser:CertExceptionError", this);
     mm.addMessageListener("Browser:OpenCaptivePortalPage", this);
     mm.addMessageListener("Browser:SiteBlockedError", this);
     mm.addMessageListener("Browser:EnableOnlineMode", this);
     mm.addMessageListener("Browser:SendSSLErrorReport", this);
     mm.addMessageListener("Browser:SetSSLErrorReportAuto", this);
     mm.addMessageListener("Browser:ResetSSLPreferences", this);
     mm.addMessageListener("Browser:SSLErrorReportTelemetry", this);
     mm.addMessageListener("Browser:OverrideWeakCrypto", this);
     mm.addMessageListener("Browser:SSLErrorGoBack", this);
 
     Services.obs.addObserver(this, "captive-portal-login-abort", false);
     Services.obs.addObserver(this, "captive-portal-login-success", false);
   },
 
-  uninit: function() {
+  uninit() {
     let mm = window.messageManager;
     mm.removeMessageListener("Browser:CertExceptionError", this);
     mm.removeMessageListener("Browser:SiteBlockedError", this);
     mm.removeMessageListener("Browser:EnableOnlineMode", this);
     mm.removeMessageListener("Browser:SendSSLErrorReport", this);
     mm.removeMessageListener("Browser:SetSSLErrorReportAuto", this);
     mm.removeMessageListener("Browser:ResetSSLPreferences", this);
     mm.removeMessageListener("Browser:SSLErrorReportTelemetry", this);
     mm.removeMessageListener("Browser:OverrideWeakCrypto", this);
     mm.removeMessageListener("Browser:SSLErrorGoBack", this);
 
     Services.obs.removeObserver(this, "captive-portal-login-abort");
     Services.obs.removeObserver(this, "captive-portal-login-success");
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "captive-portal-login-abort":
       case "captive-portal-login-success":
         // Broadcast when a captive portal is freed so that error pages
         // can refresh themselves.
         window.messageManager.broadcastAsyncMessage("Browser:CaptivePortalFreed");
       break;
     }
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (!event.isTrusted || // Don't trust synthetic events
         event.button == 2) {
       return;
     }
 
     let originalTarget = event.originalTarget;
     let ownerDoc = originalTarget.ownerDocument;
     if (!ownerDoc) {
@@ -2865,17 +2865,17 @@ var BrowserOnClick = {
     }
 
     if (gMultiProcessBrowser &&
         ownerDoc.documentURI.toLowerCase() == "about:newtab") {
       this.onE10sAboutNewTab(event, ownerDoc);
     }
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "Browser:CertExceptionError":
         this.onCertError(msg.target, msg.data.elementId,
                          msg.data.isTopFrame, msg.data.location,
                          msg.data.securityInfoAsString);
       break;
       case "Browser:OpenCaptivePortalPage":
         this.onOpenCaptivePortalPage();
@@ -2923,48 +2923,48 @@ var BrowserOnClick = {
           PrivateBrowsingUtils.isBrowserPrivate(gBrowser.selectedBrowser));
       break;
       case "Browser:SSLErrorGoBack":
         goBackFromErrorPage();
       break;
     }
   },
 
-  onSSLErrorReport: function(browser, uri, securityInfo) {
+  onSSLErrorReport(browser, uri, securityInfo) {
     if (!Services.prefs.getBoolPref("security.ssl.errorReporting.enabled")) {
       Cu.reportError("User requested certificate error report sending, but certificate error reporting is disabled");
       return;
     }
 
     let serhelper = Cc["@mozilla.org/network/serialization-helper;1"]
                            .getService(Ci.nsISerializationHelper);
     let transportSecurityInfo = serhelper.deserializeObject(securityInfo);
     transportSecurityInfo.QueryInterface(Ci.nsITransportSecurityInfo)
 
     let errorReporter = Cc["@mozilla.org/securityreporter;1"]
                           .getService(Ci.nsISecurityReporter);
     errorReporter.reportTLSError(transportSecurityInfo,
                                  uri.host, uri.port);
   },
 
-  onCertError: function(browser, elementId, isTopFrame, location, securityInfoAsString) {
+  onCertError(browser, elementId, isTopFrame, location, securityInfoAsString) {
     let secHistogram = Services.telemetry.getHistogramById("SECURITY_UI");
     let securityInfo;
 
     switch (elementId) {
       case "exceptionDialogButton":
         if (isTopFrame) {
           secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_BAD_CERT_TOP_CLICK_ADD_EXCEPTION);
         }
 
         securityInfo = getSecurityInfo(securityInfoAsString);
         let sslStatus = securityInfo.QueryInterface(Ci.nsISSLStatusProvider)
                                     .SSLStatus;
         let params = { exceptionAdded : false,
-                       sslStatus : sslStatus };
+                       sslStatus };
 
         try {
           switch (Services.prefs.getIntPref("browser.ssl_override_behavior")) {
             case 2 : // Pre-fetch & pre-populate
               params.prefetchCert = true;
             case 1 : // Pre-populate
               params.location = location;
           }
@@ -3009,17 +3009,17 @@ var BrowserOnClick = {
         let detailedInfo = getDetailedCertErrorInfo(location,
                                                     securityInfo);
         gClipboardHelper.copyString(detailedInfo);
         break;
 
     }
   },
 
-  onOpenCaptivePortalPage: function() {
+  onOpenCaptivePortalPage() {
     // Open a new tab with the canonical URL that we use to check for a captive portal.
     // It will be redirected to the login page.
     let canonicalURL = Services.prefs.getCharPref("captivedetect.canonicalURL");
     let tab = gBrowser.addTab(canonicalURL);
     let canonicalURI = makeURI(canonicalURL);
     gBrowser.selectedTab = tab;
 
     // When we are no longer captive, close the tab if it's at the canonical URL.
@@ -3031,17 +3031,17 @@ var BrowserOnClick = {
         return;
       }
       gBrowser.removeTab(tab);
     }
     Services.obs.addObserver(tabCloser, "captive-portal-login-abort", false);
     Services.obs.addObserver(tabCloser, "captive-portal-login-success", false);
   },
 
-  onAboutBlocked: function(elementId, reason, isTopFrame, location) {
+  onAboutBlocked(elementId, reason, isTopFrame, location) {
     // Depending on what page we are displaying here (malware/phishing/unwanted)
     // use the right strings and links for each.
     let bucketName = "";
     let sendTelemetry = false;
     if (reason === 'malware') {
       sendTelemetry = true;
       bucketName = "WARNING_MALWARE_PAGE_";
     } else if (reason === 'phishing') {
@@ -3086,66 +3086,66 @@ var BrowserOnClick = {
   },
 
   /**
    * This functions prevents navigation from happening directly through the <a>
    * link in about:newtab (which is loaded in the parent and therefore would load
    * the next page also in the parent) and instructs the browser to open the url
    * in the current tab which will make it update the remoteness of the tab.
    */
-  onE10sAboutNewTab: function(event, ownerDoc) {
+  onE10sAboutNewTab(event, ownerDoc) {
     let isTopFrame = (ownerDoc.defaultView.parent === ownerDoc.defaultView);
     if (!isTopFrame) {
       return;
     }
 
     let anchorTarget = event.originalTarget.parentNode;
 
     if (anchorTarget instanceof HTMLAnchorElement &&
         anchorTarget.classList.contains("newtab-link")) {
       event.preventDefault();
       let where = whereToOpenLink(event, false, false);
       openLinkIn(anchorTarget.href, where, { charset: ownerDoc.characterSet, referrerURI: ownerDoc.documentURIObject });
     }
   },
 
-  ignoreWarningButton: function(reason) {
+  ignoreWarningButton(reason) {
     // Allow users to override and continue through to the site,
     // but add a notify bar as a reminder, so that they don't lose
     // track after, e.g., tab switching.
     gBrowser.loadURIWithFlags(gBrowser.currentURI.spec,
                               nsIWebNavigation.LOAD_FLAGS_BYPASS_CLASSIFIER,
                               null, null, null);
 
     Services.perms.add(gBrowser.currentURI, "safe-browsing",
                        Ci.nsIPermissionManager.ALLOW_ACTION,
                        Ci.nsIPermissionManager.EXPIRE_SESSION);
 
     let buttons = [{
       label: gNavigatorBundle.getString("safebrowsing.getMeOutOfHereButton.label"),
       accessKey: gNavigatorBundle.getString("safebrowsing.getMeOutOfHereButton.accessKey"),
-      callback: function() { getMeOutOfHere(); }
+      callback() { getMeOutOfHere(); }
     }];
 
     let title;
     if (reason === 'malware') {
       title = gNavigatorBundle.getString("safebrowsing.reportedAttackSite");
       buttons[1] = {
         label: gNavigatorBundle.getString("safebrowsing.notAnAttackButton.label"),
         accessKey: gNavigatorBundle.getString("safebrowsing.notAnAttackButton.accessKey"),
-        callback: function() {
+        callback() {
           openUILinkIn(gSafeBrowsing.getReportURL('MalwareMistake'), 'tab');
         }
       };
     } else if (reason === 'phishing') {
       title = gNavigatorBundle.getString("safebrowsing.deceptiveSite");
       buttons[1] = {
         label: gNavigatorBundle.getString("safebrowsing.notADeceptiveSiteButton.label"),
         accessKey: gNavigatorBundle.getString("safebrowsing.notADeceptiveSiteButton.accessKey"),
-        callback: function() {
+        callback() {
           openUILinkIn(gSafeBrowsing.getReportURL('PhishMistake'), 'tab');
         }
       };
     } else if (reason === 'unwanted') {
       title = gNavigatorBundle.getString("safebrowsing.reportedUnwantedSite");
       // There is no button for reporting errors since Google doesn't currently
       // provide a URL endpoint for these reports.
     }
@@ -3369,78 +3369,78 @@ function getPEMString(cert)
          + "\r\n-----END CERTIFICATE-----\r\n";
 }
 
 var PrintPreviewListener = {
   _printPreviewTab: null,
   _tabBeforePrintPreview: null,
   _simplifyPageTab: null,
 
-  getPrintPreviewBrowser: function() {
+  getPrintPreviewBrowser() {
     if (!this._printPreviewTab) {
       let browser = gBrowser.selectedTab.linkedBrowser;
       let preferredRemoteType = browser.remoteType;
       this._tabBeforePrintPreview = gBrowser.selectedTab;
       this._printPreviewTab = gBrowser.loadOneTab("about:blank",
                                                   { inBackground: false,
                                                     preferredRemoteType,
                                                     relatedBrowser: browser });
       gBrowser.selectedTab = this._printPreviewTab;
     }
     return gBrowser.getBrowserForTab(this._printPreviewTab);
   },
-  createSimplifiedBrowser: function() {
+  createSimplifiedBrowser() {
     this._simplifyPageTab = gBrowser.loadOneTab("about:blank",
                                                 { inBackground: true });
     return this.getSimplifiedSourceBrowser();
   },
-  getSourceBrowser: function() {
+  getSourceBrowser() {
     return this._tabBeforePrintPreview ?
       this._tabBeforePrintPreview.linkedBrowser : gBrowser.selectedBrowser;
   },
-  getSimplifiedSourceBrowser: function() {
+  getSimplifiedSourceBrowser() {
     return this._simplifyPageTab ?
       gBrowser.getBrowserForTab(this._simplifyPageTab) : null;
   },
-  getNavToolbox: function() {
+  getNavToolbox() {
     return gNavToolbox;
   },
-  onEnter: function() {
+  onEnter() {
     // We might have accidentally switched tabs since the user invoked print
     // preview
     if (gBrowser.selectedTab != this._printPreviewTab) {
       gBrowser.selectedTab = this._printPreviewTab;
     }
     gInPrintPreviewMode = true;
     this._toggleAffectedChrome();
   },
-  onExit: function() {
+  onExit() {
     gBrowser.selectedTab = this._tabBeforePrintPreview;
     this._tabBeforePrintPreview = null;
     gInPrintPreviewMode = false;
     this._toggleAffectedChrome();
     if (this._simplifyPageTab) {
       gBrowser.removeTab(this._simplifyPageTab);
       this._simplifyPageTab = null;
     }
     gBrowser.removeTab(this._printPreviewTab);
     gBrowser.deactivatePrintPreviewBrowsers();
     this._printPreviewTab = null;
   },
-  _toggleAffectedChrome: function() {
+  _toggleAffectedChrome() {
     gNavToolbox.collapsed = gInPrintPreviewMode;
 
     if (gInPrintPreviewMode)
       this._hideChrome();
     else
       this._showChrome();
 
     TabsInTitlebar.allowedBy("print-preview", !gInPrintPreviewMode);
   },
-  _hideChrome: function() {
+  _hideChrome() {
     this._chromeState = {};
 
     this._chromeState.sidebarOpen = SidebarUI.isOpen;
     this._sidebarCommand = SidebarUI.currentID;
     SidebarUI.hide();
 
     var notificationBox = gBrowser.getNotificationBox();
     this._chromeState.notificationsOpen = !notificationBox.notificationsHidden;
@@ -3458,17 +3458,17 @@ var PrintPreviewListener = {
 
     this._chromeState.syncNotificationsOpen = false;
     var syncNotifications = document.getElementById("sync-notifications");
     if (syncNotifications) {
       this._chromeState.syncNotificationsOpen = !syncNotifications.notificationsHidden;
       syncNotifications.notificationsHidden = true;
     }
   },
-  _showChrome: function() {
+  _showChrome() {
     if (this._chromeState.notificationsOpen)
       gBrowser.getNotificationBox().notificationsHidden = false;
 
     if (this._chromeState.findOpen)
       gFindBar.open();
 
     if (this._chromeState.globalNotificationsOpen)
       document.getElementById("global-notificationbox").notificationsHidden = false;
@@ -3494,47 +3494,47 @@ function getMarkupDocumentViewer()
 function FillInHTMLTooltip(tipElement)
 {
   document.getElementById("aHTMLTooltip").fillInPageTooltip(tipElement);
 }
 
 var browserDragAndDrop = {
   canDropLink: aEvent => Services.droppedLinkHandler.canDropLink(aEvent, true),
 
-  dragOver: function(aEvent)
+  dragOver(aEvent)
   {
     if (this.canDropLink(aEvent)) {
       aEvent.preventDefault();
     }
   },
 
-  dropLinks: function(aEvent, aDisallowInherit) {
+  dropLinks(aEvent, aDisallowInherit) {
     return Services.droppedLinkHandler.dropLinks(aEvent, aDisallowInherit);
   }
 };
 
 var homeButtonObserver = {
-  onDrop: function(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: function(aEvent)
+  onDragOver(aEvent)
     {
       if (gPrefService.prefIsLocked("browser.startup.homepage")) {
         return;
       }
       browserDragAndDrop.dragOver(aEvent);
       aEvent.dropEffect = "link";
     },
-  onDragExit: function(aEvent)
+  onDragExit(aEvent)
     {
     }
 }
 
 function openHomeDialog(aURL)
 {
   var promptTitle = gNavigatorBundle.getString("droponhometitle");
   var promptMsg;
@@ -3591,63 +3591,63 @@ var newWindowButtonObserver = {
         // Allow third-party services to fixup this URL.
         openNewWindowWith(data.url, null, data.postData, true);
       }
     }
   })
 }
 
 const DOMLinkHandler = {
-  init: function() {
+  init() {
     let mm = window.messageManager;
     mm.addMessageListener("Link:AddFeed", this);
     mm.addMessageListener("Link:SetIcon", this);
     mm.addMessageListener("Link:AddSearch", this);
   },
 
-  receiveMessage: function(aMsg) {
+  receiveMessage(aMsg) {
     switch (aMsg.name) {
       case "Link:AddFeed":
         let link = {type: aMsg.data.type, href: aMsg.data.href, title: aMsg.data.title};
         FeedHandler.addFeed(link, aMsg.target);
         break;
 
       case "Link:SetIcon":
         this.setIcon(aMsg.target, aMsg.data.url, aMsg.data.loadingPrincipal);
         break;
 
       case "Link:AddSearch":
         this.addSearch(aMsg.target, aMsg.data.engine, aMsg.data.url);
         break;
     }
   },
 
-  setIcon: function(aBrowser, aURL, aLoadingPrincipal) {
+  setIcon(aBrowser, aURL, aLoadingPrincipal) {
     if (gBrowser.isFailedIcon(aURL))
       return false;
 
     let tab = gBrowser.getTabForBrowser(aBrowser);
     if (!tab)
       return false;
 
     gBrowser.setIcon(tab, aURL, aLoadingPrincipal);
     return true;
   },
 
-  addSearch: function(aBrowser, aEngine, aURL) {
+  addSearch(aBrowser, aEngine, aURL) {
     let tab = gBrowser.getTabForBrowser(aBrowser);
     if (!tab)
       return;
 
     BrowserSearch.addEngine(aBrowser, aEngine, makeURI(aURL));
   },
 }
 
 const BrowserSearch = {
-  addEngine: function(browser, engine, uri) {
+  addEngine(browser, engine, uri) {
     // Check to see whether we've already added an engine with this title
     if (browser.engines) {
       if (browser.engines.some(e => e.title == engine.title))
         return;
     }
 
     var hidden = false;
     // If this engine (identified by title) is already in the list, add it
@@ -3673,17 +3673,17 @@ const BrowserSearch = {
     }
   },
 
   /**
    * Update the browser UI to show whether or not additional engines are
    * available when a page is loaded or the user switches tabs to a page that
    * has search engines.
    */
-  updateOpenSearchBadge: function() {
+  updateOpenSearchBadge() {
     var searchBar = this.searchBar;
     if (!searchBar)
       return;
 
     var engines = gBrowser.selectedBrowser.engines;
     if (engines && engines.length > 0)
       searchBar.setAttribute("addengines", "true");
     else
@@ -3765,17 +3765,17 @@ const BrowserSearch = {
    * @param purpose [optional]
    *        A string meant to indicate the context of the search request. This
    *        allows the search service to provide a different nsISearchSubmission
    *        depending on e.g. where the search is triggered in the UI.
    *
    * @return engine The search engine used to perform a search, or null if no
    *                search was performed.
    */
-  _loadSearch: function(searchText, useNewTab, purpose) {
+  _loadSearch(searchText, useNewTab, purpose) {
     let engine;
 
     // If the search bar is visible, use the current engine, otherwise, fall
     // back to the default engine.
     if (isElementVisible(this.searchBar))
       engine = Services.search.currentEngine;
     else
       engine = Services.search.defaultEngine;
@@ -3789,17 +3789,17 @@ const BrowserSearch = {
     if (!submission) {
       return null;
     }
 
     let inBackground = Services.prefs.getBoolPref("browser.search.context.loadInBackground");
     openLinkIn(submission.uri.spec,
                useNewTab ? "tab" : "current",
                { postData: submission.postData,
-                 inBackground: inBackground,
+                 inBackground,
                  relatedToCurrent: true });
 
     return engine;
   },
 
   /**
    * Just like _loadSearch, but preserving an old API.
    *
@@ -3815,24 +3815,24 @@ const BrowserSearch = {
   },
 
   /**
    * Perform a search initiated from the context menu.
    *
    * This should only be called from the context menu. See
    * BrowserSearch.loadSearch for the preferred API.
    */
-  loadSearchFromContext: function(terms) {
+  loadSearchFromContext(terms) {
     let engine = BrowserSearch._loadSearch(terms, true, "contextmenu");
     if (engine) {
       BrowserSearch.recordSearchInTelemetry(engine, "contextmenu");
     }
   },
 
-  pasteAndSearch: function(event) {
+  pasteAndSearch(event) {
     BrowserSearch.searchBar.select();
     goDoCommand("cmd_paste");
     BrowserSearch.searchBar.handleSearchCommand(event);
   },
 
   /**
    * Returns the search bar element if it is present in the toolbar, null otherwise.
    */
@@ -3845,17 +3845,17 @@ const BrowserSearch = {
   },
 
   loadAddEngines: function BrowserSearch_loadAddEngines() {
     var newWindowPref = gPrefService.getIntPref("browser.link.open_newwindow");
     var where = newWindowPref == 3 ? "tab" : "window";
     openUILinkIn(this.searchEnginesURL, where);
   },
 
-  _getSearchEngineId: function(engine) {
+  _getSearchEngineId(engine) {
     if (engine && engine.identifier) {
       return engine.identifier;
     }
 
     if (!engine || (engine.name === undefined) ||
         !Services.prefs.getBoolPref("toolkit.telemetry.enabled"))
       return "other";
 
@@ -3874,17 +3874,17 @@ const BrowserSearch = {
    *        allowed values.
    * @param details [optional]
    *        An optional parameter passed to |BrowserUsageTelemetry.recordSearch|.
    *        See its documentation for allowed options.
    *        Additionally, if the search was a suggested search, |details.selection|
    *        indicates where the item was in the suggestion list and how the user
    *        selected it: {selection: {index: The selected index, kind: "key" or "mouse"}}
    */
-  recordSearchInTelemetry: function(engine, source, details = {}) {
+  recordSearchInTelemetry(engine, source, details = {}) {
     BrowserUITelemetry.countSearchEvent(source, null, details.selection);
     try {
       BrowserUsageTelemetry.recordSearch(engine, source, details);
     } catch (ex) {
       Cu.reportError(ex);
     }
   },
 
@@ -3898,17 +3898,17 @@ const BrowserSearch = {
    * @param source
    *        (string) Where the search originated from. See BrowserUsageTelemetry for
    *        allowed values.
    * @param type
    *        (string) Indicates how the user selected the search item.
    * @param where
    *        (string) Where was the search link opened (e.g. new tab, current tab, ..).
    */
-  recordOneoffSearchInTelemetry: function(engine, source, type, where) {
+  recordOneoffSearchInTelemetry(engine, source, type, where) {
     let id = this._getSearchEngineId(engine) + "." + source;
     BrowserUITelemetry.countOneoffSearchEvent(id, type, where);
     try {
       const details = {type, isOneOff: true};
       BrowserUsageTelemetry.recordSearch(engine, source, details);
     } catch (ex) {
       Cu.reportError(ex);
     }
@@ -4290,17 +4290,17 @@ var XULBrowserWindow = {
   defaultStatus: "",
   overLink: "",
   startTime: 0,
   statusText: "",
   isBusy: false,
   // Left here for add-on compatibility, see bug 752434
   inContentWhitelist: [],
 
-  QueryInterface: function(aIID) {
+  QueryInterface(aIID) {
     if (aIID.equals(Ci.nsIWebProgressListener) ||
         aIID.equals(Ci.nsIWebProgressListener2) ||
         aIID.equals(Ci.nsISupportsWeakReference) ||
         aIID.equals(Ci.nsIXULBrowserWindow) ||
         aIID.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_NOINTERFACE;
   },
@@ -4320,82 +4320,82 @@ var XULBrowserWindow = {
     delete this.isImage;
     return this.isImage = document.getElementById("isImage");
   },
   get canViewSource() {
     delete this.canViewSource;
     return this.canViewSource = document.getElementById("canViewSource");
   },
 
-  init: function() {
+  init() {
     // Initialize the security button's state and tooltip text.
     var securityUI = gBrowser.securityUI;
     this.onSecurityChange(null, null, securityUI.state, true);
   },
 
-  setJSStatus: function() {
+  setJSStatus() {
     // unsupported
   },
 
-  forceInitialBrowserRemote: function(aRemoteType) {
+  forceInitialBrowserRemote(aRemoteType) {
     let initBrowser =
       document.getAnonymousElementByAttribute(gBrowser, "anonid", "initialBrowser");
     gBrowser.updateBrowserRemoteness(initBrowser, true, { remoteType: aRemoteType });
   },
 
-  forceInitialBrowserNonRemote: function(aOpener) {
+  forceInitialBrowserNonRemote(aOpener) {
     let initBrowser =
       document.getAnonymousElementByAttribute(gBrowser, "anonid", "initialBrowser");
     gBrowser.updateBrowserRemoteness(initBrowser, false, { opener: aOpener });
   },
 
-  setDefaultStatus: function(status) {
+  setDefaultStatus(status) {
     this.defaultStatus = status;
     this.updateStatusField();
   },
 
-  setOverLink: function(url, anchorElt) {
+  setOverLink(url, anchorElt) {
     // Encode bidirectional formatting characters.
     // (RFC 3987 sections 3.2 and 4.1 paragraph 6)
     url = url.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
                       encodeURIComponent);
 
     if (gURLBar && gURLBar._mayTrimURLs /* corresponds to browser.urlbar.trimURLs */)
       url = trimURL(url);
 
     this.overLink = url;
     LinkTargetDisplay.update();
   },
 
-  showTooltip: function(x, y, tooltip, direction) {
+  showTooltip(x, y, tooltip, direction) {
     if (Cc["@mozilla.org/widget/dragservice;1"].getService(Ci.nsIDragService).
         getCurrentSession()) {
       return;
     }
 
     // The x,y coordinates are relative to the <browser> element using
     // the chrome zoom level.
     let elt = document.getElementById("remoteBrowserTooltip");
     elt.label = tooltip;
     elt.style.direction = direction;
 
     let anchor = gBrowser.selectedBrowser;
     elt.openPopupAtScreen(anchor.boxObject.screenX + x, anchor.boxObject.screenY + y, false, null);
   },
 
-  hideTooltip: function() {
+  hideTooltip() {
     let elt = document.getElementById("remoteBrowserTooltip");
     elt.hidePopup();
   },
 
-  getTabCount: function() {
+  getTabCount() {
     return gBrowser.tabs.length;
   },
 
-  updateStatusField: function() {
+  updateStatusField() {
     var text, type, types = ["overLink"];
     if (this._busyUI)
       types.push("status");
     types.push("defaultStatus");
     for (type of types) {
       text = this[type];
       if (text)
         break;
@@ -4409,24 +4409,24 @@ var XULBrowserWindow = {
       field.setAttribute("type", type);
       field.label = text;
       field.setAttribute("crop", type == "overLink" ? "center" : "end");
       this.statusText = text;
     }
   },
 
   // Called before links are navigated to to allow us to retarget them if needed.
-  onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) {
+  onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab) {
     let target = BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab);
     SocialUI.closeSocialPanelForLinkTraversal(target, linkNode);
     return target;
   },
 
   // Check whether this URI should load in the current process
-  shouldLoadURI: function(aDocShell, aURI, aReferrer) {
+  shouldLoadURI(aDocShell, aURI, aReferrer) {
     if (!gMultiProcessBrowser)
       return true;
 
     let browser = aDocShell.QueryInterface(Ci.nsIDocShellTreeItem)
                            .sameTypeRootTreeItem
                            .QueryInterface(Ci.nsIDocShell)
                            .chromeEventHandler;
 
@@ -4437,32 +4437,32 @@ var XULBrowserWindow = {
     if (!E10SUtils.shouldLoadURI(aDocShell, aURI, aReferrer)) {
       E10SUtils.redirectLoad(aDocShell, aURI, aReferrer);
       return false;
     }
 
     return true;
   },
 
-  onProgressChange: function(aWebProgress, aRequest,
+  onProgressChange(aWebProgress, aRequest,
                              aCurSelfProgress, aMaxSelfProgress,
                              aCurTotalProgress, aMaxTotalProgress) {
     // Do nothing.
   },
 
-  onProgressChange64: function(aWebProgress, aRequest,
+  onProgressChange64(aWebProgress, aRequest,
                                aCurSelfProgress, aMaxSelfProgress,
                                aCurTotalProgress, aMaxTotalProgress) {
     return this.onProgressChange(aWebProgress, aRequest,
       aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress,
       aMaxTotalProgress);
   },
 
   // This function fires only for the currently selected tab.
-  onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
     const nsIWebProgressListener = Ci.nsIWebProgressListener;
     const nsIChannel = Ci.nsIChannel;
 
     let browser = gBrowser.selectedBrowser;
 
     if (aStateFlags & nsIWebProgressListener.STATE_START &&
         aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
 
@@ -4536,17 +4536,17 @@ var XULBrowserWindow = {
         this._busyUI = false;
 
         this.stopCommand.setAttribute("disabled", "true");
         CombinedStopReload.switchToReload(aRequest instanceof Ci.nsIRequest);
       }
     }
   },
 
-  onLocationChange: function(aWebProgress, aRequest, aLocationURI, aFlags) {
+  onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) {
     var location = aLocationURI ? aLocationURI.spec : "";
 
     // If displayed, hide the form validation popup.
     FormValidationHandler.hidePopup();
 
     let pageTooltip = document.getElementById("aHTMLTooltip");
     let tooltipNode = pageTooltip.triggerNode;
     if (tooltipNode) {
@@ -4680,40 +4680,40 @@ var XULBrowserWindow = {
         // Don't make noise when the crash reporter is built but not enabled.
         if (ex.result != Components.results.NS_ERROR_NOT_INITIALIZED) {
           throw ex;
         }
       }
     }
   },
 
-  asyncUpdateUI: function() {
+  asyncUpdateUI() {
     FeedHandler.updateFeeds();
     BrowserSearch.updateOpenSearchBadge();
   },
 
   // Left here for add-on compatibility, see bug 752434
-  hideChromeForLocation: function() {},
-
-  onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {
+  hideChromeForLocation() {},
+
+  onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
     this.status = aMessage;
     this.updateStatusField();
   },
 
   // Properties used to cache security state used to update the UI
   _state: null,
   _lastLocation: null,
 
   // This is called in multiple ways:
   //  1. Due to the nsIWebProgressListener.onSecurityChange notification.
   //  2. Called by tabbrowser.xml when updating the current browser.
   //  3. Called directly during this object's initializations.
   // aRequest will be null always in case 2 and 3, and sometimes in case 1 (for
   // instance, there won't be a request when STATE_BLOCKED_TRACKING_CONTENT is observed).
-  onSecurityChange: function(aWebProgress, aRequest, aState, aIsSimulated) {
+  onSecurityChange(aWebProgress, aRequest, aState, aIsSimulated) {
     // Don't need to do anything if the data we use to update the UI hasn't
     // changed
     let uri = gBrowser.currentURI;
     let spec = uri.spec;
     if (this._state == aState &&
         this._lastLocation == spec)
       return;
     this._state = aState;
@@ -4775,17 +4775,17 @@ var LinkTargetDisplay = {
 
   DELAY_HIDE: 250,
   _timer: 0,
 
   get _isVisible() {
     return XULBrowserWindow.statusTextField.label != "";
   },
 
-  update: function() {
+  update() {
     clearTimeout(this._timer);
     window.removeEventListener("mousemove", this, true);
 
     if (!XULBrowserWindow.overLink) {
       if (XULBrowserWindow.hideOverLinkImmediately)
         this._hide();
       else
         this._timer = setTimeout(this._hide.bind(this), this.DELAY_HIDE);
@@ -4796,85 +4796,85 @@ var LinkTargetDisplay = {
       XULBrowserWindow.updateStatusField();
     } else {
       // Let the display appear when the mouse doesn't move within the delay
       this._showDelayed();
       window.addEventListener("mousemove", this, true);
     }
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
       case "mousemove":
         // Restart the delay since the mouse was moved
         clearTimeout(this._timer);
         this._showDelayed();
         break;
     }
   },
 
-  _showDelayed: function() {
+  _showDelayed() {
     this._timer = setTimeout(function(self) {
       XULBrowserWindow.updateStatusField();
       window.removeEventListener("mousemove", self, true);
     }, this.DELAY_SHOW, this);
   },
 
-  _hide: function() {
+  _hide() {
     clearTimeout(this._timer);
 
     XULBrowserWindow.updateStatusField();
   }
 };
 
 var CombinedStopReload = {
-  init: function() {
+  init() {
     if (this._initialized)
       return;
 
     let reload = document.getElementById("urlbar-reload-button");
     let stop = document.getElementById("urlbar-stop-button");
     if (!stop || !reload || reload.nextSibling != stop)
       return;
 
     this._initialized = true;
     if (XULBrowserWindow.stopCommand.getAttribute("disabled") != "true")
       reload.setAttribute("displaystop", "true");
     stop.addEventListener("click", this, false);
     this.reload = reload;
     this.stop = stop;
   },
 
-  uninit: function() {
+  uninit() {
     if (!this._initialized)
       return;
 
     this._cancelTransition();
     this._initialized = false;
     this.stop.removeEventListener("click", this, false);
     this.reload = null;
     this.stop = null;
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     // the only event we listen to is "click" on the stop button
     if (event.button == 0 &&
         !this.stop.disabled)
       this._stopClicked = true;
   },
 
-  switchToStop: function() {
+  switchToStop() {
     if (!this._initialized)
       return;
 
     this._cancelTransition();
     this.reload.setAttribute("displaystop", "true");
   },
 
-  switchToReload: function(aDelay) {
+  switchToReload(aDelay) {
     if (!this._initialized)
       return;
 
     this.reload.removeAttribute("displaystop");
 
     if (!aDelay || this._stopClicked) {
       this._stopClicked = false;
       this._cancelTransition();
@@ -4891,30 +4891,30 @@ var CombinedStopReload = {
     this.reload.disabled = true;
     this._timer = setTimeout(function(self) {
       self._timer = 0;
       self.reload.disabled = XULBrowserWindow.reloadCommand
                                              .getAttribute("disabled") == "true";
     }, 650, this);
   },
 
-  _cancelTransition: function() {
+  _cancelTransition() {
     if (this._timer) {
       clearTimeout(this._timer);
       this._timer = 0;
     }
   }
 };
 
 var TabsProgressListener = {
   // Keep track of which browsers we've started load timers for, since
   // we won't see STATE_START events for pre-rendered tabs.
   _startedLoadTimer: new WeakSet(),
 
-  onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     // Collect telemetry data about tab load times.
     if (aWebProgress.isTopLevel && (!aRequest.originalURI || aRequest.originalURI.spec.scheme != "about")) {
       if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) {
         if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) {
           this._startedLoadTimer.add(aBrowser);
           TelemetryStopwatch.start("FX_PAGE_LOAD_MS", aBrowser);
           Services.telemetry.getHistogramById("FX_TOTAL_TOP_VISITS").add(true);
         } else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
@@ -4958,17 +4958,17 @@ var TabsProgressListener = {
         aBrowser.removeEventListener("click", BrowserOnClick, true);
         aBrowser.removeEventListener("pagehide", onPageHide, true);
         if (event.target.documentElement)
           event.target.documentElement.removeAttribute("hasBrowserHandlers");
       }, true);
     }
   },
 
-  onLocationChange: function(aBrowser, aWebProgress, aRequest, aLocationURI,
+  onLocationChange(aBrowser, aWebProgress, aRequest, aLocationURI,
                              aFlags) {
     // Filter out location changes caused by anchor navigation
     // or history.push/pop/replaceState.
     if (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) {
       // Reader mode actually cares about these:
       let mm = gBrowser.selectedBrowser.messageManager;
       mm.sendAsyncMessage("Reader:PushState", {isArticle: gBrowser.selectedBrowser.isArticle});
       return;
@@ -4996,17 +4996,17 @@ var TabsProgressListener = {
   },
 }
 
 function nsBrowserAccess() { }
 
 nsBrowserAccess.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserDOMWindow, Ci.nsISupports]),
 
-  _openURIInNewTab: function(aURI, aReferrer, aReferrerPolicy, aIsPrivate,
+  _openURIInNewTab(aURI, aReferrer, aReferrerPolicy, aIsPrivate,
                              aIsExternal, aForceNotRemote = false,
                              aUserContextId = Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID,
                              aOpener = null) {
     let win, needToFocusWin;
 
     // try the current window.  if we're in a popup, fall back on the most recent browser window
     if (window.toolbar.visible)
       win = window;
@@ -5040,17 +5040,17 @@ nsBrowserAccess.prototype = {
     let browser = win.gBrowser.getBrowserForTab(tab);
 
     if (needToFocusWin || (!loadInBackground && aIsExternal))
       win.focus();
 
     return browser;
   },
 
-  openURI: function(aURI, aOpener, aWhere, aFlags) {
+  openURI(aURI, aOpener, aWhere, aFlags) {
     // This function should only ever be called if we're opening a URI
     // from a non-remote browser window (via nsContentTreeOwner).
     if (aOpener && Cu.isCrossProcessWrapper(aOpener)) {
       Cu.reportError("nsBrowserAccess.openURI was passed a CPOW for aOpener. " +
                      "openURI should only ever be called from non-remote browsers.");
       throw Cr.NS_ERROR_FAILURE;
     }
 
@@ -5121,17 +5121,17 @@ nsBrowserAccess.prototype = {
         newWindow = content;
         if (aURI) {
           let loadflags = isExternal ?
                             Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL :
                             Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
           gBrowser.loadURIWithFlags(aURI.spec, {
                                     flags: loadflags,
                                     referrerURI: referrer,
-                                    referrerPolicy: referrerPolicy,
+                                    referrerPolicy,
                                     });
         }
         if (!gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground"))
           window.focus();
     }
     return newWindow;
   },
 
@@ -5155,17 +5155,17 @@ nsBrowserAccess.prototype = {
                                         isExternal, false,
                                         userContextId);
     if (browser)
       return browser.QueryInterface(Ci.nsIFrameLoaderOwner);
 
     return null;
   },
 
-  isTabContentWindow: function(aWindow) {
+  isTabContentWindow(aWindow) {
     return gBrowser.browsers.some(browser => browser.contentWindow == aWindow);
   },
 
   canClose() {
     return CanCloseWindow();
   },
 }
 
@@ -5371,39 +5371,39 @@ var gTabletModePageCounter = {
 function displaySecurityInfo()
 {
   BrowserPageInfo(null, "securityTab");
 }
 
 
 var gHomeButton = {
   prefDomain: "browser.startup.homepage",
-  observe: function(aSubject, aTopic, aPrefName)
+  observe(aSubject, aTopic, aPrefName)
   {
     if (aTopic != "nsPref:changed" || aPrefName != this.prefDomain)
       return;
 
     this.updateTooltip();
   },
 
-  updateTooltip: function(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: function()
+  getHomePage()
   {
     var url;
     try {
       url = gPrefService.getComplexValue(this.prefDomain,
                                 Components.interfaces.nsIPrefLocalizedString).data;
     } catch (e) {
     }
 
@@ -5698,18 +5698,18 @@ function handleLinkClick(event, href, li
       referrerPolicy = referrerAttrValue;
     }
   }
 
   urlSecurityCheck(href, doc.nodePrincipal);
   let params = {
     charset: doc.characterSet,
     allowMixedContent: persistAllowMixedContentInChildTab,
-    referrerURI: referrerURI,
-    referrerPolicy: referrerPolicy,
+    referrerURI,
+    referrerPolicy,
     noReferrer: BrowserUtils.linkHasNoReferrer(linkNode),
     originPrincipal: doc.nodePrincipal,
   };
 
   // The new tab/window must use the same userContextId
   if (doc.nodePrincipal.originAttributes.userContextId) {
     params.userContextId = doc.nodePrincipal.originAttributes.userContextId;
   }
@@ -5879,17 +5879,17 @@ var gPageStyleMenu = {
   //   the current page.
   //
   // preferredStyleSheetSet (bool):
   //   Whether or not the user currently has the "Default" style selected
   //   for the current page.
   //
   _pageStyleSheets: new WeakMap(),
 
-  init: function() {
+  init() {
     let mm = window.messageManager;
     mm.addMessageListener("PageStyle:StyleSheets", (msg) => {
       this._pageStyleSheets.set(msg.target.permanentKey, msg.data);
     });
   },
 
   /**
    * Returns an array of Objects representing stylesheets in a
@@ -5899,42 +5899,42 @@ var gPageStyleMenu = {
    * @param browser (optional)
    *        The <xul:browser> to search for stylesheets. If omitted, this
    *        defaults to the currently selected tab's browser.
    * @returns Array
    *        An Array of Objects representing stylesheets in the browser.
    *        See the documentation for gPageStyleMenu for a description
    *        of the Object structure.
    */
-  getBrowserStyleSheets: function(browser) {
+  getBrowserStyleSheets(browser) {
     if (!browser) {
       browser = gBrowser.selectedBrowser;
     }
 
     let data = this._pageStyleSheets.get(browser.permanentKey);
     if (!data) {
       return [];
     }
     return data.filteredStyleSheets;
   },
 
-  _getStyleSheetInfo: function(browser) {
+  _getStyleSheetInfo(browser) {
     let data = this._pageStyleSheets.get(browser.permanentKey);
     if (!data) {
       return {
         filteredStyleSheets: [],
         authorStyleDisabled: false,
         preferredStyleSheetSet: true
       };
     }
 
     return data;
   },
 
-  fillPopup: function(menuPopup) {
+  fillPopup(menuPopup) {
     let styleSheetInfo = this._getStyleSheetInfo(gBrowser.selectedBrowser);
     var noStyle = menuPopup.firstChild;
     var persistentOnly = noStyle.nextSibling;
     var sep = persistentOnly.nextSibling;
     while (sep.nextSibling)
       menuPopup.removeChild(sep.nextSibling);
 
     let styleSheets = styleSheetInfo.filteredStyleSheets;
@@ -5968,22 +5968,22 @@ var gPageStyleMenu = {
     }
 
     noStyle.setAttribute("checked", styleDisabled);
     persistentOnly.setAttribute("checked", !altStyleSelected && !styleDisabled);
     persistentOnly.hidden = styleSheetInfo.preferredStyleSheetSet ? haveAltSheets : false;
     sep.hidden = (noStyle.hidden && persistentOnly.hidden) || !haveAltSheets;
   },
 
-  switchStyleSheet: function(title) {
+  switchStyleSheet(title) {
     let mm = gBrowser.selectedBrowser.messageManager;
-    mm.sendAsyncMessage("PageStyle:Switch", {title: title});
-  },
-
-  disableStyle: function() {
+    mm.sendAsyncMessage("PageStyle:Switch", {title});
+  },
+
+  disableStyle() {
     let mm = gBrowser.selectedBrowser.messageManager;
     mm.sendAsyncMessage("PageStyle:Disable");
   },
 };
 
 /* Legacy global page-style functions */
 var stylesheetFillPopup = gPageStyleMenu.fillPopup.bind(gPageStyleMenu);
 function stylesheetSwitchAll(contentWindow, title) {
@@ -5994,89 +5994,89 @@ function stylesheetSwitchAll(contentWind
 }
 function setStyleDisabled(disabled) {
   if (disabled)
     gPageStyleMenu.disableStyle();
 }
 
 
 var LanguageDetectionListener = {
-  init: function() {
+  init() {
     window.messageManager.addMessageListener("Translation:DocumentState", msg => {
       Translation.documentStateReceived(msg.target, msg.data);
     });
   }
 };
 
 
 var BrowserOffline = {
   _inited: false,
 
   // BrowserOffline Public Methods
-  init: function()
+  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: function()
+  uninit()
   {
     if (this._inited) {
       Services.obs.removeObserver(this, "network:offline-status-changed");
     }
   },
 
-  toggleOfflineStatus: function()
+  toggleOfflineStatus()
   {
     var ioService = Services.io;
 
     if (!ioService.offline && !this._canGoOffline()) {
       this._updateOfflineUI(false);
       return;
     }
 
     ioService.offline = !ioService.offline;
   },
 
   // nsIObserver
-  observe: function(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: function()
+  _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) {
     }
 
     return true;
   },
 
   _uiElement: null,
-  _updateOfflineUI: function(aOffline)
+  _updateOfflineUI(aOffline)
   {
     var offlineLocked = gPrefService.prefIsLocked("network.online");
     if (offlineLocked)
       this._uiElement.setAttribute("disabled", "true");
 
     this._uiElement.setAttribute("checked", aOffline);
   }
 };
@@ -6160,26 +6160,26 @@ var OfflineApps = {
     if (notification) {
       notification.options.controlledItems.push([
         Cu.getWeakReference(browser), docId, uri
       ]);
     } else {
       let mainAction = {
         label: gNavigatorBundle.getString("offlineApps.allowStoring.label"),
         accessKey: gNavigatorBundle.getString("offlineApps.allowStoring.accesskey"),
-        callback: function() {
+        callback() {
           for (let [ciBrowser, ciDocId, ciUri] of notification.options.controlledItems) {
             OfflineApps.allowSite(ciBrowser, ciDocId, ciUri);
           }
         }
       };
       let secondaryActions = [{
         label: gNavigatorBundle.getString("offlineApps.dontAllow.label"),
         accessKey: gNavigatorBundle.getString("offlineApps.dontAllow.accesskey"),
-        callback: function() {
+        callback() {
           for (let [, , ciUri] of notification.options.controlledItems) {
             OfflineApps.disallowSite(ciUri);
           }
         }
       }];
       let message = gNavigatorBundle.getFormattedString("offlineApps.available2",
                                                         [host]);
       let anchorID = "indexedDB-notification-icon";
@@ -6278,27 +6278,27 @@ var IndexedDBPromptHelper = {
       responseTopic = this._permissionsResponse;
     }
 
     var observer = requestor.getInterface(Ci.nsIObserver);
 
     var mainAction = {
       label: gNavigatorBundle.getString("offlineApps.allowStoring.label"),
       accessKey: gNavigatorBundle.getString("offlineApps.allowStoring.accesskey"),
-      callback: function() {
+      callback() {
         observer.observe(null, responseTopic,
                          Ci.nsIPermissionManager.ALLOW_ACTION);
       }
     };
 
     var secondaryActions = [
       {
         label: gNavigatorBundle.getString("offlineApps.dontAllow.label"),
         accessKey: gNavigatorBundle.getString("offlineApps.dontAllow.accesskey"),
-        callback: function() {
+        callback() {
           observer.observe(null, responseTopic,
                            Ci.nsIPermissionManager.DENY_ACTION);
         }
       }
     ];
 
     PopupNotifications.show(browser, topic, message,
                             this._notificationIcon, mainAction,
@@ -6409,38 +6409,38 @@ function warnAboutClosingWindow() {
   // OS X doesn't quit the application when the last window is closed, but keeps
   // the session alive. Hence don't prompt users to save tabs, but warn about
   // closing multiple tabs.
   return AppConstants.platform != "macosx"
          || (isPBWindow || gBrowser.warnAboutClosingTabs(gBrowser.closingTabsEnum.ALL));
 }
 
 var MailIntegration = {
-  sendLinkForBrowser: function(aBrowser) {
+  sendLinkForBrowser(aBrowser) {
     this.sendMessage(aBrowser.currentURI.spec, aBrowser.contentTitle);
   },
 
-  sendMessage: function(aBody, aSubject) {
+  sendMessage(aBody, aSubject) {
     // generate a mailto url based on the url and the url's title
     var mailtoUrl = "mailto:";
     if (aBody) {
       mailtoUrl += "?body=" + encodeURIComponent(aBody);
       mailtoUrl += "&subject=" + encodeURIComponent(aSubject);
     }
 
     var uri = makeURI(mailtoUrl);
 
     // now pass this uri to the operating system
     this._launchExternalUrl(uri);
   },
 
   // a generic method which can be used to pass arbitrary urls to the operating
   // system.
   // aURL --> a nsIURI which represents the url to launch
-  _launchExternalUrl: function(aURL) {
+  _launchExternalUrl(aURL) {
     var extProtocolSvc =
        Cc["@mozilla.org/uriloader/external-protocol-service;1"]
          .getService(Ci.nsIExternalProtocolService);
     if (extProtocolSvc)
       extProtocolSvc.loadUrl(aURL);
   }
 };
 
@@ -6499,17 +6499,17 @@ function AddKeywordForSearchField() {
     mm.removeMessageListener("ContextMenu:SearchFieldBookmarkData:Result", onMessage);
 
     let bookmarkData = message.data;
     let title = gNavigatorBundle.getFormattedString("addKeywordTitleAutoFill",
                                                     [bookmarkData.title]);
     PlacesUIUtils.showBookmarkDialog({ action: "add"
                                      , type: "bookmark"
                                      , uri: makeURI(bookmarkData.spec)
-                                     , title: title
+                                     , title
                                      , description: bookmarkData.description
                                      , keyword: ""
                                      , postData: bookmarkData.postData
                                      , charSet: bookmarkData.charset
                                      , hiddenRows: [ "location"
                                                    , "description"
                                                    , "tags"
                                                    , "loadInSidebar" ]
@@ -6835,17 +6835,17 @@ var gIdentityHandler = {
     }
     return this._permissionAnchors = permissionAnchors;
   },
 
   /**
    * Handler for mouseclicks on the "More Information" button in the
    * "identity-popup" panel.
    */
-  handleMoreInfoClick : function(event) {
+  handleMoreInfoClick(event) {
     displaySecurityInfo();
     event.stopPropagation();
     this._identityPopup.hidePopup();
   },
 
   toggleSubView(name, anchor) {
     let view = this._identityPopupMultiView;
     if (view.showingSubView) {
@@ -6893,17 +6893,17 @@ var gIdentityHandler = {
     BrowserReloadSkipCache();
     this._identityPopup.hidePopup();
   },
 
   /**
    * Helper to parse out the important parts of _sslStatus (of the SSL cert in
    * particular) for use in constructing identity UI strings
   */
-  getIdentityData : function() {
+  getIdentityData() {
     var result = {};
     var cert = this._sslStatus.serverCert;
 
     // Human readable name of Subject
     result.subjectOrg = cert.organization;
 
     // SubjectName fields, broken up for individual access
     if (cert.subjectName) {
@@ -6994,17 +6994,17 @@ var gIdentityHandler = {
     if (this._identityPopup.state == "open") {
       this._handleHeightChange(() => this.updateSitePermissions());
     }
   },
 
   /**
    * Attempt to provide proper IDN treatment for host names
    */
-  getEffectiveHost: function() {
+  getEffectiveHost() {
     if (!this._IDNService)
       this._IDNService = Cc["@mozilla.org/network/idn-service;1"]
                          .getService(Ci.nsIIDNService);
     try {
       return this._IDNService.convertToDisplayIDN(this._uri.host, {});
     } catch (e) {
       // If something goes wrong (e.g. host is an IP address) just fail back
       // to the full domain.
@@ -7174,17 +7174,17 @@ var gIdentityHandler = {
       if (this._uri.port > 0) {
         port = this._uri.port;
       }
     } catch (e) {}
 
     let buttons = [{
       label: gNavigatorBundle.getString("revokeOverride.label"),
       accessKey: gNavigatorBundle.getString("revokeOverride.accesskey"),
-      callback: function(aNotification, aButton) {
+      callback(aNotification, aButton) {
         try {
           let weakCryptoOverride = Cc["@mozilla.org/security/weakcryptooverride;1"]
                                      .getService(Ci.nsIWeakCryptoOverride);
           weakCryptoOverride.removeWeakCryptoOverride(host, port,
             PrivateBrowsingUtils.isBrowserPrivate(gBrowser.selectedBrowser));
           BrowserReloadWithFlags(nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE);
         } catch (e) {
           Cu.reportError(e);
@@ -7364,17 +7364,17 @@ var gIdentityHandler = {
     } catch (ex) {
       // NetUtil's methods will throw for malformed URIs and the like
     }
   },
 
   /**
    * Click handler for the identity-box element in primary chrome.
    */
-  handleIdentityButtonEvent : function(event) {
+  handleIdentityButtonEvent(event) {
     event.stopPropagation();
 
     if ((event.type == "click" && event.button != 0) ||
         (event.type == "keypress" && event.charCode != KeyEvent.DOM_VK_SPACE &&
          event.keyCode != KeyEvent.DOM_VK_RETURN)) {
       return; // Left click, space or enter only
     }
 
@@ -7425,52 +7425,52 @@ var gIdentityHandler = {
   },
 
   observe(subject, topic, data) {
     if (topic == "perm-changed") {
       this.refreshIdentityBlock();
     }
   },
 
-  onDragStart: function(event) {
+  onDragStart(event) {
     if (gURLBar.getAttribute("pageproxystate") != "valid")
       return;
 
     let value = gBrowser.currentURI.spec;
     let urlString = value + "\n" + gBrowser.contentTitle;
     let htmlString = "<a href=\"" + value + "\">" + value + "</a>";
 
     let dt = event.dataTransfer;
     dt.setData("text/x-moz-url", urlString);
     dt.setData("text/uri-list", value);
     dt.setData("text/plain", value);
     dt.setData("text/html", htmlString);
     dt.setDragImage(this._identityIcon, 16, 16);
   },
 
-  onLocationChange: function() {
+  onLocationChange() {
     this._permissionJustRemoved = false;
     this.updatePermissionHint();
   },
 
-  updatePermissionHint: function() {
+  updatePermissionHint() {
     if (!this._permissionList.hasChildNodes() && !this._permissionJustRemoved) {
       this._permissionEmptyHint.removeAttribute("hidden");
     } else {
       this._permissionEmptyHint.setAttribute("hidden", "true");
     }
 
     if (this._permissionJustRemoved) {
       this._permissionReloadHint.removeAttribute("hidden");
     } else {
       this._permissionReloadHint.setAttribute("hidden", "true");
     }
   },
 
-  updateSitePermissions: function() {
+  updateSitePermissions() {
     while (this._permissionList.hasChildNodes())
       this._permissionList.removeChild(this._permissionList.lastChild);
 
     let uri = gBrowser.currentURI;
 
     let permissions = SitePermissions.getPermissionDetailsByURI(uri);
     if (this._sharingState) {
       // If WebRTC device or screen permissions are in use, we need to find
@@ -7499,31 +7499,31 @@ var gIdentityHandler = {
     for (let permission of permissions) {
       let item = this._createPermissionItem(permission);
       this._permissionList.appendChild(item);
     }
 
     this.updatePermissionHint();
   },
 
-  _handleHeightChange: function(aFunction, aWillShowReloadHint) {
+  _handleHeightChange(aFunction, aWillShowReloadHint) {
     let heightBefore = getComputedStyle(this._permissionList).height;
     aFunction();
     let heightAfter = getComputedStyle(this._permissionList).height;
     // Showing the reload hint increases the height, we need to account for it.
     if (aWillShowReloadHint) {
       heightAfter = parseInt(heightAfter) +
                     parseInt(getComputedStyle(this._permissionList.nextSibling).height);
     }
     let heightChange = parseInt(heightAfter) - parseInt(heightBefore);
     if (heightChange)
       this._identityPopupMultiView.setHeightToFit(heightChange);
   },
 
-  _createPermissionItem: function(aPermission) {
+  _createPermissionItem(aPermission) {
     let container = document.createElement("hbox");
     container.setAttribute("class", "identity-popup-permission-item");
     container.setAttribute("align", "center");
 
     let img = document.createElement("image");
     let classes = "identity-popup-permission-icon " + aPermission.id + "-icon";
     if (aPermission.state == SitePermissions.BLOCK)
       classes += " blocked-permission-icon";
@@ -7676,17 +7676,17 @@ var gPrivateBrowsingUI = {
     if (!urlBarSearchParam.includes("private-window")) {
       urlBarSearchParam += " private-window";
     }
     gURLBar.setAttribute("autocompletesearchparam", urlBarSearchParam);
   }
 };
 
 var gRemoteTabsUI = {
-  init: function() {
+  init() {
     if (window.location.href != getBrowserURL() &&
         // Also check hidden window for the Mac no-window case
         window.location.href != "chrome://browser/content/hiddenWindow.xul") {
       return;
     }
 
     if (AppConstants.platform == "macosx" &&
         Services.prefs.getBoolPref("layers.acceleration.disabled")) {
@@ -7823,25 +7823,25 @@ function switchToTabHavingURI(aURI, aOpe
     else
       openUILinkIn(aURI.spec, "tab", aOpenParams);
   }
 
   return false;
 }
 
 var RestoreLastSessionObserver = {
-  init: function() {
+  init() {
     if (SessionStore.canRestoreLastSession &&
         !PrivateBrowsingUtils.isWindowPrivate(window)) {
       Services.obs.addObserver(this, "sessionstore-last-session-cleared", true);
       goSetCommandEnabled("Browser:RestoreLastSession", true);
     }
   },
 
-  observe: function() {
+  observe() {
     // The last session can only be restored once so there's
     // no way we need to re-enable our menu item.
     Services.obs.removeObserver(this, "sessionstore-last-session-cleared");
     goSetCommandEnabled("Browser:RestoreLastSession", false);
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                          Ci.nsISupportsWeakReference])
@@ -8042,45 +8042,45 @@ var MousePosTracker = {
   _listeners: new Set(),
   _x: 0,
   _y: 0,
   get _windowUtils() {
     delete this._windowUtils;
     return this._windowUtils = window.getInterface(Ci.nsIDOMWindowUtils);
   },
 
-  addListener: function(listener) {
+  addListener(listener) {
     if (this._listeners.has(listener))
       return;
 
     listener._hover = false;
     this._listeners.add(listener);
 
     this._callListener(listener);
   },
 
-  removeListener: function(listener) {
+  removeListener(listener) {
     this._listeners.delete(listener);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     var fullZoom = this._windowUtils.fullZoom;
     this._x = event.screenX / fullZoom - window.mozInnerScreenX;
     this._y = event.screenY / fullZoom - window.mozInnerScreenY;
 
     this._listeners.forEach(function(listener) {
       try {
         this._callListener(listener);
       } catch (e) {
         Cu.reportError(e);
       }
     }, this);
   },
 
-  _callListener: function(listener) {
+  _callListener(listener) {
     let rect = listener.getMouseTargetRect();
     let hover = this._x >= rect.left &&
                 this._x <= rect.right &&
                 this._y >= rect.top &&
                 this._y <= rect.bottom;
 
     if (hover == listener._hover)
       return;
@@ -8092,58 +8092,58 @@ var MousePosTracker = {
         listener.onMouseEnter();
     } else if (listener.onMouseLeave) {
       listener.onMouseLeave();
     }
   }
 };
 
 var ToolbarIconColor = {
-  init: function() {
+  init() {
     this._initialized = true;
 
     window.addEventListener("activate", this);
     window.addEventListener("deactivate", this);
     Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
 
     // If the window isn't active now, we assume that it has never been active
     // before and will soon become active such that inferFromText will be
     // called from the initial activate event.
     if (Services.focus.activeWindow == window)
       this.inferFromText();
   },
 
-  uninit: function() {
+  uninit() {
     this._initialized = false;
 
     window.removeEventListener("activate", this);
     window.removeEventListener("deactivate", this);
     Services.obs.removeObserver(this, "lightweight-theme-styling-update");
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
       case "activate":
       case "deactivate":
         this.inferFromText();
         break;
     }
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "lightweight-theme-styling-update":
         // inferFromText needs to run after LightweightThemeConsumer.jsm's
         // lightweight-theme-styling-update observer.
         setTimeout(() => { this.inferFromText(); }, 0);
         break;
     }
   },
 
-  inferFromText: function() {
+  inferFromText() {
     if (!this._initialized)
       return;
 
     function parseRGB(aColorString) {
       let rgb = aColorString.match(/^rgba?\((\d+), (\d+), (\d+)/);
       rgb.shift();
       return rgb.map(x => parseInt(x));
     }
@@ -8167,48 +8167,48 @@ var ToolbarIconColor = {
         toolbar.removeAttribute("brighttext");
       else
         toolbar.setAttribute("brighttext", "true");
     }
   }
 }
 
 var PanicButtonNotifier = {
-  init: function() {
+  init() {
     this._initialized = true;
     if (window.PanicButtonNotifierShouldNotify) {
       delete window.PanicButtonNotifierShouldNotify;
       this.notify();
     }
   },
-  notify: function() {
+  notify() {
     if (!this._initialized) {
       window.PanicButtonNotifierShouldNotify = true;
       return;
     }
     // Display notification panel here...
     try {
       let popup = document.getElementById("panic-button-success-notification");
       popup.hidden = false;
       let widget = CustomizableUI.getWidget("panic-button").forWindow(window);
       let anchor = widget.anchor;
       anchor = document.getAnonymousElementByAttribute(anchor, "class", "toolbarbutton-icon");
       popup.openPopup(anchor, popup.getAttribute("position"));
     } catch (ex) {
       Cu.reportError(ex);
     }
   },
-  close: function() {
+  close() {
     let popup = document.getElementById("panic-button-success-notification");
     popup.hidePopup();
   },
 };
 
 var AboutPrivateBrowsingListener = {
-  init: function() {
+  init() {
     window.messageManager.addMessageListener(
       "AboutPrivateBrowsing:OpenPrivateWindow",
       msg => {
         OpenBrowserWindow({private: true});
     });
     window.messageManager.addMessageListener(
       "AboutPrivateBrowsing:ToggleTrackingProtection",
       msg => {
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -98,18 +98,18 @@ var handleContentContextMenu = function(
     defaultPrevented = false;
   }
 
   if (defaultPrevented)
     return;
 
   let addonInfo = {};
   let subject = {
-    event: event,
-    addonInfo: addonInfo,
+    event,
+    addonInfo,
   };
   subject.wrappedJSObject = subject;
   Services.obs.notifyObservers(subject, "content-contextmenu", null);
 
   let doc = event.target.ownerDocument;
   let docLocation = doc.mozDocumentURIIfNotForErrorPages;
   docLocation = docLocation && docLocation.spec;
   let charSet = doc.characterSet;
@@ -192,28 +192,28 @@ var handleContentContextMenu = function(
                    { event, popupNode: event.target });
   }
   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: event,
+      event,
       popupNode: event.target,
-      browser: browser,
-      addonInfo: addonInfo,
+      browser,
+      addonInfo,
       documentURIObject: doc.documentURIObject,
-      docLocation: docLocation,
-      charSet: charSet,
-      referrer: referrer,
-      referrerPolicy: referrerPolicy,
-      contentType: contentType,
-      contentDisposition: contentDisposition,
-      selectionInfo: selectionInfo,
+      docLocation,
+      charSet,
+      referrer,
+      referrerPolicy,
+      contentType,
+      contentDisposition,
+      selectionInfo,
       disableSetDesktopBackground: disableSetDesktopBg,
       loginFillInfo,
       parentAllowsMixedContent,
       userContextId,
     };
   }
 }
 
@@ -257,17 +257,17 @@ function getSerializedSecurityInfo(docSh
   }
   securityInfo.QueryInterface(Ci.nsITransportSecurityInfo)
               .QueryInterface(Ci.nsISerializable);
 
   return serhelper.serializeToString(securityInfo);
 }
 
 var AboutNetAndCertErrorListener = {
-  init: function(chromeGlobal) {
+  init(chromeGlobal) {
     addMessageListener("CertErrorDetails", this);
     addMessageListener("Browser:CaptivePortalFreed", this);
     chromeGlobal.addEventListener('AboutNetErrorLoad', this, false, true);
     chromeGlobal.addEventListener('AboutNetErrorOpenCaptivePortal', this, false, true);
     chromeGlobal.addEventListener('AboutNetErrorSetAutomatic', this, false, true);
     chromeGlobal.addEventListener('AboutNetErrorOverride', this, false, true);
     chromeGlobal.addEventListener('AboutNetErrorResetPreferences', this, false, true);
   },
@@ -275,17 +275,17 @@ var AboutNetAndCertErrorListener = {
   get isAboutNetError() {
     return content.document.documentURI.startsWith("about:neterror");
   },
 
   get isAboutCertError() {
     return content.document.documentURI.startsWith("about:certerror");
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     if (!this.isAboutCertError) {
       return;
     }
 
     switch (msg.name) {
       case "CertErrorDetails":
         this.onCertErrorDetails(msg);
         break;
@@ -343,17 +343,17 @@ var AboutNetAndCertErrorListener = {
         break;
     }
   },
 
   onCaptivePortalFreed(msg) {
     content.dispatchEvent(new content.CustomEvent("AboutNetErrorCaptivePortalFreed"));
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     if (!this.isAboutNetError && !this.isAboutCertError) {
       return;
     }
 
     switch (aEvent.type) {
     case "AboutNetErrorLoad":
       this.onPageLoad(aEvent);
       break;
@@ -367,88 +367,88 @@ var AboutNetAndCertErrorListener = {
       this.onOverride(aEvent);
       break;
     case "AboutNetErrorResetPreferences":
       this.onResetPreferences(aEvent);
       break;
     }
   },
 
-  changedCertPrefs: function() {
+  changedCertPrefs() {
     for (let prefName of PREF_SSL_IMPACT) {
       if (Services.prefs.prefHasUserValue(prefName)) {
         return true;
       }
     }
 
     return false;
   },
 
-  onPageLoad: function(evt) {
+  onPageLoad(evt) {
     if (this.isAboutCertError) {
       let originalTarget = evt.originalTarget;
       let ownerDoc = originalTarget.ownerDocument;
       ClickEventHandler.onCertError(originalTarget, ownerDoc);
     }
 
     let automatic = Services.prefs.getBoolPref("security.ssl.errorReporting.automatic");
     content.dispatchEvent(new content.CustomEvent("AboutNetErrorOptions", {
       detail: JSON.stringify({
         enabled: Services.prefs.getBoolPref("security.ssl.errorReporting.enabled"),
         changedCertPrefs: this.changedCertPrefs(),
-        automatic: automatic
+        automatic
       })
     }));
 
     sendAsyncMessage("Browser:SSLErrorReportTelemetry",
                      {reportStatus: TLS_ERROR_REPORT_TELEMETRY_UI_SHOWN});
   },
 
-  openCaptivePortalPage: function(evt) {
+  openCaptivePortalPage(evt) {
     sendAsyncMessage("Browser:OpenCaptivePortalPage");
   },
 
 
-  onResetPreferences: function(evt) {
+  onResetPreferences(evt) {
     sendAsyncMessage("Browser:ResetSSLPreferences");
   },
 
-  onSetAutomatic: function(evt) {
+  onSetAutomatic(evt) {
     sendAsyncMessage("Browser:SetSSLErrorReportAuto", {
       automatic: evt.detail
     });
 
     // if we're enabling reports, send a report for this failure
     if (evt.detail) {
       let {host, port} = content.document.mozDocumentURIIfNotForErrorPages;
       sendAsyncMessage("Browser:SendSSLErrorReport", {
         uri: { host, port },
         securityInfo: getSerializedSecurityInfo(docShell),
       });
 
     }
   },
 
-  onOverride: function(evt) {
+  onOverride(evt) {
     let {host, port} = content.document.mozDocumentURIIfNotForErrorPages;
     sendAsyncMessage("Browser:OverrideWeakCrypto", { uri: {host, port} });
   }
 }
 
 AboutNetAndCertErrorListener.init(this);
 
 
 var ClickEventHandler = {
   init: function init() {
     Cc["@mozilla.org/eventlistenerservice;1"]
       .getService(Ci.nsIEventListenerService)
       .addSystemEventListener(global, "click", this, true);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (!event.isTrusted || event.defaultPrevented || event.button == 2) {
       return;
     }
 
     let originalTarget = event.originalTarget;
     let ownerDoc = originalTarget.ownerDocument;
     if (!ownerDoc) {
       return;
@@ -479,17 +479,17 @@ var ClickEventHandler = {
       if (referrerAttrValue !== Ci.nsIHttpChannel.REFERRER_POLICY_UNSET) {
         referrerPolicy = referrerAttrValue;
       }
     }
 
     let json = { button: event.button, shiftKey: event.shiftKey,
                  ctrlKey: event.ctrlKey, metaKey: event.metaKey,
                  altKey: event.altKey, href: null, title: null,
-                 bookmark: false, referrerPolicy: referrerPolicy,
+                 bookmark: false, referrerPolicy,
                  originAttributes: principal ? principal.originAttributes : {},
                  isContentWindowPrivate: PrivateBrowsingUtils.isContentWindowPrivate(ownerDoc.defaultView)};
 
     if (href) {
       try {
         BrowserUtils.urlSecurityCheck(href, principal);
       } catch (e) {
         return;
@@ -530,44 +530,44 @@ var ClickEventHandler = {
     }
 
     // This might be middle mouse navigation.
     if (event.button == 1) {
       sendAsyncMessage("Content:Click", json);
     }
   },
 
-  onCertError: function(targetElement, ownerDoc) {
+  onCertError(targetElement, ownerDoc) {
     let docShell = ownerDoc.defaultView.QueryInterface(Ci.nsIInterfaceRequestor)
                                        .getInterface(Ci.nsIWebNavigation)
                                        .QueryInterface(Ci.nsIDocShell);
     sendAsyncMessage("Browser:CertExceptionError", {
       location: ownerDoc.location.href,
       elementId: targetElement.getAttribute("id"),
       isTopFrame: (ownerDoc.defaultView.parent === ownerDoc.defaultView),
       securityInfoAsString: getSerializedSecurityInfo(docShell),
     });
   },
 
-  onAboutBlocked: function(targetElement, ownerDoc) {
+  onAboutBlocked(targetElement, ownerDoc) {
     var reason = 'phishing';
     if (/e=malwareBlocked/.test(ownerDoc.documentURI)) {
       reason = 'malware';
     } else if (/e=unwantedBlocked/.test(ownerDoc.documentURI)) {
       reason = 'unwanted';
     }
     sendAsyncMessage("Browser:SiteBlockedError", {
       location: ownerDoc.location.href,
-      reason: reason,
+      reason,
       elementId: targetElement.getAttribute("id"),
       isTopFrame: (ownerDoc.defaultView.parent === ownerDoc.defaultView)
     });
   },
 
-  onAboutNetError: function(event, documentURI) {
+  onAboutNetError(event, documentURI) {
     let elmId = event.originalTarget.getAttribute("id");
     if (elmId == "returnButton") {
       sendAsyncMessage("Browser:SSLErrorGoBack", {});
       return;
     }
     if (elmId != "errorTryAgain" || !/e=netOffline/.test(documentURI)) {
       return;
     }
@@ -586,17 +586,17 @@ var ClickEventHandler = {
    * @param event
    *        The click event.
    * @return [href, linkNode, linkPrincipal].
    *
    * @note linkNode will be null if the click wasn't on an anchor
    *       element. This includes SVG links, because callers expect |node|
    *       to behave like an <a> element, which SVG links (XLink) don't.
    */
-  _hrefAndLinkNodeForClickEvent: function(event) {
+  _hrefAndLinkNodeForClickEvent(event) {
     function isHTMLLink(aNode) {
       // Be consistent with what nsContextMenu.js does.
       return ((aNode instanceof content.HTMLAnchorElement && aNode.href) ||
               (aNode instanceof content.HTMLAreaElement && aNode.href) ||
               aNode instanceof content.HTMLLinkElement);
     }
 
     let node = event.target;
@@ -651,17 +651,17 @@ addMessageListener("rtcpeer:Allow", Cont
 addMessageListener("rtcpeer:Deny", ContentWebRTC);
 addMessageListener("webrtc:Allow", ContentWebRTC);
 addMessageListener("webrtc:Deny", ContentWebRTC);
 addMessageListener("webrtc:StopSharing", ContentWebRTC);
 addMessageListener("webrtc:StartBrowserSharing", () => {
   let windowID = content.QueryInterface(Ci.nsIInterfaceRequestor)
                         .getInterface(Ci.nsIDOMWindowUtils).outerWindowID;
   sendAsyncMessage("webrtc:response:StartBrowserSharing", {
-    windowID: windowID
+    windowID
   });
 });
 
 addEventListener("pageshow", function(event) {
   if (event.target == content.document) {
     sendAsyncMessage("PageVisibility:Show", {
       persisted: event.persisted,
     });
@@ -871,30 +871,30 @@ addMessageListener("ContextMenu:SearchFi
   sendAsyncMessage("ContextMenu:SearchFieldBookmarkData:Result",
                    { spec, title, description, postData, charset });
 });
 
 addMessageListener("Bookmarks:GetPageDetails", (message) => {
   let doc = content.document;
   let isErrorPage = /^about:(neterror|certerror|blocked)/.test(doc.documentURI);
   sendAsyncMessage("Bookmarks:GetPageDetails:Result",
-                   { isErrorPage: isErrorPage,
+                   { isErrorPage,
                      description: PlacesUIUtils.getDescriptionFromDocument(doc) });
 });
 
 var LightWeightThemeWebInstallListener = {
   _previewWindow: null,
 
-  init: function() {
+  init() {
     addEventListener("InstallBrowserTheme", this, false, true);
     addEventListener("PreviewBrowserTheme", this, false, true);
     addEventListener("ResetBrowserThemePreview", this, false, true);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
       case "InstallBrowserTheme": {
         sendAsyncMessage("LightWeightThemeWebInstaller:Install", {
           baseURI: event.target.baseURI,
           themeData: event.target.getAttribute("data-browsertheme"),
         });
         break;
       }
@@ -918,17 +918,17 @@ var LightWeightThemeWebInstallListener =
                            {baseURI: event.target.baseURI});
           this._resetPreviewWindow();
         }
         break;
       }
     }
   },
 
-  _resetPreviewWindow: function() {
+  _resetPreviewWindow() {
     this._previewWindow.removeEventListener("pagehide", this, true);
     this._previewWindow = null;
   }
 };
 
 LightWeightThemeWebInstallListener.init();
 
 function disableSetDesktopBackground(aTarget) {
@@ -977,21 +977,21 @@ addMessageListener("ContextMenu:SetAsDes
   }
 
   if (disable)
     sendAsyncMessage("ContextMenu:SetAsDesktopBackground:Result", { disable });
 });
 
 var PageInfoListener = {
 
-  init: function() {
+  init() {
     addMessageListener("PageInfo:getData", this);
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     let strings = message.data.strings;
     let window;
     let document;
 
     let frameOuterWindowID = message.data.frameOuterWindowID;
 
     // If inside frame then get the frame's window and document.
     if (frameOuterWindowID) {
@@ -1012,58 +1012,58 @@ var PageInfoListener = {
                         imageInfo: this.getImageInfo(imageElement)};
 
     sendAsyncMessage("PageInfo:data", pageInfoData);
 
     // Separate step so page info dialog isn't blank while waiting for this to finish.
     this.getMediaInfo(document, window, strings);
   },
 
-  getImageInfo: function(imageElement) {
+  getImageInfo(imageElement) {
     let imageInfo = null;
     if (imageElement) {
       imageInfo = {
         currentSrc: imageElement.currentSrc,
         width: imageElement.width,
         height: imageElement.height,
         imageText: imageElement.title || imageElement.alt
       };
     }
     return imageInfo;
   },
 
-  getMetaInfo: function(document) {
+  getMetaInfo(document) {
     let metaViewRows = [];
 
     // Get the meta tags from the page.
     let metaNodes = document.getElementsByTagName("meta");
 
     for (let metaNode of metaNodes) {
       metaViewRows.push([metaNode.name || metaNode.httpEquiv || metaNode.getAttribute("property"),
                         metaNode.content]);
     }
 
     return metaViewRows;
   },
 
-  getWindowInfo: function(window) {
+  getWindowInfo(window) {
     let windowInfo = {};
     windowInfo.isTopWindow = window == window.top;
 
     let hostName = null;
     try {
       hostName = window.location.host;
     }
     catch (exception) { }
 
     windowInfo.hostName = hostName;
     return windowInfo;
   },
 
-  getDocumentInfo: function(document) {
+  getDocumentInfo(document) {
     let docInfo = {};
     docInfo.title = document.title;
     docInfo.location = document.location.toString();
     docInfo.referrer = document.referrer;
     docInfo.compatMode = document.compatMode;
     docInfo.contentType = document.contentType;
     docInfo.characterSet = document.characterSet;
     docInfo.lastModified = document.lastModified;
@@ -1074,17 +1074,17 @@ var PageInfoListener = {
     documentURIObject.originCharset = document.documentURIObject.originCharset;
     docInfo.documentURIObject = documentURIObject;
 
     docInfo.isContentWindowPrivate = PrivateBrowsingUtils.isContentWindowPrivate(content);
 
     return docInfo;
   },
 
-  getFeedsInfo: function(document, strings) {
+  getFeedsInfo(document, strings) {
     let feeds = [];
     // Get the feeds from the page.
     let linkNodes = document.getElementsByTagName("link");
     let length = linkNodes.length;
     for (let i = 0; i < length; i++) {
       let link = linkNodes[i];
       if (!link.href) {
         continue;
@@ -1105,37 +1105,37 @@ 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: function(document, window, strings)
+  getMediaInfo(document, window, strings)
   {
     let frameList = this.goThroughFrames(document, window);
     Task.spawn(() => this.processFrames(document, frameList, strings));
   },
 
-  goThroughFrames: function(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: function*(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,17 +1150,17 @@ var PageInfoListener = {
           yield new Promise(resolve => setTimeout(resolve, 10));
         }
       }
     }
     // Send that page info media fetching has finished.
     sendAsyncMessage("PageInfo:mediaData", {isComplete: true});
   },
 
-  getMediaItems: function(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) => {
@@ -1236,17 +1236,17 @@ var PageInfoListener = {
     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: function(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,17 +1317,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: function(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) {
@@ -1357,17 +1357,17 @@ var PageInfoListener = {
       }
     }
 
     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: function(node)
+  getAltText(node)
   {
     let altText = "";
 
     if (node.alt) {
       return node.alt;
     }
     let length = node.childNodes.length;
     for (let i = 0; i < length; i++) {
@@ -1375,17 +1375,17 @@ var PageInfoListener = {
         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: function(text)
+  stripWS(text)
   {
     let middleRE = /\s+/g;
     let endRE = /(^\s+)|(\s+$)/g;
 
     text = text.replace(middleRE, " ");
     return text.replace(endRE, "");
   }
 };
--- a/browser/base/content/contentSearchUI.js
+++ b/browser/base/content/contentSearchUI.js
@@ -85,17 +85,17 @@ ContentSearchUIController.prototype = {
       icon = this._getFaviconURIFromBuffer(engine.iconBuffer);
     }
     else {
       icon = this._getImageURIForCurrentResolution(
         "chrome://mozapps/skin/places/defaultFavicon.png");
     }
     this._defaultEngine = {
       name: engine.name,
-      icon: icon,
+      icon,
     };
     this._updateDefaultEngineHeader();
 
     if (engine && document.activeElement == this.input) {
       this._speculativeConnect();
     }
   },
 
@@ -184,70 +184,70 @@ ContentSearchUIController.prototype = {
     }
     return this.defaultEngine.name;
   },
 
   get numSuggestions() {
     return this._suggestionsList.children.length;
   },
 
-  selectAndUpdateInput: function(idx) {
+  selectAndUpdateInput(idx) {
     this.selectedIndex = idx;
     let newValue = this.suggestionAtIndex(idx) || this._stickyInputValue;
     // Setting the input value when the value has not changed commits the current
     // IME composition, which we don't want to do.
     if (this.input.value != newValue) {
       this.input.value = newValue;
     }
     this._updateSearchWithHeader();
   },
 
-  suggestionAtIndex: function(idx) {
+  suggestionAtIndex(idx) {
     let row = this._suggestionsList.children[idx];
     return row ? row.textContent : null;
   },
 
-  deleteSuggestionAtIndex: function(idx) {
+  deleteSuggestionAtIndex(idx) {
     // Only form history suggestions can be deleted.
     if (this.isFormHistorySuggestionAtIndex(idx)) {
       let suggestionStr = this.suggestionAtIndex(idx);
       this._sendMsg("RemoveFormHistoryEntry", suggestionStr);
       this._suggestionsList.children[idx].remove();
       this.selectAndUpdateInput(-1);
     }
   },
 
-  isFormHistorySuggestionAtIndex: function(idx) {
+  isFormHistorySuggestionAtIndex(idx) {
     let row = this._suggestionsList.children[idx];
     return row && row.classList.contains("formHistory");
   },
 
-  addInputValueToFormHistory: function() {
+  addInputValueToFormHistory() {
     this._sendMsg("AddFormHistoryEntry", this.input.value);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     this["_on" + event.type[0].toUpperCase() + event.type.substr(1)](event);
   },
 
-  _onCommand: function(aEvent) {
+  _onCommand(aEvent) {
     if (this.selectedButtonIndex == this._oneOffButtons.length) {
       // Settings button was selected.
       this._sendMsg("ManageEngines");
       return;
     }
 
     this.search(aEvent);
 
     if (aEvent) {
       aEvent.preventDefault();
     }
   },
 
-  search: function(aEvent) {
+  search(aEvent) {
     if (!this.defaultEngine) {
       return; // Not initialized yet.
     }
 
     let searchText = this.input;
     let searchTerms;
     if (this._table.hidden ||
         aEvent.originalTarget.id == "contentSearchDefaultEngineHeader" ||
@@ -286,30 +286,30 @@ ContentSearchUIController.prototype = {
         eventData.selection.kind = "key";
       }
     }
 
     this._sendMsg("Search", eventData);
     this.addInputValueToFormHistory();
   },
 
-  _onInput: function() {
+  _onInput() {
     if (!this.input.value) {
       this._stickyInputValue = "";
       this._hideSuggestions();
     }
     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: function(event) {
+  _onKeypress(event) {
     let selectedIndexDelta = 0;
     let selectedSuggestionDelta = 0;
     let selectedOneOffDelta = 0;
 
     switch (event.keyCode) {
     case event.DOM_VK_UP:
       if (this._table.hidden) {
         return;
@@ -446,92 +446,92 @@ ContentSearchUIController.prototype = {
       this.selectedButtonIndex = newSelectedIndex;
     }
 
     // Prevent the input's caret from moving.
     event.preventDefault();
   },
 
   _currentEngineIndex: -1,
-  _cycleCurrentEngine: function(aReverse) {
+  _cycleCurrentEngine(aReverse) {
     if ((this._currentEngineIndex == this._engines.length - 1 && !aReverse) ||
         (this._currentEngineIndex == 0 && aReverse)) {
       return;
     }
     this._currentEngineIndex += aReverse ? -1 : 1;
     let engineName = this._engines[this._currentEngineIndex].name;
     this._sendMsg("SetCurrentEngine", engineName);
   },
 
-  _onFocus: function() {
+  _onFocus() {
     if (this._mousedown) {
       return;
     }
     // When the input box loses focus to something in our table, we refocus it
     // immediately. This causes the focus highlight to flicker, so we set a
     // custom attribute which consumers should use for focus highlighting. This
     // attribute is removed only when we do not immediately refocus the input
     // box, thus eliminating flicker.
     this.input.setAttribute("keepfocus", "true");
     this._speculativeConnect();
   },
 
-  _onBlur: function() {
+  _onBlur() {
     if (this._mousedown) {
       // At this point, this.input has lost focus, but a new element has not yet
       // received it. If we re-focus this.input directly, the new element will
       // steal focus immediately, so we queue it instead.
       setTimeout(() => this.input.focus(), 0);
       return;
     }
     this.input.removeAttribute("keepfocus");
     this._hideSuggestions();
   },
 
-  _onMousemove: function(event) {
+  _onMousemove(event) {
     let idx = this._indexOfTableItem(event.target);
     if (idx >= this.numSuggestions) {
       this.selectedButtonIndex = idx - this.numSuggestions;
       return;
     }
     this.selectedIndex = idx;
   },
 
-  _onMouseup: function(event) {
+  _onMouseup(event) {
     if (event.button == 2) {
       return;
     }
     this._onCommand(event);
   },
 
-  _onMouseout: function(event) {
+  _onMouseout(event) {
     // We only deselect one-off buttons and the settings button when they are
     // moused out.
     let idx = this._indexOfTableItem(event.originalTarget);
     if (idx >= this.numSuggestions) {
       this.selectedButtonIndex = -1;
     }
   },
 
-  _onClick: function(event) {
+  _onClick(event) {
     this._onMouseup(event);
   },
 
-  _onContentSearchService: function(event) {
+  _onContentSearchService(event) {
     let methodName = "_onMsg" + event.detail.type;
     if (methodName in this) {
       this[methodName](event.detail.data);
     }
   },
 
-  _onMsgFocusInput: function(event) {
+  _onMsgFocusInput(event) {
     this.input.focus();
   },
 
-  _onMsgSuggestions: function(suggestions) {
+  _onMsgSuggestions(suggestions) {
     // Ignore the suggestions if their search string or engine doesn't match
     // ours.  Due to the async nature of message passing, this can easily happen
     // when the user types quickly.
     if (this._stickyInputValue != suggestions.searchString ||
         this.defaultEngine.name != suggestions.engineName) {
       return;
     }
 
@@ -576,84 +576,84 @@ ContentSearchUIController.prototype = {
       this.input.setAttribute("aria-expanded", "true");
       this._originalDefaultEngine = {
         name: this.defaultEngine.name,
         icon: this.defaultEngine.icon,
       };
     }
   },
 
-  _onMsgSuggestionsCancelled: function() {
+  _onMsgSuggestionsCancelled() {
     if (!this._table.hidden) {
       this._hideSuggestions();
     }
   },
 
-  _onMsgState: function(state) {
+  _onMsgState(state) {
     this.engines = state.engines;
     // No point updating the default engine (and the header) if there's no change.
     if (this.defaultEngine &&
         this.defaultEngine.name == state.currentEngine.name &&
         this.defaultEngine.icon == state.currentEngine.icon) {
       return;
     }
     this.defaultEngine = state.currentEngine;
   },
 
-  _onMsgCurrentState: function(state) {
+  _onMsgCurrentState(state) {
     this._onMsgState(state);
   },
 
-  _onMsgCurrentEngine: function(engine) {
+  _onMsgCurrentEngine(engine) {
     this.defaultEngine = engine;
     this._pendingOneOffRefresh = true;
   },
 
-  _onMsgStrings: function(strings) {
+  _onMsgStrings(strings) {
     this._strings = strings;
     this._updateDefaultEngineHeader();
     this._updateSearchWithHeader();
     document.getElementById("contentSearchSettingsButton").textContent =
       this._strings.searchSettings;
     this.input.setAttribute("placeholder", this._strings.searchPlaceholder);
   },
 
-  _updateDefaultEngineHeader: function() {
+  _updateDefaultEngineHeader() {
     let header = document.getElementById("contentSearchDefaultEngineHeader");
     header.firstChild.setAttribute("src", this.defaultEngine.icon);
     if (!this._strings) {
       return;
     }
     while (header.firstChild.nextSibling) {
       header.firstChild.nextSibling.remove();
     }
     header.appendChild(document.createTextNode(
       this._strings.searchHeader.replace("%S", this.defaultEngine.name)));
   },
 
-  _updateSearchWithHeader: function() {
+  _updateSearchWithHeader() {
     if (!this._strings) {
       return;
     }
     let searchWithHeader = document.getElementById("contentSearchSearchWithHeader");
     if (this.input.value) {
       searchWithHeader.innerHTML = this._strings.searchForSomethingWith;
       searchWithHeader.querySelector('.contentSearchSearchWithHeaderSearchText').textContent = this.input.value;
     } else {
       searchWithHeader.textContent = this._strings.searchWithHeader;
     }
   },
 
-  _speculativeConnect: function() {
+  _speculativeConnect() {
     if (this.defaultEngine) {
       this._sendMsg("SpeculativeConnect", this.defaultEngine.name);
     }
   },
 
-  _makeTableRow: function(type, suggestionStr, currentRow, searchWords) {
+  _makeTableRow(type, suggestionStr, currentRow, searchWords) {
     let row = document.createElementNS(HTML_NS, "tr");
     row.dir = "auto";
     row.classList.add("contentSearchSuggestionRow");
     row.classList.add(type);
     row.setAttribute("role", "presentation");
     row.addEventListener("mousemove", this);
     row.addEventListener("mouseup", this);
 
@@ -680,78 +680,78 @@ ContentSearchUIController.prototype = {
       }
     }
 
     row.appendChild(entry);
     return row;
   },
 
   // Converts favicon array buffer into a data URI.
-  _getFaviconURIFromBuffer: function(buffer) {
+  _getFaviconURIFromBuffer(buffer) {
     let blob = new Blob([buffer]);
     return URL.createObjectURL(blob);
   },
 
   // Adds "@2x" to the name of the given PNG url for "retina" screens.
-  _getImageURIForCurrentResolution: function(uri) {
+  _getImageURIForCurrentResolution(uri) {
     if (window.devicePixelRatio > 1) {
       return uri.replace(/\.png$/, "@2x.png");
     }
     return uri;
   },
 
-  _getSearchEngines: function() {
+  _getSearchEngines() {
     this._sendMsg("GetState");
   },
 
-  _getStrings: function() {
+  _getStrings() {
     this._sendMsg("GetStrings");
   },
 
-  _getSuggestions: function() {
+  _getSuggestions() {
     this._stickyInputValue = this.input.value;
     if (this.defaultEngine) {
       this._sendMsg("GetSuggestions", {
         engineName: this.defaultEngine.name,
         searchString: this.input.value,
       });
     }
   },
 
-  _clearSuggestionRows: function() {
+  _clearSuggestionRows() {
     while (this._suggestionsList.firstElementChild) {
       this._suggestionsList.firstElementChild.remove();
     }
   },
 
-  _hideSuggestions: function() {
+  _hideSuggestions() {
     this.input.setAttribute("aria-expanded", "false");
     this.selectedIndex = -1;
     this.selectedButtonIndex = -1;
     this._currentEngineIndex = -1;
     this._table.hidden = true;
   },
 
-  _indexOfTableItem: function(elt) {
+  _indexOfTableItem(elt) {
     if (elt.classList.contains("contentSearchOneOffItem")) {
       return this.numSuggestions + this._oneOffButtons.indexOf(elt);
     }
     if (elt.classList.contains("contentSearchSettingsButton")) {
       return this.numSuggestions + this._oneOffButtons.length;
     }
     while (elt && elt.localName != "tr") {
       elt = elt.parentNode;
     }
     if (!elt) {
       throw new Error("Element is not a row");
     }
     return elt.rowIndex;
   },
 
-  _makeTable: function(id) {
+  _makeTable(id) {
     this._table = document.createElementNS(HTML_NS, "table");
     this._table.id = id;
     this._table.hidden = true;
     this._table.classList.add("contentSearchSuggestionTable");
     this._table.setAttribute("role", "presentation");
 
     // When the search input box loses focus, we want to immediately give focus
     // back to it if the blur was because the user clicked somewhere in the table.
@@ -810,17 +810,17 @@ ContentSearchUIController.prototype = {
     button.id = "contentSearchSettingsButton";
     button.addEventListener("click", this);
     button.addEventListener("mousemove", this);
     this._table.appendChild(button);
 
     return this._table;
   },
 
-  _setUpOneOffButtons: function() {
+  _setUpOneOffButtons() {
     // Sometimes we receive a CurrentEngine message from the ContentSearch service
     // before we've received a State message - i.e. before we have our engines.
     if (!this._engines) {
       return;
     }
 
     while (this._oneOffsTable.firstChild.nextSibling) {
       this._oneOffsTable.firstChild.nextSibling.remove();
@@ -891,20 +891,20 @@ ContentSearchUIController.prototype = {
       cell.appendChild(button);
       this._oneOffButtons.push(button);
     }
     row.appendChild(cell);
     this._oneOffsTable.appendChild(row);
     this._oneOffsTable.hidden = false;
   },
 
-  _sendMsg: function(type, data = null) {
+  _sendMsg(type, data = null) {
     dispatchEvent(new CustomEvent("ContentSearchClient", {
       detail: {
-        type: type,
-        data: data,
+        type,
+        data,
       },
     }));
   },
 };
 
 return ContentSearchUIController;
 })();
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -19,87 +19,87 @@ function pageInfoTreeView(treeid, copyco
   this.sortcol = -1;
   this.sortdir = false;
 }
 
 pageInfoTreeView.prototype = {
   set rowCount(c) { throw "rowCount is a readonly property"; },
   get rowCount() { return this.rows; },
 
-  setTree: function(tree)
+  setTree(tree)
   {
     this.tree = tree;
   },
 
-  getCellText: function(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: function(row, column, value)
+  setCellValue(row, column, value)
   {
   },
 
-  setCellText: function(row, column, value)
+  setCellText(row, column, value)
   {
     this.data[row][column.index] = value;
   },
 
-  addRow: function(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: function(rows)
+  addRows(rows)
   {
     for (let row of rows) {
       this.addRow(row);
     }
   },
 
-  rowCountChanged: function(index, count)
+  rowCountChanged(index, count)
   {
     this.tree.rowCountChanged(index, count);
   },
 
-  invalidate: function()
+  invalidate()
   {
     this.tree.invalidate();
   },
 
-  clear: function()
+  clear()
   {
     if (this.tree)
       this.tree.rowCountChanged(0, -this.rows);
     this.rows = 0;
     this.data = [ ];
   },
 
-  handleCopy: function(row)
+  handleCopy(row)
   {
     return (row < 0 || this.copycol < 0) ? "" : (this.data[row][this.copycol] || "");
   },
 
-  performActionOnRow: function(action, row)
+  performActionOnRow(action, row)
   {
     if (action == "copy") {
       var data = this.handleCopy(row)
       this.tree.treeBody.parentNode.setAttribute("copybuffer", data);
     }
   },
 
-  onPageMediaSort : function(columnname)
+  onPageMediaSort(columnname)
   {
     var tree = document.getElementById(this.treeid);
     var treecol = tree.columns.getNamedColumn(columnname);
 
     this.sortdir =
       gTreeUtils.sort(
         tree,
         this,
@@ -116,39 +116,39 @@ pageInfoTreeView.prototype = {
     });
     treecol.element.setAttribute("sortActive", "true");
     treecol.element.setAttribute("sortDirection", this.sortdir ?
                                                   "ascending" : "descending");
 
     this.sortcol = treecol.index;
   },
 
-  getRowProperties: function(row) { return ""; },
-  getCellProperties: function(row, column) { return ""; },
-  getColumnProperties: function(column) { return ""; },
-  isContainer: function(index) { return false; },
-  isContainerOpen: function(index) { return false; },
-  isSeparator: function(index) { return false; },
-  isSorted: function() { return this.sortcol > -1 },
-  canDrop: function(index, orientation) { return false; },
-  drop: function(row, orientation) { return false; },
-  getParentIndex: function(index) { return 0; },
-  hasNextSibling: function(index, after) { return false; },
-  getLevel: function(index) { return 0; },
-  getImageSrc: function(row, column) { },
-  getProgressMode: function(row, column) { },
-  getCellValue: function(row, column) { },
-  toggleOpenState: function(index) { },
-  cycleHeader: function(col) { },
-  selectionChanged: function() { },
-  cycleCell: function(row, column) { },
-  isEditable: function(row, column) { return false; },
-  isSelectable: function(row, column) { return false; },
-  performAction: function(action) { },
-  performActionOnCell: function(action, row, column) { }
+  getRowProperties(row) { return ""; },
+  getCellProperties(row, column) { return ""; },
+  getColumnProperties(column) { return ""; },
+  isContainer(index) { return false; },
+  isContainerOpen(index) { return false; },
+  isSeparator(index) { return false; },
+  isSorted() { return this.sortcol > -1 },
+  canDrop(index, orientation) { return false; },
+  drop(row, orientation) { return false; },
+  getParentIndex(index) { return 0; },
+  hasNextSibling(index, after) { return false; },
+  getLevel(index) { return 0; },
+  getImageSrc(row, column) { },
+  getProgressMode(row, column) { },
+  getCellValue(row, column) { },
+  toggleOpenState(index) { },
+  cycleHeader(col) { },
+  selectionChanged() { },
+  cycleCell(row, column) { },
+  isEditable(row, column) { return false; },
+  isSelectable(row, column) { return false; },
+  performAction(action) { },
+  performActionOnCell(action, row, column) { }
 };
 
 // mmm, yummy. global variables.
 var gDocInfo = null;
 var gImageElement = null;
 
 // column number to help using the data array
 const COL_IMAGE_ADDRESS = 0;
@@ -354,17 +354,17 @@ function loadPageInfo(frameOuterWindowID
   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");
 
   // Look for pageInfoListener in content.js. Sends message to listener with arguments.
   mm.sendAsyncMessage("PageInfo:getData", {strings: gStrings,
-                      frameOuterWindowID: frameOuterWindowID},
+                      frameOuterWindowID},
                       { imageElement });
 
   let pageInfoData;
 
   // Get initial pageInfoData needed to display the general, feeds, permission and security tabs.
   mm.addMessageListener("PageInfo:data", function onmessage(message) {
     mm.removeMessageListener("PageInfo:data", onmessage);
     pageInfoData = message.data;
@@ -512,20 +512,20 @@ function toggleGroupbox(id)
       elt.flex = 0;
     }
   }
 }
 
 function openCacheEntry(key, cb)
 {
   var checkCacheListener = {
-    onCacheEntryCheck: function(entry, appCache) {
+    onCacheEntryCheck(entry, appCache) {
       return Components.interfaces.nsICacheEntryOpenCallback.ENTRY_WANTED;
     },
-    onCacheEntryAvailable: function(entry, isNew, appCache, status) {
+    onCacheEntryAvailable(entry, isNew, appCache, status) {
       cb(entry);
     }
   };
   diskStorage.asyncOpenURI(Services.io.newURI(key, null, null), "", nsICacheStorage.OPEN_READONLY, checkCacheListener);
 }
 
 function makeGeneralTab(metaViewRows, docInfo)
 {
@@ -999,17 +999,17 @@ function makeBlockImage(url)
       checkbox.checked = perm == nsIPermissionManager.DENY_ACTION;
     }
     else
       checkbox.hidden = true;
   }
 }
 
 var imagePermissionObserver = {
-  observe: function(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");
--- a/browser/base/content/pageinfo/permissions.js
+++ b/browser/base/content/pageinfo/permissions.js
@@ -15,17 +15,17 @@ 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: function(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();
--- a/browser/base/content/pageinfo/security.js
+++ b/browser/base/content/pageinfo/security.js
@@ -4,28 +4,28 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 Components.utils.import("resource://gre/modules/BrowserUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper",
                                   "resource://gre/modules/LoginHelper.jsm");
 
 var security = {
-  init: function(uri, windowInfo) {
+  init(uri, windowInfo) {
     this.uri = uri;
     this.windowInfo = windowInfo;
   },
 
   // Display the server certificate (static)
-  viewCert : function() {
+  viewCert() {
     var cert = security._cert;
     viewCertHelper(window, cert);
   },
 
-  _getSecurityInfo : function() {
+  _getSecurityInfo() {
     const nsISSLStatusProvider = Components.interfaces.nsISSLStatusProvider;
     const nsISSLStatus = Components.interfaces.nsISSLStatus;
 
     // We don't have separate info for a frame, return null until further notice
     // (see bug 138479)
     if (!this.windowInfo.isTopWindow)
       return null;
 
@@ -49,25 +49,25 @@ var security = {
 
     if (!isInsecure && status) {
       status.QueryInterface(nsISSLStatus);
       var cert = status.serverCert;
       var issuerName =
         this.mapIssuerOrganization(cert.issuerOrganization) || cert.issuerName;
 
       var retval = {
-        hostName : hostName,
+        hostName,
         cAName : issuerName,
         encryptionAlgorithm : undefined,
         encryptionStrength : undefined,
         version: undefined,
-        isBroken : isBroken,
-        isMixed : isMixed,
-        isEV : isEV,
-        cert : cert,
+        isBroken,
+        isMixed,
+        isEV,
+        cert,
         certificateTransparency : undefined
       };
 
       var version;
       try {
         retval.encryptionAlgorithm = status.cipherName;
         retval.encryptionStrength = status.secretKeyLength;
         version = status.protocolVersion;
@@ -112,52 +112,52 @@ var security = {
         case nsISSLStatus.CERTIFICATE_TRANSPARENCY_INVALID:
           retval.certificateTransparency = "Invalid";
           break;
       }
 
       return retval;
     }
     return {
-      hostName : hostName,
+      hostName,
       cAName : "",
       encryptionAlgorithm : "",
       encryptionStrength : 0,
       version: "",
-      isBroken : isBroken,
-      isMixed : isMixed,
-      isEV : isEV,
+      isBroken,
+      isMixed,
+      isEV,
       cert : null,
       certificateTransparency : null
     };
   },
 
   // Find the secureBrowserUI object (if present)
-  _getSecurityUI : function() {
+  _getSecurityUI() {
     if (window.opener.gBrowser)
       return window.opener.gBrowser.securityUI;
     return null;
   },
 
   // Interface for mapping a certificate issuer organization to
   // the value to be displayed.
   // Bug 82017 - this implementation should be moved to pipnss C++ code
-  mapIssuerOrganization: function(name) {
+  mapIssuerOrganization(name) {
     if (!name) return null;
 
     if (name == "RSA Data Security, Inc.") return "Verisign, Inc.";
 
     // No mapping required
     return name;
   },
 
   /**
    * Open the cookie manager window
    */
-  viewCookies : function()
+  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;
@@ -176,17 +176,17 @@ var security = {
     else
       window.openDialog("chrome://browser/content/preferences/cookies.xul",
                         "Browser:Cookies", "", {filterString : eTLD});
   },
 
   /**
    * Open the login manager window
    */
-  viewPasswords : function() {
+  viewPasswords() {
     LoginHelper.openPasswordManager(window, this._getSecurityInfo().hostName);
   },
 
   _cert : null
 };
 
 function securityOnLoad(uri, windowInfo) {
   security.init(uri, windowInfo);
--- a/browser/base/content/sanitize.js
+++ b/browser/base/content/sanitize.js
@@ -33,24 +33,24 @@ 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: function(aItemName)
+  clearItem(aItemName)
   {
     this.items[aItemName].clear();
   },
 
   prefDomain: "",
 
-  getNameFromPreference: function(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
@@ -511,27 +511,27 @@ Sanitizer.prototype = {
         if (seenException) {
           throw seenException;
         }
       })
     },
 
     openWindows: {
       privateStateForNewWindow: "non-private",
-      _canCloseWindow: function(aWindow) {
+      _canCloseWindow(aWindow) {
         if (aWindow.CanCloseWindow()) {
           // We already showed PermitUnload for the window, so let's
           // make sure we don't do it again when we actually close the
           // window.
           aWindow.skipNextCanClose = true;
           return true;
         }
         return false;
       },
-      _resetAllWindowClosures: function(aWindowList) {
+      _resetAllWindowClosures(aWindowList) {
         for (let win of aWindowList) {
           win.skipNextCanClose = false;
         }
       },
       clear: Task.async(function* () {
         // NB: this closes all *browser* windows, not other windows like the library, about window,
         // browser console, etc.
 
--- a/browser/base/content/social-content.js
+++ b/browser/base/content/social-content.js
@@ -109,17 +109,17 @@ const SocialErrorListener = {
       // Unable to access frame.docShell here. This is our own frame and doesn't
       // provide reload, so we'll just set the src.
       frame.setAttribute("src", url);
     } else {
       let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
       webNav.loadURI(url, null, null, null, null);
     }
     sendAsyncMessage("Social:ErrorPageNotify", {
-        origin: origin,
+        origin,
         url: src
     });
   },
 
   onStateChange(aWebProgress, aRequest, aState, aStatus) {
     let failure = false;
     if ((aState & Ci.nsIWebProgressListener.STATE_IS_REQUEST))
       return;
--- a/browser/base/content/sync/aboutSyncTabs.js
+++ b/browser/base/content/sync/aboutSyncTabs.js
@@ -18,50 +18,50 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 if (AppConstants.MOZ_SERVICES_CLOUDSYNC) {
   XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
                                     "resource://gre/modules/CloudSync.jsm");
 }
 
 var RemoteTabViewer = {
   _tabsList: null,
 
-  init: function() {
+  init() {
     Services.obs.addObserver(this, "weave:service:login:finish", false);
     Services.obs.addObserver(this, "weave:engine:sync:finish", false);
 
     Services.obs.addObserver(this, "cloudsync:tabs:update", false);
 
     this._tabsList = document.getElementById("tabsList");
 
     this.buildList(true);
   },
 
-  uninit: function() {
+  uninit() {
     Services.obs.removeObserver(this, "weave:service:login:finish");
     Services.obs.removeObserver(this, "weave:engine:sync:finish");
 
     Services.obs.removeObserver(this, "cloudsync:tabs:update");
   },
 
-  createItem: function(attrs) {
+  createItem(attrs) {
     let item = document.createElement("richlistitem");
 
     // Copy the attributes from the argument into the item.
     for (let attr in attrs) {
       item.setAttribute(attr, attrs[attr]);
     }
 
     if (attrs["type"] == "tab") {
       item.label = attrs.title != "" ? attrs.title : attrs.url;
     }
 
     return item;
   },
 
-  filterTabs: function(event) {
+  filterTabs(event) {
     let val = event.target.value.toLowerCase();
     let numTabs = this._tabsList.getRowCount();
     let clientTabs = 0;
     let currentClient = null;
 
     for (let i = 0; i < numTabs; i++) {
       let item = this._tabsList.getItemAtIndex(i);
       let hide = false;
@@ -84,48 +84,48 @@ var RemoteTabViewer = {
       }
       item.hidden = hide;
     }
     if (clientTabs == 0) {
       currentClient.hidden = true;
     }
   },
 
-  openSelected: function() {
+  openSelected() {
     let items = this._tabsList.selectedItems;
     let urls = [];
     for (let i = 0; i < items.length; i++) {
       if (items[i].getAttribute("type") == "tab") {
         urls.push(items[i].getAttribute("url"));
         let index = this._tabsList.getIndexOfItem(items[i]);
         this._tabsList.removeItemAt(index);
       }
     }
     if (urls.length) {
       getTopWin().gBrowser.loadTabs(urls);
       this._tabsList.clearSelection();
     }
   },
 
-  bookmarkSingleTab: function() {
+  bookmarkSingleTab() {
     let item = this._tabsList.selectedItems[0];
     let uri = Weave.Utils.makeURI(item.getAttribute("url"));
     let title = item.getAttribute("title");
     PlacesUIUtils.showBookmarkDialog({ action: "add"
                                      , type: "bookmark"
-                                     , uri: uri
-                                     , title: title
+                                     , uri
+                                     , title
                                      , hiddenRows: [ "description"
                                                    , "location"
                                                    , "loadInSidebar"
                                                    , "keyword" ]
                                      }, window.top);
   },
 
-  bookmarkSelectedTabs: function() {
+  bookmarkSelectedTabs() {
     let items = this._tabsList.selectedItems;
     let URIs = [];
     for (let i = 0; i < items.length; i++) {
       if (items[i].getAttribute("type") == "tab") {
         let uri = Weave.Utils.makeURI(items[i].getAttribute("url"));
         if (!uri) {
           continue;
         }
@@ -137,33 +137,33 @@ var RemoteTabViewer = {
       PlacesUIUtils.showBookmarkDialog({ action: "add"
                                        , type: "folder"
                                        , URIList: URIs
                                        , hiddenRows: [ "description" ]
                                        }, window.top);
     }
   },
 
-  getIcon: function(iconUri, defaultIcon) {
+  getIcon(iconUri, defaultIcon) {
     try {
       let iconURI = Weave.Utils.makeURI(iconUri);
       return PlacesUtils.favicons.getFaviconLinkForIcon(iconURI).spec;
     } catch (ex) {
       // Do nothing.
     }
 
     // Just give the provided default icon or the system's default.
     return defaultIcon || PlacesUtils.favicons.defaultFavicon.spec;
   },
 
   _waitingForBuildList: false,
 
   _buildListRequested: false,
 
-  buildList: function(forceSync) {
+  buildList(forceSync) {
     if (this._waitingForBuildList) {
       this._buildListRequested = true;
       return;
     }
 
     this._waitingForBuildList = true;
     this._buildListRequested = false;
 
@@ -187,29 +187,29 @@ var RemoteTabViewer = {
     if (CloudSync && CloudSync.ready && CloudSync().tabsReady && CloudSync().tabs.hasRemoteTabs()) {
       this._generateCloudSyncTabList()
           .then(complete, complete);
     } else {
       complete();
     }
   },
 
-  _clearTabList: function() {
+  _clearTabList() {
     let list = this._tabsList;
 
     // Clear out existing richlistitems.
     let count = list.getRowCount();
     if (count > 0) {
       for (let i = count - 1; i >= 0; i--) {
         list.removeItemAt(i);
       }
     }
   },
 
-  _generateWeaveTabList: function() {
+  _generateWeaveTabList() {
     let engine = Weave.Service.engineManager.get("tabs");
     let list = this._tabsList;
 
     let seenURLs = new Set();
     let localURLs = engine.getOpenURLs();
 
     for (let [, client] of Object.entries(engine.getAllClients())) {
       // Create the client node, but don't add it in-case we don't show any tabs
@@ -231,26 +231,26 @@ var RemoteTabViewer = {
           let clientEnt = this.createItem(attrs);
           list.appendChild(clientEnt);
           appendClient = false;
           clientEnt.disabled = true;
         }
         let attrs = {
           type:  "tab",
           title: title || url,
-          url:   url,
+          url,
           icon:  this.getIcon(icon),
         }
         let tab = this.createItem(attrs);
         list.appendChild(tab);
       }, this);
     }
   },
 
-  _generateCloudSyncTabList: function() {
+  _generateCloudSyncTabList() {
     let updateTabList = function(remoteTabs) {
       let list = this._tabsList;
 
       for (let client of remoteTabs) {
         let clientAttrs = {
           type: "client",
           clientName: client.name,
         };
@@ -270,17 +270,17 @@ var RemoteTabViewer = {
         }
       }
     }.bind(this);
 
     return CloudSync().tabs.getRemoteTabs()
                            .then(updateTabList, Promise.reject.bind(Promise));
   },
 
-  adjustContextMenu: function(event) {
+  adjustContextMenu(event) {
     let mode = "all";
     switch (this._tabsList.selectedItems.length) {
       case 0:
         break;
       case 1:
         mode = "single"
         break;
       default:
@@ -295,17 +295,17 @@ var RemoteTabViewer = {
       if (showFor) {
         el.hidden = showFor != mode && showFor != "all";
       }
 
       el = el.nextSibling;
     }
   },
 
-  _refetchTabs: function(force) {
+  _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) {
         /* Just use the default value of 0 */
@@ -320,17 +320,17 @@ var RemoteTabViewer = {
     // Ask Sync to just do the tabs engine if it can.
     Weave.Service.sync(["tabs"]);
     Services.prefs.setIntPref("services.sync.lastTabFetch",
                               Math.floor(Date.now() / 1000));
 
     return true;
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case "weave:service:login:finish":
         // A login has finished, which means that a Sync is about to start and
         // we will eventually get to the "tabs" engine - but try and force the
         // tab engine to sync first by passing |true| for the forceSync param.
         this.buildList(true);
         break;
       case "weave:engine:sync:finish":
@@ -341,17 +341,17 @@ var RemoteTabViewer = {
         }
         break;
       case "cloudsync:tabs:update":
         this.buildList(false);
         break;
     }
   },
 
-  handleClick: function(event) {
+  handleClick(event) {
     if (event.target.getAttribute("type") != "tab") {
       return;
     }
 
     if (event.button == 1) {
       let url = event.target.getAttribute("url");
       openUILink(url, event);
       let index = this._tabsList.getIndexOfItem(event.target);
--- a/browser/base/content/sync/genericChange.js
+++ b/browser/base/content/sync/genericChange.js
@@ -131,28 +131,28 @@ var Change = {
     this._dialog.getButton("finish").disabled = !error;
     document.getElementById("printSyncKeyButton").disabled = !error;
     document.getElementById("saveSyncKeyButton").disabled = !error;
 
     if (state == "success")
       window.setTimeout(window.close, 1500);
   },
 
-  onDialogAccept: function() {
+  onDialogAccept() {
     switch (this._dialogType) {
       case "UpdatePassphrase":
       case "ResetPassphrase":
         return this.doChangePassphrase();
       case "ChangePassword":
         return this.doChangePassword();
     }
     return undefined;
   },
 
-  doGeneratePassphrase: function() {
+  doGeneratePassphrase() {
     let passphrase = Weave.Utils.generatePassphrase();
     this._passphraseBox.value = Weave.Utils.hyphenatePassphrase(passphrase);
     this._dialog.getButton("finish").disabled = false;
   },
 
   doChangePassphrase: function Change_doChangePassphrase() {
     let pp = Weave.Utils.normalizePassphrase(this._passphraseBox.value);
     if (this._updatingPassphrase) {
@@ -196,17 +196,17 @@ var Change = {
         this._updateStatus("change.password.status.success", "success");
       else
         this._updateStatus("change.password.status.error", "error");
     }
 
     return false;
   },
 
-  validate: function(event) {
+  validate(event) {
     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);
--- a/browser/base/content/sync/setup.js
+++ b/browser/base/content/sync/setup.js
@@ -56,17 +56,17 @@ var gSyncSetup = {
   },
 
   get _usingMainServers() {
     if (this._settingUpNew)
       return document.getElementById("server").selectedIndex == 0;
     return document.getElementById("existingServer").selectedIndex == 0;
   },
 
-  init: function() {
+  init() {
     let obs = [
       ["weave:service:change-passphrase", "onResetPassphrase"],
       ["weave:service:login:start",       "onLoginStart"],
       ["weave:service:login:error",       "onLoginEnd"],
       ["weave:service:login:finish",      "onLoginEnd"]];
 
     // Add the observers now and remove them on unload
     let self = this;
@@ -116,24 +116,24 @@ var gSyncSetup = {
     this._nextButtonLabel = this.wizard.getButton("next").label;
     this._nextButtonAccesskey = this.wizard.getButton("next")
                                            .getAttribute("accesskey");
     this._backButtonLabel = this.wizard.getButton("back").label;
     this._backButtonAccesskey = this.wizard.getButton("back")
                                            .getAttribute("accesskey");
   },
 
-  startNewAccountSetup: function() {
+  startNewAccountSetup() {
     if (!Weave.Utils.ensureMPUnlocked())
       return;
     this._settingUpNew = true;
     this.wizard.pageIndex = NEW_ACCOUNT_START_PAGE;
   },
 
-  useExistingAccount: function() {
+  useExistingAccount() {
     if (!Weave.Utils.ensureMPUnlocked())
       return;
     this._settingUpNew = false;
     if (this.wizardType == "pair") {
       // We're already pairing, so there's no point in pairing again.
       // Go straight to the manual login page.
       this.wizard.pageIndex = EXISTING_ACCOUNT_LOGIN_PAGE;
     } else {
@@ -168,46 +168,46 @@ var gSyncSetup = {
 
     // changePassphrase() will sync, make sure we set the "firstSync" pref
     // according to the user's pref.
     Weave.Svc.Prefs.reset("firstSync");
     this.setupInitialSync();
     gSyncUtils.resetPassphrase(true);
   },
 
-  onResetPassphrase: function() {
+  onResetPassphrase() {
     document.getElementById("existingPassphrase").value =
       Weave.Utils.hyphenatePassphrase(Weave.Service.identity.syncKey);
     this.checkFields();
     this.wizard.advance();
   },
 
-  onLoginStart: function() {
+  onLoginStart() {
     this.toggleLoginFeedback(false);
   },
 
-  onLoginEnd: function() {
+  onLoginEnd() {
     this.toggleLoginFeedback(true);
   },
 
-  sendCredentialsAfterSync: function() {
+  sendCredentialsAfterSync() {
     let send = function() {
       Services.obs.removeObserver("weave:service:sync:finish", send);
       Services.obs.removeObserver("weave:service:sync:error", send);
       let credentials = {account:   Weave.Service.identity.account,
                          password:  Weave.Service.identity.basicPassword,
                          synckey:   Weave.Service.identity.syncKey,
                          serverURL: Weave.Service.serverURL};
       this._jpakeclient.sendAndComplete(credentials);
     }.bind(this);
     Services.obs.addObserver("weave:service:sync:finish", send, false);
     Services.obs.addObserver("weave:service:sync:error", send, false);
   },
 
-  toggleLoginFeedback: function(stop) {
+  toggleLoginFeedback(stop) {
     document.getElementById("login-throbber").hidden = stop;
     let password = document.getElementById("existingPasswordFeedbackRow");
     let server = document.getElementById("existingServerFeedbackRow");
     let passphrase = document.getElementById("existingPassphraseFeedbackRow");
 
     if (!stop || (Weave.Status.login == Weave.LOGIN_SUCCEEDED)) {
       password.hidden = server.hidden = passphrase.hidden = true;
       return;
@@ -226,38 +226,38 @@ var gSyncSetup = {
         break;
       case Weave.LOGIN_FAILED_INVALID_PASSPHRASE:
         feedback = passphrase;
         break;
     }
     this._setFeedbackMessage(feedback, false, Weave.Status.login);
   },
 
-  setupInitialSync: function() {
+  setupInitialSync() {
     let action = document.getElementById("mergeChoiceRadio").selectedItem.id;
     switch (action) {
       case "resetClient":
         // if we're not resetting sync, we don't need to explicitly
         // call resetClient
         if (!this._resettingSync)
           return;
         // otherwise, fall through
       case "wipeClient":
       case "wipeRemote":
         Weave.Svc.Prefs.set("firstSync", action);
         break;
     }
   },
 
   // fun with validation!
-  checkFields: function() {
+  checkFields() {
     this.wizard.canAdvance = this.readyToAdvance();
   },
 
-  readyToAdvance: function() {
+  readyToAdvance() {
     switch (this.wizard.pageIndex) {
       case INTRO_PAGE:
         return false;
       case NEW_ACCOUNT_START_PAGE:
         for (let i in this.status) {
           if (!this.status[i])
             return false;
         }
@@ -288,26 +288,26 @@ var gSyncSetup = {
     if (textbox && textbox.value.length == PIN_PART_LENGTH) {
       this.nextFocusEl[textbox.id].focus();
     }
     this.wizard.canAdvance = (this.pin1.value.length == PIN_PART_LENGTH &&
                               this.pin2.value.length == PIN_PART_LENGTH &&
                               this.pin3.value.length == PIN_PART_LENGTH);
   },
 
-  onEmailInput: function() {
+  onEmailInput() {
     // Check account validity when the user stops typing for 1 second.
     if (this._checkAccountTimer)
       window.clearTimeout(this._checkAccountTimer);
     this._checkAccountTimer = window.setTimeout(function() {
       gSyncSetup.checkAccount();
     }, 1000);
   },
 
-  checkAccount: function() {
+  checkAccount() {
     delete this._checkAccountTimer;
     let value = Weave.Utils.normalizeAccount(
       document.getElementById("weaveEmail").value);
     if (!value) {
       this.status.email = false;
       this.checkFields();
       return;
     }
@@ -332,29 +332,29 @@ var gSyncSetup = {
 
     this._setFeedbackMessage(feedback, valid, str);
     this.status.email = valid;
     if (valid)
       Weave.Service.identity.account = value;
     this.checkFields();
   },
 
-  onPasswordChange: function() {
+  onPasswordChange() {
     let password = document.getElementById("weavePassword");
     let pwconfirm = document.getElementById("weavePasswordConfirm");
     let [valid, errorString] = gSyncUtils.validatePassword(password, pwconfirm);
 
     let feedback = document.getElementById("passwordFeedbackRow");
     this._setFeedback(feedback, valid, errorString);
 
     this.status.password = valid;
     this.checkFields();
   },
 
-  onPageShow: function() {
+  onPageShow() {
     switch (this.wizard.pageIndex) {
       case PAIR_PAGE:
         this.wizard.getButton("back").hidden = true;
         this.wizard.getButton("extra1").hidden = true;
         this.onPINInput();
         this.pin1.focus();
         break;
       case INTRO_PAGE:
@@ -415,17 +415,17 @@ var gSyncSetup = {
         this.wizard.getButton("back").removeAttribute("accesskey");
         this.wizard.getButton("back").hidden = this._resettingSync;
         this.wizard.getButton("next").hidden = false;
         this.wizard.getButton("finish").hidden = true;
         break;
     }
   },
 
-  onWizardAdvance: function() {
+  onWizardAdvance() {
     // Check pageIndex so we don't prompt before the Sync setup wizard appears.
     // This is a fallback in case the Master Password gets locked mid-wizard.
     if ((this.wizard.pageIndex >= 0) &&
         !Weave.Utils.ensureMPUnlocked()) {
       return false;
     }
 
     switch (this.wizard.pageIndex) {
@@ -504,17 +504,17 @@ var gSyncSetup = {
           this.wizardFinish();
           return false;
         }
         return this.returnFromOptions();
     }
     return true;
   },
 
-  onWizardBack: function() {
+  onWizardBack() {
     switch (this.wizard.pageIndex) {
       case NEW_ACCOUNT_START_PAGE:
         this.wizard.pageIndex = INTRO_PAGE;
         return false;
       case EXISTING_ACCOUNT_CONNECT_PAGE:
         this.abortEasySetup();
         this.wizard.pageIndex = INTRO_PAGE;
         return false;
@@ -530,17 +530,17 @@ var gSyncSetup = {
       case OPTIONS_CONFIRM_PAGE:
         // Backing up from the confirmation page = resetting first sync to merge.
         document.getElementById("mergeChoiceRadio").selectedIndex = 0;
         return this.returnFromOptions();
     }
     return true;
   },
 
-  wizardFinish: function() {
+  wizardFinish() {
     this.setupInitialSync();
 
     if (this.wizardType == "pair") {
       this.completePairing();
     }
 
     if (!this._resettingSync) {
       function isChecked(element) {
@@ -558,31 +558,31 @@ var gSyncSetup = {
 
       Weave.Service.persistLogin();
       Weave.Svc.Obs.notify("weave:service:setup-complete");
     }
     Weave.Utils.nextTick(Weave.Service.sync, Weave.Service);
     window.close();
   },
 
-  onWizardCancel: function() {
+  onWizardCancel() {
     if (this._resettingSync)
       return;
 
     this.abortEasySetup();
     this._handleNoScript(false);
     Weave.Service.startOver();
   },
 
-  onSyncOptions: function() {
+  onSyncOptions() {
     this._beforeOptionsPage = this.wizard.pageIndex;
     this.wizard.pageIndex = OPTIONS_PAGE;
   },
 
-  returnFromOptions: function() {
+  returnFromOptions() {
     this.wizard.getButton("next").label = this._nextButtonLabel;
     this.wizard.getButton("next").setAttribute("accesskey",
                                                this._nextButtonAccesskey);
     this.wizard.getButton("back").label = this._backButtonLabel;
     this.wizard.getButton("back").setAttribute("accesskey",
                                                this._backButtonAccesskey);
     this.wizard.getButton("cancel").hidden = false;
     this.wizard.getButton("extra1").hidden = false;
@@ -639,17 +639,17 @@ var gSyncSetup = {
       // have to pair again?
       return;
     }
     let controller = new Weave.SendCredentialsController(this._jpakeclient,
                                                          Weave.Service);
     this._jpakeclient.controller = controller;
   },
 
-  startEasySetup: function() {
+  startEasySetup() {
     // Don't do anything if we have a client already (e.g. we went to
     // Sync Options and just came back).
     if (this._jpakeclient)
       return;
 
     // When onAbort is called, Weave may already be gone
     const JPAKE_ERROR_USERABORT = Weave.JPAKE_ERROR_USERABORT;
 
@@ -686,36 +686,36 @@ var gSyncSetup = {
 
         // Restart on all other errors.
         self.startEasySetup();
       }
     });
     this._jpakeclient.receiveNoPIN();
   },
 
-  abortEasySetup: function() {
+  abortEasySetup() {
     document.getElementById("easySetupPIN1").value = "";
     document.getElementById("easySetupPIN2").value = "";
     document.getElementById("easySetupPIN3").value = "";
     if (!this._jpakeclient)
       return;
 
     this._jpakeclient.abort();
     delete this._jpakeclient;
   },
 
-  manualSetup: function() {
+  manualSetup() {
     this.abortEasySetup();
     this.wizard.pageIndex = EXISTING_ACCOUNT_LOGIN_PAGE;
   },
 
   // _handleNoScript is needed because it blocks the captcha. So we temporarily
   // allow the necessary sites so that we can verify the user is in fact a human.
   // This was done with the help of Giorgio (NoScript author). See bug 508112.
-  _handleNoScript: function(addExceptions) {
+  _handleNoScript(addExceptions) {
     // if NoScript isn't installed, or is disabled, bail out.
     let ns = Cc["@maone.net/noscript-service;1"];
     if (ns == null)
       return;
 
     ns = ns.getService().wrappedJSObject;
     if (addExceptions) {
       this._remoteSites.forEach(function(site) {
@@ -729,42 +729,42 @@ var gSyncSetup = {
     else {
       this._disabledSites.forEach(function(site) {
         ns.setJSEnabled(site, false);
       });
       this._disabledSites = [];
     }
   },
 
-  onExistingServerCommand: function() {
+  onExistingServerCommand() {
     let control = document.getElementById("existingServer");
     if (control.selectedIndex == 0) {
       control.removeAttribute("editable");
       Weave.Svc.Prefs.reset("serverURL");
     } else {
       control.setAttribute("editable", "true");
       // Force a style flush to ensure that the binding is attached.
       control.clientTop;
       control.value = "";
       control.inputField.focus();
     }
     document.getElementById("existingServerFeedbackRow").hidden = true;
     this.checkFields();
   },
 
-  onExistingServerInput: function() {
+  onExistingServerInput() {
     // Check custom server validity when the user stops typing for 1 second.
     if (this._existingServerTimer)
       window.clearTimeout(this._existingServerTimer);
     this._existingServerTimer = window.setTimeout(function() {
       gSyncSetup.checkFields();
     }, 1000);
   },
 
-  onServerCommand: function() {
+  onServerCommand() {
     setVisibility(document.getElementById("TOSRow"), this._usingMainServers);
     let control = document.getElementById("server");
     if (!this._usingMainServers) {
       control.setAttribute("editable", "true");
       // Force a style flush to ensure that the binding is attached.
       control.clientTop;
       control.value = "";
       control.inputField.focus();
@@ -778,26 +778,26 @@ var gSyncSetup = {
       this.loadCaptcha();
     }
     this.checkAccount();
     this.status.server = true;
     document.getElementById("serverFeedbackRow").hidden = true;
     this.checkFields();
   },
 
-  onServerInput: function() {
+  onServerInput() {
     // Check custom server validity when the user stops typing for 1 second.
     if (this._checkServerTimer)
       window.clearTimeout(this._checkServerTimer);
     this._checkServerTimer = window.setTimeout(function() {
       gSyncSetup.checkServer();
     }, 1000);
   },
 
-  checkServer: function() {
+  checkServer() {
     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);
@@ -808,17 +808,17 @@ var gSyncSetup = {
     // Recheck account against the new server.
     if (valid)
       this.checkAccount();
 
     this.status.server = valid;
     this.checkFields();
   },
 
-  _validateServer: function(element) {
+  _validateServer(element) {
     let valid = false;
     let val = element.value;
     if (!val)
       return false;
 
     let uri = Weave.Utils.makeURI(val);
 
     if (!uri)
@@ -854,17 +854,17 @@ var gSyncSetup = {
     if (valid)
       element.value = Weave.Service.serverURL;
     else
       Weave.Svc.Prefs.reset("serverURL");
 
     return valid;
   },
 
-  _handleChoice: function() {
+  _handleChoice() {
     let desc = document.getElementById("mergeChoiceRadio").selectedIndex;
     document.getElementById("chosenActionDeck").selectedIndex = desc;
     switch (desc) {
       case 1:
         if (this._case1Setup)
           break;
 
         let places_db = PlacesUtils.history
@@ -978,27 +978,27 @@ var gSyncSetup = {
         break;
     }
 
     return true;
   },
 
   // sets class and string on a feedback element
   // if no property string is passed in, we clear label/style
-  _setFeedback: function(element, success, string) {
+  _setFeedback(element, success, string) {
     element.hidden = success || !string;
     let classname = success ? "success" : "error";
     let image = element.getElementsByAttribute("class", "statusIcon")[0];
     image.setAttribute("status", classname);
     let label = element.getElementsByAttribute("class", "status")[0];
     label.value = string;
   },
 
   // shim
-  _setFeedbackMessage: function(element, success, string) {
+  _setFeedbackMessage(element, success, string) {
     let str = "";
     if (string) {
       try {
         str = this._stringBundle.GetStringFromName(string);
       } catch (e) {}
 
       if (!str)
         str = Weave.Utils.getErrorString(string);
@@ -1010,34 +1010,34 @@ var gSyncSetup = {
     let captchaURI = Weave.Service.miscAPI + "captcha_html";
     // First check for NoScript and whitelist the right sites.
     this._handleNoScript(true);
     if (this.captchaBrowser.currentURI.spec != captchaURI) {
       this.captchaBrowser.loadURI(captchaURI);
     }
   },
 
-  onStateChange: function(webProgress, request, stateFlags, status) {
+  onStateChange(webProgress, request, stateFlags, status) {
     // We're only looking for the end of the frame load
     if ((stateFlags & Ci.nsIWebProgressListener.STATE_STOP) == 0)
       return;
     if ((stateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) == 0)
       return;
     if ((stateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) == 0)
       return;
 
     // If we didn't find a captcha, assume it's not needed and don't show it.
     let responseStatus = request.QueryInterface(Ci.nsIHttpChannel).responseStatus;
     setVisibility(this.captchaBrowser, responseStatus != 404);
     // XXX TODO we should really log any responseStatus other than 200
   },
-  onProgressChange: function() {},
-  onStatusChange: function() {},
-  onSecurityChange: function() {},
-  onLocationChange: function() {}
+  onProgressChange() {},
+  onStatusChange() {},
+  onSecurityChange() {},
+  onLocationChange() {}
 };
 
 // Define lazy getters for various XUL elements.
 //
 // onWizardAdvance() and onPageShow() are run before init(), so we'll even
 // define things that will almost certainly be used (like 'wizard') as a lazy
 // getter here.
 ["wizard",
--- a/browser/base/content/sync/utils.js
+++ b/browser/base/content/sync/utils.js
@@ -17,17 +17,17 @@ var gSyncUtils = {
   get fxAccountsEnabled() {
     let service = Components.classes["@mozilla.org/weave/service;1"]
                             .getService(Components.interfaces.nsISupports)
                             .wrappedJSObject;
     return service.fxAccountsEnabled;
   },
 
   // opens in a new window if we're in a modal prefwindow world, in a new tab otherwise
-  _openLink: function(url) {
+  _openLink(url) {
     let thisDocEl = document.documentElement,
         openerDocEl = window.opener && window.opener.document.documentElement;
     if (thisDocEl.id == "accountSetup" && window.opener &&
         openerDocEl.id == "BrowserPreferences" && !openerDocEl.instantApply)
       openUILinkIn(url, "window");
     else if (thisDocEl.id == "BrowserPreferences" && !thisDocEl.instantApply)
       openUILinkIn(url, "window");
     else if (document.documentElement.id == "change-dialog")
@@ -53,61 +53,61 @@ var gSyncUtils = {
 
     // Open up the change dialog
     let changeXUL = "chrome://browser/content/sync/genericChange.xul";
     let changeOpt = "centerscreen,chrome,resizable=no";
     Services.ww.activeWindow.openDialog(changeXUL, "", changeOpt,
                                         type, duringSetup);
   },
 
-  changePassword: function() {
+  changePassword() {
     if (Weave.Utils.ensureMPUnlocked())
       this.openChange("ChangePassword");
   },
 
-  resetPassphrase: function(duringSetup) {
+  resetPassphrase(duringSetup) {
     if (Weave.Utils.ensureMPUnlocked())
       this.openChange("ResetPassphrase", duringSetup);
   },
 
-  updatePassphrase: function() {
+  updatePassphrase() {
     if (Weave.Utils.ensureMPUnlocked())
       this.openChange("UpdatePassphrase");
   },
 
-  resetPassword: function() {
+  resetPassword() {
     this._openLink(Weave.Service.pwResetURL);
   },
 
   get tosURL() {
     let root = this.fxAccountsEnabled ? "fxa." : "";
     return  Weave.Svc.Prefs.get(root + "termsURL");
   },
 
-  openToS: function() {
+  openToS() {
     this._openLink(this.tosURL);
   },
 
   get privacyPolicyURL() {
     let root = this.fxAccountsEnabled ? "fxa." : "";
     return  Weave.Svc.Prefs.get(root + "privacyURL");
   },
 
-  openPrivacyPolicy: function() {
+  openPrivacyPolicy() {
     this._openLink(this.privacyPolicyURL);
   },
 
   /**
    * Prepare an invisible iframe with the passphrase backup document.
    * Used by both the print and saving methods.
    *
    * @param elid : ID of the form element containing the passphrase.
    * @param callback : Function called once the iframe has loaded.
    */
-  _preparePPiframe: function(elid, callback) {
+  _preparePPiframe(elid, callback) {
     let pp = document.getElementById(elid).value;
 
     // Create an invisible iframe whose contents we can print.
     let iframe = document.createElement("iframe");
     iframe.setAttribute("src", "chrome://browser/content/sync/key.xhtml");
     iframe.collapsed = true;
     document.documentElement.appendChild(iframe);
     iframe.contentWindow.addEventListener("load", function() {
@@ -132,17 +132,17 @@ var gSyncUtils = {
     }, false);
   },
 
   /**
    * Print passphrase backup document.
    *
    * @param elid : ID of the form element containing the passphrase.
    */
-  passphrasePrint: function(elid) {
+  passphrasePrint(elid) {
     this._preparePPiframe(elid, function(iframe) {
       let webBrowserPrint = iframe.contentWindow
                                   .QueryInterface(Ci.nsIInterfaceRequestor)
                                   .getInterface(Ci.nsIWebBrowserPrint);
       let printSettings = PrintUtils.getPrintSettings();
 
       // Display no header/footer decoration except for the date.
       printSettings.headerStrLeft
@@ -160,17 +160,17 @@ var gSyncUtils = {
     });
   },
 
   /**
    * Save passphrase backup document to disk as HTML file.
    *
    * @param elid : ID of the form element containing the passphrase.
    */
-  passphraseSave: function(elid) {
+  passphraseSave(elid) {
     let dialogTitle = this.bundle.GetStringFromName("save.recoverykey.title");
     let defaultSaveName = this.bundle.GetStringFromName("save.recoverykey.defaultfilename");
     this._preparePPiframe(elid, function(iframe) {
       let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
       let fpCallback = function fpCallback_done(aResult) {
         if (aResult == Ci.nsIFilePicker.returnOK ||
             aResult == Ci.nsIFilePicker.returnReplace) {
           let stream = Cc["@mozilla.org/network/file-output-stream;1"].
@@ -198,17 +198,17 @@ var gSyncUtils = {
   /**
    * validatePassword
    *
    * @param el1 : the first textbox element in the form
    * @param el2 : the second textbox element, if omitted it's an update form
    *
    * returns [valid, errorString]
    */
-  validatePassword: function(el1, el2) {
+  validatePassword(el1, el2) {
     let valid = false;
     let val1 = el1.value;
     let val2 = el2 ? el2.value : "";
     let error = "";
 
     if (!el2)
       valid = val1.length >= Weave.MIN_PASS_LENGTH;
     else if (val1 && val1 == Weave.Service.identity.username)
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -22,17 +22,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode",
   "resource://gre/modules/ReaderMode.jsm");
 XPCOMUtils.defineLazyGetter(this, "SimpleServiceDiscovery", function() {
   let ssdp = Cu.import("resource://gre/modules/SimpleServiceDiscovery.jsm", {}).SimpleServiceDiscovery;
   // Register targets
   ssdp.registerDevice({
     id: "roku:ecp",
     target: "roku:ecp",
-    factory: function(aService) {
+    factory(aService) {
       Cu.import("resource://gre/modules/RokuApp.jsm");
       return new RokuApp(aService);
     },
     types: ["video/mp4"],
     extensions: ["mp4"]
   });
   return ssdp;
 });
@@ -93,82 +93,82 @@ addMessageListener("MixedContent:Reenabl
 addMessageListener("SecondScreen:tab-mirror", function(message) {
   if (!Services.prefs.getBoolPref("browser.casting.enabled")) {
     return;
   }
   let app = SimpleServiceDiscovery.findAppForService(message.data.service);
   if (app) {
     let width = content.innerWidth;
     let height = content.innerHeight;
-    let viewport = {cssWidth: width, cssHeight: height, width: width, height: height};
+    let viewport = {cssWidth: width, cssHeight: height, width, height};
     app.mirror(function() {}, content, viewport, function() {}, content);
   }
 });
 
 var AboutHomeListener = {
-  init: function(chromeGlobal) {
+  init(chromeGlobal) {
     chromeGlobal.addEventListener('AboutHomeLoad', this, false, true);
   },
 
   get isAboutHome() {
     return content.document.documentURI.toLowerCase() == "about:home";
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     if (!this.isAboutHome) {
       return;
     }
     switch (aEvent.type) {
       case "AboutHomeLoad":
         this.onPageLoad();
         break;
       case "click":
         this.onClick(aEvent);
         break;
       case "pagehide":
         this.onPageHide(aEvent);
         break;
     }
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     if (!this.isAboutHome) {
       return;
     }
     switch (aMessage.name) {
       case "AboutHome:Update":
         this.onUpdate(aMessage.data);
         break;
     }
   },
 
-  onUpdate: function(aData) {
+  onUpdate(aData) {
     let doc = content.document;
     if (aData.showRestoreLastSession && !PrivateBrowsingUtils.isContentWindowPrivate(content))
       doc.getElementById("launcher").setAttribute("session", "true");
 
     // Inject search engine and snippets URL.
     let docElt = doc.documentElement;
     // Set snippetsVersion last, which triggers to show the snippets when it's set.
     docElt.setAttribute("snippetsURL", aData.snippetsURL);
     if (aData.showKnowYourRights)
       docElt.setAttribute("showKnowYourRights", "true");
     docElt.setAttribute("snippetsVersion", aData.snippetsVersion);
   },
 
-  onPageLoad: function() {
+  onPageLoad() {
     addMessageListener("AboutHome:Update", this);
     addEventListener("click", this, true);
     addEventListener("pagehide", this, true);
 
     sendAsyncMessage("AboutHome:MaybeShowAutoMigrationUndoNotification");
     sendAsyncMessage("AboutHome:RequestUpdate");
   },
 
-  onClick: function(aEvent) {
+  onClick(aEvent) {
     if (!aEvent.isTrusted || // Don't trust synthetic events
         aEvent.button == 2 || aEvent.target.localName != "button") {
       return;
     }
 
     let originalTarget = aEvent.originalTarget;
     let ownerDoc = originalTarget.ownerDocument;
     if (ownerDoc.documentURI != "about:home") {
@@ -205,17 +205,17 @@ var AboutHomeListener = {
         break;
 
       case "settings":
         sendAsyncMessage("AboutHome:Settings");
         break;
     }
   },
 
-  onPageHide: function(aEvent) {
+  onPageHide(aEvent) {
     if (aEvent.target.defaultView.frameElement) {
       return;
     }
     removeMessageListener("AboutHome:Update", this);
     removeEventListener("click", this, true);
     removeEventListener("pagehide", this, true);
   },
 };
@@ -255,26 +255,26 @@ var AboutPrivateBrowsingListener = {
 AboutPrivateBrowsingListener.init(this);
 
 var AboutReaderListener = {
 
   _articlePromise: null,
 
   _isLeavingReaderMode: false,
 
-  init: function() {
+  init() {
     addEventListener("AboutReaderContentLoaded", this, false, true);
     addEventListener("DOMContentLoaded", this, false);
     addEventListener("pageshow", this, false);
     addEventListener("pagehide", this, false);
     addMessageListener("Reader:ToggleReaderMode", this);
     addMessageListener("Reader:PushState", this);
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     switch (message.name) {
       case "Reader:ToggleReaderMode":
         if (!this.isAboutReader) {
           this._articlePromise = ReaderMode.parseDocument(content.document).catch(Cu.reportError);
           ReaderMode.enterReaderMode(docShell, content);
         } else {
           this._isLeavingReaderMode = true;
           ReaderMode.leaveReaderMode(docShell, content);
@@ -289,17 +289,17 @@ var AboutReaderListener = {
 
   get isAboutReader() {
     if (!content) {
       return false;
     }
     return content.document.documentURI.startsWith("about:reader");
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     if (aEvent.originalTarget.defaultView != content) {
       return;
     }
 
     switch (aEvent.type) {
       case "AboutReaderContentLoaded":
         if (!this.isAboutReader) {
           return;
@@ -339,44 +339,44 @@ var AboutReaderListener = {
   },
 
   /**
    * NB: this function will update the state of the reader button asynchronously
    * after the next mozAfterPaint call (assuming reader mode is enabled and
    * this is a suitable document). Calling it on things which won't be
    * painted is not going to work.
    */
-  updateReaderButton: function(forceNonArticle) {
+  updateReaderButton(forceNonArticle) {
     if (!ReaderMode.isEnabledForParseOnLoad || this.isAboutReader ||
         !content || !(content.document instanceof content.HTMLDocument) ||
         content.document.mozSyntheticDocument) {
       return;
     }
 
     this.scheduleReadabilityCheckPostPaint(forceNonArticle);
   },
 
-  cancelPotentialPendingReadabilityCheck: function() {
+  cancelPotentialPendingReadabilityCheck() {
     if (this._pendingReadabilityCheck) {
       removeEventListener("MozAfterPaint", this._pendingReadabilityCheck);
       delete this._pendingReadabilityCheck;
     }
   },
 
-  scheduleReadabilityCheckPostPaint: function(forceNonArticle) {
+  scheduleReadabilityCheckPostPaint(forceNonArticle) {
     if (this._pendingReadabilityCheck) {
       // We need to stop this check before we re-add one because we don't know
       // if forceNonArticle was true or false last time.
       this.cancelPotentialPendingReadabilityCheck();
     }
     this._pendingReadabilityCheck = this.onPaintWhenWaitedFor.bind(this, forceNonArticle);
     addEventListener("MozAfterPaint", this._pendingReadabilityCheck);
   },
 
-  onPaintWhenWaitedFor: function(forceNonArticle, event) {
+  onPaintWhenWaitedFor(forceNonArticle, event) {
     // In non-e10s, we'll get called for paints other than ours, and so it's
     // possible that this page hasn't been laid out yet, in which case we
     // should wait until we get an event that does relate to our layout. We
     // determine whether any of our content got painted by checking if there
     // are any painted rects.
     if (!event.clientRects.length) {
       return;
     }
@@ -396,135 +396,135 @@ AboutReaderListener.init();
 
 var ContentSearchMediator = {
 
   whitelist: new Set([
     "about:home",
     "about:newtab",
   ]),
 
-  init: function(chromeGlobal) {
+  init(chromeGlobal) {
     chromeGlobal.addEventListener("ContentSearchClient", this, true, true);
     addMessageListener("ContentSearch", this);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (this._contentWhitelisted) {
       this._sendMsg(event.detail.type, event.detail.data);
     }
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     if (msg.data.type == "AddToWhitelist") {
       for (let uri of msg.data.data) {
         this.whitelist.add(uri);
       }
       this._sendMsg("AddToWhitelistAck");
       return;
     }
     if (this._contentWhitelisted) {
       this._fireEvent(msg.data.type, msg.data.data);
     }
   },
 
   get _contentWhitelisted() {
     return this.whitelist.has(content.document.documentURI);
   },
 
-  _sendMsg: function(type, data = null) {
+  _sendMsg(type, data = null) {
     sendAsyncMessage("ContentSearch", {
-      type: type,
-      data: data,
+      type,
+      data,
     });
   },
 
-  _fireEvent: function(type, data = null) {
+  _fireEvent(type, data = null) {
     let event = Cu.cloneInto({
       detail: {
-        type: type,
-        data: data,
+        type,
+        data,
       },
     }, content);
     content.dispatchEvent(new content.CustomEvent("ContentSearchService",
                                                   event));
   },
 };
 ContentSearchMediator.init(this);
 
 var PageStyleHandler = {
-  init: function() {
+  init() {
     addMessageListener("PageStyle:Switch", this);
     addMessageListener("PageStyle:Disable", this);
     addEventListener("pageshow", () => this.sendStyleSheetInfo());
   },
 
   get markupDocumentViewer() {
     return docShell.contentViewer;
   },
 
-  sendStyleSheetInfo: function() {
+  sendStyleSheetInfo() {
     let filteredStyleSheets = this._filterStyleSheets(this.getAllStyleSheets());
 
     sendAsyncMessage("PageStyle:StyleSheets", {
-      filteredStyleSheets: filteredStyleSheets,
+      filteredStyleSheets,
       authorStyleDisabled: this.markupDocumentViewer.authorStyleDisabled,
       preferredStyleSheetSet: content.document.preferredStyleSheetSet
     });
   },
 
-  getAllStyleSheets: function(frameset = content) {
+  getAllStyleSheets(frameset = content) {
     let selfSheets = Array.slice(frameset.document.styleSheets);
     let subSheets = Array.map(frameset.frames, frame => this.getAllStyleSheets(frame));
     return selfSheets.concat(...subSheets);
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "PageStyle:Switch":
         this.markupDocumentViewer.authorStyleDisabled = false;
         this._stylesheetSwitchAll(content, msg.data.title);
         break;
 
       case "PageStyle:Disable":
         this.markupDocumentViewer.authorStyleDisabled = true;
         break;
     }
 
     this.sendStyleSheetInfo();
   },
 
-  _stylesheetSwitchAll: function(frameset, title) {
+  _stylesheetSwitchAll(frameset, title) {
     if (!title || this._stylesheetInFrame(frameset, title)) {
       this._stylesheetSwitchFrame(frameset, title);
     }
 
     for (let i = 0; i < frameset.frames.length; i++) {
       // Recurse into sub-frames.
       this._stylesheetSwitchAll(frameset.frames[i], title);
     }
   },
 
-  _stylesheetSwitchFrame: function(frame, title) {
+  _stylesheetSwitchFrame(frame, title) {
     var docStyleSheets = frame.document.styleSheets;
 
     for (let i = 0; i < docStyleSheets.length; ++i) {
       let docStyleSheet = docStyleSheets[i];
       if (docStyleSheet.title) {
         docStyleSheet.disabled = (docStyleSheet.title != title);
       } else if (docStyleSheet.disabled) {
         docStyleSheet.disabled = false;
       }
     }
   },
 
-  _stylesheetInFrame: function(frame, title) {
+  _stylesheetInFrame(frame, title) {
     return Array.some(frame.document.styleSheets, (styleSheet) => styleSheet.title == title);
   },
 
-  _filterStyleSheets: function(styleSheets) {
+  _filterStyleSheets(styleSheets) {
     let result = [];
 
     for (let currentStyleSheet of styleSheets) {
       if (!currentStyleSheet.title)
         continue;
 
       // Skip any stylesheets that don't match the screen media type.
       if (currentStyleSheet.media.length > 0) {
@@ -656,23 +656,23 @@ let PrerenderContentHandler = {
     if (this._pending.length >= 2) {
       return;
     }
 
     let id = ++this._idMonotonic;
     sendAsyncMessage("Prerender:Request", {
       href: aHref.spec,
       referrer: aReferrer ? aReferrer.spec : null,
-      id: id,
+      id,
     });
 
     this._pending.push({
       href: aHref,
       referrer: aReferrer,
-      id: id,
+      id,
       success: null,
       failure: null,
     });
   },
 
   shouldSwitchToPrerenderedDocument(aHref, aReferrer, aSuccess, aFailure) {
     // Check if we think there is a prerendering document pending for the given
     // href and referrer. If we think there is one, we will send a message to
@@ -694,47 +694,47 @@ let PrerenderContentHandler = {
 
 if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
   // We only want to initialize the PrerenderContentHandler in the content
   // process. Outside of the content process, this should be unused.
   PrerenderContentHandler.init();
 }
 
 var WebBrowserChrome = {
-  onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) {
+  onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab) {
     return BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab);
   },
 
   // Check whether this URI should load in the current process
-  shouldLoadURI: function(aDocShell, aURI, aReferrer) {
+  shouldLoadURI(aDocShell, aURI, aReferrer) {
     if (!E10SUtils.shouldLoadURI(aDocShell, aURI, aReferrer)) {
       E10SUtils.redirectLoad(aDocShell, aURI, aReferrer);
       return false;
     }
 
     return true;
   },
 
-  shouldLoadURIInThisProcess: function(aURI) {
+  shouldLoadURIInThisProcess(aURI) {
     return E10SUtils.shouldLoadURIInThisProcess(aURI);
   },
 
   // Try to reload the currently active or currently loading page in a new process.
-  reloadInFreshProcess: function(aDocShell, aURI, aReferrer) {
+  reloadInFreshProcess(aDocShell, aURI, aReferrer) {
     E10SUtils.redirectLoad(aDocShell, aURI, aReferrer, true);
     return true;
   },
 
-  startPrerenderingDocument: function(aHref, aReferrer) {
+  startPrerenderingDocument(aHref, aReferrer) {
     if (PrerenderContentHandler.initialized) {
       PrerenderContentHandler.startPrerenderingDocument(aHref, aReferrer);
     }
   },
 
-  shouldSwitchToPrerenderedDocument: function(aHref, aReferrer, aSuccess, aFailure) {
+  shouldSwitchToPrerenderedDocument(aHref, aReferrer, aSuccess, aFailure) {
     if (PrerenderContentHandler.initialized) {
       return PrerenderContentHandler.shouldSwitchToPrerenderedDocument(
         aHref, aReferrer, aSuccess, aFailure);
     }
     return false;
   }
 };
 
@@ -742,17 +742,17 @@ if (Services.appinfo.processType == Serv
   let tabchild = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                          .getInterface(Ci.nsITabChild);
   tabchild.webBrowserChrome = WebBrowserChrome;
 }
 
 
 var DOMFullscreenHandler = {
 
-  init: function() {
+  init() {
     addMessageListener("DOMFullscreen:Entered", this);
     addMessageListener("DOMFullscreen:CleanUp", this);
     addEventListener("MozDOMFullscreen:Request", this);
     addEventListener("MozDOMFullscreen:Entered", this);
     addEventListener("MozDOMFullscreen:NewOrigin", this);
     addEventListener("MozDOMFullscreen:Exit", this);
     addEventListener("MozDOMFullscreen:Exited", this);
   },
@@ -760,17 +760,17 @@ var DOMFullscreenHandler = {
   get _windowUtils() {
     if (!content) {
       return null;
     }
     return content.QueryInterface(Ci.nsIInterfaceRequestor)
                   .getInterface(Ci.nsIDOMWindowUtils);
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     let windowUtils = this._windowUtils;
     switch (aMessage.name) {
       case "DOMFullscreen:Entered": {
         this._lastTransactionId = windowUtils.lastTransactionId;
         if (!windowUtils.handleFullscreenRequests() &&
             !content.document.fullscreenElement) {
           // If we don't actually have any pending fullscreen request
           // to handle, neither we have been in fullscreen, tell the
@@ -788,17 +788,17 @@ var DOMFullscreenHandler = {
           this._lastTransactionId = windowUtils.lastTransactionId;
           windowUtils.exitFullscreen();
         }
         break;
       }
     }
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "MozDOMFullscreen:Request": {
         sendAsyncMessage("DOMFullscreen:Request");
         break;
       }
       case "MozDOMFullscreen:NewOrigin": {
         sendAsyncMessage("DOMFullscreen:NewOrigin", {
           originNoSuffix: aEvent.target.nodePrincipal.originNoSuffix,
--- a/browser/base/content/test/general/browser_aboutAccounts.js
+++ b/browser/base/content/test/general/browser_aboutAccounts.js
@@ -31,21 +31,21 @@ registerCleanupFunction(function() {
   for (let name of changedPrefs) {
     Services.prefs.clearUserPref(name);
   }
 });
 
 var gTests = [
 {
   desc: "Test the remote commands",
-  teardown: function* () {
+  *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  run: function* ()
+  *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();
 
@@ -71,17 +71,17 @@ var gTests = [
     }
     yield deferred.promise;
     yield promisePrefsOpened;
   }
 },
 {
   desc: "Test action=signin - no user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* ()
+  *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, {
@@ -90,21 +90,21 @@ var gTests = [
       intro: false, // this is  "get started"
       remote: true,
       networkError: false
     });
   }
 },
 {
   desc: "Test action=signin - user logged in",
-  teardown: function* () {
+  *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  run: function* ()
+  *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 -
@@ -119,17 +119,17 @@ var gTests = [
       remote: false,
       networkError: false
     });
   }
 },
 {
   desc: "Test action=signin - captive portal",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* ()
+  *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"
@@ -139,17 +139,17 @@ var gTests = [
   }
 },
 {
   desc: "Test action=signin - offline",
   teardown: () => {
     gBrowser.removeCurrentTab();
     BrowserOffline.toggleOfflineStatus();
   },
-  run: function* ()
+  *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, {
@@ -159,17 +159,17 @@ var gTests = [
       remote: false,
       networkError: true
     });
   }
 },
 {
   desc: "Test action=signup - no user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* ()
+  *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'
@@ -178,17 +178,17 @@ var gTests = [
       remote: true,
       networkError: false
     });
   },
 },
 {
   desc: "Test action=signup - user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* ()
+  *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, {
@@ -197,39 +197,39 @@ var gTests = [
       intro: false, // this is  "get started"
       remote: false,
       networkError: false
     });
   },
 },
 {
   desc: "Test action=reauth",
-  teardown: function* () {
+  *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  run: function* ()
+  *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: function* () {
+  *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  run: function* ()
+  *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
@@ -276,21 +276,21 @@ var gTests = [
     is(Services.prefs.getBoolPref(pref), false, pref + " got the expected value");
 
     yield OS.File.remove(fxAccountsStorage);
     yield OS.File.removeEmptyDir(mockDir.path);
   },
 },
 {
   desc: "Test with migrateToDevEdition enabled (no user to migrate)",
-  teardown: function* () {
+  *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  run: function* ()
+  *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");
@@ -316,86 +316,86 @@ var gTests = [
     is(userData, null);
     // The migration pref should have still been switched off.
     is(Services.prefs.getBoolPref(pref), false, pref + " got the expected value");
     yield OS.File.removeEmptyDir(mockDir.path);
   },
 },
 {
   desc: "Test observers about:accounts",
-  teardown: function() {
+  teardown() {
     gBrowser.removeCurrentTab();
   },
-  run: function* () {
+  *run() {
     setPref("identity.fxaccounts.remote.signup.uri", "https://example.com/");
     yield setSignedInUser();
     let tab = yield promiseNewTabLoadEvent("about:accounts");
     // sign the user out - the tab should have action=signin
     let loadPromise = promiseOneMessage(tab, "test:document:load");
     yield signOut();
     // wait for the new load.
     yield loadPromise;
     is(tab.linkedBrowser.contentDocument.location.href, "about:accounts?action=signin");
   }
 },
 {
   desc: "Test entrypoint query string, no action, no user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* () {
+  *run() {
     // When this loads with no user logged-in, we expect the "normal" URL
     setPref("identity.fxaccounts.remote.signup.uri", "https://example.com/");
     let [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?entrypoint=abouthome");
     is(url, "https://example.com/?entrypoint=abouthome", "entrypoint=abouthome got the expected URL");
   },
 },
 {
   desc: "Test entrypoint query string for signin",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* () {
+  *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 [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin&entrypoint=abouthome");
     is(url, expected_url + "&entrypoint=abouthome", "entrypoint=abouthome got the expected URL");
   },
 },
 {
   desc: "Test entrypoint query string for signup",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* () {
+  *run() {
     // When this loads with no user logged-in, we expect the "normal" URL
     const sign_up_url = "https://example.com/?is_sign_up";
     setPref("identity.fxaccounts.remote.signup.uri", sign_up_url);
     let [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?entrypoint=abouthome&action=signup");
     is(url, sign_up_url + "&entrypoint=abouthome", "entrypoint=abouthome got the expected URL");
   },
 },
 {
   desc: "about:accounts URL params should be copied to remote URL params " +
         "when remote URL has no URL params, except for 'action'",
   teardown() {
     gBrowser.removeCurrentTab();
   },
-  run: function* () {
+  *run() {
     let signupURL = "https://example.com/";
     setPref("identity.fxaccounts.remote.signup.uri", signupURL);
     let queryStr = "email=foo%40example.com&foo=bar&baz=quux";
     let [, url] =
       yield promiseNewTabWithIframeLoadEvent("about:accounts?" + queryStr +
                                              "&action=action");
     is(url, signupURL + "?" + queryStr, "URL params are copied to signup URL");
   },
 },
 {
   desc: "about:accounts URL params should be copied to remote URL params " +
         "when remote URL already has some URL params, except for 'action'",
   teardown() {
     gBrowser.removeCurrentTab();
   },
-  run: function* () {
+  *run() {
     let signupURL = "https://example.com/?param";
     setPref("identity.fxaccounts.remote.signup.uri", signupURL);
     let queryStr = "email=foo%40example.com&foo=bar&baz=quux";
     let [, url] =
       yield promiseNewTabWithIframeLoadEvent("about:accounts?" + queryStr +
                                              "&action=action");
     is(url, signupURL + "&" + queryStr, "URL params are copied to signup URL");
   },
@@ -467,17 +467,17 @@ function checkVisibilities(tab, data) {
   let deferred = Promise.defer();
   mm.addMessageListener("test:check-visibilities-response", function onResponse(message) {
     mm.removeMessageListener("test:check-visibilities-response", onResponse);
     for (let id of ids) {
       is(message.data[id], data[id], "Element '" + id + "' has correct visibility");
     }
     deferred.resolve();
   });
-  mm.sendAsyncMessage("test:check-visibilities", {ids: ids});
+  mm.sendAsyncMessage("test:check-visibilities", {ids});
   return deferred.promise;
 }
 
 // watch out - these will fire observers which if you aren't careful, may
 // interfere with the tests.
 function setSignedInUser(data) {
   if (!data) {
     data = {
--- a/browser/base/content/test/general/browser_aboutHealthReport.js
+++ b/browser/base/content/test/general/browser_aboutHealthReport.js
@@ -63,17 +63,17 @@ var gTests = [
   desc: "Test the remote commands",
   setup: Task.async(function*()
   {
     Preferences.set(TELEMETRY_LOG_PREF, "Trace");
     yield setupPingArchive();
     Preferences.set("datareporting.healthreport.about.reportUrl",
                     HTTPS_BASE + "healthreport_testRemoteCommands.html");
   }),
-  run: function(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);
--- a/browser/base/content/test/general/browser_aboutHome.js
+++ b/browser/base/content/test/general/browser_aboutHome.js
@@ -490,17 +490,17 @@ add_task(function* () {
 
 add_task(function* () {
   info("Sync button should open about:preferences#sync");
 
   yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:home" }, function* (browser) {
     let oldOpenPrefs = window.openPreferences;
     let openPrefsPromise = new Promise(resolve => {
       window.openPreferences = function(pane, params) {
-        resolve({ pane: pane, params: params });
+        resolve({ pane, params });
       };
     });
 
     yield BrowserTestUtils.synthesizeMouseAtCenter("#sync", {}, browser);
 
     let result = yield openPrefsPromise;
     window.openPreferences = oldOpenPrefs;
 
@@ -642,24 +642,24 @@ function promiseContentSearchChange(brow
   });
 }
 
 function promiseNewEngine(basename) {
   info("Waiting for engine to be added: " + basename);
   return new Promise((resolve, reject) => {
     let url = getRootDirectory(gTestPath) + basename;
     Services.search.addEngine(url, null, "", false, {
-      onSuccess: function(engine) {
+      onSuccess(engine) {
         info("Search engine added: " + basename);
         registerCleanupFunction(() => {
           try {
             Services.search.removeEngine(engine);
           } catch (ex) { /* Can't remove the engine more than once */ }
         });
         resolve(engine);
       },
-      onError: function(errCode) {
+      onError(errCode) {
         ok(false, "addEngine failed with error code " + errCode);
         reject();
       },
     });
   });
 }
--- a/browser/base/content/test/general/browser_alltabslistener.js
+++ b/browser/base/content/test/general/browser_alltabslistener.js
@@ -1,79 +1,79 @@
 var Ci = Components.interfaces;
 
 const gCompleteState = Ci.nsIWebProgressListener.STATE_STOP +
                        Ci.nsIWebProgressListener.STATE_IS_NETWORK;
 
 var gFrontProgressListener = {
-  onProgressChange: function(aWebProgress, aRequest,
+  onProgressChange(aWebProgress, aRequest,
                              aCurSelfProgress, aMaxSelfProgress,
                              aCurTotalProgress, aMaxTotalProgress) {
   },
 
-  onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
     var state = "onStateChange";
     info("FrontProgress: " + state + " 0x" + aStateFlags.toString(16));
     ok(gFrontNotificationsPos < gFrontNotifications.length, "Got an expected notification for the front notifications listener");
     is(state, gFrontNotifications[gFrontNotificationsPos], "Got a notification for the front notifications listener");
     gFrontNotificationsPos++;
   },
 
-  onLocationChange: function(aWebProgress, aRequest, aLocationURI, aFlags) {
+  onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) {
     var state = "onLocationChange";
     info("FrontProgress: " + state + " " + aLocationURI.spec);
     ok(gFrontNotificationsPos < gFrontNotifications.length, "Got an expected notification for the front notifications listener");
     is(state, gFrontNotifications[gFrontNotificationsPos], "Got a notification for the front notifications listener");
     gFrontNotificationsPos++;
   },
 
-  onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {
+  onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
   },
 
-  onSecurityChange: function(aWebProgress, aRequest, aState) {
+  onSecurityChange(aWebProgress, aRequest, aState) {
     var state = "onSecurityChange";
     info("FrontProgress: " + state + " 0x" + aState.toString(16));
     ok(gFrontNotificationsPos < gFrontNotifications.length, "Got an expected notification for the front notifications listener");
     is(state, gFrontNotifications[gFrontNotificationsPos], "Got a notification for the front notifications listener");
     gFrontNotificationsPos++;
   }
 }
 
 var gAllProgressListener = {
-  onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     var state = "onStateChange";
     info("AllProgress: " + state + " 0x" + aStateFlags.toString(16));
     ok(aBrowser == gTestBrowser, state + " notification came from the correct browser");
     ok(gAllNotificationsPos < gAllNotifications.length, "Got an expected notification for the all notifications listener");
     is(state, gAllNotifications[gAllNotificationsPos], "Got a notification for the all notifications listener");
     gAllNotificationsPos++;
 
     if ((aStateFlags & gCompleteState) == gCompleteState) {
       ok(gAllNotificationsPos == gAllNotifications.length, "Saw the expected number of notifications");
       ok(gFrontNotificationsPos == gFrontNotifications.length, "Saw the expected number of frontnotifications");
       executeSoon(gNextTest);
     }
   },
 
-  onLocationChange: function(aBrowser, aWebProgress, aRequest, aLocationURI,
+  onLocationChange(aBrowser, aWebProgress, aRequest, aLocationURI,
                              aFlags) {
     var state = "onLocationChange";
     info("AllProgress: " + state + " " + aLocationURI.spec);
     ok(aBrowser == gTestBrowser, state + " notification came from the correct browser");
     ok(gAllNotificationsPos < gAllNotifications.length, "Got an expected notification for the all notifications listener");
     is(state, gAllNotifications[gAllNotificationsPos], "Got a notification for the all notifications listener");
     gAllNotificationsPos++;
   },
 
-  onStatusChange: function(aBrowser, aWebProgress, aRequest, aStatus, aMessage) {
+  onStatusChange(aBrowser, aWebProgress, aRequest, aStatus, aMessage) {
     var state = "onStatusChange";
     ok(aBrowser == gTestBrowser, state + " notification came from the correct browser");
   },
 
-  onSecurityChange: function(aBrowser, aWebProgress, aRequest, aState) {
+  onSecurityChange(aBrowser, aWebProgress, aRequest, aState) {
     var state = "onSecurityChange";
     info("AllProgress: " + state + " 0x" + aState.toString(16));
     ok(aBrowser == gTestBrowser, state + " notification came from the correct browser");
     ok(gAllNotificationsPos < gAllNotifications.length, "Got an expected notification for the all notifications listener");
     is(state, gAllNotifications[gAllNotificationsPos], "Got a notification for the all notifications listener");
     gAllNotificationsPos++;
   }
 }
--- a/browser/base/content/test/general/browser_blockHPKP.js
+++ b/browser/base/content/test/general/browser_blockHPKP.js
@@ -55,17 +55,17 @@ function loadPinningPage() {
                                                successfulPinningPageListener,
                                                true);
   });
 }
 
 // After the site is pinned try to load with a subdomain site that should
 // fail to validate
 var successfulPinningPageListener = {
-  handleEvent: function() {
+  handleEvent() {
     gBrowser.selectedBrowser.removeEventListener("load", this, true);
     BrowserTestUtils.loadURI(gBrowser.selectedBrowser, "https://" + kBadPinningDomain).then(function() {
       return promiseErrorPageLoaded(gBrowser.selectedBrowser);
     }).then(errorPageLoaded);
   }
 };
 
 // The browser should load about:neterror, when this happens, proceed
--- a/browser/base/content/test/general/browser_bug321000.js
+++ b/browser/base/content/test/general/browser_bug321000.js
@@ -44,17 +44,17 @@ function next_test() {
 }
 
 function test_paste(aCurrentTest) {
   var element = aCurrentTest.element;
 
   // Register input listener.
   var inputListener = {
     test: aCurrentTest,
-    handleEvent: function(event) {
+    handleEvent(event) {
       element.removeEventListener(event.type, this, false);
 
       is(element.value, this.test.expected, this.test.desc);
 
       // Clear the field and go to next test.
       element.value = "";
       setTimeout(next_test, 0);
     }
--- a/browser/base/content/test/general/browser_bug356571.js
+++ b/browser/base/content/test/general/browser_bug356571.js
@@ -10,26 +10,26 @@ var didFail = false;
 const kPromptServiceUUID = "{6cc9c9fe-bc0b-432b-a410-253ef8bcc699}";
 const kPromptServiceContractID = "@mozilla.org/embedcomp/prompt-service;1";
 
 // Save original prompt service factory
 const kPromptServiceFactory = Cm.getClassObject(Cc[kPromptServiceContractID],
                                                 Ci.nsIFactory);
 
 var fakePromptServiceFactory = {
-  createInstance: function(aOuter, aIid) {
+  createInstance(aOuter, aIid) {
     if (aOuter != null)
       throw Cr.NS_ERROR_NO_AGGREGATION;
     return promptService.QueryInterface(aIid);
   }
 };
 
 var promptService = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIPromptService]),
-  alert: function() {
+  alert() {
     didFail = true;
   }
 };
 
 /* FIXME
 Cm.QueryInterface(Ci.nsIComponentRegistrar)
   .registerFactory(Components.ID(kPromptServiceUUID), "Prompt Service",
                    kPromptServiceContractID, fakePromptServiceFactory);
@@ -42,17 +42,17 @@ const kDummyPage = "http://example.org/b
 const kURIs = [
   "bad://www.mozilla.org/",
   kDummyPage,
   kDummyPage,
 ];
 
 var gProgressListener = {
   _runCount: 0,
-  onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     if ((aStateFlags & kCompleteState) == kCompleteState) {
       if (++this._runCount != kURIs.length)
         return;
       // Check we failed on unknown protocol (received an alert from docShell)
       ok(didFail, "Correctly failed on unknown protocol");
       // Check we opened all tabs
       ok(gBrowser.tabs.length == kURIs.length, "Correctly opened all expected tabs");
       finishTest();
--- a/browser/base/content/test/general/browser_bug424101.js
+++ b/browser/base/content/test/general/browser_bug424101.js
@@ -19,17 +19,17 @@ add_task(function *() {
     { element: "option" },
     { element: "optgroup" }
   ];
 
   for (let index = 0; index < tests.length; index++) {
     let test = tests[index];
 
     yield ContentTask.spawn(gBrowser.selectedBrowser,
-                            { element: test.element, type: test.type, index: index },
+                            { element: test.element, type: test.type, index },
                             function* (arg) {
       let element = content.document.createElement(arg.element);
       element.id = "element" + arg.index;
       if (arg.type) {
         element.setAttribute("type", arg.type);
       }
       content.document.body.appendChild(element);
     });
--- a/browser/base/content/test/general/browser_bug553455.js
+++ b/browser/base/content/test/general/browser_bug553455.js
@@ -147,23 +147,23 @@ function waitForInstallDialog() {
       let panel = yield waitForNotification("addon-install-confirmation");
       return panel.childNodes[0];
     }
 
     info("Waiting for install dialog");
 
     let window = yield new Promise(resolve => {
       Services.wm.addListener({
-        onOpenWindow: function(aXULWindow) {
+        onOpenWindow(aXULWindow) {
           Services.wm.removeListener(this);
           resolve(aXULWindow);
         },
-        onCloseWindow: function(aXULWindow) {
+        onCloseWindow(aXULWindow) {
         },
-        onWindowTitleChange: function(aXULWindow, aNewTitle) {
+        onWindowTitleChange(aXULWindow, aNewTitle) {
         }
       });
     });
     info("Install dialog opened, waiting for focus");
 
     let domwindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
                           .getInterface(Ci.nsIDOMWindow);
     yield new Promise(resolve => {
@@ -1050,17 +1050,17 @@ function test_cancel() {
     is(PopupNotifications.panel.childNodes.length, 1, "Should be only one notification");
     notification = panel.childNodes[0];
     is(notification.id, "addon-progress-notification", "Should have seen the progress notification");
 
     // Cancel the download
     let install = notification.notification.options.installs[0];
     let cancelledPromise = new Promise(resolve => {
       install.addListener({
-        onDownloadCancelled: function() {
+        onDownloadCancelled() {
           install.removeListener(this);
           resolve();
         }
       });
     });
     EventUtils.synthesizeMouseAtCenter(notification.secondaryButton, {});
     yield cancelledPromise;
 
@@ -1119,17 +1119,17 @@ function test_failedSecurity() {
     yield removeTab();
   });
 }
 ];
 
 var gTestStart = null;
 
 var XPInstallObserver = {
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo);
     info("Observed " + aTopic + " for " + installInfo.installs.length + " installs");
     installInfo.installs.forEach(function(aInstall) {
       info("Install of " + aInstall.sourceURI.spec + " was in state " + aInstall.state);
     });
   }
 };
 
--- a/browser/base/content/test/general/browser_bug561636.js
+++ b/browser/base/content/test/general/browser_bug561636.js
@@ -12,17 +12,17 @@ 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 : function(aFormElement, aInvalidElements)
+  notifyInvalidSubmit(aFormElement, aInvalidElements)
   {
   }
 };
 
 var testId = 0;
 
 function incrementTest()
 {
--- a/browser/base/content/test/general/browser_bug592338.js
+++ b/browser/base/content/test/general/browser_bug592338.js
@@ -139,17 +139,17 @@ function runNextTest() {
 
 function test() {
   waitForExplicitFinish();
 
   Services.prefs.setBoolPref("extensions.logging.enabled", true);
 
   AddonManager.getInstallForURL(TESTROOT + "theme.xpi", function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function() {
+      onInstallEnded() {
         AddonManager.getAddonByID("theme-xpi@tests.mozilla.org", function(aAddon) {
           isnot(aAddon, null, "Should have installed the test theme.");
 
           // In order to switch themes while the test is running we turn on dynamic
           // theme switching. This means the test isn't exactly correct but should
           // do some good
           Services.prefs.setBoolPref("extensions.dss.enabled", true);
 
--- a/browser/base/content/test/general/browser_bug676619.js
+++ b/browser/base/content/test/general/browser_bug676619.js
@@ -59,29 +59,29 @@ function test() {
   });
 
   gBrowser.loadURI("http://mochi.test:8888/browser/browser/base/content/test/general/download_page.html");
 }
 
 
 function addWindowListener(aURL, aCallback) {
   Services.wm.addListener({
-    onOpenWindow: function(aXULWindow) {
+    onOpenWindow(aXULWindow) {
       info("window opened, waiting for focus");
       Services.wm.removeListener(this);
 
       var domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                                 .getInterface(Ci.nsIDOMWindow);
       waitForFocus(function() {
         is(domwindow.document.location.href, aURL, "should have seen the right window open");
         aCallback(domwindow);
       }, domwindow);
     },
-    onCloseWindow: function(aXULWindow) { },
-    onWindowTitleChange: function(aXULWindow, aNewTitle) { }
+    onCloseWindow(aXULWindow) { },
+    onWindowTitleChange(aXULWindow, aNewTitle) { }
   });
 }
 
 // This listens for the next opened tab and checks it is of the right url.
 // opencallback is called when the new tab is fully loaded
 // closecallback is called when the tab is closed
 function TabOpenListener(url, opencallback, closecallback) {
   this.url = url;
@@ -93,17 +93,17 @@ function TabOpenListener(url, opencallba
 
 TabOpenListener.prototype = {
   url: null,
   opencallback: null,
   closecallback: null,
   tab: null,
   browser: null,
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (event.type == "TabOpen") {
       gBrowser.tabContainer.removeEventListener("TabOpen", this, false);
       this.tab = event.originalTarget;
       this.browser = this.tab.linkedBrowser;
       BrowserTestUtils.browserLoaded(this.browser, false, this.url).then(() => {
         this.tab.addEventListener("TabClose", this, false);
         var url = this.browser.currentURI.spec;
         is(url, this.url, "Should have opened the correct tab");
--- a/browser/base/content/test/general/browser_bug734076.js
+++ b/browser/base/content/test/general/browser_bug734076.js
@@ -10,75 +10,75 @@ add_task(function* ()
 
   let writeDomainURL = encodeURI("data:text/html,<script>document.write(document.domain);</script>");
 
   let tests = [
     {
       name: "view background image",
       url: "http://mochi.test:8888/",
       element: "body",
-      go: function() {
-        return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL: writeDomainURL }, function* (arg) {
+      go() {
+        return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL }, function* (arg) {
           let contentBody = content.document.body;
           contentBody.style.backgroundImage = "url('" + arg.writeDomainURL + "')";
 
           return "context-viewbgimage";
         });
       },
-      verify: function() {
+      verify() {
         return ContentTask.spawn(gBrowser.selectedBrowser, null, function* (arg) {
           Assert.ok(!content.document.body.textContent,
             "no domain was inherited for view background image");
         });
       }
     },
     {
       name: "view image",
       url: "http://mochi.test:8888/",
       element: "img",
-      go: function() {
-        return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL: writeDomainURL }, function* (arg) {
+      go() {
+        return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL }, function* (arg) {
           let doc = content.document;
           let img = doc.createElement("img");
           img.height = 100;
           img.width = 100;
           img.setAttribute("src", arg.writeDomainURL);
           doc.body.insertBefore(img, doc.body.firstChild);
 
           return "context-viewimage";
         });
       },
-      verify: function() {
+      verify() {
         return ContentTask.spawn(gBrowser.selectedBrowser, null, function* (arg) {
           Assert.ok(!content.document.body.textContent,
             "no domain was inherited for view image");
         });
       }
     },
     {
       name: "show only this frame",
       url: "http://mochi.test:8888/",
       element: "iframe",
-      go: function() {
-        return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL: writeDomainURL }, function* (arg) {
+      go() {
+        return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL }, function* (arg) {
           let doc = content.document;
           let iframe = doc.createElement("iframe");
           iframe.setAttribute("src", arg.writeDomainURL);
           doc.body.insertBefore(iframe, doc.body.firstChild);
 
           // Wait for the iframe to load.
           return new Promise(resolve => {
             iframe.addEventListener("load", function onload() {
               iframe.removeEventListener("load", onload, true);
               resolve("context-showonlythisframe");
             }, true);
           });
         });
       },
-      verify: function() {
+      verify() {
         return ContentTask.spawn(gBrowser.selectedBrowser, null, function* (arg) {
           Assert.ok(!content.document.body.textContent,
             "no domain was inherited for 'show only this frame'");
         });
       }
     }
   ];
 
--- a/browser/base/content/test/general/browser_contentAltClick.js
+++ b/browser/base/content/test/general/browser_contentAltClick.js
@@ -49,17 +49,17 @@ 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 = {
-      onDownloadAdded: function(aDownload) {
+      onDownloadAdded(aDownload) {
         downloads.push(aDownload);
         resolve();
       },
     };
   });
   yield downloadList.addView(downloadView);
   yield BrowserTestUtils.synthesizeMouseAtCenter("#commonlink", {altKey: true}, gBrowser.selectedBrowser);
 
@@ -78,17 +78,17 @@ add_task(function* test_alt_click_on_xli
   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 = {
-      onDownloadAdded: function(aDownload) {
+      onDownloadAdded(aDownload) {
         downloads.push(aDownload);
         if (downloads.length == 2) {
           resolve();
         }
       },
     };
   });
   yield downloadList.addView(downloadView);
--- a/browser/base/content/test/general/browser_contentAreaClick.js
+++ b/browser/base/content/test/general/browser_contentAreaClick.js
@@ -13,146 +13,146 @@
  * the event is collected by a click handler that ensures that contentAreaClick
  * correctly prevent default events, and follows the correct code path.
  */
 
 var gTests = [
 
   {
     desc: "Simple left click",
-    setup: function() {},
-    clean: function() {},
+    setup() {},
+    clean() {},
     event: {},
     targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ],
     expectedInvokedMethods: [],
     preventDefault: false,
   },
 
   {
     desc: "Ctrl/Cmd left click",
-    setup: function() {},
-    clean: function() {},
+    setup() {},
+    clean() {},
     event: { ctrlKey: true,
              metaKey: true },
     targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ],
     expectedInvokedMethods: [ "urlSecurityCheck", "openLinkIn" ],
     preventDefault: true,
   },
 
   // The next test was once handling feedService.forcePreview().  Now it should
   // just be like Alt click.
   {
     desc: "Shift+Alt left click",
-    setup: function() {
+    setup() {
       gPrefService.setBoolPref("browser.altClickSave", true);
     },
-    clean: function() {
+    clean() {
       gPrefService.clearUserPref("browser.altClickSave");
     },
     event: { shiftKey: true,
              altKey: true },
     targets: [ "commonlink", "maplink" ],
     expectedInvokedMethods: [ "gatherTextUnder", "saveURL" ],
     preventDefault: true,
   },
 
   {
     desc: "Shift+Alt left click on XLinks",
-    setup: function() {
+    setup() {
       gPrefService.setBoolPref("browser.altClickSave", true);
     },
-    clean: function() {
+    clean() {
       gPrefService.clearUserPref("browser.altClickSave");
     },
     event: { shiftKey: true,
              altKey: true },
     targets: [ "mathxlink", "svgxlink"],
     expectedInvokedMethods: [ "saveURL" ],
     preventDefault: true,
   },
 
   {
     desc: "Shift click",
-    setup: function() {},
-    clean: function() {},
+    setup() {},
+    clean() {},
     event: { shiftKey: true },
     targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ],
     expectedInvokedMethods: [ "urlSecurityCheck", "openLinkIn" ],
     preventDefault: true,
   },
 
   {
     desc: "Alt click",
-    setup: function() {
+    setup() {
       gPrefService.setBoolPref("browser.altClickSave", true);
     },
-    clean: function() {
+    clean() {
       gPrefService.clearUserPref("browser.altClickSave");
     },
     event: { altKey: true },
     targets: [ "commonlink", "maplink" ],
     expectedInvokedMethods: [ "gatherTextUnder", "saveURL" ],
     preventDefault: true,
   },
 
   {
     desc: "Alt click on XLinks",
-    setup: function() {
+    setup() {
       gPrefService.setBoolPref("browser.altClickSave", true);
     },
-    clean: function() {
+    clean() {
       gPrefService.clearUserPref("browser.altClickSave");
     },
     event: { altKey: true },
     targets: [ "mathxlink", "svgxlink" ],
     expectedInvokedMethods: [ "saveURL" ],
     preventDefault: true,
   },
 
   {
     desc: "Panel click",
-    setup: function() {},
-    clean: function() {},
+    setup() {},
+    clean() {},
     event: {},
     targets: [ "panellink" ],
     expectedInvokedMethods: [ "urlSecurityCheck", "loadURI" ],
     preventDefault: true,
   },
 
   {
     desc: "Simple middle click opentab",
-    setup: function() {},
-    clean: function() {},
+    setup() {},
+    clean() {},
     event: { button: 1 },
     targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ],
     expectedInvokedMethods: [ "urlSecurityCheck", "openLinkIn" ],
     preventDefault: true,
   },
 
   {
     desc: "Simple middle click openwin",
-    setup: function() {
+    setup() {
       gPrefService.setBoolPref("browser.tabs.opentabfor.middleclick", false);
     },
-    clean: function() {
+    clean() {
       gPrefService.clearUserPref("browser.tabs.opentabfor.middleclick");
     },
     event: { button: 1 },
     targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ],
     expectedInvokedMethods: [ "urlSecurityCheck", "openLinkIn" ],
     preventDefault: true,
   },
 
   {
     desc: "Middle mouse paste",
-    setup: function() {
+    setup() {
       gPrefService.setBoolPref("middlemouse.contentLoadURL", true);
       gPrefService.setBoolPref("general.autoScroll", false);
     },
-    clean: function() {
+    clean() {
       gPrefService.clearUserPref("middlemouse.contentLoadURL");
       gPrefService.clearUserPref("general.autoScroll");
     },
     event: { button: 1 },
     targets: [ "emptylink" ],
     expectedInvokedMethods: [ "middleMousePaste" ],
     preventDefault: true,
   },
@@ -194,17 +194,17 @@ function test() {
         executeSoon(runNextTest);
       }, gTestWin.content, true);
     }, gTestWin);
   });
 }
 
 // Click handler used to steal click events.
 var gClickHandler = {
-  handleEvent: function(event) {
+  handleEvent(event) {
     let linkId = event.target.id || event.target.localName;
     is(event.type, "click",
        gCurrentTest.desc + ":Handler received a click event on " + linkId);
 
     let isPanelClick = linkId == "panellink";
     gTestWin.contentAreaClick(event, isPanelClick);
     let prevent = event.defaultPrevented;
     is(prevent, gCurrentTest.preventDefault,
--- a/browser/base/content/test/general/browser_contentSearchUI.js
+++ b/browser/base/content/test/general/browser_contentSearchUI.js
@@ -190,38 +190,38 @@ add_task(function* cycleSuggestions() {
   yield msg("key", { key: "x", waitForSuggestions: true });
 
   let cycle = Task.async(function* (aSelectedButtonIndex) {
     let modifiers = {
       shiftKey: true,
       accelKey: true,
     };
 
-    let state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+    let state = yield msg("key", { key: "VK_DOWN", modifiers });
     checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_DOWN", modifiers });
     checkState(state, "xbar", ["xfoo", "xbar"], 1, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_DOWN", modifiers });
     checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_DOWN", modifiers });
     checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_UP", modifiers });
     checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_UP", modifiers });
     checkState(state, "xbar", ["xfoo", "xbar"], 1, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_UP", modifiers });
     checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_UP", modifiers });
     checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex);
   });
 
   yield cycle();
 
   // Repeat with a one-off selected.
   let state = yield msg("key", "VK_TAB");
   checkState(state, "x", ["xfoo", "xbar"], 2);
@@ -244,48 +244,48 @@ add_task(function* cycleOneOffs() {
   let state = yield msg("key", "VK_DOWN");
   state = yield msg("key", "VK_DOWN");
   checkState(state, "xbar", ["xfoo", "xbar"], 1);
 
   let modifiers = {
     altKey: true,
   };
 
-  state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_DOWN", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 0);
 
-  state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_DOWN", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 1);
 
-  state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_DOWN", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1);
 
-  state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_UP", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 1);
 
-  state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_UP", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 0);
 
-  state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_UP", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1);
 
   // If the settings button is selected, pressing alt+up/down should select the
   // last/first one-off respectively (and deselect the settings button).
   yield msg("key", "VK_TAB");
   yield msg("key", "VK_TAB");
   state = yield msg("key", "VK_TAB"); // Settings button selected.
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 2);
 
-  state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_UP", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 1);
 
   state = yield msg("key", "VK_TAB");
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 2);
 
-  state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_DOWN", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 0);
 
   yield msg("removeLastOneOff");
   yield msg("reset");
 });
 
 add_task(function* mouse() {
   yield setUp();
@@ -413,17 +413,17 @@ add_task(function* search() {
   yield setUp();
 
   let modifiers = {};
   ["altKey", "ctrlKey", "metaKey", "shiftKey"].forEach(k => modifiers[k] = true);
 
   // Test typing a query and pressing enter.
   let p = msg("waitForSearch");
   yield msg("key", { key: "x", waitForSuggestions: true });
-  yield msg("key", { key: "VK_RETURN", modifiers: modifiers });
+  yield msg("key", { key: "VK_RETURN", modifiers });
   let mesg = yield p;
   let eventData = {
     engineName: TEST_ENGINE_PREFIX + " " + TEST_ENGINE_BASENAME,
     searchString: "x",
     healthReportKey: "test",
     searchPurpose: "test",
     originalEvent: modifiers,
   };
@@ -432,17 +432,17 @@ add_task(function* search() {
   yield promiseTab();
   yield setUp();
 
   // Test typing a query, then selecting a suggestion and pressing enter.
   p = msg("waitForSearch");
   yield msg("key", { key: "x", waitForSuggestions: true });
   yield msg("key", "VK_DOWN");
   yield msg("key", "VK_DOWN");
-  yield msg("key", { key: "VK_RETURN", modifiers: modifiers });
+  yield msg("key", { key: "VK_RETURN", modifiers });
   mesg = yield p;
   eventData.searchString = "xfoo";
   eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_BASENAME;
   eventData.selection = {
     index: 1,
     kind: "key",
   }
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
@@ -450,77 +450,77 @@ add_task(function* search() {
   yield promiseTab();
   yield setUp();
 
   // Test typing a query, then selecting a one-off button and pressing enter.
   p = msg("waitForSearch");
   yield msg("key", { key: "x", waitForSuggestions: true });
   yield msg("key", "VK_UP");
   yield msg("key", "VK_UP");
-  yield msg("key", { key: "VK_RETURN", modifiers: modifiers });
+  yield msg("key", { key: "VK_RETURN", modifiers });
   mesg = yield p;
   delete eventData.selection;
   eventData.searchString = "x";
   eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_2_BASENAME;
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
   yield promiseTab();
   yield setUp();
 
   // Test typing a query and clicking the search engine header.
   p = msg("waitForSearch");
   modifiers.button = 0;
   yield msg("key", { key: "x", waitForSuggestions: true });
   yield msg("mousemove", -1);
-  yield msg("click", { eltIdx: -1, modifiers: modifiers });
+  yield msg("click", { eltIdx: -1, modifiers });
   mesg = yield p;
   eventData.originalEvent = modifiers;
   eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_BASENAME;
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
   yield promiseTab();
   yield setUp();
 
   // Test typing a query and then clicking a suggestion.
   yield msg("key", { key: "x", waitForSuggestions: true });
   p = msg("waitForSearch");
   yield msg("mousemove", 1);
-  yield msg("click", { eltIdx: 1, modifiers: modifiers });
+  yield msg("click", { eltIdx: 1, modifiers });
   mesg = yield p;
   eventData.searchString = "xfoo";
   eventData.selection = {
     index: 1,
     kind: "mouse",
   };
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
   yield promiseTab();
   yield setUp();
 
   // Test typing a query and then clicking a one-off button.
   yield msg("key", { key: "x", waitForSuggestions: true });
   p = msg("waitForSearch");
   yield msg("mousemove", 3);
-  yield msg("click", { eltIdx: 3, modifiers: modifiers });
+  yield msg("click", { eltIdx: 3, modifiers });
   mesg = yield p;
   eventData.searchString = "x";
   eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_2_BASENAME;
   delete eventData.selection;
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
   yield promiseTab();
   yield setUp();
 
   // Test selecting a suggestion, then clicking a one-off without deselecting the
   // suggestion.
   yield msg("key", { key: "x", waitForSuggestions: true });
   p = msg("waitForSearch");
   yield msg("mousemove", 1);
   yield msg("mousemove", 3);
-  yield msg("click", { eltIdx: 3, modifiers: modifiers });
+  yield msg("click", { eltIdx: 3, modifiers });
   mesg = yield p;
   eventData.searchString = "xfoo"
   eventData.selection = {
     index: 1,
     kind: "mouse",
   };
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
@@ -529,17 +529,17 @@ add_task(function* search() {
 
   // Same as above, but with the keyboard.
   delete modifiers.button;
   yield msg("key", { key: "x", waitForSuggestions: true });
   p = msg("waitForSearch");
   yield msg("key", "VK_DOWN");
   yield msg("key", "VK_DOWN");
   yield msg("key", "VK_TAB");
-  yield msg("key", { key: "VK_RETURN", modifiers: modifiers });
+  yield msg("key", { key: "VK_RETURN", modifiers });
   mesg = yield p;
   eventData.selection = {
     index: 1,
     kind: "key",
   };
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
   yield promiseTab();
@@ -549,17 +549,17 @@ add_task(function* search() {
   let state = yield msg("startComposition", { data: "" });
   checkState(state, "", [], -1);
   state = yield msg("changeComposition", { data: "x", waitForSuggestions: true });
   checkState(state, "x", [{ str: "x", type: "formHistory" },
                           { str: "xfoo", type: "formHistory" }, "xbar"], -1);
   yield msg("commitComposition");
   delete modifiers.button;
   p = msg("waitForSearch");
-  yield msg("key", { key: "VK_RETURN", modifiers: modifiers });
+  yield msg("key", { key: "VK_RETURN", modifiers });
   mesg = yield p;
   eventData.searchString = "x"
   eventData.originalEvent = modifiers;
   eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_BASENAME;
   delete eventData.selection;
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
   yield promiseTab();
@@ -578,17 +578,17 @@ add_task(function* search() {
 
   // Mouse over the second suggestion.
   state = yield msg("mousemove", 1);
   checkState(state, "x", [{ str: "x", type: "formHistory" },
                           { str: "xfoo", type: "formHistory" }, "xbar"], 1);
 
   modifiers.button = 0;
   p = msg("waitForSearch");
-  yield msg("click", { eltIdx: 1, modifiers: modifiers });
+  yield msg("click", { eltIdx: 1, modifiers });
   mesg = yield p;
   eventData.searchString = "xfoo";
   eventData.originalEvent = modifiers;
   eventData.selection = {
     index: 1,
     kind: "mouse",
   };
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
@@ -657,18 +657,18 @@ function setUp(aNoEngine) {
       gDidInitialSetUp = true;
     }
     yield msg("focus");
   });
 }
 
 function msg(type, data = null) {
   gMsgMan.sendAsyncMessage(TEST_MSG, {
-    type: type,
-    data: data,
+    type,
+    data,
   });
   let deferred = Promise.defer();
   gMsgMan.addMessageListener(TEST_MSG, function onMsg(msgObj) {
     if (msgObj.data.type != type) {
       return;
     }
     gMsgMan.removeMessageListener(TEST_MSG, onMsg);
     deferred.resolve(msgObj.data.data);
--- a/browser/base/content/test/general/browser_contextmenu.js
+++ b/browser/base/content/test/general/browser_contextmenu.js
@@ -495,17 +495,17 @@ add_task(function* test_contenteditable(
     ],
     {waitForSpellCheck: true}
   );
   */
 });
 
 add_task(function* test_copylinkcommand() {
   yield test_contextmenu("#test-link", null, {
-    postCheckContextMenuFn: function*() {
+    *postCheckContextMenuFn() {
       document.commandDispatcher
               .getControllerForCommand("cmd_copyLink")
               .doCommand("cmd_copyLink");
 
       // The easiest way to check the clipboard is to paste the contents
       // into a textbox.
       yield ContentTask.spawn(gBrowser.selectedBrowser, null, function*() {
         let doc = content.document;
@@ -557,17 +557,17 @@ add_task(function* test_pagemenu() {
      ...(hasPocket ? ["context-pocket", true] : []),
      "---",                  null,
      "context-viewbgimage",  false,
      "context-selectall",    true,
      "---",                  null,
      "context-viewsource",   true,
      "context-viewinfo",     true
     ],
-    {postCheckContextMenuFn: function*() {
+    {*postCheckContextMenuFn() {
       let item = contextMenu.getElementsByAttribute("generateditemid", "1")[0];
       ok(item, "Got generated XUL menu item");
       item.doCommand();
       yield ContentTask.spawn(gBrowser.selectedBrowser, null, function*() {
         let pagemenu = content.document.getElementById("test-pagemenu");
         Assert.ok(!pagemenu.hasAttribute("hopeless"), "attribute got removed");
       });
     }
@@ -815,21 +815,21 @@ add_task(function* test_click_to_play_bl
      "---",                  null,
      "context-viewbgimage",  false,
      "context-selectall",    true,
      "---",                  null,
      "context-viewsource",   true,
      "context-viewinfo",     true
     ],
     {
-      preCheckContextMenuFn: function*() {
+      *preCheckContextMenuFn() {
         pushPrefs(["plugins.click_to_play", true]);
         setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
       },
-      postCheckContextMenuFn: function*() {
+      *postCheckContextMenuFn() {
         getTestPlugin().enabledState = Ci.nsIPluginTag.STATE_ENABLED;
       }
     }
   );
 });
 
 add_task(function* test_longdesc() {
   yield test_contextmenu("#test-longdesc",
--- a/browser/base/content/test/general/browser_devedition.js
+++ b/browser/base/content/test/general/browser_devedition.js
@@ -75,17 +75,17 @@ add_task(function* testDevtoolsTheme() {
     "The documentElement has 'light' as a default for the devtoolstheme attribute");
   ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the foobar devtools theme.");
   ok(!document.documentElement.hasAttribute("brighttitlebarforeground"),
      "The brighttitlebarforeground attribute is not set on the window with light devtools theme.");
 });
 
 function dummyLightweightTheme(id) {
   return {
-    id: id,
+    id,
     name: id,
     headerURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.header.png",
     iconURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.icon.png",
     textcolor: "red",
     accentcolor: "blue"
   };
 }
 
--- a/browser/base/content/test/general/browser_documentnavigation.js
+++ b/browser/base/content/test/general/browser_documentnavigation.js
@@ -55,17 +55,17 @@ function* expectFocusOnF6(backward, expe
 
         const contentFM = Components.classes["@mozilla.org/focus-manager;1"].
                             getService(Components.interfaces.nsIFocusManager);
         let details = contentFM.focusedWindow.document.documentElement.id;
         if (contentFM.focusedElement) {
           details += "," + contentFM.focusedElement.id;
         }
 
-        sendSyncMessage("BrowserTest:FocusChanged", { details : details });
+        sendSyncMessage("BrowserTest:FocusChanged", { details });
       }, true);
     });
   }
 
   EventUtils.synthesizeKey("VK_F6", { shiftKey: backward });
   yield focusPromise;
 
   if (typeof expectedElement == "string") {
--- a/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js
+++ b/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js
@@ -109,17 +109,17 @@ var gTests = [
     affectsFullscreenMode: false,
     exitFunc: () => {
       executeSoon(() => EventUtils.synthesizeKey("VK_ESCAPE", {}));
     }
   },
   {
     desc: "F11 key",
     affectsFullscreenMode: true,
-    exitFunc: function() {
+    exitFunc() {
       executeSoon(() => EventUtils.synthesizeKey("VK_F11", {}));
     }
   }
 ];
 
 function checkState(expectedStates, contentStates) {
   is(contentStates.inDOMFullscreen, expectedStates.inDOMFullscreen,
      "The DOM fullscreen state of the content should match");
--- a/browser/base/content/test/general/browser_e10s_about_process.js
+++ b/browser/base/content/test/general/browser_e10s_about_process.js
@@ -22,46 +22,46 @@ const TEST_MODULES = [
   CANREMOTE,
   MUSTREMOTE
 ]
 
 function AboutModule() {
 }
 
 AboutModule.prototype = {
-  newChannel: function(aURI, aLoadInfo) {
+  newChannel(aURI, aLoadInfo) {
     throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
   },
 
-  getURIFlags: function(aURI) {
+  getURIFlags(aURI) {
     for (let module of TEST_MODULES) {
       if (aURI.path.startsWith(module.path)) {
         return module.flags;
       }
     }
 
     ok(false, "Called getURIFlags for an unknown page " + aURI.spec);
     return 0;
   },
 
-  getIndexedDBOriginPostfix: function(aURI) {
+  getIndexedDBOriginPostfix(aURI) {
     return null;
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule])
 };
 
 var AboutModuleFactory = {
-  createInstance: function(aOuter, aIID) {
+  createInstance(aOuter, aIID) {
     if (aOuter)
       throw Components.results.NS_ERROR_NO_AGGREGATION;
     return new AboutModule().QueryInterface(aIID);
   },
 
-  lockFactory: function(aLock) {
+  lockFactory(aLock) {
     throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory])
 };
 
 add_task(function* init() {
   let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
--- a/browser/base/content/test/general/browser_fullscreen-window-open.js
+++ b/browser/base/content/test/general/browser_fullscreen-window-open.js
@@ -61,128 +61,128 @@ function runNextTest() {
 
 // Test for window.open() with no feature.
 function test_open() {
   waitForTabOpen({
     message: {
       title: "test_open",
       param: "",
     },
-    finalizeFn: function() {},
+    finalizeFn() {},
   });
 }
 
 // Test for window.open() with width/height.
 function test_open_with_size() {
   waitForTabOpen({
     message: {
       title: "test_open_with_size",
       param: "width=400,height=400",
     },
-    finalizeFn: function() {},
+    finalizeFn() {},
   });
 }
 
 // Test for window.open() with top/left.
 function test_open_with_pos() {
   waitForTabOpen({
     message: {
       title: "test_open_with_pos",
       param: "top=200,left=200",
     },
-    finalizeFn: function() {},
+    finalizeFn() {},
   });
 }
 
 // Test for window.open() with outerWidth/Height.
 function test_open_with_outerSize() {
   let [outerWidth, outerHeight] = [window.outerWidth, window.outerHeight];
   waitForTabOpen({
     message: {
       title: "test_open_with_outerSize",
       param: "outerWidth=200,outerHeight=200",
     },
-    successFn: function() {
+    successFn() {
       is(window.outerWidth, outerWidth, "Don't change window.outerWidth.");
       is(window.outerHeight, outerHeight, "Don't change window.outerHeight.");
     },
-    finalizeFn: function() {},
+    finalizeFn() {},
   });
 }
 
 // Test for window.open() with innerWidth/Height.
 function test_open_with_innerSize() {
   let [innerWidth, innerHeight] = [window.innerWidth, window.innerHeight];
   waitForTabOpen({
     message: {
       title: "test_open_with_innerSize",
       param: "innerWidth=200,innerHeight=200",
     },
-    successFn: function() {
+    successFn() {
       is(window.innerWidth, innerWidth, "Don't change window.innerWidth.");
       is(window.innerHeight, innerHeight, "Don't change window.innerHeight.");
     },
-    finalizeFn: function() {},
+    finalizeFn() {},
   });
 }
 
 // Test for window.open() with dialog.
 function test_open_with_dialog() {
   waitForTabOpen({
     message: {
       title: "test_open_with_dialog",
       param: "dialog=yes",
     },
-    finalizeFn: function() {},
+    finalizeFn() {},
   });
 }
 
 // Test for window.open()
 // when "browser.link.open_newwindow" is nsIBrowserDOMWindow.OPEN_NEWWINDOW
 function test_open_when_open_new_window_by_pref() {
   const PREF_NAME = "browser.link.open_newwindow";
   Services.prefs.setIntPref(PREF_NAME, Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW);
   is(Services.prefs.getIntPref(PREF_NAME), Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW,
      PREF_NAME + " is nsIBrowserDOMWindow.OPEN_NEWWINDOW at this time");
 
   waitForTabOpen({
     message: {
       title: "test_open_when_open_new_window_by_pref",
       param: "width=400,height=400",
     },
-    finalizeFn: function() {
+    finalizeFn() {
       Services.prefs.clearUserPref(PREF_NAME);
     },
   });
 }
 
 // Test for the pref, "browser.link.open_newwindow.disabled_in_fullscreen"
 function test_open_with_pref_to_disable_in_fullscreen() {
   Services.prefs.setBoolPref(PREF_DISABLE_OPEN_NEW_WINDOW, false);
 
   waitForWindowOpen({
     message: {
       title: "test_open_with_pref_disabled_in_fullscreen",
       param: "width=400,height=400",
     },
-    finalizeFn: function() {
+    finalizeFn() {
       Services.prefs.setBoolPref(PREF_DISABLE_OPEN_NEW_WINDOW, true);
     },
   });
 }
 
 
 // Test for window.open() called from chrome context.
 function test_open_from_chrome() {
   waitForWindowOpenFromChrome({
     message: {
       title: "test_open_from_chrome",
       param: "",
     },
-    finalizeFn: function() {}
+    finalizeFn() {}
   });
 }
 
 function waitForTabOpen(aOptions) {
   let message = aOptions.message;
 
   if (!message.title) {
     ok(false, "Can't get message.title.");
@@ -246,17 +246,17 @@ function waitForWindowOpen(aOptions) {
     aOptions.finalizeFn();
 
     info("Finished: " + message.title);
     runNextTest();
   };
 
   let listener = new WindowListener(message.title, getBrowserURL(), {
     onSuccess: aOptions.successFn,
-    onFinalize: onFinalize,
+    onFinalize,
   });
   Services.wm.addListener(listener);
 
   executeWindowOpenInContent({
     uri: url,
     title: message.title,
     option: message.param,
   });
@@ -287,17 +287,17 @@ function waitForWindowOpenFromChrome(aOp
     aOptions.finalizeFn();
 
     info("Finished: " + message.title);
     runNextTest();
   };
 
   let listener = new WindowListener(message.title, getBrowserURL(), {
     onSuccess: aOptions.successFn,
-    onFinalize: onFinalize,
+    onFinalize,
   });
   Services.wm.addListener(listener);
 
   window.open(url, message.title, message.option);
 }
 
 function WindowListener(aTitle, aUrl, aCallBackObj) {
   this.test_title = aTitle;
@@ -307,17 +307,17 @@ function WindowListener(aTitle, aUrl, aC
 }
 WindowListener.prototype = {
 
   test_title: null,
   test_url: null,
   callback_onSuccess: null,
   callBack_onFinalize: null,
 
-  onOpenWindow: function(aXULWindow) {
+  onOpenWindow(aXULWindow) {
     Services.wm.removeListener(this);
 
     let domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                     .getInterface(Ci.nsIDOMWindow);
     let onLoad = aEvent => {
       is(domwindow.document.location.href, this.test_url,
         "Opened Window is expected: " + this.test_title);
       if (this.callback_onSuccess) {
@@ -335,13 +335,13 @@ WindowListener.prototype = {
       }
       else {
         domwindow.close();
         executeSoon(this.callBack_onFinalize);
       }
     };
     domwindow.addEventListener("load", onLoad, true);
   },
-  onCloseWindow: function(aXULWindow) {},
-  onWindowTitleChange: function(aXULWindow, aNewTitle) {},
+  onCloseWindow(aXULWindow) {},
+  onWindowTitleChange(aXULWindow, aNewTitle) {},
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediatorListener,
                                          Ci.nsISupports]),
 };
--- a/browser/base/content/test/general/browser_fxa_oauth.js
+++ b/browser/base/content/test/general/browser_fxa_oauth.js
@@ -16,17 +16,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 const HTTP_PATH = "http://example.com";
 const HTTP_ENDPOINT = "/browser/browser/base/content/test/general/browser_fxa_oauth.html";
 const HTTP_ENDPOINT_WITH_KEYS = "/browser/browser/base/content/test/general/browser_fxa_oauth_with_keys.html";
 
 var gTests = [
   {
     desc: "FxA OAuth - should open a new tab, complete OAuth flow",
-    run: function() {
+    run() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
         let properURL = "http://example.com/browser/browser/base/content/test/general/browser_fxa_oauth.html";
         let queryStrings = [
           "action=signin",
           "client_id=client_id",
           "scope=",
           "state=state",
@@ -69,17 +69,17 @@ var gTests = [
         client.onError = reject;
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should open a new tab, complete OAuth flow when forcing auth",
-    run: function() {
+    run() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
         let properURL = "http://example.com/browser/browser/base/content/test/general/browser_fxa_oauth.html";
         let queryStrings = [
           "action=force_auth",
           "client_id=client_id",
           "scope=",
           "state=state",
@@ -126,17 +126,17 @@ var gTests = [
         client.onError = reject;
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should receive an error when there's a state mismatch",
-    run: function() {
+    run() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
 
         waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
 
           // It should have passed in the expected non-matching state value.
           let queryString = gBrowser.currentURI.spec.split("?")[1];
@@ -164,17 +164,17 @@ var gTests = [
         };
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should be able to request keys during OAuth flow",
-    run: function() {
+    run() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
 
         waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
 
           // It should have asked for keys.
           let queryString = gBrowser.currentURI.spec.split('?')[1];
@@ -206,17 +206,17 @@ var gTests = [
         client.onError = reject;
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should not receive keys if not explicitly requested",
-    run: function() {
+    run() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
 
         waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
 
           // It should not have asked for keys.
           let queryString = gBrowser.currentURI.spec.split('?')[1];
@@ -247,17 +247,17 @@ var gTests = [
         client.onError = reject;
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should receive an error if keys could not be obtained",
-    run: function() {
+    run() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
 
         waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
 
           // It should have asked for keys.
           let queryString = gBrowser.currentURI.spec.split('?')[1];
--- a/browser/base/content/test/general/browser_fxa_web_channel.js
+++ b/browser/base/content/test/general/browser_fxa_web_channel.js
@@ -18,40 +18,40 @@ var {FxAccountsWebChannel} = Components.
 
 const TEST_HTTP_PATH = "http://example.com";
 const TEST_BASE_URL = TEST_HTTP_PATH + "/browser/browser/base/content/test/general/browser_fxa_web_channel.html";
 const TEST_CHANNEL_ID = "account_updates_test";
 
 var gTests = [
   {
     desc: "FxA Web Channel - should receive message about profile changes",
-    run: function* () {
+    *run() {
       let client = new FxAccountsWebChannel({
         content_uri: TEST_HTTP_PATH,
         channel_id: TEST_CHANNEL_ID,
       });
       let promiseObserver = new Promise((resolve, reject) => {
         makeObserver(FxAccountsCommon.ON_PROFILE_CHANGE_NOTIFICATION, function(subject, topic, data) {
           Assert.equal(data, "abc123");
           client.tearDown();
           resolve();
         });
       });
 
       yield BrowserTestUtils.withNewTab({
-        gBrowser: gBrowser,
+        gBrowser,
         url: TEST_BASE_URL + "?profile_change"
       }, function* () {
         yield promiseObserver;
       });
     }
   },
   {
     desc: "fxa web channel - login messages should notify the fxAccounts object",
-    run: function* () {
+    *run() {
 
       let promiseLogin = new Promise((resolve, reject) => {
         let login = (accountData) => {
           Assert.equal(typeof accountData.authAt, 'number');
           Assert.equal(accountData.email, 'testuser@testuser.com');
           Assert.equal(accountData.keyFetchToken, 'key_fetch_token');
           Assert.equal(accountData.sessionToken, 'session_token');
           Assert.equal(accountData.uid, 'uid');
@@ -61,32 +61,32 @@ var gTests = [
           client.tearDown();
           resolve();
         };
 
         let client = new FxAccountsWebChannel({
           content_uri: TEST_HTTP_PATH,
           channel_id: TEST_CHANNEL_ID,
           helpers: {
-            login: login
+            login
           }
         });
       });
 
       yield BrowserTestUtils.withNewTab({
-        gBrowser: gBrowser,
+        gBrowser,
         url: TEST_BASE_URL + "?login"
       }, function* () {
         yield promiseLogin;
       });
     }
   },
   {
     desc: "fxa web channel - can_link_account messages should respond",
-    run: function* () {
+    *run() {
       let properUrl = TEST_BASE_URL + "?can_link_account";
 
       let promiseEcho = new Promise((resolve, reject) => {
 
         let webChannelOrigin = Services.io.newURI(properUrl, null, null);
         // responses sent to content are echoed back over the
         // `fxaccounts_webchannel_response_echo` channel. Ensure the
         // fxaccounts:can_link_account message is responded to.
@@ -109,73 +109,73 @@ var gTests = [
             shouldAllowRelink(acctName) {
               return acctName === 'testuser@testuser.com';
             }
           }
         });
       });
 
       yield BrowserTestUtils.withNewTab({
-        gBrowser: gBrowser,
+        gBrowser,
         url: properUrl
       }, function* () {
         yield promiseEcho;
       });
     }
   },
   {
     desc: "fxa web channel - logout messages should notify the fxAccounts object",
-    run: function* () {
+    *run() {
       let promiseLogout = new Promise((resolve, reject) => {
         let logout = (uid) => {
           Assert.equal(uid, 'uid');
 
           client.tearDown();
           resolve();
         };
 
         let client = new FxAccountsWebChannel({
           content_uri: TEST_HTTP_PATH,
           channel_id: TEST_CHANNEL_ID,
           helpers: {
-            logout: logout
+            logout
           }
         });
       });
 
       yield BrowserTestUtils.withNewTab({
-        gBrowser: gBrowser,
+        gBrowser,
         url: TEST_BASE_URL + "?logout"
       }, function* () {
         yield promiseLogout;
       });
     }
   },
   {
     desc: "fxa web channel - delete messages should notify the fxAccounts object",
-    run: function* () {
+    *run() {
       let promiseDelete = new Promise((resolve, reject) => {
         let logout = (uid) => {
           Assert.equal(uid, 'uid');
 
           client.tearDown();
           resolve();
         };
 
         let client = new FxAccountsWebChannel({
           content_uri: TEST_HTTP_PATH,
           channel_id: TEST_CHANNEL_ID,
           helpers: {
-            logout: logout
+            logout
           }
         });
       });
 
       yield BrowserTestUtils.withNewTab({
-        gBrowser: gBrowser,
+        gBrowser,
         url: TEST_BASE_URL + "?delete"
       }, function* () {
         yield promiseDelete;
       });
     }
   }
 ]; // gTests
 
--- a/browser/base/content/test/general/browser_fxaccounts.js
+++ b/browser/base/content/test/general/browser_fxaccounts.js
@@ -11,26 +11,26 @@ const TEST_ROOT = "http://example.com/br
 
 // instrument gFxAccounts to send observer notifications when it's done
 // what it does.
 (function() {
   let unstubs = {}; // The original functions we stub out.
 
   // The stub functions.
   let stubs = {
-    updateAppMenuItem: function() {
+    updateAppMenuItem() {
       return unstubs['updateAppMenuItem'].call(gFxAccounts).then(() => {
         Services.obs.notifyObservers(null, "test:browser_fxaccounts:updateAppMenuItem", null);
       });
     },
     // Opening preferences is trickier than it should be as leaks are reported
     // due to the promises it fires off at load time  and there's no clear way to
     // know when they are done.
     // So just ensure openPreferences is called rather than whether it opens.
-    openPreferences: function() {
+    openPreferences() {
       Services.obs.notifyObservers(null, "test:browser_fxaccounts:openPreferences", null);
     }
   };
 
   for (let name in stubs) {
     unstubs[name] = gFxAccounts[name];
     gFxAccounts[name] = stubs[name];
   }
@@ -232,17 +232,17 @@ function promiseTabUnloaded(tab)
 function setSignedInUser(verified) {
   let data = {
     email: "foo@example.com",
     uid: "1234@lcip.org",
     assertion: "foobar",
     sessionToken: "dead",
     kA: "beef",
     kB: "cafe",
-    verified: verified,
+    verified,
 
     oauthTokens: {
       // a token for the profile server.
       profile: "key value",
     }
   }
   return fxAccounts.setSignedInUser(data);
 }
--- a/browser/base/content/test/general/browser_getshortcutoruri.js
+++ b/browser/base/content/test/general/browser_getshortcutoruri.js
@@ -14,17 +14,17 @@ function getPostDataString(aIS) {
 function keywordResult(aURL, aPostData, aIsUnsafe) {
   this.url = aURL;
   this.postData = aPostData;
   this.isUnsafe = aIsUnsafe;
 }
 
 function keyWordData() {}
 keyWordData.prototype = {
-  init: function(aKeyWord, aURL, aPostData, aSearchWord) {
+  init(aKeyWord, aURL, aPostData, aSearchWord) {
     this.keyword = aKeyWord;
     this.uri = makeURI(aURL);
     this.postData = aPostData;
     this.searchWord = aSearchWord;
 
     this.method = (this.postData ? "POST" : "GET");
   }
 }
--- a/browser/base/content/test/general/browser_homeDrop.js
+++ b/browser/base/content/test/general/browser_homeDrop.js
@@ -27,17 +27,17 @@ add_task(function*() {
 
     let setHomepageDialog = yield setHomepageDialogPromise;
     ok(true, "dialog appeared in response to home button drop");
     yield BrowserTestUtils.waitForEvent(setHomepageDialog, "load", false);
 
     let setHomepagePromise = new Promise(function(resolve) {
       let observer = {
         QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
-        observe: function(subject, topic, data) {
+        observe(subject, topic, data) {
           is(topic, "nsPref:changed", "observed correct topic");
           is(data, HOMEPAGE_PREF, "observed correct data");
           let modified = Services.prefs.getComplexValue(HOMEPAGE_PREF,
                                                         Ci.nsISupportsString);
           is(modified.data, homepage, "homepage is set correctly");
           Services.prefs.removeObserver(HOMEPAGE_PREF, observer);
 
           Services.prefs.setComplexValue(HOMEPAGE_PREF,
@@ -52,17 +52,17 @@ add_task(function*() {
     setHomepageDialog.document.documentElement.acceptDialog();
 
     yield setHomepagePromise;
   }
 
   function dropInvalidURI() {
     return new Promise(resolve => {
       let consoleListener = {
-        observe: function(m) {
+        observe(m) {
           if (m.message.includes("NS_ERROR_DOM_BAD_URI")) {
             ok(true, "drop was blocked");
             resolve();
           }
         }
       };
       Services.console.registerListener(consoleListener);
       registerCleanupFunction(function() {
--- a/browser/base/content/test/general/browser_keywordSearch.js
+++ b/browser/base/content/test/general/browser_keywordSearch.js
@@ -15,17 +15,17 @@ var gTests = [
     searchURL: Services.search.defaultEngine.getSubmission("foo", null, "keyword").uri.spec
   }
 ];
 
 function test() {
   waitForExplicitFinish();
 
   let windowObserver = {
-    observe: function(aSubject, aTopic, aData) {
+    observe(aSubject, aTopic, aData) {
       if (aTopic == "domwindowopened") {
         ok(false, "Alert window opened");
         let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
         win.addEventListener("load", function() {
           win.removeEventListener("load", arguments.callee, false);
           win.close();
         }, false);
         executeSoon(finish);
--- a/browser/base/content/test/general/browser_plainTextLinks.js
+++ b/browser/base/content/test/general/browser_plainTextLinks.js
@@ -114,17 +114,17 @@ add_task(function *() {
       testLinkExpected("http://open-suse.ru/", "Linkified text should open the correct link");
     },
     () => testExpected(true, "Link options should not show for 'open-suse.ru)'")
   ];
 
   let contentAreaContextMenu = document.getElementById("contentAreaContextMenu");
 
   for (let testid = 0; testid < checks.length; testid++) {
-    let menuPosition = yield ContentTask.spawn(gBrowser.selectedBrowser, { testid: testid }, function* (arg) {
+    let menuPosition = yield ContentTask.spawn(gBrowser.selectedBrowser, { testid }, function* (arg) {
       let range = content.tests[arg.testid]();
 
       // Get the range of the selection and determine its coordinates. These
       // coordinates will be returned to the parent process and the context menu
       // will be opened at that location.
       let rangeRect = range.getBoundingClientRect();
       return [rangeRect.x + 3, rangeRect.y + 3];
     });
--- a/browser/base/content/test/general/browser_restore_isAppTab.js
+++ b/browser/base/content/test/general/browser_restore_isAppTab.js
@@ -9,17 +9,17 @@ function getMinidumpDirectory() {
   let dir = Services.dirsvc.get('ProfD', Ci.nsIFile);
   dir.append("minidumps");
   return dir;
 }
 
 // This observer is needed so we can clean up all evidence of the crash so
 // the testrunner thinks things are peachy.
 var CrashObserver = {
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     is(topic, 'ipc:content-shutdown', 'Received correct observer topic.');
     ok(subject instanceof Ci.nsIPropertyBag2,
        'Subject implements nsIPropertyBag2.');
     // we might see this called as the process terminates due to previous tests.
     // We are only looking for "abnormal" exits...
     if (!subject.hasKey("abnormal")) {
       info("This is a normal termination and isn't the one we are looking for...");
       return;
--- a/browser/base/content/test/general/browser_sanitize-timespans.js
+++ b/browser/base/content/test/general/browser_sanitize-timespans.js
@@ -26,17 +26,17 @@ function promiseFormHistoryRemoved() {
   }, "satchel-storage-changed", false);
   return deferred.promise;
 }
 
 function promiseDownloadRemoved(list) {
   let deferred = Promise.defer();
 
   let view = {
-    onDownloadRemoved: function(download) {
+    onDownloadRemoved(download) {
       list.removeView(view);
       deferred.resolve();
     }
   };
 
   list.addView(view);
 
   return deferred.promise;
@@ -53,21 +53,21 @@ function countEntries(name, message, che
   let deferred = Promise.defer();
 
   var obj = {};
   if (name !== null)
     obj.fieldname = name;
 
   let count;
   FormHistory.count(obj, { handleResult: result => count = result,
-                           handleError: function(error) {
+                           handleError(error) {
                              deferred.reject(error)
                              throw new Error("Error occurred searching form history: " + error);
                            },
-                           handleCompletion: function(reason) {
+                           handleCompletion(reason) {
                              if (!reason) {
                                check(count, message);
                                deferred.resolve();
                              }
                            },
                          });
 
   return deferred.promise;
@@ -488,33 +488,33 @@ function setupHistory() {
 
 function* setupFormHistory() {
 
   function searchEntries(terms, params) {
     let deferred = Promise.defer();
 
     let results = [];
     FormHistory.search(terms, params, { handleResult: result => results.push(result),
-                                        handleError: function(error) {
+                                        handleError(error) {
                                           deferred.reject(error);
                                           throw new Error("Error occurred searching form history: " + error);
                                         },
-                                        handleCompletion: function(reason) { deferred.resolve(results); }
+                                        handleCompletion(reason) { deferred.resolve(results); }
                                       });
     return deferred.promise;
   }
 
   function update(changes)
   {
     let deferred = Promise.defer();
-    FormHistory.update(changes, { handleError: function(error) {
+    FormHistory.update(changes, { handleError(error) {
                                     deferred.reject(error);
                                     throw new Error("Error occurred searching form history: " + error);
                                   },
-                                  handleCompletion: function(reason) { deferred.resolve(); }
+                                  handleCompletion(reason) { deferred.resolve(); }
                                 });
     return deferred.promise;
   }
 
   // Make sure we've got a clean DB to start with, then add the entries we'll be testing.
   yield update(
     [{
         op: "remove"
--- a/browser/base/content/test/general/browser_sanitizeDialog.js
+++ b/browser/base/content/test/general/browser_sanitizeDialog.js
@@ -567,29 +567,29 @@ 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: function(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");
   };
 
   var cacheListener = {
-    onCacheEntryCheck: function() { return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED; },
-    onCacheEntryAvailable: function(entry, isnew, unused, status) {
+    onCacheEntryCheck() { return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED; },
+    onCacheEntryAvailable(entry, isnew, unused, status) {
       is(status, Cr.NS_OK);
       var stream = entry.openOutputStream(0);
       var content = "content";
       stream.write(content, content.length);
       stream.close();
       entry.close();
       wh.open();
     }
@@ -643,38 +643,38 @@ function WindowHelper(aWin) {
   this.win = aWin;
   this.promiseClosed = new Promise(resolve => { this._resolveClosed = resolve });
 }
 
 WindowHelper.prototype = {
   /**
    * "Presses" the dialog's OK button.
    */
-  acceptDialog: function() {
+  acceptDialog() {
     is(this.win.document.documentElement.getButton("accept").disabled, false,
        "Dialog's OK button should not be disabled");
     this.win.document.documentElement.acceptDialog();
   },
 
   /**
    * "Presses" the dialog's Cancel button.
    */
-  cancelDialog: function() {
+  cancelDialog() {
     this.win.document.documentElement.cancelDialog();
   },
 
   /**
    * Ensures that the details progressive disclosure button and the item list
    * hidden by it match up.  Also makes sure the height of the dialog is
    * sufficient for the item list and warning panel.
    *
    * @param aShouldBeShown
    *        True if you expect the details to be shown and false if hidden
    */
-  checkDetails: function(aShouldBeShown) {
+  checkDetails(aShouldBeShown) {
     let button = this.getDetailsButton();
     let list = this.getItemList();
     let hidden = list.hidden || list.collapsed;
     is(hidden, !aShouldBeShown,
        "Details should be " + (aShouldBeShown ? "shown" : "hidden") +
        " but were actually " + (hidden ? "hidden" : "shown"));
     let dir = hidden ? "down" : "up";
     is(button.className, "expander-" + dir,
@@ -695,91 +695,91 @@ WindowHelper.prototype = {
    * (Un)checks a history scope checkbox (browser & download history,
    * form history, etc.).
    *
    * @param aPrefName
    *        The final portion of the checkbox's privacy.cpd.* preference name
    * @param aCheckState
    *        True if the checkbox should be checked, false otherwise
    */
-  checkPrefCheckbox: function(aPrefName, aCheckState) {
+  checkPrefCheckbox(aPrefName, aCheckState) {
     var pref = "privacy.cpd." + aPrefName;
     var cb = this.win.document.querySelectorAll(
                "#itemList > [preference='" + pref + "']");
     is(cb.length, 1, "found checkbox for " + pref + " preference");
     if (cb[0].checked != aCheckState)
       cb[0].click();
   },
 
   /**
    * Makes sure all the checkboxes are checked.
    */
-  _checkAllCheckboxesCustom: function(check) {
+  _checkAllCheckboxesCustom(check) {
     var cb = this.win.document.querySelectorAll("#itemList > [preference]");
     ok(cb.length > 1, "found checkboxes for preferences");
     for (var i = 0; i < cb.length; ++i) {
       var pref = this.win.document.getElementById(cb[i].getAttribute("preference"));
       if (!!pref.value ^ check)
         cb[i].click();
     }
   },
 
-  checkAllCheckboxes: function() {
+  checkAllCheckboxes() {
     this._checkAllCheckboxesCustom(true);
   },
 
-  uncheckAllCheckboxes: function() {
+  uncheckAllCheckboxes() {
     this._checkAllCheckboxesCustom(false);
   },
 
   /**
    * @return The details progressive disclosure button
    */
-  getDetailsButton: function() {
+  getDetailsButton() {
     return this.win.document.getElementById("detailsExpander");
   },
 
   /**
    * @return The dialog's duration dropdown
    */
-  getDurationDropdown: function() {
+  getDurationDropdown() {
     return this.win.document.getElementById("sanitizeDurationChoice");
   },
 
   /**
    * @return The item list hidden by the details progressive disclosure button
    */
-  getItemList: function() {
+  getItemList() {
     return this.win.document.getElementById("itemList");
   },
 
   /**
    * @return The clear-everything warning box
    */
-  getWarningPanel: function() {
+  getWarningPanel() {
     return this.win.document.getElementById("sanitizeEverythingWarningBox");
   },
 
   /**
    * @return True if the "Everything" warning panel is visible (as opposed to
    *         the tree)
    */
-  isWarningPanelVisible: function() {
+  isWarningPanelVisible() {
     return !this.getWarningPanel().hidden;
   },
 
   /**
    * Opens the clear recent history dialog.  Before calling this, set
    * this.onload to a function to execute onload.  It should close the dialog
    * when done so that the tests may continue.  Set this.onunload to a function
    * to execute onunload.  this.onunload is optional. If it returns true, the
    * caller is expected to call waitForAsyncUpdates at some point; if false is
    * returned, waitForAsyncUpdates is called automatically.
    */
-  open: function() {
+  open() {
     let wh = this;
 
     function windowObserver(aSubject, aTopic, aData) {
       if (aTopic != "domwindowopened")
         return;
 
       Services.ww.unregisterNotification(windowObserver);
 
@@ -830,32 +830,32 @@ WindowHelper.prototype = {
   },
 
   /**
    * Selects a duration in the duration dropdown.
    *
    * @param aDurVal
    *        One of the Sanitizer.TIMESPAN_* values
    */
-  selectDuration: function(aDurVal) {
+  selectDuration(aDurVal) {
     this.getDurationDropdown().value = aDurVal;
     if (aDurVal === Sanitizer.TIMESPAN_EVERYTHING) {
       is(this.isWarningPanelVisible(), true,
          "Warning panel should be visible for TIMESPAN_EVERYTHING");
     }
     else {
       is(this.isWarningPanelVisible(), false,
          "Warning panel should not be visible for non-TIMESPAN_EVERYTHING");
     }
   },
 
   /**
    * Toggles the details progressive disclosure button.
    */
-  toggleDetails: function() {
+  toggleDetails() {
     this.getDetailsButton().click();
   }
 };
 
 function promiseSanitizationComplete() {
   return promiseTopicObserved("sanitizer-sanitization-complete");
 }
 
@@ -893,41 +893,41 @@ function* addDownloadWithMinutesAgo(aExp
 function promiseAddFormEntryWithMinutesAgo(aMinutesAgo) {
   let name = aMinutesAgo + "-minutes-ago";
 
   // Artifically age the entry to the proper vintage.
   let timestamp = now_uSec - (aMinutesAgo * kUsecPerMin);
 
   return new Promise((resolve, reject) =>
     FormHistory.update({ op: "add", fieldname: name, value: "dummy", firstUsed: timestamp },
-                       { handleError: function(error) {
+                       { handleError(error) {
                            reject();
                            throw new Error("Error occurred updating form history: " + error);
                          },
-                         handleCompletion: function(reason) {
+                         handleCompletion(reason) {
                            resolve(name);
                          }
                        })
    )
 }
 
 /**
  * Checks if a form entry exists.
  */
 function formNameExists(name)
 {
   return new Promise((resolve, reject) => {
     let count = 0;
     FormHistory.count({ fieldname: name },
                       { handleResult: result => count = result,
-                        handleError: function(error) {
+                        handleError(error) {
                           reject(error);
                           throw new Error("Error occurred searching form history: " + error);
                         },
-                        handleCompletion: function(reason) {
+                        handleCompletion(reason) {
                           if (!reason) {
                             resolve(count);
                           }
                         }
                       });
   });
 }
 
--- a/browser/base/content/test/general/browser_save_link_when_window_navigates.js
+++ b/browser/base/content/test/general/browser_save_link_when_window_navigates.js
@@ -85,23 +85,23 @@ function triggerSave(aWindow, aCallback)
     aWindow2.close();
 
     executeSoon(aCallback);
   }
 }
 
 
 var windowObserver = {
-  setCallback: function(aCallback) {
+  setCallback(aCallback) {
     if (this._callback) {
       ok(false, "Should only be dealing with one callback at a time.");
     }
     this._callback = aCallback;
   },
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic != "domwindowopened") {
       return;
     }
 
     let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
 
     win.addEventListener("load", function onLoad(event) {
       win.removeEventListener("load", onLoad, false);
--- 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,27 +10,27 @@ 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: function(num, consumption)
+      onCacheStorageInfo(num, consumption)
       {
         info("disk storage contains " + num + " entries");
       },
-      onCacheEntryInfo: function(uri)
+      onCacheEntryInfo(uri)
       {
         let urispec = uri.asciiSpec;
         info(urispec);
         is(urispec.includes(filename), false, "web content present in disk cache");
       },
-      onCacheEntryVisitCompleted: function()
+      onCacheEntryVisitCompleted()
       {
         resolve();
       }
     };
     function Visitor() {}
 
     let cache = Cc["@mozilla.org/netwerk/cache-storage-service;1"]
                 .getService(Ci.nsICacheStorageService);
--- a/browser/base/content/test/general/browser_tabfocus.js
+++ b/browser/base/content/test/general/browser_tabfocus.js
@@ -48,17 +48,17 @@ function* getFocusedElementForBrowser(br
         messageManager.removeMessageListener("Browser:GetCurrentFocus", getCurrentFocus);
         resolve(message.data.details);
       });
 
       // The dontCheckExtraFocus flag is used to indicate not to check some
       // additional focus related properties. This is needed as both URLs are
       // loaded using the same child process and share focus managers.
       browser.messageManager.sendAsyncMessage("Browser:GetFocusedElement",
-        { dontCheckExtraFocus : dontCheckExtraFocus });
+        { dontCheckExtraFocus });
     });
   }
   var focusedWindow = {};
   var node = fm.getFocusedElementForWindow(browser.contentWindow, false, focusedWindow);
   return "Focus is " + (node ? node.id : "<none>");
 }
 
 function focusInChild()
@@ -108,26 +108,26 @@ function focusInChild()
         details += "<ERROR: child hasFocus() is not correct>";
       }
       if ((contentFM.focusedElement && doc.activeElement != contentFM.focusedElement) ||
           (!contentFM.focusedElement && doc.activeElement != doc.body)) {
         details += "<ERROR: child activeElement is not correct>";
       }
     }
 
-    sendSyncMessage("Browser:GetCurrentFocus", { details : details });
+    sendSyncMessage("Browser:GetCurrentFocus", { details });
   });
 }
 
 function focusElementInChild(elementid, type)
 {
   let browser = (elementid.indexOf("1") >= 0) ? browser1 : browser2;
   if (gMultiProcessBrowser) {
     browser.messageManager.sendAsyncMessage("Browser:ChangeFocus",
-                                            { id: elementid, type: type });
+                                            { id: elementid, type });
   }
   else {
     browser.contentDocument.getElementById(elementid)[type]();
   }
 }
 
 add_task(function*() {
   tab1 = gBrowser.addTab();
--- a/browser/base/content/test/general/browser_tabopen_reflows.js
+++ b/browser/base/content/test/general/browser_tabopen_reflows.js
@@ -108,17 +108,17 @@ add_task(function*() {
   yield waitForTransitionEnd();
 
   // Remove reflow observer and clean up.
   docShell.removeWeakReflowObserver(observer);
   gBrowser.removeCurrentTab();
 });
 
 var observer = {
-  reflow: function(start, end) {
+  reflow(start, end) {
     // Gather information about the current code path.
     let path = (new Error().stack).split("\n").slice(1).map(line => {
       return line.replace(/:\d+:\d+$/, "");
     }).join("|");
     let pathWithLineNumbers = (new Error().stack).split("\n").slice(1).join("|");
 
     // Stack trace is empty. Reflow was triggered by native code.
     if (path === "") {
@@ -131,17 +131,17 @@ var observer = {
         ok(true, "expected uninterruptible reflow '" + stack + "'");
         return;
       }
     }
 
     ok(false, "unexpected uninterruptible reflow '" + pathWithLineNumbers + "'");
   },
 
-  reflowInterruptible: function(start, end) {
+  reflowInterruptible(start, end) {
     // We're not interested in interruptible reflows.
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIReflowObserver,
                                          Ci.nsISupportsWeakReference])
 };
 
 function waitForTransitionEnd() {
--- a/browser/base/content/test/general/browser_trackingUI_4.js
+++ b/browser/base/content/test/general/browser_trackingUI_4.js
@@ -23,17 +23,17 @@ registerCleanupFunction(function() {
     gBrowser.removeCurrentTab();
   }
 });
 
 function waitForSecurityChange(numChanges = 1) {
   return new Promise(resolve => {
     let n = 0;
     let listener = {
-      onSecurityChange: function() {
+      onSecurityChange() {
         n = n + 1;
         info("Received onSecurityChange event " + n + " of " + numChanges);
         if (n >= numChanges) {
           tabbrowser.removeProgressListener(listener);
           resolve();
         }
       }
     };
--- a/browser/base/content/test/general/browser_trackingUI_6.js
+++ b/browser/base/content/test/general/browser_trackingUI_6.js
@@ -1,15 +1,15 @@
 const URL = "http://mochi.test:8888/browser/browser/base/content/test/general/file_trackingUI_6.html";
 
 function waitForSecurityChange(numChanges = 1) {
   return new Promise(resolve => {
     let n = 0;
     let listener = {
-      onSecurityChange: function() {
+      onSecurityChange() {
         n = n + 1;
         info("Received onSecurityChange event " + n + " of " + numChanges);
         if (n >= numChanges) {
           gBrowser.removeProgressListener(listener);
           resolve();
         }
       }
     };
--- a/browser/base/content/test/general/browser_viewSourceInTabOnViewSource.js
+++ b/browser/base/content/test/general/browser_viewSourceInTabOnViewSource.js
@@ -1,12 +1,12 @@
 function wait_while_tab_is_busy() {
   return new Promise(resolve => {
     let progressListener = {
-      onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
+      onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
         if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) {
           gBrowser.removeProgressListener(this);
           setTimeout(resolve, 0);
         }
       }
     };
     gBrowser.addProgressListener(progressListener);
   });
--- a/browser/base/content/test/general/browser_web_channel.js
+++ b/browser/base/content/test/general/browser_web_channel.js
@@ -15,17 +15,17 @@ const HTTP_IFRAME_PATH = "http://mochi.t
 const HTTP_REDIRECTED_IFRAME_PATH = "http://example.org";
 
 // Keep this synced with /mobile/android/tests/browser/robocop/testWebChannel.js
 // as much as possible.  (We only have that since we can't run browser chrome
 // tests on Android.  Yet?)
 var gTests = [
   {
     desc: "WebChannel generic message",
-    run: function* () {
+    *run() {
       return new Promise(function(resolve, reject) {
         let tab;
         let channel = new WebChannel("generic", Services.io.newURI(HTTP_PATH, null, null));
         channel.listen(function(id, message, target) {
           is(id, "generic");
           is(message.something.nested, "hello");
           channel.stopListening();
           gBrowser.removeTab(tab);
@@ -33,17 +33,17 @@ var gTests = [
         });
 
         tab = gBrowser.addTab(HTTP_PATH + HTTP_ENDPOINT + "?generic");
       });
     }
   },
   {
     desc: "WebChannel generic message in a private window.",
-    run: function* () {
+    *run() {
       let promiseTestDone = new Promise(function(resolve, reject) {
         let channel = new WebChannel("generic", Services.io.newURI(HTTP_PATH, null, null));
         channel.listen(function(id, message, target) {
           is(id, "generic");
           is(message.something.nested, "hello");
           channel.stopListening();
           resolve();
         });
@@ -53,17 +53,17 @@ var gTests = [
       let privateWindow = yield BrowserTestUtils.openNewBrowserWindow({private: true});
       yield BrowserTestUtils.openNewForegroundTab(privateWindow.gBrowser, url);
       yield promiseTestDone;
       yield BrowserTestUtils.closeWindow(privateWindow);
     }
   },
   {
     desc: "WebChannel two way communication",
-    run: function* () {
+    *run() {
       return new Promise(function(resolve, reject) {
         let tab;
         let channel = new WebChannel("twoway", Services.io.newURI(HTTP_PATH, null, null));
 
         channel.listen(function(id, message, sender) {
           is(id, "twoway", "bad id");
           ok(message.command, "command not ok");
 
@@ -80,17 +80,17 @@ var gTests = [
         });
 
         tab = gBrowser.addTab(HTTP_PATH + HTTP_ENDPOINT + "?twoway");
       });
     }
   },
   {
     desc: "WebChannel two way communication in an iframe",
-    run: function* () {
+    *run() {
       let parentChannel = new WebChannel("echo", Services.io.newURI(HTTP_PATH, null, null));
       let iframeChannel = new WebChannel("twoway", Services.io.newURI(HTTP_IFRAME_PATH, null, null));
       let promiseTestDone = new Promise(function(resolve, reject) {
         parentChannel.listen(function(id, message, sender) {
           reject(new Error("WebChannel message incorrectly sent to parent"));
         });
 
         iframeChannel.listen(function(id, message, sender) {
@@ -103,28 +103,28 @@ var gTests = [
 
           if (message.command === "two") {
             is(message.detail.data.nested, true);
             resolve();
           }
         });
       });
       yield BrowserTestUtils.withNewTab({
-        gBrowser: gBrowser,
+        gBrowser,
         url: HTTP_PATH + HTTP_ENDPOINT + "?iframe"
       }, function* () {
         yield promiseTestDone;
         parentChannel.stopListening();
         iframeChannel.stopListening();
       });
     }
   },
   {
     desc: "WebChannel response to a redirected iframe",
-    run: function* () {
+    *run() {
       /**
        * This test checks that WebChannel responses are only sent
        * to an iframe if the iframe has not redirected to another origin.
        * Test flow:
        * 1. create a page, embed an iframe on origin A.
        * 2. the iframe sends a message `redirecting`, then redirects to
        *    origin B.
        * 3. the iframe at origin B is set up to echo any messages back to the
@@ -167,45 +167,45 @@ var gTests = [
             });
           } else {
             reject(new Error(`Unexpected command ${message.command}`));
           }
         });
       });
 
       yield BrowserTestUtils.withNewTab({
-        gBrowser: gBrowser,
+        gBrowser,
         url: HTTP_PATH + HTTP_ENDPOINT + "?iframe_pre_redirect"
       }, function* () {
         yield promiseTestDone;
         preRedirectChannel.stopListening();
         postRedirectChannel.stopListening();
       });
     }
   },
   {
     desc: "WebChannel multichannel",
-    run: function* () {
+    *run() {
       return new Promise(function(resolve, reject) {
         let tab;
         let channel = new WebChannel("multichannel", Services.io.newURI(HTTP_PATH, null, null));
 
         channel.listen(function(id, message, sender) {
           is(id, "multichannel");
           gBrowser.removeTab(tab);
           resolve();
         });
 
         tab = gBrowser.addTab(HTTP_PATH + HTTP_ENDPOINT + "?multichannel");
       });
     }
   },
   {
     desc: "WebChannel unsolicited send, using system principal",
-    run: function* () {
+    *run() {
       let channel = new WebChannel("echo", Services.io.newURI(HTTP_PATH, null, null));
 
       // an unsolicted message is sent from Chrome->Content which is then
       // echoed back. If the echo is received here, then the content
       // received the message.
       let messagePromise = new Promise(function(resolve, reject) {
         channel.listen(function(id, message, sender) {
           is(id, "echo");
@@ -225,17 +225,17 @@ var gTests = [
         });
         yield messagePromise;
         channel.stopListening();
       });
     }
   },
   {
     desc: "WebChannel unsolicited send, using target origin's principal",
-    run: function* () {
+    *run() {
       let targetURI = Services.io.newURI(HTTP_PATH, null, null);
       let channel = new WebChannel("echo", targetURI);
 
       // an unsolicted message is sent from Chrome->Content which is then
       // echoed back. If the echo is received here, then the content
       // received the message.
       let messagePromise = new Promise(function(resolve, reject) {
         channel.listen(function(id, message, sender) {
@@ -258,17 +258,17 @@ var gTests = [
 
         yield messagePromise;
         channel.stopListening();
       });
     }
   },
   {
     desc: "WebChannel unsolicited send with principal mismatch",
-    run: function* () {
+    *run() {
       let targetURI = Services.io.newURI(HTTP_PATH, null, null);
       let channel = new WebChannel("echo", targetURI);
 
       // two unsolicited messages are sent from Chrome->Content. The first,
       // `unsolicited_no_response_expected` is sent to the wrong principal
       // and should not be echoed back. The second, `done`, is sent to the
       // correct principal and should be echoed back.
       let messagePromise = new Promise(function(resolve, reject) {
@@ -279,17 +279,17 @@ var gTests = [
             resolve();
           } else {
             reject(new Error(`Unexpected command ${message.command}`));
           }
         });
       });
 
       yield BrowserTestUtils.withNewTab({
-        gBrowser: gBrowser,
+        gBrowser,
         url: HTTP_PATH + HTTP_ENDPOINT + "?unsolicited"
       }, function* (targetBrowser) {
 
         let mismatchURI = Services.io.newURI(HTTP_MISMATCH_PATH, null, null);
         let mismatchPrincipal = Services.scriptSecurityManager.getNoAppCodebasePrincipal(mismatchURI);
 
         // send a message to the wrong principal. It should not be delivered
         // to content, and should not be echoed back.
@@ -309,17 +309,17 @@ var gTests = [
 
         yield messagePromise;
         channel.stopListening();
       });
     }
   },
   {
     desc: "WebChannel non-window target",
-    run: function* () {
+    *run() {
       /**
        * This test ensures messages can be received from and responses
        * sent to non-window elements.
        *
        * First wait for the non-window element to send a "start" message.
        * Then send the non-window element a "done" message.
        * The non-window element will echo the "done" message back, if it
        * receives the message.
@@ -345,17 +345,17 @@ var gTests = [
       }, function* () {
         yield testDonePromise;
         channel.stopListening();
       });
     }
   },
   {
     desc: "WebChannel disallows non-string message from non-whitelisted origin",
-    run: function* () {
+    *run() {
       /**
        * This test ensures that non-string messages can't be sent via WebChannels.
        * We create a page (on a non-whitelisted origin) which should send us two
        * messages immediately. The first message has an object for it's detail,
        * and the second has a string. We check that we only get the second
        * message.
        */
       let channel = new WebChannel("objects", Services.io.newURI(HTTP_PATH, null, null));
@@ -372,17 +372,17 @@ var gTests = [
       }, function* () {
         yield testDonePromise;
         channel.stopListening();
       });
     }
   },
   {
     desc: "WebChannel allows both string and non-string message from whitelisted origin",
-    run: function* () {
+    *run() {
       /**
        * Same process as above, but we whitelist the origin before loading the page,
        * and expect to get *both* messages back (each exactly once).
        */
       let channel = new WebChannel("objects", Services.io.newURI(HTTP_PATH, null, null));
 
       let testDonePromise = new Promise((resolve, reject) => {
         let sawObject = false;
@@ -414,17 +414,17 @@ var gTests = [
         yield testDonePromise;
         Services.prefs.setCharPref(webchannelWhitelistPref, origWhitelist);
         channel.stopListening();
       });
     }
   },
   {
     desc: "WebChannel errors handling the message are delivered back to content",
-    run: function* () {
+    *run() {
       const ERRNO_UNKNOWN_ERROR              = 999; // WebChannel.jsm doesn't export this.
 
       // The channel where we purposely fail responding to a command.
       let channel = new WebChannel("error", Services.io.newURI(HTTP_PATH, null, null));
       // The channel where we see the response when the content sees the error
       let echoChannel = new WebChannel("echo", Services.io.newURI(HTTP_PATH, null, null));
 
       let testDonePromise = new Promise((resolve, reject) => {
@@ -450,17 +450,17 @@ var gTests = [
         yield testDonePromise;
         channel.stopListening();
         echoChannel.stopListening();
       });
     }
   },
   {
     desc: "WebChannel errors due to an invalid channel are delivered back to content",
-    run: function* () {
+    *run() {
       const ERRNO_NO_SUCH_CHANNEL            = 2; // WebChannel.jsm doesn't export this.
       // The channel where we see the response when the content sees the error
       let echoChannel = new WebChannel("echo", Services.io.newURI(HTTP_PATH, null, null));
 
       let testDonePromise = new Promise((resolve, reject) => {
         // listen for the confirmation that content saw the error.
         echoChannel.listen((id, message, sender) => {
           is(id, "echo");
--- a/browser/base/content/test/general/browser_windowactivation.js
+++ b/browser/base/content/test/general/browser_windowactivation.js
@@ -104,18 +104,18 @@ function reallyRunTests() {
   browser1.messageManager.loadFrameScript("data:,(" + childFunction.toString() + ")();", true);
   browser2.messageManager.loadFrameScript("data:,(" + childFunction.toString() + ")();", true);
 
   gBrowser.selectedTab = tab1;
 }
 
 function sendGetBackgroundRequest(ifChanged)
 {
-  browser1.messageManager.sendAsyncMessage("Test:GetBackgroundColor", { ifChanged: ifChanged });
-  browser2.messageManager.sendAsyncMessage("Test:GetBackgroundColor", { ifChanged: 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);
 }
@@ -172,12 +172,12 @@ function childFunction()
     if (!area) {
       return; /* hasn't loaded yet */
     }
 
     let color = content.getComputedStyle(area, "").backgroundColor;
     if (oldColor != color || !ifChanged) {
       expectingResponse = false;
       oldColor = color;
-      sendAsyncMessage("Test:BackgroundColorChanged", { color: color });
+      sendAsyncMessage("Test:BackgroundColorChanged", { color });
     }
   }, 20);
 }
--- a/browser/base/content/test/general/browser_windowopen_reflows.js
+++ b/browser/base/content/test/general/browser_windowopen_reflows.js
@@ -68,17 +68,17 @@ function test() {
     docShell.removeWeakReflowObserver(observer);
     win.close();
 
     finish();
   });
 }
 
 var observer = {
-  reflow: function(start, end) {
+  reflow(start, end) {
     // Gather information about the current code path.
     let stack = new Error().stack;
     let path = stack.split("\n").slice(1).map(line => {
       return line.replace(/:\d+:\d+$/, "");
     }).join("|");
     let pathWithLineNumbers = (new Error().stack).split("\n").slice(1).join("|");
 
     // Stack trace is empty. Reflow was triggered by native code.
@@ -94,17 +94,17 @@ var observer = {
         ok(true, "expected uninterruptible reflow '" + expectedStack + "'");
         return;
       }
     }
 
     ok(false, "unexpected uninterruptible reflow '" + pathWithLineNumbers + "'");
   },
 
-  reflowInterruptible: function(start, end) {
+  reflowInterruptible(start, end) {
     // We're not interested in interruptible reflows.
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIReflowObserver,
                                          Ci.nsISupportsWeakReference])
 };
 
 function waitForMozAfterPaint(win, callback) {
--- a/browser/base/content/test/general/contentSearchUI.js
+++ b/browser/base/content/test/general/contentSearchUI.js
@@ -10,82 +10,82 @@ const ENGINE_NAME = "browser_searchSugge
 var gController;
 
 addMessageListener(TEST_MSG, msg => {
   messageHandlers[msg.data.type](msg.data.data);
 });
 
 var messageHandlers = {
 
-  init: function() {
+  init() {
     Services.search.currentEngine = Services.search.getEngineByName(ENGINE_NAME);
     let input = content.document.querySelector("input");
     gController =
       new content.ContentSearchUIController(input, input.parentNode, "test", "test");
     content.addEventListener("ContentSearchService", function listener(aEvent) {
       if (aEvent.detail.type == "State" &&
           gController.defaultEngine.name == ENGINE_NAME) {
         content.removeEventListener("ContentSearchService", listener);
         ack("init");
       }
     });
   },
 
-  key: function(arg) {
+  key(arg) {
     let keyName = typeof(arg) == "string" ? arg : arg.key;
     content.synthesizeKey(keyName, arg.modifiers || {});
     let wait = arg.waitForSuggestions ? waitForSuggestions : cb => cb();
     wait(ack.bind(null, "key"));
   },
 
-  startComposition: function(arg) {
+  startComposition(arg) {
     content.synthesizeComposition({ type: "compositionstart", data: "" });
     ack("startComposition");
   },
 
-  changeComposition: function(arg) {
+  changeComposition(arg) {
     let data = typeof(arg) == "string" ? arg : arg.data;
     content.synthesizeCompositionChange({
       composition: {
         string: data,
         clauses: [
           { length: data.length, attr: content.COMPOSITION_ATTR_RAW_CLAUSE }
         ]
       },
       caret: { start: data.length, length: 0 }
     });
     let wait = arg.waitForSuggestions ? waitForSuggestions : cb => cb();
     wait(ack.bind(null, "changeComposition"));
   },
 
-  commitComposition: function() {
+  commitComposition() {
     content.synthesizeComposition({ type: "compositioncommitasis" });
     ack("commitComposition");
   },
 
-  focus: function() {
+  focus() {
     gController.input.focus();
     ack("focus");
   },
 
-  blur: function() {
+  blur() {
     gController.input.blur();
     ack("blur");
   },
 
-  waitForSearch: function() {
+  waitForSearch() {
     waitForContentSearchEvent("Search", aData => ack("waitForSearch", aData));
   },
 
-  waitForSearchSettings: function() {
+  waitForSearchSettings() {
     waitForContentSearchEvent("ManageEngines",
                               aData => ack("waitForSearchSettings", aData));
   },
 
-  mousemove: function(itemIndex) {
+  mousemove(itemIndex) {
     let row;
     if (itemIndex == -1) {
       row = gController._table.firstChild;
     }
     else {
       let allElts = [...gController._suggestionsList.children,
                      ...gController._oneOffButtons,
                      content.document.getElementById("contentSearchSettingsButton")];
@@ -97,17 +97,17 @@ var messageHandlers = {
     }
     row.addEventListener("mousemove", function handler() {
       row.removeEventListener("mousemove", handler);
       ack("mousemove");
     });
     content.synthesizeMouseAtCenter(row, event);
   },
 
-  click: function(arg) {
+  click(arg) {
     let eltIdx = typeof(arg) == "object" ? arg.eltIdx : arg;
     let row;
     if (eltIdx == -1) {
       row = gController._table.firstChild;
     }
     else {
       let allElts = [...gController._suggestionsList.children,
                      ...gController._oneOffButtons,
@@ -116,35 +116,35 @@ var messageHandlers = {
     }
     let event = arg.modifiers || {};
     // synthesizeMouseAtCenter defaults to sending a mousedown followed by a
     // mouseup if the event type is not specified.
     content.synthesizeMouseAtCenter(row, event);
     ack("click");
   },
 
-  addInputValueToFormHistory: function() {
+  addInputValueToFormHistory() {
     gController.addInputValueToFormHistory();
     ack("addInputValueToFormHistory");
   },
 
-  addDuplicateOneOff: function() {
+  addDuplicateOneOff() {
     let btn = gController._oneOffButtons[gController._oneOffButtons.length - 1];
     let newBtn = btn.cloneNode(true);
     btn.parentNode.appendChild(newBtn);
     gController._oneOffButtons.push(newBtn);
     ack("addDuplicateOneOff");
   },
 
-  removeLastOneOff: function() {
+  removeLastOneOff() {
     gController._oneOffButtons.pop().remove();
     ack("removeLastOneOff");
   },
 
-  reset: function() {
+  reset() {
     // Reset both the input and suggestions by select all + delete. If there was
     // no text entered, this won't have any effect, so also escape to ensure the
     // suggestions table is closed.
     gController.input.focus();
     content.synthesizeKey("a", { accelKey: true });
     content.synthesizeKey("VK_DELETE", {});
     content.synthesizeKey("VK_ESCAPE", {});
     ack("reset");
--- a/browser/base/content/test/general/head.js
+++ b/browser/base/content/test/general/head.js
@@ -302,19 +302,19 @@ function waitForAsyncUpdates(aCallback, 
   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: function() {},
-    handleError: function() {},
-    handleCompletion: function(aReason) {
+    handleResult() {},
+    handleError() {},
+    handleCompletion(aReason) {
       aCallback.apply(scope, args);
     }
   });
   commit.finalize();
 }
 
 /**
  * Asynchronously check a url is visited.
@@ -413,17 +413,17 @@ function waitForDocLoadAndStopIt(aExpect
         /* Let the parent know we're done. */
         sendAsyncMessage("Test:WaitForDocLoadAndStopIt", { uri });
       } else {
         setTimeout(stopContent.bind(null, true, uri), 0);
       }
     }
 
     let progressListener = {
-      onStateChange: function(webProgress, req, flags, status) {
+      onStateChange(webProgress, req, flags, status) {
         dump("waitForDocLoadAndStopIt: onStateChange " + flags.toString(16) + ": " + req.name + "\n");
 
         if (webProgress.isTopLevel &&
             flags & Ci.nsIWebProgressListener.STATE_START) {
           wp.removeProgressListener(progressListener);
 
           let chan = req.QueryInterface(Ci.nsIChannel);
           dump(`waitForDocLoadAndStopIt: Document start: ${chan.URI.spec}\n`);
@@ -465,17 +465,17 @@ function waitForDocLoadAndStopIt(aExpect
  * Waits for the next load to complete in any browser or the given browser.
  * If a <tabbrowser> is given it waits for a load in any of its browsers.
  *
  * @return promise
  */
 function waitForDocLoadComplete(aBrowser = gBrowser) {
   return new Promise(resolve => {
     let listener = {
-      onStateChange: function(webProgress, req, flags, status) {
+      onStateChange(webProgress, req, flags, status) {
         let docStop = Ci.nsIWebProgressListener.STATE_IS_NETWORK |
                       Ci.nsIWebProgressListener.STATE_STOP;
         info("Saw state " + flags.toString(16) + " and status " + status.toString(16));
 
         // When a load needs to be retargetted to a new process it is cancelled
         // with NS_BINDING_ABORTED so ignore that case
         if ((flags & docStop) == docStop && status != Cr.NS_BINDING_ABORTED) {
           aBrowser.removeProgressListener(this);
@@ -913,22 +913,22 @@ function promiseTopicObserved(aTopic)
   });
 }
 
 function promiseNewSearchEngine(basename) {
   return new Promise((resolve, reject) => {
     info("Waiting for engine to be added: " + basename);
     let url = getRootDirectory(gTestPath) + basename;
     Services.search.addEngine(url, null, "", false, {
-      onSuccess: function(engine) {
+      onSuccess(engine) {
         info("Search engine added: " + basename);
         registerCleanupFunction(() => Services.search.removeEngine(engine));
         resolve(engine);
       },
-      onError: function(errCode) {
+      onError(errCode) {
         Assert.ok(false, "addEngine failed with error code " + errCode);
         reject();
       },
     });
   });
 }
 
 // Compares the security state of the page with what is expected
@@ -961,32 +961,32 @@ function isSecurityState(expectedState) 
 }
 
 /**
  * Resolves when a bookmark with the given uri is added.
  */
 function promiseOnBookmarkItemAdded(aExpectedURI) {
   return new Promise((resolve, reject) => {
     let bookmarksObserver = {
-      onItemAdded: function(aItemId, aFolderId, aIndex, aItemType, aURI) {
+      onItemAdded(aItemId, aFolderId, aIndex, aItemType, aURI) {
         info("Added a bookmark to " + aURI.spec);
         PlacesUtils.bookmarks.removeObserver(bookmarksObserver);
         if (aURI.equals(aExpectedURI)) {
           resolve();
         }
         else {
           reject(new Error("Added an unexpected bookmark"));
         }
       },
-      onBeginUpdateBatch: function() {},
-      onEndUpdateBatch: function() {},
-      onItemRemoved: function() {},
-      onItemChanged: function() {},
-      onItemVisited: function() {},
-      onItemMoved: function() {},
+      onBeginUpdateBatch() {},
+      onEndUpdateBatch() {},
+      onItemRemoved() {},
+      onItemChanged() {},
+      onItemVisited() {},
+      onItemMoved() {},
       QueryInterface: XPCOMUtils.generateQI([
         Ci.nsINavBookmarkObserver,
       ])
     };
     info("Waiting for a bookmark to be added");
     PlacesUtils.bookmarks.addObserver(bookmarksObserver, false);
   });
 }
@@ -1001,17 +1001,17 @@ function promiseErrorPageLoaded(browser)
 }
 
 function* loadBadCertPage(url) {
   const EXCEPTION_DIALOG_URI = "chrome://pippki/content/exceptionDialog.xul";
   let exceptionDialogResolved = new Promise(function(resolve) {
     // When the certificate exception dialog has opened, click the button to add
     // an exception.
     let certExceptionDialogObserver = {
-      observe: function(aSubject, aTopic, aData) {
+      observe(aSubject, aTopic, aData) {
         if (aTopic == "cert-exception-ui-ready") {
           Services.obs.removeObserver(this, "cert-exception-ui-ready");
           let certExceptionDialog = getCertExceptionDialog(EXCEPTION_DIALOG_URI);
           ok(certExceptionDialog, "found exception dialog");
           executeSoon(function() {
             certExceptionDialog.documentElement.getButton("extra1").click();
             resolve();
           });
@@ -1068,17 +1068,17 @@ function getCertExceptionDialog(aLocatio
   return undefined;
 }
 
 function setupRemoteClientsFixture(fixture) {
   let oldRemoteClientsGetter =
     Object.getOwnPropertyDescriptor(gFxAccounts, "remoteClients").get;
 
   Object.defineProperty(gFxAccounts, "remoteClients", {
-    get: function() { return fixture; }
+    get() { return fixture; }
   });
   return oldRemoteClientsGetter;
 }
 
 function restoreRemoteClients(getter) {
   Object.defineProperty(gFxAccounts, "remoteClients", {
     get: getter
   });
--- a/browser/base/content/test/general/offlineByDefault.js
+++ b/browser/base/content/test/general/offlineByDefault.js
@@ -1,17 +1,17 @@
 var offlineByDefault = {
   defaultValue: false,
   prefBranch: SpecialPowers.Cc["@mozilla.org/preferences-service;1"].getService(SpecialPowers.Ci.nsIPrefBranch),
-  set: function(allow) {
+  set(allow) {
     try {
       this.defaultValue = this.prefBranch.getBoolPref("offline-apps.allow_by_default");
     } catch (e) {
       this.defaultValue = false
     }
     this.prefBranch.setBoolPref("offline-apps.allow_by_default", allow);
   },
-  reset: function() {
+  reset() {
     this.prefBranch.setBoolPref("offline-apps.allow_by_default", this.defaultValue);
   }
 }
 
 offlineByDefault.set(false);
--- a/browser/base/content/test/general/parsingTestHelpers.jsm
+++ b/browser/base/content/test/general/parsingTestHelpers.jsm
@@ -81,17 +81,17 @@ function iterateOverPath(path, extension
     }
   };
 
   return new Promise((resolve, reject) => {
     Task.spawn(function* () {
       try {
         // Iterate through the directory
         yield iterator.forEach(pathEntryIterator);
-        resolve({files: files, subdirs: subdirs});
+        resolve({files, subdirs});
       } catch (ex) {
         reject(ex);
       } finally {
         iterator.close();
       }
     });
   });
 }
--- a/browser/base/content/test/newtab/browser_newtab_bug722273.js
+++ b/browser/base/content/test/newtab/browser_newtab_bug722273.js
@@ -33,23 +33,23 @@ function promiseAddFakeVisits() {
     visits.push({
       visitDate: NOW - i * 60 * 1000000,
       transitionType: Ci.nsINavHistoryService.TRANSITION_LINK
     });
   }
   let place = {
     uri: makeURI(URL),
     title: "fake site",
-    visits: visits
+    visits
   };
   return new Promise((resolve, reject) => {
     PlacesUtils.asyncHistory.updatePlaces(place, {
       handleError: () => reject(new Error("Couldn't add visit")),
-      handleResult: function() {},
-      handleCompletion: function() {
+      handleResult() {},
+      handleCompletion() {
         NewTabUtils.links.populateCache(function() {
           NewTabUtils.allPages.update();
           resolve();
         }, true);
       }
     });
   });
 }
--- a/browser/base/content/test/newtab/browser_newtab_bug725996.js
+++ b/browser/base/content/test/newtab/browser_newtab_bug725996.js
@@ -4,17 +4,17 @@
 add_task(function* () {
   yield setLinks("0,1,2,3,4,5,6,7,8");
   setPinnedLinks("");
 
   yield* addNewTabPageTab();
   yield* checkGrid("0,1,2,3,4,5,6,7,8");
 
   function doDrop(data) {
-    return ContentTask.spawn(gBrowser.selectedBrowser, { data: data }, function*(args) {
+    return ContentTask.spawn(gBrowser.selectedBrowser, { data }, function*(args) {
       let dataTransfer = new content.DataTransfer("dragstart", false);
       dataTransfer.mozSetDataAt("text/x-moz-url", args.data, 0);
       let event = content.document.createEvent("DragEvent");
       event.initDragEvent("drop", true, true, content, 0, 0, 0, 0, 0,
                           false, false, false, false, 0, null, dataTransfer);
 
       let target = content.gGrid.cells[0].node;
       target.dispatchEvent(event);
--- a/browser/base/content/test/newtab/browser_newtab_bug991210.js
+++ b/browser/base/content/test/newtab/browser_newtab_bug991210.js
@@ -2,20 +2,20 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 add_task(function* () {
   // turn off preload to ensure that a newtab page loads
   yield pushPrefs(["browser.newtab.preload", false]);
 
   // add a test provider that waits for load
   let afterLoadProvider = {
-    getLinks: function(callback) {
+    getLinks(callback) {
       this.callback = callback;
     },
-    addObserver: function() {},
+    addObserver() {},
   };
   NewTabUtils.links.addProvider(afterLoadProvider);
 
   // wait until about:newtab loads before calling provider callback
   yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:newtab");
 
   afterLoadProvider.callback([]);
 
--- a/browser/base/content/test/newtab/browser_newtab_drag_drop.js
+++ b/browser/base/content/test/newtab/browser_newtab_drag_drop.js
@@ -71,17 +71,17 @@ add_task(function* () {
   yield* checkGrid("0p,1p,2p,3,4,5p,6,7,8");
 
   yield doDragEvent(0, 4);
   yield* checkGrid("3,1p,2p,4,0p,5p,6,7,8");
 });
 
 function doDragEvent(sourceIndex, dropIndex) {
   return ContentTask.spawn(gBrowser.selectedBrowser,
-                           { sourceIndex: sourceIndex, dropIndex: dropIndex }, function*(args) {
+                           { sourceIndex, dropIndex }, function*(args) {
     let dataTransfer = new content.DataTransfer("dragstart", false);
     let event = content.document.createEvent("DragEvent");
     event.initDragEvent("dragstart", true, true, content, 0, 0, 0, 0, 0,
                         false, false, false, false, 0, null, dataTransfer);
 
     let target = content.gGrid.cells[args.sourceIndex].site.node;
     target.dispatchEvent(event);
 
--- a/browser/base/content/test/newtab/browser_newtab_search.js
+++ b/browser/base/content/test/newtab/browser_newtab_search.js
@@ -206,22 +206,22 @@ function promiseNewSearchEngine({name: b
     expectedSearchEvents.push("CurrentState");
   }
   let eventPromise = promiseSearchEvents(expectedSearchEvents);
 
   // Wait for addEngine().
   let addEnginePromise = new Promise((resolve, reject) => {
     let url = getRootDirectory(gTestPath) + basename;
     Services.search.addEngine(url, null, "", false, {
-      onSuccess: function(engine) {
+      onSuccess(engine) {
         info("Search engine added: " + basename);
         gNewEngines.push(engine);
         resolve(engine);
       },
-      onError: function(errCode) {
+      onError(errCode) {
         ok(false, "addEngine failed with error code " + errCode);
         reject();
       },
     });
   });
 
   return Promise.all([addEnginePromise, eventPromise]).then(([newEngine, _]) => {
     return newEngine;
--- a/browser/base/content/test/newtab/head.js
+++ b/browser/base/content/test/newtab/head.js
@@ -215,18 +215,18 @@ function fillHistory(aLinks) {
         // Links are secondarily sorted by visit date descending, so decrease the
         // visit date as we progress through the array so that links appear in the
         // grid in the order they're present in the array.
         visits: [{visitDate: now - i, transitionType: transitionLink}]
       };
 
       PlacesUtils.asyncHistory.updatePlaces(place, {
         handleError: () => ok(false, "couldn't add visit to history"),
-        handleResult: function() {},
-        handleCompletion: function() {
+        handleResult() {},
+        handleCompletion() {
           if (--numLinks == 0) {
             resolve();
           }
         }
       });
     }
   });
 }
--- a/browser/base/content/test/plugins/blocklist_proxy.js
+++ b/browser/base/content/test/plugins/blocklist_proxy.js
@@ -14,65 +14,65 @@ Cu.import('resource://gre/modules/XPCOMU
  */
 var BlocklistProxy = {
   _uuid: null,
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                          Ci.nsIBlocklistService,
                                          Ci.nsITimerCallback]),
 
-  init: function() {
+  init() {
     if (!this._uuid) {
       this._uuid =
         Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator)
                                            .generateUUID();
       Cm.nsIComponentRegistrar.registerFactory(this._uuid, "",
                                                "@mozilla.org/extensions/blocklist;1",
                                                this);
     }
   },
 
-  uninit: function() {
+  uninit() {
     if (this._uuid) {
       Cm.nsIComponentRegistrar.unregisterFactory(this._uuid, this);
       Cm.nsIComponentRegistrar.registerFactory(Components.ID(kBlocklistServiceUUID),
                                                "Blocklist Service",
                                                "@mozilla.org/extensions/blocklist;1",
                                                kBlocklistServiceFactory);
       this._uuid = null;
     }
   },
 
-  notify: function(aTimer) {
+  notify(aTimer) {
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
   },
 
-  isAddonBlocklisted: function(aAddon, aAppVersion, aToolkitVersion) {
+  isAddonBlocklisted(aAddon, aAppVersion, aToolkitVersion) {
     return false;
   },
 
-  getAddonBlocklistState: function(aAddon, aAppVersion, aToolkitVersion) {
+  getAddonBlocklistState(aAddon, aAppVersion, aToolkitVersion) {
     return 0; // STATE_NOT_BLOCKED
   },
 
-  getPluginBlocklistState: function(aPluginTag, aAppVersion, aToolkitVersion) {
+  getPluginBlocklistState(aPluginTag, aAppVersion, aToolkitVersion) {
     return 0; // STATE_NOT_BLOCKED
   },
 
-  getAddonBlocklistURL: function(aAddon, aAppVersion, aToolkitVersion) {
+  getAddonBlocklistURL(aAddon, aAppVersion, aToolkitVersion) {
     return "";
   },
 
-  getPluginBlocklistURL: function(aPluginTag) {
+  getPluginBlocklistURL(aPluginTag) {
     return "";
   },
 
-  getPluginInfoURL: function(aPluginTag) {
+  getPluginInfoURL(aPluginTag) {
     return "";
   },
 }
 
 BlocklistProxy.init();
 addEventListener("unload", () => {
   BlocklistProxy.uninit();
 });
--- a/browser/base/content/test/plugins/browser_bug797677.js
+++ b/browser/base/content/test/plugins/browser_bug797677.js
@@ -17,17 +17,17 @@ add_task(function* () {
   });
 
   gBrowser.selectedTab = gBrowser.addTab();
   gTestBrowser = gBrowser.selectedBrowser;
 
   let consoleService = Cc["@mozilla.org/consoleservice;1"]
                          .getService(Ci.nsIConsoleService);
   let errorListener = {
-    observe: function(aMessage) {
+    observe(aMessage) {
       if (aMessage.message.includes("NS_ERROR_FAILURE"))
         gConsoleErrors++;
     }
   };
   consoleService.registerListener(errorListener);
 
   yield promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_bug797677.html");
 
--- a/browser/base/content/test/plugins/browser_pluginCrashReportNonDeterminism.js
+++ b/browser/base/content/test/plugins/browser_pluginCrashReportNonDeterminism.js
@@ -63,17 +63,17 @@ function preparePlugin(browser, pluginFa
       return statusDiv && statusDiv.getAttribute("status") == "please";
     }, "Timed out waiting for plugin to be in crash report state");
 
     // "Rewind", by wiping out the status attribute...
     statusDiv.removeAttribute("status");
     // Somehow, I'm able to get away with overriding the getter for
     // this XPCOM object. Probably because I've got chrome privledges.
     Object.defineProperty(plugin, "pluginFallbackType", {
-      get: function() {
+      get() {
         return contentPluginFallbackState;
       }
     });
     return plugin.runID;
   }).then((runID) => {
     browser.messageManager.sendAsyncMessage("BrowserPlugins:Test:ClearCrashData");
     return runID;
   });
@@ -157,17 +157,17 @@ add_task(function* testChromeHearsPlugin
       Assert.ok(false, "Did not expect plugin to be in crash report mode yet.");
       return;
     }
 
     // Now we need the plugin to seem crashed to PluginContent.jsm, without
     // actually crashing the plugin again. We hack around this by overriding
     // the pluginFallbackType again.
     Object.defineProperty(plugin, "pluginFallbackType", {
-      get: function() {
+      get() {
         return Ci.nsIObjectLoadingContent.PLUGIN_CRASHED;
       },
     });
 
     let event = new content.PluginCrashedEvent("PluginCrashed", {
       pluginName: "",
       pluginDumpID: "",
       browserDumpID: "",
--- a/browser/base/content/test/popupNotifications/browser_popupNotification.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification.js
@@ -12,259 +12,259 @@ function test() {
   ok(PopupNotifications, "PopupNotifications object exists");
   ok(PopupNotifications.panel, "PopupNotifications panel exists");
 
   setup();
 }
 
 var tests = [
   { id: "Test#1",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       triggerMainCommand(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.notifyObj.mainActionClicked, "mainAction was clicked");
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   { id: "Test#2",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       triggerSecondaryCommand(popup, 0);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.notifyObj.secondaryActionClicked, "secondaryAction was clicked");
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   { id: "Test#2b",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.secondaryActions.push({
         label: "Extra Secondary Action",
         accessKey: "E",
         callback: () => this.extraSecondaryActionClicked = true,
       });
       showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       triggerSecondaryCommand(popup, 1);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.extraSecondaryActionClicked, "extra secondary action was clicked");
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   { id: "Test#2c",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.secondaryActions.push({
         label: "Extra Secondary Action",
         accessKey: "E",
         callback: () => ok(false, "unexpected callback invocation"),
       }, {
         label: "Other Extra Secondary Action",
         accessKey: "O",
         callback: () => this.extraSecondaryActionClicked = true,
       });
       showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       triggerSecondaryCommand(popup, 2);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.extraSecondaryActionClicked, "extra secondary action was clicked");
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   { id: "Test#3",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
       this.notification.remove();
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // test opening a notification for a background browser
   // Note: test 4 to 6 share a tab.
   { id: "Test#4",
-    run: function* () {
+    *run() {
       let tab = gBrowser.addTab("http://example.com/");
       yield BrowserTestUtils.browserLoaded(tab.linkedBrowser);
       isnot(gBrowser.selectedTab, tab, "new tab isn't selected");
       wrongBrowserNotificationObject.browser = gBrowser.getBrowserForTab(tab);
       let promiseTopic = promiseTopicObserved("PopupNotifications-backgroundShow");
       wrongBrowserNotification = showNotification(wrongBrowserNotificationObject);
       yield promiseTopic;
       is(PopupNotifications.isPanelOpen, false, "panel isn't open");
       ok(!wrongBrowserNotificationObject.mainActionClicked, "main action wasn't clicked");
       ok(!wrongBrowserNotificationObject.secondaryActionClicked, "secondary action wasn't clicked");
       ok(!wrongBrowserNotificationObject.dismissalCallbackTriggered, "dismissal callback wasn't called");
       goNext();
     }
   },
   // now select that browser and test to see that the notification appeared
   { id: "Test#5",
-    run: function() {
+    run() {
       this.oldSelectedTab = gBrowser.selectedTab;
       gBrowser.selectedTab = gBrowser.tabs[gBrowser.tabs.length - 1];
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, wrongBrowserNotificationObject);
       is(PopupNotifications.isPanelOpen, true, "isPanelOpen getter doesn't lie");
 
       // switch back to the old browser
       gBrowser.selectedTab = this.oldSelectedTab;
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       // actually remove the notification to prevent it from reappearing
       ok(wrongBrowserNotificationObject.dismissalCallbackTriggered, "dismissal callback triggered due to tab switch");
       wrongBrowserNotification.remove();
       ok(wrongBrowserNotificationObject.removedCallbackTriggered, "removed callback triggered");
       wrongBrowserNotification = null;
     }
   },
   // test that the removed notification isn't shown on browser re-select
   { id: "Test#6",
-    run: function* () {
+    *run() {
       let promiseTopic = promiseTopicObserved("PopupNotifications-updateNotShowing");
       gBrowser.selectedTab = gBrowser.tabs[gBrowser.tabs.length - 1];
       yield promiseTopic;
       is(PopupNotifications.isPanelOpen, false, "panel isn't open");
       gBrowser.removeTab(gBrowser.selectedTab);
       goNext();
     }
   },
   // Test that two notifications with the same ID result in a single displayed
   // notification.
   { id: "Test#7",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       // Show the same notification twice
       this.notification1 = showNotification(this.notifyObj);
       this.notification2 = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       this.notification2.remove();
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // Test that two notifications with different IDs are displayed
   { id: "Test#8",
-    run: function() {
+    run() {
       this.testNotif1 = new BasicNotification(this.id);
       this.testNotif1.message += " 1";
       showNotification(this.testNotif1);
       this.testNotif2 = new BasicNotification(this.id);
       this.testNotif2.message += " 2";
       this.testNotif2.id += "-2";
       showNotification(this.testNotif2);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       is(popup.childNodes.length, 2, "two notifications are shown");
       // Trigger the main command for the first notification, and the secondary
       // for the second. Need to do mainCommand first since the secondaryCommand
       // triggering is async.
       triggerMainCommand(popup);
       is(popup.childNodes.length, 1, "only one notification left");
       triggerSecondaryCommand(popup, 0);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.testNotif1.mainActionClicked, "main action #1 was clicked");
       ok(!this.testNotif1.secondaryActionClicked, "secondary action #1 wasn't clicked");
       ok(!this.testNotif1.dismissalCallbackTriggered, "dismissal callback #1 wasn't called");
 
       ok(!this.testNotif2.mainActionClicked, "main action #2 wasn't clicked");
       ok(this.testNotif2.secondaryActionClicked, "secondary action #2 was clicked");
       ok(!this.testNotif2.dismissalCallbackTriggered, "dismissal callback #2 wasn't called");
     }
   },
   // Test notification without mainAction or secondaryActions, it should fall back
   // to a default button that dismisses the notification in place of the main action.
   { id: "Test#9",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.mainAction = null;
       this.notifyObj.secondaryActions = null;
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       triggerMainCommand(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(!this.notifyObj.mainActionClicked, "mainAction was not clicked");
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // Test notification without mainAction but with secondaryActions, it should fall back
   // to a default button that dismisses the notification in place of the main action
   // and ignore the passed secondaryActions.
   { id: "Test#10",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.mainAction = null;
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       let notification = popup.childNodes[0];
       is(notification.getAttribute("secondarybuttonhidden"), "true", "secondary button is hidden");
       triggerMainCommand(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(!this.notifyObj.mainActionClicked, "mainAction was not clicked");
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // Test two notifications with different anchors
   { id: "Test#11",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.firstNotification = showNotification(this.notifyObj);
       this.notifyObj2 = new BasicNotification(this.id);
       this.notifyObj2.id += "-2";
       this.notifyObj2.anchorID = "addons-notification-icon";
       // Second showNotification() overrides the first
       this.secondNotification = showNotification(this.notifyObj2);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       // This also checks that only one element is shown.
       checkPopup(popup, this.notifyObj2);
       is(document.getElementById("geo-notification-icon").boxObject.width, 0,
          "geo anchor shouldn't be visible");
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       // Remove the notifications
       this.firstNotification.remove();
       this.secondNotification.remove();
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
       ok(this.notifyObj2.removedCallbackTriggered, "removed callback triggered");
     }
   }
 ];
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_2.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_2.js
@@ -9,141 +9,141 @@ function test() {
   ok(PopupNotifications.panel, "PopupNotifications panel exists");
 
   setup();
 }
 
 var tests = [
   // Test optional params
   { id: "Test#1",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.secondaryActions = undefined;
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
       this.notification.remove();
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // Test that icons appear
   { id: "Test#2",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.id = "geolocation";
       this.notifyObj.anchorID = "geo-notification-icon";
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       isnot(document.getElementById("geo-notification-icon").boxObject.width, 0,
             "geo anchor should be visible");
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       let icon = document.getElementById("geo-notification-icon");
       isnot(icon.boxObject.width, 0,
             "geo anchor should be visible after dismissal");
       this.notification.remove();
       is(icon.boxObject.width, 0,
          "geo anchor should not be visible after removal");
     }
   },
 
   // Test that persistence allows the notification to persist across reloads
   { id: "Test#3",
-    run: function* () {
+    *run() {
       this.oldSelectedTab = gBrowser.selectedTab;
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.addOptions({
         persistence: 2
       });
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function* (popup) {
+    *onShown(popup) {
       this.complete = false;
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/");
       // Next load will remove the notification
       this.complete = true;
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.complete, "Should only have hidden the notification after 3 page loads");
       ok(this.notifyObj.removedCallbackTriggered, "removal callback triggered");
       gBrowser.removeTab(gBrowser.selectedTab);
       gBrowser.selectedTab = this.oldSelectedTab;
     }
   },
   // Test that a timeout allows the notification to persist across reloads
   { id: "Test#4",
-    run: function* () {
+    *run() {
       this.oldSelectedTab = gBrowser.selectedTab;
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
       this.notifyObj = new BasicNotification(this.id);
       // Set a timeout of 10 minutes that should never be hit
       this.notifyObj.addOptions({
         timeout: Date.now() + 600000
       });
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function* (popup) {
+    *onShown(popup) {
       this.complete = false;
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/");
       // Next load will hide the notification
       this.notification.options.timeout = Date.now() - 1;
       this.complete = true;
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.complete, "Should only have hidden the notification after the timeout was passed");
       this.notification.remove();
       gBrowser.removeTab(gBrowser.selectedTab);
       gBrowser.selectedTab = this.oldSelectedTab;
     }
   },
   // Test that setting persistWhileVisible allows a visible notification to
   // persist across location changes
   { id: "Test#5",
-    run: function* () {
+    *run() {
       this.oldSelectedTab = gBrowser.selectedTab;
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.addOptions({
         persistWhileVisible: true
       });
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function* (popup) {
+    *onShown(popup) {
       this.complete = false;
 
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/");
       // Notification should persist across location changes
       this.complete = true;
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.complete, "Should only have hidden the notification after it was dismissed");
       this.notification.remove();
       gBrowser.removeTab(gBrowser.selectedTab);
       gBrowser.selectedTab = this.oldSelectedTab;
     }
   },
 
   // Test that nested icon nodes correctly activate popups
   { id: "Test#6",
-    run: function() {
+    run() {
       // Add a temporary box as the anchor with a button
       this.box = document.createElement("box");
       PopupNotifications.iconBox.appendChild(this.box);
 
       let button = document.createElement("button");
       button.setAttribute("label", "Please click me!");
       this.box.appendChild(button);
 
@@ -155,68 +155,68 @@ var tests = [
 
       // This test places a normal button in the notification area, which has
       // standard GTK styling and dimensions. Due to the clip-path, this button
       // gets clipped off, which makes it necessary to synthesize the mouse click
       // a little bit downward. To be safe, I adjusted the x-offset with the same
       // amount.
       EventUtils.synthesizeMouse(button, 4, 4, {});
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       this.notification.remove();
       this.box.parentNode.removeChild(this.box);
     }
   },
   // Test that popupnotifications without popups have anchor icons shown
   { id: "Test#7",
-    run: function* () {
+    *run() {
       let notifyObj = new BasicNotification(this.id);
       notifyObj.anchorID = "geo-notification-icon";
       notifyObj.addOptions({neverShow: true});
       let promiseTopic = promiseTopicObserved("PopupNotifications-updateNotShowing");
       showNotification(notifyObj);
       yield promiseTopic;
       isnot(document.getElementById("geo-notification-icon").boxObject.width, 0,
             "geo anchor should be visible");
       goNext();
     }
   },
   // Test notification close button
   { id: "Test#9",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       let notification = popup.childNodes[0];
       EventUtils.synthesizeMouseAtCenter(notification.closebutton, {});
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
       this.notification.remove();
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // Test notification when chrome is hidden
   { id: "Test#10",
-    run: function() {
+    run() {
       window.locationbar.visible = false;
       this.notifyObj = new BasicNotification(this.id);
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       is(popup.anchorNode.className, "tabbrowser-tab", "notification anchored to tab");
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
       this.notification.remove();
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
       window.locationbar.visible = true;
     }
   },
 ];
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_3.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_3.js
@@ -9,170 +9,170 @@ function test() {
   ok(PopupNotifications.panel, "PopupNotifications panel exists");
 
   setup();
 }
 
 var tests = [
   // Test notification is removed when dismissed if removeOnDismissal is true
   { id: "Test#1",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.addOptions({
         removeOnDismissal: true
       });
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // Test multiple notification icons are shown
   { id: "Test#2",
-    run: function() {
+    run() {
       this.notifyObj1 = new BasicNotification(this.id);
       this.notifyObj1.id += "_1";
       this.notifyObj1.anchorID = "default-notification-icon";
       this.notification1 = showNotification(this.notifyObj1);
 
       this.notifyObj2 = new BasicNotification(this.id);
       this.notifyObj2.id += "_2";
       this.notifyObj2.anchorID = "geo-notification-icon";
       this.notification2 = showNotification(this.notifyObj2);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj2);
 
       // check notifyObj1 anchor icon is showing
       isnot(document.getElementById("default-notification-icon").boxObject.width, 0,
             "default anchor should be visible");
       // check notifyObj2 anchor icon is showing
       isnot(document.getElementById("geo-notification-icon").boxObject.width, 0,
             "geo anchor should be visible");
 
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       this.notification1.remove();
       ok(this.notifyObj1.removedCallbackTriggered, "removed callback triggered");
 
       this.notification2.remove();
       ok(this.notifyObj2.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // Test that multiple notification icons are removed when switching tabs
   { id: "Test#3",
-    run: function* () {
+    *run() {
       // show the notification on old tab.
       this.notifyObjOld = new BasicNotification(this.id);
       this.notifyObjOld.anchorID = "default-notification-icon";
       this.notificationOld = showNotification(this.notifyObjOld);
 
       // switch tab
       this.oldSelectedTab = gBrowser.selectedTab;
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
 
       // show the notification on new tab.
       this.notifyObjNew = new BasicNotification(this.id);
       this.notifyObjNew.anchorID = "geo-notification-icon";
       this.notificationNew = showNotification(this.notifyObjNew);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObjNew);
 
       // check notifyObjOld anchor icon is removed
       is(document.getElementById("default-notification-icon").boxObject.width, 0,
          "default anchor shouldn't be visible");
       // check notifyObjNew anchor icon is showing
       isnot(document.getElementById("geo-notification-icon").boxObject.width, 0,
             "geo anchor should be visible");
 
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       this.notificationNew.remove();
       gBrowser.removeTab(gBrowser.selectedTab);
 
       gBrowser.selectedTab = this.oldSelectedTab;
       this.notificationOld.remove();
     }
   },
   // test security delay - too early
   { id: "Test#4",
-    run: function() {
+    run() {
       // Set the security delay to 100s
       PopupNotifications.buttonDelay = 100000;
 
       this.notifyObj = new BasicNotification(this.id);
       showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       triggerMainCommand(popup);
 
       // Wait to see if the main command worked
       executeSoon(function delayedDismissal() {
         dismissNotification(popup);
       });
 
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(!this.notifyObj.mainActionClicked, "mainAction was not clicked because it was too soon");
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback was triggered");
     }
   },
   // test security delay - after delay
   { id: "Test#5",
-    run: function() {
+    run() {
       // Set the security delay to 10ms
       PopupNotifications.buttonDelay = 10;
 
       this.notifyObj = new BasicNotification(this.id);
       showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
 
       // Wait until after the delay to trigger the main action
       setTimeout(function delayedDismissal() {
         triggerMainCommand(popup);
       }, 500);
 
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.notifyObj.mainActionClicked, "mainAction was clicked after the delay");
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback was not triggered");
       PopupNotifications.buttonDelay = PREF_SECURITY_DELAY_INITIAL;
     }
   },
   // reload removes notification
   { id: "Test#6",
-    run: function* () {
+    *run() {
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/");
       let notifyObj = new BasicNotification(this.id);
       notifyObj.options.eventCallback = function(eventName) {
         if (eventName == "removed") {
           ok(true, "Notification removed in background tab after reloading");
           goNext();
         }
       };
       showNotification(notifyObj);
       executeSoon(function() {
         gBrowser.selectedBrowser.reload();
       });
     }
   },
   // location change in background tab removes notification
   { id: "Test#7",
-    run: function* () {
+    *run() {
       let oldSelectedTab = gBrowser.selectedTab;
       let newTab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
       gBrowser.selectedTab = oldSelectedTab;
       let browser = gBrowser.getBrowserForTab(newTab);
 
       let notifyObj = new BasicNotification(this.id);
       notifyObj.browser = browser;
       notifyObj.options.eventCallback = function(eventName) {
@@ -187,17 +187,17 @@ var tests = [
       showNotification(notifyObj);
       executeSoon(function() {
         browser.reload();
       });
     }
   },
   // Popup notification anchor shouldn't disappear when a notification with the same ID is re-added in a background tab
   { id: "Test#8",
-    run: function* () {
+    *run() {
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/");
       let originalTab = gBrowser.selectedTab;
       let bgTab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
       let anchor = document.createElement("box");
       anchor.id = "test26-anchor";
       anchor.className = "notification-anchor-icon";
       PopupNotifications.iconBox.appendChild(anchor);
 
@@ -222,27 +222,27 @@ var tests = [
 
       fgNotification.remove();
       gBrowser.removeTab(bgTab);
       goNext();
     }
   },
   // location change in an embedded frame should not remove a notification
   { id: "Test#9",
-    run: function* () {
+    *run() {
       yield promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html;charset=utf8,<iframe%20id='iframe'%20src='http://example.com/'>");
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.options.eventCallback = function(eventName) {
         if (eventName == "removed") {
           ok(false, "Notification removed from browser when subframe navigated");
         }
       };
       showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       let self = this;
       let progressListener = {
         onLocationChange: function onLocationChange() {
           gBrowser.removeProgressListener(progressListener);
 
 	  executeSoon(() => {
             let notification = PopupNotifications.getNotification(self.notifyObj.id,
                                                                   self.notifyObj.browser);
@@ -254,21 +254,21 @@ var tests = [
         },
       };
 
       info("Adding progress listener and performing navigation");
       gBrowser.addProgressListener(progressListener);
       content.document.getElementById("iframe")
                       .setAttribute("src", "http://example.org/");
     },
-    onHidden: function() {}
+    onHidden() {}
   },
   // Popup Notifications should catch exceptions from callbacks
   { id: "Test#10",
-    run: function() {
+    run() {
       this.testNotif1 = new BasicNotification(this.id);
       this.testNotif1.message += " 1";
       this.notification1 = showNotification(this.testNotif1);
       this.testNotif1.options.eventCallback = function(eventName) {
         info("notifyObj1.options.eventCallback: " + eventName);
         if (eventName == "dismissed") {
           throw new Error("Oops 1!");
         }
@@ -280,18 +280,18 @@ var tests = [
       this.testNotif2.options.eventCallback = function(eventName) {
         info("notifyObj2.options.eventCallback: " + eventName);
         if (eventName == "dismissed") {
           throw new Error("Oops 2!");
         }
       };
       this.notification2 = showNotification(this.testNotif2);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       is(popup.childNodes.length, 2, "two notifications are shown");
       dismissNotification(popup);
     },
-    onHidden: function() {
+    onHidden() {
       this.notification1.remove();
       this.notification2.remove();
     }
   }
 ];
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_4.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_4.js
@@ -9,51 +9,51 @@ function test() {
   ok(PopupNotifications.panel, "PopupNotifications panel exists");
 
   setup();
 }
 
 var tests = [
   // Popup Notifications main actions should catch exceptions from callbacks
   { id: "Test#1",
-    run: function() {
+    run() {
       this.testNotif = new ErrorNotification(this.id);
       showNotification(this.testNotif);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.testNotif);
       triggerMainCommand(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.testNotif.mainActionClicked, "main action has been triggered");
     }
   },
   // Popup Notifications secondary actions should catch exceptions from callbacks
   { id: "Test#2",
-    run: function() {
+    run() {
       this.testNotif = new ErrorNotification(this.id);
       showNotification(this.testNotif);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.testNotif);
       triggerSecondaryCommand(popup, 0);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.testNotif.secondaryActionClicked, "secondary action has been triggered");
     }
   },
   // Existing popup notification shouldn't disappear when adding a dismissed notification
   { id: "Test#3",
-    run: function() {
+    run() {
       this.notifyObj1 = new BasicNotification(this.id);
       this.notifyObj1.id += "_1";
       this.notifyObj1.anchorID = "default-notification-icon";
       this.notification1 = showNotification(this.notifyObj1);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       // Now show a dismissed notification, and check that it doesn't clobber
       // the showing one.
       this.notifyObj2 = new BasicNotification(this.id);
       this.notifyObj2.id += "_2";
       this.notifyObj2.anchorID = "geo-notification-icon";
       this.notifyObj2.options.dismissed = true;
       this.notification2 = showNotification(this.notifyObj2);
 
@@ -62,46 +62,46 @@ var tests = [
       // check that both anchor icons are showing
       is(document.getElementById("default-notification-icon").getAttribute("showing"), "true",
          "notification1 anchor should be visible");
       is(document.getElementById("geo-notification-icon").getAttribute("showing"), "true",
          "notification2 anchor should be visible");
 
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       this.notification1.remove();
       this.notification2.remove();
     }
   },
   // Showing should be able to modify the popup data
   { id: "Test#4",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       let normalCallback = this.notifyObj.options.eventCallback;
       this.notifyObj.options.eventCallback = function(eventName) {
         if (eventName == "showing") {
           this.mainAction.label = "Alternate Label";
         }
         normalCallback.call(this, eventName);
       };
       showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       // checkPopup checks for the matching label. Note that this assumes that
       // this.notifyObj.mainAction is the same as notification.mainAction,
       // which could be a problem if we ever decided to deep-copy.
       checkPopup(popup, this.notifyObj);
       triggerMainCommand(popup);
     },
-    onHidden: function() { }
+    onHidden() { }
   },
   // Moving a tab to a new window should remove non-swappable notifications.
   { id: "Test#5",
-    run: function* () {
+    *run() {
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
 
       let notifyObj = new BasicNotification(this.id);
 
       let shown = waitForNotificationPanel();
       showNotification(notifyObj);
       yield shown;
 
@@ -119,17 +119,17 @@ var tests = [
       yield BrowserTestUtils.closeWindow(win);
       yield waitForWindowReadyForPopupNotifications(window);
 
       goNext();
     }
   },
   // Moving a tab to a new window should preserve swappable notifications.
   { id: "Test#6",
-    run: function* () {
+    *run() {
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
       let notifyObj = new BasicNotification(this.id);
       let originalCallback = notifyObj.options.eventCallback;
       notifyObj.options.eventCallback = function(eventName) {
         originalCallback(eventName);
         return eventName == "swapping";
       };
 
@@ -160,51 +160,51 @@ var tests = [
       yield BrowserTestUtils.closeWindow(win);
       yield waitForWindowReadyForPopupNotifications(window);
 
       goNext();
     }
   },
   // the main action callback can keep the notification.
   { id: "Test#8",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.mainAction.dismiss = true;
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       triggerMainCommand(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback was triggered");
       ok(!this.notifyObj.removedCallbackTriggered, "removed callback wasn't triggered");
       this.notification.remove();
     }
   },
   // a secondary action callback can keep the notification.
   { id: "Test#9",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.secondaryActions[0].dismiss = true;
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       triggerSecondaryCommand(popup, 0);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback was triggered");
       ok(!this.notifyObj.removedCallbackTriggered, "removed callback wasn't triggered");
       this.notification.remove();
     }
   },
   // returning true in the showing callback should dismiss the notification.
   { id: "Test#10",
-    run: function() {
+    run() {
       let notifyObj = new BasicNotification(this.id);
       let originalCallback = notifyObj.options.eventCallback;
       notifyObj.options.eventCallback = function(eventName) {
         originalCallback(eventName);
         return eventName == "showing";
       };
 
       let notification = showNotification(notifyObj);
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_5.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_5.js
@@ -11,65 +11,65 @@ function test() {
   setup();
 }
 
 var gNotification;
 
 var tests = [
   // panel updates should fire the showing and shown callbacks again.
   { id: "Test#1",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
 
       this.notifyObj.showingCallbackTriggered = false;
       this.notifyObj.shownCallbackTriggered = false;
 
       // Force an update of the panel. This is typically called
       // automatically when receiving 'activate' or 'TabSelect' events,
       // but from a setTimeout, which is inconvenient for the test.
       PopupNotifications._update();
 
       checkPopup(popup, this.notifyObj);
 
       this.notification.remove();
     },
-    onHidden: function() { }
+    onHidden() { }
   },
   // A first dismissed notification shouldn't stop _update from showing a second notification
   { id: "Test#2",
-    run: function() {
+    run() {
       this.notifyObj1 = new BasicNotification(this.id);
       this.notifyObj1.id += "_1";
       this.notifyObj1.anchorID = "default-notification-icon";
       this.notifyObj1.options.dismissed = true;
       this.notification1 = showNotification(this.notifyObj1);
 
       this.notifyObj2 = new BasicNotification(this.id);
       this.notifyObj2.id += "_2";
       this.notifyObj2.anchorID = "geo-notification-icon";
       this.notifyObj2.options.dismissed = true;
       this.notification2 = showNotification(this.notifyObj2);
 
       this.notification2.dismissed = false;
       PopupNotifications._update();
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj2);
       this.notification1.remove();
       this.notification2.remove();
     },
-    onHidden: function(popup) { }
+    onHidden(popup) { }
   },
   // The anchor icon should be shown for notifications in background windows.
   { id: "Test#3",
-    run: function* () {
+    *run() {
       let notifyObj = new BasicNotification(this.id);
       notifyObj.options.dismissed = true;
 
       let win = yield BrowserTestUtils.openNewBrowserWindow();
 
       // Open the notification in the original window, now in the background.
       showNotification(notifyObj);
       let anchor = document.getElementById("default-notification-icon");
@@ -79,109 +79,109 @@ var tests = [
       yield waitForWindowReadyForPopupNotifications(window);
 
       goNext();
     }
   },
   // Test that persistent doesn't allow the notification to persist after
   // navigation.
   { id: "Test#4",
-    run: function* () {
+    *run() {
       this.oldSelectedTab = gBrowser.selectedTab;
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.addOptions({
         persistent: true
       });
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function* (popup) {
+    *onShown(popup) {
       this.complete = false;
 
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/");
 
       // This code should not be executed.
       ok(false, "Should have removed the notification after navigation");
       // Properly dismiss and cleanup in case the unthinkable happens.
       this.complete = true;
       triggerSecondaryCommand(popup, 0);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(!this.complete, "Should have hidden the notification after navigation");
       this.notification.remove();
       gBrowser.removeTab(gBrowser.selectedTab);
       gBrowser.selectedTab = this.oldSelectedTab;
     }
   },
   // Test that persistent allows the notification to persist until explicitly
   // dismissed.
   { id: "Test#5",
-    run: function* () {
+    *run() {
       this.oldSelectedTab = gBrowser.selectedTab;
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.addOptions({
         persistent: true
       });
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function* (popup) {
+    *onShown(popup) {
       this.complete = false;
 
       // Notification should persist after attempt to dismiss by clicking on the
       // content area.
       let browser = gBrowser.selectedBrowser;
       yield BrowserTestUtils.synthesizeMouseAtCenter("body", {}, browser)
 
       // Notification should be hidden after dismissal via Don't Allow.
       this.complete = true;
       triggerSecondaryCommand(popup, 0);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(this.complete, "Should have hidden the notification after clicking Not Now");
       this.notification.remove();
       gBrowser.removeTab(gBrowser.selectedTab);
       gBrowser.selectedTab = this.oldSelectedTab;
     }
   },
   // Test that persistent panels are still open after switching to another tab
   // and back.
   { id: "Test#6a",
-    run: function* () {
+    *run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.options.persistent = true;
       gNotification = showNotification(this.notifyObj);
     },
-    onShown: function* (popup) {
+    *onShown(popup) {
       this.oldSelectedTab = gBrowser.selectedTab;
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       ok(true, "Should have hidden the notification after tab switch");
       gBrowser.removeTab(gBrowser.selectedTab);
       gBrowser.selectedTab = this.oldSelectedTab;
     }
   },
   // Second part of the previous test that compensates for the limitation in
   // runNextTest that expects a single onShown/onHidden invocation per test.
   { id: "Test#6b",
-    run: function* () {
+    *run() {
       let id = PopupNotifications.panel.firstChild.getAttribute("popupid");
       ok(id.endsWith("Test#6a"), "Should have found the notification from Test6a");
       ok(PopupNotifications.isPanelOpen, "Should have shown the popup again after getting back to the tab");
       gNotification.remove();
       gNotification = null;
       goNext();
     }
   },
   // Test that persistent panels are still open after switching to another
   // window and back.
   { id: "Test#7",
-    run: function* () {
+    *run() {
       this.oldSelectedTab = gBrowser.selectedTab;
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
 
       let shown = waitForNotificationPanel();
       let notifyObj = new BasicNotification(this.id);
       notifyObj.options.persistent = true;
       this.notification = showNotification(notifyObj);
       yield shown;
@@ -208,41 +208,41 @@ var tests = [
       gBrowser.removeTab(gBrowser.selectedTab);
       gBrowser.selectedTab = this.oldSelectedTab;
 
       goNext();
     }
   },
   // Test that only the first persistent notification is shown on update
   { id: "Test#8",
-    run: function() {
+    run() {
       this.notifyObj1 = new BasicNotification(this.id);
       this.notifyObj1.id += "_1";
       this.notifyObj1.anchorID = "default-notification-icon";
       this.notifyObj1.options.persistent = true;
       this.notification1 = showNotification(this.notifyObj1);
 
       this.notifyObj2 = new BasicNotification(this.id);
       this.notifyObj2.id += "_2";
       this.notifyObj2.anchorID = "geo-notification-icon";
       this.notifyObj2.options.persistent = true;
       this.notification2 = showNotification(this.notifyObj2);
 
       PopupNotifications._update();
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj1);
       this.notification1.remove();
       this.notification2.remove();
     },
-    onHidden: function(popup) { }
+    onHidden(popup) { }
   },
   // Test that persistent notifications are shown stacked by anchor on update
   { id: "Test#9",
-    run: function() {
+    run() {
       this.notifyObj1 = new BasicNotification(this.id);
       this.notifyObj1.id += "_1";
       this.notifyObj1.anchorID = "default-notification-icon";
       this.notifyObj1.options.persistent = true;
       this.notification1 = showNotification(this.notifyObj1);
 
       this.notifyObj2 = new BasicNotification(this.id);
       this.notifyObj2.id += "_2";
@@ -253,22 +253,22 @@ var tests = [
       this.notifyObj3 = new BasicNotification(this.id);
       this.notifyObj3.id += "_3";
       this.notifyObj3.anchorID = "default-notification-icon";
       this.notifyObj3.options.persistent = true;
       this.notification3 = showNotification(this.notifyObj3);
 
       PopupNotifications._update();
     },
-    onShown: function(popup) {
+    onShown(popup) {
       let notifications = popup.childNodes;
       is(notifications.length, 2, "two notifications displayed");
       let [notification1, notification2] = notifications;
       is(notification1.id, this.notifyObj1.id + "-notification", "id 1 matches");
       is(notification2.id, this.notifyObj3.id + "-notification", "id 2 matches");
 
       this.notification1.remove();
       this.notification2.remove();
       this.notification3.remove();
     },
-    onHidden: function(popup) { }
+    onHidden(popup) { }
   },
 ];
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_checkbox.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_checkbox.js
@@ -32,157 +32,157 @@ function promiseElementVisible(element) 
                                           "Waiting for element to be visible");
 }
 
 var gNotification;
 
 var tests = [
   // Test that passing the checkbox field shows the checkbox.
   { id: "show_checkbox",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.options.checkbox = {
         label: "This is a checkbox",
       };
       gNotification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       let notification = popup.childNodes[0];
       checkCheckbox(notification.checkbox, "This is a checkbox");
       triggerMainCommand(popup);
     },
-    onHidden: function() { }
+    onHidden() { }
   },
 
   // Test checkbox being checked by default
   { id: "checkbox_checked",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.options.checkbox = {
         label: "Check this",
         checked: true,
       };
       gNotification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       let notification = popup.childNodes[0];
       checkCheckbox(notification.checkbox, "Check this", true);
       triggerMainCommand(popup);
     },
-    onHidden: function() { }
+    onHidden() { }
   },
 
   // Test checkbox passing the checkbox state on mainAction
   { id: "checkbox_passCheckboxChecked_mainAction",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.mainAction.callback = ({checkboxChecked}) => this.mainActionChecked = checkboxChecked;
       this.notifyObj.options.checkbox = {
         label: "This is a checkbox",
       };
       gNotification = showNotification(this.notifyObj);
     },
-    onShown: function* (popup) {
+    *onShown(popup) {
       checkPopup(popup, this.notifyObj);
       let notification = popup.childNodes[0];
       let checkbox = notification.checkbox;
       checkCheckbox(checkbox, "This is a checkbox");
       yield promiseElementVisible(checkbox);
       EventUtils.synthesizeMouseAtCenter(checkbox, {});
       checkCheckbox(checkbox, "This is a checkbox", true);
       triggerMainCommand(popup);
     },
-    onHidden: function() {
+    onHidden() {
       is(this.mainActionChecked, true, "mainAction callback is passed the correct checkbox value");
     }
   },
 
   // Test checkbox passing the checkbox state on secondaryAction
   { id: "checkbox_passCheckboxChecked_secondaryAction",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.secondaryActions = [{
         label: "Test Secondary",
         accessKey: "T",
         callback: ({checkboxChecked}) => this.secondaryActionChecked = checkboxChecked,
       }];
       this.notifyObj.options.checkbox = {
         label: "This is a checkbox",
       };
       gNotification = showNotification(this.notifyObj);
     },
-    onShown: function* (popup) {
+    *onShown(popup) {
       checkPopup(popup, this.notifyObj);
       let notification = popup.childNodes[0];
       let checkbox = notification.checkbox;
       checkCheckbox(checkbox, "This is a checkbox");
       yield promiseElementVisible(checkbox);
       EventUtils.synthesizeMouseAtCenter(checkbox, {});
       checkCheckbox(checkbox, "This is a checkbox", true);
       triggerSecondaryCommand(popup, 0);
     },
-    onHidden: function() {
+    onHidden() {
       is(this.secondaryActionChecked, true, "secondaryAction callback is passed the correct checkbox value");
     }
   },
 
   // Test checkbox preserving its state through re-opening the doorhanger
   { id: "checkbox_reopen",
-    run: function() {
+    run() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.options.checkbox = {
         label: "This is a checkbox",
         checkedState: {
           disableMainAction: true,
           warningLabel: "Testing disable",
         },
       };
       gNotification = showNotification(this.notifyObj);
     },
-    onShown: function* (popup) {
+    *onShown(popup) {
       checkPopup(popup, this.notifyObj);
       let notification = popup.childNodes[0];
       let checkbox = notification.checkbox;
       checkCheckbox(checkbox, "This is a checkbox");
       yield promiseElementVisible(checkbox);
       EventUtils.synthesizeMouseAtCenter(checkbox, {});
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       let icon = document.getElementById("default-notification-icon");
       EventUtils.synthesizeMouseAtCenter(icon, {});
       let notification = popup.childNodes[0];
       let checkbox = notification.checkbox;
       checkCheckbox(checkbox, "This is a checkbox", true);
       checkMainAction(notification, true);
       gNotification.remove();
     }
   },
 ];
 
 // Test checkbox disabling the main action in different combinations
 ["checkedState", "uncheckedState"].forEach(function(state) {
   [true, false].forEach(function(checked) {
     tests.push(
       { id: `checkbox_disableMainAction_${state}_${checked ? 'checked' : 'unchecked'}`,
-        run: function() {
+        run() {
           this.notifyObj = new BasicNotification(this.id);
           this.notifyObj.options.checkbox = {
             label: "This is a checkbox",
-            checked: checked,
+            checked,
             [state]: {
               disableMainAction: true,
               warningLabel: "Testing disable",
             },
           };
           gNotification = showNotification(this.notifyObj);
         },
-        onShown: function* (popup) {
+        *onShown(popup) {
           checkPopup(popup, this.notifyObj);
           let notification = popup.childNodes[0];
           let checkbox = notification.checkbox;
           let disabled = (state === "checkedState" && checked) ||
                          (state === "uncheckedState" && !checked);
 
           checkCheckbox(checkbox, "This is a checkbox", checked);
           checkMainAction(notification, disabled);
@@ -195,14 +195,14 @@ var tests = [
           checkMainAction(notification, disabled);
 
           // Unblock the main command if it's currently disabled.
           if (disabled) {
             EventUtils.synthesizeMouseAtCenter(checkbox, {});
           }
           triggerMainCommand(popup);
         },
-        onHidden: function() { }
+        onHidden() { }
       }
     );
   });
 });
 
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_no_anchors.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_no_anchors.js
@@ -10,72 +10,72 @@ function test() {
 
   setup();
 }
 
 var tests = [
   // Test that popupnotifications are anchored to the identity icon on
   // about:blank, where anchor icons are hidden.
   { id: "Test#1",
-    run: function* () {
+    *run() {
       this.oldSelectedTab = gBrowser.selectedTab;
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:blank");
 
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.anchorID = "geo-notification-icon";
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       is(document.getElementById("geo-notification-icon").boxObject.width, 0,
          "geo anchor shouldn't be visible");
       is(popup.anchorNode.id, "identity-icon",
          "notification anchored to identity icon");
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       this.notification.remove();
       gBrowser.removeTab(gBrowser.selectedTab);
       gBrowser.selectedTab = this.oldSelectedTab;
     }
   },
   // Test that popupnotifications are anchored to the identity icon after
   // navigation to about:blank.
   { id: "Test#2",
-    run: function* () {
+    *run() {
       this.oldSelectedTab = gBrowser.selectedTab;
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
 
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.anchorID = "geo-notification-icon";
       this.notifyObj.addOptions({
         persistence: 1,
       });
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function* (popup) {
+    *onShown(popup) {
       yield promiseTabLoadEvent(gBrowser.selectedTab, "about:blank");
 
       checkPopup(popup, this.notifyObj);
       is(document.getElementById("geo-notification-icon").boxObject.width, 0,
          "geo anchor shouldn't be visible");
       is(popup.anchorNode.id, "identity-icon",
          "notification anchored to identity icon");
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       this.notification.remove();
       gBrowser.removeTab(gBrowser.selectedTab);
       gBrowser.selectedTab = this.oldSelectedTab;
     }
   },
   // Test that dismissed popupnotifications cannot be opened on about:blank, but
   // can be opened after navigation.
   { id: "Test#3",
-    run: function* () {
+    *run() {
       this.oldSelectedTab = gBrowser.selectedTab;
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:blank");
 
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.anchorID = "geo-notification-icon";
       this.notifyObj.addOptions({
         dismissed: true,
         persistence: 1,
@@ -87,31 +87,31 @@ var tests = [
 
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/");
 
       isnot(document.getElementById("geo-notification-icon").boxObject.width, 0,
             "geo anchor should be visible");
 
       EventUtils.synthesizeMouse(document.getElementById("geo-notification-icon"), 0, 0, {});
     },
-    onShown: function(popup) {
+    onShown(popup) {
       checkPopup(popup, this.notifyObj);
       dismissNotification(popup);
     },
-    onHidden: function(popup) {
+    onHidden(popup) {
       this.notification.remove();
       gBrowser.removeTab(gBrowser.selectedTab);
       gBrowser.selectedTab = this.oldSelectedTab;
     }
   },
   // Test that popupnotifications are anchored to the identity icon while
   // editing the URL in the location bar, and restored to their anchors when the
   // URL is reverted.
   { id: "Test#4",
-    run: function* () {
+    *run() {
       this.oldSelectedTab = gBrowser.selectedTab;
       yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/");
 
       let shownInitially = waitForNotificationPanel();
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.anchorID = "geo-notification-icon";
       this.notifyObj.addOptions({
         persistent: true,
--- a/browser/base/content/test/social/browser_aboutHome_activation.js
+++ b/browser/base/content/test/social/browser_aboutHome_activation.js
@@ -52,17 +52,17 @@ var snippet2 =
 '     <div id="activationSnippet" onclick="activateProvider(this)">' +
 '     <img src="chrome://branding/content/icon32.png"></img>' +
 '     </div>';
 
 var gTests = [
 
 {
   desc: "Test activation with enable panel",
-  snippet: snippet,
+  snippet,
   panel: true
 },
 
 {
   desc: "Test activation bypassing enable panel",
   snippet: snippet2,
   panel: false
 }
--- a/browser/base/content/test/social/browser_addons.js
+++ b/browser/base/content/test/social/browser_addons.js
@@ -52,84 +52,84 @@ function installListener(next, aManifest
     if (topic == "provider-disabled") {
       SocialService.unregisterProviderListener(providerListener);
       is(origin, aManifest.origin, "provider disabled");
       executeSoon(next);
     }
   });
 
   return {
-    onInstalling: function(addon) {
+    onInstalling(addon) {
       is(expectEvent, "onInstalling", "install started");
       is(addon.manifest.origin, aManifest.origin, "provider about to be installed");
       ok(!Services.prefs.prefHasUserValue(prefname), "manifest is not in user-prefs");
       expectEvent = "onInstalled";
     },
-    onInstalled: function(addon) {
+    onInstalled(addon) {
       is(addon.manifest.origin, aManifest.origin, "provider installed");
       ok(addon.installDate.getTime() > 0, "addon has installDate");
       ok(addon.updateDate.getTime() > 0, "addon has updateDate");
       ok(Services.prefs.prefHasUserValue(prefname), "manifest is in user-prefs");
       expectEvent = "onUninstalling";
     },
-    onUninstalling: function(addon) {
+    onUninstalling(addon) {
       is(expectEvent, "onUninstalling", "uninstall started");
       is(addon.manifest.origin, aManifest.origin, "provider about to be uninstalled");
       ok(Services.prefs.prefHasUserValue(prefname), "manifest is in user-prefs");
       expectEvent = "onUninstalled";
     },
-    onUninstalled: function(addon) {
+    onUninstalled(addon) {
       is(expectEvent, "onUninstalled", "provider has been uninstalled");
       is(addon.manifest.origin, aManifest.origin, "provider uninstalled");
       ok(!Services.prefs.prefHasUserValue(prefname), "manifest is not in user-prefs");
       AddonManager.removeAddonListener(this);
     }
   };
 }
 
 var tests = {
-  testHTTPInstallFailure: function(next) {
+  testHTTPInstallFailure(next) {
     let installFrom = "http://example.com";
     is(SocialService.getOriginActivationType(installFrom), "foreign", "testing foriegn install");
     let data = {
       origin: installFrom,
       url: installFrom + "/activate",
-      manifest: manifest,
-      window: window
+      manifest,
+      window
     }
     Social.installProvider(data, function(addonManifest) {
       ok(!addonManifest, "unable to install provider over http");
       next();
     });
   },
-  testAddonEnableToggle: function(next) {
+  testAddonEnableToggle(next) {
     let expectEvent;
     let prefname = getManifestPrefname(manifest);
     let listener = {
-      onEnabled: function(addon) {
+      onEnabled(addon) {
         is(expectEvent, "onEnabled", "provider onEnabled");
         ok(!addon.userDisabled, "provider enabled");
         executeSoon(function() {
           expectEvent = "onDisabling";
           addon.userDisabled = true;
         });
       },
-      onEnabling: function(addon) {
+      onEnabling(addon) {
         is(expectEvent, "onEnabling", "provider onEnabling");
         expectEvent = "onEnabled";
       },
-      onDisabled: function(addon) {
+      onDisabled(addon) {
         is(expectEvent, "onDisabled", "provider onDisabled");
         ok(addon.userDisabled, "provider disabled");
         AddonManager.removeAddonListener(listener);
         // clear the provider user-level pref
         Services.prefs.clearUserPref(prefname);
         executeSoon(next);
       },
-      onDisabling: function(addon) {
+      onDisabling(addon) {
         is(expectEvent, "onDisabling", "provider onDisabling");
         expectEvent = "onDisabled";
       }
     };
     AddonManager.addAddonListener(listener);
 
     // we're only testing enable disable, so we quickly set the user-level pref
     // for this provider and test enable/disable toggling
@@ -143,40 +143,40 @@ var tests = {
           // only test with one addon
           return;
         }
       }
       ok(false, "no addons toggled");
       next();
     });
   },
-  testProviderEnableToggle: function(next) {
+  testProviderEnableToggle(next) {
     // enable and disabel a provider from the SocialService interface, check
     // that the addon manager is updated
 
     let expectEvent;
     let prefname = getManifestPrefname(manifest);
 
     let listener = {
-      onEnabled: function(addon) {
+      onEnabled(addon) {
         is(expectEvent, "onEnabled", "provider onEnabled");
         is(addon.manifest.origin, manifest.origin, "provider enabled");
         ok(!addon.userDisabled, "provider !userDisabled");
       },
-      onEnabling: function(addon) {
+      onEnabling(addon) {
         is(expectEvent, "onEnabling", "provider onEnabling");
         is(addon.manifest.origin, manifest.origin, "provider about to be enabled");
         expectEvent = "onEnabled";
       },
-      onDisabled: function(addon) {
+      onDisabled(addon) {
         is(expectEvent, "onDisabled", "provider onDisabled");
         is(addon.manifest.origin, manifest.origin, "provider disabled");
         ok(addon.userDisabled, "provider userDisabled");
       },
-      onDisabling: function(addon) {
+      onDisabling(addon) {
         is(expectEvent, "onDisabling", "provider onDisabling");
         is(addon.manifest.origin, manifest.origin, "provider about to be disabled");
         expectEvent = "onDisabled";
       }
     };
     AddonManager.addAddonListener(listener);
 
     expectEvent = "onEnabling";
@@ -185,32 +185,32 @@ var tests = {
       expectEvent = "onDisabling";
       SocialService.disableProvider(provider.origin, function() {
         AddonManager.removeAddonListener(listener);
         Services.prefs.clearUserPref(prefname);
         next();
       });
     });
   },
-  testDirectoryInstall: function(next) {
+  testDirectoryInstall(next) {
     AddonManager.addAddonListener(installListener(next, manifest2));
 
     BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown").then(() => {
       let panel = document.getElementById("servicesInstall-notification");
       info("servicesInstall-notification panel opened");
       panel.button.click();
     });
 
     Services.prefs.setCharPref("social.directories", manifest2.origin);
     is(SocialService.getOriginActivationType(manifest2.origin), "directory", "testing directory install");
     let data = {
       origin: manifest2.origin,
       url: manifest2.origin + "/directory",
       manifest: manifest2,
-      window: window
+      window
     }
     Social.installProvider(data, function(addonManifest) {
       Services.prefs.clearUserPref("social.directories");
       SocialService.enableProvider(addonManifest.origin, function(provider) {
         Social.uninstallProvider(addonManifest.origin);
       });
     });
   }
--- a/browser/base/content/test/social/browser_blocklist.js
+++ b/browser/base/content/test/social/browser_blocklist.js
@@ -61,28 +61,28 @@ function test() {
   });
 
   runSocialTests(tests, undefined, undefined, function() {
     resetBlocklist().then(finish); // restore to original pref
   });
 }
 
 var tests = {
-  testSimpleBlocklist: function(next) {
+  testSimpleBlocklist(next) {
     // this really just tests adding and clearing our blocklist for later tests
     setAndUpdateBlocklist(blocklistURL).then(() => {
       ok(Services.blocklist.isAddonBlocklisted(SocialService.createWrapper(manifest_bad)), "blocking 'blocked'");
       ok(!Services.blocklist.isAddonBlocklisted(SocialService.createWrapper(manifest)), "not blocking 'good'");
       resetBlocklist().then(() => {
         ok(!Services.blocklist.isAddonBlocklisted(SocialService.createWrapper(manifest_bad)), "blocklist cleared");
         next();
       });
     });
   },
-  testAddingNonBlockedProvider: function(next) {
+  testAddingNonBlockedProvider(next) {
     function finishTest(isgood) {
       ok(isgood, "adding non-blocked provider ok");
       Services.prefs.clearUserPref("social.manifest.good");
       resetBlocklist().then(next);
     }
     setManifestPref("social.manifest.good", manifest);
     setAndUpdateBlocklist(blocklistURL).then(() => {
       try {
@@ -98,17 +98,17 @@ var tests = {
           }
         });
       } catch (e) {
         ok(false, "SocialService.addProvider threw exception: " + e);
         finishTest(false);
       }
     });
   },
-  testAddingBlockedProvider: function(next) {
+  testAddingBlockedProvider(next) {
     function finishTest(good) {
       ok(good, "Unable to add blocklisted provider");
       Services.prefs.clearUserPref("social.manifest.blocked");
       resetBlocklist().then(next);
     }
     setManifestPref("social.manifest.blocked", manifest_bad);
     setAndUpdateBlocklist(blocklistURL).then(() => {
       try {
@@ -119,44 +119,44 @@ var tests = {
           });
         });
       } catch (e) {
         ok(true, "SocialService.addProvider should throw blocklist exception: " + e);
         finishTest(true);
       }
     });
   },
-  testInstallingBlockedProvider: function(next) {
+  testInstallingBlockedProvider(next) {
     function finishTest(good) {
       ok(good, "Unable to install blocklisted provider");
       resetBlocklist().then(next);
     }
     let activationURL = manifest_bad.origin + "/browser/browser/base/content/test/social/social_activate.html"
     setAndUpdateBlocklist(blocklistURL).then(() => {
       try {
         // expecting an exception when attempting to install a hard blocked
         // provider
         let data = {
           origin: manifest_bad.origin,
           url: activationURL,
           manifest: manifest_bad,
-          window: window
+          window
         }
         Social.installProvider(data, function(addonManifest) {
           finishTest(false);
         });
       } catch (e) {
         finishTest(true);
       }
     });
   },
-  testBlockingExistingProvider: function(next) {
+  testBlockingExistingProvider(next) {
     let listener = {
       _window: null,
-      onOpenWindow: function(aXULWindow) {
+      onOpenWindow(aXULWindow) {
         Services.wm.removeListener(this);
         this._window = aXULWindow;
         let domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                                   .getInterface(Ci.nsIDOMWindow);
 
         domwindow.addEventListener("load", function _load() {
           domwindow.removeEventListener("load", _load, false);
 
@@ -172,18 +172,18 @@ var tests = {
           // don't want to accept here since that restarts the browser.
           executeSoon(() => {
             let cancelButton = domwindow.document.documentElement.getButton("cancel");
             info("***** hit the cancel button\n");
             cancelButton.doCommand();
           });
         }, false);
       },
-      onCloseWindow: function(aXULWindow) { },
-      onWindowTitleChange: function(aXULWindow, aNewTitle) { }
+      onCloseWindow(aXULWindow) { },
+      onWindowTitleChange(aXULWindow, aNewTitle) { }
     };
 
     Services.wm.addListener(listener);
 
     setManifestPref("social.manifest.blocked", manifest_bad);
     try {
       SocialService.addProvider(manifest_bad, function(provider) {
         // the act of blocking should cause a 'provider-disabled' notification
--- a/browser/base/content/test/social/browser_share.js
+++ b/browser/base/content/test/social/browser_share.js
@@ -130,17 +130,17 @@ function hasoptions(testOptions, options
       ok(Array.every(data, function(item) { return message_data.indexOf(item) >= 0 }), "option " + option);
     } else {
       is(message_data, data, "option " + option);
     }
   }
 }
 
 var tests = {
-  testShareDisabledOnActivation: function(next) {
+  testShareDisabledOnActivation(next) {
     // starting on about:blank page, share should be visible but disabled when
     // adding provider
     is(gBrowser.currentURI.spec, "about:blank");
 
     // initialize the button into the navbar
     CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
     // ensure correct state
     SocialUI.onCustomizeEnd(window);
@@ -152,17 +152,17 @@ var tests = {
       let shareButton = SocialShare.shareButton;
       // verify the attribute for proper css
       is(shareButton.getAttribute("disabled"), "true", "share button attribute is disabled");
       // button should be visible
       is(shareButton.hidden, false, "share button is visible");
       SocialService.disableProvider(manifest.origin, next);
     });
   },
-  testShareEnabledOnActivation: function(next) {
+  testShareEnabledOnActivation(next) {
     // starting from *some* page, share should be visible and enabled when
     // activating provider
     // initialize the button into the navbar
     CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
     // ensure correct state
     SocialUI.onCustomizeEnd(window);
 
     let testData = corpus[0];
@@ -175,17 +175,17 @@ var tests = {
         // verify the attribute for proper css
         ok(!shareButton.hasAttribute("disabled"), "share button is enabled");
         // button should be visible
         is(shareButton.hidden, false, "share button is visible");
         BrowserTestUtils.removeTab(tab).then(next);
       });
     });
   },
-  testSharePage: function(next) {
+  testSharePage(next) {
     let testTab;
     let testIndex = 0;
     let testData = corpus[testIndex++];
 
     // initialize the button into the navbar
     CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
     // ensure correct state
     SocialUI.onCustomizeEnd(window);
@@ -217,17 +217,17 @@ var tests = {
         // button should be visible
         is(shareButton.hidden, false, "share button is visible");
 
         SocialShare.sharePage(manifest.origin);
       });
     }
     executeSoon(runOneTest);
   },
-  testShareMicroformats: function(next) {
+  testShareMicroformats(next) {
     // initialize the button into the navbar
     CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
     // ensure correct state
     SocialUI.onCustomizeEnd(window);
 
     SocialService.addProvider(manifest, function(provider) {
       let target, testTab;
 
@@ -300,17 +300,17 @@ var tests = {
         is(shareButton.hidden, false, "share button is visible");
 
         let doc = tab.linkedBrowser.contentDocument;
         target = doc.getElementById("simple-hcard");
         SocialShare.sharePage(manifest.origin, null, target);
       });
     });
   },
-  testSharePanelActivation: function(next) {
+  testSharePanelActivation(next) {
     let testTab;
     // cleared in the cleanup function
     Services.prefs.setCharPref("social.directories", "https://example.com");
     Services.prefs.setBoolPref("social.share.activationPanelEnabled", true);
     // make the iframe so we can wait on the load
     SocialShare._createFrame();
     let iframe = SocialShare.iframe;
 
@@ -347,17 +347,17 @@ var tests = {
       ok(!shareButton.hasAttribute("disabled"), "share button is enabled");
       // button should be visible
       is(shareButton.hidden, false, "share button is visible");
 
       testTab = tab;
       SocialShare.sharePage();
     });
   },
-  testSharePanelDialog: function(next) {
+  testSharePanelDialog(next) {
     let testTab;
     // initialize the button into the navbar
     CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR);
     // ensure correct state
     SocialUI.onCustomizeEnd(window);
     SocialShare._createFrame();
 
     SocialService.addProvider(manifest, () => {
--- a/browser/base/content/test/social/browser_social_activation.js
+++ b/browser/base/content/test/social/browser_social_activation.js
@@ -181,49 +181,49 @@ function test() {
   });
   waitForExplicitFinish();
   SpecialPowers.pushPrefEnv({"set": [["dom.ipc.processCount", 1]]}, () => {
     runSocialTests(tests, undefined, postTestCleanup);
   });
 }
 
 var tests = {
-  testActivationWrongOrigin: function(next) {
+  testActivationWrongOrigin(next) {
     // At this stage none of our providers exist, so we expect failure.
     Services.prefs.setBoolPref("social.remote-install.enabled", false);
     activateProvider(gTestDomains[0], function() {
       is(SocialUI.enabled, false, "SocialUI is not enabled");
       let panel = document.getElementById("servicesInstall-notification");
       ok(panel.hidden, "activation panel still hidden");
       checkSocialUI();
       Services.prefs.clearUserPref("social.remote-install.enabled");
       next();
     });
   },
 
-  testIFrameActivation: function(next) {
+  testIFrameActivation(next) {
     activateIFrameProvider(gTestDomains[0], function() {
       is(SocialUI.enabled, false, "SocialUI is not enabled");
       let panel = document.getElementById("servicesInstall-notification");
       ok(panel.hidden, "activation panel still hidden");
       checkSocialUI();
       next();
     });
   },
 
-  testActivationFirstProvider: function(next) {
+  testActivationFirstProvider(next) {
     // first up we add a manifest entry for a single provider.
     activateOneProvider(gProviders[0], false, function() {
       // we deactivated leaving no providers left, so Social is disabled.
       checkSocialUI();
       next();
     });
   },
 
-  testActivationMultipleProvider: function(next) {
+  testActivationMultipleProvider(next) {
     // The trick with this test is to make sure that Social.providers[1] is
     // the current provider when doing the undo - this makes sure that the
     // Social code doesn't fallback to Social.providers[0], which it will
     // do in some cases (but those cases do not include what this test does)
     // first enable the 2 providers
     SocialService.addProvider(gProviders[0], function() {
       SocialService.addProvider(gProviders[1], function() {
         checkSocialUI();
@@ -232,17 +232,17 @@ var tests = {
           // we deactivated - the first provider should be enabled.
           checkSocialUI();
           next();
         });
       });
     });
   },
 
-  testAddonManagerDoubleInstall: function(next) {
+  testAddonManagerDoubleInstall(next) {
     // Create a new tab and load about:addons
     let addonsTab = gBrowser.addTab();
     gBrowser.selectedTab = addonsTab;
     BrowserOpenAddonsMgr('addons://list/service');
     gBrowser.selectedBrowser.addEventListener("load", function tabLoad() {
       gBrowser.selectedBrowser.removeEventListener("load", tabLoad, true);
       is(addonsTab.linkedBrowser.currentURI.spec, "about:addons", "about:addons should load into blank tab.");
 
--- a/browser/base/content/test/social/social_crash_content_helper.js
+++ b/browser/base/content/test/social/social_crash_content_helper.js
@@ -9,21 +9,21 @@ Cu.import("resource://gre/modules/ctypes
 var crash = function() { // this will crash when called.
   let zero = new ctypes.intptr_t(8);
   let badptr = ctypes.cast(zero, ctypes.PointerType(ctypes.int32_t));
   badptr.contents
 };
 
 
 var TestHelper = {
-  init: function() {
+  init() {
     addMessageListener("social-test:crash", this);
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "social-test:crash":
         privateNoteIntentionalCrash();
         crash();
       break;
     }
   },
 }
--- a/browser/base/content/test/urlbar/Panel.jsm
+++ b/browser/base/content/test/urlbar/Panel.jsm
@@ -100,18 +100,18 @@ this.Panel.prototype = {
     for (let i = 0; i < this.p.maxResults; i++) {
       let idx = this._currentIndex;
       if (idx >= this.p._matchCount) {
         break;
       }
       let url = controller.getValueAt(idx);
       let action = this.urlbar._parseActionUrl(url);
       this._emit("result", {
-        url: url,
-        action: action,
+        url,
+        action,
         image: controller.getImageAt(idx),
         title: controller.getCommentAt(idx),
         type: controller.getStyleAt(idx),
         text: controller.searchString.replace(/^\s+/, "").replace(/\s+$/, ""),
       });
       this._currentIndex++;
     }
     if (this._currentIndex < this.p.matchCount) {
--- a/browser/base/content/test/urlbar/browser_autocomplete_no_title.js
+++ b/browser/base/content/test/urlbar/browser_autocomplete_no_title.js
@@ -1,13 +1,13 @@
 add_task(function*() {
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:mozilla");
 
   let uri = NetUtil.newURI("http://bug1060642.example.com/beards/are/pretty/great");
-  yield PlacesTestUtils.addVisits([{uri: uri, title: ""}]);
+  yield PlacesTestUtils.addVisits([{uri, title: ""}]);
 
   yield promiseAutocompleteResultPopup("bug1060642");
   ok(gURLBar.popup.richlistbox.children.length > 1, "Should get at least 2 results");
   let result = gURLBar.popup.richlistbox.children[1];
   is(result._titleText.textContent, "bug1060642.example.com", "Result title should be as expected");
 
   gURLBar.popup.hidePopup();
   yield promisePopupHidden(gURLBar.popup);
--- a/browser/base/content/test/urlbar/browser_autocomplete_tag_star_visibility.js
+++ b/browser/base/content/test/urlbar/browser_autocomplete_tag_star_visibility.js
@@ -5,17 +5,17 @@ add_task(function*() {
 
   function* addTagItem(tagName) {
     let uri = NetUtil.newURI(`http://example.com/this/is/tagged/${tagName}`);
     PlacesUtils.bookmarks.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                                          uri,
                                          PlacesUtils.bookmarks.DEFAULT_INDEX,
                                          `test ${tagName}`);
     PlacesUtils.tagging.tagURI(uri, [tagName]);
-    yield PlacesTestUtils.addVisits([{uri: uri, title: `Test page with tag ${tagName}`}]);
+    yield PlacesTestUtils.addVisits([{uri, title: `Test page with tag ${tagName}`}]);
   }
 
   // We use different tags for each part of the test, as otherwise the
   // autocomplete code tries to be smart by using the previously cached element
   // without updating it (since all parameters it knows about are the same).
 
   let testcases = [{
     description: "Test with suggest.bookmark=true",
--- a/browser/base/content/test/urlbar/browser_bug556061.js
+++ b/browser/base/content/test/urlbar/browser_bug556061.js
@@ -23,71 +23,71 @@ function runNextTest() {
 function cleanup() {
   gBrowser.removeTab(testTab);
   finish();
 }
 
 var tests = [
   {
     expected: testURL,
-    setup: function() {
+    setup() {
       gURLBar.value = testActionURL;
       gURLBar.valueIsTyped = true;
       is(gURLBar.value, testActionURL, "gURLBar starts with the correct real value");
       is(gURLBar.textValue, testURL, "gURLBar starts with the correct display value");
 
       // Focus the urlbar so we can select it all & copy
       gURLBar.focus();
       gURLBar.select();
       goDoCommand("cmd_copy");
     },
-    success: function() {
+    success() {
       is(gURLBar.value, testActionURL, "gURLBar.value didn't change when copying");
     }
   },
   {
     expected: testURL.substring(0, 10),
-    setup: function() {
+    setup() {
       // Set selectionStart/End manually and make sure it matches the substring
       gURLBar.selectionStart = 0;
       gURLBar.selectionEnd = 10;
       goDoCommand("cmd_copy");
     },
-    success: function() {
+    success() {
       is(gURLBar.value, testActionURL, "gURLBar.value didn't change when copying");
     }
   },
   {
     expected: testURL,
-    setup: function() {
+    setup() {
       // Setup for cut test...
       // Select all
       gURLBar.select();
       goDoCommand("cmd_cut");
     },
-    success: function() {
+    success() {
       is(gURLBar.value, "", "gURLBar.value is now empty");
     }
   },
   {
     expected: testURL.substring(testURL.length - 10, testURL.length),
-    setup: function() {
+    setup() {
       // Reset urlbar value
       gURLBar.value = testActionURL;
       gURLBar.valueIsTyped = true;
       // Sanity check that we have the right value
       is(gURLBar.value, testActionURL, "gURLBar starts with the correct real value");
       is(gURLBar.textValue, testURL, "gURLBar starts with the correct display value");
 
       // Now just select part of the value & cut that.
       gURLBar.selectionStart = testURL.length - 10;
       gURLBar.selectionEnd = testURL.length;
       goDoCommand("cmd_cut");
     },
-    success: function() {
+    success() {
       is(gURLBar.value, testURL.substring(0, testURL.length - 10), "gURLBar.value has the correct value");
     }
   }
 ];
 
 function test() {
   waitForExplicitFinish();
   testTab = gBrowser.addTab();
--- a/browser/base/content/test/urlbar/browser_bug623155.js
+++ b/browser/base/content/test/urlbar/browser_bug623155.js
@@ -53,34 +53,34 @@ function test() {
   gBrowser.getBrowserForTab(gNewTab)
           .webProgress
           .addProgressListener(gWebProgressListener,
                                Components.interfaces.nsIWebProgress
                                                     .NOTIFY_LOCATION);
 }
 
 var gWebProgressListener = {
-  QueryInterface: function(aIID) {
+  QueryInterface(aIID) {
     if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
         aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
         aIID.equals(Components.interfaces.nsISupports))
       return this;
     throw Components.results.NS_NOINTERFACE;
   },
 
   // ---------------------------------------------------------------------------
   // NOTIFY_LOCATION mode should work fine without these methods.
   //
   // onStateChange: function() {},
   // onStatusChange: function() {},
   // onProgressChange: function() {},
   // onSecurityChange: function() {},
   // ----------------------------------------------------------------------------
 
-  onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {
+  onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
     if (!aRequest) {
       // This is bug 673752, or maybe initial "about:blank".
       return;
     }
 
     ok(gNewTab, "There is a new tab.");
     ok(isRedirectedURI(aLocation),
        "onLocationChange catches only redirected URI.");
--- a/browser/base/content/test/urlbar/browser_search_favicon.js
+++ b/browser/base/content/test/urlbar/browser_search_favicon.js
@@ -18,17 +18,17 @@ add_task(function*() {
   Services.search.addEngineWithDetails("SearchEngine", "", "", "",
                                        "GET", "http://s.example.com/search");
   gEngine = Services.search.getEngineByName("SearchEngine");
   gEngine.addParam("q", "{searchTerms}", null);
   gOriginalEngine = Services.search.currentEngine;
   Services.search.currentEngine = gEngine;
 
   let uri = NetUtil.newURI("http://s.example.com/search?q=foo&client=1");
-  yield PlacesTestUtils.addVisits({ uri: uri, title: "Foo - SearchEngine Search" });
+  yield PlacesTestUtils.addVisits({ uri, title: "Foo - SearchEngine Search" });
 
   yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:mozilla");
 
   // The first autocomplete result has the action searchengine, while
   // the second result is the "search favicon" element.
   yield promiseAutocompleteResultPopup("foo");
   let result = gURLBar.popup.richlistbox.children[1];
 
--- a/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
+++ b/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
@@ -166,22 +166,22 @@ function checkAutocompleteResults(aExpec
 {
   gController.input = {
     timeout: 10,
     textValue: "",
     searches: ["unifiedcomplete"],
     searchParam: "enable-actions",
     popupOpen: false,
     minResultsForPopup: 0,
-    invalidate: function() {},
+    invalidate() {},
     disableAutoComplete: false,
     completeDefaultIndex: false,
     get popup() { return this; },
-    onSearchBegin: function() {},
-    onSearchComplete:  function()
+    onSearchBegin() {},
+    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;
         }
@@ -197,19 +197,19 @@ function checkAutocompleteResults(aExpec
 
       // Make sure there is no reported open page that is not open.
       for (let entry in aExpected) {
         ok(false, "'" + entry + "' should be found in autocomplete");
       }
 
       executeSoon(aCallback);
     },
-    setSelectedIndex: function() {},
+    setSelectedIndex() {},
     get searchCount() { return this.searches.length; },
-    getSearchAt: function(aIndex) { return this.searches[aIndex]; },
+    getSearchAt(aIndex) { return this.searches[aIndex]; },
     QueryInterface: XPCOMUtils.generateQI([
       Ci.nsIAutoCompleteInput,
       Ci.nsIAutoCompletePopup,
     ])
   };
 
   info("Searching open pages.");
   gController.startSearch(Services.prefs.getCharPref("browser.urlbar.restrict.openpage"));
--- a/browser/base/content/test/urlbar/browser_urlbarAddonIframe.js
+++ b/browser/base/content/test/urlbar/browser_urlbarAddonIframe.js
@@ -179,42 +179,42 @@ let gNextMessageID = 1;
  * Returns an array of promises, one per ack.  Each is resolved when the content
  * JS acks the message.  numExpectedAcks is the number of acks you expect.
  */
 function promiseMessage(type, data, numExpectedAcks = 1) {
   let testMsgName = "TestMessage";
   let ackMsgName = "TestMessageAck";
   let msgID = gNextMessageID++;
   gMsgMan.sendAsyncMessage(testMsgName, {
-    type: type,
+    type,
     messageID: msgID,
-    data: data,
+    data,
   });
   let ackPromises = [];
   for (let i = 0; i < numExpectedAcks; i++) {
     let ackIndex = i;
     ackPromises.push(new Promise(resolve => {
       info("Waiting for message ack: " + JSON.stringify({
-        type: type,
-        msgID: msgID,
-        ackIndex: ackIndex,
+        type,
+        msgID,
+        ackIndex,
       }));
       gMsgMan.addMessageListener(ackMsgName, function onMsg(msg) {
         // Messages have IDs so that an ack can be correctly paired with the
         // initial message it's replying to.  It's not an error if the ack's ID
         // isn't equal to msgID here.  That will happen when multiple messages
         // have been sent in a single turn of the event loop so that they're all
         // waiting on acks.  Same goes for ackIndex.
         if (msg.data.messageID != msgID || msg.data.ackIndex != ackIndex) {
           return;
         }
         info("Received message ack: " + JSON.stringify({
-          type: type,
+          type,
           msgID: msg.data.messageID,
-          ackIndex: ackIndex,
+          ackIndex,
         }));
         gMsgMan.removeMessageListener(ackMsgName, onMsg);
         resolve(msg.data.data);
       });
     }));
   }
   return ackPromises;
 }
--- a/browser/base/content/test/urlbar/browser_urlbarCopying.js
+++ b/browser/base/content/test/urlbar/browser_urlbarCopying.js
@@ -148,17 +148,17 @@ var tests = [
     copyVal: "<data:text/html,(>%C3%A9 %25P)",
     copyExpected: "data:text/html,("
   },
   {
     copyVal: "<data:text/html,(%C3%A9 %25P>)",
     copyExpected: "data:text/html,(%C3%A9 %25P",
   },
   {
-    setup: function() { Services.prefs.setBoolPref(decodeURLpref, true); },
+    setup() { Services.prefs.setBoolPref(decodeURLpref, true); },
     loadURL: "http://example.com/%D0%B1%D0%B8%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D1%8F",
     expectedURL: toUnicode("example.com/биография"),
     copyExpected: toUnicode("http://example.com/биография")
   },
   {
     copyVal: toUnicode("<example.com/би>ография"),
     copyExpected: toUnicode("http://example.com/би")
   },
--- a/browser/base/content/test/urlbar/browser_urlbarSearchTelemetry.js
+++ b/browser/base/content/test/urlbar/browser_urlbarSearchTelemetry.js
@@ -183,17 +183,17 @@ function getActionAtIndex(index) {
   let mozActionMatch = url.match(/^moz-action:([^,]+),(.*)$/);
   if (!mozActionMatch) {
     let msg = "result at index " + index + " is not a moz-action: " + url;
     Assert.ok(false, msg);
     throw new Error(msg);
   }
   let [, type, paramStr] = mozActionMatch;
   return {
-    type: type,
+    type,
     params: JSON.parse(paramStr),
   };
 }
 
 /**
  * Returns the index of the first search suggestion in the urlbar results.
  *
  * @return An index, or -1 if there are no search suggestions.
--- a/browser/base/content/test/urlbar/head.js
+++ b/browser/base/content/test/urlbar/head.js
@@ -41,17 +41,17 @@ function waitForDocLoadAndStopIt(aExpect
         /* Let the parent know we're done. */
         sendAsyncMessage("Test:WaitForDocLoadAndStopIt", { uri });
       } else {
         setTimeout(stopContent.bind(null, true, uri), 0);
       }
     }
 
     let progressListener = {
-      onStateChange: function(webProgress, req, flags, status) {
+      onStateChange(webProgress, req, flags, status) {
         dump("waitForDocLoadAndStopIt: onStateChange " + flags.toString(16) + ": " + req.name + "\n");
 
         if (webProgress.isTopLevel &&
             flags & Ci.nsIWebProgressListener.STATE_START) {
           wp.removeProgressListener(progressListener);
 
           let chan = req.QueryInterface(Ci.nsIChannel);
           dump(`waitForDocLoadAndStopIt: Document start: ${chan.URI.spec}\n`);
@@ -185,21 +185,21 @@ function promiseAutocompleteResultPopup(
   return promiseSearchComplete(win);
 }
 
 function promiseNewSearchEngine(basename) {
   return new Promise((resolve, reject) => {
     info("Waiting for engine to be added: " + basename);
     let url = getRootDirectory(gTestPath) + basename;
     Services.search.addEngine(url, null, "", false, {
-      onSuccess: function(engine) {
+      onSuccess(engine) {
         info("Search engine added: " + basename);
         registerCleanupFunction(() => Services.search.removeEngine(engine));
         resolve(engine);
       },
-      onError: function(errCode) {
+      onError(errCode) {
         Assert.ok(false, "addEngine failed with error code " + errCode);
         reject();
       },
     });
   });
 }
 
--- a/browser/base/content/test/urlbar/urlbarAddonIframe.js
+++ b/browser/base/content/test/urlbar/urlbarAddonIframe.js
@@ -40,13 +40,13 @@ function expectEvent(detail) {
   });
 }
 
 // Sends an ack to the test.
 function ack(originalEventDetail, ackData = null, ackIndex = 0) {
   dispatchEvent(new CustomEvent("TestEventAck", {
     detail: {
       messageID: originalEventDetail.messageID,
-      ackIndex: ackIndex,
+      ackIndex,
       data: ackData,
     },
   }));
 }
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -378,17 +378,17 @@ function openLinkIn(url, where, params) 
       flags |= Ci.nsIWebNavigation.LOAD_FLAGS_ERROR_LOAD_CHANGES_RV;
     }
 
     if (aForceAboutBlankViewerInCurrent) {
       targetBrowser.createAboutBlankContentViewer(aPrincipal);
     }
 
     targetBrowser.loadURIWithFlags(url, {
-      flags: flags,
+      flags,
       referrerURI: aNoReferrer ? null : aReferrerURI,
       referrerPolicy: aReferrerPolicy,
       postData: aPostData,
       userContextId: aUserContextId
     });
     break;
   case "tabshifted":
     loadInBackground = !loadInBackground;
--- a/browser/base/content/web-panels.js
+++ b/browser/base/content/web-panels.js
@@ -8,22 +8,22 @@ const NS_NET_STATUS_READ_FROM = NS_ERROR
 const NS_NET_STATUS_WROTE_TO  = NS_ERROR_MODULE_NETWORK + 9;
 
 function getPanelBrowser()
 {
     return document.getElementById("web-panels-browser");
 }
 
 var panelProgressListener = {
-    onProgressChange : function(aWebProgress, aRequest,
+    onProgressChange(aWebProgress, aRequest,
                                 aCurSelfProgress, aMaxSelfProgress,
                                 aCurTotalProgress, aMaxTotalProgress) {
     },
 
-    onStateChange : function(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;
 
@@ -33,27 +33,27 @@ var panelProgressListener = {
         }
         else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
                 aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
             window.parent.document.getElementById('sidebar-throbber').removeAttribute("loading");
         }
     }
     ,
 
-    onLocationChange : function(aWebProgress, aRequest, aLocation, aFlags) {
+    onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
         UpdateBackForwardCommands(getPanelBrowser().webNavigation);
     },
 
-    onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage) {
+    onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
     },
 
-    onSecurityChange : function(aWebProgress, aRequest, aState) {
+    onSecurityChange(aWebProgress, aRequest, aState) {
     },
 
-    QueryInterface : function(aIID)
+    QueryInterface(aIID)
     {
         if (aIID.equals(Ci.nsIWebProgressListener) ||
             aIID.equals(Ci.nsISupportsWeakReference) ||
             aIID.equals(Ci.nsISupports))
             return this;
         throw Cr.NS_NOINTERFACE;
     }
 };
--- a/browser/base/content/webrtcIndicator.js
+++ b/browser/base/content/webrtcIndicator.js
@@ -124,17 +124,17 @@ function onFirefoxButtonClick(event) {
   event.target.blur();
   let activeStreams = webrtcUI.getActiveStreams(true, true, true);
   activeStreams[0].browser.ownerGlobal.focus();
 }
 
 var PositionHandler = {
   positionCustomized: false,
   threshold: 10,
-  adjustPosition: function() {
+  adjustPosition() {
     if (!this.positionCustomized) {
       // Center the window horizontally on the screen (not the available area).
       // Until we have moved the window to y=0, 'screen.width' may give a value
       // for a secondary screen, so use values from the screen manager instead.
       let primaryScreen = Cc["@mozilla.org/gfx/screenmanager;1"]
                             .getService(Ci.nsIScreenManager)
                             .primaryScreen;
       let widthDevPix = {};
@@ -145,24 +145,24 @@ var PositionHandler = {
       let widthCss = widthDevPix.value / scaleFactor;
       window.moveTo((widthCss - document.documentElement.clientWidth) / 2,
                     availTopDevPix.value / scaleFactor);
     } else {
       // This will ensure we're at y=0.
       this.setXPosition(window.screenX);
     }
   },
-  setXPosition: function(desiredX) {
+  setXPosition(desiredX) {
     // Ensure the indicator isn't moved outside the available area of the screen.
     desiredX = Math.max(desiredX, screen.availLeft);
     let maxX =
       screen.availLeft + screen.availWidth - document.documentElement.clientWidth;
     window.moveTo(Math.min(desiredX, maxX), screen.availTop);
   },
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "mousedown":
         if (aEvent.button != 0 || aEvent.defaultPrevented)
           return;
 
         this._startMouseX = aEvent.screenX;
         this._startWindowX = window.screenX;
         this._deltaX = this._startMouseX - this._startWindowX;
--- a/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js
+++ b/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js
@@ -93,32 +93,32 @@ function getCacheStorage(where, lci, app
 function OpenCacheEntry(key, where, flags, lci)
 {
   return new Promise(resolve => {
     key = createURI(key);
     function CacheListener() { }
     CacheListener.prototype = {
       _appCache: null,
 
-      QueryInterface: function(iid) {
+      QueryInterface(iid) {
         if (iid.equals(Components.interfaces.nsICacheEntryOpenCallback) ||
             iid.equals(Components.interfaces.nsISupports))
           return this;
         throw Components.results.NS_ERROR_NO_INTERFACE;
       },
 
-      onCacheEntryCheck: function(entry, appCache) {
+      onCacheEntryCheck(entry, appCache) {
         return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED;
       },
 
-      onCacheEntryAvailable: function(entry, isnew, appCache, status) {
+      onCacheEntryAvailable(entry, isnew, appCache, status) {
         resolve();
       },
 
-      run: function() {
+      run() {
         let storage = getCacheStorage(where, lci, this._appCache);
         storage.asyncOpenURI(key, "", flags, this);
       }
     };
 
     (new CacheListener()).run();
   });
 }
--- a/browser/components/contextualidentity/test/browser/browser_serviceworkers.js
+++ b/browser/components/contextualidentity/test/browser/browser_serviceworkers.js
@@ -73,32 +73,32 @@ function allRegistered() {
     }
   }
   return true;
 }
 
 function promiseAllRegistered() {
   return new Promise(function(resolve) {
     let listener = {
-      onRegister: function() {
+      onRegister() {
         if (allRegistered()) {
           swm.removeListener(listener);
           resolve();
         }
       }
     }
     swm.addListener(listener);
   });
 }
 
 function promiseUnregister(info) {
   return new Promise(function(resolve) {
     swm.unregister(info.principal, {
-      unregisterSucceeded: function(aState) {
+      unregisterSucceeded(aState) {
         ok(aState, "ServiceWorkerRegistration exists");
         resolve();
       },
-      unregisterFailed: function(aState) {
+      unregisterFailed(aState) {
         ok(false, "unregister should succeed");
       }
     }, info.scope);
   });
 }
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -165,17 +165,17 @@ XPCOMUtils.defineLazyGetter(this, "log",
   let consoleOptions = {
     maxLogLevel: debug ? "all" : "log",
     prefix: "CustomizableUI",
   };
   return new scope.ConsoleAPI(consoleOptions);
 });
 
 var CustomizableUIInternal = {
-  initialize: function() {
+  initialize() {
     log.debug("Initializing");
 
     this.addListener(this);
     this._defineBuiltInWidgets();
     this.loadSavedState();
     this._introduceNewBuiltinWidgets();
     this._markObsoleteBuiltinButtonsSeen();
 
@@ -318,23 +318,23 @@ var CustomizableUIInternal = {
       CustomizableUI.AREA_ADDONBAR,
     ]);
     if (AppConstants.platform != "macosx") {
       toolbars.add(CustomizableUI.AREA_MENUBAR);
     }
     return toolbars;
   },
 
-  _defineBuiltInWidgets: function() {
+  _defineBuiltInWidgets() {
     for (let widgetDefinition of CustomizableWidgets) {
       this.createBuiltinWidget(widgetDefinition);
     }
   },
 
-  _introduceNewBuiltinWidgets: function() {
+  _introduceNewBuiltinWidgets() {
     // We should still enter even if gSavedState.currentVersion >= kVersion
     // because the per-widget pref facility is independent of versioning.
     if (!gSavedState) {
       // Flip all the prefs so we don't try to re-introduce later:
       for (let [, widget] of gPalette) {
         if (widget.defaultArea && widget._introducedInVersion === "pref") {
           let prefId = "browser.toolbarbuttons.introduced." + widget.id;
           Services.prefs.setBoolPref(prefId, true);
@@ -384,33 +384,33 @@ var CustomizableUIInternal = {
       CustomizableUI.removeWidgetFromArea("loop-button-throttled");
     }
   },
 
   /**
    * _markObsoleteBuiltinButtonsSeen
    * when upgrading, ensure obsoleted buttons are in seen state.
    */
-  _markObsoleteBuiltinButtonsSeen: function() {
+  _markObsoleteBuiltinButtonsSeen() {
     if (!gSavedState)
       return;
     let currentVersion = gSavedState.currentVersion;
     if (currentVersion >= kVersion)
       return;
     // we're upgrading, update state if necessary
     for (let id in ObsoleteBuiltinButtons) {
       let version = ObsoleteBuiltinButtons[id]
       if (version == kVersion) {
         gSeenWidgets.add(id);
         gDirty = true;
       }
     }
   },
 
-  _placeNewDefaultWidgetsInArea: function(aArea) {
+  _placeNewDefaultWidgetsInArea(aArea) {
     let futurePlacedWidgets = gFuturePlacements.get(aArea);
     let savedPlacements = gSavedState && gSavedState.placements && gSavedState.placements[aArea];
     let defaultPlacements = gAreas.get(aArea).get("defaultPlacements");
     if (!savedPlacements || !savedPlacements.length || !futurePlacedWidgets || !defaultPlacements ||
         !defaultPlacements.length) {
       return;
     }
     let defaultWidgetIndex = -1;
@@ -454,17 +454,17 @@ var CustomizableUIInternal = {
       }
       // The loop above either inserts the item or doesn't - either way, we can get away
       // with doing nothing else now; if the item remains in gFuturePlacements, we'll
       // add it at the end in restoreStateForArea.
     }
     this.saveState();
   },
 
-  wrapWidget: function(aWidgetId) {
+  wrapWidget(aWidgetId) {
     if (gGroupWrapperCache.has(aWidgetId)) {
       return gGroupWrapperCache.get(aWidgetId);
     }
 
     let provider = this.getWidgetProvider(aWidgetId);
     if (!provider) {
       return null;
     }
@@ -479,17 +479,17 @@ var CustomizableUIInternal = {
     }
 
     // PROVIDER_SPECIAL gets treated the same as PROVIDER_XUL.
     let wrapper = new XULWidgetGroupWrapper(aWidgetId);
     gGroupWrapperCache.set(aWidgetId, wrapper);
     return wrapper;
   },
 
-  registerArea: function(aName, aProperties, aInternalCaller) {
+  registerArea(aName, aProperties, aInternalCaller) {
     if (typeof aName != "string" || !/^[a-z0-9-_]{1,}$/i.test(aName)) {
       throw new Error("Invalid area name");
     }
 
     let areaIsKnown = gAreas.has(aName);
     let props = areaIsKnown ? gAreas.get(aName) : new Map();
     const kImmutableProperties = new Set(["type", "legacy", "overflowable"]);
     for (let key in aProperties) {
@@ -558,17 +558,17 @@ var CustomizableUIInternal = {
         for (let [pendingNode, existingChildren] of pendingNodes) {
           this.registerToolbarNode(pendingNode, existingChildren);
         }
         gPendingBuildAreas.delete(aName);
       }
     }
   },
 
-  unregisterArea: function(aName, aDestroyPlacements) {
+  unregisterArea(aName, aDestroyPlacements) {
     if (typeof aName != "string" || !/^[a-z0-9-_]{1,}$/i.test(aName)) {
       throw new Error("Invalid area name");
     }
     if (!gAreas.has(aName) && !gPlacements.has(aName)) {
       throw new Error("Area not registered");
     }
 
     // Move all the widgets out
@@ -600,17 +600,17 @@ var CustomizableUIInternal = {
         }
       }
       gBuildAreas.delete(aName);
     } finally {
       this.endBatchUpdate(true);
     }
   },
 
-  registerToolbarNode: function(aToolbar, aExistingChildren) {
+  registerToolbarNode(aToolbar, aExistingChildren) {
     let area = aToolbar.id;
     if (gBuildAreas.has(area) && gBuildAreas.get(area).has(aToolbar)) {
       return;
     }
     let areaProperties = gAreas.get(area);
 
     // If this area is not registered, try to do it automatically:
     if (!areaProperties) {
@@ -672,17 +672,17 @@ var CustomizableUIInternal = {
       }
       this.notifyListeners("onAreaNodeRegistered", area, aToolbar.customizationTarget);
       aToolbar.setAttribute("currentset", placements.join(","));
     } finally {
       this.endBatchUpdate();
     }
   },
 
-  buildArea: function(aArea, aPlacements, aAreaNode) {
+  buildArea(aArea, aPlacements, aAreaNode) {
     let document = aAreaNode.ownerDocument;
     let window = document.defaultView;
     let inPrivateWindow = PrivateBrowsingUtils.isWindowPrivate(window);
     let container = aAreaNode.customizationTarget;
     let areaIsPanel = gAreas.get(aArea).get("type") == CustomizableUI.TYPE_MENU_PANEL;
 
     if (!container) {
       throw new Error("Expected area " + aArea
@@ -808,37 +808,37 @@ var CustomizableUIInternal = {
       if (gResetting) {
         this.notifyListeners("onAreaReset", aArea, container);
       }
     } finally {
       this.endBatchUpdate();
     }
   },
 
-  addPanelCloseListeners: function(aPanel) {
+  addPanelCloseListeners(aPanel) {
     gELS.addSystemEventListener(aPanel, "click", this, false);
     gELS.addSystemEventListener(aPanel, "keypress", this, false);
     let win = aPanel.ownerGlobal;
     if (!gPanelsForWindow.has(win)) {
       gPanelsForWindow.set(win, new Set());
     }
     gPanelsForWindow.get(win).add(this._getPanelForNode(aPanel));
   },
 
-  removePanelCloseListeners: function(aPanel) {
+  removePanelCloseListeners(aPanel) {
     gELS.removeSystemEventListener(aPanel, "click", this, false);
     gELS.removeSystemEventListener(aPanel, "keypress", this, false);
     let win = aPanel.ownerGlobal;
     let panels = gPanelsForWindow.get(win);
     if (panels) {
       panels.delete(this._getPanelForNode(aPanel));
     }
   },
 
-  ensureButtonContextMenu: function(aNode, aAreaNode) {
+  ensureButtonContextMenu(aNode, aAreaNode) {
     const kPanelItemContextMenu = "customizationPanelItemContextMenu";
 
     let currentContextMenu = aNode.getAttribute("context") ||
                              aNode.getAttribute("contextmenu");
     let place = CustomizableUI.getPlaceForItem(aAreaNode);
     let contextMenuForPlace = place == "panel" ?
                                 kPanelItemContextMenu :
                                 null;
@@ -846,17 +846,17 @@ var CustomizableUIInternal = {
       aNode.setAttribute("context", contextMenuForPlace);
     } else if (currentContextMenu == kPanelItemContextMenu &&
                contextMenuForPlace != kPanelItemContextMenu) {
       aNode.removeAttribute("context");
       aNode.removeAttribute("contextmenu");
     }
   },
 
-  getWidgetProvider: function(aWidgetId) {
+  getWidgetProvider(aWidgetId) {
     if (this.isSpecialWidget(aWidgetId)) {
       return CustomizableUI.PROVIDER_SPECIAL;
     }
     if (gPalette.has(aWidgetId)) {
       return CustomizableUI.PROVIDER_API;
     }
     // If this was an API widget that was destroyed, return null:
     if (gSeenWidgets.has(aWidgetId)) {
@@ -866,17 +866,17 @@ var CustomizableUIInternal = {
     // We fall back to the XUL provider, but we don't know for sure (at this
     // point) whether it exists there either. So the API is technically lying.
     // Ideally, it would be able to return an error value (or throw an
     // exception) if it really didn't exist. Our code calling this function
     // handles that fine, but this is a public API.
     return CustomizableUI.PROVIDER_XUL;
   },
 
-  getWidgetNode: function(aWidgetId, aWindow) {
+  getWidgetNode(aWidgetId, aWindow) {
     let document = aWindow.document;
 
     if (this.isSpecialWidget(aWidgetId)) {
       let widgetNode = document.getElementById(aWidgetId) ||
                        this.createSpecialWidget(aWidgetId, document);
       return [ CustomizableUI.PROVIDER_SPECIAL, widgetNode];
     }
 
@@ -899,17 +899,17 @@ var CustomizableUIInternal = {
     if (node) {
       return [ CustomizableUI.PROVIDER_XUL, node ];
     }
 
     log.debug("No node for " + aWidgetId + " found.");
     return [null, null];
   },
 
-  registerMenuPanel: function(aPanelContents) {
+  registerMenuPanel(aPanelContents) {
     if (gBuildAreas.has(CustomizableUI.AREA_PANEL) &&
         gBuildAreas.get(CustomizableUI.AREA_PANEL).has(aPanelContents)) {
       return;
     }
 
     let document = aPanelContents.ownerDocument;
 
     aPanelContents.toolbox = document.getElementById("navigator-toolbox");
@@ -930,25 +930,25 @@ var CustomizableUIInternal = {
       }
       this.ensureButtonContextMenu(child, aPanelContents);
       child.setAttribute("wrap", "true");
     }
 
     this.registerBuildArea(CustomizableUI.AREA_PANEL, aPanelContents);
   },
 
-  onWidgetAdded: function(aWidgetId, aArea, aPosition) {
+  onWidgetAdded(aWidgetId, aArea, aPosition) {
     this.insertNode(aWidgetId, aArea, aPosition, true);
 
     if (!gResetting) {
       this._clearPreviousUIState();
     }
   },
 
-  onWidgetRemoved: function(aWidgetId, aArea) {
+  onWidgetRemoved(aWidgetId, aArea) {
     let areaNodes = gBuildAreas.get(aArea);
     if (!areaNodes) {
       return;
     }
 
     let area = gAreas.get(aArea);
     let isToolbar = area.get("type") == CustomizableUI.TYPE_TOOLBAR;
     let isOverflowable = isToolbar && area.get("overflowable");
@@ -998,28 +998,28 @@ var CustomizableUIInternal = {
         windowCache.delete(aWidgetId);
       }
     }
     if (!gResetting) {
       this._clearPreviousUIState();
     }
   },
 
-  onWidgetMoved: function(aWidgetId, aArea, aOldPosition, aNewPosition) {
+  onWidgetMoved(aWidgetId, aArea, aOldPosition, aNewPosition) {
     this.insertNode(aWidgetId, aArea, aNewPosition);
     if (!gResetting) {
       this._clearPreviousUIState();
     }
   },
 
-  onCustomizeEnd: function(aWindow) {
+  onCustomizeEnd(aWindow) {
     this._clearPreviousUIState();
   },
 
-  registerBuildArea: function(aArea, aNode) {
+  registerBuildArea(aArea, aNode) {
     // We ensure that the window is registered to have its customization data
     // cleaned up when unloading.
     let window = aNode.ownerGlobal;
     if (window.closed) {
       return;
     }
     this.registerBuildWindow(window);
 
@@ -1034,28 +1034,28 @@ var CustomizableUIInternal = {
 
     gBuildAreas.get(aArea).add(aNode);
 
     // Give a class to all customize targets to be used for styling in Customize Mode
     let customizableNode = this.getCustomizeTargetForArea(aArea, window);
     customizableNode.classList.add("customization-target");
   },
 
-  registerBuildWindow: function(aWindow) {
+  registerBuildWindow(aWindow) {
     if (!gBuildWindows.has(aWindow)) {
       gBuildWindows.set(aWindow, new Set());
 
       aWindow.addEventListener("unload", this);
       aWindow.addEventListener("command", this, true);
 
       this.notifyListeners("onWindowOpened", aWindow);
     }
   },
 
-  unregisterBuildWindow: function(aWindow) {
+  unregisterBuildWindow(aWindow) {
     aWindow.removeEventListener("unload", this);
     aWindow.removeEventListener("command", this, true);
     gPanelsForWindow.delete(aWindow);
     gBuildWindows.delete(aWindow);
     gSingleWrapperCache.delete(aWindow);
     let document = aWindow.document;
 
     for (let [areaId, areaNodes] of gBuildAreas) {
@@ -1088,38 +1088,38 @@ var CustomizableUIInternal = {
       for (let areaNode of toDelete) {
         areaMap.delete(areaNode);
       }
     }
 
     this.notifyListeners("onWindowClosed", aWindow);
   },
 
-  setLocationAttributes: function(aNode, aArea) {
+  setLocationAttributes(aNode, aArea) {
     let props = gAreas.get(aArea);
     if (!props) {
       throw new Error("Expected area " + aArea + " to have a properties Map " +
                       "associated with it.");
     }
 
     aNode.setAttribute("cui-areatype", props.get("type") || "");
     let anchor = props.get("anchor");
     if (anchor) {
       aNode.setAttribute("cui-anchorid", anchor);
     } else {
       aNode.removeAttribute("cui-anchorid");
     }
   },
 
-  removeLocationAttributes: function(aNode) {
+  removeLocationAttributes(aNode) {
     aNode.removeAttribute("cui-areatype");
     aNode.removeAttribute("cui-anchorid");
   },
 
-  insertNode: function(aWidgetId, aArea, aPosition, isNew) {
+  insertNode(aWidgetId, aArea, aPosition, isNew) {
     let areaNodes = gBuildAreas.get(aArea);
     if (!areaNodes) {
       return;
     }
 
     let placements = gPlacements.get(aArea);
     if (!placements) {
       log.error("Could not find any placements for " + aArea +
@@ -1129,17 +1129,17 @@ var CustomizableUIInternal = {
 
     // Go through each of the nodes associated with this area and move the
     // widget to the requested location.
     for (let areaNode of areaNodes) {
       this.insertNodeInWindow(aWidgetId, areaNode, isNew);
     }
   },
 
-  insertNodeInWindow: function(aWidgetId, aAreaNode, isNew) {
+  insertNodeInWindow(aWidgetId, aAreaNode, isNew) {
     let window = aAreaNode.ownerGlobal;
     let showInPrivateBrowsing = gPalette.has(aWidgetId)
                               ? gPalette.get(aWidgetId).showInPrivateBrowsing
                               : true;
 
     if (!showInPrivateBrowsing && PrivateBrowsingUtils.isWindowPrivate(window)) {
       return;
     }
@@ -1161,17 +1161,17 @@ var CustomizableUIInternal = {
     let [insertionContainer, nextNode] = this.findInsertionPoints(widgetNode, aAreaNode);
     this.insertWidgetBefore(widgetNode, nextNode, insertionContainer, areaId);
 
     if (gAreas.get(areaId).get("type") == CustomizableUI.TYPE_TOOLBAR) {
       aAreaNode.setAttribute("currentset", gPlacements.get(areaId).join(','));
     }
   },
 
-  findInsertionPoints: function(aNode, aAreaNode) {
+  findInsertionPoints(aNode, aAreaNode) {
     let areaId = aAreaNode.id;
     let props = gAreas.get(areaId);
 
     // For overflowable toolbars, rely on them (because the work is more complicated):
     if (props.get("type") == CustomizableUI.TYPE_TOOLBAR && props.get("overflowable")) {
       return aAreaNode.overflowable.findOverflowedInsertionPoints(aNode);
     }
 
@@ -1186,24 +1186,24 @@ var CustomizableUIInternal = {
       if (nextNode) {
         return [container, nextNode];
       }
     }
 
     return [container, null];
   },
 
-  insertWidgetBefore: function(aNode, aNextNode, aContainer, aArea) {
+  insertWidgetBefore(aNode, aNextNode, aContainer, aArea) {
     this.notifyListeners("onWidgetBeforeDOMChange", aNode, aNextNode, aContainer);
     this.setLocationAttributes(aNode, aArea);
     aContainer.insertBefore(aNode, aNextNode);
     this.notifyListeners("onWidgetAfterDOMChange", aNode, aNextNode, aContainer);
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "command":
         if (!this._originalEventInPanel(aEvent)) {
           break;
         }
         aEvent = aEvent.sourceEvent;
         // Fall through
       case "click":
@@ -1211,61 +1211,61 @@ var CustomizableUIInternal = {
         this.maybeAutoHidePanel(aEvent);
         break;
       case "unload":
         this.unregisterBuildWindow(aEvent.currentTarget);
         break;
     }
   },
 
-  _originalEventInPanel: function(aEvent) {
+  _originalEventInPanel(aEvent) {
     let e = aEvent.sourceEvent;
     if (!e) {
       return false;
     }
     let node = this._getPanelForNode(e.target);
     if (!node) {
       return false;
     }
     let win = e.view;
     let panels = gPanelsForWindow.get(win);
     return !!panels && panels.has(node);
   },
 
-  isSpecialWidget: function(aId) {
+  isSpecialWidget(aId) {
     return (aId.startsWith(kSpecialWidgetPfx) ||
             aId.startsWith("separator") ||
             aId.startsWith("spring") ||
             aId.startsWith("spacer"));
   },
 
-  ensureSpecialWidgetId: function(aId) {
+  ensureSpecialWidgetId(aId) {
     let nodeType = aId.match(/spring|spacer|separator/)[0];
     // If the ID we were passed isn't a generated one, generate one now:
     if (nodeType == aId) {
       // Ids are differentiated through a unique count suffix.
       return kSpecialWidgetPfx + aId + (++gNewElementCount);
     }
     return aId;
   },
 
-  createSpecialWidget: function(aId, aDocument) {
+  createSpecialWidget(aId, aDocument) {
     let nodeName = "toolbar" + aId.match(/spring|spacer|separator/)[0];
     let node = aDocument.createElementNS(kNSXUL, nodeName);
     node.id = this.ensureSpecialWidgetId(aId);
     if (nodeName == "toolbarspring") {
       node.flex = 1;
     }
     return node;
   },
 
   /* Find a XUL-provided widget in a window. Don't try to use this
    * for an API-provided widget or a special widget.
    */
-  findWidgetInWindow: function(aId, aWindow) {
+  findWidgetInWindow(aId, aWindow) {
     if (!gBuildWindows.has(aWindow)) {
       throw new Error("Build window not registered");
     }
 
     if (!aId) {
       log.error("findWidgetInWindow was passed an empty string.");
       return null;
     }
@@ -1317,17 +1317,17 @@ var CustomizableUIInternal = {
           }
           return element;
         }
       }
     }
     return null;
   },
 
-  buildWidget: function(aDocument, aWidget) {
+  buildWidget(aDocument, aWidget) {
     if (aDocument.documentURI != kExpectedWindowURL) {
       throw new Error("buildWidget was called for a non-browser window!");
     }
     if (typeof aWidget == "string") {
       aWidget = gPalette.get(aWidget);
     }
     if (!aWidget) {
       throw new Error("buildWidget was passed a non-widget to build.");
@@ -1412,17 +1412,17 @@ var CustomizableUIInternal = {
         aWidget.onCreated(node);
       }
     }
 
     aWidget.instances.set(aDocument, node);
     return node;
   },
 
-  getLocalizedProperty: function(aWidget, aProp, aFormatArgs, aDef) {
+  getLocalizedProperty(aWidget, aProp, aFormatArgs, aDef) {
     const kReqStringProps = ["label"];
 
     if (typeof aWidget == "string") {
       aWidget = gPalette.get(aWidget);
     }
     if (!aWidget) {
       throw new Error("getLocalizedProperty was passed a non-widget to work with.");
     }
@@ -1451,17 +1451,17 @@ var CustomizableUIInternal = {
       // value rather than a missing property.
       if (!def && (name != "" || kReqStringProps.includes(aProp))) {
         log.error("Could not localize property '" + name + "'.");
       }
     }
     return def;
   },
 
-  addShortcut: function(aShortcutNode, aTargetNode = aShortcutNode) {
+  addShortcut(aShortcutNode, aTargetNode = aShortcutNode) {
     // Detect if we've already been here before.
     if (aTargetNode.hasAttribute("shortcut"))
       return;
 
     let document = aShortcutNode.ownerDocument;
     let shortcutId = aShortcutNode.getAttribute("key");
     let shortcut;
     if (shortcutId) {
@@ -1473,17 +1473,17 @@ var CustomizableUIInternal = {
     }
     if (!shortcut) {
       return;
     }
 
     aTargetNode.setAttribute("shortcut", ShortcutUtils.prettifyShortcut(shortcut));
   },
 
-  handleWidgetCommand: function(aWidget, aNode, aEvent) {
+  handleWidgetCommand(aWidget, aNode, aEvent) {
     log.debug("handleWidgetCommand");
 
     if (aWidget.type == "button") {
       if (aWidget.onCommand) {
         try {
           aWidget.onCommand.call(null, aEvent);
         } catch (e) {
           log.error(e);
@@ -1504,44 +1504,44 @@ var CustomizableUIInternal = {
           this.hidePanelForNode(aNode);
           anchor = wrapper.anchor;
         }
       }
       ownerWindow.PanelUI.showSubView(aWidget.viewId, anchor, area);
     }
   },
 
-  handleWidgetClick: function(aWidget, aNode, aEvent) {
+  handleWidgetClick(aWidget, aNode, aEvent) {
     log.debug("handleWidgetClick");
     if (aWidget.onClick) {
       try {
         aWidget.onClick.call(null, aEvent);
       } catch (e) {
         Cu.reportError(e);
       }
     } else {
       // XXXunf Need to think this through more, and formalize.
       Services.obs.notifyObservers(aNode, "customizedui-widget-click", aWidget.id);
     }
   },
 
-  _getPanelForNode: function(aNode) {
+  _getPanelForNode(aNode) {
     let panel = aNode;
     while (panel && panel.localName != "panel")
       panel = panel.parentNode;
     return panel;
   },
 
   /*
    * If people put things in the panel which need more than single-click interaction,
    * we don't want to close it. Right now we check for text inputs and menu buttons.
    * We also check for being outside of any toolbaritem/toolbarbutton, ie on a blank
    * part of the menu.
    */
-  _isOnInteractiveElement: function(aEvent) {
+  _isOnInteractiveElement(aEvent) {
     function getMenuPopupForDescendant(aNode) {
       let lastPopup = null;
       while (aNode && aNode.parentNode &&
              aNode.parentNode.localName.startsWith("menu")) {
         lastPopup = aNode.localName == "menupopup" ? aNode : lastPopup;
         aNode = aNode.parentNode;
       }
       return lastPopup;
@@ -1647,24 +1647,24 @@ var CustomizableUIInternal = {
       }
       // otherwise, this is the outer button, and the user will now
       // interact with the menu:
       return true;
     }
     return inInput || !inItem;
   },
 
-  hidePanelForNode: function(aNode) {
+  hidePanelForNode(aNode) {
     let panel = this._getPanelForNode(aNode);
     if (panel) {
       panel.hidePopup();
     }
   },
 
-  maybeAutoHidePanel: function(aEvent) {
+  maybeAutoHidePanel(aEvent) {
     if (aEvent.type == "keypress") {
       if (aEvent.keyCode != aEvent.DOM_VK_RETURN) {
         return;
       }
       // If the user hit enter/return, we don't check preventDefault - it makes sense
       // that this was prevented, but we probably still want to close the panel.
       // If consumers don't want this to happen, they should specify the closemenu
       // attribute.
@@ -1709,17 +1709,17 @@ var CustomizableUIInternal = {
         return;
       }
     }
 
     // If we get here, we can actually hide the popup:
     this.hidePanelForNode(aEvent.target);
   },
 
-  getUnusedWidgets: function(aWindowPalette) {
+  getUnusedWidgets(aWindowPalette) {
     let window = aWindowPalette.ownerGlobal;
     let isWindowPrivate = PrivateBrowsingUtils.isWindowPrivate(window);
     // We use a Set because there can be overlap between the widgets in
     // gPalette and the items in the palette, especially after the first
     // customization, since programmatically generated widgets will remain
     // in the toolbox palette.
     let widgets = new Set();
 
@@ -1740,50 +1740,50 @@ var CustomizableUIInternal = {
       if (node.id && !this.getPlacementOfWidget(node.id)) {
         widgets.add(node.id);
       }
     }
 
     return [...widgets];
   },
 
-  getPlacementOfWidget: function(aWidgetId, aOnlyRegistered, aDeadAreas) {
+  getPlacementOfWidget(aWidgetId, aOnlyRegistered, aDeadAreas) {
     if (aOnlyRegistered && !this.widgetExists(aWidgetId)) {
       return null;
     }
 
     for (let [area, placements] of gPlacements) {
       if (!gAreas.has(area) && !aDeadAreas) {
         continue;
       }
       let index = placements.indexOf(aWidgetId);
       if (index != -1) {
-        return { area: area, position: index };
+        return { area, position: index };
       }
     }
 
     return null;
   },
 
-  widgetExists: function(aWidgetId) {
+  widgetExists(aWidgetId) {
     if (gPalette.has(aWidgetId) || this.isSpecialWidget(aWidgetId)) {
       return true;
     }
 
     // Destroyed API widgets are in gSeenWidgets, but not in gPalette:
     if (gSeenWidgets.has(aWidgetId)) {
       return false;
     }
 
     // We're assuming XUL widgets always exist, as it's much harder to check,
     // and checking would be much more error prone.
     return true;
   },
 
-  addWidgetToArea: function(aWidgetId, aArea, aPosition, aInitialAdd) {
+  addWidgetToArea(aWidgetId, aArea, aPosition, aInitialAdd) {
     if (!gAreas.has(aArea)) {
       throw new Error("Unknown customization area: " + aArea);
     }
 
     // Hack: don't want special widgets in the panel (need to check here as well
     // as in canWidgetMoveToArea because the menu panel is lazy):
     if (gAreas.get(aArea).get("type") == CustomizableUI.TYPE_MENU_PANEL &&
         this.isSpecialWidget(aWidgetId)) {
@@ -1847,17 +1847,17 @@ var CustomizableUIInternal = {
     }
 
     gDirty = true;
     this.saveState();
 
     this.notifyListeners("onWidgetAdded", aWidgetId, aArea, aPosition);
   },
 
-  removeWidgetFromArea: function(aWidgetId) {
+  removeWidgetFromArea(aWidgetId) {
     let oldPlacement = this.getPlacementOfWidget(aWidgetId, false, true);
     if (!oldPlacement) {
       return;
     }
 
     if (!this.isWidgetRemovable(aWidgetId)) {
       return;
     }
@@ -1876,17 +1876,17 @@ var CustomizableUIInternal = {
 
     gDirty = true;
     this.saveState();
     gDirtyAreaCache.add(oldPlacement.area);
 
     this.notifyListeners("onWidgetRemoved", aWidgetId, oldPlacement.area);
   },
 
-  moveWidgetWithinArea: function(aWidgetId, aPosition) {
+  moveWidgetWithinArea(aWidgetId, aPosition) {
     let oldPlacement = this.getPlacementOfWidget(aWidgetId);
     if (!oldPlacement) {
       return;
     }
 
     let placements = gPlacements.get(oldPlacement.area);
     if (typeof aPosition != "number") {
       aPosition = placements.length;
@@ -1925,17 +1925,17 @@ var CustomizableUIInternal = {
 
   // Note that this does not populate gPlacements, which is done lazily so that
   // the legacy state can be migrated, which is only available once a browser
   // window is openned.
   // The panel area is an exception here, since it has no legacy state and is
   // built lazily - and therefore wouldn't otherwise result in restoring its
   // state immediately when a browser window opens, which is important for
   // other consumers of this API.
-  loadSavedState: function() {
+  loadSavedState() {
     let state = null;
     try {
       state = Services.prefs.getCharPref(kPrefCustomizationState);
     } catch (e) {
       log.debug("No saved state found");
       // This will fail if nothing has been customized, so silently fall back to
       // the defaults.
     }
@@ -1962,17 +1962,17 @@ var CustomizableUIInternal = {
       gSavedState.currentVersion = 0;
     }
 
     gSeenWidgets = new Set(gSavedState.seen || []);
     gDirtyAreaCache = new Set(gSavedState.dirtyAreaCache || []);
     gNewElementCount = gSavedState.newElementCount || 0;
   },
 
-  restoreStateForArea: function(aArea, aLegacyState) {
+  restoreStateForArea(aArea, aLegacyState) {
     let placementsPreexisted = gPlacements.has(aArea);
 
     this.beginBatchUpdate();
     try {
       gRestoring = true;
 
       let restored = false;
       if (placementsPreexisted) {
@@ -2026,17 +2026,17 @@ var CustomizableUIInternal = {
       log.debug("Placements for " + aArea + ":\n\t" + gPlacements.get(aArea).join("\n\t"));
 
       gRestoring = false;
     } finally {
       this.endBatchUpdate();
     }
   },
 
-  saveState: function() {
+  saveState() {
     if (gInBatchStack || !gDirty) {
       return;
     }
     // Clone because we want to modify this map:
     let state = { placements: new Map(gPlacements),
                   seen: gSeenWidgets,
                   dirtyAreaCache: gDirtyAreaCache,
                   currentVersion: kVersion,
@@ -2056,95 +2056,95 @@ var CustomizableUIInternal = {
 
     log.debug("Saving state.");
     let serialized = JSON.stringify(state, this.serializerHelper);
     log.debug("State saved as: " + serialized);
     Services.prefs.setCharPref(kPrefCustomizationState, serialized);
     gDirty = false;
   },
 
-  serializerHelper: function(aKey, aValue) {
+  serializerHelper(aKey, aValue) {
     if (typeof aValue == "object" && aValue.constructor.name == "Map") {
       let result = {};
       for (let [mapKey, mapValue] of aValue)
         result[mapKey] = mapValue;
       return result;
     }
 
     if (typeof aValue == "object" && aValue.constructor.name == "Set") {
       return [...aValue];
     }
 
     return aValue;
   },
 
-  beginBatchUpdate: function() {
+  beginBatchUpdate() {
     gInBatchStack++;
   },
 
-  endBatchUpdate: function(aForceDirty) {
+  endBatchUpdate(aForceDirty) {
     gInBatchStack--;
     if (aForceDirty === true) {
       gDirty = true;
     }
     if (gInBatchStack == 0) {
       this.saveState();
     } else if (gInBatchStack < 0) {
       throw new Error("The batch editing stack should never reach a negative number.");
     }
   },
 
-  addListener: function(aListener) {
+  addListener(aListener) {
     gListeners.add(aListener);
   },
 
-  removeListener: function(aListener) {
+  removeListener(aListener) {
     if (aListener == this) {
       return;
     }
 
     gListeners.delete(aListener);
   },
 
-  notifyListeners: function(aEvent, ...aArgs) {
+  notifyListeners(aEvent, ...aArgs) {
     if (gRestoring) {
       return;
     }
 
     for (let listener of gListeners) {
       try {
         if (typeof listener[aEvent] == "function") {
           listener[aEvent].apply(listener, aArgs);
         }
       } catch (e) {
         log.error(e + " -- " + e.fileName + ":" + e.lineNumber);
       }
     }
   },
 
-  _dispatchToolboxEventToWindow: function(aEventType, aDetails, aWindow) {
+  _dispatchToolboxEventToWindow(aEventType, aDetails, aWindow) {
     let evt = new aWindow.CustomEvent(aEventType, {
       bubbles: true,
       cancelable: true,
       detail: aDetails
     });
     aWindow.gNavToolbox.dispatchEvent(evt);
   },
 
-  dispatchToolboxEvent: function(aEventType, aDetails = {}, aWindow = null) {
+  dispatchToolboxEvent(aEventType, aDetails = {}, aWindow = null) {
     if (aWindow) {
       this._dispatchToolboxEventToWindow(aEventType, aDetails, aWindow);
       return;
     }
     for (let [win, ] of gBuildWindows) {
       this._dispatchToolboxEventToWindow(aEventType, aDetails, win);
     }
   },
 
-  createWidget: function(aProperties) {
+  createWidget(aProperties) {
     let widget = this.normalizeWidget(aProperties, CustomizableUI.SOURCE_EXTERNAL);
     // XXXunf This should probably throw.
     if (!widget) {
       log.error("unable to normalize widget");
       return undefined;
     }
 
     gPalette.set(widget.id, widget);
@@ -2251,17 +2251,17 @@ var CustomizableUIInternal = {
       gSeenWidgets.add(widget.id);
       this.endBatchUpdate(true);
     }
 
     this.notifyListeners("onWidgetAfterCreation", widget.id, widget.currentArea);
     return widget.id;
   },
 
-  createBuiltinWidget: function(aData) {
+  createBuiltinWidget(aData) {
     // This should only ever be called on startup, before any windows are
     // opened - so we know there's no build areas to handle. Also, builtin
     // widgets are expected to be (mostly) static, so shouldn't affect the
     // current placement settings.
 
     // This allows a widget to be both built-in by default but also able to be
     // destroyed and removed from the area based on criteria that may not be
     // available when the widget is created -- for example, because some other
@@ -2286,25 +2286,25 @@ var CustomizableUIInternal = {
         }
       }, err => {
         Cu.reportError(err);
       });
     }
   },
 
   // Returns true if the area will eventually lazily restore (but hasn't yet).
-  isAreaLazy: function(aArea) {
+  isAreaLazy(aArea) {
     if (gPlacements.has(aArea)) {
       return false;
     }
     return gAreas.get(aArea).has("legacy");
   },
 
   // XXXunf Log some warnings here, when the data provided isn't up to scratch.
-  normalizeWidget: function(aData, aSource) {
+  normalizeWidget(aData, aSource) {
     let widget = {
       implementation: aData,
       source: aSource || CustomizableUI.SOURCE_EXTERNAL,
       instances: new Map(),
       currentArea: null,
       removable: true,
       overflows: true,
       defaultArea: null,
@@ -2395,17 +2395,17 @@ var CustomizableUIInternal = {
 
     if (gPalette.has(widget.id)) {
       return null;
     }
 
     return widget;
   },
 
-  wrapWidgetEventHandler: function(aEventName, aWidget) {
+  wrapWidgetEventHandler(aEventName, aWidget) {
     if (typeof aWidget.implementation[aEventName] != "function") {
       aWidget[aEventName] = null;
       return;
     }
     aWidget[aEventName] = function(...aArgs) {
       // Wrap inside a try...catch to properly log errors, until bug 862627 is
       // fixed, which in turn might help bug 503244.
       try {
@@ -2417,17 +2417,17 @@ var CustomizableUIInternal = {
                                                         aArgs);
       } catch (e) {
         Cu.reportError(e);
         return undefined;
       }
     };
   },
 
-  destroyWidget: function(aWidgetId) {
+  destroyWidget(aWidgetId) {
     let widget = gPalette.get(aWidgetId);
     if (!widget) {
       gGroupWrapperCache.delete(aWidgetId);
       for (let [window, ] of gBuildWindows) {
         let windowCache = gSingleWrapperCache.get(window);
         if (windowCache) {
           windowCache.delete(aWidgetId);
         }
@@ -2484,32 +2484,32 @@ var CustomizableUIInternal = {
     }
 
     gPalette.delete(aWidgetId);
     gGroupWrapperCache.delete(aWidgetId);
 
     this.notifyListeners("onWidgetDestroyed", aWidgetId);
   },
 
-  getCustomizeTargetForArea: function(aArea, aWindow) {
+  getCustomizeTargetForArea(aArea, aWindow) {
     let buildAreaNodes = gBuildAreas.get(aArea);
     if (!buildAreaNodes) {
       return null;
     }
 
     for (let node of buildAreaNodes) {
       if (node.ownerGlobal == aWindow) {
         return node.customizationTarget ? node.customizationTarget : node;
       }
     }
 
     return null;
   },
 
-  reset: function() {
+  reset() {
     gResetting = true;
     this._resetUIState();
 
     // Rebuild each registered area (across windows) to reflect the state that
     // was reset above.
     this._rebuildRegisteredAreas();
 
     for (let [widgetId, widget] of gPalette) {
@@ -2519,17 +2519,17 @@ var CustomizableUIInternal = {
     }
     if (gSeenWidgets.size) {
       gDirty = true;
     }
 
     gResetting = false;
   },
 
-  _resetUIState: function() {
+  _resetUIState() {
     try {
       gUIStateBeforeReset.drawInTitlebar = Services.prefs.getBoolPref(kPrefDrawInTitlebar);
       gUIStateBeforeReset.uiCustomizationState = Services.prefs.getCharPref(kPrefCustomizationState);
       gUIStateBeforeReset.currentTheme = LightweightThemeManager.currentTheme;
     } catch (e) { }
 
     this._resetExtraToolbars();
 
@@ -2545,17 +2545,17 @@ var CustomizableUIInternal = {
     // Clear the saved state to ensure that defaults will be used.
     gSavedState = null;
     // Restore the state for each area to its defaults
     for (let [areaId, ] of gAreas) {
       this.restoreStateForArea(areaId);
     }
   },
 
-  _resetExtraToolbars: function(aFilter = null) {
+  _resetExtraToolbars(aFilter = null) {
     let firstWindow = true; // Only need to unregister and persist once
     for (let [win, ] of gBuildWindows) {
       let toolbox = win.gNavToolbox;
       for (let child of toolbox.children) {
         let matchesFilter = !aFilter || aFilter == child.id;
         if (child.hasAttribute("customindex") && matchesFilter) {
           let toolbarId = "toolbar" + child.getAttribute("customindex");
           toolbox.toolbarset.removeAttribute(toolbarId);
@@ -2567,17 +2567,17 @@ var CustomizableUIInternal = {
           }
           child.remove();
         }
       }
       firstWindow = false;
     }
   },
 
-  _rebuildRegisteredAreas: function() {
+  _rebuildRegisteredAreas() {
     for (let [areaId, areaNodes] of gBuildAreas) {
       let placements = gPlacements.get(areaId);
       let isFirstChangedToolbar = true;
       for (let areaNode of areaNodes) {
         this.buildArea(areaId, placements, areaNode);
 
         let area = gAreas.get(areaId);
         if (area.get("type") == CustomizableUI.TYPE_TOOLBAR) {
@@ -2590,17 +2590,17 @@ var CustomizableUIInternal = {
         isFirstChangedToolbar = false;
       }
     }
   },
 
   /**
    * Undoes a previous reset, restoring the state of the UI to the state prior to the reset.
    */
-  undoReset: function() {
+  undoReset() {
     if (gUIStateBeforeReset.uiCustomizationState == null ||
         gUIStateBeforeReset.drawInTitlebar == null) {
       return;
     }
     gUndoResetting = true;
 
     let uiCustomizationState = gUIStateBeforeReset.uiCustomizationState;
     let drawInTitlebar = gUIStateBeforeReset.drawInTitlebar;
@@ -2622,31 +2622,31 @@ var CustomizableUIInternal = {
         gPlacements.set(areaId, placements);
       }
       this._rebuildRegisteredAreas();
     }
 
     gUndoResetting = false;
   },
 
-  _clearPreviousUIState: function() {
+  _clearPreviousUIState() {
     Object.getOwnPropertyNames(gUIStateBeforeReset).forEach((prop) => {
       gUIStateBeforeReset[prop] = null;
     });
   },
 
-  removeExtraToolbar: function(aToolbarId) {
+  removeExtraToolbar(aToolbarId) {
     this._resetExtraToolbars(aToolbarId);
   },
 
   /**
    * @param {String|Node} aWidget - widget ID or a widget node (preferred for performance).
    * @return {Boolean} whether the widget is removable
    */
-  isWidgetRemovable: function(aWidget) {
+  isWidgetRemovable(aWidget) {
     let widgetId;
     let widgetNode;
     if (typeof aWidget == "string") {
       widgetId = aWidget;
     } else {
       widgetId = aWidget.id;
       widgetNode = aWidget;
     }
@@ -2679,32 +2679,32 @@ var CustomizableUIInternal = {
 
     // Otherwise this is either a special widget, which is always removable, or
     // an API widget which has already been removed from gPalette. Returning true
     // here allows us to then remove its ID from any placements where it might
     // still occur.
     return true;
   },
 
-  canWidgetMoveToArea: function(aWidgetId, aArea) {
+  canWidgetMoveToArea(aWidgetId, aArea) {
     let placement = this.getPlacementOfWidget(aWidgetId);
     if (placement && placement.area != aArea) {
       // Special widgets can't move to the menu panel.
       if (this.isSpecialWidget(aWidgetId) && gAreas.has(aArea) &&
           gAreas.get(aArea).get("type") == CustomizableUI.TYPE_MENU_PANEL) {
         return false;
       }
       // For everything else, just return whether the widget is removable.
       return this.isWidgetRemovable(aWidgetId);
     }
 
     return true;
   },
 
-  ensureWidgetPlacedInWindow: function(aWidgetId, aWindow) {
+  ensureWidgetPlacedInWindow(aWidgetId, aWindow) {
     let placement = this.getPlacementOfWidget(aWidgetId);
     if (!placement) {
       return false;
     }
     let areaNodes = gBuildAreas.get(placement.area);
     if (!areaNodes) {
       return false;
     }
@@ -2794,17 +2794,17 @@ var CustomizableUIInternal = {
     if (LightweightThemeManager.currentTheme) {
       log.debug(LightweightThemeManager.currentTheme + " theme is non-default");
       return false;
     }
 
     return true;
   },
 
-  setToolbarVisibility: function(aToolbarId, aIsVisible) {
+  setToolbarVisibility(aToolbarId, aIsVisible) {
     // We only persist the attribute the first time.
     let isFirstChangedToolbar = true;
     for (let window of CustomizableUI.windows) {
       let toolbar = window.document.getElementById(aToolbarId);
       if (toolbar) {
         window.setToolbarVisibility(toolbar, aIsVisible, isFirstChangedToolbar);
         isFirstChangedToolbar = false;
       }
@@ -2998,24 +2998,24 @@ this.CustomizableUI = {
    *     is often when the window has opened, but in the case of add-ons,
    *     could fire when the node has just been registered with CustomizableUI
    *     after an add-on update or disable/enable sequence.
    *   - onAreaNodeUnregistered(aArea, aContainer, aReason)
    *     Fired when an area node is explicitly unregistered by an API caller,
    *     or by a window closing. The aReason parameter indicates which of
    *     these is the case.
    */
-  addListener: function(aListener) {
+  addListener(aListener) {
     CustomizableUIInternal.addListener(aListener);
   },
   /**
    * Remove a listener added with addListener
    * @param aListener the listener object to remove
    */
-  removeListener: function(aListener) {
+  removeListener(aListener) {
     CustomizableUIInternal.removeListener(aListener);
   },
 
   /**
    * Register a customizable area with CustomizableUI.
    * @param aName   the name of the area to register. Can only contain
    *                alphanumeric characters, dashes (-) and underscores (_).
    * @param aProps  the properties of the area. The following properties are
@@ -3031,17 +3031,17 @@ this.CustomizableUI = {
    *                                effect for toolbars.
    *                - defaultPlacements: an array of widget IDs making up the
    *                                     default contents of the area
    *                - defaultCollapsed: (INTERNAL ONLY) applies if the type is TYPE_TOOLBAR, specifies
    *                                    if toolbar is collapsed by default (default to true).
    *                                    Specify null to ensure that reset/inDefaultArea don't care
    *                                    about a toolbar's collapsed state
    */
-  registerArea: function(aName, aProperties) {
+  registerArea(aName, aProperties) {
     CustomizableUIInternal.registerArea(aName, aProperties);
   },
   /**
    * Register a concrete node for a registered area. This method is automatically
    * called from any toolbar in the main browser window that has its
    * "customizable" attribute set to true. There should normally be no need to
    * call it yourself.
    *
@@ -3050,25 +3050,25 @@ this.CustomizableUI = {
    * will happen when they're added to the DOM and are not hidden). If you
    * don't, and your toolbar has a defaultset attribute, CustomizableUI will
    * register it automatically. If your toolbar does not have a defaultset
    * attribute, the node will be saved for processing when you call
    * registerArea. Note that CustomizableUI won't restore state in the area,
    * allow the user to customize it in customize mode, or otherwise deal
    * with it, until the area has been registered.
    */
-  registerToolbarNode: function(aToolbar, aExistingChildren) {
+  registerToolbarNode(aToolbar, aExistingChildren) {
     CustomizableUIInternal.registerToolbarNode(aToolbar, aExistingChildren);
   },
   /**
    * Register the menu panel node. This method should not be called by anyone
    * apart from the built-in PanelUI.
    * @param aPanel the panel DOM node being registered.
    */
-  registerMenuPanel: function(aPanel) {
+  registerMenuPanel(aPanel) {
     CustomizableUIInternal.registerMenuPanel(aPanel);
   },
   /**
    * Unregister a customizable area. The inverse of registerArea.
    *
    * Unregistering an area will remove all the (removable) widgets in the
    * area, which will return to the panel, and destroy all other traces
    * of the area within CustomizableUI. Note that this means the *contents*
@@ -3082,17 +3082,17 @@ this.CustomizableUI = {
    *
    * You can override this last behaviour (and destroy the placements
    * information in the saved state) by passing true for aDestroyPlacements.
    *
    * @param aName              the name of the area to unregister
    * @param aDestroyPlacements whether to destroy the placements information
    *                           for the area, too.
    */
-  unregisterArea: function(aName, aDestroyPlacements) {
+  unregisterArea(aName, aDestroyPlacements) {
     CustomizableUIInternal.unregisterArea(aName, aDestroyPlacements);
   },
   /**
    * Add a widget to an area.
    * If the area to which you try to add is not known to CustomizableUI,
    * this will throw.
    * If the area to which you try to add has not yet been restored from its
    * legacy state, this will postpone the addition.
@@ -3107,29 +3107,29 @@ this.CustomizableUI = {
    * for each window CustomizableUI knows about.
    *
    * @param aWidgetId the ID of the widget to add
    * @param aArea     the ID of the area to add the widget to
    * @param aPosition the position at which to add the widget. If you do not
    *                  pass a position, the widget will be added to the end
    *                  of the area.
    */
-  addWidgetToArea: function(aWidgetId, aArea, aPosition) {
+  addWidgetToArea(aWidgetId, aArea, aPosition) {
     CustomizableUIInternal.addWidgetToArea(aWidgetId, aArea, aPosition);
   },
   /**
    * Remove a widget from its area. If the widget cannot be removed from its
    * area, or is not in any area, this will no-op. Otherwise, this will fire an
    * onWidgetRemoved notification, and an onWidgetBeforeDOMChange and
    * onWidgetAfterDOMChange notification for each window CustomizableUI knows
    * about.
    *
    * @param aWidgetId the ID of the widget to remove
    */
-  removeWidgetFromArea: function(aWidgetId) {
+  removeWidgetFromArea(aWidgetId) {
     CustomizableUIInternal.removeWidgetFromArea(aWidgetId);
   },
   /**
    * Move a widget within an area.
    * If the widget is not in any area, this will no-op.
    * If the widget is already at the indicated position, this will no-op.
    *
    * Otherwise, this will move the widget and fire an onWidgetMoved notification,
@@ -3137,17 +3137,17 @@ this.CustomizableUI = {
    * each window CustomizableUI knows about.
    *
    * @param aWidgetId the ID of the widget to move
    * @param aPosition the position to move the widget to.
    *                  Negative values or values greater than the number of
    *                  widgets will be interpreted to mean moving the widget to
    *                  respectively the first or last position.
    */
-  moveWidgetWithinArea: function(aWidgetId, aPosition) {
+  moveWidgetWithinArea(aWidgetId, aPosition) {
     CustomizableUIInternal.moveWidgetWithinArea(aWidgetId, aPosition);
   },
   /**
    * Ensure a XUL-based widget created in a window after areas were
    * initialized moves to its correct position.
    * This is roughly equivalent to manually looking up the position and using
    * insertItem in the old API, but a lot less work for consumers.
    * Always prefer this over using toolbar.insertItem (which might no-op
@@ -3156,47 +3156,47 @@ this.CustomizableUI = {
    *
    * @param aWidgetId the ID of the widget that was just created
    * @param aWindow the window in which you want to ensure it was added.
    *
    * NB: why is this API per-window, you wonder? Because if you need this,
    * presumably you yourself need to create the widget in all the windows
    * and need to loop through them anyway.
    */
-  ensureWidgetPlacedInWindow: function(aWidgetId, aWindow) {
+  ensureWidgetPlacedInWindow(aWidgetId, aWindow) {
     return CustomizableUIInternal.ensureWidgetPlacedInWindow(aWidgetId, aWindow);
   },
   /**
    * Start a batch update of items.
    * During a batch update, the customization state is not saved to the user's
    * preferences file, in order to reduce (possibly sync) IO.
    * Calls to begin/endBatchUpdate may be nested.
    *
    * Callers should ensure that NO MATTER WHAT they call endBatchUpdate once
    * for each call to beginBatchUpdate, even if there are exceptions in the
    * code in the batch update. Otherwise, for the duration of the
    * Firefox session, customization state is never saved. Typically, you
    * would do this using a try...finally block.
    */
-  beginBatchUpdate: function() {
+  beginBatchUpdate() {
     CustomizableUIInternal.beginBatchUpdate();
   },
   /**
    * End a batch update. See the documentation for beginBatchUpdate above.
    *
    * State is not saved if we believe it is identical to the last known
    * saved state. State is only ever saved when all batch updates have
    * finished (ie there has been 1 endBatchUpdate call for each
    * beginBatchUpdate call). If any of the endBatchUpdate calls pass
    * aForceDirty=true, we will flush to the prefs file.
    *
    * @param aForceDirty force CustomizableUI to flush to the prefs file when
    *                    all batch updates have finished.
    */
-  endBatchUpdate: function(aForceDirty) {
+  endBatchUpdate(aForceDirty) {
     CustomizableUIInternal.endBatchUpdate(aForceDirty);
   },
   /**
    * Create a widget.
    *
    * To create a widget, you should pass an object with its desired
    * properties. The following properties are supported:
    *
@@ -3262,33 +3262,33 @@ this.CustomizableUI = {
    *                  customizableWidgets.properties). If you're in an add-on,
    *                  you should not set this property.
    * - showInPrivateBrowsing: whether to show the widget in private browsing
    *                          mode (optional, default: true)
    *
    * @param aProperties the specifications for the widget.
    * @return a wrapper around the created widget (see getWidget)
    */
-  createWidget: function(aProperties) {
+  createWidget(aProperties) {
     return CustomizableUIInternal.wrapWidget(
       CustomizableUIInternal.createWidget(aProperties)
     );
   },
   /**
    * Destroy a widget
    *
    * If the widget is part of the default placements in an area, this will
    * remove it from there. It will also remove any DOM instances. However,
    * it will keep the widget in the placements for whatever area it was
    * in at the time. You can remove it from there yourself by calling
    * CustomizableUI.removeWidgetFromArea(aWidgetId).
    *
    * @param aWidgetId the ID of the widget to destroy
    */
-  destroyWidget: function(aWidgetId) {
+  destroyWidget(aWidgetId) {
     CustomizableUIInternal.destroyWidget(aWidgetId);
   },
   /**
    * Get a wrapper object with information about the widget.
    * The object provides the following properties
    * (all read-only unless otherwise indicated):
    *
    * - id:            the widget's ID;
@@ -3341,51 +3341,51 @@ this.CustomizableUI = {
    *                  instead.
    *
    * @param aWidgetId the ID of the widget whose information you need
    * @return a wrapper around the widget as described above, or null if the
    *         widget is known not to exist (anymore). NB: non-null return
    *         is no guarantee the widget exists because we cannot know in
    *         advance if a XUL widget exists or not.
    */
-  getWidget: function(aWidgetId) {
+  getWidget(aWidgetId) {
     return CustomizableUIInternal.wrapWidget(aWidgetId);
   },
   /**
    * Get an array of widget wrappers (see getWidget) for all the widgets
    * which are currently not in any area (so which are in the palette).
    *
    * @param aWindowPalette the palette (and by extension, the window) in which
    *                       CustomizableUI should look. This matters because of
    *                       course XUL-provided widgets could be available in
    *                       some windows but not others, and likewise
    *                       API-provided widgets might not exist in a private
    *                       window (because of the showInPrivateBrowsing
    *                       property).
    *
    * @return an array of widget wrappers (see getWidget)
    */
-  getUnusedWidgets: function(aWindowPalette) {
+  getUnusedWidgets(aWindowPalette) {
     return CustomizableUIInternal.getUnusedWidgets(aWindowPalette).map(
       CustomizableUIInternal.wrapWidget,
       CustomizableUIInternal
     );
   },
   /**
    * Get an array of all the widget IDs placed in an area. This is roughly
    * equivalent to fetching the currentset attribute and splitting by commas
    * in the legacy APIs. Modifying the array will not affect CustomizableUI.
    *
    * @param aArea the ID of the area whose placements you want to obtain.
    * @return an array containing the widget IDs that are in the area.
    *
    * NB: will throw if called too early (before placements have been fetched)
    *     or if the area is not currently known to CustomizableUI.
    */
-  getWidgetIdsInArea: function(aArea) {
+  getWidgetIdsInArea(aArea) {
     if (!gAreas.has(aArea)) {
       throw new Error("Unknown customization area: " + aArea);
     }
     if (!gPlacements.has(aArea)) {
       throw new Error("Area not yet restored");
     }
 
     // We need to clone this, as we don't want to let consumers muck with placements
@@ -3401,17 +3401,17 @@ this.CustomizableUI = {
    *
    * @param aArea the ID of the area whose widgets you want to obtain.
    * @return an array of widget wrappers and/or null values for the widget IDs
    *         placed in an area.
    *
    * NB: will throw if called too early (before placements have been fetched)
    *     or if the area is not currently known to CustomizableUI.
    */
-  getWidgetsInArea: function(aArea) {
+  getWidgetsInArea(aArea) {
     return this.getWidgetIdsInArea(aArea).map(
       CustomizableUIInternal.wrapWidget,
       CustomizableUIInternal
     );
   },
   /**
    * Obtain an array of all the area IDs known to CustomizableUI.
    * This array is created for you, so is modifiable without CustomizableUI
@@ -3425,28 +3425,28 @@ this.CustomizableUI = {
    * useful if you have a widget that needs to behave differently depending
    * on its location. Note that widget wrappers have a convenience getter
    * property (areaType) for this purpose.
    *
    * @param aArea the ID of the area whose type you want to know
    * @return TYPE_TOOLBAR or TYPE_MENU_PANEL depending on the area, null if
    *         the area is unknown.
    */
-  getAreaType: function(aArea) {
+  getAreaType(aArea) {
     let area = gAreas.get(aArea);
     return area ? area.get("type") : null;
   },
   /**
    * Check if a toolbar is collapsed by default.
    *
    * @param aArea the ID of the area whose default-collapsed state you want to know.
    * @return `true` or `false` depending on the area, null if the area is unknown,
    *         or its collapsed state cannot normally be controlled by the user
    */
-  isToolbarDefaultCollapsed: function(aArea) {
+  isToolbarDefaultCollapsed(aArea) {
     let area = gAreas.get(aArea);
     return area ? area.get("defaultCollapsed") : null;
   },
   /**
    * Obtain the DOM node that is the customize target for an area in a
    * specific window.
    *
    * Areas can have a customization target that does not correspond to the
@@ -3464,46 +3464,46 @@ this.CustomizableUI = {
    * node, your DOM node might not be a direct child of the customize target
    * in a window if, for instance, the window is in customization mode, or if
    * this is an overflowable toolbar and the widget has been overflowed.
    *
    * @param aArea   the ID of the area whose customize target you want to have
    * @param aWindow the window where you want to fetch the DOM node.
    * @return the customize target DOM node for aArea in aWindow
    */
-  getCustomizeTargetForArea: function(aArea, aWindow) {
+  getCustomizeTargetForArea(aArea, aWindow) {
     return CustomizableUIInternal.getCustomizeTargetForArea(aArea, aWindow);
   },
   /**
    * Reset the customization state back to its default.
    *
    * This is the nuclear option. You should never call this except if the user
    * explicitly requests it. Firefox does this when the user clicks the
    * "Restore Defaults" button in customize mode.
    */
-  reset: function() {
+  reset() {
     CustomizableUIInternal.reset();
   },
 
   /**
    * Undo the previous reset, can only be called immediately after a reset.
    * @return a promise that will be resolved when the operation is complete.
    */
-  undoReset: function() {
+  undoReset() {
     CustomizableUIInternal.undoReset();
   },
 
   /**
    * Remove a custom toolbar added in a previous version of Firefox or using
    * an add-on. NB: only works on the customizable toolbars generated by
    * the toolbox itself. Intended for use from CustomizeMode, not by
    * other consumers.
    * @param aToolbarId the ID of the toolbar to remove
    */
-  removeExtraToolbar: function(aToolbarId) {
+  removeExtraToolbar(aToolbarId) {
     CustomizableUIInternal.removeExtraToolbar(aToolbarId);
   },
 
   /**
    * Can the last Restore Defaults operation be undone.
    *
    * @return A boolean stating whether an undo of the
    *         Restore Defaults can be performed.
@@ -3527,17 +3527,17 @@ this.CustomizableUI = {
    *     position: 42 // the index in the placements array corresponding to
    *                  // your widget.
    *   }
    *
    *   OR
    *
    *   null // if the widget is not placed anywhere (ie in the palette)
    */
-  getPlacementOfWidget: function(aWidgetId, aOnlyRegistered = true, aDeadAreas = false) {
+  getPlacementOfWidget(aWidgetId, aOnlyRegistered = true, aDeadAreas = false) {
     return CustomizableUIInternal.getPlacementOfWidget(aWidgetId, aOnlyRegistered, aDeadAreas);
   },
   /**
    * Check if a widget can be removed from the area it's in.
    *
    * Note that if you're wanting to move the widget somewhere, you should
    * generally be checking canWidgetMoveToArea, because that will return
    * true if the widget is already in the area where you want to move it (!).
@@ -3548,30 +3548,30 @@ this.CustomizableUI = {
    *     true. You will be able to move the widget elsewhere. However,
    *     once the user reopens a window, the widget will move back to its
    *     'proper' area automagically.
    *
    * @param aWidgetId a widget ID or DOM node to check
    * @return true if the widget can be removed from its area,
    *          false otherwise.
    */
-  isWidgetRemovable: function(aWidgetId) {
+  isWidgetRemovable(aWidgetId) {
     return CustomizableUIInternal.isWidgetRemovable(aWidgetId);
   },
   /**
    * Check if a widget can be moved to a particular area. Like
    * isWidgetRemovable but better, because it'll return true if the widget
    * is already in the right area.
    *
    * @param aWidgetId the widget ID or DOM node you want to move somewhere
    * @param aArea     the area ID you want to move it to.
    * @return true if this is possible, false if it is not. The same caveats as
    *              for isWidgetRemovable apply, however, if no windows are open.
    */
-  canWidgetMoveToArea: function(aWidgetId, aArea) {
+  canWidgetMoveToArea(aWidgetId, aArea) {
     return CustomizableUIInternal.canWidgetMoveToArea(aWidgetId, aArea);
   },
   /**
    * Whether we're in a default state. Note that non-removable non-default
    * widgets and non-existing widgets are not taken into account in determining
    * whether we're in the default state.
    *
    * NB: this is a property with a getter. The getter is NOT cheap, because
@@ -3582,17 +3582,17 @@ this.CustomizableUI = {
     return CustomizableUIInternal.inDefaultState;
   },
 
   /**
    * Set a toolbar's visibility state in all windows.
    * @param aToolbarId    the toolbar whose visibility should be adjusted
    * @param aIsVisible    whether the toolbar should be visible
    */
-  setToolbarVisibility: function(aToolbarId, aIsVisible) {
+  setToolbarVisibility(aToolbarId, aIsVisible) {
     CustomizableUIInternal.setToolbarVisibility(aToolbarId, aIsVisible);
   },
 
   /**
    * Get a localized property off a (widget?) object.
    *
    * NB: this is unlikely to be useful unless you're in Firefox code, because
    *     this code uses the builtin widget stringbundle, and can't be told
@@ -3609,131 +3609,131 @@ this.CustomizableUI = {
    *                    string in the stringbundle;
    *
    * @return the localized string, or aDef if the string isn't in the bundle.
    *         If no default is provided,
    *           if aProp exists on aWidget, we'll return that,
    *           otherwise we'll return the empty string
    *
    */
-  getLocalizedProperty: function(aWidget, aProp, aFormatArgs, aDef) {
+  getLocalizedProperty(aWidget, aProp, aFormatArgs, aDef) {
     return CustomizableUIInternal.getLocalizedProperty(aWidget, aProp,
       aFormatArgs, aDef);
   },
   /**
    * Utility function to detect, find and set a keyboard shortcut for a menuitem
    * or (toolbar)button.
    *
    * @param aShortcutNode the XUL node where the shortcut will be derived from;
    * @param aTargetNode   (optional) the XUL node on which the `shortcut`
    *                      attribute will be set. If NULL, the shortcut will be
    *                      set on aShortcutNode;
    */
-  addShortcut: function(aShortcutNode, aTargetNode) {
+  addShortcut(aShortcutNode, aTargetNode) {
     return CustomizableUIInternal.addShortcut(aShortcutNode, aTargetNode);
   },
   /**
    * Given a node, walk up to the first panel in its ancestor chain, and
    * close it.
    *
    * @param aNode a node whose panel should be closed;
    */
-  hidePanelForNode: function(aNode) {
+  hidePanelForNode(aNode) {
     CustomizableUIInternal.hidePanelForNode(aNode);
   },
   /**
    * Check if a widget is a "special" widget: a spring, spacer or separator.
    *
    * @param aWidgetId the widget ID to check.
    * @return true if the widget is 'special', false otherwise.
    */
-  isSpecialWidget: function(aWidgetId) {
+  isSpecialWidget(aWidgetId) {
     return CustomizableUIInternal.isSpecialWidget(aWidgetId);
   },
   /**
    * Add listeners to a panel that will close it. For use from the menu panel
    * and overflowable toolbar implementations, unlikely to be useful for
    * consumers.
    *
    * @param aPanel the panel to which listeners should be attached.
    */
-  addPanelCloseListeners: function(aPanel) {
+  addPanelCloseListeners(aPanel) {
     CustomizableUIInternal.addPanelCloseListeners(aPanel);
   },
   /**
    * Remove close listeners that have been added to a panel with
    * addPanelCloseListeners. For use from the menu panel and overflowable
    * toolbar implementations, unlikely to be useful for consumers.
    *
    * @param aPanel the panel from which listeners should be removed.
    */
-  removePanelCloseListeners: function(aPanel) {
+  removePanelCloseListeners(aPanel) {
     CustomizableUIInternal.removePanelCloseListeners(aPanel);
   },
   /**
    * Notify listeners a widget is about to be dragged to an area. For use from
    * Customize Mode only, do not use otherwise.
    *
    * @param aWidgetId the ID of the widget that is being dragged to an area.
    * @param aArea     the ID of the area to which the widget is being dragged.
    */
-  onWidgetDrag: function(aWidgetId, aArea) {
+  onWidgetDrag(aWidgetId, aArea) {
     CustomizableUIInternal.notifyListeners("onWidgetDrag", aWidgetId, aArea);
   },
   /**
    * Notify listeners that a window is entering customize mode. For use from
    * Customize Mode only, do not use otherwise.
    * @param aWindow the window entering customize mode
    */
-  notifyStartCustomizing: function(aWindow) {
+  notifyStartCustomizing(aWindow) {
     CustomizableUIInternal.notifyListeners("onCustomizeStart", aWindow);
   },
   /**
    * Notify listeners that a window is exiting customize mode. For use from
    * Customize Mode only, do not use otherwise.
    * @param aWindow the window exiting customize mode
    */
-  notifyEndCustomizing: function(aWindow) {
+  notifyEndCustomizing(aWindow) {
     CustomizableUIInternal.notifyListeners("onCustomizeEnd", aWindow);
   },
 
   /**
    * Notify toolbox(es) of a particular event. If you don't pass aWindow,
    * all toolboxes will be notified. For use from Customize Mode only,
    * do not use otherwise.
    * @param aEvent the name of the event to send.
    * @param aDetails optional, the details of the event.
    * @param aWindow optional, the window in which to send the event.
    */
-  dispatchToolboxEvent: function(aEvent, aDetails = {}, aWindow = null) {
+  dispatchToolboxEvent(aEvent, aDetails = {}, aWindow = null) {
     CustomizableUIInternal.dispatchToolboxEvent(aEvent, aDetails, aWindow);
   },
 
   /**
    * Check whether an area is overflowable.
    *
    * @param aAreaId the ID of an area to check for overflowable-ness
    * @return true if the area is overflowable, false otherwise.
    */
-  isAreaOverflowable: function(aAreaId) {
+  isAreaOverflowable(aAreaId) {
     let area = gAreas.get(aAreaId);
     return area ? area.get("type") == this.TYPE_TOOLBAR && area.get("overflowable")
                 : false;
   },
   /**
    * Obtain a string indicating the place of an element. This is intended
    * for use from customize mode; You should generally use getPlacementOfWidget
    * instead, which is cheaper because it does not use the DOM.
    *
    * @param aElement the DOM node whose place we need to check
    * @return "toolbar" if the node is in a toolbar, "panel" if it is in the
    *         menu panel, "palette" if it is in the (visible!) customization
    *         palette, undefined otherwise.
    */
-  getPlaceForItem: function(aElement) {
+  getPlaceForItem(aElement) {
     let place;
     let node = aElement;
     while (node && !place) {
       if (node.localName == "toolbar")
         place = "toolbar";
       else if (node.id == CustomizableUI.AREA_PANEL)
         place = "panel";
       else if (node.id == "customization-palette")
@@ -3743,17 +3743,17 @@ this.CustomizableUI = {
     }
     return place;
   },
 
   /**
    * Check if a toolbar is builtin or not.
    * @param aToolbarId the ID of the toolbar you want to check
    */
-  isBuiltinToolbar: function(aToolbarId) {
+  isBuiltinToolbar(aToolbarId) {
     return CustomizableUIInternal._builtinToolbars.has(aToolbarId);
   },
 };
 Object.freeze(this.CustomizableUI);
 Object.freeze(this.CustomizableUI.windows);
 
 /**
  * All external consumers of widgets are really interacting with these wrappers
@@ -4033,25 +4033,25 @@ function OverflowableToolbar(aToolbarNod
     Services.obs.addObserver(this, "browser-delayed-startup-finished", false);
   }
 }
 
 OverflowableToolbar.prototype = {
   initialized: false,
   _forceOnOverflow: false,
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic == "browser-delayed-startup-finished" &&
         aSubject == this._toolbar.ownerGlobal) {
       Services.obs.removeObserver(this, "browser-delayed-startup-finished");
       this.init();
     }
   },
 
-  init: function() {
+  init() {
     let doc = this._toolbar.ownerDocument;
     let window = doc.defaultView;
     window.addEventListener("resize", this);
     window.gNavToolbox.addEventListener("customizationstarting", this);
     window.gNavToolbox.addEventListener("aftercustomization", this);
 
     let chevronId = this._toolbar.getAttribute("overflowbutton");
     this._chevron = doc.getElementById(chevronId);
@@ -4070,17 +4070,17 @@ OverflowableToolbar.prototype = {
     if (this._toolbar.overflowedDuringConstruction) {
       this.onOverflow(this._toolbar.overflowedDuringConstruction);
       this._toolbar.overflowedDuringConstruction = null;
     }
 
     this.initialized = true;
   },
 
-  uninit: function() {
+  uninit() {
     this._toolbar.removeEventListener("overflow", this._toolbar);
     this._toolbar.removeEventListener("underflow", this._toolbar);
     this._toolbar.removeAttribute("overflowable");
 
     if (!this.initialized) {
       Services.obs.removeObserver(this, "browser-delayed-startup-finished");
       return;
     }
@@ -4094,17 +4094,17 @@ OverflowableToolbar.prototype = {
     this._chevron.removeEventListener("command", this);
     this._chevron.removeEventListener("dragover", this);
     this._chevron.removeEventListener("dragend", this);
     this._panel.removeEventListener("popuphiding", this);
     CustomizableUI.removeListener(this);
     CustomizableUIInternal.removePanelCloseListeners(this._panel);
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "aftercustomization":
         this._enable();
         break;
       case "command":
         if (aEvent.target == this._chevron) {
           this._onClickChevron(aEvent);
         } else {
@@ -4123,17 +4123,17 @@ OverflowableToolbar.prototype = {
       case "popuphiding":
         this._onPanelHiding(aEvent);
         break;
       case "resize":
         this._onResize(aEvent);
     }
   },
 
-  show: function() {
+  show() {
     if (this._panel.state == "open") {
       return Promise.resolve();
     }
     return new Promise(resolve => {
       let doc = this._panel.ownerDocument;
       this._panel.hidden = false;
       let contextMenu = doc.getElementById(this._panel.getAttribute("context"));
       gELS.addSystemEventListener(contextMenu, 'command', this, true);
@@ -4146,35 +4146,35 @@ OverflowableToolbar.prototype = {
         this.removeEventListener("popupshown", onPopupShown);
         this.addEventListener("dragover", overflowableToolbarInstance);
         this.addEventListener("dragend", overflowableToolbarInstance);
         resolve();
       });
     });
   },
 
-  _onClickChevron: function(aEvent) {
+  _onClickChevron(aEvent) {
     if (this._chevron.open) {
       this._panel.hidePopup();
       this._chevron.open = false;
     } else {
       this.show();
     }
   },
 
-  _onPanelHiding: function(aEvent) {
+  _onPanelHiding(aEvent) {
     this._chevron.open = false;
     this._panel.removeEventListener("dragover", this);
     this._panel.removeEventListener("dragend", this);
     let doc = aEvent.target.ownerDocument;
     let contextMenu = doc.getElementById(this._panel.getAttribute("context"));
     gELS.removeSystemEventListener(contextMenu, 'command', this, true);
   },
 
-  onOverflow: function(aEvent) {
+  onOverflow(aEvent) {
     // The rangeParent check is here because of bug 1111986 and ensuring that
     // overflow events from the bookmarks toolbar items or similar things that
     // manage their own overflow don't trigger an overflow on the entire toolbar
     if (!this._enabled ||
         (aEvent && aEvent.target != this._toolbar.customizationTarget) ||
         (aEvent && aEvent.rangeParent))
       return;
 
@@ -4197,25 +4197,25 @@ OverflowableToolbar.prototype = {
       }
       child = prevChild;
     }
 
     let win = this._target.ownerGlobal;
     win.UpdateUrlbarSearchSplitterState();
   },
 
-  _onResize: function(aEvent) {
+  _onResize(aEvent) {
     if (!this._lazyResizeHandler) {
       this._lazyResizeHandler = new DeferredTask(this._onLazyResize.bind(this),
                                                  LAZY_RESIZE_INTERVAL_MS);
     }
     this._lazyResizeHandler.arm();
   },
 
-  _moveItemsBackToTheirOrigin: function(shouldMoveAllItems) {
+  _moveItemsBackToTheirOrigin(shouldMoveAllItems) {
     let placements = gPlacements.get(this._toolbar.id);
     while (this._list.firstChild) {
       let child = this._list.firstChild;
       let minSize = this._collapsed.get(child.id);
 
       if (!shouldMoveAllItems &&
           minSize &&
           this._target.clientWidth <= minSize) {
@@ -4251,41 +4251,41 @@ OverflowableToolbar.prototype = {
     win.UpdateUrlbarSearchSplitterState();
 
     if (!this._collapsed.size) {
       this._toolbar.removeAttribute("overflowing");
       CustomizableUI.removeListener(this);
     }
   },
 
-  _onLazyResize: function() {
+  _onLazyResize() {
     if (!this._enabled)
       return;
 
     if (this._target.scrollLeftMin != this._target.scrollLeftMax) {
       this.onOverflow();
     } else {
       this._moveItemsBackToTheirOrigin();
     }
   },
 
-  _disable: function() {
+  _disable() {
     this._enabled = false;
     this._moveItemsBackToTheirOrigin(true);
     if (this._lazyResizeHandler) {
       this._lazyResizeHandler.disarm();
     }
   },
 
-  _enable: function() {
+  _enable() {
     this._enabled = true;
     this.onOverflow();
   },
 
-  onWidgetBeforeDOMChange: function(aNode, aNextNode, aContainer) {
+  onWidgetBeforeDOMChange(aNode, aNextNode, aContainer) {
     if (aContainer != this._target && aContainer != this._list) {
       return;
     }
     // When we (re)move an item, update all the items that come after it in the list
     // with the minsize *of the item before the to-be-removed node*. This way, we
     // ensure that we try to move items back as soon as that's possible.
     if (aNode.parentNode == this._list) {
       let updatedMinSize;
@@ -4298,17 +4298,17 @@ OverflowableToolbar.prototype = {
       let nextItem = aNode.nextSibling;
       while (nextItem) {
         this._collapsed.set(nextItem.id, updatedMinSize);
         nextItem = nextItem.nextSibling;
       }
     }
   },
 
-  onWidgetAfterDOMChange: function(aNode, aNextNode, aContainer) {
+  onWidgetAfterDOMChange(aNode, aNextNode, aContainer) {
     if (aContainer != this._target && aContainer != this._list) {
       return;
     }
 
     let nowInBar = aNode.parentNode == aContainer;
     let nowOverflowed = aNode.parentNode == this._list;
     let wasOverflowed = this._collapsed.has(aNode.id);
 
@@ -4353,17 +4353,17 @@ OverflowableToolbar.prototype = {
       this._collapsed.set(aNode.id, minSize);
     } else {
       // If it's now the first item in the overflow list,
       // maybe we can return it:
       this._moveItemsBackToTheirOrigin();
     }
   },
 
-  findOverflowedInsertionPoints: function(aNode) {
+  findOverflowedInsertionPoints(aNode) {
     let newNodeCanOverflow = aNode.getAttribute("overflows") != "false";
     let areaId = this._toolbar.id;
     let placements = gPlacements.get(areaId);
     let nodeIndex = placements.indexOf(aNode.id);
     let nodeBeforeNewNodeIsOverflown = false;
 
     let loopIndex = -1;
     while (++loopIndex < placements.length) {
@@ -4386,25 +4386,25 @@ OverflowableToolbar.prototype = {
       }
     }
 
     let containerForAppending = (this._collapsed.size && newNodeCanOverflow) ?
                                 this._list : this._target;
     return [containerForAppending, null];
   },
 
-  getContainerFor: function(aNode) {
+  getContainerFor(aNode) {
     if (aNode.getAttribute("overflowedItem") == "true") {
       return this._list;
     }
     return this._target;
   },
 
   _hideTimeoutId: null,
-  _showWithTimeout: function() {
+  _showWithTimeout() {
     this.show().then(function() {
       let window = this._toolbar.ownerGlobal;
       if (this._hideTimeoutId) {
         window.clearTimeout(this._hideTimeoutId);
       }
       this._hideTimeoutId = window.setTimeout(() => {
         if (!this._panel.firstChild.matches(":hover")) {
           this._panel.hidePopup();
--- a/browser/components/customizableui/CustomizableWidgets.jsm
+++ b/browser/components/customizableui/CustomizableWidgets.jsm
@@ -173,17 +173,17 @@ function clearSubview(aSubview) {
 const CustomizableWidgets = [
   {
     id: "history-panelmenu",
     type: "view",
     viewId: "PanelUI-history",
     shortcutId: "key_gotoHistory",
     tooltiptext: "history-panelmenu.tooltiptext2",
     defaultArea: CustomizableUI.AREA_PANEL,
-    onViewShowing: function(aEvent) {
+    onViewShowing(aEvent) {
       // Populate our list of history
       const kMaxResults = 15;
       let doc = aEvent.target.ownerDocument;
       let win = doc.defaultView;
 
       let options = PlacesUtils.history.getNewQueryOptions();
       options.excludeQueries = true;
       options.queryType = options.QUERY_TYPE_HISTORY;
@@ -199,17 +199,17 @@ const CustomizableWidgets = [
 
       // Get all statically placed buttons to supply them with keyboard shortcuts.
       let staticButtons = items.parentNode.getElementsByTagNameNS(kNSXUL, "toolbarbutton");
       for (let i = 0, l = staticButtons.length; i < l; ++i)
         CustomizableUI.addShortcut(staticButtons[i]);
 
       PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                          .asyncExecuteLegacyQueries([query], 1, options, {
-        handleResult: function(aResultSet) {
+        handleResult(aResultSet) {
           let onItemCommand = function(aItemCommandEvent) {
             // Only handle the click event for middle clicks, we're using the command
             // event otherwise.
             if (aItemCommandEvent.type == "click" &&
                 aItemCommandEvent.button != 1) {
               return;
             }
             let item = aItemCommandEvent.target;
@@ -232,20 +232,20 @@ const CustomizableWidgets = [
             if (icon) {
               let iconURL = "moz-anno:favicon:" + icon;
               item.setAttribute("image", iconURL);
             }
             fragment.appendChild(item);
           }
           items.appendChild(fragment);
         },
-        handleError: function(aError) {
+        handleError(aError) {
           log.debug("History view tried to show but had an error: " + aError);
         },
-        handleCompletion: function(aReason) {
+        handleCompletion(aReason) {
           log.debug("History view is being shown!");
         },
       });
 
       let recentlyClosedTabs = doc.getElementById("PanelUI-recentlyClosedTabs");
       while (recentlyClosedTabs.firstChild) {
         recentlyClosedTabs.removeChild(recentlyClosedTabs.firstChild);
       }
@@ -275,30 +275,30 @@ const CustomizableWidgets = [
       separator.hidden = !elementCount;
       while (--elementCount >= 0) {
         let element = windowsFragment.children[elementCount];
         CustomizableUI.addShortcut(element);
         element.classList.add("subviewbutton", "cui-withicon");
       }
       recentlyClosedWindows.appendChild(windowsFragment);
     },
-    onCreated: function(aNode) {
+    onCreated(aNode) {
       // Middle clicking recently closed items won't close the panel - cope:
       let onRecentlyClosedClick = function(aEvent) {
         if (aEvent.button == 1) {
           CustomizableUI.hidePanelForNode(this);
         }
       };
       let doc = aNode.ownerDocument;
       let recentlyClosedTabs = doc.getElementById("PanelUI-recentlyClosedTabs");
       let recentlyClosedWindows = doc.getElementById("PanelUI-recentlyClosedWindows");
       recentlyClosedTabs.addEventListener("click", onRecentlyClosedClick);
       recentlyClosedWindows.addEventListener("click", onRecentlyClosedClick);
     },
-    onViewHiding: function(aEvent) {
+    onViewHiding(aEvent) {
       log.debug("History view is being hidden!");
     }
   }, {
     id: "sync-button",
     label: "remotetabs-panelmenu.label",
     tooltiptext: "remotetabs-panelmenu.tooltiptext2",
     type: "view",
     viewId: "PanelUI-remotetabs",
@@ -461,17 +461,17 @@ const CustomizableWidgets = [
       }
       let message = this._tabsList.getAttribute(messageAttr);
       let doc = this._tabsList.ownerDocument;
       let messageLabel = doc.createElementNS(kNSXUL, "label");
       messageLabel.textContent = message;
       appendTo.appendChild(messageLabel);
       return messageLabel;
     },
-    _appendClient: function(client, attachFragment) {
+    _appendClient(client, attachFragment) {
       let doc = attachFragment.ownerDocument;
       // Create the element for the remote client.
       let clientItem = doc.createElementNS(kNSXUL, "label");
       clientItem.setAttribute("itemtype", "client");
       let window = doc.defaultView;
       clientItem.setAttribute("tooltiptext",
         window.gSyncUI.formatLastSyncDate(new Date(client.lastModified)));
       clientItem.textContent = client.name;
@@ -505,72 +505,72 @@ const CustomizableWidgets = [
         BrowserUITelemetry.countSyncedTabEvent("open", "toolbarbutton-subview");
       });
       return item;
     },
   }, {
     id: "privatebrowsing-button",
     shortcutId: "key_privatebrowsing",
     defaultArea: CustomizableUI.AREA_PANEL,
-    onCommand: function(e) {
+    onCommand(e) {
       let win = e.target.ownerGlobal;
       win.OpenBrowserWindow({private: true});
     }
   }, {
     id: "save-page-button",
     shortcutId: "key_savePage",
     tooltiptext: "save-page-button.tooltiptext3",
     defaultArea: CustomizableUI.AREA_PANEL,
-    onCommand: function(aEvent) {
+    onCommand(aEvent) {
       let win = aEvent.target.ownerGlobal;
       win.saveBrowser(win.gBrowser.selectedBrowser);
     }
   }, {
     id: "find-button",
     shortcutId: "key_find",
     tooltiptext: "find-button.tooltiptext3",
     defaultArea: CustomizableUI.AREA_PANEL,
-    onCommand: function(aEvent) {
+    onCommand(aEvent) {
       let win = aEvent.target.ownerGlobal;
       if (win.gFindBar) {
         win.gFindBar.onFindCommand();
       }
     }
   }, {
     id: "open-file-button",
     shortcutId: "openFileKb",
     tooltiptext: "open-file-button.tooltiptext3",
     defaultArea: CustomizableUI.AREA_PANEL,
-    onCommand: function(aEvent) {
+    onCommand(aEvent) {
       let win = aEvent.target.ownerGlobal;
       win.BrowserOpenFileWindow();
     }
   }, {
     id: "sidebar-button",
     type: "view",
     viewId: "PanelUI-sidebar",
     tooltiptext: "sidebar-button.tooltiptext2",
-    onViewShowing: function(aEvent) {
+    onViewShowing(aEvent) {
       // Populate the subview with whatever menuitems are in the
       // sidebar menu. We skip menu elements, because the menu panel has no way
       // of dealing with those right now.
       let doc = aEvent.target.ownerDocument;
       let menu = doc.getElementById("viewSidebarMenu");
 
       // First clear any existing menuitems then populate. Add it to the
       // standard menu first, then copy all sidebar options to the panel.
       let sidebarItems = doc.getElementById("PanelUI-sidebarItems");
       clearSubview(sidebarItems);
       fillSubviewFromMenuItems([...menu.children], sidebarItems);
     }
   }, {
     id: "social-share-button",
     // custom build our button so we can attach to the share command
     type: "custom",
-    onBuild: function(aDocument) {
+    onBuild(aDocument) {
       let node = aDocument.createElementNS(kNSXUL, "toolbarbutton");
       node.setAttribute("id", this.id);
       node.classList.add("toolbarbutton-1");
       node.classList.add("chromeclass-toolbar-additional");
       node.setAttribute("label", CustomizableUI.getLocalizedProperty(this, "label"));
       node.setAttribute("tooltiptext", CustomizableUI.getLocalizedProperty(this, "tooltiptext"));
       node.setAttribute("removable", "true");
       node.setAttribute("observes", "Social:PageShareable");
@@ -602,26 +602,26 @@ const CustomizableWidgets = [
 
       return node;
     }
   }, {
     id: "add-ons-button",
     shortcutId: "key_openAddons",
     tooltiptext: "add-ons-button.tooltiptext3",
     defaultArea: CustomizableUI.AREA_PANEL,
-    onCommand: function(aEvent) {
+    onCommand(aEvent) {
       let win = aEvent.target.ownerGlobal;
       win.BrowserOpenAddonsMgr();
     }
   }, {
     id: "zoom-controls",
     type: "custom",
     tooltiptext: "zoom-controls.tooltiptext2",
     defaultArea: CustomizableUI.AREA_PANEL,
-    onBuild: function(aDocument) {
+    onBuild(aDocument) {
       const kPanelId = "PanelUI-popup";
       let areaType = CustomizableUI.getAreaType(this.currentArea);
       let inPanel = areaType == CustomizableUI.TYPE_MENU_PANEL;
       let inToolbar = areaType == CustomizableUI.TYPE_TOOLBAR;
 
       let buttons = [{
         id: "zoom-out-button",
         command: "cmd_fullZoomReduce",
@@ -763,23 +763,23 @@ const CustomizableWidgets = [
           Services.obs.removeObserver(updateZoomResetButton, "browser-fullZoom:zoomReset");
           Services.obs.removeObserver(updateZoomResetButton, "browser-fullZoom:location-change");
           let panel = aDoc.getElementById(kPanelId);
           panel.removeEventListener("popupshowing", updateZoomResetButton);
           let container = aDoc.defaultView.gBrowser.tabContainer;
           container.removeEventListener("TabSelect", updateZoomResetButton);
         }.bind(this),
 
-        onCustomizeStart: function(aWindow) {
+        onCustomizeStart(aWindow) {
           if (aWindow.document == aDocument) {
             updateZoomResetButton();
           }
         },
 
-        onCustomizeEnd: function(aWindow) {
+        onCustomizeEnd(aWindow) {
           if (aWindow.document == aDocument) {
             updateZoomResetButton();
           }
         },
 
         onWidgetDrag: function(aWidgetId, aArea) {
           if (aWidgetId != this.id)
             return;
@@ -791,17 +791,17 @@ const CustomizableWidgets = [
 
       return node;
     }
   }, {
     id: "edit-controls",
     type: "custom",
     tooltiptext: "edit-controls.tooltiptext2",
     defaultArea: CustomizableUI.AREA_PANEL,
-    onBuild: function(aDocument) {
+    onBuild(aDocument) {
       let buttons = [{
         id: "cut-button",
         command: "cmd_cut",
         label: true,
         tooltiptext: "tooltiptext2",
         shortcutId: "key_cut",
       }, {
         id: "copy-button",
@@ -889,100 +889,100 @@ const CustomizableWidgets = [
     }
   },
   {
     id: "feed-button",
     type: "view",
     viewId: "PanelUI-feeds",
     tooltiptext: "feed-button.tooltiptext2",
     defaultArea: CustomizableUI.AREA_PANEL,
-    onClick: function(aEvent) {
+    onClick(aEvent) {
       let win = aEvent.target.ownerGlobal;
       let feeds = win.gBrowser.selectedBrowser.feeds;
 
       // Here, we only care about the case where we have exactly 1 feed and the
       // user clicked...
       let isClick = (aEvent.button == 0 || aEvent.button == 1);
       if (feeds && feeds.length == 1 && isClick) {
         aEvent.preventDefault();
         aEvent.stopPropagation();
         win.FeedHandler.subscribeToFeed(feeds[0].href, aEvent);
         CustomizableUI.hidePanelForNode(aEvent.target);
       }
     },
-    onViewShowing: function(aEvent) {
+    onViewShowing(aEvent) {
       let doc = aEvent.target.ownerDocument;
       let container = doc.getElementById("PanelUI-feeds");
       let gotView = doc.defaultView.FeedHandler.buildFeedList(container, true);
 
       // For no feeds or only a single one, don't show the panel.
       if (!gotView) {
         aEvent.preventDefault();
         aEvent.stopPropagation();
         return;
       }
     },
-    onCreated: function(node) {
+    onCreated(node) {
       let win = node.ownerGlobal;
       let selectedBrowser = win.gBrowser.selectedBrowser;
       let feeds = selectedBrowser && selectedBrowser.feeds;
       if (!feeds || !feeds.length) {
         node.setAttribute("disabled", "true");
       }
     }
   }, {
     id: "characterencoding-button",
     label: "characterencoding-button2.label",
     type: "view",
     viewId: "PanelUI-characterEncodingView",
     tooltiptext: "characterencoding-button2.tooltiptext",
     defaultArea: CustomizableUI.AREA_PANEL,
-    maybeDisableMenu: function(aDocument) {
+    maybeDisableMenu(aDocument) {
       let window = aDocument.defaultView;
       return !(window.gBrowser &&
                window.gBrowser.selectedBrowser.mayEnableCharacterEncodingMenu);
     },
-    populateList: function(aDocument, aContainerId, aSection) {
+    populateList(aDocument, aContainerId, aSection) {
       let containerElem = aDocument.getElementById(aContainerId);
 
       containerElem.addEventListener("command", this.onCommand, false);
 
       let list = this.charsetInfo[aSection];
 
       for (let item of list) {
         let elem = aDocument.createElementNS(kNSXUL, "toolbarbutton");
         elem.setAttribute("label", item.label);
         elem.setAttribute("type", "checkbox");
         elem.section = aSection;
         elem.value = item.value;
         elem.setAttribute("class", "subviewbutton");
         containerElem.appendChild(elem);
       }
     },
-    updateCurrentCharset: function(aDocument) {
+    updateCurrentCharset(aDocument) {
       let currentCharset = aDocument.defaultView.gBrowser.selectedBrowser.characterSet;
       currentCharset = CharsetMenu.foldCharset(currentCharset);
 
       let pinnedContainer = aDocument.getElementById("PanelUI-characterEncodingView-pinned");
       let charsetContainer = aDocument.getElementById("PanelUI-characterEncodingView-charsets");
       let elements = [...(pinnedContainer.childNodes), ...(charsetContainer.childNodes)];
 
       this._updateElements(elements, currentCharset);
     },
-    updateCurrentDetector: function(aDocument) {
+    updateCurrentDetector(aDocument) {
       let detectorContainer = aDocument.getElementById("PanelUI-characterEncodingView-autodetect");
       let currentDetector;
       try {
         currentDetector = Services.prefs.getComplexValue(
           "intl.charset.detector", Ci.nsIPrefLocalizedString).data;
       } catch (e) {}
 
       this._updateElements(detectorContainer.childNodes, currentDetector);
     },
-    _updateElements: function(aElements, aCurrentItem) {
+    _updateElements(aElements, aCurrentItem) {
       if (!aElements.length) {
         return;
       }
       let disabled = this.maybeDisableMenu(aElements[0].ownerDocument);
       for (let elem of aElements) {
         if (disabled) {
           elem.setAttribute("disabled", "true");
         } else {
@@ -990,17 +990,17 @@ const CustomizableWidgets = [
         }
         if (elem.value.toLowerCase() == aCurrentItem.toLowerCase()) {
           elem.setAttribute("checked", "true");
         } else {
           elem.removeAttribute("checked");
         }
       }
     },
-    onViewShowing: function(aEvent) {
+    onViewShowing(aEvent) {
       let document = aEvent.target.ownerDocument;
 
       let autoDetectLabelId = "PanelUI-characterEncodingView-autodetect-label";
       let autoDetectLabel = document.getElementById(autoDetectLabelId);
       if (!autoDetectLabel.hasAttribute("value")) {
         let label = CharsetBundle.GetStringFromName("charsetMenuAutodet");
         autoDetectLabel.setAttribute("value", label);
         this.populateList(document,
@@ -1011,17 +1011,17 @@ const CustomizableWidgets = [
                           "otherCharsets");
         this.populateList(document,
                           "PanelUI-characterEncodingView-autodetect",
                           "detectors");
       }
       this.updateCurrentDetector(document);
       this.updateCurrentCharset(document);
     },
-    onCommand: function(aEvent) {
+    onCommand(aEvent) {
       let node = aEvent.target;
       if (!node.hasAttribute || !node.section) {
         return;
       }
 
       let window = node.ownerGlobal;
       let section = node.section;
       let value = node.value;
@@ -1039,17 +1039,17 @@ const CustomizableWidgets = [
           Services.prefs.setComplexValue("intl.charset.detector", Ci.nsISupportsString, str);
         } catch (e) {
           Cu.reportError("Failed to set the intl.charset.detector preference.");
         }
         // Prepare a browser page reload with a changed charset.
         window.BrowserCharsetReload();
       }
     },
-    onCreated: function(aNode) {
+    onCreated(aNode) {
       const kPanelId = "PanelUI-popup";
       let document = aNode.ownerDocument;
 
       let updateButton = () => {
         if (this.maybeDisableMenu(document))
           aNode.setAttribute("disabled", "true");
         else
           aNode.removeAttribute("disabled");
@@ -1090,26 +1090,26 @@ const CustomizableWidgets = [
       CustomizableUI.addListener(listener);
       if (!this.charsetInfo) {
         this.charsetInfo = CharsetMenu.getData();
       }
     }
   }, {
     id: "email-link-button",
     tooltiptext: "email-link-button.tooltiptext3",
-    onCommand: function(aEvent) {
+    onCommand(aEvent) {
       let win = aEvent.view;
       win.MailIntegration.sendLinkForBrowser(win.gBrowser.selectedBrowser)
     }
   }, {
     id: "containers-panelmenu",
     type: "view",
     viewId: "PanelUI-containers",
     hasObserver: false,
-    onCreated: function(aNode) {
+    onCreated(aNode) {
       let doc = aNode.ownerDocument;
       let win = doc.defaultView;
       let items = doc.getElementById("PanelUI-containersItems");
 
       let onItemCommand = function(aEvent) {
         let item = aEvent.target;
         if (item.hasAttribute("usercontextid")) {
           let userContextId = parseInt(item.getAttribute("usercontextid"));
@@ -1124,17 +1124,17 @@ const CustomizableWidgets = [
 
       this.updateVisibility(aNode);
 
       if (!this.hasObserver) {
         Services.prefs.addObserver("privacy.userContext.enabled", this, true);
         this.hasObserver = true;
       }
     },
-    onViewShowing: function(aEvent) {
+    onViewShowing(aEvent) {
       let doc = aEvent.target.ownerDocument;
 
       let items = doc.getElementById("PanelUI-containersItems");
 
       while (items.firstChild) {
         items.firstChild.remove();
       }
 
@@ -1182,17 +1182,17 @@ const CustomizableWidgets = [
       Ci.nsISupportsWeakReference,
       Ci.nsIObserver
     ]),
   }];
 
 let preferencesButton = {
   id: "preferences-button",
   defaultArea: CustomizableUI.AREA_PANEL,
-  onCommand: function(aEvent) {
+  onCommand(aEvent) {
     let win = aEvent.target.ownerGlobal;
     win.openPreferences();
   }
 };
 if (AppConstants.platform == "win") {
   preferencesButton.label = "preferences-button.labelWin";
   preferencesButton.tooltiptext = "preferences-button.tooltipWin2";
 } else if (AppConstants.platform == "macosx") {
@@ -1204,31 +1204,31 @@ if (AppConstants.platform == "win") {
 CustomizableWidgets.push(preferencesButton);
 
 if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) {
   CustomizableWidgets.push({
     id: "panic-button",
     type: "view",
     viewId: "PanelUI-panicView",
     _sanitizer: null,
-    _ensureSanitizer: function() {
+    _ensureSanitizer() {
       if (!this.sanitizer) {
         let scope = {};
         Services.scriptloader.loadSubScript("chrome://browser/content/sanitize.js",
                                             scope);
         this._Sanitizer = scope.Sanitizer;
         this._sanitizer = new scope.Sanitizer();
         this._sanitizer.ignoreTimespan = false;
       }
     },
-    _getSanitizeRange: function(aDocument) {
+    _getSanitizeRange(aDocument) {
       let group = aDocument.getElementById("PanelUI-panic-timeSpan");
       return this._Sanitizer.getClearRange(+group.value);
     },
-    forgetButtonCalled: function(aEvent) {
+    forgetButtonCalled(aEvent) {
       let doc = aEvent.target.ownerDocument;
       this._ensureSanitizer();
       this._sanitizer.range = this._getSanitizeRange(doc);
       let group = doc.getElementById("PanelUI-panic-timeSpan");
       BrowserUITelemetry.countPanicEvent(group.selectedItem.id);
       group.selectedItem = doc.getElementById("PanelUI-panic-5min");
       let itemsToClear = [
         "cookies", "history", "openWindows", "formdata", "sessions", "cache", "downloads"
@@ -1244,43 +1244,43 @@ if (Services.prefs.getBoolPref("privacy.
         }
         if (otherWindow.PanicButtonNotifier) {
           otherWindow.PanicButtonNotifier.notify();
         } else {
           otherWindow.PanicButtonNotifierShouldNotify = true;
         }
       });
     },
-    handleEvent: function(aEvent) {
+    handleEvent(aEvent) {
       switch (aEvent.type) {
         case "command":
           this.forgetButtonCalled(aEvent);
           break;
       }
     },
-    onViewShowing: function(aEvent) {
+    onViewShowing(aEvent) {
       let forgetButton = aEvent.target.querySelector("#PanelUI-panic-view-button");
       forgetButton.addEventListener("command", this);
     },
-    onViewHiding: function(aEvent) {
+    onViewHiding(aEvent) {
       let forgetButton = aEvent.target.querySelector("#PanelUI-panic-view-button");
       forgetButton.removeEventListener("command", this);
     },
   });
 }
 
 if (AppConstants.E10S_TESTING_ONLY) {
   if (Services.appinfo.browserTabsRemoteAutostart) {
     CustomizableWidgets.push({
       id: "e10s-button",
       defaultArea: CustomizableUI.AREA_PANEL,
-      onBuild: function(aDocument) {
+      onBuild(aDocument) {
         let node = aDocument.createElementNS(kNSXUL, "toolbarbutton");
         node.setAttribute("label", CustomizableUI.getLocalizedProperty(this, "label"));
         node.setAttribute("tooltiptext", CustomizableUI.getLocalizedProperty(this, "tooltiptext"));
       },
-      onCommand: function(aEvent) {
+      onCommand(aEvent) {
         let win = aEvent.view;
         win.OpenBrowserWindow({remote: false});
       },
     });
   }
 }
--- a/browser/components/customizableui/CustomizeMode.jsm
+++ b/browser/components/customizableui/CustomizeMode.jsm
@@ -125,43 +125,43 @@ CustomizeMode.prototype = {
   get panelUIContents() {
     return this.document.getElementById("PanelUI-contents");
   },
 
   get _handler() {
     return this.window.CustomizationHandler;
   },
 
-  uninit: function() {
+  uninit() {
     if (AppConstants.CAN_DRAW_IN_TITLEBAR) {
       Services.prefs.removeObserver(kDrawInTitlebarPref, this);
     }
   },
 
-  toggle: function() {
+  toggle() {
     if (this._handler.isEnteringCustomizeMode || this._handler.isExitingCustomizeMode) {
       this._wantToBeInCustomizeMode = !this._wantToBeInCustomizeMode;
       return;
     }
     if (this._customizing) {
       this.exit();
     } else {
       this.enter();
     }
   },
 
-  _updateLWThemeButtonIcon: function() {
+  _updateLWThemeButtonIcon() {
     let lwthemeButton = this.document.getElementById("customization-lwtheme-button");
     let lwthemeIcon = this.document.getAnonymousElementByAttribute(lwthemeButton,
                         "class", "button-icon");
     lwthemeIcon.style.backgroundImage = LightweightThemeManager.currentTheme ?
       "url(" + LightweightThemeManager.currentTheme.iconURL + ")" : "";
   },
 
-  setTab: function(aTab) {
+  setTab(aTab) {
     if (gTab == aTab) {
       return;
     }
 
     if (gTab) {
       closeGlobalTab();
     }
 
@@ -181,17 +181,17 @@ CustomizeMode.prototype = {
     gTab.addEventListener("TabClose", unregisterGlobalTab);
     win.addEventListener("unload", unregisterGlobalTab);
 
     if (gTab.selected) {
       win.gCustomizeMode.enter();
     }
   },
 
-  enter: function() {
+  enter() {
     this._wantToBeInCustomizeMode = true;
 
     if (this._customizing || this._handler.isEnteringCustomizeMode) {
       return;
     }
 
     // Exiting; want to re-enter once we've done that.
     if (this._handler.isExitingCustomizeMode) {
@@ -375,17 +375,17 @@ CustomizeMode.prototype = {
       // We should ensure this has been called, and calling it again doesn't hurt:
       window.PanelUI.endBatchUpdate();
       this._handler.isEnteringCustomizeMode = false;
       // Exit customize mode to ensure proper clean-up when entering failed.
       this.exit();
     }.bind(this));
   },
 
-  exit: function() {
+  exit() {
     this._wantToBeInCustomizeMode = false;
 
     if (!this._customizing || this._handler.isExitingCustomizeMode) {
       return;
     }
 
     // Entering; want to exit once we've done that.
     if (this._handler.isEnteringCustomizeMode) {
@@ -552,17 +552,17 @@ CustomizeMode.prototype = {
    * Exiting customization mode has a similar set of phases, but in reverse
    * order - customize-entered, customize-exiting, remove LWT swapping,
    * pre-customization mode.
    *
    * When in the customize-entering, customize-entered, or customize-exiting
    * phases, there is a "customizing" attribute set on the main-window to simplify
    * excluding certain styles while in any phase of customize mode.
    */
-  _doTransition: function(aEntering) {
+  _doTransition(aEntering) {
     let deck = this.document.getElementById("content-deck");
     let customizeTransitionEndPromise = new Promise(resolve => {
       let customizeTransitionEnd = (aEvent) => {
         if (aEvent != "timedout" &&
             (aEvent.originalTarget != deck || aEvent.propertyName != "margin-left")) {
           return;
         }
         this.window.clearTimeout(catchAllTimeout);
@@ -598,17 +598,17 @@ CustomizeMode.prototype = {
     } else {
       this.document.documentElement.setAttribute("customize-exiting", true);
       this.document.documentElement.removeAttribute("customize-entered");
     }
 
     return customizeTransitionEndPromise;
   },
 
-  updateLWTStyling: function(aData) {
+  updateLWTStyling(aData) {
     let docElement = this.document.documentElement;
     if (!aData) {
       let lwt = docElement._lightweightTheme;
       aData = lwt.getData();
     }
     let headerURL = aData && aData.headerURL;
     if (!headerURL) {
       this.removeLWTStyling();
@@ -649,38 +649,38 @@ CustomizeMode.prototype = {
                                  "transparent " + ridgeEnd + ")";
     deck.style.backgroundImage = ridge + ", " + limitedBG;
 
     /* Remove the background styles from the <window> so we can style it instead. */
     docElement.style.removeProperty("background-image");
     docElement.style.removeProperty("background-color");
   },
 
-  removeLWTStyling: function() {
+  removeLWTStyling() {
     let affectedNodes = AppConstants.platform == "macosx" ?
                           ["tab-view-deck", "titlebar"] :
                           ["tab-view-deck"];
     for (let id of affectedNodes) {
       let node = this.document.getElementById(id);
       node.style.removeProperty("background-image");
     }
     let docElement = this.document.documentElement;
     docElement.removeAttribute("customization-lwtheme");
     let data = docElement._lightweightTheme.getData();
     if (data && data.headerURL) {
       docElement.style.backgroundImage = this._getHeaderImageRef(data);
       docElement.style.backgroundColor = data.accentcolor || "white";
     }
   },
 
-  _getHeaderImageRef: function(aData) {
+  _getHeaderImageRef(aData) {
     return "url(\"" + aData.headerURL.replace(/"/g, '\\"') + "\")";
   },
 
-  maybeShowTip: function(aAnchor) {
+  maybeShowTip(aAnchor) {
     let shown = false;
     const kShownPref = "browser.customizemode.tip0.shown";
     try {
       shown = Services.prefs.getBoolPref(kShownPref);
     } catch (ex) {}
     if (shown)
       return;
 
@@ -706,21 +706,21 @@ CustomizeMode.prototype = {
       });
     }
 
     this.tipPanel.hidden = false;
     this.tipPanel.openPopup(anchorNode);
     Services.prefs.setBoolPref(kShownPref, true);
   },
 
-  hideTip: function() {
+  hideTip() {
     this.tipPanel.hidePopup();
   },
 
-  _getCustomizableChildForNode: function(aNode) {
+  _getCustomizableChildForNode(aNode) {
     // NB: adjusted from _getCustomizableParent to keep that method fast
     // (it's used during drags), and avoid multiple DOM loops
     let areas = CustomizableUI.areas;
     // Caching this length is important because otherwise we'll also iterate
     // over items we add to the end from within the loop.
     let numberOfAreas = areas.length;
     for (let i = 0; i < numberOfAreas; i++) {
       let area = areas[i];
@@ -741,50 +741,50 @@ CustomizeMode.prototype = {
       if (areas.indexOf(parent.id) != -1) {
         return aNode;
       }
       aNode = parent;
     }
     return null;
   },
 
-  addToToolbar: function(aNode) {
+  addToToolbar(aNode) {
     aNode = this._getCustomizableChildForNode(aNode);
     if (aNode.localName == "toolbarpaletteitem" && aNode.firstChild) {
       aNode = aNode.firstChild;
     }
     CustomizableUI.addWidgetToArea(aNode.id, CustomizableUI.AREA_NAVBAR);
     if (!this._customizing) {
       CustomizableUI.dispatchToolboxEvent("customizationchange");
     }
   },
 
-  addToPanel: function(aNode) {
+  addToPanel(aNode) {
     aNode = this._getCustomizableChildForNode(aNode);
     if (aNode.localName == "toolbarpaletteitem" && aNode.firstChild) {
       aNode = aNode.firstChild;
     }
     CustomizableUI.addWidgetToArea(aNode.id, CustomizableUI.AREA_PANEL);
     if (!this._customizing) {
       CustomizableUI.dispatchToolboxEvent("customizationchange");
     }
   },
 
-  removeFromArea: function(aNode) {
+  removeFromArea(aNode) {
     aNode = this._getCustomizableChildForNode(aNode);
     if (aNode.localName == "toolbarpaletteitem" && aNode.firstChild) {
       aNode = aNode.firstChild;
     }
     CustomizableUI.removeWidgetFromArea(aNode.id);
     if (!this._customizing) {
       CustomizableUI.dispatchToolboxEvent("customizationchange");
     }
   },
 
-  populatePalette: function() {
+  populatePalette() {
     let fragment = this.document.createDocumentFragment();
     let toolboxPalette = this.window.gNavToolbox.palette;
 
     try {
       let unusedWidgets = CustomizableUI.getUnusedWidgets(toolboxPalette);
       for (let widget of unusedWidgets) {
         let paletteItem = this.makePaletteItem(widget, "palette");
         if (!paletteItem) {
@@ -800,33 +800,33 @@ CustomizeMode.prototype = {
       log.error(ex);
     }
   },
 
   // XXXunf Maybe this should use -moz-element instead of wrapping the node?
   //       Would ensure no weird interactions/event handling from original node,
   //       and makes it possible to put this in a lazy-loaded iframe/real tab
   //       while still getting rid of the need for overlays.
-  makePaletteItem: function(aWidget, aPlace) {
+  makePaletteItem(aWidget, aPlace) {
     let widgetNode = aWidget.forWindow(this.window).node;
     if (!widgetNode) {
       log.error("Widget with id " + aWidget.id + " does not return a valid node");
       return null;
     }
     // Do not build a palette item for hidden widgets; there's not much to show.
     if (widgetNode.hidden) {
       return null;
     }
 
     let wrapper = this.createOrUpdateWrapper(widgetNode, aPlace);
     wrapper.appendChild(widgetNode);
     return wrapper;
   },
 
-  depopulatePalette: function() {
+  depopulatePalette() {
     return Task.spawn(function*() {
       this.visiblePalette.hidden = true;
       let paletteChild = this.visiblePalette.firstChild;
       let nextChild;
       while (paletteChild) {
         nextChild = paletteChild.nextElementSibling;
         let provider = CustomizableUI.getWidget(paletteChild.id).provider;
         if (provider == CustomizableUI.PROVIDER_XUL) {
@@ -846,38 +846,38 @@ CustomizeMode.prototype = {
 
         paletteChild = nextChild;
       }
       this.visiblePalette.hidden = false;
       this.window.gNavToolbox.palette = this._stowedPalette;
     }.bind(this)).then(null, log.error);
   },
 
-  isCustomizableItem: function(aNode) {
+  isCustomizableItem(aNode) {
     return aNode.localName == "toolbarbutton" ||
            aNode.localName == "toolbaritem" ||
            aNode.localName == "toolbarseparator" ||
            aNode.localName == "toolbarspring" ||
            aNode.localName == "toolbarspacer";
   },
 
-  isWrappedToolbarItem: function(aNode) {
+  isWrappedToolbarItem(aNode) {
     return aNode.localName == "toolbarpaletteitem";
   },
 
-  deferredWrapToolbarItem: function(aNode, aPlace) {
+  deferredWrapToolbarItem(aNode, aPlace) {
     return new Promise(resolve => {
       dispatchFunction(() => {
         let wrapper = this.wrapToolbarItem(aNode, aPlace);
         resolve(wrapper);
       });
     });
   },
 
-  wrapToolbarItem: function(aNode, aPlace) {
+  wrapToolbarItem(aNode, aPlace) {
     if (!this.isCustomizableItem(aNode)) {
       return aNode;
     }
     let wrapper = this.createOrUpdateWrapper(aNode, aPlace);
 
     // It's possible that this toolbar node is "mid-flight" and doesn't have
     // a parent, in which case we skip replacing it. This can happen if a
     // toolbar item has been dragged into the palette. In that case, we tell
@@ -885,17 +885,17 @@ CustomizeMode.prototype = {
     // widget in the palette - so the node will have no parent.
     if (aNode.parentNode) {
       aNode = aNode.parentNode.replaceChild(wrapper, aNode);
     }
     wrapper.appendChild(aNode);
     return wrapper;
   },
 
-  createOrUpdateWrapper: function(aNode, aPlace, aIsUpdate) {
+  createOrUpdateWrapper(aNode, aPlace, aIsUpdate) {
     let wrapper;
     if (aIsUpdate && aNode.parentNode && aNode.parentNode.localName == "toolbarpaletteitem") {
       wrapper = aNode.parentNode;
       aPlace = wrapper.getAttribute("place");
     } else {
       wrapper = this.document.createElement("toolbarpaletteitem");
       // "place" is used by toolkit to add the toolbarpaletteitem-palette
       // binding to a toolbarpaletteitem, which gives it a label node for when
@@ -975,31 +975,31 @@ CustomizeMode.prototype = {
     if (!aIsUpdate) {
       wrapper.addEventListener("mousedown", this);
       wrapper.addEventListener("mouseup", this);
     }
 
     return wrapper;
   },
 
-  deferredUnwrapToolbarItem: function(aWrapper) {
+  deferredUnwrapToolbarItem(aWrapper) {
     return new Promise(resolve => {
       dispatchFunction(() => {
         let item = null;
         try {
           item = this.unwrapToolbarItem(aWrapper);
         } catch (ex) {
           Cu.reportError(ex);
         }
         resolve(item);
       });
     });
   },
 
-  unwrapToolbarItem: function(aWrapper) {
+  unwrapToolbarItem(aWrapper) {
     if (aWrapper.nodeName != "toolbarpaletteitem") {
       return aWrapper;
     }
     aWrapper.removeEventListener("mousedown", this);
     aWrapper.removeEventListener("mouseup", this);
 
     let place = aWrapper.getAttribute("place");
 
@@ -1040,33 +1040,33 @@ CustomizeMode.prototype = {
     }
 
     if (aWrapper.parentNode) {
       aWrapper.parentNode.replaceChild(toolbarItem, aWrapper);
     }
     return toolbarItem;
   },
 
-  _wrapToolbarItem: function*(aArea) {
+  *_wrapToolbarItem(aArea) {
     let target = CustomizableUI.getCustomizeTargetForArea(aArea, this.window);
     if (!target || this.areas.has(target)) {
       return null;
     }
 
     this._addDragHandlers(target);
     for (let child of target.children) {
       if (this.isCustomizableItem(child) && !this.isWrappedToolbarItem(child)) {
         yield this.deferredWrapToolbarItem(child, CustomizableUI.getPlaceForItem(child)).then(null, log.error);
       }
     }
     this.areas.add(target);
     return target;
   },
 
-  _wrapToolbarItemSync: function(aArea) {
+  _wrapToolbarItemSync(aArea) {
     let target = CustomizableUI.getCustomizeTargetForArea(aArea, this.window);
     if (!target || this.areas.has(target)) {
       return null;
     }
 
     this._addDragHandlers(target);
     try {
       for (let child of target.children) {
@@ -1077,94 +1077,94 @@ CustomizeMode.prototype = {
     } catch (ex) {
       log.error(ex, ex.stack);
     }
 
     this.areas.add(target);
     return target;
   },
 
-  _wrapToolbarItems: function*() {
+  *_wrapToolbarItems() {
     for (let area of CustomizableUI.areas) {
       yield this._wrapToolbarItem(area);
     }
   },
 
-  _addDragHandlers: function(aTarget) {
+  _addDragHandlers(aTarget) {
     aTarget.addEventListener("dragstart", this, true);
     aTarget.addEventListener("dragover", this, true);
     aTarget.addEventListener("dragexit", this, true);
     aTarget.addEventListener("drop", this, true);
     aTarget.addEventListener("dragend", this, true);
   },
 
-  _wrapItemsInArea: function(target) {
+  _wrapItemsInArea(target) {
     for (let child of target.children) {
       if (this.isCustomizableItem(child)) {
         this.wrapToolbarItem(child, CustomizableUI.getPlaceForItem(child));
       }
     }
   },
 
-  _removeDragHandlers: function(aTarget) {
+  _removeDragHandlers(aTarget) {
     aTarget.removeEventListener("dragstart", this, true);
     aTarget.removeEventListener("dragover", this, true);
     aTarget.removeEventListener("dragexit", this, true);
     aTarget.removeEventListener("drop", this, true);
     aTarget.removeEventListener("dragend", this, true);
   },
 
-  _unwrapItemsInArea: function(target) {
+  _unwrapItemsInArea(target) {
     for (let toolbarItem of target.children) {
       if (this.isWrappedToolbarItem(toolbarItem)) {
         this.unwrapToolbarItem(toolbarItem);
       }
     }
   },
 
-  _unwrapToolbarItems: function() {
+  _unwrapToolbarItems() {
     return Task.spawn(function*() {
       for (let target of this.areas) {
         for (let toolbarItem of target.children) {
           if (this.isWrappedToolbarItem(toolbarItem)) {
             yield this.deferredUnwrapToolbarItem(toolbarItem);
           }
         }
         this._removeDragHandlers(target);
       }
       this.areas.clear();
     }.bind(this)).then(null, log.error);
   },
 
-  _removeExtraToolbarsIfEmpty: function() {
+  _removeExtraToolbarsIfEmpty() {
     let toolbox = this.window.gNavToolbox;
     for (let child of toolbox.children) {
       if (child.hasAttribute("customindex")) {
         let placements = CustomizableUI.getWidgetIdsInArea(child.id);
         if (!placements.length) {
           CustomizableUI.removeExtraToolbar(child.id);
         }
       }
     }
   },
 
-  persistCurrentSets: function(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.
       document.persist(toolbar.id, "currentset");
     }
   },
 
-  reset: function() {
+  reset() {
     this.resetting = true;
     // Disable the reset button temporarily while resetting:
     let btn = this.document.getElementById("customization-reset-button");
     BrowserUITelemetry.countCustomizationEvent("reset");
     btn.disabled = true;
     return Task.spawn(function*() {
       this._removePanelCustomizationPlaceholders();
       yield this.depopulatePalette();
@@ -1185,17 +1185,17 @@ CustomizeMode.prototype = {
       this._showPanelCustomizationPlaceholders();
       this.resetting = false;
       if (!this._wantToBeInCustomizeMode) {
         this.exit();
       }
     }.bind(this)).then(null, log.error);
   },
 
-  undoReset: function() {
+  undoReset() {
     this.resetting = true;
 
     return Task.spawn(function*() {
       this._removePanelCustomizationPlaceholders();
       yield this.depopulatePalette();
       yield this._unwrapToolbarItems();
 
       CustomizableUI.undoReset();
@@ -1209,57 +1209,57 @@ CustomizeMode.prototype = {
 
       this._updateResetButton();
       this._updateUndoResetButton();
       this._updateEmptyPaletteNotice();
       this.resetting = false;
     }.bind(this)).then(null, log.error);
   },
 
-  _onToolbarVisibilityChange: function(aEvent) {
+  _onToolbarVisibilityChange(aEvent) {
     let toolbar = aEvent.target;
     if (aEvent.detail.visible && toolbar.getAttribute("customizable") == "true") {
       toolbar.setAttribute("customizing", "true");
     } else {
       toolbar.removeAttribute("customizing");
     }
     this._onUIChange();
     this.updateLWTStyling();
   },
 
-  onWidgetMoved: function(aWidgetId, aArea, aOldPosition, aNewPosition) {
+  onWidgetMoved(aWidgetId, aArea, aOldPosition, aNewPosition) {
     this._onUIChange();
   },
 
-  onWidgetAdded: function(aWidgetId, aArea, aPosition) {
+  onWidgetAdded(aWidgetId, aArea, aPosition) {
     this._onUIChange();
   },
 
-  onWidgetRemoved: function(aWidgetId, aArea) {
+  onWidgetRemoved(aWidgetId, aArea) {
     this._onUIChange();
   },
 
-  onWidgetBeforeDOMChange: function(aNodeToChange, aSecondaryNode, aContainer) {
+  onWidgetBeforeDOMChange(aNodeToChange, aSecondaryNode, aContainer) {
     if (aContainer.ownerGlobal != this.window || this.resetting) {
       return;
     }
     if (aContainer.id == CustomizableUI.AREA_PANEL) {
       this._removePanelCustomizationPlaceholders();
     }
     // If we get called for widgets that aren't in the window yet, they might not have
     // a parentNode at all.
     if (aNodeToChange.parentNode) {
       this.unwrapToolbarItem(aNodeToChange.parentNode);
     }
     if (aSecondaryNode) {
       this.unwrapToolbarItem(aSecondaryNode.parentNode);
     }
   },
 
-  onWidgetAfterDOMChange: function(aNodeToChange, aSecondaryNode, aContainer) {
+  onWidgetAfterDOMChange(aNodeToChange, aSecondaryNode, aContainer) {
     if (aContainer.ownerGlobal != this.window || this.resetting) {
       return;
     }
     // If the node is still attached to the container, wrap it again:
     if (aNodeToChange.parentNode) {
       let place = CustomizableUI.getPlaceForItem(aNodeToChange);
       this.wrapToolbarItem(aNodeToChange, place);
       if (aSecondaryNode) {
@@ -1279,71 +1279,71 @@ CustomizeMode.prototype = {
         this.visiblePalette.appendChild(paletteItem);
       }
     }
     if (aContainer.id == CustomizableUI.AREA_PANEL) {
       this._showPanelCustomizationPlaceholders();
     }
   },
 
-  onWidgetDestroyed: function(aWidgetId) {
+  onWidgetDestroyed(aWidgetId) {
     let wrapper = this.document.getElementById("wrapper-" + aWidgetId);
     if (wrapper) {
       let wasInPanel = wrapper.parentNode == this.panelUIContents;
       wrapper.remove();
       if (wasInPanel) {
         this._showPanelCustomizationPlaceholders();
       }
     }
   },
 
-  onWidgetAfterCreation: function(aWidgetId, aArea) {
+  onWidgetAfterCreation(aWidgetId, aArea) {
     // If the node was added to an area, we would have gotten an onWidgetAdded notification,
     // plus associated DOM change notifications, so only do stuff for the palette:
     if (!aArea) {
       let widgetNode = this.document.getElementById(aWidgetId);
       if (widgetNode) {
         this.wrapToolbarItem(widgetNode, "palette");
       } else {
         let widget = CustomizableUI.getWidget(aWidgetId);
         this.visiblePalette.appendChild(this.makePaletteItem(widget, "palette"));
       }
     }
   },
 
-  onAreaNodeRegistered: function(aArea, aContainer) {
+  onAreaNodeRegistered(aArea, aContainer) {
     if (aContainer.ownerDocument == this.document) {
       this._wrapItemsInArea(aContainer);
       this._addDragHandlers(aContainer);
       DragPositionManager.add(this.window, aArea, aContainer);
       this.areas.add(aContainer);
     }
   },
 
-  onAreaNodeUnregistered: function(aArea, aContainer, aReason) {
+  onAreaNodeUnregistered(aArea, aContainer, aReason) {
     if (aContainer.ownerDocument == this.document && aReason == CustomizableUI.REASON_AREA_UNREGISTERED) {
       this._unwrapItemsInArea(aContainer);
       this._removeDragHandlers(aContainer);
       DragPositionManager.remove(this.window, aArea, aContainer);
       this.areas.delete(aContainer);
     }
   },
 
-  openAddonsManagerThemes: function(aEvent) {
+  openAddonsManagerThemes(aEvent) {
     aEvent.target.parentNode.parentNode.hidePopup();
     this.window.BrowserOpenAddonsMgr('addons://list/theme');
   },
 
-  getMoreThemes: function(aEvent) {
+  getMoreThemes(aEvent) {
     aEvent.target.parentNode.parentNode.hidePopup();
     let getMoreURL = Services.urlFormatter.formatURLPref("lightweightThemes.getMoreURL");
     this.window.openUILinkIn(getMoreURL, "tab");
   },
 
-  onLWThemesMenuShowing: function(aEvent) {
+  onLWThemesMenuShowing(aEvent) {
     const DEFAULT_THEME_ID = "{972ce4c6-7e08-4474-a285-3208198ce6fd}";
     const RECENT_LWT_COUNT = 5;
 
     this._clearLWThemesMenu(aEvent.target);
 
     function previewTheme(aPreviewThemeEvent) {
       LightweightThemeManager.previewTheme(
         aPreviewThemeEvent.target.theme.id != DEFAULT_THEME_ID ?
@@ -1438,56 +1438,56 @@ CustomizeMode.prototype = {
         });
         panel.insertBefore(button, footer);
       }
       let hideRecommendedLabel = (footer.previousSibling == recommendedLabel);
       recommendedLabel.hidden = hideRecommendedLabel;
     }.bind(this));
   },
 
-  _clearLWThemesMenu: function(panel) {
+  _clearLWThemesMenu(panel) {
     let footer = this.document.getElementById("customization-lwtheme-menu-footer");
     let recommendedLabel = this.document.getElementById("customization-lwtheme-menu-recommended");
     for (let element of [footer, recommendedLabel]) {
       while (element.previousSibling &&
              element.previousSibling.localName == "toolbarbutton") {
         element.previousSibling.remove();
       }
     }
 
     // Workaround for bug 1059934
     panel.removeAttribute("height");
   },
 
-  _onUIChange: function() {
+  _onUIChange() {
     this._changed = true;
     if (!this.resetting) {
       this._updateResetButton();
       this._updateUndoResetButton();
       this._updateEmptyPaletteNotice();
     }
     CustomizableUI.dispatchToolboxEvent("customizationchange");
   },
 
-  _updateEmptyPaletteNotice: function() {
+  _updateEmptyPaletteNotice() {
     let paletteItems = this.visiblePalette.getElementsByTagName("toolbarpaletteitem");
     this.paletteEmptyNotice.hidden = !!paletteItems.length;
   },
 
-  _updateResetButton: function() {
+  _updateResetButton() {
     let btn = this.document.getElementById("customization-reset-button");
     btn.disabled = CustomizableUI.inDefaultState;
   },
 
-  _updateUndoResetButton: function() {
+  _updateUndoResetButton() {
     let undoResetButton =  this.document.getElementById("customization-undo-reset-button");
     undoResetButton.hidden = !CustomizableUI.canUndoReset;
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "toolbarvisibilitychange":
         this._onToolbarVisibilityChange(aEvent);
         break;
       case "dragstart":
         this._onDragStart(aEvent);
         break;
       case "dragover":
@@ -1520,17 +1520,17 @@ CustomizeMode.prototype = {
         }
         break;
       case "unload":
         this.uninit();
         break;
     }
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "nsPref:changed":
         this._updateResetButton();
         this._updateUndoResetButton();
         if (AppConstants.CAN_DRAW_IN_TITLEBAR) {
           this._updateTitlebarButton();
         }
         break;
@@ -1542,42 +1542,42 @@ CustomizeMode.prototype = {
           } else {
             this.updateLWTStyling(aData);
           }
         }
         break;
     }
   },
 
-  _updateTitlebarButton: function() {
+  _updateTitlebarButton() {
     if (!AppConstants.CAN_DRAW_IN_TITLEBAR) {
       return;
     }
     let drawInTitlebar = true;
     try {
       drawInTitlebar = Services.prefs.getBoolPref(kDrawInTitlebarPref);
     } catch (ex) { }
     let button = this.document.getElementById("customization-titlebar-visibility-button");
     // Drawing in the titlebar means 'hiding' the titlebar:
     if (drawInTitlebar) {
       button.removeAttribute("checked");
     } else {
       button.setAttribute("checked", "true");
     }
   },
 
-  toggleTitlebar: function(aShouldShowTitlebar) {
+  toggleTitlebar(aShouldShowTitlebar) {
     if (!AppConstants.CAN_DRAW_IN_TITLEBAR) {
       return;
     }
     // Drawing in the titlebar means not showing the titlebar, hence the negation:
     Services.prefs.setBoolPref(kDrawInTitlebarPref, !aShouldShowTitlebar);
   },
 
-  _onDragStart: function(aEvent) {
+  _onDragStart(aEvent) {
     __dumpDragData(aEvent);
     let item = aEvent.target;
     while (item && item.localName != "toolbarpaletteitem") {
       if (item.localName == "toolbar") {
         return;
       }
       item = item.parentNode;
     }
@@ -1624,17 +1624,17 @@ CustomizeMode.prototype = {
         }
       }
       this._initializeDragAfterMove = null;
       this.window.clearTimeout(this._dragInitializeTimeout);
     }.bind(this);
     this._dragInitializeTimeout = this.window.setTimeout(this._initializeDragAfterMove, 0);
   },
 
-  _onDragOver: function(aEvent) {
+  _onDragOver(aEvent) {
     if (this._isUnwantedDragDrop(aEvent)) {
       return;
     }
     if (this._initializeDragAfterMove) {
       this._initializeDragAfterMove();
     }
 
     __dumpDragData(aEvent);
@@ -1721,17 +1721,17 @@ CustomizeMode.prototype = {
       }
       this._dragOverItem = dragOverItem;
     }
 
     aEvent.preventDefault();
     aEvent.stopPropagation();
   },
 
-  _onDragDrop: function(aEvent) {
+  _onDragDrop(aEvent) {
     if (this._isUnwantedDragDrop(aEvent)) {
       return;
     }
 
     __dumpDragData(aEvent);
     this._initializeDragAfterMove = null;
     this.window.clearTimeout(this._dragInitializeTimeout);
 
@@ -1774,17 +1774,17 @@ CustomizeMode.prototype = {
       this._applyDrop(aEvent, targetArea, originArea, draggedItemId, targetNode);
     } catch (ex) {
       log.error(ex, ex.stack);
     }
 
     this._showPanelCustomizationPlaceholders();
   },
 
-  _applyDrop: function(aEvent, aTargetArea, aOriginArea, aDraggedItemId, aTargetNode) {
+  _applyDrop(aEvent, aTargetArea, aOriginArea, aDraggedItemId, aTargetNode) {
     let document = aEvent.target.ownerDocument;
     let draggedItem = document.getElementById(aDraggedItemId);
     draggedItem.hidden = false;
     draggedItem.removeAttribute("mousedown");
 
     // Do nothing if the target was dropped onto itself (ie, no change in area
     // or position).
     if (draggedItem == aTargetNode) {
@@ -1903,17 +1903,17 @@ CustomizeMode.prototype = {
     // If we dropped onto a skipintoolbarset item, manually correct the drop location:
     if (aTargetNode != itemForPlacement) {
       let draggedWrapper = draggedItem.parentNode;
       let container = draggedWrapper.parentNode;
       container.insertBefore(draggedWrapper, aTargetNode.parentNode);
     }
   },
 
-  _onDragExit: function(aEvent) {
+  _onDragExit(aEvent) {
     if (this._isUnwantedDragDrop(aEvent)) {
       return;
     }
 
     __dumpDragData(aEvent);
 
     // When leaving customization areas, cancel the drag on the last dragover item
     // We've attached the listener to areas, so aEvent.currentTarget will be the area.
@@ -1924,17 +1924,17 @@ CustomizeMode.prototype = {
       this._cancelDragActive(this._dragOverItem);
       this._dragOverItem = null;
     }
   },
 
   /**
    * To workaround bug 460801 we manually forward the drop event here when dragend wouldn't be fired.
    */
-  _onDragEnd: function(aEvent) {
+  _onDragEnd(aEvent) {
     if (this._isUnwantedDragDrop(aEvent)) {
       return;
     }
     this._initializeDragAfterMove = null;
     this.window.clearTimeout(this._dragInitializeTimeout);
     __dumpDragData(aEvent, "_onDragEnd");
 
     let document = aEvent.target.ownerDocument;
@@ -1961,17 +1961,17 @@ CustomizeMode.prototype = {
       this._cancelDragActive(this._dragOverItem);
       this._dragOverItem = null;
     }
     this._updateToolbarCustomizationOutline(this.window);
     this._showPanelCustomizationPlaceholders();
     DragPositionManager.stop();
   },
 
-  _isUnwantedDragDrop: function(aEvent) {
+  _isUnwantedDragDrop(aEvent) {
     // The simulated events generated by synthesizeDragStart/synthesizeDrop in
     // mochitests are used only for testing whether the right data is being put
     // into the dataTransfer. Neither cause a real drop to occur, so they don't
     // set the source node. There isn't a means of testing real drag and drops,
     // so this pref skips the check but it should only be set by test code.
     if (this._skipSourceNodeCheck) {
       return false;
     }
@@ -1980,17 +1980,17 @@ CustomizeMode.prototype = {
        prevent content->chrome privilege escalations. */
     let mozSourceNode = aEvent.dataTransfer.mozSourceNode;
     // mozSourceNode is null in the dragStart event handler or if
     // the drag event originated in an external application.
     return !mozSourceNode ||
            mozSourceNode.ownerGlobal != this.window;
   },
 
-  _setDragActive: function(aItem, aValue, aDraggedItemId, aInToolbar) {
+  _setDragActive(aItem, aValue, aDraggedItemId, aInToolbar) {
     if (!aItem) {
       return;
     }
 
     if (aItem.getAttribute("dragover") != aValue) {
       aItem.setAttribute("dragover", aValue);
 
       let window = aItem.ownerGlobal;
@@ -2028,17 +2028,17 @@ CustomizeMode.prototype = {
         if (makeSpaceImmediately) {
           // Force a layout flush:
           aItem.getBoundingClientRect();
           aItem.removeAttribute("notransition");
         }
       }
     }
   },
-  _cancelDragActive: function(aItem, aNextItem, aNoTransition) {
+  _cancelDragActive(aItem, aNextItem, aNoTransition) {
     this._updateToolbarCustomizationOutline(aItem.ownerGlobal);
     let currentArea = this._getCustomizableParent(aItem);
     if (!currentArea) {
       return;
     }
     let isToolbar = CustomizableUI.getAreaType(currentArea.id) == "toolbar";
     if (isToolbar) {
       if (aNoTransition) {
@@ -2064,28 +2064,28 @@ CustomizeMode.prototype = {
         }
       }
       // Otherwise, clear everything out:
       let positionManager = DragPositionManager.getManagerForArea(currentArea);
       positionManager.clearPlaceholders(currentArea, aNoTransition);
     }
   },
 
-  _setGridDragActive: function(aDragOverNode, aDraggedItem, aValue) {
+  _setGridDragActive(aDragOverNode, aDraggedItem, aValue) {
     let targetArea = this._getCustomizableParent(aDragOverNode);
     let draggedWrapper = this.document.getElementById("wrapper-" + aDraggedItem.id);
     let originArea = this._getCustomizableParent(draggedWrapper);
     let positionManager = DragPositionManager.getManagerForArea(targetArea);
     let draggedSize = this._getDragItemSize(aDragOverNode, aDraggedItem);
     let isWide = aDraggedItem.classList.contains(CustomizableUI.WIDE_PANEL_CLASS);
     positionManager.insertPlaceholder(targetArea, aDragOverNode, isWide, draggedSize,
                                       originArea == targetArea);
   },
 
-  _getDragItemSize: function(aDragOverNode, aDraggedItem) {
+  _getDragItemSize(aDragOverNode, aDraggedItem) {
     // Cache it good, cache it real good.
     if (!this._dragSizeMap)
       this._dragSizeMap = new WeakMap();
     if (!this._dragSizeMap.has(aDraggedItem))
       this._dragSizeMap.set(aDraggedItem, new WeakMap());
     let itemMap = this._dragSizeMap.get(aDraggedItem);
     let targetArea = this._getCustomizableParent(aDragOverNode);
     let currentArea = this._getCustomizableParent(aDraggedItem);
@@ -2135,29 +2135,29 @@ CustomizeMode.prototype = {
       this.createOrUpdateWrapper(aDraggedItem, null, true);
       CustomizableUI.onWidgetDrag(aDraggedItem.id);
     } else {
       aDraggedItem.parentNode.hidden = true;
     }
     return size;
   },
 
-  _getCustomizableParent: function(aElement) {
+  _getCustomizableParent(aElement) {
     let areas = CustomizableUI.areas;
     areas.push(kPaletteId);
     while (aElement) {
       if (areas.indexOf(aElement.id) != -1) {
         return aElement;
       }
       aElement = aElement.parentNode;
     }
     return null;
   },
 
-  _getDragOverNode: function(aEvent, aAreaElement, aInToolbar, aDraggedItemId) {
+  _getDragOverNode(aEvent, aAreaElement, aInToolbar, aDraggedItemId) {
     let expectedParent = aAreaElement.customizationTarget || aAreaElement;
     // Our tests are stupid. Cope:
     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;
@@ -2195,53 +2195,53 @@ CustomizeMode.prototype = {
         dragY -= bounds.top;
       }
       // Find the closest node:
       targetNode = positionManager.find(aAreaElement, dragX, dragY, aDraggedItemId);
     }
     return targetNode || aEvent.target;
   },
 
-  _onMouseDown: function(aEvent) {
+  _onMouseDown(aEvent) {
     log.debug("_onMouseDown");
     if (aEvent.button != 0) {
       return;
     }
     let doc = aEvent.target.ownerDocument;
     doc.documentElement.setAttribute("customizing-movingItem", true);
     let item = this._getWrapper(aEvent.target);
     if (item && !item.classList.contains(kPlaceholderClass) &&
         item.getAttribute("removable") == "true") {
       item.setAttribute("mousedown", "true");
     }
   },
 
-  _onMouseUp: function(aEvent) {
+  _onMouseUp(aEvent) {
     log.debug("_onMouseUp");
     if (aEvent.button != 0) {
       return;
     }
     let doc = aEvent.target.ownerDocument;
     doc.documentElement.removeAttribute("customizing-movingItem");
     let item = this._getWrapper(aEvent.target);
     if (item) {
       item.removeAttribute("mousedown");
     }
   },
 
-  _getWrapper: function(aElement) {
+  _getWrapper(aElement) {
     while (aElement && aElement.localName != "toolbarpaletteitem") {
       if (aElement.localName == "toolbar")
         return null;
       aElement = aElement.parentNode;
     }
     return aElement;
   },
 
-  _showPanelCustomizationPlaceholders: function() {
+  _showPanelCustomizationPlaceholders() {
     let doc = this.document;
     let contents = this.panelUIContents;
     let narrowItemsAfterWideItem = 0;
     let node = contents.lastChild;
     while (node && !node.classList.contains(CustomizableUI.WIDE_PANEL_CLASS) &&
            (!node.firstChild || !node.firstChild.classList.contains(CustomizableUI.WIDE_PANEL_CLASS))) {
       if (!node.hidden && !node.classList.contains(kPlaceholderClass)) {
         narrowItemsAfterWideItem++;
@@ -2266,34 +2266,34 @@ CustomizeMode.prototype = {
       }
     } else if (placeholders < currentPlaceholderCount) {
       while (placeholders++ < currentPlaceholderCount) {
         contents.querySelectorAll("." + kPlaceholderClass)[0].remove();
       }
     }
   },
 
-  _removePanelCustomizationPlaceholders: function() {
+  _removePanelCustomizationPlaceholders() {
     let contents = this.panelUIContents;
     let oldPlaceholders = contents.getElementsByClassName(kPlaceholderClass);
     while (oldPlaceholders.length) {
       contents.removeChild(oldPlaceholders[0]);
     }
   },
 
   /**
    * Update toolbar customization targets during drag events to add or remove
    * outlines to indicate that an area is customizable.
    *
    * @param aWindow                       The XUL window in which outlines should be updated.
    * @param {Element} [aToolbarArea=null] The element of the customizable toolbar area to add the
    *                                      outline to. If aToolbarArea is falsy, the outline will be
    *                                      removed from all toolbar areas.
    */
-  _updateToolbarCustomizationOutline: function(aWindow, aToolbarArea = null) {
+  _updateToolbarCustomizationOutline(aWindow, aToolbarArea = null) {
     // Remove the attribute from existing customization targets
     for (let area of CustomizableUI.areas) {
       if (CustomizableUI.getAreaType(area) != CustomizableUI.TYPE_TOOLBAR) {
         continue;
       }
       let target = CustomizableUI.getCustomizeTargetForArea(area, aWindow);
       target.removeAttribute("customizing-dragovertarget");
     }
@@ -2302,17 +2302,17 @@ CustomizeMode.prototype = {
     if (aToolbarArea) {
       if (CustomizableUI.getAreaType(aToolbarArea.id) != CustomizableUI.TYPE_TOOLBAR)
         return;
       let target = CustomizableUI.getCustomizeTargetForArea(aToolbarArea.id, aWindow);
       target.setAttribute("customizing-dragovertarget", true);
     }
   },
 
-  _findVisiblePreviousSiblingNode: function(aReferenceNode) {
+  _findVisiblePreviousSiblingNode(aReferenceNode) {
     while (aReferenceNode &&
            aReferenceNode.localName == "toolbarpaletteitem" &&
            aReferenceNode.firstChild.hidden) {
       aReferenceNode = aReferenceNode.previousSibling;
     }
     return aReferenceNode;
   },
 };
--- a/browser/components/customizableui/DragPositionManager.jsm
+++ b/browser/components/customizableui/DragPositionManager.jsm
@@ -28,17 +28,17 @@ function AreaPositionManager(aContainer)
   this._horizontalDistance = null;
   this.update(aContainer);
 }
 
 AreaPositionManager.prototype = {
   _nodePositionStore: null,
   _wideCache: null,
 
-  update: function(aContainer) {
+  update(aContainer) {
     this._nodePositionStore = new WeakMap();
     this._wideCache = new Set();
     let last = null;
     let singleItemHeight;
     for (let child of aContainer.children) {
       if (child.hidden) {
         continue;
       }
@@ -68,17 +68,17 @@ AreaPositionManager.prototype = {
   /**
    * Find the closest node in the container given the coordinates.
    * "Closest" is defined in a somewhat strange manner: we prefer nodes
    * which are in the same row over nodes that are in a different row.
    * In order to implement this, we use a weighted cartesian distance
    * where dy is more heavily weighted by a factor corresponding to the
    * ratio between the container's width and the height of its elements.
    */
-  find: function(aContainer, aX, aY, aDraggedItemId) {
+  find(aContainer, aX, aY, aDraggedItemId) {
     let closest = null;
     let minCartesian = Number.MAX_VALUE;
     let containerX = this._containerInfo.left;
     let containerY = this._containerInfo.top;
     for (let node of aContainer.children) {
       let coordinates = this._lazyStoreGet(node);
       let offsetX = coordinates.x - containerX;
       let offsetY = coordinates.y - containerY;
@@ -125,17 +125,17 @@ AreaPositionManager.prototype = {
   },
 
   /**
    * "Insert" a "placeholder" by shifting the subsequent children out of the
    * way. We go through all the children, and shift them based on the position
    * they would have if we had inserted something before aBefore. We use CSS
    * transforms for this, which are CSS transitioned.
    */
-  insertPlaceholder: function(aContainer, aBefore, aWide, aSize, aIsFromThisArea) {
+  insertPlaceholder(aContainer, aBefore, aWide, aSize, aIsFromThisArea) {
     let isShifted = false;
     let shiftDown = aWide;
     for (let child of aContainer.children) {
       // Don't need to shift hidden nodes:
       if (child.getAttribute("hidden") == "true") {
         continue;
       }
       // If this is the node before which we're inserting, start shifting
@@ -180,33 +180,33 @@ AreaPositionManager.prototype = {
         child.removeAttribute("notransition");
       }
     }
     delete this.__moveDown;
     delete this.__undoShift;
     this._lastPlaceholderInsertion = aBefore;
   },
 
-  isWide: function(aNode) {
+  isWide(aNode) {
     return this._wideCache.has(aNode.id);
   },
 
-  _checkIfWide: function(aNode) {
+  _checkIfWide(aNode) {
     return this._inPanel && aNode && aNode.firstChild &&
            aNode.firstChild.classList.contains(CustomizableUI.WIDE_PANEL_CLASS);
   },
 
   /**
    * Reset all the transforms in this container, optionally without
    * transitioning them.
    * @param aContainer    the container in which to reset transforms
    * @param aNoTransition if truthy, adds a notransition attribute to the node
    *                      while resetting the transform.
    */
-  clearPlaceholders: function(aContainer, aNoTransition) {
+  clearPlaceholders(aContainer, aNoTransition) {
     for (let child of aContainer.children) {
       if (aNoTransition) {
         child.setAttribute("notransition", true);
       }
       child.style.transform = "";
       if (aNoTransition) {
         // Need to force a reflow otherwise this won't work.
         child.getBoundingClientRect();
@@ -215,25 +215,25 @@ AreaPositionManager.prototype = {
     }
     // We snapped back, so we can assume there's no more
     // "last" placeholder insertion point to keep track of.
     if (aNoTransition) {
       this._lastPlaceholderInsertion = null;
     }
   },
 
-  _getNextPos: function(aNode, aShiftDown, aSize) {
+  _getNextPos(aNode, aShiftDown, aSize) {
     // Shifting down is easy:
     if (this._inPanel && aShiftDown) {
       return "translate(0, " + aSize.height + "px)";
     }
     return this._diffWithNext(aNode, aSize);
   },
 
-  _diffWithNext: function(aNode, aSize) {
+  _diffWithNext(aNode, aSize) {
     let xDiff;
     let yDiff = null;
     let nodeBounds = this._lazyStoreGet(aNode);
     let side = this._dir == "ltr" ? "left" : "right";
     let next = this._getVisibleSiblingForDirection(aNode, "next");
     // First we determine the transform along the x axis.
     // Usually, there will be a next node to base this on:
     if (next) {
@@ -301,17 +301,17 @@ AreaPositionManager.prototype = {
 
   /**
    * Helper function to find the transform a node if there isn't a next node
    * to base that on.
    * @param aNode           the node to transform
    * @param aNodeBounds     the bounding rect info of this node
    * @param aFirstNodeInRow the first node in aNode's row
    */
-  _moveNextBasedOnPrevious: function(aNode, aNodeBounds, aFirstNodeInRow) {
+  _moveNextBasedOnPrevious(aNode, aNodeBounds, aFirstNodeInRow) {
     let next = this._getVisibleSiblingForDirection(aNode, "previous");
     let otherBounds = this._lazyStoreGet(next);
     let side = this._dir == "ltr" ? "left" : "right";
     let xDiff = aNodeBounds[side] - otherBounds[side];
     // If, however, this means we move outside the container's box
     // (i.e. the row in which this item is placed is full)
     // we should move it to align with the first item in the next row instead
     let bound = this._containerInfo[this._dir == "ltr" ? "right" : "left"];
@@ -323,17 +323,17 @@ AreaPositionManager.prototype = {
   },
 
   /**
    * Get position details from our cache. If the node is not yet cached, get its position
    * information and cache it now.
    * @param aNode  the node whose position info we want
    * @return the position info
    */
-  _lazyStoreGet: function(aNode) {
+  _lazyStoreGet(aNode) {
     let rect = this._nodePositionStore.get(aNode);
     if (!rect) {
       // getBoundingClientRect() returns a DOMRect that is live, meaning that
       // as the element moves around, the rects values change. We don't want
       // that - we want a snapshot of what the rect values are right at this
       // moment, and nothing else. So we have to clone the values.
       let clientRect = aNode.getBoundingClientRect();
       rect = {
@@ -347,74 +347,74 @@ AreaPositionManager.prototype = {
       rect.x = rect.left + rect.width / 2;
       rect.y = rect.top + rect.height / 2;
       Object.freeze(rect);
       this._nodePositionStore.set(aNode, rect);
     }
     return rect;
   },
 
-  _firstInRow: function(aNode) {
+  _firstInRow(aNode) {
     // XXXmconley: I'm not entirely sure why we need to take the floor of these
     // values - it looks like, periodically, we're getting fractional pixels back
     // from lazyStoreGet. I've filed bug 994247 to investigate.
     let bound = Math.floor(this._lazyStoreGet(aNode).top);
     let rv = aNode;
     let prev;
     while (rv && (prev = this._getVisibleSiblingForDirection(rv, "previous"))) {
       if (Math.floor(this._lazyStoreGet(prev).bottom) <= bound) {
         return rv;
       }
       rv = prev;
     }
     return rv;
   },
 
-  _getVisibleSiblingForDirection: function(aNode, aDirection) {
+  _getVisibleSiblingForDirection(aNode, aDirection) {
     let rv = aNode;
     do {
       rv = rv[aDirection + "Sibling"];
     } while (rv && rv.getAttribute("hidden") == "true")
     return rv;
   }
 }
 
 var DragPositionManager = {
-  start: function(aWindow) {
+  start(aWindow) {
     let areas = CustomizableUI.areas.filter((area) => CustomizableUI.getAreaType(area) != "toolbar");
     areas = areas.map((area) => CustomizableUI.getCustomizeTargetForArea(area, aWindow));
     areas.push(aWindow.document.getElementById(kPaletteId));
     for (let areaNode of areas) {
       let positionManager = gManagers.get(areaNode);
       if (positionManager) {
         positionManager.update(areaNode);
       } else {
         gManagers.set(areaNode, new AreaPositionManager(areaNode));
       }
     }
   },
 
-  add: function(aWindow, aArea, aContainer) {
+  add(aWindow, aArea, aContainer) {
     if (CustomizableUI.getAreaType(aArea) != "toolbar") {
       return;
     }
 
     gManagers.set(aContainer, new AreaPositionManager(aContainer));
   },
 
-  remove: function(aWindow, aArea, aContainer) {
+  remove(aWindow, aArea, aContainer) {
     if (CustomizableUI.getAreaType(aArea) != "toolbar") {
       return;
     }
 
     gManagers.delete(aContainer);
   },
 
-  stop: function() {
+  stop() {
     gManagers = new WeakMap();
   },
 
-  getManagerForArea: function(aArea) {
+  getManagerForArea(aArea) {
     return gManagers.get(aArea);
   }
 };
 
 Object.freeze(DragPositionManager);
--- a/browser/components/customizableui/PanelWideWidgetTracker.jsm
+++ b/browser/components/customizableui/PanelWideWidgetTracker.jsm
@@ -17,56 +17,56 @@ var gPanelPlacements = [];
 
 // All the wide widgets we know of:
 var gWideWidgets = new Set();
 // All the widgets we know of:
 var gSeenWidgets = new Set();
 
 var PanelWideWidgetTracker = {
   // Listeners used to validate panel contents whenever they change:
-  onWidgetAdded: function(aWidgetId, aArea, aPosition) {
+  onWidgetAdded(aWidgetId, aArea, aPosition) {
     if (aArea == gPanel) {
       gPanelPlacements = CustomizableUI.getWidgetIdsInArea(gPanel);
       let moveForward = this.shouldMoveForward(aWidgetId, aPosition);
       this.adjustWidgets(aWidgetId, moveForward);
     }
   },
-  onWidgetMoved: function(aWidgetId, aArea, aOldPosition, aNewPosition) {
+  onWidgetMoved(aWidgetId, aArea, aOldPosition, aNewPosition) {
     if (aArea == gPanel) {
       gPanelPlacements = CustomizableUI.getWidgetIdsInArea(gPanel);
       let moveForward = this.shouldMoveForward(aWidgetId, aNewPosition);
       this.adjustWidgets(aWidgetId, moveForward);
     }
   },
-  onWidgetRemoved: function(aWidgetId, aPrevArea) {
+  onWidgetRemoved(aWidgetId, aPrevArea) {
     if (aPrevArea == gPanel) {
       gPanelPlacements = CustomizableUI.getWidgetIdsInArea(gPanel);
       this.adjustWidgets(aWidgetId, false);
     }
   },
-  onWidgetReset: function(aWidgetId) {
+  onWidgetReset(aWidgetId) {
     gPanelPlacements = CustomizableUI.getWidgetIdsInArea(gPanel);
   },
   // Listener to keep abreast of any new nodes. We use the DOM one because
   // we need access to the actual node's classlist, so we can't use the ones above.
   // Furthermore, onWidgetCreated only fires for API-based widgets, not for XUL ones.
-  onWidgetAfterDOMChange: function(aNode, aNextNode, aContainer) {
+  onWidgetAfterDOMChange(aNode, aNextNode, aContainer) {
     if (!gSeenWidgets.has(aNode.id)) {
       if (aNode.classList.contains(CustomizableUI.WIDE_PANEL_CLASS)) {
         gWideWidgets.add(aNode.id);
       }
       gSeenWidgets.add(aNode.id);
     }
   },
   // When widgets get destroyed, we remove them from our sets of stuff we care about:
-  onWidgetDestroyed: function(aWidgetId) {
+  onWidgetDestroyed(aWidgetId) {
     gSeenWidgets.delete(aWidgetId);
     gWideWidgets.delete(aWidgetId);
   },
-  shouldMoveForward: function(aWidgetId, aPosition) {
+  shouldMoveForward(aWidgetId, aPosition) {
     let currentWidgetAtPosition = gPanelPlacements[aPosition + 1];
     let rv = gWideWidgets.has(currentWidgetAtPosition) && !gWideWidgets.has(aWidgetId);
     // We might now think we can move forward, but for that we need at least 2 more small
     // widgets to be present:
     if (rv) {
       let furtherWidgets = gPanelPlacements.slice(aPosition + 2);
       let realWidgets = 0;
       if (furtherWidgets.length >= 2) {
@@ -78,17 +78,17 @@ var PanelWideWidgetTracker = {
         }
       }
       if (realWidgets < 2) {
         rv = false;
       }
     }
     return rv;
   },
-  adjustWidgets: function(aWidgetId, aMoveForwards) {
+  adjustWidgets(aWidgetId, aMoveForwards) {
     if (this.adjusting) {
       return;
     }
     this.adjusting = true;
     let widgetsAffected = gPanelPlacements.filter((w) => gWideWidgets.has(w));
     // If we're moving the wide widgets forwards (down/to the right in the panel)
     // we want to start with the last widgets. Otherwise we move widgets over other wide
     // widgets, which might mess up their order. Likewise, if moving backwards we should start with
@@ -99,17 +99,17 @@ var PanelWideWidgetTracker = {
     for (let widget of widgetsAffected) {
       this.adjustPosition(widget, aMoveForwards);
     }
     this.adjusting = false;
   },
   // This function is called whenever an item gets moved in the menu panel. It
   // adjusts the position of widgets within the panel to prevent "gaps" between
   // wide widgets that could be filled up with single column widgets
-  adjustPosition: function(aWidgetId, aMoveForwards) {
+  adjustPosition(aWidgetId, aMoveForwards) {
     // Make sure that there are n % columns = 0 narrow buttons before the widget.
     let placementIndex = gPanelPlacements.indexOf(aWidgetId);
     let prevSiblingCount = 0;
     let fixedPos = null;
     while (placementIndex--) {
       let thisWidgetId = gPanelPlacements[placementIndex];
       if (gWideWidgets.has(thisWidgetId)) {
         continue;
@@ -139,17 +139,17 @@ var PanelWideWidgetTracker = {
   },
 
   /*
    * Check whether a widget id is actually known anywhere.
    * @returns false if the widget doesn't exist,
    *          "public-only" if it's not shown in private windows
    *          "real" if it does exist and is shown even in private windows
    */
-  checkWidgetStatus: function(aWidgetId) {
+  checkWidgetStatus(aWidgetId) {
     let widgetWrapper = CustomizableUI.getWidget(aWidgetId);
     // This widget might not actually exist:
     if (!widgetWrapper) {
       return false;
     }
     // This widget might still not actually exist:
     if (widgetWrapper.provider == CustomizableUI.PROVIDER_XUL &&
         widgetWrapper.instances.length == 0) {
@@ -159,14 +159,14 @@ var PanelWideWidgetTracker = {
     // Or it might only be there some of the time:
     if (widgetWrapper.provider == CustomizableUI.PROVIDER_API &&
         widgetWrapper.showInPrivateBrowsing === false) {
       return "public-only";
     }
     return "real";
   },
 
-  init: function() {
+  init() {
     // Initialize our local placements copy and register the listener
     gPanelPlacements = CustomizableUI.getWidgetIdsInArea(gPanel);
     CustomizableUI.addListener(this);
   },
 };
--- a/browser/components/customizableui/ScrollbarSampler.jsm
+++ b/browser/components/customizableui/ScrollbarSampler.jsm
@@ -9,34 +9,34 @@ this.EXPORTED_SYMBOLS = ["ScrollbarSampl
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 var gSystemScrollbarWidth = null;
 
 this.ScrollbarSampler = {
-  getSystemScrollbarWidth: function() {
+  getSystemScrollbarWidth() {
     if (gSystemScrollbarWidth !== null) {
       return Promise.resolve(gSystemScrollbarWidth);
     }
 
     return new Promise(resolve => {
       this._sampleSystemScrollbarWidth().then(function(systemScrollbarWidth) {
         gSystemScrollbarWidth = systemScrollbarWidth;
         resolve(gSystemScrollbarWidth);
       });
     });
   },
 
-  resetSystemScrollbarWidth: function() {
+  resetSystemScrollbarWidth() {
     gSystemScrollbarWidth = null;
   },
 
-  _sampleSystemScrollbarWidth: function() {
+  _sampleSystemScrollbarWidth() {
     let hwin = Services.appShell.hiddenDOMWindow;
     let hdoc = hwin.document.documentElement;
     let iframe = hwin.document.createElementNS("http://www.w3.org/1999/xhtml",
                                                "html:iframe");
     iframe.setAttribute("srcdoc", '<body style="overflow-y: scroll"></body>');
     hdoc.appendChild(iframe);
 
     let cwindow = iframe.contentWindow;
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -32,17 +32,17 @@ const PanelUI = {
       helpView: "PanelUI-helpView",
       menuButton: "PanelUI-menu-button",
       panel: "PanelUI-popup",
       scroller: "PanelUI-contents-scroller"
     };
   },
 
   _initialized: false,
-  init: function() {
+  init() {
     for (let [k, v] of Object.entries(this.kElements)) {
       // Need to do fresh let-bindings per iteration
       let getKey = k;
       let id = v;
       this.__defineGetter__(getKey, function() {
         delete this[getKey];
         return this[getKey] = document.getElementById(id);
       });
@@ -52,32 +52,32 @@ const PanelUI = {
     this.menuButton.addEventListener("keypress", this);
     this._overlayScrollListenerBoundFn = this._overlayScrollListener.bind(this);
     window.matchMedia("(-moz-overlay-scrollbars)").addListener(this._overlayScrollListenerBoundFn);
     CustomizableUI.addListener(this);
     this._initialized = true;
   },
 
   _eventListenersAdded: false,
-  _ensureEventListenersAdded: function() {
+  _ensureEventListenersAdded() {
     if (this._eventListenersAdded)
       return;
     this._addEventListeners();
   },
 
-  _addEventListeners: function() {
+  _addEventListeners() {
     for (let event of this.kEvents) {
       this.panel.addEventListener(event, this);
     }
 
     this.helpView.addEventListener("ViewShowing", this._onHelpViewShow, false);
     this._eventListenersAdded = true;
   },
 
-  uninit: function() {
+  uninit() {
     for (let event of this.kEvents) {
       this.panel.removeEventListener(event, this);
     }
     this.helpView.removeEventListener("ViewShowing", this._onHelpViewShow);
     this.menuButton.removeEventListener("mousedown", this);
     this.menuButton.removeEventListener("keypress", this);
     window.matchMedia("(-moz-overlay-scrollbars)").removeListener(this._overlayScrollListenerBoundFn);
     CustomizableUI.removeListener(this);
@@ -87,28 +87,28 @@ const PanelUI = {
   /**
    * Customize mode extracts the mainView and puts it somewhere else while the
    * user customizes. Upon completion, this function can be called to put the
    * panel back to where it belongs in normal browsing mode.
    *
    * @param aMainView
    *        The mainView node to put back into place.
    */
-  setMainView: function(aMainView) {
+  setMainView(aMainView) {
     this._ensureEventListenersAdded();
     this.multiView.setMainView(aMainView);
   },
 
   /**
    * Opens the menu panel if it's closed, or closes it if it's
    * open.
    *
    * @param aEvent the event that triggers the toggle.
    */
-  toggle: function(aEvent) {
+  toggle(aEvent) {
     // Don't show the panel if the window is in customization mode,
     // since this button doubles as an exit path for the user in this case.
     if (document.documentElement.hasAttribute("customizing")) {
       return;
     }
     this._ensureEventListenersAdded();
     if (this.panel.state == "open") {
       this.hide();
@@ -119,17 +119,17 @@ const PanelUI = {
 
   /**
    * Opens the menu panel. If the event target has a child with the
    * toolbarbutton-icon attribute, the panel will be anchored on that child.
    * Otherwise, the panel is anchored on the event target itself.
    *
    * @param aEvent the event (if any) that triggers showing the menu.
    */
-  show: function(aEvent) {
+  show(aEvent) {
     return new Promise(resolve => {
       this.ensureReady().then(() => {
         if (this.panel.state == "open" ||
             document.documentElement.hasAttribute("customizing")) {
           resolve();
           return;
         }
 
@@ -165,25 +165,25 @@ const PanelUI = {
         console.error("Error showing the PanelUI menu", reason);
       });
     });
   },
 
   /**
    * If the menu panel is being shown, hide it.
    */
-  hide: function() {
+  hide() {
     if (document.documentElement.hasAttribute("customizing")) {
       return;
     }
 
     this.panel.hidePopup();
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     // Ignore context menus and menu button menus showing and hiding:
     if (aEvent.type.startsWith("popup") &&
         aEvent.target != this.panel) {
       return;
     }
     switch (aEvent.type) {
       case "popupshowing":
         this._adjustLabelsForAutoHyphens();
@@ -216,17 +216,17 @@ const PanelUI = {
    * by the user.
    *
    * @param aCustomizing (optional) set to true if this was called while entering
    *        customization mode. If that's the case, we trust that customization
    *        mode will handle calling beginBatchUpdate and endBatchUpdate.
    *
    * @return a Promise that resolves once the panel is ready to roll.
    */
-  ensureReady: function(aCustomizing = false) {
+  ensureReady(aCustomizing = false) {
     if (this._readyPromise) {
       return this._readyPromise;
     }
     this._readyPromise = Task.spawn(function*() {
       if (!this._initialized) {
         yield new Promise(resolve => {
           let delayedStartupObserver = (aSubject, aTopic, aData) => {
             if (aSubject == window) {
@@ -277,26 +277,26 @@ const PanelUI = {
 
     return this._readyPromise;
   },
 
   /**
    * Switch the panel to the main view if it's not already
    * in that view.
    */
-  showMainView: function() {
+  showMainView() {
     this._ensureEventListenersAdded();
     this.multiView.showMainView();
   },
 
   /**
    * Switch the panel to the help view if it's not already
    * in that view.
    */
-  showHelpView: function(aAnchor) {
+  showHelpView(aAnchor) {
     this._ensureEventListenersAdded();
     this.multiView.showSubView("PanelUI-helpView", aAnchor);
   },
 
   /**
    * Shows a subview in the panel with a given ID.
    *
    * @param aViewId the ID of the subview to show.
@@ -405,64 +405,64 @@ const PanelUI = {
     }
   }),
 
   /**
    * NB: The enable- and disableSingleSubviewPanelAnimations methods only
    * affect the hiding/showing animations of single-subview panels (tempPanel
    * in the showSubView method).
    */
-  disableSingleSubviewPanelAnimations: function() {
+  disableSingleSubviewPanelAnimations() {
     this._disableAnimations = true;
   },
 
-  enableSingleSubviewPanelAnimations: function() {
+  enableSingleSubviewPanelAnimations() {
     this._disableAnimations = false;
   },
 
-  onWidgetAfterDOMChange: function(aNode, aNextNode, aContainer, aWasRemoval) {
+  onWidgetAfterDOMChange(aNode, aNextNode, aContainer, aWasRemoval) {
     if (aContainer != this.contents) {
       return;
     }
     if (aWasRemoval) {
       aNode.removeAttribute("auto-hyphens");
     }
   },
 
-  onWidgetBeforeDOMChange: function(aNode, aNextNode, aContainer, aIsRemoval) {
+  onWidgetBeforeDOMChange(aNode, aNextNode, aContainer, aIsRemoval) {
     if (aContainer != this.contents) {
       return;
     }
     if (!aIsRemoval &&
         (this.panel.state == "open" ||
          document.documentElement.hasAttribute("customizing"))) {
       this._adjustLabelsForAutoHyphens(aNode);
     }
   },
 
   /**
    * Signal that we're about to make a lot of changes to the contents of the
    * panels all at once. For performance, we ignore the mutations.
    */
-  beginBatchUpdate: function() {
+  beginBatchUpdate() {
     this._ensureEventListenersAdded();
     this.multiView.ignoreMutations = true;
   },
 
   /**
    * Signal that we're done making bulk changes to the panel. We now pay
    * attention to mutations. This automatically synchronizes the multiview
    * container with whichever view is displayed if the panel is open.
    */
-  endBatchUpdate: function(aReason) {
+  endBatchUpdate(aReason) {
     this._ensureEventListenersAdded();
     this.multiView.ignoreMutations = false;
   },
 
-  _adjustLabelsForAutoHyphens: function(aNode) {
+  _adjustLabelsForAutoHyphens(aNode) {
     let toolbarButtons = aNode ? [aNode] :
                                  this.contents.querySelectorAll(".toolbarbutton-1");
     for (let node of toolbarButtons) {
       let label = node.getAttribute("label");
       if (!label) {
         continue;
       }
       if (label.includes("\u00ad")) {
@@ -472,22 +472,22 @@ const PanelUI = {
       }
     }
   },
 
   /**
    * Sets the anchor node into the open or closed state, depending
    * on the state of the panel.
    */
-  _updatePanelButton: function() {
+  _updatePanelButton() {
     this.menuButton.open = this.panel.state == "open" ||
                            this.panel.state == "showing";
   },
 
-  _onHelpViewShow: function(aEvent) {
+  _onHelpViewShow(aEvent) {
     // Call global menu setup function
     buildHelpMenu();
 
     let helpMenu = document.getElementById("menu_HelpPopup");
     let items = this.getElementsByTagName("vbox")[0];
     let attrs = ["oncommand", "onclick", "label", "key", "disabled"];
     let NSXUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
@@ -510,17 +510,17 @@ const PanelUI = {
         button.setAttribute(attrName, node.getAttribute(attrName));
       }
       button.setAttribute("class", "subviewbutton");
       fragment.appendChild(button);
     }
     items.appendChild(fragment);
   },
 
-  _updateQuitTooltip: function() {
+  _updateQuitTooltip() {
     if (AppConstants.platform == "win") {
       return;
     }
 
     let tooltipId = AppConstants.platform == "macosx" ?
                     "quit-button.tooltiptext.mac" :
                     "quit-button.tooltiptext.linux2";
 
@@ -530,17 +530,17 @@ const PanelUI = {
     let key = document.getElementById("key_quitApplication");
     stringArgs.push(ShortcutUtils.prettifyShortcut(key));
     let tooltipString = CustomizableUI.getLocalizedProperty({x: tooltipId}, "x", stringArgs);
     let quitButton = document.getElementById("PanelUI-quit");
     quitButton.setAttribute("tooltiptext", tooltipString);
   },
 
   _overlayScrollListenerBoundFn: null,
-  _overlayScrollListener: function(aMQL) {
+  _overlayScrollListener(aMQL) {
     ScrollbarSampler.resetSystemScrollbarWidth();
     this._scrollWidth = null;
   },
 };
 
 XPCOMUtils.defineConstant(this, "PanelUI", PanelUI);
 
 /**
--- a/browser/components/customizableui/test/browser_1003588_no_specials_in_panel.js
+++ b/browser/components/customizableui/test/browser_1003588_no_specials_in_panel.js
@@ -7,17 +7,17 @@ function simulateItemDragAndEnd(aToDrag,
   var ds = Components.classes["@mozilla.org/widget/dragservice;1"].
            getService(Components.interfaces.nsIDragService);
 
   ds.startDragSession();
   try {
     var [result, dataTransfer] = EventUtils.synthesizeDragOver(aToDrag.parentNode, aTarget);
     EventUtils.synthesizeDropAfterDragOver(result, dataTransfer, aTarget);
     // Send dragend to move dragging item back to initial place.
-    EventUtils.sendDragEvent({ type: "dragend", dataTransfer: dataTransfer },
+    EventUtils.sendDragEvent({ type: "dragend", dataTransfer },
                              aToDrag.parentNode);
   } finally {
     ds.endDragSession(true);
   }
 }
 
 add_task(function* checkNoAddingToPanel() {
   let area = CustomizableUI.AREA_PANEL;
--- a/browser/components/customizableui/test/browser_877006_missing_view.js
+++ b/browser/components/customizableui/test/browser_877006_missing_view.js
@@ -7,17 +7,17 @@
 // Should be able to add broken view widget
 add_task(function testAddbrokenViewWidget() {
   const kWidgetId = 'test-877006-broken-widget';
   let widgetSpec = {
     id: kWidgetId,
     type: 'view',
     viewId: 'idontexist',
     /* Empty handler so we try to attach it maybe? */
-    onViewShowing: function() {
+    onViewShowing() {
     }
   };
 
   let noError = true;
   try {
     CustomizableUI.createWidget(widgetSpec);
     CustomizableUI.addWidgetToArea(kWidgetId, CustomizableUI.AREA_NAVBAR);
   } catch (ex) {
--- a/browser/components/customizableui/test/browser_942581_unregisterArea_keeps_placements.js
+++ b/browser/components/customizableui/test/browser_942581_unregisterArea_keeps_placements.js
@@ -10,17 +10,17 @@ const kTestWidgetCount = 3;
 registerCleanupFunction(removeCustomToolbars);
 
 // unregisterArea should keep placements by default and restore them when re-adding the area
 add_task(function*() {
   let widgetIds = [];
   for (let i = 0; i < kTestWidgetCount; i++) {
     let id = kTestWidgetPfx + i;
     widgetIds.push(id);
-    let spec = {id: id, type: 'button', removable: true, label: "unregisterArea test", tooltiptext: "" + i};
+    let spec = {id, type: 'button', removable: true, label: "unregisterArea test", tooltiptext: "" + i};
     CustomizableUI.createWidget(spec);
   }
   for (let i = kTestWidgetCount; i < kTestWidgetCount * 2; i++) {
     let id = kTestWidgetPfx + i;
     widgetIds.push(id);
     createDummyXULButton(id, "unregisterArea XUL test " + i);
   }
   let toolbarNode = createToolbarWithPlacements(kToolbarName, widgetIds);
--- a/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js
+++ b/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js
@@ -9,17 +9,17 @@ add_task(function*() {
 
   yield PanelUI.show();
   info("Menu panel was opened");
 
   let windowWasHandled = false;
   let privateWindow = null;
 
   let observerWindowOpened = {
-    observe: function(aSubject, aTopic, aData) {
+    observe(aSubject, aTopic, aData) {
       if (aTopic == "domwindowopened") {
         privateWindow = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
         privateWindow.addEventListener("load", function newWindowHandler() {
           privateWindow.removeEventListener("load", newWindowHandler, false);
           is(privateWindow.location.href, "chrome://browser/content/browser.xul",
              "A new browser window was opened");
           ok(PrivateBrowsingUtils.isWindowPrivate(privateWindow), "Window is private");
           windowWasHandled = true;
--- a/browser/components/customizableui/test/browser_947914_button_newWindow.js
+++ b/browser/components/customizableui/test/browser_947914_button_newWindow.js
@@ -8,17 +8,17 @@ add_task(function*() {
   info("Check new window button existence and functionality");
   yield PanelUI.show();
   info("Menu panel was opened");
 
   let windowWasHandled = false;
   let newWindow = null;
 
   let observerWindowOpened = {
-    observe: function(aSubject, aTopic, aData) {
+    observe(aSubject, aTopic, aData) {
       if (aTopic == "domwindowopened") {
         newWindow = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
         newWindow.addEventListener("load", function newWindowHandler() {
           newWindow.removeEventListener("load", newWindowHandler, false);
           is(newWindow.location.href, "chrome://browser/content/browser.xul",
              "A new browser window was opened");
           ok(!PrivateBrowsingUtils.isWindowPrivate(newWindow), "Window is not private");
           windowWasHandled = true;
--- a/browser/components/customizableui/test/browser_973641_button_addon.js
+++ b/browser/components/customizableui/test/browser_973641_button_addon.js
@@ -9,17 +9,17 @@ var initialLocation = gBrowser.currentUR
 
 add_task(function*() {
   info("Check addon button functionality");
 
   // create mocked addon button on the navigation bar
   let widgetSpec = {
     id: kButton,
     type: 'button',
-    onClick: function() {
+    onClick() {
       gBrowser.selectedTab = gBrowser.addTab("about:addons");
     }
   };
   CustomizableUI.createWidget(widgetSpec);
   CustomizableUI.addWidgetToArea(kButton, CustomizableUI.AREA_NAVBAR);
 
   // check the button's functionality in navigation bar
   let addonButton = document.getElementById(kButton);
--- a/browser/components/customizableui/test/browser_976792_insertNodeInWindow.js
+++ b/browser/components/customizableui/test/browser_976792_insertNodeInWindow.js
@@ -15,17 +15,17 @@ exists-1,trying-to-insert-this,doesn't-e
 */
 add_task(function*() {
   let testWidgetExists = [true, false, false, true];
   let widgetIds = [];
   for (let i = 0; i < testWidgetExists.length; i++) {
     let id = kTestWidgetPrefix + i;
     widgetIds.push(id);
     if (testWidgetExists[i]) {
-      let spec = {id: id, type: "button", removable: true, label: "test", tooltiptext: "" + i};
+      let spec = {id, type: "button", removable: true, label: "test", tooltiptext: "" + i};
       CustomizableUI.createWidget(spec);
     }
   }
 
   let toolbarNode = createToolbarWithPlacements(kToolbarName, widgetIds);
   assertAreaPlacements(kToolbarName, widgetIds);
 
   let btnId = kTestWidgetPrefix + 1;
@@ -52,17 +52,17 @@ exists-1,exists-2,overflow-1,trying-to-i
 */
 add_task(function*() {
   let navbar = document.getElementById(CustomizableUI.AREA_NAVBAR);
 
   let widgetIds = [];
   for (let i = 0; i < 5; i++) {
     let id = kTestWidgetPrefix + i;
     widgetIds.push(id);
-    let spec = {id: id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i};
+    let spec = {id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i};
     CustomizableUI.createWidget(spec);
     CustomizableUI.addWidgetToArea(id, "nav-bar");
   }
 
   for (let id of widgetIds) {
     document.getElementById(id).style.minWidth = "200px";
   }
 
@@ -101,17 +101,17 @@ exists-1,exists-2,overflow-1,doesn't-exi
 */
 add_task(function*() {
   let navbar = document.getElementById(CustomizableUI.AREA_NAVBAR);
 
   let widgetIds = [];
   for (let i = 0; i < 5; i++) {
     let id = kTestWidgetPrefix + i;
     widgetIds.push(id);
-    let spec = {id: id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i};
+    let spec = {id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i};
     CustomizableUI.createWidget(spec);
     CustomizableUI.addWidgetToArea(id, "nav-bar");
   }
 
   for (let id of widgetIds) {
     document.getElementById(id).style.minWidth = "200px";
   }
 
@@ -151,17 +151,17 @@ exists-1,exists-2,overflow-1,doesn't-exi
 */
 add_task(function*() {
   let navbar = document.getElementById(CustomizableUI.AREA_NAVBAR);
 
   let widgetIds = [];
   for (let i = 0; i < 5; i++) {
     let id = kTestWidgetPrefix + i;
     widgetIds.push(id);
-    let spec = {id: id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i};
+    let spec = {id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i};
     CustomizableUI.createWidget(spec);
     CustomizableUI.addWidgetToArea(id, "nav-bar");
   }
 
   for (let id of widgetIds) {
     document.getElementById(id).style.minWidth = "200px";
   }
 
@@ -202,25 +202,25 @@ exists-1,exists-2,overflow-1,can't-overf
 */
 add_task(function*() {
   let navbar = document.getElementById(CustomizableUI.AREA_NAVBAR);
 
   let widgetIds = [];
   for (let i = 5; i >= 0; i--) {
     let id = kTestWidgetPrefix + i;
     widgetIds.push(id);
-    let spec = {id: id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i};
+    let spec = {id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i};
     CustomizableUI.createWidget(spec);
     CustomizableUI.addWidgetToArea(id, "nav-bar", 0);
   }
 
   for (let i = 10; i < 15; i++) {
     let id = kTestWidgetPrefix + i;
     widgetIds.push(id);
-    let spec = {id: id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i};
+    let spec = {id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i};
     CustomizableUI.createWidget(spec);
     CustomizableUI.addWidgetToArea(id, "nav-bar");
   }
 
   for (let id of widgetIds) {
     document.getElementById(id).style.minWidth = "200px";
   }
 
@@ -264,18 +264,18 @@ add_task(function*() {
   let missingId = 2;
   let nonOverflowableId = 3;
   for (let i = 0; i < 5; i++) {
     let id = kTestWidgetPrefix + i;
     widgetIds.push(id);
     if (i != missingId) {
       // Setting min-width to make the overflow state not depend on styling of the button and/or
       // screen width
-      let spec = {id: id, type: "button", removable: true, label: "test", tooltiptext: "" + i,
-                  onCreated: function(node) {
+      let spec = {id, type: "button", removable: true, label: "test", tooltiptext: "" + i,
+                  onCreated(node) {
                     node.style.minWidth = "200px";
                     if (id == (kTestWidgetPrefix + nonOverflowableId)) {
                       node.setAttribute("overflows", false);
                     }
                  }};
       info("Creating: " + id);
       CustomizableUI.createWidget(spec);
     }
@@ -320,18 +320,18 @@ add_task(function*() {
   let widgetIds = [];
   let missingId = 1;
   for (let i = 0; i < 5; i++) {
     let id = kTestWidgetPrefix + i;
     widgetIds.push(id);
     if (i != missingId) {
       // Setting min-width to make the overflow state not depend on styling of the button and/or
       // screen width
-      let spec = {id: id, type: "button", removable: true, label: "test", tooltiptext: "" + i,
-                  onCreated: function(node) { node.style.minWidth = "100px"; }};
+      let spec = {id, type: "button", removable: true, label: "test", tooltiptext: "" + i,
+                  onCreated(node) { node.style.minWidth = "100px"; }};
       info("Creating: " + id);
       CustomizableUI.createWidget(spec);
     }
   }
 
   let toolbarNode = createOverflowableToolbarWithPlacements(kToolbarName, widgetIds);
   assertAreaPlacements(kToolbarName, widgetIds);
   ok(!toolbarNode.hasAttribute("overflowing"), "Toolbar shouldn't overflow to start with.");
@@ -369,18 +369,18 @@ add_task(function*() {
   let widgetIds = [];
   let missingId = 3;
   for (let i = 0; i < 5; i++) {
     let id = kTestWidgetPrefix + i;
     widgetIds.push(id);
     if (i != missingId) {
       // Setting min-width to make the overflow state not depend on styling of the button and/or
       // screen width
-      let spec = {id: id, type: "button", removable: true, label: "test", tooltiptext: "" + i,
-                  onCreated: function(node) { node.style.minWidth = "200px"; }};
+      let spec = {id, type: "button", removable: true, label: "test", tooltiptext: "" + i,
+                  onCreated(node) { node.style.minWidth = "200px"; }};
       info("Creating: " + id);
       CustomizableUI.createWidget(spec);
     }
   }
 
   let toolbarNode = createOverflowableToolbarWithPlacements(kToolbarName, widgetIds);
   assertAreaPlacements(kToolbarName, widgetIds);
   ok(!toolbarNode.hasAttribute("overflowing"), "Toolbar shouldn't overflow to start with.");
--- a/browser/components/customizableui/test/browser_980155_add_overflow_toolbar.js
+++ b/browser/components/customizableui/test/browser_980155_add_overflow_toolbar.js
@@ -9,17 +9,17 @@ const kTestWidgetPrefix = "test-widget-f
 
 add_task(function* addOverflowingToolbar() {
   let originalWindowWidth = window.outerWidth;
 
   let widgetIds = [];
   for (let i = 0; i < 10; i++) {
     let id = kTestWidgetPrefix + i;
     widgetIds.push(id);
-    let spec = {id: id, type: "button", removable: true, label: "test", tooltiptext: "" + i};
+    let spec = {id, type: "button", removable: true, label: "test", tooltiptext: "" + i};
     CustomizableUI.createWidget(spec);
   }
 
   let toolbarNode = createOverflowableToolbarWithPlacements(kToolbarName, widgetIds);
   assertAreaPlacements(kToolbarName, widgetIds);
 
   for (let id of widgetIds) {
     document.getElementById(id).style.minWidth = "200px";
--- a/browser/components/customizableui/test/browser_981418-widget-onbeforecreated-handler.js
+++ b/browser/components/customizableui/test/browser_981418-widget-onbeforecreated-handler.js
@@ -8,27 +8,27 @@ const kWidgetId = 'test-981418-widget-on
 // Should be able to add broken view widget
 add_task(function* testAddOnBeforeCreatedWidget() {
   let viewShownDeferred = Promise.defer();
   let onBeforeCreatedCalled = false;
   let widgetSpec = {
     id: kWidgetId,
     type: 'view',
     viewId: kWidgetId + 'idontexistyet',
-    onBeforeCreated: function(doc) {
+    onBeforeCreated(doc) {
       let view = doc.createElement("panelview");
       view.id = kWidgetId + 'idontexistyet';
       let label = doc.createElement("label");
       label.setAttribute("value", "Hello world");
       label.className = 'panel-subview-header';
       view.appendChild(label);
       document.getElementById("PanelUI-multiView").appendChild(view);
       onBeforeCreatedCalled = true;
     },
-    onViewShowing: function() {
+    onViewShowing() {
       viewShownDeferred.resolve();
     }
   };
 
   let noError = true;
   try {
     CustomizableUI.createWidget(widgetSpec);
     CustomizableUI.addWidgetToArea(kWidgetId, CustomizableUI.AREA_NAVBAR);
--- a/browser/components/customizableui/test/browser_987492_window_api.js
+++ b/browser/components/customizableui/test/browser_987492_window_api.js
@@ -11,17 +11,17 @@ add_task(function* testOneWindow() {
     windows.push(win);
   is(windows.length, 1, "Should have one customizable window");
 });
 
 
 add_task(function* testOpenCloseWindow() {
   let newWindow = null;
   let openListener = {
-    onWindowOpened: function(window) {
+    onWindowOpened(window) {
       newWindow = window;
     }
   }
   CustomizableUI.addListener(openListener);
 
   {
     let win = yield openAndLoadWindow(null, true);
     is(newWindow, win, "onWindowOpen event should have received expected window");
@@ -34,17 +34,17 @@ add_task(function* testOpenCloseWindow()
   for (let win of CustomizableUI.windows)
     windows.push(win);
   is(windows.length, 2, "Should have two customizable windows");
   isnot(windows.indexOf(window), -1, "Current window should be in window collection.");
   isnot(windows.indexOf(newWindow), -1, "New window should be in window collection.");
 
   let closedWindow = null;
   let closeListener = {
-    onWindowClosed: function(window) {
+    onWindowClosed(window) {
       closedWindow = window;
     }
   }
   CustomizableUI.addListener(closeListener);
   yield promiseWindowClosed(newWindow);
   isnot(closedWindow, null, "Should have gotten onWindowClosed event")
   is(newWindow, closedWindow, "Closed window should match previously opened window");
   CustomizableUI.removeListener(closeListener);
--- a/browser/components/customizableui/test/browser_995164_registerArea_during_customize_mode.js
+++ b/browser/components/customizableui/test/browser_995164_registerArea_during_customize_mode.js
@@ -60,17 +60,17 @@ add_task(function*() {
   ok(toolbar.querySelector(`#${kNonPlacedWidgetId}`), "Button really is on toolbar.");
 
   let otherWin = yield openAndLoadWindow({}, true);
   let otherTB = otherWin.document.createElementNS(kNSXUL, "toolbar");
   otherTB.id = TOOLBARID;
   otherTB.setAttribute("customizable", "true");
   let wasInformedCorrectlyOfAreaAppearing = false;
   let listener = {
-    onAreaNodeRegistered: function(aArea, aNode) {
+    onAreaNodeRegistered(aArea, aNode) {
       if (aNode == otherTB) {
         wasInformedCorrectlyOfAreaAppearing = true;
       }
     }
   };
   CustomizableUI.addListener(listener);
   otherWin.gNavToolbox.appendChild(otherTB);
   ok(wasInformedCorrectlyOfAreaAppearing, "Should have been told area was registered.");
@@ -94,24 +94,24 @@ add_task(function*() {
   // XXXgijs So we could be using promiseWindowClosed here. However, after
   // repeated random oranges, I'm instead relying on onWindowClosed below to
   // fire appropriately - it is linked to an unload event as well, and so
   // reusing it prevents a potential race between unload handlers where the
   // one from promiseWindowClosed could fire before the onWindowClosed
   // (and therefore onAreaNodeRegistered) one, causing the test to fail.
   let windowCloseDeferred = Promise.defer();
   listener = {
-    onAreaNodeUnregistered: function(aArea, aNode, aReason) {
+    onAreaNodeUnregistered(aArea, aNode, aReason) {
       if (aArea == TOOLBARID) {
         is(aNode, otherTB, "Should be informed about other toolbar");
         is(aReason, CustomizableUI.REASON_WINDOW_CLOSED, "Reason should be correct.");
         wasInformedCorrectlyOfAreaDisappearing = (aReason === CustomizableUI.REASON_WINDOW_CLOSED);
       }
     },
-    onWindowClosed: function(aWindow) {
+    onWindowClosed(aWindow) {
       if (aWindow == otherWin) {
         windowCloseDeferred.resolve(aWindow);
       } else {
         info("Other window was closed!");
         info("Other window title: " + (aWindow.document && aWindow.document.title));
         info("Our window title: " + (otherWin.document && otherWin.document.title));
       }
     },
@@ -128,17 +128,17 @@ add_task(function*() {
 
   yield gCustomizeMode.reset();
 
   yield endCustomizing();
 
   CustomizableUI.removeListener(listener);
   wasInformedCorrectlyOfAreaDisappearing = false;
   listener = {
-    onAreaNodeUnregistered: function(aArea, aNode, aReason) {
+    onAreaNodeUnregistered(aArea, aNode, aReason) {
       if (aArea == TOOLBARID) {
         is(aNode, toolbar, "Should be informed about this window's toolbar");
         is(aReason, CustomizableUI.REASON_AREA_UNREGISTERED, "Reason for final removal should be correct.");
         wasInformedCorrectlyOfAreaDisappearing = (aReason === CustomizableUI.REASON_AREA_UNREGISTERED);
       }
     },
   }
   CustomizableUI.addListener(listener);
--- a/browser/components/migration/360seProfileMigrator.js
+++ b/browser/components/migration/360seProfileMigrator.js
@@ -204,17 +204,17 @@ function Qihoo360seProfileMigrator() {
       break;
     }
   }
 }
 
 Qihoo360seProfileMigrator.prototype = Object.create(MigratorPrototype);
 
 Object.defineProperty(Qihoo360seProfileMigrator.prototype, "sourceProfiles", {
-  get: function() {
+  get() {
     if ("__sourceProfiles" in this)
       return this.__sourceProfiles;
 
     if (!this._usersDir) {
       this.__sourceProfiles = [];
       return this.__sourceProfiles;
     }
 
--- a/browser/components/migration/ChromeProfileMigrator.js
+++ b/browser/components/migration/ChromeProfileMigrator.js
@@ -241,17 +241,17 @@ function GetBookmarksResource(aProfileFo
   let bookmarksFile = aProfileFolder.clone();
   bookmarksFile.append("Bookmarks");
   if (!bookmarksFile.exists())
     return null;
 
   return {
     type: MigrationUtils.resourceTypes.BOOKMARKS,
 
-    migrate: function(aCallback) {
+    migrate(aCallback) {
       return Task.spawn(function* () {
         let gotErrors = false;
         let errorGatherer = function() { gotErrors = true };
         let jsonStream = yield new Promise((resolve, reject) => {
           let options = {
             uri: NetUtil.newURI(bookmarksFile),
             loadUsingSystemPrincipal: true
           };
@@ -336,22 +336,22 @@ function GetHistoryResource(aProfileFold
             Cu.reportError(e);
           }
         }
 
         if (places.length > 0) {
           yield new Promise((resolve, reject) => {
             MigrationUtils.insertVisitsWrapper(places, {
               _success: false,
-              handleResult: function() {
+              handleResult() {
                 // Importing any entry is considered a successful import.
                 this._success = true;
               },
-              handleError: function() {},
-              handleCompletion: function() {
+              handleError() {},
+              handleCompletion() {
                 if (this._success) {
                   resolve();
                 } else {
                   reject(new Error("Couldn't add visits"));
                 }
               }
             });
           });
--- a/browser/components/migration/ESEDBReader.jsm
+++ b/browser/components/migration/ESEDBReader.jsm
@@ -349,17 +349,17 @@ ESEDB.prototype = {
 
     if (rv > 0) {
       log.error("Got warning " + rv + " calling OpenTableW");
     }
     ESE.FailSafeCloseTable(this._sessionId, tableId);
     return true;
   },
 
-  tableItems: function*(tableName, columns) {
+  *tableItems(tableName, columns) {
     if (!this._opened) {
       throw new Error("The database was closed!");
     }
 
     let tableOpened = false;
     let tableId;
     try {
       tableId = this._openTable(tableName);
--- a/browser/components/migration/EdgeProfileMigrator.js
+++ b/browser/components/migration/EdgeProfileMigrator.js
@@ -102,17 +102,17 @@ EdgeTypedURLMigrator.prototype = {
     }
     return this.__typedURLs;
   },
 
   get exists() {
     return this._typedURLs.size > 0;
   },
 
-  migrate: function(aCallback) {
+  migrate(aCallback) {
     let typedURLs = this._typedURLs;
     let places = [];
     for (let [urlString, time] of typedURLs) {
       let uri;
       try {
         uri = Services.io.newURI(urlString, null, null);
         if (["http", "https", "ftp"].indexOf(uri.scheme) == -1) {
           continue;
@@ -135,22 +135,22 @@ EdgeTypedURLMigrator.prototype = {
 
     if (places.length == 0) {
       aCallback(typedURLs.size == 0);
       return;
     }
 
     MigrationUtils.insertVisitsWrapper(places, {
       _success: false,
-      handleResult: function() {
+      handleResult() {
         // Importing any entry is considered a successful import.
         this._success = true;
       },
-      handleError: function() {},
-      handleCompletion: function() {
+      handleError() {},
+      handleCompletion() {
         aCallback(this._success);
       }
     });
   },
 };
 
 function EdgeReadingListMigrator() {
 }
--- a/browser/components/migration/FirefoxProfileMigrator.js
+++ b/browser/components/migration/FirefoxProfileMigrator.js
@@ -57,17 +57,17 @@ FirefoxProfileMigrator.prototype._getAll
   return allProfiles;
 };
 
 function sorter(a, b) {
   return a.id.toLocaleLowerCase().localeCompare(b.id.toLocaleLowerCase());
 }
 
 Object.defineProperty(FirefoxProfileMigrator.prototype, "sourceProfiles", {
-  get: function() {
+  get() {
     return [...this._getAllProfiles().keys()].map(x => ({id: x, name: x})).sort(sorter);
   }
 });
 
 FirefoxProfileMigrator.prototype._getFileObject = function(dir, fileName) {
   let file = dir.clone();
   file.append(fileName);
 
@@ -112,17 +112,17 @@ FirefoxProfileMigrator.prototype._getRes
       if (file)
         files.push(file);
     }
     if (!files.length) {
       return null;
     }
     return {
       type: aMigrationType,
-      migrate: function(aCallback) {
+      migrate(aCallback) {
         for (let file of files) {
           file.copyTo(currentProfileDir, "");
         }
         aCallback(true);
       }
     };
   }.bind(this);
 
@@ -138,17 +138,17 @@ FirefoxProfileMigrator.prototype._getRes
   let dictionary = getFileResource(types.OTHERDATA, ["persdict.dat"]);
 
   let sessionCheckpoints = this._getFileObject(sourceProfileDir, "sessionCheckpoints.json");
   let sessionFile = this._getFileObject(sourceProfileDir, "sessionstore.js");
   let session;
   if (sessionFile) {
     session = {
       type: types.SESSION,
-      migrate: function(aCallback) {
+      migrate(aCallback) {
         sessionCheckpoints.copyTo(currentProfileDir, "sessionCheckpoints.json");
         let newSessionFile = currentProfileDir.clone();
         newSessionFile.append("sessionstore.js");
         let migrationPromise = SessionMigration.migrate(sessionFile.path, newSessionFile.path);
         migrationPromise.then(function() {
           let buildID = Services.appinfo.platformBuildID;
           let mstone = Services.appinfo.platformVersion;
           // Force the browser to one-off resume the session that we give it:
--- a/browser/components/migration/IEProfileMigrator.js
+++ b/browser/components/migration/IEProfileMigrator.js
@@ -71,38 +71,38 @@ History.prototype = {
                              Ci.nsINavHistoryService.TRANSITION_LINK;
       // use the current date if we have no visits for this entry.
       // Note that the entry will have a time in microseconds (PRTime),
       // and Date.now() returns milliseconds. Places expects PRTime,
       // so we multiply the Date.now return value to make up the difference.
       let lastVisitTime = entry.get("time") || (Date.now() * 1000);
 
       places.push(
-        { uri: uri,
-          title: title,
-          visits: [{ transitionType: transitionType,
+        { uri,
+          title,
+          visits: [{ transitionType,
                      visitDate: lastVisitTime }]
         }
       );
     }
 
     // Check whether there is any history to import.
     if (places.length == 0) {
       aCallback(true);
       return;
     }
 
     MigrationUtils.insertVisitsWrapper(places, {
       _success: false,
-      handleResult: function() {
+      handleResult() {
         // Importing any entry is considered a successful import.
         this._success = true;
       },
-      handleError: function() {},
-      handleCompletion: function() {
+      handleError() {},
+      handleCompletion() {
         aCallback(this._success);
       }
     });
   }
 };
 
 // IE form password migrator supporting windows from XP until 7 and IE from 7 until 11
 function IE7FormPasswords() {
@@ -315,18 +315,18 @@ IE7FormPasswords.prototype = {
     for (let n = 0; n < numLogins; n++) {
       // Bytes 0-31 starting from currentInfoIndex contain the loginItem data structure for the
       // current login
       let currentLoginItem = currentLoginItemPointer.contents;
       let creation = this.ctypesKernelHelpers.
                      fileTimeToSecondsSinceEpoch(currentLoginItem.hiDateTime,
                                                  currentLoginItem.loDateTime) * 1000;
       let currentResult = {
-        creation: creation,
-        url: url,
+        creation,
+        url,
       };
       // The username is UTF-16 and null-terminated.
       currentResult.username =
         ctypes.cast(cdata.addressOfElement(headerSize + 12 + currentLoginItem.usernameOffset),
                                           ctypes.char16_t.ptr).readString();
       // The password is UTF-16 and null-terminated.
       currentResult.password =
         ctypes.cast(cdata.addressOfElement(headerSize + 12 + currentLoginItem.passwordOffset),
--- a/browser/components/migration/MSMigrationUtils.jsm
+++ b/browser/components/migration/MSMigrationUtils.jsm
@@ -869,17 +869,17 @@ WindowsVaultFormPasswords.prototype = {
     }
     return undefined;
   }
 };
 
 var MSMigrationUtils = {
   MIGRATION_TYPE_IE: 1,
   MIGRATION_TYPE_EDGE: 2,
-  CtypesKernelHelpers: CtypesKernelHelpers,
+  CtypesKernelHelpers,
   getBookmarksMigrator(migrationType = this.MIGRATION_TYPE_IE) {
     return new Bookmarks(migrationType);
   },
   getCookiesMigrator(migrationType = this.MIGRATION_TYPE_IE) {
     return new Cookies(migrationType);
   },
   getWindowsVaultFormPasswordsMigrator() {
     return new WindowsVaultFormPasswords();
--- a/browser/components/migration/MigrationUtils.jsm
+++ b/browser/components/migration/MigrationUtils.jsm
@@ -290,17 +290,16 @@ this.MigratorPrototype = {
         Services.obs.notifyObservers(null, aMsg, aItemType);
       };
 
       for (let resourceType of Object.keys(MigrationUtils._importQuantities)) {
         MigrationUtils._importQuantities[resourceType] = 0;
       }
       notify("Migration:Started");
       for (let [migrationType, itemResources] of resourcesGroupedByItems) {
-
         notify("Migration:ItemBeforeMigrate", migrationType);
 
         let itemSuccess = false;
         for (let res of itemResources) {
           maybeStartTelemetryStopwatch(migrationType, res);
           let completeDeferred = PromiseUtils.defer();
           let resourceDone = function(aSuccess) {
             maybeStopTelemetryStopwatch(migrationType, res);
--- a/browser/components/migration/SafariProfileMigrator.js
+++ b/browser/components/migration/SafariProfileMigrator.js
@@ -215,34 +215,34 @@ History.prototype = {
         let entries = aDict.get("WebHistoryDates");
         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: visitDate }] });
+                                       visitDate }] });
             }
             catch (ex) {
               // Safari's History file may contain malformed URIs which
               // will be ignored.
               Cu.reportError(ex);
             }
           }
         }
         if (places.length > 0) {
           MigrationUtils.insertVisitsWrapper(places, {
             _success: false,
-            handleResult: function() {
+            handleResult() {
               // Importing any entry is considered a successful import.
               this._success = true;
             },
-            handleError: function() {},
-            handleCompletion: function() {
+            handleError() {},
+            handleCompletion() {
               aCallback(this._success);
             }
           });
         }
         else {
           aCallback(false);
         }
       }
--- a/browser/components/migration/content/migration.js
+++ b/browser/components/migration/content/migration.js
@@ -17,17 +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: function()
+  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);
 
@@ -53,30 +53,30 @@ var MigrationWizard = { /* exported Migr
         // easily identifiable way to avoid migration and create a new profile.
         document.getElementById("nothing").hidden = false;
       }
     }
 
     this.onImportSourcePageShow();
   },
 
-  uninit: function()
+  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: function()
+  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";
       }
@@ -132,17 +132,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: function()
+  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")
@@ -178,17 +178,17 @@ var MigrationWizard = { /* exported Migr
         this._selectedProfile = sourceProfiles[0];
       else
         this._selectedProfile = null;
     }
     return undefined;
   },
 
   // 2 - [Profile Selection]
-  onSelectProfilePageShow: function()
+  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())
@@ -205,38 +205,38 @@ var MigrationWizard = { /* exported Migr
         item.setAttribute("label", profile.name);
         profiles.appendChild(item);
       }
     }
 
     profiles.selectedItem = this._selectedProfile ? document.getElementById(this._selectedProfile.id) : profiles.firstChild;
   },
 
-  onSelectProfilePageRewound: function()
+  onSelectProfilePageRewound()
   {
     var profiles = document.getElementById("profiles");
     this._selectedProfile = this._migrator.sourceProfiles.find(
       profile => profile.id == profiles.selectedItem.id
     ) || null;
   },
 
-  onSelectProfilePageAdvanced: function()
+  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: function()
+  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;
@@ -247,51 +247,51 @@ var MigrationWizard = { /* exported Migr
           MigrationUtils.getLocalizedString(itemID + "_" + this._source));
         dataSources.appendChild(checkbox);
         if (!this._itemsFlags || this._itemsFlags & itemID)
           checkbox.checked = true;
       }
     }
   },
 
-  onImportItemsPageRewound: function()
+  onImportItemsPageRewound()
   {
     this._wiz.canAdvance = true;
     this.onImportItemsPageAdvanced();
   },
 
-  onImportItemsPageAdvanced: function()
+  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: function()
+  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: function()
+  onHomePageMigrationPageShow()
   {
     // only want this on the first run
     if (!this._autoMigrate) {
       this._wiz.advance();
       return;
     }
 
     var brandBundle = document.getElementById("brandBundle");
@@ -333,42 +333,42 @@ var MigrationWizard = { /* exported Migr
       oldHomePage.removeAttribute("hidden");
     }
     else {
       // if we don't have at least two options, just advance
       this._wiz.advance();
     }
   },
 
-  onHomePageMigrationPageAdvanced: function()
+  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: function()
+  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: function()
+  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;
@@ -378,17 +378,17 @@ var MigrationWizard = { /* exported Migr
           hist.add(this._source, exp);
         }
         items = items >> 1;
         exp++;
       }
     }
   },
 
-  _listItems: function(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;
@@ -404,17 +404,17 @@ var MigrationWizard = { /* exported Migr
           // 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: function(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)
@@ -509,17 +509,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: function()
+  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");
--- a/browser/components/migration/tests/unit/test_automigration.js
+++ b/browser/components/migration/tests/unit/test_automigration.js
@@ -210,17 +210,17 @@ add_task(function* checkUndoRemoval() {
   Assert.equal(bookmark.title, "Some example bookmark", "Should have correct bookmark before undo.");
 
   // Insert 2 history visits
   let now_uSec = Date.now() * 1000;
   let visitedURI = Services.io.newURI("http://www.example.com/", null, null);
   let frecencyUpdatePromise = new Promise(resolve => {
     let expectedChanges = 2;
     let observer = {
-      onFrecencyChanged: function() {
+      onFrecencyChanged() {
         if (!--expectedChanges) {
           PlacesUtils.history.removeObserver(observer);
           resolve();
         }
       },
     };
     PlacesUtils.history.addObserver(observer, false);
   });
@@ -556,41 +556,41 @@ add_task(function* checkUndoVisitsState(
     ["http://www.example.com/", PromiseUtils.defer()],
     ["http://www.example.org/", PromiseUtils.defer()]
   ]);
   let uriDeletedExpected = new Map([
     ["http://www.mozilla.org/", PromiseUtils.defer()],
   ]);
   let wrongMethodDeferred = PromiseUtils.defer();
   let observer = {
-    onBeginUpdateBatch: function() {},
-    onEndUpdateBatch: function() {},
-    onVisit: function(uri) {
+    onBeginUpdateBatch() {},
+    onEndUpdateBatch() {},
+    onVisit(uri) {
       wrongMethodDeferred.reject(new Error("Unexpected call to onVisit " + uri.spec));
     },
-    onTitleChanged: function(uri) {
+    onTitleChanged(uri) {
       wrongMethodDeferred.reject(new Error("Unexpected call to onTitleChanged " + uri.spec));
     },
-    onClearHistory: function() {
+    onClearHistory() {
       wrongMethodDeferred.reject("Unexpected call to onClearHistory");
     },
-    onPageChanged: function(uri) {
+    onPageChanged(uri) {
       wrongMethodDeferred.reject(new Error("Unexpected call to onPageChanged " + uri.spec));
     },
-    onFrecencyChanged: function(aURI) {
+    onFrecencyChanged(aURI) {
       do_print("frecency change");
       Assert.ok(frecencyChangesExpected.has(aURI.spec),
                 "Should be expecting frecency change for " + aURI.spec);
       frecencyChangesExpected.get(aURI.spec).resolve();
     },
-    onManyFrecenciesChanged: function() {
+    onManyFrecenciesChanged() {
       do_print("Many frecencies changed");
       wrongMethodDeferred.reject(new Error("This test can't deal with onManyFrecenciesChanged to be called"));
     },
-    onDeleteURI: function(aURI) {
+    onDeleteURI(aURI) {
       do_print("delete uri");
       Assert.ok(uriDeletedExpected.has(aURI.spec),
                 "Should be expecting uri deletion for " + aURI.spec);
       uriDeletedExpected.get(aURI.spec).resolve();
     },
   };
   PlacesUtils.history.addObserver(observer, false);
 
--- a/browser/components/newtab/NewTabURL.jsm
+++ b/browser/components/newtab/NewTabURL.jsm
@@ -13,24 +13,24 @@ this.EXPORTED_SYMBOLS = ["NewTabURL"];
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
                                    "@mozilla.org/browser/aboutnewtab-service;1",
                                    "nsIAboutNewTabService");
 
 this.NewTabURL = {
 
-  get: function() {
+  get() {
     return aboutNewTabService.newTabURL;
   },
 
   get overridden() {
     return aboutNewTabService.overridden;
   },
 
-  override: function(newURL) {
+  override(newURL) {
     aboutNewTabService.newTabURL = newURL;
   },
 
-  reset: function() {
+  reset() {
     aboutNewTabService.resetNewTabURL();
   }
 };
--- a/browser/components/newtab/NewTabWebChannel.jsm
+++ b/browser/components/newtab/NewTabWebChannel.jsm
@@ -183,17 +183,17 @@ NewTabWebChannelImpl.prototype = {
     if (!this._isBrowserKnown(target.browser)) {
       this._browsers.add(Cu.getWeakReference(target.browser));
       this._principals.set(target.browser, Cu.getWeakReference(target.principal));
       this.emit("targetAdd");
     }
 
     try {
       let msg = JSON.parse(message);
-      this.emit(msg.type, {data: msg.data, target: target});
+      this.emit(msg.type, {data: msg.data, target});
     } catch (err) {
       Cu.reportError(err);
     }
   },
 
   /*
    * Sends a message to all known browsers
    */
--- a/browser/components/newtab/PlacesProvider.jsm
+++ b/browser/components/newtab/PlacesProvider.jsm
@@ -243,11 +243,11 @@ Links.prototype = {
 };
 
 /**
  * Singleton that serves as the default link provider for the grid.
  */
 const gLinks = new Links(); // jshint ignore:line
 
 let PlacesProvider = {
-  LinkChecker: LinkChecker,
+  LinkChecker,
   links: gLinks,
 };
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -538,51 +538,51 @@ BrowserGlue.prototype = {
 
       if (notification) {
         notification.label = message;
       } else {
         let buttons = [
           {
             label: win.gNavigatorBundle.getFormattedString("addonwatch.disable.label", [addon.name]),
             accessKey: "", // workaround for bug 1192901
-            callback: function() {
+            callback() {
               done(STATE_USER_PICKED_DISABLE);
               addon.userDisabled = true;
               if (addon.pendingOperations == addon.PENDING_NONE) {
                 return;
               }
               let restartMessage = win.gNavigatorBundle.getFormattedString("addonwatch.restart.message", [addon.name, brandShortName]);
               let restartButton = [
                 {
                   label: win.gNavigatorBundle.getFormattedString("addonwatch.restart.label", [brandShortName]),
                   accessKey: win.gNavigatorBundle.getString("addonwatch.restart.accesskey"),
-                  callback: function() {
+                  callback() {
                     let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"]
                       .getService(Ci.nsIAppStartup);
                     appStartup.quit(appStartup.eForceQuit | appStartup.eRestart);
                   }
                 }
               ];
               const priority = notificationBox.PRIORITY_WARNING_MEDIUM;
               notificationBox.appendNotification(restartMessage, "restart-" + addonId, "",
                                                  priority, restartButton);
             }
           },
           {
             label: win.gNavigatorBundle.getString("addonwatch.ignoreSession.label"),
             accessKey: win.gNavigatorBundle.getString("addonwatch.ignoreSession.accesskey"),
-            callback: function() {
+            callback() {
               done(STATE_USER_PICKED_IGNORE_FOR_NOW);
               AddonWatcher.ignoreAddonForSession(addonId);
             }
           },
           {
             label: win.gNavigatorBundle.getString("addonwatch.ignorePerm.label"),
             accessKey: win.gNavigatorBundle.getString("addonwatch.ignorePerm.accesskey"),
-            callback: function() {
+            callback() {
               done(STATE_USER_PICKED_IGNORE_FOREVER);
               AddonWatcher.ignoreAddonPermanently(addonId);
             }
           },
         ];
 
         const priority = notificationBox.PRIORITY_WARNING_MEDIUM;
         notification = notificationBox.appendNotification(
@@ -667,17 +667,17 @@ BrowserGlue.prototype = {
     if (AppConstants.MOZ_CRASHREPORTER) {
       PluginCrashReporter.init();
       UnsubmittedCrashHandler.init();
     }
 
     Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");
   },
 
-  _checkForOldBuildUpdates: function() {
+  _checkForOldBuildUpdates() {
     // check for update if our build is old
     if (AppConstants.MOZ_UPDATER &&
         Services.prefs.getBoolPref("app.update.enabled") &&
         Services.prefs.getBoolPref("app.update.checkInstallTime")) {
 
       let buildID = Services.appinfo.appBuildID;
       let today = new Date().getTime();
       let buildDate = new Date(buildID.slice(0, 4),     // year
@@ -719,17 +719,17 @@ BrowserGlue.prototype = {
                        .createInstance(Ci.nsISupportsPRBool);
     Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
 
     if (!cancelQuit.data) {
       Services.startup.restartInSafeMode(Ci.nsIAppStartup.eAttemptQuit);
     }
   },
 
-  _trackSlowStartup: function() {
+  _trackSlowStartup() {
     if (Services.startup.interrupted ||
         Services.prefs.getBoolPref("browser.slowStartup.notificationDisabled"))
       return;
 
     let currentTime = Date.now() - Services.startup.getStartupInfo().process;
     let averageTime = 0;
     let samples = 0;
     try {
@@ -762,39 +762,39 @@ BrowserGlue.prototype = {
     // if the profile was reset, consider the
     // reset date for its age.
     let profileDate = resetDate || creationDate;
 
     const ONE_DAY = 24 * 60 * 60 * 1000;
     return (Date.now() - profileDate) / ONE_DAY;
   }),
 
-  _showSlowStartupNotification: function(profileAge) {
+  _showSlowStartupNotification(profileAge) {
     if (profileAge < 90) // 3 months
       return;
 
     let win = RecentWindow.getMostRecentBrowserWindow();
     if (!win)
       return;
 
     let productName = gBrandBundle.GetStringFromName("brandFullName");
     let message = win.gNavigatorBundle.getFormattedString("slowStartup.message", [productName]);
 
     let buttons = [
       {
         label:     win.gNavigatorBundle.getString("slowStartup.helpButton.label"),
         accessKey: win.gNavigatorBundle.getString("slowStartup.helpButton.accesskey"),
-        callback: function() {
+        callback() {
           win.openUILinkIn("https://support.mozilla.org/kb/reset-firefox-easily-fix-most-problems", "tab");
         }
       },
       {
         label:     win.gNavigatorBundle.getString("slowStartup.disableNotificationButton.label"),
         accessKey: win.gNavigatorBundle.getString("slowStartup.disableNotificationButton.accesskey"),
-        callback: function() {
+        callback() {
           Services.prefs.setBoolPref("browser.slowStartup.notificationDisabled", true);
         }
       }
     ];
 
     let nb = win.document.getElementById("global-notificationbox");
     nb.appendNotification(message, "slow-startup",
                           "chrome://browser/skin/slowStartup-16.png",
@@ -803,17 +803,17 @@ BrowserGlue.prototype = {
 
   /**
    * Show a notification bar offering a reset.
    *
    * @param reason
    *        String of either "unused" or "uninstall", specifying the reason
    *        why a profile reset is offered.
    */
-  _resetProfileNotification: function(reason) {
+  _resetProfileNotification(reason) {
     let win = RecentWindow.getMostRecentBrowserWindow();
     if (!win)
       return;
 
     Cu.import("resource://gre/modules/ResetProfile.jsm");
     if (!ResetProfile.resetSupported())
       return;
 
@@ -828,50 +828,50 @@ BrowserGlue.prototype = {
       message = resetBundle.formatStringFromName("resetUninstalled.message", [productName], 1);
     } else {
       throw new Error(`Unknown reason (${reason}) given to _resetProfileNotification.`);
     }
     let buttons = [
       {
         label:     resetBundle.formatStringFromName("refreshProfile.resetButton.label", [productName], 1),
         accessKey: resetBundle.GetStringFromName("refreshProfile.resetButton.accesskey"),
-        callback: function() {
+        callback() {
           ResetProfile.openConfirmationDialog(win);
         }
       },
     ];
 
     let nb = win.document.getElementById("global-notificationbox");
     nb.appendNotification(message, "reset-profile-notification",
                           "chrome://global/skin/icons/question-16.png",
                           nb.PRIORITY_INFO_LOW, buttons);
   },
 
-  _notifyUnsignedAddonsDisabled: function() {
+  _notifyUnsignedAddonsDisabled() {
     let win = RecentWindow.getMostRecentBrowserWindow();
     if (!win)
       return;
 
     let message = win.gNavigatorBundle.getString("unsignedAddonsDisabled.message");
     let buttons = [
       {
         label:     win.gNavigatorBundle.getString("unsignedAddonsDisabled.learnMore.label"),
         accessKey: win.gNavigatorBundle.getString("unsignedAddonsDisabled.learnMore.accesskey"),
-        callback: function() {
+        callback() {
           win.BrowserOpenAddonsMgr("addons://list/extension?unsigned=true");
         }
       },
     ];
 
     let nb = win.document.getElementById("high-priority-global-notificationbox");
     nb.appendNotification(message, "unsigned-addons-disabled", "",
                           nb.PRIORITY_WARNING_MEDIUM, buttons);
   },
 
-  _firstWindowTelemetry: function(aWindow) {
+  _firstWindowTelemetry(aWindow) {
     let SCALING_PROBE_NAME = "";
     switch (AppConstants.platform) {
       case "win":
         SCALING_PROBE_NAME = "DISPLAY_SCALING_MSWIN";
         break;
       case "macosx":
         SCALING_PROBE_NAME = "DISPLAY_SCALING_OSX";
         break;
@@ -974,17 +974,17 @@ BrowserGlue.prototype = {
 
     this._firstWindowTelemetry(aWindow);
     this._firstWindowLoaded();
   },
 
   /**
    * Application shutdown handler.
    */
-  _onQuitApplicationGranted: function() {
+  _onQuitApplicationGranted() {
     // This pref must be set here because SessionStore will use its value
     // on quit-application.
     this._setPrefToSaveSession();
 
     // Call trackStartupCrashEnd here in case the delayed call on startup hasn't
     // yet occurred (see trackStartupCrashEnd caller in browser.js).
     try {
       let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"]
@@ -1003,24 +1003,24 @@ BrowserGlue.prototype = {
     FormValidationHandler.uninit();
     AutoCompletePopup.uninit();
     DateTimePickerHelper.uninit();
     if (AppConstants.NIGHTLY_BUILD) {
       AddonWatcher.uninit();
     }
   },
 
-  _initServiceDiscovery: function() {
+  _initServiceDiscovery() {
     if (!Services.prefs.getBoolPref("browser.casting.enabled")) {
       return;
     }
     var rokuDevice = {
       id: "roku:ecp",
       target: "roku:ecp",
-      factory: function(aService) {
+      factory(aService) {
         Cu.import("resource://gre/modules/RokuApp.jsm");
         return new RokuApp(aService);
       },
       types: ["video/mp4"],
       extensions: ["mp4"]
     };
 
     // Register targets
@@ -1166,17 +1166,17 @@ BrowserGlue.prototype = {
           DefaultBrowserCheck.prompt(RecentWindow.getMostRecentBrowserWindow());
         }.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
       }
     }
 
     E10SAccessibilityCheck.onWindowsRestored();
   },
 
-  _createExtraDefaultProfile: function() {
+  _createExtraDefaultProfile() {
     if (!AppConstants.MOZ_DEV_EDITION) {
       return;
     }
     // If Developer Edition is the only installed Firefox version and no other
     // profiles are present, create a second one for use by other versions.
     // This helps Firefox versions earlier than 35 avoid accidentally using the
     // unsuitable Developer Edition profile.
     let profileService = Cc["@mozilla.org/toolkit/profile-service;1"]
@@ -1386,20 +1386,20 @@ BrowserGlue.prototype = {
       let key = getNotifyString({propName: "notificationButtonAccessKey",
                                  stringName: "pu.notifyButton.accesskey"});
 
       let win = RecentWindow.getMostRecentBrowserWindow();
       let notifyBox = win.document.getElementById("high-priority-global-notificationbox");
 
       let buttons = [
                       {
-                        label:     label,
+                        label,
                         accessKey: key,
                         popup:     null,
-                        callback: function(aNotificationBar, aButton) {
+                        callback(aNotificationBar, aButton) {
                           win.openUILinkIn(url, "tab");
                         }
                       }
                     ];
 
       notifyBox.appendNotification(text, "post-update-notification",
                                    null, notifyBox.PRIORITY_INFO_LOW,
                                    buttons);
@@ -1689,32 +1689,32 @@ BrowserGlue.prototype = {
               formatURLPref("app.support.baseURL");
     url += helpTopic;
 
     var win = RecentWindow.getMostRecentBrowserWindow();
 
     var buttons = [
                     {
                       label:     buttonText,
-                      accessKey: accessKey,
+                      accessKey,
                       popup:     null,
-                      callback:  function(aNotificationBar, aButton) {
+                      callback(aNotificationBar, aButton) {
                         win.openUILinkIn(url, "tab");
                       }
                     }
                   ];
 
     var notifyBox = win.gBrowser.getNotificationBox();
     var notification = notifyBox.appendNotification(text, title, null,
                                                     notifyBox.PRIORITY_CRITICAL_MEDIUM,
                                                     buttons);
     notification.persistence = -1; // Until user closes it
   },
 
-  _showSyncStartedDoorhanger: function() {
+  _showSyncStartedDoorhanger() {
     let bundle = Services.strings.createBundle("chrome://browser/locale/accounts.properties");
     let productName = gBrandBundle.GetStringFromName("brandShortName");
     let title = bundle.GetStringFromName("syncStartNotification.title");
     let body = bundle.formatStringFromName("syncStartNotification.body2",
                                             [productName], 1);
 
     let clickCallback = (subject, topic, data) => {
       if (topic != "alertclickcallback")
@@ -2093,17 +2093,17 @@ BrowserGlue.prototype = {
     let text = gBrowserBundle.GetStringFromName("webNotifications.upgradeBody");
     let url = Services.urlFormatter.formatURLPref("app.support.baseURL") +
       "push#w_upgraded-notifications";
 
     AlertsService.showAlertNotification(imageURL, title, text,
                                         true, url, clickCallback);
   }),
 
-  _hasSystemAlertsService: function() {
+  _hasSystemAlertsService() {
     try {
       return !!Cc["@mozilla.org/system-alerts-service;1"].getService(
         Ci.nsIAlertsService);
     } catch (e) {}
     return false;
   },
 
   // ------------------------------
@@ -2351,17 +2351,17 @@ BrowserGlue.prototype = {
     let clickCallback = (subject, topic, data) => {
       if (topic != "alertclickcallback")
         return;
       this._openPreferences("sync");
     }
     AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
   },
 
-  _handleFlashHang: function() {
+  _handleFlashHang() {
     ++this._flashHangCount;
     if (this._flashHangCount < 2) {
       return;
     }
     // protected mode only applies to win32
     if (Services.appinfo.XPCOMABI != "x86-msvc") {
       return;
     }
@@ -2383,17 +2383,17 @@ BrowserGlue.prototype = {
       return;
     }
     let productName = gBrandBundle.GetStringFromName("brandShortName");
     let message = win.gNavigatorBundle.
       getFormattedString("flashHang.message", [productName]);
     let buttons = [{
       label: win.gNavigatorBundle.getString("flashHang.helpButton.label"),
       accessKey: win.gNavigatorBundle.getString("flashHang.helpButton.accesskey"),
-      callback: function() {
+      callback() {
         win.openUILinkIn("https://support.mozilla.org/kb/flash-protected-mode-autodisabled", "tab");
       }
     }];
     let nb = win.document.getElementById("global-notificationbox");
     nb.appendNotification(message, "flash-hang", null,
                           nb.PRIORITY_INFO_MEDIUM, buttons);
   },
 
@@ -2504,23 +2504,23 @@ ContentPermissionPrompt.prototype = {
   },
 };
 
 var DefaultBrowserCheck = {
   get OPTIONPOPUP() { return "defaultBrowserNotificationPopup" },
   _setAsDefaultTimer: null,
   _setAsDefaultButtonClickStartTime: 0,
 
-  closePrompt: function(aNode) {
+  closePrompt(aNode) {
     if (this._notification) {
       this._notification.close();
     }
   },
 
-  setAsDefault: function() {
+  setAsDefault() {
     let claimAllTypes = true;
     let setAsDefaultError = false;
     if (AppConstants.platform == "win") {
       try {
         // In Windows 8+, the UI for selecting default protocol is much
         // nicer than the UI for setting file type associations. So we
         // only show the protocol association screen on Windows 8+.
         // Windows 8 is version 6.2.
@@ -2566,17 +2566,17 @@ var DefaultBrowserCheck = {
     // called when the browser is set as the default. During startup we record
     // the BROWSER_IS_USER_DEFAULT value without recording BROWSER_SET_USER_DEFAULT_ERROR.
     Services.telemetry.getHistogramById("BROWSER_IS_USER_DEFAULT")
                       .add(!setAsDefaultError);
     Services.telemetry.getHistogramById("BROWSER_SET_DEFAULT_ERROR")
                       .add(setAsDefaultError);
   },
 
-  _createPopup: function(win, notNowStrings, neverStrings) {
+  _createPopup(win, notNowStrings, neverStrings) {
     let doc = win.document;
     let popup = doc.createElement("menupopup");
     popup.id = this.OPTIONPOPUP;
 
     let notNowItem = doc.createElement("menuitem");
     notNowItem.id = "defaultBrowserNotNow";
     notNowItem.setAttribute("label", notNowStrings.label);
     notNowItem.setAttribute("accesskey", notNowStrings.accesskey);
@@ -2589,26 +2589,26 @@ var DefaultBrowserCheck = {
     popup.appendChild(neverItem);
 
     popup.addEventListener("command", this);
 
     let popupset = doc.getElementById("mainPopupSet");
     popupset.appendChild(popup);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (event.type == "command") {
       if (event.target.id == "defaultBrowserNever") {
         ShellService.shouldCheckDefaultBrowser = false;
       }
       this.closePrompt();
     }
   },
 
-  prompt: function(win) {
+  prompt(win) {
     let useNotificationBar = Services.prefs.getBoolPref("browser.defaultbrowser.notificationbar");
 
     let brandBundle = win.document.getElementById("bundle_brand");
     let brandShortName = brandBundle.getString("brandShortName");
 
     let shellBundle = win.document.getElementById("bundle_shell");
     let buttonPrefix = "setDefaultBrowser" + (useNotificationBar ? "" : "Alert");
     let yesButton = shellBundle.getFormattedString(buttonPrefix + "Confirm.label",
@@ -2684,47 +2684,47 @@ var DefaultBrowserCheck = {
       try {
         let resultEnum = rv * 2 + shouldAsk.value;
         Services.telemetry.getHistogramById("BROWSER_SET_DEFAULT_RESULT")
                           .add(resultEnum);
       } catch (ex) { /* Don't break if Telemetry is acting up. */ }
     }
   },
 
-  _onNotificationEvent: function(eventType) {
+  _onNotificationEvent(eventType) {
     if (eventType == "removed") {
       let doc = this._notification.ownerDocument;
       let popup = doc.getElementById(this.OPTIONPOPUP);
       popup.removeEventListener("command", this);
       popup.remove();
       delete this._notification;
     }
   },
 };
 
 var E10SAccessibilityCheck = {
   // tracks when an a11y init observer fires prior to the
   // first window being opening.
   _wantsPrompt: false,
 
-  init: function() {
+  init() {
     Services.obs.addObserver(this, "a11y-init-or-shutdown", true);
     Services.obs.addObserver(this, "quit-application-granted", true);
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
 
   get forcedOn() {
     try {
       return Services.prefs.getBoolPref("browser.tabs.remote.force-enable");
     } catch (e) {}
     return false;
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case "quit-application-granted":
         // Tag the profile with a11y load state. We use this in nsAppRunner
         // checks on the next start.
         Services.prefs.setBoolPref("accessibility.loadedInLastSession",
                                    Services.appinfo.accessibilityEnabled);
         break;
       case "a11y-init-or-shutdown":
@@ -2732,26 +2732,26 @@ var E10SAccessibilityCheck = {
           // Update this so users can check this while still running
           Services.prefs.setBoolPref("accessibility.loadedInLastSession", true);
           this._showE10sAccessibilityWarning();
         }
         break;
     }
   },
 
-  onWindowsRestored: function() {
+  onWindowsRestored() {
     if (this._wantsPrompt) {
       this._wantsPrompt = false;
       this._showE10sAccessibilityWarning();
     }
   },
 
   _warnedAboutAccessibility: false,
 
-  _showE10sAccessibilityWarning: function() {
+  _showE10sAccessibilityWarning() {
     // We don't prompt about a11y incompat if e10s is off.
     if (!Services.appinfo.browserTabsRemoteAutostart) {
       return;
     }
 
     // If the user set the forced pref and it's true, ignore a11y init.
     // If the pref doesn't exist or if it's false, prompt.
     if (this.forcedOn) {
@@ -2789,17 +2789,17 @@ var E10SAccessibilityCheck = {
       }
       // Restart the browser
       Services.startup.quit(Services.startup.eAttemptQuit | Services.startup.eRestart);
     };
     // main option: an Ok button, keeps running with content accessibility disabled
     let mainAction = {
       label: win.gNavigatorBundle.getString("e10s.accessibilityNotice.acceptButton.label"),
       accessKey: win.gNavigatorBundle.getString("e10s.accessibilityNotice.acceptButton.accesskey"),
-      callback: function() {
+      callback() {
         // If the user invoked the button option remove the notification,
         // otherwise keep the alert icon around in the address bar.
         notification.remove();
       },
       dismiss: true
     };
     // secondary option: a restart now button. When we restart e10s will be disabled due to
     // accessibility having been loaded in the previous session.
--- a/browser/components/originattributes/test/browser/browser_cache.js
+++ b/browser/components/originattributes/test/browser/browser_cache.js
@@ -37,18 +37,18 @@ function clearAllImageCaches() {
 }
 
 function cacheDataForContext(loadContextInfo) {
   return new Promise(resolve => {
     let cacheEntries = [];
     let cacheVisitor = {
       onCacheStorageInfo(num, consumption) {},
       onCacheEntryInfo(uri, idEnhance) {
-        cacheEntries.push({ uri: uri,
-                            idEnhance: idEnhance });
+        cacheEntries.push({ uri,
+                            idEnhance });
       },
       onCacheEntryVisitCompleted() {
         resolve(cacheEntries);
       },
       QueryInterface(iid) {
         if (iid.equals(Ci.nsICacheStorageVisitor))
           return this;
 
@@ -68,17 +68,17 @@ let countMatchingCacheEntries = function
                      .filter(spec => spec.includes("file_thirdPartyChild." + fileSuffix))
                      .length;
 };
 
 function observeChannels(onChannel) {
   // We use a dummy proxy filter to catch all channels, even those that do not
   // generate an "http-on-modify-request" notification, such as link preconnects.
   let proxyFilter = {
-    applyFilter : function(aProxyService, aChannel, aProxy) {
+    applyFilter(aProxyService, aChannel, aProxy) {
       // We have the channel; provide it to the callback.
       onChannel(aChannel);
       // Pass on aProxy unmodified.
       return aProxy;
     }
   };
   protocolProxyService.registerChannelFilter(proxyFilter, 0);
   // Return the stop() function:
@@ -136,17 +136,17 @@ function* doInit(aMode) {
 }
 
 // In the test function, we dynamically generate the video and audio element,
 // and assign a random suffix to their URL to isolate them across different
 // test runs.
 function* doTest(aBrowser) {
 
   let argObj = {
-    randomSuffix: randomSuffix,
+    randomSuffix,
     urlPrefix: TEST_DOMAIN + TEST_PATH,
   };
 
   yield ContentTask.spawn(aBrowser, argObj, function* (arg) {
     let videoURL = arg.urlPrefix + "file_thirdPartyChild.video.ogv";
     let audioURL = arg.urlPrefix + "file_thirdPartyChild.audio.ogg";
     let trackURL = arg.urlPrefix + "file_thirdPartyChild.track.vtt";
     let URLSuffix = "?r=" + arg.randomSuffix;
--- a/browser/components/places/PlacesUIUtils.jsm
+++ b/browser/components/places/PlacesUIUtils.jsm
@@ -579,17 +579,17 @@ this.PlacesUIUtils = {
    * @param   aIndex
    *          The index within the container the item was dropped or pasted at.
    * @param   aCopy
    *          The drag action was copy, so don't move folders or links.
    *
    * @return  a Places Transaction that can be transacted for performing the
    *          move/insert command.
    */
-  getTransactionForData: function(aData, aType, aNewParentGuid, aIndex, aCopy) {
+  getTransactionForData(aData, aType, aNewParentGuid, aIndex, aCopy) {
     if (!this.SUPPORTED_FLAVORS.includes(aData.type))
       throw new Error(`Unsupported '${aData.type}' data type`);
 
     if ("itemGuid" in aData) {
       if (!this.PLACES_FLAVORS.includes(aData.type))
         throw new Error(`itemGuid unexpectedly set on ${aData.type} data`);
 
       let info = { guid: aData.itemGuid
@@ -612,17 +612,17 @@ this.PlacesUIUtils = {
     if (aData.type == PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR) {
       return PlacesTransactions.NewSeparator({ parentGuid: aNewParentGuid
                                              , index: aIndex });
     }
 
     let title = aData.type != PlacesUtils.TYPE_UNICODE ? aData.title
                                                        : aData.uri;
     return PlacesTransactions.NewBookmark({ uri: NetUtil.newURI(aData.uri)
-                                          , title: title
+                                          , title
                                           , parentGuid: aNewParentGuid
                                           , index: aIndex });
   },
 
   /**
    * Shows the bookmark dialog corresponding to the specified info.
    *
    * @param aInfo
@@ -792,17 +792,17 @@ this.PlacesUIUtils = {
   /**
    * Check whether or not the given node represents a removable entry (either in
    * history or in bookmarks).
    *
    * @param aNode
    *        a node, except the root node of a query.
    * @return true if the aNode represents a removable entry, false otherwise.
    */
-  canUserRemove: function(aNode) {
+  canUserRemove(aNode) {
     let parentNode = aNode.parent;
     if (!parentNode) {
       // canUserRemove doesn't accept root nodes.
       return false;
     }
 
     // If it's not a bookmark, we can remove it unless it's a child of a
     // livemark.
@@ -840,17 +840,17 @@ this.PlacesUIUtils = {
    * Otherwise they are just treated as bookmarks (i.e. false is returned).
    *
    * @param aNodeOrItemId
    *        any item id or result node.
    * @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: function(aNodeOrItemId) {
+  isContentsReadOnly(aNodeOrItemId) {
     let itemId;
     if (typeof(aNodeOrItemId) == "number") {
       itemId = aNodeOrItemId;
     }
     else if (PlacesUtils.nodeIsFolder(aNodeOrItemId)) {
       itemId = PlacesUtils.getConcreteItemId(aNodeOrItemId);
     }
     else {
@@ -1403,17 +1403,17 @@ this.PlacesUIUtils = {
       for (let [name, id] of Object.entries(this.leftPaneQueries)) {
         if (aItemId == id)
           queryName = name;
       }
     }
     return queryName;
   },
 
-  shouldShowTabsFromOtherComputersMenuitem: function() {
+  shouldShowTabsFromOtherComputersMenuitem() {
     let weaveOK = Weave.Status.checkSetup() != Weave.CLIENT_NOT_CONFIGURED &&
                   Weave.Svc.Prefs.get("firstSync", "") != "notReady";
     return weaveOK;
   },
 
   /**
    * WARNING TO ADDON AUTHORS: DO NOT USE THIS METHOD. IT'S LIKELY TO BE REMOVED IN A
    * FUTURE RELEASE.
@@ -1686,17 +1686,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: function(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,17 +1705,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: function(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
@@ -609,17 +609,17 @@ var BookmarkPropertiesPanel = {
     // This is a temporary hack until we use PlacesTransactions.jsm
     if (txn._promise) {
       yield txn._promise;
     }
 
     let folderGuid = yield PlacesUtils.promiseItemGuid(container);
     let bm = yield PlacesUtils.bookmarks.fetch({
       parentGuid: folderGuid,
-      index: index
+      index
     });
     this._itemId = yield PlacesUtils.promiseItemId(bm.guid);
 
     return Object.freeze({
       itemId: this._itemId,
       bookmarkGuid: bm.guid,
       title: this._title,
       uri: this._uri ? this._uri.spec : "",
--- a/browser/components/places/content/browserPlacesViews.js
+++ b/browser/components/places/content/browserPlacesViews.js
@@ -130,18 +130,18 @@ PlacesViewBase.prototype = {
 
   get controller() {
     return this._controller;
   },
 
   get selType() {
     return "single";
   },
-  selectItems: function() { },
-  selectAll: function() { },
+  selectItems() { },
+  selectAll() { },
 
   get selectedNode() {
     if (this._contextMenuShown) {
       let anchor = this._contextMenuShown.triggerNode;
       if (!anchor)
         return null;
 
       if (anchor._placesNode)
@@ -614,22 +614,22 @@ PlacesViewBase.prototype = {
           else
             child.removeAttribute("visited");
           break;
         }
       }
     }
   },
 
-  nodeTagsChanged: function() { },
-  nodeDateAddedChanged: function() { },
-  nodeLastModifiedChanged: function() { },
-  nodeKeywordChanged: function() { },
-  sortingChanged: function() { },
-  batching: function() { },
+  nodeTagsChanged() { },
+  nodeDateAddedChanged() { },
+  nodeLastModifiedChanged() { },
+  nodeKeywordChanged() { },
+  sortingChanged() { },
+  batching() { },
 
   nodeInserted:
   function PVB_nodeInserted(aParentPlacesNode, aPlacesNode, aIndex) {
     let parentElt = this._getDOMNodeForPlacesNode(aParentPlacesNode);
     if (!parentElt._built)
       return;
 
     let index = Array.prototype.indexOf.call(parentElt.childNodes, parentElt._startMarker) +
@@ -1175,17 +1175,17 @@ PlacesToolbar.prototype = {
       case "popuphidden":
         this._onPopupHidden(aEvent);
         break;
       default:
         throw "Trying to handle unexpected event.";
     }
   },
 
-  updateOverflowStatus: function() {
+  updateOverflowStatus() {
     if (this._rootElt.scrollLeftMin != this._rootElt.scrollLeftMax) {
       this._onOverflow();
     } else {
       this._onUnderflow();
     }
   },
 
   _isOverflowStateEventRelevant: function PT_isOverflowStateEventRelevant(aEvent) {
--- a/browser/components/places/content/controller.js
+++ b/browser/components/places/content/controller.js
@@ -54,17 +54,17 @@ function InsertionPoint(aItemId, aIndex,
   this.dropNearItemId = aDropNearItemId;
 }
 
 InsertionPoint.prototype = {
   set index(val) {
     return this._index = val;
   },
 
-  promiseGuid: function() {
+  promiseGuid() {
     return PlacesUtils.promiseItemGuid(this.itemId);
   },
 
   get index() {
     if (this.dropNearItemId > 0) {
       // If dropNearItemId is set up we must calculate the real index of
       // the item near which we will drop.
       var index = PlacesUtils.bookmarks.getItemIndex(this.dropNearItemId);
@@ -862,17 +862,17 @@ PlacesController.prototype = {
         // This is a uri node inside a tag container.  It needs a special
         // 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: uri, tag: tag }));
+          transactions.push(PlacesTransactions.Untag({ uri, tag }));
         }
         else {
           let txn = new PlacesUntagURITransaction(uri, [tagItemId]);
           transactions.push(txn);
         }
       }
       else if (PlacesUtils.nodeIsTagQuery(node) && node.parent &&
                PlacesUtils.nodeIsQuery(node.parent) &&
@@ -880,17 +880,17 @@ PlacesController.prototype = {
                  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: tag, uris: URIs }));
+          transactions.push(PlacesTransactions.Untag({ tag, uris: URIs }));
         }
         else {
           for (var j = 0; j < URIs.length; j++) {
             let txn = new PlacesUntagURITransaction(URIs[j], [tag]);
             transactions.push(txn);
           }
         }
       }
@@ -1303,17 +1303,17 @@ PlacesController.prototype = {
       // No supported data exists or nodes unwrap failed, just bail out.
       return;
     }
 
     let itemsToSelect = [];
     if (PlacesUIUtils.useAsyncTransactions) {
       if (ip.isTag) {
         let uris = items.filter(item => "uri" in item).map(item => NetUtil.newURI(item.uri));
-        yield PlacesTransactions.Tag({ uris: uris, tag: ip.tagName }).transact();
+        yield PlacesTransactions.Tag({ uris, tag: ip.tagName }).transact();
       }
       else {
         yield PlacesTransactions.batch(function* () {
           let insertionIndex = ip.index;
           let parent = yield ip.promiseGuid();
 
           for (let item of items) {
             let doCopy = action == "copy";
@@ -1543,17 +1543,17 @@ var PlacesControllerDragHelper = {
 
   /**
    * Determines if an unwrapped node can be moved.
    *
    * @param   aUnwrappedNode
    *          A node unwrapped by PlacesUtils.unwrapNodes().
    * @return True if the node can be moved, false otherwise.
    */
-  canMoveUnwrappedNode: function(aUnwrappedNode) {
+  canMoveUnwrappedNode(aUnwrappedNode) {
     return aUnwrappedNode.id > 0 &&
            !PlacesUtils.isRootItem(aUnwrappedNode.id) &&
            (!aUnwrappedNode.parent || !PlacesUIUtils.isContentsReadOnly(aUnwrappedNode.parent)) &&
            aUnwrappedNode.parent != PlacesUtils.tagsFolderId &&
            aUnwrappedNode.grandParentId != PlacesUtils.tagsFolderId;
   },
 
   /**
@@ -1632,17 +1632,17 @@ var PlacesControllerDragHelper = {
       if (index != -1 && dragginUp)
         index += movedCount++;
 
       // 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: uri, tag: tagName }));
+          transactions.push(PlacesTransactions.Tag({ uri, tag: tagName }));
         else
           transactions.push(new PlacesTagURITransaction(uri, [tagItemId]));
       }
       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 " +
@@ -1674,17 +1674,17 @@ var PlacesControllerDragHelper = {
     }
   }),
 
   /**
    * Checks if we can insert into a container.
    * @param   aContainer
    *          The container were we are want to drop
    */
-  disallowInsertion: function(aContainer) {
+  disallowInsertion(aContainer) {
     NS_ASSERT(aContainer, "empty container");
     // Allow dropping into Tag containers and editable folders.
     return !PlacesUtils.nodeIsTagQuery(aContainer) &&
            (!PlacesUtils.nodeIsFolder(aContainer) ||
             PlacesUIUtils.isContentsReadOnly(aContainer));
   }
 };
 
--- a/browser/components/places/content/editBookmarkOverlay.js
+++ b/browser/components/places/content/editBookmarkOverlay.js
@@ -388,17 +388,17 @@ var gEditItemOverlay = {
      *
      * First we build the annotated folders array, each item has both the
      * folder identifier and the time at which it was last-used by this dialog
      * set. Then we sort it descendingly based on the time field.
      */
     this._recentFolders = [];
     for (let i = 0; i < folderIds.length; i++) {
       var lastUsed = annos.getItemAnnotation(folderIds[i], LAST_USED_ANNO);
-      this._recentFolders.push({ folderId: folderIds[i], lastUsed: lastUsed });
+      this._recentFolders.push({ folderId: folderIds[i], lastUsed });
     }
     this._recentFolders.sort(function(a, b) {
       if (b.lastUsed < a.lastUsed)
         return -1;
       if (b.lastUsed > a.lastUsed)
         return 1;
       return 0;
     });
--- a/browser/components/places/content/moveBookmarks.js
+++ b/browser/components/places/content/moveBookmarks.js
@@ -9,17 +9,17 @@ var gMoveBookmarksDialog = {
   _foldersTree: null,
   get foldersTree() {
     if (!this._foldersTree)
       this._foldersTree = document.getElementById("foldersTree");
 
     return this._foldersTree;
   },
 
-  init: function() {
+  init() {
     this._nodes = window.arguments[0];
 
     this.foldersTree.place =
       "place:excludeItems=1&excludeQueries=1&excludeReadOnlyFolders=1&folder=" +
       PlacesUIUtils.allBookmarksFolderId;
   },
 
   onOK: function MBD_onOK(aEvent) {
--- a/browser/components/places/content/places.js
+++ b/browser/components/places/content/places.js
@@ -27,17 +27,17 @@ var PlacesOrganizer = {
   // is minimal. IDs should be kept in sync with the IDs of the elements
   // observing additionalInfoBroadcaster.
   _additionalInfoFields: [
     "editBMPanel_descriptionRow",
     "editBMPanel_loadInSidebarCheckbox",
     "editBMPanel_keywordRow",
   ],
 
-  _initFolderTree: function() {
+  _initFolderTree() {
     var leftPaneRoot = PlacesUIUtils.leftPaneFolderId;
     this._places.place = "place:excludeItems=1&expandQueries=0&folder=" + leftPaneRoot;
   },
 
   selectLeftPaneQuery: function PO_selectLeftPaneQuery(aQueryName) {
     var itemId = PlacesUIUtils.leftPaneQueries[aQueryName];
     this._places.selectItems([itemId]);
     // Forcefully expand all-bookmarks
@@ -1245,17 +1245,17 @@ var ContentArea = {
    */
   getContentViewForQueryString:
   function CA_getContentViewForQueryString(aQueryString) {
     try {
       if (this._specialViews.has(aQueryString)) {
         let { view, options } = this._specialViews.get(aQueryString);
         if (typeof view == "function") {
           view = view();
-          this._specialViews.set(aQueryString, { view: view, options: options });
+          this._specialViews.set(aQueryString, { view, options });
         }
         return view;
       }
     }
     catch (ex) {
       Components.utils.reportError(ex);
     }
     return ContentTree.view;
@@ -1351,17 +1351,17 @@ var ContentArea = {
       let { options } = this._specialViews.get(this.currentPlace);
       for (let option in options) {
         viewOptions[option] = options[option];
       }
     }
     return viewOptions;
   },
 
-  focus: function() {
+  focus() {
     this._deck.selectedPanel.focus();
   }
 };
 
 var ContentTree = {
   init: function CT_init() {
     this._view = document.getElementById("placeContent");
   },
--- a/browser/components/places/content/treeView.js
+++ b/browser/components/places/content/treeView.js
@@ -1130,17 +1130,17 @@ PlacesTreeView.prototype = {
   },
   get selection() {
     return this._selection;
   },
   set selection(val) {
     this._selection = val;
   },
 
-  getRowProperties: function() { return ""; },
+  getRowProperties() { return ""; },
 
   getCellProperties:
   function PTV_getCellProperties(aRow, aColumn) {
     // for anonid-trees, we need to add the column-type manually
     var props = "";
     let columnType = aColumn.element.getAttribute("anonid");
     if (columnType)
       props += columnType;
@@ -1212,17 +1212,17 @@ PlacesTreeView.prototype = {
       }
 
       this._cellProperties.set(node, properties);
     }
 
     return props + " " + properties;
   },
 
-  getColumnProperties: function(aColumn) { return ""; },
+  getColumnProperties(aColumn) { return ""; },
 
   isContainer: function PTV_isContainer(aRow) {
     // Only leaf nodes aren't listed in the rows array.
     let node = this._rows[aRow];
     if (node === undefined)
       return false;
 
     if (PlacesUtils.nodeIsContainer(node)) {
@@ -1409,31 +1409,31 @@ PlacesTreeView.prototype = {
         return true;
       if (nextLevel < thisLevel)
         break;
     }
 
     return false;
   },
 
-  getLevel: function(aRow) {
+  getLevel(aRow) {
     return this._getNodeForRow(aRow).indentLevel;
   },
 
   getImageSrc: function PTV_getImageSrc(aRow, aColumn) {
     // Only the title column has an image.
     if (this._getColumnType(aColumn) != this.COLUMN_TYPE_TITLE)
       return "";
 
     let node = this._getNodeForRow(aRow);
     return node.icon;
   },
 
-  getProgressMode: function(aRow, aColumn) { },
-  getCellValue: function(aRow, aColumn) { },
+  getProgressMode(aRow, aColumn) { },
+  getCellValue(aRow, aColumn) { },
 
   getCellText: function PTV_getCellText(aRow, aColumn) {
     let node = this._getNodeForRow(aRow);
     switch (this._getColumnType(aColumn)) {
       case this.COLUMN_TYPE_TITLE:
         // normally, this is just the title, but we don't want empty items in
         // the tree view so return a special string if the title is empty.
         // Do it here so that callers can still get at the 0 length title
@@ -1712,15 +1712,15 @@ PlacesTreeView.prototype = {
         this._cuttingNodes.add(aNode);
       else
         this._cuttingNodes.delete(aNode);
 
       this._invalidateCellValue(aNode, this.COLUMN_TYPE_TITLE);
     }
   },
 
-  selectionChanged: function() { },
-  cycleCell: function(aRow, aColumn) { },
-  isSelectable: function(aRow, aColumn) { return false; },
-  performAction: function(aAction) { },
-  performActionOnRow: function(aAction, aRow) { },
-  performActionOnCell: function(aAction, aRow, aColumn) { }
+  selectionChanged() { },
+  cycleCell(aRow, aColumn) { },
+  isSelectable(aRow, aColumn) { return false; },
+  performAction(aAction) { },
+  performActionOnRow(aAction, aRow) { },
+  performActionOnCell(aAction, aRow, aColumn) { }
 };
--- a/browser/components/places/tests/browser/browser_423515.js
+++ b/browser/components/places/tests/browser/browser_423515.js
@@ -15,37 +15,37 @@ function test() {
   var rootId = PlacesUtils.bookmarks.createFolder(PlacesUtils.toolbarFolderId, "", IDX);
   var rootNode = PlacesUtils.getFolderContents(rootId, false, true).root;
   is(rootNode.childCount, 0, "confirm test root is empty");
 
   var tests = [];
 
   // add a regular folder, should be moveable
   tests.push({
-    populate: function() {
+    populate() {
       this.id =
         PlacesUtils.bookmarks.createFolder(rootId, "", IDX);
     },
-    validate: function() {
+    validate() {
       is(rootNode.childCount, 1,
         "populate added data to the test root");
       is(PlacesControllerDragHelper.canMoveNode(rootNode.getChild(0)),
          true, "can move regular folder node");
     }
   });
 
   // add a regular folder shortcut, should be moveable
   tests.push({
-    populate: function() {
+    populate() {
       this.folderId =
         PlacesUtils.bookmarks.createFolder(rootId, "foo", IDX);
       this.shortcutId =
         PlacesUtils.bookmarks.insertBookmark(rootId, makeURI("place:folder=" + this.folderId), IDX, "bar");
     },
-    validate: function() {
+    validate() {
       is(rootNode.childCount, 2,
         "populated data to the test root");
 
       var folderNode = rootNode.getChild(0);
       is(folderNode.type, 6, "node is folder");
       is(this.folderId, folderNode.itemId, "folder id and folder node item id match");
 
       var shortcutNode = rootNode.getChild(1);
@@ -57,23 +57,23 @@ function test() {
 
       is(PlacesControllerDragHelper.canMoveNode(shortcutNode),
          true, "can move folder shortcut node");
     }
   });
 
   // add a regular query, should be moveable
   tests.push({
-    populate: function() {
+    populate() {
       this.bookmarkId =
         PlacesUtils.bookmarks.insertBookmark(rootId, makeURI("http://foo.com"), IDX, "foo");
       this.queryId =
         PlacesUtils.bookmarks.insertBookmark(rootId, makeURI("place:terms=foo"), IDX, "bar");
     },
-    validate: function() {
+    validate() {
       is(rootNode.childCount, 2,
         "populated data to the test root");
 
       var bmNode = rootNode.getChild(0);
       is(bmNode.itemId, this.bookmarkId, "bookmark id and bookmark node item id match");
 
       var queryNode = rootNode.getChild(1);
       is(queryNode.itemId, this.queryId, "query id and query node item id match");
@@ -85,24 +85,24 @@ function test() {
 
   // test that special folders cannot be moved
   // test that special folders shortcuts can be moved
   tests.push({
     folders: [PlacesUtils.bookmarksMenuFolderId,
               PlacesUtils.tagsFolderId, PlacesUtils.unfiledBookmarksFolderId,
               PlacesUtils.toolbarFolderId],
     shortcuts: {},
-    populate: function() {
+    populate() {
       for (var i = 0; i < this.folders.length; i++) {
         var id = this.folders[i];
         this.shortcuts[id] =
           PlacesUtils.bookmarks.insertBookmark(rootId, makeURI("place:folder=" + id), IDX, "");
       }
     },
-    validate: function() {
+    validate() {
       // test toolbar shortcut node
       is(rootNode.childCount, this.folders.length,
         "populated data to the test root");
 
       function getRootChildNode(aId) {
         var node = PlacesUtils.getFolderContents(PlacesUtils.placesRootId, false, true).root;
         for (var i = 0; i < node.childCount; i++) {
           var child = node.getChild(i);
@@ -133,23 +133,23 @@ function test() {
         is(PlacesControllerDragHelper.canMoveNode(shortcutNode),
            true, "should be able to move special folder shortcut node");
       }
     }
   });
 
   // test that a tag container cannot be moved
   tests.push({
-    populate: function() {
+    populate() {
       // tag a uri
       this.uri = makeURI("http://foo.com");
       PlacesUtils.tagging.tagURI(this.uri, ["bar"]);
       registerCleanupFunction(() => PlacesUtils.tagging.untagURI(this.uri, ["bar"]));
     },
-    validate: function() {
+    validate() {
       // get tag root
       var query = PlacesUtils.history.getNewQuery();
       var options = PlacesUtils.history.getNewQueryOptions();
       options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_QUERY;
       var tagsNode = PlacesUtils.history.executeQuery(query, options).root;
 
       tagsNode.containerOpen = true;
       is(tagsNode.childCount, 1, "has new tag");
--- a/browser/components/places/tests/browser/browser_bookmarklet_windowOpen.js
+++ b/browser/components/places/tests/browser/browser_bookmarklet_windowOpen.js
@@ -1,19 +1,19 @@
 "use strict";
 
 const TEST_URL = 'http://example.com/browser/browser/components/places/tests/browser/pageopeningwindow.html';
 
 function makeBookmarkFor(url, keyword) {
   return Promise.all([
     PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
                                    title: "bookmarklet",
-                                   url: url }),
-    PlacesUtils.keywords.insert({url: url,
-                                 keyword: keyword})
+                                   url }),
+    PlacesUtils.keywords.insert({url,
+                                 keyword})
   ]);
 
 }
 
 add_task(function* openKeywordBookmarkWithWindowOpen() {
   // This is the current default, but let's not assume that...
   yield SpecialPowers.pushPrefEnv({"set": [
     [ 'browser.link.open_newwindow', 3 ],
--- a/browser/components/places/tests/browser/browser_bookmarksProperties.js
+++ b/browser/components/places/tests/browser/browser_bookmarksProperties.js
@@ -58,51 +58,51 @@ gTests.push({
   desc: "Bug 462662 - Pressing Enter to select tag from autocomplete closes bookmarks properties dialog",
   sidebar: SIDEBAR_BOOKMARKS_ID,
   action: ACTION_EDIT,
   itemType: null,
   window: null,
   _itemId: null,
   _cleanShutdown: false,
 
-  setup: function(aCallback) {
+  setup(aCallback) {
     // Add a bookmark in unsorted bookmarks folder.
     this._itemId = add_bookmark(PlacesUtils._uri(TEST_URL));
     ok(this._itemId > 0, "Correctly added a bookmark");
     // Add a tag to this bookmark.
     PlacesUtils.tagging.tagURI(PlacesUtils._uri(TEST_URL),
                                ["testTag"]);
     var tags = PlacesUtils.tagging.getTagsForURI(PlacesUtils._uri(TEST_URL));
     is(tags[0], "testTag", "Correctly added a tag");
     aCallback();
   },
 
-  selectNode: function(tree) {
+  selectNode(tree) {
     tree.selectItems([PlacesUtils.unfiledBookmarksFolderId]);
     PlacesUtils.asContainer(tree.selectedNode).containerOpen = true;
     tree.selectItems([this._itemId]);
     is(tree.selectedNode.itemId, this._itemId, "Bookmark has been selected");
   },
 
-  run: function() {
+  run() {
     // open tags autocomplete and press enter
     var tagsField = this.window.document.getElementById("editBMPanel_tagsField");
     var self = this;
 
     this.window.addEventListener("unload", function(event) {
       self.window.removeEventListener("unload", arguments.callee, true);
       tagsField.popup.removeEventListener("popuphidden", popupListener, true);
       ok(self._cleanShutdown, "Dialog window should not be closed by pressing Enter on the autocomplete popup");
       executeSoon(function() {
         self.finish();
       });
     }, true);
 
     var popupListener = {
-      handleEvent: function(aEvent) {
+      handleEvent(aEvent) {
         switch (aEvent.type) {
           case "popuphidden":
             // Everything worked fine, we can stop observing the window.
             self._cleanShutdown = true;
             self.window.document.documentElement.cancelDialog();
             break;
           case "popupshown":
             tagsField.popup.removeEventListener("popupshown", this, true);
@@ -132,22 +132,22 @@ gTests.push({
     info("About to focus the tagsField");
     executeSoon(() => {
                   tagsField.focus();
                   tagsField.value = "";
                   EventUtils.synthesizeKey("t", {}, this.window);
                 });
   },
 
-  finish: function() {
+  finish() {
     SidebarUI.hide();
     runNextTest();
   },
 
-  cleanup: function() {
+  cleanup() {
     // Check tags have not changed.
     var tags = PlacesUtils.tagging.getTagsForURI(PlacesUtils._uri(TEST_URL));
     is(tags[0], "testTag", "Tag on node has not changed");
 
     // Cleanup.
     PlacesUtils.tagging.untagURI(PlacesUtils._uri(TEST_URL), ["testTag"]);
     PlacesUtils.bookmarks.removeItem(this._itemId);
   }
@@ -160,51 +160,51 @@ gTests.push({
   desc: "Bug 476020 - Pressing Esc while having the tag autocomplete open closes the bookmarks panel",
   sidebar: SIDEBAR_BOOKMARKS_ID,
   action: ACTION_EDIT,
   itemType: null,
   window: null,
   _itemId: null,
   _cleanShutdown: false,
 
-  setup: function(aCallback) {
+  setup(aCallback) {
     // Add a bookmark in unsorted bookmarks folder.
     this._itemId = add_bookmark(PlacesUtils._uri(TEST_URL));
     ok(this._itemId > 0, "Correctly added a bookmark");
     // Add a tag to this bookmark.
     PlacesUtils.tagging.tagURI(PlacesUtils._uri(TEST_URL),
                                ["testTag"]);
     var tags = PlacesUtils.tagging.getTagsForURI(PlacesUtils._uri(TEST_URL));
     is(tags[0], "testTag", "Correctly added a tag");
     aCallback();
   },
 
-  selectNode: function(tree) {
+  selectNode(tree) {
     tree.selectItems([PlacesUtils.unfiledBookmarksFolderId]);
     PlacesUtils.asContainer(tree.selectedNode).containerOpen = true;
     tree.selectItems([this._itemId]);
     is(tree.selectedNode.itemId, this._itemId, "Bookmark has been selected");
   },
 
-  run: function() {
+  run() {
     // open tags autocomplete and press enter
     var tagsField = this.window.document.getElementById("editBMPanel_tagsField");
     var self = this;
 
     this.window.addEventListener("unload", function(event) {
       self.window.removeEventListener("unload", arguments.callee, true);
       tagsField.popup.removeEventListener("popuphidden", popupListener, true);
       ok(self._cleanShutdown, "Dialog window should not be closed by pressing Escape on the autocomplete popup");
       executeSoon(function() {
         self.finish();
       });
     }, true);
 
     var popupListener = {
-      handleEvent: function(aEvent) {
+      handleEvent(aEvent) {
         switch (aEvent.type) {
           case "popuphidden":
             // Everything worked fine.
             self._cleanShutdown = true;
             self.window.document.documentElement.cancelDialog();
             break;
           case "popupshown":
             tagsField.popup.removeEventListener("popupshown", this, true);
@@ -232,22 +232,22 @@ gTests.push({
 
     // Open tags autocomplete popup.
     info("About to focus the tagsField");
     tagsField.focus();
     tagsField.value = "";
     EventUtils.synthesizeKey("t", {}, this.window);
   },
 
-  finish: function() {
+  finish() {
     SidebarUI.hide();
     runNextTest();
   },
 
-  cleanup: function() {
+  cleanup() {
     // Check tags have not changed.
     var tags = PlacesUtils.tagging.getTagsForURI(PlacesUtils._uri(TEST_URL));
     is(tags[0], "testTag", "Tag on node has not changed");
 
     // Cleanup.
     PlacesUtils.tagging.untagURI(PlacesUtils._uri(TEST_URL),
                                  ["testTag"]);
     PlacesUtils.bookmarks.removeItem(this._itemId);
@@ -259,32 +259,32 @@ gTests.push({
 
 gTests.push({
   desc: " Bug 491269 - Test that editing folder name in bookmarks properties dialog does not accept the dialog",
   sidebar: SIDEBAR_HISTORY_ID,
   action: ACTION_ADD,
   historyView: SIDEBAR_HISTORY_BYLASTVISITED_VIEW,
   window: null,
 
-  setup: function(aCallback) {
+  setup(aCallback) {
     // Add a visit.
     PlacesTestUtils.addVisits(
       {uri: PlacesUtils._uri(TEST_URL),
         transition: PlacesUtils.history.TRANSITION_TYPED}
       ).then(aCallback);
   },
 
-  selectNode: function(tree) {
+  selectNode(tree) {
     var visitNode = tree.view.nodeForTreeIndex(0);
     tree.selectNode(visitNode);
     is(tree.selectedNode.uri, TEST_URL, "The correct visit has been selected");
     is(tree.selectedNode.itemId, -1, "The selected node is not bookmarked");
   },
 
-  run: function() {
+  run() {
     // Open folder selector.
     var foldersExpander = this.window.document.getElementById("editBMPanel_foldersExpander");
     var folderTree = this.window.document.getElementById("editBMPanel_folderTree");
     var self = this;
 
     this.window.addEventListener("unload", function(event) {
       self.window.removeEventListener("unload", arguments.callee, true);
       ok(self._cleanShutdown, "Dialog window should not be closed by pressing ESC in folder name textbox");
@@ -310,22 +310,22 @@ gTests.push({
            "We have finished editing folder name in folder tree");
         self._cleanShutdown = true;
         self.window.document.documentElement.cancelDialog();
       });
     }, false);
     foldersExpander.doCommand();
   },
 
-  finish: function() {
+  finish() {
     SidebarUI.hide();
     runNextTest();
   },
 
-  cleanup: function() {
+  cleanup() {
     return PlacesTestUtils.clearHistory();
   }
 });
 
 // ------------------------------------------------------------------------------
 
 function test() {
   waitForExplicitFinish();
--- a/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
+++ b/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
@@ -139,17 +139,17 @@ function getExpectedDataForPlacesNode(aN
 }
 
 var gTests = [
 
 // ------------------------------------------------------------------------------
 
   {
     desc: "Drag a folder on toolbar",
-    run: function() {
+    run() {
       // Create a test folder to be dragged.
       var folderId = PlacesUtils.bookmarks
                                 .createFolder(PlacesUtils.toolbarFolderId,
                                               TEST_TITLE,
                                               PlacesUtils.bookmarks.DEFAULT_INDEX);
       var element = getToolbarNodeForItemId(folderId);
       isnot(element, null, "Found node on toolbar");
 
@@ -180,17 +180,17 @@ var gTests = [
         });
     }
   },
 
 // ------------------------------------------------------------------------------
 
   {
     desc: "Drag a bookmark on toolbar",
-    run: function() {
+    run() {
       // Create a test bookmark to be dragged.
       var itemId = PlacesUtils.bookmarks
                               .insertBookmark(PlacesUtils.toolbarFolderId,
                                               PlacesUtils._uri(TEST_URL),
                                               PlacesUtils.bookmarks.DEFAULT_INDEX,
                                               TEST_TITLE);
       var element = getToolbarNodeForItemId(itemId);
       isnot(element, null, "Found node on toolbar");
--- a/browser/components/places/tests/browser/browser_library_batch_delete.js
+++ b/browser/components/places/tests/browser/browser_library_batch_delete.js
@@ -9,20 +9,20 @@ const TEST_URL = "http://www.batch.delet
 
 var gTests = [];
 var gLibrary;
 
 // ------------------------------------------------------------------------------
 
 gTests.push({
   desc: "Create and batch remove bookmarks",
-  run: function() {
+  run() {
     let testURI = makeURI(TEST_URL);
     PlacesUtils.history.runInBatchMode({
-      runBatched: function(aUserData) {
+      runBatched(aUserData) {
         // Create a folder in unserted and populate it with bookmarks.
         let folder = PlacesUtils.bookmarks.createFolder(
           PlacesUtils.unfiledBookmarksFolderId, "deleteme",
           PlacesUtils.bookmarks.DEFAULT_INDEX
         );
         PlacesUtils.bookmarks.createFolder(
           PlacesUtils.unfiledBookmarksFolderId, "keepme",
           PlacesUtils.bookmarks.DEFAULT_INDEX
@@ -62,17 +62,17 @@ gTests.push({
     nextTest();
   }
 });
 
 // ------------------------------------------------------------------------------
 
 gTests.push({
   desc: "Ensure correct selection and functionality in Library",
-  run: function() {
+  run() {
     let PO = gLibrary.PlacesOrganizer;
     let ContentTree = gLibrary.ContentTree;
     // Move selection forth and back.
     PO.selectLeftPaneQuery("History");
     PO.selectLeftPaneQuery("UnfiledBookmarks");
     // Now select the "keepme" folder in the right pane and delete it.
     ContentTree.view.selectNode(ContentTree.view.result.root.getChild(0));
     is(ContentTree.view.selectedNode.title, "keepme",
--- a/browser/components/places/tests/browser/browser_library_downloads.js
+++ b/browser/components/places/tests/browser/browser_library_downloads.js
@@ -27,21 +27,21 @@ function test() {
       { uri: NetUtil.newURI("http://en.wikipedia.org"),
         visits: [ new VisitInfo(PlacesUtils.history.TRANSITION_TYPED) ]
       },
       { uri: NetUtil.newURI("http://ubuntu.org"),
         visits: [ new VisitInfo(PlacesUtils.history.TRANSITION_DOWNLOAD) ]
       },
     ]
     PlacesUtils.asyncHistory.updatePlaces(places, {
-      handleResult: function() {},
-      handleError: function() {
+      handleResult() {},
+      handleError() {
         ok(false, "gHistory.updatePlaces() failed");
       },
-      handleCompletion: function() {
+      handleCompletion() {
         // Make sure Downloads is present.
         isnot(win.PlacesOrganizer._places.selectedNode, null,
               "Downloads is present and selected");
 
 
         // Check results.
         let contentRoot = win.ContentArea.currentView.result.root;
         let len = contentRoot.childCount;
--- a/browser/components/places/tests/browser/browser_library_infoBox.js
+++ b/browser/components/places/tests/browser/browser_library_infoBox.js
@@ -11,17 +11,17 @@ const TEST_URI = "http://www.mozilla.org
 
 var gTests = [];
 var gLibrary;
 
 // ------------------------------------------------------------------------------
 
 gTests.push({
   desc: "Bug 430148 - Remove or hide the more/less button in details pane...",
-  run: function() {
+  run() {
     var PO = gLibrary.PlacesOrganizer;
     let ContentTree = gLibrary.ContentTree;
     var infoBoxExpanderWrapper = getAndCheckElmtById("infoBoxExpanderWrapper");
 
     function addVisitsCallback() {
       // open all bookmarks node
       PO.selectLeftPaneQuery("AllBookmarks");
       isnot(PO._places.selectedNode, null,
--- a/browser/components/places/tests/browser/browser_library_left_pane_fixnames.js
+++ b/browser/components/places/tests/browser/browser_library_left_pane_fixnames.js
@@ -59,17 +59,17 @@ function test() {
                          .getItemsWithAnnotation(PlacesUIUtils.ORGANIZER_QUERY_ANNO);
   // Get current queries names.
   for (var i = 0; i < items.length; i++) {
     var itemId = items[i];
     var queryName = PlacesUtils.annotations
                                .getItemAnnotation(items[i],
                                                   PlacesUIUtils.ORGANIZER_QUERY_ANNO);
     var query = { name: queryName,
-                  itemId: itemId,
+                  itemId,
                   correctTitle: PlacesUtils.bookmarks.getItemTitle(itemId) }
     switch (queryName) {
       case "BookmarksToolbar":
         query.concreteId = PlacesUtils.toolbarFolderId;
         query.concreteTitle = PlacesUtils.bookmarks.getItemTitle(query.concreteId);
         break;
       case "BookmarksMenu":
         query.concreteId = PlacesUtils.bookmarksMenuFolderId;
--- a/browser/components/places/tests/browser/browser_library_middleclick.js
+++ b/browser/components/places/tests/browser/browser_library_middleclick.js
@@ -13,31 +13,31 @@ var gLibrary = null;
 var gTests = [];
 var gCurrentTest = null;
 
 // Listener for TabOpen and tabs progress.
 var gTabsListener = {
   _loadedURIs: [],
   _openTabsCount: 0,
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     if (aEvent.type != "TabOpen")
       return;
 
     if (++this._openTabsCount == gCurrentTest.URIs.length) {
       is(gBrowser.tabs.length, gCurrentTest.URIs.length + 1,
          "We have opened " + gCurrentTest.URIs.length + " new tab(s)");
     }
 
     var tab = aEvent.target;
     is(tab.ownerGlobal, window,
        "Tab has been opened in current browser window");
   },
 
-  onLocationChange: function(aBrowser, aWebProgress, aRequest, aLocationURI,
+  onLocationChange(aBrowser, aWebProgress, aRequest, aLocationURI,
                              aFlags) {
     var spec = aLocationURI.spec;
     ok(true, spec);
     // When a new tab is opened, location is first set to "about:blank", so
     // we can ignore those calls.
     // Ignore multiple notifications for the same URI too.
     if (spec == "about:blank" || this._loadedURIs.includes(spec))
       return;
@@ -71,50 +71,50 @@ var gTabsListener = {
 // ------------------------------------------------------------------------------
 // Open bookmark in a new tab.
 
 gTests.push({
   desc: "Open bookmark in a new tab.",
   URIs: ["about:buildconfig"],
   _itemId: -1,
 
-  setup: function() {
+  setup() {
     var bs = PlacesUtils.bookmarks;
     // Add a new unsorted bookmark.
     this._itemId = bs.insertBookmark(bs.unfiledBookmarksFolder,
                                      PlacesUtils._uri(this.URIs[0]),
                                      bs.DEFAULT_INDEX,
                                      "Title");
     // Select unsorted bookmarks root in the left pane.
     gLibrary.PlacesOrganizer.selectLeftPaneQuery("UnfiledBookmarks");
     isnot(gLibrary.PlacesOrganizer._places.selectedNode, null,
           "We correctly have selection in the Library left pane");
     // Get our bookmark in the right pane.
     var bookmarkNode = gLibrary.ContentTree.view.view.nodeForTreeIndex(0);
     is(bookmarkNode.uri, this.URIs[0], "Found bookmark in the right pane");
   },
 
-  finish: function() {
+  finish() {
     setTimeout(runNextTest, 0);
   },
 
-  cleanup: function() {
+  cleanup() {
     PlacesUtils.bookmarks.removeItem(this._itemId);
   }
 });
 
 // ------------------------------------------------------------------------------
 // Open a folder in tabs.
 
 gTests.push({
   desc: "Open a folder in tabs.",
   URIs: ["about:buildconfig", "about:"],
   _folderId: -1,
 
-  setup: function() {
+  setup() {
     var bs = PlacesUtils.bookmarks;
     // Create a new folder.
     var folderId = bs.createFolder(bs.unfiledBookmarksFolder,
                                    "Folder",
                                    bs.DEFAULT_INDEX);
     this._folderId = folderId;
 
     // Add bookmarks in folder.
@@ -129,35 +129,35 @@ gTests.push({
     gLibrary.PlacesOrganizer.selectLeftPaneQuery("UnfiledBookmarks");
     isnot(gLibrary.PlacesOrganizer._places.selectedNode, null,
           "We correctly have selection in the Library left pane");
     // Get our bookmark in the right pane.
     var folderNode = gLibrary.ContentTree.view.view.nodeForTreeIndex(0);
     is(folderNode.title, "Folder", "Found folder in the right pane");
   },
 
-  finish: function() {
+  finish() {
     setTimeout(runNextTest, 0);
   },
 
-  cleanup: function() {
+  cleanup() {
     PlacesUtils.bookmarks.removeItem(this._folderId);
   }
 });
 
 // ------------------------------------------------------------------------------
 // Open a query in tabs.
 
 gTests.push({
   desc: "Open a query in tabs.",
   URIs: ["about:buildconfig", "about:"],
   _folderId: -1,
   _queryId: -1,
 
-  setup: function() {
+  setup() {
     var bs = PlacesUtils.bookmarks;
     // Create a new folder.
     var folderId = bs.createFolder(bs.unfiledBookmarksFolder,
                                    "Folder",
                                    bs.DEFAULT_INDEX);
     this._folderId = folderId;
 
     // Add bookmarks in folder.
@@ -186,21 +186,21 @@ gTests.push({
     gLibrary.PlacesOrganizer.selectLeftPaneQuery("UnfiledBookmarks");
     isnot(gLibrary.PlacesOrganizer._places.selectedNode, null,
           "We correctly have selection in the Library left pane");
     // Get our bookmark in the right pane.
     var folderNode = gLibrary.ContentTree.view.view.nodeForTreeIndex(0);
     is(folderNode.title, "Query", "Found query in the right pane");
   },
 
-  finish: function() {
+  finish() {
     setTimeout(runNextTest, 0);
   },
 
-  cleanup: function() {
+  cleanup() {
     PlacesUtils.bookmarks.removeItem(this._folderId);
     PlacesUtils.bookmarks.removeItem(this._queryId);
   }
 });
 
 // ------------------------------------------------------------------------------
 
 function test() {
--- a/browser/components/places/tests/browser/browser_library_views_liveupdate.js
+++ b/browser/components/places/tests/browser/browser_library_views_liveupdate.js
@@ -149,20 +149,20 @@ function finishTest() {
  */
 var bookmarksObserver = {
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsINavBookmarkObserver
   , Ci.nsIAnnotationObserver
   ]),
 
   // nsIAnnotationObserver
-  onItemAnnotationSet: function() {},
-  onItemAnnotationRemoved: function() {},
-  onPageAnnotationSet: function() {},
-  onPageAnnotationRemoved: function() {},
+  onItemAnnotationSet() {},
+  onItemAnnotationRemoved() {},
+  onPageAnnotationSet() {},
+  onPageAnnotationRemoved() {},
 
   // nsINavBookmarkObserver
   onItemAdded: function PSB_onItemAdded(aItemId, aFolderId, aIndex, aItemType,
                                         aURI) {
     var node = null;
     var index = null;
     [node, index] = getNodeForTreeItem(aItemId, gLibrary.PlacesOrganizer._places);
     // Left pane should not be updated for normal bookmarks or separators.
@@ -186,17 +186,17 @@ var bookmarksObserver = {
   },
 
   onItemRemoved: function PSB_onItemRemoved(aItemId, aFolder, aIndex) {
     var node = null;
     [node, ] = getNodeForTreeItem(aItemId, gLibrary.PlacesOrganizer._places);
     is(node, null, "Places node not found in left pane");
   },
 
-  onItemMoved: function(aItemId,
+  onItemMoved(aItemId,
                         aOldFolderId, aOldIndex,
                         aNewFolderId, aNewIndex, aItemType) {
     var node = null;
     var index = null;
     [node, index] = getNodeForTreeItem(aItemId, gLibrary.PlacesOrganizer._places);
     // Left pane should not be updated for normal bookmarks or separators.
     switch (aItemType) {
       case PlacesUtils.bookmarks.TYPE_BOOKMARK:
@@ -214,17 +214,17 @@ var bookmarksObserver = {
       default:
         isnot(node, null, "Found new Places node in left pane");
         ok(index >= 0, "Node is at index " + index);
     }
   },
 
   onBeginUpdateBatch: function PSB_onBeginUpdateBatch() {},
   onEndUpdateBatch: function PSB_onEndUpdateBatch() {},
-  onItemVisited: function() {},
+  onItemVisited() {},
   onItemChanged: function PSB_onItemChanged(aItemId, aProperty,
                                             aIsAnnotationProperty, aNewValue) {
     if (aProperty == "title") {
       let validator = function(aTreeRowIndex) {
         let tree = gLibrary.PlacesOrganizer._places;
         let cellText = tree.view.getCellText(aTreeRowIndex,
                                              tree.columns.getColumnAt(0));
         return cellText == aNewValue;
--- a/browser/components/places/tests/browser/browser_sidebarpanels_click.js
+++ b/browser/components/places/tests/browser/browser_sidebarpanels_click.js
@@ -22,56 +22,56 @@ function test() {
   }
 
   let sidebar = document.getElementById("sidebar");
   let tests = [];
   let currentTest;
 
   tests.push({
     _itemID: null,
-    init: function(aCallback) {
+    init(aCallback) {
       // Add a bookmark to the Unfiled Bookmarks folder.
       this._itemID = PlacesUtils.bookmarks.insertBookmark(
         PlacesUtils.unfiledBookmarksFolderId, PlacesUtils._uri(TEST_URL),
         PlacesUtils.bookmarks.DEFAULT_INDEX, "test"
       );
       aCallback();
     },
-    prepare: function() {
+    prepare() {
     },
-    selectNode: function(tree) {
+    selectNode(tree) {
       tree.selectItems([this._itemID]);
     },
-    cleanup: function(aCallback) {
+    cleanup(aCallback) {
       PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.unfiledBookmarksFolderId);
       executeSoon(aCallback);
     },
     sidebarName: BOOKMARKS_SIDEBAR_ID,
     treeName: BOOKMARKS_SIDEBAR_TREE_ID,
     desc: "Bookmarks sidebar test"
   });
 
   tests.push({
-    init: function(aCallback) {
+    init(aCallback) {
       // Add a history entry.
       let uri = PlacesUtils._uri(TEST_URL);
       PlacesTestUtils.addVisits({
-        uri: uri, visitDate: Date.now() * 1000,
+        uri, visitDate: Date.now() * 1000,
         transition: PlacesUtils.history.TRANSITION_TYPED
       }).then(aCallback);
     },
-    prepare: function() {
+    prepare() {
       sidebar.contentDocument.getElementById("byvisited").doCommand();
     },
-    selectNode: function(tree) {
+    selectNode(tree) {
       tree.selectNode(tree.view.nodeForTreeIndex(0));
       is(tree.selectedNode.uri, TEST_URL, "The correct visit has been selected");
       is(tree.selectedNode.itemId, -1, "The selected node is not bookmarked");
     },
-    cleanup: function(aCallback) {
+    cleanup(aCallback) {
       PlacesTestUtils.clearHistory().then(aCallback);
     },
     sidebarName: HISTORY_SIDEBAR_ID,
     treeName: HISTORY_SIDEBAR_TREE_ID,
     desc: "History sidebar test"
   });
 
   function testPlacesPanel(preFunc, postFunc) {
--- a/browser/components/places/tests/browser/browser_views_liveupdate.js
+++ b/browser/components/places/tests/browser/browser_views_liveupdate.js
@@ -187,20 +187,20 @@ function finishTest() {
  */
 var bookmarksObserver = {
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsINavBookmarkObserver
   , Ci.nsIAnnotationObserver
   ]),
 
   // nsIAnnotationObserver
-  onItemAnnotationSet: function() {},
-  onItemAnnotationRemoved: function() {},
-  onPageAnnotationSet: function() {},
-  onPageAnnotationRemoved: function() {},
+  onItemAnnotationSet() {},
+  onItemAnnotationRemoved() {},
+  onPageAnnotationSet() {},
+  onPageAnnotationRemoved() {},
 
   // nsINavBookmarkObserver
   onItemAdded: function PSB_onItemAdded(aItemId, aFolderId, aIndex,
                                         aItemType, aURI) {
     var views = getViewsForFolder(aFolderId);
     ok(views.length > 0, "Found affected views (" + views.length + "): " + views);
 
     // Check that item has been added in the correct position.
@@ -218,17 +218,17 @@ var bookmarksObserver = {
     // Check that item has been removed.
     for (var i = 0; i < views.length; i++) {
       var node = null;
       [node, ] = searchItemInView(aItemId, views[i]);
       is(node, null, "Places node not found in " + views[i]);
     }
   },
 
-  onItemMoved: function(aItemId,
+  onItemMoved(aItemId,
                         aOldFolderId, aOldIndex,
                         aNewFolderId, aNewIndex,
                         aItemType) {
     var views = getViewsForFolder(aNewFolderId);
     ok(views.length > 0, "Found affected views: " + views);
 
     // Check that item has been moved in the correct position.
     for (var i = 0; i < views.length; i++) {
@@ -237,17 +237,17 @@ var bookmarksObserver = {
       [node, index] = searchItemInView(aItemId, views[i]);
       isnot(node, null, "Found new Places node in " + views[i]);
       is(index, aNewIndex, "Node is at index " + index);
     }
   },
 
   onBeginUpdateBatch: function PSB_onBeginUpdateBatch() {},
   onEndUpdateBatch: function PSB_onEndUpdateBatch() {},
-  onItemVisited: function() {},
+  onItemVisited() {},
 
   onItemChanged: function PSB_onItemChanged(aItemId, aProperty,
                                             aIsAnnotationProperty, aNewValue,
                                             aLastModified, aItemType,
                                             aParentId) {
     if (aProperty !== "title")
       return;
 
--- a/browser/components/places/tests/browser/head.js
+++ b/browser/components/places/tests/browser/head.js
@@ -111,19 +111,19 @@ function waitForAsyncUpdates(aCallback, 
   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: function() {},
-    handleError: function() {},
-    handleCompletion: function(aReason)
+    handleResult() {},
+    handleError() {},
+    handleCompletion(aReason)
     {
       aCallback.apply(scope, args);
     }
   });
   commit.finalize();
 }
 
 function synthesizeClickOnSelectedTreeCell(aTree, aOptions) {
--- a/browser/components/places/tests/unit/test_421483.js
+++ b/browser/components/places/tests/unit/test_421483.js
@@ -74,17 +74,17 @@ add_task(function* move_smart_bookmark_r
     parentGuid: bm.parentGuid,
     title: "test",
     index: PlacesUtils.bookmarks.DEFAULT_INDEX,
     type: PlacesUtils.bookmarks.TYPE_FOLDER
   });
 
   // change title and move into new subfolder
   yield PlacesUtils.bookmarks.update({
-    guid: guid,
+    guid,
     parentGuid: subfolder.guid,
     index: PlacesUtils.bookmarks.DEFAULT_INDEX,
     title: "new title"
   });
 
   // restore
   Services.prefs.setIntPref("browser.places.smartBookmarksVersion", 0);
   yield rebuildSmartBookmarks();
--- a/browser/components/places/tests/unit/test_PUIU_makeTransaction.js
+++ b/browser/components/places/tests/unit/test_PUIU_makeTransaction.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function waitForBookmarkNotification(aNotification, aCallback, aProperty)
 {
   PlacesUtils.bookmarks.addObserver({
-    validate: function(aMethodName, aData)
+    validate(aMethodName, aData)
     {
       if (aMethodName == aNotification &&
           (!aProperty || aProperty == aData.property)) {
         PlacesUtils.bookmarks.removeObserver(this);
         aCallback(aData);
       }
     },
 
--- a/browser/components/places/tests/unit/test_clearHistory_shutdown.js
+++ b/browser/components/places/tests/unit/test_clearHistory_shutdown.js
@@ -128,21 +128,21 @@ function getFormHistoryCount() {
 }
 
 function storeCache(aURL, aContent) {
   let cache = Services.cache2;
   let storage = cache.diskCacheStorage(LoadContextInfo.default, false);
 
   return new Promise(resolve => {
     let storeCacheListener = {
-      onCacheEntryCheck: function(entry, appcache) {
+      onCacheEntryCheck(entry, appcache) {
         return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED;
       },
 
-      onCacheEntryAvailable: function(entry, isnew, appcache, status) {
+      onCacheEntryAvailable(entry, isnew, appcache, status) {
         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" +
@@ -163,17 +163,17 @@ function storeCache(aURL, aContent) {
 
 
 function checkCache(aURL) {
   let cache = Services.cache2;
   let storage = cache.diskCacheStorage(LoadContextInfo.default, false);
 
   return new Promise(resolve => {
     let checkCacheListener = {
-      onCacheEntryAvailable: function(entry, isnew, appcache, status) {
+      onCacheEntryAvailable(entry, isnew, appcache, status) {
         do_check_eq(status, Cr.NS_ERROR_CACHE_KEY_NOT_FOUND);
         resolve();
       }
     };
 
     storage.asyncOpenURI(Services.io.newURI(aURL, null, null), "",
                         Ci.nsICacheStorage.OPEN_READONLY,
                         checkCacheListener);
--- a/browser/components/preferences/SiteDataManager.jsm
+++ b/browser/components/preferences/SiteDataManager.jsm
@@ -49,18 +49,18 @@ this.SiteDataManager = {
     let status = null;
     let e = Services.perms.enumerator;
     while (e.hasMoreElements()) {
       perm = e.getNext();
       status = Services.perms.testExactPermissionFromPrincipal(perm.principal, "persistent-storage");
       if (status === Ci.nsIPermissionManager.ALLOW_ACTION ||
           status === Ci.nsIPermissionManager.DENY_ACTION) {
         this._sites.set(perm.principal.origin, {
-          perm: perm,
-          status: status,
+          perm,
+          status,
           quotaUsage: 0,
           appCacheList: [],
           diskCacheList: []
         });
       }
     }
 
     this._updateQuota();
@@ -74,17 +74,17 @@ this.SiteDataManager = {
   },
 
   _updateQuota() {
     this._quotaUsageRequests = [];
     let promises = [];
     for (let site of this._sites.values()) {
       promises.push(new Promise(resolve => {
         let callback = {
-          onUsageResult: function(request) {
+          onUsageResult(request) {
             site.quotaUsage = request.usage;
             resolve();
           }
         };
         // XXX: The work of integrating localStorage into Quota Manager is in progress.
         //      After the bug 742822 and 1286798 landed, localStorage usage will be included.
         //      So currently only get indexedDB usage.
         this._quotaUsageRequests.push(
@@ -116,28 +116,28 @@ this.SiteDataManager = {
     }
   },
 
   _updateDiskCache() {
     this._updateDiskCachePromise = new Promise(resolve => {
       if (this._sites.size) {
         let sites = this._sites;
         let visitor = {
-          onCacheEntryInfo: function(uri, idEnhance, dataSize) {
+          onCacheEntryInfo(uri, idEnhance, dataSize) {
             for (let site of sites.values()) {
               if (site.perm.matchesURI(uri, true)) {
                 site.diskCacheList.push({
                   dataSize,
                   idEnhance
                 });
                 break;
               }
             }
           },
-          onCacheEntryVisitCompleted: function() {
+          onCacheEntryVisitCompleted() {
             resolve();
           }
         };
         this._diskCache.asyncVisitStorage(visitor, true);
       } else {
         resolve();
       }
     });
--- a/browser/components/preferences/blocklists.js
+++ b/browser/components/preferences/blocklists.js
@@ -17,65 +17,65 @@ var gBlocklistManager = {
   _bundle: null,
   _tree: null,
 
   _view: {
     _rowCount: 0,
     get rowCount() {
       return this._rowCount;
     },
-    getCellText: function(row, column) {
+    getCellText(row, column) {
       if (column.id == "listCol") {
         let list = gBlocklistManager._blockLists[row];
         let desc = list.description ? list.description : "";
         let text = gBlocklistManager._bundle.getFormattedString("mozNameTemplate",
                                                                 [list.name, desc]);
         return text;
       }
       return "";
     },
 
-    isSeparator: function(index) { return false; },
-    isSorted: function() { return false; },
-    isContainer: function(index) { return false; },
-    setTree: function(tree) {},
-    getImageSrc: function(row, column) {},
-    getProgressMode: function(row, column) {},
-    getCellValue: function(row, column) {
+    isSeparator(index) { return false; },
+    isSorted() { return false; },
+    isContainer(index) { return false; },
+    setTree(tree) {},
+    getImageSrc(row, column) {},
+    getProgressMode(row, column) {},
+    getCellValue(row, column) {
       if (column.id == "selectionCol")
         return gBlocklistManager._blockLists[row].selected;
       return undefined;
     },
-    cycleHeader: function(column) {},
-    getRowProperties: function(row) { return ""; },
-    getColumnProperties: function(column) { return ""; },
-    getCellProperties: function(row, column) {
+    cycleHeader(column) {},
+    getRowProperties(row) { return ""; },
+    getColumnProperties(column) { return ""; },
+    getCellProperties(row, column) {
       if (column.id == "selectionCol") {
         return "checkmark";
       }
 
       return "";
     }
   },
 
-  onWindowKeyPress: function(event) {
+  onWindowKeyPress(event) {
     if (event.keyCode == KeyEvent.DOM_VK_ESCAPE) {
       window.close();
     } else if (event.keyCode == KeyEvent.DOM_VK_RETURN) {
       gBlocklistManager.onApplyChanges();
     }
   },
 
-  onLoad: function() {
+  onLoad() {
     this._bundle = document.getElementById("bundlePreferences");
     let params = window.arguments[0];
     this.init(params);
   },
 
-  init: function(params) {
+  init(params) {
     if (this._type) {
       // reusing an open dialog, clear the old observer
       this.uninit();
     }
 
     this._type = "tracking";
     this._brandShortName = params.brandShortName;
 
@@ -92,28 +92,28 @@ var gBlocklistManager = {
       if (event.target.nodeName != "treecol" || event.button != 0) {
         return;
       }
     });
 
     this._loadBlockLists();
   },
 
-  uninit: function() {},
+  uninit() {},
 
-  onListSelected: function() {
+  onListSelected() {
     for (let list of this._blockLists) {
       list.selected = false;
     }
     this._blockLists[this._tree.currentIndex].selected = true;
 
     this._updateTree();
   },
 
-  onApplyChanges: function() {
+  onApplyChanges() {
     let activeList = this._getActiveList();
     let selected = null;
     for (let list of this._blockLists) {
       if (list.selected) {
         selected = list;
         break;
       }
     }
@@ -148,17 +148,17 @@ var gBlocklistManager = {
       }
 
       // Don't close the dialog in case we didn't quit.
       return;
     }
     window.close();
   },
 
-  _loadBlockLists: function() {
+  _loadBlockLists() {
     this._blockLists = [];
 
     // Load blocklists into a table.
     let branch = Services.prefs.getBranch(LISTS_PREF_BRANCH);
     let itemArray = branch.getChildList("");
     for (let itemName of itemArray) {
       try {
         this._createOrUpdateBlockList(itemName);
@@ -166,17 +166,17 @@ var gBlocklistManager = {
         // Ignore bogus or missing list name.
         continue;
       }
     }
 
     this._updateTree();
   },
 
-  _createOrUpdateBlockList: function(itemName) {
+  _createOrUpdateBlockList(itemName) {
     let branch = Services.prefs.getBranch(LISTS_PREF_BRANCH);
     let key = branch.getCharPref(itemName);
     let value = this._bundle.getString(key);
 
     let suffix = itemName.slice(itemName.lastIndexOf("."));
     let id = itemName.replace(suffix, "");
     let list = this._blockLists.find(el => el.id === id);
     if (!list) {
@@ -187,23 +187,23 @@ var gBlocklistManager = {
 
     // Get the property name from the suffix (e.g. ".name" -> "name").
     let prop = suffix.slice(1);
     list[prop] = value;
 
     return list;
   },
 
-  _updateTree: function() {
+  _updateTree() {
     this._tree = document.getElementById("blocklistsTree");
     this._view._rowCount = this._blockLists.length;
     this._tree.view = this._view;
   },
 
-  _getActiveList: function() {
+  _getActiveList() {
     let trackingTable = Services.prefs.getCharPref(TRACKING_TABLE_PREF);
     return trackingTable.includes(CONTENT_LIST_ID) ? CONTENT_LIST_ID : BASE_LIST_ID;
   }
 };
 
 function initWithParams(params) {
   gBlocklistManager.init(params);
 }
--- a/browser/components/preferences/connection.js
+++ b/browser/components/preferences/connection.js
@@ -1,15 +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: function()
+  beforeAccept()
   {
     var proxyTypePref = document.getElementById("network.proxy.type");
     if (proxyTypePref.value == 2) {
       this.doAutoconfigURLFixup();
       return true;
     }
 
     if (proxyTypePref.value != 1)
@@ -47,23 +47,23 @@ var gConnectionsDialog = {
       }
     }
 
     this.sanitizeNoProxiesPref();
 
     return true;
   },
 
-  checkForSystemProxy: function()
+  checkForSystemProxy()
   {
     if ("@mozilla.org/system-proxy-settings;1" in Components.classes)
       document.getElementById("systemPref").removeAttribute("hidden");
   },
 
-  proxyTypeChanged: function()
+  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,27 +79,27 @@ var gConnectionsDialog = {
     noProxiesPref.disabled = proxyTypePref.value != 1;
 
     var autoconfigURLPref = document.getElementById("network.proxy.autoconfig_url");
     autoconfigURLPref.disabled = proxyTypePref.value != 2;
 
     this.updateReloadButton();
   },
 
-  updateDNSPref: function()
+  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: function()
+  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,23 +111,23 @@ 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: function()
+  readProxyType()
   {
     this.proxyTypeChanged();
     return undefined;
   },
 
-  updateProtocolPrefs: function()
+  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");
 
@@ -151,63 +151,63 @@ 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: function(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: function()
+  reloadPAC()
   {
     Components.classes["@mozilla.org/network/protocol-proxy-service;1"].
         getService().reloadPAC();
   },
 
-  doAutoconfigURLFixup: function()
+  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: function()
+  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: function()
+  readHTTPProxyServer()
   {
     var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings");
     if (shareProxiesPref.value)
       this.updateProtocolPrefs();
     return undefined;
   },
 
-  readHTTPProxyPort: function()
+  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
@@ -16,17 +16,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 var gCookiesWindow = {
   _cm               : Components.classes["@mozilla.org/cookiemanager;1"]
                                 .getService(Components.interfaces.nsICookieManager),
   _hosts            : {},
   _hostOrder        : [],
   _tree             : null,
   _bundle           : null,
 
-  init: function() {
+  init() {
     var os = Components.classes["@mozilla.org/observer-service;1"]
                        .getService(Components.interfaces.nsIObserverService);
     os.addObserver(this, "cookie-changed", false);
     os.addObserver(this, "perm-changed", false);
 
     this._bundle = document.getElementById("bundlePreferences");
     this._tree = document.getElementById("cookiesList");
 
@@ -34,24 +34,24 @@ var gCookiesWindow = {
 
     document.getElementById("filter").focus();
 
     if (!Services.prefs.getBoolPref("privacy.userContext.enabled")) {
       document.getElementById("userContextRow").hidden = true;
     }
   },
 
-  uninit: function() {
+  uninit() {
     var os = Components.classes["@mozilla.org/observer-service;1"]
                        .getService(Components.interfaces.nsIObserverService);
     os.removeObserver(this, "cookie-changed");
     os.removeObserver(this, "perm-changed");
   },
 
-  _populateList: function(aInitialLoad) {
+  _populateList(aInitialLoad) {
     this._loadCookies();
     this._tree.view = this._view;
     if (aInitialLoad)
       this.sort("rawHost");
     if (this._view.rowCount > 0)
       this._tree.view.selection.select(0);
 
     if (aInitialLoad) {
@@ -64,34 +64,34 @@ var gCookiesWindow = {
       this.filter();
     }
 
     this._updateRemoveAllButton();
 
     this._saveState();
   },
 
-  _cookieEquals: function(aCookieA, aCookieB, aStrippedHost) {
+  _cookieEquals(aCookieA, aCookieB, aStrippedHost) {
     return aCookieA.rawHost == aStrippedHost &&
            aCookieA.name == aCookieB.name &&
            aCookieA.path == aCookieB.path &&
            ChromeUtils.isOriginAttributesEqual(aCookieA.originAttributes,
                                                aCookieB.originAttributes);
   },
 
-  _isPrivateCookie: function(aCookie) {
+  _isPrivateCookie(aCookie) {
       let { userContextId } = aCookie.originAttributes;
       if (!userContextId) {
         // Default identity is public.
         return false;
       }
       return !ContextualIdentityService.getIdentityFromId(userContextId).public;
   },
 
-  observe: function(aCookie, aTopic, aData) {
+  observe(aCookie, aTopic, aData) {
     if (aTopic != "cookie-changed")
       return;
 
     if (aCookie instanceof Components.interfaces.nsICookie) {
       if (this._isPrivateCookie(aCookie)) {
         return;
       }
 
@@ -118,17 +118,17 @@ var gCookiesWindow = {
       // then, reload the list
       this._populateList(false);
     }
 
     // We don't yet handle aData == "deleted" - it's a less common case
     // and is rather complicated as selection tracking is difficult
   },
 
-  _handleCookieChanged: function(changedCookie, strippedHost) {
+  _handleCookieChanged(changedCookie, strippedHost) {
     var rowIndex = 0;
     var cookieItem = null;
     if (!this._view._filtered) {
       for (let host of this._hostOrder) {
         ++rowIndex;
         var hostItem = this._hosts[host];
         if (host == strippedHost) {
           // Host matches, look for the cookie within this Host collection
@@ -167,17 +167,17 @@ var gCookiesWindow = {
 
     // Make sure the tree display is up to date...
     this._tree.treeBoxObject.invalidateRow(rowIndex);
     // ... and if the cookie is selected, update the displayed metadata too
     if (cookieItem != null && this._view.selection.currentIndex == rowIndex)
       this._updateCookieData(cookieItem);
   },
 
-  _handleCookieAdded: function(changedCookie, strippedHost) {
+  _handleCookieAdded(changedCookie, strippedHost) {
     var rowCountImpact = 0;
     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)
@@ -207,17 +207,17 @@ var gCookiesWindow = {
     _filterValue: "",
     _rowCount   : 0,
     _cacheValid : 0,
     _cacheItems : [],
     get rowCount() {
       return this._rowCount;
     },
 
-    _getItemAtIndex: function(aIndex) {
+    _getItemAtIndex(aIndex) {
       if (this._filtered)
         return this._filterSet[aIndex];
 
       var start = 0;
       var count = 0, hostIndex = 0;
 
       var cacheIndex = Math.min(this._cacheValid, aIndex);
       if (cacheIndex > 0) {
@@ -262,17 +262,17 @@ var gCookiesWindow = {
 
         for (let k = cacheStart; k < count; k++)
           this._cacheItems[k] = cacheEntry;
         this._cacheValid = count - 1;
       }
       return null;
     },
 
-    _removeItemAtIndex: function(aIndex, aCount) {
+    _removeItemAtIndex(aIndex, aCount) {
       let removeCount = aCount === undefined ? 1 : aCount;
       if (this._filtered) {
         // remove the cookies from the unfiltered set so that they
         // don't reappear when the filter is changed. See bug 410863.
         for (let i = aIndex; i < aIndex + removeCount; ++i) {
           let item = this._filterSet[i];
           let parent = gCookiesWindow._hosts[item.rawHost];
           for (let j = 0; j < parent.cookies.length; ++j) {
@@ -301,21 +301,21 @@ var gCookiesWindow = {
               ChromeUtils.isOriginAttributesEqual(item.originAttributes,
                                                   cookie.originAttributes)) {
             parent.cookies.splice(i, removeCount);
           }
         }
       }
     },
 
-    _invalidateCache: function(aIndex) {
+    _invalidateCache(aIndex) {
       this._cacheValid = Math.min(this._cacheValid, aIndex);
     },
 
-    getCellText: function(aIndex, aColumn) {
+    getCellText(aIndex, aColumn) {
       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;
@@ -326,60 +326,60 @@ var gCookiesWindow = {
         return this._filterSet[aIndex].name;
       }
       return "";
     },
 
     _selection: null,
     get selection() { return this._selection; },
     set selection(val) { this._selection = val; return val; },
-    getRowProperties: function(aIndex) { return ""; },
-    getCellProperties: function(aIndex, aColumn) { return ""; },
-    getColumnProperties: function(aColumn) { return ""; },
-    isContainer: function(aIndex) {
+    getRowProperties(aIndex) { return ""; },
+    getCellProperties(aIndex, aColumn) { return ""; },
+    getColumnProperties(aColumn) { return ""; },
+    isContainer(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item) return false;
         return item.container;
       }
       return false;
     },
-    isContainerOpen: function(aIndex) {
+    isContainerOpen(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item) return false;
         return item.open;
       }
       return false;
     },
-    isContainerEmpty: function(aIndex) {
+    isContainerEmpty(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item) return false;
         return item.cookies.length == 0;
       }
       return false;
     },
-    isSeparator: function(aIndex) { return false; },
-    isSorted: function(aIndex) { return false; },
-    canDrop: function(aIndex, aOrientation) { return false; },
-    drop: function(aIndex, aOrientation) {},
-    getParentIndex: function(aIndex) {
+    isSeparator(aIndex) { return false; },
+    isSorted(aIndex) { return false; },
+    canDrop(aIndex, aOrientation) { return false; },
+    drop(aIndex, aOrientation) {},
+    getParentIndex(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         // If an item has no parent index (i.e. it is at the top level) this
         // function MUST return -1 otherwise we will go into an infinite loop.
         // Containers are always top level items in the cookies tree, so make
         // sure to return the appropriate value here.
         if (!item || item.container) return -1;
         return item.parentIndex;
       }
       return -1;
     },
-    hasNextSibling: function(aParentIndex, aIndex) {
+    hasNextSibling(aParentIndex, aIndex) {
       if (!this._filtered) {
         // |aParentIndex| appears to be bogus, but we can get the real
         // parent index by getting the entry for |aIndex| and reading the
         // parentIndex field.
         // The index of the last item in this host collection is the
         // index of the parent + the size of the host collection, and
         // aIndex has a next sibling if it is less than this value.
         var item = this._getItemAtIndex(aIndex);
@@ -394,103 +394,103 @@ var gCookiesWindow = {
           }
           var parent = this._getItemAtIndex(item.parentIndex);
           if (parent && parent.container)
             return aIndex < item.parentIndex + parent.cookies.length;
         }
       }
       return aIndex < this.rowCount - 1;
     },
-    hasPreviousSibling: function(aIndex) {
+    hasPreviousSibling(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item) return false;
         var parent = this._getItemAtIndex(item.parentIndex);
         if (parent && parent.container)
           return aIndex > item.parentIndex + 1;
       }
       return aIndex > 0;
     },
-    getLevel: function(aIndex) {
+    getLevel(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item) return 0;
         return item.level;
       }
       return 0;
     },
-    getImageSrc: function(aIndex, aColumn) {},
-    getProgressMode: function(aIndex, aColumn) {},
-    getCellValue: function(aIndex, aColumn) {},
-    setTree: function(aTree) {},
-    toggleOpenState: function(aIndex) {
+    getImageSrc(aIndex, aColumn) {},
+    getProgressMode(aIndex, aColumn) {},
+    getCellValue(aIndex, aColumn) {},
+    setTree(aTree) {},
+    toggleOpenState(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item) return;
         this._invalidateCache(aIndex);
         var multiplier = item.open ? -1 : 1;
         var delta = multiplier * item.cookies.length;
         this._rowCount += delta;
         item.open = !item.open;
         gCookiesWindow._tree.treeBoxObject.rowCountChanged(aIndex + 1, delta);
         gCookiesWindow._tree.treeBoxObject.invalidateRow(aIndex);
       }
     },
-    cycleHeader: function(aColumn) {},
-    selectionChanged: function() {},
-    cycleCell: function(aIndex, aColumn) {},
-    isEditable: function(aIndex, aColumn) {
+    cycleHeader(aColumn) {},
+    selectionChanged() {},
+    cycleCell(aIndex, aColumn) {},
+    isEditable(aIndex, aColumn) {
       return false;
     },
-    isSelectable: function(aIndex, aColumn) {
+    isSelectable(aIndex, aColumn) {
       return false;
     },
-    setCellValue: function(aIndex, aColumn, aValue) {},
-    setCellText: function(aIndex, aColumn, aValue) {},
-    performAction: function(aAction) {},
-    performActionOnRow: function(aAction, aIndex) {},
-    performActionOnCell: function(aAction, aindex, aColumn) {}
+    setCellValue(aIndex, aColumn, aValue) {},
+    setCellText(aIndex, aColumn, aValue) {},
+    performAction(aAction) {},
+    performActionOnRow(aAction, aIndex) {},
+    performActionOnCell(aAction, aindex, aColumn) {}
   },
 
-  _makeStrippedHost: function(aHost) {
+  _makeStrippedHost(aHost) {
     var formattedHost = aHost.charAt(0) == "." ? aHost.substring(1, aHost.length) : aHost;
     return formattedHost.substring(0, 4) == "www." ? formattedHost.substring(4, formattedHost.length) : formattedHost;
   },
 
-  _addCookie: function(aStrippedHost, aCookie, aHostCount) {
+  _addCookie(aStrippedHost, aCookie, aHostCount) {
     if (!(aStrippedHost in this._hosts) || !this._hosts[aStrippedHost]) {
       this._hosts[aStrippedHost] = { cookies   : [],
                                      rawHost   : aStrippedHost,
                                      level     : 0,
                                      open      : false,
                                      container : true };
       this._hostOrder.push(aStrippedHost);
       ++aHostCount.value;
     }
 
     var c = this._makeCookieObject(aStrippedHost, aCookie);
     this._hosts[aStrippedHost].cookies.push(c);
   },
 
-  _makeCookieObject: function(aStrippedHost, aCookie) {
+  _makeCookieObject(aStrippedHost, aCookie) {
     var c = { name            : aCookie.name,
               value           : aCookie.value,
               isDomain        : aCookie.isDomain,
               host            : aCookie.host,
               rawHost         : aStrippedHost,
               path            : aCookie.path,
               isSecure        : aCookie.isSecure,
               expires         : aCookie.expires,
               level           : 1,
               container       : false,
               originAttributes: aCookie.originAttributes };
     return c;
   },
 
-  _loadCookies: function() {
+  _loadCookies() {
     var e = this._cm.enumerator;
     var hostCount = { value: 0 };
     this._hosts = {};
     this._hostOrder = [];
     while (e.hasMoreElements()) {
       var cookie = e.getNext();
       if (cookie && cookie instanceof Components.interfaces.nsICookie) {
         if (this._isPrivateCookie(cookie)) {
@@ -501,38 +501,38 @@ var gCookiesWindow = {
         this._addCookie(strippedHost, cookie, hostCount);
       }
       else
         break;
     }
     this._view._rowCount = hostCount.value;
   },
 
-  formatExpiresString: function(aExpires) {
+  formatExpiresString(aExpires) {
     if (aExpires) {
       var date = new Date(1000 * aExpires);
       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);
     }
     return this._bundle.getString("expireAtEndOfSession");
   },
 
-  _getUserContextString: function(aUserContextId) {
+  _getUserContextString(aUserContextId) {
     if (parseInt(aUserContextId) == 0) {
       return this._bundle.getString("defaultUserContextLabel");
     }
 
     return ContextualIdentityService.getUserContextLabel(aUserContextId);
   },
 
-  _updateCookieData: function(aItem) {
+  _updateCookieData(aItem) {
     var seln = this._view.selection;
     var ids = ["name", "value", "host", "path", "isSecure", "expires", "userContext"];
     var properties;
 
     if (aItem && !aItem.container && seln.count > 0) {
       properties = { name: aItem.name, value: aItem.value, host: aItem.host,
                      path: aItem.path, expires: this.formatExpiresString(aItem.expires),
                      isDomain: aItem.isDomain ? this._bundle.getString("domainColon")
@@ -552,17 +552,17 @@ var gCookiesWindow = {
       for (let id of ids) {
         document.getElementById(id).disabled = true;
       }
     }
     for (let property in properties)
       document.getElementById(property).value = properties[property];
   },
 
-  onCookieSelected: function() {
+  onCookieSelected() {
     var item;
     var seln = this._tree.view.selection;
     if (!this._view._filtered)
       item = this._view._getItemAtIndex(seln.currentIndex);
     else
       item = this._view._filterSet[seln.currentIndex];
 
     this._updateCookieData(item);
@@ -597,17 +597,17 @@ var gCookiesWindow = {
     if (psvc.prefHasUserValue("network.cookie.blockFutureCookies"))
       blockFutureCookies = psvc.getBoolPref("network.cookie.blockFutureCookies");
     for (let item of deleteItems) {
       this._cm.remove(item.host, item.name, item.path,
                       blockFutureCookies, item.originAttributes);
     }
   },
 
-  deleteCookie: function() {
+  deleteCookie() {
     // Selection Notes
     // - Selection always moves to *NEXT* adjacent item unless item
     //   is last child at a given level in which case it moves to *PREVIOUS*
     //   item
     //
     // Selection Cases (Somewhat Complicated)
     //
     // 1) Single cookie selected, host has single child
@@ -723,17 +723,17 @@ var gCookiesWindow = {
     if (nextSelected < 0)
       seln.clearSelection();
     else {
       seln.select(nextSelected);
       this._tree.focus();
     }
   },
 
-  deleteAllCookies: function() {
+  deleteAllCookies() {
     if (this._view._filtered) {
       var rowCount = this._view.rowCount;
       var deleteItems = [];
       for (let index = 0; index < rowCount; index++) {
         deleteItems.push(this._view._getItemAtIndex(index));
       }
       this._view._removeItemAtIndex(0, rowCount);
       this._view._rowCount = 0;
@@ -742,28 +742,28 @@ var gCookiesWindow = {
     }
     else {
       this._cm.removeAll();
     }
     this._updateRemoveAllButton();
     this.focusFilterBox();
   },
 
-  onCookieKeyPress: function(aEvent) {
+  onCookieKeyPress(aEvent) {
     if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) {
       this.deleteCookie();
     } else if (AppConstants.platform == "macosx" &&
                aEvent.keyCode == KeyEvent.DOM_VK_BACK_SPACE) {
       this.deleteCookie();
     }
   },
 
   _lastSortProperty : "",
   _lastSortAscending: false,
-  sort: function(aProperty) {
+  sort(aProperty) {
     var ascending = (aProperty == this._lastSortProperty) ? !this._lastSortAscending : true;
     // Sort the Non-Filtered Host Collections
     if (aProperty == "rawHost") {
       function sortByHost(a, b) {
         return a.toLowerCase().localeCompare(b.toLowerCase());
       }
       this._hostOrder.sort(sortByHost);
       if (!ascending)
@@ -804,17 +804,17 @@ var gCookiesWindow = {
     this._view.selection.select(0);
     this._tree.treeBoxObject.invalidate();
     this._tree.treeBoxObject.ensureRowIsVisible(0);
 
     this._lastSortAscending = ascending;
     this._lastSortProperty = aProperty;
   },
 
-  clearFilter: function() {
+  clearFilter() {
     // Revert to single-select in the tree
     this._tree.setAttribute("seltype", "single");
 
     // Clear the Tree Display
     this._view._filtered = false;
     this._view._rowCount = 0;
     this._tree.treeBoxObject.rowCountChanged(0, -this._view._filterSet.length);
     this._view._filterSet = [];
@@ -846,39 +846,39 @@ var gCookiesWindow = {
       this._view.selection.rangedSelect(range.min, range.max, true);
     }
     this._lastSelectedRanges = [];
 
     document.getElementById("cookiesIntro").value = this._bundle.getString("cookiesAll");
     this._updateRemoveAllButton();
   },
 
-  _cookieMatchesFilter: function(aCookie) {
+  _cookieMatchesFilter(aCookie) {
     return aCookie.rawHost.indexOf(this._view._filterValue) != -1 ||
            aCookie.name.indexOf(this._view._filterValue) != -1 ||
            aCookie.value.indexOf(this._view._filterValue) != -1;
   },
 
-  _filterCookies: function(aFilterValue) {
+  _filterCookies(aFilterValue) {
     this._view._filterValue = aFilterValue;
     var cookies = [];
     for (let i = 0; i < gCookiesWindow._hostOrder.length; ++i) { // var host in gCookiesWindow._hosts) {
       let currHost = gCookiesWindow._hosts[gCookiesWindow._hostOrder[i]]; // gCookiesWindow._hosts[host];
       if (!currHost) continue;
       for (let cookie of currHost.cookies) {
         if (this._cookieMatchesFilter(cookie))
           cookies.push(cookie);
       }
     }
     return cookies;
   },
 
   _lastSelectedRanges: [],
   _openIndices: [],
-  _saveState: function() {
+  _saveState() {
     // Save selection
     var seln = this._view.selection;
     this._lastSelectedRanges = [];
     var rangeCount = seln.getRangeCount();
     for (let i = 0; i < rangeCount; ++i) {
       var min = {}; var max = {};
       seln.getRangeAt(i, min, max);
       this._lastSelectedRanges.push({ min: min.value, max: max.value });
@@ -892,17 +892,17 @@ var gCookiesWindow = {
         this._openIndices.push(i);
     }
   },
 
   _updateRemoveAllButton: function gCookiesWindow__updateRemoveAllButton() {
     document.getElementById("removeAllCookies").disabled = this._view._rowCount == 0;
   },
 
-  filter: function() {
+  filter() {
     var filter = document.getElementById("filter").value;
     if (filter == "") {
       gCookiesWindow.clearFilter();
       return;
     }
     var view = gCookiesWindow._view;
     view._filterSet = gCookiesWindow._filterCookies(filter);
     if (!view._filtered) {
@@ -925,24 +925,24 @@ var gCookiesWindow = {
     // if the view is not empty then select the first item
     if (view.rowCount > 0)
       view.selection.select(0);
 
     document.getElementById("cookiesIntro").value = gCookiesWindow._bundle.getString("cookiesFiltered");
     this._updateRemoveAllButton();
   },
 
-  setFilter: function(aFilterString) {
+  setFilter(aFilterString) {
     document.getElementById("filter").value = aFilterString;
     this.filter();
   },
 
-  focusFilterBox: function() {
+  focusFilterBox() {
     var filter = document.getElementById("filter");
     filter.focus();
     filter.select();
   },
 
-  onWindowKeyPress: function(aEvent) {
+  onWindowKeyPress(aEvent) {
     if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE)
       window.close();
   }
 };
--- a/browser/components/preferences/fonts.js
+++ b/browser/components/preferences/fonts.js
@@ -14,17 +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: function(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"   },
@@ -53,36 +53,36 @@ var gFontsDialog = {
         if (prefs[i].fonttype)
           FontBuilder.buildFontList(aLanguageGroup, prefs[i].fonttype, element);
 
         preference.setElementValue(element);
       }
     }
   },
 
-  readFontLanguageGroup: function()
+  readFontLanguageGroup()
   {
     var languagePref = document.getElementById("font.language.group");
     this._selectLanguageGroup(languagePref.value);
     return undefined;
   },
 
-  readUseDocumentFonts: function()
+  readUseDocumentFonts()
   {
     var preference = document.getElementById("browser.display.use_document_fonts");
     return preference.value == 1;
   },
 
-  writeUseDocumentFonts: function()
+  writeUseDocumentFonts()
   {
     var useDocumentFonts = document.getElementById("useDocumentFonts");
     return useDocumentFonts.checked ? 1 : 0;
   },
 
-  onBeforeAccept: function()
+  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/tests/browser_advanced_siteData.js
+++ b/browser/components/preferences/in-content/tests/browser_advanced_siteData.js
@@ -16,23 +16,23 @@ const { NetUtil } = Cu.import("resource:
 const { SiteDataManager } = Cu.import("resource:///modules/SiteDataManager.jsm", {});
 const { OfflineAppCacheHelper } = Cu.import("resource:///modules/offlineAppCache.jsm", {});
 
 const mockOfflineAppCacheHelper = {
   clear: null,
 
   originalClear: null,
 
-  register: function() {
+  register() {
     this.originalClear = OfflineAppCacheHelper.clear;
     this.clear = sinon.spy();
     OfflineAppCacheHelper.clear = this.clear;
   },
 
-  unregister: function() {
+  unregister() {
     OfflineAppCacheHelper.clear = this.originalClear;
   }
 };
 
 function addPersistentStoragePerm(origin) {
   let uri = NetUtil.newURI(origin);
   let principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
   Services.perms.addFromPrincipal(principal, "persistent-storage", Ci.nsIPermissionManager.ALLOW_ACTION);
@@ -50,17 +50,17 @@ function getQuotaUsage(origin) {
     let principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
     Services.qms.getUsageForPrincipal(principal, request => resolve(request.usage));
   });
 }
 
 function getCacheUsage() {
   return new Promise(resolve => {
     let obs = {
-      onNetworkCacheDiskConsumption: function(usage) {
+      onNetworkCacheDiskConsumption(usage) {
         resolve(usage);
       },
       QueryInterface: XPCOMUtils.generateQI([
         Components.interfaces.nsICacheStorageConsumptionObserver,
         Components.interfaces.nsISupportsWeakReference
       ]),
     };
     Services.cache2.asyncGetDiskConsumption(obs);
--- a/browser/components/preferences/in-content/tests/browser_advanced_update.js
+++ b/browser/components/preferences/in-content/tests/browser_advanced_update.js
@@ -15,44 +15,44 @@ const mockUpdateManager = {
   _mockClassId: uuidGenerator.generateUUID(),
 
   _originalClassId: "",
 
   _originalFactory: null,
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIUpdateManager]),
 
-  createInstance: function(outer, iiD) {
+  createInstance(outer, iiD) {
     if (outer) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
     return this.QueryInterface(iiD);
   },
 
-  register: function() {
+  register() {
     let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
     if (!registrar.isCIDRegistered(this._mockClassId)) {
       this._originalClassId = registrar.contractIDToCID(this.contractId);
       this._originalFactory = Cm.getClassObject(Cc[this.contractId], Ci.nsIFactory);
       registrar.unregisterFactory(this._originalClassId, this._originalFactory);
       registrar.registerFactory(this._mockClassId, "Unregister after testing", this.contractId, this);
     }
   },
 
-  unregister: function() {
+  unregister() {
     let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
     registrar.unregisterFactory(this._mockClassId, this);
     registrar.registerFactory(this._originalClassId, "", this.contractId, this._originalFactory);
   },
 
   get updateCount() {
     return this._updates.length;
   },
 
-  getUpdateAt: function(index) {
+  getUpdateAt(index) {
     return this._updates[index];
   },
 
   _updates: [
     {
       name: "Firefox Developer Edition 49.0a2",
       statusText: "The Update was successfully installed",
       buildID: "20160728004010",
--- a/browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js
+++ b/browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js
@@ -22,24 +22,24 @@ add_task(function*() {
 
   doc.getElementById("advancedFonts").click();
   let win = yield promiseLoadSubDialog("chrome://browser/content/preferences/fonts.xul");
   doc = win.document;
 
   // Simulate a dumb font backend.
   win.FontBuilder._enumerator = {
     _list: ["MockedFont1", "MockedFont2", "MockedFont3"],
-    EnumerateFonts: function(lang, type, list) {
+    EnumerateFonts(lang, type, list) {
       return this._list;
     },
-    EnumerateAllFonts: function() {
+    EnumerateAllFonts() {
       return this._list;
     },
-    getDefaultFont: function() { return null; },
-    getStandardFamilyName: function(name) { return name; },
+    getDefaultFont() { return null; },
+    getStandardFamilyName(name) { return name; },
   };
   win.FontBuilder._allFonts = null;
   win.FontBuilder._langGroupSupported = false;
 
   let langGroupElement = doc.getElementById("font.language.group");
   let selectLangsField = doc.getElementById("selectLangs");
   let serifField = doc.getElementById("serif");
   let armenian = "x-armn";
--- a/browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js
+++ b/browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js
@@ -30,14 +30,14 @@ function openPreferencesViaHash(aPane) {
 
   newTabBrowser.addEventListener("Initialized", function PrefInit() {
     newTabBrowser.removeEventListener("Initialized", PrefInit, true);
     newTabBrowser.contentWindow.addEventListener("load", function prefLoad() {
       newTabBrowser.contentWindow.removeEventListener("load", prefLoad);
       let win = gBrowser.contentWindow;
       let selectedPane = win.history.state;
       gBrowser.removeCurrentTab();
-      deferred.resolve({selectedPane: selectedPane});
+      deferred.resolve({selectedPane});
     });
   }, true);
 
   return deferred.promise;
 }
--- a/browser/components/preferences/in-content/tests/browser_cookies_exceptions.js
+++ b/browser/components/preferences/in-content/tests/browser_cookies_exceptions.js
@@ -9,170 +9,170 @@ function test() {
   testRunner.runTests();
 }
 
 var testRunner = {
 
   tests:
     [
       {
-        test: function(params) {
+        test(params) {
           params.url.value = "test.com";
           params.btnAllow.doCommand();
           is(params.tree.view.rowCount, 1, "added exception shows up in treeview");
           is(params.tree.view.getCellText(0, params.nameCol), "http://test.com",
                                           "origin name should be set correctly");
           is(params.tree.view.getCellText(0, params.statusCol), params.allowText,
                                           "permission text should be set correctly");
           params.btnApplyChanges.doCommand();
         },
         observances: [{ type: "cookie", origin: "http://test.com", data: "added",
                         capability: Ci.nsIPermissionManager.ALLOW_ACTION }],
       },
       {
-        test: function(params) {
+        test(params) {
           params.url.value = "test.com";
           params.btnBlock.doCommand();
           is(params.tree.view.getCellText(0, params.nameCol), "http://test.com",
                                           "origin name should be set correctly");
           is(params.tree.view.getCellText(0, params.statusCol), params.denyText,
                                           "permission should change to deny in UI");
           params.btnApplyChanges.doCommand();
         },
         observances: [{ type: "cookie", origin: "http://test.com", data: "changed",
                         capability: Ci.nsIPermissionManager.DENY_ACTION  }],
       },
       {
-        test: function(params) {
+        test(params) {
           params.url.value = "test.com";
           params.btnAllow.doCommand();
           is(params.tree.view.getCellText(0, params.nameCol), "http://test.com",
                                           "origin name should be set correctly");
           is(params.tree.view.getCellText(0, params.statusCol), params.allowText,
                                           "permission should revert back to allow");
           params.btnApplyChanges.doCommand();
         },
         observances: [{ type: "cookie", origin: "http://test.com", data: "changed",
                         capability: Ci.nsIPermissionManager.ALLOW_ACTION }],
       },
       {
-        test: function(params) {
+        test(params) {
           params.url.value = "test.com";
           params.btnRemove.doCommand();
           is(params.tree.view.rowCount, 0, "exception should be removed");
           params.btnApplyChanges.doCommand();
         },
         observances: [{ type: "cookie", origin: "http://test.com", data: "deleted" }],
       },
       {
         expectPermObservancesDuringTestFunction: true,
-        test: function(params) {
+        test(params) {
           let uri = params.ioService.newURI("http://test.com", null, null);
           params.pm.add(uri, "popup", Ci.nsIPermissionManager.DENY_ACTION);
           is(params.tree.view.rowCount, 0, "adding unrelated permission should not change display");
           params.btnApplyChanges.doCommand();
         },
         observances: [{ type: "popup", origin: "http://test.com", data: "added",
                         capability: Ci.nsIPermissionManager.DENY_ACTION }],
-        cleanUp: function(params) {
+        cleanUp(params) {
           let uri = params.ioService.newURI("http://test.com", null, null);
           params.pm.remove(uri, "popup");
         },
       },
       {
-        test: function(params) {
+        test(params) {
           params.url.value = "https://test.com:12345";
           params.btnAllow.doCommand();
           is(params.tree.view.rowCount, 1, "added exception shows up in treeview");
           is(params.tree.view.getCellText(0, params.nameCol), "https://test.com:12345",
                                           "origin name should be set correctly");
           is(params.tree.view.getCellText(0, params.statusCol), params.allowText,
                                           "permission text should be set correctly");
           params.btnApplyChanges.doCommand();
         },
         observances: [{ type: "cookie", origin: "https://test.com:12345", data: "added",
                         capability: Ci.nsIPermissionManager.ALLOW_ACTION }],
       },
       {
-        test: function(params) {
+        test(params) {
           params.url.value = "https://test.com:12345";
           params.btnBlock.doCommand();
           is(params.tree.view.getCellText(0, params.nameCol), "https://test.com:12345",
                                           "origin name should be set correctly");
           is(params.tree.view.getCellText(0, params.statusCol), params.denyText,
                                           "permission should change to deny in UI");
           params.btnApplyChanges.doCommand();
         },
         observances: [{ type: "cookie", origin: "https://test.com:12345", data: "changed",
                         capability: Ci.nsIPermissionManager.DENY_ACTION  }],
       },
       {
-        test: function(params) {
+        test(params) {
           params.url.value = "https://test.com:12345";
           params.btnAllow.doCommand();
           is(params.tree.view.getCellText(0, params.nameCol), "https://test.com:12345",
                                           "origin name should be set correctly");
           is(params.tree.view.getCellText(0, params.statusCol), params.allowText,
                                           "permission should revert back to allow");
           params.btnApplyChanges.doCommand();
         },
         observances: [{ type: "cookie", origin: "https://test.com:12345", data: "changed",
                         capability: Ci.nsIPermissionManager.ALLOW_ACTION }],
       },
       {
-        test: function(params) {
+        test(params) {
           params.url.value = "https://test.com:12345";
           params.btnRemove.doCommand();
           is(params.tree.view.rowCount, 0, "exception should be removed");
           params.btnApplyChanges.doCommand();
         },
         observances: [{ type: "cookie", origin: "https://test.com:12345", data: "deleted" }],
       },
       {
-        test: function(params) {
+        test(params) {
           params.url.value = "localhost:12345";
           params.btnAllow.doCommand();
           is(params.tree.view.rowCount, 1, "added exception shows up in treeview");
           is(params.tree.view.getCellText(0, params.nameCol), "http://localhost:12345",
                                           "origin name should be set correctly");
           is(params.tree.view.getCellText(0, params.statusCol), params.allowText,
                                           "permission text should be set correctly");
           params.btnApplyChanges.doCommand();
         },
         observances: [{ type: "cookie", origin: "http://localhost:12345", data: "added",
                         capability: Ci.nsIPermissionManager.ALLOW_ACTION }],
       },
       {
-        test: function(params) {
+        test(params) {
           params.url.value = "localhost:12345";
           params.btnBlock.doCommand();
           is(params.tree.view.getCellText(0, params.nameCol), "http://localhost:12345",
                                           "origin name should be set correctly");
           is(params.tree.view.getCellText(0, params.statusCol), params.denyText,
                                           "permission should change to deny in UI");
           params.btnApplyChanges.doCommand();
         },
         observances: [{ type: "cookie", origin: "http://localhost:12345", data: "changed",
                         capability: Ci.nsIPermissionManager.DENY_ACTION  }],
       },
       {
-        test: function(params) {
+        test(params) {
           params.url.value = "localhost:12345";
           params.btnAllow.doCommand();
           is(params.tree.view.getCellText(0, params.nameCol), "http://localhost:12345",
                                           "origin name should be set correctly");
           is(params.tree.view.getCellText(0, params.statusCol), params.allowText,
                                           "permission should revert back to allow");
           params.btnApplyChanges.doCommand();
         },
         observances: [{ type: "cookie", origin: "http://localhost:12345", data: "changed",
                         capability: Ci.nsIPermissionManager.ALLOW_ACTION }],
       },
       {
-        test: function(params) {
+        test(params) {
           params.url.value = "localhost:12345";
           params.btnRemove.doCommand();
           is(params.tree.view.rowCount, 0, "exception should be removed");
           params.btnApplyChanges.doCommand();
         },
         observances: [{ type: "cookie", origin: "http://localhost:12345", data: "deleted" }],
       },
       {
@@ -215,37 +215,37 @@ var testRunner = {
             params.pm.remove(uri, "cookie");
           }
         },
       },
     ],
 
   _currentTest: -1,
 
-  runTests: function() {
+  runTests() {
     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 {
         that.runTests();
       }
     });
   },
 
-  runCurrentTest: function(testNumber) {
+  runCurrentTest(testNumber) {
     return new Promise(function(resolve, reject) {
 
       let helperFunctions = {
-        windowLoad: function(win) {
+        windowLoad(win) {
           let doc = win.document;
           let params = {
             doc,
             tree: doc.getElementById("permissionsTree"),
             nameCol: doc.getElementById("permissionsTree").treeBoxObject.columns.getColumnAt(0),
             statusCol: doc.getElementById("permissionsTree").treeBoxObject.columns.getColumnAt(1),
             url: doc.getElementById("url"),
             btnAllow: doc.getElementById("btnAllow"),
@@ -260,17 +260,17 @@ var testRunner = {
                                 Ci.nsIPermissionManager.ALLOW_ACTION),
             denyText: win.gPermissionManager._getCapabilityString(
                                Ci.nsIPermissionManager.DENY_ACTION),
             allow: Ci.nsIPermissionManager.ALLOW_ACTION,
             deny: Ci.nsIPermissionManager.DENY_ACTION,
           };
 
           let permObserver = {
-            observe: function(aSubject, aTopic, aData) {
+            observe(aSubject, aTopic, aData) {
               if (aTopic != "perm-changed")
                 return;
 
               if (testRunner.tests[testRunner._currentTest].observances.length == 0) {
                 // Should fail here as we are not expecting a notification, but we don't.
                 // See bug 1063410.
                 return;
               }
--- a/browser/components/preferences/in-content/tests/head.js
+++ b/browser/components/preferences/in-content/tests/head.js
@@ -131,17 +131,17 @@ function openPreferencesViaOpenPreferenc
     newTabBrowser.contentWindow.addEventListener("load", function prefLoad() {
       newTabBrowser.contentWindow.removeEventListener("load", prefLoad);
       let win = gBrowser.contentWindow;
       let selectedPane = win.history.state;
       let doc = win.document;
       let selectedAdvancedTab = aAdvancedTab && doc.getElementById("advancedPrefs").selectedTab.id;
       if (!aOptions || !aOptions.leaveOpen)
         gBrowser.removeCurrentTab();
-      deferred.resolve({selectedPane: selectedPane, selectedAdvancedTab: selectedAdvancedTab});
+      deferred.resolve({selectedPane, selectedAdvancedTab});
     });
   }, true);
 
   return deferred.promise;
 }
 
 function waitForCondition(aConditionFn, aMaxTries = 50, aCheckInterval = 100) {
   return new Promise((resolve, reject) => {
--- a/browser/components/preferences/languages.js
+++ b/browser/components/preferences/languages.js
@@ -5,41 +5,41 @@
 
 var gLanguagesDialog = {
 
   _availableLanguagesList : [],
   _acceptLanguages        : { },
 
   _selectedItemID         : null,
 
-  init: function()
+  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: function()
+  forceReflow()
   {
     this._activeLanguages.style.fontKerning = "none";
     setTimeout("gLanguagesDialog._activeLanguages.style.removeProperty('font-kerning')", 0);
   },
 
   get _activeLanguages()
   {
     return document.getElementById("activeLanguages");
   },
 
   get _availableLanguages()
   {
     return document.getElementById("availableLanguages");
   },
 
-  _loadAvailableLanguages: function()
+  _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");
@@ -97,17 +97,17 @@ var gLanguagesDialog = {
             this._availableLanguagesList.push(li);
           }
         }
       }
     }
     this._buildAvailableLanguageList();
   },
 
-  _buildAvailableLanguageList: function()
+  _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,17 +121,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: function()
+  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;
@@ -155,30 +155,30 @@ var gLanguagesDialog = {
     if (this._activeLanguages.childNodes.length > 0) {
       this._activeLanguages.ensureIndexIsVisible(selectedIndex);
       this._activeLanguages.selectedIndex = selectedIndex;
     }
 
     return undefined;
   },
 
-  writeAcceptLanguages: function()
+  writeAcceptLanguages()
   {
     return undefined;
   },
 
-  onAvailableLanguageSelect: function()
+  onAvailableLanguageSelect()
   {
     var addButton = document.getElementById("addButton");
     addButton.disabled = false;
 
     this._availableLanguages.removeAttribute("accesskey");
   },
 
-  addLanguage: function()
+  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,17 +196,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: function()
+  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
@@ -224,28 +224,28 @@ var gLanguagesDialog = {
 
     // Update the preference and force a UI rebuild
     var preference = document.getElementById("intl.accept_languages");
     preference.value = string;
 
     this._buildAvailableLanguageList();
   },
 
-  _getLanguageName: function(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: function()
+  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 ? "" : ",");
@@ -259,17 +259,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: function()
+  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 ? "" : ",");
@@ -283,17 +283,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: function()
+  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;
--- a/browser/components/preferences/permissions.js
+++ b/browser/components/preferences/permissions.js
@@ -27,44 +27,44 @@ var gPermissionManager = {
   _observerRemoved      : false,
 
   _view: {
     _rowCount: 0,
     get rowCount()
     {
       return this._rowCount;
     },
-    getCellText: function(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: function(aIndex) { return false; },
-    isSorted: function() { return false; },
-    isContainer: function(aIndex) { return false; },
-    setTree: function(aTree) {},
-    getImageSrc: function(aRow, aColumn) {},
-    getProgressMode: function(aRow, aColumn) {},
-    getCellValue: function(aRow, aColumn) {},
-    cycleHeader: function(column) {},
-    getRowProperties: function(row) { return ""; },
-    getColumnProperties: function(column) { return ""; },
-    getCellProperties: function(row, column) {
+    isSeparator(aIndex) { return false; },
+    isSorted() { return false; },
+    isContainer(aIndex) { return false; },
+    setTree(aTree) {},
+    getImageSrc(aRow, aColumn) {},
+    getProgressMode(aRow, aColumn) {},
+    getCellValue(aRow, aColumn) {},
+    cycleHeader(column) {},
+    getRowProperties(row) { return ""; },
+    getColumnProperties(column) { return ""; },
+    getCellProperties(row, column) {
       if (column.element.getAttribute("id") == "siteCol")
         return "ltr";
 
       return "";
     }
   },
 
-  _getCapabilityString: function(aCapability)
+  _getCapabilityString(aCapability)
   {
     var stringKey = null;
     switch (aCapability) {
     case nsIPermissionManager.ALLOW_ACTION:
       stringKey = "can";
       break;
     case nsIPermissionManager.DENY_ACTION:
       stringKey = "cannot";
@@ -74,17 +74,17 @@ var gPermissionManager = {
       break;
     case nsICookiePermission.ACCESS_SESSION:
       stringKey = "canSession";
       break;
     }
     return this._bundle.getString(stringKey);
   },
 
-  addPermission: function(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
@@ -122,17 +122,17 @@ var gPermissionManager = {
         capabilityExists = this._permissions[i].capability == capabilityString;
         if (!capabilityExists) {
           this._permissions[i].capability = capabilityString;
         }
         break;
       }
     }
 
-    let permissionParams = {principal: principal, type: this._type, capability: aCapability};
+    let permissionParams = {principal, type: this._type, capability: aCapability};
     if (!permissionExists) {
       this._permissionsToAdd.set(principal.origin, permissionParams);
       this._addPermission(permissionParams);
     }
     else if (!capabilityExists) {
       this._permissionsToAdd.set(principal.origin, permissionParams);
       this._handleCapabilityChange();
     }
@@ -142,87 +142,87 @@ var gPermissionManager = {
 
     // 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: function(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: function()
+  _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: function(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: function()
+  _resortPermissions()
   {
     gTreeUtils.sort(this._tree, this._view, this._permissions,
                     this._lastPermissionSortColumn,
                     this._permissionsComparator,
                     this._lastPermissionSortColumn,
                     !this._lastPermissionSortAscending); // keep sort direction
   },
 
-  onHostInput: function(aSiteField)
+  onHostInput(aSiteField)
   {
     document.getElementById("btnSession").disabled = !aSiteField.value;
     document.getElementById("btnBlock").disabled = !aSiteField.value;
     document.getElementById("btnAllow").disabled = !aSiteField.value;
   },
 
-  onWindowKeyPress: function(aEvent)
+  onWindowKeyPress(aEvent)
   {
     if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE)
       window.close();
   },
 
-  onHostKeyPress: function(aEvent)
+  onHostKeyPress(aEvent)
   {
     if (aEvent.keyCode == KeyEvent.DOM_VK_RETURN)
       document.getElementById("btnAllow").click();
   },
 
-  onLoad: function()
+  onLoad()
   {
     this._bundle = document.getElementById("bundlePreferences");
     var params = window.arguments[0];
     this.init(params);
   },
 
-  init: function(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,26 +270,26 @@ var gPermissionManager = {
     Services.obs.notifyObservers(null, NOTIFICATION_FLUSH_PERMISSIONS, this._type);
     Services.obs.addObserver(this, "perm-changed", false);
 
     this._loadPermissions();
 
     urlField.focus();
   },
 
-  uninit: function()
+  uninit()
   {
     if (!this._observerRemoved) {
       Services.obs.removeObserver(this, "perm-changed");
 
       this._observerRemoved = true;
     }
   },
 
-  observe: function(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;
 
@@ -306,83 +306,83 @@ var gPermissionManager = {
         this._handleCapabilityChange();
       }
       else if (aData == "deleted") {
         this._removePermissionFromList(permission.principal);
       }
     }
   },
 
-  onPermissionSelected: function()
+  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: function()
+  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: function()
+  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: function(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 : function(a, b)
+  _permissionsComparator(a, b)
   {
     return a.toLowerCase().localeCompare(b.toLowerCase());
   },
 
 
-  onPermissionSort: function(aColumn)
+  onPermissionSort(aColumn)
   {
     this._lastPermissionSortAscending = gTreeUtils.sort(this._tree,
                                                         this._view,
                                                         this._permissions,
                                                         aColumn,
                                                         this._permissionsComparator,
                                                         this._lastPermissionSortColumn,
                                                         this._lastPermissionSortAscending);
     this._lastPermissionSortColumn = aColumn;
   },
 
-  onApplyChanges: function()
+  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);
@@ -390,17 +390,17 @@ var gPermissionManager = {
 
     for (let p of this._permissionsToDelete.values()) {
       Services.perms.removeFromPrincipal(p.principal, p.type);
     }
 
     window.close();
   },
 
-  _loadPermissions: function()
+  _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);
@@ -412,45 +412,45 @@ 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: function(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: function(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: function(aOrigin)
+  setOrigin(aOrigin)
   {
     document.getElementById("url").value = aOrigin;
   }
 };
 
 function setOrigin(aOrigin)
 {
   gPermissionManager.setOrigin(aOrigin);
--- a/browser/components/preferences/sanitize.js
+++ b/browser/components/preferences/sanitize.js
@@ -1,21 +1,21 @@
 /* -*- 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 gSanitizeDialog = Object.freeze({
-  init: function() {
+  init() {
     let customWidthElements = document.getElementsByAttribute("dialogWidth", "*");
     let isInSubdialog = document.documentElement.hasAttribute("subdialog");
     for (let element of customWidthElements) {
       element.style.width = element.getAttribute(isInSubdialog ? "subdialogWidth" : "dialogWidth");
     }
     this.onClearHistoryChanged();
   },
 
-  onClearHistoryChanged: function() {
+  onClearHistoryChanged() {
     let downloadsPref = document.getElementById("privacy.clearOnShutdown.downloads");
     let historyPref = document.getElementById("privacy.clearOnShutdown.history");
     downloadsPref.value = historyPref.value;
   }
 });
--- a/browser/components/preferences/translation.js
+++ b/browser/components/preferences/translation.js
@@ -28,17 +28,17 @@ Tree.prototype = {
     return this._tree.treeBoxObject;
   },
   get isEmpty() {
     return !this._data.length;
   },
   get hasSelection() {
     return this.selection.count > 0;
   },
-  getSelectedItems: function() {
+  getSelectedItems() {
     let result = [];
 
     let rc = this.selection.getRangeCount();
     for (let i = 0; i < rc; ++i) {
       let min = {}, max = {};
       this.selection.getRangeAt(i, min, max);
       for (let j = min.value; j <= max.value; ++j)
         result.push(this._data[j]);
@@ -46,59 +46,59 @@ Tree.prototype = {
 
     return result;
   },
 
   // nsITreeView implementation
   get rowCount() {
     return this._data.length;
   },
-  getCellText: function(aRow, aColumn) {
+  getCellText(aRow, aColumn) {
     return this._data[aRow];
   },
-  isSeparator: function(aIndex) {
+  isSeparator(aIndex) {
     return false;
   },
-  isSorted: function() {
+  isSorted() {
     return false;
   },
-  isContainer: function(aIndex) {
+  isContainer(aIndex) {
     return false;
   },
-  setTree: function(aTree) {},
-  getImageSrc: function(aRow, aColumn) {},
-  getProgressMode: function(aRow, aColumn) {},
-  getCellValue: function(aRow, aColumn) {},
-  cycleHeader: function(column) {},
-  getRowProperties: function(row) {
+  setTree(aTree) {},
+  getImageSrc(aRow, aColumn) {},
+  getProgressMode(aRow, aColumn) {},
+  getCellValue(aRow, aColumn) {},
+  cycleHeader(column) {},
+  getRowProperties(row) {
     return "";
   },
-  getColumnProperties: function(column) {
+  getColumnProperties(column) {
     return "";
   },
-  getCellProperties: function(row, column) {
+  getCellProperties(row, column) {
     return "";
   },
   QueryInterface: XPCOMUtils.generateQI([Ci.nsITreeView])
 };
 
 function Lang(aCode)
 {
   this.langCode = aCode;
   this._label = gLangBundle.GetStringFromName(aCode);
 }
 
 Lang.prototype = {
-  toString: function() {
+  toString() {
     return this._label;
   }
 }
 
 var gTranslationExceptions = {
-  onLoad: function() {
+  onLoad() {
     if (this._siteTree) {
       // Re-using an open dialog, clear the old observers.
       this.uninit();
     }
 
     // Load site permissions into an array.
     this._sites = [];
     let enumerator = Services.perms.enumerator;
@@ -118,28 +118,28 @@ var gTranslationExceptions = {
 
     this._langs = this.getLanguageExceptions();
     Services.prefs.addObserver(kLanguagesPref, this, false);
     this._langTree = new Tree("languagesTree", this._langs);
     this.onLanguageSelected();
   },
 
   // Get the list of languages we don't translate as an array.
-  getLanguageExceptions: function() {
+  getLanguageExceptions() {
     let langs = Services.prefs.getCharPref(kLanguagesPref);
     if (!langs)
       return [];
 
     let result = langs.split(",").map(code => new Lang(code));
     result.sort();
 
     return result;
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  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 {
@@ -175,81 +175,81 @@ var gTranslationExceptions = {
       let boxObject = this._langTree.boxObject;
       if (change)
         boxObject.rowCountChanged(0, change);
       boxObject.invalidate();
       this.onLanguageSelected();
     }
   },
 
-  _handleButtonDisabling: function(aTree, aIdPart) {
+  _handleButtonDisabling(aTree, aIdPart) {
     let empty = aTree.isEmpty;
     document.getElementById("removeAll" + aIdPart + "s").disabled = empty;
     document.getElementById("remove" + aIdPart).disabled =
       empty || !aTree.hasSelection;
   },
 
-  onLanguageSelected: function() {
+  onLanguageSelected() {
     this._handleButtonDisabling(this._langTree, "Language");
   },
 
-  onSiteSelected: function() {
+  onSiteSelected() {
     this._handleButtonDisabling(this._siteTree, "Site");
   },
 
-  onLanguageDeleted: function() {
+  onLanguageDeleted() {
     let langs = Services.prefs.getCharPref(kLanguagesPref);
     if (!langs)
       return;
 
     let removed = this._langTree.getSelectedItems().map(l => l.langCode);
 
     langs = langs.split(",").filter(l => removed.indexOf(l) == -1);
     Services.prefs.setCharPref(kLanguagesPref, langs.join(","));
   },
 
-  onAllLanguagesDeleted: function() {
+  onAllLanguagesDeleted() {
     Services.prefs.setCharPref(kLanguagesPref, "");
   },
 
-  onSiteDeleted: function() {
+  onSiteDeleted() {
     let removedSites = this._siteTree.getSelectedItems();
     for (let origin of removedSites) {
       let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(origin);
       Services.perms.removeFromPrincipal(principal, kPermissionType);
     }
   },
 
-  onAllSitesDeleted: function() {
+  onAllSitesDeleted() {
     if (this._siteTree.isEmpty)
       return;
 
     let removedSites = this._sites.splice(0, this._sites.length);
     this._siteTree.boxObject.rowCountChanged(0, -removedSites.length);
 
     for (let origin of removedSites) {
       let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(origin);
       Services.perms.removeFromPrincipal(principal, kPermissionType);
     }
 
     this.onSiteSelected();
   },
 
-  onSiteKeyPress: function(aEvent) {
+  onSiteKeyPress(aEvent) {
     if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE)
       this.onSiteDeleted();
   },
 
-  onLanguageKeyPress: function(aEvent) {
+  onLanguageKeyPress(aEvent) {
     if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE)
       this.onLanguageDeleted();
   },
 
-  onWindowKeyPress: function(aEvent) {
+  onWindowKeyPress(aEvent) {
     if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE)
       window.close();
   },
 
-  uninit: function() {
+  uninit() {
     Services.obs.removeObserver(this, "perm-changed");
     Services.prefs.removeObserver(kLanguagesPref, this);
   }
 };
--- a/browser/components/search/test/browser_426329.js
+++ b/browser/components/search/test/browser_426329.js
@@ -42,21 +42,21 @@ function getMenuEntries() {
     entries.push(autocompleteMenu.tree.view.getValueAt(i, column));
   }
   return entries;
 }
 
 function countEntries(name, value) {
   return new Promise(resolve => {
     let count = 0;
-    let obj = name && value ? {fieldname: name, value: value} : {};
+    let obj = name && value ? {fieldname: name, value} : {};
     FormHistory.count(obj,
-                      { handleResult: function(result) { count = result; },
-                        handleError: function(error) { throw error; },
-                        handleCompletion: function(reason) {
+                      { handleResult(result) { count = result; },
+                        handleError(error) { throw error; },
+                        handleCompletion(reason) {
                           if (!reason) {
                             resolve(count);
                           }
                         }
                       });
   });
 }
 
--- a/browser/components/search/test/browser_aboutSearchReset.js
+++ b/browser/components/search/test/browser_aboutSearchReset.js
@@ -44,17 +44,17 @@ function promiseStoppedLoad(expectedURL)
     };
   });
 }
 
 var gTests = [
 
 {
   desc: "Test the 'Keep Current Settings' button.",
-  run: function* () {
+  *run() {
     let engine = yield promiseNewEngine(kTestEngine, {setAsCurrent: true});
 
     let expectedURL = engine.
                       getSubmission(kSearchStr, null, kSearchPurpose).
                       uri.spec;
 
     let rawEngine = engine.wrappedJSObject;
     let initialHash = rawEngine.getAttr("loadPathHash");
@@ -70,17 +70,17 @@ var gTests = [
        "the loadPathHash has been fixed");
 
     checkTelemetryRecords(TELEMETRY_RESULT_ENUM.KEPT_CURRENT);
   }
 },
 
 {
   desc: "Test the 'Restore Search Defaults' button.",
-  run: function* () {
+  *run() {
     let currentEngine = Services.search.currentEngine;
     let originalEngine = Services.search.originalDefaultEngine;
     let doc = gBrowser.contentDocument;
     let defaultEngineSpan = doc.getElementById("defaultEngine");
     is(defaultEngineSpan.textContent, originalEngine.name,
        "the name of the original default engine is displayed");
 
     let expectedURL = originalEngine.
@@ -98,30 +98,30 @@ var gTests = [
 
     checkTelemetryRecords(TELEMETRY_RESULT_ENUM.RESTORED_DEFAULT);
     Services.search.currentEngine = currentEngine;
   }
 },
 
 {
   desc: "Click the settings link.",
-  run: function* () {
+  *run() {
     let loadPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser,
                                                      false,
                                                      "about:preferences#search")
     gBrowser.contentDocument.getElementById("linkSettingsPage").click();
     yield loadPromise;
 
     checkTelemetryRecords(TELEMETRY_RESULT_ENUM.OPENED_SETTINGS);
   }
 },
 
 {
   desc: "Load another page without clicking any of the buttons.",
-  run: function* () {
+  *run() {
     yield promiseTabLoadEvent(gBrowser.selectedTab, "about:mozilla");
 
     checkTelemetryRecords(TELEMETRY_RESULT_ENUM.CLOSED_PAGE);
   }
 },
 
 ];
 
--- a/browser/components/search/test/browser_abouthome_behavior.js
+++ b/browser/components/search/test/browser_abouthome_behavior.js
@@ -59,38 +59,38 @@ function test() {
   }
   waitForExplicitFinish();
 
   let gCurrTest;
   let gTests = [
     {
       name: "Search with Bing from about:home",
       searchURL: replaceUrl("http://www.bing.com/search?q=foo&pc=MOZI&form=MOZSPG"),
-      run: function() {
+      run() {
         verify_about_home_search("Bing");
       }
     },
     {
       name: "Search with Yahoo from about:home",
       searchURL: replaceUrl("https://search.yahoo.com/search?p=foo&ei=UTF-8&fr=moz35"),
-      run: function() {
+      run() {
         verify_about_home_search("Yahoo");
       }
     },
     {
       name: "Search with Google from about:home",
       searchURL: replaceUrl("https://www.google.com/search?q=foo&ie=utf-8&oe=utf-8"),
-      run: function() {
+      run() {
         verify_about_home_search("Google");
       }
     },
     {
       name: "Search with Amazon.com from about:home",
       searchURL: replaceUrl("https://www.amazon.com/exec/obidos/external-search/?field-keywords=foo&mode=blended&tag=mozilla-20&sourceid=Mozilla-search"),
-      run: function() {
+      run() {
         verify_about_home_search("Amazon.com");
       }
     }
   ];
 
   function nextTest() {
     if (gTests.length) {
       gCurrTest = gTests.shift();
--- a/browser/components/search/test/browser_addEngine.js
+++ b/browser/components/search/test/browser_addEngine.js
@@ -41,44 +41,44 @@ var gTests = [
   {
     name: "opensearch install",
     engine: {
       name: "Foo",
       alias: null,
       description: "Foo Search",
       searchForm: "http://mochi.test:8888/browser/browser/components/search/test/"
     },
-    run: function() {
+    run() {
       Services.obs.addObserver(observer, "browser-search-engine-modified", false);
 
       gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/testEngine.xml",
                     null, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC",
                     false);
     },
-    added: function(engine) {
+    added(engine) {
       ok(engine, "engine was added.");
 
       checkEngine(this.engine, engine);
 
       let engineFromSS = gSS.getEngineByName(this.engine.name);
       is(engine, engineFromSS, "engine is obtainable via getEngineByName");
 
       let aEngine = gSS.getEngineByAlias("fooalias");
       ok(!aEngine, "Alias was not parsed from engine description");
 
       gSS.currentEngine = engine;
     },
-    current: function(engine) {
+    current(engine) {
       let currentEngine = gSS.currentEngine;
       is(engine, currentEngine, "engine is current");
       is(engine.name, this.engine.name, "current engine was changed successfully");
 
       gSS.removeEngine(engine);
     },
-    removed: function(engine) {
+    removed(engine) {
       // Remove the observer before calling the currentEngine getter,
       // as that getter will set the currentEngine to the original default
       // which will trigger a notification causing the test to loop over all
       // engines.
       Services.obs.removeObserver(observer, "browser-search-engine-modified");
 
       let currentEngine = gSS.currentEngine;
       ok(currentEngine, "An engine is present.");
--- a/browser/components/search/test/browser_amazon_behavior.js
+++ b/browser/components/search/test/browser_amazon_behavior.js
@@ -27,57 +27,57 @@ function test() {
 
   waitForExplicitFinish();
 
   var gCurrTest;
   var gTests = [
     {
       name: "context menu search",
       searchURL: base,
-      run: function() {
+      run() {
         // Simulate a contextmenu search
         // FIXME: This is a bit "low-level"...
         BrowserSearch.loadSearch("foo", false, "contextmenu");
       }
     },
     {
       name: "keyword search",
       searchURL: base,
-      run: function() {
+      run() {
         gURLBar.value = "? foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "keyword search",
       searchURL: base,
-      run: function() {
+      run() {
         gURLBar.value = "a foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "search bar search",
       searchURL: base,
-      run: function() {
+      run() {
         let sb = BrowserSearch.searchBar;
         sb.focus();
         sb.value = "foo";
         registerCleanupFunction(function() {
           sb.value = "";
         });
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "new tab search",
       searchURL: base,
-      run: function() {
+      run() {
         function doSearch(doc) {
           // Re-add the listener, and perform a search
           gBrowser.addProgressListener(listener);
           doc.getElementById("newtab-search-text").value = "foo";
           doc.getElementById("newtab-search-submit").click();
         }
 
         // load about:newtab, but remove the listener first so it doesn't
--- a/browser/components/search/test/browser_bing_behavior.js
+++ b/browser/components/search/test/browser_bing_behavior.js
@@ -27,57 +27,57 @@ function test() {
 
   waitForExplicitFinish();
 
   var gCurrTest;
   var gTests = [
     {
       name: "context menu search",
       searchURL: base + "&form=MOZCON",
-      run: function() {
+      run() {
         // Simulate a contextmenu search
         // FIXME: This is a bit "low-level"...
         BrowserSearch.loadSearch("foo", false, "contextmenu");
       }
     },
     {
       name: "keyword search",
       searchURL: base + "&form=MOZLBR",
-      run: function() {
+      run() {
         gURLBar.value = "? foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "keyword search with alias",
       searchURL: base + "&form=MOZLBR",
-      run: function() {
+      run() {
         gURLBar.value = "b foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "search bar search",
       searchURL: base + "&form=MOZSBR",
-      run: function() {
+      run() {
         let sb = BrowserSearch.searchBar;
         sb.focus();
         sb.value = "foo";
         registerCleanupFunction(function() {
           sb.value = "";
         });
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "new tab search",
       searchURL: base + "&form=MOZTSB",
-      run: function() {
+      run() {
         function doSearch(doc) {
           // Re-add the listener, and perform a search
           gBrowser.addProgressListener(listener);
           doc.getElementById("newtab-search-text").value = "foo";
           doc.getElementById("newtab-search-submit").click();
         }
 
         // load about:newtab, but remove the listener first so it doesn't
--- a/browser/components/search/test/browser_google_behavior.js
+++ b/browser/components/search/test/browser_google_behavior.js
@@ -25,57 +25,57 @@ function test() {
 
   waitForExplicitFinish();
 
   var gCurrTest;
   var gTests = [
     {
       name: "context menu search",
       searchURL: base,
-      run: function() {
+      run() {
         // Simulate a contextmenu search
         // FIXME: This is a bit "low-level"...
         BrowserSearch.loadSearch("foo", false, "contextmenu");
       }
     },
     {
       name: "keyword search",
       searchURL: base,
-      run: function() {
+      run() {
         gURLBar.value = "? foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "keyword search",
       searchURL: base,
-      run: function() {
+      run() {
         gURLBar.value = "g foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "search bar search",
       searchURL: base,
-      run: function() {
+      run() {
         let sb = BrowserSearch.searchBar;
         sb.focus();
         sb.value = "foo";
         registerCleanupFunction(function() {
           sb.value = "";
         });
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "new tab search",
       searchURL: base,
-      run: function() {
+      run() {
         function doSearch(doc) {
           // Re-add the listener, and perform a search
           gBrowser.addProgressListener(listener);
           doc.getElementById("newtab-search-text").value = "foo";
           doc.getElementById("newtab-search-submit").click();
         }
 
         // load about:newtab, but remove the listener first so it doesn't
--- a/browser/components/search/test/browser_hiddenOneOffs_cleanup.js
+++ b/browser/components/search/test/browser_hiddenOneOffs_cleanup.js
@@ -2,24 +2,24 @@
  * 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 testPref = "Foo,FooDupe";
 
 function promiseNewEngine(basename) {
   return new Promise((resolve, reject) => {
     info("Waiting for engine to be added: " + basename);
     Services.search.init({
-      onInitComplete: function() {
+      onInitComplete() {
         let url = getRootDirectory(gTestPath) + basename;
         Services.search.addEngine(url, null, "", false, {
-          onSuccess: function(engine) {
+          onSuccess(engine) {
             info("Search engine added: " + basename);
             resolve(engine);
           },
-          onError: function(errCode) {
+          onError(errCode) {
             ok(false, "addEngine failed with error code " + errCode);
             reject();
           }
         });
       }
     });
   });
 }
--- a/browser/components/search/test/browser_searchbar_keyboard_navigation.js
+++ b/browser/components/search/test/browser_searchbar_keyboard_navigation.js
@@ -32,26 +32,26 @@ add_task(function* init() {
                                  {handleCompletion: resolve,
                                   handleError: reject});
   });
 
   yield new Promise((resolve, reject) => {
     info("adding search history values: " + kValues);
     let addOps = kValues.map(value => { return {op: "add",
                                              fieldname: "searchbar-history",
-                                             value: value}
+                                             value}
                                    });
     searchbar.FormHistory.update(addOps, {
-      handleCompletion: function() {
+      handleCompletion() {
         registerCleanupFunction(() => {
           info("removing search history values: " + kValues);
           let removeOps =
             kValues.map(value => { return {op: "remove",
                                            fieldname: "searchbar-history",
-                                           value: value}
+                                           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
@@ -53,26 +53,26 @@ add_task(function* init() {
                                  {handleCompletion: resolve,
                                   handleError: reject});
   });
 
   yield new Promise((resolve, reject) => {
     info("adding search history values: " + kValues);
     let addOps = kValues.map(value => { return {op: "add",
                                              fieldname: "searchbar-history",
-                                             value: value}
+                                             value}
                                    });
     searchbar.FormHistory.update(addOps, {
-      handleCompletion: function() {
+      handleCompletion() {
         registerCleanupFunction(() => {
           info("removing search history values: " + kValues);
           let removeOps =
             kValues.map(value => { return {op: "remove",
                                            fieldname: "searchbar-history",
-                                           value: value}
+                                           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
@@ -33,26 +33,26 @@ add_task(function* init() {
                                  {handleCompletion: resolve,
                                   handleError: reject});
   });
 
   yield new Promise((resolve, reject) => {
     info("adding search history values: " + kValues);
     let addOps = kValues.map(value => { return {op: "add",
                                              fieldname: "searchbar-history",
-                                             value: value}
+                                             value}
                                    });
     searchbar.FormHistory.update(addOps, {
-      handleCompletion: function() {
+      handleCompletion() {
         registerCleanupFunction(() => {
           info("removing search history values: " + kValues);
           let removeOps =
             kValues.map(value => { return {op: "remove",
                                            fieldname: "searchbar-history",
-                                           value: value}
+                                           value}
                                  });
           searchbar.FormHistory.update(removeOps);
         });
         resolve();
       },
       handleError: reject
     });
   });
--- a/browser/components/search/test/browser_webapi.js
+++ b/browser/components/search/test/browser_webapi.js
@@ -9,17 +9,17 @@ function getString(key, ...params) {
 
 function AddSearchProvider(...args) {
   return gBrowser.addTab(ROOT + "webapi.html?" + encodeURIComponent(JSON.stringify(args)));
 }
 
 function promiseDialogOpened() {
   return new Promise((resolve, reject) => {
     Services.wm.addListener({
-      onOpenWindow: function(xulWin) {
+      onOpenWindow(xulWin) {
         Services.wm.removeListener(this);
 
         let win = xulWin.QueryInterface(Ci.nsIInterfaceRequestor)
                         .getInterface(Ci.nsIDOMWindow);
         waitForFocus(() => {
           if (win.location == "chrome://global/content/commonDialog.xul")
             resolve(win)
           else
--- a/browser/components/search/test/browser_yahoo_behavior.js
+++ b/browser/components/search/test/browser_yahoo_behavior.js
@@ -27,57 +27,57 @@ function test() {
 
   waitForExplicitFinish();
 
   var gCurrTest;
   var gTests = [
     {
       name: "context menu search",
       searchURL: base + "&hsimp=yhs-005",
-      run: function() {
+      run() {
         // Simulate a contextmenu search
         // FIXME: This is a bit "low-level"...
         BrowserSearch.loadSearch("foo", false, "contextmenu");
       }
     },
     {
       name: "keyword search",
       searchURL: base + "&hsimp=yhs-002",
-      run: function() {
+      run() {
         gURLBar.value = "? foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "keyword search with alias",
       searchURL: base + "&hsimp=yhs-002",
-      run: function() {
+      run() {
         gURLBar.value = "y foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "search bar search",
       searchURL: base + "&hsimp=yhs-001",
-      run: function() {
+      run() {
         let sb = BrowserSearch.searchBar;
         sb.focus();
         sb.value = "foo";
         registerCleanupFunction(function() {
           sb.value = "";
         });
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "new tab search",
       searchURL: base + "&hsimp=yhs-004",
-      run: function() {
+      run() {
         function doSearch(doc) {
           // Re-add the listener, and perform a search
           gBrowser.addProgressListener(listener);
           doc.getElementById("newtab-search-text").value = "foo";
           doc.getElementById("newtab-search-submit").click();
         }
 
         // load about:newtab, but remove the listener first so it doesn't
--- a/browser/components/search/test/head.js
+++ b/browser/components/search/test/head.js
@@ -53,35 +53,35 @@ function promiseEvent(aTarget, aEventNam
 
 function promiseNewEngine(basename, options = {}) {
   return new Promise((resolve, reject) => {
     // Default the setAsCurrent option to true.
     let setAsCurrent =
       options.setAsCurrent == undefined ? true : options.setAsCurrent;
     info("Waiting for engine to be added: " + basename);
     Services.search.init({
-      onInitComplete: function() {
+      onInitComplete() {
         let url = getRootDirectory(gTestPath) + basename;
         let current = Services.search.currentEngine;
         Services.search.addEngine(url, null, options.iconURL || "", false, {
-          onSuccess: function(engine) {
+          onSuccess(engine) {
             info("Search engine added: " + basename);
             if (setAsCurrent) {
               Services.search.currentEngine = engine;
             }
             registerCleanupFunction(() => {
               if (setAsCurrent) {
                 Services.search.currentEngine = current;
               }
               Services.search.removeEngine(engine);
               info("Search engine removed: " + basename);
             });
             resolve(engine);
           },
-          onError: function(errCode) {
+          onError(errCode) {
             ok(false, "addEngine failed with error code " + errCode);
             reject();
           }
         });
       }
     });
   });
 }
--- a/browser/components/selfsupport/SelfSupportService.js
+++ b/browser/components/selfsupport/SelfSupportService.js
@@ -25,54 +25,54 @@ function MozSelfSupportInterface() {
 MozSelfSupportInterface.prototype = {
   classDescription: "MozSelfSupport",
   classID: Components.ID("{d30aae8b-f352-4de3-b936-bb9d875df0bb}"),
   contractID: "@mozilla.org/mozselfsupport;1",
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer]),
 
   _window: null,
 
-  init: function(window) {
+  init(window) {
     this._window = window;
   },
 
   get healthReportDataSubmissionEnabled() {
     return Preferences.get(PREF_FHR_UPLOAD_ENABLED, false);
   },
 
   set healthReportDataSubmissionEnabled(enabled) {
     Preferences.set(PREF_FHR_UPLOAD_ENABLED, enabled);
   },
 
-  resetPref: function(name) {
+  resetPref(name) {
     Services.prefs.clearUserPref(name);
   },
 
-  resetSearchEngines: function() {
+  resetSearchEngines() {
     Services.search.restoreDefaultEngines();
     Services.search.resetToOriginalDefaultEngine();
   },
 
-  getTelemetryPingList: function() {
+  getTelemetryPingList() {
     return this._wrapPromise(TelemetryArchive.promiseArchivedPingList());
   },
 
-  getTelemetryPing: function(pingId) {
+  getTelemetryPing(pingId) {
     return this._wrapPromise(TelemetryArchive.promiseArchivedPingById(pingId));
   },
 
-  getCurrentTelemetryEnvironment: function() {
+  getCurrentTelemetryEnvironment() {
     const current = TelemetryEnvironment.currentEnvironment;
     return new this._window.Promise(resolve => resolve(current));
   },
 
-  getCurrentTelemetrySubsessionPing: function() {
+  getCurrentTelemetrySubsessionPing() {
     const current = TelemetryController.getCurrentPingData(true);
     return new this._window.Promise(resolve => resolve(current));
   },
 
-  _wrapPromise: function(promise) {
+  _wrapPromise(promise) {
     return new this._window.Promise(
       (resolve, reject) => promise.then(resolve, reject));
   },
 }
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([MozSelfSupportInterface]);
--- a/browser/components/shell/content/setDesktopBackground.js
+++ b/browser/components/shell/content/setDesktopBackground.js
@@ -15,17 +15,17 @@ var gSetBackground = {
   _canvas          : null,
 
   get _shell()
   {
     return Components.classes["@mozilla.org/browser/shell-service;1"]
                      .getService(Ci.nsIShellService);
   },
 
-  load: function()
+  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)
@@ -44,17 +44,17 @@ var gSetBackground = {
     }
 
     // make sure that the correct dimensions will be used
     setTimeout(function(self) {
       self.init(window.arguments[0]);
     }, 0, this);
   },
 
-  init: function(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");
@@ -71,17 +71,17 @@ var gSetBackground = {
       setDesktopBackground.label = bundle.getString("DesktopBackgroundSet");
       setDesktopBackground.disabled = false;
 
       document.getElementById("showDesktopPreferences").hidden = true;
     }
     this.updatePosition();
   },
 
-  setDesktopBackground: function()
+  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,17 +90,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: function()
+  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;
     }
 
--- a/browser/components/syncedtabs/SyncedTabsDeckComponent.js
+++ b/browser/components/syncedtabs/SyncedTabsDeckComponent.js
@@ -44,17 +44,17 @@ function SyncedTabsDeckComponent({
   this._getChromeWindow = getChromeWindowMock || getChromeWindow;
 
   this._deckStore = deckStore || new SyncedTabsDeckStore();
   this._syncedTabsListStore = listStore || new SyncedTabsListStore(SyncedTabs);
   this.tabListComponent = listComponent || new TabListComponent({
     window: this._window,
     store: this._syncedTabsListStore,
     View: TabListView,
-    SyncedTabs: SyncedTabs,
+    SyncedTabs,
     clipboardHelper: Cc["@mozilla.org/widget/clipboardhelper;1"]
                        .getService(Ci.nsIClipboardHelper),
     getChromeWindow: this._getChromeWindow,
   });
 }
 
 SyncedTabsDeckComponent.prototype = {
   PANELS: {
--- a/browser/components/syncedtabs/SyncedTabsDeckStore.js
+++ b/browser/components/syncedtabs/SyncedTabsDeckStore.js
@@ -26,17 +26,17 @@ function SyncedTabsDeckStore() {
   this._panels = [];
 }
 
 Object.assign(SyncedTabsDeckStore.prototype, EventEmitter.prototype, {
   _change(isUpdatable = false) {
     let panels = this._panels.map(panel => {
       return {id: panel, selected: panel === this._selectedPanel};
     });
-    this.emit("change", {panels, isUpdatable: isUpdatable});
+    this.emit("change", {panels, isUpdatable});
   },
 
   /**
    * Sets the selected panelId and triggers a change event.
    * @param {String} panelId - ID of the panel to select.
    */
   selectPanel(panelId) {
     if (this._panels.indexOf(panelId) === -1 || this._selectedPanel === panelId) {
--- a/browser/components/syncedtabs/test/xpcshell/head.js
+++ b/browser/components/syncedtabs/test/xpcshell/head.js
@@ -10,19 +10,19 @@ XPCOMUtils.defineLazyGetter(this, "FxAcc
 Cu.import("resource://gre/modules/Timer.jsm");
 
 do_get_profile(); // fxa needs a profile directory for storage.
 
 // Create a window polyfill so sinon can load
 let window = {
     document: {},
     location: {},
-    setTimeout: setTimeout,
-    setInterval: setInterval,
-    clearTimeout: clearTimeout,
+    setTimeout,
+    setInterval,
+    clearTimeout,
     clearinterval: clearInterval
 };
 let self = window;
 
 // Load mocking/stubbing library, sinon
 // docs: http://sinonjs.org/docs/
 /* global sinon */
 let loader = Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader);
--- a/browser/components/tests/browser/browser_bug538331.js
+++ b/browser/components/tests/browser/browser_bug538331.js
@@ -130,43 +130,43 @@ function test()
   }
 
   testDefaultArgs();
 }
 
 var gWindowCatcher = {
   windowsOpen: 0,
   finishCalled: false,
-  start: function() {
+  start() {
     Services.ww.registerNotification(this);
   },
 
-  finish: function(aFunc) {
+  finish(aFunc) {
     Services.ww.unregisterNotification(this);
     this.finishFunc = aFunc;
     if (this.windowsOpen > 0)
       return;
 
     this.finishFunc();
   },
 
-  closeWindow: function(win) {
+  closeWindow(win) {
     info("window catcher closing window: " + win.document.documentURI);
     win.close();
     this.windowsOpen--;
     if (this.finishFunc) {
       this.finish(this.finishFunc);
     }
   },
 
-  windowLoad: function(win) {
+  windowLoad(win) {
     executeSoon(this.closeWindow.bind(this, win));
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     if (topic != "domwindowopened")
       return;
 
     this.windowsOpen++;
     let win = subject.QueryInterface(Ci.nsIDOMWindow);
     info("window catcher caught window opening: " + win.document.documentURI);
     win.addEventListener("load", function() {
       win.removeEventListener("load", arguments.callee, false);
--- a/browser/components/tests/unit/test_distribution.js
+++ b/browser/components/tests/unit/test_distribution.js
@@ -41,17 +41,17 @@ function installDistributionEngine() {
   dir.create(dir.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
 
   localeDir.append("de-DE");
   localeDir.create(dir.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
 
   do_get_file("data/engine-de-DE.xml").copyTo(localeDir, "engine-de-DE.xml");
 
   Services.dirsvc.registerProvider({
-    getFile: function(aProp, aPersistent) {
+    getFile(aProp, aPersistent) {
       aPersistent.value = true;
       if (aProp == XRE_APP_DISTRIBUTION_DIR)
         return distDir.clone();
       return null;
     }
   });
 }
 
--- a/browser/components/translation/BingTranslator.jsm
+++ b/browser/components/translation/BingTranslator.jsm
@@ -53,17 +53,17 @@ this.BingTranslator = function(translati
 this.BingTranslator.prototype = {
   /**
    * Performs the translation, splitting the document into several chunks
    * respecting the data limits of the API.
    *
    * @returns {Promise}          A promise that will resolve when the translation
    *                             task is finished.
    */
-  translate: function() {
+  translate() {
     return Task.spawn(function *() {
       let currentIndex = 0;
       this._onFinishedDeferred = Promise.defer();
 
       // Let's split the document into various requests to be sent to
       // Bing's Translation API.
       for (let requestCount = 0; requestCount < MAX_REQUESTS; requestCount++) {
         // Generating the text for each request can be expensive, so
@@ -93,30 +93,30 @@ this.BingTranslator.prototype = {
       return this._onFinishedDeferred.promise;
     }.bind(this));
   },
 
   /**
    * Resets the expiration time of the current token, in order to
    * force the token manager to ask for a new token during the next request.
    */
-  _resetToken : function() {
+  _resetToken() {
     // Force the token manager to get update token
     BingTokenManager._currentExpiryTime = 0;
   },
 
   /**
    * Function called when a request sent to the server completed successfully.
    * This function handles calling the function to parse the result and the
    * function to resolve the promise returned by the public `translate()`
    * method when there's no pending request left.
    *
    * @param   request   The BingRequest sent to the server.
    */
-  _chunkCompleted: function(bingRequest) {
+  _chunkCompleted(bingRequest) {
     if (this._parseChunkResult(bingRequest)) {
       this._partialSuccess = true;
       // Count the number of characters successfully translated.
       this._translatedCharacterCount += bingRequest.characterCount;
     }
 
     this._checkIfFinished();
   },
@@ -126,34 +126,34 @@ this.BingTranslator.prototype = {
    * This function handles deciding if the error is transient or means the
    * service is unavailable (zero balance on the key or request credentials are
    * not in an active state) and calling the function to resolve the promise
    * returned by the public `translate()` method when there's no pending.
    * request left.
    *
    * @param   aError   [optional] The XHR object of the request that failed.
    */
-  _chunkFailed: function(aError) {
+  _chunkFailed(aError) {
     if (aError instanceof Ci.nsIXMLHttpRequest &&
         [400, 401].indexOf(aError.status) != -1) {
       let body = aError.responseText;
       if (body && body.includes("TranslateApiException") &&
           (body.includes("balance") || body.includes("active state")))
         this._serviceUnavailable = true;
     }
 
     this._checkIfFinished();
   },
 
   /**
    * Function called when a request sent to the server has completed.
    * This function handles resolving the promise
    * returned by the public `translate()` method when all chunks are completed.
    */
-  _checkIfFinished: function() {
+  _checkIfFinished() {
     // Check if all pending requests have been
     // completed and then resolves the promise.
     // If at least one chunk was successful, the
     // promise will be resolved positively which will
     // display the "Success" state for the infobar. Otherwise,
     // the "Error" state will appear.
     if (--this._pendingRequests == 0) {
       if (this._partialSuccess) {
@@ -172,17 +172,17 @@ this.BingTranslator.prototype = {
    * which is a XML file that contains a number of elements. To our
    * particular interest, the only part of the response that matters
    * are the <TranslatedText> nodes, which contains the resulting
    * items that were sent to be translated.
    *
    * @param   request      The request sent to the server.
    * @returns boolean      True if parsing of this chunk was successful.
    */
-  _parseChunkResult: function(bingRequest) {
+  _parseChunkResult(bingRequest) {
     let results;
     try {
       let doc = bingRequest.networkRequest.responseXML;
       results = doc.querySelectorAll("TranslatedText");
     } catch (e) {
       return false;
     }
 
@@ -215,17 +215,17 @@ this.BingTranslator.prototype = {
 
   /**
    * This function will determine what is the data to be used for
    * the Nth request we are generating, based on the input params.
    *
    * @param startIndex What is the index, in the roots list, that the
    *                   chunk should start.
    */
-  _generateNextTranslationRequest: function(startIndex) {
+  _generateNextTranslationRequest(startIndex) {
     let currentDataSize = 0;
     let currentChunks = 0;
     let output = [];
     let rootsList = this.translationDocument.roots;
 
     for (let i = startIndex; i < rootsList.length; i++) {
       let root = rootsList[i];
       let text = this.translationDocument.generateTextForItem(root);
@@ -280,17 +280,17 @@ function BingRequest(translationData, so
   this.targetLanguage = targetLanguage;
   this.characterCount = 0;
 }
 
 BingRequest.prototype = {
   /**
    * Initiates the request
    */
-  fireRequest: function() {
+  fireRequest() {
     return Task.spawn(function *() {
       // Prepare authentication.
       let token = yield BingTokenManager.getToken();
       let auth = "Bearer " + token;
 
       // Prepare URL.
       let url = getUrlParam("https://api.microsofttranslator.com/v2/Http.svc/TranslateArray",
                             "browser.translation.bing.translateArrayURL");
@@ -319,21 +319,21 @@ BingRequest.prototype = {
         '</TranslateArrayRequest>';
 
       // Set up request options.
       let deferred = Promise.defer();
       let options = {
         onLoad: (function(responseText, xhr) {
           deferred.resolve(this);
         }).bind(this),
-        onError: function(e, responseText, xhr) {
+        onError(e, responseText, xhr) {
           deferred.reject(xhr);
         },
         postData: requestString,
-        headers: headers
+        headers
       };
 
       // Fire the request.
       let request = httpRequest(url, options);
 
       // Override the response MIME type.
       request.overrideMimeType("text/xml");
       this.networkRequest = request;
@@ -353,17 +353,17 @@ var BingTokenManager = {
   /**
    * Get a valid, non-expired token to be used for the API calls.
    *
    * @returns {Promise}  A promise that resolves with the token
    *                     string once it is obtained. The token returned
    *                     can be the same one used in the past if it is still
    *                     valid.
    */
-  getToken: function() {
+  getToken() {
     if (this._pendingRequest) {
       return this._pendingRequest;
     }
 
     let remainingMs = this._currentExpiryTime - new Date();
     // Our existing token is still good for more than a minute, let's use it.
     if (remainingMs > 60 * 1000) {
       return Promise.resolve(this._currentToken);
@@ -373,31 +373,31 @@ var BingTokenManager = {
   },
 
   /**
    * Generates a new token from the server.
    *
    * @returns {Promise}  A promise that resolves with the token
    *                     string once it is obtained.
    */
-  _getNewToken: function() {
+  _getNewToken() {
     let url = getUrlParam("https://datamarket.accesscontrol.windows.net/v2/OAuth2-13",
                           "browser.translation.bing.authURL");
     let params = [
       ["grant_type", "client_credentials"],
       ["scope", "http://api.microsofttranslator.com"],
       ["client_id",
       getUrlParam("%BING_API_CLIENTID%", "browser.translation.bing.clientIdOverride")],
       ["client_secret",
       getUrlParam("%BING_API_KEY%", "browser.translation.bing.apiKeyOverride")]
     ];
 
     let deferred = Promise.defer();
     let options = {
-      onLoad: function(responseText, xhr) {
+      onLoad(responseText, xhr) {
         BingTokenManager._pendingRequest = null;
         try {
           let json = JSON.parse(responseText);
 
           if (json.error) {
             deferred.reject(json.error);
             return;
           }
@@ -406,17 +406,17 @@ var BingTokenManager = {
           let expires_in = json.expires_in;
           BingTokenManager._currentToken = token;
           BingTokenManager._currentExpiryTime = new Date(Date.now() + expires_in * 1000);
           deferred.resolve(token);
         } catch (e) {
           deferred.reject(e);
         }
       },
-      onError: function(e, responseText, xhr) {
+      onError(e, responseText, xhr) {
         BingTokenManager._pendingRequest = null;
         deferred.reject(e);
       },
       postData: params
     };
 
     this._pendingRequest = deferred.promise;
     httpRequest(url, options);
--- a/browser/components/translation/LanguageDetector.jsm
+++ b/browser/components/translation/LanguageDetector.jsm
@@ -129,15 +129,15 @@ this.LanguageDetector = {
    *      the most prevalent languages detected. It contains a
    *      'languageCode' property, containing the ISO language code of
    *      the language, and a 'percent' property, describing the
    *      approximate percentage of the input which is in that language.
    *      For text of an unknown language, the result may contain an
    *      entry with the languge code 'un', indicating the percent of
    *      the text which is unknown.
    */
-  detectLanguage: function(aParams) {
+  detectLanguage(aParams) {
     if (typeof aParams == "string")
       aParams = { text: aParams };
 
     return workerManager.detectLanguage(aParams);
   },
 };
--- a/browser/components/translation/Translation.jsm
+++ b/browser/components/translation/Translation.jsm
@@ -36,17 +36,17 @@ this.Translation = {
       this._defaultTargetLanguage = Cc["@mozilla.org/chrome/chrome-registry;1"]
                                       .getService(Ci.nsIXULChromeRegistry)
                                       .getSelectedLocale("global")
                                       .split("-")[0];
     }
     return this._defaultTargetLanguage;
   },
 
-  documentStateReceived: function(aBrowser, aData) {
+  documentStateReceived(aBrowser, aData) {
     if (aData.state == this.STATE_OFFER) {
       if (aData.detectedLanguage == this.defaultTargetLanguage) {
         // Detected language is the same as the user's locale.
         return;
       }
 
       if (this.supportedSourceLanguages.indexOf(aData.detectedLanguage) == -1) {
         // Detected language is not part of the supported languages.
@@ -73,17 +73,17 @@ this.Translation = {
     trUI.originalShown = aData.originalShown;
 
     trUI.showURLBarIcon();
 
     if (trUI.shouldShowInfoBar(aBrowser.currentURI))
       trUI.showTranslationInfoBar();
   },
 
-  openProviderAttribution: function() {
+  openProviderAttribution() {
     let attribution = this.supportedEngines[this.translationEngine];
     Cu.import("resource:///modules/RecentWindow.jsm");
     RecentWindow.getMostRecentBrowserWindow().openUILinkIn(attribution, "tab");
   },
 
   /**
    * The list of translation engines and their attributions.
    */
@@ -133,17 +133,17 @@ TranslationUI.prototype = {
     return this._browser;
   },
   set browser(aBrowser) {
     if (this._browser)
       this._browser.messageManager.removeMessageListener("Translation:Finished", this);
     aBrowser.messageManager.addMessageListener("Translation:Finished", this);
     this._browser = aBrowser;
   },
-  translate: function(aFrom, aTo) {
+  translate(aFrom, aTo) {
     if (aFrom == aTo ||
         (this.state == Translation.STATE_TRANSLATED &&
          this.translatedFrom == aFrom && this.translatedTo == aTo)) {
       // Nothing to do.
       return;
     }
 
     if (this.state == Translation.STATE_OFFER) {
@@ -161,17 +161,17 @@ TranslationUI.prototype = {
     this.translatedTo = aTo;
 
     this.browser.messageManager.sendAsyncMessage(
       "Translation:TranslateDocument",
       { from: aFrom, to: aTo }
     );
   },
 
-  showURLBarIcon: function() {
+  showURLBarIcon() {
     let chromeWin = this.browser.ownerGlobal;
     let PopupNotifications = chromeWin.PopupNotifications;
     let removeId = this.originalShown ? "translated" : "translate";
     let notification =
       PopupNotifications.getNotification(removeId, this.browser);
     if (notification)
       PopupNotifications.remove(notification);
 
@@ -209,42 +209,42 @@ TranslationUI.prototype = {
   set state(val) {
     let notif = this.notificationBox.getNotificationWithValue("translation");
     if (notif)
       notif.state = val;
     this._state = val;
   },
 
   originalShown: true,
-  showOriginalContent: function() {
+  showOriginalContent() {
     this.originalShown = true;
     this.showURLBarIcon();
     this.browser.messageManager.sendAsyncMessage("Translation:ShowOriginal");
     TranslationTelemetry.recordShowOriginalContent();
   },
 
-  showTranslatedContent: function() {
+  showTranslatedContent() {
     this.originalShown = false;
     this.showURLBarIcon();
     this.browser.messageManager.sendAsyncMessage("Translation:ShowTranslation");
   },
 
   get notificationBox() {
     return this.browser.ownerGlobal.gBrowser.getNotificationBox(this.browser);
   },
 
-  showTranslationInfoBar: function() {
+  showTranslationInfoBar() {
     let notificationBox = this.notificationBox;
     let notif = notificationBox.appendNotification("", "translation", null,
                                                    notificationBox.PRIORITY_INFO_HIGH);
     notif.init(this);
     return notif;
   },
 
-  shouldShowInfoBar: function(aURI) {
+  shouldShowInfoBar(aURI) {
     // Never show the infobar automatically while the translation
     // service is temporarily unavailable.
     if (Translation.serviceUnavailable)
       return false;
 
     // Check if we should never show the infobar for this language.
     let neverForLangs =
       Services.prefs.getCharPref("browser.translation.neverForLanguages");
@@ -258,17 +258,17 @@ TranslationUI.prototype = {
     if (perms.testExactPermission(aURI, "translate") ==  perms.DENY_ACTION) {
       TranslationTelemetry.recordAutoRejectedTranslationOffer();
       return false;
     }
 
     return true;
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "Translation:Finished":
         if (msg.data.success) {
           this.originalShown = false;
           this.state = Translation.STATE_TRANSLATED;
           this.showURLBarIcon();
 
           // Record the number of characters translated.
@@ -279,31 +279,31 @@ TranslationUI.prototype = {
           this.state = Translation.STATE_UNAVAILABLE;
         } else {
           this.state = Translation.STATE_ERROR;
         }
         break;
     }
   },
 
-  infobarClosed: function() {
+  infobarClosed() {
     if (this.state == Translation.STATE_OFFER)
       TranslationTelemetry.recordDeniedTranslationOffer();
   }
 };
 
 /**
  * Uses telemetry histograms for collecting statistics on the usage of the
  * translation component.
  *
  * NOTE: Metrics are only recorded if the user enabled the telemetry option.
  */
 this.TranslationTelemetry = {
 
-  init: function() {
+  init() {
     // Constructing histograms.
     const plain = (id) => Services.telemetry.getHistogramById(id);
     const keyed = (id) => Services.telemetry.getKeyedHistogramById(id);
     this.HISTOGRAMS = {
       OPPORTUNITIES         : () => plain("TRANSLATION_OPPORTUNITIES"),
       OPPORTUNITIES_BY_LANG : () => keyed("TRANSLATION_OPPORTUNITIES_BY_LANGUAGE"),
       PAGES                 : () => plain("TRANSLATED_PAGES"),
       PAGES_BY_LANG         : () => keyed("TRANSLATED_PAGES_BY_LANGUAGE"),
@@ -321,56 +321,56 @@ this.TranslationTelemetry = {
     this.recordPreferences();
   },
 
   /**
    * Record a translation opportunity in the health report.
    * @param language
    *        The language of the page.
    */
-  recordTranslationOpportunity: function(language) {
+  recordTranslationOpportunity(language) {
     return this._recordOpportunity(language, true);
   },
 
   /**
    * Record a missed translation opportunity in the health report.
    * A missed opportunity is when the language detected is not part
    * of the supported languages.
    * @param language
    *        The language of the page.
    */
-  recordMissedTranslationOpportunity: function(language) {
+  recordMissedTranslationOpportunity(language) {
     return this._recordOpportunity(language, false);
   },
 
   /**
    * Record an automatically rejected translation offer in the health
    * report. A translation offer is automatically rejected when a user
    * has previously clicked "Never translate this language" or "Never
    * translate this site", which results in the infobar not being shown for
    * the translation opportunity.
    *
    * These translation opportunities should still be recorded in addition to
    * recording the automatic rejection of the offer.
    */
-  recordAutoRejectedTranslationOffer: function() {
+  recordAutoRejectedTranslationOffer() {
     if (!this._canRecord) return;
     this.HISTOGRAMS.AUTO_REJECTED().add();
   },
 
    /**
    * Record a translation in the health report.
    * @param langFrom
    *        The language of the page.
    * @param langTo
    *        The language translated to
    * @param numCharacters
    *        The number of characters that were translated
    */
-  recordTranslation: function(langFrom, langTo, numCharacters) {
+  recordTranslation(langFrom, langTo, numCharacters) {
     if (!this._canRecord) return;
     this.HISTOGRAMS.PAGES().add();
     this.HISTOGRAMS.PAGES_BY_LANG().add(langFrom + " -> " + langTo);
     this.HISTOGRAMS.CHARACTERS().add(numCharacters);
   },
 
   /**
    * Record a change of the detected language in the health report. This should
@@ -379,68 +379,68 @@ this.TranslationTelemetry = {
    *
    * @param beforeFirstTranslation
    *        A boolean indicating if we are recording a change of detected
    *        language before translating the page for the first time. If we
    *        have already translated the page from the detected language and
    *        the user has manually adjusted the detected language false should
    *        be passed.
    */
-  recordDetectedLanguageChange: function(beforeFirstTranslation) {
+  recordDetectedLanguageChange(beforeFirstTranslation) {
     if (!this._canRecord) return;
     this.HISTOGRAMS.DETECTION_CHANGES().add(beforeFirstTranslation);
   },
 
   /**
    * Record a change of the target language in the health report. This should
    * only be called when actually executing a translation, not every time the
    * user changes in the language in the UI.
    */
-  recordTargetLanguageChange: function() {
+  recordTargetLanguageChange() {
     if (!this._canRecord) return;
     this.HISTOGRAMS.TARGET_CHANGES().add();
   },
 
   /**
    * Record a denied translation offer.
    */
-  recordDeniedTranslationOffer: function() {
+  recordDeniedTranslationOffer() {
     if (!this._canRecord) return;
     this.HISTOGRAMS.DENIED().add();
   },
 
   /**
    * Record a "Show Original" command use.
    */
-  recordShowOriginalContent: function() {
+  recordShowOriginalContent() {
     if (!this._canRecord) return;
     this.HISTOGRAMS.SHOW_ORIGINAL().add();
   },
 
   /**
    * Record the state of translation preferences.
    */
-  recordPreferences: function() {
+  recordPreferences() {
     if (!this._canRecord) return;
     if (Services.prefs.getBoolPref(TRANSLATION_PREF_SHOWUI)) {
       this.HISTOGRAMS.SHOW_UI().add(1);
     }
     if (Services.prefs.getBoolPref(TRANSLATION_PREF_DETECT_LANG)) {
       this.HISTOGRAMS.DETECT_LANG().add(1);
     }
   },
 
-  _recordOpportunity: function(language, success) {
+  _recordOpportunity(language, success) {
     if (!this._canRecord) return;
     this.HISTOGRAMS.OPPORTUNITIES().add(success);
     this.HISTOGRAMS.OPPORTUNITIES_BY_LANG().add(language, success);
   },
 
   /**
    * A shortcut for reading the telemetry preference.
    *
    */
-  _canRecord: function() {
+  _canRecord() {
     return Services.prefs.getBoolPref("toolkit.telemetry.enabled");
   }
 };
 
 this.TranslationTelemetry.init();
--- a/browser/components/translation/TranslationContentHandler.jsm
+++ b/browser/components/translation/TranslationContentHandler.jsm
@@ -26,17 +26,17 @@ this.TranslationContentHandler = functio
 
   global.addMessageListener("Translation:TranslateDocument", this);
   global.addMessageListener("Translation:ShowTranslation", this);
   global.addMessageListener("Translation:ShowOriginal", this);
   this.global = global;
 }
 
 TranslationContentHandler.prototype = {
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     // We are only listening to pageshow events.
     let target = aEvent.target;
 
     // Only handle top-level frames.
     let win = target.defaultView;
     if (win.parent !== win)
       return;
 
@@ -56,17 +56,17 @@ TranslationContentHandler.prototype = {
       data.originalShown = true;
     }
     data.detectedLanguage = content.detectedLanguage;
 
     this.global.sendAsyncMessage("Translation:DocumentState", data);
   },
 
   /* nsIWebProgressListener implementation */
-  onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
     if (!aWebProgress.isTopLevel ||
         !(aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) ||
         !this.global.content)
       return;
 
     let url = aRequest.name;
     if (!url.startsWith("http://") && !url.startsWith("https://"))
       return;
@@ -103,25 +103,25 @@ TranslationContentHandler.prototype = {
         originalShown: true,
         detectedLanguage: result.language
       };
       this.global.sendAsyncMessage("Translation:DocumentState", data);
     });
   },
 
   // Unused methods.
-  onProgressChange: function() {},
-  onLocationChange: function() {},
-  onStatusChange:   function() {},
-  onSecurityChange: function() {},
+  onProgressChange() {},
+  onLocationChange() {},
+  onStatusChange() {},
+  onSecurityChange() {},
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
                                          Ci.nsISupportsWeakReference]),
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "Translation:TranslateDocument":
       {
         Cu.import("resource:///modules/translation/TranslationDocument.jsm");
 
         // If a TranslationDocument already exists for this document, it should
         // be used instead of creating a new one so that we can use the original
         // content of the page for the new translation instead of the newly
--- a/browser/components/translation/TranslationDocument.jsm
+++ b/browser/components/translation/TranslationDocument.jsm
@@ -37,17 +37,17 @@ this.TranslationDocument.prototype = {
   originalShown: true,
 
   /**
    * Initializes the object and populates
    * the roots lists.
    *
    * @param document  The document to be translated
    */
-  _init: function(document) {
+  _init(document) {
     let window = document.defaultView;
     let winUtils = window.QueryInterface(Ci.nsIInterfaceRequestor)
                          .getInterface(Ci.nsIDOMWindowUtils);
 
     // Get all the translation nodes in the document's body:
     // a translation node is a node from the document which
     // contains useful content for translation, and therefore
     // must be included in the translation process.
@@ -89,17 +89,17 @@ this.TranslationDocument.prototype = {
    * for each node returned by getTranslationNodes.
    *
    * @param node        The DOM node for this item.
    * @param id          A unique, numeric id for this item.
    * @parem isRoot      A boolean saying whether this item is a root.
    *
    * @returns           A TranslationItem object.
    */
-  _createItemForNode: function(node, id, isRoot) {
+  _createItemForNode(node, id, isRoot) {
     if (this.itemsMap.has(node)) {
       return this.itemsMap.get(node);
     }
 
     let item = new TranslationItem(node, id, isRoot);
 
     if (isRoot) {
       // Root items do not have a parent item.
@@ -124,17 +124,17 @@ this.TranslationDocument.prototype = {
    * by the presence of the "original" array in the item), the text will
    * be regenerated from the "original" data instead of from the related
    * DOM nodes (because the nodes might contain translated data).
    *
    * @param item     A TranslationItem object
    *
    * @returns        A string representation of the TranslationItem.
    */
-  generateTextForItem: function(item) {
+  generateTextForItem(item) {
     if (item.original) {
       return regenerateTextFromOriginalHelper(item);
     }
 
     if (item.isSimpleRoot) {
       let text = item.nodeRef.firstChild.nodeValue.trim();
       item.original = [text];
       return text;
@@ -182,38 +182,38 @@ this.TranslationDocument.prototype = {
 
     return generateTranslationHtmlForItem(item, str);
   },
 
   /**
    * Changes the document to display its translated
    * content.
    */
-  showTranslation: function() {
+  showTranslation() {
     this.originalShown = false;
     this._swapDocumentContent("translation");
   },
 
   /**
    * Changes the document to display its original
    * content.
    */
-  showOriginal: function() {
+  showOriginal() {
     this.originalShown = true;
     this._swapDocumentContent("original");
   },
 
   /**
    * Swap the document with the resulting translation,
    * or back with the original content.
    *
    * @param target   A string that is either "translation"
    *                 or "original".
    */
-  _swapDocumentContent: function(target) {
+  _swapDocumentContent(target) {
     Task.spawn(function *() {
       // Let the event loop breath on every 100 nodes
       // that are replaced.
       const YIELD_INTERVAL = 100;
       let count = YIELD_INTERVAL;
 
       for (let root of this.roots) {
         root.swapText(target);
@@ -269,17 +269,17 @@ function TranslationItem(node, id, isRoo
   this.isRoot = isRoot;
   this.children = [];
 }
 
 TranslationItem.prototype = {
   isRoot: false,
   isSimpleRoot: false,
 
-  toString: function() {
+  toString() {
     let rootType = "";
     if (this.isRoot) {
       if (this.isSimpleRoot) {
         rootType = " (simple root)";
       }
       else {
         rootType = " (non simple root)";
       }
@@ -300,17 +300,17 @@ TranslationItem.prototype = {
    * While parsing, the result is stored in the "translation" field of the
    * TranslationItem, which will be used to display the final translation when
    * all items are finished. It remains stored too to allow back-and-forth
    * switching between the "Show Original" and "Show Translation" functions.
    *
    * @param result    A string with the textual result received from the server,
    *                  which can be plain-text or a serialized HTML doc.
    */
-  parseResult: function(result) {
+  parseResult(result) {
     if (this.isSimpleRoot) {
       this.translation = [result];
       return;
     }
 
     let domParser = Cc["@mozilla.org/xmlextras/domparser;1"]
                       .createInstance(Ci.nsIDOMParser);
 
@@ -320,46 +320,46 @@ TranslationItem.prototype = {
 
   /**
    * This function finds a child TranslationItem
    * with the given id.
    * @param id        The id to look for, in the format "n#"
    * @returns         A TranslationItem with the given id, or null if
    *                  it was not found.
    */
-  getChildById: function(id) {
+  getChildById(id) {
     for (let child of this.children) {
       if (("n" + child.id) == id) {
         return child;
       }
     }
     return null;
   },
 
   /**
    * Swap the text of this TranslationItem between
    * its original and translated states.
    *
    * @param target   A string that is either "translation"
    *                 or "original".
    */
-  swapText: function(target) {
+  swapText(target) {
     swapTextForItem(this, target);
   }
 };
 
 /**
  * This object represents a placeholder item for translation. It's similar to
  * the TranslationItem class, but it represents nodes that have no meaningful
  * content for translation. These nodes will be replaced by "<br>" in a
  * translation request. It's necessary to keep them to use it as a mark
  * for correct positioning and spliting of text nodes.
  */
 const TranslationItem_NodePlaceholder = {
-  toString: function() {
+  toString() {
     return "[object TranslationItem_NodePlaceholder]";
   }
 };
 
 /**
  * Generate the outer HTML representation for a given item.
  *
  * @param   item       A TranslationItem object.
--- a/browser/components/translation/YandexTranslator.jsm
+++ b/browser/components/translation/YandexTranslator.jsm
@@ -71,17 +71,17 @@ this.YandexTranslator = function(transla
 this.YandexTranslator.prototype = {
   /**
    * Performs the translation, splitting the document into several chunks
    * respecting the data limits of the API.
    *
    * @returns {Promise}          A promise that will resolve when the translation
    *                             task is finished.
    */
-  translate: function() {
+  translate() {
     return Task.spawn(function *() {
       let currentIndex = 0;
       this._onFinishedDeferred = Promise.defer();
 
       // Let's split the document into various requests to be sent to
       // Yandex's Translation API.
       for (let requestCount = 0; requestCount < MAX_REQUESTS; requestCount++) {
         // Generating the text for each request can be expensive, so
@@ -115,17 +115,17 @@ this.YandexTranslator.prototype = {
   /**
    * Function called when a request sent to the server completed successfully.
    * This function handles calling the function to parse the result and the
    * function to resolve the promise returned by the public `translate()`
    * method when there are no pending requests left.
    *
    * @param   request   The YandexRequest sent to the server
    */
-  _chunkCompleted: function(yandexRequest) {
+  _chunkCompleted(yandexRequest) {
     if (this._parseChunkResult(yandexRequest)) {
       this._partialSuccess = true;
       // Count the number of characters successfully translated.
       this._translatedCharacterCount += yandexRequest.characterCount;
     }
 
     this._checkIfFinished();
   },
@@ -135,17 +135,17 @@ this.YandexTranslator.prototype = {
    * This function handles deciding if the error is transient or means the
    * service is unavailable (zero balance on the key or request credentials are
    * not in an active state) and calling the function to resolve the promise
    * returned by the public `translate()` method when there are no pending
    * requests left.
    *
    * @param   aError   [optional] The XHR object of the request that failed.
    */
-  _chunkFailed: function(aError) {
+  _chunkFailed(aError) {
     if (aError instanceof Ci.nsIXMLHttpRequest) {
       let body = aError.responseText;
       let json = { code: 0 };
       try {
         json = JSON.parse(body);
       } catch (e) {}
 
       if (json.code && YANDEX_PERMANENT_ERRORS.indexOf(json.code) != -1)
@@ -155,17 +155,17 @@ this.YandexTranslator.prototype = {
     this._checkIfFinished();
   },
 
   /**
    * Function called when a request sent to the server has completed.
    * This function handles resolving the promise
    * returned by the public `translate()` method when all chunks are completed.
    */
-  _checkIfFinished: function() {
+  _checkIfFinished() {
     // Check if all pending requests have been
     // completed and then resolves the promise.
     // If at least one chunk was successful, the
     // promise will be resolved positively which will
     // display the "Success" state for the infobar. Otherwise,
     // the "Error" state will appear.
     if (--this._pendingRequests == 0) {
       if (this._partialSuccess) {
@@ -183,17 +183,17 @@ this.YandexTranslator.prototype = {
    * This function parses the result returned by Yandex's Translation API,
    * which returns a JSON result that contains a number of elements. The
    * API is documented here:
    * http://api.yandex.com/translate/doc/dg/reference/translate.xml
    *
    * @param   request      The request sent to the server.
    * @returns boolean      True if parsing of this chunk was successful.
    */
-  _parseChunkResult: function(yandexRequest) {
+  _parseChunkResult(yandexRequest) {
     let results;
     try {
       let result = JSON.parse(yandexRequest.networkRequest.responseText);
       if (result.code != 200) {
         Services.console.logStringMessage("YandexTranslator: Result is " + result.code);
         return false;
       }
       results = result.text
@@ -223,17 +223,17 @@ this.YandexTranslator.prototype = {
 
   /**
    * This function will determine what is the data to be used for
    * the Nth request we are generating, based on the input params.
    *
    * @param startIndex What is the index, in the roots list, that the
    *                   chunk should start.
    */
-  _generateNextTranslationRequest: function(startIndex) {
+  _generateNextTranslationRequest(startIndex) {
     let currentDataSize = 0;
     let currentChunks = 0;
     let output = [];
     let rootsList = this.translationDocument.roots;
 
     for (let i = startIndex; i < rootsList.length; i++) {
       let root = rootsList[i];
       let text = this.translationDocument.generateTextForItem(root);
@@ -287,17 +287,17 @@ function YandexRequest(translationData, 
   this.targetLanguage = targetLanguage;
   this.characterCount = 0;
 }
 
 YandexRequest.prototype = {
   /**
    * Initiates the request
    */
-  fireRequest: function() {
+  fireRequest() {
     return Task.spawn(function *() {
       // Prepare URL.
       let url = getUrlParam("https://translate.yandex.net/api/v1.5/tr.json/translate",
                             "browser.translation.yandex.translateURLOverride");
 
       // Prepare the request body.
       let apiKey = getUrlParam("%YANDEX_API_KEY%", "browser.translation.yandex.apiKeyOverride");
       let params = [
@@ -312,17 +312,17 @@ YandexRequest.prototype = {
       }
 
       // Set up request options.
       let deferred = Promise.defer();
       let options = {
         onLoad: (function(responseText, xhr) {
           deferred.resolve(this);
         }).bind(this),
-        onError: function(e, responseText, xhr) {
+        onError(e, responseText, xhr) {
           deferred.reject(xhr);
         },
         postData: params
       };
 
       // Fire the request.
       this.networkRequest = httpRequest(url, options);
 
--- a/browser/components/translation/test/browser_translation_infobar.js
+++ b/browser/components/translation/test/browser_translation_infobar.js
@@ -28,33 +28,33 @@ function waitForCondition(condition, nex
       moveOn();
     }
     tries++;
   }, 100);
   var moveOn = function() { clearInterval(interval); nextTest(); };
 }
 
 var TranslationStub = {
-  translate: function(aFrom, aTo) {
+  translate(aFrom, aTo) {
     this.state = Translation.STATE_TRANSLATING;
     this.translatedFrom = aFrom;
     this.translatedTo = aTo;
   },
 
-  _reset: function() {
+  _reset() {
     this.translatedFrom = "";
     this.translatedTo = "";
   },
 
-  failTranslation: function() {
+  failTranslation() {
     this.state = Translation.STATE_ERROR;
     this._reset();
   },
 
-  finishTranslation: function() {
+  finishTranslation() {
     this.showTranslatedContent();
     this.state = Translation.STATE_TRANSLATED;
     this._reset();
   }
 };
 
 function showTranslationUI(aDetectedLanguage) {
   let browser = gBrowser.selectedBrowser;
--- a/browser/components/translation/test/browser_translation_telemetry.js
+++ b/browser/components/translation/test/browser_translation_telemetry.js
@@ -19,24 +19,24 @@ var MetricsChecker = {
     AUTO_REJECTED         : Services.telemetry.getHistogramById("AUTO_REJECTED_TRANSLATION_OFFERS"),
     SHOW_ORIGINAL         : Services.telemetry.getHistogramById("REQUESTS_OF_ORIGINAL_CONTENT"),
     TARGET_CHANGES        : Services.telemetry.getHistogramById("CHANGES_OF_TARGET_LANGUAGE"),
     DETECTION_CHANGES     : Services.telemetry.getHistogramById("CHANGES_OF_DETECTED_LANGUAGE"),
     SHOW_UI               : Services.telemetry.getHistogramById("SHOULD_TRANSLATION_UI_APPEAR"),
     DETECT_LANG           : Services.telemetry.getHistogramById("SHOULD_AUTO_DETECT_LANGUAGE"),
   },
 
-  reset: function() {
+  reset() {
     for (let i of Object.keys(this.HISTOGRAMS)) {
       this.HISTOGRAMS[i].clear();
     }
     this.updateMetrics();
   },
 
-  updateMetrics: function() {
+  updateMetrics() {
     this._metrics = {
       opportunitiesCount: this.HISTOGRAMS.OPPORTUNITIES.snapshot().sum || 0,
       pageCount: this.HISTOGRAMS.PAGES.snapshot().sum || 0,
       charCount: this.HISTOGRAMS.CHARACTERS.snapshot().sum || 0,
       deniedOffers: this.HISTOGRAMS.DENIED.snapshot().sum || 0,
       autoRejectedOffers: this.HISTOGRAMS.AUTO_REJECTED.snapshot().sum || 0,
       showOriginal: this.HISTOGRAMS.SHOW_ORIGINAL.snapshot().sum || 0,
       detectedLanguageChangedBefore: this.HISTOGRAMS.DETECTION_CHANGES.snapshot().counts[1] || 0,
@@ -60,29 +60,29 @@ var MetricsChecker = {
         this._metrics.pageCountByLang[key] = pages[key] ? pages[key].sum : 0;
       }
     }
   },
 
   /**
    * A recurrent loop for making assertions about collected metrics.
    */
-  _assertionLoop: function(prevMetrics, metrics, additions) {
+  _assertionLoop(prevMetrics, metrics, additions) {
     for (let metric of Object.keys(additions)) {
       let addition = additions[metric];
       // Allows nesting metrics. Useful for keyed histograms.
       if (typeof addition === 'object') {
         this._assertionLoop(prevMetrics[metric], metrics[metric], addition);
         continue;
       }
       Assert.equal(prevMetrics[metric] + addition, metrics[metric]);
     }
   },
 
-  checkAdditions: function(additions) {
+  checkAdditions(additions) {
     let prevMetrics = this._metrics;
     this.updateMetrics();
     this._assertionLoop(prevMetrics, this._metrics, additions);
   }
 
 };
 
 function getInfobarElement(browser, anonid) {
--- a/browser/components/uitour/UITour-lib.js
+++ b/browser/components/uitour/UITour-lib.js
@@ -22,17 +22,17 @@ if (typeof Mozilla == 'undefined') {
       themeIntervalId = null;
     }
   }
 
   function _sendEvent(action, data) {
     var event = new CustomEvent('mozUITour', {
       bubbles: true,
       detail: {
-	action: action,
+	action,
 	data: data || {}
       }
     });
 
     document.dispatchEvent(event);
   }
 
   function _generateCallbackID() {
@@ -89,47 +89,47 @@ if (typeof Mozilla == 'undefined') {
     } else {
       document.removeEventListener('mozUITourNotification',
                                    _notificationListener);
     }
   };
 
   Mozilla.UITour.registerPageID = function(pageID) {
     _sendEvent('registerPageID', {
-      pageID: pageID
+      pageID
     });
   };
 
   Mozilla.UITour.showHeartbeat = function(message, thankyouMessage, flowId, engagementURL,
 					  learnMoreLabel, learnMoreURL, options) {
     var args = {
-      message: message,
-      thankyouMessage: thankyouMessage,
-      flowId: flowId,
-      engagementURL: engagementURL,
-      learnMoreLabel: learnMoreLabel,
-      learnMoreURL: learnMoreURL,
+      message,
+      thankyouMessage,
+      flowId,
+      engagementURL,
+      learnMoreLabel,
+      learnMoreURL,
     };
 
     if (options) {
       for (var option in options) {
 	if (!options.hasOwnProperty(option)) {
 	  continue;
 	}
 	args[option] = options[option];
       }
     }
 
     _sendEvent('showHeartbeat', args);
   };
 
   Mozilla.UITour.showHighlight = function(target, effect) {
     _sendEvent('showHighlight', {
-      target: target,
-      effect: effect
+      target,
+      effect
     });
   };
 
   Mozilla.UITour.hideHighlight = function() {
     _sendEvent('hideHighlight');
   };
 
   Mozilla.UITour.showInfo = function(target, title, text, icon, buttons, options) {
@@ -147,23 +147,23 @@ if (typeof Mozilla == 'undefined') {
 
     var closeButtonCallbackID, targetCallbackID;
     if (options && options.closeButtonCallback)
       closeButtonCallbackID = _waitForCallback(options.closeButtonCallback);
     if (options && options.targetCallback)
       targetCallbackID = _waitForCallback(options.targetCallback);
 
     _sendEvent('showInfo', {
-      target: target,
-      title: title,
-      text: text,
-      icon: icon,
+      target,
+      title,
+      text,
+      icon,
       buttons: buttonData,
-      closeButtonCallbackID: closeButtonCallbackID,
-      targetCallbackID: targetCallbackID
+      closeButtonCallbackID,
+      targetCallbackID
     });
   };
 
   Mozilla.UITour.hideInfo = function() {
     _sendEvent('hideInfo');
   };
 
   Mozilla.UITour.previewTheme = function(theme) {
@@ -204,24 +204,24 @@ if (typeof Mozilla == 'undefined') {
   };
 
   Mozilla.UITour.showMenu = function(name, callback) {
     var showCallbackID;
     if (callback)
       showCallbackID = _waitForCallback(callback);
 
     _sendEvent('showMenu', {
-      name: name,
-      showCallbackID: showCallbackID,
+      name,
+      showCallbackID,
     });
   };
 
   Mozilla.UITour.hideMenu = function(name) {
     _sendEvent('hideMenu', {
-      name: name
+      name
     });
   };
 
   Mozilla.UITour.showNewTab = function() {
     _sendEvent('showNewTab');
   };
 
   Mozilla.UITour.getConfiguration = function(configName, callback) {
@@ -255,44 +255,44 @@ if (typeof Mozilla == 'undefined') {
   };
 
   Mozilla.UITour.resetFirefox = function() {
     _sendEvent('resetFirefox');
   };
 
   Mozilla.UITour.addNavBarWidget = function(name, callback) {
     _sendEvent('addNavBarWidget', {
-      name: name,
+      name,
       callbackID: _waitForCallback(callback),
     });
   };
 
   Mozilla.UITour.setDefaultSearchEngine = function(identifier) {
     _sendEvent('setDefaultSearchEngine', {
-      identifier: identifier,
+      identifier,
     });
   };
 
   Mozilla.UITour.setTreatmentTag = function(name, value) {
     _sendEvent('setTreatmentTag', {
-      name: name,
-      value: value
+      name,
+      value
     });
   };
 
   Mozilla.UITour.getTreatmentTag = function(name, callback) {
     _sendEvent('getTreatmentTag', {
-      name: name,
+      name,
       callbackID: _waitForCallback(callback)
     });
   };
 
   Mozilla.UITour.setSearchTerm = function(term) {
     _sendEvent('setSearchTerm', {
-      term: term
+      term
     });
   };
 
   Mozilla.UITour.openSearchPanel = function(callback) {
     _sendEvent('openSearchPanel', {
       callbackID: _waitForCallback(callback)
     });
   };
@@ -302,17 +302,17 @@ if (typeof Mozilla == 'undefined') {
   };
 
   Mozilla.UITour.toggleReaderMode = function() {
     _sendEvent('toggleReaderMode');
   };
 
   Mozilla.UITour.openPreferences = function(pane) {
     _sendEvent('openPreferences', {
-      pane: pane
+      pane
     });
   };
 
   /**
    * Closes the tab where this code is running. As usual, if the tab is in the
    * foreground, the tab that was displayed before is selected.
    *
    * The last tab in the current window will never be closed, in which case
--- a/browser/components/uitour/UITour.jsm
+++ b/browser/components/uitour/UITour.jsm
@@ -209,17 +209,17 @@ this.UITour = {
     }],
     ["urlbar",      {
       query: "#urlbar",
       widgetName: "urlbar-container",
     }],
     ["webide",      {query: "#webide-button"}],
   ]),
 
-  init: function() {
+  init() {
     log.debug("Initializing UITour");
     // Lazy getter is initialized here so it can be replicated any time
     // in a test.
     delete this.seenPageIDs;
     Object.defineProperty(this, "seenPageIDs", {
       get: this.restoreSeenPageIDs.bind(this),
       configurable: true,
     });
@@ -238,17 +238,17 @@ this.UITour = {
       "onAreaReset",
     ];
     CustomizableUI.addListener(listenerMethods.reduce((listener, method) => {
       listener[method] = () => this.clearAvailableTargetsCache();
       return listener;
     }, {}));
   },
 
-  restoreSeenPageIDs: function() {
+  restoreSeenPageIDs() {
     delete this.seenPageIDs;
 
     if (UITelemetry.enabled) {
       let dateThreshold = Date.now() - SEENPAGEID_EXPIRY;
 
       try {
         let data = Services.prefs.getCharPref(PREF_SEENPAGEIDS);
         data = new Map(JSON.parse(data));
@@ -271,55 +271,55 @@ this.UITour = {
     if (!this.seenPageIDs)
       this.seenPageIDs = new Map();
 
     this.persistSeenIDs();
 
     return this.seenPageIDs;
   },
 
-  addSeenPageID: function(aPageID) {
+  addSeenPageID(aPageID) {
     if (!UITelemetry.enabled)
       return;
 
     this.seenPageIDs.set(aPageID, {
       lastSeen: Date.now(),
     });
 
     this.persistSeenIDs();
   },
 
-  persistSeenIDs: function() {
+  persistSeenIDs() {
     if (this.seenPageIDs.size === 0) {
       Services.prefs.clearUserPref(PREF_SEENPAGEIDS);
       return;
     }
 
     Services.prefs.setCharPref(PREF_SEENPAGEIDS,
                                JSON.stringify([...this.seenPageIDs]));
   },
 
   get _readerViewTriggerRegEx() {
     delete this._readerViewTriggerRegEx;
     let readerViewUITourTrigger = Services.prefs.getCharPref(PREF_READERVIEW_TRIGGER);
     return this._readerViewTriggerRegEx = new RegExp(readerViewUITourTrigger, "i");
   },
 
-  onLocationChange: function(aLocation) {
+  onLocationChange(aLocation) {
     // The ReaderView tour page is expected to run in Reader View,
     // which disables JavaScript on the page. To get around that, we
     // automatically start a pre-defined tour on page load (for hysterical
     // raisins the ReaderView tour is known as "readinglist")
     let originalUrl = ReaderMode.getOriginalUrl(aLocation);
     if (this._readerViewTriggerRegEx.test(originalUrl)) {
       this.startSubTour("readinglist");
     }
   },
 
-  onPageEvent: function(aMessage, aEvent) {
+  onPageEvent(aMessage, aEvent) {
     let browser = aMessage.target;
     let window = browser.ownerGlobal;
 
     // Does the window have tabs? We need to make sure since windowless browsers do
     // not have tabs.
     if (!window.gBrowser) {
       // When using windowless browsers we don't have a valid |window|. If that's the case,
       // use the most recent window as a target for UITour functions (see Bug 1111022).
@@ -615,17 +615,17 @@ this.UITour = {
 
       case "getTreatmentTag": {
         let name = data.name;
         let value;
         try {
           value = Services.prefs.getComplexValue("browser.uitour.treatment." + name,
                                                  Ci.nsISupportsString).data;
         } catch (ex) {}
-        this.sendPageCallback(messageManager, data.callbackID, { value: value });
+        this.sendPageCallback(messageManager, data.callbackID, { value });
         break;
       }
 
       case "setSearchTerm": {
         let targetPromise = this.getTarget(window, "search");
         targetPromise.then(target => {
           let searchbar = target.node;
           searchbar.value = data.term;
@@ -703,17 +703,17 @@ this.UITour = {
     }
     this.tourBrowsersByWindow.get(window).add(aBrowser);
 
     Services.obs.addObserver(this, "message-manager-close", false);
 
     window.addEventListener("SSWindowClosing", this);
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     log.debug("handleEvent: type =", aEvent.type, "event =", aEvent);
     switch (aEvent.type) {
       case "TabSelect": {
         let window = aEvent.target.ownerGlobal;
 
         // Teardown the browser of the tab we just switched away from.
         if (aEvent.detail && aEvent.detail.previousTab) {
           let previousTab = aEvent.detail.previousTab;
@@ -729,17 +729,17 @@ this.UITour = {
       case "SSWindowClosing": {
         let window = aEvent.target;
         this.teardownTourForWindow(window);
         break;
       }
     }
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     log.debug("observe: aTopic =", aTopic);
     switch (aTopic) {
       // The browser message manager is disconnected when the <browser> is
       // destroyed and we want to teardown at that point.
       case "message-manager-close": {
         let winEnum = Services.wm.getEnumerator("navigator:browser");
         while (winEnum.hasMoreElements()) {
           let window = winEnum.getNext();
@@ -764,17 +764,17 @@ this.UITour = {
       }
     }
   },
 
   // Given a string that is a JSONified represenation of an object with
   // additional utm_* URL params that should be appended, validate and append
   // them to the passed URLSearchParams object. Returns true if the params
   // were validated and appended, and false if the request should be ignored.
-  _populateCampaignParams: function(urlSearchParams, extraURLCampaignParams) {
+  _populateCampaignParams(urlSearchParams, extraURLCampaignParams) {
     // We are extra paranoid about what params we allow to be appended.
     if (typeof extraURLCampaignParams == "undefined") {
       // no params, so it's all good.
       return true;
     }
     if (typeof extraURLCampaignParams != "string") {
       log.warn("_populateCampaignParams: extraURLCampaignParams is not a string");
       return false;
@@ -806,41 +806,41 @@ this.UITour = {
           return false;
         }
         urlSearchParams.append(name, value);
       }
     }
     return true;
   },
 
-  setTelemetryBucket: function(aPageID) {
+  setTelemetryBucket(aPageID) {
     let bucket = BUCKET_NAME + BrowserUITelemetry.BUCKET_SEPARATOR + aPageID;
     BrowserUITelemetry.setBucket(bucket);
   },
 
-  setExpiringTelemetryBucket: function(aPageID, aType) {
+  setExpiringTelemetryBucket(aPageID, aType) {
     let bucket = BUCKET_NAME + BrowserUITelemetry.BUCKET_SEPARATOR + aPageID +
                  BrowserUITelemetry.BUCKET_SEPARATOR + aType;
 
     BrowserUITelemetry.setExpiringBucket(bucket,
                                          BUCKET_TIMESTEPS);
   },
 
   // This is registered with UITelemetry by BrowserUITelemetry, so that UITour
   // can remain lazy-loaded on-demand.
-  getTelemetry: function() {
+  getTelemetry() {
     return {
       seenPageIDs: [...this.seenPageIDs.keys()],
     };
   },
 
   /**
    * Tear down a tour from a tab e.g. upon switching/closing tabs.
    */
-  teardownTourForBrowser: function(aWindow, aBrowser, aTourPageClosing = false) {
+  teardownTourForBrowser(aWindow, aBrowser, aTourPageClosing = false) {
     log.debug("teardownTourForBrowser: aBrowser = ", aBrowser, aTourPageClosing);
 
     if (this.pageIDSourceBrowsers.has(aBrowser)) {
       let pageID = this.pageIDSourceBrowsers.get(aBrowser);
       this.setExpiringTelemetryBucket(pageID, aTourPageClosing ? "closed" : "inactive");
     }
 
     let openTourBrowsers = this.tourBrowsersByWindow.get(aWindow);
@@ -868,17 +868,17 @@ this.UITour = {
     if (!openTourBrowsers || openTourBrowsers.size == 0) {
       this.teardownTourForWindow(aWindow);
     }
   },
 
   /**
    * Tear down all tours for a ChromeWindow.
    */
-  teardownTourForWindow: function(aWindow) {
+  teardownTourForWindow(aWindow) {
     log.debug("teardownTourForWindow");
     aWindow.gBrowser.tabContainer.removeEventListener("TabSelect", this);
     aWindow.removeEventListener("SSWindowClosing", this);
 
     let openTourBrowsers = this.tourBrowsersByWindow.get(aWindow);
     if (openTourBrowsers) {
       for (let browser of openTourBrowsers) {
         if (this.pageIDSourceBrowsers.has(browser)) {
@@ -887,56 +887,56 @@ this.UITour = {
         }
       }
     }
 
     this.tourBrowsersByWindow.delete(aWindow);
   },
 
   // This function is copied to UITourListener.
-  isSafeScheme: function(aURI) {
+  isSafeScheme(aURI) {
     let allowedSchemes = new Set(["https", "about"]);
     if (!Services.prefs.getBoolPref("browser.uitour.requireSecure"))
       allowedSchemes.add("http");
 
     if (!allowedSchemes.has(aURI.scheme)) {
       log.error("Unsafe scheme:", aURI.scheme);
       return false;
     }
 
     return true;
   },
 
-  resolveURL: function(aBrowser, aURL) {
+  resolveURL(aBrowser, aURL) {
     try {
       let uri = Services.io.newURI(aURL, null, aBrowser.currentURI);
 
       if (!this.isSafeScheme(uri))
         return null;
 
       return uri.spec;
     } catch (e) {}
 
     return null;
   },
 
-  sendPageCallback: function(aMessageManager, aCallbackID, aData = {}) {
+  sendPageCallback(aMessageManager, aCallbackID, aData = {}) {
     let detail = {data: aData, callbackID: aCallbackID};
     log.debug("sendPageCallback", detail);
     aMessageManager.sendAsyncMessage("UITour:SendPageCallback", detail);
   },
 
-  isElementVisible: function(aElement) {
+  isElementVisible(aElement) {
     let targetStyle = aElement.ownerGlobal.getComputedStyle(aElement);
     return !aElement.ownerDocument.hidden &&
              targetStyle.display != "none" &&
              targetStyle.visibility == "visible";
   },
 
-  getTarget: function(aWindow, aTargetName, aSticky = false) {
+  getTarget(aWindow, aTargetName, aSticky = false) {
     log.debug("getTarget:", aTargetName);
     let deferred = Promise.defer();
     if (typeof aTargetName != "string" || !aTargetName) {
       log.warn("getTarget: Invalid target name specified");
       deferred.reject("Invalid target name specified");
       return deferred.promise;
     }
 
@@ -961,27 +961,27 @@ this.UITour = {
         node = aWindow.document.querySelector(targetQuery);
       }
 
       deferred.resolve({
         addTargetListener: targetObject.addTargetListener,
         infoPanelOffsetX: targetObject.infoPanelOffsetX,
         infoPanelOffsetY: targetObject.infoPanelOffsetY,
         infoPanelPosition: targetObject.infoPanelPosition,
-        node: node,
+        node,
         removeTargetListener: targetObject.removeTargetListener,
         targetName: aTargetName,
         widgetName: targetObject.widgetName,
         allowAdd: targetObject.allowAdd,
       });
     }).catch(log.error);
     return deferred.promise;
   },
 
-  targetIsInAppMenu: function(aTarget) {
+  targetIsInAppMenu(aTarget) {
     let placement = CustomizableUI.getPlacementOfWidget(aTarget.widgetName || aTarget.node.id);
     if (placement && placement.area == CustomizableUI.AREA_PANEL) {
       return true;
     }
 
     let targetElement = aTarget.node;
     // Use the widget for filtering if it exists since the target may be the icon inside.
     if (aTarget.widgetName) {
@@ -992,17 +992,17 @@ this.UITour = {
     return targetElement.id.startsWith("PanelUI-")
              && targetElement.id != "PanelUI-button";
   },
 
   /**
    * Called before opening or after closing a highlight or info panel to see if
    * we need to open or close the appMenu to see the annotation's anchor.
    */
-  _setAppMenuStateForAnnotation: function(aWindow, aAnnotationType, aShouldOpenForHighlight, aCallback = null) {
+  _setAppMenuStateForAnnotation(aWindow, aAnnotationType, aShouldOpenForHighlight, aCallback = null) {
     log.debug("_setAppMenuStateForAnnotation:", aAnnotationType);
     log.debug("_setAppMenuStateForAnnotation: Menu is expected to be:", aShouldOpenForHighlight ? "open" : "closed");
 
     // If the panel is in the desired state, we're done.
     let panelIsOpen = aWindow.PanelUI.panel.state != "closed";
     if (aShouldOpenForHighlight == panelIsOpen) {
       log.debug("_setAppMenuStateForAnnotation: Panel already in expected state");
       if (aCallback)
@@ -1032,24 +1032,24 @@ this.UITour = {
       log.debug("_setAppMenuStateForAnnotation: Closing the menu");
       this.hideMenu(aWindow, "appMenu");
       if (aCallback)
         aCallback();
     }
 
   },
 
-  previewTheme: function(aTheme) {
+  previewTheme(aTheme) {
     let origin = Services.prefs.getCharPref("browser.uitour.themeOrigin");
     let data = LightweightThemeManager.parseTheme(aTheme, origin);
     if (data)
       LightweightThemeManager.previewTheme(data);
   },
 
-  resetTheme: function() {
+  resetTheme() {
     LightweightThemeManager.resetPreview();
   },
 
   /**
    * Show the Heartbeat UI to request user feedback. This function reports back to the
    * caller using |notify|. The notification event name reflects the current status the UI
    * is in (either "Heartbeat:NotificationOffered", "Heartbeat:NotificationClosed",
    * "Heartbeat:LearnMore", "Heartbeat:Engaged", "Heartbeat:Voted",
@@ -1382,17 +1382,17 @@ this.UITour = {
   /**
    * The node to which a highlight or notification(-popup) is anchored is sometimes
    * obscured because it may be inside an overflow menu. This function should figure
    * that out and offer the overflow chevron as an alternative.
    *
    * @param {Node} aAnchor The element that's supposed to be the anchor
    * @type {Node}
    */
-  _correctAnchor: function(aAnchor) {
+  _correctAnchor(aAnchor) {
     // If the target is in the overflow panel, just return the overflow button.
     if (aAnchor.getAttribute("overflowedItem")) {
       let doc = aAnchor.ownerDocument;
       let placement = CustomizableUI.getPlacementOfWidget(aAnchor.id);
       let areaNode = doc.getElementById(placement.area);
       return areaNode.overflowable._chevron;
     }
 
@@ -1402,17 +1402,17 @@ this.UITour = {
   /**
    * @param aChromeWindow The chrome window that the highlight is in. Necessary since some targets
    *                      are in a sub-frame so the defaultView is not the same as the chrome
    *                      window.
    * @param aTarget    The element to highlight.
    * @param aEffect    (optional) The effect to use from UITour.highlightEffects or "none".
    * @see UITour.highlightEffects
    */
-  showHighlight: function(aChromeWindow, aTarget, aEffect = "none") {
+  showHighlight(aChromeWindow, aTarget, aEffect = "none") {
     function showHighlightPanel() {
       let highlighter = aChromeWindow.document.getElementById("UITourHighlight");
 
       let effect = aEffect;
       if (effect == "random") {
         // Exclude "random" from the randomly selected effects.
         let randomEffect = 1 + Math.floor(Math.random() * (this.highlightEffects.length - 1));
         if (randomEffect == this.highlightEffects.length)
@@ -1473,17 +1473,17 @@ this.UITour = {
       return;
     }
 
     this._setAppMenuStateForAnnotation(aChromeWindow, "highlight",
                                        this.targetIsInAppMenu(aTarget),
                                        showHighlightPanel.bind(this));
   },
 
-  hideHighlight: function(aWindow) {
+  hideHighlight(aWindow) {
     let highlighter = aWindow.document.getElementById("UITourHighlight");
     this._removeAnnotationPanelMutationObserver(highlighter.parentElement);
     highlighter.parentElement.hidePopup();
     highlighter.removeAttribute("active");
 
     this._setAppMenuStateForAnnotation(aWindow, "highlight", false);
   },
 
@@ -1612,30 +1612,30 @@ this.UITour = {
   },
 
   isInfoOnTarget(aChromeWindow, aTargetName) {
     let document = aChromeWindow.document;
     let tooltip = document.getElementById("UITourTooltip");
     return tooltip.getAttribute("targetName") == aTargetName && tooltip.state != "closed";
   },
 
-  hideInfo: function(aWindow) {
+  hideInfo(aWindow) {
     let document = aWindow.document;
 
     let tooltip = document.getElementById("UITourTooltip");
     this._removeAnnotationPanelMutationObserver(tooltip);
     tooltip.hidePopup();
     this._setAppMenuStateForAnnotation(aWindow, "info", false);
 
     let tooltipButtons = document.getElementById("UITourTooltipButtons");
     while (tooltipButtons.firstChild)
       tooltipButtons.firstChild.remove();
   },
 
-  showMenu: function(aWindow, aMenuName, aOpenCallback = null) {
+  showMenu(aWindow, aMenuName, aOpenCallback = null) {
     log.debug("showMenu:", aMenuName);
     function openMenuButton(aMenuBtn) {
       if (!aMenuBtn || !aMenuBtn.boxObject || aMenuBtn.open) {
         if (aOpenCallback)
           aOpenCallback();
         return;
       }
       if (aOpenCallback)
@@ -1726,17 +1726,17 @@ this.UITour = {
         let widgetWrapper = widgetGroupWrapper.forWindow(aWindow);
         aWindow.PanelUI.showSubView(widgetGroupWrapper.viewId,
                                     widgetWrapper.anchor,
                                     placement.area);
       })).catch(log.error);
     }
   },
 
-  hideMenu: function(aWindow, aMenuName) {
+  hideMenu(aWindow, aMenuName) {
     log.debug("hideMenu:", aMenuName);
     function closeMenuButton(aMenuBtn) {
       if (aMenuBtn && aMenuBtn.boxObject)
         aMenuBtn.boxObject.openMenu(false);
     }
 
     if (aMenuName == "appMenu") {
       aWindow.PanelUI.hide();
@@ -1744,21 +1744,21 @@ this.UITour = {
       let menuBtn = aWindow.document.getElementById("bookmarks-menu-button");
       closeMenuButton(menuBtn);
     } else if (aMenuName == "controlCenter") {
       let panel = aWindow.gIdentityHandler._identityPopup;
       panel.hidePopup();
     }
   },
 
-  showNewTab: function(aWindow, aBrowser) {
+  showNewTab(aWindow, aBrowser) {
     aWindow.openLinkIn("about:newtab", "current", {targetBrowser: aBrowser});
   },
 
-  hideAnnotationsForPanel: function(aEvent, aTargetPositionCallback) {
+  hideAnnotationsForPanel(aEvent, aTargetPositionCallback) {
     let win = aEvent.target.ownerGlobal;
     let annotationElements = new Map([
       // [annotationElement (panel), method to hide the annotation]
       [win.document.getElementById("UITourHighlightContainer"), UITour.hideHighlight.bind(UITour)],
       [win.document.getElementById("UITourTooltip"), UITour.hideInfo.bind(UITour)],
     ]);
     annotationElements.forEach((hideMethod, annotationElement) => {
       if (annotationElement.state != "closed") {
@@ -1773,47 +1773,47 @@ this.UITour = {
           }
           hideMethod(win);
         }).catch(log.error);
       }
     });
     UITour.appMenuOpenForAnnotation.clear();
   },
 
-  hideAppMenuAnnotations: function(aEvent) {
+  hideAppMenuAnnotations(aEvent) {
     UITour.hideAnnotationsForPanel(aEvent, UITour.targetIsInAppMenu);
   },
 
   hideControlCenterAnnotations(aEvent) {
     UITour.hideAnnotationsForPanel(aEvent, (aTarget) => {
       return aTarget.targetName.startsWith("controlCenter-");
     });
   },
 
-  onPanelHidden: function(aEvent) {
+  onPanelHidden(aEvent) {
     aEvent.target.removeAttribute("noautohide");
     UITour.recreatePopup(aEvent.target);
     UITour.clearAvailableTargetsCache();
   },
 
-  recreatePopup: function(aPanel) {
+  recreatePopup(aPanel) {
     // After changing popup attributes that relate to how the native widget is created
     // (e.g. @noautohide) we need to re-create the frame/widget for it to take effect.
     if (aPanel.hidden) {
       // If the panel is already hidden, we don't need to recreate it but flush
       // in case someone just hid it.
       aPanel.clientWidth; // flush
       return;
     }
     aPanel.hidden = true;
     aPanel.clientWidth; // flush
     aPanel.hidden = false;
   },
 
-  getConfiguration: function(aMessageManager, aWindow, aConfiguration, aCallbackID) {
+  getConfiguration(aMessageManager, aWindow, aConfiguration, aCallbackID) {
     switch (aConfiguration) {
       case "appinfo":
         let props = ["defaultUpdateChannel", "version"];
         let appinfo = {};
         props.forEach(property => appinfo[property] = Services.appinfo[property]);
 
         // Identifier of the partner repack, as stored in preference "distribution.id"
         // and included in Firefox and other update pings. Note this is not the same as
@@ -1883,17 +1883,17 @@ this.UITour = {
         this.sendPageCallback(aMessageManager, aCallbackID, ResetProfile.resetSupported());
         break;
       default:
         log.error("getConfiguration: Unknown configuration requested: " + aConfiguration);
         break;
     }
   },
 
-  setConfiguration: function(aWindow, aConfiguration, aValue) {
+  setConfiguration(aWindow, aConfiguration, aValue) {
     switch (aConfiguration) {
       case "defaultBrowser":
         // Ignore aValue in this case because the default browser can only
         // be set, not unset.
         try {
           let shell = aWindow.getShellService();
           if (shell) {
             shell.setDefaultBrowser(true, false);
@@ -1901,17 +1901,17 @@ this.UITour = {
         } catch (e) {}
         break;
       default:
         log.error("setConfiguration: Unknown configuration requested: " + aConfiguration);
         break;
     }
   },
 
-  getAvailableTargets: function(aMessageManager, aChromeWindow, aCallbackID) {
+  getAvailableTargets(aMessageManager, aChromeWindow, aCallbackID) {
     Task.spawn(function*() {
       let window = aChromeWindow;
       let data = this.availableTargetsCache.get(window);
       if (data) {
         log.debug("getAvailableTargets: Using cached targets list", data.targets.join(","));
         this.sendPageCallback(aMessageManager, aCallbackID, data);
         return;
       }
@@ -1936,31 +1936,31 @@ this.UITour = {
     }.bind(this)).catch(err => {
       log.error(err);
       this.sendPageCallback(aMessageManager, aCallbackID, {
         targets: [],
       });
     });
   },
 
-  startSubTour: function(aFeature) {
+  startSubTour(aFeature) {
     if (aFeature != "string") {
       log.error("startSubTour: No feature option specified");
       return;
     }
 
     if (aFeature == "readinglist") {
       ReaderParent.showReaderModeInfoPanel(browser);
     } else {
       log.error("startSubTour: Unknown feature option specified");
       return;
     }
   },
 
-  addNavBarWidget: function(aTarget, aMessageManager, aCallbackID) {
+  addNavBarWidget(aTarget, aMessageManager, aCallbackID) {
     if (aTarget.node) {
       log.error("addNavBarWidget: can't add a widget already present:", aTarget);
       return;
     }
     if (!aTarget.allowAdd) {
       log.error("addNavBarWidget: not allowed to add this widget:", aTarget);
       return;
     }
@@ -1968,49 +1968,49 @@ this.UITour = {
       log.error("addNavBarWidget: can't add a widget without a widgetName property:", aTarget);
       return;
     }
 
     CustomizableUI.addWidgetToArea(aTarget.widgetName, CustomizableUI.AREA_NAVBAR);
     this.sendPageCallback(aMessageManager, aCallbackID);
   },
 
-  _addAnnotationPanelMutationObserver: function(aPanelEl) {
+  _addAnnotationPanelMutationObserver(aPanelEl) {
     if (AppConstants.platform == "linux") {
       let observer = this._annotationPanelMutationObservers.get(aPanelEl);
       if (observer) {
         return;
       }
       let win = aPanelEl.ownerGlobal;
       observer = new win.MutationObserver(this._annotationMutationCallback);
       this._annotationPanelMutationObservers.set(aPanelEl, observer);
       let observerOptions = {
         attributeFilter: ["height", "width"],
         attributes: true,
       };
       observer.observe(aPanelEl, observerOptions);
     }
   },
 
-  _removeAnnotationPanelMutationObserver: function(aPanelEl) {
+  _removeAnnotationPanelMutationObserver(aPanelEl) {
     if (AppConstants.platform == "linux") {
       let observer = this._annotationPanelMutationObservers.get(aPanelEl);
       if (observer) {
         observer.disconnect();
         this._annotationPanelMutationObservers.delete(aPanelEl);
       }
     }
   },
 
 /**
  * Workaround for Ubuntu panel craziness in bug 970788 where incorrect sizes get passed to
  * nsXULPopupManager::PopupResized and lead to incorrect width and height attributes getting
  * set on the panel.
  */
-  _annotationMutationCallback: function(aMutations) {
+  _annotationMutationCallback(aMutations) {
     for (let mutation of aMutations) {
       // Remove both attributes at once and ignore remaining mutations to be proccessed.
       mutation.target.removeAttribute("width");
       mutation.target.removeAttribute("height");
       return;
     }
   },
 
@@ -2050,17 +2050,17 @@ this.UITour = {
       for (let browser of openTourBrowsers) {
         let messageManager = browser.messageManager;
         if (!messageManager) {
           log.error("notify: Trying to notify a browser without a messageManager", browser);
           continue;
         }
         let detail = {
           event: eventName,
-          params: params,
+          params,
         };
         messageManager.sendAsyncMessage("UITour:SendPageNotification", detail);
       }
     }
   },
 };
 
 function controlCenterTrackingToggleTarget(aUnblock) {
@@ -2091,17 +2091,17 @@ this.UITour.init();
 
 /**
  * UITour Health Report
  */
 /**
  * Public API to be called by the UITour code
  */
 const UITourHealthReport = {
-  recordTreatmentTag: function(tag, value) {
+  recordTreatmentTag(tag, value) {
     return TelemetryController.submitExternalPing("uitour-tag",
       {
         version: 1,
         tagName: tag,
         tagValue: value,
       },
       {
         addClientId: true,
--- a/browser/components/uitour/content-UITour.js
+++ b/browser/components/uitour/content-UITour.js
@@ -3,33 +3,33 @@
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 const PREF_TEST_WHITELIST = "browser.uitour.testingOrigins";
 const UITOUR_PERMISSION   = "uitour";
 
 var UITourListener = {
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (!Services.prefs.getBoolPref("browser.uitour.enabled")) {
       return;
     }
     if (!this.ensureTrustedOrigin()) {
       return;
     }
     addMessageListener("UITour:SendPageCallback", this);
     addMessageListener("UITour:SendPageNotification", this);
     sendAsyncMessage("UITour:onPageEvent", {
       detail: event.detail,
       type: event.type,
       pageVisibilityState: content.document.visibilityState,
     });
   },
 
-  isTestingOrigin: function(aURI) {
+  isTestingOrigin(aURI) {
     if (Services.prefs.getPrefType(PREF_TEST_WHITELIST) != Services.prefs.PREF_STRING) {
       return false;
     }
 
     // Add any testing origins (comma-seperated) to the whitelist for the session.
     for (let origin of Services.prefs.getCharPref(PREF_TEST_WHITELIST).split(",")) {
       try {
         let testingURI = Services.io.newURI(origin, null, null);
@@ -39,28 +39,28 @@ var UITourListener = {
       } catch (ex) {
         Cu.reportError(ex);
       }
     }
     return false;
   },
 
   // This function is copied from UITour.jsm.
-  isSafeScheme: function(aURI) {
+  isSafeScheme(aURI) {
     let allowedSchemes = new Set(["https", "about"]);
     if (!Services.prefs.getBoolPref("browser.uitour.requireSecure"))
       allowedSchemes.add("http");
 
     if (!allowedSchemes.has(aURI.scheme))
       return false;
 
     return true;
   },
 
-  ensureTrustedOrigin: function() {
+  ensureTrustedOrigin() {
     if (content.top != content)
       return false;
 
     let uri = content.document.documentURIObject;
 
     if (uri.schemeIs("chrome"))
       return true;
 
@@ -69,28 +69,28 @@ var UITourListener = {
 
     let permission = Services.perms.testPermission(uri, UITOUR_PERMISSION);
     if (permission == Services.perms.ALLOW_ACTION)
       return true;
 
     return this.isTestingOrigin(uri);
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     switch (aMessage.name) {
       case "UITour:SendPageCallback":
         this.sendPageEvent("Response", aMessage.data);
         break;
       case "UITour:SendPageNotification":
         this.sendPageEvent("Notification", aMessage.data);
         break;
       }
   },
 
-  sendPageEvent: function(type, detail) {
+  sendPageEvent(type, detail) {
     if (!this.ensureTrustedOrigin()) {
       return;
     }
 
     let doc = content.document;
     let eventName = "mozUITour" + type;
     let event = new doc.defaultView.CustomEvent(eventName, {
       bubbles: true,
--- a/browser/components/uitour/test/browser_UITour_defaultBrowser.js
+++ b/browser/components/uitour/test/browser_UITour_defaultBrowser.js
@@ -7,33 +7,33 @@ var setDefaultBrowserCalled = false;
 
 Cc["@mozilla.org/moz/jssubscript-loader;1"]
   .getService(Ci.mozIJSSubScriptLoader)
   .loadSubScript("chrome://mochikit/content/tests/SimpleTest/MockObjects.js", this);
 
 function MockShellService() {}
 MockShellService.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIShellService]),
-  isDefaultBrowser: function(aStartupCheck, aForAllTypes) { return false; },
-  setDefaultBrowser: function(aClaimAllTypes, aForAllUsers) {
+  isDefaultBrowser(aStartupCheck, aForAllTypes) { return false; },
+  setDefaultBrowser(aClaimAllTypes, aForAllUsers) {
     setDefaultBrowserCalled = true;
   },
   shouldCheckDefaultBrowser: false,
   canSetDesktopBackground: false,
   BACKGROUND_TILE      : 1,
   BACKGROUND_STRETCH   : 2,
   BACKGROUND_CENTER    : 3,
   BACKGROUND_FILL      : 4,
   BACKGROUND_FIT       : 5,
-  setDesktopBackground: function(aElement, aPosition) {},
+  setDesktopBackground(aElement, aPosition) {},
   APPLICATION_MAIL : 0,
   APPLICATION_NEWS : 1,
-  openApplication: function(aApplication) {},
+  openApplication(aApplication) {},
   desktopBackgroundColor: 0,
-  openApplicationWithURI: function(aApplication, aURI) {},
+  openApplicationWithURI(aApplication, aURI) {},
   defaultFeedReader: 0,
 };
 
 var mockShellService = new MockObjectRegisterer("@mozilla.org/browser/shell-service;1",
                                                 MockShellService);
 
 // Temporarily disabled, see note at test_setDefaultBrowser.
 // mockShellService.register();
--- a/browser/components/uitour/test/browser_UITour_heartbeat.js
+++ b/browser/components/uitour/test/browser_UITour_heartbeat.js
@@ -216,17 +216,17 @@ add_UITour_task(function* test_heartbeat
   gContentAPI.observe(() => {});
 
   let receivedExpectedPromise = promiseWaitExpectedNotifications(
     ["Heartbeat:NotificationOffered", "Heartbeat:NotificationClosed", "Heartbeat:TelemetrySent"]);
 
   // Show the Heartbeat notification and wait for it to be displayed.
   let shownPromise = promiseWaitHeartbeatNotification("Heartbeat:NotificationOffered");
   gContentAPI.showHeartbeat("How would you rate Firefox?", "Thank you!", flowId, engagementURL, null, null, {
-    iconURL: iconURL
+    iconURL
   });
 
   // Validate the returned timestamp.
   let data = yield shownPromise;
   validateTimestamp('Heartbeat:Offered', data.timestamp);
 
   // Check the icon URL
   let notification = getHeartbeatNotification(flowId);
--- a/browser/components/uitour/test/browser_UITour_modalDialog.js
+++ b/browser/components/uitour/test/browser_UITour_modalDialog.js
@@ -17,26 +17,26 @@ function startCallbackTimer() {
 
     // Use a timer to invoke a callback to twiddle the authentication dialog
     timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     timer.init(observer, dialogDelay, Ci.nsITimer.TYPE_ONE_SHOT);
 }
 
 
 var observer = SpecialPowers.wrapCallbackObject({
-    QueryInterface : function(iid) {
+    QueryInterface(iid) {
         const interfaces = [Ci.nsIObserver,
                             Ci.nsISupports, Ci.nsISupportsWeakReference];
 
         if (!interfaces.some( function(v) { return iid.equals(v) } ))
             throw SpecialPowers.Components.results.NS_ERROR_NO_INTERFACE;
         return this;
     },
 
-    observe : function(subject, topic, data) {
+    observe(subject, topic, data) {
         var doc = getDialogDoc();
         if (doc)
             handleDialog(doc);
         else
             startCallbackTimer(); // try again in a bit
     }
 });
 
--- a/browser/components/uitour/test/browser_no_tabs.js
+++ b/browser/components/uitour/test/browser_no_tabs.js
@@ -21,17 +21,17 @@ function createHiddenBrowser(aURL) {
     frame.get().then(aFrame => {
       let doc = aFrame.document;
       let browser = doc.createElementNS(XUL_NS, "browser");
       browser.setAttribute("type", "content");
       browser.setAttribute("disableglobalhistory", "true");
       browser.setAttribute("src", aURL);
 
       doc.documentElement.appendChild(browser);
-      resolve({frame: frame, browser: browser});
+      resolve({frame, browser});
     }));
 }
 
 /**
  * Remove the browser and the HiddenFrame.
  *
  * @param aFrame
  *        The HiddenFrame to dismiss.
--- a/browser/experiments/Experiments.jsm
+++ b/browser/experiments/Experiments.jsm
@@ -206,17 +206,17 @@ function uninstallAddons(addons) {
 /**
  * The experiments module.
  */
 
 var Experiments = {
   /**
    * Provides access to the global `Experiments.Experiments` instance.
    */
-  instance: function() {
+  instance() {
     if (!gExperiments) {
       gExperiments = new Experiments.Experiments();
     }
 
     return gExperiments;
   },
 };
 
@@ -231,58 +231,58 @@ Experiments.Policy = function() {
     "Policy #" + gPolicyCounter++ + "::");
 
   // Set to true to ignore hash verification on downloaded XPIs. This should
   // not be used outside of testing.
   this.ignoreHashes = false;
 };
 
 Experiments.Policy.prototype = {
-  now: function() {
+  now() {
     return new Date();
   },
 
-  random: function() {
+  random() {
     let pref = gPrefs.get(PREF_FORCE_SAMPLE);
     if (pref !== undefined) {
       let val = Number.parseFloat(pref);
       this._log.debug("random sample forced: " + val);
       if (isNaN(val) || val < 0) {
         return 0;
       }
       if (val > 1) {
         return 1;
       }
       return val;
     }
     return Math.random();
   },
 
-  futureDate: function(offset) {
+  futureDate(offset) {
     return new Date(this.now().getTime() + offset);
   },
 
-  oneshotTimer: function(callback, timeout, thisObj, name) {
+  oneshotTimer(callback, timeout, thisObj, name) {
     return CommonUtils.namedTimer(callback, timeout, thisObj, name);
   },
 
-  updatechannel: function() {
+  updatechannel() {
     return UpdateUtils.UpdateChannel;
   },
 
-  locale: function() {
+  locale() {
     let chrome = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci.nsIXULChromeRegistry);
     return chrome.getSelectedLocale("global");
   },
 
   /**
    * For testing a race condition, one of the tests delays the callback of
    * writing the cache by replacing this policy function.
    */
-  delayCacheWrite: function(promise) {
+  delayCacheWrite(promise) {
     return promise;
   },
 };
 
 function AlreadyShutdownError(message = "already shut down") {
   Error.call(this, message);
   let error = new Error();
   this.name = "AlreadyShutdownError";
@@ -368,17 +368,17 @@ Experiments.Experiments.prototype = {
   /**
    * `true` if the experiments manager is currently setup (has been fully initialized
    * and not uninitialized yet).
    */
   get isReady() {
     return !this._shutdown;
   },
 
-  init: function() {
+  init() {
     this._shutdown = false;
     configureLogging();
 
     gExperimentsEnabled = gPrefs.get(PREF_ENABLED, false) && TelemetryUtils.isTelemetryEnabled;
     this._log.trace("enabled=" + gExperimentsEnabled + ", " + this.enabled);
 
     gPrefs.observe(PREF_LOGGING, configureLogging);
     gPrefs.observe(PREF_MANIFEST_URI, this.updateManifest, this);
@@ -462,17 +462,17 @@ Experiments.Experiments.prototype = {
         }
       }
     }
 
     this._log.info("Completed uninitialization.");
   }),
 
   // Return state information, for debugging purposes.
-  _getState: function() {
+  _getState() {
     let activeExperiment = this._getActiveExperiment();
     let state = {
       isShutdown: this._shutdown,
       isEnabled: gExperimentsEnabled,
       isRefresh: this._refresh,
       isDirty: this._dirty,
       isFirstEvaluate: this._firstEvaluate,
       hasLoadTask: !!this._loadTask,
@@ -492,23 +492,23 @@ Experiments.Experiments.prototype = {
         };
       } else {
         state.latestError = "" + this._latestError;
       }
     }
     return state;
   },
 
-  _addToForensicsLog: function(what, string) {
+  _addToForensicsLog(what, string) {
     this._forensicsLogs.shift();
     let timeInSec = Math.floor(Services.telemetry.msSinceProcessStart() / 1000);
     this._forensicsLogs.push(`${timeInSec}: ${what} - ${string}`);
   },
 
-  _registerWithAddonManager: function(previousExperimentsProvider) {
+  _registerWithAddonManager(previousExperimentsProvider) {
     this._log.trace("Registering instance with Addon Manager.");
 
     AddonManager.addAddonListener(this);
     AddonManager.addInstallListener(this);
 
     if (!gAddonProvider) {
       // The properties of this AddonType should be kept in sync with the
       // experiment AddonType registered in XPIProvider.
@@ -521,17 +521,17 @@ Experiments.Experiments.prototype = {
                                             AddonManager.VIEW_TYPE_LIST,
                                             11000,
                                             AddonManager.TYPE_UI_HIDE_EMPTY),
       ]);
     }
 
   },
 
-  _unregisterWithAddonManager: function() {
+  _unregisterWithAddonManager() {
     this._log.trace("Unregistering instance with Addon Manager.");
 
     this._log.trace("Removing install listener from add-on manager.");
     AddonManager.removeInstallListener(this);
     this._log.trace("Removing addon listener from add-on manager.");
     AddonManager.removeAddonListener(this);
     this._log.trace("Finished unregistering with addon manager.");
 
@@ -541,25 +541,25 @@ Experiments.Experiments.prototype = {
       gAddonProvider = null;
     }
   },
 
   /*
    * Change the PreviousExperimentsProvider that this instance uses.
    * For testing only.
    */
-  _setPreviousExperimentsProvider: function(provider) {
+  _setPreviousExperimentsProvider(provider) {
     this._unregisterWithAddonManager();
     this._registerWithAddonManager(provider);
   },
 
   /**
    * Throws an exception if we've already shut down.
    */
-  _checkForShutdown: function() {
+  _checkForShutdown() {
     if (this._shutdown) {
       throw new AlreadyShutdownError("uninit() already called");
     }
   },
 
   /**
    * Whether the experiments feature is enabled.
    */
@@ -589,17 +589,17 @@ Experiments.Experiments.prototype = {
     } else {
       yield this.disableExperiment(TELEMETRY_LOG.TERMINATION.SERVICE_DISABLED);
       if (this._timer) {
         this._timer.clear();
       }
     }
   }),
 
-  _telemetryStatusChanged: function() {
+  _telemetryStatusChanged() {
     this._toggleExperimentsEnabled(gExperimentsEnabled);
   },
 
   /**
    * Returns a promise that is resolved with an array of `ExperimentInfo` objects,
    * which provide info on the currently and recently active experiments.
    * The array is in chronological order.
    *
@@ -611,29 +611,29 @@ Experiments.Experiments.prototype = {
    *   active: <boolean>,
    *   endDate: <integer>, // epoch ms
    *   detailURL: <string>,
    *   ... // possibly extended later
    * }
    *
    * @return Promise<Array<ExperimentInfo>> Array of experiment info objects.
    */
-  getExperiments: function() {
+  getExperiments() {
     return Task.spawn(function*() {
       yield this._loadTask;
       let list = [];
 
       for (let [id, experiment] of this._experiments) {
         if (!experiment.startDate) {
           // We only collect experiments that are or were active.
           continue;
         }
 
         list.push({
-          id: id,
+          id,
           name: experiment._name,
           description: experiment._description,
           active: experiment.enabled,
           endDate: experiment.endDate.getTime(),
           detailURL: experiment._homepageURL,
           branch: experiment.branch,
         });
       }
@@ -643,17 +643,17 @@ Experiments.Experiments.prototype = {
       return list;
     }.bind(this));
   },
 
   /**
    * Returns the ExperimentInfo for the active experiment, or null
    * if there is none.
    */
-  getActiveExperiment: function() {
+  getActiveExperiment() {
     let experiment = this._getActiveExperiment();
     if (!experiment) {
       return null;
     }
 
     let info = {
       id: experiment.id,
       name: experiment._name,
@@ -713,33 +713,33 @@ Experiments.Experiments.prototype = {
       }
     }
     return e.branch;
   }),
 
   /**
    * Determine whether another date has the same UTC day as now().
    */
-  _dateIsTodayUTC: function(d) {
+  _dateIsTodayUTC(d) {
     let now = this._policy.now();
 
     return stripDateToMidnight(now).getTime() == stripDateToMidnight(d).getTime();
   },
 
   /**
    * Obtain the entry of the most recent active experiment that was active
    * today.
    *
    * If no experiment was active today, this resolves to nothing.
    *
    * Assumption: Only a single experiment can be active at a time.
    *
    * @return Promise<object>
    */
-  lastActiveToday: function() {
+  lastActiveToday() {
     return Task.spawn(function* getMostRecentActiveExperimentTask() {
       let experiments = yield this.getExperiments();
 
       // Assumption: Ordered chronologically, descending, with active always
       // first.
       for (let experiment of experiments) {
         if (experiment.active) {
           return experiment;
@@ -748,17 +748,17 @@ Experiments.Experiments.prototype = {
         if (experiment.endDate && this._dateIsTodayUTC(experiment.endDate)) {
           return experiment;
         }
       }
       return null;
     }.bind(this));
   },
 
-  _run: function() {
+  _run() {
     this._log.trace("_run");
     this._checkForShutdown();
     if (!this._mainTask) {
       this._mainTask = Task.spawn(function*() {
         try {
           yield this._main();
         } catch (e) {
           // In the CacheWriteError case we want to reschedule
@@ -778,17 +778,17 @@ Experiments.Experiments.prototype = {
             throw ex;
           }
         }
       }.bind(this));
     }
     return this._mainTask;
   },
 
-  _main: function*() {
+  *_main() {
     do {
       this._log.trace("_main iteration");
       yield this._loadTask;
       if (!gExperimentsEnabled) {
         this._refresh = false;
       }
 
       if (this._refresh) {
@@ -799,17 +799,17 @@ Experiments.Experiments.prototype = {
         yield this._saveToCache();
       }
       // If somebody called .updateManifest() or disableExperiment()
       // while we were running, go again right now.
     }
     while (this._refresh || this._terminateReason || this._dirty);
   },
 
-  _loadManifest: function*() {
+  *_loadManifest() {
     this._log.trace("_loadManifest");
     let uri = Services.urlFormatter.formatURLPref(PREF_BRANCH + PREF_MANIFEST_URI);
 
     this._checkForShutdown();
 
     this._refresh = false;
     try {
       let responseText = yield this._httpGetRequest(uri);
@@ -828,57 +828,57 @@ Experiments.Experiments.prototype = {
 
   /**
    * Fetch an updated list of experiments and trigger experiment updates.
    * Do only use when experiments are enabled.
    *
    * @return Promise<>
    *         The promise is resolved when the manifest and experiment list is updated.
    */
-  updateManifest: function() {
+  updateManifest() {
     this._log.trace("updateManifest()");
 
     if (!gExperimentsEnabled) {
       return Promise.reject(new Error("experiments are disabled"));
     }
 
     if (this._shutdown) {
       return Promise.reject(Error("uninit() alrady called"));
     }
 
     this._refresh = true;
     return this._run();
   },
 
-  notify: function(timer) {
+  notify(timer) {
     this._log.trace("notify()");
     this._checkForShutdown();
     return this._run();
   },
 
   // START OF ADD-ON LISTENERS
 
-  onUninstalled: function(addon) {
+  onUninstalled(addon) {
     this._log.trace("onUninstalled() - addon id: " + addon.id);
     if (gActiveUninstallAddonIDs.has(addon.id)) {
       this._log.trace("matches pending uninstall");
       return;
     }
     let activeExperiment = this._getActiveExperiment();
     if (!activeExperiment || activeExperiment._addonId != addon.id) {
       return;
     }
 
     this.disableExperiment(TELEMETRY_LOG.TERMINATION.ADDON_UNINSTALLED);
   },
 
   /**
    * @returns {Boolean} returns false when we cancel the install.
    */
-  onInstallStarted: function(install) {
+  onInstallStarted(install) {
     if (install.addon.type != "experiment") {
       return true;
     }
 
     this._log.trace("onInstallStarted() - " + install.addon.id);
     if (install.addon.appDisabled) {
       // This is a PreviousExperiment
       return true;
@@ -912,31 +912,31 @@ Experiments.Experiments.prototype = {
 
     this._log.warn("onInstallStarted cancelling install of unknown " +
                    "experiment add-on: " + install.addon.id);
     return false;
   },
 
   // END OF ADD-ON LISTENERS.
 
-  _getExperimentByAddonId: function(addonId) {
+  _getExperimentByAddonId(addonId) {
     for (let [, entry] of this._experiments) {
       if (entry._addonId === addonId) {
         return entry;
       }
     }
 
     return null;
   },
 
   /*
    * Helper function to make HTTP GET requests. Returns a promise that is resolved with
    * the responseText when the request is complete.
    */
-  _httpGetRequest: function(url) {
+  _httpGetRequest(url) {
     this._log.trace("httpGetRequest(" + url + ")");
     let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest);
 
     this._networkRequest = xhr;
     let deferred = Promise.defer();
 
     let log = this._log;
     let errorhandler = (evt) => {
@@ -981,17 +981,17 @@ Experiments.Experiments.prototype = {
    */
   get _cacheFilePath() {
     return OS.Path.join(OS.Constants.Path.profileDir, FILE_CACHE);
   },
 
   /*
    * Part of the main task to save the cache to disk, called from _main.
    */
-  _saveToCache: function* () {
+  *_saveToCache() {
     this._log.trace("_saveToCache");
     let path = this._cacheFilePath;
     this._dirty = false;
     try {
       let textData = JSON.stringify({
         version: CACHE_VERSION,
         data: [...this._experiments.values()].map(e => e.toJSON()),
       });
@@ -1024,17 +1024,17 @@ Experiments.Experiments.prototype = {
         // No cached manifest yet.
         this._experiments = new Map();
       } else {
         throw e;
       }
     }
   }),
 
-  _populateFromCache: function(data) {
+  _populateFromCache(data) {
     this._log.trace("populateFromCache() - data: " + JSON.stringify(data));
 
     // If the user has a newer cache version than we can understand, we fail
     // hard; no experiments should be active in this older client.
     if (CACHE_VERSION !== data.version) {
       throw new Error("Experiments::_populateFromCache() - invalid cache version");
     }
 
@@ -1057,17 +1057,17 @@ Experiments.Experiments.prototype = {
 
     this._experiments = experiments;
   },
 
   /*
    * Update the experiment entries from the experiments
    * array in the manifest
    */
-  _updateExperiments: function(manifestObject) {
+  _updateExperiments(manifestObject) {
     this._log.trace("_updateExperiments() - experiments: " + JSON.stringify(manifestObject));
 
     if (manifestObject.version !== MANIFEST_VERSION) {
       this._log.warning("updateExperiments() - unsupported version " + manifestObject.version);
     }
 
     let experiments = new Map(); // The new experiments map
 
@@ -1108,39 +1108,39 @@ Experiments.Experiments.prototype = {
 
       experiments.set(id, entry);
     }
 
     this._experiments = experiments;
     this._dirty = true;
   },
 
-  getActiveExperimentID: function() {
+  getActiveExperimentID() {
     if (!this._experiments) {
       return null;
     }
     let e = this._getActiveExperiment();
     if (!e) {
       return null;
     }
     return e.id;
   },
 
-  getActiveExperimentBranch: function() {
+  getActiveExperimentBranch() {
     if (!this._experiments) {
       return null;
     }
     let e = this._getActiveExperiment();
     if (!e) {
       return null;
     }
     return e.branch;
   },
 
-  _getActiveExperiment: function() {
+  _getActiveExperiment() {
     let enabled = [...this._experiments.values()].filter(experiment => experiment._enabled);
 
     if (enabled.length == 1) {
       return enabled[0];
     }
 
     if (enabled.length > 1) {
       this._log.error("getActiveExperimentId() - should not have more than 1 active experiment");
@@ -1150,17 +1150,17 @@ Experiments.Experiments.prototype = {
     return null;
   },
 
   /**
    * Disables all active experiments.
    *
    * @return Promise<> Promise that will get resolved once the task is done or failed.
    */
-  disableExperiment: function(reason) {
+  disableExperiment(reason) {
     if (!reason) {
       throw new Error("Must specify a termination reason.");
     }
 
     this._log.trace("disableExperiment()");
     this._terminateReason = reason;
     return this._run();
   },
@@ -1175,17 +1175,17 @@ Experiments.Experiments.prototype = {
 
     return new Set([...this._experiments.values()].map(e => e._addonId));
   },
 
   /*
    * Task function to check applicability of experiments, disable the active
    * experiment if needed and activate the first applicable candidate.
    */
-  _evaluateExperiments: function*() {
+  *_evaluateExperiments() {
     this._log.trace("_evaluateExperiments");
 
     this._checkForShutdown();
 
     // The first thing we do is reconcile our state against what's in the
     // Addon Manager. It's possible that the Addon Manager knows of experiment
     // add-ons that we don't. This could happen if an experiment gets installed
     // when we're not listening or if there is a bug in our synchronization
@@ -1312,17 +1312,17 @@ Experiments.Experiments.prototype = {
         // It's ok if crash reporting is disabled.
       }
     }
   },
 
   /*
    * Schedule the soonest re-check of experiment applicability that is needed.
    */
-  _scheduleNextRun: function() {
+  _scheduleNextRun() {
     this._checkForShutdown();
 
     if (this._timer) {
       this._timer.clear();
     }
 
     if (!gExperimentsEnabled || this._experiments.length == 0) {
       return;
@@ -1457,17 +1457,17 @@ Experiments.ExperimentEntry.prototype = 
   ADDON_CHANGE_UNINSTALL: 2,
   ADDON_CHANGE_ENABLE: 4,
 
   /*
    * Initialize entry from the manifest.
    * @param data The experiment data from the manifest.
    * @return boolean Whether initialization succeeded.
    */
-  initFromManifestData: function(data) {
+  initFromManifestData(data) {
     if (!this._isManifestDataValid(data)) {
       return false;
     }
 
     this._manifestData = data;
 
     this._randomValue = this._policy.random();
     this._lastChangedDate = this._policy.now();
@@ -1517,17 +1517,17 @@ Experiments.ExperimentEntry.prototype = 
     return this._needsUpdate;
   },
 
   /*
    * Initialize entry from the cache.
    * @param data The entry data from the cache.
    * @return boolean Whether initialization succeeded.
    */
-  initFromCacheData: function(data) {
+  initFromCacheData(data) {
     for (let [key, dval] of this.UPGRADE_KEYS) {
       if (!(key in data)) {
         data[key] = dval;
       }
     }
 
     for (let key of this.SERIALIZE_KEYS) {
       if (!(key in data) && !this.DATE_KEYS.has(key)) {
@@ -1562,17 +1562,17 @@ Experiments.ExperimentEntry.prototype = 
     this._lastChangedDate = this._endDate ? this._endDate : this._policy.now();
 
     return true;
   },
 
   /*
    * Returns a JSON representation of this object.
    */
-  toJSON: function() {
+  toJSON() {
     let obj = {};
 
     // Dates are serialized separately as epoch ms.
 
     this.SERIALIZE_KEYS.forEach(key => {
       if (!this.DATE_KEYS.has(key)) {
         obj[key] = this[key];
       }
@@ -1587,17 +1587,17 @@ Experiments.ExperimentEntry.prototype = 
     return obj;
   },
 
   /*
    * Update from the experiment data from the manifest.
    * @param data The experiment data from the manifest.
    * @return boolean Whether updating succeeded.
    */
-  updateFromManifestData: function(data) {
+  updateFromManifestData(data) {
     let old = this._manifestData;
 
     if (!this._isManifestDataValid(data)) {
       return false;
     }
 
     if (this._enabled) {
       if (old.xpiHash !== data.xpiHash) {
@@ -1619,17 +1619,17 @@ Experiments.ExperimentEntry.prototype = 
   },
 
   /*
    * Is this experiment applicable?
    * @return Promise<> Resolved if the experiment is applicable.
    *                   If it is not applicable it is rejected with
    *                   a Promise<string> which contains the reason.
    */
-  isApplicable: function() {
+  isApplicable() {
     let versionCmp = Cc["@mozilla.org/xpcom/version-comparator;1"]
                               .getService(Ci.nsIVersionComparator);
     let app = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
     let runtime = Cc["@mozilla.org/xre/app-info;1"]
                     .getService(Ci.nsIXULRuntime);
 
     let locale = this._policy.locale();
     let channel = this._policy.updatechannel();
@@ -2010,32 +2010,32 @@ Experiments.ExperimentEntry.prototype = 
     return changes;
    }),
 
   /**
    * Obtain the underlying Addon from the Addon Manager.
    *
    * @return Promise<Addon|null>
    */
-  _getAddon: function() {
+  _getAddon() {
     if (!this._addonId) {
       return Promise.resolve(null);
     }
 
     return AddonManager.getAddonByID(this._addonId).then(addon => {
       if (addon && addon.appDisabled) {
         // Don't return PreviousExperiments.
         return null;
       }
 
       return addon;
     });
   },
 
-  _logTermination: function(terminationKind, terminationReason) {
+  _logTermination(terminationKind, terminationReason) {
     if (terminationKind === undefined) {
       return;
     }
 
     if (!(terminationKind in TELEMETRY_LOG.TERMINATION)) {
       this._log.warn("stop() - unknown terminationKind " + terminationKind);
       return;
     }
@@ -2046,61 +2046,61 @@ Experiments.ExperimentEntry.prototype = 
     }
 
     TelemetryLog.log(TELEMETRY_LOG.TERMINATION_KEY, data);
   },
 
   /**
    * Determine whether an active experiment should be stopped.
    */
-  shouldStop: function() {
+  shouldStop() {
     if (!this._enabled) {
       throw new Error("shouldStop must not be called on disabled experiments.");
     }
 
     let deferred = Promise.defer();
     this.isApplicable().then(
       () => deferred.resolve({shouldStop: false}),
-      reason => deferred.resolve({shouldStop: true, reason: reason})
+      reason => deferred.resolve({shouldStop: true, reason})
     );
 
     return deferred.promise;
   },
 
   /*
    * Should this be discarded from the cache due to age?
    */
-  shouldDiscard: function() {
+  shouldDiscard() {
     let limit = this._policy.now();
     limit.setDate(limit.getDate() - KEEP_HISTORY_N_DAYS);
     return (this._lastChangedDate < limit);
   },
 
   /*
    * Get next date (in epoch-ms) to schedule a re-evaluation for this.
    * Returns 0 if it doesn't need one.
    */
-  getScheduleTime: function() {
+  getScheduleTime() {
     if (this._enabled) {
       let startTime = this._startDate.getTime();
       let maxActiveTime = startTime + 1000 * this._manifestData.maxActiveSeconds;
       return Math.min(1000 * this._manifestData.endTime,  maxActiveTime);
     }
 
     if (this._endDate) {
       return this._endDate.getTime();
     }
 
     return 1000 * this._manifestData.startTime;
   },
 
   /*
    * Perform sanity checks on the experiment data.
    */
-  _isManifestDataValid: function(data) {
+  _isManifestDataValid(data) {
     this._log.trace("isManifestDataValid() - data: " + JSON.stringify(data));
 
     for (let key of this.MANIFEST_REQUIRED_FIELDS) {
       if (!(key in data)) {
         this._log.error("isManifestDataValid() - missing required key: " + key);
         return false;
       }
     }
@@ -2143,59 +2143,59 @@ this.Experiments.PreviousExperimentProvi
   this._log = Log.repository.getLoggerWithMessagePrefix(
     "Browser.Experiments.Experiments",
     "PreviousExperimentProvider #" + gPreviousProviderCounter++ + "::");
 }
 
 this.Experiments.PreviousExperimentProvider.prototype = Object.freeze({
   name: "PreviousExperimentProvider",
 
-  startup: function() {
+  startup() {
     this._log.trace("startup()");
     Services.obs.addObserver(this, EXPERIMENTS_CHANGED_TOPIC, false);
   },
 
-  shutdown: function() {
+  shutdown() {
     this._log.trace("shutdown()");
     try {
       Services.obs.removeObserver(this, EXPERIMENTS_CHANGED_TOPIC);
     } catch (e) {
       // Prevent crash in mochitest-browser3 on Mulet
     }
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case EXPERIMENTS_CHANGED_TOPIC:
         this._updateExperimentList();
         break;
     }
   },
 
-  getAddonByID: function(id, cb) {
+  getAddonByID(id, cb) {
     for (let experiment of this._experimentList) {
       if (experiment.id == id) {
         cb(new PreviousExperimentAddon(experiment));
         return;
       }
     }
 
     cb(null);
   },
 
-  getAddonsByTypes: function(types, cb) {
+  getAddonsByTypes(types, cb) {
     if (types && types.length > 0 && types.indexOf("experiment") == -1) {
       cb([]);
       return;
     }
 
     cb(this._experimentList.map(e => new PreviousExperimentAddon(e)));
   },
 
-  _updateExperimentList: function() {
+  _updateExperimentList() {
     return this._experiments.getExperiments().then((experiments) => {
       let list = experiments.filter(e => !e.active);
 
       let newMap = new Map(list.map(e => [e.id, e]));
       let oldMap = new Map(this._experimentList.map(e => [e.id, e]));
 
       let added = [...newMap.keys()].filter(id => !oldMap.has(id));
       let removed = [...oldMap.keys()].filter(id => !newMap.has(id));
@@ -2318,21 +2318,21 @@ PreviousExperimentAddon.prototype = Obje
   get updateDate() {
     return new Date(this._endDate);
   },
 
   // END OPTIONAL PROPERTIES
 
   // BEGIN REQUIRED METHODS
 
-  isCompatibleWith: function(appVersion, platformVersion) {
+  isCompatibleWith(appVersion, platformVersion) {
     return true;
   },
 
-  findUpdates: function(listener, reason, appVersion, platformVersion) {
+  findUpdates(listener, reason, appVersion, platformVersion) {
     AddonManagerPrivate.callNoUpdateListeners(this, listener, reason,
                                               appVersion, platformVersion);
   },
 
   // END REQUIRED METHODS
 
   /**
    * The end-date of the experiment, required for the Addon Manager UI.
--- a/browser/experiments/ExperimentsService.js
+++ b/browser/experiments/ExperimentsService.js
@@ -49,37 +49,37 @@ function ExperimentsService() {
   this._initialized = false;
   this._delayedInitTimer = null;
 }
 
 ExperimentsService.prototype = {
   classID: Components.ID("{f7800463-3b97-47f9-9341-b7617e6d8d49}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback, Ci.nsIObserver]),
 
-  notify: function(timer) {
+  notify(timer) {
     if (!gExperimentsEnabled) {
       return;
     }
     if (OS.Constants.Path.profileDir === undefined) {
       throw Error("Update timer fired before profile was initialized?");
     }
     let instance = Experiments.instance();
     if (instance.isReady) {
       instance.updateManifest();
     }
   },
 
-  _delayedInit: function() {
+  _delayedInit() {
     if (!this._initialized) {
       this._initialized = true;
       Experiments.instance(); // for side effects
     }
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case "profile-after-change":
         if (gExperimentsEnabled) {
           Services.obs.addObserver(this, "quit-application", false);
           Services.obs.addObserver(this, "sessionstore-state-finalized", false);
           Services.obs.addObserver(this, "EM-loaded", false);
 
           if (gActiveExperiment) {
--- a/browser/experiments/test/xpcshell/test_activate.js
+++ b/browser/experiments/test/xpcshell/test_activate.js
@@ -47,17 +47,17 @@ add_task(function* test_setup() {
   Services.prefs.setIntPref(PREF_LOGGING_LEVEL, 0);
   Services.prefs.setBoolPref(PREF_LOGGING_DUMP, true);
 });
 
 function isApplicable(experiment) {
   let deferred = Promise.defer();
   experiment.isApplicable().then(
     result => deferred.resolve({ applicable: true,  reason: null }),
-    reason => deferred.resolve({ applicable: false, reason: reason })
+    reason => deferred.resolve({ applicable: false, reason })
   );
 
   return deferred.promise;
 }
 
 add_task(function* test_startStop() {
   let baseDate  = new Date(2014, 5, 1, 12);
   let startDate = futureDate(baseDate, 30 * MS_IN_ONE_DAY);
--- a/browser/extensions/pocket/bootstrap.js
+++ b/browser/extensions/pocket/bootstrap.js
@@ -86,23 +86,23 @@ function CreatePocketWidget(reason) {
     defaultArea: CustomizableUI.AREA_NAVBAR,
     introducedInVersion: "pref",
     type: "view",
     tabSpecific: true,
     viewId: "PanelUI-pocketView",
     label: gPocketBundle.GetStringFromName("pocket-button.label"),
     tooltiptext: gPocketBundle.GetStringFromName("pocket-button.tooltiptext"),
     // Use forwarding functions here to avoid loading Pocket.jsm on startup:
-    onViewShowing: function() {
+    onViewShowing() {
       return Pocket.onPanelViewShowing.apply(this, arguments);
     },
-    onViewHiding: function() {
+    onViewHiding() {
       return Pocket.onPanelViewHiding.apply(this, arguments);
     },
-    onBeforeCreated: function(doc) {
+    onBeforeCreated(doc) {
       // Bug 1223127,CUI should make this easier to do.
       if (doc.getElementById("PanelUI-pocketView"))
         return;
       let view = doc.createElement("panelview");
       view.id = "PanelUI-pocketView";
       let panel = doc.createElement("vbox");
       panel.setAttribute("class", "panel-subview-body");
       view.appendChild(panel);
@@ -153,33 +153,33 @@ function CreatePocketWidget(reason) {
     }
   });
 
 }
 
 // PocketContextMenu
 // When the context menu is opened check if we need to build and enable pocket UI.
 var PocketContextMenu = {
-  init: function() {
+  init() {
     Services.obs.addObserver(this, "on-build-contextmenu", false);
   },
-  shutdown: function() {
+  shutdown() {
     Services.obs.removeObserver(this, "on-build-contextmenu");
     // loop through windows and remove context menus
     // iterate through all windows and add pocket to them
     for (let win of CustomizableUI.windows) {
       let document = win.document;
       for (let id of ["context-pocket", "context-savelinktopocket"]) {
         let element = document.getElementById(id);
         if (element)
           element.remove();
       }
     }
   },
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     let subject = aSubject.wrappedJSObject;
     let document = subject.menu.ownerDocument;
     let pocketEnabled = CustomizableUI.getPlacementOfWidget("pocket-button");
 
     let showSaveCurrentPageToPocket = !(subject.onTextInput || subject.onLink ||
                                         subject.isContentSelected || subject.onImage ||
                                         subject.onCanvas || subject.onVideo || subject.onAudio);
     let targetUrl = subject.onLink ? subject.linkUrl : subject.pageUrl;
@@ -235,40 +235,40 @@ var PocketReader = {
   },
   set hidden(hide) {
     hide = !!hide;
     if (hide === this._hidden)
       return;
     this._hidden = hide;
     this.update();
   },
-  startup: function() {
+  startup() {
     // Setup the listeners, update will be called when the widget is added,
     // no need to do that now.
     let mm = Services.mm;
     mm.addMessageListener("Reader:OnSetup", this);
     mm.addMessageListener("Reader:Clicked-pocket-button", this);
   },
-  shutdown: function() {
+  shutdown() {
     let mm = Services.mm;
     mm.removeMessageListener("Reader:OnSetup", this);
     mm.removeMessageListener("Reader:Clicked-pocket-button", this);
     this.hidden = true;
   },
-  update: function() {
+  update() {
     if (this.hidden) {
       Services.mm.broadcastAsyncMessage("Reader:RemoveButton", { id: "pocket-button" });
     } else {
       Services.mm.broadcastAsyncMessage("Reader:AddButton",
                                { id: "pocket-button",
                                  title: gPocketBundle.GetStringFromName("pocket-button.tooltiptext"),
                                  image: "chrome://pocket/content/panels/img/pocket.svg#pocket-mark" });
     }
   },
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     switch (message.name) {
       case "Reader:OnSetup": {
         // Tell the reader about our button.
         if (this.hidden)
           break;
         message.target.messageManager.
           sendAsyncMessage("Reader:AddButton", { id: "pocket-button",
                                                  title: gPocketBundle.GetStringFromName("pocket-button.tooltiptext"),
@@ -294,47 +294,47 @@ var PocketReader = {
       }
     }
   }
 }
 
 
 function pktUIGetter(prop, window) {
   return {
-    get: function() {
+    get() {
       // delete any getters for properties loaded from main.js so we only load main.js once
       delete window.pktUI;
       delete window.pktApi;
       delete window.pktUIMessaging;
       Services.scriptloader.loadSubScript("chrome://pocket/content/main.js", window);
       return window[prop];
     },
     configurable: true,
     enumerable: true
   };
 }
 
 var PocketOverlay = {
-  startup: function(reason) {
+  startup(reason) {
     let styleSheetService = Cc["@mozilla.org/content/style-sheet-service;1"]
                               .getService(Ci.nsIStyleSheetService);
     this._sheetType = styleSheetService.AUTHOR_SHEET;
     this._cachedSheet = styleSheetService.preloadSheet(gPocketStyleURI,
                                                        this._sheetType);
     Services.ppmm.loadProcessScript(PROCESS_SCRIPT, true);
     PocketReader.startup();
     CustomizableUI.addListener(this);
     CreatePocketWidget(reason);
     PocketContextMenu.init();
 
     for (let win of CustomizableUI.windows) {
       this.onWindowOpened(win);
     }
   },
-  shutdown: function(reason) {
+  shutdown(reason) {
     let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
                  .getService(Ci.nsIMessageBroadcaster);
     ppmm.broadcastAsyncMessage("PocketShuttingDown");
     // Although the ppmm loads the scripts into the chrome process as well,
     // we need to manually unregister here anyway to ensure these aren't part
     // of the chrome process and avoid errors.
     AboutPocket.aboutSaved.unregister();
     AboutPocket.aboutSignup.unregister();
@@ -354,34 +354,34 @@ var PocketOverlay = {
       delete window.pktApi;
       delete window.pktUI;
       delete window.pktUIMessaging;
     }
     CustomizableUI.destroyWidget("pocket-button");
     PocketContextMenu.shutdown();
     PocketReader.shutdown();
   },
-  onWindowOpened: function(window) {
+  onWindowOpened(window) {
     if (window.hasOwnProperty("pktUI"))
       return;
     this.setWindowScripts(window);
     this.addStyles(window);
     this.updateWindow(window);
   },
-  setWindowScripts: function(window) {
+  setWindowScripts(window) {
     XPCOMUtils.defineLazyModuleGetter(window, "Pocket",
                                       "chrome://pocket/content/Pocket.jsm");
     // Can't use XPCOMUtils for these because the scripts try to define the variables
     // on window, and so the defineProperty inside defineLazyGetter fails.
     Object.defineProperty(window, "pktApi", pktUIGetter("pktApi", window));
     Object.defineProperty(window, "pktUI", pktUIGetter("pktUI", window));
     Object.defineProperty(window, "pktUIMessaging", pktUIGetter("pktUIMessaging", window));
   },
   // called for each window as it is opened
-  updateWindow: function(window) {
+  updateWindow(window) {
     // insert our three menu items
     let document = window.document;
     let hidden = !CustomizableUI.getPlacementOfWidget("pocket-button");
 
     // add to bookmarksMenu
     let sib = document.getElementById("menu_bookmarkThisPage");
     if (sib && !document.getElementById("menu_pocket")) {
       let menu = createElementWithAttrs(document, "menuitem", {
@@ -433,39 +433,39 @@ var PocketOverlay = {
       });
       // nextSibling is no-id toolbarseparator
       // insert separator first then button
       sib = sib.nextSibling;
       sib.parentNode.insertBefore(sep, sib);
       sib.parentNode.insertBefore(menu, sib);
     }
   },
-  onWidgetAfterDOMChange: function(aWidgetNode) {
+  onWidgetAfterDOMChange(aWidgetNode) {
     if (aWidgetNode.id != "pocket-button") {
       return;
     }
     let doc = aWidgetNode.ownerDocument;
     let hidden = !CustomizableUI.getPlacementOfWidget("pocket-button");
     for (let prefix of ["panelMenu_", "menu_", "BMB_"]) {
       let element = doc.getElementById(prefix + "pocket");
       if (element) {
         element.hidden = hidden;
         doc.getElementById(prefix + "pocketSeparator").hidden = hidden;
       }
     }
     // enable or disable reader button
     PocketReader.hidden = hidden;
   },
 
-  addStyles: function(win) {
+  addStyles(win) {
     let utils = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
     utils.addSheet(this._cachedSheet, this._sheetType);
   },
 
-  removeStyles: function(win) {
+  removeStyles(win) {
     let utils = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
     utils.removeSheet(gPocketStyleURI, this._sheetType);
   }
 
 }
 
 // use enabled pref as a way for tests (e.g. test_contextmenu.html) to disable
 // the addon when running.
--- a/browser/extensions/pocket/content/AboutPocket.jsm
+++ b/browser/extensions/pocket/content/AboutPocket.jsm
@@ -26,47 +26,47 @@ function AboutPage(chromeURL, aboutHost,
   this.aboutHost = aboutHost;
   this.classID = Components.ID(classID);
   this.description = description;
   this.uriFlags = uriFlags;
 }
 
 AboutPage.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
-  getURIFlags: function(aURI) { // eslint-disable-line no-unused-vars
+  getURIFlags(aURI) { // eslint-disable-line no-unused-vars
     return this.uriFlags;
   },
 
-  newChannel: function(aURI, aLoadInfo) {
+  newChannel(aURI, aLoadInfo) {
     let newURI = Services.io.newURI(this.chromeURL, null, null);
     let channel = Services.io.newChannelFromURIWithLoadInfo(newURI,
                                                             aLoadInfo);
     channel.originalURI = aURI;
 
     if (this.uriFlags & Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT) {
       let principal = Services.scriptSecurityManager.getNoAppCodebasePrincipal(aURI);
       channel.owner = principal;
     }
     return channel;
   },
 
-  createInstance: function(outer, iid) {
+  createInstance(outer, iid) {
     if (outer !== null) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
     return this.QueryInterface(iid);
   },
 
-  register: function() {
+  register() {
     Cm.QueryInterface(Ci.nsIComponentRegistrar).registerFactory(
       this.classID, this.description,
       "@mozilla.org/network/protocol/about;1?what=" + this.aboutHost, this);
   },
 
-  unregister: function() {
+  unregister() {
     Cm.QueryInterface(Ci.nsIComponentRegistrar).unregisterFactory(
       this.classID, this);
   }
 };
 
 /* exported AboutPocket */
 var AboutPocket = {};
 
--- a/browser/extensions/pocket/content/main.js
+++ b/browser/extensions/pocket/content/main.js
@@ -170,17 +170,17 @@ var pktUI = (function() {
                 + "&variant="
                 + variant
                 + '&controlvariant='
                 + controlvariant
                 + '&inoverflowmenu='
                 + inOverflowMenu
                 + "&locale="
                 + getUILocale(), {
-                    onShow: function() {
+                    onShow() {
                     },
                     onHide: panelDidHide,
                     width: inOverflowMenu ? overflowMenuWidth : 300,
                     height: startheight
             });
         });
     }
 
@@ -198,17 +198,17 @@ var pktUI = (function() {
 
         var inOverflowMenu = isInOverflowMenu();
         var startheight = pktApi.isPremiumUser() && isValidURL ? savePanelHeights.expanded : savePanelHeights.collapsed;
         if (inOverflowMenu) {
             startheight = overflowMenuHeight;
         }
 
         var panelId = showPanel("about:pocket-saved?pockethost=" + Services.prefs.getCharPref("extensions.pocket.site") + "&premiumStatus=" + (pktApi.isPremiumUser() ? '1' : '0') + '&inoverflowmenu=' + inOverflowMenu + "&locale=" + getUILocale(), {
-            onShow: function() {
+            onShow() {
                 var saveLinkMessageId = 'saveLink';
 
                 // Send error message for invalid url
                 if (!isValidURL) {
                     // TODO: Pass key for localized error in error object
                     let error = {
                         message: 'Only links can be saved',
                         localizedKey: "onlylinkssaved"
@@ -224,25 +224,25 @@ var pktUI = (function() {
                         message: 'You must be connected to the Internet in order to save to Pocket. Please connect to the Internet and try again.'
                     };
                     pktUIMessaging.sendErrorMessageToPanel(panelId, saveLinkMessageId, error);
                     return;
                 }
 
                 // Add url
                 var options = {
-                    success: function(data, request) {
+                    success(data, request) {
                         var item = data.item;
                         var successResponse = {
                             status: "success",
-                            item: item
+                            item
                         };
                         pktUIMessaging.sendMessageToPanel(panelId, saveLinkMessageId, successResponse);
                     },
-                    error: function(error, request) {
+                    error(error, request) {
                         // If user is not authorized show singup page
                         if (request.status === 401) {
                             showSignUp();
                             return;
                         }
 
                         // If there is no error message in the error use a
                         // complete catch-all
@@ -413,65 +413,65 @@ var pktUI = (function() {
                 resizePanel({width:savePanelWidth, height:savePanelHeights.expanded});
         });
 
         // Ask for recently accessed/used tags for auto complete
         var _getTagsMessageId = "getTags";
         pktUIMessaging.addMessageListener(iframe, _getTagsMessageId, function(panelId, data) {
             pktApi.getTags(function(tags, usedTags) {
                 pktUIMessaging.sendResponseMessageToPanel(panelId, _getTagsMessageId, {
-                    tags: tags,
-                    usedTags: usedTags
+                    tags,
+                    usedTags
                 });
             });
         });
 
         // Ask for suggested tags based on passed url
         var _getSuggestedTagsMessageId = "getSuggestedTags";
         pktUIMessaging.addMessageListener(iframe, _getSuggestedTagsMessageId, function(panelId, data) {
             pktApi.getSuggestedTagsForURL(data.url, {
-                success: function(data, response) {
+                success(data, response) {
                     var suggestedTags = data.suggested_tags;
                     var successResponse = {
                         status: "success",
                         value: {
-                            suggestedTags: suggestedTags
+                            suggestedTags
                         }
                     }
                     pktUIMessaging.sendResponseMessageToPanel(panelId, _getSuggestedTagsMessageId, successResponse);
                 },
-                error: function(error, response) {
+                error(error, response) {
                     pktUIMessaging.sendErrorResponseMessageToPanel(panelId, _getSuggestedTagsMessageId, error);
                 }
             })
         });
 
         // Pass url and array list of tags, add to existing save item accordingly
         var _addTagsMessageId = "addTags";
         pktUIMessaging.addMessageListener(iframe, _addTagsMessageId, function(panelId, data) {
             pktApi.addTagsToURL(data.url, data.tags, {
-                success: function(data, response) {
+                success(data, response) {
                     var successResponse = {status: "success"};
                     pktUIMessaging.sendResponseMessageToPanel(panelId, _addTagsMessageId, successResponse);
                 },
-                error: function(error, response) {
+                error(error, response) {
                     pktUIMessaging.sendErrorResponseMessageToPanel(panelId, _addTagsMessageId, error);
                 }
             });
         });
 
         // Based on clicking "remove page" CTA, and passed unique item id, remove the item
         var _deleteItemMessageId = "deleteItem";
         pktUIMessaging.addMessageListener(iframe, _deleteItemMessageId, function(panelId, data) {
             pktApi.deleteItem(data.itemId, {
-                success: function(data, response) {
+                success(data, response) {
                     var successResponse = {status: "success"};
                     pktUIMessaging.sendResponseMessageToPanel(panelId, _deleteItemMessageId, successResponse);
                 },
-                error: function(error, response) {
+                error(error, response) {
                     pktUIMessaging.sendErrorResponseMessageToPanel(panelId, _deleteItemMessageId, error);
                 }
             })
         });
 
         var _initL10NMessageId = "initL10N";
         pktUIMessaging.addMessageListener(iframe, _initL10NMessageId, function(panelId, data) {
             var strings = {};
@@ -480,17 +480,17 @@ var pktUI = (function() {
             while (e.hasMoreElements()) {
                 var str = e.getNext().QueryInterface(Components.interfaces.nsIPropertyElement);
                 if (str.key in data) {
                     strings[str.key] = bundle.formatStringFromName(str.key, data[str.key], data[str.key].length);
                 } else {
                     strings[str.key] = str.value;
                 }
             }
-            pktUIMessaging.sendResponseMessageToPanel(panelId, _initL10NMessageId, { strings: strings });
+            pktUIMessaging.sendResponseMessageToPanel(panelId, _initL10NMessageId, { strings });
         });
 
     }
 
     // -- Browser Navigation -- //
 
     /**
      * Open a new tab with a given url and notify the iframe panel that it was opened
@@ -583,25 +583,25 @@ var pktUI = (function() {
              getSelectedLocale("browser");
         return locale;
     }
 
     /**
      * Public functions
      */
     return {
-        getPanelFrame: getPanelFrame,
+        getPanelFrame,
 
-        openTabWithUrl: openTabWithUrl,
+        openTabWithUrl,
 
-        pocketPanelDidShow: pocketPanelDidShow,
-        pocketPanelDidHide: pocketPanelDidHide,
+        pocketPanelDidShow,
+        pocketPanelDidHide,
 
-        tryToSaveUrl: tryToSaveUrl,
-        tryToSaveCurrentPage: tryToSaveCurrentPage
+        tryToSaveUrl,
+        tryToSaveCurrentPage
     };
 }());
 
 // -- Communication to Background -- //
 // https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Interaction_between_privileged_and_non-privileged_pages
 var pktUIMessaging = (function() {
 
     /**
@@ -664,22 +664,22 @@ var pktUIMessaging = (function() {
         sendMessageToPanel(panelId, responseMessageId, payload);
     }
 
     /**
      * Helper function to package an error object and send it to the panel
      * iframe as a message response
      */
     function sendErrorMessageToPanel(panelId, messageId, error) {
-        var errorResponse = {status: "error", error: error};
+        var errorResponse = {status: "error", error};
         sendMessageToPanel(panelId, messageId, errorResponse);
     }
 
     function sendErrorResponseMessageToPanel(panelId, messageId, error) {
-        var errorResponse = {status: "error", error: error};
+        var errorResponse = {status: "error", error};
         sendResponseMessageToPanel(panelId, messageId, errorResponse);
     }
 
     /**
      * Validation
      */
 
     function isPanelIdValid(panelId) {
@@ -725,15 +725,15 @@ var pktUIMessaging = (function() {
 
         return true;
     }
 
     /**
      * Public
      */
     return {
-        addMessageListener: addMessageListener,
-        sendMessageToPanel: sendMessageToPanel,
-        sendResponseMessageToPanel: sendResponseMessageToPanel,
-        sendErrorMessageToPanel: sendErrorMessageToPanel,
-        sendErrorResponseMessageToPanel: sendErrorResponseMessageToPanel
+        addMessageListener,
+        sendMessageToPanel,
+        sendResponseMessageToPanel,
+        sendErrorMessageToPanel,
+        sendErrorResponseMessageToPanel
     }
 }());
--- a/browser/extensions/pocket/content/panels/js/messages.js
+++ b/browser/extensions/pocket/content/panels/js/messages.js
@@ -35,17 +35,17 @@ var pktPanelMessaging = (function() {
 	function removeMessageListener(panelId, messageId, callback) {
    document.removeEventListener(panelPrefixedMessageId(panelId, messageId), callback);
 	}
 
  function sendMessage(panelId, messageId, payload, callback) {
    // Payload needs to be an object in format:
    // { panelId: panelId, data: {} }
    var messagePayload = {
-     panelId: panelId,
+     panelId,
      data: (payload || {})
    };
 
 		// Create a callback to listen for a response
 		if (callback) {
 	        var messageResponseId = messageId + "Response";
 	        var responseListener = function(responsePayload) {
 	            callback(responsePayload);
@@ -65,14 +65,14 @@ var pktPanelMessaging = (function() {
 		element.dispatchEvent(evt);
 	}
 
 
     /**
      * Public functions
      */
     return {
-      panelIdFromURL: panelIdFromURL,
-        addMessageListener : addMessageListener,
-        removeMessageListener : removeMessageListener,
-        sendMessage: sendMessage
+      panelIdFromURL,
+        addMessageListener,
+        removeMessageListener,
+        sendMessage
     };
 }());
--- a/browser/extensions/pocket/content/panels/js/saved.js
+++ b/browser/extensions/pocket/content/panels/js/saved.js
@@ -168,17 +168,17 @@ var PKT_SAVED_OVERLAY = function(options
         var inputwrapper = $('.pkt_ext_tag_input_wrapper');
         inputwrapper.find('.pkt_ext_tag_input').tokenInput([], {
             searchDelay: 200,
             minChars: 1,
             animateDropdown: false,
             noResultsHideDropdown: true,
             scrollKeyboard: true,
             emptyInputLength: 200,
-            search_function: function(term, cb) {
+            search_function(term, cb) {
                 var returnlist = [];
                 if (term.length) {
                     var limit = 15;
                     var r = new RegExp('^' + term);
                     for (var i = 0; i < myself.userTags.length; i++) {
                         if (r.test(myself.userTags[i]) && limit > 0) {
                             returnlist.push({name:myself.userTags[i]});
                             limit--;
@@ -186,31 +186,31 @@ var PKT_SAVED_OVERLAY = function(options
                     }
                 }
                 if (!$('.token-input-dropdown-tag').data('init')) {
                     $('.token-input-dropdown-tag').css('width', inputwrapper.outerWidth()).data('init');
                     inputwrapper.append($('.token-input-dropdown-tag'));
                 }
                 cb(returnlist);
             },
-            textToData: function(text) {
+            textToData(text) {
                 if ($.trim(text).length > 25 || !$.trim(text).length) {
                     if (text.length > 25) {
                         myself.showTagsError(myself.dictJSON.maxtaglength);
                         changestamp = Date.now();
                         setTimeout(function() {
                             $('.token-input-input-token input').val(text).focus();
                         }, 10);
                     }
                     return null;
                 }
                 myself.hideTagsError();
                 return {name:myself.sanitizeText(text.toLowerCase())};
             },
-            onReady: function() {
+            onReady() {
                 $('.token-input-dropdown').addClass('token-input-dropdown-tag');
                 inputwrapper.find('.token-input-input-token input').attr('placeholder', $('.tag-input').attr('placeholder')).css('width', '200px');
                 if ($('.pkt_ext_suggestedtag_detail').length) {
                     myself.wrapper.find('.pkt_ext_suggestedtag_detail').on('click', '.token_tag', function(e) {
                         e.preventDefault();
                         var tag = $(e.target);
                         if ($(this).parents('.pkt_ext_suggestedtag_detail_disabled').length) {
                             return;
@@ -232,32 +232,32 @@ var PKT_SAVED_OVERLAY = function(options
                             myself.wrapper.find('.pkt_ext_btn').trigger('click');
                         }
                     }
                 }).on('keyup', 'input', function(e) {
                     myself.checkValidTagSubmit();
                 });
                 myself.checkPlaceholderStatus();
             },
-            onAdd: function() {
+            onAdd() {
                 myself.checkValidTagSubmit();
                 changestamp = Date.now();
                 myself.hideInactiveTags();
                 myself.checkPlaceholderStatus();
             },
-            onDelete: function() {
+            onDelete() {
                 myself.checkValidTagSubmit();
                 changestamp = Date.now();
                 myself.showActiveTags();
                 myself.checkPlaceholderStatus();
             },
-            onShowDropdown: function() {
+            onShowDropdown() {
                 thePKT_SAVED.sendMessage("expandSavePanel");
             },
-            onHideDropdown: function() {
+            onHideDropdown() {
                 thePKT_SAVED.sendMessage("collapseSavePanel");
             }
         });
         $('body').on('keydown', function(e) {
             var key = e.keyCode || e.which;
             if (key == 8) {
                 var selected = $('.token-input-selected-token');
                 if (selected.length) {
@@ -452,17 +452,17 @@ var PKT_SAVED_OVERLAY = function(options
     }
     this.getTranslations = function()
     {
         this.dictJSON = window.pocketStrings;
     };
 };
 
 PKT_SAVED_OVERLAY.prototype = {
-    create : function()
+    create()
     {
         if (this.active)
         {
             return;
         }
         this.active = true;
 
         // set translations
@@ -492,50 +492,50 @@ PKT_SAVED_OVERLAY.prototype = {
         // Initialize functionality for overlay
         this.wrapper = $('.pkt_ext_containersaved');
         this.initTagInput();
         this.initAddTagInput();
         this.initRemovePageInput();
         this.initOpenListInput();
         this.initAutoCloseEvents();
     },
-    createPremiumFunctionality: function()
+    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
 var PKT_SAVED = function() {};
 
 PKT_SAVED.prototype = {
-    init: function() {
+    init() {
         if (this.inited) {
             return;
         }
         this.panelId = pktPanelMessaging.panelIdFromURL(window.location.href);
         this.overlay = new PKT_SAVED_OVERLAY();
 
         this.inited = true;
     },
 
-    addMessageListener: function(messageId, callback) {
+    addMessageListener(messageId, callback) {
         pktPanelMessaging.addMessageListener(this.panelId, messageId, callback);
     },
 
-    sendMessage: function(messageId, payload, callback) {
+    sendMessage(messageId, payload, callback) {
         pktPanelMessaging.sendMessage(this.panelId, messageId, payload, callback);
     },
 
-    create: function() {
+    create() {
         var myself = this;
         var url = window.location.href.match(/premiumStatus=([\w|\d|\.]*)&?/);
         if (url && url.length > 1)
         {
             myself.overlay.premiumStatus = (url[1] == '1');
         }
         var host = window.location.href.match(/pockethost=([\w|\.]*)&?/);
         if (host && host.length > 1)
--- a/browser/extensions/pocket/content/panels/js/signup.js
+++ b/browser/extensions/pocket/content/panels/js/signup.js
@@ -56,17 +56,17 @@ var PKT_SIGNUP_OVERLAY = function(option
     this.getTranslations = function()
     {
         this.dictJSON = window.pocketStrings;
     };
 
 };
 
 PKT_SIGNUP_OVERLAY.prototype = {
-    create : function()
+    create()
     {
         var controlvariant = window.location.href.match(/controlvariant=([\w|\.]*)&?/);
         if (controlvariant && controlvariant.length > 1)
         {
             this.controlvariant = controlvariant[1];
         }
         var variant = window.location.href.match(/variant=([\w|\.]*)&?/);
         if (variant && variant.length > 1)
@@ -140,35 +140,35 @@ PKT_SIGNUP_OVERLAY.prototype = {
     }
 };
 
 
 // Layer between Bookmarklet and Extensions
 var PKT_SIGNUP = function() {};
 
 PKT_SIGNUP.prototype = {
-    init: function() {
+    init() {
         if (this.inited) {
             return;
         }
         this.panelId = pktPanelMessaging.panelIdFromURL(window.location.href);
         this.overlay = new PKT_SIGNUP_OVERLAY();
 
         this.inited = true;
     },
 
-    addMessageListener: function(messageId, callback) {
+    addMessageListener(messageId, callback) {
         pktPanelMessaging.addMessageListener(this.panelId, messageId, callback);
     },
 
-    sendMessage: function(messageId, payload, callback) {
+    sendMessage(messageId, payload, callback) {
         pktPanelMessaging.sendMessage(this.panelId, messageId, payload, callback);
     },
 
-    create: function() {
+    create() {
         this.overlay.create();
 
         // tell back end we're ready
         thePKT_SIGNUP.sendMessage("show");
     }
 }
 
 $(function()
--- a/browser/extensions/pocket/content/pktApi.jsm
+++ b/browser/extensions/pocket/content/pktApi.jsm
@@ -332,28 +332,28 @@ var pktApi = (function() {
      */
     function addLink(url, options) {
 
         var since = getSetting('latestSince');
         var accessToken = getAccessToken();
 
         var sendData = {
             access_token: accessToken,
-            url: url,
+            url,
             since: since ? since : 0
         };
 
         if (options.title) {
             sendData.title = options.title;
         }
 
         return apiRequest({
             path: "/firefox/save",
             data: sendData,
-            success: function(data) {
+            success(data) {
 
                 // Update premium status, tags and since
                 var tags = data.tags;
                 if ((typeof tags !== "undefined") && Array.isArray(tags)) {
                     // If a tagslist is in the response replace the tags
                     setSetting('tags', JSON.stringify(data.tags));
                 }
 
@@ -453,34 +453,34 @@ var pktApi = (function() {
      * @param {string} url     The item identifier by url
      * @param {Array}  tags    Tags adding to the item
      * @param {Object} options Can provide an actionInfo object with further
      *                         data to send to the API. Can have success and error
      *                         callbacks
      * @return {Boolean} Returns Boolean whether the api call started sucessfully
      */
     function addTagsToURL(url, tags, options) {
-        return addTags({url: url}, tags, options);
+        return addTags({url}, tags, options);
     }
 
     /**
      * Helper function to execute the add tags api call. Will be used from addTagsToURL
      * and addTagsToItem but not exposed outside
      * @param {string} actionPart Specific action part to add to action
      * @param {Array}  tags       Tags adding to the item
      * @param {Object | undefined} options Can provide an actionInfo object with
      *                                     further data to send to the API. Can
      *                                     have success and error callbacks
      * @return {Boolean} Returns Boolean whether the api call started sucessfully
      */
     function addTags(actionPart, tags, options) {
         // Tags add action
         var action = {
             action: "tags_add",
-            tags: tags
+            tags
         };
         action = extend(action, actionPart);
 
         // Backup the success callback as we need it later
         var finalSuccessCallback = options.success;
 
         // Switch the success callback
         options.success = function(data) {
@@ -579,33 +579,33 @@ var pktApi = (function() {
      * Fetch suggested tags for a given URL
      * @param {string} url (required) The item identifier by url
      * @param {Object} options Can provide an actionInfo object with further
      *                         data to send to the API. Can have success and error
      *                         callbacks
      * @return {Boolean} Returns Boolean whether the api call started sucessfully
      */
     function getSuggestedTagsForURL(url, options) {
-        return getSuggestedTags({url: url}, options);
+        return getSuggestedTags({url}, options);
     }
 
     /**
      * Helper function to get suggested tags
      * @return {Boolean} Returns Boolean whether the api call started sucessfully
      */
     function getSuggestedTags(data, options) {
 
         data = data || {};
         options = options || {};
 
         data.access_token = getAccessToken();
 
         return apiRequest({
             path: "/getSuggestedTags",
-            data: data,
+            data,
             success: options.success,
             error: options.error
         });
     }
 
     /**
      * Helper function to get current signup AB group the user is in
      */
@@ -637,21 +637,21 @@ var pktApi = (function() {
         return assignedValue;
 
     }
 
     /**
      * Public functions
      */
     return {
-        isUserLoggedIn : isUserLoggedIn,
-        clearUserData: clearUserData,
-        addLink: addLink,
-        deleteItem: deleteItem,
-        addTagsToItem: addTagsToItem,
-        addTagsToURL: addTagsToURL,
-        getTags: getTags,
-        isPremiumUser: isPremiumUser,
-        getSuggestedTagsForItem: getSuggestedTagsForItem,
-        getSuggestedTagsForURL: getSuggestedTagsForURL,
-        getSignupPanelTabTestVariant: getSignupPanelTabTestVariant,
+        isUserLoggedIn,
+        clearUserData,
+        addLink,
+        deleteItem,
+        addTagsToItem,
+        addTagsToURL,
+        getTags,
+        isPremiumUser,
+        getSuggestedTagsForItem,
+        getSuggestedTagsForURL,
+        getSignupPanelTabTestVariant,
     };
 }());
--- a/browser/extensions/pocket/test/head.js
+++ b/browser/extensions/pocket/test/head.js
@@ -31,17 +31,17 @@ function promisePocketEnabled() {
 function promisePocketDisabled() {
   if (Services.prefs.getPrefType("extensions.pocket.enabled") == Services.prefs.PREF_INVALID ||
       !Services.prefs.getBoolPref("extensions.pocket.enabled")) {
     info("pocket-button already disabled");
     return Promise.resolve(true);
   }
   return new Promise((resolve, reject) => {
     let listener = {
-      onWidgetDestroyed: function(widgetid) {
+      onWidgetDestroyed(widgetid) {
         if (widgetid == "pocket-button") {
           CustomizableUI.removeListener(listener);
           info( "pocket-button destroyed");
           // wait for a full unload of pocket
           BrowserTestUtils.waitForCondition(() => {
             return !window.hasOwnProperty("pktUI");
           }, "pocket properties removed from window").then(() => {
             resolve(false);
--- a/browser/extensions/presentation/bootstrap.js
+++ b/browser/extensions/presentation/bootstrap.js
@@ -28,57 +28,57 @@ function startup(aData, aReason) {
 function shutdown(aData, aReason) {
   log("shutdown");
   Presentation.uninit();
 }
 
 // Register/unregister a constructor as a factory.
 function Factory() {}
 Factory.prototype = {
-  register: function(targetConstructor) {
+  register(targetConstructor) {
     let proto = targetConstructor.prototype;
     this._classID = proto.classID;
 
     let factory = XPCOMUtils._getFactory(targetConstructor);
     this._factory = factory;
 
     let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
     registrar.registerFactory(proto.classID, proto.classDescription,
                               proto.contractID, factory);
   },
 
-  unregister: function() {
+  unregister() {
     let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
     registrar.unregisterFactory(this._classID, this._factory);
     this._factory = null;
     this._classID = null;
   },
 };
 
 var Presentation = {
   // PUBLIC APIs
-  init: function() {
+  init() {
     log("init");
     // Register PresentationDevicePrompt into a XPCOM component.
     Cu.import(PRESENTATION_DEVICE_PROMPT_PATH);
     this._register();
   },
 
-  uninit: function() {
+  uninit() {
     log("uninit");
     // Unregister PresentationDevicePrompt XPCOM component.
     this._unregister();
     Cu.unload(PRESENTATION_DEVICE_PROMPT_PATH);
   },
 
   // PRIVATE APIs
-  _register: function() {
+  _register() {
     log("_register");
     this._devicePromptFactory = new Factory();
     this._devicePromptFactory.register(PresentationDevicePrompt);
   },
 
-  _unregister: function() {
+  _unregister() {
     log("_unregister");
     this._devicePromptFactory.unregister();
     delete this._devicePromptFactory;
   },
 };
--- a/browser/extensions/presentation/content/PresentationDevicePrompt.jsm
+++ b/browser/extensions/presentation/content/PresentationDevicePrompt.jsm
@@ -166,17 +166,17 @@ PresentationPermissionPrompt.prototype =
   },
   // PRIVATE APIs
   get _domainName() {
     if (this.principal.URI instanceof Ci.nsIFileURL) {
       return this.principal.URI.path.split('/')[1];
     }
     return this.principal.URI.hostPort;
   },
-  _createPopupContent: function() {
+  _createPopupContent() {
     log("_createPopupContent");
 
     if (!this._devices.length) {
       log("No available devices can be listed!");
       return;
     }
 
     let chromeDoc = this.browser.ownerDocument;
@@ -218,32 +218,32 @@ function PresentationDevicePrompt() {}
 PresentationDevicePrompt.prototype = {
   // properties required for XPCOM registration:
   classID: PRESENTATIONDEVICEPROMPT_CID,
   classDescription: "Presentation API Device Prompt",
   contractID: PRESENTATIONDEVICEPROMPT_CONTRACTID,
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDevicePrompt]),
 
   // This will be fired when window.PresentationRequest(URL).start() is called.
-  promptDeviceSelection: function(aRequest) {
+  promptDeviceSelection(aRequest) {
     log("promptDeviceSelection");
 
     // Cancel request if no available device.
     let devices = this._loadDevices();
     if (!devices.length) {
       log("No available device.");
       aRequest.cancel(Cr.NS_ERROR_NOT_AVAILABLE);
       return;
     }
 
     // Show the prompt to users.
     let promptUI = new PresentationPermissionPrompt(aRequest, devices);
     promptUI.prompt();
   },
-  _loadDevices: function() {
+  _loadDevices() {
     let deviceManager = Cc["@mozilla.org/presentation-device/manager;1"]
                         .getService(Ci.nsIPresentationDeviceManager);
     let devices = deviceManager.getAvailableDevices().QueryInterface(Ci.nsIArray);
     let list = [];
     for (let i = 0; i < devices.length; i++) {
       let device = devices.queryElementAt(i, Ci.nsIPresentationDevice);
       list.push(device);
     }
--- a/browser/modules/AboutHome.jsm
+++ b/browser/modules/AboutHome.jsm
@@ -99,25 +99,25 @@ var AboutHome = {
     "AboutHome:History",
     "AboutHome:Addons",
     "AboutHome:Sync",
     "AboutHome:Settings",
     "AboutHome:RequestUpdate",
     "AboutHome:MaybeShowAutoMigrationUndoNotification",
   ],
 
-  init: function() {
+  init() {
     let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
 
     for (let msg of this.MESSAGES) {
       mm.addMessageListener(msg, this);
     }
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     let window = aMessage.target.ownerGlobal;
 
     switch (aMessage.name) {
       case "AboutHome:RestorePreviousSession":
         let ss = Cc["@mozilla.org/browser/sessionstore;1"].
                  getService(Ci.nsISessionStore);
         if (ss.canRestoreLastSession) {
           ss.restoreLastSession();
@@ -155,17 +155,17 @@ var AboutHome = {
       case "AboutHome:MaybeShowAutoMigrationUndoNotification":
         AutoMigrate.maybeShowUndoNotification(aMessage.target);
         break;
     }
   },
 
   // Send all the chrome-privileged data needed by about:home. This
   // gets re-sent when the search engine changes.
-  sendAboutHomeData: function(target) {
+  sendAboutHomeData(target) {
     let wrapper = {};
     Components.utils.import("resource:///modules/sessionstore/SessionStore.jsm",
       wrapper);
     let ss = wrapper.SessionStore;
 
     ss.promiseInitialized.then(function() {
       let data = {
         showRestoreLastSession: ss.canRestoreLastSession,
--- a/browser/modules/AboutNewTab.jsm
+++ b/browser/modules/AboutNewTab.jsm
@@ -17,23 +17,23 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   "resource://gre/modules/RemotePageManager.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "NewTabUtils",
   "resource://gre/modules/NewTabUtils.jsm");
 
 var AboutNewTab = {
 
   pageListener: null,
 
-  init: function() {
+  init() {
     this.pageListener = new RemotePages("about:newtab");
     this.pageListener.addMessageListener("NewTab:Customize", this.customize.bind(this));
   },
 
-  customize: function(message) {
+  customize(message) {
     NewTabUtils.allPages.enabled = message.data.enabled;
     NewTabUtils.allPages.enhanced = message.data.enhanced;
   },
 
-  uninit: function() {
+  uninit() {
     this.pageListener.destroy();
     this.pageListener = null;
   },
 };
--- a/browser/modules/BrowserUITelemetry.jsm
+++ b/browser/modules/BrowserUITelemetry.jsm
@@ -165,17 +165,17 @@ const WINDOW_DURATION_MAP = new WeakMap(
 const BUCKET_DEFAULT = "__DEFAULT__";
 // Bucket prefix, for named buckets.
 const BUCKET_PREFIX = "bucket_";
 // Standard separator to use between different parts of a bucket name, such
 // as primary name and the time step string.
 const BUCKET_SEPARATOR = "|";
 
 this.BrowserUITelemetry = {
-  init: function() {
+  init() {
     UITelemetry.addSimpleMeasureFunction("toolbars",
                                          this.getToolbarMeasures.bind(this));
     UITelemetry.addSimpleMeasureFunction("contextmenu",
                                          this.getContextMenuInfo.bind(this));
     // Ensure that UITour.jsm remains lazy-loaded, yet always registers its
     // simple measure function with UITelemetry.
     UITelemetry.addSimpleMeasureFunction("UITour",
                                          () => UITour.getTelemetry());
@@ -184,17 +184,17 @@ this.BrowserUITelemetry = {
                                          this.getSyncState.bind(this));
 
     Services.obs.addObserver(this, "sessionstore-windows-restored", false);
     Services.obs.addObserver(this, "browser-delayed-startup-finished", false);
     Services.obs.addObserver(this, "autocomplete-did-enter-text", false);
     CustomizableUI.addListener(this);
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "sessionstore-windows-restored":
         this._gatherFirstWindowMeasurements();
         break;
       case "browser-delayed-startup-finished":
         this._registerWindow(aSubject);
         break;
       case "autocomplete-did-enter-text":
@@ -236,17 +236,17 @@ this.BrowserUITelemetry = {
    *
    * @param aKeys the Array of keys to chain Objects together with.
    * @param aEndWith the value to assign to the last key.
    * @param aRoot the root object onto which we create/get the object chain
    *              designated by aKeys.
    * @returns a reference to the second last object in the chain -
    *          so in our example, that'd be "b".
    */
-  _ensureObjectChain: function(aKeys, aEndWith, aRoot) {
+  _ensureObjectChain(aKeys, aEndWith, aRoot) {
     let current = aRoot;
     let parent = null;
     aKeys.unshift(this._bucket);
     for (let [i, key] of aKeys.entries()) {
       if (!(key in current)) {
         if (i == aKeys.length - 1) {
           current[key] = aEndWith;
         } else {
@@ -255,32 +255,32 @@ this.BrowserUITelemetry = {
       }
       parent = current;
       current = current[key];
     }
     return parent;
   },
 
   _countableEvents: {},
-  _countEvent: function(aKeyArray, root = this._countableEvents) {
+  _countEvent(aKeyArray, root = this._countableEvents) {
     let countObject = this._ensureObjectChain(aKeyArray, 0, root);
     let lastItemKey = aKeyArray[aKeyArray.length - 1];
     countObject[lastItemKey]++;
   },
 
-  _countMouseUpEvent: function(aCategory, aAction, aButton) {
+  _countMouseUpEvent(aCategory, aAction, aButton) {
     const BUTTONS = ["left", "middle", "right"];
     let buttonKey = BUTTONS[aButton];
     if (buttonKey) {
       this._countEvent([aCategory, aAction, buttonKey]);
     }
   },
 
   _firstWindowMeasurements: null,
-  _gatherFirstWindowMeasurements: function() {
+  _gatherFirstWindowMeasurements() {
     // We'll gather measurements as soon as the session has restored.
     // We do this here instead of waiting for UITelemetry to ask for
     // our measurements because at that point all browser windows have
     // probably been closed, since the vast majority of saved-session
     // pings are gathered during shutdown.
     let win = RecentWindow.getMostRecentBrowserWindow({
       private: false,
       allowPopups: false,
@@ -290,17 +290,17 @@ this.BrowserUITelemetry = {
       // If there are no such windows (or we've just about found one
       // but it's closed already), we're out of luck. :(
       let hasWindow = win && !win.closed;
       this._firstWindowMeasurements = hasWindow ? this._getWindowMeasurements(win, rv)
                                                 : {};
     });
   },
 
-  _registerWindow: function(aWindow) {
+  _registerWindow(aWindow) {
     aWindow.addEventListener("unload", this);
     let document = aWindow.document;
 
     for (let areaID of CustomizableUI.areas) {
       let areaNode = document.getElementById(areaID);
       if (areaNode) {
         (areaNode.customizationTarget || areaNode).addEventListener("mouseup", this);
       }
@@ -318,17 +318,17 @@ this.BrowserUITelemetry = {
       if (item) {
         item.addEventListener("mousedown", this);
       }
     }
 
     WINDOW_DURATION_MAP.set(aWindow, {});
   },
 
-  _unregisterWindow: function(aWindow) {
+  _unregisterWindow(aWindow) {
     aWindow.removeEventListener("unload", this);
     let document = aWindow.document;
 
     for (let areaID of CustomizableUI.areas) {
       let areaNode = document.getElementById(areaID);
       if (areaNode) {
         (areaNode.customizationTarget || areaNode).removeEventListener("mouseup", this);
       }
@@ -344,31 +344,31 @@ this.BrowserUITelemetry = {
     for (let itemID of MOUSEDOWN_MONITORED_ITEMS) {
       let item = document.getElementById(itemID);
       if (item) {
         item.removeEventListener("mousedown", this);
       }
     }
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "unload":
         this._unregisterWindow(aEvent.currentTarget);
         break;
       case "mouseup":
         this._handleMouseUp(aEvent);
         break;
       case "mousedown":
         this._handleMouseDown(aEvent);
         break;
     }
   },
 
-  _handleMouseUp: function(aEvent) {
+  _handleMouseUp(aEvent) {
     let targetID = aEvent.currentTarget.id;
 
     switch (targetID) {
       case "PlacesToolbarItems":
         this._PlacesToolbarItemsMouseUp(aEvent);
         break;
       case "PlacesChevron":
         this._PlacesChevronMouseUp(aEvent);
@@ -376,51 +376,51 @@ this.BrowserUITelemetry = {
       case "menubar-items":
         this._menubarMouseUp(aEvent);
         break;
       default:
         this._checkForBuiltinItem(aEvent);
     }
   },
 
-  _handleMouseDown: function(aEvent) {
+  _handleMouseDown(aEvent) {
     if (aEvent.currentTarget.id == "PanelUI-menu-button") {
       // _countMouseUpEvent expects a detail for the second argument,
       // but we don't really have any details to give. Just passing in
       // "button" is probably simpler than trying to modify
       // _countMouseUpEvent for this particular case.
       this._countMouseUpEvent("click-menu-button", "button", aEvent.button);
     }
   },
 
-  _PlacesChevronMouseUp: function(aEvent) {
+  _PlacesChevronMouseUp(aEvent) {
     let target = aEvent.originalTarget;
     let result = target.id == "PlacesChevron" ? "chevron" : "overflowed-item";
     this._countMouseUpEvent("click-bookmarks-bar", result, aEvent.button);
   },
 
-  _PlacesToolbarItemsMouseUp: function(aEvent) {
+  _PlacesToolbarItemsMouseUp(aEvent) {
     let target = aEvent.originalTarget;
     // If this isn't a bookmark-item, we don't care about it.
     if (!target.classList.contains("bookmark-item")) {
       return;
     }
 
     let result = target.hasAttribute("container") ? "container" : "item";
     this._countMouseUpEvent("click-bookmarks-bar", result, aEvent.button);
   },
 
-  _menubarMouseUp: function(aEvent) {
+  _menubarMouseUp(aEvent) {
     let target = aEvent.originalTarget;
     let tag = target.localName
     let result = (tag == "menu" || tag == "menuitem") ? tag : "other";
     this._countMouseUpEvent("click-menubar", result, aEvent.button);
   },
 
-  _bookmarksMenuButtonMouseUp: function(aEvent) {
+  _bookmarksMenuButtonMouseUp(aEvent) {
     let bookmarksWidget = CustomizableUI.getWidget("bookmarks-menu-button");
     if (bookmarksWidget.areaType == CustomizableUI.TYPE_MENU_PANEL) {
       // In the menu panel, only the star is visible, and that opens up the
       // bookmarks subview.
       this._countMouseUpEvent("click-bookmarks-menu-button", "in-panel",
                               aEvent.button);
     } else {
       let clickedItem = aEvent.originalTarget;
@@ -436,17 +436,17 @@ this.BrowserUITelemetry = {
           bookmarksWidget.forWindow(aEvent.target.ownerGlobal).node;
         action = bookmarksMenuNode.hasAttribute("starred") ? "edit" : "add";
       }
       this._countMouseUpEvent("click-bookmarks-menu-button", action,
                               aEvent.button);
     }
   },
 
-  _checkForBuiltinItem: function(aEvent) {
+  _checkForBuiltinItem(aEvent) {
     let item = aEvent.originalTarget;
 
     // We don't want to count clicks on the private browsing
     // button for privacy reasons. See bug 1176391.
     if (item.id == "privatebrowsing-button") {
       return;
     }
 
@@ -477,17 +477,17 @@ this.BrowserUITelemetry = {
     // If not, we need to check if one of the ancestors of the clicked
     // item is in our list of built-in items to check.
     let candidate = getIDBasedOnFirstIDedAncestor(item);
     if (ALL_BUILTIN_ITEMS.indexOf(candidate) != -1) {
       this._countMouseUpEvent("click-builtin-item", candidate, aEvent.button);
     }
   },
 
-  _getWindowMeasurements: function(aWindow, searchResult) {
+  _getWindowMeasurements(aWindow, searchResult) {
     let document = aWindow.document;
     let result = {};
 
     // Determine if the window is in the maximized, normal or
     // fullscreen state.
     result.sizemode = document.documentElement.getAttribute("sizemode");
 
     // Determine if the Bookmarks bar is currently visible
@@ -577,112 +577,112 @@ this.BrowserUITelemetry = {
 
     if (Components.isSuccessCode(searchResult)) {
       result.currentSearchEngine = Services.search.currentEngine.name;
     }
 
     return result;
   },
 
-  getToolbarMeasures: function() {
+  getToolbarMeasures() {
     let result = this._firstWindowMeasurements || {};
     result.countableEvents = this._countableEvents;
     result.durations = this._durations;
     return result;
   },
 
-  getSyncState: function() {
+  getSyncState() {
     let result = {};
     for (let sub of ["desktop", "mobile"]) {
       let count = 0;
       try {
         count = Services.prefs.getIntPref("services.sync.clients.devices." + sub);
       } catch (ex) {}
       result[sub] = count;
     }
     return result;
   },
 
-  countCustomizationEvent: function(aEventType) {
+  countCustomizationEvent(aEventType) {
     this._countEvent(["customize", aEventType]);
   },
 
-  countSearchEvent: function(source, query, selection) {
+  countSearchEvent(source, query, selection) {
     this._countEvent(["search", source]);
     if ((/^[a-zA-Z]+:[^\/\\]/).test(query)) {
       this._countEvent(["search", "urlbar-keyword"]);
     }
     if (selection) {
       this._countEvent(["search", "selection", source, selection.index, selection.kind]);
     }
   },
 
-  countOneoffSearchEvent: function(id, type, where) {
+  countOneoffSearchEvent(id, type, where) {
     this._countEvent(["search-oneoff", id, type, where]);
   },
 
-  countSearchSettingsEvent: function(source) {
+  countSearchSettingsEvent(source) {
     this._countEvent(["click-builtin-item", source, "search-settings"]);
   },
 
-  countPanicEvent: function(timeId) {
+  countPanicEvent(timeId) {
     this._countEvent(["forget-button", timeId]);
   },
 
-  countTabMutingEvent: function(action, reason) {
+  countTabMutingEvent(action, reason) {
     this._countEvent(["tab-audio-control", action, reason || "no reason given"]);
   },
 
-  countSyncedTabEvent: function(what, where) {
+  countSyncedTabEvent(what, where) {
     // "what" will be, eg, "open"
     // "where" will be "toolbarbutton-subview" or "sidebar"
     this._countEvent(["synced-tabs", what, where]);
   },
 
-  countSidebarEvent: function(sidebarID, action) {
+  countSidebarEvent(sidebarID, action) {
     // sidebarID is the ID of the sidebar (duh!)
     // action will be "hide" or "show"
     this._countEvent(["sidebar", sidebarID, action]);
   },
 
-  _logAwesomeBarSearchResult: function(url) {
+  _logAwesomeBarSearchResult(url) {
     let spec = Services.search.parseSubmissionURL(url);
     if (spec.engine) {
       let matchedEngine = "default";
       if (spec.engine.name !== Services.search.currentEngine.name) {
         matchedEngine = "other";
       }
       this.countSearchEvent("autocomplete-" + matchedEngine);
     }
   },
 
   _durations: {
     customization: [],
   },
 
-  onCustomizeStart: function(aWindow) {
+  onCustomizeStart(aWindow) {
     this._countEvent(["customize", "start"]);
     let durationMap = WINDOW_DURATION_MAP.get(aWindow);
     if (!durationMap) {
       durationMap = {};
       WINDOW_DURATION_MAP.set(aWindow, durationMap);
     }
 
     durationMap.customization = {
       start: aWindow.performance.now(),
       bucket: this._bucket,
     };
   },
 
-  onCustomizeEnd: function(aWindow) {
+  onCustomizeEnd(aWindow) {
     let durationMap = WINDOW_DURATION_MAP.get(aWindow);
     if (durationMap && "customization" in durationMap) {
       let duration = aWindow.performance.now() - durationMap.customization.start;
       this._durations.customization.push({
-        duration: duration,
+        duration,
         bucket: durationMap.customization.bucket,
       });
       delete durationMap.customization;
     }
   },
 
   _contextMenuItemWhitelist: new Set([
     "close-without-interaction", // for closing the menu without clicking it.
@@ -715,17 +715,17 @@ this.BrowserUITelemetry = {
     "spell-add-dictionaries-main", "spell-dictionaries",
     "spell-dictionaries-menu", "spell-add-dictionaries",
     "bidi-text-direction-toggle", "bidi-page-direction-toggle", "inspect",
     "media-eme-learn-more"
   ]),
 
   _contextMenuInteractions: {},
 
-  registerContextMenuInteraction: function(keys, itemID) {
+  registerContextMenuInteraction(keys, itemID) {
     if (itemID) {
       if (itemID == "openlinkprivate") {
         // Don't record anything, not even an other-item count
         // if the user chose to open in a private window. See
         // bug 1176391.
         return;
       }
 
@@ -733,17 +733,17 @@ this.BrowserUITelemetry = {
         itemID = "other-item";
       }
       keys.push(itemID);
     }
 
     this._countEvent(keys, this._contextMenuInteractions);
   },
 
-  getContextMenuInfo: function() {
+  getContextMenuInfo() {
     return this._contextMenuInteractions;
   },
 
   _bucket: BUCKET_DEFAULT,
   _bucketTimer: null,
 
   /**
    * Default bucket name, when no other bucket is active.
@@ -772,17 +772,17 @@ this.BrowserUITelemetry = {
   },
 
   /**
    * Sets a named bucket for all countable events and select durections to be
    * put into.
    *
    * @param aName  Name of bucket, or null for default bucket name (__DEFAULT__)
    */
-  setBucket: function(aName) {
+  setBucket(aName) {
     if (this._bucketTimer) {
       Timer.clearTimeout(this._bucketTimer);
       this._bucketTimer = null;
     }
 
     if (aName)
       this._bucket = BUCKET_PREFIX + aName;
     else
@@ -815,17 +815,17 @@ this.BrowserUITelemetry = {
   * @param aTimeOffset Time offset, in milliseconds, from which to start
   *                    counting. For example, if the first time step is 1000ms,
   *                    and the time offset is 300ms, then the next time step
   *                    will become active after 700ms. This affects all
   *                    following time steps also, meaning they will also all be
   *                    timed as though they started expiring 300ms before
   *                    setExpiringBucket was called.
   */
-  setExpiringBucket: function(aName, aTimeSteps, aTimeOffset = 0) {
+  setExpiringBucket(aName, aTimeSteps, aTimeOffset = 0) {
     if (aTimeSteps.length === 0) {
       this.setBucket(null);
       return;
     }
 
     if (this._bucketTimer) {
       Timer.clearTimeout(this._bucketTimer);
       this._bucketTimer = null;
@@ -853,17 +853,17 @@ this.BrowserUITelemetry = {
    *   1000 => 1s
    *   60000 => 1m
    *   61000 => 1m01s
    *
    * @param aTimeMS  Time in milliseconds
    *
    * @return Minimal string representation.
    */
-  _toTimeStr: function(aTimeMS) {
+  _toTimeStr(aTimeMS) {
     let timeStr = "";
 
     function reduce(aUnitLength, aSymbol) {
       if (aTimeMS >= aUnitLength) {
         let units = Math.floor(aTimeMS / aUnitLength);
         aTimeMS = aTimeMS - (units * aUnitLength)
         timeStr += units + aSymbol;
       }
--- a/browser/modules/CastingApps.jsm
+++ b/browser/modules/CastingApps.jsm
@@ -7,27 +7,27 @@ this.EXPORTED_SYMBOLS = ["CastingApps"];
 
 const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/SimpleServiceDiscovery.jsm");
 
 
 var CastingApps = {
-  _sendEventToVideo: function(element, data) {
+  _sendEventToVideo(element, data) {
     let event = element.ownerDocument.createEvent("CustomEvent");
     event.initCustomEvent("media-videoCasting", false, true, JSON.stringify(data));
     element.dispatchEvent(event);
   },
 
-  makeURI: function(url, charset, baseURI) {
+  makeURI(url, charset, baseURI) {
     return Services.io.newURI(url, charset, baseURI);
   },
 
-  getVideo: function(element) {
+  getVideo(element) {
     if (!element) {
       return null;
     }
 
     let extensions = SimpleServiceDiscovery.getSupportedExtensions();
     let types = SimpleServiceDiscovery.getSupportedMimeTypes();
 
     // Grab the poster attribute from the <video>
@@ -40,37 +40,37 @@ var CastingApps = {
     if (!sourceURL) {
       sourceURL = element.currentSrc;
     }
 
     if (sourceURL) {
       // Use the file extension to guess the mime type
       let sourceURI = this.makeURI(sourceURL, null, this.makeURI(element.baseURI));
       if (this.allowableExtension(sourceURI, extensions)) {
-        return { element: element, source: sourceURI.spec, poster: posterURL, sourceURI: sourceURI};
+        return { element, source: sourceURI.spec, poster: posterURL, sourceURI};
       }
     }
 
     // Next, look to see if there is a <source> child element that meets
     // our needs
     let sourceNodes = element.getElementsByTagName("source");
     for (let sourceNode of sourceNodes) {
       let sourceURI = this.makeURI(sourceNode.src, null, this.makeURI(sourceNode.baseURI));
 
       // Using the type attribute is our ideal way to guess the mime type. Otherwise,
       // fallback to using the file extension to guess the mime type
       if (this.allowableMimeType(sourceNode.type, types) || this.allowableExtension(sourceURI, extensions)) {
-        return { element: element, source: sourceURI.spec, poster: posterURL, sourceURI: sourceURI, type: sourceNode.type };
+        return { element, source: sourceURI.spec, poster: posterURL, sourceURI, type: sourceNode.type };
       }
     }
 
     return null;
   },
 
-  sendVideoToService: function(videoElement, service) {
+  sendVideoToService(videoElement, service) {
     if (!service)
       return;
 
     let video = this.getVideo(videoElement);
     if (!video) {
       return;
     }
 
@@ -96,69 +96,69 @@ var CastingApps = {
 
         app.remoteMedia(remoteMedia => {
           if (!remoteMedia) {
             Cu.reportError("CastingApps: Failed to create remotemedia");
             return;
           }
 
           this.session = {
-            service: service,
-            app: app,
-            remoteMedia: remoteMedia,
+            service,
+            app,
+            remoteMedia,
             data: {
               title: video.title,
               source: video.source,
               poster: video.poster
             },
             videoRef: Cu.getWeakReference(video.element)
           };
         }, this);
       });
     });
   },
 
-  getServicesForVideo: function(videoElement) {
+  getServicesForVideo(videoElement) {
     let video = this.getVideo(videoElement);
     if (!video) {
       return {};
     }
 
     let filteredServices = SimpleServiceDiscovery.services.filter(service => {
       return this.allowableExtension(video.sourceURI, service.extensions) ||
              this.allowableMimeType(video.type, service.types);
     });
 
     return filteredServices;
   },
 
-  getServicesForMirroring: function() {
+  getServicesForMirroring() {
     return SimpleServiceDiscovery.services.filter(service => service.mirror);
   },
 
   // RemoteMedia callback API methods
-  onRemoteMediaStart: function(remoteMedia) {
+  onRemoteMediaStart(remoteMedia) {
     if (!this.session) {
       return;
     }
 
     remoteMedia.load(this.session.data);
 
     let video = this.session.videoRef.get();
     if (video) {
       this._sendEventToVideo(video, { active: true });
     }
   },
 
-  onRemoteMediaStop: function(remoteMedia) {
+  onRemoteMediaStop(remoteMedia) {
   },
 
-  onRemoteMediaStatus: function(remoteMedia) {
+  onRemoteMediaStatus(remoteMedia) {
   },
 
-  allowableExtension: function(uri, extensions) {
+  allowableExtension(uri, extensions) {
     return (uri instanceof Ci.nsIURL) && extensions.indexOf(uri.fileExtension) != -1;
   },
 
-  allowableMimeType: function(type, types) {
+  allowableMimeType(type, types) {
     return types.indexOf(type) != -1;
   }
 };
--- a/browser/modules/ContentClick.jsm
+++ b/browser/modules/ContentClick.jsm
@@ -11,30 +11,30 @@ var Cu = Components.utils;
 
 this.EXPORTED_SYMBOLS = [ "ContentClick" ];
 
 Cu.import("resource:///modules/PlacesUIUtils.jsm");
 Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 
 var ContentClick = {
-  init: function() {
+  init() {
     let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
     mm.addMessageListener("Content:Click", this);
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     switch (message.name) {
       case "Content:Click":
         this.contentAreaClick(message.json, message.target)
         break;
     }
   },
 
-  contentAreaClick: function(json, browser) {
+  contentAreaClick(json, browser) {
     // This is heavily based on contentAreaClick from browser.js (Bug 903016)
     // The json is set up in a way to look like an Event.
     let window = browser.ownerGlobal;
 
     if (!json.href) {
       // Might be middle mouse navigation.
       if (Services.prefs.getBoolPref("middlemouse.contentLoadURL") &&
           !Services.prefs.getBoolPref("general.autoScroll")) {
--- a/browser/modules/ContentCrashHandlers.jsm
+++ b/browser/modules/ContentCrashHandlers.jsm
@@ -50,17 +50,17 @@ this.TabCrashHandler = {
   unseenCrashedChildIDs: [],
   crashedBrowserQueues: new Map(),
 
   get prefs() {
     delete this.prefs;
     return this.prefs = Services.prefs.getBranch("browser.tabs.crashReporting.");
   },
 
-  init: function() {
+  init() {
     if (this.initialized)
       return;
     this.initialized = true;
 
     Services.obs.addObserver(this, "ipc:content-shutdown", false);
     Services.obs.addObserver(this, "oop-frameloader-crashed", false);
 
     this.pageListener = new RemotePages("about:tabcrashed");
@@ -69,17 +69,17 @@ this.TabCrashHandler = {
     // finished running.
     this.pageListener.addMessageListener("Load", this.receiveMessage.bind(this));
     this.pageListener.addMessageListener("RemotePage:Unload", this.receiveMessage.bind(this));
     this.pageListener.addMessageListener("closeTab", this.receiveMessage.bind(this));
     this.pageListener.addMessageListener("restoreTab", this.receiveMessage.bind(this));
     this.pageListener.addMessageListener("restoreAll", this.receiveMessage.bind(this));
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "ipc:content-shutdown": {
         aSubject.QueryInterface(Ci.nsIPropertyBag2);
 
         if (!aSubject.get("abnormal")) {
           return;
         }
 
@@ -135,17 +135,17 @@ this.TabCrashHandler = {
         }
 
         this.browserMap.set(browser.permanentKey, aSubject.childID);
         break;
       }
     }
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     let browser = message.target.browser;
     let gBrowser = browser.ownerGlobal.gBrowser;
     let tab = gBrowser.getTabForBrowser(browser);
 
     switch (message.name) {
       case "Load": {
         this.onAboutTabCrashedLoad(message);
         break;
@@ -395,17 +395,17 @@ this.TabCrashHandler = {
     } else {
       this.prefs.setCharPref("email", "");
     }
 
     this.childMap.set(childID, null); // Avoid resubmission.
     this.removeSubmitCheckboxesForSameCrash(childID);
   },
 
-  removeSubmitCheckboxesForSameCrash: function(childID) {
+  removeSubmitCheckboxesForSameCrash(childID) {
     let enumerator = Services.wm.getEnumerator("navigator:browser");
     while (enumerator.hasMoreElements()) {
       let window = enumerator.getNext();
       if (!window.gMultiProcessBrowser)
         continue;
 
       for (let browser of window.gBrowser.browsers) {
         if (browser.isRemoteBrowser)
@@ -423,17 +423,17 @@ this.TabCrashHandler = {
             // assume sending to the first port is sufficient.
             ports[0].sendAsyncMessage("CrashReportSent");
           }
         }
       }
     }
   },
 
-  onAboutTabCrashedLoad: function(message) {
+  onAboutTabCrashedLoad(message) {
     this._crashedTabCount++;
 
     // Broadcast to all about:tabcrashed pages a count of
     // how many about:tabcrashed pages exist, so that they
     // can decide whether or not to display the "Restore All
     // Crashed Tabs" button.
     this.pageListener.sendAsyncMessage("UpdateCount", {
       count: this._crashedTabCount,
@@ -829,17 +829,17 @@ this.UnsubmittedCrashHandler = {
         this.submitReports(reportIDs);
         if (onAction) {
           onAction();
         }
       },
     },
     {
       label: gNavigatorBundle.GetStringFromName("pendingCrashReports.viewAll"),
-      callback: function() {
+      callback() {
         chromeWin.openUILinkIn("about:crashes", "tab");
         return true;
       },
     }];
 
     let eventCallback = (eventType) => {
       if (eventType == "dismissed") {
         // The user intentionally dismissed the notification,
--- a/browser/modules/ContentLinkHandler.jsm
+++ b/browser/modules/ContentLinkHandler.jsm
@@ -22,26 +22,26 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 const SIZES_TELEMETRY_ENUM = {
   NO_SIZES: 0,
   ANY: 1,
   DIMENSION: 2,
   INVALID: 3,
 };
 
 this.ContentLinkHandler = {
-  init: function(chromeGlobal) {
+  init(chromeGlobal) {
     chromeGlobal.addEventListener("DOMLinkAdded", (event) => {
       this.onLinkEvent(event, chromeGlobal);
     }, false);
     chromeGlobal.addEventListener("DOMLinkChanged", (event) => {
       this.onLinkEvent(event, chromeGlobal);
     }, false);
   },
 
-  onLinkEvent: function(event, chromeGlobal) {
+  onLinkEvent(event, chromeGlobal) {
     var link = event.originalTarget;
     var rel = link.rel && link.rel.toLowerCase();
     if (!link || !link.ownerDocument || !rel || !link.href)
       return;
 
     // Ignore sub-frames (bugs 305472, 479408).
     let window = link.ownerGlobal;
     if (window != window.top)
@@ -119,27 +119,27 @@ this.ContentLinkHandler = {
             type = type.replace(/^\s+|\s*(?:;.*)?$/g, "");
 
             let re = /^(?:https?|ftp):/i;
             if (type == "application/opensearchdescription+xml" && link.title &&
                 re.test(link.href))
             {
               let engine = { title: link.title, href: link.href };
               chromeGlobal.sendAsyncMessage("Link:AddSearch",
-                                            {engine: engine,
+                                            {engine,
                                              url: link.ownerDocument.documentURI});
               searchAdded = true;
             }
           }
           break;
       }
     }
   },
 
-  getLinkIconURI: function(aLink) {
+  getLinkIconURI(aLink) {
     let targetDoc = aLink.ownerDocument;
     var uri = BrowserUtils.makeURI(aLink.href, targetDoc.characterSet);
     try {
       uri.userPass = "";
     } catch (e) {
       // some URIs are immutable
     }
     return uri;
--- a/browser/modules/ContentSearch.jsm
+++ b/browser/modules/ContentSearch.jsm
@@ -103,17 +103,17 @@ this.ContentSearch = {
 
   // Resolved when we finish shutting down.
   _destroyedPromise: null,
 
   // The current controller and browser in _onMessageGetSuggestions.  Allows
   // fetch cancellation from _cancelSuggestions.
   _currentSuggestion: null,
 
-  init: function() {
+  init() {
     Cc["@mozilla.org/globalmessagemanager;1"].
       getService(Ci.nsIMessageListenerManager).
       addMessageListener(INBOUND_MESSAGE, this);
     Services.obs.addObserver(this, "browser-search-engine-modified", false);
     Services.obs.addObserver(this, "shutdown-leaks-before-check", false);
     Services.prefs.addObserver("browser.search.hiddenOneOffs", this, false);
     this._stringBundle = Services.strings.createBundle("chrome://global/locale/autocomplete.properties");
   },
@@ -128,17 +128,17 @@ this.ContentSearch = {
                        "searchWithHeader", "searchSettings"];
 
     for (let name of stringNames) {
       this._searchSuggestionUIStrings[name] = searchBundle.GetStringFromName(name);
     }
     return this._searchSuggestionUIStrings;
   },
 
-  destroy: function() {
+  destroy() {
     if (this._destroyedPromise) {
       return this._destroyedPromise;
     }
 
     Cc["@mozilla.org/globalmessagemanager;1"].
       getService(Ci.nsIMessageListenerManager).
       removeMessageListener(INBOUND_MESSAGE, this);
     Services.obs.removeObserver(this, "browser-search-engine-modified");
@@ -149,23 +149,23 @@ this.ContentSearch = {
     return this._destroyedPromise;
   },
 
   /**
    * Focuses the search input in the page with the given message manager.
    * @param  messageManager
    *         The MessageManager object of the selected browser.
    */
-  focusInput: function(messageManager) {
+  focusInput(messageManager) {
     messageManager.sendAsyncMessage(OUTBOUND_MESSAGE, {
       type: "FocusInput"
     });
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     // Add a temporary event handler that exists only while the message is in
     // the event queue.  If the message's source docshell changes browsers in
     // the meantime, then we need to update msg.target.  event.detail will be
     // the docshell's new parent <xul:browser> element.
     msg.handleEvent = event => {
       let browserData = this._suggestionMap.get(msg.target);
       if (browserData) {
         this._suggestionMap.delete(msg.target);
@@ -185,47 +185,47 @@ this.ContentSearch = {
 
     this._eventQueue.push({
       type: "Message",
       data: msg,
     });
     this._processEventQueue();
   },
 
-  observe: function(subj, topic, data) {
+  observe(subj, topic, data) {
     switch (topic) {
     case "nsPref:changed":
     case "browser-search-engine-modified":
       this._eventQueue.push({
         type: "Observe",
-        data: data,
+        data,
       });
       this._processEventQueue();
       break;
     case "shutdown-leaks-before-check":
       subj.wrappedJSObject.client.addBlocker(
         "ContentSearch: Wait until the service is destroyed", () => this.destroy());
       break;
     }
   },
 
-  removeFormHistoryEntry: function(msg, entry) {
+  removeFormHistoryEntry(msg, entry) {
     let browserData = this._suggestionDataForBrowser(msg.target);
     if (browserData && browserData.previousFormHistoryResult) {
       let { previousFormHistoryResult } = browserData;
       for (let i = 0; i < previousFormHistoryResult.matchCount; i++) {
         if (previousFormHistoryResult.getValueAt(i) === entry) {
           previousFormHistoryResult.removeValueAt(i, true);
           break;
         }
       }
     }
   },
 
-  performSearch: function(msg, data) {
+  performSearch(msg, data) {
     this._ensureDataHasProperties(data, [
       "engineName",
       "searchString",
       "healthReportKey",
       "searchPurpose",
     ]);
     let engine = Services.search.getEngineByName(data.engineName);
     let submission = engine.getSubmission(data.searchString, "", data.searchPurpose);
@@ -268,17 +268,17 @@ this.ContentSearch = {
     let browserData = this._suggestionDataForBrowser(browser, true);
     let { controller } = browserData;
     let ok = SearchSuggestionController.engineOffersSuggestions(engine);
     controller.maxLocalResults = ok ? MAX_LOCAL_SUGGESTIONS : MAX_SUGGESTIONS;
     controller.maxRemoteResults = ok ? MAX_SUGGESTIONS : 0;
     let priv = PrivateBrowsingUtils.isBrowserPrivate(browser);
     // fetch() rejects its promise if there's a pending request, but since we
     // process our event queue serially, there's never a pending request.
-    this._currentSuggestion = { controller: controller, target: browser };
+    this._currentSuggestion = { controller, target: browser };
     let suggestions = yield controller.fetch(searchString, priv, engine);
     this._currentSuggestion = null;
 
     // suggestions will be null if the request was cancelled
     let result = {};
     if (!suggestions) {
       return result;
     }
@@ -345,17 +345,17 @@ this.ContentSearch = {
         name: engine.name,
         iconBuffer,
         hidden: hiddenList.indexOf(engine.name) !== -1,
       });
     }
     return state;
   }),
 
-  _processEventQueue: function() {
+  _processEventQueue() {
     if (this._currentEventPromise || !this._eventQueue.length) {
       return;
     }
 
     let event = this._eventQueue.shift();
 
     this._currentEventPromise = Task.spawn(function* () {
       try {
@@ -364,17 +364,17 @@ this.ContentSearch = {
         Cu.reportError(err);
       } finally {
         this._currentEventPromise = null;
         this._processEventQueue();
       }
     }.bind(this));
   },
 
-  _cancelSuggestions: function(msg) {
+  _cancelSuggestions(msg) {
     let cancelled = false;
     // cancel active suggestion request
     if (this._currentSuggestion && this._currentSuggestion.target === msg.target) {
       this._currentSuggestion.controller.stop();
       cancelled = true;
     }
     // cancel queued suggestion requests
     for (let i = 0; i < this._eventQueue.length; i++) {
@@ -396,35 +396,35 @@ this.ContentSearch = {
       yield this._initService();
       yield this[methodName](msg, msg.data.data);
       if (!Cu.isDeadWrapper(msg.target)) {
         msg.target.removeEventListener("SwapDocShells", msg, true);
       }
     }
   }),
 
-  _onMessageGetState: function(msg, data) {
+  _onMessageGetState(msg, data) {
     return this.currentStateObj().then(state => {
       this._reply(msg, "State", state);
     });
   },
 
-  _onMessageGetStrings: function(msg, data) {
+  _onMessageGetStrings(msg, data) {
     this._reply(msg, "Strings", this.searchSuggestionUIStrings);
   },
 
-  _onMessageSearch: function(msg, data) {
+  _onMessageSearch(msg, data) {
     this.performSearch(msg, data);
   },
 
-  _onMessageSetCurrentEngine: function(msg, data) {
+  _onMessageSetCurrentEngine(msg, data) {
     Services.search.currentEngine = Services.search.getEngineByName(data);
   },
 
-  _onMessageManageEngines: function(msg, data) {
+  _onMessageManageEngines(msg, data) {
     let browserWin = msg.target.ownerGlobal;
     browserWin.openPreferences("paneSearch");
   },
 
   _onMessageGetSuggestions: Task.async(function* (msg, data) {
     this._ensureDataHasProperties(data, [
       "engineName",
       "searchString",
@@ -439,21 +439,21 @@ this.ContentSearch = {
       remote: suggestions.remote,
     });
   }),
 
   _onMessageAddFormHistoryEntry: Task.async(function* (msg, entry) {
     yield this.addFormHistoryEntry(msg, entry);
   }),
 
-  _onMessageRemoveFormHistoryEntry: function(msg, entry) {
+  _onMessageRemoveFormHistoryEntry(msg, entry) {
     this.removeFormHistoryEntry(msg, entry);
   },
 
-  _onMessageSpeculativeConnect: function(msg, engineName) {
+  _onMessageSpeculativeConnect(msg, engineName) {
     let engine = Services.search.getEngineByName(engineName);
     if (!engine) {
       throw new Error("Unknown engine name: " + engineName);
     }
     if (msg.target.contentWindow) {
       engine.speculativeConnect({
         window: msg.target.contentWindow,
       });
@@ -468,65 +468,65 @@ this.ContentSearch = {
     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: function(browser, create = false) {
+  _suggestionDataForBrowser(browser, create = false) {
     let data = this._suggestionMap.get(browser);
     if (!data && create) {
       // Since one SearchSuggestionController instance is meant to be used per
       // autocomplete widget, this means that we assume each xul:browser has at
       // most one such widget.
       data = {
         controller: new SearchSuggestionController(),
       };
       this._suggestionMap.set(browser, data);
     }
     return data;
   },
 
-  _reply: function(msg, type, data) {
+  _reply(msg, type, data) {
     // We reply asyncly to messages, and by the time we reply the browser we're
     // responding to may have been destroyed.  messageManager is null then.
     if (!Cu.isDeadWrapper(msg.target) && msg.target.messageManager) {
       msg.target.messageManager.sendAsyncMessage(...this._msgArgs(type, data));
     }
   },
 
-  _broadcast: function(type, data) {
+  _broadcast(type, data) {
     Cc["@mozilla.org/globalmessagemanager;1"].
       getService(Ci.nsIMessageListenerManager).
       broadcastAsyncMessage(...this._msgArgs(type, data));
   },
 
-  _msgArgs: function(type, data) {
+  _msgArgs(type, data) {
     return [OUTBOUND_MESSAGE, {
-      type: type,
-      data: data,
+      type,
+      data,
     }];
   },
 
   _currentEngineObj: Task.async(function* () {
     let engine = Services.search.currentEngine;
     let favicon = engine.getIconURLBySize(16, 16);
     let placeholder = this._stringBundle.formatStringFromName(
       "searchWithEngine", [engine.name], 1);
     let obj = {
       name: engine.name,
-      placeholder: placeholder,
+      placeholder,
       iconBuffer: yield this._arrayBufferFromDataURI(favicon),
     };
     return obj;
   }),
 
-  _arrayBufferFromDataURI: function(uri) {
+  _arrayBufferFromDataURI(uri) {
     if (!uri) {
       return Promise.resolve(null);
     }
     let deferred = Promise.defer();
     let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
               createInstance(Ci.nsIXMLHttpRequest);
     xhr.open("GET", uri, true);
     xhr.responseType = "arraybuffer";
@@ -541,25 +541,25 @@ this.ContentSearch = {
       xhr.send();
     }
     catch (err) {
       return Promise.resolve(null);
     }
     return deferred.promise;
   },
 
-  _ensureDataHasProperties: function(data, requiredProperties) {
+  _ensureDataHasProperties(data, requiredProperties) {
     for (let prop of requiredProperties) {
       if (!(prop in data)) {
         throw new Error("Message data missing required property: " + prop);
       }
     }
   },
 
-  _initService: function() {
+  _initService() {
     if (!this._initServicePromise) {
       let deferred = Promise.defer();
       this._initServicePromise = deferred.promise;
       Services.search.init(() => deferred.resolve());
     }
     return this._initServicePromise;
   },
 };
--- a/browser/modules/ContentWebRTC.jsm
+++ b/browser/modules/ContentWebRTC.jsm
@@ -14,55 +14,55 @@ XPCOMUtils.defineLazyServiceGetter(this,
                                    "@mozilla.org/mediaManagerService;1",
                                    "nsIMediaManagerService");
 
 const kBrowserURL = "chrome://browser/content/browser.xul";
 
 this.ContentWebRTC = {
   _initialized: false,
 
-  init: function() {
+  init() {
     if (this._initialized)
       return;
 
     this._initialized = true;
     Services.obs.addObserver(handleGUMRequest, "getUserMedia:request", false);
     Services.obs.addObserver(handlePCRequest, "PeerConnection:request", false);
     Services.obs.addObserver(updateIndicators, "recording-device-events", false);
     Services.obs.addObserver(removeBrowserSpecificIndicator, "recording-window-ended", false);
 
     if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT)
       Services.obs.addObserver(processShutdown, "content-child-shutdown", false);
   },
 
-  uninit: function() {
+  uninit() {
     Services.obs.removeObserver(handleGUMRequest, "getUserMedia:request");
     Services.obs.removeObserver(handlePCRequest, "PeerConnection:request");
     Services.obs.removeObserver(updateIndicators, "recording-device-events");
     Services.obs.removeObserver(removeBrowserSpecificIndicator, "recording-window-ended");
 
     if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT)
       Services.obs.removeObserver(processShutdown, "content-child-shutdown");
 
     this._initialized = false;
   },
 
   // Called only for 'unload' to remove pending gUM prompts in reloaded frames.
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     let contentWindow = aEvent.target.defaultView;
     let mm = getMessageManagerForWindow(contentWindow);
     for (let key of contentWindow.pendingGetUserMediaRequests.keys()) {
       mm.sendAsyncMessage("webrtc:CancelRequest", key);
     }
     for (let key of contentWindow.pendingPeerConnectionRequests.keys()) {
       mm.sendAsyncMessage("rtcpeer:CancelRequest", key);
     }
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     switch (aMessage.name) {
       case "rtcpeer:Allow":
       case "rtcpeer:Deny": {
         let callID = aMessage.data.callID;
         let contentWindow = Services.wm.getOuterWindowWithId(aMessage.data.windowID);
         forgetPCRequest(contentWindow, callID);
         let topic = (aMessage.name == "rtcpeer:Allow") ? "PeerConnection:response:allow" :
                                                          "PeerConnection:response:deny";
@@ -110,19 +110,19 @@ function handlePCRequest(aSubject, aTopi
   }
 
   if (!contentWindow.pendingPeerConnectionRequests) {
     setupPendingListsInitially(contentWindow);
   }
   contentWindow.pendingPeerConnectionRequests.add(callID);
 
   let request = {
-    windowID: windowID,
-    innerWindowID: innerWindowID,
-    callID: callID,
+    windowID,
+    innerWindowID,
+    callID,
     documentURI: contentWindow.document.documentURI,
     secure: isSecure,
   };
   mm.sendAsyncMessage("rtcpeer:Request", request);
 }
 
 function handleGUMRequest(aSubject, aTopic, aData) {
   let constraints = aSubject.getConstraints();
@@ -205,21 +205,21 @@ function prompt(aContentWindow, aWindowI
   }
   aContentWindow.pendingGetUserMediaRequests.set(aCallID, devices);
 
   let request = {
     callID: aCallID,
     windowID: aWindowID,
     documentURI: aContentWindow.document.documentURI,
     secure: aSecure,
-    requestTypes: requestTypes,
-    sharingScreen: sharingScreen,
-    sharingAudio: sharingAudio,
-    audioDevices: audioDevices,
-    videoDevices: videoDevices
+    requestTypes,
+    sharingScreen,
+    sharingAudio,
+    audioDevices,
+    videoDevices
   };
 
   let mm = getMessageManagerForWindow(aContentWindow);
   mm.sendAsyncMessage("webrtc:Request", request);
 }
 
 function denyGUMRequest(aData, aError) {
   let msg = null;
--- a/browser/modules/DirectoryLinksProvider.jsm
+++ b/browser/modules/DirectoryLinksProvider.jsm
@@ -263,17 +263,17 @@ var DirectoryLinksProvider = {
 
   _removePrefsObserver: function DirectoryLinksProvider_removeObserver() {
     for (let pref in this._observedPrefs) {
       let prefName = this._observedPrefs[pref];
       Services.prefs.removeObserver(prefName, this);
     }
   },
 
-  _cacheSuggestedLinks: function(link) {
+  _cacheSuggestedLinks(link) {
     // Don't cache links that don't have the expected 'frecent_sites'
     if (!link.frecent_sites) {
       return;
     }
 
     for (let suggestedSite of link.frecent_sites) {
       let suggestedMap = this._suggestedLinks.get(suggestedSite) || new Map();
       suggestedMap.set(link.url, link);
@@ -724,32 +724,32 @@ var DirectoryLinksProvider = {
       yield this._readFrequencyCapFile();
       // fetch directory on startup without force
       yield this._fetchAndCacheLinksIfNecessary();
       // fecth inadjacent sites on startup
       yield this._loadInadjacentSites();
     }.bind(this));
   },
 
-  _handleManyLinksChanged: function() {
+  _handleManyLinksChanged() {
     this._topSitesWithSuggestedLinks.clear();
     this._suggestedLinks.forEach((suggestedLinks, site) => {
       if (NewTabUtils.isTopPlacesSite(site)) {
         this._topSitesWithSuggestedLinks.add(site);
       }
     });
     this._updateSuggestedTile();
   },
 
   /**
    * Updates _topSitesWithSuggestedLinks based on the link that was changed.
    *
    * @return true if _topSitesWithSuggestedLinks was modified, false otherwise.
    */
-  _handleLinkChanged: function(aLink) {
+  _handleLinkChanged(aLink) {
     let changedLinkSite = NewTabUtils.extractSite(aLink.url);
     let linkStored = this._topSitesWithSuggestedLinks.has(changedLinkSite);
 
     if (!NewTabUtils.isTopPlacesSite(changedLinkSite) && linkStored) {
       this._topSitesWithSuggestedLinks.delete(changedLinkSite);
       return true;
     }
 
@@ -763,71 +763,71 @@ var DirectoryLinksProvider = {
     // and there are tiles configured to avoid it
     if (this._avoidInadjacentSites && this._isInadjacentLink(aLink)) {
       return true;
     }
 
     return false;
   },
 
-  _populatePlacesLinks: function() {
+  _populatePlacesLinks() {
     NewTabUtils.links.populateProviderCache(NewTabUtils.placesProvider, () => {
       this._handleManyLinksChanged();
     });
   },
 
-  onDeleteURI: function(aProvider, aLink) {
+  onDeleteURI(aProvider, aLink) {
     let {url} = aLink;
     // remove clicked flag for that url and
     // call observer upon disk write completion
     this._removeTileClick(url).then(() => {
       this._callObservers("onDeleteURI", url);
     });
   },
 
-  onClearHistory: function() {
+  onClearHistory() {
     // remove all clicked flags and call observers upon file write
     this._removeAllTileClicks().then(() => {
       this._callObservers("onClearHistory");
     });
   },
 
-  onLinkChanged: function(aProvider, aLink) {
+  onLinkChanged(aProvider, aLink) {
     // Make sure NewTabUtils.links handles the notification first.
     setTimeout(() => {
       if (this._handleLinkChanged(aLink) || this._shouldUpdateSuggestedTile()) {
         this._updateSuggestedTile();
       }
     }, 0);
   },
 
-  onManyLinksChanged: function() {
+  onManyLinksChanged() {
     // Make sure NewTabUtils.links handles the notification first.
     setTimeout(() => {
       this._handleManyLinksChanged();
     }, 0);
   },
 
-  _getCurrentTopSiteCount: function() {
+  _getCurrentTopSiteCount() {
     let visibleTopSiteCount = 0;
     let newTabLinks = NewTabUtils.links.getLinks();
     for (let link of newTabLinks.slice(0, MIN_VISIBLE_HISTORY_TILES)) {
       // compute visibleTopSiteCount for suggested tiles
       if (link && (link.type == "history" || link.type == "enhanced")) {
         visibleTopSiteCount++;
       }
     }
     // since newTabLinks are available, set _newTabHasInadjacentSite here
     // note that _shouldUpdateSuggestedTile is called by _updateSuggestedTile
     this._newTabHasInadjacentSite = this._avoidInadjacentSites && this._checkForInadjacentSites(newTabLinks);
 
     return visibleTopSiteCount;
   },
 
-  _shouldUpdateSuggestedTile: function() {
+  _shouldUpdateSuggestedTile() {
     let sortedLinks = NewTabUtils.getProviderLinks(this);
 
     let mostFrecentLink = {};
     if (sortedLinks && sortedLinks.length) {
       mostFrecentLink = sortedLinks[0]
     }
 
     let currTopSiteCount = this._getCurrentTopSiteCount();
@@ -845,17 +845,17 @@ var DirectoryLinksProvider = {
   },
 
   /**
    * Chooses and returns a suggested tile based on a user's top sites
    * that we have an available suggested tile for.
    *
    * @return the chosen suggested tile, or undefined if there isn't one
    */
-  _updateSuggestedTile: function() {
+  _updateSuggestedTile() {
     let sortedLinks = NewTabUtils.getProviderLinks(this);
 
     if (!sortedLinks) {
       // If NewTabUtils.links.resetCache() is called before getting here,
       // sortedLinks may be undefined.
       return undefined;
     }
 
@@ -1244,12 +1244,12 @@ var DirectoryLinksProvider = {
           obs[methodName](this, ...args);
         } catch (err) {
           Cu.reportError(err);
         }
       }
     }
   },
 
-  _removeObservers: function() {
+  _removeObservers() {
     this._observers.clear();
   }
 };
--- a/browser/modules/E10SUtils.jsm
+++ b/browser/modules/E10SUtils.jsm
@@ -41,23 +41,23 @@ function validatedWebRemoteType(aPreferr
 }
 
 this.E10SUtils = {
   DEFAULT_REMOTE_TYPE,
   NOT_REMOTE,
   WEB_REMOTE_TYPE,
   FILE_REMOTE_TYPE,
 
-  canLoadURIInProcess: function(aURL, aProcess) {
+  canLoadURIInProcess(aURL, aProcess) {
     let remoteType = aProcess == Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT
                      ? DEFAULT_REMOTE_TYPE : NOT_REMOTE;
     return remoteType == this.getRemoteTypeForURI(aURL, true, remoteType);
   },
 
-  getRemoteTypeForURI: function(aURL, aMultiProcess,
+  getRemoteTypeForURI(aURL, aMultiProcess,
                                 aPreferredRemoteType = DEFAULT_REMOTE_TYPE) {
     if (!aMultiProcess) {
       return NOT_REMOTE;
     }
 
     // loadURI in browser.xml treats null as about:blank
     if (!aURL) {
       aURL = "about:blank";
@@ -138,31 +138,31 @@ this.E10SUtils = {
     if (aURL.startsWith("view-source:")) {
       return this.getRemoteTypeForURI(aURL.substr("view-source:".length),
                                       aMultiProcess, aPreferredRemoteType);
     }
 
     return validatedWebRemoteType(aPreferredRemoteType);
   },
 
-  shouldLoadURIInThisProcess: function(aURI) {
+  shouldLoadURIInThisProcess(aURI) {
     let remoteType = Services.appinfo.remoteType;
     return remoteType == this.getRemoteTypeForURI(aURI.spec, true, remoteType);
   },
 
-  shouldLoadURI: function(aDocShell, aURI, aReferrer) {
+  shouldLoadURI(aDocShell, aURI, aReferrer) {
     // Inner frames should always load in the current process
     if (aDocShell.QueryInterface(Ci.nsIDocShellTreeItem).sameTypeParent)
       return true;
 
     // If the URI can be loaded in the current process then continue
     return this.shouldLoadURIInThisProcess(aURI);
   },
 
-  redirectLoad: function(aDocShell, aURI, aReferrer, aFreshProcess) {
+  redirectLoad(aDocShell, aURI, aReferrer, aFreshProcess) {
     // Retarget the load to the correct process
     let messageManager = aDocShell.QueryInterface(Ci.nsIInterfaceRequestor)
                                   .getInterface(Ci.nsIContentFrameMessageManager);
     let sessionHistory = aDocShell.getInterface(Ci.nsIWebNavigation).sessionHistory;
 
     messageManager.sendAsyncMessage("Browser:LoadURI", {
       loadOptions: {
         uri: aURI.spec,
@@ -170,17 +170,17 @@ this.E10SUtils = {
         referrer: aReferrer ? aReferrer.spec : null,
         reloadInFreshProcess: !!aFreshProcess,
       },
       historyIndex: sessionHistory.requestedIndex,
     });
     return false;
   },
 
-  wrapHandlingUserInput: function(aWindow, aIsHandling, aCallback) {
+  wrapHandlingUserInput(aWindow, aIsHandling, aCallback) {
     var handlingUserInput;
     try {
       handlingUserInput = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                                  .getInterface(Ci.nsIDOMWindowUtils)
                                  .setHandlingUserInput(aIsHandling);
       aCallback();
     } finally {
       handlingUserInput.destruct();
--- a/browser/modules/Feeds.jsm
+++ b/browser/modules/Feeds.jsm
@@ -67,17 +67,17 @@ this.Feeds = {
    * @param  aLink
    *         An object representing a feed with title, href and type.
    * @param  aPrincipal
    *         The principal of the document, used for security check.
    * @param  aIsFeed
    *         Whether this is already a known feed or not, if true only a security
    *         check will be performed.
    */
-  isValidFeed: function(aLink, aPrincipal, aIsFeed) {
+  isValidFeed(aLink, aPrincipal, aIsFeed) {
     if (!aLink || !aPrincipal)
       return false;
 
     var type = aLink.type.toLowerCase().replace(/^\s+|\s*(?:;.*)?$/g, "");
     if (!aIsFeed) {
       aIsFeed = (type == "application/rss+xml" ||
                  type == "application/atom+xml");
     }
--- a/browser/modules/FormSubmitObserver.jsm
+++ b/browser/modules/FormSubmitObserver.jsm
@@ -33,17 +33,17 @@ FormSubmitObserver.prototype =
   _validationMessage: "",
   _content: null,
   _element: null,
 
   /*
    * Public apis
    */
 
-  init: function(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)
@@ -52,32 +52,32 @@ 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: function()
+  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;
   },
 
   /*
    * Events
    */
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "pageshow":
         if (this._isRootDocumentEvent(aEvent)) {
           this._hidePopup();
         }
         break;
       case "unload":
         this.uninit();
@@ -90,17 +90,17 @@ FormSubmitObserver.prototype =
         break;
     }
   },
 
   /*
    * nsIFormSubmitObserver
    */
 
-  notifyInvalidSubmit : function(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;
     }
 
@@ -144,17 +144,17 @@ FormSubmitObserver.prototype =
    * Internal
    */
 
   /*
    * Handles input changes on the form element we've associated a popup
    * with. Updates the validation message or closes the popup if form data
    * becomes valid.
    */
-  _onInput: function(aEvent) {
+  _onInput(aEvent) {
     let element = aEvent.originalTarget;
 
     // If the form input is now valid, hide the popup.
     if (element.validity.valid) {
       this._hidePopup();
       return;
     }
 
@@ -165,29 +165,29 @@ FormSubmitObserver.prototype =
       this._showPopup(element);
     }
   },
 
   /*
    * Blur event handler in which we disconnect from the form element and
    * hide the popup.
    */
-  _onBlur: function(aEvent) {
+  _onBlur(aEvent) {
     aEvent.originalTarget.removeEventListener("input", this, false);
     aEvent.originalTarget.removeEventListener("blur", this, false);
     this._element = null;
     this._hidePopup();
   },
 
   /*
    * Send the show popup message to chrome with appropriate position
    * information. Can be called repetitively to update the currently
    * displayed popup position and text.
    */
-  _showPopup: function(aElement) {
+  _showPopup(aElement) {
     // Collect positional information and show the popup
     let panelData = {};
 
     panelData.message = this._validationMessage;
 
     // Note, this is relative to the browser and needs to be translated
     // in chrome.
     panelData.contentRect = BrowserUtils.getElementBoundingRect(aElement);
@@ -209,25 +209,25 @@ FormSubmitObserver.prototype =
       }
       let zoomFactor = this._getWindowUtils().fullZoom;
       panelData.offset = Math.round(offset * zoomFactor);
       panelData.position = "after_start";
     }
     this._mm.sendAsyncMessage("FormValidation:ShowPopup", panelData);
   },
 
-  _hidePopup: function() {
+  _hidePopup() {
     this._mm.sendAsyncMessage("FormValidation:HidePopup", {});
   },
 
-  _getWindowUtils: function() {
+  _getWindowUtils() {
     return this._content.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
   },
 
-  _isRootDocumentEvent: function(aEvent) {
+  _isRootDocumentEvent(aEvent) {
     if (this._content == null) {
       return true;
     }
     let target = aEvent.originalTarget;
     return (target == this._content.document ||
             (target.ownerDocument && target.ownerDocument == this._content.document));
   },
 
--- a/browser/modules/FormValidationHandler.jsm
+++ b/browser/modules/FormValidationHandler.jsm
@@ -20,39 +20,39 @@ var FormValidationHandler =
 {
   _panel: null,
   _anchor: null,
 
   /*
    * Public apis
    */
 
-  init: function() {
+  init() {
     let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
     mm.addMessageListener("FormValidation:ShowPopup", this);
     mm.addMessageListener("FormValidation:HidePopup", this);
   },
 
-  uninit: function() {
+  uninit() {
     let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
     mm.removeMessageListener("FormValidation:ShowPopup", this);
     mm.removeMessageListener("FormValidation:HidePopup", this);
     this._panel = null;
     this._anchor = null;
   },
 
-  hidePopup: function() {
+  hidePopup() {
     this._hidePopup();
   },
 
   /*
    * Events
    */
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     let window = aMessage.target.ownerGlobal;
     let json = aMessage.json;
     let tabBrowser = window.gBrowser;
     switch (aMessage.name) {
       case "FormValidation:ShowPopup":
         // target is the <browser>, make sure we're receiving a message
         // from the foreground tab.
         if (tabBrowser && aMessage.target != tabBrowser.selectedBrowser) {
@@ -61,21 +61,21 @@ var FormValidationHandler =
         this._showPopup(window, json);
         break;
       case "FormValidation:HidePopup":
         this._hidePopup();
         break;
     }
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     this._hidePopup();
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "FullZoomChange":
       case "TextZoomChange":
       case "ZoomChangeUsingMouseWheel":
       case "scroll":
         this._hidePopup();
         break;
       case "popuphiding":
@@ -83,17 +83,17 @@ var FormValidationHandler =
         break;
     }
   },
 
   /*
    * Internal
    */
 
-  _onPopupHiding: function(aEvent) {
+  _onPopupHiding(aEvent) {
     aEvent.originalTarget.removeEventListener("popuphiding", this, true);
     let tabBrowser = aEvent.originalTarget.ownerDocument.getElementById("content");
     tabBrowser.selectedBrowser.removeEventListener("scroll", this, true);
     tabBrowser.selectedBrowser.removeEventListener("FullZoomChange", this, false);
     tabBrowser.selectedBrowser.removeEventListener("TextZoomChange", this, false);
     tabBrowser.selectedBrowser.removeEventListener("ZoomChangeUsingMouseWheel", this, false);
 
     this._panel.hidden = true;
@@ -110,17 +110,17 @@ var FormValidationHandler =
    * @aPanelData - Object that contains popup information
    *  aPanelData stucture detail:
    *   contentRect - the bounding client rect of the target element. If
    *    content is remote, this is relative to the browser, otherwise its
    *    relative to the window.
    *   position - popup positional string constants.
    *   message - the form element validation message text.
    */
-  _showPopup: function(aWindow, aPanelData) {
+  _showPopup(aWindow, aPanelData) {
     let previouslyShown = !!this._panel;
     this._panel = aWindow.document.getElementById("invalid-form-popup");
     this._panel.firstChild.textContent = aPanelData.message;
     this._panel.hidden = false;
 
     let tabBrowser = aWindow.gBrowser;
     this._anchor = tabBrowser.popupAnchor;
     this._anchor.left = aPanelData.contentRect.left;
@@ -144,14 +144,14 @@ var FormValidationHandler =
       this._panel.openPopup(this._anchor, aPanelData.position, 0, 0, false);
     }
   },
 
   /*
    * Hide the popup if currently displayed. Will fire an event to onPopupHiding
    * above if visible.
    */
-  _hidePopup: function() {
+  _hidePopup() {
     if (this._panel) {
       this._panel.hidePopup();
     }
   }
 };
--- a/browser/modules/HiddenFrame.jsm
+++ b/browser/modules/HiddenFrame.jsm
@@ -34,50 +34,50 @@ HiddenFrame.prototype = {
     return this.hiddenDOMDocument.readyState === "complete";
   },
 
   /**
    * Gets the |contentWindow| of the hidden frame. Creates the frame if needed.
    * @returns Promise Returns a promise which is resolved when the hidden frame has finished
    *          loading.
    */
-  get: function() {
+  get() {
     if (!this._deferred) {
       this._deferred = PromiseUtils.defer();
       this._create();
     }
 
     return this._deferred.promise;
   },
 
-  destroy: function() {
+  destroy() {
     clearTimeout(this._retryTimerId);
 
     if (this._frame) {
       if (!Cu.isDeadWrapper(this._frame)) {
         this._frame.removeEventListener("load", this, true);
         this._frame.remove();
       }
 
       this._frame = null;
       this._deferred = null;
     }
   },
 
-  handleEvent: function() {
+  handleEvent() {
     let contentWindow = this._frame.contentWindow;
     if (contentWindow.location.href === XUL_PAGE) {
       this._frame.removeEventListener("load", this, true);
       this._deferred.resolve(contentWindow);
     } else {
       contentWindow.location = XUL_PAGE;
     }
   },
 
-  _create: function() {
+  _create() {
     if (this.isReady) {
       let doc = this.hiddenDOMDocument;
       this._frame = doc.createElementNS(HTML_NS, "iframe");
       this._frame.addEventListener("load", this, true);
       doc.documentElement.appendChild(this._frame);
     } else {
       // Check again if |hiddenDOMDocument| is ready as soon as possible.
       this._retryTimerId = setTimeout(this._create.bind(this), 0);
--- a/browser/modules/NetworkPrioritizer.jsm
+++ b/browser/modules/NetworkPrioritizer.jsm
@@ -82,17 +82,17 @@ var BrowserHelper = {
     let windowEntry = WindowHelper.getEntry(aBrowser.ownerGlobal);
     if (windowEntry.lastSelectedBrowser)
       this.decreasePriority(windowEntry.lastSelectedBrowser);
     this.increasePriority(aBrowser);
 
     windowEntry.lastSelectedBrowser = aBrowser;
   },
 
-  onRemotenessChange: function(aBrowser) {
+  onRemotenessChange(aBrowser) {
     aBrowser.setPriority(_priorityBackup.get(aBrowser.permanentKey));
   },
 
   increasePriority: function NP_BH_increasePriority(aBrowser) {
     aBrowser.adjustPriority(PRIORITY_DELTA);
     _priorityBackup.set(aBrowser.permanentKey,
                         _priorityBackup.get(aBrowser.permanentKey) + PRIORITY_DELTA);
   },
--- a/browser/modules/PermissionUI.jsm
+++ b/browser/modules/PermissionUI.jsm
@@ -476,32 +476,32 @@ GeolocationPermissionPrompt.prototype = 
     let secHistogram = Services.telemetry.getHistogramById("SECURITY_UI");
 
     return [{
       label: gBrowserBundle.GetStringFromName("geolocation.allowLocation"),
       accessKey:
         gBrowserBundle.GetStringFromName("geolocation.allowLocation.accesskey"),
       action: null,
       expireType: null,
-      callback: function(state) {
+      callback(state) {
         if (state && state.checkboxChecked) {
           secHistogram.add(ALWAYS_SHARE);
         } else {
           secHistogram.add(SHARE_LOCATION);
         }
       },
     }, {
       label: gBrowserBundle.GetStringFromName("geolocation.dontAllowLocation"),
       accessKey:
         gBrowserBundle.GetStringFromName("geolocation.dontAllowLocation.accesskey"),
       action: Ci.nsIPermissionManager.DENY_ACTION,
       expireType: PrivateBrowsingUtils.isWindowPrivate(this.browser.ownerGlobal) ?
                   Ci.nsIPermissionManager.EXPIRE_SESSION :
                   null,
-      callback: function(state) {
+      callback(state) {
         if (state && state.checkboxChecked) {
           secHistogram.add(NEVER_SHARE);
         }
       },
     }];
   },
 
   onBeforeShow() {
--- a/browser/modules/PluginContent.jsm
+++ b/browser/modules/PluginContent.jsm
@@ -26,17 +26,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 this.PluginContent = function(global) {
   this.init(global);
 }
 
 const FLASH_MIME_TYPE = "application/x-shockwave-flash";
 const REPLACEMENT_STYLE_SHEET = Services.io.newURI("chrome://pluginproblem/content/pluginReplaceBinding.css", null, null);
 
 PluginContent.prototype = {
-  init: function(global) {
+  init(global) {
     this.global = global;
     // Need to hold onto the content window or else it'll get destroyed
     this.content = this.global.content;
     // 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();
 
@@ -57,17 +57,17 @@ PluginContent.prototype = {
     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: function() {
+  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);
@@ -84,17 +84,17 @@ PluginContent.prototype = {
     global.removeMessageListener("BrowserPlugins:Test:ClearCrashData", this);
 
     Services.obs.removeObserver(this, "decoder-doctor-notification");
 
     delete this.global;
     delete this.content;
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "BrowserPlugins:ActivatePlugins":
         this.activatePlugins(msg.data.pluginInfo, msg.data.newState);
         break;
       case "BrowserPlugins:NotificationShown":
         setTimeout(() => this.updateNotificationUI(), 0);
         break;
       case "BrowserPlugins:ContextMenuCommand":
@@ -138,47 +138,47 @@ PluginContent.prototype = {
             aSubject.top.document == this.content.document &&
             data.formats.toLowerCase().includes("application/x-mpegurl", 0)) {
           this.global.content.pluginRequiresReload = true;
           this.updateNotificationUI(this.content.document);
         }
     }
   },
 
-  onPageShow: function(event) {
+  onPageShow(event) {
     // Ignore events that aren't from the main document.
     if (!this.content || event.target != this.content.document) {
       return;
     }
 
     // The PluginClickToPlay events are not fired when navigating using the
     // BF cache. |persisted| is true when the page is loaded from the
     // BF cache, so this code reshows the notification if necessary.
     if (event.persisted) {
       this.reshowClickToPlayNotification();
     }
   },
 
-  onPageHide: function(event) {
+  onPageHide(event) {
     // Ignore events that aren't from the main document.
     if (!this.content || event.target != this.content.document) {
       return;
     }
 
     this._finishRecordingFlashPluginTelemetry();
     this.clearPluginCaches();
     this.haveShownNotification = false;
   },
 
-  getPluginUI: function(plugin, anonid) {
+  getPluginUI(plugin, anonid) {
     return plugin.ownerDocument.
            getAnonymousElementByAttribute(plugin, "anonid", anonid);
   },
 
-  _getPluginInfo: function(pluginElement) {
+  _getPluginInfo(pluginElement) {
     if (pluginElement instanceof Ci.nsIDOMHTMLAnchorElement) {
       // Anchor elements are our place holders, and we only have them for Flash
       let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
       return {
         pluginName: "Shockwave Flash",
         mimetype: FLASH_MIME_TYPE,
         permissionString: pluginHost.getPermissionStringForType(FLASH_MIME_TYPE)
       };
@@ -218,31 +218,31 @@ PluginContent.prototype = {
       // items, but let's alias it anyway, just in case.
       if (blocklistState == Ci.nsIBlocklistService.STATE_SOFTBLOCKED ||
           blocklistState == Ci.nsIBlocklistService.STATE_OUTDATED) {
         blocklistState = Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
       }
     }
 
     return { mimetype: tagMimetype,
-             pluginName: pluginName,
-             pluginTag: pluginTag,
-             permissionString: permissionString,
-             fallbackType: fallbackType,
-             blocklistState: blocklistState,
+             pluginName,
+             pluginTag,
+             permissionString,
+             fallbackType,
+             blocklistState,
            };
   },
 
   /**
    * _getPluginInfoForTag is called when iterating the plugins for a document,
    * and what we get from nsIDOMWindowUtils is an nsIPluginTag, and not an
    * nsIObjectLoadingContent. This only should happen if the plugin is
    * click-to-play (see bug 1186948).
    */
-  _getPluginInfoForTag: function(pluginTag, tagMimetype) {
+  _getPluginInfoForTag(pluginTag, tagMimetype) {
     let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
 
     let pluginName = gNavigatorBundle.GetStringFromName("pluginInfo.unknownPlugin");
     let permissionString = null;
     let blocklistState = null;
 
     if (pluginTag) {
       pluginName = BrowserUtils.makeNicePluginName(pluginTag.name);
@@ -263,47 +263,47 @@ PluginContent.prototype = {
       // items, but let's alias it anyway, just in case.
       if (blocklistState == Ci.nsIBlocklistService.STATE_SOFTBLOCKED ||
           blocklistState == Ci.nsIBlocklistService.STATE_OUTDATED) {
         blocklistState = Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
       }
     }
 
     return { mimetype: tagMimetype,
-             pluginName: pluginName,
-             pluginTag: pluginTag,
-             permissionString: permissionString,
+             pluginName,
+             pluginTag,
+             permissionString,
              // Since we should only have entered _getPluginInfoForTag when
              // examining a click-to-play plugin, we can safely hard-code
              // this fallback type, since we don't actually have an
              // nsIObjectLoadingContent to check.
              fallbackType: Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY,
-             blocklistState: blocklistState,
+             blocklistState,
            };
   },
 
   /**
    * Update the visibility of the plugin overlay.
    */
-  setVisibility : function(plugin, overlay, shouldShow) {
+  setVisibility(plugin, overlay, shouldShow) {
     overlay.classList.toggle("visible", shouldShow);
     if (shouldShow) {
       overlay.removeAttribute("dismissed");
     }
   },
 
   /**
    * Check whether the plugin should be visible on the page. A plugin should
    * not be visible if the overlay is too big, or if any other page content
    * overlays it.
    *
    * This function will handle showing or hiding the overlay.
    * @returns true if the plugin is invisible.
    */
-  shouldShowOverlay : function(plugin, overlay) {
+  shouldShowOverlay(plugin, overlay) {
     // If the overlay size is 0, we haven't done layout yet. Presume that
     // plugins are visible until we know otherwise.
     if (overlay.scrollWidth == 0) {
       return true;
     }
 
     // Is the <object>'s size too small to hold what we want to show?
     let pluginRect = plugin.getBoundingClientRect();
@@ -342,17 +342,17 @@ PluginContent.prototype = {
       if (el !== plugin) {
         return false;
       }
     }
 
     return true;
   },
 
-  addLinkClickCallback: function(linkNode, callbackName /* callbackArgs...*/) {
+  addLinkClickCallback(linkNode, callbackName /* callbackArgs...*/) {
     // XXX just doing (callback)(arg) was giving a same-origin error. bug?
     let self = this;
     let callbackArgs = Array.prototype.slice.call(arguments).slice(2);
     linkNode.addEventListener("click",
                               function(evt) {
                                 if (!evt.isTrusted)
                                   return;
                                 evt.preventDefault();
@@ -373,17 +373,17 @@ PluginContent.prototype = {
                                   evt.preventDefault();
                                   (self[callbackName]).apply(self, callbackArgs);
                                 }
                               },
                               true);
   },
 
   // Helper to get the binding handler type from a plugin object
-  _getBindingType : function(plugin) {
+  _getBindingType(plugin) {
     if (!(plugin instanceof Ci.nsIObjectLoadingContent))
       return null;
 
     switch (plugin.pluginFallbackType) {
       case Ci.nsIObjectLoadingContent.PLUGIN_UNSUPPORTED:
         return "PluginNotFound";
       case Ci.nsIObjectLoadingContent.PLUGIN_DISABLED:
         return "PluginDisabled";
@@ -398,17 +398,17 @@ PluginContent.prototype = {
       case Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_NO_UPDATE:
         return "PluginVulnerableNoUpdate";
       default:
         // Not all states map to a handler
         return null;
     }
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     let eventType = event.type;
 
     if (eventType == "unload") {
       this.uninit();
       return;
     }
 
     if (eventType == "pagehide") {
@@ -578,17 +578,17 @@ PluginContent.prototype = {
       }, true);
     }
 
     if (shouldShowNotification) {
       this._showClickToPlayNotification(plugin, false);
     }
   },
 
-  _recordFlashPluginTelemetry: function(eventType, plugin) {
+  _recordFlashPluginTelemetry(eventType, plugin) {
     if (!Services.telemetry.canRecordExtended) {
       return;
     }
 
     if (!this.flashPluginStats) {
       this.flashPluginStats = {
         instancesCount: 0,
         plugins: new WeakSet()
@@ -613,30 +613,30 @@ PluginContent.prototype = {
       if (state === null) {
         state = Ci.nsIObjectLoadingContent.PLUGIN_UNSUPPORTED;
       }
       Services.telemetry.getHistogramById('FLASH_PLUGIN_STATES')
                        .add(state);
     }
   },
 
-  _finishRecordingFlashPluginTelemetry: function() {
+  _finishRecordingFlashPluginTelemetry() {
     if (this.flashPluginStats) {
       Services.telemetry.getHistogramById('FLASH_PLUGIN_INSTANCES_ON_PAGE')
                         .add(this.flashPluginStats.instancesCount);
     delete this.flashPluginStats;
     }
   },
 
-  isKnownPlugin: function(objLoadingContent) {
+  isKnownPlugin(objLoadingContent) {
     return (objLoadingContent.getContentTypeForMIMEType(objLoadingContent.actualType) ==
             Ci.nsIObjectLoadingContent.TYPE_PLUGIN);
   },
 
-  canActivatePlugin: function(objLoadingContent) {
+  canActivatePlugin(objLoadingContent) {
     // if this isn't a known plugin, we can't activate it
     // (this also guards pluginHost.getPermissionStringForType against
     // unexpected input)
     if (!this.isKnownPlugin(objLoadingContent))
       return false;
 
     let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
     let permissionString = pluginHost.getPermissionStringForType(objLoadingContent.actualType);
@@ -647,25 +647,25 @@ PluginContent.prototype = {
       objLoadingContent.pluginFallbackType >= Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY &&
       objLoadingContent.pluginFallbackType <= Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_NO_UPDATE;
 
     return !objLoadingContent.activated &&
            pluginPermission != Ci.nsIPermissionManager.DENY_ACTION &&
            isFallbackTypeValid;
   },
 
-  hideClickToPlayOverlay: function(plugin) {
+  hideClickToPlayOverlay(plugin) {
     let overlay = this.getPluginUI(plugin, "main");
     if (overlay) {
       overlay.classList.remove("visible");
     }
   },
 
   // Forward a link click callback to the chrome process.
-  forwardCallback: function(name, pluginTag) {
+  forwardCallback(name, pluginTag) {
     this.global.sendAsyncMessage("PluginContent:LinkClickCallback",
       { name, pluginTag });
   },
 
   submitReport: function submitReport(plugin) {
     if (!AppConstants.MOZ_CRASHREPORTER) {
       return;
     }
@@ -687,22 +687,22 @@ PluginContent.prototype = {
       keyVals.PluginUserComment = userComment;
     if (submitURLOptIn)
       keyVals.PluginContentURL = plugin.ownerDocument.URL;
 
     this.global.sendAsyncMessage("PluginContent:SubmitReport",
                                  { runID, keyVals, submitURLOptIn });
   },
 
-  reloadPage: function() {
+  reloadPage() {
     this.global.content.location.reload();
   },
 
   // Event listener for click-to-play plugins.
-  _handleClickToPlayEvent: function(plugin) {
+  _handleClickToPlayEvent(plugin) {
     let doc = plugin.ownerDocument;
     let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
     let permissionString;
     if (plugin instanceof Ci.nsIDOMHTMLAnchorElement) {
       // We only have replacement content for Flash installs
       permissionString = pluginHost.getPermissionStringForType(FLASH_MIME_TYPE);
     } else {
       let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
@@ -725,34 +725,34 @@ PluginContent.prototype = {
       return;
     }
 
     if (overlay) {
       overlay.addEventListener("click", this, true);
     }
   },
 
-  onOverlayClick: function(event) {
+  onOverlayClick(event) {
     let document = event.target.ownerDocument;
     let plugin = document.getBindingParent(event.target);
     let contentWindow = plugin.ownerGlobal.top;
     let overlay = this.getPluginUI(plugin, "main");
     // Have to check that the target is not the link to update the plugin
     if (!(event.originalTarget instanceof contentWindow.HTMLAnchorElement) &&
         (event.originalTarget.getAttribute('anonid') != 'closeIcon') &&
         !overlay.hasAttribute('dismissed') &&
         event.button == 0 &&
         event.isTrusted) {
       this._showClickToPlayNotification(plugin, true);
     event.stopPropagation();
     event.preventDefault();
     }
   },
 
-  reshowClickToPlayNotification: function() {
+  reshowClickToPlayNotification() {
     let contentWindow = this.global.content;
     let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                            .getInterface(Ci.nsIDOMWindowUtils);
     let plugins = cwu.plugins;
     for (let plugin of plugins) {
       let overlay = this.getPluginUI(plugin, "main");
       if (overlay)
         overlay.removeEventListener("click", this, true);
@@ -761,17 +761,17 @@ PluginContent.prototype = {
         this._handleClickToPlayEvent(plugin);
     }
     this._showClickToPlayNotification(null, false);
   },
 
   /**
    * Activate the plugins that the user has specified.
    */
-  activatePlugins: function(pluginInfo, newState) {
+  activatePlugins(pluginInfo, newState) {
     let contentWindow = this.global.content;
     let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                            .getInterface(Ci.nsIDOMWindowUtils);
     let plugins = cwu.plugins;
     let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
 
     let pluginFound = false;
     let placeHolderFound = false;
@@ -807,17 +807,17 @@ PluginContent.prototype = {
     // needs to be refreshed for it to insert its plugins
     if (newState != "block" &&
        (!pluginFound || placeHolderFound || contentWindow.pluginRequiresReload)) {
       this.reloadPage();
     }
     this.updateNotificationUI();
   },
 
-  _showClickToPlayNotification: function(plugin, showNow) {
+  _showClickToPlayNotification(plugin, showNow) {
     let plugins = [];
 
     // If plugin is null, that means the user has navigated back to a page with
     // plugins, and we need to collect all the plugins.
     if (plugin === null) {
       let contentWindow = this.content;
       let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIDOMWindowUtils);
@@ -867,33 +867,33 @@ PluginContent.prototype = {
 
       this.pluginData.set(pluginInfo.permissionString, pluginInfo);
     }
 
     this.haveShownNotification = true;
 
     this.global.sendAsyncMessage("PluginContent:ShowClickToPlayNotification", {
       plugins: [...this.pluginData.values()],
-      showNow: showNow,
-      location: location,
+      showNow,
+      location,
     }, null, principal);
   },
 
   /**
    * Updates the "hidden plugin" notification bar UI.
    *
    * @param document (optional)
    *        Specify the document that is causing the update.
    *        This is useful when the document is possibly no longer
    *        the current loaded document (for example, if we're
    *        responding to a PluginRemoved event for an unloading
    *        document). If this parameter is omitted, it defaults
    *        to the current top-level document.
    */
-  updateNotificationUI: function(document) {
+  updateNotificationUI(document) {
     document = document || this.content.document;
 
     // We're only interested in the top-level document, since that's
     // the one that provides the Principal that we send back to the
     // parent.
     let principal = document.defaultView.top.document.nodePrincipal;
     let location = document.location.href;
 
@@ -948,47 +948,47 @@ PluginContent.prototype = {
           break;
         }
       }
     }
 
     // If there are any items remaining in `actions` now, they are hidden
     // plugins that need a notification bar.
     this.global.sendAsyncMessage("PluginContent:UpdateHiddenPluginUI", {
-      haveInsecure: haveInsecure,
+      haveInsecure,
       actions: [...actions.values()],
-      location: location,
+      location,
     }, null, principal);
   },
 
-  removeNotification: function(name) {
-    this.global.sendAsyncMessage("PluginContent:RemoveNotification", { name: name });
+  removeNotification(name) {
+    this.global.sendAsyncMessage("PluginContent:RemoveNotification", { name });
   },
 
-  clearPluginCaches: function() {
+  clearPluginCaches() {
     this.pluginData.clear();
     this.pluginCrashData.clear();
   },
 
-  hideNotificationBar: function(name) {
-    this.global.sendAsyncMessage("PluginContent:HideNotificationBar", { name: name });
+  hideNotificationBar(name) {
+    this.global.sendAsyncMessage("PluginContent:HideNotificationBar", { name });
   },
 
   /**
    * Determines whether or not the crashed plugin is contained within current
    * full screen DOM element.
    * @param fullScreenElement (DOM element)
    *   The DOM element that is currently full screen, or null.
    * @param domElement
    *   The DOM element which contains the crashed plugin, or the crashed plugin
    *   itself.
    * @returns bool
    *   True if the plugin is a descendant of the full screen DOM element, false otherwise.
    **/
-  isWithinFullScreenElement: function(fullScreenElement, domElement) {
+  isWithinFullScreenElement(fullScreenElement, domElement) {
 
     /**
      * Traverses down iframes until it find a non-iframe full screen DOM element.
      * @param fullScreenIframe
      *  Target iframe to begin searching from.
      * @returns DOM element
      *  The full screen DOM element contained within the iframe (could be inner iframe), or the original iframe if no inner DOM element is found.
      **/
@@ -1013,17 +1013,17 @@ PluginContent.prototype = {
     return false;
   },
 
   /**
    * The PluginCrashed event handler. Note that the PluginCrashed event is
    * fired for both NPAPI and Gecko Media plugins. In the latter case, the
    * target of the event is the document that the GMP is being used in.
    */
-  onPluginCrashed: function(target, aEvent) {
+  onPluginCrashed(target, aEvent) {
     if (!(aEvent instanceof this.content.PluginCrashedEvent))
       return;
 
     let fullScreenElement = this.content.document.mozFullScreenElement;
     if (fullScreenElement) {
       if (this.isWithinFullScreenElement(fullScreenElement, target)) {
         this.content.document.mozCancelFullScreen();
       }
@@ -1052,17 +1052,17 @@ PluginContent.prototype = {
 
     this.setCrashedNPAPIPluginState({
       plugin: target,
       state: crashData.state,
       message: crashData.message,
     });
   },
 
-  NPAPIPluginProcessCrashed: function({pluginName, runID, state}) {
+  NPAPIPluginProcessCrashed({pluginName, runID, state}) {
     let message =
       gNavigatorBundle.formatStringFromName("crashedpluginsMessage.title",
                                             [pluginName], 1);
 
     let contentWindow = this.global.content;
     let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                            .getInterface(Ci.nsIDOMWindowUtils);
     let plugins = cwu.plugins;
@@ -1081,29 +1081,29 @@ PluginContent.prototype = {
         } else {
           // The content process hasn't yet determined that the plugin has crashed.
           // Stash the data in our map, and throw the plugin into a WeakSet. When
           // the PluginCrashed event fires on the <object>/<embed>, we'll retrieve
           // the information we need from the Map and remove the instance from the
           // WeakSet. Once the WeakSet is empty, we can clear the map.
           if (!this.pluginCrashData.has(runID)) {
             this.pluginCrashData.set(runID, {
-              state: state,
-              message: message,
+              state,
+              message,
               instances: new WeakSet(),
             });
           }
           let crashData = this.pluginCrashData.get(runID);
           crashData.instances.add(plugin);
         }
       }
     }
   },
 
-  setCrashedNPAPIPluginState: function({plugin, state, message}) {
+  setCrashedNPAPIPluginState({plugin, state, message}) {
     // Force a layout flush so the binding is attached.
     plugin.clientTop;
     let overlay = this.getPluginUI(plugin, "main");
     let statusDiv = this.getPluginUI(plugin, "submitStatus");
     let optInCB = this.getPluginUI(plugin, "submitURLOptIn");
 
     this.getPluginUI(plugin, "submitButton")
         .addEventListener("click", (event) => {
@@ -1160,33 +1160,33 @@ PluginContent.prototype = {
                                    { messageString: message, pluginID: runID });
       // Remove the notification when the page is reloaded.
       doc.defaultView.top.addEventListener("unload", event => {
         this.hideNotificationBar("plugin-crashed");
       }, false);
     }
   },
 
-  NPAPIPluginCrashReportSubmitted: function({ runID, state }) {
+  NPAPIPluginCrashReportSubmitted({ runID, state }) {
     this.pluginCrashData.delete(runID);
     let contentWindow = this.global.content;
     let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                            .getInterface(Ci.nsIDOMWindowUtils);
     let plugins = cwu.plugins;
 
     for (let plugin of plugins) {
       if (plugin instanceof Ci.nsIObjectLoadingContent &&
           plugin.runID == runID) {
         let statusDiv = this.getPluginUI(plugin, "submitStatus");
         statusDiv.setAttribute("status", state);
       }
     }
   },
 
-  GMPCrashed: function(aEvent) {
+  GMPCrashed(aEvent) {
     let target          = aEvent.target;
     let pluginName      = aEvent.pluginName;
     let gmpPlugin       = aEvent.gmpPlugin;
     let pluginID        = aEvent.pluginID;
     let doc             = target.document;
 
     if (!gmpPlugin || !doc) {
       // TODO: Throw exception? How did we get here?
--- a/browser/modules/ProcessHangMonitor.jsm
+++ b/browser/modules/ProcessHangMonitor.jsm
@@ -44,36 +44,36 @@ var ProcessHangMonitor = {
    * period of time. Value is an nsITimer for when the wait time
    * expires.
    */
   _pausedReports: new Map(),
 
   /**
    * Initialize hang reporting. Called once in the parent process.
    */
-  init: function() {
+  init() {
     Services.obs.addObserver(this, "process-hang-report", false);
     Services.obs.addObserver(this, "clear-hang-report", false);
     Services.obs.addObserver(this, "xpcom-shutdown", false);
     Services.ww.registerNotification(this);
   },
 
   /**
    * Terminate JavaScript associated with the hang being reported for
    * the selected browser in |win|.
    */
-  terminateScript: function(win) {
+  terminateScript(win) {
     this.handleUserInput(win, report => report.terminateScript());
   },
 
   /**
    * Start devtools debugger for JavaScript associated with the hang
    * being reported for the selected browser in |win|.
    */
-  debugScript: function(win) {
+  debugScript(win) {
     this.handleUserInput(win, report => {
       function callback() {
         report.endStartingDebugger();
       }
 
       report.beginStartingDebugger();
 
       let svc = Cc["@mozilla.org/dom/slow-script-debug;1"].getService(Ci.nsISlowScriptDebug);
@@ -82,25 +82,25 @@ var ProcessHangMonitor = {
     });
   },
 
   /**
    * Terminate the plugin process associated with a hang being reported
    * for the selected browser in |win|. Will attempt to generate a combined
    * crash report for all processes.
    */
-  terminatePlugin: function(win) {
+  terminatePlugin(win) {
     this.handleUserInput(win, report => report.terminatePlugin());
   },
 
   /**
    * Dismiss the browser notification and invoke an appropriate action based on
    * the hang type.
    */
-  stopIt: function(win) {
+  stopIt(win) {
     let report = this.findActiveReport(win.gBrowser.selectedBrowser);
     if (!report) {
       return;
     }
 
     switch (report.hangType) {
       case report.SLOW_SCRIPT:
         this.terminateScript(win);
@@ -110,17 +110,17 @@ var ProcessHangMonitor = {
         break;
     }
   },
 
   /**
    * Dismiss the notification, clear the report from the active list and set up
    * a new timer to track a wait period during which we won't notify.
    */
-  waitLonger: function(win) {
+  waitLonger(win) {
     let report = this.findActiveReport(win.gBrowser.selectedBrowser);
     if (!report) {
       return;
     }
     // Remove the report from the active list.
     this.removeActiveReport(report);
 
     // NOTE, we didn't call userCanceled on nsIHangReport here. This insures
@@ -150,27 +150,27 @@ var ProcessHangMonitor = {
     this.updateWindows();
   },
 
   /**
    * If there is a hang report associated with the selected browser in
    * |win|, invoke |func| on that report and stop notifying the user
    * about it.
    */
-  handleUserInput: function(win, func) {
+  handleUserInput(win, func) {
     let report = this.findActiveReport(win.gBrowser.selectedBrowser);
     if (!report) {
       return null;
     }
     this.removeActiveReport(report);
 
     return func(report);
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case "xpcom-shutdown":
         Services.obs.removeObserver(this, "xpcom-shutdown");
         Services.obs.removeObserver(this, "process-hang-report");
         Services.obs.removeObserver(this, "clear-hang-report");
         Services.ww.unregisterNotification(this);
         break;
 
@@ -193,67 +193,67 @@ var ProcessHangMonitor = {
         win.addEventListener("load", listener, true);
         break;
     }
   },
 
   /**
    * Find a active hang report for the given <browser> element.
    */
-  findActiveReport: function(browser) {
+  findActiveReport(browser) {
     let frameLoader = browser.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader;
     for (let report of this._activeReports) {
       if (report.isReportForBrowser(frameLoader)) {
         return report;
       }
     }
     return null;
   },
 
   /**
    * Find a paused hang report for the given <browser> element.
    */
-  findPausedReport: function(browser) {
+  findPausedReport(browser) {
     let frameLoader = browser.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader;
     for (let [report, ] of this._pausedReports) {
       if (report.isReportForBrowser(frameLoader)) {
         return report;
       }
     }
     return null;
   },
 
   /**
    * Remove an active hang report from the active list and cancel the timer
    * associated with it.
    */
-  removeActiveReport: function(report) {
+  removeActiveReport(report) {
     this._activeReports.delete(report);
     this.updateWindows();
   },
 
   /**
    * Remove a paused hang report from the paused list and cancel the timer
    * associated with it.
    */
-  removePausedReport: function(report) {
+  removePausedReport(report) {
     let timer = this._pausedReports.get(report);
     if (timer) {
       timer.cancel();
     }
     this._pausedReports.delete(report);
   },
 
   /**
    * Iterate over all XUL windows and ensure that the proper hang
    * reports are shown for each one. Also install event handlers in
    * each window to watch for events that would cause a different hang
    * report to be displayed.
    */
-  updateWindows: function() {
+  updateWindows() {
     let e = Services.wm.getEnumerator("navigator:browser");
     while (e.hasMoreElements()) {
       let win = e.getNext();
 
       this.updateWindow(win);
 
       // Only listen for these events if there are active hang reports.
       if (this._activeReports.size) {
@@ -262,110 +262,110 @@ var ProcessHangMonitor = {
         this.untrackWindow(win);
       }
     }
   },
 
   /**
    * If there is a hang report for the current tab in |win|, display it.
    */
-  updateWindow: function(win) {
+  updateWindow(win) {
     let report = this.findActiveReport(win.gBrowser.selectedBrowser);
 
     if (report) {
       this.showNotification(win, report);
     } else {
       this.hideNotification(win);
     }
   },
 
   /**
    * Show the notification for a hang.
    */
-  showNotification: function(win, report) {
+  showNotification(win, report) {
     let nb = win.document.getElementById("high-priority-global-notificationbox");
     let notification = nb.getNotificationWithValue("process-hang");
     if (notification) {
       return;
     }
 
     let bundle = win.gNavigatorBundle;
 
     let buttons = [{
         label: bundle.getString("processHang.button_stop.label"),
         accessKey: bundle.getString("processHang.button_stop.accessKey"),
-        callback: function() {
+        callback() {
           ProcessHangMonitor.stopIt(win);
         }
       },
       {
         label: bundle.getString("processHang.button_wait.label"),
         accessKey: bundle.getString("processHang.button_wait.accessKey"),
-        callback: function() {
+        callback() {
           ProcessHangMonitor.waitLonger(win);
         }
       }];
 
     if (AppConstants.MOZ_DEV_EDITION && report.hangType == report.SLOW_SCRIPT) {
       buttons.push({
         label: bundle.getString("processHang.button_debug.label"),
         accessKey: bundle.getString("processHang.button_debug.accessKey"),
-        callback: function() {
+        callback() {
           ProcessHangMonitor.debugScript(win);
         }
       });
     }
 
     nb.appendNotification(bundle.getString("processHang.label"),
                           "process-hang",
                           "chrome://browser/content/aboutRobots-icon.png",
                           nb.PRIORITY_WARNING_HIGH, buttons);
   },
 
   /**
    * Ensure that no hang notifications are visible in |win|.
    */
-  hideNotification: function(win) {
+  hideNotification(win) {
     let nb = win.document.getElementById("high-priority-global-notificationbox");
     let notification = nb.getNotificationWithValue("process-hang");
     if (notification) {
       nb.removeNotification(notification);
     }
   },
 
   /**
    * Install event handlers on |win| to watch for events that would
    * cause a different hang report to be displayed.
    */
-  trackWindow: function(win) {
+  trackWindow(win) {
     win.gBrowser.tabContainer.addEventListener("TabSelect", this, true);
     win.gBrowser.tabContainer.addEventListener("TabRemotenessChange", this, true);
   },
 
-  untrackWindow: function(win) {
+  untrackWindow(win) {
     win.gBrowser.tabContainer.removeEventListener("TabSelect", this, true);
     win.gBrowser.tabContainer.removeEventListener("TabRemotenessChange", this, true);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     let win = event.target.ownerGlobal;
 
     // If a new tab is selected or if a tab changes remoteness, then
     // we may need to show or hide a hang notification.
 
     if (event.type == "TabSelect" || event.type == "TabRemotenessChange") {
       this.updateWindow(win);
     }
   },
 
   /**
    * Handle a potentially new hang report. If it hasn't been seen
    * before, show a notification for it in all open XUL windows.
    */
-  reportHang: function(report) {
+  reportHang(report) {
     // If this hang was already reported reset the timer for it.
     if (this._activeReports.has(report)) {
       // if this report is in active but doesn't have a notification associated
       // with it, display a notification.
       this.updateWindows();
       return;
     }
 
@@ -384,14 +384,14 @@ var ProcessHangMonitor = {
       // so PLUGIN_HANG_NOTICE_COUNT is only probed on e10s.
       Services.telemetry.getHistogramById("PLUGIN_HANG_NOTICE_COUNT").add();
     }
 
     this._activeReports.add(report);
     this.updateWindows();
   },
 
-  clearHang: function(report) {
+  clearHang(report) {
     this.removeActiveReport(report);
     this.removePausedReport(report);
     report.userCanceled();
   },
 };
--- a/browser/modules/ReaderParent.jsm
+++ b/browser/modules/ReaderParent.jsm
@@ -23,30 +23,30 @@ var ReaderParent = {
   _readerModeInfoPanelOpen: false,
 
   MESSAGES: [
     "Reader:ArticleGet",
     "Reader:FaviconRequest",
     "Reader:UpdateReaderButton",
   ],
 
-  init: function() {
+  init() {
     let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
     for (let msg of this.MESSAGES) {
       mm.addMessageListener(msg, this);
     }
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     switch (message.name) {
       case "Reader:ArticleGet":
         this._getArticle(message.data.url, message.target).then((article) => {
           // Make sure the target browser is still alive before trying to send data back.
           if (message.target.messageManager) {
-            message.target.messageManager.sendAsyncMessage("Reader:ArticleData", { article: article });
+            message.target.messageManager.sendAsyncMessage("Reader:ArticleData", { article });
           }
         }, e => {
           if (e && e.newURL) {
             // Make sure the target browser is still alive before trying to send data back.
             if (message.target.messageManager) {
               message.target.messageManager.sendAsyncMessage("Reader:ArticleData", { newURL: e.newURL });
             }
           }
@@ -75,17 +75,17 @@ var ReaderParent = {
           browser.isArticle = message.data.isArticle;
         }
         this.updateReaderButton(browser);
         break;
       }
     }
   },
 
-  updateReaderButton: function(browser) {
+  updateReaderButton(browser) {
     let win = browser.ownerGlobal;
     if (browser != win.gBrowser.selectedBrowser) {
       return;
     }
 
     let button = win.document.getElementById("reader-mode-button");
     let command = win.document.getElementById("View:ReaderView");
     let key = win.document.getElementById("toggleReaderMode");
@@ -119,29 +119,29 @@ var ReaderParent = {
     } else if (this._readerModeInfoPanelOpen) {
       if (UITour.isInfoOnTarget(win, "readerMode-urlBar")) {
         UITour.hideInfo(win);
       }
       this._readerModeInfoPanelOpen = false;
     }
   },
 
-  forceShowReaderIcon: function(browser) {
+  forceShowReaderIcon(browser) {
     browser.isArticle = true;
     this.updateReaderButton(browser);
   },
 
   buttonClick(event) {
     if (event.button != 0) {
       return;
     }
     this.toggleReaderMode(event);
   },
 
-  toggleReaderMode: function(event) {
+  toggleReaderMode(event) {
     let win = event.target.ownerGlobal;
     let browser = win.gBrowser.selectedBrowser;
     browser.messageManager.sendAsyncMessage("Reader:ToggleReaderMode");
   },
 
   /**
    * Shows an info panel from the UITour for Reader Mode.
    *
--- a/browser/modules/RemotePrompt.jsm
+++ b/browser/modules/RemotePrompt.jsm
@@ -12,34 +12,34 @@ var Cu = Components.utils;
 this.EXPORTED_SYMBOLS = [ "RemotePrompt" ];
 
 Cu.import("resource:///modules/PlacesUIUtils.jsm");
 Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/SharedPromptUtils.jsm");
 
 var RemotePrompt = {
-  init: function() {
+  init() {
     let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
     mm.addMessageListener("Prompt:Open", this);
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     switch (message.name) {
       case "Prompt:Open":
         if (message.data.uri) {
           this.openModalWindow(message.data, message.target);
         } else {
           this.openTabPrompt(message.data, message.target)
         }
         break;
     }
   },
 
-  openTabPrompt: function(args, browser) {
+  openTabPrompt(args, browser) {
     let window = browser.ownerGlobal;
     let tabPrompt = window.gBrowser.getTabModalPromptBox(browser)
     let newPrompt;
     let needRemove = false;
     let promptId = args._remoteId;
 
     function onPromptClose(forceCleanup) {
       // It's possible that we removed the prompt during the
@@ -87,17 +87,17 @@ var RemotePrompt = {
       // TODO since we don't actually open a window, need to check if
       // there's other stuff in nsWindowWatcher::OpenWindowInternal
       // that we might need to do here as well.
     } catch (ex) {
       onPromptClose(true);
     }
   },
 
-  openModalWindow: function(args, browser) {
+  openModalWindow(args, browser) {
     let window = browser.ownerGlobal;
     try {
       PromptUtils.fireDialogEvent(window, "DOMWillOpenModalDialog", browser);
       let bag = PromptUtils.objectToPropBag(args);
 
       Services.ww.openWindow(window, args.uri, "_blank",
                              "centerscreen,chrome,modal,titlebar", bag);
 
--- a/browser/modules/SelfSupportBackend.jsm
+++ b/browser/modules/SelfSupportBackend.jsm
@@ -48,21 +48,21 @@ const UITOUR_FRAME_SCRIPT = "chrome://br
 
 // Whether the FHR/Telemetry unification features are enabled.
 // Changing this pref requires a restart.
 const IS_UNIFIED_TELEMETRY = Preferences.get(PREF_TELEMETRY_UNIFIED, false);
 
 var gLogAppenderDump = null;
 
 this.SelfSupportBackend = Object.freeze({
-  init: function() {
+  init() {
     SelfSupportBackendInternal.init();
   },
 
-  uninit: function() {
+  uninit() {
     SelfSupportBackendInternal.uninit();
   },
 });
 
 var SelfSupportBackendInternal = {
   // The browser element that will load the SelfSupport page.
   _browser: null,
   // The Id of the timer triggering delayed SelfSupport page load.
@@ -70,17 +70,17 @@ var SelfSupportBackendInternal = {
   // The HiddenFrame holding the _browser element.
   _frame: null,
   _log: null,
   _progressListener: null,
 
   /**
    * Initializes the self support backend.
    */
-  init: function() {
+  init() {
     this._configureLogging();
 
     this._log.trace("init");
 
     Preferences.observe(PREF_BRANCH_LOG, this._configureLogging, this);
 
     // Only allow to use SelfSupport if Unified Telemetry is enabled.
     let reportingEnabled = IS_UNIFIED_TELEMETRY;
@@ -103,17 +103,17 @@ var SelfSupportBackendInternal = {
     }
 
     Services.obs.addObserver(this, "sessionstore-windows-restored", false);
   },
 
   /**
    * Shut down the self support backend, if active.
    */
-  uninit: function() {
+  uninit() {
     this._log.trace("uninit");
 
     Preferences.ignore(PREF_BRANCH_LOG, this._configureLogging, this);
 
     // Cancel delayed loading, if still active, when shutting down.
     clearTimeout(this._delayedLoadTimerId);
 
     // Dispose of the hidden browser.
@@ -137,29 +137,29 @@ var SelfSupportBackendInternal = {
       this._frame = null;
     }
   },
 
   /**
    * Handle notifications. Once all windows are created, we wait a little bit more
    * since tabs might still be loading. Then, we open the self support.
    */
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     this._log.trace("observe - Topic " + aTopic);
 
     if (aTopic === "sessionstore-windows-restored") {
       Services.obs.removeObserver(this, "sessionstore-windows-restored");
       this._delayedLoadTimerId = setTimeout(this._loadSelfSupport.bind(this), STARTUP_DELAY_MS);
     }
   },
 
   /**
    * Configure the logger based on the preferences.
    */
-  _configureLogging: function() {
+  _configureLogging() {
     if (!this._log) {
       this._log = Log.repository.getLogger(LOGGER_NAME);
 
       // Log messages need to go to the browser console.
       let consoleAppender = new Log.ConsoleAppender(new Log.BasicFormatter());
       this._log.addAppender(consoleAppender);
     }
 
@@ -178,31 +178,31 @@ var SelfSupportBackendInternal = {
       }
     }
   },
 
   /**
    * Create an hidden frame to host our |browser|, then load the SelfSupport page in it.
    * @param aURL The URL to load in the browser.
    */
-  _makeHiddenBrowser: function(aURL) {
+  _makeHiddenBrowser(aURL) {
     this._frame = new HiddenFrame();
     return this._frame.get().then(aFrame => {
       let doc = aFrame.document;
 
       this._browser = doc.createElementNS(XUL_NS, "browser");
       this._browser.setAttribute("type", "content");
       this._browser.setAttribute("disableglobalhistory", "true");
       this._browser.setAttribute("src", aURL);
 
       doc.documentElement.appendChild(this._browser);
     });
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     this._log.trace("handleEvent - aEvent.type " + aEvent.type + ", Trusted " + aEvent.isTrusted);
 
     if (aEvent.type === "DOMWindowClose") {
       let window = this._browser.contentDocument.defaultView;
       let target = aEvent.target;
 
       if (target == window) {
         // preventDefault stops the default window.close(). We need to do that to prevent
@@ -212,40 +212,40 @@ var SelfSupportBackendInternal = {
         this.uninit();
       }
     }
   },
 
   /**
    * Called when the self support page correctly loads.
    */
-  _pageSuccessCallback: function() {
+  _pageSuccessCallback() {
     this._log.debug("_pageSuccessCallback - Page correctly loaded.");
     this._browser.removeProgressListener(this._progressListener);
     this._progressListener.destroy();
     this._progressListener = null;
 
     // Allow SelfSupportBackend to catch |window.close()| issued by the content.
     this._browser.contentWindow.addEventListener("DOMWindowClose", this, true);
   },
 
   /**
    * Called when the self support page fails to load.
    */
-  _pageLoadErrorCallback: function() {
+  _pageLoadErrorCallback() {
     this._log.info("_pageLoadErrorCallback - Too many failed load attempts. Giving up.");
     this.uninit();
   },
 
   /**
    * Create a browser and attach it to an hidden window. The browser will contain the
    * self support page and attempt to load the page content. If loading fails, try again
    * after an interval.
    */
-  _loadSelfSupport: function() {
+  _loadSelfSupport() {
     // Fetch the Self Support URL from the preferences.
     let unformattedURL = Preferences.get(PREF_URL, null);
     let url = Services.urlFormatter.formatURL(unformattedURL);
     if (!url.startsWith("https:")) {
       this._log.error("_loadSelfSupport - Non HTTPS URL provided: " + url);
       return;
     }
 
@@ -285,17 +285,17 @@ function ProgressListener(aLoadErrorCall
   // The number of page loads attempted.
   this._loadAttempts = 0;
   this._log = Log.repository.getLogger(LOGGER_NAME);
   // The Id of the timer which triggers page load again in case of errors.
   this._reloadTimerId = null;
 }
 
 ProgressListener.prototype = {
-  onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {
+  onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
     if (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) {
       this._log.warn("onLocationChange - There was a problem fetching the SelfSupport URL (attempt " +
                      this._loadAttempts + ").");
 
       // Increase the number of attempts and bail out if we failed too many times.
       this._loadAttempts++;
       if (this._loadAttempts > MAX_RETRIES) {
         this._loadErrorCallback();
@@ -307,25 +307,25 @@ ProgressListener.prototype = {
       // when frequently failing.
       this._reloadTimerId = setTimeout(() => {
         this._log.debug("onLocationChange - Reloading SelfSupport URL in the hidden browser.");
         aWebProgress.DOMWindow.location.reload();
       }, RETRY_INTERVAL_MS * this._loadAttempts);
     }
   },
 
-  onStateChange: function(aWebProgress, aRequest, aFlags, aStatus) {
+  onStateChange(aWebProgress, aRequest, aFlags, aStatus) {
     if (aFlags & Ci.nsIWebProgressListener.STATE_STOP &&
         aFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK &&
         aFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW &&
         Components.isSuccessCode(aStatus)) {
       this._loadSuccessCallback();
     }
   },
 
-  destroy: function() {
+  destroy() {
     // Make sure we don't try to reload self support when shutting down.
     clearTimeout(this._reloadTimerId);
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
                                          Ci.nsISupportsWeakReference]),
 };
--- a/browser/modules/SitePermissions.jsm
+++ b/browser/modules/SitePermissions.jsm
@@ -22,17 +22,17 @@ this.SitePermissions = {
    * - state: a constant representing the current permission state
    *   (e.g. SitePermissions.ALLOW)
    *
    * To receive a more detailed, albeit less performant listing see
    * SitePermissions.getPermissionDetailsByURI().
    *
    * install addon permission is excluded, check bug 1303108
    */
-  getAllByURI: function(aURI) {
+  getAllByURI(aURI) {
     let result = [];
     if (!this.isSupportedURI(aURI)) {
       return result;
     }
 
     let permissions = Services.perms.getAllForURI(aURI);
     while (permissions.hasMoreElements()) {
       let permission = permissions.getNext();
@@ -59,126 +59,126 @@ this.SitePermissions = {
    * - label: the localized label
    * - state: a constant representing the aState permission state
    *   (e.g. SitePermissions.ALLOW), or the default if aState is omitted
    * - availableStates: an array of all available states for that permission,
    *   represented as objects with the keys:
    *   - id: the state constant
    *   - label: the translated label of that state
    */
-  getPermissionItem: function(aId, aState) {
+  getPermissionItem(aId, aState) {
     let availableStates = this.getAvailableStates(aId).map(state => {
       return { id: state, label: this.getStateLabel(aId, state) };
     });
     if (aState == undefined)
       aState = this.getDefault(aId);
     return {id: aId, label: this.getPermissionLabel(aId),
             state: aState, availableStates};
   },
 
   /* Returns a list of objects representing all permissions that are currently
    * set for the given URI. See getPermissionItem for the content of each object.
    */
-  getPermissionDetailsByURI: function(aURI) {
+  getPermissionDetailsByURI(aURI) {
     let permissions = [];
     for (let {state, id} of this.getAllByURI(aURI)) {
       permissions.push(this.getPermissionItem(id, state));
     }
 
     return permissions;
   },
 
   /* Checks whether a UI for managing permissions should be exposed for a given
    * URI. This excludes file URIs, for instance, as they don't have a host,
    * even though nsIPermissionManager can still handle them.
    */
-  isSupportedURI: function(aURI) {
+  isSupportedURI(aURI) {
     return aURI.schemeIs("http") || aURI.schemeIs("https");
   },
 
   /* Returns an array of all permission IDs.
    */
-  listPermissions: function() {
+  listPermissions() {
     return Object.keys(gPermissionObject);
   },
 
   /* Returns an array of permission states to be exposed to the user for a
    * permission with the given ID.
    */
-  getAvailableStates: function(aPermissionID) {
+  getAvailableStates(aPermissionID) {
     if (aPermissionID in gPermissionObject &&
         gPermissionObject[aPermissionID].states)
       return gPermissionObject[aPermissionID].states;
 
     if (this.getDefault(aPermissionID) == this.UNKNOWN)
       return [ SitePermissions.UNKNOWN, SitePermissions.ALLOW, SitePermissions.BLOCK ];
 
     return [ SitePermissions.ALLOW, SitePermissions.BLOCK ];
   },
 
   /* Returns the default state of a particular permission.
    */
-  getDefault: function(aPermissionID) {
+  getDefault(aPermissionID) {
     if (aPermissionID in gPermissionObject &&
         gPermissionObject[aPermissionID].getDefault)
       return gPermissionObject[aPermissionID].getDefault();
 
     return this.UNKNOWN;
   },
 
   /* Returns the state of a particular permission for a given URI.
    */
-  get: function(aURI, aPermissionID) {
+  get(aURI, aPermissionID) {
     if (!this.isSupportedURI(aURI))
       return this.UNKNOWN;
 
     let state;
     if (aPermissionID in gPermissionObject &&
         gPermissionObject[aPermissionID].exactHostMatch)
       state = Services.perms.testExactPermission(aURI, aPermissionID);
     else
       state = Services.perms.testPermission(aURI, aPermissionID);
     return state;
   },
 
   /* Sets the state of a particular permission for a given URI.
    */
-  set: function(aURI, aPermissionID, aState) {
+  set(aURI, aPermissionID, aState) {
     if (!this.isSupportedURI(aURI))
       return;
 
     if (aState == this.UNKNOWN) {
       this.remove(aURI, aPermissionID);
       return;
     }
 
     Services.perms.add(aURI, aPermissionID, aState);
   },
 
   /* Removes the saved state of a particular permission for a given URI.
    */
-  remove: function(aURI, aPermissionID) {
+  remove(aURI, aPermissionID) {
     if (!this.isSupportedURI(aURI))
       return;
 
     Services.perms.remove(aURI, aPermissionID);
   },
 
   /* Returns the localized label for the permission with the given ID, to be
    * used in a UI for managing permissions.
    */
-  getPermissionLabel: function(aPermissionID) {
+  getPermissionLabel(aPermissionID) {
     let labelID = gPermissionObject[aPermissionID].labelID || aPermissionID;
     return gStringBundle.GetStringFromName("permission." + labelID + ".label");
   },
 
   /* Returns the localized label for the given permission state, to be used in
    * a UI for managing permissions.
    */
-  getStateLabel: function(aPermissionID, aState, aInUse = false) {
+  getStateLabel(aPermissionID, aState, aInUse = false) {
     switch (aState) {
       case this.UNKNOWN:
         if (aInUse)
           return gStringBundle.GetStringFromName("allowTemporarily");
         return gStringBundle.GetStringFromName("alwaysAsk");
       case this.ALLOW:
         return gStringBundle.GetStringFromName("allow");
       case this.SESSION:
@@ -210,25 +210,25 @@ var gPermissionObject = {
    *    e.g. "desktop-notification2" to use permission.desktop-notification2.label
    *
    *  - states
    *    Array of permission states to be exposed to the user.
    *    Defaults to ALLOW, BLOCK and the default state (see getDefault).
    */
 
   "image": {
-    getDefault: function() {
+    getDefault() {
       return Services.prefs.getIntPref("permissions.default.image") == 2 ?
                SitePermissions.BLOCK : SitePermissions.ALLOW;
     }
   },
 
   "cookie": {
     states: [ SitePermissions.ALLOW, SitePermissions.SESSION, SitePermissions.BLOCK ],
-    getDefault: function() {
+    getDefault() {
       if (Services.prefs.getIntPref("network.cookie.cookieBehavior") == 2)
         return SitePermissions.BLOCK;
 
       if (Services.prefs.getIntPref("network.cookie.lifetimePolicy") == 2)
         return SitePermissions.SESSION;
 
       return SitePermissions.ALLOW;
     }
@@ -241,24 +241,24 @@ var gPermissionObject = {
 
   "camera": {},
   "microphone": {},
   "screen": {
     states: [ SitePermissions.UNKNOWN, SitePermissions.BLOCK ],
   },
 
   "popup": {
-    getDefault: function() {
+    getDefault() {
       return Services.prefs.getBoolPref("dom.disable_open_during_load") ?
                SitePermissions.BLOCK : SitePermissions.ALLOW;
     }
   },
 
   "install": {
-    getDefault: function() {
+    getDefault() {
       return Services.prefs.getBoolPref("xpinstall.whitelist.required") ?
                SitePermissions.BLOCK : SitePermissions.ALLOW;
     }
   },
 
   "geo": {
     exactHostMatch: true
   },
--- a/browser/modules/Social.jsm
+++ b/browser/modules/Social.jsm
@@ -87,55 +87,55 @@ this.Social = {
         Social._updateProviderCache(providers);
         let provider = Social._getProviderFromOrigin(origin);
         provider.reload();
       }
     });
     return deferred.promise;
   },
 
-  _updateEnabledState: function(enable) {
+  _updateEnabledState(enable) {
     for (let p of Social.providers) {
       p.enabled = enable;
     }
   },
 
   // Called to update our cache of providers and set the current provider
-  _updateProviderCache: function(providers) {
+  _updateProviderCache(providers) {
     this.providers = providers;
     Services.obs.notifyObservers(null, "social:providers-changed", null);
   },
 
   get enabled() {
     return !this._disabledForSafeMode && this.providers.length > 0;
   },
 
-  _getProviderFromOrigin: function(origin) {
+  _getProviderFromOrigin(origin) {
     for (let p of this.providers) {
       if (p.origin == origin) {
         return p;
       }
     }
     return null;
   },
 
-  getManifestByOrigin: function(origin) {
+  getManifestByOrigin(origin) {
     return SocialService.getManifestByOrigin(origin);
   },
 
-  installProvider: function(data, installCallback, options = {}) {
+  installProvider(data, installCallback, options = {}) {
     SocialService.installProvider(data, installCallback, options);
   },
 
-  uninstallProvider: function(origin, aCallback) {
+  uninstallProvider(origin, aCallback) {
     SocialService.uninstallProvider(origin, aCallback);
   },
 
   // Activation functionality
-  activateFromOrigin: function(origin, callback) {
+  activateFromOrigin(origin, callback) {
     // It's OK if the provider has already been activated - we still get called
     // back with it.
     SocialService.enableProvider(origin, callback);
   }
 };
 
 function sizeSocialPanelToContent(panel, iframe, requestedSize) {
   let doc = iframe.contentDocument;
@@ -220,17 +220,17 @@ DynamicResizeWatcher.prototype = {
       }
       this._mutationObserver = null;
     }
   }
 }
 
 
 this.OpenGraphBuilder = {
-  generateEndpointURL: function(URLTemplate, pageData) {
+  generateEndpointURL(URLTemplate, pageData) {
     // support for existing oexchange style endpoints by supporting their
     // querystring arguments. parse the query string template and do
     // replacements where necessary the query names may be different than ours,
     // so we could see u=%{url} or url=%{url}
     let [endpointURL, queryString] = URLTemplate.split("?");
     let query = {};
     if (queryString) {
       queryString.split('&').forEach(function(val) {
--- a/browser/modules/SocialService.jsm
+++ b/browser/modules/SocialService.jsm
@@ -53,17 +53,17 @@ var SocialServiceInternal = {
         Cu.reportError("SocialService: failed to load manifest: " + pref +
                        ", exception: " + err);
       }
     }
   },
   get manifests() {
     return this.manifestsGenerator();
   },
-  getManifestPrefname: function(origin) {
+  getManifestPrefname(origin) {
     // Retrieve the prefname for a given origin/manifest.
     // If no existing pref, return a generated prefname.
     let MANIFEST_PREFS = Services.prefs.getBranch("social.manifest.");
     let prefs = MANIFEST_PREFS.getChildList("", []);
     for (let pref of prefs) {
       try {
         var manifest = JSON.parse(MANIFEST_PREFS.getComplexValue(pref, Ci.nsISupportsString).data);
         if (manifest.origin == origin) {
@@ -72,17 +72,17 @@ var SocialServiceInternal = {
       } catch (err) {
         Cu.reportError("SocialService: failed to load manifest: " + pref +
                        ", exception: " + err);
       }
     }
     let originUri = Services.io.newURI(origin, null, null);
     return originUri.hostPort.replace('.', '-');
   },
-  orderedProviders: function(aCallback) {
+  orderedProviders(aCallback) {
     if (SocialServiceInternal.providerArray.length < 2) {
       schedule(function() {
         aCallback(SocialServiceInternal.providerArray);
       });
       return;
     }
     // query moz_hosts for frecency.  since some providers may not have a
     // frecency entry, we need to later sort on our own. We use the providers
@@ -101,28 +101,28 @@ var SocialServiceInternal = {
     let stmt = PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                                  .DBConnection.createAsyncStatement(
       "SELECT host, frecency FROM moz_hosts WHERE host IN (" +
       hosts.map(host => '"' + host + '"').join(",") + ") "
     );
 
     try {
       stmt.executeAsync({
-        handleResult: function(aResultSet) {
+        handleResult(aResultSet) {
           let row;
           while ((row = aResultSet.getNextRow())) {
             let rh = row.getResultByName("host");
             let frecency = row.getResultByName("frecency");
             providers[rh].frecency = parseInt(frecency) || 0;
           }
         },
-        handleError: function(aError) {
+        handleError(aError) {
           Cu.reportError(aError.message + " (Result = " + aError.result + ")");
         },
-        handleCompletion: function(aReason) {
+        handleCompletion(aReason) {
           // the query may not have returned all our providers, so we have
           // stamped the frecency on the provider and sort here. This makes sure
           // all enabled providers get sorted even with frecency zero.
           let providerList = SocialServiceInternal.providerArray;
           // reverse sort
           aCallback(providerList.sort((a, b) => b.frecency - a.frecency));
         }
       });
@@ -172,41 +172,41 @@ var ActiveProviders = {
     try {
       let pref = Services.prefs.getComplexValue("social.activeProviders",
                                                 Ci.nsISupportsString);
       this._providers = JSON.parse(pref);
     } catch (ex) {}
     return this._providers;
   },
 
-  has: function(origin) {
+  has(origin) {
     return (origin in this._providers);
   },
 
-  add: function(origin) {
+  add(origin) {
     this._providers[origin] = 1;
     this._deferredTask.arm();
   },
 
-  delete: function(origin) {
+  delete(origin) {
     delete this._providers[origin];
     this._deferredTask.arm();
   },
 
-  flush: function() {
+  flush() {
     this._deferredTask.disarm();
     this._persist();
   },
 
   get _deferredTask() {
     delete this._deferredTask;
     return this._deferredTask = new DeferredTask(this._persist.bind(this), 0);
   },
 
-  _persist: function() {
+  _persist() {
     let string = Cc["@mozilla.org/supports-string;1"].
                  createInstance(Ci.nsISupportsString);
     string.data = JSON.stringify(this._providers);
     Services.prefs.setComplexValue("social.activeProviders",
                                    Ci.nsISupportsString, string);
   }
 };
 
@@ -449,59 +449,59 @@ this.SocialService = {
   // must be "installed" (ie, in ActiveProviders)
   getProvider: function getProvider(origin, onDone) {
     schedule((function() {
       onDone(SocialServiceInternal.providers[origin] || null);
     }).bind(this));
   },
 
   // Returns an unordered array of installed providers
-  getProviderList: function(onDone) {
+  getProviderList(onDone) {
     schedule(function() {
       onDone(SocialServiceInternal.providerArray);
     });
   },
 
-  getManifestByOrigin: function(origin) {
+  getManifestByOrigin(origin) {
     for (let manifest of SocialServiceInternal.manifests) {
       if (origin == manifest.origin) {
         return manifest;
       }
     }
     return null;
   },
 
   // Returns an array of installed providers, sorted by frecency
-  getOrderedProviderList: function(onDone) {
+  getOrderedProviderList(onDone) {
     SocialServiceInternal.orderedProviders(onDone);
   },
 
-  getOriginActivationType: function(origin) {
+  getOriginActivationType(origin) {
     return getOriginActivationType(origin);
   },
 
   _providerListeners: new Map(),
   registerProviderListener: function registerProviderListener(listener) {
     this._providerListeners.set(listener, 1);
   },
   unregisterProviderListener: function unregisterProviderListener(listener) {
     this._providerListeners.delete(listener);
   },
 
-  _notifyProviderListeners: function(topic, origin, providers) {
+  _notifyProviderListeners(topic, origin, providers) {
     for (let [listener, ] of this._providerListeners) {
       try {
         listener(topic, origin, providers);
       } catch (ex) {
         Components.utils.reportError("SocialService: provider listener threw an exception: " + ex);
       }
     }
   },
 
-  _manifestFromData: function(type, data, installOrigin) {
+  _manifestFromData(type, data, installOrigin) {
     let featureURLs = ['shareURL'];
     let resolveURLs = featureURLs.concat(['postActivationURL']);
 
     if (type == 'directory' || type == 'internal') {
       // directory provided manifests must have origin in manifest, use that
       if (!data['origin']) {
         Cu.reportError("SocialService.manifestFromData directory service provided manifest without origin.");
         return null;
@@ -536,17 +536,17 @@ this.SocialService = {
           Cu.reportError("SocialService.manifestFromData unable to resolve '" + url + "' for " + principal.origin);
           return null;
         }
       }
     }
     return data;
   },
 
-  _showInstallNotification: function(data, aAddonInstaller) {
+  _showInstallNotification(data, aAddonInstaller) {
     let brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties");
     let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
 
     // internal/directory activations need to use the manifest origin, any other
     // use the domain activation is occurring on
     let url = data.url;
     if (data.installType == "internal" || data.installType == "directory") {
       url = data.manifest.origin;
@@ -555,33 +555,33 @@ this.SocialService = {
     let productName = brandBundle.GetStringFromName("brandShortName");
 
     let message = browserBundle.formatStringFromName("service.install.description",
                                                      [requestingURI.host, productName], 2);
 
     let action = {
       label: browserBundle.GetStringFromName("service.install.ok.label"),
       accessKey: browserBundle.GetStringFromName("service.install.ok.accesskey"),
-      callback: function() {
+      callback() {
         aAddonInstaller.install();
       },
     };
 
     let options = {
                     learnMoreURL: Services.urlFormatter.formatURLPref("app.support.baseURL") + "social-api",
                     persistent: true,
                   };
     let anchor = "servicesInstall-notification-icon";
     let notificationid = "servicesInstall";
     data.window.PopupNotifications.show(data.window.gBrowser.selectedBrowser,
                                         notificationid, message, anchor,
                                         action, [], options);
   },
 
-  installProvider: function(data, installCallback, options = {}) {
+  installProvider(data, installCallback, options = {}) {
     data.installType = getOriginActivationType(data.origin);
     // if we get data, we MUST have a valid manifest generated from the data
     let manifest = this._manifestFromData(data.installType, data.manifest, data.origin);
     if (!manifest)
       throw new Error("SocialService.installProvider: service configuration is invalid from " + data.url);
 
     let addon = new AddonWrapper(manifest);
     if (addon && addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED)
@@ -606,17 +606,17 @@ this.SocialService = {
         } catch (e) {
           Cu.reportError("Activation failed: " + e);
           installCallback(null);
         }
       }.bind(this));
     }.bind(this));
   },
 
-  _installProvider: function(data, options, installCallback) {
+  _installProvider(data, options, installCallback) {
     if (!data.manifest)
       throw new Error("Cannot install provider without manifest data");
 
     if (data.installType == "foreign" && !Services.prefs.getBoolPref("social.remote-install.enabled"))
       throw new Error("Remote install of services is disabled");
 
     // if installing from any website, the install must happen over https.
     // "internal" are installs from about:home or similar
@@ -628,26 +628,26 @@ this.SocialService = {
     let bypassPanel = options.bypassInstallPanel ||
                       (data.installType == "internal" && data.manifest.oneclick);
     if (bypassPanel)
       installer.install();
     else
       this._showInstallNotification(data, installer);
   },
 
-  createWrapper: function(manifest) {
+  createWrapper(manifest) {
     return new AddonWrapper(manifest);
   },
 
   /**
    * updateProvider is used from the worker to self-update.  Since we do not
    * have knowledge of the currently selected provider here, we will notify
    * the front end to deal with any reload.
    */
-  updateProvider: function(aUpdateOrigin, aManifest) {
+  updateProvider(aUpdateOrigin, aManifest) {
     let installType = this.getOriginActivationType(aUpdateOrigin);
     // if we get data, we MUST have a valid manifest generated from the data
     let manifest = this._manifestFromData(installType, aManifest, aUpdateOrigin);
     if (!manifest)
       throw new Error("SocialService.installProvider: service configuration is invalid from " + aUpdateOrigin);
 
     // overwrite the preference
     let string = Cc["@mozilla.org/supports-string;1"].
@@ -665,17 +665,17 @@ this.SocialService = {
       // update the cache and ui, reload provider if necessary
       this.getOrderedProviderList(providers => {
         this._notifyProviderListeners("provider-update", provider.origin, providers);
       });
     }
 
   },
 
-  uninstallProvider: function(origin, aCallback) {
+  uninstallProvider(origin, aCallback) {
     let manifest = SocialService.getManifestByOrigin(origin);
     let addon = new AddonWrapper(manifest);
     addon.uninstall(aCallback);
   }
 };
 
 /**
  * The SocialProvider object represents a social provider.
@@ -711,17 +711,17 @@ function SocialProvider(input) {
   try {
     this.domain = etld.getBaseDomainFromHost(originUri.host);
   } catch (e) {
     this.domain = originUri.host;
   }
 }
 
 SocialProvider.prototype = {
-  reload: function() {
+  reload() {
     // calling terminate/activate does not set the enabled state whereas setting
     // enabled will call terminate/activate
     this.enabled = false;
     this.enabled = true;
     Services.obs.notifyObservers(null, "social:provider-reload", this.origin);
   },
 
   // Provider enabled/disabled state.
@@ -742,17 +742,17 @@ SocialProvider.prototype = {
       this._terminate();
     }
   },
 
   get manifest() {
     return SocialService.getManifestByOrigin(this.origin);
   },
 
-  getPageSize: function(name) {
+  getPageSize(name) {
     let manifest = this.manifest;
     if (manifest && manifest.pageSize)
       return manifest.pageSize[name];
     return undefined;
   },
 
   // Internal helper methods
   _activate: function _activate() {
@@ -849,55 +849,55 @@ function AddonInstaller(sourceURI, aMani
   };
   this.cancel = function() {
     Services.prefs.clearUserPref(getPrefnameFromOrigin(aManifest.origin));
   };
   this.addon = new AddonWrapper(aManifest);
 }
 
 var SocialAddonProvider = {
-  startup: function() {},
+  startup() {},
 
-  shutdown: function() {},
+  shutdown() {},
 
-  updateAddonAppDisabledStates: function() {
+  updateAddonAppDisabledStates() {
     // we wont bother with "enabling" services that are released from blocklist
     for (let manifest of SocialServiceInternal.manifests) {
       try {
         if (ActiveProviders.has(manifest.origin)) {
           let addon = new AddonWrapper(manifest);
           if (addon.blocklistState != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) {
             SocialService.disableProvider(manifest.origin);
           }
         }
       } catch (e) {
         Cu.reportError(e);
       }
     }
   },
 
-  getAddonByID: function(aId, aCallback) {
+  getAddonByID(aId, aCallback) {
     for (let manifest of SocialServiceInternal.manifests) {
       if (aId == getAddonIDFromOrigin(manifest.origin)) {
         aCallback(new AddonWrapper(manifest));
         return;
       }
     }
     aCallback(null);
   },
 
-  getAddonsByTypes: function(aTypes, aCallback) {
+  getAddonsByTypes(aTypes, aCallback) {
     if (aTypes && aTypes.indexOf(ADDON_TYPE_SERVICE) == -1) {
       aCallback([]);
       return;
     }
     aCallback([...SocialServiceInternal.manifests].map(a => new AddonWrapper(a)));
   },
 
-  removeAddon: function(aAddon, aCallback) {
+  removeAddon(aAddon, aCallback) {
     AddonManagerPrivate.callAddonListeners("onUninstalling", aAddon, false);
     aAddon.pendingOperations |= AddonManager.PENDING_UNINSTALL;
     Services.prefs.clearUserPref(getPrefnameFromOrigin(aAddon.manifest.origin));
     aAddon.pendingOperations -= AddonManager.PENDING_UNINSTALL;
     AddonManagerPrivate.callAddonListeners("onUninstalled", aAddon);
     SocialService._notifyProviderListeners("provider-uninstalled", aAddon.manifest.origin);
     if (aCallback)
       schedule(aCallback);
@@ -938,17 +938,17 @@ AddonWrapper.prototype = {
   get scope() {
     return AddonManager.SCOPE_PROFILE;
   },
 
   get foreignInstall() {
     return false;
   },
 
-  isCompatibleWith: function(appVersion, platformVersion) {
+  isCompatibleWith(appVersion, platformVersion) {
     return true;
   },
 
   get providesUpdatesSecurely() {
     return true;
   },
 
   get blocklistState() {
@@ -988,17 +988,17 @@ AddonWrapper.prototype = {
         permissions |= AddonManager.PERM_CAN_ENABLE;
       } else {
         permissions |= AddonManager.PERM_CAN_DISABLE;
       }
     }
     return permissions;
   },
 
-  findUpdates: function(listener, reason, appVersion, platformVersion) {
+  findUpdates(listener, reason, appVersion, platformVersion) {
     if ("onNoCompatibilityUpdateAvailable" in listener)
       listener.onNoCompatibilityUpdateAvailable(this);
     if ("onNoUpdateAvailable" in listener)
       listener.onNoUpdateAvailable(this);
     if ("onUpdateFinished" in listener)
       listener.onUpdateFinished(this);
   },
 
@@ -1064,32 +1064,32 @@ AddonWrapper.prototype = {
     if (val) {
       SocialService.disableProvider(this.manifest.origin);
     } else if (!this.appDisabled) {
       SocialService.enableProvider(this.manifest.origin);
     }
     return val;
   },
 
-  uninstall: function(aCallback) {
+  uninstall(aCallback) {
     let prefName = getPrefnameFromOrigin(this.manifest.origin);
     if (Services.prefs.prefHasUserValue(prefName)) {
       if (ActiveProviders.has(this.manifest.origin)) {
         SocialService.disableProvider(this.manifest.origin, function() {
           SocialAddonProvider.removeAddon(this, aCallback);
         }.bind(this));
       } else {
         SocialAddonProvider.removeAddon(this, aCallback);
       }
     } else {
       schedule(aCallback);
     }
   },
 
-  cancelUninstall: function() {
+  cancelUninstall() {
     this._pending -= AddonManager.PENDING_UNINSTALL;
     AddonManagerPrivate.callAddonListeners("onOperationCancelled", this);
   }
 };
 
 
 AddonManagerPrivate.registerProvider(SocialAddonProvider, [
   new AddonManagerPrivate.AddonType(ADDON_TYPE_SERVICE, URI_EXTENSION_STRINGS,
--- a/browser/modules/TransientPrefs.jsm
+++ b/browser/modules/TransientPrefs.jsm
@@ -10,15 +10,15 @@ Components.utils.import("resource://gre/
 
 var prefVisibility = new Map;
 
 /* Use for preferences that should only be visible when they've been modified.
    When reset to their default state, they remain visible until restarting the
    application. */
 
 this.TransientPrefs = {
-  prefShouldBeVisible: function(prefName) {
+  prefShouldBeVisible(prefName) {
     if (Preferences.isSet(prefName))
       prefVisibility.set(prefName, true);
 
     return !!prefVisibility.get(prefName);
   }
 };
--- a/browser/modules/URLBarZoom.jsm
+++ b/browser/modules/URLBarZoom.jsm
@@ -6,17 +6,17 @@
 "use strict";
 
 this.EXPORTED_SYMBOLS = [ "URLBarZoom" ];
 
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 var URLBarZoom = {
 
-  init: function(aWindow) {
+  init(aWindow) {
     // Register ourselves with the service so we know when the zoom prefs change.
     Services.obs.addObserver(updateZoomButton, "browser-fullZoom:zoomChange", false);
     Services.obs.addObserver(updateZoomButton, "browser-fullZoom:zoomReset", false);
     Services.obs.addObserver(updateZoomButton, "browser-fullZoom:location-change", false);
   },
 }
 
 function updateZoomButton(aSubject, aTopic) {
--- a/browser/modules/Windows8WindowFrameColor.jsm
+++ b/browser/modules/Windows8WindowFrameColor.jsm
@@ -9,17 +9,17 @@ this.EXPORTED_SYMBOLS = ["Windows8Window
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 var Registry = Cu.import("resource://gre/modules/WindowsRegistry.jsm").WindowsRegistry;
 
 var Windows8WindowFrameColor = {
   _windowFrameColor: null,
 
-  get: function() {
+  get() {
     if (this._windowFrameColor)
       return this._windowFrameColor;
 
     const HKCU = Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER;
     const dwmKey = "Software\\Microsoft\\Windows\\DWM";
     let customizationColor = Registry.readRegKey(HKCU, dwmKey,
                                                  "ColorizationColor");
     if (customizationColor == undefined) {
--- a/browser/modules/WindowsJumpLists.jsm
+++ b/browser/modules/WindowsJumpLists.jsm
@@ -421,31 +421,31 @@ this.WinTaskbarJumpList =
     var options = PlacesUtils.history.getNewQueryOptions();
     options.maxResults = aLimit;
     options.sortingMode = aSortingMode;
     var query = PlacesUtils.history.getNewQuery();
 
     // Return the pending statement to the caller, to allow cancelation.
     return PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                               .asyncExecuteLegacyQueries([query], 1, options, {
-      handleResult: function(aResultSet) {
+      handleResult(aResultSet) {
         for (let row; (row = aResultSet.getNextRow());) {
           try {
             aCallback.call(aScope,
                            { uri: row.getResultByIndex(1)
                            , title: row.getResultByIndex(2)
                            });
           } catch (e) {}
         }
       },
-      handleError: function(aError) {
+      handleError(aError) {
         Components.utils.reportError(
           "Async execution error (" + aError.result + "): " + aError.message);
       },
-      handleCompletion: function(aReason) {
+      handleCompletion(aReason) {
         aCallback.call(WinTaskbarJumpList, null);
       },
     });
   },
 
   _clearHistory: function WTBJL__clearHistory(items) {
     if (!items)
       return;
--- a/browser/modules/WindowsPreviewPerTab.jsm
+++ b/browser/modules/WindowsPreviewPerTab.jsm
@@ -67,17 +67,17 @@ XPCOMUtils.defineLazyServiceGetter(this,
                                    "@mozilla.org/image/tools;1",
                                    "imgITools");
 XPCOMUtils.defineLazyModuleGetter(this, "PageThumbs",
                                   "resource://gre/modules/PageThumbs.jsm");
 
 // nsIURI -> imgIContainer
 function _imageFromURI(uri, privateMode, callback) {
   let channel = NetUtil.newChannel({
-    uri: uri,
+    uri,
     loadUsingSystemPrincipal: true,
     contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE
   });
 
   try {
     channel.QueryInterface(Ci.nsIPrivateBrowsingChannel);
     channel.setPrivate(privateMode);
   } catch (e) {
@@ -153,39 +153,39 @@ function PreviewController(win, tab) {
     return canvas;
   });
 }
 
 PreviewController.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsITaskbarPreviewController,
                                          Ci.nsIDOMEventListener]),
 
-  destroy: function() {
+  destroy() {
     this.tab.removeEventListener("TabAttrModified", this, false);
 
     // Break cycles, otherwise we end up leaking the window with everything
     // attached to it.
     delete this.win;
     delete this.preview;
   },
 
   get wrappedJSObject() {
     return this;
   },
 
   // Resizes the canvasPreview to 0x0, essentially freeing its memory.
-  resetCanvasPreview: function() {
+  resetCanvasPreview() {
     this.canvasPreview.width = 0;
     this.canvasPreview.height = 0;
   },
 
   /**
    * Set the canvas dimensions.
    */
-  resizeCanvasPreview: function(aRequestedWidth, aRequestedHeight) {
+  resizeCanvasPreview(aRequestedWidth, aRequestedHeight) {
     this.canvasPreview.width = aRequestedWidth;
     this.canvasPreview.height = aRequestedHeight;
   },
 
 
   get zoom() {
     // Note that winutils.fullZoom accounts for "quantization" of the zoom factor
     // from nsIContentViewer due to conversion through appUnits.
@@ -199,44 +199,44 @@ PreviewController.prototype = {
     let windowUtils = chromeWin.getInterface(Ci.nsIDOMWindowUtils);
     return windowUtils.screenPixelsPerCSSPixel;
   },
 
   get browserDims() {
     return this.tab.linkedBrowser.getBoundingClientRect();
   },
 
-  cacheBrowserDims: function() {
+  cacheBrowserDims() {
     let dims = this.browserDims;
     this._cachedWidth = dims.width;
     this._cachedHeight = dims.height;
   },
 
-  testCacheBrowserDims: function() {
+  testCacheBrowserDims() {
     let dims = this.browserDims;
     return this._cachedWidth == dims.width &&
       this._cachedHeight == dims.height;
   },
 
   /**
    * Capture a new thumbnail image for this preview. Called by the controller
    * in response to a request for a new thumbnail image.
    */
-  updateCanvasPreview: function(aFullScale, aCallback) {
+  updateCanvasPreview(aFullScale, aCallback) {
     // Update our cached browser dims so that delayed resize
     // events don't trigger another invalidation if this tab becomes active.
     this.cacheBrowserDims();
     PageThumbs.captureToCanvas(this.linkedBrowser, this.canvasPreview,
                                aCallback, { fullScale: aFullScale });
     // If we're updating the canvas, then we're in the middle of a peek so
     // don't discard the cache of previews.
     AeroPeek.resetCacheTimer();
   },
 
-  updateTitleAndTooltip: function() {
+  updateTitleAndTooltip() {
     let title = this.win.tabbrowser.getWindowTitleForBrowser(this.linkedBrowser);
     this.preview.title = title;
     this.preview.tooltip = title;
   },
 
   // nsITaskbarPreviewController
 
   // window width and height, not browser
@@ -259,17 +259,17 @@ PreviewController.prototype = {
   },
 
   /**
    * Responds to taskbar requests for window previews. Returns the results asynchronously
    * through updateCanvasPreview.
    *
    * @param aTaskbarCallback nsITaskbarPreviewCallback results callback
    */
-  requestPreview: function(aTaskbarCallback) {
+  requestPreview(aTaskbarCallback) {
     // Grab a high res content preview
     this.resetCanvasPreview();
     this.updateCanvasPreview(true, (aPreviewCanvas) => {
       let winWidth = this.win.width;
       let winHeight = this.win.height;
 
       let composite = PageThumbs.createCanvas();
 
@@ -307,39 +307,39 @@ PreviewController.prototype = {
    *
    * Note Windows requests a specific width and height here, if the resulting thumbnail
    * does not match these dimensions thumbnail display will fail.
    *
    * @param aTaskbarCallback nsITaskbarPreviewCallback results callback
    * @param aRequestedWidth width of the requested thumbnail
    * @param aRequestedHeight height of the requested thumbnail
    */
-  requestThumbnail: function(aTaskbarCallback, aRequestedWidth, aRequestedHeight) {
+  requestThumbnail(aTaskbarCallback, aRequestedWidth, aRequestedHeight) {
     this.resizeCanvasPreview(aRequestedWidth, aRequestedHeight);
     this.updateCanvasPreview(false, (aThumbnailCanvas) => {
       aTaskbarCallback.done(aThumbnailCanvas, false);
     });
   },
 
   // Event handling
 
-  onClose: function() {
+  onClose() {
     this.win.tabbrowser.removeTab(this.tab);
   },
 
-  onActivate: function() {
+  onActivate() {
     this.win.tabbrowser.selectedTab = this.tab;
 
     // Accept activation - this will restore the browser window
     // if it's minimized
     return true;
   },
 
   // nsIDOMEventListener
-  handleEvent: function(evt) {
+  handleEvent(evt) {
     switch (evt.type) {
       case "TabAttrModified":
         this.updateTitleAndTooltip();
         break;
     }
   }
 };
 
@@ -384,17 +384,17 @@ function TabWindow(win) {
 
 TabWindow.prototype = {
   _enabled: false,
   _cachedWidth: 0,
   _cachedHeight: 0,
   tabEvents: ["TabOpen", "TabClose", "TabSelect", "TabMove"],
   winEvents: ["resize"],
 
-  destroy: function() {
+  destroy() {
     this._destroying = true;
 
     let tabs = this.tabbrowser.tabs;
 
     this.tabbrowser.removeTabsProgressListener(this);
 
     for (let i = 0; i < this.winEvents.length; i++)
       this.win.removeEventListener(this.winEvents[i], this, false);
@@ -412,51 +412,51 @@ TabWindow.prototype = {
 
   get width() {
     return this.win.innerWidth;
   },
   get height() {
     return this.win.innerHeight;
   },
 
-  cacheDims: function() {
+  cacheDims() {
     this._cachedWidth = this.width;
     this._cachedHeight = this.height;
   },
 
-  testCacheDims: function() {
+  testCacheDims() {
     return this._cachedWidth == this.width && this._cachedHeight == this.height;
   },
 
   // Invoked when the given tab is added to this window
-  newTab: function(tab) {
+  newTab(tab) {
     let controller = new PreviewController(this, tab);
     // It's OK to add the preview now while the favicon still loads.
     this.previews.set(tab, controller.preview);
     AeroPeek.addPreview(controller.preview);
     // updateTitleAndTooltip relies on having controller.preview which is lazily resolved.
     // Now that we've updated this.previews, it will resolve successfully.
     controller.updateTitleAndTooltip();
   },
 
-  createTabPreview: function(controller) {
+  createTabPreview(controller) {
     let docShell = this.win
                   .QueryInterface(Ci.nsIInterfaceRequestor)
                   .getInterface(Ci.nsIWebNavigation)
                   .QueryInterface(Ci.nsIDocShell);
     let preview = AeroPeek.taskbar.createTaskbarTabPreview(docShell, controller);
     preview.visible = AeroPeek.enabled;
     preview.active = this.tabbrowser.selectedTab == controller.tab;
     this.onLinkIconAvailable(controller.tab.linkedBrowser,
                              controller.tab.getAttribute("image"));
     return preview;
   },
 
   // Invoked when the given tab is closed
-  removeTab: function(tab) {
+  removeTab(tab) {
     let preview = this.previewFromTab(tab);
     preview.active = false;
     preview.visible = false;
     preview.move(null);
     preview.controller.wrappedJSObject.destroy();
 
     this.previews.delete(tab);
     AeroPeek.removePreview(preview);
@@ -473,21 +473,21 @@ TabWindow.prototype = {
     // at once.
     for (let [, preview] of this.previews) {
       preview.move(null);
       preview.visible = enable;
     }
     this.updateTabOrdering();
   },
 
-  previewFromTab: function(tab) {
+  previewFromTab(tab) {
     return this.previews.get(tab);
   },
 
-  updateTabOrdering: function() {
+  updateTabOrdering() {
     let previews = this.previews;
     let tabs = this.tabbrowser.tabs;
 
     // Previews are internally stored using a map, so we need to iterate the
     // tabbrowser's array of tabs to retrieve previews in the same order.
     let inorder = [];
     for (let t of tabs) {
       if (previews.has(t)) {
@@ -500,17 +500,17 @@ TabWindow.prototype = {
     // the local array backwards, otherwise we would send move requests in the
     // wrong order.  See bug 522610 for details.
     for (let i = inorder.length - 1; i >= 0; i--) {
       inorder[i].move(inorder[i + 1] || null);
     }
   },
 
   // nsIDOMEventListener
-  handleEvent: function(evt) {
+  handleEvent(evt) {
     let tab = evt.originalTarget;
     switch (evt.type) {
       case "TabOpen":
         this.newTab(tab);
         this.updateTabOrdering();
         break;
       case "TabClose":
         this.removeTab(tab);
@@ -526,17 +526,17 @@ TabWindow.prototype = {
         if (!AeroPeek._prefenabled)
           return;
         this.onResize();
         break;
     }
   },
 
   // Set or reset a timer that will invalidate visible thumbnails soon.
-  setInvalidationTimer: function() {
+  setInvalidationTimer() {
     if (!this.invalidateTimer) {
       this.invalidateTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     }
     this.invalidateTimer.cancel();
 
     // delay 1 second before invalidating
     this.invalidateTimer.initWithCallback(() => {
       // invalidate every preview. note the internal implementation of
@@ -546,17 +546,17 @@ TabWindow.prototype = {
         if (!controller.testCacheBrowserDims()) {
           controller.cacheBrowserDims();
           aPreview.invalidate();
         }
       });
     }, 1000, Ci.nsITimer.TYPE_ONE_SHOT);
   },
 
-  onResize: function() {
+  onResize() {
     // Specific to a window.
 
     // Call invalidate on each tab thumbnail so that Windows will request an
     // updated image. However don't do this repeatedly across multiple resize
     // events triggered during window border drags.
 
     if (this.testCacheDims()) {
       return;
@@ -564,44 +564,44 @@ TabWindow.prototype = {
 
     // update the window dims on our TabWindow object.
     this.cacheDims();
 
     // invalidate soon
     this.setInvalidationTimer();
   },
 
-  invalidateTabPreview: function(aBrowser) {
+  invalidateTabPreview(aBrowser) {
     for (let [tab, preview] of this.previews) {
       if (aBrowser == tab.linkedBrowser) {
         preview.invalidate();
         break;
       }
     }
   },
 
   // Browser progress listener
 
-  onLocationChange: function(aBrowser) {
+  onLocationChange(aBrowser) {
     // I'm not sure we need this, onStateChange does a really good job
     // of picking up page changes.
     // this.invalidateTabPreview(aBrowser);
   },
 
-  onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
         aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
       this.invalidateTabPreview(aBrowser);
     }
   },
 
   directRequestProtocols: new Set([
     "file", "chrome", "resource", "about"
   ]),
-  onLinkIconAvailable: function(aBrowser, aIconURL) {
+  onLinkIconAvailable(aBrowser, aIconURL) {
     let requestURL = null;
     if (aIconURL) {
       let shouldRequestFaviconURL = true;
       try {
         let urlObject = NetUtil.newURI(aIconURL);
         shouldRequestFaviconURL =
           !this.directRequestProtocols.has(urlObject.scheme);
       } catch (ex) {}
@@ -657,17 +657,17 @@ this.AeroPeek = {
   taskbar: null,
 
   // Maximum number of previews
   maxpreviews: 20,
 
   // Length of time in seconds that previews are cached
   cacheLifespan: 20,
 
-  initialize: function() {
+  initialize() {
     if (!(WINTASKBAR_CONTRACTID in Cc))
       return;
     this.taskbar = Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar);
     this.available = this.taskbar.available;
     if (!this.available)
       return;
 
     this.prefs.addObserver(TOGGLE_PREF_NAME, this, true);
@@ -747,61 +747,61 @@ this.AeroPeek = {
       // We can't call onCloseWindow here because it'll bail if we're not
       // enabled.
       let tabWinObject = this.windows[0];
       tabWinObject.destroy(); // This will remove us from the array.
       delete tabWinObject.win.gTaskbarTabGroup; // Tidy up the window.
     }
   },
 
-  addPreview: function(preview) {
+  addPreview(preview) {
     this.previews.push(preview);
     this.checkPreviewCount();
   },
 
-  removePreview: function(preview) {
+  removePreview(preview) {
     let idx = this.previews.indexOf(preview);
     this.previews.splice(idx, 1);
     this.checkPreviewCount();
   },
 
-  checkPreviewCount: function() {
+  checkPreviewCount() {
     if (!this._prefenabled) {
       return;
     }
     this.enabled = this.previews.length <= this.maxpreviews;
   },
 
-  onOpenWindow: function(win) {
+  onOpenWindow(win) {
     // This occurs when the taskbar service is not available (xp, vista)
     if (!this.available || !this._prefenabled)
       return;
 
     win.gTaskbarTabGroup = new TabWindow(win);
   },
 
-  onCloseWindow: function(win) {
+  onCloseWindow(win) {
     // This occurs when the taskbar service is not available (xp, vista)
     if (!this.available || !this._prefenabled)
       return;
 
     win.gTaskbarTabGroup.destroy();
     delete win.gTaskbarTabGroup;
 
     if (this.windows.length == 0)
       this.destroy();
   },
 
-  resetCacheTimer: function() {
+  resetCacheTimer() {
     this.cacheTimer.cancel();
     this.cacheTimer.init(this, 1000 * this.cacheLifespan, Ci.nsITimer.TYPE_ONE_SHOT);
   },
 
   // nsIObserver
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic == "nsPref:changed" && aData == TOGGLE_PREF_NAME) {
       this._prefenabled = this.prefs.getBoolPref(TOGGLE_PREF_NAME);
     }
     if (!this._prefenabled) {
       return;
     }
     switch (aTopic) {
       case "nsPref:changed":
--- a/browser/modules/offlineAppCache.jsm
+++ b/browser/modules/offlineAppCache.jsm
@@ -5,16 +5,16 @@
 this.EXPORTED_SYMBOLS = ["OfflineAppCacheHelper"];
 
 Components.utils.import('resource://gre/modules/LoadContextInfo.jsm');
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 
 this.OfflineAppCacheHelper = {
-  clear: function() {
+  clear() {
     var cacheService = Cc["@mozilla.org/netwerk/cache-storage-service;1"].getService(Ci.nsICacheStorageService);
     var appCacheStorage = cacheService.appCacheStorage(LoadContextInfo.default, null);
     try {
       appCacheStorage.asyncEvictStorage(null);
     } catch (er) {}
   }
 };
--- a/browser/modules/test/browser_ContentSearch.js
+++ b/browser/modules/test/browser_ContentSearch.js
@@ -92,17 +92,17 @@ add_task(function* search() {
     searchString: "ContentSearchTest",
     healthReportKey: "ContentSearchTest",
     searchPurpose: "ContentSearchTest",
   };
   let submissionURL =
     engine.getSubmission(data.searchString, "", data.whence).uri.spec;
   gMsgMan.sendAsyncMessage(TEST_MSG, {
     type: "Search",
-    data: data,
+    data,
     expectedURL: submissionURL,
   });
   let msg = yield waitForTestMsg("loadStopped");
   Assert.equal(msg.data.url, submissionURL, "Correct search page loaded");
 });
 
 add_task(function* searchInBackgroundTab() {
   // This test is like search(), but it opens a new tab after starting a search
@@ -116,17 +116,17 @@ add_task(function* searchInBackgroundTab
     searchString: "ContentSearchTest",
     healthReportKey: "ContentSearchTest",
     searchPurpose: "ContentSearchTest",
   };
   let submissionURL =
     engine.getSubmission(data.searchString, "", data.whence).uri.spec;
   gMsgMan.sendAsyncMessage(TEST_MSG, {
     type: "Search",
-    data: data,
+    data,
     expectedURL: submissionURL,
   });
 
   let newTab = gBrowser.addTab();
   gBrowser.selectedTab = newTab;
   registerCleanupFunction(() => gBrowser.removeTab(newTab));
 
   let msg = yield waitForTestMsg("loadStopped");
@@ -310,21 +310,21 @@ function waitForNewEngine(basename, numI
     expectedSearchEvents.push("CurrentState");
   }
   let eventPromises = expectedSearchEvents.map(e => waitForTestMsg(e));
 
   // Wait for addEngine().
   let addDeferred = Promise.defer();
   let url = getRootDirectory(gTestPath) + basename;
   Services.search.addEngine(url, null, "", false, {
-    onSuccess: function(engine) {
+    onSuccess(engine) {
       info("Search engine added: " + basename);
       addDeferred.resolve(engine);
     },
-    onError: function(errCode) {
+    onError(errCode) {
       ok(false, "addEngine failed with error code " + errCode);
       addDeferred.reject();
     },
   });
 
   return Promise.all([addDeferred.promise].concat(eventPromises));
 }
 
--- a/browser/modules/test/browser_PermissionUI.js
+++ b/browser/modules/test/browser_PermissionUI.js
@@ -218,28 +218,28 @@ add_task(function* test_with_permission_
     const kTestPermissionKey = "test-permission-key";
 
     let allowed = false;
     let mainAction = {
       label: "Allow",
       accessKey: "M",
       action: Ci.nsIPermissionManager.ALLOW_ACTION,
       expiryType: Ci.nsIPermissionManager.EXPIRE_SESSION,
-      callback: function() {
+      callback() {
         allowed = true;
       }
     };
 
     let denied = false;
     let secondaryAction = {
       label: "Deny",
       accessKey: "D",
       action: Ci.nsIPermissionManager.DENY_ACTION,
       expiryType: Ci.nsIPermissionManager.EXPIRE_SESSION,
-      callback: function() {
+      callback() {
         denied = true;
       }
     };
 
     let mockRequest = makeMockPermissionRequest(browser);
     let principal = mockRequest.principal;
     registerCleanupFunction(function() {
       Services.perms.removeFromPrincipal(principal, kTestPermissionKey);
@@ -371,26 +371,26 @@ add_task(function* test_no_request() {
     gBrowser,
     url: "http://example.com",
   }, function*(browser) {
     const kTestNotificationID = "test-notification";
     let allowed = false;
     let mainAction = {
       label: "Allow",
       accessKey: "M",
-      callback: function() {
+      callback() {
         allowed = true;
       }
     };
 
     let denied = false;
     let secondaryAction = {
       label: "Deny",
       accessKey: "D",
-      callback: function() {
+      callback() {
         denied = true;
       }
     };
 
     const kTestMessage = "Test message with no request";
     let principal = browser.contentPrincipal;
     let beforeShown = false;
 
--- a/browser/modules/test/browser_ProcessHangNotifications.js
+++ b/browser/modules/test/browser_ProcessHangNotifications.js
@@ -39,50 +39,50 @@ let gTestHangReport = {
   SLOW_SCRIPT: 1,
   PLUGIN_HANG: 2,
 
   TEST_CALLBACK_CANCELED: 1,
   TEST_CALLBACK_TERMSCRIPT: 2,
   TEST_CALLBACK_TERMPLUGIN: 3,
 
   _hangType: 1,
-  _tcb: function(aCallbackType) {},
+  _tcb(aCallbackType) {},
 
   get hangType() {
     return this._hangType;
   },
 
   set hangType(aValue) {
     this._hangType = aValue;
   },
 
   set testCallback(aValue) {
     this._tcb = aValue;
   },
 
-  QueryInterface: function(aIID) {
+  QueryInterface(aIID) {
     if (aIID.equals(Components.interfaces.nsIHangReport) ||
         aIID.equals(Components.interfaces.nsISupports))
       return this;
     throw Components.results.NS_NOINTERFACE;
   },
 
-  userCanceled: function() {
+  userCanceled() {
     this._tcb(this.TEST_CALLBACK_CANCELED);
   },
 
-  terminateScript: function() {
+  terminateScript() {
     this._tcb(this.TEST_CALLBACK_TERMSCRIPT);
   },
 
-  terminatePlugin: function() {
+  terminatePlugin() {
     this._tcb(this.TEST_CALLBACK_TERMPLUGIN);
   },
 
-  isReportForBrowser: function(aFrameLoader) {
+  isReportForBrowser(aFrameLoader) {
     return true;
   }
 };
 
 // on dev edition we add a button for js debugging of hung scripts.
 let buttonCount = (UpdateUtils.UpdateChannel == "aurora" ? 3 : 2);
 
 /**
--- a/browser/modules/test/contentSearch.js
+++ b/browser/modules/test/contentSearch.js
@@ -25,28 +25,28 @@ addMessageListener(TEST_MSG, msg => {
   );
 
   // If the message is a search, stop the page from loading and then tell the
   // test that it loaded.
   if (msg.data.type == "Search") {
     waitForLoadAndStopIt(msg.data.expectedURL, url => {
       sendAsyncMessage(TEST_MSG, {
         type: "loadStopped",
-        url: url,
+        url,
       });
     });
   }
 });
 
 function waitForLoadAndStopIt(expectedURL, callback) {
   let Ci = Components.interfaces;
   let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                             .getInterface(Ci.nsIWebProgress);
   let listener = {
-    onStateChange: function(webProg, req, flags, status) {
+    onStateChange(webProg, req, flags, status) {
       if (req instanceof Ci.nsIChannel) {
         let url = req.originalURI.spec;
         dump("waitForLoadAndStopIt: onStateChange " + url + "\n");
         let docStart = Ci.nsIWebProgressListener.STATE_IS_DOCUMENT |
                        Ci.nsIWebProgressListener.STATE_START;
         if ((flags & docStart) && webProg.isTopLevel && url == expectedURL) {
           webProgress.removeProgressListener(listener);
           req.cancel(Components.results.NS_ERROR_FAILURE);
--- a/browser/modules/test/unit/social/head.js
+++ b/browser/modules/test/unit/social/head.js
@@ -127,28 +127,28 @@ function do_initialize_social(enabledOnS
 }
 
 function AsyncRunner() {
   do_test_pending();
   do_register_cleanup(() => this.destroy());
 
   this._callbacks = {
     done: do_test_finished,
-    error: function(err) {
+    error(err) {
       // xpcshell test functions like do_check_eq throw NS_ERROR_ABORT on
       // failure.  Ignore those so they aren't rethrown here.
       if (err !== Cr.NS_ERROR_ABORT) {
         if (err.stack) {
           err = err + " - See following stack:\n" + err.stack +
                       "\nUseless do_throw stack";
         }
         do_throw(err);
       }
     },
-    consoleError: function(scriptErr) {
+    consoleError(scriptErr) {
       // Try to ensure the error is related to the test.
       let filename = scriptErr.sourceName || scriptErr.toString() || "";
       if (filename.indexOf("/toolkit/components/social/") >= 0)
         do_throw(scriptErr);
     },
   };
   this._iteratorQueue = [];
 
--- a/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js
+++ b/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js
@@ -242,17 +242,17 @@ function run_test() {
   });
 }
 
 
 function setTimeout(fun, timeout) {
   let timer = Components.classes["@mozilla.org/timer;1"]
                         .createInstance(Components.interfaces.nsITimer);
   var event = {
-    notify: function() {
+    notify() {
       fun();
     }
   };
   timer.initWithCallback(event, timeout,
                          Components.interfaces.nsITimer.TYPE_ONE_SHOT);
   return timer;
 }
 
@@ -1057,17 +1057,17 @@ add_task(function* test_DirectoryLinksPr
   ]};
   let dataURI = 'data:application/json,' + JSON.stringify(data);
   yield promiseSetupDirectoryLinksProvider({linksURL: dataURI});
 
   let links = yield fetchData();
   do_check_eq(links.length, 0); // There are no directory links.
 
   function checkEnhanced(url, image) {
-    let enhanced = DirectoryLinksProvider.getEnhancedLink({url: url});
+    let enhanced = DirectoryLinksProvider.getEnhancedLink({url});
     do_check_eq(enhanced && enhanced.enhancedImageURI, image);
   }
 
   // Get the expected image for the same site
   checkEnhanced("http://example.net/", "data:,net1");
   checkEnhanced("http://example.net/path", "data:,net1");
   checkEnhanced("https://www.example.net/", "data:,net1");
   checkEnhanced("https://www3.example.net/", "data:,net1");
@@ -1482,17 +1482,17 @@ add_task(function* test_DirectoryLinksPr
 
   do_check_true(DirectoryLinksProvider._testFrequencyCapLimits("bar.com"));
   // report site action
   yield DirectoryLinksProvider.reportSitesAction([{
     link: {
       targetedSite: "foo.com",
       url: "bar.com"
     },
-    isPinned: function() { return false; },
+    isPinned() { return false; },
   }], "view", 0);
 
   // read file content and ensure that view counters are updated
   let data = yield readJsonFile(DirectoryLinksProvider._frequencyCapFilePath);
   do_check_eq(data["bar.com"].dailyViews, 1);
   do_check_eq(data["bar.com"].totalViews, 1);
 
   yield promiseCleanDirectoryLinksProvider();
@@ -1526,19 +1526,19 @@ add_task(function* test_DirectoryLinksPr
         uri: NetUtil.newURI(landingUrl),
         title: "HELLO",
         visits: [{
           visitDate: Date.now() * 1000,
           transitionType: Ci.nsINavHistoryService.TRANSITION_LINK
         }]
       },
       {
-        handleError: function() { do_check_true(false); },
-        handleResult: function() {},
-        handleCompletion: function() { resolve(); }
+        handleError() { do_check_true(false); },
+        handleResult() {},
+        handleCompletion() { resolve(); }
       }
     );
   });
 
   function UrlDeletionTester() {
     this.promise = new Promise(resolve => {
       this.onDeleteURI = (directoryLinksProvider, link) => {
         resolve();
@@ -1822,17 +1822,17 @@ add_task(function* test_blockSuggestedTi
   });
 
   // ensure that tile is suggested
   let suggestedLink = DirectoryLinksProvider._updateSuggestedTile();
   do_check_true(suggestedLink.frecent_sites);
 
   // block suggested tile in a regular way
   DirectoryLinksProvider.reportSitesAction([{
-      isPinned: function() { return false; },
+      isPinned() { return false; },
       link: Object.assign({frecency: 1000}, suggestedLink)
   }], "block", 0);
 
   // suggested tile still must be recommended
   suggestedLink = DirectoryLinksProvider._updateSuggestedTile();
   do_check_true(suggestedLink.frecent_sites);
 
   // timestamp suggested_block in the frequency cap object
--- a/browser/modules/webrtcUI.jsm
+++ b/browser/modules/webrtcUI.jsm
@@ -24,17 +24,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function() {
   return Services.strings.createBundle("chrome://branding/locale/brand.properties");
 });
 
 this.webrtcUI = {
   peerConnectionBlockers: new Set(),
   emitter: new EventEmitter(),
 
-  init: function() {
+  init() {
     Services.obs.addObserver(maybeAddMenuIndicator, "browser-delayed-startup-finished", false);
 
     let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
                  .getService(Ci.nsIMessageBroadcaster);
     ppmm.addMessageListener("webrtc:UpdatingIndicators", this);
     ppmm.addMessageListener("webrtc:UpdateGlobalIndicators", this);
     ppmm.addMessageListener("child-process-shutdown", this);
 
@@ -42,17 +42,17 @@ this.webrtcUI = {
                .getService(Ci.nsIMessageListenerManager);
     mm.addMessageListener("rtcpeer:Request", this);
     mm.addMessageListener("rtcpeer:CancelRequest", this);
     mm.addMessageListener("webrtc:Request", this);
     mm.addMessageListener("webrtc:CancelRequest", this);
     mm.addMessageListener("webrtc:UpdateBrowserIndicators", this);
   },
 
-  uninit: function() {
+  uninit() {
     Services.obs.removeObserver(maybeAddMenuIndicator, "browser-delayed-startup-finished");
 
     let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
                  .getService(Ci.nsIMessageBroadcaster);
     ppmm.removeMessageListener("webrtc:UpdatingIndicators", this);
     ppmm.removeMessageListener("webrtc:UpdateGlobalIndicators", this);
 
     let mm = Cc["@mozilla.org/globalmessagemanager;1"]
@@ -108,46 +108,46 @@ this.webrtcUI = {
     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: function(aCamera, aMicrophone, aScreen) {
+  getActiveStreams(aCamera, aMicrophone, aScreen) {
     return webrtcUI._streams.filter(aStream => {
       let state = aStream.state;
       return aCamera && state.camera ||
              aMicrophone && state.microphone ||
              aScreen && state.screen;
     }).map(aStream => {
       let state = aStream.state;
       let types = {camera: state.camera, microphone: state.microphone,
                    screen: state.screen};
       let browser = aStream.browser;
       let browserWindow = browser.ownerGlobal;
       let tab = browserWindow.gBrowser &&
                 browserWindow.gBrowser.getTabForBrowser(browser);
-      return {uri: state.documentURI, tab: tab, browser: browser, types: types};
+      return {uri: state.documentURI, tab, browser, types};
     });
   },
 
-  swapBrowserForNotification: function(aOldBrowser, aNewBrowser) {
+  swapBrowserForNotification(aOldBrowser, aNewBrowser) {
     for (let stream of this._streams) {
       if (stream.browser == aOldBrowser)
         stream.browser = aNewBrowser;
     }
   },
 
-  forgetStreamsFromBrowser: function(aBrowser) {
+  forgetStreamsFromBrowser(aBrowser) {
     this._streams = this._streams.filter(stream => stream.browser != aBrowser);
   },
 
-  showSharingDoorhanger: function(aActiveStream) {
+  showSharingDoorhanger(aActiveStream) {
     let browserWindow = aActiveStream.browser.ownerGlobal;
     if (aActiveStream.tab) {
       browserWindow.gBrowser.selectedTab = aActiveStream.tab;
     } else {
       aActiveStream.browser.focus();
     }
     browserWindow.focus();
     let identityBox = browserWindow.document.getElementById("identity-box");
@@ -160,17 +160,17 @@ this.webrtcUI = {
       });
       Cc["@mozilla.org/widget/macdocksupport;1"].getService(Ci.nsIMacDockSupport)
         .activateApplication(true);
       return;
     }
     identityBox.click();
   },
 
-  updateWarningLabel: function(aMenuList) {
+  updateWarningLabel(aMenuList) {
     let type = aMenuList.selectedItem.getAttribute("devicetype");
     let document = aMenuList.ownerDocument;
     document.getElementById("webRTC-all-windows-shared").hidden = type != "Screen";
   },
 
   // Add-ons can override stock permission behavior by doing:
   //
   //   webrtcUI.addPeerConnectionBlocker(function(aParams) {
@@ -190,33 +190,33 @@ this.webrtcUI = {
   //   peer-request-allowed is emitted when a new peer connection is
   //                        established (and not blocked).
   //   peer-request-blocked is emitted when a peer connection request is
   //                        blocked by some blocking connection handler.
   //   peer-request-cancel is emitted when a peer-request connection request
   //                       is canceled.  (This would typically be used in
   //                       conjunction with a blocking handler to cancel
   //                       a user prompt or other work done by the handler)
-  addPeerConnectionBlocker: function(aCallback) {
+  addPeerConnectionBlocker(aCallback) {
     this.peerConnectionBlockers.add(aCallback);
   },
 
-  removePeerConnectionBlocker: function(aCallback) {
+  removePeerConnectionBlocker(aCallback) {
     this.peerConnectionBlockers.delete(aCallback);
   },
 
-  on: function(...args) {
+  on(...args) {
     return this.emitter.on(...args);
   },
 
-  off: function(...args) {
+  off(...args) {
     return this.emitter.off(...args);
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     switch (aMessage.name) {
 
       case "rtcpeer:Request": {
         let params = Object.freeze(Object.assign({
           origin: aMessage.target.contentPrincipal.origin
         }, aMessage.data));
 
         let blockers = Array.from(this.peerConnectionBlockers);
@@ -343,24 +343,24 @@ function prompt(aBrowser, aRequest) {
 
   let notification; // Used by action callbacks.
   let mainAction = {
     label: stringBundle.getString("getUserMedia.allow.label"),
     accessKey: stringBundle.getString("getUserMedia.allow.accesskey"),
     // The real callback will be set during the "showing" event. The
     // empty function here is so that PopupNotifications.show doesn't
     // reject the action.
-    callback: function() {}
+    callback() {}
   };
 
   let secondaryActions = [
     {
       label: stringBundle.getString("getUserMedia.dontAllow.label"),
       accessKey: stringBundle.getString("getUserMedia.dontAllow.accesskey"),
-      callback: function(aState) {
+      callback(aState) {
         denyRequest(notification.browser, aRequest);
         if (aState && aState.checkboxChecked) {
           let perms = Services.perms;
           if (audioDevices.length)
             perms.add(uri, "microphone", perms.DENY_ACTION);
           if (videoDevices.length)
             perms.add(uri, sharingScreen ? "screen" : "camera", perms.DENY_ACTION);
         }
@@ -388,17 +388,17 @@ function prompt(aBrowser, aRequest) {
     checkbox: {
       label: stringBundle.getString("getUserMedia.remember"),
       checkedState: reasonForNoPermanentAllow ? {
         disableMainAction: true,
         warningLabel: stringBundle.getFormattedString(reasonForNoPermanentAllow,
                                                       [productName])
       } : undefined,
     },
-    eventCallback: function(aTopic, aNewBrowser) {
+    eventCallback(aTopic, aNewBrowser) {
       if (aTopic == "swapping")
         return true;
 
       let doc = this.browser.ownerDocument;
 
       // Clean-up video streams of screensharing previews.
       if ((aTopic == "dismissed" || aTopic == "removed") &&
           requestTypes.includes("Screen")) {
@@ -741,21 +741,21 @@ function getGlobalIndicator() {
     _screen: null,
 
     _hiddenDoc: Cc["@mozilla.org/appshell/appShellService;1"]
                   .getService(Ci.nsIAppShellService)
                   .hiddenDOMWindow.document,
     _statusBar: Cc["@mozilla.org/widget/macsystemstatusbar;1"]
                   .getService(Ci.nsISystemStatusBar),
 
-    _command: function(aEvent) {
+    _command(aEvent) {
       webrtcUI.showSharingDoorhanger(aEvent.target.stream);
     },
 
-    _popupShowing: function(aEvent) {
+    _popupShowing(aEvent) {
       let type = this.getAttribute("type");
       let activeStreams;
       if (type == "Camera") {
         activeStreams = webrtcUI.getActiveStreams(true, false, false);
       }
       else if (type == "Microphone") {
         activeStreams = webrtcUI.getActiveStreams(false, true, false);
       }
@@ -804,22 +804,22 @@ function getGlobalIndicator() {
         item.stream = stream;
         item.addEventListener("command", indicator._command);
         this.appendChild(item);
       }
 
       return true;
     },
 
-    _popupHiding: function(aEvent) {
+    _popupHiding(aEvent) {
       while (this.firstChild)
         this.firstChild.remove();
     },
 
-    _setIndicatorState: function(aName, aState) {
+    _setIndicatorState(aName, aState) {
       let field = "_" + aName.toLowerCase();
       if (aState && !this[field]) {
         let menu = this._hiddenDoc.createElement("menu");
         menu.setAttribute("id", "webRTC-sharing" + aName + "-menu");
 
         // The CSS will only be applied if the menu is actually inserted in the DOM.
         this._hiddenDoc.documentElement.appendChild(menu);
 
@@ -835,22 +835,22 @@ function getGlobalIndicator() {
         this[field] = menu;
       }
       else if (this[field] && !aState) {
         this._statusBar.removeItem(this[field]);
         this[field].remove();
         this[field] = null
       }
     },
-    updateIndicatorState: function() {
+    updateIndicatorState() {
       this._setIndicatorState("Camera", webrtcUI.showCameraIndicator);
       this._setIndicatorState("Microphone", webrtcUI.showMicrophoneIndicator);
       this._setIndicatorState("Screen", webrtcUI.showScreenSharingIndicator);
     },
-    close: function() {
+    close() {
       this._setIndicatorState("Camera", false);
       this._setIndicatorState("Microphone", false);
       this._setIndicatorState("Screen", false);
     }
   };
 
   indicator.updateIndicatorState();
   return indicator;
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm
@@ -145,17 +145,17 @@ this.TestRunner = {
     }
     gBrowser.unpinTab(gBrowser.selectedTab);
     gBrowser.selectedBrowser.loadURI("data:text/html;charset=utf-8,<h1>Done!");
     browserWindow.restore();
   },
 
   // helpers
 
-  _performCombo: function*(combo) {
+  *_performCombo(combo) {
     let paddedComboIndex = padLeft(this.currentComboIndex + 1, String(this.combos.length).length);
     log.info("Combination " + paddedComboIndex + "/" + this.combos.length + ": " +
              this._comboName(combo).substring(1));
 
     function changeConfig(config) {
       log.debug("calling " + config.name);
       let applyPromise = Promise.resolve(config.applyConfig());
       let timeoutPromise = new Promise((resolve, reject) => {
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm
@@ -59,17 +59,17 @@ this.Buttons = {
       },
     },
   },
 };
 
 function createWidget() {
   let id = "screenshot-widget";
   let spec = {
-    id: id,
+    id,
     label: "My Button",
     removable: true,
     tooltiptext: "",
     type: "button",
   };
   CustomizableUI.createWidget(spec);
 
   // Append a <style> for the image
--- a/storage/test/unit/head_storage.js
+++ b/storage/test/unit/head_storage.js
@@ -311,43 +311,43 @@ function openAsyncDatabase(file, options
     }
   });
   return deferred.promise;
 }
 
 function executeAsync(statement, onResult) {
   let deferred = Promise.defer();
   statement.executeAsync({
-    handleError: function(error) {
+    handleError(error) {
       deferred.reject(error);
     },
-    handleResult: function(result) {
+    handleResult(result) {
       if (onResult) {
         onResult(result);
       }
     },
-    handleCompletion: function(result) {
+    handleCompletion(result) {
       deferred.resolve(result);
     }
   });
   return deferred.promise;
 }
 
 function executeMultipleStatementsAsync(db, statements, onResult) {
   let deferred = Promise.defer();
   db.executeAsync(statements, statements.length, {
-    handleError: function(error) {
+    handleError(error) {
       deferred.reject(error);
     },
-    handleResult: function(result) {
+    handleResult(result) {
       if (onResult) {
         onResult(result);
       }
     },
-    handleCompletion: function(result) {
+    handleCompletion(result) {
       deferred.resolve(result);
     }
   });
   return deferred.promise;
 }
 
 function executeSimpleSQLAsync(db, query, onResult) {
   let deferred = Promise.defer();
--- a/toolkit/.eslintrc.js
+++ b/toolkit/.eslintrc.js
@@ -158,16 +158,19 @@ module.exports = {
     }],
 
     // No using variables before defined
     // "no-use-before-define": ["error", "nofunc"],
 
     // No using with
     "no-with": "error",
 
+    // Require object-literal shorthand with ES6 method syntax
+    "object-shorthand": ["error", "always", { "avoidQuotes": true }],
+
     // No spacing inside rest or spread expressions
     "rest-spread-spacing": "error",
 
     // Always require semicolon at end of statement
     // "semi": ["error", "always"],
 
     // Require space before blocks
     "space-before-blocks": "error",
--- a/toolkit/components/aboutcheckerboard/content/aboutCheckerboard.js
+++ b/toolkit/components/aboutcheckerboard/content/aboutCheckerboard.js
@@ -109,17 +109,17 @@ function loadData() {
             continue;
         }
 
         var timestamp = tokens[j++];
         var destIndex = renderData.length;
         if (destIndex == 0) {
             // create the initial frame
             renderData.push({
-                timestamp: timestamp,
+                timestamp,
                 rects: {},
             });
         } else if (renderData[destIndex - 1].timestamp == timestamp) {
             // timestamp hasn't changed use, so update the previous object
             destIndex--;
         } else {
             // clone a new copy of the last frame and update timestamp
             renderData.push(JSON.parse(JSON.stringify(renderData[destIndex - 1])));
--- a/toolkit/components/aboutmemory/content/aboutMemory.js
+++ b/toolkit/components/aboutmemory/content/aboutMemory.js
@@ -493,17 +493,17 @@ function dumpGCLogAndCCLog(aVerbose)
 
     let ccLogType = aVerbose ? "verbose" : "concise";
     appendElementWithText(section, 'div', "",
                           "Saved " + ccLogType + " CC log to " + ccLog.path);
   }
 
   dumper.dumpGCAndCCLogsToFile("", aVerbose, /* dumpChildProcesses = */ true,
                                { onDump: displayInfo,
-                                 onFinish: function() {
+                                 onFinish() {
                                    inProgress.remove();
                                  }
                                });
 }
 
 /**
  * Top-level function that does the work of generating the page from the memory
  * reporters.
@@ -652,22 +652,22 @@ function loadMemoryReportsFromFile(aFile
       reader.readAsText(File.createFromFileName(aFilename));
       return;
     }
 
     // Read compressed gzip file.
     let converter = new nsGzipConverter();
     converter.asyncConvertData("gzip", "uncompressed", {
       data: [],
-      onStartRequest: function(aR, aC) {},
-      onDataAvailable: function(aR, aC, aStream, aO, aCount) {
+      onStartRequest(aR, aC) {},
+      onDataAvailable(aR, aC, aStream, aO, aCount) {
         let bi = new nsBinaryStream(aStream);
         this.data.push(bi.readBytes(aCount));
       },
-      onStopRequest: function(aR, aC, aStatusCode) {
+      onStopRequest(aR, aC, aStatusCode) {
         try {
           if (!Components.isSuccessCode(aStatusCode)) {
             throw new Components.Exception("Error while reading gzip file", aStatusCode);
           }
           reader.readAsText(new Blob(this.data));
         } catch (ex) {
           handleException(ex);
         }
@@ -741,17 +741,17 @@ function DReport(aKind, aUnits, aAmount,
   this._description = aDescription;
   this._nMerged = aNMerged;
   if (aPresence !== undefined) {
     this._presence = aPresence;
   }
 }
 
 DReport.prototype = {
-  assertCompatible: function(aKind, aUnits)
+  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:
     //
@@ -762,23 +762,23 @@ DReport.prototype = {
     //   "description": "/usr/share/icons/hicolor/icon-theme.cache (read-only, not executable, private)"
     //
     // In those cases, we just use the description from the first-encountered
     // one, which is what about:memory also does.
     // (Note: reports with those paths are no longer generated, but allowing
     // the descriptions to differ seems reasonable.)
   },
 
-  merge: function(aJr) {
+  merge(aJr) {
     this.assertCompatible(aJr.kind, aJr.units);
     this._amount += aJr.amount;
     this._nMerged++;
   },
 
-  toJSON: function(aProcess, aPath, aAmount) {
+  toJSON(aProcess, aPath, aAmount) {
     return {
       process:     aProcess,
       path:        aPath,
       kind:        this._kind,
       units:       this._units,
       amount:      aAmount,
       description: this._description,
       _presence:   this._presence
@@ -1121,34 +1121,34 @@ function TreeNode(aUnsafeName, aUnits, a
   // - _kids
   // - _amount
   // - _description
   // - _hideKids (only defined if true)
   // - _maxAbsDescendant (on-demand, only when gIsDiff is set)
 }
 
 TreeNode.prototype = {
-  findKid: function(aUnsafeName) {
+  findKid(aUnsafeName) {
     if (this._kids) {
       for (let i = 0; i < this._kids.length; i++) {
         if (this._kids[i]._unsafeName === aUnsafeName) {
           return this._kids[i];
         }
       }
     }
     return undefined;
   },
 
   // When gIsDiff is false, tree operations -- sorting and determining if a
   // sub-tree is significant -- are straightforward. But when gIsDiff is true,
   // the combination of positive and negative values within a tree complicates
   // things. So for a non-leaf node, instead of just looking at _amount, we
   // instead look at the maximum absolute value of the node and all of its
   // descendants.
-  maxAbsDescendant: function() {
+  maxAbsDescendant() {
     if (!this._kids) {
       // No kids? Just return the absolute value of the amount.
       return Math.abs(this._amount);
     }
 
     if ('_maxAbsDescendant' in this) {
       // We've computed this before? Return the saved value.
       return this._maxAbsDescendant;
@@ -1158,17 +1158,17 @@ TreeNode.prototype = {
     let max = Math.abs(this._amount);
     for (let i = 0; i < this._kids.length; i++) {
       max = Math.max(max, this._kids[i].maxAbsDescendant());
     }
     this._maxAbsDescendant = max;
     return max;
   },
 
-  toString: function() {
+  toString() {
     switch (this._units) {
       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);
       default:
         throw "Invalid memory report(s): bad units in TreeNode.toString";
     }
--- a/toolkit/components/aboutperformance/content/aboutPerformance.js
+++ b/toolkit/components/aboutperformance/content/aboutPerformance.js
@@ -67,17 +67,17 @@ const MIN_PROPORTION_FOR_NOTICEABLE_IMPA
 
 // The current mode. Either `MODE_GLOBAL` to display a summary of results
 // since we opened about:performance or `MODE_RECENT` to display the latest
 // BUFFER_DURATION_MS ms.
 const MODE_GLOBAL = "global";
 const MODE_RECENT = "recent";
 
 let tabFinder = {
-  update: function() {
+  update() {
     this._map = new Map();
     let windows = Services.wm.getEnumerator("navigator:browser");
     while (windows.hasMoreElements()) {
       let win = windows.getNext();
       let tabbrowser = win.gBrowser;
       for (let browser of tabbrowser.browsers) {
         let id = browser.outerWindowID; // May be `null` if the browser isn't loaded yet
         if (id != null) {
@@ -92,26 +92,26 @@ let tabFinder = {
    *
    * This is useful e.g. for reloading or closing tabs.
    *
    * @return null If the xul:tab could not be found, e.g. if the
    * windowId is that of a chrome window.
    * @return {{tabbrowser: <xul:tabbrowser>, tab: <xul.tab>}} The
    * tabbrowser and tab if the latter could be found.
    */
-  get: function(id) {
+  get(id) {
     let browser = this._map.get(id);
     if (!browser) {
       return null;
     }
     let tabbrowser = browser.getTabBrowser();
     return {tabbrowser, tab:tabbrowser.getTabForBrowser(browser)};
   },
 
-  getAny: function(ids) {
+  getAny(ids) {
     for (let id of ids) {
       let result = this.get(id);
       if (result) {
         return result;
       }
     }
     return null;
   }
@@ -253,25 +253,25 @@ Delta.prototype = {
     if (!this._initialized) {
       throw new Error();
     }
   },
 
   /**
    * Initialize, asynchronously.
    */
-  promiseInit: function() {
+  promiseInit() {
     if (this.kind == "webpages") {
       return this._initWebpage();
     } else if (this.kind == "addons") {
       return this._promiseInitAddon();
     }
     throw new TypeError();
   },
-  _initWebpage: function() {
+  _initWebpage() {
     this._initialized = true;
     let found = tabFinder.getAny(this.diff.windowIds);
     if (!found || found.tab.linkedBrowser.contentTitle == null) {
       // Either this is not a real page or the page isn't restored yet.
       return;
     }
 
     this.readableName = found.tab.linkedBrowser.contentTitle;
@@ -291,17 +291,17 @@ Delta.prototype = {
 
     this._initialized = true;
 
     // If the add-on manager doesn't know about an add-on, it's
     // probably not a real add-on.
     this._show = found;
     this.fullName = this.diff.addonId;
   }),
-  toString: function() {
+  toString() {
     return `[Delta] ${this.diff.key} => ${this.readableName}, ${this.fullName}`;
   }
 };
 
 Delta.compare = function(a, b) {
   return (
     (a.diff.jank.longestDuration - b.diff.jank.longestDuration) ||
     (a.diff.jank.totalUserTime - b.diff.jank.totalUserTime) ||
@@ -439,24 +439,24 @@ var State = {
     if (oldestInBuffer.date + BUFFER_DURATION_MS < this._latest.date) {
       this._buffer.shift();
     }
   }),
 
   /**
    * @return {Promise}
    */
-  promiseDeltaSinceStartOfTime: function() {
+  promiseDeltaSinceStartOfTime() {
     return this._promiseDeltaSince(this._oldest);
   },
 
   /**
    * @return {Promise}
    */
-  promiseDeltaSinceStartOfBuffer: function() {
+  promiseDeltaSinceStartOfBuffer() {
     return this._promiseDeltaSince(this._buffer[0]);
   },
 
   /**
    * @return {Promise}
    * @resolve {{
    *  addons: Array<Delta>,
    *  webpages: Array<Delta>,
@@ -523,28 +523,28 @@ var View = {
    */
   DOMCache: {
     _map: new Map(),
     /**
      * @param {string} deltaKey The key for the item that we are displaying.
      * @return {null} If the `deltaKey` doesn't have a component cached yet.
      * Otherwise, the value stored with `set`.
      */
-    get: function(deltaKey) {
+    get(deltaKey) {
       return this._map.get(deltaKey);
     },
-    set: function(deltaKey, value) {
+    set(deltaKey, value) {
       this._map.set(deltaKey, value);
     },
     /**
      * Remove all the elements whose key does not appear in `set`.
      *
      * @param {Set} set a set of deltaKey.
      */
-    trimTo: function(set) {
+    trimTo(set) {
       let remove = [];
       for (let key of this._map.keys()) {
         if (!set.has(key)) {
           remove.push(key);
         }
       }
       for (let key of remove) {
         this._map.delete(key);
@@ -555,17 +555,17 @@ var View = {
    * Display the items in a category.
    *
    * @param {Array<PerformanceDiff>} subset The items to display. They will
    * be displayed in the order of `subset`.
    * @param {string} id The id of the DOM element that will contain the items.
    * @param {string} nature The nature of the subset. One of "addons", "webpages" or "system".
    * @param {string} currentMode The current display mode. One of MODE_GLOBAL or MODE_RECENT.
    */
-  updateCategory: function(subset, id, nature, currentMode) {
+  updateCategory(subset, id, nature, currentMode) {
     subset = subset.slice().sort(Delta.revCompare);
 
     let watcherAlerts = null;
     if (nature == "addons") {
       watcherAlerts = AddonWatcher.alerts;
     }
 
     // Grab everything from the DOM before cleaning up
@@ -652,17 +652,17 @@ var View = {
         cachedElements.eltCPU.textContent = `CPU usage: ${Math.ceil(delta.diff.jank.totalCPUTime / delta.diff.deltaT / 10)}% (total ${delta.diff.jank.totalUserTime}ms).`;
         cachedElements.eltSystem.textContent = `System usage: ${Math.ceil(delta.diff.jank.totalSystemTime / delta.diff.deltaT / 10)}% (total ${delta.diff.jank.totalSystemTime}ms).`;
         cachedElements.eltCPOW.textContent = `Blocking process calls: ${Math.ceil(delta.diff.cpow.totalCPOWTime / delta.diff.deltaT / 10)}% (total ${delta.diff.cpow.totalCPOWTime}ms).`;
       }
     }
     this._insertElements(toAdd, id);
   },
 
-  _insertElements: function(elements, id) {
+  _insertElements(elements, id) {
     let eltContainer = document.getElementById(id);
     eltContainer.classList.remove("measuring");
     eltContainer.eltVisibleContent.innerHTML = "";
     eltContainer.eltHiddenContent.innerHTML = "";
     eltContainer.appendChild(eltContainer.eltShowMore);
 
     for (let i = 0; i < elements.length && i < MAX_NUMBER_OF_ITEMS_TO_DISPLAY; ++i) {
       let cachedElements = elements[i];
@@ -676,17 +676,17 @@ var View = {
       eltContainer.eltShowMore.classList.add("hidden");
     } else {
       eltContainer.eltShowMore.classList.remove("hidden");
     }
     if (elements.length == 0) {
       eltContainer.textContent = "Nothing";
     }
   },
-  _setupStructure: function(id) {
+  _setupStructure(id) {
     let eltContainer = document.getElementById(id);
     if (!eltContainer.eltVisibleContent) {
       eltContainer.eltVisibleContent = document.createElement("ul");
       eltContainer.eltVisibleContent.classList.add("visible_items");
       eltContainer.appendChild(eltContainer.eltVisibleContent);
     }
     if (!eltContainer.eltHiddenContent) {
       eltContainer.eltHiddenContent = document.createElement("ul");
@@ -707,17 +707,17 @@ var View = {
           eltContainer.eltHiddenContent.classList.add("hidden");
           eltContainer.eltShowMore.textContent = "Show all";
         }
       });
     }
     return eltContainer;
   },
 
-  _grabOrCreateElements: function(delta, nature) {
+  _grabOrCreateElements(delta, nature) {
     let cachedElements = this.DOMCache.get(delta.key);
     if (cachedElements) {
       if (cachedElements.eltRoot.parentElement) {
         cachedElements.eltRoot.parentElement.removeChild(cachedElements.eltRoot);
       }
     } else {
       this.DOMCache.set(delta.key, cachedElements = {});
 
@@ -852,17 +852,17 @@ var View = {
       }
     }
 
     return cachedElements;
   },
 };
 
 var Control = {
-  init: function() {
+  init() {
     this._initAutorefresh();
     this._initDisplayMode();
   },
   update: Task.async(function*() {
     let mode = this._displayMode;
     if (this._autoRefreshInterval || !State._buffer[0]) {
       // Update the state only if we are not on pause.
       yield State.update();
@@ -881,28 +881,28 @@ var Control = {
     // Make sure that we do not keep obsolete stuff around.
     View.DOMCache.trimTo(state.deltas);
 
     yield wait(0);
 
     // Inform watchers
     Services.obs.notifyObservers(null, UPDATE_COMPLETE_TOPIC, mode);
   }),
-  _setOptions: function(options) {
+  _setOptions(options) {
     dump(`about:performance _setOptions ${JSON.stringify(options)}\n`);
     let eltRefresh = document.getElementById("check-autorefresh");
     if ((options.autoRefresh > 0) != eltRefresh.checked) {
       eltRefresh.click();
     }
     let eltCheckRecent = document.getElementById("check-display-recent");
     if (!!options.displayRecent != eltCheckRecent.checked) {
       eltCheckRecent.click();
     }
   },
-  _initAutorefresh: function() {
+  _initAutorefresh() {
     let onRefreshChange = (shouldUpdateNow = false) => {
       if (eltRefresh.checked == !!this._autoRefreshInterval) {
         // Nothing to change.
         return;
       }
       if (eltRefresh.checked) {
         this._autoRefreshInterval = window.setInterval(() => Control.update(), UPDATE_INTERVAL_MS);
         if (shouldUpdateNow) {
@@ -915,17 +915,17 @@ var Control = {
     }
 
     let eltRefresh = document.getElementById("check-autorefresh");
     eltRefresh.addEventListener("change", () => onRefreshChange(true));
 
     onRefreshChange(false);
   },
   _autoRefreshInterval: null,
-  _initDisplayMode: function() {
+  _initDisplayMode() {
     let onModeChange = (shouldUpdateNow) => {
       if (eltCheckRecent.checked) {
         this._displayMode = MODE_RECENT;
       } else {
         this._displayMode = MODE_GLOBAL;
       }
       if (shouldUpdateNow) {
         Control.update();
@@ -951,63 +951,63 @@ var Control = {
  */
 var SubprocessMonitor = {
   _timeout: null,
 
   /**
    * Init will start the process of updating the table if the page is not hidden,
    * and set up an event listener for handling visibility changes.
    */
-  init: function() {
+  init() {
     if (!document.hidden) {
       SubprocessMonitor.updateTable();
     }
     document.addEventListener("visibilitychange", SubprocessMonitor.handleVisibilityChange);
   },
 
   /**
    * This function updates the table after an interval if the page is visible
    * and clears the interval otherwise.
    */
-  handleVisibilityChange: function() {
+  handleVisibilityChange() {
     if (!document.hidden) {
       SubprocessMonitor.queueUpdate();
     } else {
       clearTimeout(this._timeout);
       this._timeout = null;
     }
   },
 
   /**
    * This function queues a timer to request the next summary using updateTable
    * after some delay.
    */
-  queueUpdate: function() {
+  queueUpdate() {
     this._timeout = setTimeout(() => this.updateTable(), UPDATE_INTERVAL_MS);
   },
 
   /**
    * This is a helper function for updateTable, which updates a particular row.
    * @param {<tr> node} row The row to be updated.
    * @param {object} summaries The object with the updated RSS and USS values.
    * @param {string} pid The pid represented by the row for which we update.
    */
-  updateRow: function(row, summaries, pid) {
+  updateRow(row, summaries, pid) {
     row.cells[0].textContent = pid;
     let RSSval = DownloadUtils.convertByteUnits(summaries[pid].rss);
     row.cells[1].textContent = RSSval.join(" ");
     let USSval = DownloadUtils.convertByteUnits(summaries[pid].uss);
     row.cells[2].textContent = USSval.join(" ");
   },
 
   /**
    * This function adds a row to the subprocess-performance table for every new pid
    * and populates and regularly updates it with RSS/USS measurements.
    */
-  updateTable: function() {
+  updateTable() {
     if (!document.hidden) {
       Memory.summary().then((summaries) => {
         if (!(Object.keys(summaries).length)) {
           // The summaries list was empty, which means we timed out getting
           // the memory reports. We'll try again later.
           SubprocessMonitor.queueUpdate();
           return;
         }
--- a/toolkit/components/addoncompat/CompatWarning.jsm
+++ b/toolkit/components/addoncompat/CompatWarning.jsm
@@ -22,17 +22,17 @@ function section(number, 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
   // fires. However, we want the warning to show a stack for the
   // registration site.
-  delayedWarning: function(msg, addon, warning) {
+  delayedWarning(msg, addon, warning) {
     function isShimLayer(filename) {
       return filename.indexOf("CompatWarning.jsm") != -1 ||
         filename.indexOf("RemoteAddonsParent.jsm") != -1 ||
         filename.indexOf("RemoteAddonsChild.jsm") != -1 ||
         filename.indexOf("multiprocessShims.js") != -1;
     }
 
     let stack = Components.stack;
@@ -81,17 +81,17 @@ var CompatWarning = {
           dump(stack + "\n");
           stack = stack.caller;
         }
         dump("\n");
       }
     };
   },
 
-  warn: function(msg, addon, warning) {
+  warn(msg, addon, warning) {
     let delayed = this.delayedWarning(msg, addon, warning);
     delayed();
   },
 
   warnings: {
     content: section(1, "#gBrowser.contentWindow.2C_window.content..."),
     limitations_of_CPOWs: section(2, "#Limitations_of_CPOWs"),
     nsIContentPolicy: section(3, "#nsIContentPolicy"),
--- a/toolkit/components/addoncompat/Prefetcher.jsm
+++ b/toolkit/components/addoncompat/Prefetcher.jsm
@@ -309,51 +309,51 @@ function Database(trigger, addons)
   this.todo = [];
 
   // Cached data to be sent to the chrome process.
   this.cached = [];
 }
 
 Database.prototype = {
   // Add an object to a table.
-  add: function(table, obj) {
+  add(table, obj) {
     if (!this.tables.has(table)) {
       this.tables.set(table, new Set());
     }
     let tableSet = this.tables.get(table);
     if (tableSet.has(obj)) {
       return;
     }
     tableSet.add(obj);
 
     this.todo.push([table, obj]);
   },
 
-  cache: function(...args) {
+  cache(...args) {
     this.cached.push(args);
   },
 
   // Run a fixed-point iteration that adds objects to table based on
   // this.rules until there are no more objects to add.
-  process: function() {
+  process() {
     while (this.todo.length) {
       let [table, obj] = this.todo.pop();
       let rules = this.rules.get(table);
       if (!rules) {
         continue;
       }
       for (let rule of rules) {
         rule.addObject(this, obj);
       }
     }
   },
 };
 
 var Prefetcher = {
-  init: function() {
+  init() {
     // Give an index to each rule and store it in this.ruleMap based
     // on the index. The index is used to serialize and deserialize
     // data from content to chrome.
     let counter = 0;
     this.ruleMap = new Map();
     for (let addon in PrefetcherRules) {
       for (let trigger in PrefetcherRules[addon]) {
         for (let rule of PrefetcherRules[addon][trigger]) {
@@ -363,30 +363,30 @@ var Prefetcher = {
       }
     }
 
     this.prefetchingEnabled = Preferences.get(PREF_PREFETCHING_ENABLED, false);
     Services.prefs.addObserver(PREF_PREFETCHING_ENABLED, this, false);
     Services.obs.addObserver(this, "xpcom-shutdown", false);
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     if (topic == "xpcom-shutdown") {
       Services.prefs.removeObserver(PREF_PREFETCHING_ENABLED, this);
       Services.obs.removeObserver(this, "xpcom-shutdown");
     } else if (topic == PREF_PREFETCHING_ENABLED) {
       this.prefetchingEnabled = Preferences.get(PREF_PREFETCHING_ENABLED, false);
     }
   },
 
   // Called when an event occurs in the content process. The event is
   // described by the trigger string. |addons| is a list of addons
   // that have listeners installed for the event. |args| is
   // event-specific data (such as the event object).
-  prefetch: function(trigger, addons, args) {
+  prefetch(trigger, addons, args) {
     if (!this.prefetchingEnabled) {
       return [[], []];
     }
 
     let db = new Database(trigger, addons);
     for (let table in args) {
       log("root", table, "=", objAddr(args[table]));
       db.add(table, args[table]);
@@ -420,17 +420,17 @@ var Prefetcher = {
 
     return [prefetched, cpows];
   },
 
   cache: null,
 
   // Generate a two-level mapping based on cached data received from
   // the content process.
-  generateCache: function(prefetched, cpows) {
+  generateCache(prefetched, cpows) {
     let cache = new Map();
     for (let item of prefetched) {
       // Replace anything of the form {cpow: <index>} with the actual
       // object in |cpows|.
       item = item.map((elt) => {
         if (!isPrimitive(elt)) {
           return cpows[elt.cpow];
         }
@@ -441,17 +441,17 @@ var Prefetcher = {
       let op = this.ruleMap.get(index);
       op.makeCacheEntry(item, cache);
     }
     return cache;
   },
 
   // Run |func|, using the prefetched data in |prefetched| and |cpows|
   // as a cache.
-  withPrefetching: function(prefetched, cpows, func) {
+  withPrefetching(prefetched, cpows, func) {
     if (!this.prefetchingEnabled) {
       return func();
     }
 
     this.cache = this.generateCache(prefetched, cpows);
 
     try {
       log("Prefetching on");
@@ -461,17 +461,17 @@ var Prefetcher = {
       // is free to continue executing, so we invalidate our cache.
       log("Prefetching off");
       this.cache = null;
     }
   },
 
   // Called by shim code in the chrome process to check if target.prop
   // is cached.
-  lookupInCache: function(addon, target, prop) {
+  lookupInCache(addon, target, prop) {
     if (!this.cache || !Cu.isCrossProcessWrapper(target)) {
       return null;
     }
 
     let propMap = this.cache.get(target);
     if (!propMap) {
       return null;
     }
--- a/toolkit/components/addoncompat/RemoteAddonsChild.jsm
+++ b/toolkit/components/addoncompat/RemoteAddonsChild.jsm
@@ -40,26 +40,26 @@ function setDefault(dict, key, default_)
 // child is notified whenever a path is added or removed, and new
 // children can request the current set of paths. The purpose is to
 // keep track of all the observers and events that the child should
 // monitor for the parent.
 //
 // In the child, clients can watch for changes to all paths that start
 // with a given component.
 var NotificationTracker = {
-  init: function() {
+  init() {
     let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
                .getService(Ci.nsISyncMessageSender);
     cpmm.addMessageListener("Addons:ChangeNotification", this);
     this._paths = cpmm.initialProcessData.remoteAddonsNotificationPaths;
     this._registered = new Map();
     this._watchers = {};
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     let path = msg.data.path;
     let count = msg.data.count;
 
     let tracked = this._paths;
     for (let component of path) {
       tracked = setDefault(tracked, component, {});
     }
 
@@ -67,30 +67,30 @@ var NotificationTracker = {
 
     if (this._watchers[path[0]]) {
       for (let watcher of this._watchers[path[0]]) {
         this.runCallback(watcher, path, count);
       }
     }
   },
 
-  runCallback: function(watcher, path, count) {
+  runCallback(watcher, path, count) {
     let pathString = path.join("/");
     let registeredSet = this._registered.get(watcher);
     let registered = registeredSet.has(pathString);
     if (count && !registered) {
       watcher.track(path, true);
       registeredSet.add(pathString);
     } else if (!count && registered) {
       watcher.track(path, false);
       registeredSet.delete(pathString);
     }
   },
 
-  findPaths: function(prefix) {
+  findPaths(prefix) {
     if (!this._paths) {
       return [];
     }
 
     let tracked = this._paths;
     for (let component of prefix) {
       tracked = setDefault(tracked, component, {});
     }
@@ -112,32 +112,32 @@ var NotificationTracker = {
         }
       }
     }
     enumerate(tracked, prefix);
 
     return result;
   },
 
-  findSuffixes: function(prefix) {
+  findSuffixes(prefix) {
     let paths = this.findPaths(prefix);
     return paths.map(([path, count]) => path[path.length - 1]);
   },
 
-  watch: function(component1, watcher) {
+  watch(component1, watcher) {
     setDefault(this._watchers, component1, []).push(watcher);
     this._registered.set(watcher, new Set());
 
     let paths = this.findPaths([component1]);
     for (let [path, count] of paths) {
       this.runCallback(watcher, path, count);
     }
   },
 
-  unwatch: function(component1, watcher) {
+  unwatch(component1, watcher) {
     let watchers = this._watchers[component1];
     let index = watchers.lastIndexOf(watcher);
     if (index > -1) {
       watchers.splice(index, 1);
     }
 
     this._registered.delete(watcher);
   },
@@ -151,65 +151,65 @@ var NotificationTracker = {
 // it runs, it notifies the parent that it needs to run its own
 // nsIContentPolicy list. If any policy in the parent rejects a
 // resource load, that answer is returned to the child.
 var ContentPolicyChild = {
   _classDescription: "Addon shim content policy",
   _classID: Components.ID("6e869130-635c-11e2-bcfd-0800200c9a66"),
   _contractID: "@mozilla.org/addon-child/policy;1",
 
-  init: function() {
+  init() {
     let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
     registrar.registerFactory(this._classID, this._classDescription, this._contractID, this);
 
     NotificationTracker.watch("content-policy", this);
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPolicy, Ci.nsIObserver,
                                          Ci.nsIChannelEventSink, Ci.nsIFactory,
                                          Ci.nsISupportsWeakReference]),
 
-  track: function(path, register) {
+  track(path, register) {
     let catMan = Cc["@mozilla.org/categorymanager;1"].getService(Ci.nsICategoryManager);
     if (register) {
       catMan.addCategoryEntry("content-policy", this._contractID, this._contractID, false, true);
     } else {
       catMan.deleteCategoryEntry("content-policy", this._contractID, false);
     }
   },
 
-  shouldLoad: function(contentType, contentLocation, requestOrigin,
+  shouldLoad(contentType, contentLocation, requestOrigin,
                        node, mimeTypeGuess, extra, requestPrincipal) {
     let addons = NotificationTracker.findSuffixes(["content-policy"]);
     let [prefetched, cpows] = Prefetcher.prefetch("ContentPolicy.shouldLoad",
                                                   addons, {InitNode: node});
     cpows.node = node;
 
     let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
                .getService(Ci.nsISyncMessageSender);
     let rval = cpmm.sendRpcMessage("Addons:ContentPolicy:Run", {
-      contentType: contentType,
+      contentType,
       contentLocation: contentLocation.spec,
       requestOrigin: requestOrigin ? requestOrigin.spec : null,
-      mimeTypeGuess: mimeTypeGuess,
-      requestPrincipal: requestPrincipal,
-      prefetched: prefetched,
+      mimeTypeGuess,
+      requestPrincipal,
+      prefetched,
     }, cpows);
     if (rval.length != 1) {
       return Ci.nsIContentPolicy.ACCEPT;
     }
 
     return rval[0];
   },
 
-  shouldProcess: function(contentType, contentLocation, requestOrigin, insecNode, mimeType, extra) {
+  shouldProcess(contentType, contentLocation, requestOrigin, insecNode, mimeType, extra) {
     return Ci.nsIContentPolicy.ACCEPT;
   },
 
-  createInstance: function(outer, iid) {
+  createInstance(outer, iid) {
     if (outer) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
     return this.QueryInterface(iid);
   },
 };
 
 // This is a shim channel whose only purpose is to return some string
@@ -230,17 +230,17 @@ AboutProtocolChannel.prototype = {
   owner: SystemPrincipal,
   securityInfo: null,
   notificationCallbacks: null,
   loadFlags: 0,
   loadGroup: null,
   name: null,
   status: Cr.NS_OK,
 
-  asyncOpen: function(listener, context) {
+  asyncOpen(listener, context) {
     // Ask the parent to synchronously read all the data from the channel.
     let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
                .getService(Ci.nsISyncMessageSender);
     let rval = cpmm.sendRpcMessage("Addons:AboutProtocol:OpenChannel", {
       uri: this.URI.spec,
       contractID: this._contractID,
       loadingPrincipal: this._loadingPrincipal,
       securityFlags: this._securityFlags,
@@ -272,66 +272,66 @@ AboutProtocolChannel.prototype = {
         try {
           listener.onStopRequest(this, context, Cr.NS_OK);
         } catch (e) {}
       }
     };
     Services.tm.currentThread.dispatch(runnable, Ci.nsIEventTarget.DISPATCH_NORMAL);
   },
 
-  asyncOpen2: function(listener) {
+  asyncOpen2(listener) {
     // throws an error if security checks fail
     var outListener = contentSecManager.performSecurityCheck(this, listener);
     this.asyncOpen(outListener, null);
   },
 
-  open: function() {
+  open() {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
-  open2: function() {
+  open2() {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
-  isPending: function() {
+  isPending() {
     return false;
   },
 
-  cancel: function() {
+  cancel() {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
-  suspend: function() {
+  suspend() {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
-  resume: function() {
+  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)
 {
   this._contractID = contractID;
   this._uriFlags = undefined;
 }
 
 AboutProtocolInstance.prototype = {
-  createInstance: function(outer, iid) {
+  createInstance(outer, iid) {
     if (outer != null) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
 
     return this.QueryInterface(iid);
   },
 
-  getURIFlags: function(uri) {
+  getURIFlags(uri) {
     // Cache the result to avoid the extra IPC.
     if (this._uriFlags !== undefined) {
       return this._uriFlags;
     }
 
     let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
                .getService(Ci.nsISyncMessageSender);
 
@@ -349,35 +349,35 @@ AboutProtocolInstance.prototype = {
   },
 
   // We take some shortcuts here. Ideally, we would return a CPOW that
   // wraps the add-on's nsIChannel. However, many of the methods
   // related to nsIChannel are marked [noscript], so they're not
   // available to CPOWs. Consequently, we return a shim channel that,
   // when opened, asks the parent to open the channel and read out all
   // the data.
-  newChannel: function(uri, loadInfo) {
+  newChannel(uri, loadInfo) {
     return new AboutProtocolChannel(uri, this._contractID, loadInfo);
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory, Ci.nsIAboutModule])
 };
 
 var AboutProtocolChild = {
   _classDescription: "Addon shim about: protocol handler",
 
-  init: function() {
+  init() {
     // Maps contractIDs to instances
     this._instances = new Map();
     // Maps contractIDs to classIDs
     this._classIDs = new Map();
     NotificationTracker.watch("about-protocol", this);
   },
 
-  track: function(path, register) {
+  track(path, register) {
     let contractID = path[1];
     let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
     if (register) {
       let instance = new AboutProtocolInstance(contractID);
       let classID = Cc["@mozilla.org/uuid-generator;1"]
                       .getService(Ci.nsIUUIDGenerator)
                       .generateUUID();
 
@@ -392,81 +392,81 @@ var AboutProtocolChild = {
       this._classIDs.delete(contractID);
     }
   },
 };
 
 // This code registers observers in the child whenever an add-on in
 // the parent asks for notifications on the given topic.
 var ObserverChild = {
-  init: function() {
+  init() {
     NotificationTracker.watch("observer", this);
   },
 
-  track: function(path, register) {
+  track(path, register) {
     let topic = path[1];
     if (register) {
       Services.obs.addObserver(this, topic, false);
     } else {
       Services.obs.removeObserver(this, topic);
     }
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
                .getService(Ci.nsISyncMessageSender);
     cpmm.sendRpcMessage("Addons:Observer:Run", {}, {
-      topic: topic,
-      subject: subject,
-      data: data
+      topic,
+      subject,
+      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)
 {
   this._childGlobal = childGlobal;
   this.capturingHandler = (event) => this.handleEvent(true, event);
   this.nonCapturingHandler = (event) => this.handleEvent(false, event);
   NotificationTracker.watch("event", this);
 }
 
 EventTargetChild.prototype = {
-  uninit: function() {
+  uninit() {
     NotificationTracker.unwatch("event", this);
   },
 
-  track: function(path, register) {
+  track(path, register) {
     let eventType = path[1];
     let useCapture = path[2];
     let listener = useCapture ? this.capturingHandler : this.nonCapturingHandler;
     if (register) {
       this._childGlobal.addEventListener(eventType, listener, useCapture, true);
     } else {
       this._childGlobal.removeEventListener(eventType, listener, useCapture);
     }
   },
 
-  handleEvent: function(capturing, event) {
+  handleEvent(capturing, event) {
     let addons = NotificationTracker.findSuffixes(["event", event.type, capturing]);
     let [prefetched, cpows] = Prefetcher.prefetch("EventTarget.handleEvent",
                                                   addons,
                                                   {Event: event,
                                                    Window: this._childGlobal.content});
     cpows.event = event;
     cpows.eventTarget = event.target;
 
     this._childGlobal.sendRpcMessage("Addons:Event:Run",
                                      {type: event.type,
-                                      capturing: capturing,
+                                      capturing,
                                       isTrusted: event.isTrusted,
-                                      prefetched: prefetched},
+                                      prefetched},
                                      cpows);
   }
 };
 
 // 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,
@@ -476,58 +476,58 @@ EventTargetChild.prototype = {
 // sandbox was created.
 function SandboxChild(chromeGlobal)
 {
   this.chromeGlobal = chromeGlobal;
   this.sandboxes = [];
 }
 
 SandboxChild.prototype = {
-  uninit: function() {
+  uninit() {
     this.clearSandboxes();
   },
 
-  addListener: function() {
+  addListener() {
     let webProgress = this.chromeGlobal.docShell.QueryInterface(Ci.nsIInterfaceRequestor)
       .getInterface(Ci.nsIWebProgress);
     webProgress.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_LOCATION);
   },
 
-  removeListener: function() {
+  removeListener() {
     let webProgress = this.chromeGlobal.docShell.QueryInterface(Ci.nsIInterfaceRequestor)
       .getInterface(Ci.nsIWebProgress);
     webProgress.removeProgressListener(this);
   },
 
-  onLocationChange: function(webProgress, request, location, flags) {
+  onLocationChange(webProgress, request, location, flags) {
     this.clearSandboxes();
   },
 
-  addSandbox: function(sandbox) {
+  addSandbox(sandbox) {
     if (this.sandboxes.length == 0) {
       this.addListener();
     }
     this.sandboxes.push(sandbox);
   },
 
-  clearSandboxes: function() {
+  clearSandboxes() {
     if (this.sandboxes.length) {
       this.removeListener();
     }
     this.sandboxes = [];
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
                                          Ci.nsISupportsWeakReference])
 };
 
 var RemoteAddonsChild = {
   _ready: false,
 
-  makeReady: function() {
+  makeReady() {
     let shims = [
       Prefetcher,
       NotificationTracker,
       ContentPolicyChild,
       AboutProtocolChild,
       ObserverChild,
     ];
 
@@ -535,37 +535,37 @@ var RemoteAddonsChild = {
       try {
         shim.init();
       } catch (e) {
         Cu.reportError(e);
       }
     }
   },
 
-  init: function(global) {
+  init(global) {
 
     if (!this._ready) {
       if (!Services.cpmm.initialProcessData.remoteAddonsParentInitted) {
         return null;
       }
 
       this.makeReady();
       this._ready = true;
     }
 
-    global.sendAsyncMessage("Addons:RegisterGlobal", {}, {global: global});
+    global.sendAsyncMessage("Addons:RegisterGlobal", {}, {global});
 
     let sandboxChild = new SandboxChild(global);
     global.addSandbox = sandboxChild.addSandbox.bind(sandboxChild);
 
     // Return this so it gets rooted in the content script.
     return [new EventTargetChild(global), sandboxChild];
   },
 
-  uninit: function(perTabShims) {
+  uninit(perTabShims) {
     for (let shim of perTabShims) {
       try {
         shim.uninit();
       } catch (e) {
         Cu.reportError(e);
       }
     }
   },
--- a/toolkit/components/addoncompat/RemoteAddonsParent.jsm
+++ b/toolkit/components/addoncompat/RemoteAddonsParent.jsm
@@ -45,46 +45,46 @@ var NotificationTracker = {
   // _paths is a multi-level dictionary. Let's add paths [A, B] and
   // [A, C]. Then _paths will look like this:
   //   { 'A': { 'B': { '_count': 1 }, 'C': { '_count': 1 } } }
   // Each component in a path will be a key in some dictionary. At the
   // end, the _count property keeps track of how many instances of the
   // given path are present in _paths.
   _paths: {},
 
-  init: function() {
+  init() {
     let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
                .getService(Ci.nsIMessageBroadcaster);
     ppmm.initialProcessData.remoteAddonsNotificationPaths = this._paths;
   },
 
-  add: function(path) {
+  add(path) {
     let tracked = this._paths;
     for (let component of path) {
       tracked = setDefault(tracked, component, {});
     }
     let count = tracked._count || 0;
     count++;
     tracked._count = count;
 
     let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
                .getService(Ci.nsIMessageBroadcaster);
-    ppmm.broadcastAsyncMessage("Addons:ChangeNotification", {path: path, count: count});
+    ppmm.broadcastAsyncMessage("Addons:ChangeNotification", {path, count});
   },
 
-  remove: function(path) {
+  remove(path) {
     let tracked = this._paths;
     for (let component of path) {
       tracked = setDefault(tracked, component, {});
     }
     tracked._count--;
 
     let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
                .getService(Ci.nsIMessageBroadcaster);
-    ppmm.broadcastAsyncMessage("Addons:ChangeNotification", {path: path, count: tracked._count});
+    ppmm.broadcastAsyncMessage("Addons:ChangeNotification", {path, count: tracked._count});
   },
 };
 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.
@@ -101,43 +101,43 @@ function Interposition(name, base)
     this.setters = Object.create(null);
   }
 }
 
 // This object is responsible for notifying the child when a new
 // content policy is added or removed. It also runs all the registered
 // add-on content policies when the child asks it to do so.
 var ContentPolicyParent = {
-  init: function() {
+  init() {
     let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
                .getService(Ci.nsIMessageBroadcaster);
     ppmm.addMessageListener("Addons:ContentPolicy:Run", this);
 
     this._policies = new Map();
   },
 
-  addContentPolicy: function(addon, name, cid) {
+  addContentPolicy(addon, name, cid) {
     this._policies.set(name, cid);
     NotificationTracker.add(["content-policy", addon]);
   },
 
-  removeContentPolicy: function(addon, name) {
+  removeContentPolicy(addon, name) {
     this._policies.delete(name);
     NotificationTracker.remove(["content-policy", addon]);
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     switch (aMessage.name) {
       case "Addons:ContentPolicy:Run":
         return this.shouldLoad(aMessage.data, aMessage.objects);
     }
     return undefined;
   },
 
-  shouldLoad: function(aData, aObjects) {
+  shouldLoad(aData, aObjects) {
     for (let policyCID of this._policies.values()) {
       let policy;
       try {
         policy = Cc[policyCID].getService(Ci.nsIContentPolicy);
       } catch (e) {
         // Current Gecko behavior is to ignore entries that don't QI.
         continue;
       }
@@ -191,67 +191,67 @@ CategoryManagerInterposition.methods.del
 
     target.deleteCategoryEntry(category, entry, persist);
   };
 
 // This shim handles the case where an add-on registers an about:
 // protocol handler in the parent and we want the child to be able to
 // use it. This code is pretty specific to Adblock's usage.
 var AboutProtocolParent = {
-  init: function() {
+  init() {
     let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
                .getService(Ci.nsIMessageBroadcaster);
     ppmm.addMessageListener("Addons:AboutProtocol:GetURIFlags", this);
     ppmm.addMessageListener("Addons:AboutProtocol:OpenChannel", this);
     this._protocols = [];
   },
 
-  registerFactory: function(addon, class_, className, contractID, factory) {
-    this._protocols.push({contractID: contractID, factory: factory});
+  registerFactory(addon, class_, className, contractID, factory) {
+    this._protocols.push({contractID, factory});
     NotificationTracker.add(["about-protocol", contractID, addon]);
   },
 
-  unregisterFactory: function(addon, class_, factory) {
+  unregisterFactory(addon, class_, factory) {
     for (let i = 0; i < this._protocols.length; i++) {
       if (this._protocols[i].factory == factory) {
         NotificationTracker.remove(["about-protocol", this._protocols[i].contractID, addon]);
         this._protocols.splice(i, 1);
         break;
       }
     }
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "Addons:AboutProtocol:GetURIFlags":
         return this.getURIFlags(msg);
       case "Addons:AboutProtocol:OpenChannel":
         return this.openChannel(msg);
     }
     return undefined;
   },
 
-  getURIFlags: function(msg) {
+  getURIFlags(msg) {
     let uri = BrowserUtils.makeURI(msg.data.uri);
     let contractID = msg.data.contractID;
     let module = Cc[contractID].getService(Ci.nsIAboutModule);
     try {
       return module.getURIFlags(uri);
     } catch (e) {
       Cu.reportError(e);
       return undefined;
     }
   },
 
   // We immediately read all the data out of the channel here and
   // return it to the child.
-  openChannel: function(msg) {
+  openChannel(msg) {
     function wrapGetInterface(cpow) {
       return {
-        getInterface: function(intf) { return cpow.getInterface(intf); }
+        getInterface(intf) { return cpow.getInterface(intf); }
       };
     }
 
     let uri = BrowserUtils.makeURI(msg.data.uri);
     let channelParams;
     if (msg.data.contentPolicyType === Ci.nsIContentPolicy.TYPE_DOCUMENT) {
       // For TYPE_DOCUMENT loads, we cannot recreate the loadinfo here in the
       // parent. In that case, treat this as a chrome (addon)-requested
@@ -287,17 +287,17 @@ var AboutProtocolParent = {
       if (msg.objects.loadGroupNotificationCallbacks) {
         channel.loadGroup = {notificationCallbacks: msg.objects.loadGroupNotificationCallbacks};
       } else {
         channel.loadGroup = null;
       }
       let stream = channel.open2();
       let data = NetUtil.readInputStreamToString(stream, stream.available(), {});
       return {
-        data: data,
+        data,
         contentType: channel.contentType
       };
     } catch (e) {
       Cu.reportError(e);
       return undefined;
     }
   },
 };
@@ -329,41 +329,41 @@ ComponentRegistrarInterposition.methods.
 // parent's observer service. When an add-on listens on topic T,
 // ObserverParent asks the child process to listen on T. It also adds
 // an observer in the parent for the topic e10s-T. When the T observer
 // fires in the child, the parent fires all the e10s-T observers,
 // passing them CPOWs for the subject and data. We don't want to use T
 // in the parent because there might be non-add-on T observers that
 // won't expect to get notified in this case.
 var ObserverParent = {
-  init: function() {
+  init() {
     let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
                .getService(Ci.nsIMessageBroadcaster);
     ppmm.addMessageListener("Addons:Observer:Run", this);
   },
 
-  addObserver: function(addon, observer, topic, ownsWeak) {
+  addObserver(addon, observer, topic, ownsWeak) {
     Services.obs.addObserver(observer, "e10s-" + topic, ownsWeak);
     NotificationTracker.add(["observer", topic, addon]);
   },
 
-  removeObserver: function(addon, observer, topic) {
+  removeObserver(addon, observer, topic) {
     Services.obs.removeObserver(observer, "e10s-" + topic);
     NotificationTracker.remove(["observer", topic, addon]);
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "Addons:Observer:Run":
         this.notify(msg.objects.subject, msg.objects.topic, msg.objects.data);
         break;
     }
   },
 
-  notify: function(subject, topic, data) {
+  notify(subject, topic, data) {
     let e = Services.obs.enumerateObservers("e10s-" + topic);
     while (e.hasMoreElements()) {
       let obs = e.getNext().QueryInterface(Ci.nsIObserver);
       try {
         obs.observe(subject, topic, data);
       } catch (e) {
         Cu.reportError(e);
       }
@@ -405,33 +405,33 @@ ObserverInterposition.methods.removeObse
     }
 
     target.removeObserver(observer, topic);
   };
 
 // This object is responsible for forwarding events from the child to
 // the parent.
 var EventTargetParent = {
-  init: function() {
+  init() {
     // The _listeners map goes from targets (either <browser> elements
     // or windows) to a dictionary from event types to listeners.
     this._listeners = new WeakMap();
 
     let mm = Cc["@mozilla.org/globalmessagemanager;1"].
       getService(Ci.nsIMessageListenerManager);
     mm.addMessageListener("Addons:Event:Run", this);
   },
 
   // If target is not on the path from a <browser> element to the
   // window root, then we return null here to ignore the
   // target. Otherwise, if the target is a browser-specific element
   // (the <browser> or <tab> elements), then we return the
   // <browser>. If it's some generic element, then we return the
   // window itself.
-  redirectEventTarget: function(target) {
+  redirectEventTarget(target) {
     if (Cu.isCrossProcessWrapper(target)) {
       return null;
     }
 
     if (target instanceof Ci.nsIDOMChromeWindow) {
       return target;
     }
 
@@ -451,22 +451,22 @@ var EventTargetParent = {
     }
 
     return null;
   },
 
   // When a given event fires in the child, we fire it on the
   // <browser> element and the window since those are the two possible
   // results of redirectEventTarget.
-  getTargets: function(browser) {
+  getTargets(browser) {
     let window = browser.ownerDocument.defaultView;
     return [browser, window];
   },
 
-  addEventListener: function(addon, target, type, listener, useCapture, wantsUntrusted, delayedWarning) {
+  addEventListener(addon, target, type, listener, useCapture, wantsUntrusted, delayedWarning) {
     let newTarget = this.redirectEventTarget(target);
     if (!newTarget) {
       return;
     }
 
     useCapture = useCapture || false;
     wantsUntrusted = wantsUntrusted || false;
 
@@ -484,24 +484,24 @@ var EventTargetParent = {
       if (forType[i].listener === listener &&
           forType[i].target === target &&
           forType[i].useCapture === useCapture &&
           forType[i].wantsUntrusted === wantsUntrusted) {
         return;
       }
     }
 
-    forType.push({listener: listener,
-                  target: target,
-                  wantsUntrusted: wantsUntrusted,
-                  useCapture: useCapture,
-                  delayedWarning: delayedWarning});
+    forType.push({listener,
+                  target,
+                  wantsUntrusted,
+                  useCapture,
+                  delayedWarning});
   },
 
-  removeEventListener: function(addon, target, type, listener, useCapture) {
+  removeEventListener(addon, target, type, listener, useCapture) {
     let newTarget = this.redirectEventTarget(target);
     if (!newTarget) {
       return;
     }
 
     useCapture = useCapture || false;
 
     let listeners = this._listeners.get(newTarget);
@@ -516,26 +516,26 @@ var EventTargetParent = {
           forType[i].useCapture === useCapture) {
         forType.splice(i, 1);
         NotificationTracker.remove(["event", type, useCapture, addon]);
         break;
       }
     }
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "Addons:Event:Run":
         this.dispatch(msg.target, msg.data.type, msg.data.capturing,
                       msg.data.isTrusted, msg.data.prefetched, msg.objects);
         break;
     }
   },
 
-  dispatch: function(browser, type, capturing, isTrusted, prefetched, cpows) {
+  dispatch(browser, type, capturing, isTrusted, prefetched, cpows) {
     let event = cpows.event;
     let eventTarget = cpows.eventTarget;
     let targets = this.getTargets(browser);
     for (let target of targets) {
       let listeners = this._listeners.get(target);
       if (!listeners) {
         continue;
       }
@@ -549,27 +549,27 @@ var EventTargetParent = {
           delayedWarning();
 
           handlers.push([listener, target]);
         }
       }
 
       for (let [handler, target] of handlers) {
         let EventProxy = {
-          get: function(knownProps, name) {
+          get(knownProps, name) {
             if (knownProps.hasOwnProperty(name))
               return knownProps[name];
             return event[name];
           }
         }
         let proxyEvent = new Proxy({
           currentTarget: target,
           target: eventTarget,
-          type: type,
-          QueryInterface: function(iid) {
+          type,
+          QueryInterface(iid) {
             if (iid.equals(Ci.nsISupports) ||
                 iid.equals(Ci.nsIDOMEventTarget))
               return proxyEvent;
             // If event deson't support the interface this will throw. If it
             // does we want to return the proxy
             event.QueryInterface(iid);
             return proxyEvent;
           }
@@ -693,17 +693,17 @@ function chromeGlobalForContentWindow(wi
 
 // This object manages sandboxes created with content principals in
 // the parent. We actually create these sandboxes in the child process
 // so that the code loaded into them runs there. The resulting sandbox
 // object is a CPOW. This is primarly useful for Greasemonkey.
 var SandboxParent = {
   componentsMap: new WeakMap(),
 
-  makeContentSandbox: function(addon, chromeGlobal, principals, ...rest) {
+  makeContentSandbox(addon, chromeGlobal, principals, ...rest) {
     CompatWarning.warn("This sandbox should be created from the child process.",
                        addon, CompatWarning.warnings.sandboxes);
     if (rest.length) {
       // Do a shallow copy of the options object into the child
       // process. This way we don't have to access it through a Chrome
       // object wrapper, which would require __exposedProps__.
       //
       // The only object property here is sandboxPrototype. We assume
@@ -728,17 +728,17 @@ var SandboxParent = {
 
     // The sandbox CPOW will be kept alive by whomever we return it
     // to. Its lifetime is unrelated to that of the sandbox object in
     // the child.
     this.componentsMap.set(sandbox, cu);
     return sandbox;
   },
 
-  evalInSandbox: function(code, sandbox, ...rest) {
+  evalInSandbox(code, sandbox, ...rest) {
     let cu = this.componentsMap.get(sandbox);
     return cu.evalInSandbox(code, sandbox, ...rest);
   }
 };
 
 // This interposition redirects calls to Cu.Sandbox and
 // Cu.evalInSandbox to SandboxParent if the principals are content
 // principals.
@@ -928,17 +928,17 @@ TabBrowserElementInterposition.getters.s
 var progressListeners = {global: new WeakMap(), tabs: new WeakMap()};
 function wrapProgressListener(kind, listener)
 {
   if (progressListeners[kind].has(listener)) {
     return progressListeners[kind].get(listener);
   }
 
   let ListenerHandler = {
-    get: function(target, name) {
+    get(target, name) {
       if (name.startsWith("on")) {
         return function(...args) {
           listener[name].apply(listener, RemoteWebProgressManager.argumentsForAddonListener(kind, args));
         };
       }
 
       return listener[name];
     }
@@ -1021,60 +1021,60 @@ RemoteWebNavigationInterposition.getters
   }
 
   let browser = impl._browser;
 
   return getSessionHistory(browser);
 }
 
 var RemoteAddonsParent = {
-  init: function() {
+  init() {
     let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
     mm.addMessageListener("Addons:RegisterGlobal", this);
 
     Services.ppmm.initialProcessData.remoteAddonsParentInitted = true;
 
     this.globalToBrowser = new WeakMap();
     this.browserToGlobal = new WeakMap();
   },
 
-  getInterfaceInterpositions: function() {
+  getInterfaceInterpositions() {
     let result = {};
 
     function register(intf, interp) {
       result[intf.number] = interp;
     }
 
     register(Ci.nsICategoryManager, CategoryManagerInterposition);
     register(Ci.nsIComponentRegistrar, ComponentRegistrarInterposition);
     register(Ci.nsIObserverService, ObserverInterposition);
     register(Ci.nsIXPCComponents_Utils, ComponentsUtilsInterposition);
     register(Ci.nsIWebNavigation, RemoteWebNavigationInterposition);
 
     return result;
   },
 
-  getTaggedInterpositions: function() {
+  getTaggedInterpositions() {
     let result = {};
 
     function register(tag, interp) {
       result[tag] = interp;
     }
 
     register("EventTarget", EventTargetInterposition);
     register("ContentDocShellTreeItem", ContentDocShellTreeItemInterposition);
     register("ContentDocument", ContentDocumentInterposition);
     register("RemoteBrowserElement", RemoteBrowserElementInterposition);
     register("TabBrowserElement", TabBrowserElementInterposition);
     register("ChromeWindow", ChromeWindowInterposition);
 
     return result;
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
     case "Addons:RegisterGlobal":
       this.browserToGlobal.set(msg.target, msg.objects.global);
       this.globalToBrowser.set(msg.objects.global, msg.target);
       break;
     }
   }
 };
--- a/toolkit/components/addoncompat/ShimWaiver.jsm
+++ b/toolkit/components/addoncompat/ShimWaiver.jsm
@@ -1,15 +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.EXPORTED_SYMBOLS = ["ShimWaiver"];
 
 this.ShimWaiver = {
-  getProperty: function(obj, prop) {
+  getProperty(obj, prop) {
     let rv = obj[prop];
     if (rv instanceof Function) {
       rv = rv.bind(obj);
     }
     return rv;
   }
 };
--- a/toolkit/components/addoncompat/defaultShims.js
+++ b/toolkit/components/addoncompat/defaultShims.js
@@ -17,23 +17,23 @@ Cu.import("resource://gre/modules/XPCOMU
 
 function DefaultInterpositionService() {
 }
 
 DefaultInterpositionService.prototype = {
   classID: Components.ID("{50bc93ce-602a-4bef-bf3a-61fc749c4caf}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAddonInterposition, Ci.nsISupportsWeakReference]),
 
-  getWhitelist: function() {
+  getWhitelist() {
     return [];
   },
 
-  interposeProperty: function(addon, target, iid, prop) {
+  interposeProperty(addon, target, iid, prop) {
     return null;
   },
 
-  interposeCall: function(addonId, originalFunc, originalThis, args) {
+  interposeCall(addonId, originalFunc, originalThis, args) {
     args.splice(0, 0, addonId);
     return originalFunc.apply(originalThis, args);
   },
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([DefaultInterpositionService]);
--- a/toolkit/components/addoncompat/multiprocessShims.js
+++ b/toolkit/components/addoncompat/multiprocessShims.js
@@ -97,23 +97,23 @@ function AddonInterpositionService()
 
   this._whitelist = wl;
 }
 
 AddonInterpositionService.prototype = {
   classID: Components.ID("{1363d5f0-d95e-11e3-9c1a-0800200c9a66}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAddonInterposition, Ci.nsISupportsWeakReference]),
 
-  getWhitelist: function() {
+  getWhitelist() {
     return this._whitelist;
   },
 
   // When the interface is not known for a method call, this code
   // determines the type of the target object.
-  getObjectTag: function(target) {
+  getObjectTag(target) {
     if (Cu.isCrossProcessWrapper(target)) {
       return Cu.getCrossProcessWrapperTag(target);
     }
 
     if (target instanceof Ci.nsIDOMXULElement) {
       if (target.localName == "browser" && target.isRemoteBrowser) {
         return "RemoteBrowserElement";
       }
@@ -129,17 +129,17 @@ AddonInterpositionService.prototype = {
 
     if (target instanceof Ci.nsIDOMEventTarget) {
       return "EventTarget";
     }
 
     return "generic";
   },
 
-  interposeProperty: function(addon, target, iid, prop) {
+  interposeProperty(addon, target, iid, prop) {
     let interp;
     if (iid) {
       interp = this._interfaceInterpositions[iid];
     } else {
       try {
         interp = this._taggedInterpositions[this.getObjectTag(target)];
       }
       catch (e) {
@@ -168,15 +168,15 @@ AddonInterpositionService.prototype = {
       }
 
       return desc;
     }
 
     return Prefetcher.lookupInCache(addon, target, prop);
   },
 
-  interposeCall: function(addonId, originalFunc, originalThis, args) {
+  interposeCall(addonId, originalFunc, originalThis, args) {
     args.splice(0, 0, addonId);
     return originalFunc.apply(originalThis, args);
   },
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([AddonInterpositionService]);
--- a/toolkit/components/addoncompat/tests/addon/bootstrap.js
+++ b/toolkit/components/addoncompat/tests/addon/bootstrap.js
@@ -278,17 +278,17 @@ function testAboutModuleRegistration()
 
   function TestChannel(uri, aLoadInfo, aboutName) {
     this.aboutName = aboutName;
     this.loadInfo = aLoadInfo;
     this.URI = this.originalURI = uri;
   }
 
   TestChannel.prototype = {
-    asyncOpen: function(listener, context) {
+    asyncOpen(listener, context) {
       let stream = this.open();
       let runnable = {
         run: () => {
           try {
             listener.onStartRequest(this, context);
           } catch (e) {}
           try {
             listener.onDataAvailable(this, context, stream, 0, stream.available());
@@ -296,23 +296,23 @@ function testAboutModuleRegistration()
           try {
             listener.onStopRequest(this, context, Cr.NS_OK);
           } catch (e) {}
         }
       };
       Services.tm.currentThread.dispatch(runnable, Ci.nsIEventTarget.DISPATCH_NORMAL);
     },
 
-    asyncOpen2: function(listener) {
+    asyncOpen2(listener) {
       // throws an error if security checks fail
       var outListener = contentSecManager.performSecurityCheck(this, listener);
       return this.asyncOpen(outListener, null);
     },
 
-    open: function() {
+    open() {
       function getWindow(channel) {
         try
         {
           if (channel.notificationCallbacks)
             return channel.notificationCallbacks.getInterface(Ci.nsILoadContext).associatedWindow;
         } catch (e) {}
 
         try
@@ -329,32 +329,32 @@ function testAboutModuleRegistration()
       if (!wnd)
         throw Cr.NS_ERROR_UNEXPECTED;
 
       let stream = Cc["@mozilla.org/io/string-input-stream;1"].createInstance(Ci.nsIStringInputStream);
       stream.setData(data, data.length);
       return stream;
     },
 
-    open2: function() {
+    open2() {
       // throws an error if security checks fail
       contentSecManager.performSecurityCheck(this, null);
       return this.open();
     },
 
-    isPending: function() {
+    isPending() {
       return false;
     },
-    cancel: function() {
+    cancel() {
       throw Cr.NS_ERROR_NOT_IMPLEMENTED;
     },
-    suspend: function() {
+    suspend() {
       throw Cr.NS_ERROR_NOT_IMPLEMENTED;
     },
-    resume: function() {
+    resume() {
       throw Cr.NS_ERROR_NOT_IMPLEMENTED;
     },
 
     QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannel, Ci.nsIRequest])
   };
 
   /**
    * This function creates a new nsIAboutModule and registers it. Callers
@@ -386,17 +386,17 @@ function testAboutModuleRegistration()
 
       getURIFlags: (aURI) => {
         return Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT |
                Ci.nsIAboutModule.ALLOW_SCRIPT;
       },
     };
 
     let factory = {
-      createInstance: function(outer, iid) {
+      createInstance(outer, iid) {
         if (outer) {
           throw Cr.NS_ERROR_NO_AGGREGATION;
         }
         return new AboutModule();
       },
     };
 
     Registrar.registerFactory(AboutModule.prototype.classID,
@@ -514,26 +514,26 @@ function testAboutModuleRegistration()
 function testProgressListener()
 {
   const url = baseURL + "browser_addonShims_testpage.html";
 
   let sawGlobalLocChange = false;
   let sawTabsLocChange = false;
 
   let globalListener = {
-    onLocationChange: function(webProgress, request, uri) {
+    onLocationChange(webProgress, request, uri) {
       if (uri.spec == url) {
         sawGlobalLocChange = true;
         ok(request instanceof Ci.nsIHttpChannel, "Global listener channel is an HTTP channel");
       }
     },
   };
 
   let tabsListener = {
-    onLocationChange: function(browser, webProgress, request, uri) {
+    onLocationChange(browser, webProgress, request, uri) {
       if (uri.spec == url) {
         sawTabsLocChange = true;
         ok(request instanceof Ci.nsIHttpChannel, "Tab listener channel is an HTTP channel");
       }
     },
   };
 
   gBrowser.addProgressListener(globalListener);
--- a/toolkit/components/addoncompat/tests/browser/browser_addonShims.js
+++ b/toolkit/components/addoncompat/tests/browser/browser_addonShims.js
@@ -9,17 +9,17 @@ const COMPAT_ADDON_URL = "http://example
 function addAddon(url)
 {
   info("Installing add-on: " + url);
 
   return new Promise(function(resolve, reject) {
     AddonManager.getInstallForURL(url, installer => {
       installer.install();
       let listener = {
-        onInstallEnded: function(addon, addonInstall) {
+        onInstallEnded(addon, addonInstall) {
           installer.removeListener(listener);
 
           // Wait for add-on's startup scripts to execute. See bug 997408
           executeSoon(function() {
             resolve(addonInstall);
           });
         }
       };
@@ -31,34 +31,34 @@ function addAddon(url)
 // Uninstall a test add-on.
 //   addon: The addon reference returned from addAddon.
 function removeAddon(addon)
 {
   info("Removing addon.");
 
   return new Promise(function(resolve, reject) {
     let listener = {
-      onUninstalled: function(uninstalledAddon) {
+      onUninstalled(uninstalledAddon) {
         if (uninstalledAddon != addon) {
           return;
         }
         AddonManager.removeAddonListener(listener);
         resolve();
       }
     };
     AddonManager.addAddonListener(listener);
     addon.uninstall();
   });
 }
 
 add_task(function* test_addon_shims() {
   yield SpecialPowers.pushPrefEnv({set: [["dom.ipc.shims.enabledWarnings", true]]});
 
   let addon = yield addAddon(ADDON_URL);
-  yield window.runAddonShimTests({ok: ok, is: is, info: info});
+  yield window.runAddonShimTests({ok, is, info});
   yield removeAddon(addon);
 
   if (Services.appinfo.browserTabsRemoteAutostart) {
     addon = yield addAddon(COMPAT_ADDON_URL);
-    yield window.runAddonTests({ok: ok, is: is, info: info});
+    yield window.runAddonTests({ok, is, info});
     yield removeAddon(addon);
   }
 });
--- a/toolkit/components/asyncshutdown/AsyncShutdown.jsm
+++ b/toolkit/components/asyncshutdown/AsyncShutdown.jsm
@@ -48,17 +48,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   "resource://gre/modules/Promise.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PromiseUtils",
   "resource://gre/modules/PromiseUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
   "resource://gre/modules/Task.jsm");
 XPCOMUtils.defineLazyServiceGetter(this, "gDebug",
   "@mozilla.org/xpcom/debug;1", "nsIDebug2");
 Object.defineProperty(this, "gCrashReporter", {
-  get: function() {
+  get() {
     delete this.gCrashReporter;
     try {
       let reporter = Cc["@mozilla.org/xre/app-info;1"].
             getService(Ci.nsICrashReporter);
       return this.gCrashReporter = reporter;
     } catch (ex) {
       return this.gCrashReporter = null;
     }
@@ -111,17 +111,17 @@ PromiseSet.prototype = {
    * Wait until all Promise have been resolved or removed.
    *
    * Note that calling `wait()` causes Promise to be removed from the
    * Set once they are resolved.
    *
    * @return {Promise} Resolved once all Promise have been resolved or removed,
    * or rejected after at least one Promise has rejected.
    */
-  wait: function() {
+  wait() {
     // Pick an arbitrary element in the map, if any exists.
     let entry = this._indirections.entries().next();
     if (entry.done) {
       // No indirections left, we are done.
       return Promise.resolve();
     }
 
     let [, indirection] = entry.value;
@@ -134,17 +134,17 @@ PromiseSet.prototype = {
   },
 
   /**
    * Add a new Promise to the set.
    *
    * Calls to wait (including ongoing calls) will only return once
    * `key` has either resolved or been removed.
    */
-  add: function(key) {
+  add(key) {
     this._ensurePromise(key);
     let indirection = PromiseUtils.defer();
     key.then(
       x => {
         // Clean up immediately.
         // This needs to be done before the call to `resolve`, otherwise
         // `wait()` may loop forever.
         this._indirections.delete(key);
@@ -158,28 +158,28 @@ PromiseSet.prototype = {
   },
 
   /**
    * Remove a Promise from the set.
    *
    * Calls to wait (including ongoing calls) will ignore this promise,
    * unless it is added again.
    */
-  delete: function(key) {
+  delete(key) {
     this._ensurePromise(key);
     let value = this._indirections.get(key);
     if (!value) {
       return false;
     }
     this._indirections.delete(key);
     value.resolve();
     return true;
   },
 
-  _ensurePromise: function(key) {
+  _ensurePromise(key) {
     if (!key || typeof key != "object") {
       throw new Error("Expected an object");
     }
     if ((!("then" in key)) || typeof key.then != "function") {
       throw new Error("Expected a Promise");
     }
   },
 
@@ -330,19 +330,19 @@ function getOrigin(topFrame, filename = 
       while (frame != null) {
         frames.push(frame.filename + ":" + frame.name + ":" + frame.lineNumber);
         frame = frame.caller;
       }
       stack = Task.Debugging.generateReadableStack(frames.join("\n")).split("\n");
     }
 
     return {
-      filename: filename,
-      lineNumber: lineNumber,
-      stack: stack,
+      filename,
+      lineNumber,
+      stack,
     };
   } catch (ex) {
     return {
       filename: "<internal error: could not get origin>",
       lineNumber: -1,
       stack: "<internal error: could not get origin>",
     }
   }
@@ -431,32 +431,32 @@ function getPhase(topic) {
      *
      * AsyncShutdown.profileBeforeChange.addBlocker("Module: trivial callback",
      *     function callback() {
      *       // ...
      *       // Execute this code during profileBeforeChange
      *       // No specific guarantee about completion of profileBeforeChange
      * });
      */
-    addBlocker: function(name, condition, details = null) {
+    addBlocker(name, condition, details = null) {
       spinner.addBlocker(name, condition, details);
     },
     /**
      * Remove the blocker for a condition.
      *
      * If several blockers have been registered for the same
      * condition, remove all these blockers. If no blocker has been
      * registered for this condition, this is a noop.
      *
      * @return {boolean} true if a blocker has been removed, false
      * otherwise. Note that a result of false may mean either that
      * the blocker has never been installed or that the phase has
      * completed and the blocker has already been resolved.
      */
-    removeBlocker: function(condition) {
+    removeBlocker(condition) {
       return spinner.removeBlocker(condition);
     },
 
     get name() {
       return spinner.name;
     },
 
     /**
@@ -494,40 +494,40 @@ function Spinner(topic) {
 
 Spinner.prototype = {
   /**
    * Register a new condition for this phase.
    *
    * See the documentation of `addBlocker` in property `client`
    * of instances of `Barrier`.
    */
-  addBlocker: function(name, condition, details) {
+  addBlocker(name, condition, details) {
     this._barrier.client.addBlocker(name, condition, details);
   },
   /**
    * Remove the blocker for a condition.
    *
    * See the documentation of `removeBlocker` in rpoperty `client`
    * of instances of `Barrier`
    *
    * @return {boolean} true if a blocker has been removed, false
    * otherwise. Note that a result of false may mean either that
    * the blocker has never been installed or that the phase has
    * completed and the blocker has already been resolved.
    */
-  removeBlocker: function(condition) {
+  removeBlocker(condition) {
     return this._barrier.client.removeBlocker(condition);
   },
 
   get name() {
     return this._barrier.client.name;
   },
 
   // nsIObserver.observe
-  observe: function() {
+  observe() {
     let topic = this._topic;
     debug(`Starting phase ${ topic }`);
     Services.obs.removeObserver(this, topic);
 
     let satisfied = false; // |true| once we have satisfied all conditions
     let promise;
     try {
       promise = this._barrier.wait({
@@ -746,20 +746,20 @@ function Barrier(name) {
       );
 
       let topFrame = null;
       if (filename == null || lineNumber == null || stack == null) {
         topFrame = Components.stack;
       }
 
       let blocker = {
-        trigger: trigger,
-        promise: promise,
-        name: name,
-        fetchState: fetchState,
+        trigger,
+        promise,
+        name,
+        fetchState,
         getOrigin: () => getOrigin(topFrame, filename, lineNumber, stack),
       };
 
       this._waitForMe.add(promise);
       this._promiseToBlocker.set(promise, blocker);
       this._conditionToPromise.set(condition, promise);
 
       // As conditions may hold lots of memory, we attempt to cleanup
@@ -805,21 +805,21 @@ Barrier.prototype = Object.freeze({
     if (!this._waitForMe) {
       return "Complete";
     }
     let frozen = [];
     for (let blocker of this._promiseToBlocker.values()) {
       let {name, fetchState} = blocker;
       let {stack, filename, lineNumber} = blocker.getOrigin();
       frozen.push({
-        name: name,
+        name,
         state: safeGetState(fetchState),
-        filename: filename,
-        lineNumber: lineNumber,
-        stack: stack
+        filename,
+        lineNumber,
+        stack
       });
     }
     return frozen;
   },
 
   /**
    * Wait until all currently registered blockers are complete.
    *
@@ -837,24 +837,24 @@ Barrier.prototype = Object.freeze({
    *   to the next second). To avoid crashing simply because the computer is busy
    *   or going to sleep, we actually wait for ceil(crashAfterMS/1000) successive
    *   periods of at least one second. Upon crashing, if a crash reporter is present,
    *   prepare a crash report with the state of this barrier.
    *
    *
    * @return {Promise} A promise satisfied once all blockers are complete.
    */
-  wait: function(options = {}) {
+  wait(options = {}) {
     // This method only implements caching on top of _wait()
     if (this._promise) {
       return this._promise;
     }
     return this._promise = this._wait(options);
   },
-  _wait: function(options) {
+  _wait(options) {
 
     // Sanity checks
     if (this._isStarted) {
       throw new TypeError("Internal error: already started " + this._name);
     }
     if (!this._waitForMe || !this._conditionToPromise || !this._promiseToBlocker) {
       throw new TypeError("Internal error: already finished " + this._name);
     }
@@ -985,17 +985,17 @@ Barrier.prototype = Object.freeze({
       promise = promise.then(function() {
         timeToCrash.reject();
       }/* No error is possible here*/);
     }
 
     return promise;
   },
 
-  _removeBlocker: function(condition) {
+  _removeBlocker(condition) {
     if (!this._waitForMe || !this._promiseToBlocker || !this._conditionToPromise) {
       // We have already cleaned up everything.
       return false;
     }
 
     let promise = this._conditionToPromise.get(condition);
     if (!promise) {
       // The blocker has already been removed
--- a/toolkit/components/asyncshutdown/nsAsyncShutdown.js
+++ b/toolkit/components/asyncshutdown/nsAsyncShutdown.js
@@ -22,56 +22,56 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   "resource://gre/modules/Task.jsm");
 
 
 /**
  * Conversion between nsIPropertyBag and JS object
  */
 var PropertyBagConverter = {
   // From nsIPropertyBag to JS
-  toObject: function(bag) {
+  toObject(bag) {
     if (!(bag instanceof Ci.nsIPropertyBag)) {
       throw new TypeError("Not a property bag");
     }
     let result = {};
     let enumerator = bag.enumerator;
     while (enumerator.hasMoreElements()) {
       let {name, value: property} = enumerator.getNext().QueryInterface(Ci.nsIProperty);
       let value = this.toValue(property);
       result[name] = value;
     }
     return result;
   },
-  toValue: function(property) {
+  toValue(property) {
     if (typeof property != "object") {
       return property;
     }
     if (Array.isArray(property)) {
       return property.map(this.toValue, this);
     }
     if (property && property instanceof Ci.nsIPropertyBag) {
       return this.toObject(property);
     }
     return property;
   },
 
   // From JS to nsIPropertyBag
-  fromObject: function(obj) {
+  fromObject(obj) {
     if (obj == null || typeof obj != "object") {
       throw new TypeError("Invalid object: " + obj);
     }
     let bag = Cc["@mozilla.org/hash-property-bag;1"].
       createInstance(Ci.nsIWritablePropertyBag);
     for (let k of Object.keys(obj)) {
       let value = this.fromValue(obj[k]);
       bag.setProperty(k, value);
     }
     return bag;
   },
-  fromValue: function(value) {
+  fromValue(value) {
     if (typeof value == "function") {
       return null; // Emulating the behavior of JSON.stringify with functions
     }
     if (Array.isArray(value)) {
       return value.map(this.fromValue, this);
     }
     if (value == null || typeof value != "object") {
       // Auto-converted to nsIVariant
@@ -95,53 +95,53 @@ var PropertyBagConverter = {
 function nsAsyncShutdownClient(moduleClient) {
   if (!moduleClient) {
     throw new TypeError("nsAsyncShutdownClient expects one argument");
   }
   this._moduleClient = moduleClient;
   this._byName = new Map();
 }
 nsAsyncShutdownClient.prototype = {
-  _getPromisified: function(xpcomBlocker) {
+  _getPromisified(xpcomBlocker) {
     let candidate = this._byName.get(xpcomBlocker.name);
     if (!candidate) {
       return null;
     }
     if (candidate.xpcom === xpcomBlocker) {
       return candidate.jsm;
     }
     return null;
   },
-  _setPromisified: function(xpcomBlocker, moduleBlocker) {
+  _setPromisified(xpcomBlocker, moduleBlocker) {
     let candidate = this._byName.get(xpcomBlocker.name);
     if (!candidate) {
       this._byName.set(xpcomBlocker.name, {xpcom: xpcomBlocker,
                                            jsm: moduleBlocker});
       return;
     }
     if (candidate.xpcom === xpcomBlocker) {
       return;
     }
     throw new Error("We have already registered a distinct blocker with the same name: " + xpcomBlocker.name);
   },
-  _deletePromisified: function(xpcomBlocker) {
+  _deletePromisified(xpcomBlocker) {
     let candidate = this._byName.get(xpcomBlocker.name);
     if (!candidate || candidate.xpcom !== xpcomBlocker) {
       return false;
     }
     this._byName.delete(xpcomBlocker.name);
     return true;
   },
   get jsclient() {
     return this._moduleClient;
   },
   get name() {
     return this._moduleClient.name;
   },
-  addBlocker: function(/* nsIAsyncShutdownBlocker*/ xpcomBlocker,
+  addBlocker(/* nsIAsyncShutdownBlocker*/ xpcomBlocker,
       fileName, lineNumber, stack) {
     // We need a Promise-based function with the same behavior as
     // `xpcomBlocker`. Furthermore, to support `removeBlocker`, we
     // need to ensure that we always get the same Promise-based
     // function if we call several `addBlocker`/`removeBlocker` several
     // times with the same `xpcomBlocker`.
     //
     // Ideally, this should be done with a WeakMap() with xpcomBlocker
@@ -166,22 +166,22 @@ nsAsyncShutdownClient.prototype = {
         fetchState: () => {
           let state = xpcomBlocker.state;
           if (state) {
             return PropertyBagConverter.toValue(state);
           }
           return null;
         },
         filename: fileName,
-        lineNumber: lineNumber,
-        stack: stack,
+        lineNumber,
+        stack,
       });
   },
 
-  removeBlocker: function(xpcomBlocker) {
+  removeBlocker(xpcomBlocker) {
     let moduleBlocker = this._getPromisified(xpcomBlocker);
     if (!moduleBlocker) {
       return false;
     }
     this._deletePromisified(xpcomBlocker);
     return this._moduleClient.removeBlocker(moduleBlocker);
   },
 
@@ -205,17 +205,17 @@ function nsAsyncShutdownBarrier(moduleBa
 }
 nsAsyncShutdownBarrier.prototype = {
   get state() {
     return PropertyBagConverter.fromValue(this._moduleBarrier.state);
   },
   get client() {
     return this._client;
   },
-  wait: function(onReady) {
+  wait(onReady) {
     this._moduleBarrier.wait().then(() => {
       onReady.done();
     });
     // By specification, _moduleBarrier.wait() cannot reject.
   },
 
   /* ........ QueryInterface .............. */
   QueryInterface :  XPCOMUtils.generateQI([Ci.nsIAsyncShutdownBarrier]),
@@ -237,17 +237,17 @@ function nsAsyncShutdownService() {
 
     // All processes
     "webWorkersShutdown",
     "xpcomWillShutdown",
     ]) {
     let k = _k;
     Object.defineProperty(this, k, {
       configurable: true,
-      get: function() {
+      get() {
         delete this[k];
         let wrapped = AsyncShutdown[k]; // May be undefined, if we're on the wrong process.
         let result = wrapped ? new nsAsyncShutdownClient(wrapped) : undefined;
         Object.defineProperty(this, k, {
           value: result
         });
         return result;
       }
@@ -255,17 +255,17 @@ function nsAsyncShutdownService() {
   }
 
   // Hooks for testing purpose
   this.wrappedJSObject = {
     _propertyBagConverter: PropertyBagConverter
   };
 }
 nsAsyncShutdownService.prototype = {
-  makeBarrier: function(name) {
+  makeBarrier(name) {
     return new nsAsyncShutdownBarrier(new AsyncShutdown.Barrier(name));
   },
 
   /* ........ QueryInterface .............. */
   QueryInterface :  XPCOMUtils.generateQI([Ci.nsIAsyncShutdownService]),
   classID:          Components.ID("{35c496de-a115-475d-93b5-ffa3f3ae6fe3}"),
 };
 
--- a/toolkit/components/asyncshutdown/tests/xpcshell/head.js
+++ b/toolkit/components/asyncshutdown/tests/xpcshell/head.js
@@ -32,55 +32,55 @@ Services.prefs.setBoolPref("toolkit.asyn
  *   - addBlocker() - the same method as AsyncShutdown phases and barrier clients
  *   - wait() - trigger the resolution of the lock
  */
 function makeLock(kind) {
   if (kind == "phase") {
     let topic = "test-Phase-" + ++makeLock.counter;
     let phase = AsyncShutdown._getPhase(topic);
     return {
-      addBlocker: function(...args) {
+      addBlocker(...args) {
         return phase.addBlocker(...args);
       },
-      removeBlocker: function(blocker) {
+      removeBlocker(blocker) {
         return phase.removeBlocker(blocker);
       },
-      wait: function() {
+      wait() {
         Services.obs.notifyObservers(null, topic, null);
         return Promise.resolve();
       }
     };
   } else if (kind == "barrier") {
     let name = "test-Barrier-" + ++makeLock.counter;
     let barrier = new AsyncShutdown.Barrier(name);
     return {
       addBlocker: barrier.client.addBlocker,
       removeBlocker: barrier.client.removeBlocker,
-      wait: function() {
+      wait() {
         return barrier.wait();
       }
     };
   } else if (kind == "xpcom-barrier") {
     let name = "test-xpcom-Barrier-" + ++makeLock.counter;
     let barrier = asyncShutdownService.makeBarrier(name);
     return {
-      addBlocker: function(blockerName, condition, state) {
+      addBlocker(blockerName, condition, state) {
         if (condition == null) {
           // Slight trick as `null` or `undefined` cannot be used as keys
           // for `xpcomMap`. Note that this has no incidence on the result
           // of the test as the XPCOM interface imposes that the condition
           // is a method, so it cannot be `null`/`undefined`.
           condition = "<this case can't happen with the xpcom interface>";
         }
         let blocker = makeLock.xpcomMap.get(condition);
         if (!blocker) {
           blocker = {
             name: blockerName,
-            state: state,
-            blockShutdown: function(aBarrierClient) {
+            state,
+            blockShutdown(aBarrierClient) {
               return Task.spawn(function*() {
                 try {
                   if (typeof condition == "function") {
                     yield Promise.resolve(condition());
                   } else {
                     yield Promise.resolve(condition);
                   }
                 } finally {
@@ -89,37 +89,37 @@ function makeLock(kind) {
               });
             },
           };
           makeLock.xpcomMap.set(condition, blocker);
         }
         let {fileName, lineNumber, stack} = (new Error());
         return barrier.client.addBlocker(blocker, fileName, lineNumber, stack);
       },
-      removeBlocker: function(condition) {
+      removeBlocker(condition) {
         let blocker = makeLock.xpcomMap.get(condition);
         if (!blocker) {
           return;
         }
         barrier.client.removeBlocker(blocker);
       },
-      wait: function() {
+      wait() {
         return new Promise(resolve => {
           barrier.wait(resolve);
         });
       }
     };
   } else if ("unwrapped-xpcom-barrier") {
     let name = "unwrapped-xpcom-barrier-" + ++makeLock.counter;
     let barrier = asyncShutdownService.makeBarrier(name);
     let client = barrier.client.jsclient;
     return {
       addBlocker: client.addBlocker,
       removeBlocker: client.removeBlocker,
-      wait: function() {
+      wait() {
         return new Promise(resolve => {
           barrier.wait(resolve);
         });
       }
     };
   }
   throw new TypeError("Unknown kind " + kind);
 }
--- a/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js
+++ b/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js
@@ -22,17 +22,17 @@ add_task(function* test_phase_simple_asy
         for (let success of [false, true]) {
           for (let state of [[null],
                              [],
                              [() => "some state"],
                              [function() {
                                throw new Error("State BOOM"); }],
                              [function() {
                                return {
-                                 toJSON: function() {
+                                 toJSON() {
                                    throw new Error("State.toJSON BOOM");
                                  }
                                };
                              }]]) {
             // Asynchronous phase
             do_print("Asynchronous test with " + arg + ", " + resolution + ", " + kind);
             let lock = makeLock(kind);
             let outParam = { isFinished: false };
--- a/toolkit/components/autocomplete/tests/unit/head_autocomplete.js
+++ b/toolkit/components/autocomplete/tests/unit/head_autocomplete.js
@@ -32,31 +32,31 @@ AutoCompleteInputBase.prototype = {
   _selStart: 0,
   _selEnd: 0,
   get selectionStart() {
     return this._selStart;
   },
   get selectionEnd() {
     return this._selEnd;
   },
-  selectTextRange: function(aStart, aEnd) {
+  selectTextRange(aStart, aEnd) {
     this._selStart = aStart;
     this._selEnd = aEnd;
   },
 
   get searchCount() {
     return this.searches.length;
   },
 
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   popupOpen: false,
 
   get popup() {
     if (!this._popup) {
       this._popup = new AutocompletePopupBase(this);
     }
     return this._popup;
@@ -84,41 +84,41 @@ AutoCompleteResultBase.prototype = {
   searchResult: null,
 
   defaultIndex: -1,
 
   get matchCount() {
     return this._values.length;
   },
 
-  getValueAt: function(aIndex) {
+  getValueAt(aIndex) {
     return this._values[aIndex];
   },
 
-  getLabelAt: function(aIndex) {
+  getLabelAt(aIndex) {
     return this.getValueAt(aIndex);
   },
 
-  getCommentAt: function(aIndex) {
+  getCommentAt(aIndex) {
     return this._comments[aIndex];
   },
 
-  getStyleAt: function(aIndex) {
+  getStyleAt(aIndex) {
     return this._styles[aIndex];
   },
 
-  getImageAt: function(aIndex) {
+  getImageAt(aIndex) {
     return "";
   },
 
-  getFinalCompleteValueAt: function(aIndex) {
+  getFinalCompleteValueAt(aIndex) {
     return this._finalCompleteValues[aIndex] || this._values[aIndex];
   },
 
-  removeValueAt: function(aRowIndex, aRemoveFromDb) {},
+  removeValueAt(aRowIndex, aRemoveFromDb) {},
 
   // nsISupports implementation
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteResult])
 }
 
 /**
  * nsIAutoCompleteSearch implementation that always returns
  * the same result set.
@@ -130,34 +130,34 @@ function AutoCompleteSearchBase(aName, a
 AutoCompleteSearchBase.prototype = {
 
   // Search name. Used by AutoCompleteController
   name: null,
 
   // AutoCompleteResult
   _result: null,
 
-  startSearch: function(aSearchString,
+  startSearch(aSearchString,
                         aSearchParam,
                         aPreviousResult,
                         aListener) {
     var result = this._result;
 
     result.searchResult = Ci.nsIAutoCompleteResult.RESULT_SUCCESS;
     aListener.onSearchResult(this, result);
   },
 
-  stopSearch: function() {},
+  stopSearch() {},
 
   // nsISupports implementation
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory,
                                          Ci.nsIAutoCompleteSearch]),
 
   // nsIFactory implementation
-  createInstance: function(outer, iid) {
+  createInstance(outer, iid) {
     return this.QueryInterface(iid);
   }
 }
 
 function AutocompletePopupBase(input) {
   this.input = input;
 }
 AutocompletePopupBase.prototype = {
--- a/toolkit/components/autocomplete/tests/unit/test_330578.js
+++ b/toolkit/components/autocomplete/tests/unit/test_330578.js
@@ -4,17 +4,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 gResultListener = {
   _lastResult: null,
   _lastValue: "",
   _lastRemoveFromDb: false,
 
-  onValueRemoved: function(aResult, aValue, aRemoveFromDb) {
+  onValueRemoved(aResult, aValue, aRemoveFromDb) {
     this._lastResult = aResult;
     this._lastValue = aValue;
     this._lastRemoveFromDb = aRemoveFromDb;
   }
 };
 
 
 // main
--- a/toolkit/components/autocomplete/tests/unit/test_378079.js
+++ b/toolkit/components/autocomplete/tests/unit/test_378079.js
@@ -32,41 +32,41 @@ AutoCompleteInput.prototype = {
   textValue: "",
   disableAutoComplete: false,
   completeDefaultIndex: false,
 
   get searchCount() {
     return this.searches.length;
   },
 
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   popupOpen: false,
 
   popup: {
-    setSelectedIndex: function(aIndex) {},
-    invalidate: function() {},
+    setSelectedIndex(aIndex) {},
+    invalidate() {},
 
     // nsISupports implementation
-    QueryInterface: function(iid) {
+    QueryInterface(iid) {
       if (iid.equals(Ci.nsISupports) ||
           iid.equals(Ci.nsIAutoCompletePopup))
         return this;
 
       throw Components.results.NS_ERROR_NO_INTERFACE;
     }
   },
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
@@ -98,44 +98,44 @@ AutoCompleteResult.prototype = {
   searchResult: null,
 
   defaultIndex: 0,
 
   get matchCount() {
     return this._values.length;
   },
 
-  getValueAt: function(aIndex) {
+  getValueAt(aIndex) {
     return this._values[aIndex];
   },
 
-  getLabelAt: function(aIndex) {
+  getLabelAt(aIndex) {
     return this.getValueAt(aIndex);
   },
 
-  getCommentAt: function(aIndex) {
+  getCommentAt(aIndex) {
     return this._comments[aIndex];
   },
 
-  getStyleAt: function(aIndex) {
+  getStyleAt(aIndex) {
     return this._styles[aIndex];
   },
 
-  getImageAt: function(aIndex) {
+  getImageAt(aIndex) {
     return "";
   },
 
-  getFinalCompleteValueAt: function(aIndex) {
+  getFinalCompleteValueAt(aIndex) {
     return this.getValueAt(aIndex);
   },
 
-  removeValueAt: function(aRowIndex, aRemoveFromDb) {},
+  removeValueAt(aRowIndex, aRemoveFromDb) {},
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteResult))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
@@ -157,38 +157,38 @@ AutoCompleteSearch.prototype = {
 
   // AutoCompleteResult
   _result:null,
 
 
   /**
    * Return the same result set for every search
    */
-  startSearch: function(aSearchString,
+  startSearch(aSearchString,
                         aSearchParam,
                         aPreviousResult,
                         aListener)
   {
     aListener.onSearchResult(this, this._result);
   },
 
-  stopSearch: function() {},
+  stopSearch() {},
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIFactory) ||
         iid.equals(Ci.nsIAutoCompleteSearch))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   },
 
   // nsIFactory implementation
-  createInstance: function(outer, iid) {
+  createInstance(outer, iid) {
     return this.QueryInterface(iid);
   }
 }
 
 
 
 /**
  * Helper to register an AutoCompleteSearch with the given name.
--- a/toolkit/components/autocomplete/tests/unit/test_393191.js
+++ b/toolkit/components/autocomplete/tests/unit/test_393191.js
@@ -31,41 +31,41 @@ AutoCompleteInput.prototype = {
   textValue: "",
   disableAutoComplete: false,
   completeDefaultIndex: false,
 
   get searchCount() {
     return this.searches.length;
   },
 
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   popupOpen: false,
 
   popup: {
-    setSelectedIndex: function(aIndex) {},
-    invalidate: function() {},
+    setSelectedIndex(aIndex) {},
+    invalidate() {},
 
     // nsISupports implementation
-    QueryInterface: function(iid) {
+    QueryInterface(iid) {
       if (iid.equals(Ci.nsISupports) ||
           iid.equals(Ci.nsIAutoCompletePopup))
         return this;
 
       throw Components.results.NS_ERROR_NO_INTERFACE;
     }
   },
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
@@ -97,44 +97,44 @@ AutoCompleteResult.prototype = {
   searchResult: null,
 
   defaultIndex: 0,
 
   get matchCount() {
     return this._values.length;
   },
 
-  getValueAt: function(aIndex) {
+  getValueAt(aIndex) {
     return this._values[aIndex];
   },
 
-  getLabelAt: function(aIndex) {
+  getLabelAt(aIndex) {
     return this.getValueAt(aIndex);
   },
 
-  getCommentAt: function(aIndex) {
+  getCommentAt(aIndex) {
     return this._comments[aIndex];
   },
 
-  getStyleAt: function(aIndex) {
+  getStyleAt(aIndex) {
     return this._styles[aIndex];
   },
 
-  getImageAt: function(aIndex) {
+  getImageAt(aIndex) {
     return "";
   },
 
-  getFinalCompleteValueAt: function(aIndex) {
+  getFinalCompleteValueAt(aIndex) {
     return this.getValueAt(aIndex);
   },
 
-  removeValueAt: function(aRowIndex, aRemoveFromDb) {},
+  removeValueAt(aRowIndex, aRemoveFromDb) {},
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteResult))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
@@ -156,38 +156,38 @@ AutoCompleteSearch.prototype = {
 
   // AutoCompleteResult
   _result: null,
 
 
   /**
    * Return the same result set for every search
    */
-  startSearch: function(aSearchString,
+  startSearch(aSearchString,
                         aSearchParam,
                         aPreviousResult,
                         aListener)
   {
     aListener.onSearchResult(this, this._result);
   },
 
-  stopSearch: function() {},
+  stopSearch() {},
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIFactory) ||
         iid.equals(Ci.nsIAutoCompleteSearch))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   },
 
   // nsIFactory implementation
-  createInstance: function(outer, iid) {
+  createInstance(outer, iid) {
     return this.QueryInterface(iid);
   }
 }
 
 
 
 /**
  * Helper to register an AutoCompleteSearch with the given name.
--- a/toolkit/components/autocomplete/tests/unit/test_440866.js
+++ b/toolkit/components/autocomplete/tests/unit/test_440866.js
@@ -30,41 +30,41 @@ AutoCompleteInput.prototype = {
   textValue: "",
   disableAutoComplete: false,
   completeDefaultIndex: false,
 
   get searchCount() {
     return this.searches.length;
   },
 
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   popupOpen: false,
 
   popup: {
-    setSelectedIndex: function(aIndex) {},
-    invalidate: function() {},
+    setSelectedIndex(aIndex) {},
+    invalidate() {},
 
     // nsISupports implementation
-    QueryInterface: function(iid) {
+    QueryInterface(iid) {
       if (iid.equals(Ci.nsISupports) ||
           iid.equals(Ci.nsIAutoCompletePopup))
         return this;
 
       throw Components.results.NS_ERROR_NO_INTERFACE;
     }
   },
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
@@ -96,44 +96,44 @@ AutoCompleteResult.prototype = {
   searchResult: null,
 
   defaultIndex: 0,
 
   get matchCount() {
     return this._values.length;
   },
 
-  getValueAt: function(aIndex) {
+  getValueAt(aIndex) {
     return this._values[aIndex];
   },
 
-  getLabelAt: function(aIndex) {
+  getLabelAt(aIndex) {
     return this.getValueAt(aIndex);
   },
 
-  getCommentAt: function(aIndex) {
+  getCommentAt(aIndex) {
     return this._comments[aIndex];
   },
 
-  getStyleAt: function(aIndex) {
+  getStyleAt(aIndex) {
     return this._styles[aIndex];
   },
 
-  getImageAt: function(aIndex) {
+  getImageAt(aIndex) {
     return "";
   },
 
-  getFinalCompleteValueAt: function(aIndex) {
+  getFinalCompleteValueAt(aIndex) {
     return this.getValueAt(aIndex);
   },
 
-  removeValueAt: function(aRowIndex, aRemoveFromDb) {},
+  removeValueAt(aRowIndex, aRemoveFromDb) {},
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteResult))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
@@ -155,38 +155,38 @@ AutoCompleteSearch.prototype = {
 
   // AutoCompleteResult
   _result:null,
 
 
   /**
    * Return the same result set for every search
    */
-  startSearch: function(aSearchString,
+  startSearch(aSearchString,
                         aSearchParam,
                         aPreviousResult,
                         aListener)
   {
     aListener.onSearchResult(this, this._result);
   },
 
-  stopSearch: function() {},
+  stopSearch() {},
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIFactory) ||
         iid.equals(Ci.nsIAutoCompleteSearch))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   },
 
   // nsIFactory implementation
-  createInstance: function(outer, iid) {
+  createInstance(outer, iid) {
     return this.QueryInterface(iid);
   }
 }
 
 
 
 /**
  * Helper to register an AutoCompleteSearch with the given name.
--- a/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js
+++ b/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js
@@ -25,41 +25,41 @@ AutoCompleteInput.prototype = {
   textValue: "",
   disableAutoComplete: false,
   completeDefaultIndex: false,
 
   get searchCount() {
     return this.searches.length;
   },
 
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   popupOpen: false,
 
   popup: {
-    setSelectedIndex: function(aIndex) {},
-    invalidate: function() {},
+    setSelectedIndex(aIndex) {},
+    invalidate() {},
 
     // nsISupports implementation
-    QueryInterface: function(iid) {
+    QueryInterface(iid) {
       if (iid.equals(Ci.nsISupports) ||
           iid.equals(Ci.nsIAutoCompletePopup))
         return this;
 
       throw Components.results.NS_ERROR_NO_INTERFACE;
     }
   },
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
@@ -85,44 +85,44 @@ AutoCompleteResult.prototype = {
   searchResult: null,
 
   defaultIndex: 0,
 
   get matchCount() {
     return this._values.length;
   },
 
-  getValueAt: function(aIndex) {
+  getValueAt(aIndex) {
     return this._values[aIndex];
   },
 
-  getLabelAt: function(aIndex) {
+  getLabelAt(aIndex) {
     return this.getValueAt(aIndex);
   },
 
-  getCommentAt: function(aIndex) {
+  getCommentAt(aIndex) {
     return this._comments[aIndex];
   },
 
-  getStyleAt: function(aIndex) {
+  getStyleAt(aIndex) {
     return this._styles[aIndex];
   },
 
-  getImageAt: function(aIndex) {
+  getImageAt(aIndex) {
     return "";
   },
 
-  getFinalCompleteValueAt: function(aIndex) {
+  getFinalCompleteValueAt(aIndex) {
     return this.getValueAt(aIndex);
   },
 
-  removeValueAt: function(aRowIndex, aRemoveFromDb) {},
+  removeValueAt(aRowIndex, aRemoveFromDb) {},
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteResult))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
@@ -144,17 +144,17 @@ AutoCompleteSearch.prototype = {
 
   // AutoCompleteResult
   _result:null,
 
 
   /**
    * Return the same result set for every search
    */
-  startSearch: function(aSearchString,
+  startSearch(aSearchString,
                         aSearchParam,
                         aPreviousResult,
                         aListener)
   {
     var result = this._result;
     if (result._values.length > 0) {
       result.searchResult = Ci.nsIAutoCompleteResult.RESULT_SUCCESS_ONGOING;
     } else {
@@ -165,30 +165,30 @@ AutoCompleteSearch.prototype = {
     if (result._values.length > 0) {
       result.searchResult = Ci.nsIAutoCompleteResult.RESULT_SUCCESS;
     } else {
       result.searchResult = Ci.nsIAutoCompleteResult.RESULT_NOMATCH;
     }
     aListener.onSearchResult(this, result);
   },
 
-  stopSearch: function() {},
+  stopSearch() {},
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIFactory) ||
         iid.equals(Ci.nsIAutoCompleteSearch))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   },
 
   // nsIFactory implementation
-  createInstance: function(outer, iid) {
+  createInstance(outer, iid) {
     return this.QueryInterface(iid);
   }
 }
 
 
 
 /**
  * Helper to register an AutoCompleteSearch with the given name.
--- a/toolkit/components/autocomplete/tests/unit/test_previousResult.js
+++ b/toolkit/components/autocomplete/tests/unit/test_previousResult.js
@@ -31,41 +31,41 @@ AutoCompleteInput.prototype = {
   textValue: "",
   disableAutoComplete: false,
   completeDefaultIndex: false,
 
   get searchCount() {
     return this.searches.length;
   },
 
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   popupOpen: false,
 
   popup: {
-    setSelectedIndex: function(aIndex) {},
-    invalidate: function() {},
+    setSelectedIndex(aIndex) {},
+    invalidate() {},
 
     // nsISupports implementation
-    QueryInterface: function(iid) {
+    QueryInterface(iid) {
       if (iid.equals(Ci.nsISupports) ||
           iid.equals(Ci.nsIAutoCompletePopup))
         return this;
 
       throw Components.results.NS_ERROR_NO_INTERFACE;
     }
   },
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
@@ -96,44 +96,44 @@ AutoCompleteResult.prototype = {
   searchResult: null,
 
   defaultIndex: 0,
 
   get matchCount() {
     return this._values.length;
   },
 
-  getValueAt: function(aIndex) {
+  getValueAt(aIndex) {
     return this._values[aIndex];
   },
 
-  getLabelAt: function(aIndex) {
+  getLabelAt(aIndex) {
     return this.getValueAt(aIndex);
   },
 
-  getCommentAt: function(aIndex) {
+  getCommentAt(aIndex) {
     return this._comments[aIndex];
   },
 
-  getStyleAt: function(aIndex) {
+  getStyleAt(aIndex) {
     return this._styles[aIndex];
   },
 
-  getImageAt: function(aIndex) {
+  getImageAt(aIndex) {
     return "";
   },
 
-  getFinalCompleteValueAt: function(aIndex) {
+  getFinalCompleteValueAt(aIndex) {
     return this.getValueAt(aIndex);
   },
 
-  removeValueAt: function(aRowIndex, aRemoveFromDb) {},
+  removeValueAt(aRowIndex, aRemoveFromDb) {},
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteResult))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
@@ -156,39 +156,39 @@ AutoCompleteSearch.prototype = {
   _result: null,
 
   _previousResult: null,
 
 
   /**
    * Return the same result set for every search
    */
-  startSearch: function(aSearchString,
+  startSearch(aSearchString,
                         aSearchParam,
                         aPreviousResult,
                         aListener)
   {
     this._previousResult = aPreviousResult;
     aListener.onSearchResult(this, this._result);
   },
 
-  stopSearch: function() {},
+  stopSearch() {},
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIFactory) ||
         iid.equals(Ci.nsIAutoCompleteSearch))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   },
 
   // nsIFactory implementation
-  createInstance: function(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.
--- a/toolkit/components/autocomplete/tests/unit/test_stopSearch.js
+++ b/toolkit/components/autocomplete/tests/unit/test_stopSearch.js
@@ -27,24 +27,24 @@ AutoCompleteInput.prototype = {
   timeout: 10,
   searchParam: "",
   textValue: "hello",
   disableAutoComplete: false,
   completeDefaultIndex: false,
   set popupOpen(val) { return val; }, // ignore
   get popupOpen() { return false; },
   get searchCount() { return this.searches.length; },
-  getSearchAt: function(aIndex) { return this.searches[aIndex]; },
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
-  onTextReverted: function() {},
-  onTextEntered: function() {},
+  getSearchAt(aIndex) { return this.searches[aIndex]; },
+  onSearchBegin() {},
+  onSearchComplete() {},
+  onTextReverted() {},
+  onTextEntered() {},
   popup: {
-    selectBy: function() {},
-    invalidate: function() {},
+    selectBy() {},
+    invalidate() {},
     set selectedIndex(val) { return val; }, // ignore
     get selectedIndex() { return -1 },
     QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompletePopup])
   },
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput])
 }
 
 
@@ -53,31 +53,31 @@ AutoCompleteInput.prototype = {
  */
 function AutoCompleteSearch(aName)
 {
   this.name = aName;
 }
 AutoCompleteSearch.prototype = {
   constructor: AutoCompleteSearch,
   stopSearchInvoked: true,
-  startSearch: function(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: function()
+  stopSearch()
   {
     this.stopSearchInvoked = true;
   },
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsIFactory
   , Ci.nsIAutoCompleteSearch
   ]),
-  createInstance: function(outer, iid)
+  createInstance(outer, iid)
   {
     return this.QueryInterface(iid);
   }
 }
 
 
 /**
  * Helper to register an AutoCompleteSearch with the given name.
--- a/toolkit/components/captivedetect/captivedetect.js
+++ b/toolkit/components/captivedetect/captivedetect.js
@@ -61,19 +61,19 @@ function URLFetcher(url, timeout) {
     }
   };
   xhr.send();
   this._xhr = xhr;
 }
 
 URLFetcher.prototype = {
   _isAborted: false,
-  ontimeout: function() {},
-  onerror: function() {},
-  abort: function() {
+  ontimeout() {},
+  onerror() {},
+  abort() {
     if (!this._isAborted) {
       this._isAborted = true;
       this._xhr.abort();
     }
   },
 }
 
 function LoginObserver(captivePortalDetector) {
@@ -334,17 +334,17 @@ CaptivePortalDetector.prototype = {
 
     this._runningRequest['urlFetcher'] = urlFetcher;
   },
 
   _startLogin: function _startLogin() {
     let id = this._allocateRequestId();
     let details = {
       type: kOpenCaptivePortalLoginEvent,
-      id: id,
+      id,
       url: this._canonicalSiteURL,
     };
     this._loginObserver.attach();
     this._runningRequest['eventId'] = id;
     this._sendEvent(kOpenCaptivePortalLoginEvent, details);
     gSysMsgr.broadcastMessage(kCaptivePortalSystemMessage, {});
   },
 
--- a/toolkit/components/contentprefs/ContentPrefService2.jsm
+++ b/toolkit/components/contentprefs/ContentPrefService2.jsm
@@ -413,17 +413,17 @@ ContentPrefService2.prototype = {
       },
       onError: function onError(nsresult) {
         cbHandleError(callback, nsresult);
       }
     });
   },
 
   // Deletes settings and groups that are no longer used.
-  _settingsAndGroupsCleanupStmts: function() {
+  _settingsAndGroupsCleanupStmts() {
     // The NOTNULL term in the subquery of the second statment is needed because of
     // SQLite's weird IN behavior vis-a-vis NULLs.  See http://sqlite.org/lang_expr.html.
     return [
       this._stmt(`
         DELETE FROM settings
         WHERE id NOT IN (SELECT DISTINCT settingID FROM prefs)
       `),
       this._stmt(`
--- a/toolkit/components/contentprefs/ContentPrefServiceChild.jsm
+++ b/toolkit/components/contentprefs/ContentPrefServiceChild.jsm
@@ -26,56 +26,56 @@ function NYI() {
   throw new Error("Do not add any new users of these functions");
 }
 
 function CallbackCaller(callback) {
   this._callback = callback;
 }
 
 CallbackCaller.prototype = {
-  handleResult: function(contentPref) {
+  handleResult(contentPref) {
     cbHandleResult(this._callback,
                    new ContentPref(contentPref.domain,
                                    contentPref.name,
                                    contentPref.value));
   },
 
-  handleError: function(result) {
+  handleError(result) {
     cbHandleError(this._callback, result);
   },
 
-  handleCompletion: function(reason) {
+  handleCompletion(reason) {
     cbHandleCompletion(this._callback, reason);
   },
 };
 
 var ContentPrefServiceChild = {
   QueryInterface: XPCOMUtils.generateQI([ Ci.nsIContentPrefService2 ]),
 
   // Map from pref name -> set of observers
   _observers: new Map(),
 
   _mm: Cc["@mozilla.org/childprocessmessagemanager;1"]
          .getService(Ci.nsIMessageSender),
 
-  _getRandomId: function() {
+  _getRandomId() {
     return Cc["@mozilla.org/uuid-generator;1"]
              .getService(Ci.nsIUUIDGenerator).generateUUID().toString();
   },
 
   // Map from random ID string -> CallbackCaller, per request
   _requests: new Map(),
 
-  init: function() {
+  init() {
     this._mm.addMessageListener("ContentPrefs:HandleResult", this);
     this._mm.addMessageListener("ContentPrefs:HandleError", this);
     this._mm.addMessageListener("ContentPrefs:HandleCompletion", this);
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     let data = msg.data;
     let callback;
     switch (msg.name) {
       case "ContentPrefs:HandleResult":
         callback = this._requests.get(data.requestId);
         callback.handleResult(data.contentPref);
         break;
 
@@ -99,132 +99,132 @@ var ContentPrefServiceChild = {
           safeCallback(observer, data.callback, data.args);
         }
 
         break;
       }
     }
   },
 
-  _callFunction: function(call, args, callback) {
+  _callFunction(call, args, callback) {
     let requestId = this._getRandomId();
-    let data = { call: call, args: args, requestId: requestId };
+    let data = { call, args, requestId };
 
     this._mm.sendAsyncMessage("ContentPrefs:FunctionCall", data);
 
     this._requests.set(requestId, new CallbackCaller(callback));
   },
 
-  getByName: function(name, context, callback) {
+  getByName(name, context, callback) {
     return this._callFunction("getByName",
                               [ name, contextArg(context) ],
                               callback);
   },
 
-  getByDomainAndName: function(domain, name, context, callback) {
+  getByDomainAndName(domain, name, context, callback) {
     return this._callFunction("getByDomainAndName",
                               [ domain, name, contextArg(context) ],
                               callback);
   },
 
-  getBySubdomainAndName: function(domain, name, context, callback) {
+  getBySubdomainAndName(domain, name, context, callback) {
     return this._callFunction("getBySubdomainAndName",
                               [ domain, name, contextArg(context) ],
                               callback);
   },
 
-  getGlobal: function(name, context, callback) {
+  getGlobal(name, context, callback) {
     return this._callFunction("getGlobal",
                               [ name, contextArg(context) ],
                               callback);
   },
 
   getCachedByDomainAndName: NYI,
   getCachedBySubdomainAndName: NYI,
   getCachedGlobal: NYI,
 
-  set: function(domain, name, value, context, callback) {
+  set(domain, name, value, context, callback) {
     this._callFunction("set",
                        [ domain, name, value, contextArg(context) ],
                        callback);
   },
 
-  setGlobal: function(name, value, context, callback) {
+  setGlobal(name, value, context, callback) {
     this._callFunction("setGlobal",
                        [ name, value, contextArg(context) ],
                        callback);
   },
 
-  removeByDomainAndName: function(domain, name, context, callback) {
+  removeByDomainAndName(domain, name, context, callback) {
     this._callFunction("removeByDomainAndName",
                        [ domain, name, contextArg(context) ],
                        callback);
   },
 
-  removeBySubdomainAndName: function(domain, name, context, callback) {
+  removeBySubdomainAndName(domain, name, context, callback) {
     this._callFunction("removeBySubdomainAndName",
                        [ domain, name, contextArg(context) ],
                        callback);
   },
 
-  removeGlobal: function(name, context, callback) {
+  removeGlobal(name, context, callback) {
     this._callFunction("removeGlobal", [ name, contextArg(context) ], callback);
   },
 
-  removeByDomain: function(domain, context, callback) {
+  removeByDomain(domain, context, callback) {
     this._callFunction("removeByDomain", [ domain, contextArg(context) ],
                        callback);
   },
 
-  removeBySubdomain: function(domain, context, callback) {
+  removeBySubdomain(domain, context, callback) {
     this._callFunction("removeBySubdomain", [ domain, contextArg(context) ],
                        callback);
   },
 
-  removeByName: function(name, context, callback) {
+  removeByName(name, context, callback) {
     this._callFunction("removeByName", [ name, value, contextArg(context) ],
                        callback);
   },
 
-  removeAllDomains: function(context, callback) {
+  removeAllDomains(context, callback) {
     this._callFunction("removeAllDomains", [ contextArg(context) ], callback);
   },
 
-  removeAllGlobals: function(context, callback) {
+  removeAllGlobals(context, callback) {
     this._callFunction("removeAllGlobals", [ contextArg(context) ],
                        callback);
   },
 
-  addObserverForName: function(name, observer) {
+  addObserverForName(name, observer) {
     let set = this._observers.get(name);
     if (!set) {
       set = new Set();
       if (this._observers.size === 0) {
         // This is the first observer of any kind. Start listening for changes.
         this._mm.addMessageListener("ContentPrefs:NotifyObservers", this);
       }
 
       // This is the first observer for this name. Start listening for changes
       // to it.
-      this._mm.sendAsyncMessage("ContentPrefs:AddObserverForName", { name: name });
+      this._mm.sendAsyncMessage("ContentPrefs:AddObserverForName", { name });
       this._observers.set(name, set);
     }
 
     set.add(observer);
   },
 
-  removeObserverForName: function(name, observer) {
+  removeObserverForName(name, observer) {
     let set = this._observers.get(name);
     if (!set)
       return;
 
     set.delete(observer);
     if (set.size === 0) {
       // This was the last observer for this name. Stop listening for changes.
-      this._mm.sendAsyncMessage("ContentPrefs:RemoveObserverForName", { name: name });
+      this._mm.sendAsyncMessage("ContentPrefs:RemoveObserverForName", { name });
 
       this._observers.delete(name);
       if (this._observers.size === 0) {
         // This was the last observer for this process. Stop listing for all
         // changes.
         this._mm.removeMessageListener("ContentPrefs:NotifyObservers", this);
       }
     }
--- a/toolkit/components/contentprefs/ContentPrefServiceParent.jsm
+++ b/toolkit/components/contentprefs/ContentPrefServiceParent.jsm
@@ -9,17 +9,17 @@ this.EXPORTED_SYMBOLS = [ "ContentPrefSe
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 var ContentPrefServiceParent = {
   _cps2: null,
 
-  init: function() {
+  init() {
     let globalMM = Cc["@mozilla.org/parentprocessmessagemanager;1"]
                      .getService(Ci.nsIMessageListenerManager);
 
     this._cps2 = Cc["@mozilla.org/content-pref/service;1"]
                   .getService(Ci.nsIContentPrefService2);
 
     globalMM.addMessageListener("ContentPrefs:FunctionCall", this);
 
@@ -27,17 +27,17 @@ var ContentPrefServiceParent = {
     globalMM.addMessageListener("ContentPrefs:AddObserverForName", observerChangeHandler);
     globalMM.addMessageListener("ContentPrefs:RemoveObserverForName", observerChangeHandler);
     globalMM.addMessageListener("child-process-shutdown", observerChangeHandler);
   },
 
   // Map from message manager -> content pref observer.
   _observers: new Map(),
 
-  handleObserverChange: function(msg) {
+  handleObserverChange(msg) {
     let observer = this._observers.get(msg.target);
     if (msg.name === "child-process-shutdown") {
       // If we didn't have any observers for this child process, don't do
       // anything.
       if (!observer)
         return;
 
       for (let i of observer._names) {
@@ -49,25 +49,25 @@ var ContentPrefServiceParent = {
     }
 
     let prefName = msg.data.name;
     if (msg.name === "ContentPrefs:AddObserverForName") {
       // The child process is responsible for not adding multiple parent
       // observers for the same name.
       if (!observer) {
         observer = {
-          onContentPrefSet: function(group, name, value, isPrivate) {
+          onContentPrefSet(group, name, value, isPrivate) {
             msg.target.sendAsyncMessage("ContentPrefs:NotifyObservers",
-                                        { name: name, callback: "onContentPrefSet",
+                                        { name, callback: "onContentPrefSet",
                                           args: [ group, name, value, isPrivate ] });
           },
 
-          onContentPrefRemoved: function(group, name, isPrivate) {
+          onContentPrefRemoved(group, name, isPrivate) {
             msg.target.sendAsyncMessage("ContentPrefs:NotifyObservers",
-                                        { name: name, callback: "onContentPrefRemoved",
+                                        { name, callback: "onContentPrefRemoved",
                                           args: [ group, name, isPrivate ] });
           },
 
           // The names we're using this observer object for, used to keep track
           // of the number of names we care about as well as for removing this
           // observer if its associated process goes away.
           _names: new Set()
         };
@@ -87,43 +87,43 @@ var ContentPrefServiceParent = {
       observer._names.delete(prefName);
       if (observer._names.size === 0) {
         // This was the last use for this observer.
         this._observers.delete(msg.target);
       }
     }
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     let data = msg.data;
 
     let args = data.args;
     let requestId = data.requestId;
 
     let listener = {
-      handleResult: function(pref) {
+      handleResult(pref) {
         msg.target.sendAsyncMessage("ContentPrefs:HandleResult",
-                                    { requestId: requestId,
+                                    { requestId,
                                       contentPref: {
                                         domain: pref.domain,
                                         name: pref.name,
                                         value: pref.value
                                       }
                                     });
       },
 
-      handleError: function(error) {
+      handleError(error) {
         msg.target.sendAsyncMessage("ContentPrefs:HandleError",
-                                    { requestId: requestId,
-                                      error: error });
+                                    { requestId,
+                                      error });
       },
-      handleCompletion: function(reason) {
+      handleCompletion(reason) {
         msg.target.sendAsyncMessage("ContentPrefs:HandleCompletion",
-                                    { requestId: requestId,
-                                      reason: reason });
+                                    { requestId,
+                                      reason });
       }
     };
 
     // Push our special listener.
     args.push(listener);
 
     // And call the function.
     this._cps2[data.call](...args);
--- a/toolkit/components/contentprefs/nsContentPrefService.js
+++ b/toolkit/components/contentprefs/nsContentPrefService.js
@@ -575,17 +575,17 @@ ContentPrefService.prototype = {
         JOIN settings ON prefs.settingID = settings.id
         WHERE groups.name = :group
         AND settings.name = :setting
       `);
 
     return this.__stmtSelectPref;
   },
 
-  _scheduleCallback: function(func) {
+  _scheduleCallback(func) {
     let tm = Cc["@mozilla.org/thread-manager;1"].getService(Ci.nsIThreadManager);
     tm.mainThread.dispatch(func, Ci.nsIThread.DISPATCH_NORMAL);
   },
 
   _selectPref: function ContentPrefService__selectPref(aGroup, aSetting, aCallback) {
     let value = undefined;
     if (this._cache.has(aGroup, aSetting)) {
       value = this._cache.get(aGroup, aSetting);
@@ -597,17 +597,17 @@ ContentPrefService.prototype = {
     }
 
     try {
       this._stmtSelectPref.params.group = aGroup;
       this._stmtSelectPref.params.setting = aSetting;
 
       if (aCallback) {
         let cache = this._cache;
-        new AsyncStatement(this._stmtSelectPref).execute({onResult: function(aResult) {
+        new AsyncStatement(this._stmtSelectPref).execute({onResult(aResult) {
           cache.set(aGroup, aSetting, aResult);
           aCallback.onResult(aResult);
         }});
       }
       else {
         if (this._stmtSelectPref.executeStep()) {
           value = this._stmtSelectPref.row["value"];
         }
@@ -646,17 +646,17 @@ ContentPrefService.prototype = {
       return value;
     }
 
     try {
       this._stmtSelectGlobalPref.params.name = aName;
 
       if (aCallback) {
         let cache = this._cache;
-        new AsyncStatement(this._stmtSelectGlobalPref).execute({onResult: function(aResult) {
+        new AsyncStatement(this._stmtSelectGlobalPref).execute({onResult(aResult) {
           cache.set(null, aName, aResult);
           aCallback.onResult(aResult);
         }});
       }
       else {
         if (this._stmtSelectGlobalPref.executeStep()) {
           value = this._stmtSelectGlobalPref.row["value"];
         }
@@ -1304,29 +1304,29 @@ function AsyncStatement(aStatement) {
 }
 
 AsyncStatement.prototype = {
   execute: function AsyncStmt_execute(aCallback) {
     let stmt = this.stmt;
     stmt.executeAsync({
       _callback: aCallback,
       _hadResult: false,
-      handleResult: function(aResult) {
+      handleResult(aResult) {
         this._hadResult = true;
         if (this._callback) {
           let row = aResult.getNextRow();
           this._callback.onResult(row.getResultByName("value"));
         }
       },
-      handleCompletion: function(aReason) {
+      handleCompletion(aReason) {
         if (!this._hadResult && this._callback &&
             aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED)
           this._callback.onResult(undefined);
       },
-      handleError: function(aError) {}
+      handleError(aError) {}
     });
   }
 };
 
 // XPCOM Plumbing
 
 var components = [ContentPrefService, HostnameGrouper];
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
--- a/toolkit/components/contentprefs/tests/unit/test_bug679784.js
+++ b/toolkit/components/contentprefs/tests/unit/test_bug679784.js
@@ -1,20 +1,20 @@
 /* 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 prefObserver = {
     setCalledNum: 0,
-    onContentPrefSet: function(aGroup, aName, aValue) {
+    onContentPrefSet(aGroup, aName, aValue) {
         this.setCalledNum++;
     },
     removedCalledNum: 0,
-    onContentPrefRemoved: function(aGroup, aName) {
+    onContentPrefRemoved(aGroup, aName) {
         this.removedCalledNum++;
     }
 };
 
 function run_test() {
   let loadContext = { get usePrivateBrowsing() { return gInPrivateBrowsing; } };
 
   var cps = new ContentPrefInstance(loadContext);
--- a/toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js
+++ b/toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js
@@ -13,17 +13,17 @@ function run_test() {
   cps.getPref(uri, "asynctest", function(aValue) {
     do_check_eq(aValue, "pie");
     testCallbackObj();
   });
 }
 
 function testCallbackObj() {
   cps.getPref(uri, "asynctest", {
-    onResult: function(aValue) {
+    onResult(aValue) {
       do_check_eq(aValue, "pie");
       cps.removePref(uri, "asynctest");
       testNoResult();
     }
   });
 }
 
 function testNoResult() {
--- a/toolkit/components/contentprefs/tests/unit_cps2/head.js
+++ b/toolkit/components/contentprefs/tests/unit_cps2/head.js
@@ -20,28 +20,28 @@ function runAsyncTests(tests, dontResetB
 
   cps = Cc["@mozilla.org/content-pref/service;1"].
         getService(Ci.nsIContentPrefService2);
 
   let s = {};
   Cu.import("resource://test/AsyncRunner.jsm", s);
   asyncRunner = new s.AsyncRunner({
     done: do_test_finished,
-    error: function(err) {
+    error(err) {
       // xpcshell test functions like equal throw NS_ERROR_ABORT on
       // failure.  Ignore those and catch only uncaught exceptions.
       if (err !== Cr.NS_ERROR_ABORT) {
         if (err.stack) {
           err = err + "\n\nTraceback (most recent call first):\n" + err.stack +
                       "\nUseless do_throw stack:";
         }
         do_throw(err);
       }
     },
-    consoleError: function(scriptErr) {
+    consoleError(scriptErr) {
       // Previously, this code checked for console errors related to the test,
       // and treated them as failures. This was problematic, because our current
       // very-broken exception reporting machinery in XPCWrappedJSClass reports
       // errors to the console even if there's actually JS on the stack above
       // that will catch them. And a lot of the tests here intentionally trigger
       // 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
@@ -133,20 +133,20 @@ function setWithDate(group, name, val, t
         settingID = (SELECT id FROM settings WHERE name = :name)
         AND groupID = (SELECT id FROM groups WHERE name = :group)
     `);
     stmt.params.timestamp = timestamp / 1000;
     stmt.params.name = name;
     stmt.params.group = group;
 
     stmt.executeAsync({
-      handleCompletion: function(reason) {
+      handleCompletion(reason) {
         next();
       },
-      handleError: function(err) {
+      handleError(err) {
         do_throw(err);
       }
     });
     stmt.finalize();
   }
 
   cps.set(group, name, val, context, makeCallback(null, updateDate));
 }
@@ -159,24 +159,24 @@ function getDate(group, name, context) {
       settingID = (SELECT id FROM settings WHERE name = :name)
       AND groupID = (SELECT id FROM groups WHERE name = :group)
   `);
   stmt.params.name = name;
   stmt.params.group = group;
 
   let res;
   stmt.executeAsync({
-    handleResult: function(results) {
+    handleResult(results) {
       let row = results.getNextRow();
       res = row.getResultByName("timestamp");
     },
-    handleCompletion: function(reason) {
+    handleCompletion(reason) {
       next(res * 1000);
     },
-    handleError: function(err) {
+    handleError(err) {
       do_throw(err);
     }
   });
   stmt.finalize();
 }
 
 function set(group, name, val, context) {
   cps.set(group, name, val, context, makeCallback());
@@ -331,36 +331,36 @@ function dbOK(expectedRows) {
 
     ORDER BY value ASC, grp ASC, name ASC
   `);
 
   let actualRows = [];
   let cols = ["grp", "name", "value"];
 
   db.executeAsync([stmt], 1, {
-    handleCompletion: function(reason) {
+    handleCompletion(reason) {
       arraysOfArraysOK(actualRows, expectedRows);
       next();
     },
-    handleResult: function(results) {
+    handleResult(results) {
       let row = null;
       while (row = results.getNextRow()) {
         actualRows.push(cols.map(c => row.getResultByName(c)));
       }
     },
-    handleError: function(err) {
+    handleError(err) {
       do_throw(err);
     }
   });
   stmt.finalize();
 }
 
 function on(event, names, dontRemove) {
   let args = {
-    reset: function() {
+    reset() {
       for (let prop in this) {
         if (Array.isArray(this[prop]))
           this[prop].splice(0, this[prop].length);
       }
     },
   };
 
   let observers = {};
--- a/toolkit/components/contentprefs/tests/unit_cps2/test_setGet.js
+++ b/toolkit/components/contentprefs/tests/unit_cps2/test_setGet.js
@@ -138,32 +138,32 @@ var tests = [
     // (1) Set a pref and wait for it to finish.
     yield set("a.com", "foo", 1);
 
     // (2) It should be cached.
     getCachedOK(["a.com", "foo"], true, 1);
 
     // (3) Set the pref to a new value but don't wait for it to finish.
     cps.set("a.com", "foo", 2, null, {
-      handleCompletion: function() {
+      handleCompletion() {
         // (6) The pref should be cached after setting it.
         getCachedOK(["a.com", "foo"], true, 2);
       },
     });
 
     // (4) Group "a.com" and name "foo" should no longer be cached.
     getCachedOK(["a.com", "foo"], false);
 
     // (5) Call getByDomainAndName.
     var fetchedPref;
     cps.getByDomainAndName("a.com", "foo", null, {
-      handleResult: function(pref) {
+      handleResult(pref) {
         fetchedPref = pref;
       },
-      handleCompletion: function() {
+      handleCompletion() {
         // (7) Finally, this callback should be called after set's above.
         do_check_true(!!fetchedPref);
         do_check_eq(fetchedPref.value, 2);
         next();
       },
     });
 
     yield;
--- a/toolkit/components/crashes/CrashManager.jsm
+++ b/toolkit/components/crashes/CrashManager.jsm
@@ -257,17 +257,17 @@ this.CrashManager.prototype = Object.fre
    *   date (Date)
    *      When this dump was created
    *
    * The returned arry is sorted by the modified time of the file backing
    * the entry, oldest to newest.
    *
    * @return Promise<Array>
    */
-  pendingDumps: function() {
+  pendingDumps() {
     return this._getDirectoryEntries(this._pendingDumpsDir, this.DUMP_REGEX);
   },
 
   /**
    * Obtain a list of all dump files corresponding to submitted crashes.
    *
    * The returned value is a promise that resolves to an Array of
    * objects. Each object has the following properties:
@@ -281,17 +281,17 @@ this.CrashManager.prototype = Object.fre
    *   date (Date)
    *     The (estimated) date this crash was submitted.
    *
    * The returned array is sorted by the modified time of the file backing
    * the entry, oldest to newest.
    *
    * @return Promise<Array>
    */
-  submittedDumps: function() {
+  submittedDumps() {
     return this._getDirectoryEntries(this._submittedDumpsDir,
                                      this.SUBMITTED_REGEX);
   },
 
   /**
    * Aggregates "loose" events files into the unified "database."
    *
    * This function should be called periodically to collect metadata from
@@ -301,17 +301,17 @@ this.CrashManager.prototype = Object.fre
    * source files are deleted.
    *
    * Only one aggregation operation is allowed to occur at a time. If this
    * is called when an existing aggregation is in progress, the promise for
    * the original call will be returned.
    *
    * @return promise<int> The number of event files that were examined.
    */
-  aggregateEventsFiles: function() {
+  aggregateEventsFiles() {
     if (this._aggregatePromise) {
       return this._aggregatePromise;
     }
 
     return this._aggregatePromise = Task.spawn(function* () {
       if (this._aggregatePromise) {
         return this._aggregatePromise;
       }
@@ -384,43 +384,43 @@ this.CrashManager.prototype = Object.fre
 
   /**
    * Prune old crash data.
    *
    * @param date
    *        (Date) The cutoff point for pruning. Crashes without data newer
    *        than this will be pruned.
    */
-  pruneOldCrashes: function(date) {
+  pruneOldCrashes(date) {
     return Task.spawn(function* () {
       let store = yield this._getStore();
       store.pruneOldCrashes(date);
       yield store.save();
     }.bind(this));
   },
 
   /**
    * Run tasks that should be periodically performed.
    */
-  runMaintenanceTasks: function() {
+  runMaintenanceTasks() {
     return Task.spawn(function* () {
       yield this.aggregateEventsFiles();
 
       let offset = this.PURGE_OLDER_THAN_DAYS * MILLISECONDS_IN_DAY;
       yield this.pruneOldCrashes(new Date(Date.now() - offset));
     }.bind(this));
   },
 
   /**
    * Schedule maintenance tasks for some point in the future.
    *
    * @param delay
    *        (integer) Delay in milliseconds when maintenance should occur.
    */
-  scheduleMaintenance: function(delay) {
+  scheduleMaintenance(delay) {
     let deferred = PromiseUtils.defer();
 
     setTimeout(() => {
       this.runMaintenanceTasks().then(deferred.resolve, deferred.reject);
     }, delay);
 
     return deferred.promise;
   },
@@ -434,17 +434,17 @@ this.CrashManager.prototype = Object.fre
    * @param processType (string) One of the PROCESS_TYPE constants.
    * @param crashType (string) One of the CRASH_TYPE constants.
    * @param id (string) Crash ID. Likely a UUID.
    * @param date (Date) When the crash occurred.
    * @param metadata (dictionary) Crash metadata, may be empty.
    *
    * @return promise<null> Resolved when the store has been saved.
    */
-  addCrash: function(processType, crashType, id, date, metadata) {
+  addCrash(processType, crashType, id, date, metadata) {
     let promise = Task.spawn(function* () {
       let store = yield this._getStore();
       if (store.addCrash(processType, crashType, id, date, metadata)) {
         yield store.save();
       }
 
       let deferred = this._crashPromises.get(id);
 
@@ -556,34 +556,34 @@ this.CrashManager.prototype = Object.fre
     }
   }),
 
   /**
    * Obtain the paths of all unprocessed events files.
    *
    * The promise-resolved array is sorted by file mtime, oldest to newest.
    */
-  _getUnprocessedEventsFiles: function() {
+  _getUnprocessedEventsFiles() {
     return Task.spawn(function* () {
       let entries = [];
 
       for (let dir of this._eventsDirs) {
         for (let e of yield this._getDirectoryEntries(dir, this.ALL_REGEX)) {
           entries.push(e);
         }
       }
 
       entries.sort((a, b) => { return a.date - b.date; });
 
       return entries;
     }.bind(this));
   },
 
   // See docs/crash-events.rst for the file format specification.
-  _processEventFile: function(entry) {
+  _processEventFile(entry) {
     return Task.spawn(function* () {
       let data = yield OS.File.read(entry.path);
       let store = yield this._getStore();
 
       let decoder = new TextDecoder();
       data = decoder.decode(data);
 
       let type, time;
@@ -612,62 +612,62 @@ this.CrashManager.prototype = Object.fre
       }
       let date = new Date(time * 1000);
       let payload = data.substring(start);
 
       return this._handleEventFilePayload(store, entry, type, date, payload);
     }.bind(this));
   },
 
-  _filterAnnotations: function(annotations) {
+  _filterAnnotations(annotations) {
     let filteredAnnotations = {};
 
     for (let line in annotations) {
       if (this.ANNOTATION_WHITELIST.includes(line)) {
         filteredAnnotations[line] = annotations[line];
       }
     }
 
     return filteredAnnotations;
   },
 
-  _sendCrashPing: function(crashId, type, date, metadata = {}) {
+  _sendCrashPing(crashId, type, date, metadata = {}) {
     // If we have a saved environment, use it. Otherwise report
     // the current environment.
     let reportMeta = Cu.cloneInto(metadata, myScope);
     let crashEnvironment = parseAndRemoveField(reportMeta,
                                                "TelemetryEnvironment");
     let sessionId = parseAndRemoveField(reportMeta, "TelemetrySessionId",
                                         /* parseAsJson */ false);
     let stackTraces = parseAndRemoveField(reportMeta, "StackTraces");
 
     // Filter the remaining annotations to remove privacy-sensitive ones
     reportMeta = this._filterAnnotations(reportMeta);
 
     this._pingPromise = TelemetryController.submitExternalPing("crash",
       {
         version: 1,
         crashDate: date.toISOString().slice(0, 10), // YYYY-MM-DD
-        sessionId: sessionId,
-        crashId: crashId,
+        sessionId,
+        crashId,
         processType: type,
-        stackTraces: stackTraces,
+        stackTraces,
         metadata: reportMeta,
         hasCrashEnvironment: (crashEnvironment !== null),
       },
       {
         retentionDays: 180,
         addClientId: true,
         addEnvironment: true,
         overrideEnvironment: crashEnvironment,
       }
     );
   },
 
-  _handleEventFilePayload: function(store, entry, type, date, payload) {
+  _handleEventFilePayload(store, entry, type, date, payload) {
       // The payload types and formats are documented in docs/crash-events.rst.
       // Do not change the format of an existing type. Instead, invent a new
       // type.
       // DO NOT ADD NEW TYPES WITHOUT DOCUMENTING!
       let lines = payload.split("\n");
 
       switch (type) {
         case "crash.main.1":
@@ -715,17 +715,17 @@ this.CrashManager.prototype = Object.fre
 
   /**
    * The resolved promise is an array of objects with the properties:
    *
    *   path -- String filename
    *   id -- regexp.match()[1] (likely the crash ID)
    *   date -- Date mtime of the file
    */
-  _getDirectoryEntries: function(path, re) {
+  _getDirectoryEntries(path, re) {
     return Task.spawn(function* () {
       try {
         yield OS.File.stat(path);
       } catch (ex) {
         if (!(ex instanceof OS.File.Error) || !ex.becauseNoSuchFile) {
           throw ex;
         }
         return [];
@@ -758,17 +758,17 @@ this.CrashManager.prototype = Object.fre
       }
 
       entries.sort((a, b) => { return a.date - b.date; });
 
       return entries;
     }.bind(this));
   },
 
-  _getStore: function() {
+  _getStore() {
     if (this._getStoreTask) {
       return this._getStoreTask;
     }
 
     return this._getStoreTask = Task.spawn(function* () {
       try {
         if (!this._store) {
           yield OS.File.makeDir(this._storeDir, {
@@ -818,25 +818,25 @@ this.CrashManager.prototype = Object.fre
     }.bind(this));
   },
 
   /**
    * Obtain information about all known crashes.
    *
    * Returns an array of CrashRecord instances. Instances are read-only.
    */
-  getCrashes: function() {
+  getCrashes() {
     return Task.spawn(function* () {
       let store = yield this._getStore();
 
       return store.crashes;
     }.bind(this));
   },
 
-  getCrashCountsByDay: function() {
+  getCrashCountsByDay() {
     return Task.spawn(function* () {
       let store = yield this._getStore();
 
       return store._countsByDay;
     }.bind(this));
   },
 });
 
@@ -903,17 +903,17 @@ CrashStore.prototype = Object.freeze({
     this._countsByDay = new Map();
   },
 
   /**
    * Load data from disk.
    *
    * @return Promise
    */
-  load: function() {
+  load() {
     return Task.spawn(function* () {
       // Loading replaces data.
       this.reset();
 
       try {
         let decoder = new TextDecoder();
         let data = yield OS.File.read(this._storePath, {compression: "lz4"});
         data = JSON.parse(decoder.decode(data));
@@ -1003,17 +1003,17 @@ CrashStore.prototype = Object.freeze({
     }.bind(this));
   },
 
   /**
    * Save data to disk.
    *
    * @return Promise<null>
    */
-  save: function() {
+  save() {
     return Task.spawn(function* () {
       if (!this._data) {
         return;
       }
 
       let normalized = {
         // The version should be incremented whenever the format
         // changes.
@@ -1073,17 +1073,17 @@ CrashStore.prototype = Object.freeze({
    * This function along with _denormalize() serve to hack around the
    * default handling of Date JSON serialization because Date serialization
    * is undefined by JSON.
    *
    * Fields ending with "Date" are assumed to contain Date instances.
    * We convert these to milliseconds since epoch on output and back to
    * Date on input.
    */
-  _normalize: function(o) {
+  _normalize(o) {
     let normalized = {};
 
     for (let k in o) {
       let v = o[k];
       if (v && k.endsWith("Date")) {
         normalized[k] = v.getTime();
       } else {
         normalized[k] = v;
@@ -1091,17 +1091,17 @@ CrashStore.prototype = Object.freeze({
     }
 
     return normalized;
   },
 
   /**
    * Convert a serialized object back to its native form.
    */
-  _denormalize: function(o) {
+  _denormalize(o) {
     let n = {};
 
     for (let k in o) {
       let v = o[k];
       if (v && k.endsWith("Date")) {
         n[k] = new Date(parseInt(v, 10));
       } else {
         n[k] = v;
@@ -1117,17 +1117,17 @@ CrashStore.prototype = Object.freeze({
    * Crashes without recent activity are pruned from the store so the
    * size of the store is not unbounded. If there is activity on a crash,
    * that activity will keep the crash and all its data around for longer.
    *
    * @param date
    *        (Date) The cutoff at which data will be pruned. If an entry
    *        doesn't have data newer than this, it will be pruned.
    */
-  pruneOldCrashes: function(date) {
+  pruneOldCrashes(date) {
     for (let crash of this.crashes) {
       let newest = crash.newestDate;
       if (!newest || newest.getTime() < date.getTime()) {
         this._data.crashes.delete(crash.id);
       }
     }
   },
 
@@ -1162,27 +1162,27 @@ CrashStore.prototype = Object.freeze({
   },
 
   /**
    * Obtain a particular crash from its ID.
    *
    * A CrashRecord will be returned if the crash exists. null will be returned
    * if the crash is unknown.
    */
-  getCrash: function(id) {
+  getCrash(id) {
     for (let crash of this.crashes) {
       if (crash.id == id) {
         return crash;
       }
     }
 
     return null;
   },
 
-  _ensureCountsForDay: function(day) {
+  _ensureCountsForDay(day) {
     if (!this._countsByDay.has(day)) {
       this._countsByDay.set(day, new Map());
     }
   },
 
   /**
    * Ensure the crash record is present in storage.
    *
@@ -1197,17 +1197,17 @@ CrashStore.prototype = Object.freeze({
    *        (string) The crash ID.
    * @param date
    *        (Date) When this crash occurred.
    * @param metadata
    *        (dictionary) Crash metadata, may be empty.
    *
    * @return null | object crash record
    */
-  _ensureCrashRecord: function(processType, crashType, id, date, metadata) {
+  _ensureCrashRecord(processType, crashType, id, date, metadata) {
     if (!id) {
       // Crashes are keyed on ID, so it's not really helpful to store crashes
       // without IDs.
       return null;
     }
 
     let type = processType + "-" + crashType;
 
@@ -1227,23 +1227,23 @@ CrashStore.prototype = Object.freeze({
       // being a main process crash.
       if (metadata && metadata.OOMAllocationSize) {
         let oomType = type + "-oom";
         let oomCount = (this._countsByDay.get(day).get(oomType) || 0) + 1;
         this._countsByDay.get(day).set(oomType, oomCount);
       }
 
       this._data.crashes.set(id, {
-        id: id,
+        id,
         remoteID: null,
-        type: type,
+        type,
         crashDate: date,
         submissions: new Map(),
         classifications: [],
-        metadata: metadata,
+        metadata,
       });
     }
 
     let crash = this._data.crashes.get(id);
     crash.type = type;
     crash.crashDate = date;
 
     return crash;
@@ -1255,49 +1255,49 @@ CrashStore.prototype = Object.freeze({
    * @param processType (string) One of the PROCESS_TYPE constants.
    * @param crashType (string) One of the CRASH_TYPE constants.
    * @param id (string) Crash ID. Likely a UUID.
    * @param date (Date) When the crash occurred.
    * @param metadata (dictionary) Crash metadata, may be empty.
    *
    * @return boolean True if the crash was recorded and false if not.
    */
-  addCrash: function(processType, crashType, id, date, metadata) {
+  addCrash(processType, crashType, id, date, metadata) {
     return !!this._ensureCrashRecord(processType, crashType, id, date, metadata);
   },
 
   /**
    * @return boolean True if the remote ID was recorded and false if not.
    */
-  setRemoteCrashID: function(crashID, remoteID) {
+  setRemoteCrashID(crashID, remoteID) {
     let crash = this._data.crashes.get(crashID);
     if (!crash || !remoteID) {
       return false;
     }
 
     crash.remoteID = remoteID;
     return true;
   },
 
-  getCrashesOfType: function(processType, crashType) {
+  getCrashesOfType(processType, crashType) {
     let crashes = [];
     for (let crash of this.crashes) {
       if (crash.isOfType(processType, crashType)) {
         crashes.push(crash);
       }
     }
 
     return crashes;
   },
 
   /**
    * Ensure the submission record is present in storage.
    * @returns [submission, crash]
    */
-  _ensureSubmissionRecord: function(crashID, submissionID) {
+  _ensureSubmissionRecord(crashID, submissionID) {
     let crash = this._data.crashes.get(crashID);
     if (!crash || !submissionID) {
       return null;
     }
 
     if (!crash.submissions.has(submissionID)) {
       crash.submissions.set(submissionID, {
         requestDate: null,
@@ -1307,33 +1307,33 @@ CrashStore.prototype = Object.freeze({
     }
 
     return [crash.submissions.get(submissionID), crash];
   },
 
   /**
    * @return boolean True if the attempt was recorded.
    */
-  addSubmissionAttempt: function(crashID, submissionID, date) {
+  addSubmissionAttempt(crashID, submissionID, date) {
     let [submission, crash] =
       this._ensureSubmissionRecord(crashID, submissionID);
     if (!submission) {
       return false;
     }
 
     submission.requestDate = date;
     Services.telemetry.getKeyedHistogramById("PROCESS_CRASH_SUBMIT_ATTEMPT")
       .add(crash.type, 1);
     return true;
   },
 
   /**
    * @return boolean True if the response was recorded.
    */
-  addSubmissionResult: function(crashID, submissionID, date, result) {
+  addSubmissionResult(crashID, submissionID, date, result) {
     let crash = this._data.crashes.get(crashID);
     if (!crash || !submissionID) {
       return false;
     }
     let submission = crash.submissions.get(submissionID);
     if (!submission) {
       return false;
     }
@@ -1343,17 +1343,17 @@ CrashStore.prototype = Object.freeze({
     Services.telemetry.getKeyedHistogramById("PROCESS_CRASH_SUBMIT_SUCCESS")
       .add(crash.type, result == "ok");
     return true;
   },
 
   /**
    * @return boolean True if the classifications were set.
    */
-  setCrashClassifications: function(crashID, classifications) {
+  setCrashClassifications(crashID, classifications) {
     let crash = this._data.crashes.get(crashID);
     if (!crash) {
       return false;
     }
 
     crash.classifications = classifications;
     return true;
   },
@@ -1402,17 +1402,17 @@ CrashRecord.prototype = Object.freeze({
   get oldestDate() {
     return this._o.crashDate;
   },
 
   get type() {
     return this._o.type;
   },
 
-  isOfType: function(processType, crashType) {
+  isOfType(processType, crashType) {
     return processType + "-" + crashType == this.type;
   },
 
   get submissions() {
     return this._o.submissions;
   },
 
   get classifications() {
--- a/toolkit/components/crashes/CrashManagerTest.jsm
+++ b/toolkit/components/crashes/CrashManagerTest.jsm
@@ -52,17 +52,17 @@ this.sleep = function(wait) {
 
 this.TestingCrashManager = function(options) {
   CrashManager.call(this, options);
 }
 
 this.TestingCrashManager.prototype = {
   __proto__: CrashManager.prototype,
 
-  createDummyDump: function(submitted = false, date = new Date(), hr = false) {
+  createDummyDump(submitted = false, date = new Date(), hr = false) {
     let uuid = Cc["@mozilla.org/uuid-generator;1"]
                 .getService(Ci.nsIUUIDGenerator)
                 .generateUUID()
                 .toString();
     uuid = uuid.substring(1, uuid.length - 1);
 
     let path;
     let mode;
@@ -84,32 +84,32 @@ this.TestingCrashManager.prototype = {
       yield f.setDates(date, date);
       yield f.close();
       dump("Created fake crash: " + path + "\n");
 
       return uuid;
     });
   },
 
-  createIgnoredDumpFile: function(filename, submitted = false) {
+  createIgnoredDumpFile(filename, submitted = false) {
     let path;
     if (submitted) {
       path = OS.Path.join(this._submittedDumpsDir, filename);
     } else {
       path = OS.Path.join(this._pendingDumpsDir, filename);
     }
 
     return Task.spawn(function* () {
       let mode = OS.Constants.libc.S_IRUSR | OS.Constants.libc.S_IWUSR;
       yield OS.File.open(path, {create: true}, {unixMode: mode});
       dump("Create ignored dump file: " + path + "\n");
     });
   },
 
-  createEventsFile: function(filename, type, date, content, index = 0) {
+  createEventsFile(filename, type, date, content, index = 0) {
     let path = OS.Path.join(this._eventsDirs[index], filename);
 
     let data = type + "\n" +
                Math.floor(date.getTime() / 1000) + "\n" +
                content;
     let encoder = new TextEncoder();
     let array = encoder.encode(data);
 
@@ -119,17 +119,17 @@ this.TestingCrashManager.prototype = {
     });
   },
 
   /**
    * Overwrite event file handling to process our test file type.
    *
    * We can probably delete this once we have actual events defined.
    */
-  _handleEventFilePayload: function(store, entry, type, date, payload) {
+  _handleEventFilePayload(store, entry, type, date, payload) {
     if (type == "test.1") {
       if (payload == "malformed") {
         return this.EVENT_FILE_ERROR_MALFORMED;
       } else if (payload == "success") {
         return this.EVENT_FILE_SUCCESS;
       }
       return this.EVENT_FILE_ERROR_UNKNOWN_EVENT;
     }
--- a/toolkit/components/crashes/CrashService.js
+++ b/toolkit/components/crashes/CrashService.js
@@ -52,17 +52,17 @@ this.CrashService = function() {};
 
 CrashService.prototype = Object.freeze({
   classID: Components.ID("{92668367-1b17-4190-86b2-1061b2179744}"),
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsICrashService,
     Ci.nsIObserver,
   ]),
 
-  addCrash: function(processType, crashType, id) {
+  addCrash(processType, crashType, id) {
     switch (processType) {
     case Ci.nsICrashService.PROCESS_TYPE_MAIN:
       processType = Services.crashmanager.PROCESS_TYPE_MAIN;
       break;
     case Ci.nsICrashService.PROCESS_TYPE_CONTENT:
       processType = Services.crashmanager.PROCESS_TYPE_CONTENT;
       break;
     case Ci.nsICrashService.PROCESS_TYPE_PLUGIN:
@@ -93,17 +93,17 @@ CrashService.prototype = Object.freeze({
       "CrashService waiting for content crash ping to be sent",
       processExtraFile(id).then(metadata => {
         return Services.crashmanager.addCrash(processType, crashType, id,
                                               new Date(), metadata)
       })
     );
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case "profile-after-change":
         // Side-effect is the singleton is instantiated.
         Services.crashmanager;
         break;
     }
   },
 });
--- a/toolkit/components/crashmonitor/CrashMonitor.jsm
+++ b/toolkit/components/crashmonitor/CrashMonitor.jsm
@@ -88,17 +88,17 @@ var CrashMonitorInternal = {
    */
   path: OS.Path.join(OS.Constants.Path.profileDir, "sessionCheckpoints.json"),
 
   /**
    * Load checkpoints from previous session asynchronously.
    *
    * @return {Promise} A promise that resolves/rejects once loading is complete
    */
-  loadPreviousCheckpoints: function() {
+  loadPreviousCheckpoints() {
     this.previousCheckpoints = Task.spawn(function*() {
       let data;
       try {
         data = yield OS.File.read(CrashMonitorInternal.path, { encoding: "utf-8" });
       } catch (ex) {
         if (!(ex instanceof OS.File.Error)) {
           throw ex;
         }
@@ -150,17 +150,17 @@ this.CrashMonitor = {
 
   /**
    * Initialize CrashMonitor.
    *
    * Should only be called from the CrashMonitor XPCOM component.
    *
    * @return {Promise}
    */
-  init: function() {
+  init() {
     if (CrashMonitorInternal.initialized) {
       throw new Error("CrashMonitor.init() must only be called once!");
     }
 
     let promise = CrashMonitorInternal.loadPreviousCheckpoints();
     // Add "profile-after-change" to checkpoint as this method is
     // called after receiving it
     CrashMonitorInternal.checkpoints["profile-after-change"] = true;
@@ -180,17 +180,17 @@ this.CrashMonitor = {
     return promise;
   },
 
   /**
    * Handle registered notifications.
    *
    * Update checkpoint file for every new notification received.
    */
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (!(aTopic in CrashMonitorInternal.checkpoints)) {
       // If this is the first time this notification is received,
       // remember it and write it to file
       CrashMonitorInternal.checkpoints[aTopic] = true;
       Task.spawn(function* () {
         try {
           let data = JSON.stringify(CrashMonitorInternal.checkpoints);
 
--- a/toolkit/components/crashmonitor/nsCrashMonitor.js
+++ b/toolkit/components/crashmonitor/nsCrashMonitor.js
@@ -13,17 +13,17 @@ function CrashMonitor() {}
 
 CrashMonitor.prototype = {
 
   classID: Components.ID("{d9d75e86-8f17-4c57-993e-f738f0d86d42}"),
   contractID: "@mozilla.org/toolkit/crashmonitor;1",
 
   QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIObserver]),
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
     case "profile-after-change":
       MonitorAPI.init();
     }
   },
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([CrashMonitor]);
--- a/toolkit/components/ctypes/tests/chrome/xpcshellTestHarnessAdaptor.js
+++ b/toolkit/components/ctypes/tests/chrome/xpcshellTestHarnessAdaptor.js
@@ -8,17 +8,17 @@ var _OS_ = null;
 
 var Components = {
   classes: { },
   interfaces: { },
   stack: {
     caller: null
   },
   utils: {
-    import: function() { }
+    import() { }
   }
 };
 
 function do_throw(message, stack) {
   do_print("error: " + message);
   do_print("stack: " + (stack ? stack : new Error().stack));
   throw message;
 }
@@ -67,17 +67,17 @@ FileFaker.prototype = {
   get parent() {
     let lastSlash = this._path.lastIndexOf("/");
     if (lastSlash == -1) {
       return "";
     }
     this._path = this._path.substring(0, lastSlash);
     return this;
   },
-  append: function(leaf) {
+  append(leaf) {
     this._path = this._path + "/" + leaf;
   }
 };
 
 function do_get_file(path, allowNonexistent) {
   if (!_WORKINGDIR_) {
     do_throw("No way to fake files if working directory is unknown!");
   }
--- a/toolkit/components/ctypes/tests/unit/head.js
+++ b/toolkit/components/ctypes/tests/unit/head.js
@@ -39,17 +39,17 @@ ResourceCleaner.prototype = {
 /**
  * Simple wrapper for tests that require cleanup.
  */
 function ResourceTester(start, stop) {
   this._start = start;
   this._stop  = stop;
 }
 ResourceTester.prototype = {
-  launch: function(size, test, args) {
+  launch(size, test, args) {
     trigger_gc();
     let cleaner = new ResourceCleaner();
     this._start(size);
     try {
       test(size, args, cleaner);
     } catch (x) {
       cleaner.cleanup();
       this._stop();
--- a/toolkit/components/ctypes/tests/unit/test_finalizer.js
+++ b/toolkit/components/ctypes/tests/unit/test_finalizer.js
@@ -29,18 +29,18 @@ function run_test()
                            ctypes.default_abi,
                            ctypes.void_t,
                            ctypes.size_t),
       compare: library.declare("test_finalizer_cmp_size_t",
                                ctypes.default_abi,
                                ctypes.bool,
                                ctypes.size_t,
                                ctypes.size_t),
-      status: status,
-      released: released
+      status,
+      released
   });
   samples.push(
     {
       name: "size_t",
       acquire: library.declare("test_finalizer_acq_size_t",
                            ctypes.default_abi,
                            ctypes.size_t,
                            ctypes.size_t),
@@ -48,18 +48,18 @@ function run_test()
                            ctypes.default_abi,
                            ctypes.void_t,
                            ctypes.size_t),
       compare: library.declare("test_finalizer_cmp_size_t",
                                ctypes.default_abi,
                                ctypes.bool,
                                ctypes.size_t,
                                ctypes.size_t),
-      status: status,
-      released: released
+      status,
+      released
   });
   samples.push(
     {
       name: "int32_t",
       acquire: library.declare("test_finalizer_acq_int32_t",
                            ctypes.default_abi,
                            ctypes.int32_t,
                            ctypes.size_t),
@@ -67,18 +67,18 @@ function run_test()
                            ctypes.default_abi,
                            ctypes.void_t,
                            ctypes.int32_t),
       compare: library.declare("test_finalizer_cmp_int32_t",
                                ctypes.default_abi,
                                ctypes.bool,
                                ctypes.int32_t,
                                ctypes.int32_t),
-      status: status,
-      released: released
+      status,
+      released
     }
   );
   samples.push(
     {
       name: "int64_t",
       acquire: library.declare("test_finalizer_acq_int64_t",
                            ctypes.default_abi,
                            ctypes.int64_t,
@@ -87,18 +87,18 @@ function run_test()
                            ctypes.default_abi,
                            ctypes.void_t,
                            ctypes.int64_t),
       compare: library.declare("test_finalizer_cmp_int64_t",
                                ctypes.default_abi,
                                ctypes.bool,
                                ctypes.int64_t,
                                ctypes.int64_t),
-      status: status,
-      released: released
+      status,
+      released
     }
   );
   samples.push(
     {
       name: "ptr",
       acquire: library.declare("test_finalizer_acq_ptr_t",
                            ctypes.default_abi,
                            ctypes.PointerType(ctypes.void_t),
@@ -107,18 +107,18 @@ function run_test()
                            ctypes.default_abi,
                            ctypes.void_t,
                            ctypes.PointerType(ctypes.void_t)),
       compare: library.declare("test_finalizer_cmp_ptr_t",
                                ctypes.default_abi,
                                ctypes.bool,
                                ctypes.void_t.ptr,
                                ctypes.void_t.ptr),
-      status: status,
-      released: released
+      status,
+      released
     }
   );
   samples.push(
     {
       name: "string",
       acquire: library.declare("test_finalizer_acq_string_t",
                                ctypes.default_abi,
                                ctypes.char.ptr,
@@ -127,18 +127,18 @@ function run_test()
                                ctypes.default_abi,
                                ctypes.void_t,
                                ctypes.char.ptr),
       compare: library.declare("test_finalizer_cmp_string_t",
                                ctypes.default_abi,
                                ctypes.bool,
                                ctypes.char.ptr,
                                ctypes.char.ptr),
-      status: status,
-      released: released
+      status,
+      released
     }
   );
   const rect_t = new ctypes.StructType("myRECT",
                                        [{ top   : ctypes.int32_t },
                                         { left  : ctypes.int32_t },
                                         { bottom: ctypes.int32_t },
                                         { right : ctypes.int32_t }]);
   samples.push(
@@ -152,18 +152,18 @@ function run_test()
                                ctypes.default_abi,
                                ctypes.void_t,
                                rect_t),
       compare: library.declare("test_finalizer_cmp_struct_t",
                                ctypes.default_abi,
                                ctypes.bool,
                                rect_t,
                                rect_t),
-      status: status,
-      released: released
+      status,
+      released
     }
   );
   samples.push(
     {
       name: "size_t, release returns size_t",
       acquire: library.declare("test_finalizer_acq_size_t",
                            ctypes.default_abi,
                            ctypes.size_t,
@@ -172,17 +172,17 @@ function run_test()
                            ctypes.default_abi,
                            ctypes.size_t,
                            ctypes.size_t),
       compare: library.declare("test_finalizer_cmp_size_t",
                                ctypes.default_abi,
                                ctypes.bool,
                                ctypes.size_t,
                                ctypes.size_t),
-      status: status,
+      status,
       released: function released_eq(i, witness) {
         return i == witness;
       }
     }
   );
   samples.push(
     {
       name: "size_t, release returns myRECT",
@@ -194,17 +194,17 @@ function run_test()
                                ctypes.default_abi,
                                rect_t,
                                ctypes.size_t),
       compare: library.declare("test_finalizer_cmp_size_t",
                                ctypes.default_abi,
                                ctypes.bool,
                                ctypes.size_t,
                                ctypes.size_t),
-      status: status,
+      status,
       released: function released_rect_eq(i, witness) {
         return witness.top == i
           && witness.bottom == i
           && witness.left == i
           && witness.right == i;
       }
     }
   );
@@ -223,17 +223,17 @@ function run_test()
                              ctypes.default_abi,
                              ctypes.bool,
                              ctypes.size_t),
       compare: library.declare("test_finalizer_cmp_null_t",
                                ctypes.default_abi,
                                ctypes.bool,
                                ctypes.void_t.ptr,
                                ctypes.void_t.ptr),
-      released: released
+      released
     }
   );
 
   let tester = new ResourceTester(start, stop);
   samples.forEach(
     function run_sample(sample) {
       dump("Executing finalization test for data " + sample.name + "\n");
       tester.launch(TEST_SIZE, test_executing_finalizers, sample);
@@ -392,18 +392,18 @@ function test_executing_forget(size, tc,
   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(
       {
-        original: original,
-        finalizer: finalizer
+        original,
+        finalizer
       }
     );
     cleanup.add(finalizer);
     do_check_true(tc.compare(original, finalizer));
   }
   do_check_eq(count_finalized(size, tc), 0);
 
   // Forget everything, making sure that we recover the original info
--- a/toolkit/components/ctypes/tests/unit/test_jsctypes.js
+++ b/toolkit/components/ctypes/tests/unit/test_jsctypes.js
@@ -408,18 +408,18 @@ function run_Int64_tests() {
   do_check_eq(int64.toString(10), "9223372036854775807");
   do_check_eq(int64.toString(16), "7fffffffffffffff");
   do_check_eq(int64.toString(2), "111111111111111111111111111111111111111111111111111111111111111");
 
   let vals = [-0x8000000000001000, 0x8000000000000000,
               ctypes.UInt64("0x8000000000000000"),
               Infinity, -Infinity, NaN, 0.1,
               5.68e21, null, undefined, "", {}, [], new Number(16),
-              {toString: function() { return 7; }},
-              {valueOf: function() { return 7; }}];
+              {toString() { return 7; }},
+              {valueOf() { return 7; }}];
   for (let i = 0; i < vals.length; i++)
     do_check_throws(function() { ctypes.Int64(vals[i]); }, TypeError);
 
   vals = ["-0x8000000000000001", "0x8000000000000000"];
   for (let i = 0; i < vals.length; i++)
     do_check_throws(function() { ctypes.Int64(vals[i]); }, RangeError);
 
   // Test ctypes.Int64.compare.
@@ -558,18 +558,18 @@ function run_UInt64_tests() {
   do_check_eq(uint64.toString(), uint64.toString(10));
   do_check_eq(uint64.toString(10), "9223372036854775807");
   do_check_eq(uint64.toString(16), "7fffffffffffffff");
   do_check_eq(uint64.toString(2), "111111111111111111111111111111111111111111111111111111111111111");
 
   let vals = [-1, 0x10000000000000000, "-1", "-0x1",
               ctypes.Int64("-1"), Infinity, -Infinity, NaN, 0.1,
               5.68e21, null, undefined, "", {}, [], new Number(16),
-              {toString: function() { return 7; }},
-              {valueOf: function() { return 7; }}];
+              {toString() { return 7; }},
+              {valueOf() { return 7; }}];
   for (let i = 0; i < vals.length; i++)
     do_check_throws(function() { ctypes.UInt64(vals[i]); }, TypeError);
 
   vals = ["0x10000000000000000"];
   for (let i = 0; i < vals.length; i++)
     do_check_throws(function() { ctypes.UInt64(vals[i]); }, RangeError);
 
   // Test ctypes.UInt64.compare.
@@ -773,18 +773,18 @@ function run_bool_tests(library) {
   do_check_eq(d.value, 1);
   d = new t(1);
   do_check_eq(d.value, 1);
 
   // don't convert anything else
   let vals = [-1, 2, Infinity, -Infinity, NaN, 0.1,
               ctypes.Int64(0), ctypes.UInt64(0),
               null, undefined, "", "0", {}, [], new Number(16),
-              {toString: function() { return 7; }},
-              {valueOf: function() { return 7; }}];
+              {toString() { return 7; }},
+              {valueOf() { return 7; }}];
   for (let i = 0; i < vals.length; i++)
     do_check_throws(function() { d.value = vals[i]; }, TypeError);
 
   do_check_true(d.address().constructor === t.ptr);
   do_check_eq(d.address().contents, d.value);
   do_check_eq(d.toSource(), "ctypes." + name + "(" + d.value + ")");
   do_check_eq(d.toSource(), d.toString());
 
@@ -853,18 +853,18 @@ function run_integer_tests(library, t, n
   d.value = false;
   do_check_eq(d.value, 0);
   d.value = true;
   do_check_eq(d.value, 1);
 
   // don't convert anything else
   let vals = [limits[0] - 1, limits[1] + 1, Infinity, -Infinity, NaN, 0.1,
               null, undefined, "", "0", {}, [], new Number(16),
-              {toString: function() { return 7; }},
-              {valueOf: function() { return 7; }}];
+              {toString() { return 7; }},
+              {valueOf() { return 7; }}];
   for (let i = 0; i < vals.length; i++)
     do_check_throws(function() { d.value = vals[i]; }, TypeError);
 
   do_check_true(d.address().constructor === t.ptr);
   do_check_eq(d.address().contents, d.value);
   do_check_eq(d.toSource(), "ctypes." + name + "(" + d.value + ")");
   do_check_eq(d.toSource(), d.toString());
 
@@ -940,18 +940,18 @@ function run_float_tests(library, t, nam
   do_check_true(isNaN(d.value));
   d.value = 0;
   do_check_eq(d.value, 0);
   d.value = -0;
   do_check_eq(1 / d.value, 1 / -0);
 
   // don't convert anything else
   let vals = [true, false, null, undefined, "", "0", {}, [], new Number(16),
-              {toString: function() { return 7; }},
-              {valueOf: function() { return 7; }}];
+              {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)
   {
     let f1 = tFn(val);
     eval("var f2 = " + f1.toSource());
@@ -1040,18 +1040,18 @@ function run_wrapped_integer_tests(libra
   d.value = false;
   do_check_eq(d.value, 0);
   d.value = true;
   do_check_eq(d.value, 1);
 
   // don't convert anything else
   let vals = [limits[2], limits[3], Infinity, -Infinity, NaN, 0.1,
               null, undefined, "", "0", {}, [], new Number(16),
-              {toString: function() { return 7; }},
-              {valueOf: function() { return 7; }}];
+              {toString() { return 7; }},
+              {valueOf() { return 7; }}];
   for (let i = 0; i < vals.length; i++)
     do_check_throws(function() { d.value = vals[i]; }, TypeError);
 
   do_check_true(d.address().constructor === t.ptr);
   do_check_eq(d.address().contents.toString(), d.value.toString());
   do_check_eq(d.toSource(), "ctypes." + name + "(" + wname + "(\"" + d.value + "\"))");
   do_check_eq(d.toSource(), d.toString());
 
@@ -1123,18 +1123,18 @@ function run_char_tests(library, t, name
   d.value = true;
   do_check_eq(d.value, 1);
 
   do_check_throws(function() { d.value = "5"; }, TypeError);
 
   // don't convert anything else
   let vals = [limits[0] - 1, limits[1] + 1, Infinity, -Infinity, NaN, 0.1,
               null, undefined, "", "aa", {}, [], new Number(16),
-              {toString: function() { return 7; }},
-              {valueOf: function() { return 7; }}];
+              {toString() { return 7; }},
+              {valueOf() { return 7; }}];
   for (let i = 0; i < vals.length; i++)
     do_check_throws(function() { d.value = vals[i]; }, TypeError);
 
   do_check_true(d.address().constructor === t.ptr);
   do_check_eq(d.address().contents, 1);
   do_check_eq(d.toSource(), "ctypes." + name + "(" + d.value + ")");
   do_check_eq(d.toSource(), d.toString());
 
@@ -1215,18 +1215,18 @@ function run_char16_tests(library, t, na
   d.value = "\0";
   do_check_eq(toprimitive(d.value), 0);
   d.value = "a";
   do_check_eq(d.value, "a");
 
   // don't convert anything else
   let vals = [limits[0] - 1, limits[1] + 1, Infinity, -Infinity, NaN, 0.1,
               null, undefined, "", "aa", {}, [], new Number(16),
-              {toString: function() { return 7; }},
-              {valueOf: function() { return 7; }}];
+              {toString() { return 7; }},
+              {valueOf() { return 7; }}];
   for (let i = 0; i < vals.length; i++)
     do_check_throws(function() { d.value = vals[i]; }, TypeError);
 
   do_check_true(d.address().constructor === t.ptr);
   do_check_eq(d.address().contents, "a");
   do_check_eq(d.toSource(), "ctypes." + name + "(\"" + d.value + "\")");
   do_check_eq(d.toSource(), d.toString());
 
@@ -2218,17 +2218,17 @@ function run_void_tests(library) {
 }
 
 function run_string_tests(library) {
   let test_ansi_len = library.declare("test_ansi_len", ctypes.default_abi, ctypes.int32_t, ctypes.char.ptr);
   do_check_eq(test_ansi_len(""), 0);
   do_check_eq(test_ansi_len("hello world"), 11);
 
   // don't convert anything else to a string
-  let vals = [true, 0, 1 / 3, undefined, {}, {toString: function() { return "bad"; }}, []];
+  let vals = [true, 0, 1 / 3, undefined, {}, {toString() { return "bad"; }}, []];
   for (let i = 0; i < vals.length; i++)
     do_check_throws(function() { test_ansi_len(vals[i]); }, TypeError);
 
   let test_wide_len = library.declare("test_wide_len", ctypes.default_abi, ctypes.int32_t, ctypes.char16_t.ptr);
   do_check_eq(test_wide_len("hello world"), 11);
 
   let test_ansi_ret = library.declare("test_ansi_ret", ctypes.default_abi, ctypes.char.ptr);
   do_check_eq(test_ansi_ret().readString(), "success");
--- a/toolkit/components/downloads/test/unit/test_app_rep_windows.js
+++ b/toolkit/components/downloads/test/unit/test_app_rep_windows.js
@@ -114,18 +114,18 @@ function promiseSaverComplete(aSaver, aO
 function promiseCopyToSaver(aSourceString, aSaverOutputStream, aCloseWhenDone) {
   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: function() { },
-    onStopRequest: function(aRequest, aContext, aStatusCode)
+    onStartRequest() { },
+    onStopRequest(aRequest, aContext, aStatusCode)
     {
       if (Components.isSuccessCode(aStatusCode)) {
         deferred.resolve();
       } else {
         deferred.reject(new Components.Exception(aResult));
       }
     },
   }, null);
--- a/toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js
@@ -508,17 +508,16 @@ add_task(function* ensureKeysFor_posts_n
       // server_wins version multiple times in a single sync. We
       // actually push 5 times as of this writing.
       // See bug 1321571.
       // equal(posts.length, 1);
       const newPost = posts[posts.length - 1];
       const newBody = yield assertPostedEncryptedKeys(newPost);
       ok(newBody.keys.collections[extensionId], `keys object should have a key for ${extensionId}`);
       ok(newBody.keys.collections[extensionId2], `keys object should have a key for ${extensionId2}`);
-
     });
   });
 });
 
 add_task(function* ensureKeysFor_pulls_key() {
   // ensureKeysFor is implemented by adding a key to our local record
   // and doing a sync. This means that if the same key exists
   // remotely, we get a "conflict". Ensure that we handle this
--- a/toolkit/components/exthelper/extApplication.js
+++ b/toolkit/components/exthelper/extApplication.js
@@ -658,17 +658,17 @@ extApplication.prototype = {
   },
 
   get prefs() {
     let prefs = new PreferenceBranch("");
     this.__defineGetter__("prefs", () => prefs);
     return this.prefs;
   },
 
-  getExtensions: function(callback) {
+  getExtensions(callback) {
     AddonManager.getAddonsByTypes(["extension"], function(addons) {
       callback.callback(new Extensions(addons));
     });
   },
 
   get events() {
 
     // This ensures that FUEL only registers for notifications as needed
--- a/toolkit/components/feeds/test/test_xml.js
+++ b/toolkit/components/feeds/test/test_xml.js
@@ -27,17 +27,17 @@
 
 // Listens to feeds being loaded. Runs the tests built into the feed afterwards to veryify they
 // were parsed correctly.
 function FeedListener(testcase) {
   this.testcase = testcase;
 }
 
 FeedListener.prototype = {
-  handleResult: function(result) {
+  handleResult(result) {
     var feed = result.doc;
     try {
       do_print("Testing feed " + this.testcase.file.path);
       Assert.ok(isIID(feed, Ci.nsIFeed), "Has feed interface");
 
       if (!eval(this.testcase.expect)) {
         Assert.ok(false, "expect failed for " + this.testcase.desc);
       } else {
--- a/toolkit/components/filepicker/content/filepicker.js
+++ b/toolkit/components/filepicker/content/filepicker.js
@@ -363,21 +363,21 @@ function selectOnOK()
 
   return (ret != nsIFilePicker.returnCancel);
 }
 
 var gFilesEnumerator = {
   mFiles: null,
   mIndex: 0,
 
-  hasMoreElements: function()
+  hasMoreElements()
   {
     return (this.mIndex < this.mFiles.length);
   },
-  getNext: function()
+  getNext()
   {
     if (this.mIndex >= this.mFiles.length)
       throw Components.results.NS_ERROR_FAILURE;
     return this.mFiles[this.mIndex++];
   }
 };
 
 function onCancel()
--- a/toolkit/components/filepicker/nsFilePicker.js
+++ b/toolkit/components/filepicker/nsFilePicker.js
@@ -63,17 +63,17 @@ function nsFilePicker()
       this.mDisplayDirectory = dir;
     } catch (e) {}
   }
 }
 
 nsFilePicker.prototype = {
   classID: Components.ID("{54ae32f8-1dd2-11b2-a209-df7c505370f8}"),
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(nsIFilePicker) ||
         iid.equals(nsISupports))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   },
 
 
@@ -108,21 +108,21 @@ nsFilePicker.prototype = {
 
     if (!this.mDOMFilesEnumerator) {
       this.mDOMFilesEnumerator = {
         QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsISimpleEnumerator]),
 
         mFiles: [],
         mIndex: 0,
 
-        hasMoreElements: function() {
+        hasMoreElements() {
           return (this.mIndex < this.mFiles.length);
         },
 
-        getNext: function() {
+        getNext() {
           if (this.mIndex >= this.mFiles.length) {
             throw Components.results.NS_ERROR_FAILURE;
           }
           return this.mFiles[this.mIndex++];
         }
       };
 
       var utils = this.mParentWindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
@@ -171,23 +171,23 @@ nsFilePicker.prototype = {
   get mode() { return this.mMode; },
 
   /* members */
   mFilesEnumerator: undefined,
   mDOMFilesEnumerator: undefined,
   mParentWindow: null,
 
   /* methods */
-  init: function(parent, title, mode) {
+  init(parent, title, mode) {
     this.mParentWindow = parent;
     this.mTitle = title;
     this.mMode = mode;
   },
 
-  appendFilters: function(filterMask) {
+  appendFilters(filterMask) {
     if (filterMask & nsIFilePicker.filterHTML) {
       this.appendFilter(titleBundle.GetStringFromName("htmlTitle"),
                         filterBundle.GetStringFromName("htmlFilter"));
     }
     if (filterMask & nsIFilePicker.filterText) {
       this.appendFilter(titleBundle.GetStringFromName("textTitle"),
                         filterBundle.GetStringFromName("textFilter"));
     }
@@ -218,37 +218,37 @@ nsFilePicker.prototype = {
                         filterBundle.GetStringFromName("videoFilter"));
     }
     if (filterMask & nsIFilePicker.filterAll) {
       this.appendFilter(titleBundle.GetStringFromName("allTitle"),
                         filterBundle.GetStringFromName("allFilter"));
     }
   },
 
-  appendFilter: function(title, extensions) {
+  appendFilter(title, extensions) {
     this.mFilterTitles.push(title);
     this.mFilters.push(extensions);
   },
 
-  open: function(aFilePickerShownCallback) {
+  open(aFilePickerShownCallback) {
     var tm = Components.classes["@mozilla.org/thread-manager;1"]
                        .getService(Components.interfaces.nsIThreadManager);
     tm.mainThread.dispatch(function() {
       let result = Components.interfaces.nsIFilePicker.returnCancel;
       try {
         result = this.show();
       } catch (ex) {
       }
       if (aFilePickerShownCallback) {
         aFilePickerShownCallback.done(result);
       }
     }.bind(this), Components.interfaces.nsIThread.DISPATCH_NORMAL);
   },
 
-  show: function() {
+  show() {
     var o = {};
     o.title = this.mTitle;
     o.mode = this.mMode;
     o.displayDirectory = this.mDisplayDirectory;
     o.defaultString = this.mDefaultString;
     o.filterIndex = this.mFilterIndex;
     o.filters = {};
     o.filters.titles = this.mFilterTitles;
--- a/toolkit/components/filepicker/test/unit/test_filecomplete.js
+++ b/toolkit/components/filepicker/test/unit/test_filecomplete.js
@@ -14,17 +14,17 @@ file.append("test_file");
 file.create(file.NORMAL_FILE_TYPE, -1);
 file = dir.clone();
 file.append("other_file");
 file.create(file.NORMAL_FILE_TYPE, -1);
 dir.append("test_dir");
 dir.create(dir.DIRECTORY_TYPE, -1);
 
 var gListener = {
-  onSearchResult: function(aSearch, aResult) {
+  onSearchResult(aSearch, aResult) {
     // Check that we got same search string back.
     do_check_eq(aResult.searchString, "test");
     // Check that the search succeeded.
     do_check_eq(aResult.searchResult, aResult.RESULT_SUCCESS);
     // Check that we got two results.
     do_check_eq(aResult.matchCount, 2);
     // Check that the first result is the directory we created.
     do_check_eq(aResult.getValueAt(0), "test_dir");
--- a/toolkit/components/formautofill/FormAutofillContentService.js
+++ b/toolkit/components/formautofill/FormAutofillContentService.js
@@ -71,17 +71,17 @@ FormHandler.prototype = {
       Cu.reportError(ex);
     }
 
     // The type of event depends on whether this is a success condition.
     let event = (reason == "success")
                 ? new this.window.Event("autocomplete", { bubbles: true })
                 : new this.window.AutocompleteErrorEvent("autocompleteerror",
                                                          { bubbles: true,
-                                                           reason: reason });
+                                                           reason });
     yield this.waitForTick();
     this.form.dispatchEvent(event);
   }),
 
   /**
    * Handles requestAutocomplete and returns the outcome when finished.
    *
    * @return {Promise}
@@ -138,17 +138,17 @@ FormHandler.prototype = {
   /**
    * Returns information from the form about fields that can be autofilled, and
    * populates the fieldDetails array on this object accordingly.
    *
    * @returns Serializable data structure that can be sent to the user
    *          interface, or null if the operation failed because the constraints
    *          on the allowed fields were not honored.
    */
-  collectFormFields: function() {
+  collectFormFields() {
     let autofillData = {
       sections: [],
     };
 
     for (let element of this.form.elements) {
       // Query the interface and exclude elements that cannot be autocompleted.
       if (!(element instanceof Ci.nsIDOMHTMLInputElement)) {
         continue;
@@ -168,17 +168,17 @@ FormHandler.prototype = {
         // A field with the same identifier already exists.
         return null;
       }
       this.fieldDetails.push({
         section: info.section,
         addressType: info.addressType,
         contactType: info.contactType,
         fieldName: info.fieldName,
-        element: element,
+        element,
       });
 
       // The first level is the custom section.
       let section = autofillData.sections
                                 .find(s => s.name == info.section);
       if (!section) {
         section = {
           name: info.section,
@@ -220,17 +220,17 @@ FormHandler.prototype = {
    *            section: Value originally provided to the user interface.
    *            addressType: Value originally provided to the user interface.
    *            contactType: Value originally provided to the user interface.
    *            fieldName: Value originally provided to the user interface.
    *            value: String with which the field should be updated.
    *          ],
    *        }
    */
-  autofillFormFields: function(aAutofillResult) {
+  autofillFormFields(aAutofillResult) {
     for (let field of aAutofillResult.fields) {
       // Get the field details, if it was processed by the user interface.
       let fieldDetail = this.fieldDetails
                             .find(f => f.section == field.section &&
                                        f.addressType == field.addressType &&
                                        f.contactType == field.contactType &&
                                        f.fieldName == field.fieldName);
       if (!fieldDetail) {
@@ -239,17 +239,17 @@ FormHandler.prototype = {
 
       fieldDetail.element.value = field.value;
     }
   },
 
   /**
    * Waits for one tick of the event loop before resolving the returned promise.
    */
-  waitForTick: function() {
+  waitForTick() {
     return new Promise(function(resolve) {
       Services.tm.currentThread.dispatch(resolve, Ci.nsIThread.DISPATCH_NORMAL);
     });
   },
 };
 
 /**
  * Implements a service used by DOM content to request Form Autofill, in
@@ -258,15 +258,15 @@ FormHandler.prototype = {
 function FormAutofillContentService() {
 }
 
 FormAutofillContentService.prototype = {
   classID: Components.ID("{ed9c2c3c-3f86-4ae5-8e31-10f71b0f19e6}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIFormAutofillContentService]),
 
   // nsIFormAutofillContentService
-  requestAutocomplete: function(aForm, aWindow) {
+  requestAutocomplete(aForm, aWindow) {
     new FormHandler(aForm, aWindow).handleRequestAutocomplete()
                                    .catch(Cu.reportError);
   },
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([FormAutofillContentService]);
--- a/toolkit/components/formautofill/FormAutofillStartup.js
+++ b/toolkit/components/formautofill/FormAutofillStartup.js
@@ -26,30 +26,30 @@ FormAutofillStartup.prototype = {
   classID: Components.ID("{51c95b3d-7431-467b-8d50-383f158ce9e5}"),
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsIFrameMessageListener,
     Ci.nsIObserver,
     Ci.nsISupportsWeakReference,
   ]),
 
   // nsIObserver
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     // This method is called by the "profile-after-change" category on startup,
     // which is called before any web page loads.  At this time, we need to
     // register a global message listener in the parent process preemptively,
     // because we can receive requests from child processes at any time.  For
     // performance reasons, we use this object as a message listener, so that we
     // don't have to load the FormAutoFill module at startup.
     let globalMM = Cc["@mozilla.org/globalmessagemanager;1"]
                      .getService(Ci.nsIMessageListenerManager);
     globalMM.addMessageListener("FormAutofill:RequestAutocomplete", this);
   },
 
   // nsIFrameMessageListener
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     // Process the "FormAutofill:RequestAutocomplete" message.  Any exception
     // raised in the parent process is caught and serialized into the reply
     // message that is sent to the requesting child process.
     FormAutofill.processRequestAutocomplete(aMessage.data)
       .catch(ex => { return { exception: ex } })
       .then(result => {
         // The browser message manager in the parent will send the reply to the
         // associated frame message manager in the child.
--- a/toolkit/components/formautofill/content/RequestAutocompleteUI.jsm
+++ b/toolkit/components/formautofill/content/RequestAutocompleteUI.jsm
@@ -35,17 +35,17 @@ this.RequestAutocompleteUI.prototype = {
   show: Task.async(function* () {
     // Create a new promise and store the function that will resolve it.  This
     // will be called by the UI once the selection has been made.
     let resolveFn;
     let uiPromise = new Promise(resolve => resolveFn = resolve);
 
     // Wrap the callback function so that it survives XPCOM.
     let args = {
-      resolveFn: resolveFn,
+      resolveFn,
       autofillData: this._autofillData,
     };
     args.wrappedJSObject = args;
 
     // Open the window providing the function to call when it closes.
     Services.ww.openWindow(null,
                            "chrome://requestautocomplete/content/requestAutocomplete.xhtml",
                            "Toolkit:RequestAutocomplete",
--- a/toolkit/components/formautofill/content/requestAutocomplete.js
+++ b/toolkit/components/formautofill/content/requestAutocomplete.js
@@ -17,30 +17,30 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/Promise.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
                                   "resource://gre/modules/Task.jsm");
 
 const RequestAutocompleteDialog = {
   resolveFn: null,
   autofillData: null,
 
-  onLoad: function() {
+  onLoad() {
     Task.spawn(function* () {
       let args = window.arguments[0].wrappedJSObject;
       this.resolveFn = args.resolveFn;
       this.autofillData = args.autofillData;
 
       window.sizeToContent();
 
       Services.obs.notifyObservers(window,
                                    "formautofill-window-initialized", "");
     }.bind(this)).catch(Cu.reportError);
   },
 
-  onAccept: function() {
+  onAccept() {
     // TODO: Replace with autofill storage module (bug 1018304).
     const dummyDB = {
       "": {
         "name": "Mozzy La",
         "street-address": "331 E Evelyn Ave",
         "address-level2": "Mountain View",
         "address-level1": "CA",
         "country": "US",
@@ -60,26 +60,26 @@ const RequestAutocompleteDialog = {
         for (let field of addressSection.fields) {
           let fieldName = field.fieldName;
           if (!(fieldName in dummyDB[addressType])) {
             continue;
           }
 
           result.fields.push({
             section: section.name,
-            addressType: addressType,
+            addressType,
             contactType: field.contactType,
             fieldName: field.fieldName,
             value: dummyDB[addressType][fieldName],
           });
         }
       }
     }
 
     window.close();
     this.resolveFn(result);
   },
 
-  onCancel: function() {
+  onCancel() {
     window.close();
     this.resolveFn({ canceled: true });
   },
 };
--- a/toolkit/components/formautofill/test/chrome/loader.js
+++ b/toolkit/components/formautofill/test/chrome/loader.js
@@ -28,17 +28,17 @@ var parentScript = SpecialPowers.loadChr
 
 // Replace the extension of the loaded HTML file with ".js"
 var testUrl = location.href.replace(/\.\w+$/, ".js");
 
 // Start loading the test script in the parent process.
 var promiseParentInitFinished = new Promise(function(resolve) {
   parentScript.addMessageListener("finish_load_in_parent", resolve);
 });
-parentScript.sendAsyncMessage("start_load_in_parent", { testUrl: testUrl });
+parentScript.sendAsyncMessage("start_load_in_parent", { testUrl });
 
 // Define output functions so they look the same across all frameworks.
 var Output = {
   print: info,
 };
 
 // Define assertion functions so they look the same across all frameworks.
 var Assert = {
--- a/toolkit/components/formautofill/test/head_common.js
+++ b/toolkit/components/formautofill/test/head_common.js
@@ -37,47 +37,47 @@ var TestUtils = {
    * Waits for at least one tick of the event loop.  This means that all pending
    * events at the time of this call will have been processed.  Other events may
    * be processed before the returned promise is resolved.
    *
    * @return {Promise}
    * @resolves When pending events have been processed.
    * @rejects Never.
    */
-  waitForTick: function() {
+  waitForTick() {
     return new Promise(resolve => executeSoon(resolve));
   },
 
   /**
    * Waits for the specified timeout.
    *
    * @param aTimeMs
    *        Minimum time to wait from the moment of this call, in milliseconds.
    *        The actual wait may be longer, due to system timer resolution and
    *        pending events being processed before the promise is resolved.
    *
    * @return {Promise}
    * @resolves When the specified time has passed.
    * @rejects Never.
    */
-  waitMs: function(aTimeMs) {
+  waitMs(aTimeMs) {
     return new Promise(resolve => setTimeout(resolve, aTimeMs));
   },
 
   /**
    * Allows waiting for an observer notification once.
    *
    * @param aTopic
    *        Notification topic to observe.
    *
    * @return {Promise}
    * @resolves The array [aSubject, aData] from the observed notification.
    * @rejects Never.
    */
-  waitForNotification: function(aTopic) {
+  waitForNotification(aTopic) {
     Output.print("Waiting for notification: '" + aTopic + "'.");
 
     return new Promise(resolve => Services.obs.addObserver(
       function observe(aSubject, aTopic, aData) {
         Services.obs.removeObserver(observe, aTopic);
         resolve([aSubject, aData]);
       }, aTopic, false));
   },
@@ -91,17 +91,17 @@ var TestUtils = {
    *        String with the name of the event.
    * @param aUseCapture
    *        This parameter is passed to the addEventListener call.
    *
    * @return {Promise}
    * @resolves The arguments from the observed event.
    * @rejects Never.
    */
-  waitForEvent: function(aTarget, aEventName, aUseCapture = false) {
+  waitForEvent(aTarget, aEventName, aUseCapture = false) {
     Output.print("Waiting for event: '" + aEventName + "' on " + aTarget + ".");
 
     return new Promise(resolve => aTarget.addEventListener(aEventName,
       function onEvent(...aArgs) {
         aTarget.removeEventListener(aEventName, onEvent, aUseCapture);
         resolve(...aArgs);
       }, aUseCapture));
   },
@@ -178,17 +178,17 @@ var FormAutofillTest = {
         TestUtils.waitForNotification("formautofill-window-initialized");
     let ui = yield FormAutofill.integration.createRequestAutocompleteUI(
                                                          aFormAutofillData);
     let promiseResult = ui.show();
 
     // The window is the subject of the observer notification.
     return {
       uiWindow: (yield promiseUIWindow)[0],
-      promiseResult: promiseResult,
+      promiseResult,
     };
   }),
 };
 
 var TestData = {
   /**
    * Autofill UI request for the e-mail field only.
    */
--- a/toolkit/components/formautofill/test/loader_common.js
+++ b/toolkit/components/formautofill/test/loader_common.js
@@ -99,22 +99,22 @@ function add_termination_task(taskFn) {
  * between the parent and child processes.
  */
 function getTaskId(stackFrame) {
   return stackFrame.filename + ":" + stackFrame.lineNumber;
 }
 
 // This is a shared helper for mochitest-chrome and mochitest-browser.
 var _mochitestAssert = {
-  ok: function(actual) {
+  ok(actual) {
     let stack = Components.stack.caller;
     ok(actual, "[" + stack.name + " : " + stack.lineNumber + "] " + actual +
                " == true");
   },
-  equal: function(actual, expected) {
+  equal(actual, expected) {
     let stack = Components.stack.caller;
     is(actual, expected, "[" + stack.name + " : " + stack.lineNumber + "] " +
                actual + " == " + expected);
   },
 };
 
 // Reminder: unless you are adding new features to the framework, you shouldn't
 // have to modify this file.  Use "head_common.js" or "head.js" for shared code.
--- a/toolkit/components/gfx/SanityTest.js
+++ b/toolkit/components/gfx/SanityTest.js
@@ -148,30 +148,30 @@ var listener = {
   canvas: null,
   ctx: null,
   mm: null,
 
   messages: [
     "gfxSanity:ContentLoaded",
   ],
 
-  scheduleTest: function(win) {
+  scheduleTest(win) {
     this.win = win;
     this.win.onload = this.onWindowLoaded.bind(this);
     this.utils = this.win.QueryInterface(Ci.nsIInterfaceRequestor)
                          .getInterface(Ci.nsIDOMWindowUtils);
     setTimeout(TIMEOUT_SEC * 1000, () => {
       if (this.win) {
         reportResult(TEST_TIMEOUT);
         this.endTest();
       }
     });
   },
 
-  runSanityTest: function() {
+  runSanityTest() {
     this.canvas = this.win.document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
     this.canvas.setAttribute("width", PAGE_WIDTH);
     this.canvas.setAttribute("height", PAGE_HEIGHT);
     this.ctx = this.canvas.getContext("2d");
 
     // Perform the compositor backbuffer test, which currently we use for
     // actually deciding whether to enable hardware media decoding.
     testCompositor(this.win, this.ctx);
@@ -182,17 +182,17 @@ var listener = {
   receiveMessage(message) {
     switch (message.name) {
       case "gfxSanity:ContentLoaded":
         this.runSanityTest();
         break;
     }
   },
 
-  onWindowLoaded: function() {
+  onWindowLoaded() {
     let browser = this.win.document.createElementNS(XUL_NS, "browser");
     browser.setAttribute("type", "content");
 
     let remoteBrowser = Services.appinfo.browserTabsRemoteAutostart;
     browser.setAttribute("remote", remoteBrowser);
 
     browser.style.width = PAGE_WIDTH + "px";
     browser.style.height = PAGE_HEIGHT + "px";
@@ -203,17 +203,17 @@ var listener = {
 
     this.messages.forEach((msgName) => {
       this.mm.addMessageListener(msgName, this);
     });
 
     this.mm.loadFrameScript(FRAME_SCRIPT_URL, false);
   },
 
-  endTest: function() {
+  endTest() {
     if (!this.win) {
       return;
     }
 
     this.win.ownerGlobal.close();
     this.win = null;
     this.utils = null;
     this.canvas = null;
@@ -235,17 +235,17 @@ var listener = {
 };
 
 function SanityTest() {}
 SanityTest.prototype = {
   classID: Components.ID("{f3a8ca4d-4c83-456b-aee2-6a2cbf11e9bd}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                          Ci.nsISupportsWeakReference]),
 
-  shouldRunTest: function() {
+  shouldRunTest() {
     // Only test gfx features if firefox has updated, or if the user has a new
     // gpu or drivers.
     var buildId = Services.appinfo.platformBuildID;
     var gfxinfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
 
     if (Preferences.get(RUNNING_PREF, false)) {
       Preferences.set(DISABLE_VIDEO_PREF, true);
       reportResult(TEST_CRASHED);
@@ -281,17 +281,17 @@ SanityTest.prototype = {
     Preferences.set(VERSION_PREF, buildId);
 
     // Update the prefs so that this test doesn't run again until the next update.
     Preferences.set(RUNNING_PREF, true);
     Services.prefs.savePrefFile(null);
     return true;
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     if (topic != "profile-after-change") return;
 
     // profile-after-change fires only at startup, so we won't need
     // to use the listener again.
     let tester = listener;
     listener = null;
 
     if (!this.shouldRunTest()) return;
--- a/toolkit/components/gfx/content/gfxFrameScript.js
+++ b/toolkit/components/gfx/content/gfxFrameScript.js
@@ -1,46 +1,46 @@
 var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
 
 const gfxFrameScript = {
   domUtils: null,
 
-  init: function() {
+  init() {
     let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
     let webProgress =  docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                        .getInterface(Ci.nsIWebProgress);
     webProgress.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_STATE_WINDOW);
 
     this.domUtils = content.QueryInterface(Ci.nsIInterfaceRequestor)
                     .getInterface(Ci.nsIDOMWindowUtils);
 
     webNav.loadURI("chrome://gfxsanity/content/sanitytest.html",
                    Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
                    null, null, null);
 
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "MozAfterPaint":
         sendAsyncMessage('gfxSanity:ContentLoaded');
         removeEventListener("MozAfterPaint", this);
         break;
     }
   },
 
-  isSanityTest: function(aUri) {
+  isSanityTest(aUri) {
     if (!aUri) {
       return false;
     }
 
     return aUri.endsWith("/sanitytest.html");
   },
 
-  onStateChange: function(webProgress, req, flags, status) {
+  onStateChange(webProgress, req, flags, status) {
     if (webProgress.isTopLevel &&
         (flags & Ci.nsIWebProgressListener.STATE_STOP) &&
         this.isSanityTest(req.name)) {
 
       webProgress.removeProgressListener(this);
 
       // If no paint is pending, then the test already painted
       if (this.domUtils.isMozAfterPaintPending) {
--- a/toolkit/components/jsdownloads/src/DownloadCore.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadCore.jsm
@@ -617,17 +617,17 @@ this.Download.prototype = {
    *
    * The file will be moved out of quarantine and the download will be
    * marked as succeeded.
    *
    * @return {Promise}
    * @resolves When the Download has been unblocked and succeeded.
    * @rejects  JavaScript exception if any of the operations failed.
    */
-  unblock: function() {
+  unblock() {
     if (this._promiseUnblock) {
       return this._promiseUnblock;
     }
 
     if (this._promiseConfirmBlock) {
       return Promise.reject(new Error(
         "Download block has been confirmed, cannot unblock."));
     }
@@ -661,17 +661,17 @@ this.Download.prototype = {
    *
    * If a download was blocked but retained on disk this method can be used
    * to remove the file.
    *
    * @return {Promise}
    * @resolves When the Download's data has been removed.
    * @rejects  JavaScript exception if any of the operations failed.
    */
-  confirmBlock: function() {
+  confirmBlock() {
     if (this._promiseConfirmBlock) {
       return this._promiseConfirmBlock;
     }
 
     if (this._promiseUnblock) {
       return Promise.reject(new Error(
         "Download is being unblocked, cannot confirmBlock."));
     }
@@ -706,17 +706,17 @@ this.Download.prototype = {
    * @return {Promise}
    * @resolves When the instruction to launch the file has been
    *           successfully given to the operating system. Note that
    *           the OS might still take a while until the file is actually
    *           launched.
    * @rejects  JavaScript exception if there was an error trying to launch
    *           the file.
    */
-  launch: function() {
+  launch() {
     if (!this.succeeded) {
       return Promise.reject(
         new Error("launch can only be called if the download succeeded")
       );
     }
 
     return DownloadIntegration.launchDownload(this);
   },
@@ -840,17 +840,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: function()
+  removePartialData()
   {
     if (!this.canceled && !this.error) {
       return Promise.resolve();
     }
 
     let promiseRemovePartialData = this._promiseRemovePartialData;
 
     if (!promiseRemovePartialData) {
@@ -915,17 +915,17 @@ this.Download.prototype = {
    *
    * 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: function()
+  refresh()
   {
     return Task.spawn(function* () {
       if (!this.stopped || this._finalized) {
         return;
       }
 
       if (this.succeeded) {
         let oldExists = this.target.exists;
@@ -994,17 +994,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: function(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.
@@ -1091,17 +1091,17 @@ this.Download.prototype = {
     }
   },
 
   /**
    * Returns a static representation of the current object state.
    *
    * @return A JavaScript object that can be serialized to JSON.
    */
-  toSerializable: function()
+  toSerializable()
   {
     let serializable = {
       source: this.source.toSerializable(),
       target: this.target.toSerializable(),
     };
 
     let saver = this.saver.toSerializable();
     if (!serializable.source || !saver) {
@@ -1143,17 +1143,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: function()
+  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,17 +1291,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: function()
+  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) {
@@ -1447,17 +1447,17 @@ this.DownloadTarget.prototype = {
     }
   }),
 
   /**
    * Returns a static representation of the current object state.
    *
    * @return A JavaScript object that can be serialized to JSON.
    */
-  toSerializable: function()
+  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 };
@@ -1649,17 +1649,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: function()
+  toSerializable()
   {
     let serializable = {
       result: this.result,
       message: this.message,
       becauseSourceFailed: this.becauseSourceFailed,
       becauseTargetFailed: this.becauseTargetFailed,
       becauseBlocked: this.becauseBlocked,
       becauseBlockedByParentalControls: this.becauseBlockedByParentalControls,
@@ -1764,17 +1764,17 @@ this.DownloadSaver.prototype = {
     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: function()
+  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;
@@ -1801,30 +1801,30 @@ this.DownloadSaver.prototype = {
     }
   },
 
   /**
    * Returns a static representation of the current object state.
    *
    * @return A JavaScript object that can be serialized to JSON.
    */
-  toSerializable: function()
+  toSerializable()
   {
     throw new Error("Not implemented.");
   },
 
   /**
    * Returns the SHA-256 hash of the downloaded file, if it exists.
    */
-  getSha256Hash: function()
+  getSha256Hash()
   {
     throw new Error("Not implemented.");
   },
 
-  getSignatureInfo: function()
+  getSignatureInfo()
   {
     throw new Error("Not implemented.");
   },
 }; // DownloadSaver
 
 /**
  * Creates a new DownloadSaver object from its serializable representation.
  *
@@ -1963,17 +1963,17 @@ this.DownloadCopySaver.prototype = {
         }
 
         // Create the object that will save the file in a background thread.
         let backgroundFileSaver = new BackgroundFileSaverStreamListener();
         try {
           // When the operation completes, reflect the status in the promise
           // returned by this download execution function.
           backgroundFileSaver.observer = {
-            onTargetChange: function() { },
+            onTargetChange() { },
             onSaveComplete: (aSaver, aStatus) => {
               // Send notifications now that we can restart if needed.
               if (Components.isSuccessCode(aStatus)) {
                 // Save the hash before freeing backgroundFileSaver.
                 this._sha256Hash = aSaver.sha256Hash;
                 this._signatureInfo = aSaver.signatureInfo;
                 this._redirects = aSaver.redirects;
                 deferSaveComplete.resolve();
@@ -2028,17 +2028,17 @@ this.DownloadCopySaver.prototype = {
                                                  aProgressMax)
             {
               let currentBytes = resumeFromBytes + aProgress;
               let totalBytes = aProgressMax == -1 ? -1 : (resumeFromBytes +
                                                           aProgressMax);
               aSetProgressBytesFn(currentBytes, totalBytes, aProgress > 0 &&
                                   partFilePath && keepPartialData);
             },
-            onStatus: function() { },
+            onStatus() { },
           };
 
           // If the callback was set, handle it now before opening the channel.
           if (download.source.adjustChannel) {
             yield download.source.adjustChannel(channel);
           }
 
           // Open the channel, directing output to the background file saver.
@@ -2252,17 +2252,17 @@ this.DownloadCopySaver.prototype = {
       this._backgroundFileSaver.finish(Cr.NS_ERROR_FAILURE);
       this._backgroundFileSaver = null;
     }
   },
 
   /**
    * Implements "DownloadSaver.removePartialData".
    */
-  removePartialData: function()
+  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;
@@ -2270,49 +2270,49 @@ this.DownloadCopySaver.prototype = {
         }
       }
     }.bind(this));
   },
 
   /**
    * Implements "DownloadSaver.toSerializable".
    */
-  toSerializable: function()
+  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: function()
+  getSha256Hash()
   {
     return this._sha256Hash;
   },
 
   /*
    * Implements DownloadSaver.getSignatureInfo.
    */
-  getSignatureInfo: function()
+  getSignatureInfo()
   {
     return this._signatureInfo;
   },
 
   /*
    * Implements DownloadSaver.getRedirects.
    */
-  getRedirects: function()
+  getRedirects()
   {
     return this._redirects;
   }
 };
 
 /**
  * Creates a new DownloadCopySaver object, with its initial state derived from
  * its serializable representation.
@@ -2435,17 +2435,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: function(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) {
@@ -2598,17 +2598,17 @@ this.DownloadLegacySaver.prototype = {
         this.request = null;
         this.deferCanceled = null;
         // Allow the download to restart through a DownloadCopySaver.
         this.firstExecutionFinished = true;
       }
     }.bind(this));
   },
 
-  _checkReputationAndMove: function() {
+  _checkReputationAndMove() {
     return DownloadCopySaver.prototype._checkReputationAndMove
                                       .apply(this, arguments);
   },
 
   /**
    * Implements "DownloadSaver.cancel".
    */
   cancel: function DLS_cancel()
@@ -2624,90 +2624,90 @@ this.DownloadLegacySaver.prototype = {
     if (this.deferCanceled) {
       this.deferCanceled.resolve();
     }
   },
 
   /**
    * Implements "DownloadSaver.removePartialData".
    */
-  removePartialData: function()
+  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: function()
+  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: function()
+  getSha256Hash()
   {
     if (this.copySaver) {
       return this.copySaver.getSha256Hash();
     }
     return this._sha256Hash;
   },
 
   /**
    * Called by the nsITransfer implementation when the hash is available.
    */
-  setSha256Hash: function(hash)
+  setSha256Hash(hash)
   {
     this._sha256Hash = hash;
   },
 
   /**
    * Implements "DownloadSaver.getSignatureInfo".
    */
-  getSignatureInfo: function()
+  getSignatureInfo()
   {
     if (this.copySaver) {
       return this.copySaver.getSignatureInfo();
     }
     return this._signatureInfo;
   },
 
   /**
    * Called by the nsITransfer implementation when the hash is available.
    */
-  setSignatureInfo: function(signatureInfo)
+  setSignatureInfo(signatureInfo)
   {
     this._signatureInfo = signatureInfo;
   },
 
   /**
    * Implements "DownloadSaver.getRedirects".
    */
-  getRedirects: function()
+  getRedirects()
   {
     if (this.copySaver) {
       return this.copySaver.getRedirects();
     }
     return this._redirects;
   },
 
   /**
    * Called by the nsITransfer implementation when the redirect chain is
    * available.
    */
-  setRedirects: function(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
@@ -2741,17 +2741,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: function(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,
         });
       }
@@ -2796,34 +2796,34 @@ this.DownloadPDFSaver.prototype = {
       printSettings.footerStrRight = "";
 
       this._webBrowserPrint = win.QueryInterface(Ci.nsIInterfaceRequestor)
                                  .getInterface(Ci.nsIWebBrowserPrint);
 
       try {
         yield new Promise((resolve, reject) => {
           this._webBrowserPrint.print(printSettings, {
-            onStateChange: function(webProgress, request, stateFlags, status) {
+            onStateChange(webProgress, request, stateFlags, status) {
               if (stateFlags & Ci.nsIWebProgressListener.STATE_STOP) {
                 if (!Components.isSuccessCode(status)) {
                   reject(new DownloadError({ result: status,
                                              inferCause: true }));
                 } else {
                   resolve();
                 }
               }
             },
-            onProgressChange: function(webProgress, request, curSelfProgress,
+            onProgressChange(webProgress, request, curSelfProgress,
                                        maxSelfProgress, curTotalProgress,
                                        maxTotalProgress) {
               aSetProgressBytesFn(curTotalProgress, maxTotalProgress, false);
             },
-            onLocationChange: function() {},
-            onStatusChange: function() {},
-            onSecurityChange: function() {},
+            onLocationChange() {},
+            onStatusChange() {},
+            onSecurityChange() {},
           });
         });
       } finally {
         // Remove the print object to avoid leaks
         this._webBrowserPrint = null;
       }
 
       let fileInfo = yield OS.File.stat(targetPath);
@@ -2840,17 +2840,17 @@ this.DownloadPDFSaver.prototype = {
       this._webBrowserPrint.cancel();
       this._webBrowserPrint = null;
     }
   },
 
   /**
    * Implements "DownloadSaver.toSerializable".
    */
-  toSerializable: function()
+  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.
--- a/toolkit/components/jsdownloads/src/DownloadImport.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadImport.jsm
@@ -63,17 +63,17 @@ this.DownloadImport.prototype = {
    * format (supporting schemas 7 and up), to the new Download object
    * format. Each imported download will be added to the DownloadList
    *
    * @return {Promise}
    * @resolves When the operation has completed (i.e., every download
    *           from the previous database has been read and added to
    *           the DownloadList)
    */
-  import: function() {
+  import() {
     return Task.spawn(function* task_DI_import() {
       let connection = yield Sqlite.openConnection({ path: this.path });
 
       try {
         let schemaVersion = yield connection.getSchemaVersion();
         // We don't support schemas older than version 7 (from 2007)
         // - Version 7 added the columns mimeType, preferredApplication
         //   and preferredAction in 2007
@@ -137,31 +137,31 @@ this.DownloadImport.prototype = {
             let targetPath = NetUtil.newURI(target)
                                     .QueryInterface(Ci.nsIFileURL).file.path;
 
             let launchWhenSucceeded = (preferredAction != Ci.nsIMIMEInfo.saveToDisk);
 
             let downloadOptions = {
               source: {
                 url: source,
-                referrer: referrer
+                referrer
               },
               target: {
                 path: targetPath,
                 partFilePath: tempPath,
               },
               saver: {
                 type: "copy",
-                entityID: entityID
+                entityID
               },
               startTime: new Date(startTime / 1000),
               totalBytes: maxBytes,
               hasPartialData: !!tempPath,
               tryToKeepPartialData: true,
-              launchWhenSucceeded: launchWhenSucceeded,
+              launchWhenSucceeded,
               contentType: mimeType,
               launcherPath: preferredApplication
             };
 
             // Paused downloads that should not be auto-resumed are considered
             // in a "canceled" state.
             if (!resumeDownload) {
               downloadOptions.canceled = true;
--- a/toolkit/components/jsdownloads/src/DownloadLegacy.js
+++ b/toolkit/components/jsdownloads/src/DownloadLegacy.js
@@ -161,17 +161,17 @@ DownloadLegacyTransfer.prototype = {
                                                   aCurTotalProgress,
                                                   aMaxTotalProgress)
   {
     this.onProgressChange64(aWebProgress, aRequest, aCurSelfProgress,
                             aMaxSelfProgress, aCurTotalProgress,
                             aMaxTotalProgress);
   },
 
-  onLocationChange: function() { },
+  onLocationChange() { },
 
   onStatusChange: function DLT_onStatusChange(aWebProgress, aRequest, aStatus,
                                               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)) {
@@ -179,17 +179,17 @@ DownloadLegacyTransfer.prototype = {
 
       // Wait for the associated Download object to be available.
       this._deferDownload.promise.then(function DLT_OSC_onDownload(aDownload) {
         aDownload.saver.onTransferFinished(aRequest, aStatus);
       }).then(null, Cu.reportError);
     }
   },
 
-  onSecurityChange: function() { },
+  onSecurityChange() { },
 
   // nsIWebProgressListener2
 
   onProgressChange64: function DLT_onProgressChange64(aWebProgress, aRequest,
                                                       aCurSelfProgress,
                                                       aMaxSelfProgress,
                                                       aCurTotalProgress,
                                                       aMaxTotalProgress)
@@ -232,19 +232,19 @@ DownloadLegacyTransfer.prototype = {
     // Create a new Download object associated to a DownloadLegacySaver, and
     // wait for it to be available.  This operation may cause the entire
     // download system to initialize before the object is created.
     Downloads.createDownload({
       source: { url: aSource.spec, isPrivate: aIsPrivate },
       target: { path: aTarget.QueryInterface(Ci.nsIFileURL).file.path,
                 partFilePath: aTempFile && aTempFile.path },
       saver: "legacy",
-      launchWhenSucceeded: launchWhenSucceeded,
-      contentType: contentType,
-      launcherPath: launcherPath
+      launchWhenSucceeded,
+      contentType,
+      launcherPath
     }).then(function DLT_I_onDownload(aDownload) {
       // Legacy components keep partial data when they use a ".part" file.
       if (aTempFile) {
         aDownload.tryToKeepPartialData = true;
       }
 
       // Start the download before allowing it to be controlled.  Ignore errors.
       aDownload.start().catch(() => {});
@@ -252,27 +252,27 @@ 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: function(hash)
+  setSha256Hash(hash)
   {
     this._sha256Hash = hash;
   },
 
-  setSignatureInfo: function(signatureInfo)
+  setSignatureInfo(signatureInfo)
   {
     this._signatureInfo = signatureInfo;
   },
 
-  setRedirects: function(redirects)
+  setRedirects(redirects)
   {
     this._redirects = redirects;
   },
 
   // Private methods and properties
 
   /**
    * This deferred object contains a promise that is resolved with the Download
--- a/toolkit/components/jsdownloads/src/DownloadList.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadList.jsm
@@ -199,17 +199,17 @@ this.DownloadList.prototype = {
   /**
    * Notifies all the views of a download addition, change, or removal.
    *
    * @param aMethodName
    *        String containing the name of the method to call on the view.
    * @param aDownload
    *        The Download object that changed.
    */
-  _notifyAllViews: function(aMethodName, aDownload) {
+  _notifyAllViews(aMethodName, aDownload) {
     for (let view of this._views) {
       try {
         if (aMethodName in view) {
           view[aMethodName](aDownload);
         }
       } catch (ex) {
         Cu.reportError(ex);
       }
@@ -300,17 +300,17 @@ this.DownloadCombinedList.prototype = {
    *
    * @param aDownload
    *        The Download object to add.
    *
    * @return {Promise}
    * @resolves When the download has been added.
    * @rejects JavaScript exception.
    */
-  add: function(aDownload)
+  add(aDownload)
   {
     if (aDownload.source.isPrivate) {
       return this._privateList.add(aDownload);
     }
     return this._publicList.add(aDownload);
   },
 
   /**
@@ -324,38 +324,38 @@ this.DownloadCombinedList.prototype = {
    *
    * @param aDownload
    *        The Download object to remove.
    *
    * @return {Promise}
    * @resolves When the download has been removed.
    * @rejects JavaScript exception.
    */
-  remove: function(aDownload)
+  remove(aDownload)
   {
     if (aDownload.source.isPrivate) {
       return this._privateList.remove(aDownload);
     }
     return this._publicList.remove(aDownload);
   },
 
   // DownloadList view
 
-  onDownloadAdded: function(aDownload)
+  onDownloadAdded(aDownload)
   {
     this._downloads.push(aDownload);
     this._notifyAllViews("onDownloadAdded", aDownload);
   },
 
-  onDownloadChanged: function(aDownload)
+  onDownloadChanged(aDownload)
   {
     this._notifyAllViews("onDownloadChanged", aDownload);
   },
 
-  onDownloadRemoved: function(aDownload)
+  onDownloadRemoved(aDownload)
   {
     let index = this._downloads.indexOf(aDownload);
     if (index != -1) {
       this._downloads.splice(index, 1);
     }
     this._notifyAllViews("onDownloadRemoved", aDownload);
   },
 };
@@ -391,17 +391,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: function(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.
@@ -427,17 +427,17 @@ this.DownloadSummary.prototype = {
    *          },
    *        }
    *
    * @return {Promise}
    * @resolves When the view has been registered and the onSummaryChanged
    *           notification has been sent.
    * @rejects JavaScript exception.
    */
-  addView: function(aView)
+  addView(aView)
   {
     this._views.add(aView);
 
     if ("onSummaryChanged" in aView) {
       try {
         aView.onSummaryChanged();
       } catch (ex) {
         Cu.reportError(ex);
@@ -453,17 +453,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: function(aView)
+  removeView(aView)
   {
     this._views.delete(aView);
 
     return Promise.resolve();
   },
 
   /**
    * Indicates whether all the downloads are currently stopped.
@@ -489,17 +489,17 @@ this.DownloadSummary.prototype = {
    */
   progressCurrentBytes: 0,
 
   /**
    * This function is called when any change in the list of downloads occurs,
    * and will recalculate the summary and notify the views in case the
    * aggregated properties are different.
    */
-  _onListChanged: function() {
+  _onListChanged() {
     let allHaveStopped = true;
     let progressTotalBytes = 0;
     let progressCurrentBytes = 0;
 
     // Recalculate the aggregated state.  See the description of the individual
     // properties for an explanation of the summarization logic.
     for (let download of this._downloads) {
       if (!download.stopped) {
@@ -530,30 +530,30 @@ this.DownloadSummary.prototype = {
       } catch (ex) {
         Cu.reportError(ex);
       }
     }
   },
 
   // DownloadList view
 
-  onDownloadAdded: function(aDownload)
+  onDownloadAdded(aDownload)
   {
     this._downloads.push(aDownload);
     if (this._list) {
       this._onListChanged();
     }
   },
 
-  onDownloadChanged: function(aDownload)
+  onDownloadChanged(aDownload)
   {
     this._onListChanged();
   },
 
-  onDownloadRemoved: function(aDownload)
+  onDownloadRemoved(aDownload)
   {
     let index = this._downloads.indexOf(aDownload);
     if (index != -1) {
       this._downloads.splice(index, 1);
     }
     this._onListChanged();
   },
 };
--- a/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
@@ -58,17 +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: function(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
@@ -134,17 +134,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: function(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);
       }
--- a/toolkit/components/jsdownloads/src/Downloads.jsm
+++ b/toolkit/components/jsdownloads/src/Downloads.jsm
@@ -134,17 +134,17 @@ this.Downloads = {
    *          isPrivate: Indicates whether the download originated from a
    *                     private window.
    *        }
    *
    * @return {Promise}
    * @resolves When the download has finished successfully.
    * @rejects JavaScript exception if the download failed.
    */
-  fetch: function(aSource, aTarget, aOptions) {
+  fetch(aSource, aTarget, aOptions) {
     return this.createDownload({
       source: aSource,
       target: aTarget,
     }).then(function D_SD_onSuccess(aDownload) {
       if (aOptions && ("isPrivate" in aOptions)) {
         aDownload.source.isPrivate = aOptions.isPrivate;
       }
       return aDownload.start();
@@ -165,17 +165,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: function(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 {
@@ -227,17 +227,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: function(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/unit/common_test_Download.js
+++ b/toolkit/components/jsdownloads/test/unit/common_test_Download.js
@@ -195,17 +195,17 @@ add_task(function* test_basic()
     do_check_eq(download.source.url, httpUrl("source.txt"));
     do_check_eq(download.target.path, targetFile.path);
 
     yield download.start();
   } else {
     // When testing DownloadLegacySaver, the download is already started when it
     // is created, thus we must check its basic properties while in progress.
     download = yield promiseStartLegacyDownload(null,
-                                                { targetFile: targetFile });
+                                                { targetFile });
 
     do_check_eq(download.source.url, httpUrl("source.txt"));
     do_check_eq(download.target.path, targetFile.path);
 
     yield promiseDownloadStopped(download);
   }
 
   // Check additional properties on the finished download.
@@ -1386,17 +1386,17 @@ add_task(function* test_error_target()
         });
         yield download.start();
       } else {
         // When testing DownloadLegacySaver, we cannot be sure whether we are
         // testing the promise returned by the "start" method or we are testing
         // the "error" property checked by promiseDownloadStopped.  This happens
         // because we don't have control over when the download is started.
         download = yield promiseStartLegacyDownload(null,
-                                                    { targetFile: targetFile });
+                                                    { targetFile });
         yield promiseDownloadStopped(download);
       }
       do_throw("The download should have failed.");
     } catch (ex) {
       if (!(ex instanceof Downloads.Error) || !ex.becauseTargetFailed) {
         throw ex;
       }
       // A specific error object is thrown when writing to the target fails.
@@ -1433,17 +1433,17 @@ add_task(function* test_error_restart()
     if (!gUseLegacySaver) {
       download = yield Downloads.createDownload({
         source: httpUrl("source.txt"),
         target: targetFile,
       });
       download.start().catch(() => {});
     } else {
       download = yield promiseStartLegacyDownload(null,
-                                                  { targetFile: targetFile });
+                                                  { targetFile });
     }
     yield promiseDownloadStopped(download);
     do_throw("The download should have failed.");
   } catch (ex) {
     if (!(ex instanceof Downloads.Error) || !ex.becauseTargetFailed) {
       throw ex;
     }
     // A specific error object is thrown when writing to the target fails.
@@ -2162,17 +2162,17 @@ add_task(function* test_launch() {
   for (let launcherPath of [null, customLauncher.path]) {
     let download;
     if (!gUseLegacySaver) {
       // When testing DownloadCopySaver, we have control over the download, thus
       // we can test that file is not launched if download.succeeded is not set.
       download = yield Downloads.createDownload({
         source: httpUrl("source.txt"),
         target: getTempFile(TEST_TARGET_FILE_NAME).path,
-        launcherPath: launcherPath,
+        launcherPath,
         launchWhenSucceeded: true
       });
 
       try {
         yield download.launch();
         do_throw("Can't launch download file as it has not completed yet");
       } catch (ex) {
         do_check_eq(ex.message,
@@ -2180,17 +2180,17 @@ add_task(function* test_launch() {
       }
 
       yield download.start();
     } else {
       // When testing DownloadLegacySaver, the download is already started when
       // it is created, thus we don't test calling "launch" before starting.
       download = yield promiseStartLegacyDownload(
                                          httpUrl("source.txt"),
-                                         { launcherPath: launcherPath,
+                                         { launcherPath,
                                            launchWhenSucceeded: true });
       yield promiseDownloadStopped(download);
     }
 
     do_check_true(download.launchWhenSucceeded);
 
     let promiseFileLaunched = waitForFileLaunched();
     download.launch();
@@ -2261,23 +2261,23 @@ add_task(function* test_launchWhenSuccee
   for (let launcherPath of [null, customLauncher.path]) {
     let promiseFileLaunched = waitForFileLaunched();
 
     if (!gUseLegacySaver) {
       let download = yield Downloads.createDownload({
         source: httpUrl("source.txt"),
         target: getTempFile(TEST_TARGET_FILE_NAME).path,
         launchWhenSucceeded: true,
-        launcherPath: launcherPath,
+        launcherPath,
       });
       yield download.start();
     } else {
       let download = yield promiseStartLegacyDownload(
                                              httpUrl("source.txt"),
-                                             { launcherPath: launcherPath,
+                                             { launcherPath,
                                                launchWhenSucceeded: true });
       yield promiseDownloadStopped(download);
     }
 
     let result = yield promiseFileLaunched;
 
     // Verify that the results match the test case.
     if (!launcherPath) {
@@ -2333,17 +2333,17 @@ add_task(function* test_platform_integra
   let oldDeviceStorageEnabled = false;
   try {
      oldDeviceStorageEnabled = Services.prefs.getBoolPref("device.storage.enabled");
   } catch (e) {
     // This happens if the pref doesn't exist.
   }
   let downloadWatcherNotified = false;
   let observer = {
-    observe: function(subject, topic, data) {
+    observe(subject, topic, data) {
       do_check_eq(topic, "download-watcher-notify");
       do_check_eq(data, "modified");
       downloadWatcherNotified = true;
     }
   }
   Services.obs.addObserver(observer, "download-watcher-notify", false);
   Services.prefs.setBoolPref("device.storage.enabled", true);
   let downloadDoneCalled = false;
--- a/toolkit/components/jsdownloads/test/unit/head.js
+++ b/toolkit/components/jsdownloads/test/unit/head.js
@@ -198,30 +198,30 @@ function promiseTimeout(aTime)
 function promiseWaitForVisit(aUrl)
 {
   let deferred = Promise.defer();
 
   let uri = NetUtil.newURI(aUrl);
 
   PlacesUtils.history.addObserver({
     QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver]),
-    onBeginUpdateBatch: function() {},
-    onEndUpdateBatch: function() {},
-    onVisit: function(aURI, aVisitID, aTime, aSessionID, aReferringID,
+    onBeginUpdateBatch() {},
+    onEndUpdateBatch() {},
+    onVisit(aURI, aVisitID, aTime, aSessionID, aReferringID,
                       aTransitionType, aGUID, aHidden) {
       if (aURI.equals(uri)) {
         PlacesUtils.history.removeObserver(this);
         deferred.resolve([aTime, aTransitionType]);
       }
     },
-    onTitleChanged: function() {},
-    onDeleteURI: function() {},
-    onClearHistory: function() {},
-    onPageChanged: function() {},
-    onDeleteVisits: function() {},
+    onTitleChanged() {},
+    onDeleteURI() {},
+    onClearHistory() {},
+    onPageChanged() {},
+    onDeleteVisits() {},
   }, false);
 
   return deferred.promise;
 }
 
 /**
  * Check browsing history to see whether the given URI has been visited.
  *
@@ -337,17 +337,17 @@ function promiseStartLegacyDownload(aSou
   let transfer = Cc["@mozilla.org/transfer;1"].createInstance(Ci.nsITransfer);
 
   let deferred = Promise.defer();
 
   Downloads.getList(Downloads.ALL).then(function(aList) {
     // Temporarily register a view that will get notified when the download we
     // are controlling becomes visible in the list of downloads.
     aList.addView({
-      onDownloadAdded: function(aDownload) {
+      onDownloadAdded(aDownload) {
         aList.removeView(this).then(null, do_report_unexpected_exception);
 
         // Remove the download to keep the list empty for the next test.  This
         // also allows the caller to register the "onchange" event directly.
         let promise = aList.remove(aDownload);
 
         // When the download object is ready, make it available to the caller.
         promise.then(() => deferred.resolve(aDownload),
@@ -390,17 +390,17 @@ function promiseStartExternalHelperAppSe
                                  httpUrl("interruptible_resumable.txt"));
 
   let deferred = Promise.defer();
 
   Downloads.getList(Downloads.PUBLIC).then(function(aList) {
     // Temporarily register a view that will get notified when the download we
     // are controlling becomes visible in the list of downloads.
     aList.addView({
-      onDownloadAdded: function(aDownload) {
+      onDownloadAdded(aDownload) {
         aList.removeView(this).then(null, do_report_unexpected_exception);
 
         // Remove the download to keep the list empty for the next test.  This
         // also allows the caller to register the "onchange" event directly.
         let promise = aList.remove(aDownload);
 
         // When the download object is ready, make it available to the caller.
         promise.then(() => deferred.resolve(aDownload),
@@ -412,30 +412,30 @@ function promiseStartExternalHelperAppSe
       uri: sourceURI,
       loadUsingSystemPrincipal: true
     });
 
     // Start the actual download process.
     channel.asyncOpen2({
       contentListener: null,
 
-      onStartRequest: function(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: function(aRequest, aContext, aStatusCode)
+      onStopRequest(aRequest, aContext, aStatusCode)
       {
         this.contentListener.onStopRequest(aRequest, aContext, aStatusCode);
       },
 
-      onDataAvailable: function(aRequest, aContext, aInputStream, aOffset,
+      onDataAvailable(aRequest, aContext, aInputStream, aOffset,
                                 aCount)
       {
         this.contentListener.onDataAvailable(aRequest, aContext, aInputStream,
                                              aOffset, aCount);
       },
     });
   }.bind(this)).then(null, do_report_unexpected_exception);
 
@@ -572,20 +572,20 @@ function promiseVerifyContents(aPath, aE
  *
  * @returns nsIServerSocket that listens for connections.  Call its "close"
  *          method to stop listening and free the server port.
  */
 function startFakeServer()
 {
   let serverSocket = new ServerSocket(-1, true, -1);
   serverSocket.asyncListen({
-    onSocketAccepted: function(aServ, aTransport) {
+    onSocketAccepted(aServ, aTransport) {
       aTransport.close(Cr.NS_BINDING_ABORTED);
     },
-    onStopListening: function() { },
+    onStopListening() { },
   });
   return serverSocket;
 }
 
 /**
  * This is an internal reference that should not be used directly by tests.
  */
 var _gDeferResponses = Promise.defer();
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadImport.js
+++ b/toolkit/components/jsdownloads/test/unit/test_DownloadImport.js
@@ -164,32 +164,32 @@ function promiseEntityID(aUrl) {
   let deferred = Promise.defer();
   let entityID = "";
   let channel = NetUtil.newChannel({
     uri: NetUtil.newURI(aUrl),
     loadUsingSystemPrincipal: true
   });
 
   channel.asyncOpen2({
-    onStartRequest: function(aRequest) {
+    onStartRequest(aRequest) {
       if (aRequest instanceof Ci.nsIResumableChannel) {
         entityID = aRequest.entityID;
       }
       aRequest.cancel(Cr.NS_BINDING_ABORTED);
     },
 
-    onStopRequest: function(aRequest, aContext, aStatusCode) {
+    onStopRequest(aRequest, aContext, aStatusCode) {
       if (aStatusCode == Cr.NS_BINDING_ABORTED) {
         deferred.resolve(entityID);
       } else {
         deferred.reject("Unexpected status code received");
       }
     },
 
-    onDataAvailable: function() {}
+    onDataAvailable() {}
   });
 
   return deferred.promise;
 }
 
 /**
  * Gets a file path to a temporary writeable download target, in the
  * correct format as expected to be stored in the downloads database,
--- a/toolkit/components/jsdownloads/test/unit/test_DownloadList.js
+++ b/toolkit/components/jsdownloads/test/unit/test_DownloadList.js
@@ -51,17 +51,17 @@ function promiseExpirableDownloadVisit(a
       }]
     },
     {
       handleError: function handleError(aResultCode, aPlaceInfo) {
         let ex = new Components.Exception("Unexpected error in adding visits.",
                                           aResultCode);
         deferred.reject(ex);
       },
-      handleResult: function() {},
+      handleResult() {},
       handleCompletion: function handleCompletion() {
         deferred.resolve();
       }
     });
   return deferred.promise;
 }
 
 // Tests
@@ -187,17 +187,17 @@ add_task(function* test_notifications_ad
       target: getTempFile(TEST_TARGET_FILE_NAME).path,
     });
     yield list.add(downloadOne);
     yield list.add(downloadTwo);
 
     // Check that we receive add notifications for existing elements.
     let addNotifications = 0;
     let viewOne = {
-      onDownloadAdded: function(aDownload) {
+      onDownloadAdded(aDownload) {
         // The first download to be notified should be the first that was added.
         if (addNotifications == 0) {
           do_check_eq(aDownload, downloadOne);
         } else if (addNotifications == 1) {
           do_check_eq(aDownload, downloadTwo);
         }
         addNotifications++;
       },
@@ -207,17 +207,17 @@ add_task(function* test_notifications_ad
 
     // Check that we receive add notifications for new elements.
     yield list.add(yield promiseNewDownload());
     do_check_eq(addNotifications, 3);
 
     // Check that we receive remove notifications.
     let removeNotifications = 0;
     let viewTwo = {
-      onDownloadRemoved: function(aDownload) {
+      onDownloadRemoved(aDownload) {
         do_check_eq(aDownload, downloadOne);
         removeNotifications++;
       },
     };
     yield list.addView(viewTwo);
     yield list.remove(downloadOne);
     do_check_eq(removeNotifications, 1);
 
@@ -252,17 +252,17 @@ add_task(function* test_notifications_ch
       target: getTempFile(TEST_TARGET_FILE_NAME).path,
     });
     yield list.add(downloadOne);
     yield list.add(downloadTwo);
 
     // Check that we receive change notifications.
     let receivedOnDownloadChanged = false;
     yield list.addView({
-      onDownloadChanged: function(aDownload) {
+      onDownloadChanged(aDownload) {
         do_check_eq(aDownload, downloadOne);
         receivedOnDownloadChanged = true;
       },
     });
     yield downloadOne.start();
     do_check_true(receivedOnDownloadChanged);
 
     // We should not receive change notifications after a download is removed.
@@ -280,28 +280,28 @@ add_task(function* test_notifications_th
 {
   let list = yield promiseNewList();
 
   // Check that we receive change notifications.
   let receivedOnDownloadAdded = false;
   let receivedOnDownloadChanged = false;
   let receivedOnDownloadRemoved = false;
   let view = {
-    onDownloadAdded: function() {
+    onDownloadAdded() {
       do_check_eq(this, view);
       receivedOnDownloadAdded = true;
     },
-    onDownloadChanged: function() {
+    onDownloadChanged() {
       // Only do this check once.
       if (!receivedOnDownloadChanged) {
         do_check_eq(this, view);
         receivedOnDownloadChanged = true;
       }
     },
-    onDownloadRemoved: function() {
+    onDownloadRemoved() {
       do_check_eq(this, view);
       receivedOnDownloadRemoved = true;
     },
   };
   yield list.addView(view);
 
   let download = yield promiseNewDownload();
   yield list.add(download);
@@ -331,17 +331,17 @@ add_task(function* test_history_expirati
 
   let list = yield promiseNewList();
   let downloadOne = yield promiseNewDownload();
   let downloadTwo = yield promiseNewDownload(httpUrl("interruptible.txt"));
 
   let deferred = Promise.defer();
   let removeNotifications = 0;
   let downloadView = {
-    onDownloadRemoved: function(aDownload) {
+    onDownloadRemoved(aDownload) {
       if (++removeNotifications == 2) {
         deferred.resolve();
       }
     },
   };
   yield list.addView(downloadView);
 
   // Work with one finished download and one canceled download.
@@ -378,17 +378,17 @@ add_task(function* test_history_clear()
   let downloadOne = yield promiseNewDownload();
   let downloadTwo = yield promiseNewDownload();
   yield list.add(downloadOne);
   yield list.add(downloadTwo);
 
   let deferred = Promise.defer();
   let removeNotifications = 0;
   let downloadView = {
-    onDownloadRemoved: function(aDownload) {
+    onDownloadRemoved(aDownload) {
       if (++removeNotifications == 2) {
         deferred.resolve();
       }
     },
   };
   yield list.addView(downloadView);
 
   yield downloadOne.start();
@@ -414,17 +414,17 @@ add_task(function* test_removeFinished()
   yield list.add(downloadOne);
   yield list.add(downloadTwo);
   yield list.add(downloadThree);
   yield list.add(downloadFour);
 
   let deferred = Promise.defer();
   let removeNotifications = 0;
   let downloadView = {
-    onDownloadRemoved: function(aDownload) {
+    onDownloadRemoved(aDownload) {
       do_check_true(aDownload == downloadOne ||
                     aDownload == downloadTwo ||
                     aDownload == downloadThree);
       do_check_true(removeNotifications < 3);
       if (++removeNotifications == 3) {
         deferred.resolve();
       }
     },
@@ -550,15 +550,15 @@ add_task(function* test_DownloadSummary_
   let summary = yield Downloads.getSummary(Downloads.ALL);
 
   let download = yield promiseNewDownload();
   yield list.add(download);
 
   // Check that we receive change notifications.
   let receivedOnSummaryChanged = false;
   yield summary.addView({
-    onSummaryChanged: function() {
+    onSummaryChanged() {
       receivedOnSummaryChanged = true;
     },
   });
   yield download.start();
   do_check_true(receivedOnSummaryChanged);
 });
--- a/toolkit/components/lz4/lz4.js
+++ b/toolkit/components/lz4/lz4.js
@@ -145,12 +145,12 @@ function decompressFileContent(array, op
       `Invalid content: Decompression stopped at ${decompressedBytes.value} - Data: ${ options.path || array }`);
   }
   return new Uint8Array(outputBuffer.buffer, outputBuffer.byteOffset, decompressedBytes.value);
 }
 exports.decompressFileContent = decompressFileContent;
 
 if (typeof Components != "undefined") {
   this.Lz4 = {
-    compressFileContent: compressFileContent,
-    decompressFileContent: decompressFileContent
+    compressFileContent,
+    decompressFileContent
   };
 }
--- a/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
+++ b/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js
@@ -40,44 +40,44 @@ const tests = [
     flags: Ci.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS },
   { contentType: "application/something",
     expectedContentType: "application/something",
     flags: Ci.nsIChannel.LOAD_CALL_CONTENT_SNIFFERS },
 ];
 
 // A basic listener that reads checks the if we sniffed properly.
 var listener = {
-  onStartRequest: function(request, context) {
+  onStartRequest(request, context) {
     do_check_eq(request.QueryInterface(Ci.nsIChannel).contentType,
                 tests[testRan].expectedContentType);
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable(request, context, stream, offset, count) {
     try {
       var bis = Components.classes["@mozilla.org/binaryinputstream;1"]
                           .createInstance(Components.interfaces.nsIBinaryInputStream);
       bis.setInputStream(stream);
       bis.readByteArray(bis.available());
     } catch (ex) {
       do_throw("Error in onDataAvailable: " + ex);
     }
   },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest(request, context, status) {
     testRan++;
     runNext();
   }
 };
 
 function setupChannel(url, flags)
 {
   let uri = "http://localhost:" +
              httpserver.identity.primaryPort + url;
   var chan = NetUtil.newChannel({
-    uri: uri,
+    uri,
     loadUsingSystemPrincipal: true,
     contentPolicyType: Ci.nsIContentPolicy.TYPE_MEDIA
   });
   chan.loadFlags |= flags;
   var httpChan = chan.QueryInterface(Components.interfaces.nsIHttpChannel);
   return httpChan;
 }
 
--- a/toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js
+++ b/toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js
@@ -41,33 +41,33 @@ const tests = [
   // Truncated ff installer regression test for bug 875769.
   { path: "data/ff-inst.exe", expected: "application/octet-stream" },
   // MP4 with invalid box size (0) for "ftyp".
   { path: "data/bug1079747.mp4", expected: "application/octet-stream" },
 ];
 
 // A basic listener that reads checks the if we sniffed properly.
 var listener = {
-  onStartRequest: function(request, context) {
+  onStartRequest(request, context) {
     do_print("Sniffing " + tests[testRan].path);
     do_check_eq(request.QueryInterface(Ci.nsIChannel).contentType, tests[testRan].expected);
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable(request, context, stream, offset, count) {
     try {
       var bis = Components.classes["@mozilla.org/binaryinputstream;1"]
                           .createInstance(Components.interfaces.nsIBinaryInputStream);
       bis.setInputStream(stream);
       bis.readByteArray(bis.available());
     } catch (ex) {
       do_throw("Error in onDataAvailable: " + ex);
     }
   },
 
-  onStopRequest: function(request, context, status) {
+  onStopRequest(request, context, status) {
     testRan++;
     runNext();
   }
 };
 
 function setupChannel(url) {
   var chan = NetUtil.newChannel({
     uri: "http://localhost:" + httpserver.identity.primaryPort + url,
--- a/toolkit/components/microformats/microformat-shiv.js
+++ b/toolkit/components/microformats/microformat-shiv.js
@@ -38,17 +38,17 @@ var Microformats; // jshint ignore:line
 
     // create objects incase the v1 map modules don't load
     modules.maps = (modules.maps) ? modules.maps : {};
     modules.rels = (modules.rels) ? modules.rels : {};
 
 
     modules.Parser.prototype = {
 
-        init: function() {
+        init() {
             this.rootNode = null;
             this.document = null;
             this.options = {
                 'baseUrl': '',
                 'filters': [],
                 'textFormat': 'whitespacetrimmed',
                 'dateFormat': 'auto', // html5 for testing
                 'overlappingVersions': false,
@@ -62,17 +62,17 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * internal parse function
          *
          * @param  {Object} options
          * @return {Object}
          */
-        get: function(options) {
+        get(options) {
             var out = this.formatEmpty(),
                 data = [],
                 rels;
 
             this.init();
             options = (options) ? options : {};
             this.mergeOptions(options);
             this.getDOMContext( options );
@@ -121,17 +121,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * parse to get parent microformat of passed node
          *
          * @param  {DOM Node} node
          * @param  {Object} options
          * @return {Object}
          */
-        getParent: function(node, options) {
+        getParent(node, options) {
             this.init();
             options = (options) ? options : {};
 
             if (node) {
                 return this.getParentTreeWalk(node, options);
             }
             this.errors.push(this.noContentErr);
             return this.formatError();
@@ -139,17 +139,17 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * get the count of microformats
          *
          * @param  {DOM Node} rootNode
          * @return {Int}
          */
-        count: function( options ) {
+        count( options ) {
             var out = {},
                 items,
                 classItems,
                 x,
                 i;
 
             this.init();
             options = (options) ? options : {};
@@ -189,17 +189,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * does a node have a class that marks it as a microformats root
          *
          * @param  {DOM Node} node
          * @param  {Objecte} options
          * @return {Boolean}
          */
-        isMicroformat: function( node, options ) {
+        isMicroformat( node, options ) {
             var classes,
                 i;
 
             if (!node) {
                 return false;
             }
 
             // if documemt gets topmost node
@@ -222,17 +222,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * does a node or its children have microformats
          *
          * @param  {DOM Node} node
          * @param  {Objecte} options
          * @return {Boolean}
          */
-        hasMicroformats: function( node, options ) {
+        hasMicroformats( node, options ) {
             var items,
                 i;
 
             if (!node) {
                 return false;
             }
 
             // if browser based documemt get topmost node
@@ -253,34 +253,34 @@ var Microformats; // jshint ignore:line
         },
 
 
         /**
          * add a new v1 mapping object to parser
          *
          * @param  {Array} maps
          */
-        add: function( maps ) {
+        add( maps ) {
             maps.forEach(function(map) {
                 if (map && map.root && map.name && map.properties) {
                 modules.maps[map.name] = JSON.parse(JSON.stringify(map));
                 }
             });
         },
 
 
         /**
          * internal parse to get parent microformats by walking up the tree
          *
          * @param  {DOM Node} node
          * @param  {Object} options
          * @param  {Int} recursive
          * @return {Object}
          */
-        getParentTreeWalk: function(node, options, recursive) {
+        getParentTreeWalk(node, options, recursive) {
             options = (options) ? options : {};
 
             // recursive calls
             if (recursive === undefined) {
                 if (node.parentNode && node.nodeName !== 'HTML') {
                     return this.getParentTreeWalk(node.parentNode, options, true);
                 }
                 return this.formatEmpty();
@@ -298,30 +298,30 @@ var Microformats; // jshint ignore:line
 
 
 
         /**
          * configures what are the base DOM objects for parsing
          *
          * @param  {Object} options
          */
-        getDOMContext: function( options ) {
+        getDOMContext( options ) {
             var nodes = modules.domUtils.getDOMContext( options );
             this.rootNode = nodes.rootNode;
             this.document = nodes.document;
         },
 
 
         /**
          * prepares DOM before the parse begins
          *
          * @param  {Object} options
          * @return {Boolean}
          */
-        prepareDOM: function( options ) {
+        prepareDOM( options ) {
             var baseTag,
                 href;
 
             // use current document to define baseUrl, try/catch needed for IE10+ error
             try {
                 if (!options.baseUrl && this.document && this.document.location) {
                     this.options.baseUrl = this.document.location.href;
                 }
@@ -365,39 +365,39 @@ var Microformats; // jshint ignore:line
         },
 
 
         /**
          * returns an empty structure with errors
          *
          *   @return {Object}
          */
-        formatError: function() {
+        formatError() {
             var out = this.formatEmpty();
             out.errors = this.errors;
             return out;
         },
 
 
         /**
          * returns an empty structure
          *
          *   @return {Object}
          */
-        formatEmpty: function() {
+        formatEmpty() {
             return {
                 'items': [],
                 'rels': {},
                 'rel-urls': {}
             };
         },
 
 
         // find microformats of a given type and return node structures
-        findFilterNodes: function(rootNode, filters) {
+        findFilterNodes(rootNode, filters) {
             if (modules.utils.isString(filters)) {
                 filters = [filters];
             }
             var newRootNode = modules.domUtils.createNode('div'),
                 items = this.findRootNodes(rootNode, true),
                 i = 0,
                 x = 0,
                 y = 0;
@@ -433,33 +433,33 @@ var Microformats; // jshint ignore:line
 
         /**
          * appends data to output object for count
          *
          * @param  {string} name
          * @param  {Int} count
          * @param  {Object}
          */
-        appendCount: function(name, count, out) {
+        appendCount(name, count, out) {
             if (out[name]) {
                 out[name] = out[name] + count;
             } else {
                 out[name] = count;
             }
         },
 
 
         /**
          * is the microformats type in the filter list
          *
          * @param  {Object} uf
          * @param  {Array} filters
          * @return {Boolean}
          */
-        shouldInclude: function(uf, filters) {
+        shouldInclude(uf, filters) {
             var i;
 
             if (modules.utils.isArray(filters) && filters.length > 0) {
                 i = filters.length;
                 while (i--) {
                     if (uf.type[0] === filters[i]) {
                         return true;
                     }
@@ -472,17 +472,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * finds all microformat roots in a rootNode
          *
          * @param  {DOM Node} rootNode
          * @param  {Boolean} includeRoot
          * @return {Array}
          */
-        findRootNodes: function(rootNode, includeRoot) {
+        findRootNodes(rootNode, includeRoot) {
             var arr = null,
                 out = [],
                 classList = [],
                 items,
                 x,
                 i,
                 y,
                 key;
@@ -533,17 +533,17 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * starts the tree walk to find microformats
          *
          * @param  {DOM Node} node
          * @return {Array}
          */
-        walkRoot: function(node) {
+        walkRoot(node) {
             var context = this,
                 children = [],
                 child,
                 classes,
                 items = [],
                 out = [];
 
             classes = this.getUfClassNames(node);
@@ -572,17 +572,17 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * starts the tree walking for a single microformat
          *
          * @param  {DOM Node} node
          * @return {Array}
          */
-        walkTree: function(node) {
+        walkTree(node) {
             var classes,
                 out = [],
                 obj,
                 itemRootID;
 
             // loop roots found on one element
             classes = this.getUfClassNames(node);
             if (classes && classes.root.length && classes.root.length > 0) {
@@ -607,17 +607,17 @@ var Microformats; // jshint ignore:line
          * finds child properties of microformat
          *
          * @param  {DOM Node} node
          * @param  {Object} out
          * @param  {String} ufName
          * @param  {Int} rootID
          * @param  {Object} parentClasses
          */
-        walkChildren: function(node, out, ufName, rootID, parentClasses) {
+        walkChildren(node, out, ufName, rootID, parentClasses) {
             var context = this,
                 children = [],
                 rootItem,
                 itemRootID,
                 value,
                 propertyName,
                 propertyVersion,
                 i,
@@ -772,17 +772,17 @@ var Microformats; // jshint ignore:line
         /**
          * gets the value of a property from a node
          *
          * @param  {DOM Node} node
          * @param  {String} className
          * @param  {Object} uf
          * @return {String || Object}
          */
-        getValue: function(node, className, uf) {
+        getValue(node, className, uf) {
             var value = '';
 
             if (modules.utils.startWith(className, 'p-')) {
                 value = this.getPValue(node, true);
             }
 
             if (modules.utils.startWith(className, 'e-')) {
                 value = this.getEValue(node);
@@ -801,17 +801,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * gets the value of a node which contains a 'p-' property
          *
          * @param  {DOM Node} node
          * @param  {Boolean} valueParse
          * @return {String}
          */
-        getPValue: function(node, valueParse) {
+        getPValue(node, valueParse) {
             var out = '';
             if (valueParse) {
                 out = this.getValueClass(node, 'p');
             }
 
             if (!out && valueParse) {
                 out = this.getValueTitle(node);
             }
@@ -841,17 +841,17 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * gets the value of a node which contains the 'e-' property
          *
          * @param  {DOM Node} node
          * @return {Object}
          */
-        getEValue: function(node) {
+        getEValue(node) {
 
             var out = {value: '', html: ''};
 
             this.expandURLs(node, 'src', this.options.baseUrl);
             this.expandURLs(node, 'href', this.options.baseUrl);
 
             out.value = modules.text.parse(this.document, node, this.options.textFormat);
             out.html = modules.html.parse(node);
@@ -862,17 +862,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * gets the value of a node which contains the 'u-' property
          *
          * @param  {DOM Node} node
          * @param  {Boolean} valueParse
          * @return {String}
          */
-        getUValue: function(node, valueParse) {
+        getUValue(node, valueParse) {
             var out = '';
             if (valueParse) {
                 out = this.getValueClass(node, 'u');
             }
 
             if (!out && valueParse) {
                 out = this.getValueTitle(node);
             }
@@ -914,17 +914,17 @@ var Microformats; // jshint ignore:line
          * gets the value of a node which contains the 'dt-' property
          *
          * @param  {DOM Node} node
          * @param  {String} className
          * @param  {Object} uf
          * @param  {Boolean} valueParse
          * @return {String}
          */
-        getDTValue: function(node, className, uf, valueParse) {
+        getDTValue(node, className, uf, valueParse) {
             var out = '';
 
             if (valueParse) {
                 out = this.getValueClass(node, 'dt');
             }
 
             if (!out && valueParse) {
                 out = this.getValueTitle(node);
@@ -969,17 +969,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * appends a new rootid to a given node
          *
          * @param  {DOM Node} node
          * @param  {String} id
          * @param  {String} propertyName
          */
-        appendRootID: function(node, id, propertyName) {
+        appendRootID(node, id, propertyName) {
             if (this.hasRootID(node, id, propertyName) === false) {
                 var rootids = [];
                 if (modules.domUtils.hasAttribute(node, 'rootids')) {
                     rootids = modules.domUtils.getAttributeList(node, 'rootids');
                 }
                 rootids.push('id' + id + '-' + propertyName);
                 modules.domUtils.setAttribute(node, 'rootids', rootids.join(' '));
             }
@@ -989,17 +989,17 @@ var Microformats; // jshint ignore:line
         /**
          * does a given node already have a rootid
          *
          * @param  {DOM Node} node
          * @param  {String} id
          * @param  {String} propertyName
          * @return {Boolean}
          */
-        hasRootID: function(node, id, propertyName) {
+        hasRootID(node, id, propertyName) {
             var rootids = [];
             if (!modules.domUtils.hasAttribute(node, 'rootids')) {
                 return false;
             }
             rootids = modules.domUtils.getAttributeList(node, 'rootids');
             return (rootids.indexOf('id' + id + '-' + propertyName) > -1);
         },
 
@@ -1007,17 +1007,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * gets the text of any child nodes with a class value
          *
          * @param  {DOM Node} node
          * @param  {String} propertyName
          * @return {String || null}
          */
-        getValueClass: function(node, propertyType) {
+        getValueClass(node, propertyType) {
             var context = this,
                 children = [],
                 out = [],
                 child,
                 x,
                 i;
 
             children = modules.domUtils.getChildren( node );
@@ -1063,17 +1063,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * returns a single string of the 'title' attr from all
          * the child nodes with the class 'value-title'
          *
          * @param  {DOM Node} node
          * @return {String}
          */
-        getValueTitle: function(node) {
+        getValueTitle(node) {
             var out = [],
                 items,
                 i,
                 x;
 
             items = modules.domUtils.getNodesByAttributeValue(node, 'class', 'value-title');
             x = 0;
             i = items.length;
@@ -1088,33 +1088,33 @@ var Microformats; // jshint ignore:line
 
 
        /**
          * finds out whether a node has h-* class v1 and v2
          *
          * @param  {DOM Node} node
          * @return {Boolean}
          */
-        hasHClass: function(node) {
+        hasHClass(node) {
             var classes = this.getUfClassNames(node);
             if (classes.root && classes.root.length > 0) {
                 return true;
             }
             return false;
         },
 
 
         /**
          * get both the root and property class names from a node
          *
          * @param  {DOM Node} node
          * @param  {Array} ufNameArr
          * @return {Object}
          */
-        getUfClassNames: function(node, ufNameArr) {
+        getUfClassNames(node, ufNameArr) {
             var context = this,
                 out = {
                     'root': [],
                     'properties': []
                 },
                 classNames,
                 key,
                 items,
@@ -1253,34 +1253,34 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * given a v1 or v2 root name, return mapping object
          *
          * @param  {String} name
          * @return {Object || null}
          */
-        getMapping: function(name) {
+        getMapping(name) {
             var key;
             for (key in modules.maps) {
                 if (modules.maps[key].root === name || key === name) {
                     return modules.maps[key];
                 }
             }
             return null;
         },
 
 
         /**
          * given a v1 root name returns a v2 root name i.e. vcard >>> h-card
          *
          * @param  {String} name
          * @return {String || null}
          */
-        getV2RootName: function(name) {
+        getV2RootName(name) {
             var key;
             for (key in modules.maps) {
                 if (modules.maps[key].root === name) {
                     return key;
                 }
             }
             return null;
         },
@@ -1288,32 +1288,32 @@ var Microformats; // jshint ignore:line
 
         /**
          * whether a property is the right microformats version for its root type
          *
          * @param  {String} typeVersion
          * @param  {String} propertyVersion
          * @return {Boolean}
          */
-        isAllowedPropertyVersion: function(typeVersion, propertyVersion) {
+        isAllowedPropertyVersion(typeVersion, propertyVersion) {
             if (this.options.overlappingVersions === true) {
                 return true;
             }
             return (typeVersion === propertyVersion);
         },
 
 
         /**
          * creates a blank microformats object
          *
          * @param  {String} name
          * @param  {String} value
          * @return {Object}
          */
-        createUfObject: function(names, typeVersion, value) {
+        createUfObject(names, typeVersion, value) {
             var out = {};
 
             // is more than just whitespace
             if (value && modules.utils.isOnlyWhiteSpace(value) === false) {
                 out.value = value;
             }
             // add type i.e. ["h-card", "h-org"]
             if (modules.utils.isArray(names)) {
@@ -1332,33 +1332,33 @@ var Microformats; // jshint ignore:line
         },
 
 
         /**
          * removes unwanted microformats property before output
          *
          * @param  {Object} microformat
          */
-        cleanUfObject: function( microformat ) {
+        cleanUfObject( microformat ) {
             delete microformat.times;
             delete microformat.dates;
             delete microformat.typeVersion;
             delete microformat.altValue;
             return microformat;
         },
 
 
 
         /**
          * removes microformat property prefixes from text
          *
          * @param  {String} text
          * @return {String}
          */
-        removePropPrefix: function(text) {
+        removePropPrefix(text) {
             var i;
 
             i = this.propertyPrefixes.length;
             while (i--) {
                 var prefix = this.propertyPrefixes[i];
                 if (modules.utils.startWith(text, prefix)) {
                     text = text.substr(prefix.length);
                 }
@@ -1369,17 +1369,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * expands all relative URLs to absolute ones where it can
          *
          * @param  {DOM Node} node
          * @param  {String} attrName
          * @param  {String} baseUrl
          */
-        expandURLs: function(node, attrName, baseUrl) {
+        expandURLs(node, attrName, baseUrl) {
             var i,
                 nodes,
                 attr;
 
             nodes = modules.domUtils.getNodesByAttribute(node, attrName);
             i = nodes.length;
             while (i--) {
                 try {
@@ -1398,49 +1398,49 @@ var Microformats; // jshint ignore:line
 
 
 
         /**
          * merges passed and default options -single level clone of properties
          *
          * @param  {Object} options
          */
-        mergeOptions: function(options) {
+        mergeOptions(options) {
             var key;
             for (key in options) {
                 if (options.hasOwnProperty(key)) {
                     this.options[key] = options[key];
                 }
             }
         },
 
 
         /**
          * removes all rootid attributes
          *
          * @param  {DOM Node} rootNode
          */
-        removeRootIds: function(rootNode) {
+        removeRootIds(rootNode) {
             var arr,
                 i;
 
             arr = modules.domUtils.getNodesByAttribute(rootNode, 'rootids');
             i = arr.length;
             while (i--) {
                 modules.domUtils.removeAttribute(arr[i], 'rootids');
             }
         },
 
 
         /**
          * removes all changes made to the DOM
          *
          * @param  {DOM Node} rootNode
          */
-        clearUpDom: function(rootNode) {
+        clearUpDom(rootNode) {
             if (this.removeIncludes) {
                 this.removeIncludes(rootNode);
             }
             this.removeRootIds(rootNode);
         }
 
 
     };
@@ -1746,25 +1746,25 @@ var Microformats; // jshint ignore:line
          * @param  {String} propertyName
          * @param  {String} value
          * @return {Object}
          */
         modules.Parser.prototype.getAltValue = function(uf, parentPropertyName, propertyName, value) {
             if (uf.value && !uf.altValue) {
                 // first p-name of the h-* child
                 if (modules.utils.startWith(parentPropertyName, 'p-') && propertyName === 'p-name') {
-                    uf.altValue = {name: propertyName, value: value};
+                    uf.altValue = {name: propertyName, value};
                 }
                 // if it's an e-* property element
                 if (modules.utils.startWith(parentPropertyName, 'e-') && modules.utils.startWith(propertyName, 'e-')) {
-                    uf.altValue = {name: propertyName, value: value};
+                    uf.altValue = {name: propertyName, value};
                 }
                 // if it's an u-* property element
                 if (modules.utils.startWith(parentPropertyName, 'u-') && propertyName === 'u-url') {
-                    uf.altValue = {name: propertyName, value: value};
+                    uf.altValue = {name: propertyName, value};
                 }
             }
             return uf;
         };
 
 
         /**
          * if a h-feed does not have a title use the title tag of a page
@@ -2200,102 +2200,102 @@ var Microformats; // jshint ignore:line
     modules.utils = {
 
         /**
          * is the object a string
          *
          * @param  {Object} obj
          * @return {Boolean}
          */
-        isString: function( obj ) {
+        isString( obj ) {
             return typeof( obj ) === 'string';
         },
 
         /**
          * is the object a number
          *
          * @param  {Object} obj
          * @return {Boolean}
          */
-        isNumber: function( obj ) {
+        isNumber( obj ) {
             return !isNaN(parseFloat( obj )) && isFinite( obj );
         },
 
 
         /**
          * is the object an array
          *
          * @param  {Object} obj
          * @return {Boolean}
          */
-        isArray: function( obj ) {
+        isArray( obj ) {
             return obj && !( obj.propertyIsEnumerable( 'length' ) ) && typeof obj === 'object' && typeof obj.length === 'number';
         },
 
 
         /**
          * is the object a function
          *
          * @param  {Object} obj
          * @return {Boolean}
          */
-        isFunction: function(obj) {
+        isFunction(obj) {
             return !!(obj && obj.constructor && obj.call && obj.apply);
         },
 
 
         /**
          * does the text start with a test string
          *
          * @param  {String} text
          * @param  {String} test
          * @return {Boolean}
          */
-        startWith: function( text, test ) {
+        startWith( text, test ) {
             return (text.indexOf(test) === 0);
         },
 
 
         /**
          * removes spaces at front and back of text
          *
          * @param  {String} text
          * @return {String}
          */
-        trim: function( text ) {
+        trim( text ) {
             if (text && this.isString(text)) {
                 return (text.trim()) ? text.trim() : text.replace(/^\s+|\s+$/g, '');
             }
             return '';
         },
 
 
         /**
          * replaces a character in text
          *
          * @param  {String} text
          * @param  {Int} index
          * @param  {String} character
          * @return {String}
          */
-        replaceCharAt: function( text, index, character ) {
+        replaceCharAt( text, index, character ) {
             if (text && text.length > index) {
                return text.substr(0, index) + character + text.substr(index + character.length);
             }
             return text;
         },
 
 
         /**
          * removes whitespace, tabs and returns from start and end of text
          *
          * @param  {String} text
          * @return {String}
          */
-        trimWhitespace: function( text ) {
+        trimWhitespace( text ) {
             if (text && text.length) {
                 var i = text.length,
                     x = 0;
 
                 // turn all whitespace chars at end into spaces
                 while (i--) {
                     if (this.isOnlyWhiteSpace(text[i])) {
                         text = this.replaceCharAt( text, i, ' ' );
@@ -2320,39 +2320,39 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * does text only contain whitespace characters
          *
          * @param  {String} text
          * @return {Boolean}
          */
-        isOnlyWhiteSpace: function( text ) {
+        isOnlyWhiteSpace( text ) {
             return !(/[^\t\n\r ]/.test( text ));
         },
 
 
         /**
          * removes whitespace from text (leaves a single space)
          *
          * @param  {String} text
          * @return {Sring}
          */
-        collapseWhiteSpace: function( text ) {
+        collapseWhiteSpace( text ) {
             return text.replace(/[\t\n\r ]+/g, ' ');
         },
 
 
         /**
          * does an object have any of its own properties
          *
          * @param  {Object} obj
          * @return {Boolean}
          */
-        hasProperties: function( obj ) {
+        hasProperties( obj ) {
             var key;
             for (key in obj) {
                 if ( obj.hasOwnProperty( key ) ) {
                     return true;
                 }
             }
             return false;
         },
@@ -2360,17 +2360,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * a sort function - to sort objects in an array by a given property
          *
          * @param  {String} property
          * @param  {Boolean} reverse
          * @return {Int}
          */
-        sortObjects: function(property, reverse) {
+        sortObjects(property, reverse) {
             reverse = (reverse) ? -1 : 1;
             return function(a, b) {
                 a = a[property];
                 b = b[property];
                 if (a < b) {
                     return reverse * -1;
                 }
                 if (a > b) {
@@ -2390,17 +2390,17 @@ var Microformats; // jshint ignore:line
         rootNode: null,
 
 
          /**
          * gets DOMParser object
          *
          * @return {Object || undefined}
          */
-        getDOMParser: function() {
+        getDOMParser() {
             if (typeof DOMParser === "undefined") {
                 try {
                     return Components.classes["@mozilla.org/xmlextras/domparser;1"]
                         .createInstance(Components.interfaces.nsIDOMParser);
                 } catch (e) {
                     return undefined;
                 }
             } else {
@@ -2410,17 +2410,17 @@ var Microformats; // jshint ignore:line
 
 
          /**
          * configures what are the base DOM objects for parsing
          *
          * @param  {Object} options
          * @return {DOM Node} node
          */
-        getDOMContext: function( options ) {
+        getDOMContext( options ) {
 
             // if a node is passed
             if (options.node) {
                 this.rootNode = options.node;
             }
 
 
             // if a html string is passed
@@ -2460,156 +2460,156 @@ var Microformats; // jshint ignore:line
 
 
         /**
         * gets the first DOM node
         *
         * @param  {Dom Document}
         * @return {DOM Node} node
         */
-        getTopMostNode: function( node ) {
+        getTopMostNode( node ) {
             // var doc = this.ownerDocument(node);
             // if(doc && doc.nodeType && doc.nodeType === 9 && doc.documentElement){
             //  return doc.documentElement;
             // }
             return node;
         },
 
 
 
          /**
          * abstracts DOM ownerDocument
          *
          * @param  {DOM Node} node
          * @return {Dom Document}
          */
-        ownerDocument: function(node) {
+        ownerDocument(node) {
             return node.ownerDocument;
         },
 
 
         /**
          * abstracts DOM textContent
          *
          * @param  {DOM Node} node
          * @return {String}
          */
-        textContent: function(node) {
+        textContent(node) {
             if (node.textContent) {
                 return node.textContent;
             } else if (node.innerText) {
                 return node.innerText;
             }
             return '';
         },
 
 
         /**
          * abstracts DOM innerHTML
          *
          * @param  {DOM Node} node
          * @return {String}
          */
-        innerHTML: function(node) {
+        innerHTML(node) {
             return node.innerHTML;
         },
 
 
         /**
          * abstracts DOM hasAttribute
          *
          * @param  {DOM Node} node
          * @param  {String} attributeName
          * @return {Boolean}
          */
-        hasAttribute: function(node, attributeName) {
+        hasAttribute(node, attributeName) {
             return node.hasAttribute(attributeName);
         },
 
 
         /**
          * does an attribute contain a value
          *
          * @param  {DOM Node} node
          * @param  {String} attributeName
          * @param  {String} value
          * @return {Boolean}
          */
-        hasAttributeValue: function(node, attributeName, value) {
+        hasAttributeValue(node, attributeName, value) {
             return (this.getAttributeList(node, attributeName).indexOf(value) > -1);
         },
 
 
         /**
          * abstracts DOM getAttribute
          *
          * @param  {DOM Node} node
          * @param  {String} attributeName
          * @return {String || null}
          */
-        getAttribute: function(node, attributeName) {
+        getAttribute(node, attributeName) {
             return node.getAttribute(attributeName);
         },
 
 
         /**
          * abstracts DOM setAttribute
          *
          * @param  {DOM Node} node
          * @param  {String} attributeName
          * @param  {String} attributeValue
          */
-        setAttribute: function(node, attributeName, attributeValue) {
+        setAttribute(node, attributeName, attributeValue) {
             node.setAttribute(attributeName, attributeValue);
         },
 
 
         /**
          * abstracts DOM removeAttribute
          *
          * @param  {DOM Node} node
          * @param  {String} attributeName
          */
-        removeAttribute: function(node, attributeName) {
+        removeAttribute(node, attributeName) {
             node.removeAttribute(attributeName);
         },
 
 
         /**
          * abstracts DOM getElementById
          *
          * @param  {DOM Node || DOM Document} node
          * @param  {String} id
          * @return {DOM Node}
          */
-        getElementById: function(docNode, id) {
+        getElementById(docNode, id) {
             return docNode.querySelector( '#' + id );
         },
 
 
         /**
          * abstracts DOM querySelector
          *
          * @param  {DOM Node || DOM Document} node
          * @param  {String} selector
          * @return {DOM Node}
          */
-        querySelector: function(docNode, selector) {
+        querySelector(docNode, selector) {
             return docNode.querySelector( selector );
         },
 
 
         /**
          * get value of a Node attribute as an array
          *
          * @param  {DOM Node} node
          * @param  {String} attributeName
          * @return {Array}
          */
-        getAttributeList: function(node, attributeName) {
+        getAttributeList(node, attributeName) {
             var out = [],
                 attList;
 
             attList = node.getAttribute(attributeName);
             if (attList && attList !== '') {
                 if (attList.indexOf(' ') > -1) {
                     out = attList.split(' ');
                 } else {
@@ -2622,30 +2622,30 @@ var Microformats; // jshint ignore:line
 
         /**
          * gets all child nodes with a given attribute
          *
          * @param  {DOM Node} node
          * @param  {String} attributeName
          * @return {NodeList}
          */
-        getNodesByAttribute: function(node, attributeName) {
+        getNodesByAttribute(node, attributeName) {
             var selector = '[' + attributeName + ']';
             return node.querySelectorAll(selector);
         },
 
 
         /**
          * gets all child nodes with a given attribute containing a given value
          *
          * @param  {DOM Node} node
          * @param  {String} attributeName
          * @return {DOM NodeList}
          */
-        getNodesByAttributeValue: function(rootNode, name, value) {
+        getNodesByAttributeValue(rootNode, name, value) {
             var arr = [],
                 x = 0,
                 i,
                 out = [];
 
             arr = this.getNodesByAttribute(rootNode, name);
             if (arr) {
                 i = arr.length;
@@ -2662,17 +2662,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * gets attribute value from controlled list of tags
          *
          * @param  {Array} tagNames
          * @param  {String} attributeName
          * @return {String || null}
          */
-        getAttrValFromTagList: function(node, tagNames, attributeName) {
+        getAttrValFromTagList(node, tagNames, attributeName) {
             var i = tagNames.length;
 
             while (i--) {
                 if (node.tagName.toLowerCase() === tagNames[i]) {
                     var attrValue = this.getAttribute(node, attributeName);
                     if (attrValue && attrValue !== '') {
                         return attrValue;
                     }
@@ -2684,41 +2684,41 @@ var Microformats; // jshint ignore:line
 
        /**
          * get node if it has no siblings. CSS equivalent is :only-child
          *
          * @param  {DOM Node} rootNode
          * @param  {Array} tagNames
          * @return {DOM Node || null}
          */
-        getSingleDescendant: function(node) {
+        getSingleDescendant(node) {
             return this.getDescendant( node, null, false );
         },
 
 
         /**
          * get node if it has no siblings of the same type. CSS equivalent is :only-of-type
          *
          * @param  {DOM Node} rootNode
          * @param  {Array} tagNames
          * @return {DOM Node || null}
          */
-        getSingleDescendantOfType: function(node, tagNames) {
+        getSingleDescendantOfType(node, tagNames) {
             return this.getDescendant( node, tagNames, true );
         },
 
 
         /**
          * get child node limited by presence of siblings - either CSS :only-of-type or :only-child
          *
          * @param  {DOM Node} rootNode
          * @param  {Array} tagNames
          * @return {DOM Node || null}
          */
-        getDescendant: function( node, tagNames, onlyOfType ) {
+        getDescendant( node, tagNames, onlyOfType ) {
             var i = node.children.length,
                 countAll = 0,
                 countOfType = 0,
                 child,
                 out = null;
 
             while (i--) {
                 child = node.children[i];
@@ -2745,17 +2745,17 @@ var Microformats; // jshint ignore:line
 
        /**
          * is a node one of a list of tags
          *
          * @param  {DOM Node} rootNode
          * @param  {Array} tagNames
          * @return {Boolean}
          */
-        hasTagName: function(node, tagNames) {
+        hasTagName(node, tagNames) {
             var i = tagNames.length;
             while (i--) {
                 if (node.tagName.toLowerCase() === tagNames[i]) {
                     return true;
                 }
             }
             return false;
         },
@@ -2763,69 +2763,69 @@ var Microformats; // jshint ignore:line
 
        /**
          * abstracts DOM appendChild
          *
          * @param  {DOM Node} node
          * @param  {DOM Node} childNode
          * @return {DOM Node}
          */
-        appendChild: function(node, childNode) {
+        appendChild(node, childNode) {
             return node.appendChild(childNode);
         },
 
 
        /**
          * abstracts DOM removeChild
          *
          * @param  {DOM Node} childNode
          * @return {DOM Node || null}
          */
-        removeChild: function(childNode) {
+        removeChild(childNode) {
             if (childNode.parentNode) {
                 return childNode.parentNode.removeChild(childNode);
             }
             return null;
         },
 
 
         /**
          * abstracts DOM cloneNode
          *
          * @param  {DOM Node} node
          * @return {DOM Node}
          */
-        clone: function(node) {
+        clone(node) {
             var newNode = node.cloneNode(true);
             newNode.removeAttribute('id');
             return newNode;
         },
 
 
         /**
          * gets the text of a node
          *
          * @param  {DOM Node} node
          * @return {String}
          */
-        getElementText: function( node ) {
+        getElementText( node ) {
             if (node && node.data) {
                 return node.data;
             }
             return '';
         },
 
 
         /**
          * gets the attributes of a node - ordered by sequence in html
          *
          * @param  {DOM Node} node
          * @return {Array}
          */
-        getOrderedAttributes: function( node ) {
+        getOrderedAttributes( node ) {
             var nodeStr = node.outerHTML,
                 attrs = [];
 
             for (var i = 0; i < node.attributes.length; i++) {
                 var attr = node.attributes[i];
                     attr.indexNum = nodeStr.indexOf(attr.name);
 
                 attrs.push( attr );
@@ -2836,29 +2836,29 @@ var Microformats; // jshint ignore:line
 
         /**
          * decodes html entities in given text
          *
          * @param  {DOM Document} doc
          * @param  String} text
          * @return {String}
          */
-        decodeEntities: function( doc, text ) {
+        decodeEntities( doc, text ) {
             // return text;
             return doc.createTextNode( text ).nodeValue;
         },
 
 
         /**
          * clones a DOM document
          *
          * @param  {DOM Document} document
          * @return {DOM Document}
          */
-        cloneDocument: function( document ) {
+        cloneDocument( document ) {
             var newNode,
                 newDocument = null;
 
             if ( this.canCloneDocument( document )) {
                 newDocument = document.implementation.createHTMLDocument('');
                 newNode = newDocument.importNode( document.documentElement, true );
                 newDocument.replaceChild(newNode, newDocument.querySelector('html'));
             }
@@ -2867,28 +2867,28 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * can environment clone a DOM document
          *
          * @param  {DOM Document} document
          * @return {Boolean}
          */
-        canCloneDocument: function( document ) {
+        canCloneDocument( document ) {
             return (document && document.importNode && document.implementation && document.implementation.createHTMLDocument);
         },
 
 
         /**
          * get the child index of a node. Used to create a node path
          *
          *   @param  {DOM Node} node
          *   @return {Int}
          */
-        getChildIndex: function(node) {
+        getChildIndex(node) {
             var parent = node.parentNode,
                 i = -1,
                 child;
             while (parent && (child = parent.childNodes[++i])) {
                  if (child === node) {
                      return i;
                  }
             }
@@ -2897,17 +2897,17 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * get a node's path
          *
          *   @param  {DOM Node} node
          *   @return {Array}
          */
-        getNodePath: function(node) {
+        getNodePath(node) {
             var parent = node.parentNode,
                 path = [],
                 index = this.getChildIndex(node);
 
           if (parent && (path = this.getNodePath(parent))) {
                if (index > -1) {
                    path.push(index);
                }
@@ -2918,74 +2918,74 @@ var Microformats; // jshint ignore:line
 
         /**
          * get a node from a path.
          *
          *   @param  {DOM document} document
          *   @param  {Array} path
          *   @return {DOM Node}
          */
-        getNodeByPath: function(document, path) {
+        getNodeByPath(document, path) {
             var node = document.documentElement,
                 i = 0,
                 index;
           while ((index = path[++i]) > -1) {
               node = node.childNodes[index];
           }
           return node;
         },
 
 
         /**
         * get an array/nodeList of child nodes
         *
         *   @param  {DOM node} node
         *   @return {Array}
         */
-        getChildren: function( node ) {
+        getChildren( node ) {
             return node.children;
         },
 
 
         /**
         * create a node
         *
         *   @param  {String} tagName
         *   @return {DOM node}
         */
-        createNode: function( tagName ) {
+        createNode( tagName ) {
             return this.document.createElement(tagName);
         },
 
 
         /**
         * create a node with text content
         *
         *   @param  {String} tagName
         *   @param  {String} text
         *   @return {DOM node}
         */
-        createNodeWithText: function( tagName, text ) {
+        createNodeWithText( tagName, text ) {
             var node = this.document.createElement(tagName);
             node.innerHTML = text;
             return node;
         }
 
 
 
     };
 
 
     modules.url = {
 
 
         /**
          * creates DOM objects needed to resolve URLs
          */
-        init: function() {
+        init() {
             // this._domParser = new DOMParser();
             this._domParser = modules.domUtils.getDOMParser();
             // do not use a head tag it does not work with IE9
             this._html = '<base id="base" href=""></base><a id="link" href=""></a>';
             this._nodes = this._domParser.parseFromString( this._html, 'text/html' );
             this._baseNode =  modules.domUtils.getElementById(this._nodes, 'base');
             this._linkNode =  modules.domUtils.getElementById(this._nodes, 'link');
         },
@@ -2993,17 +2993,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * resolves url to absolute version using baseUrl
          *
          * @param  {String} url
          * @param  {String} baseUrl
          * @return {String}
          */
-        resolve: function(url, baseUrl) {
+        resolve(url, baseUrl) {
             // use modern URL web API where we can
             if (modules.utils.isString(url) && modules.utils.isString(baseUrl) && url.indexOf('://') === -1) {
                 // this try catch is required as IE has an URL object but no constuctor support
                 // http://glennjones.net/articles/the-problem-with-window-url
                 try {
                     var resolved = new URL(url, baseUrl).toString();
                     // deal with early Webkit not throwing an error - for Safari
                     if (resolved === '[object URL]') {
@@ -3057,65 +3057,65 @@ var Microformats; // jshint ignore:line
 
     modules.ISODate.prototype = {
 
 
         /**
          * clear all states
          *
          */
-        clear: function() {
+        clear() {
             this.clearDate();
             this.clearTime();
             this.clearTimeZone();
             this.setAutoProfileState();
         },
 
 
         /**
          * clear date states
          *
          */
-        clearDate: function() {
+        clearDate() {
             this.dY = -1;
             this.dM = -1;
             this.dD = -1;
             this.dDDD = -1;
         },
 
 
         /**
          * clear time states
          *
          */
-        clearTime: function() {
+        clearTime() {
             this.tH = -1;
             this.tM = -1;
             this.tS = -1;
             this.tD = -1;
         },
 
 
         /**
          * clear timezone states
          *
          */
-        clearTimeZone: function() {
+        clearTimeZone() {
             this.tzH = -1;
             this.tzM = -1;
             this.tzPN = '+';
             this.z = false;
         },
 
 
         /**
          * resets the auto profile state
          *
          */
-        setAutoProfileState: function() {
+        setAutoProfileState() {
             this.autoProfile = {
                sep: 'T',
                dsep: '-',
                tsep: ':',
                tzsep: ':',
                tzZulu: 'Z'
             };
         },
@@ -3123,17 +3123,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * parses text to find ISO date/time string i.e. 2008-05-01T15:45:19Z
          *
          * @param  {String} dateString
          * @param  {String} format
          * @return {String}
          */
-        parse: function( dateString, format ) {
+        parse( dateString, format ) {
             this.clear();
 
             var parts = [],
                 tzArray = [],
                 position = 0,
                 datePart = '',
                 timePart = '',
                 timeZonePart = '';
@@ -3213,17 +3213,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * parses text to find just the date element of an ISO date/time string i.e. 2008-05-01
          *
          * @param  {String} dateString
          * @param  {String} format
          * @return {String}
          */
-        parseDate: function( dateString, format ) {
+        parseDate( dateString, format ) {
             this.clearDate();
 
             var parts = [];
 
             // discover timezone separtor for auto profile // default is ':'
             if (dateString.indexOf('-') === -1) {
                 this.autoProfile.tsep = '';
             }
@@ -3258,17 +3258,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * parses text to find just the time element of an ISO date/time string i.e. 13:30:45
          *
          * @param  {String} timeString
          * @param  {String} format
          * @return {String}
          */
-        parseTime: function( timeString, format ) {
+        parseTime( timeString, format ) {
             this.clearTime();
             var parts = [];
 
             // discover date separtor for auto profile // default is ':'
             if (timeString.indexOf(':') === -1) {
                 this.autoProfile.tsep = '';
             }
 
@@ -3292,17 +3292,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * parses text to find just the time element of an ISO date/time string i.e. +08:00
          *
          * @param  {String} timeString
          * @param  {String} format
          * @return {String}
          */
-        parseTimeZone: function( timeString, format ) {
+        parseTimeZone( timeString, format ) {
             this.clearTimeZone();
             var parts = [];
 
             if (timeString.toLowerCase() === 'z') {
                 this.z = true;
                 // set case for z
                 this.autoProfile.tzZulu = (timeString === 'z') ? 'z' : 'Z';
             } else {
@@ -3332,17 +3332,17 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * returns ISO date/time string in W3C Note, RFC 3339, HTML5, or auto profile
          *
          * @param  {String} format
          * @return {String}
          */
-        toString: function( format ) {
+        toString( format ) {
             var output = '';
 
             if (format) {
                 this.format = format;
             }
             this.setFormatSep();
 
             if (this.dY  > -1) {
@@ -3369,17 +3369,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * returns just the time string element of an ISO date/time
          * in W3C Note, RFC 3339, HTML5, or auto profile
          *
          * @param  {String} format
          * @return {String}
          */
-        toTimeString: function( format ) {
+        toTimeString( format ) {
             var out = '';
 
             if (format) {
                 this.format = format;
             }
             this.setFormatSep();
 
             // time can only be created with a full date
@@ -3412,17 +3412,17 @@ var Microformats; // jshint ignore:line
             return out;
         },
 
 
         /**
          * set the current profile to W3C Note, RFC 3339, HTML5, or auto profile
          *
          */
-        setFormatSep: function() {
+        setFormatSep() {
             switch ( this.format.toLowerCase() ) {
                 case 'rfc3339':
                     this.sep = 'T';
                     this.dsep = '';
                     this.tsep = '';
                     this.tzsep = '';
                     this.tzZulu = 'Z';
                     break;
@@ -3451,46 +3451,46 @@ var Microformats; // jshint ignore:line
         },
 
 
         /**
          * does current data contain a full date i.e. 2015-03-23
          *
          * @return {Boolean}
          */
-        hasFullDate: function() {
+        hasFullDate() {
             return (this.dY !== -1 && this.dM !== -1 && this.dD !== -1);
         },
 
 
         /**
          * does current data contain a minimum date which is just a year number i.e. 2015
          *
          * @return {Boolean}
          */
-        hasDate: function() {
+        hasDate() {
             return (this.dY !== -1);
         },
 
 
         /**
          * does current data contain a minimum time which is just a hour number i.e. 13
          *
          * @return {Boolean}
          */
-        hasTime: function() {
+        hasTime() {
             return (this.tH !== -1);
         },
 
         /**
          * does current data contain a minimum timezone i.e. -1 || +1 || z
          *
          * @return {Boolean}
          */
-        hasTimeZone: function() {
+        hasTimeZone() {
             return (this.tzH !== -1);
         }
 
     };
 
     modules.ISODate.prototype.constructor = modules.ISODate;
 
 
@@ -3498,52 +3498,52 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * does text contain am
          *
          * @param  {String} text
          * @return {Boolean}
          */
-        hasAM: function( text ) {
+        hasAM( text ) {
             text = text.toLowerCase();
             return (text.indexOf('am') > -1 || text.indexOf('a.m.') > -1);
         },
 
 
         /**
          * does text contain pm
          *
          * @param  {String} text
          * @return {Boolean}
          */
-        hasPM: function( text ) {
+        hasPM( text ) {
             text = text.toLowerCase();
             return (text.indexOf('pm') > -1 || text.indexOf('p.m.') > -1);
         },
 
 
         /**
          * remove am and pm from text and return it
          *
          * @param  {String} text
          * @return {String}
          */
-        removeAMPM: function( text ) {
+        removeAMPM( text ) {
             return text.replace('pm', '').replace('p.m.', '').replace('am', '').replace('a.m.', '');
         },
 
 
        /**
          * simple test of whether ISO date string is a duration  i.e.  PY17M or PW12
          *
          * @param  {String} text
          * @return {Boolean}
          */
-        isDuration: function( text ) {
+        isDuration( text ) {
             if (modules.utils.isString( text )) {
                 text = text.toLowerCase();
                 if (modules.utils.startWith(text, 'p') ) {
                     return true;
                 }
             }
             return false;
         },
@@ -3551,17 +3551,17 @@ var Microformats; // jshint ignore:line
 
        /**
          * is text a time or timezone
          * i.e. HH-MM-SS or z+-HH-MM-SS 08:43 | 15:23:00:0567 | 10:34pm | 10:34 p.m. | +01:00:00 | -02:00 | z15:00 | 0843
          *
          * @param  {String} text
          * @return {Boolean}
          */
-        isTime: function( text ) {
+        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, '+') )) {
                     return true;
                 }
                 // has ante meridiem or post meridiem
@@ -3587,17 +3587,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * parses a time from text and returns 24hr time string
          * i.e. 5:34am = 05:34:00 and 1:52:04p.m. = 13:52:04
          *
          * @param  {String} text
          * @return {String}
          */
-        parseAmPmTime: function( text ) {
+        parseAmPmTime( text ) {
             var out = text,
                 times = [];
 
             // if the string has a text : or am or pm
             if (modules.utils.isString(out)) {
                 // text = text.toLowerCase();
                 text = text.replace(/[ ]+/g, '');
 
@@ -3638,17 +3638,17 @@ var Microformats; // jshint ignore:line
        /**
          * overlays a time on a date to return the union of the two
          *
          * @param  {String} date
          * @param  {String} time
          * @param  {String} format ( Modules.ISODate profile format )
          * @return {Object} Modules.ISODate
          */
-        dateTimeUnion: function(date, time, format) {
+        dateTimeUnion(date, time, format) {
             var isodate = new modules.ISODate(date, format),
                 isotime = new modules.ISODate();
 
             isotime.parseTime(this.parseAmPmTime(time), format);
             if (isodate.hasFullDate() && isotime.hasTime()) {
                 isodate.tH = isotime.tH;
                 isodate.tM = isotime.tM;
                 isodate.tS = isotime.tS;
@@ -3665,17 +3665,17 @@ var Microformats; // jshint ignore:line
        /**
          * concatenate an array of date and time text fragments to create an ISODate object
          * used for microformat value and value-title rules
          *
          * @param  {Array} arr ( Array of Strings )
          * @param  {String} format ( Modules.ISODate profile format )
          * @return {Object} Modules.ISODate
          */
-        concatFragments: function(arr, format) {
+        concatFragments(arr, format) {
             var out = new modules.ISODate(),
                 i = 0,
                 value = '';
 
             // if the fragment already contains a full date just return it once
             if (arr[0].toUpperCase().match('T')) {
                 return new modules.ISODate(arr[0], format);
             }
@@ -3716,17 +3716,17 @@ var Microformats; // jshint ignore:line
 
 
        /**
          * parses text by splitting it into an array of time and timezone strings
          *
          * @param  {String} text
          * @return {Array} Modules.ISODate
          */
-        splitTimeAndZone: function( text ) {
+        splitTimeAndZone( text ) {
            var out = [text],
                chars = ['-', '+', 'z', 'Z'],
                i = chars.length;
 
             while (i--) {
               if (text.indexOf(chars[i]) > -1) {
                   out[0] = text.slice( 0, text.indexOf(chars[i]) );
                   out.push( text.slice( text.indexOf(chars[i]) ) );
@@ -3757,17 +3757,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * parses the text from the DOM Node
          *
          * @param  {DOM Node} node
          * @param  {String} textFormat
          * @return {String}
          */
-        parse: function(doc, node, textFormat) {
+        parse(doc, node, textFormat) {
             var out;
             this.textFormat = (textFormat) ? textFormat : this.textFormat;
             if (this.textFormat === 'normalised') {
                 out = this.walkTreeForText( node );
                 if (out !== undefined) {
                     return this.normalise( doc, out );
                 }
                 return '';
@@ -3779,30 +3779,30 @@ var Microformats; // jshint ignore:line
         /**
          * parses the text from a html string
          *
          * @param  {DOM Document} doc
          * @param  {String} text
          * @param  {String} textFormat
          * @return {String}
          */
-        parseText: function( doc, text, textFormat ) {
+        parseText( doc, text, textFormat ) {
            var node = modules.domUtils.createNodeWithText( 'div', text );
            return this.parse( doc, node, textFormat );
         },
 
 
         /**
          * parses the text from a html string - only for whitespace or whitespacetrimmed formats
          *
          * @param  {String} text
          * @param  {String} textFormat
          * @return {String}
          */
-        formatText: function( doc, text, textFormat ) {
+        formatText( doc, text, textFormat ) {
            this.textFormat = (textFormat) ? textFormat : this.textFormat;
            if (text) {
               var out = '',
                   regex = /(<([^>]+)>)/ig;
 
               out = text.replace(regex, '');
               if (this.textFormat === 'whitespacetrimmed') {
                  out = modules.utils.trimWhitespace( out );
@@ -3816,32 +3816,32 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * normalises whitespace in given text
          *
          * @param  {String} text
          * @return {String}
          */
-        normalise: function( doc, text ) {
+        normalise( doc, text ) {
             text = text.replace( /&nbsp;/g, ' ') ;    // exchanges html entity for space into space char
             text = modules.utils.collapseWhiteSpace( text );     // removes linefeeds, tabs and addtional spaces
             text = modules.domUtils.decodeEntities( doc, text );  // decode HTML entities
             text = text.replace( '–', '-' );          // correct dash decoding
             return modules.utils.trim( text );
         },
 
 
         /**
          * walks DOM tree parsing the text from DOM Nodes
          *
          * @param  {DOM Node} node
          * @return {String}
          */
-        walkTreeForText: function( node ) {
+        walkTreeForText( node ) {
             var out = '',
                 j = 0;
 
             if (node.tagName && this.excludeTags.indexOf( node.tagName.toLowerCase() ) > -1) {
                 return out;
             }
 
             // if node is a text node get its text
@@ -3877,17 +3877,17 @@ var Microformats; // jshint ignore:line
 
 
         /**
          * parse the html string from DOM Node
          *
          * @param  {DOM Node} node
          * @return {String}
          */
-        parse: function( node ) {
+        parse( node ) {
             var out = '',
                 j = 0;
 
             // we do not want the outer container
             if (node.childNodes && node.childNodes.length > 0) {
                 for (j = 0; j < node.childNodes.length; j++) {
                     var text = this.walkTreeForHtml( node.childNodes[j] );
                     if (text !== undefined) {
@@ -3902,17 +3902,17 @@ var Microformats; // jshint ignore:line
 
         /**
          * walks the DOM tree parsing the html string from the nodes
          *
          * @param  {DOM Document} doc
          * @param  {DOM Node} node
          * @return {String}
          */
-        walkTreeForHtml: function( node ) {
+        walkTreeForHtml( node ) {
             var out = '',
                 j = 0;
 
             // if node is a text node get its text
             if (node.nodeType && node.nodeType === 3) {
                 out += modules.domUtils.getElementText( node );
             }
 
--- a/toolkit/components/narrate/NarrateControls.jsm
+++ b/toolkit/components/narrate/NarrateControls.jsm
@@ -132,17 +132,17 @@ function NarrateControls(mm, win, langua
 
   this._setupVoices();
 
   let tb = win.document.getElementById("reader-toolbar");
   tb.appendChild(dropdown);
 }
 
 NarrateControls.prototype = {
-  handleEvent: function(evt) {
+  handleEvent(evt) {
     switch (evt.type) {
       case "change":
         if (evt.target.id == "narrate-rate-input") {
           this._onRateInput(evt);
         } else {
           this._onVoiceChange();
         }
         break;
@@ -158,17 +158,17 @@ NarrateControls.prototype = {
         }
         break;
     }
   },
 
   /**
    * Returns true if synth voices are available.
    */
-  _setupVoices: function() {
+  _setupVoices() {
     return this._languagePromise.then(language => {
       this.voiceSelect.clear();
       let win = this._win;
       let voicePrefs = this._getVoicePref();
       let selectedVoice = voicePrefs[language || "default"];
       let comparer = win.Intl ?
         (new Intl.Collator()).compare : (a, b) => a.localeCompare(b);
       let filter = !Services.prefs.getBoolPref("narrate.filter-voices");
@@ -206,43 +206,43 @@ NarrateControls.prototype = {
         histogram.add(language, 1);
       }
 
       // We disable this entire feature if there are no available voices.
       narrateToggle.hidden = !options.length;
     });
   },
 
-  _getVoicePref: function() {
+  _getVoicePref() {
     let voicePref = Services.prefs.getCharPref("narrate.voice");
     try {
       return JSON.parse(voicePref);
     } catch (e) {
       return { default: voicePref };
     }
   },
 
-  _onRateInput: function(evt) {
+  _onRateInput(evt) {
     AsyncPrefs.set("narrate.rate", parseInt(evt.target.value, 10));
     this.narrator.setRate(this._convertRate(evt.target.value));
   },
 
-  _onVoiceChange: function() {
+  _onVoiceChange() {
     let voice = this.voice;
     this.narrator.setVoice(voice);
     this._languagePromise.then(language => {
       if (language) {
         let voicePref = this._getVoicePref();
         voicePref[language || "default"] = voice;
         AsyncPrefs.set("narrate.voice", JSON.stringify(voicePref));
       }
     });
   },
 
-  _onButtonClick: function(evt) {
+  _onButtonClick(evt) {
     switch (evt.target.id) {
       case "narrate-skip-previous":
         this.narrator.skipPrevious();
         break;
       case "narrate-skip-next":
         this.narrator.skipNext();
         break;
       case "narrate-start-stop":
@@ -257,17 +257,17 @@ NarrateControls.prototype = {
             Cu.reportError(`Narrate failed: ${err}.`);
             this._updateSpeechControls(false);
           });
         }
         break;
     }
   },
 
-  _updateSpeechControls: function(speaking) {
+  _updateSpeechControls(speaking) {
     let dropdown = this._doc.getElementById("narrate-dropdown");
     dropdown.classList.toggle("keep-open", speaking);
     dropdown.classList.toggle("speaking", speaking);
 
     let startStopButton = this._doc.getElementById("narrate-start-stop");
     startStopButton.title =
       gStrings.GetStringFromName(speaking ? "stop" : "start");
 
@@ -276,17 +276,17 @@ NarrateControls.prototype = {
 
     if (speaking) {
       TelemetryStopwatch.start("NARRATE_CONTENT_SPEAKTIME_MS", this);
     } else {
       TelemetryStopwatch.finish("NARRATE_CONTENT_SPEAKTIME_MS", this);
     }
   },
 
-  _createVoiceLabel: function(voice) {
+  _createVoiceLabel(voice) {
     // This is a highly imperfect method of making human-readable labels
     // for system voices. Because each platform has a different naming scheme
     // for voices, we use a different method for each platform.
     switch (Services.appinfo.OS) {
       case "WINNT":
         // On windows the language is included in the name, so just use the name
         return voice.name;
       case "Linux":
@@ -299,31 +299,31 @@ NarrateControls.prototype = {
         // On Mac the language is not included in the name, find a localized
         // language name or show the tag if none exists.
         // This is the ideal naming scheme so it is also the "default".
         return gStrings.formatStringFromName("voiceLabel",
           [voice.name, this._getLanguageName(voice.lang) || voice.lang], 2);
     }
   },
 
-  _getLanguageName: function(lang) {
+  _getLanguageName(lang) {
     if (!this._langStrings) {
       this._langStrings = Services.strings.createBundle(
         "chrome://global/locale/languageNames.properties ");
     }
 
     try {
       // language tags will be lower case ascii between 2 and 3 characters long.
       return this._langStrings.GetStringFromName(lang.match(/^[a-z]{2,3}/)[0]);
     } catch (e) {
       return "";
     }
   },
 
-  _convertRate: function(rate) {
+  _convertRate(rate) {
     // We need to convert a relative percentage value to a fraction rate value.
     // eg. -100 is half the speed, 100 is twice the speed in percentage,
     // 0.5 is half the speed and 2 is twice the speed in fractions.
     return Math.pow(Math.abs(rate / 100) + 1, rate < 0 ? -1 : 1);
   },
 
   get _win() {
     return this._winRef.get();
--- a/toolkit/components/narrate/Narrator.jsm
+++ b/toolkit/components/narrate/Narrator.jsm
@@ -48,17 +48,17 @@ Narrator.prototype = {
 
       let filter = {
         _matches: new Set(),
 
         // We want high-level elements that have non-empty text nodes.
         // For example, paragraphs. But nested anchors and other elements
         // are not interesting since their text already appears in their
         // parent's textContent.
-        acceptNode: function(node) {
+        acceptNode(node) {
           if (this._matches.has(node.parentNode)) {
             // Reject sub-trees of accepted nodes.
             return nf.FILTER_REJECT;
           }
 
           if (!/\S/.test(node.textContent)) {
             // Reject nodes with no text.
             return nf.FILTER_REJECT;
@@ -101,41 +101,41 @@ Narrator.prototype = {
     return rv;
   },
 
   get speaking() {
     return this._win.speechSynthesis.speaking ||
       this._win.speechSynthesis.pending;
   },
 
-  _getVoice: function(voiceURI) {
+  _getVoice(voiceURI) {
     if (!this._voiceMap || !this._voiceMap.has(voiceURI)) {
       this._voiceMap = new Map(
         this._win.speechSynthesis.getVoices().map(v => [v.voiceURI, v]));
     }
 
     return this._voiceMap.get(voiceURI);
   },
 
-  _isParagraphInView: function(paragraph) {
+  _isParagraphInView(paragraph) {
     if (!paragraph) {
       return false;
     }
 
     let bb = paragraph.getBoundingClientRect();
     return bb.top >= 0 && bb.top < this._win.innerHeight;
   },
 
-  _sendTestEvent: function(eventType, detail) {
+  _sendTestEvent(eventType, detail) {
     let win = this._win;
     win.dispatchEvent(new win.CustomEvent(eventType,
       { detail: Cu.cloneInto(detail, win.document) }));
   },
 
-  _speakInner: function() {
+  _speakInner() {
     this._win.speechSynthesis.cancel();
     let tw = this._treeWalker;
     let paragraph = tw.currentNode;
     if (paragraph == tw.root) {
       this._sendTestEvent("paragraphsdone", {});
       return Promise.resolve();
     }
 
@@ -230,17 +230,17 @@ Narrator.prototype = {
           }
         }
       });
 
       this._win.speechSynthesis.speak(utterance);
     });
   },
 
-  start: function(speechOptions) {
+  start(speechOptions) {
     this._speechOptions = {
       rate: speechOptions.rate,
       voice: this._getVoice(speechOptions.voice)
     };
 
     this._stopped = false;
     return this._languagePromise.then(language => {
       if (!this._speechOptions.voice) {
@@ -259,42 +259,42 @@ Narrator.prototype = {
       if (tw.currentNode == tw.root) {
         tw.nextNode();
       }
 
       return this._speakInner();
     });
   },
 
-  stop: function() {
+  stop() {
     this._stopped = true;
     this._win.speechSynthesis.cancel();
   },
 
-  skipNext: function() {
+  skipNext() {
     this._win.speechSynthesis.cancel();
   },
 
-  skipPrevious: function() {
+  skipPrevious() {
     this._goBackParagraphs(this._timeIntoParagraph < PREV_THRESHOLD ? 2 : 1);
   },
 
-  setRate: function(rate) {
+  setRate(rate) {
     this._speechOptions.rate = rate;
     /* repeat current paragraph */
     this._goBackParagraphs(1);
   },
 
-  setVoice: function(voice) {
+  setVoice(voice) {
     this._speechOptions.voice = this._getVoice(voice);
     /* repeat current paragraph */
     this._goBackParagraphs(1);
   },
 
-  _goBackParagraphs: function(count) {
+  _goBackParagraphs(count) {
     let tw = this._treeWalker;
     for (let i = 0; i < count; i++) {
       if (!tw.previousNode()) {
         tw.currentNode = tw.root;
       }
     }
     this._win.speechSynthesis.cancel();
   }
@@ -311,17 +311,17 @@ function Highlighter(container) {
 
 Highlighter.prototype = {
   /**
    * Highlight the range within offsets relative to the container.
    *
    * @param {Number} startOffset the start offset
    * @param {Number} length the length in characters of the range
    */
-  highlight: function(startOffset, length) {
+  highlight(startOffset, length) {
     let containerRect = this.container.getBoundingClientRect();
     let range = this._getRange(startOffset, startOffset + length);
     let rangeRects = range.getClientRects();
     let win = this.container.ownerDocument.defaultView;
     let computedStyle = win.getComputedStyle(range.endContainer.parentNode);
     let nodes = this._getFreshHighlightNodes(rangeRects.length);
 
     let textStyle = {};
@@ -357,31 +357,31 @@ Highlighter.prototype = {
       node.style = Object.entries(style).map(
         s => `${s[0]}: ${s[1]};`).join(" ");
     }
   },
 
   /**
    * Releases reference to container and removes all highlight nodes.
    */
-  remove: function() {
+  remove() {
     for (let node of this._nodes) {
       node.remove();
     }
 
     this.container = null;
   },
 
   /**
    * Returns specified amount of highlight nodes. Creates new ones if necessary
    * and purges any additional nodes that are not needed.
    *
    * @param {Number} count number of nodes needed
    */
-  _getFreshHighlightNodes: function(count) {
+  _getFreshHighlightNodes(count) {
     let doc = this.container.ownerDocument;
     let nodes = Array.from(this._nodes);
 
     // Remove nodes we don't need anymore (nodes.length - count > 0).
     for (let toRemove = 0; toRemove < nodes.length - count; toRemove++) {
       nodes.shift().remove();
     }
 
@@ -398,17 +398,17 @@ Highlighter.prototype = {
 
   /**
    * Create and return a range object with the start and end offsets relative
    * to the container node.
    *
    * @param {Number} startOffset the start offset
    * @param {Number} endOffset the end offset
    */
-  _getRange: function(startOffset, endOffset) {
+  _getRange(startOffset, endOffset) {
     let doc = this.container.ownerDocument;
     let i = 0;
     let treeWalker = doc.createTreeWalker(
       this.container, doc.defaultView.NodeFilter.SHOW_TEXT);
     let node = treeWalker.nextNode();
 
     function _findNodeAndOffset(offset) {
       do {
--- a/toolkit/components/narrate/VoiceSelect.jsm
+++ b/toolkit/components/narrate/VoiceSelect.jsm
@@ -32,45 +32,45 @@ function VoiceSelect(win, label) {
   listbox.addEventListener("wheel", this, true);
 
   win.addEventListener("resize", () => {
     this._updateDropdownHeight();
   });
 }
 
 VoiceSelect.prototype = {
-  add: function(label, value) {
+  add(label, value) {
     let option = this._doc.createElement("button");
     option.dataset.value = value;
     option.classList.add("option");
     option.tabIndex = "-1";
     option.setAttribute("role", "option");
     option.textContent = label;
     this.listbox.appendChild(option);
     return option;
   },
 
-  addOptions: function(options) {
+  addOptions(options) {
     let selected = null;
     for (let option of options) {
       if (option.selected) {
         selected = this.add(option.label, option.value);
       } else {
         this.add(option.label, option.value);
       }
     }
 
     this._select(selected || this.options[0], true);
   },
 
-  clear: function() {
+  clear() {
     this.listbox.innerHTML = "";
   },
 
-  toggleList: function(force, focus = true) {
+  toggleList(force, focus = true) {
     if (this.element.classList.toggle("open", force)) {
       if (focus) {
         (this.selected || this.options[0]).focus();
       }
 
       this._updateDropdownHeight(true);
       this.listbox.setAttribute("aria-expanded", true);
       this._win.addEventListener("focus", this, true);
@@ -79,17 +79,17 @@ VoiceSelect.prototype = {
         this.element.querySelector(".select-toggle").focus();
       }
 
       this.listbox.setAttribute("aria-expanded", false);
       this._win.removeEventListener("focus", this, true);
     }
   },
 
-  handleEvent: function(evt) {
+  handleEvent(evt) {
     let target = evt.target;
 
     switch (evt.type) {
       case "click":
         if (target.classList.contains("option")) {
           if (!target.classList.contains("selected")) {
             this.selected = target;
           }
@@ -126,34 +126,34 @@ VoiceSelect.prototype = {
       case "focus":
         if (!target.closest(".voiceselect")) {
           this.toggleList(false, false);
         }
         break;
     }
   },
 
-  _getPagedOption: function(option, up) {
+  _getPagedOption(option, up) {
     let height = elem => elem.getBoundingClientRect().height;
     let listboxHeight = height(this.listbox);
 
     let next = option;
     for (let delta = 0; delta < listboxHeight; delta += height(next)) {
       let sibling = up ? next.previousElementSibling : next.nextElementSibling;
       if (!sibling) {
         break;
       }
 
       next = sibling;
     }
 
     return next;
   },
 
-  _keyPressedButton: function(evt) {
+  _keyPressedButton(evt) {
     if (evt.altKey && (evt.key === "ArrowUp" || evt.key === "ArrowUp")) {
       this.toggleList(true);
       return;
     }
 
     let toSelect;
     switch (evt.key) {
       case "PageUp":
@@ -173,17 +173,17 @@ VoiceSelect.prototype = {
     }
 
     if (toSelect && toSelect.classList.contains("option")) {
       evt.preventDefault();
       this.selected = toSelect;
     }
   },
 
-  _keyPressedInBox: function(evt) {
+  _keyPressedInBox(evt) {
     let toFocus;
     let cur = this._doc.activeElement;
 
     switch (evt.key) {
       case "ArrowUp":
         toFocus = cur.previousElementSibling || this.listbox.lastElementChild;
         break;
       case "ArrowDown":
@@ -207,17 +207,17 @@ VoiceSelect.prototype = {
     }
 
     if (toFocus && toFocus.classList.contains("option")) {
       evt.preventDefault();
       toFocus.focus();
     }
   },
 
-  _select: function(option, suppressEvent = false) {
+  _select(option, suppressEvent = false) {
     let oldSelected = this.selected;
     if (oldSelected) {
       oldSelected.removeAttribute("aria-selected");
       oldSelected.classList.remove("selected");
     }
 
     if (option) {
       option.setAttribute("aria-selected", true);
@@ -228,17 +228,17 @@ VoiceSelect.prototype = {
 
     if (!suppressEvent) {
       let evt = this.element.ownerDocument.createEvent("Event");
       evt.initEvent("change", true, true);
       this.element.dispatchEvent(evt);
     }
   },
 
-  _updateDropdownHeight: function(now) {
+  _updateDropdownHeight(now) {
     let updateInner = () => {
       let winHeight = this._win.innerHeight;
       let listbox = this.listbox;
       let listboxTop = listbox.getBoundingClientRect().top;
       listbox.style.maxHeight = (winHeight - listboxTop - 10) + "px";
     };
 
     if (now) {
@@ -247,17 +247,17 @@ VoiceSelect.prototype = {
       this._pendingDropdownUpdate = true;
       this._win.requestAnimationFrame(() => {
         updateInner();
         delete this._pendingDropdownUpdate;
       });
     }
   },
 
-  _getOptionFromValue: function(value) {
+  _getOptionFromValue(value) {
     return Array.from(this.options).find(o => o.dataset.value === value);
   },
 
   get element() {
     return this._elementRef.get();
   },
 
   get listbox() {
--- a/toolkit/components/narrate/test/NarrateTestUtils.jsm
+++ b/toolkit/components/narrate/test/NarrateTestUtils.jsm
@@ -19,17 +19,17 @@ this.NarrateTestUtils = {
   VOICE_SELECTED: "#narrate-voices .options .option.selected",
   VOICE_SELECT_LABEL: "#narrate-voices .select-toggle .current-voice",
   RATE: "#narrate-rate-input",
   START: "#narrate-dropdown:not(.speaking) #narrate-start-stop",
   STOP: "#narrate-dropdown.speaking #narrate-start-stop",
   BACK: "#narrate-skip-previous",
   FORWARD: "#narrate-skip-next",
 
-  isVisible: function(element) {
+  isVisible(element) {
     let style = element.ownerDocument.defaultView.getComputedStyle(element, "");
     if (style.display == "none") {
       return false;
     } else if (style.visibility != "visible") {
       return false;
     } else if (style.display == "-moz-popup" && element.state != "open") {
       return false;
     }
@@ -37,111 +37,111 @@ this.NarrateTestUtils = {
     // Hiding a parent element will hide all its children
     if (element.parentNode != element.ownerDocument) {
       return this.isVisible(element.parentNode);
     }
 
     return true;
   },
 
-  isStoppedState: function(window, ok) {
+  isStoppedState(window, ok) {
     let $ = window.document.querySelector.bind(window.document);
     ok($(this.BACK).disabled, "back button is disabled");
     ok($(this.FORWARD).disabled, "forward button is disabled");
     ok(!!$(this.START), "start button is showing");
     ok(!$(this.STOP), "stop button is hidden");
     // This checks for a localized label. Not the best...
     ok($(this.START).title == "Start", "Button tooltip is correct");
   },
 
-  isStartedState: function(window, ok) {
+  isStartedState(window, ok) {
     let $ = window.document.querySelector.bind(window.document);
     ok(!$(this.BACK).disabled, "back button is enabled");
     ok(!$(this.FORWARD).disabled, "forward button is enabled");
     ok(!$(this.START), "start button is hidden");
     ok(!!$(this.STOP), "stop button is showing");
     // This checks for a localized label. Not the best...
     ok($(this.STOP).title == "Stop", "Button tooltip is correct");
   },
 
-  selectVoice: function(window, voiceUri) {
+  selectVoice(window, voiceUri) {
     if (!this.isVisible(window.document.querySelector(this.VOICE_OPTIONS))) {
       window.document.querySelector(this.VOICE_SELECT).click();
     }
 
     let voiceOption = window.document.querySelector(
       `#narrate-voices .option[data-value="${voiceUri}"]`);
 
     voiceOption.focus();
     voiceOption.click();
 
     return voiceOption.classList.contains("selected");
   },
 
-  getEventUtils: function(window) {
+  getEventUtils(window) {
     let eventUtils = {
       "_EU_Ci": Components.interfaces,
       "_EU_Cc": Components.classes,
-      window: window,
+      window,
       parent: window,
       navigator: window.navigator,
       KeyboardEvent: window.KeyboardEvent,
       KeyEvent: window.KeyEvent
     };
     Services.scriptloader.loadSubScript(
       "chrome://mochikit/content/tests/SimpleTest/EventUtils.js", eventUtils);
     return eventUtils;
   },
 
-  getReaderReadyPromise: function(window) {
+  getReaderReadyPromise(window) {
     return new Promise(resolve => {
       function observeReady(subject, topic) {
         if (subject == window) {
           Services.obs.removeObserver(observeReady, topic);
           resolve();
         }
       }
 
       if (window.document.body.classList.contains("loaded")) {
         resolve();
       } else {
         Services.obs.addObserver(observeReady, "AboutReader:Ready", false);
       }
     });
   },
 
-  waitForNarrateToggle: function(window) {
+  waitForNarrateToggle(window) {
     let toggle = window.document.querySelector(this.TOGGLE);
     return ContentTaskUtils.waitForCondition(
       () => !toggle.hidden, "");
   },
 
-  waitForPrefChange: function(pref) {
+  waitForPrefChange(pref) {
     return new Promise(resolve => {
       function observeChange() {
         Services.prefs.removeObserver(pref, observeChange);
         resolve(Preferences.get(pref));
       }
 
       Services.prefs.addObserver(pref, observeChange, false);
     });
   },
 
-  sendBoundaryEvent: function(window, name, charIndex, charLength) {
+  sendBoundaryEvent(window, name, charIndex, charLength) {
     let detail = { type: "boundary", args: { name, charIndex, charLength } };
     window.dispatchEvent(new window.CustomEvent("testsynthevent",
-      { detail: detail }));
+      { detail }));
   },
 
-  isWordHighlightGone: function(window, ok) {
+  isWordHighlightGone(window, ok) {
     let $ = window.document.querySelector.bind(window.document);
     ok(!$(".narrate-word-highlight"), "No more word highlights exist");
   },
 
-  getWordHighlights: function(window) {
+  getWordHighlights(window) {
     let $$ = window.document.querySelectorAll.bind(window.document);
     let nodes = Array.from($$(".narrate-word-highlight"));
     return nodes.map(node => {
       return { word: node.dataset.word,
                left: Number(node.style.left.replace(/px$/, "")),
                top: Number(node.style.top.replace(/px$/, ""))};
     });
   }
--- a/toolkit/components/passwordmgr/LoginHelper.jsm
+++ b/toolkit/components/passwordmgr/LoginHelper.jsm
@@ -512,17 +512,17 @@ this.LoginHelper = {
   openPasswordManager(window, filterString = "") {
     let win = Services.wm.getMostRecentWindow("Toolkit:PasswordManager");
     if (win) {
       win.setFilter(filterString);
       win.focus();
     } else {
       window.openDialog("chrome://passwordmgr/content/passwordManager.xul",
                         "Toolkit:PasswordManager", "",
-                        {filterString : filterString});
+                        {filterString});
     }
   },
 
   /**
    * Checks if a field type is username compatible.
    *
    * @param {Element} element
    *                  the field we want to check.
--- a/toolkit/components/passwordmgr/LoginImport.jsm
+++ b/toolkit/components/passwordmgr/LoginImport.jsm
@@ -132,29 +132,29 @@ this.LoginImport.prototype = {
             timePasswordChanged = referenceTimeMs;
           }
           if (!timesUsed) {
             timesUsed = 1;
           }
 
           this.store.data.logins.push({
             id: this.store.data.nextId++,
-            hostname: hostname,
-            httpRealm: httpRealm,
-            formSubmitURL: formSubmitURL,
-            usernameField: usernameField,
-            passwordField: passwordField,
-            encryptedUsername: encryptedUsername,
-            encryptedPassword: encryptedPassword,
-            guid: guid,
-            encType: encType,
-            timeCreated: timeCreated,
-            timeLastUsed: timeLastUsed,
-            timePasswordChanged: timePasswordChanged,
-            timesUsed: timesUsed,
+            hostname,
+            httpRealm,
+            formSubmitURL,
+            usernameField,
+            passwordField,
+            encryptedUsername,
+            encryptedPassword,
+            guid,
+            encType,
+            timeCreated,
+            timeLastUsed,
+            timePasswordChanged,
+            timesUsed,
           });
         } catch (ex) {
           Cu.reportError("Error importing login: " + ex);
         }
       }
 
       rows = yield connection.execute("SELECT * FROM moz_disabledHosts");
       for (let row of rows) {
--- a/toolkit/components/passwordmgr/LoginManagerContent.jsm
+++ b/toolkit/components/passwordmgr/LoginManagerContent.jsm
@@ -230,17 +230,17 @@ var LoginManagerContent = {
     }
 
     let request = this._takeRequest(msg);
     switch (msg.name) {
       case "RemoteLogins:loginsFound": {
         let loginsFound = LoginHelper.vanillaObjectsToLogins(msg.data.logins);
         request.promise.resolve({
           form: request.form,
-          loginsFound: loginsFound,
+          loginsFound,
           recipes: msg.data.recipes,
         });
         break;
       }
 
       case "RemoteLogins:loginsAutoCompleted": {
         let loginsFound =
           LoginHelper.vanillaObjectsToLogins(msg.data.logins);
@@ -271,20 +271,20 @@ var LoginManagerContent = {
     if (!formOrigin) {
       return Promise.reject("_getLoginDataFromParent: A form origin is required");
     }
     let actionOrigin = LoginUtils._getActionOrigin(form);
 
     let messageManager = messageManagerFromWindow(win);
 
     // XXX Weak??
-    let requestData = { form: form };
-    let messageData = { formOrigin: formOrigin,
-                        actionOrigin: actionOrigin,
-                        options: options };
+    let requestData = { form };
+    let messageData = { formOrigin,
+                        actionOrigin,
+                        options };
 
     return this._sendRequest(messageManager, requestData,
                              "RemoteLogins:findLogins",
                              messageData);
   },
 
   _autoCompleteSearchAsync(aSearchString, aPreviousResult,
                                      aElement, aRect) {
@@ -301,24 +301,24 @@ var LoginManagerContent = {
                   Services.appinfo.PROCESS_TYPE_CONTENT);
 
     let previousResult = aPreviousResult ?
                            { searchString: aPreviousResult.searchString,
                              logins: LoginHelper.loginsToVanillaObjects(aPreviousResult.logins) } :
                            null;
 
     let requestData = {};
-    let messageData = { formOrigin: formOrigin,
-                        actionOrigin: actionOrigin,
+    let messageData = { formOrigin,
+                        actionOrigin,
                         searchString: aSearchString,
-                        previousResult: previousResult,
+                        previousResult,
                         rect: aRect,
                         isSecure: InsecurePasswordUtils.isFormSecure(form),
                         isPasswordField: aElement.type == "password",
-                        remote: remote };
+                        remote };
 
     return this._sendRequest(messageManager, requestData,
                              "RemoteLogins:autoCompleteLogins",
                              messageData);
   },
 
   setupProgressListener(window) {
     if (!LoginHelper.formlessCaptureEnabled) {
@@ -603,17 +603,17 @@ var LoginManagerContent = {
       }
 
       if (skipEmptyFields && !element.value) {
         continue;
       }
 
       pwFields[pwFields.length] = {
                                     index   : i,
-                                    element : element
+                                    element
                                   };
     }
 
     // If too few or too many fields, bail out.
     if (pwFields.length == 0) {
       log("(form ignored -- no password fields.)");
       return null;
     } else if (pwFields.length > 3) {
@@ -876,18 +876,18 @@ var LoginManagerContent = {
                             { name: oldPasswordField.name,
                               value: oldPasswordField.value } :
                             null;
 
     // Make sure to pass the opener's top in case it was in a frame.
     let openerTopWindow = win.opener ? win.opener.top : null;
 
     messageManager.sendAsyncMessage("RemoteLogins:onFormSubmit",
-                                    { hostname: hostname,
-                                      formSubmitURL: formSubmitURL,
+                                    { hostname,
+                                      formSubmitURL,
                                       usernameField: mockUsername,
                                       newPasswordField: mockPassword,
                                       oldPasswordField: mockOldPassword },
                                     { openerTopWindow });
   },
 
   /**
    * Attempt to find the username and password fields in a form, and fill them
--- a/toolkit/components/passwordmgr/LoginManagerContextMenu.jsm
+++ b/toolkit/components/passwordmgr/LoginManagerContextMenu.jsm
@@ -159,20 +159,20 @@ var LoginManagerContextMenu = {
    *        The target tab browser.
    * @param {nsIURI} documentURI
    *        URI of the document owning the form we want to fill.
    *        This isn't the same as the browser's top-level
    *        document URI when subframes are involved.
    */
   _fillTargetField(login, inputElement, browser, documentURI) {
     LoginManagerParent.fillForm({
-      browser: browser,
+      browser,
       loginFormOrigin: documentURI.prePath,
-      login: login,
-      inputElement: inputElement,
+      login,
+      inputElement,
     }).catch(Cu.reportError);
   },
 
   /**
    * @param {string} key
    *        The localized string key
    * @param {string[]} formatArgs
    *        An array of formatting argument string
--- a/toolkit/components/passwordmgr/LoginManagerParent.jsm
+++ b/toolkit/components/passwordmgr/LoginManagerParent.jsm
@@ -33,17 +33,17 @@ var LoginManagerParent = {
    * synchronous access. This is a temporary hack and new consumers should yield on
    * recipeParentPromise instead.
    *
    * @type LoginRecipesParent
    * @deprecated
    */
   _recipeManager: null,
 
-  init: function() {
+  init() {
     let mm = Cc["@mozilla.org/globalmessagemanager;1"]
                .getService(Ci.nsIMessageListenerManager);
     mm.addMessageListener("RemoteLogins:findLogins", this);
     mm.addMessageListener("RemoteLogins:findRecipes", this);
     mm.addMessageListener("RemoteLogins:onFormSubmit", this);
     mm.addMessageListener("RemoteLogins:autoCompleteLogins", this);
     mm.addMessageListener("RemoteLogins:removeLogin", this);
     mm.addMessageListener("RemoteLogins:insecureLoginFormPresent", this);
@@ -52,17 +52,17 @@ var LoginManagerParent = {
       const { LoginRecipesParent } = Cu.import("resource://gre/modules/LoginRecipes.jsm", {});
       this._recipeManager = new LoginRecipesParent({
         defaults: Services.prefs.getComplexValue("signon.recipes.path", Ci.nsISupportsString).data,
       });
       return this._recipeManager.initializationPromise;
     });
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     let data = msg.data;
     switch (msg.name) {
       case "RemoteLogins:findLogins": {
         // TODO Verify msg.target's principals against the formOrigin?
         this.sendLoginDataToChild(data.options.showMasterPassword,
                                   data.formOrigin,
                                   data.actionOrigin,
                                   data.requestId,
@@ -151,17 +151,17 @@ var LoginManagerParent = {
       } catch (ex) {
         // Some schemes e.g. chrome aren't supported by URL
       }
     }
 
     if (!showMasterPassword && !Services.logins.isLoggedIn) {
       try {
         target.sendAsyncMessage("RemoteLogins:loginsFound", {
-          requestId: requestId,
+          requestId,
           logins: [],
           recipes,
         });
       } catch (e) {
         log("error sending message to target", e);
       }
       return;
     }
@@ -170,24 +170,24 @@ var LoginManagerParent = {
     // processing this form until the user handles the prompt.
     if (Services.logins.uiBusy) {
       log("deferring sendLoginDataToChild for", formOrigin);
       let self = this;
       let observer = {
         QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                                Ci.nsISupportsWeakReference]),
 
-        observe: function(subject, topic, data) {
+        observe(subject, topic, data) {
           log("Got deferred sendLoginDataToChild notification:", topic);
           // Only run observer once.
           Services.obs.removeObserver(this, "passwordmgr-crypto-login");
           Services.obs.removeObserver(this, "passwordmgr-crypto-loginCanceled");
           if (topic == "passwordmgr-crypto-loginCanceled") {
             target.sendAsyncMessage("RemoteLogins:loginsFound", {
-              requestId: requestId,
+              requestId,
               logins: [],
               recipes,
             });
             return;
           }
 
           self.sendLoginDataToChild(showMasterPassword, formOrigin, actionOrigin,
                                     requestId, target);
@@ -214,23 +214,23 @@ var LoginManagerParent = {
       "timePasswordChanged",
     ];
     logins = LoginHelper.dedupeLogins(logins, ["username"], resolveBy, formOrigin);
     log("sendLoginDataToChild:", logins.length, "deduped logins");
     // Convert the array of nsILoginInfo to vanilla JS objects since nsILoginInfo
     // doesn't support structured cloning.
     var jsLogins = LoginHelper.loginsToVanillaObjects(logins);
     target.sendAsyncMessage("RemoteLogins:loginsFound", {
-      requestId: requestId,
+      requestId,
       logins: jsLogins,
       recipes,
     });
   }),
 
-  doAutocompleteSearch: function({ formOrigin, actionOrigin,
+  doAutocompleteSearch({ formOrigin, actionOrigin,
                                    searchString, previousResult,
                                    rect, requestId, isSecure, isPasswordField,
                                    remote }, target) {
     // Note: previousResult is a regular object, not an
     // nsIAutoCompleteResult.
 
     let searchStringLower = searchString.toLowerCase();
     let logins;
@@ -278,22 +278,22 @@ var LoginManagerParent = {
       let results = new UserAutoCompleteResult(searchString, matchingLogins, {isSecure});
       AutoCompletePopup.showPopupWithResults({ browser: target.ownerDocument.defaultView, rect, results });
     }
 
     // Convert the array of nsILoginInfo to vanilla JS objects since nsILoginInfo
     // doesn't support structured cloning.
     var jsLogins = LoginHelper.loginsToVanillaObjects(matchingLogins);
     target.messageManager.sendAsyncMessage("RemoteLogins:loginsAutoCompleted", {
-      requestId: requestId,
+      requestId,
       logins: jsLogins,
     });
   },
 
-  onFormSubmit: function(hostname, formSubmitURL,
+  onFormSubmit(hostname, formSubmitURL,
                          usernameField, newPasswordField,
                          oldPasswordField, openerTopWindow,
                          target) {
     function getPrompter() {
       var prompterSvc = Cc["@mozilla.org/login-manager/prompter;1"].
                         createInstance(Ci.nsILoginManagerPrompter);
       prompterSvc.init(target.ownerDocument.defaultView);
       prompterSvc.browser = target;
--- a/toolkit/components/passwordmgr/content/passwordManager.js
+++ b/toolkit/components/passwordmgr/content/passwordManager.js
@@ -30,17 +30,17 @@ let deletedSignons = [];
 let filterField;
 let togglePasswordsButton;
 let signonsIntro;
 let removeButton;
 let removeAllButton;
 let signonsTree;
 
 let signonReloadDisplay = {
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     if (topic == "passwordmgr-storage-changed") {
       switch (data) {
         case "addLogin":
         case "modifyLogin":
         case "removeLogin":
         case "removeAllLogins":
           if (!signonsTree) {
             return;
--- a/toolkit/components/passwordmgr/crypto-SDR.js
+++ b/toolkit/components/passwordmgr/crypto-SDR.js
@@ -32,24 +32,24 @@ LoginManagerCrypto_SDR.prototype = {
     if (!this.__utfConverter) {
       this.__utfConverter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].
                             createInstance(Ci.nsIScriptableUnicodeConverter);
       this.__utfConverter.charset = "UTF-8";
     }
     return this.__utfConverter;
   },
 
-  _utfConverterReset : function() {
+  _utfConverterReset() {
     this.__utfConverter = null;
   },
 
   _uiBusy : false,
 
 
-  init : function() {
+  init() {
     // Check to see if the internal PKCS#11 token has been initialized.
     // If not, set a blank password.
     let tokenDB = Cc["@mozilla.org/security/pk11tokendb;1"].
                   getService(Ci.nsIPK11TokenDB);
 
     let token = tokenDB.getInternalKeyToken();
     if (token.needsUserInit) {
       this.log("Initializing key3.db with default blank password.");
@@ -61,17 +61,17 @@ LoginManagerCrypto_SDR.prototype = {
   /*
    * encrypt
    *
    * Encrypts the specified string, using the SecretDecoderRing.
    *
    * Returns the encrypted string, or throws an exception if there was a
    * problem.
    */
-  encrypt : function(plainText) {
+  encrypt(plainText) {
     let cipherText = null;
 
     let wasLoggedIn = this.isLoggedIn;
     let canceledMP = false;
 
     this._uiBusy = true;
     try {
       let plainOctet = this._utfConverter.ConvertFromUnicode(plainText);
@@ -102,17 +102,17 @@ LoginManagerCrypto_SDR.prototype = {
   /*
    * decrypt
    *
    * Decrypts the specified string, using the SecretDecoderRing.
    *
    * Returns the decrypted string, or throws an exception if there was a
    * problem.
    */
-  decrypt : function(cipherText) {
+  decrypt(cipherText) {
     let plainText = null;
 
     let wasLoggedIn = this.isLoggedIn;
     let canceledMP = false;
 
     this._uiBusy = true;
     try {
       let plainOctet;
@@ -173,17 +173,17 @@ LoginManagerCrypto_SDR.prototype = {
   get defaultEncType() {
     return Ci.nsILoginManagerCrypto.ENCTYPE_SDR;
   },
 
 
   /*
    * _notifyObservers
    */
-  _notifyObservers : function(topic) {
+  _notifyObservers(topic) {
     this.log("Prompted for a master password, notifying for " + topic);
     Services.obs.notifyObservers(null, topic, null);
   },
 }; // end of nsLoginManagerCrypto_SDR implementation
 
 XPCOMUtils.defineLazyGetter(this.LoginManagerCrypto_SDR.prototype, "log", () => {
   let logger = LoginHelper.createLogger("Login crypto");
   return logger.log.bind(logger);
--- a/toolkit/components/passwordmgr/nsLoginInfo.js
+++ b/toolkit/components/passwordmgr/nsLoginInfo.js
@@ -24,17 +24,17 @@ nsLoginInfo.prototype = {
   hostname      : null,
   formSubmitURL : null,
   httpRealm     : null,
   username      : null,
   password      : null,
   usernameField : null,
   passwordField : null,
 
-  init : function(aHostname, aFormSubmitURL, aHttpRealm,
+  init(aHostname, aFormSubmitURL, aHttpRealm,
                   aUsername,      aPassword,
                   aUsernameField, aPasswordField) {
     this.hostname      = aHostname;
     this.formSubmitURL = aFormSubmitURL;
     this.httpRealm     = aHttpRealm;
     this.username      = aUsername;
     this.password      = aPassword;
     this.usernameField = aUsernameField;
@@ -42,30 +42,30 @@ nsLoginInfo.prototype = {
   },
 
   matches(aLogin, ignorePassword) {
     return LoginHelper.doLoginsMatch(this, aLogin, {
       ignorePassword,
     });
   },
 
-  equals : function(aLogin) {
+  equals(aLogin) {
     if (this.hostname      != aLogin.hostname      ||
         this.formSubmitURL != aLogin.formSubmitURL ||
         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 : function() {
+  clone() {
     let clone = Cc["@mozilla.org/login-manager/loginInfo;1"].
                 createInstance(Ci.nsILoginInfo);
     clone.init(this.hostname, this.formSubmitURL, this.httpRealm,
                this.username, this.password,
                this.usernameField, this.passwordField);
 
     // Copy nsILoginMetaInfo props
     clone.QueryInterface(Ci.nsILoginMetaInfo);
--- a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js
+++ b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js
@@ -41,37 +41,37 @@ function LoginManagerPromptFactory() {
 LoginManagerPromptFactory.prototype = {
 
   classID : Components.ID("{749e62f4-60ae-4569-a8a2-de78b649660e}"),
   QueryInterface : XPCOMUtils.generateQI([Ci.nsIPromptFactory, Ci.nsIObserver, Ci.nsISupportsWeakReference]),
 
   _asyncPrompts : {},
   _asyncPromptInProgress : false,
 
-  observe : function(subject, topic, data) {
+  observe(subject, topic, data) {
     this.log("Observed: " + topic);
     if (topic == "quit-application-granted") {
       this._cancelPendingPrompts();
     } else if (topic == "passwordmgr-crypto-login") {
       // Start processing the deferred prompters.
       this._doAsyncPrompt();
     } else if (topic == "passwordmgr-crypto-loginCanceled") {
       // User canceled a Master Password prompt, so go ahead and cancel
       // all pending auth prompts to avoid nagging over and over.
       this._cancelPendingPrompts();
     }
   },
 
-  getPrompt : function(aWindow, aIID) {
+  getPrompt(aWindow, aIID) {
     var prompt = new LoginManagerPrompter().QueryInterface(aIID);
     prompt.init(aWindow, this);
     return prompt;
   },
 
-  _doAsyncPrompt : function() {
+  _doAsyncPrompt() {
     if (this._asyncPromptInProgress) {
       this.log("_doAsyncPrompt bypassed, already in progress");
       return;
     }
 
     // Find the first prompt key we have in the queue
     var hashKey = null;
     for (hashKey in this._asyncPrompts)
@@ -110,17 +110,17 @@ LoginManagerPromptFactory.prototype = {
         }
       }
     }
 
     var self = this;
 
     var runnable = {
       cancel: false,
-      run : function() {
+      run() {
         var ok = false;
         if (!this.cancel) {
           try {
             self.log("_doAsyncPrompt:run - performing the prompt for '" + hashKey + "'");
             ok = prompter.promptAuth(prompt.channel,
                                      prompt.level,
                                      prompt.authInfo);
           } catch (e) {
@@ -180,17 +180,17 @@ LoginManagerPromptFactory.prototype = {
       prompt.inProgress = true;
     }
 
     Services.tm.mainThread.dispatch(runnable, Ci.nsIThread.DISPATCH_NORMAL);
     this.log("_doAsyncPrompt:run dispatched");
   },
 
 
-  _cancelPendingPrompts : function() {
+  _cancelPendingPrompts() {
     this.log("Canceling all pending prompts...");
     var asyncPrompts = this._asyncPrompts;
     this.__proto__._asyncPrompts = {};
 
     for (var hashKey in asyncPrompts) {
       let prompt = asyncPrompts[hashKey];
       // Watch out! If this prompt is currently prompting, let it handle
       // notifying the callbacks of success/failure, since it's already
@@ -316,17 +316,17 @@ LoginManagerPrompter.prototype = {
 
   /* ---------- nsIAuthPrompt prompts ---------- */
 
 
   /**
    * Wrapper around the prompt service prompt. Saving random fields here
    * doesn't really make sense and therefore isn't implemented.
    */
-  prompt : function(aDialogTitle, aText, aPasswordRealm,
+  prompt(aDialogTitle, aText, aPasswordRealm,
                     aSavePassword, aDefaultText, aResult) {
     if (aSavePassword != Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER)
       throw new Components.Exception("prompt only supports SAVE_PASSWORD_NEVER",
                                      Cr.NS_ERROR_NOT_IMPLEMENTED);
 
     this.log("===== prompt() called =====");
 
     if (aDefaultText) {
@@ -337,17 +337,17 @@ LoginManagerPrompter.prototype = {
            aDialogTitle, aText, aResult, null, {});
   },
 
 
   /**
    * Looks up a username and password in the database. Will prompt the user
    * with a dialog, even if a username and password are found.
    */
-  promptUsernameAndPassword : function(aDialogTitle, aText, aPasswordRealm,
+  promptUsernameAndPassword(aDialogTitle, aText, aPasswordRealm,
                                        aSavePassword, aUsername, aPassword) {
     this.log("===== promptUsernameAndPassword() called =====");
 
     if (aSavePassword == Ci.nsIAuthPrompt.SAVE_PASSWORD_FOR_SESSION)
       throw new Components.Exception("promptUsernameAndPassword doesn't support SAVE_PASSWORD_FOR_SESSION",
                                      Cr.NS_ERROR_NOT_IMPLEMENTED);
 
     var selectedLogin = null;
@@ -438,17 +438,17 @@ LoginManagerPrompter.prototype = {
   /**
    * If a password is found in the database for the password realm, it is
    * returned straight away without displaying a dialog.
    *
    * If a password is not found in the database, the user will be prompted
    * with a dialog with a text field and ok/cancel buttons. If the user
    * allows it, then the password will be saved in the database.
    */
-  promptPassword : function(aDialogTitle, aText, aPasswordRealm,
+  promptPassword(aDialogTitle, aText, aPasswordRealm,
                             aSavePassword, aPassword) {
     this.log("===== promptPassword called() =====");
 
     if (aSavePassword == Ci.nsIAuthPrompt.SAVE_PASSWORD_FOR_SESSION)
       throw new Components.Exception("promptPassword doesn't support SAVE_PASSWORD_FOR_SESSION",
                                      Cr.NS_ERROR_NOT_IMPLEMENTED);
 
     var checkBox = { value : false };
@@ -514,17 +514,17 @@ LoginManagerPrompter.prototype = {
    *   - the realm (hostname + path)
    *   - the username, if present
    *
    * If aRealmString is in the format produced by NS_GetAuthKey for HTTP[S]
    * channels, e.g. "example.com:80 (httprealm)", null is returned for all
    * arguments to let callers know the login can't be saved because we don't
    * know whether it's http or https.
    */
-  _getRealmInfo : function(aRealmString) {
+  _getRealmInfo(aRealmString) {
     var httpRealm = /^.+ \(.+\)$/;
     if (httpRealm.test(aRealmString))
       return [null, null, null];
 
     var uri = Services.io.newURI(aRealmString, null, null);
     var pathname = "";
 
     if (uri.path != "/")
@@ -542,17 +542,17 @@ LoginManagerPrompter.prototype = {
 
   /**
    * Implementation of nsIAuthPrompt2.
    *
    * @param {nsIChannel} aChannel
    * @param {int}        aLevel
    * @param {nsIAuthInformation} aAuthInfo
    */
-  promptAuth : function(aChannel, aLevel, aAuthInfo) {
+  promptAuth(aChannel, aLevel, aAuthInfo) {
     var selectedLogin = null;
     var checkbox = { value : false };
     var checkboxLabel = null;
     var epicfail = false;
     var canAutologin = false;
     var notifyObj;
     var foundLogins;
 
@@ -673,17 +673,17 @@ LoginManagerPrompter.prototype = {
     } catch (e) {
       Components.utils.reportError("LoginManagerPrompter: " +
           "Fail2 in promptAuth: " + e + "\n");
     }
 
     return ok;
   },
 
-  asyncPromptAuth : function(aChannel, aCallback, aContext, aLevel, aAuthInfo) {
+  asyncPromptAuth(aChannel, aCallback, aContext, aLevel, aAuthInfo) {
     var cancelable = null;
 
     try {
       this.log("===== asyncPromptAuth called =====");
 
       // If the user submits a login but it fails, we need to remove the
       // notification bar that was displayed. Conveniently, the user will
       // be prompted for authentication again, which brings us here.
@@ -726,17 +726,17 @@ LoginManagerPrompter.prototype = {
   },
 
 
 
 
   /* ---------- nsILoginManagerPrompter prompts ---------- */
 
 
-  init : function(aWindow = null, aFactory = null) {
+  init(aWindow = null, aFactory = null) {
     if (!aWindow) {
       // There may be no applicable window e.g. in a Sandbox or JSM.
       this._chromeWindow = null;
       this._browser = null;
     } else if (aWindow instanceof Ci.nsIDOMChromeWindow) {
       this._chromeWindow = aWindow;
       // needs to be set explicitly using setBrowser
       this._browser = null;
@@ -754,29 +754,29 @@ LoginManagerPrompter.prototype = {
   set browser(aBrowser) {
     this._browser = aBrowser;
   },
 
   set opener(aOpener) {
     this._opener = aOpener;
   },
 
-  promptToSavePassword : function(aLogin) {
+  promptToSavePassword(aLogin) {
     this.log("promptToSavePassword");
     var notifyObj = this._getPopupNote() || this._getNotifyBox();
     if (notifyObj)
       this._showSaveLoginNotification(notifyObj, aLogin);
     else
       this._showSaveLoginDialog(aLogin);
   },
 
   /**
    * Displays a notification bar.
    */
-  _showLoginNotification : function(aNotifyBox, aName, aText, aButtons) {
+  _showLoginNotification(aNotifyBox, aName, aText, aButtons) {
     var oldBar = aNotifyBox.getNotificationWithValue(aName);
     const priority = aNotifyBox.PRIORITY_INFO_MEDIUM;
 
     this.log("Adding new " + aName + " notification bar");
     var newBar = aNotifyBox.appendNotification(
                             aText, aName, "",
                             priority, aButtons);
 
@@ -1009,17 +1009,17 @@ LoginManagerPrompter.prototype = {
       "password-notification-icon",
       mainAction,
       secondaryActions,
       {
         persistWhileVisible: true,
         persistent: true,
         passwordNotificationType: type,
         hideClose: true,
-        eventCallback: function(topic) {
+        eventCallback(topic) {
           switch (topic) {
             case "showing":
               currentNotification = this;
               chromeDoc.getElementById("password-notification-password")
                        .removeAttribute("focused");
               chromeDoc.getElementById("password-notification-username")
                        .removeAttribute("focused");
               chromeDoc.getElementById("password-notification-username")
@@ -1067,17 +1067,17 @@ LoginManagerPrompter.prototype = {
    * to save the specified login. This allows the user to see the results of
    * their login, and only save a login which they know worked.
    *
    * @param aNotifyObj
    *        A notification box or a popup notification.
    * @param aLogin
    *        The login captured from the form.
    */
-  _showSaveLoginNotification : function(aNotifyObj, aLogin) {
+  _showSaveLoginNotification(aNotifyObj, aLogin) {
     // Ugh. We can't use the strings from the popup window, because they
     // have the access key marked in the string (eg "Mo&zilla"), along
     // with some weird rules for handling access keys that do not occur
     // in the string, for L10N. See commonDialog.js's setLabelForNode().
     var neverButtonText =
           this._getLocalizedString("notifyBarNeverRememberButtonText2");
     var neverButtonAccessKey =
           this._getLocalizedString("notifyBarNeverRememberButtonAccessKey2");
@@ -1105,48 +1105,48 @@ LoginManagerPrompter.prototype = {
       var notNowButtonAccessKey =
             this._getLocalizedString("notifyBarNotNowButtonAccessKey");
       var buttons = [
         // "Remember" button
         {
           label:     rememberButtonText,
           accessKey: rememberButtonAccessKey,
           popup:     null,
-          callback: function(aNotifyObj, aButton) {
+          callback(aNotifyObj, aButton) {
             pwmgr.addLogin(aLogin);
           }
         },
 
         // "Never for this site" button
         {
           label:     neverButtonText,
           accessKey: neverButtonAccessKey,
           popup:     null,
-          callback: function(aNotifyObj, aButton) {
+          callback(aNotifyObj, aButton) {
             pwmgr.setLoginSavingEnabled(aLogin.hostname, false);
           }
         },
 
         // "Not now" button
         {
           label:     notNowButtonText,
           accessKey: notNowButtonAccessKey,
           popup:     null,
-          callback:  function() { /* NOP */ }
+          callback() { /* NOP */ }
         }
       ];
 
       this._showLoginNotification(aNotifyObj, "password-save",
                                   notificationText, buttons);
     }
 
     Services.obs.notifyObservers(aLogin, "passwordmgr-prompt-save", null);
   },
 
-  _removeLoginNotifications : function() {
+  _removeLoginNotifications() {
     var popupNote = this._getPopupNote();
     if (popupNote)
       popupNote = popupNote.getNotification("password");
     if (popupNote)
       popupNote.remove();
 
     var notifyBox = this._getNotifyBox();
     if (notifyBox) {
@@ -1164,17 +1164,17 @@ LoginManagerPrompter.prototype = {
     }
   },
 
 
   /**
    * Called when we detect a new login in a form submission,
    * asks the user what to do.
    */
-  _showSaveLoginDialog : function(aLogin) {
+  _showSaveLoginDialog(aLogin) {
     const buttonFlags = Ci.nsIPrompt.BUTTON_POS_1_DEFAULT +
         (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_0) +
         (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_1) +
         (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_2);
 
     var displayHost = this._getShortDisplayHost(aLogin.hostname);
 
     var dialogText;
@@ -1287,27 +1287,27 @@ LoginManagerPrompter.prototype = {
       var dontChangeButtonAccessKey =
             this._getLocalizedString("notifyBarDontChangeButtonAccessKey");
       var buttons = [
         // "Yes" button
         {
           label:     changeButtonText,
           accessKey: changeButtonAccessKey,
           popup:     null,
-          callback:  function(aNotifyObj, aButton) {
+          callback(aNotifyObj, aButton) {
             self._updateLogin(aOldLogin, aNewLogin);
           }
         },
 
         // "No" button
         {
           label:     dontChangeButtonText,
           accessKey: dontChangeButtonAccessKey,
           popup:     null,
-          callback:  function(aNotifyObj, aButton) {
+          callback(aNotifyObj, aButton) {
             // do nothing
           }
         }
       ];
 
       this._showLoginNotification(aNotifyObj, "password-change",
                                   notificationText, buttons);
     }
@@ -1356,17 +1356,17 @@ LoginManagerPrompter.prototype = {
    * to select a username and confirm the password change.
    *
    * Note: The caller doesn't know the username for aNewLogin, so this
    *       function fills in .username and .usernameField with the values
    *       from the login selected by the user.
    *
    * Note; XPCOM stupidity: |count| is just |logins.length|.
    */
-  promptToChangePasswordWithUsernames : function(logins, count, aNewLogin) {
+  promptToChangePasswordWithUsernames(logins, count, aNewLogin) {
     this.log("promptToChangePasswordWithUsernames with count:", count);
 
     var usernames = logins.map(l => l.username);
     var dialogText  = this._getLocalizedString("userSelectText");
     var dialogTitle = this._getLocalizedString("passwordChangeTitle");
     var selectedIndex = { value: null };
 
     // If user selects ok, outparam.value is set to the index
@@ -1414,29 +1414,29 @@ LoginManagerPrompter.prototype = {
     propBag.setProperty("timeLastUsed", now);
     propBag.setProperty("timesUsedIncrement", 1);
     this._pwmgr.modifyLogin(login, propBag);
   },
 
   /**
    * Given a content DOM window, returns the chrome window and browser it's in.
    */
-  _getChromeWindow: function(aWindow) {
+  _getChromeWindow(aWindow) {
     let windows = Services.wm.getEnumerator(null);
     while (windows.hasMoreElements()) {
       let win = windows.getNext();
       let browser = win.gBrowser.getBrowserForContentWindow(aWindow);
       if (browser) {
         return { win, browser };
       }
     }
     return null;
   },
 
-  _getNotifyWindow: function() {
+  _getNotifyWindow() {
     // Some sites pop up a temporary login window, which disappears
     // upon submission of credentials. We want to put the notification
     // bar in the opener window if this seems to be happening.
     if (this._opener) {
       let chromeDoc = this._chromeWindow.document.documentElement;
 
       // Check to see if the current window was opened with chrome
       // disabled, and if so use the opener window. But if the window
@@ -1450,17 +1450,17 @@ LoginManagerPrompter.prototype = {
 
     return { win: this._chromeWindow, browser: this._browser };
   },
 
   /**
    * Returns the popup notification to this prompter,
    * or null if there isn't one available.
    */
-  _getPopupNote : function() {
+  _getPopupNote() {
     let popupNote = null;
 
     try {
       let { win: notifyWin } = this._getNotifyWindow();
 
       // .wrappedJSObject needed here -- see bug 422974 comment 5.
       popupNote = notifyWin.wrappedJSObject.PopupNotifications;
     } catch (e) {
@@ -1470,17 +1470,17 @@ LoginManagerPrompter.prototype = {
     return popupNote;
   },
 
 
   /**
    * Returns the notification box to this prompter, or null if there isn't
    * a notification box available.
    */
-  _getNotifyBox : function() {
+  _getNotifyBox() {
     let notifyBox = null;
 
     try {
       let { win: notifyWin } = this._getNotifyWindow();
 
       // .wrappedJSObject needed here -- see bug 422974 comment 5.
       notifyBox = notifyWin.wrappedJSObject.getNotificationBox(notifyWin);
     } catch (e) {
@@ -1491,17 +1491,17 @@ LoginManagerPrompter.prototype = {
   },
 
 
   /**
    * The user might enter a login that isn't the one we prefilled, but
    * is the same as some other existing login. So, pick a login with a
    * matching username, or return null.
    */
-  _repickSelectedLogin : function(foundLogins, username) {
+  _repickSelectedLogin(foundLogins, username) {
     for (var i = 0; i < foundLogins.length; i++)
       if (foundLogins[i].username == username)
         return foundLogins[i];
     return null;
   },
 
 
   /**
@@ -1510,62 +1510,62 @@ LoginManagerPrompter.prototype = {
    *   _getLocalizedString("key2", ["arg1"]);
    *   _getLocalizedString("key3", ["arg1", "arg2"]);
    *   (etc)
    *
    * Returns the localized string for the specified key,
    * formatted if required.
    *
    */
-  _getLocalizedString : function(key, formatArgs) {
+  _getLocalizedString(key, formatArgs) {
     if (formatArgs)
       return this._strBundle.formatStringFromName(
                                   key, formatArgs, formatArgs.length);
     return this._strBundle.GetStringFromName(key);
   },
 
 
   /**
    * Sanitizes the specified username, by stripping quotes and truncating if
    * it's too long. This helps prevent an evil site from messing with the
    * "save password?" prompt too much.
    */
-  _sanitizeUsername : function(username) {
+  _sanitizeUsername(username) {
     if (username.length > 30) {
       username = username.substring(0, 30);
       username += this._ellipsis;
     }
     return username.replace(/['"]/g, "");
   },
 
 
   /**
    * The aURI parameter may either be a string uri, or an nsIURI instance.
    *
    * Returns the hostname to use in a nsILoginInfo object (for example,
    * "http://example.com").
    */
-  _getFormattedHostname : function(aURI) {
+  _getFormattedHostname(aURI) {
     let uri;
     if (aURI instanceof Ci.nsIURI) {
       uri = aURI;
     } else {
       uri = Services.io.newURI(aURI, null, null);
     }
 
     return uri.scheme + "://" + uri.hostPort;
   },
 
 
   /**
    * Converts a login's hostname field (a URL) to a short string for
    * prompting purposes. Eg, "http://foo.com" --> "foo.com", or
    * "ftp://www.site.co.uk" --> "site.co.uk".
    */
-  _getShortDisplayHost: function(aURIString) {
+  _getShortDisplayHost(aURIString) {
     var displayHost;
 
     var eTLDService = Cc["@mozilla.org/network/effective-tld-service;1"].
                       getService(Ci.nsIEffectiveTLDService);
     var idnService = Cc["@mozilla.org/network/idn-service;1"].
                      getService(Ci.nsIIDNService);
     try {
       var uri = Services.io.newURI(aURIString, null, null);
@@ -1581,17 +1581,17 @@ LoginManagerPrompter.prototype = {
     return displayHost;
   },
 
 
   /**
    * Returns the hostname and realm for which authentication is being
    * requested, in the format expected to be used with nsILoginInfo.
    */
-  _getAuthTarget : function(aChannel, aAuthInfo) {
+  _getAuthTarget(aChannel, aAuthInfo) {
     var hostname, realm;
 
     // If our proxy is demanding authentication, don't use the
     // channel's actual destination.
     if (aAuthInfo.flags & Ci.nsIAuthInformation.AUTH_PROXY) {
       this.log("getAuthTarget is for proxy auth");
       if (!(aChannel instanceof Ci.nsIProxiedChannel))
         throw new Error("proxy auth needs nsIProxiedChannel");
@@ -1629,17 +1629,17 @@ LoginManagerPrompter.prototype = {
 
   /**
    * Returns [username, password] as extracted from aAuthInfo (which
    * holds this info after having prompted the user).
    *
    * If the authentication was for a Windows domain, we'll prepend the
    * return username with the domain. (eg, "domain\user")
    */
-  _GetAuthInfo : function(aAuthInfo) {
+  _GetAuthInfo(aAuthInfo) {
     var username, password;
 
     var flags = aAuthInfo.flags;
     if (flags & Ci.nsIAuthInformation.NEED_DOMAIN && aAuthInfo.domain)
       username = aAuthInfo.domain + "\\" + aAuthInfo.username;
     else
       username = aAuthInfo.username;
 
@@ -1649,39 +1649,39 @@ LoginManagerPrompter.prototype = {
   },
 
 
   /**
    * Given a username (possibly in DOMAIN\user form) and password, parses the
    * domain out of the username if necessary and sets domain, username and
    * password on the auth information object.
    */
-  _SetAuthInfo : function(aAuthInfo, username, password) {
+  _SetAuthInfo(aAuthInfo, username, password) {
     var flags = aAuthInfo.flags;
     if (flags & Ci.nsIAuthInformation.NEED_DOMAIN) {
       // Domain is separated from username by a backslash
       var idx = username.indexOf("\\");
       if (idx == -1) {
         aAuthInfo.username = username;
       } else {
         aAuthInfo.domain   =  username.substring(0, idx);
         aAuthInfo.username =  username.substring(idx + 1);
       }
     } else {
       aAuthInfo.username = username;
     }
     aAuthInfo.password = password;
   },
 
-  _newAsyncPromptConsumer : function(aCallback, aContext) {
+  _newAsyncPromptConsumer(aCallback, aContext) {
     return {
       QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]),
       callback: aCallback,
       context: aContext,
-      cancel: function() {
+      cancel() {
         this.callback.onAuthCancelled(this.context, false);
         this.callback = null;
         this.context = null;
       }
     };
   },
 
   /**
--- a/toolkit/components/passwordmgr/storage-json.js
+++ b/toolkit/components/passwordmgr/storage-json.js
@@ -136,17 +136,17 @@ this.LoginManagerStorage_json.prototype 
       hostname:            loginClone.hostname,
       httpRealm:           loginClone.httpRealm,
       formSubmitURL:       loginClone.formSubmitURL,
       usernameField:       loginClone.usernameField,
       passwordField:       loginClone.passwordField,
       encryptedUsername:   encUsername,
       encryptedPassword:   encPassword,
       guid:                loginClone.guid,
-      encType:             encType,
+      encType,
       timeCreated:         loginClone.timeCreated,
       timeLastUsed:        loginClone.timeLastUsed,
       timePasswordChanged: loginClone.timePasswordChanged,
       timesUsed:           loginClone.timesUsed
     });
     this._store.saveSoon();
 
     // Send a notification that a login was added.
@@ -372,19 +372,19 @@ this.LoginManagerStorage_json.prototype 
     this._store.data.logins = [];
     this._store.saveSoon();
 
     LoginHelper.notifyStorageChanged("removeAllLogins", null);
   },
 
   findLogins(count, hostname, formSubmitURL, httpRealm) {
     let loginData = {
-      hostname: hostname,
-      formSubmitURL: formSubmitURL,
-      httpRealm: httpRealm
+      hostname,
+      formSubmitURL,
+      httpRealm
     };
     let matchData = { };
     for (let field of ["hostname", "formSubmitURL", "httpRealm"])
       if (loginData[field] != '')
         matchData[field] = loginData[field];
     let [logins, ids] = this._searchLogins(matchData);
 
     // Decrypt entries found for the caller.
@@ -392,19 +392,19 @@ this.LoginManagerStorage_json.prototype 
 
     this.log("_findLogins: returning", logins.length, "logins");
     count.value = logins.length; // needed for XPCOM
     return logins;
   },
 
   countLogins(hostname, formSubmitURL, httpRealm) {
     let loginData = {
-      hostname: hostname,
-      formSubmitURL: formSubmitURL,
-      httpRealm: httpRealm
+      hostname,
+      formSubmitURL,
+      httpRealm
     };
     let matchData = { };
     for (let field of ["hostname", "formSubmitURL", "httpRealm"])
       if (loginData[field] != '')
         matchData[field] = loginData[field];
     let [logins, ids] = this._searchLogins(matchData);
 
     this.log("_countLogins: counted logins:", logins.length);
--- a/toolkit/components/passwordmgr/storage-mozStorage.js
+++ b/toolkit/components/passwordmgr/storage-mozStorage.js
@@ -26,36 +26,36 @@ function Transaction(aDatabase) {
   this._hasTransaction = false;
   try {
     this._db.beginTransaction();
     this._hasTransaction = true;
   } catch (e) { /* om nom nom exceptions */ }
 }
 
 Transaction.prototype = {
-  commit : function() {
+  commit() {
     if (this._hasTransaction)
       this._db.commitTransaction();
   },
 
-  rollback : function() {
+  rollback() {
     if (this._hasTransaction)
       this._db.rollbackTransaction();
   },
 };
 
 
 function LoginManagerStorage_mozStorage() { }
 
 LoginManagerStorage_mozStorage.prototype = {
 
   classID : Components.ID("{8c2023b9-175c-477e-9761-44ae7b549756}"),
   QueryInterface : XPCOMUtils.generateQI([Ci.nsILoginManagerStorage,
                                           Ci.nsIInterfaceRequestor]),
-  getInterface : function(aIID) {
+  getInterface(aIID) {
     if (aIID.equals(Ci.nsIVariant)) {
       // Allows unwrapping the JavaScript object for regression tests.
       return this;
     }
 
     if (aIID.equals(Ci.mozIStorageConnection)) {
       return this._dbConnection;
     }
@@ -150,25 +150,25 @@ LoginManagerStorage_mozStorage.prototype
 
   _signonsFile  : null,  // nsIFile for "signons.sqlite"
 
 
   /*
    * Internal method used by regression tests only.  It overrides the default
    * database location.
    */
-  initWithFile : function(aDBFile) {
+  initWithFile(aDBFile) {
     if (aDBFile)
       this._signonsFile = aDBFile;
 
     this.initialize();
   },
 
 
-  initialize : function() {
+  initialize() {
     this._dbStmts = {};
 
     let isFirstRun;
     try {
       // Force initialization of the crypto module.
       // See bug 717490 comment 17.
       this._crypto;
 
@@ -195,22 +195,22 @@ LoginManagerStorage_mozStorage.prototype
     }
   },
 
 
   /**
    * Internal method used by regression tests only.  It is called before
    * replacing this storage module with a new instance.
    */
-  terminate : function() {
+  terminate() {
     return Promise.resolve();
   },
 
 
-  addLogin : function(login) {
+  addLogin(login) {
     // Throws if there are bogus values.
     LoginHelper.checkLoginValues(login);
 
     let [encUsername, encPassword, encType] = this._encryptLogin(login);
 
     // Clone the login, so we don't modify the caller's object.
     let loginClone = login.clone();
 
@@ -249,17 +249,17 @@ LoginManagerStorage_mozStorage.prototype
       hostname:            loginClone.hostname,
       httpRealm:           loginClone.httpRealm,
       formSubmitURL:       loginClone.formSubmitURL,
       usernameField:       loginClone.usernameField,
       passwordField:       loginClone.passwordField,
       encryptedUsername:   encUsername,
       encryptedPassword:   encPassword,
       guid:                loginClone.guid,
-      encType:             encType,
+      encType,
       timeCreated:         loginClone.timeCreated,
       timeLastUsed:        loginClone.timeLastUsed,
       timePasswordChanged: loginClone.timePasswordChanged,
       timesUsed:           loginClone.timesUsed
     };
 
     let stmt;
     try {
@@ -275,17 +275,17 @@ LoginManagerStorage_mozStorage.prototype
     }
 
     // Send a notification that a login was added.
     LoginHelper.notifyStorageChanged("addLogin", loginClone);
     return loginClone;
   },
 
 
-  removeLogin : function(login) {
+  removeLogin(login) {
     let [idToDelete, storedLogin] = this._getIdForLogin(login);
     if (!idToDelete)
       throw new Error("No matching logins");
 
     // Execute the statement & remove from DB
     let query  = "DELETE FROM moz_logins WHERE id = :id";
     let params = { id: idToDelete };
     let stmt;
@@ -302,17 +302,17 @@ LoginManagerStorage_mozStorage.prototype
     } finally {
       if (stmt) {
         stmt.reset();
       }
     }
     LoginHelper.notifyStorageChanged("removeLogin", storedLogin);
   },
 
-  modifyLogin : function(oldLogin, newLoginData) {
+  modifyLogin(oldLogin, newLoginData) {
     let [idToModify, oldStoredLogin] = this._getIdForLogin(oldLogin);
     if (!idToModify)
       throw new Error("No matching logins");
 
     let newLogin = LoginHelper.buildModifiedLogin(oldStoredLogin, newLoginData);
 
     // Check if the new GUID is duplicate.
     if (newLogin.guid != oldStoredLogin.guid &&
@@ -355,17 +355,17 @@ LoginManagerStorage_mozStorage.prototype
       hostname:            newLogin.hostname,
       httpRealm:           newLogin.httpRealm,
       formSubmitURL:       newLogin.formSubmitURL,
       usernameField:       newLogin.usernameField,
       passwordField:       newLogin.passwordField,
       encryptedUsername:   encUsername,
       encryptedPassword:   encPassword,
       guid:                newLogin.guid,
-      encType:             encType,
+      encType,
       timeCreated:         newLogin.timeCreated,
       timeLastUsed:        newLogin.timeLastUsed,
       timePasswordChanged: newLogin.timePasswordChanged,
       timesUsed:           newLogin.timesUsed
     };
 
     let stmt;
     try {
@@ -382,17 +382,17 @@ LoginManagerStorage_mozStorage.prototype
 
     LoginHelper.notifyStorageChanged("modifyLogin", [oldStoredLogin, newLogin]);
   },
 
 
   /**
    * Returns an array of nsILoginInfo.
    */
-  getAllLogins : function(count) {
+  getAllLogins(count) {
     let [logins, ids] = this._searchLogins({});
 
     // decrypt entries for caller.
     logins = this._decryptLogins(logins);
 
     this.log("_getAllLogins: returning " + logins.length + " logins.");
     if (count)
       count.value = logins.length; // needed for XPCOM
@@ -401,17 +401,17 @@ LoginManagerStorage_mozStorage.prototype
 
 
   /**
    * Public wrapper around _searchLogins to convert the nsIPropertyBag to a
    * JavaScript object and decrypt the results.
    *
    * @return {nsILoginInfo[]} which are decrypted.
    */
-  searchLogins : function(count, matchData) {
+  searchLogins(count, matchData) {
     let realMatchData = {};
     let options = {};
     // Convert nsIPropertyBag to normal JS object
     let propEnum = matchData.enumerator;
     while (propEnum.hasMoreElements()) {
       let prop = propEnum.getNext().QueryInterface(Ci.nsIProperty);
       switch (prop.name) {
         // Some property names aren't field names but are special options to affect the search.
@@ -439,17 +439,17 @@ LoginManagerStorage_mozStorage.prototype
   /**
    * Private method to perform arbitrary searches on any field. Decryption is
    * left to the caller.
    *
    * Returns [logins, ids] for logins that match the arguments, where logins
    * is an array of encrypted nsLoginInfo and ids is an array of associated
    * ids in the database.
    */
-  _searchLogins : function(matchData, aOptions = {
+  _searchLogins(matchData, aOptions = {
     schemeUpgrades: false,
   }) {
     let conditions = [], params = {};
 
     for (let field in matchData) {
       let value = matchData[field];
       let condition = "";
       switch (field) {
@@ -546,17 +546,17 @@ LoginManagerStorage_mozStorage.prototype
 
     this.log("_searchLogins: returning " + logins.length + " logins");
     return [logins, ids];
   },
 
   /**
    * Moves a login to the deleted logins table
    */
-  storeDeletedLogin : function(aLogin) {
+  storeDeletedLogin(aLogin) {
     let stmt = null;
     try {
       this.log("Storing " + aLogin.guid + " in deleted passwords\n");
       let query = "INSERT INTO moz_deleted_logins (guid, timeDeleted) VALUES (:guid, :timeDeleted)";
       let params = { guid: aLogin.guid,
                      timeDeleted: Date.now() };
       let stmt = this._dbCreateStatement(query, params);
       stmt.execute();
@@ -567,17 +567,17 @@ LoginManagerStorage_mozStorage.prototype
         stmt.reset();
     }
   },
 
 
   /**
    * Removes all logins from storage.
    */
-  removeAllLogins : function() {
+  removeAllLogins() {
     this.log("Removing all logins");
     let query;
     let stmt;
     let transaction = new Transaction(this._dbConnection);
 
     // Disabled hosts kept, as one presumably doesn't want to erase those.
     // TODO: Add these items to the deleted items table once we've sorted
     //       out the issues from bug 756701
@@ -595,38 +595,38 @@ LoginManagerStorage_mozStorage.prototype
         stmt.reset();
       }
     }
 
     LoginHelper.notifyStorageChanged("removeAllLogins", null);
   },
 
 
-  findLogins : function(count, hostname, formSubmitURL, httpRealm) {
+  findLogins(count, hostname, formSubmitURL, httpRealm) {
     let loginData = {
-      hostname: hostname,
-      formSubmitURL: formSubmitURL,
-      httpRealm: httpRealm
+      hostname,
+      formSubmitURL,
+      httpRealm
     };
     let matchData = { };
     for (let field of ["hostname", "formSubmitURL", "httpRealm"])
       if (loginData[field] != '')
         matchData[field] = loginData[field];
     let [logins, ids] = this._searchLogins(matchData);
 
     // Decrypt entries found for the caller.
     logins = this._decryptLogins(logins);
 
     this.log("_findLogins: returning " + logins.length + " logins");
     count.value = logins.length; // needed for XPCOM
     return logins;
   },
 
 
-  countLogins : function(hostname, formSubmitURL, httpRealm) {
+  countLogins(hostname, formSubmitURL, httpRealm) {
 
     let _countLoginsHelper = (hostname, formSubmitURL, httpRealm) => {
       // Do checks for null and empty strings, adjust conditions and params
       let [conditions, params] =
           this._buildConditionsAndParams(hostname, formSubmitURL, httpRealm);
 
       let query = "SELECT COUNT(1) AS numLogins FROM moz_logins";
       if (conditions.length) {
@@ -665,17 +665,17 @@ LoginManagerStorage_mozStorage.prototype
   },
 
 
   /**
    * Returns an array with two items: [id, login]. If the login was not
    * found, both items will be null. The returned login contains the actual
    * stored login (useful for looking at the actual nsILoginMetaInfo values).
    */
-  _getIdForLogin : function(login) {
+  _getIdForLogin(login) {
     let matchData = { };
     for (let field of ["hostname", "formSubmitURL", "httpRealm"])
       if (login[field] != '')
         matchData[field] = login[field];
     let [logins, ids] = this._searchLogins(matchData);
 
     let id = null;
     let foundLogin = null;
@@ -700,17 +700,17 @@ LoginManagerStorage_mozStorage.prototype
   },
 
 
   /**
    * Adjusts the WHERE conditions and parameters for statements prior to the
    * statement being created. This fixes the cases where nulls are involved
    * and the empty string is supposed to be a wildcard match
    */
-  _buildConditionsAndParams : function(hostname, formSubmitURL, httpRealm) {
+  _buildConditionsAndParams(hostname, formSubmitURL, httpRealm) {
     let conditions = [], params = {};
 
     if (hostname == null) {
       conditions.push("hostname isnull");
     } else if (hostname != '') {
       conditions.push("hostname = :hostname");
       params["hostname"] = hostname;
     }
@@ -731,19 +731,19 @@ LoginManagerStorage_mozStorage.prototype
 
     return [conditions, params];
   },
 
 
   /**
    * Checks to see if the specified GUID already exists.
    */
-  _isGuidUnique : function(guid) {
+  _isGuidUnique(guid) {
     let query = "SELECT COUNT(1) AS numLogins FROM moz_logins WHERE guid = :guid";
-    let params = { guid: guid };
+    let params = { guid };
 
     let stmt, numLogins;
     try {
       stmt = this._dbCreateStatement(query, params);
       stmt.executeStep();
       numLogins = stmt.row.numLogins;
     } catch (e) {
       this.log("_isGuidUnique failed: " + e.name + " : " + e.message);
@@ -756,17 +756,17 @@ LoginManagerStorage_mozStorage.prototype
     return (numLogins == 0);
   },
 
 
   /**
    * Returns the encrypted username, password, and encrypton type for the specified
    * login. Can throw if the user cancels a master password entry.
    */
-  _encryptLogin : function(login) {
+  _encryptLogin(login) {
     let encUsername = this._crypto.encrypt(login.username);
     let encPassword = this._crypto.encrypt(login.password);
     let encType     = this._crypto.defaultEncType;
 
     return [encUsername, encPassword, encType];
   },
 
 
@@ -776,17 +776,17 @@ LoginManagerStorage_mozStorage.prototype
    *
    * The entries specified by the array will be decrypted, if possible.
    * An array of successfully decrypted logins will be returned. The return
    * value should be given to external callers (since still-encrypted
    * entries are useless), whereas internal callers generally don't want
    * to lose unencrypted entries (eg, because the user clicked Cancel
    * instead of entering their master password)
    */
-  _decryptLogins : function(logins) {
+  _decryptLogins(logins) {
     let result = [];
 
     for (let login of logins) {
       try {
         login.username = this._crypto.decrypt(login.username);
         login.password = this._crypto.decrypt(login.password);
       } catch (e) {
         // If decryption failed (corrupt entry?), just skip it.
@@ -804,17 +804,17 @@ LoginManagerStorage_mozStorage.prototype
 
   // Database Creation & Access
 
   /**
    * Creates a statement, wraps it, and then does parameter replacement
    * Returns the wrapped statement for execution.  Will use memoization
    * so that statements can be reused.
    */
-  _dbCreateStatement : function(query, params) {
+  _dbCreateStatement(query, params) {
     let wrappedStmt = this._dbStmts[query];
     // Memoize the statements
     if (!wrappedStmt) {
       this.log("Creating new statement for query: " + query);
       wrappedStmt = this._dbConnection.createStatement(query);
       this._dbStmts[query] = wrappedStmt;
     }
     // Replace parameters, must be done 1 at a time
@@ -824,17 +824,17 @@ LoginManagerStorage_mozStorage.prototype
     return wrappedStmt;
   },
 
 
   /**
    * Attempts to initialize the database. This creates the file if it doesn't
    * exist, performs any migrations, etc. Return if this is the first run.
    */
-  _dbInit : function() {
+  _dbInit() {
     this.log("Initializing Database");
     let isFirstRun = false;
     try {
       this._dbConnection = this._storageService.openDatabase(this._signonsFile);
       // Get the version of the schema in the file. It will be 0 if the
       // database has not been created yet.
       let version = this._dbConnection.schemaVersion;
       if (version == 0) {
@@ -851,57 +851,57 @@ LoginManagerStorage_mozStorage.prototype
       }
       throw e;
     }
 
     Services.obs.addObserver(this, "profile-before-change", false);
     return isFirstRun;
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case "profile-before-change":
         Services.obs.removeObserver(this, "profile-before-change");
         this._dbClose();
       break;
     }
   },
 
-  _dbCreate: function() {
+  _dbCreate() {
     this.log("Creating Database");
     this._dbCreateSchema();
     this._dbConnection.schemaVersion = DB_VERSION;
   },
 
 
-  _dbCreateSchema : function() {
+  _dbCreateSchema() {
     this._dbCreateTables();
     this._dbCreateIndices();
   },
 
 
-  _dbCreateTables : function() {
+  _dbCreateTables() {
     this.log("Creating Tables");
     for (let name in this._dbSchema.tables)
       this._dbConnection.createTable(name, this._dbSchema.tables[name]);
   },
 
 
-  _dbCreateIndices : function() {
+  _dbCreateIndices() {
     this.log("Creating Indices");
     for (let name in this._dbSchema.indices) {
       let index = this._dbSchema.indices[name];
       let statement = "CREATE INDEX IF NOT EXISTS " + name + " ON " + index.table +
                       "(" + index.columns.join(", ") + ")";
       this._dbConnection.executeSimpleSQL(statement);
     }
   },
 
 
-  _dbMigrate : function(oldVersion) {
+  _dbMigrate(oldVersion) {
     this.log("Attempting to migrate from version " + oldVersion);
 
     if (oldVersion > DB_VERSION) {
       this.log("Downgrading to version " + DB_VERSION);
       // User's DB is newer. Sanity check that our expected columns are
       // present, and if so mark the lower version and merrily continue
       // on. If the columns are borked, something is wrong so blow away
       // the DB and start from scratch. [Future incompatible upgrades
@@ -938,17 +938,17 @@ LoginManagerStorage_mozStorage.prototype
     transaction.commit();
     this.log("DB migration completed.");
   },
 
 
   /**
    * Version 2 adds a GUID column. Existing logins are assigned a random GUID.
    */
-  _dbMigrateToVersion2 : function() {
+  _dbMigrateToVersion2() {
     // Check to see if GUID column already exists, add if needed
     let query;
     if (!this._dbColumnExists("guid")) {
       query = "ALTER TABLE moz_logins ADD COLUMN guid TEXT";
       this._dbConnection.executeSimpleSQL(query);
 
       query = "CREATE INDEX IF NOT EXISTS moz_logins_guid_index ON moz_logins (guid)";
       this._dbConnection.executeSimpleSQL(query);
@@ -970,17 +970,17 @@ LoginManagerStorage_mozStorage.prototype
         stmt.reset();
       }
     }
 
     // Generate a GUID for each login and update the DB.
     query = "UPDATE moz_logins SET guid = :guid WHERE id = :id";
     for (let id of ids) {
       let params = {
-        id:   id,
+        id,
         guid: this._uuidService.generateUUID().toString()
       };
 
       try {
         stmt = this._dbCreateStatement(query, params);
         stmt.execute();
       } catch (e) {
         this.log("Failed setting GUID: " + e);
@@ -992,17 +992,17 @@ LoginManagerStorage_mozStorage.prototype
       }
     }
   },
 
 
   /**
    * Version 3 adds a encType column.
    */
-  _dbMigrateToVersion3 : function() {
+  _dbMigrateToVersion3() {
     // Check to see if encType column already exists, add if needed
     let query;
     if (!this._dbColumnExists("encType")) {
       query = "ALTER TABLE moz_logins ADD COLUMN encType INTEGER";
       this._dbConnection.executeSimpleSQL(query);
 
       query = "CREATE INDEX IF NOT EXISTS " +
                   "moz_logins_encType_index ON moz_logins (encType)";
@@ -1052,17 +1052,17 @@ LoginManagerStorage_mozStorage.prototype
     }
   },
 
 
   /**
    * Version 4 adds timeCreated, timeLastUsed, timePasswordChanged,
    * and timesUsed columns
    */
-  _dbMigrateToVersion4 : function() {
+  _dbMigrateToVersion4() {
     let query;
     // Add the new columns, if needed.
     for (let column of ["timeCreated", "timeLastUsed", "timePasswordChanged", "timesUsed"]) {
       if (!this._dbColumnExists(column)) {
         query = "ALTER TABLE moz_logins ADD COLUMN " + column + " INTEGER";
         this._dbConnection.executeSimpleSQL(query);
       }
     }
@@ -1107,27 +1107,27 @@ LoginManagerStorage_mozStorage.prototype
       }
     }
   },
 
 
   /**
    * Version 5 adds the moz_deleted_logins table
    */
-  _dbMigrateToVersion5 : function() {
+  _dbMigrateToVersion5() {
     if (!this._dbConnection.tableExists("moz_deleted_logins")) {
       this._dbConnection.createTable("moz_deleted_logins", this._dbSchema.tables.moz_deleted_logins);
     }
   },
 
   /**
    * Version 6 migrates all the hosts from
    * moz_disabledHosts to the permission manager.
    */
-  _dbMigrateToVersion6 : function() {
+  _dbMigrateToVersion6() {
     let disabledHosts = [];
     let query = "SELECT hostname FROM moz_disabledHosts";
     let stmt;
 
     try {
       stmt = this._dbCreateStatement(query);
 
       while (stmt.executeStep()) {
@@ -1153,17 +1153,17 @@ LoginManagerStorage_mozStorage.prototype
     query = "DELETE FROM moz_disabledHosts";
     this._dbConnection.executeSimpleSQL(query);
   },
 
   /**
    * Sanity check to ensure that the columns this version of the code expects
    * are present in the DB we're using.
    */
-  _dbAreExpectedColumnsPresent : function() {
+  _dbAreExpectedColumnsPresent() {
     let query = "SELECT " +
                    "id, " +
                    "hostname, " +
                    "httpRealm, " +
                    "formSubmitURL, " +
                    "usernameField, " +
                    "passwordField, " +
                    "encryptedUsername, " +
@@ -1198,29 +1198,29 @@ LoginManagerStorage_mozStorage.prototype
     this.log("verified that expected columns are present in DB.");
     return true;
   },
 
 
   /**
    * Checks to see if the named column already exists.
    */
-  _dbColumnExists : function(columnName) {
+  _dbColumnExists(columnName) {
     let query = "SELECT " + columnName + " FROM moz_logins";
     try {
       let stmt = this._dbConnection.createStatement(query);
       // (no need to execute statement, if it compiled we're good)
       stmt.finalize();
       return true;
     } catch (e) {
       return false;
     }
   },
 
-  _dbClose : function() {
+  _dbClose() {
     this.log("Closing the DB connection.");
     // Finalize all statements to free memory, avoid errors later
     for (let query in this._dbStmts) {
       let stmt = this._dbStmts[query];
       stmt.finalize();
     }
     this._dbStmts = {};
 
@@ -1233,17 +1233,17 @@ LoginManagerStorage_mozStorage.prototype
     }
     this._dbConnection = null;
   },
 
   /**
    * Called when database creation fails. Finalizes database statements,
    * closes the database connection, deletes the database file.
    */
-  _dbCleanup : function(backup) {
+  _dbCleanup(backup) {
     this.log("Cleaning up DB file - close & remove & backup=" + backup);
 
     // Create backup file
     if (backup) {
       let backupFile = this._signonsFile.leafName + ".corrupt";
       this._storageService.backupDatabaseFile(this._signonsFile, backupFile);
     }
 
--- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js
+++ b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js
@@ -14,17 +14,17 @@ add_task(function* test() {
     "Toolkit:PasswordManager", "");
 
   let logins = [];
   let loginCounter = 0;
   let loginOrder = null;
   let modifiedLogin;
   let testNumber = 0;
   let testObserver = {
-    observe: function(subject, topic, data) {
+    observe(subject, topic, data) {
       if (topic == "passwordmgr-dialog-updated") {
         switch (testNumber) {
           case 1:
           case 2:
           case 3:
           case 4:
           case 5:
             is(countLogins(), loginCounter, "Verify login added");
--- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_switchtab.js
+++ b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_switchtab.js
@@ -7,30 +7,30 @@ var { interfaces: Ci } = Components;
 
 add_task(function* test() {
   yield new Promise(resolve => {
 
   let tab = gBrowser.addTab();
   isnot(tab, gBrowser.selectedTab, "New tab shouldn't be selected");
 
   let listener = {
-    onOpenWindow: function(window) {
+    onOpenWindow(window) {
       var domwindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
                             .getInterface(Ci.nsIDOMWindow);
       waitForFocus(() => {
         is(domwindow.document.location.href, PROMPT_URL, "Should have seen a prompt window");
         is(domwindow.args.promptType, "promptUserAndPass", "Should be an authenticate prompt");
 
         is(gBrowser.selectedTab, tab, "Should have selected the new tab");
 
         domwindow.document.documentElement.cancelDialog();
       }, domwindow);
     },
 
-    onCloseWindow: function() {
+    onCloseWindow() {
     }
   };
 
   Services.wm.addListener(listener);
   registerCleanupFunction(() => {
     Services.wm.removeListener(listener);
     gBrowser.removeTab(tab);
   });
--- a/toolkit/components/passwordmgr/test/prompt_common.js
+++ b/toolkit/components/passwordmgr/test/prompt_common.js
@@ -21,26 +21,26 @@ function startCallbackTimer() {
 
     // Use a timer to invoke a callback to twiddle the authentication dialog
     timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     timer.init(observer, dialogDelay, Ci.nsITimer.TYPE_ONE_SHOT);
 }
 
 
 var observer = SpecialPowers.wrapCallbackObject({
-    QueryInterface : function(iid) {
+    QueryInterface(iid) {
         const interfaces = [Ci.nsIObserver,
                             Ci.nsISupports, Ci.nsISupportsWeakReference];
 
         if (!interfaces.some( function(v) { return iid.equals(v); } ))
             throw SpecialPowers.Components.results.NS_ERROR_NO_INTERFACE;
         return this;
     },
 
-    observe : function(subject, topic, data) {
+    observe(subject, topic, data) {
         var doc = getDialogDoc();
         if (doc)
             handleDialog(doc, testNum);
         else
             startCallbackTimer(); // try again in a bit
     }
 });
 
--- a/toolkit/components/passwordmgr/test/unit/test_notifications.js
+++ b/toolkit/components/passwordmgr/test/unit/test_notifications.js
@@ -3,17 +3,17 @@
  */
 
 var expectedNotification;
 var expectedData;
 
 var TestObserver = {
   QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
 
-  observe : function(subject, topic, data) {
+  observe(subject, topic, data) {
     do_check_eq(topic, "passwordmgr-storage-changed");
     do_check_eq(data, expectedNotification);
 
     switch (data) {
         case "addLogin":
             do_check_true(subject instanceof Ci.nsILoginInfo);
             do_check_true(subject instanceof Ci.nsILoginMetaInfo);
             do_check_true(expectedData.equals(subject)); // nsILoginInfo.equals()
--- a/toolkit/components/passwordmgr/test/unit/test_storage.js
+++ b/toolkit/components/passwordmgr/test/unit/test_storage.js
@@ -26,17 +26,17 @@ function* reloadAndCheckLoginsGen(aExpec
  * Tests addLogin with valid non-ASCII characters.
  */
 add_task(function* test_storage_addLogin_nonascii()
 {
   let hostname = "http://" + String.fromCharCode(355) + ".example.com";
 
   // Store the strings "user" and "pass" using similarly looking glyphs.
   let loginInfo = TestData.formLogin({
-    hostname: hostname,
+    hostname,
     formSubmitURL: hostname,
     username: String.fromCharCode(533, 537, 7570, 345),
     password: String.fromCharCode(421, 259, 349, 537),
     usernameField: "field_" + String.fromCharCode(533, 537, 7570, 345),
     passwordField: "field_" + String.fromCharCode(421, 259, 349, 537),
   });
   Services.logins.addLogin(loginInfo);
   yield* reloadAndCheckLoginsGen([loginInfo]);
--- a/toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js
+++ b/toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js
@@ -30,17 +30,17 @@ let time = dateAndTimeFormatter.format(n
 const LABEL_NO_USERNAME = "No username (" + time + ")";
 
 let expectedResults = [
   {
     insecureFieldWarningEnabled: true,
     insecureAutoFillFormsEnabled: true,
     isSecure: true,
     isPasswordField: false,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "tempuser1",
       label: "tempuser1",
       style: "login",
@@ -58,17 +58,17 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: true,
     insecureAutoFillFormsEnabled: true,
     isSecure: false,
     isPasswordField: false,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "",
       label: "This connection is not secure. Logins entered here could be compromised.",
       style: "insecureWarning"
     }, {
       value: "",
       label: LABEL_NO_USERNAME,
       style: "login",
@@ -90,17 +90,17 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: true,
     insecureAutoFillFormsEnabled: true,
     isSecure: true,
     isPasswordField: true,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "emptypass1",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "temppass1",
       label: "tempuser1",
       style: "login",
@@ -118,17 +118,17 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: true,
     insecureAutoFillFormsEnabled: true,
     isSecure: false,
     isPasswordField: true,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "",
       label: "This connection is not secure. Logins entered here could be compromised.",
       style: "insecureWarning"
     }, {
       value: "emptypass1",
       label: LABEL_NO_USERNAME,
       style: "login",
@@ -150,17 +150,17 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: false,
     insecureAutoFillFormsEnabled: true,
     isSecure: true,
     isPasswordField: false,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "tempuser1",
       label: "tempuser1",
       style: "login",
@@ -178,17 +178,17 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: false,
     insecureAutoFillFormsEnabled: true,
     isSecure: false,
     isPasswordField: false,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "tempuser1",
       label: "tempuser1",
       style: "login",
@@ -206,17 +206,17 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: false,
     insecureAutoFillFormsEnabled: true,
     isSecure: true,
     isPasswordField: true,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "emptypass1",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "temppass1",
       label: "tempuser1",
       style: "login",
@@ -234,17 +234,17 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: false,
     insecureAutoFillFormsEnabled: true,
     isSecure: false,
     isPasswordField: true,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "emptypass1",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "temppass1",
       label: "tempuser1",
       style: "login",
@@ -262,17 +262,17 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: true,
     insecureAutoFillFormsEnabled: false,
     isSecure: true,
     isPasswordField: false,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "tempuser1",
       label: "tempuser1",
       style: "login",
@@ -290,17 +290,17 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: true,
     insecureAutoFillFormsEnabled: false,
     isSecure: false,
     isPasswordField: false,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "",
       label: "This connection is not secure. Logins entered here could be compromised.",
       style: "insecureWarning"
     }, {
       value: "",
       label: LABEL_NO_USERNAME,
       style: "login",
@@ -322,17 +322,17 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: true,
     insecureAutoFillFormsEnabled: false,
     isSecure: true,
     isPasswordField: true,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "emptypass1",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "temppass1",
       label: "tempuser1",
       style: "login",
@@ -350,17 +350,17 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: true,
     insecureAutoFillFormsEnabled: false,
     isSecure: false,
     isPasswordField: true,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "",
       label: "This connection is not secure. Logins entered here could be compromised.",
       style: "insecureWarning"
     }, {
       value: "emptypass1",
       label: LABEL_NO_USERNAME,
       style: "login",
@@ -382,17 +382,17 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: false,
     insecureAutoFillFormsEnabled: false,
     isSecure: true,
     isPasswordField: false,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "tempuser1",
       label: "tempuser1",
       style: "login",
@@ -410,25 +410,25 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: false,
     insecureAutoFillFormsEnabled: false,
     isSecure: false,
     isPasswordField: false,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: []
   },
   {
     insecureFieldWarningEnabled: false,
     insecureAutoFillFormsEnabled: false,
     isSecure: true,
     isPasswordField: true,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: [{
       value: "emptypass1",
       label: LABEL_NO_USERNAME,
       style: "login",
     }, {
       value: "temppass1",
       label: "tempuser1",
       style: "login",
@@ -446,17 +446,17 @@ let expectedResults = [
       style: "login",
     }]
   },
   {
     insecureFieldWarningEnabled: false,
     insecureAutoFillFormsEnabled: false,
     isSecure: false,
     isPasswordField: true,
-    matchingLogins: matchingLogins,
+    matchingLogins,
     items: []
   },
 ];
 
 add_task(function* test_all_patterns() {
   LoginHelper.createLogger("UserAutoCompleteResult");
   expectedResults.forEach(pattern => {
     Services.prefs.setBoolPref(PREF_INSECURE_FIELD_WARNING_ENABLED,
--- a/toolkit/components/perfmonitoring/AddonWatcher.jsm
+++ b/toolkit/components/perfmonitoring/AddonWatcher.jsm
@@ -39,31 +39,31 @@ this.AddonWatcher = {
   /**
    * Watch this topic to be informed when a slow add-on is detected and should
    * be reported to the user.
    *
    * If you need finer-grained control, use PerformanceWatcher.jsm.
    */
   TOPIC_SLOW_ADDON_DETECTED: "addon-watcher-detected-slow-addon",
 
-  init: function() {
+  init() {
     this._initializedTimeStamp = Cu.now();
 
     try {
       this._ignoreList = new Set(JSON.parse(Preferences.get("browser.addon-watch.ignore", null)));
     } catch (ex) {
       // probably some malformed JSON, ignore and carry on
       this._ignoreList = new Set();
     }
 
     this._warmupPeriod = Preferences.get("browser.addon-watch.warmup-ms", 60 * 1000 /* 1 minute */);
     this._idleThreshold = Preferences.get("browser.addon-watch.deactivate-after-idle-ms", 3000);
     this.paused = false;
   },
-  uninit: function() {
+  uninit() {
     this.paused = true;
   },
   _initializedTimeStamp: 0,
 
   set paused(paused) {
     if (paused) {
       if (this._listener) {
         PerformanceWatcher.removePerformanceListener({addonId: "*"}, this._listener);
@@ -82,30 +82,30 @@ this.AddonWatcher = {
   /**
    * Provide the following object for each addon:
    *  {number} occurrences The total number of performance alerts recorded for this addon.
    *  {number} occurrencesSinceLastNotification The number of performances alerts recorded
    *     since we last notified the user.
    *  {number} latestNotificationTimeStamp The timestamp of the latest user notification
    *     that this add-on is slow.
    */
-  _getAlerts: function(addonId) {
+  _getAlerts(addonId) {
     let alerts = this._alerts.get(addonId);
     if (!alerts) {
       alerts = {
         occurrences: 0,
         occurrencesSinceLastNotification: 0,
         latestNotificationTimeStamp: 0,
       };
       this._alerts.set(addonId, alerts);
     }
     return alerts;
   },
   _alerts: new Map(),
-  _onSlowAddons: function(addons) {
+  _onSlowAddons(addons) {
     try {
       if (IdleService.idleTime >= this._idleThreshold) {
         // The application is idle. Maybe the computer is sleeping, or maybe
         // the user isn't in front of it. Regardless, the user doesn't care
         // about things that slow down her browser while she's not using it.
         return;
       }
 
@@ -197,20 +197,20 @@ this.AddonWatcher = {
         highestNumberOfAddonsToReport--;
       }
     } catch (ex) {
       Cu.reportError("Error in AddonWatcher._onSlowAddons " + ex);
       Cu.reportError(Task.Debugging.generateReadableStack(ex.stack));
     }
   },
 
-  ignoreAddonForSession: function(addonid) {
+  ignoreAddonForSession(addonid) {
     this._ignoreList.add(addonid);
   },
-  ignoreAddonPermanently: function(addonid) {
+  ignoreAddonPermanently(addonid) {
     this._ignoreList.add(addonid);
     try {
       let ignoreList = JSON.parse(Preferences.get("browser.addon-watch.ignore", "[]"))
       if (!ignoreList.includes(addonid)) {
         ignoreList.push(addonid);
         Preferences.set("browser.addon-watch.ignore", JSON.stringify(ignoreList));
       }
     } catch (ex) {
--- a/toolkit/components/perfmonitoring/PerformanceStats.jsm
+++ b/toolkit/components/perfmonitoring/PerformanceStats.jsm
@@ -74,30 +74,30 @@ function Probe(name, impl) {
 }
 Probe.prototype = {
   /**
    * Acquire the probe on behalf of a client.
    *
    * If the probe was inactive, activate it. Note that activating a probe
    * can incur a memory or performance cost.
    */
-  acquire: function() {
+  acquire() {
     if (this._counter == 0) {
       this._impl.isActive = true;
       Process.broadcast("acquire", [this._name]);
     }
     this._counter++;
   },
 
   /**
    * Release the probe on behalf of a client.
    *
    * If this was the last client for this probe, deactivate it.
    */
-  release: function() {
+  release() {
     this._counter--;
     if (this._counter == 0) {
       try {
         this._impl.isActive = false;
       } catch (ex) {
         if (ex && typeof ex == "object" && ex.result == Components.results.NS_ERROR_NOT_AVAILABLE) {
           // The service has already been shutdown. Ignore further shutdown requests.
           return;
@@ -112,30 +112,30 @@ Probe.prototype = {
    * Obtain data from this probe, once it is available.
    *
    * @param {nsIPerformanceStats} xpcom A xpcom object obtained from
    * SpiderMonkey. Only the fields updated by the low-level probe
    * are in a specified state.
    * @return {object} An object containing the data extracted from this
    * probe. Actual format depends on the probe.
    */
-  extract: function(xpcom) {
+  extract(xpcom) {
     if (!this._impl.isActive) {
       throw new Error(`Probe is inactive: ${this._name}`);
     }
     return this._impl.extract(xpcom);
   },
 
   /**
    * @param {object} a An object returned by `this.extract()`.
    * @param {object} b An object returned by `this.extract()`.
    *
    * @return {true} If `a` and `b` hold identical values.
    */
-  isEqual: function(a, b) {
+  isEqual(a, b) {
     if (a == null && b == null) {
       return true;
     }
     if (a != null && b != null) {
       return this._impl.isEqual(a, b);
     }
     return false;
   },
@@ -144,44 +144,44 @@ Probe.prototype = {
    * @param {object} a An object returned by `this.extract()`. May
    * NOT be `null`.
    * @param {object} b An object returned by `this.extract()`. May
    * be `null`.
    *
    * @return {object} An object representing `a - b`. If `b` is
    * `null`, this is `a`.
    */
-  subtract: function(a, b) {
+  subtract(a, b) {
     if (a == null) {
       throw new TypeError();
     }
     if (b == null) {
       return a;
     }
     return this._impl.subtract(a, b);
   },
 
-  importChildCompartments: function(parent, children) {
+  importChildCompartments(parent, children) {
     if (!Array.isArray(children)) {
       throw new TypeError();
     }
     if (!parent || !(parent instanceof PerformanceDataLeaf)) {
       throw new TypeError();
     }
     return this._impl.importChildCompartments(parent, children);
   },
 
   /**
    * The name of the probe.
    */
   get name() {
     return this._name;
   },
 
-  compose: function(stats) {
+  compose(stats) {
     if (!Array.isArray(stats)) {
       throw new TypeError();
     }
     return this._impl.compose(stats);
   }
 };
 
 // Utility function. Return the position of the last non-0 item in an
@@ -216,58 +216,58 @@ var Probes = {
    */
   jank: new Probe("jank", {
     set isActive(x) {
       performanceStatsService.isMonitoringJank = x;
     },
     get isActive() {
       return performanceStatsService.isMonitoringJank;
     },
-    extract: function(xpcom) {
+    extract(xpcom) {
       let durations = xpcom.getDurations();
       return {
         totalUserTime: xpcom.totalUserTime,
         totalSystemTime: xpcom.totalSystemTime,
         totalCPUTime: xpcom.totalUserTime + xpcom.totalSystemTime,
-        durations: durations,
+        durations,
         longestDuration: lastNonZero(durations)
       }
     },
-    isEqual: function(a, b) {
+    isEqual(a, b) {
       // invariant: `a` and `b` are both non-null
       if (a.totalUserTime != b.totalUserTime) {
         return false;
       }
       if (a.totalSystemTime != b.totalSystemTime) {
         return false;
       }
       for (let i = 0; i < a.durations.length; ++i) {
         if (a.durations[i] != b.durations[i]) {
           return false;
         }
       }
       return true;
     },
-    subtract: function(a, b) {
+    subtract(a, b) {
       // invariant: `a` and `b` are both non-null
       let result = {
         totalUserTime: a.totalUserTime - b.totalUserTime,
         totalSystemTime: a.totalSystemTime - b.totalSystemTime,
         totalCPUTime: a.totalCPUTime - b.totalCPUTime,
         durations: [],
         longestDuration: -1,
       };
       for (let i = 0; i < a.durations.length; ++i) {
         result.durations[i] = a.durations[i] - b.durations[i];
       }
       result.longestDuration = lastNonZero(result.durations);
       return result;
     },
-    importChildCompartments: function() { /* nothing to do */ },
-    compose: function(stats) {
+    importChildCompartments() { /* nothing to do */ },
+    compose(stats) {
       let result = {
         totalUserTime: 0,
         totalSystemTime: 0,
         totalCPUTime: 0,
         durations: [],
         longestDuration: -1
       };
       for (let stat of stats) {
@@ -293,31 +293,31 @@ var Probes = {
    */
   cpow: new Probe("cpow", {
     set isActive(x) {
       performanceStatsService.isMonitoringCPOW = x;
     },
     get isActive() {
       return performanceStatsService.isMonitoringCPOW;
     },
-    extract: function(xpcom) {
+    extract(xpcom) {
       return {
         totalCPOWTime: xpcom.totalCPOWTime
       };
     },
-    isEqual: function(a, b) {
+    isEqual(a, b) {
       return a.totalCPOWTime == b.totalCPOWTime;
     },
-    subtract: function(a, b) {
+    subtract(a, b) {
       return {
         totalCPOWTime: a.totalCPOWTime - b.totalCPOWTime
       };
     },
-    importChildCompartments: function() { /* nothing to do */ },
-    compose: function(stats) {
+    importChildCompartments() { /* nothing to do */ },
+    compose(stats) {
       let totalCPOWTime = 0;
       for (let stat of stats) {
         totalCPOWTime += stat.totalCPOWTime;
       }
       return { totalCPOWTime };
     },
   }),
 
@@ -330,59 +330,59 @@ var Probes = {
    *
    * Data provided by this probe uses the following format:
    * @type {number} ticks The number of times execution has entered
    * this performance group.
    */
   ticks: new Probe("ticks", {
     set isActive(x) { /* this probe cannot be deactivated */ },
     get isActive() { return true; },
-    extract: function(xpcom) {
+    extract(xpcom) {
       return {
         ticks: xpcom.ticks
       };
     },
-    isEqual: function(a, b) {
+    isEqual(a, b) {
       return a.ticks == b.ticks;
     },
-    subtract: function(a, b) {
+    subtract(a, b) {
       return {
         ticks: a.ticks - b.ticks
       };
     },
-    importChildCompartments: function() { /* nothing to do */ },
-    compose: function(stats) {
+    importChildCompartments() { /* nothing to do */ },
+    compose(stats) {
       let ticks = 0;
       for (let stat of stats) {
         ticks += stat.ticks;
       }
       return { ticks };
     },
   }),
 
   compartments: new Probe("compartments", {
     set isActive(x) {
       performanceStatsService.isMonitoringPerCompartment = x;
     },
     get isActive() {
       return performanceStatsService.isMonitoringPerCompartment;
     },
-    extract: function(xpcom) {
+    extract(xpcom) {
       return null;
     },
-    isEqual: function(a, b) {
+    isEqual(a, b) {
       return true;
     },
-    subtract: function(a, b) {
+    subtract(a, b) {
       return true;
     },
-    importChildCompartments: function(parent, children) {
+    importChildCompartments(parent, children) {
       parent.children = children;
     },
-    compose: function(stats) {
+    compose(stats) {
       return null;
     },
   }),
 };
 
 /**
  * A monitor for a set of probes.
  *
@@ -442,17 +442,17 @@ PerformanceMonitor.prototype = {
    * @param {object} options If provided, an object that may contain the following
    *   fields:
    *   {Array<string>} probeNames The subset of probes to use for this snapshot.
    *      These probes must be a subset of the probes active in the monitor.
    *
    * @return {Promise}
    * @resolve {Snapshot}
    */
-  _checkBeforeSnapshot: function(options) {
+  _checkBeforeSnapshot(options) {
     if (!this._finalizer) {
       throw new Error("dispose() has already been called, this PerformanceMonitor is not usable anymore");
     }
     let probes;
     if (options && options.probeNames || undefined) {
       if (!Array.isArray(options.probeNames)) {
         throw new TypeError();
       }
@@ -467,21 +467,21 @@ PerformanceMonitor.prototype = {
         }
         probes.push(probe);
       }
     } else {
       probes = this._probes;
     }
     return probes;
   },
-  promiseContentSnapshot: function(options = null) {
+  promiseContentSnapshot(options = null) {
     this._checkBeforeSnapshot(options);
     return (new ProcessSnapshot(performanceStatsService.getSnapshot()));
   },
-  promiseSnapshot: function(options = null) {
+  promiseSnapshot(options = null) {
     let probes = this._checkBeforeSnapshot(options);
     return Task.spawn(function*() {
       let childProcesses = yield Process.broadcastAndCollect("collect", {probeNames: probes.map(p => p.name)});
       let xpcom = performanceStatsService.getSnapshot();
       return new ApplicationSnapshot({
         xpcom,
         childProcesses,
         probes,
@@ -491,17 +491,17 @@ PerformanceMonitor.prototype = {
   },
 
   /**
    * Release the probes used by this monitor.
    *
    * Releasing probes as soon as they are unused is a good idea, as some probes
    * cost CPU and/or memory.
    */
-  dispose: function() {
+  dispose() {
     if (!this._finalizer) {
       return;
     }
     this._finalizer.forget();
     PerformanceMonitor.dispose(this._id);
 
     // As a safeguard against double-release, reset everything to `null`
     this._probes = null;
@@ -568,17 +568,17 @@ Services.obs.addObserver(function(subjec
   PerformanceMonitor.dispose(value);
 }, FINALIZATION_TOPIC, false);
 
 // Public API
 this.PerformanceStats = {
   /**
    * Create a monitor for observing a set of performance probes.
    */
-  getMonitor: function(probes) {
+  getMonitor(probes) {
     return PerformanceMonitor.make(probes);
   }
 };
 
 
 /**
  * Information on a single performance group.
  *
@@ -635,17 +635,17 @@ function PerformanceDataLeaf({xpcom, jso
   this.owner = null;
 }
 PerformanceDataLeaf.prototype = {
   /**
    * Compare two instances of `PerformanceData`
    *
    * @return `true` if `this` and `to` have equal values in all fields.
    */
-  equals: function(to) {
+  equals(to) {
     if (!(to instanceof PerformanceDataLeaf)) {
       throw new TypeError();
     }
     for (let probeName of Object.keys(Probes)) {
       let probe = Probes[probeName];
       if (!probe.isEqual(this[probeName], to[probeName])) {
         return false;
       }
@@ -656,51 +656,51 @@ PerformanceDataLeaf.prototype = {
   /**
    * Compute the delta between two instances of `PerformanceData`.
    *
    * @param {PerformanceData|null} to. If `null`, assumed an instance of
    * `PerformanceData` in which all numeric values are 0.
    *
    * @return {PerformanceDiff} The performance usage between `to` and `this`.
    */
-  subtract: function(to = null) {
+  subtract(to = null) {
     return (new PerformanceDiffLeaf(this, to));
   }
 };
 
 function PerformanceData(timestamp) {
   this._parent = null;
   this._content = new Map();
   this._all = [];
   this._timestamp = timestamp;
 }
 PerformanceData.prototype = {
-  addChild: function(stat) {
+  addChild(stat) {
     if (!(stat instanceof PerformanceDataLeaf)) {
       throw new TypeError(); // FIXME
     }
     if (!stat.isChildProcess) {
       throw new TypeError(); // FIXME
     }
     this._content.set(stat.groupId, stat);
     this._all.push(stat);
     stat.owner = this;
   },
-  setParent: function(stat) {
+  setParent(stat) {
     if (!(stat instanceof PerformanceDataLeaf)) {
       throw new TypeError(); // FIXME
     }
     if (stat.isChildProcess) {
       throw new TypeError(); // FIXME
     }
     this._parent = stat;
     this._all.push(stat);
     stat.owner = this;
   },
-  equals: function(to) {
+  equals(to) {
     if (this._parent && !to._parent) {
       return false;
     }
     if (!this._parent && to._parent) {
       return false;
     }
     if (this._content.size != to._content.size) {
       return false;
@@ -714,17 +714,17 @@ PerformanceData.prototype = {
         return false;
       }
       if (!v.equals(v2)) {
         return false;
       }
     }
     return true;
   },
-  subtract: function(to = null) {
+  subtract(to = null) {
     return (new PerformanceDiff(this, to));
   },
   get addonId() {
     return this._all[0].addonId;
   },
   get title() {
     return this._all[0].title;
   }
@@ -762,17 +762,17 @@ function PerformanceDiff(current, old = 
       continue;
     }
     let data = this._all.map(item => item[k]);
     let probe = Probes[k];
     this[k] = probe.compose(data);
   }
 }
 PerformanceDiff.prototype = {
-  toString: function() {
+  toString() {
     return `[PerformanceDiff] ${this.key}`;
   },
   get windowIds() {
     return this._all.map(item => item.windowId).filter(x => !!x);
   },
   get groupIds() {
     return this._all.map(item => item.groupId);
   },
@@ -919,17 +919,17 @@ var Process = {
     return this._loader = Services.ppmm;
   },
 
   /**
    * Broadcast a message to all children processes.
    *
    * NOOP if we are in a child process.
    */
-  broadcast: function(topic, payload) {
+  broadcast(topic, payload) {
     if (!this.loader) {
       return;
     }
     this.loader.broadcastAsyncMessage("performance-stats-service-" + topic, {payload});
   },
 
   /**
    * Brodcast a message to all children processes and wait for answer.
--- a/toolkit/components/perfmonitoring/PerformanceWatcher.jsm
+++ b/toolkit/components/perfmonitoring/PerformanceWatcher.jsm
@@ -90,30 +90,30 @@ function ChildManager(map, key) {
   this._map = map;
   this._listeners = new Set();
 }
 ChildManager.prototype = {
   /**
    * Add a listener, which will be notified whenever a child process
    * reports a slow performance alert for this addon/window.
    */
-  addListener: function(listener) {
+  addListener(listener) {
     this._listeners.add(listener);
   },
   /**
    * Remove a listener.
    */
-  removeListener: function(listener) {
+  removeListener(listener) {
     let deleted = this._listeners.delete(listener);
     if (!deleted) {
       throw new Error("Unknown listener");
     }
   },
 
-  listeners: function() {
+  listeners() {
     return this._listeners.values();
   }
 };
 
 /**
  * Dispatch child alerts to observers.
  *
  * Triggered by messages from content processes.
@@ -211,31 +211,31 @@ function Observable(target) {
     this._process = performanceStatsService.getObservableWindow(windowId);
     this._children = isContent ? null : ChildManager.getWindow(windowId);
     this._isBuffered = windowId == 0;
   } else {
     throw new TypeError("Unexpected target");
   }
 }
 Observable.prototype = {
-  addJankObserver: function(listener) {
+  addJankObserver(listener) {
     if (this._observers.has(listener)) {
       throw new TypeError(`Listener already registered for target ${this._key}`);
     }
     if (this._children) {
       this._children.addListener(listener);
     }
     let observer = this._isBuffered ? new BufferedObserver(listener)
       : new Observer(listener);
     // Store the observer to be able to call `this._process.removeJankObserver`.
     this._observers.set(listener, observer);
 
     this._process.addJankObserver(observer);
   },
-  removeJankObserver: function(listener) {
+  removeJankObserver(listener) {
     let observer = this._observers.get(listener);
     if (!observer) {
       throw new TypeError(`No listener for target ${this._key}`);
     }
     this._observers.delete(listener);
 
     if (this._children) {
       this._children.removeListener(listener);
@@ -279,20 +279,20 @@ Observable._cache = new Map();
  */
 function Observer(listener) {
   // Make sure that monitoring stays alive (in all processes) at least as
   // long as the observer.
   this._monitor = PerformanceStats.getMonitor(["jank", "cpow"]);
   this._listener = listener;
 }
 Observer.prototype = {
-  observe: function(...args) {
+  observe(...args) {
     this._listener(...args);
   },
-  dispose: function() {
+  dispose() {
     this._monitor.dispose();
     this.observe = function poison() {
       throw new Error("Internal error: I should have stopped receiving notifications");
     }
   },
 };
 
 /**
@@ -345,23 +345,23 @@ this.PerformanceWatcher = {
    *       source: {groupId, name, addonId, windowId, isSystem, processId}
    *         Information on the source of the notification.
    *       details: {reason, highestJank, highestCPOW} Information on the
    *         notification.
    *
    *    If the listener listens to all add-ons/all webpages, it is triggered with
    *    an array of {source, details}, as described above.
    */
-  addPerformanceListener: function(target, listener) {
+  addPerformanceListener(target, listener) {
     if (typeof listener != "function") {
       throw new TypeError();
     }
     let observable = Observable.get(target);
     observable.addJankObserver(listener);
   },
-  removePerformanceListener: function(target, listener) {
+  removePerformanceListener(target, listener) {
     if (typeof listener != "function") {
       throw new TypeError();
     }
     let observable = Observable.get(target);
     observable.removeJankObserver(listener);
   },
 };
--- a/toolkit/components/perfmonitoring/tests/browser/browser_compartments.js
+++ b/toolkit/components/perfmonitoring/tests/browser/browser_compartments.js
@@ -59,35 +59,35 @@ function frameScript() {
     Cu.reportError("Error in content (setup): " + ex);
     Cu.reportError(ex.stack);
   }
 }
 
 // A variant of `Assert` that doesn't spam the logs
 // in case of success.
 var SilentAssert = {
-  equal: function(a, b, msg) {
+  equal(a, b, msg) {
     if (a == b) {
       return;
     }
     Assert.equal(a, b, msg);
   },
-  notEqual: function(a, b, msg) {
+  notEqual(a, b, msg) {
     if (a != b) {
       return;
     }
     Assert.notEqual(a, b, msg);
   },
-  ok: function(a, msg) {
+  ok(a, msg) {
     if (a) {
       return;
     }
     Assert.ok(a, msg);
   },
-  leq: function(a, b, msg) {
+  leq(a, b, msg) {
     this.ok(a <= b, `${msg}: ${a} <= ${b}`);
   }
 };
 
 var isShuttingDown = false;
 function monotinicity_tester(source, testName) {
   // In the background, check invariants:
   // - numeric data can only ever increase;
--- a/toolkit/components/perfmonitoring/tests/browser/head.js
+++ b/toolkit/components/perfmonitoring/tests/browser/head.js
@@ -40,17 +40,17 @@ CPUBurner.prototype = {
         return false;
       }
       if (listener.triggered && listener.result >= this.jankThreshold) {
         return true;
       }
     }
     return false;
   }),
-  dispose: function() {
+  dispose() {
     info(`CPUBurner: Closing tab for ${this.url}\n`);
     gBrowser.removeTab(this.tab);
   }
 };
 // This function is injected in all frames
 CPUBurner.frameScript = function() {
   try {
     "use strict";
@@ -137,28 +137,28 @@ function AlertListener(accept, {register
   this._unregistered = false;
   this._unregister = unregister;
   registerCleanupFunction(() => {
     this.unregister();
   });
   register();
 }
 AlertListener.prototype = {
-  unregister: function() {
+  unregister() {
     this.reset();
     if (this._unregistered) {
       info(`head.js: No need to unregister, we're already unregistered.\n`);
       return;
     }
     info(`head.js: Unregistering listener.\n`);
     this._unregistered = true;
     this._unregister();
     info(`head.js: Unregistration complete.\n`);
   },
-  reset: function() {
+  reset() {
     this.triggered = false;
     this.result = null;
   },
 };
 
 /**
  * Simulate a slow add-on.
  */
@@ -176,17 +176,17 @@ function AddonBurner(addonId = "fake add
       // AddonBurner instance instead.
       this._CPOWBurner = msg.objects.burnCPOWInSandbox;
       resolve();
     });
   });
 }
 AddonBurner.prototype = Object.create(CPUBurner.prototype);
 Object.defineProperty(AddonBurner.prototype, "addonId", {
-  get: function() {
+  get() {
     return this._addonId;
   }
 });
 
 /**
  * Simulate slow code being executed by the add-on in the chrome.
  */
 AddonBurner.prototype.burnCPU = function() {
--- a/toolkit/components/places/BookmarkHTMLUtils.jsm
+++ b/toolkit/components/places/BookmarkHTMLUtils.jsm
@@ -1032,29 +1032,29 @@ BookmarkExporter.prototype = {
       } finally {
         out.close();
       }
     }.bind(this));
   },
 
   _converterOut: null,
 
-  _write: function(aText) {
+  _write(aText) {
     this._converterOut.writeString(aText || "");
   },
 
-  _writeAttribute: function(aName, aValue) {
+  _writeAttribute(aName, aValue) {
     this._write(' ' +  aName + '="' + aValue + '"');
   },
 
-  _writeLine: function(aText) {
+  _writeLine(aText) {
     this._write(aText + "\n");
   },
 
-  _writeHeader: function() {
+  _writeHeader() {
     this._writeLine("<!DOCTYPE NETSCAPE-Bookmark-file-1>");
     this._writeLine("<!-- This is an automatically generated file.");
     this._writeLine("     It will be read and overwritten.");
     this._writeLine("     DO NOT EDIT! -->");
     this._writeLine('<META HTTP-EQUIV="Content-Type" CONTENT="text/html; ' +
                     'charset=UTF-8">');
     this._writeLine("<TITLE>Bookmarks</TITLE>");
   },
@@ -1097,25 +1097,25 @@ BookmarkExporter.prototype = {
       } else if (child.type == PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR) {
         this._writeSeparator(child, localIndent);
       } else {
         yield this._writeItem(child, localIndent);
       }
     }
   },
 
-  _writeSeparator: function(aItem, aIndent) {
+  _writeSeparator(aItem, aIndent) {
     this._write(aIndent + "<HR");
     // We keep exporting separator titles, but don't support them anymore.
     if (aItem.title)
       this._writeAttribute("NAME", escapeHtmlEntities(aItem.title));
     this._write(">");
   },
 
-  _writeLivemark: function(aItem, aIndent) {
+  _writeLivemark(aItem, aIndent) {
     this._write(aIndent + "<DT><A");
     let feedSpec = aItem.annos.find(anno => anno.name == PlacesUtils.LMANNO_FEEDURI).value;
     this._writeAttribute("FEEDURL", escapeUrl(feedSpec));
     let siteSpecAnno = aItem.annos.find(anno => anno.name == PlacesUtils.LMANNO_SITEURI);
     if (siteSpecAnno)
       this._writeAttribute("HREF", escapeUrl(siteSpecAnno.value));
     this._writeLine(">" + escapeHtmlEntities(aItem.title) + "</A>");
     this._writeDescription(aItem, aIndent);
@@ -1145,17 +1145,17 @@ BookmarkExporter.prototype = {
     if (aItem.charset)
       this._writeAttribute("LAST_CHARSET", escapeHtmlEntities(aItem.charset));
     if (aItem.tags)
       this._writeAttribute("TAGS", aItem.tags);
     this._writeLine(">" + escapeHtmlEntities(aItem.title) + "</A>");
     this._writeDescription(aItem, aIndent);
   },
 
-  _writeDateAttributes: function(aItem) {
+  _writeDateAttributes(aItem) {
     if (aItem.dateAdded)
       this._writeAttribute("ADD_DATE",
                            Math.floor(aItem.dateAdded / MICROSEC_PER_SEC));
     if (aItem.lastModified)
       this._writeAttribute("LAST_MODIFIED",
                            Math.floor(aItem.lastModified / MICROSEC_PER_SEC));
   },
 
@@ -1174,15 +1174,15 @@ BookmarkExporter.prototype = {
 
     if (!favicon.uri.schemeIs("chrome") && favicon.dataLen > 0) {
       let faviconContents = "data:image/png;base64," +
         base64EncodeString(String.fromCharCode.apply(String, favicon.data));
       this._writeAttribute("ICON", faviconContents);
     }
   },
 
-  _writeDescription: function(aItem, aIndent) {
+  _writeDescription(aItem, aIndent) {
     let descriptionAnno = aItem.annos &&
                           aItem.annos.find(anno => anno.name == DESCRIPTION_ANNO);
     if (descriptionAnno)
       this._writeLine(aIndent + "<DD>" + escapeHtmlEntities(descriptionAnno.value));
   }
 };
--- a/toolkit/components/places/BookmarkJSONUtils.jsm
+++ b/toolkit/components/places/BookmarkJSONUtils.jsm
@@ -164,17 +164,17 @@ this.BookmarkJSONUtils = Object.freeze({
       // Do not write to the tmp folder, otherwise if it has a different
       // filesystem writeAtomic will fail.  Eventual dangling .tmp files should
       // be cleaned up by the caller.
       let writeOptions = { tmpPath: OS.Path.join(aFilePath + ".tmp") };
       if (aOptions.compress)
         writeOptions.compression = "lz4";
 
       yield OS.File.writeAtomic(aFilePath, jsonString, writeOptions);
-      return { count: count, hash: hash };
+      return { count, hash };
     });
   }
 });
 
 function BookmarkImporter(aReplace) {
   this._replace = aReplace;
   // The bookmark change source, used to determine the sync status and change
   // counter.
@@ -207,17 +207,17 @@ BookmarkImporter.prototype = {
             Cu.reportError("Failed to import from URL: " + ex);
             reject(ex);
           }
         }
       };
 
       let uri = NetUtil.newURI(spec);
       let channel = NetUtil.newChannel({
-        uri: uri,
+        uri,
         loadUsingSystemPrincipal: true
       });
       let streamLoader = Cc["@mozilla.org/network/stream-loader;1"]
                            .createInstance(Ci.nsIStreamLoader);
       streamLoader.init(streamObserver);
       channel.asyncOpen2(streamLoader);
     });
   },
@@ -423,21 +423,21 @@ BookmarkImporter.prototype = {
               default:
                 return true;
             }
           });
 
           if (feedURI) {
             let lmPromise = PlacesUtils.livemarks.addLivemark({
               title: aData.title,
-              feedURI: feedURI,
+              feedURI,
               parentId: aContainer,
               index: aIndex,
               lastModified: aData.lastModified,
-              siteURI: siteURI,
+              siteURI,
               guid: aData.guid,
               source: this._source
             }).then(aLivemark => {
               let id = aLivemark.id;
               if (aData.dateAdded)
                 PlacesUtils.bookmarks.setItemDateAdded(id, aData.dateAdded,
                                                        this._source);
               if (aData.annos && aData.annos.length)
--- a/toolkit/components/places/Bookmarks.jsm
+++ b/toolkit/components/places/Bookmarks.jsm
@@ -473,17 +473,17 @@ var Bookmarks = Object.freeze({
    * @param {Object} [options={}]
    *        Additional options. Currently supports the following properties:
    *         - source: The change source, forwarded to all bookmark observers.
    *           Defaults to nsINavBookmarksService::SOURCE_DEFAULT.
    *
    * @return {Promise} resolved when the removal is complete.
    * @resolves once the removal is complete.
    */
-  eraseEverything: function(options = {}) {
+  eraseEverything(options = {}) {
     return PlacesUtils.withConnectionWrapper("Bookmarks.jsm: eraseEverything",
       db => db.executeTransaction(function* () {
         const folderGuids = [this.toolbarGuid, this.menuGuid, this.unfiledGuid,
                              this.mobileGuid];
         yield removeFoldersContents(db, folderGuids, options);
         const time = PlacesUtils.toPRTime(new Date());
         const syncChangeDelta =
           PlacesSyncUtils.bookmarks.determineSyncChangeDelta(options.source);
@@ -762,17 +762,17 @@ var Bookmarks = Object.freeze({
    * @note Any unknown property in the query object is ignored.
    *       Known properties may be overwritten.
    */
   search(query) {
     if (!query) {
       throw new Error("Query object is required");
     }
     if (typeof query === "string") {
-      query = { query: query };
+      query = { query };
     }
     if (typeof query !== "object") {
       throw new Error("Query must be an object or a string");
     }
     if (query.query && typeof query.query !== "string") {
       throw new Error("Query option must be a string");
     }
     if (query.title && typeof query.title !== "string") {
@@ -863,34 +863,34 @@ function updateBookmark(info, item, newP
           // Otherwise when moving down, we subtract 1.
           // Only the parent needs a sync change, which is handled in
           // `setAncestorsLastModified`.
           let sign = newIndex < item.index ? +1 : -1;
           yield db.executeCached(
             `UPDATE moz_bookmarks SET position = position + :sign
              WHERE parent = :newParentId
                AND position BETWEEN :lowIndex AND :highIndex
-            `, { sign: sign, newParentId: newParent._id,
+            `, { sign, newParentId: newParent._id,
                  lowIndex: Math.min(item.index, newIndex),
                  highIndex: Math.max(item.index, newIndex) });
         } else {
           // Moving across different containers. In this case, both parents and
           // the child need sync changes. `setAncestorsLastModified` handles the
           // parents; the `needsSyncChange` check below handles the child.
           tuples.set("parent", { value: newParent._id} );
           yield db.executeCached(
             `UPDATE moz_bookmarks SET position = position + :sign
              WHERE parent = :oldParentId
                AND position >= :oldIndex
             `, { sign: -1, oldParentId: item._parentId, oldIndex: item.index });
           yield db.executeCached(
             `UPDATE moz_bookmarks SET position = position + :sign
              WHERE parent = :newParentId
                AND position >= :newIndex
-            `, { sign: +1, newParentId: newParent._id, newIndex: newIndex });
+            `, { sign: +1, newParentId: newParent._id, newIndex });
 
           yield setAncestorsLastModified(db, item.parentGuid, info.lastModified,
                                          syncChangeDelta);
         }
         yield setAncestorsLastModified(db, newParent.guid, info.lastModified,
                                        syncChangeDelta);
       }
 
--- a/toolkit/components/places/ClusterLib.js
+++ b/toolkit/components/places/ClusterLib.js
@@ -54,17 +54,17 @@ HierarchicalClustering.prototype = {
     // set up clusters from the initial items array
     for (let index = 0; index < items.length; index++) {
       let cluster = {
         // the item this cluster represents
         item: items[index],
         // a unique key for this cluster, stays constant unless merged itself
         key: index,
         // index of cluster in clusters array, can change during any merge
-        index: index,
+        index,
         // how many clusters have been merged into this one
         size: 1
       };
       clusters[index] = cluster;
       clustersByKey[index] = cluster;
       distances[index] = [];
       neighbors[index] = 0;
     }
--- a/toolkit/components/places/ColorAnalyzer.js
+++ b/toolkit/components/places/ColorAnalyzer.js
@@ -59,17 +59,17 @@ ColorAnalyzer.prototype = {
   onImageError: function ColorAnalyzer_onImageError(image, callback, cleanup) {
     Cu.reportError("ColorAnalyzer: image at " + image.src + " didn't load");
     callback.onComplete(false);
     cleanup();
   },
 
   startJob: function ColorAnalyzer_startJob(imageData, callback) {
     this.callbacks.push(callback);
-    this.worker.postMessage({ imageData: imageData, maxColors: 1 });
+    this.worker.postMessage({ imageData, maxColors: 1 });
   },
 
   onWorkerMessage: function ColorAnalyzer_onWorkerMessage(event) {
     // colors can be empty on failure
     if (event.data.colors.length < 1) {
       this.callbacks.shift().onComplete(false);
     } else {
       this.callbacks.shift().onComplete(true, event.data.colors[0]);
--- a/toolkit/components/places/ColorAnalyzer_worker.js
+++ b/toolkit/components/places/ColorAnalyzer_worker.js
@@ -194,25 +194,25 @@ function mergeColors(colorFrequencies, n
   let items = colorFrequencies.map(function(colorFrequency) {
     let color = colorFrequency.color;
     let freq = colorFrequency.freq;
     return {
       mean: rgb2lab(color >> RED_SHIFT, color >> GREEN_SHIFT & 0xff,
                     color & 0xff),
       // the canonical color of the cluster
       // (one w/ highest freq or closest to mean)
-      color: color,
+      color,
       colors: [color],
       highFreq: freq,
       highRatio: freq / numPixels,
       // the individual color w/ the highest frequency in this cluster
       highColor: color,
       // ratio of image taken up by colors in this cluster
       ratio: freq / numPixels,
-      freq: freq,
+      freq,
     };
   });
 
   let merged = clusterlib.hcluster(items, distance, merge, threshold);
   return merged;
 }
 
 function descendingFreqSort(a, b) {
@@ -312,24 +312,24 @@ function merge(item1, item2) {
       }
     }
     color = colors[closest];
   }
 
   const higherItem = item1.highFreq > item2.highFreq ? item1 : item2;
 
   return {
-    mean: mean,
-    color: color,
+    mean,
+    color,
     highFreq: higherItem.highFreq,
     highColor: higherItem.highColor,
     highRatio: higherItem.highRatio,
     ratio: item1.ratio + item2.ratio,
     freq: item1.freq + item2.freq,
-    colors: colors,
+    colors,
   };
 }
 
 /**
  * Find the background color of the given image.
  *
  * @param pixels
  *        The pixel data for the image (an array of component integers)
--- a/toolkit/components/places/History.jsm
+++ b/toolkit/components/places/History.jsm
@@ -125,17 +125,17 @@ this.History = Object.freeze({
    * @resolves (PageInfo | null) If the page could be found, the information
    *      on that page. Note that this `PageInfo` does NOT contain the visit
    *      data (i.e. `visits` is `undefined`).
    *
    * @throws (Error)
    *      If `guidOrURI` does not have the expected type or if it is a string
    *      that may be parsed neither as a valid URL nor as a valid GUID.
    */
-  fetch: function(guidOrURI) {
+  fetch(guidOrURI) {
     throw new Error("Method not implemented");
   },
 
   /**
    * Adds a number of visits for a single page.
    *
    * Any change may be observed through nsINavHistoryObserver
    *
@@ -170,17 +170,17 @@ this.History = Object.freeze({
    * @throws (Error)
    *      If `pageInfo` does not have a `visits` property or if the
    *      value of `visits` is ill-typed or is an empty array.
    * @throws (Error)
    *      If an element of `visits` has an invalid `date`.
    * @throws (Error)
    *      If an element of `visits` has an invalid `transition`.
    */
-  insert: function(pageInfo) {
+  insert(pageInfo) {
     if (typeof pageInfo != "object" || !pageInfo) {
       throw new TypeError("pageInfo must be an object");
     }
 
     let info = validatePageInfo(pageInfo);
 
     return PlacesUtils.withConnectionWrapper("History.jsm: insert",
       db => insert(db, info));
@@ -226,17 +226,17 @@ this.History = Object.freeze({
    * @throws (Error)
    *      If a `PageInfo` does not have a `visits` property or if the
    *      value of `visits` is ill-typed or is an empty array.
    * @throws (Error)
    *      If an element of `visits` has an invalid `date`.
    * @throws (Error)
    *      If an element of `visits` has an invalid `transition`.
    */
-  insertMany: function(pageInfos, onResult, onError) {
+  insertMany(pageInfos, onResult, onError) {
     let infos = [];
 
     if (!Array.isArray(pageInfos)) {
       throw new TypeError("pageInfos must be an array");
     }
     if (!pageInfos.length) {
       throw new TypeError("pageInfos may not be an empty array");
     }
@@ -276,17 +276,17 @@ this.History = Object.freeze({
    *      A promise resolved once the operation is complete.
    * @resolve (bool)
    *      `true` if at least one page was removed, `false` otherwise.
    * @throws (TypeError)
    *       If `pages` has an unexpected type or if a string provided
    *       is neither a valid GUID nor a valid URI or if `pages`
    *       is an empty array.
    */
-  remove: function(pages, onResult = null) {
+  remove(pages, onResult = null) {
     // Normalize and type-check arguments
     if (Array.isArray(pages)) {
       if (pages.length == 0) {
         throw new TypeError("Expected at least one page");
       }
     } else {
       pages = [pages];
     }
@@ -298,17 +298,17 @@ this.History = Object.freeze({
       // be normalized.
       let normalized = normalizeToURLOrGUID(page);
       if (typeof normalized === "string") {
         guids.push(normalized);
       } else {
         urls.push(normalized.href);
       }
     }
-    let normalizedPages = {guids: guids, urls: urls};
+    let normalizedPages = {guids, urls};
 
     // At this stage, we know that either `guids` is not-empty
     // or `urls` is not-empty.
 
     if (onResult && typeof onResult != "function") {
       throw new TypeError("Invalid function: " + onResult);
     }
 
@@ -343,17 +343,17 @@ this.History = Object.freeze({
    * @return (Promise)
    * @resolve (bool)
    *      `true` if at least one visit was removed, `false`
    *      otherwise.
    * @throws (TypeError)
    *      If `filter` does not have the expected type, in
    *      particular if the `object` is empty.
    */
-  removeVisitsByFilter: function(filter, onResult = null) {
+  removeVisitsByFilter(filter, onResult = null) {
     if (!filter || typeof filter != "object") {
       throw new TypeError("Expected a filter");
     }
 
     let hasBeginDate = "beginDate" in filter;
     let hasEndDate = "endDate" in filter;
     let hasURL = "url" in filter;
     let hasLimit = "limit" in filter;
@@ -402,17 +402,17 @@ this.History = Object.freeze({
    * @return (Promise)
    *      A promise resolved once the operation is complete.
    * @resolve (bool)
    *      `true` if the page has been visited, `false` otherwise.
    * @throws (Error)
    *      If `pages` has an unexpected type or if a string provided
    *      is neither not a valid GUID nor a valid URI.
    */
-  hasVisits: function(page, onResult) {
+  hasVisits(page, onResult) {
     throw new Error("Method not implemented");
   },
 
   /**
    * Clear all history.
    *
    * @return (Promise)
    *      A promise resolved once the operation is complete.
@@ -922,17 +922,17 @@ var remove = Task.async(function*(db, {g
       guid,
       hasForeign,
       hasVisits: false,
       url: new URL(url),
     };
     pages.push(page);
     if (onResult) {
       onResultData.push({
-        guid: guid,
+        guid,
         title: row.getResultByName("title"),
         frecency: row.getResultByName("frecency"),
         url: new URL(url)
       });
     }
   }));
 
   try {
--- a/toolkit/components/places/PlacesBackups.jsm
+++ b/toolkit/components/places/PlacesBackups.jsm
@@ -351,17 +351,17 @@ this.PlacesBackups = {
         // This way we ensure the latest valid backup is the same saved by the
         // user.  See bug 424389.
         let mostRecentBackupFile = yield this.getMostRecentBackup();
         if (!mostRecentBackupFile ||
             hash != getHashFromFilename(OS.Path.basename(mostRecentBackupFile))) {
           let name = this.getFilenameForDate(undefined, true);
           let newFilename = appendMetaDataToFilename(name,
                                                      { count: nodeCount,
-                                                       hash: hash });
+                                                       hash });
           let newFilePath = OS.Path.join(backupFolderPath, newFilename);
           let backupFile = yield getBackupFileForSameDate(name);
           if (backupFile) {
             // There is already a backup for today, replace it.
             yield OS.File.remove(backupFile, { ignoreAbsent: true });
             if (!this._backupFiles)
               yield this.getBackupFiles();
             else
@@ -448,17 +448,17 @@ this.PlacesBackups = {
       let newFilenameWithMetaData;
       try {
         let { count: nodeCount, hash: hash } =
           yield BookmarkJSONUtils.exportToFile(newBackupFile,
                                                { compress: true,
                                                  failIfHashIs: mostRecentHash });
         newFilenameWithMetaData = appendMetaDataToFilename(newBackupFilename,
                                                            { count: nodeCount,
-                                                             hash: hash });
+                                                             hash });
       } catch (ex) {
         if (!ex.becauseSameHash) {
           throw ex;
         }
         // The last backup already contained up-to-date information, just
         // rename it as if it was today's backup.
         this._backupFiles.shift();
         this._entries.shift();
--- a/toolkit/components/places/PlacesDBUtils.jsm
+++ b/toolkit/components/places/PlacesDBUtils.jsm
@@ -132,17 +132,17 @@ this.PlacesDBUtils = {
    *        Tasks object to execute.
    */
   _refreshUI: function PDBU__refreshUI(aTasks)
   {
     let tasks = new Tasks(aTasks);
 
     // Send batch update notifications to update the UI.
     PlacesUtils.history.runInBatchMode({
-      runBatched: function(aUserData) {}
+      runBatched(aUserData) {}
     }, null);
     PlacesDBUtils._executeTasks(tasks);
   },
 
   _handleError: function PDBU__handleError(aError)
   {
     Cu.reportError("Async statement execution returned with '" +
                    aError.result + "', '" + aError.message + "'");
@@ -157,19 +157,19 @@ this.PlacesDBUtils = {
   reindex: function PDBU_reindex(aTasks)
   {
     let tasks = new Tasks(aTasks);
     tasks.log("> Reindex");
 
     let stmt = DBConn.createAsyncStatement("REINDEX");
     stmt.executeAsync({
       handleError: PlacesDBUtils._handleError,
-      handleResult: function() {},
+      handleResult() {},
 
-      handleCompletion: function(aReason)
+      handleCompletion(aReason)
       {
         if (aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED) {
           tasks.log("+ The database has been reindexed");
         }
         else {
           tasks.log("- Unable to reindex database");
         }
 
@@ -203,23 +203,23 @@ this.PlacesDBUtils = {
     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: function(aResultSet)
+      handleResult(aResultSet)
       {
         let row = aResultSet.getNextRow();
         this._corrupt = row.getResultByIndex(0) != "ok";
       },
 
-      handleCompletion: function(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();
@@ -255,19 +255,19 @@ this.PlacesDBUtils = {
   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: function() {},
+      handleResult() {},
 
-      handleCompletion: function(aReason)
+      handleCompletion(aReason)
       {
         if (aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED) {
           tasks.log("+ The database is coherent");
         }
         else {
           tasks.log("- Unable to check database coherence");
           tasks.clear();
         }
@@ -743,19 +743,19 @@ this.PlacesDBUtils = {
     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: function() {},
+      handleResult() {},
 
-      handleCompletion: function(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");
         }
@@ -924,45 +924,45 @@ this.PlacesDBUtils = {
                       ) * 100 / (
                       SELECT count(*) FROM moz_bookmarks b
                       JOIN moz_bookmarks t ON t.id = b.parent
                       AND t.parent <> :tags_folder
                       WHERE b.type = :type_bookmark
                     )), 0)` },
 
       { histogram: "PLACES_DATABASE_FILESIZE_MB",
-        callback: function() {
+        callback() {
           let DBFile = Services.dirsvc.get("ProfD", Ci.nsILocalFile);
           DBFile.append("places.sqlite");
           return parseInt(DBFile.fileSize / BYTES_PER_MEBIBYTE);
         }
       },
 
       { histogram: "PLACES_DATABASE_PAGESIZE_B",
         query:     "PRAGMA page_size /* PlacesDBUtils.jsm PAGESIZE_B */" },
 
       { histogram: "PLACES_DATABASE_SIZE_PER_PAGE_B",
         query:     "PRAGMA page_count",
-        callback: function(aDbPageCount) {
+        callback(aDbPageCount) {
           // Note that the database file size would not be meaningful for this
           // calculation, because the file grows in fixed-size chunks.
           let dbPageSize = probeValues.PLACES_DATABASE_PAGESIZE_B;
           let placesPageCount = probeValues.PLACES_PAGES_COUNT;
           return Math.round((dbPageSize * aDbPageCount) / placesPageCount);
         }
       },
 
       { histogram: "PLACES_ANNOS_BOOKMARKS_COUNT",
         query:     "SELECT count(*) FROM moz_items_annos" },
 
       { histogram: "PLACES_ANNOS_PAGES_COUNT",
         query:     "SELECT count(*) FROM moz_annos" },
 
       { histogram: "PLACES_MAINTENANCE_DAYSFROMLAST",
-        callback: function() {
+        callback() {
           try {
             let lastMaintenance = Services.prefs.getIntPref("places.database.lastMaintenance");
             let nowSeconds = parseInt(Date.now() / 1000);
             return parseInt((nowSeconds - lastMaintenance) / 86400);
           } catch (ex) {
             return 60;
           }
         }
@@ -990,21 +990,21 @@ this.PlacesDBUtils = {
           if (probe.query.indexOf(":" + param) > 0) {
             stmt.params[param] = params[param];
           }
         }
 
         try {
           stmt.executeAsync({
             handleError: reject,
-            handleResult: function(aResultSet) {
+            handleResult(aResultSet) {
               let row = aResultSet.getNextRow();
               resolve([probe, row.getResultByIndex(0)]);
             },
-            handleCompletion: function() {}
+            handleCompletion() {}
           });
         } finally {
           stmt.finalize();
         }
       });
 
       // Report the result of the probe through Telemetry.
       // The resulting promise cannot reject.
--- a/toolkit/components/places/PlacesSearchAutocompleteProvider.jsm
+++ b/toolkit/components/places/PlacesSearchAutocompleteProvider.jsm
@@ -33,17 +33,17 @@ const SearchAutocompleteProviderInternal
    */
   aliasMatches: null,
 
   /**
    * Object for the default search match.
    **/
   defaultMatch: null,
 
-  initialize: function() {
+  initialize() {
     return new Promise((resolve, reject) => {
       Services.search.init(status => {
         if (!Components.isSuccessCode(status)) {
           reject(new Error("Unable to initialize search service."));
         }
 
         try {
           // The initial loading of the search engines must succeed.
@@ -57,27 +57,27 @@ const SearchAutocompleteProviderInternal
           reject(ex);
         }
       });
     });
   },
 
   initialized: false,
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (data) {
       case "engine-added":
       case "engine-changed":
       case "engine-removed":
       case "engine-current":
         this._refresh();
     }
   },
 
-  _refresh: function() {
+  _refresh() {
     this.priorityMatches = [];
     this.aliasMatches = [];
     this.defaultMatch = null;
 
     let currentEngine = Services.search.currentEngine;
     // This can be null in XCPShell.
     if (currentEngine) {
       this.defaultMatch = {
@@ -86,17 +86,17 @@ const SearchAutocompleteProviderInternal
       }
     }
 
     // The search engines will always be processed in the order returned by the
     // search service, which can be defined by the user.
     Services.search.getVisibleEngines().forEach(e => this._addEngine(e));
   },
 
-  _addEngine: function(engine) {
+  _addEngine(engine) {
     if (engine.alias) {
       this.aliasMatches.push({
         alias: engine.alias,
         engineName: engine.name,
         iconUrl: engine.iconURI ? engine.iconURI.spec : null,
       });
     }
 
@@ -187,17 +187,17 @@ SearchSuggestionControllerWrapper.protot
 var gInitializationPromise = null;
 
 this.PlacesSearchAutocompleteProvider = Object.freeze({
   /**
    * Starts initializing the component and returns a promise that is resolved or
    * rejected when initialization finished.  The same promise is returned if
    * this function is called multiple times.
    */
-  ensureInitialized: function() {
+  ensureInitialized() {
     if (!gInitializationPromise) {
       gInitializationPromise = SearchAutocompleteProviderInternal.initialize();
     }
     return gInitializationPromise;
   },
 
   /**
    * Matches a given string to an item that should be included by URL search
@@ -268,17 +268,17 @@ this.PlacesSearchAutocompleteProvider = 
    *         }
    *
    * @remarks The asynchronous ensureInitialized function must be called before
    *          this synchronous method can be used.
    *
    * @note This API function needs to be synchronous because it is called inside
    *       a row processing callback of Sqlite.jsm, in UnifiedComplete.js.
    */
-  parseSubmissionURL: function(url) {
+  parseSubmissionURL(url) {
     if (!SearchAutocompleteProviderInternal.initialized) {
       throw new Error("The component has not been initialized.");
     }
 
     let parseUrlResult = Services.search.parseSubmissionURL(url);
     return parseUrlResult.engine && {
       engineName: parseUrlResult.engine.name,
       terms: parseUrlResult.terms,
--- a/toolkit/components/places/PlacesTransactions.jsm
+++ b/toolkit/components/places/PlacesTransactions.jsm
@@ -216,17 +216,17 @@ TransactionsHistory.__proto__ = {
 
   /**
    * Proxify a transaction object for consumers.
    * @param aRawTransaction
    *        the raw transaction object.
    * @return the proxified transaction object.
    * @see getRawTransaction for retrieving the raw transaction.
    */
-  proxifyTransaction: function(aRawTransaction) {
+  proxifyTransaction(aRawTransaction) {
     let proxy = Object.freeze({
       transact() {
         return TransactionsManager.transact(this);
       }
     });
     this.proxifiedToRaw.set(proxy, aRawTransaction);
     return proxy;
   },
@@ -739,28 +739,28 @@ DefineTransaction.urlValidate = function
   return NetUtil.newURI(spec);
 };
 
 DefineTransaction.inputProps = new Map();
 DefineTransaction.defineInputProps =
 function(aNames, aValidationFunction, aDefaultValue) {
   for (let name of aNames) {
     this.inputProps.set(name, {
-      validateValue: function(aValue) {
+      validateValue(aValue) {
         if (aValue === undefined)
           return aDefaultValue;
         try {
           return aValidationFunction(aValue);
         }
         catch (ex) {
           throw new Error(`Invalid value for input property ${name}`);
         }
       },
 
-      validateInput: function(aInput, aRequired) {
+      validateInput(aInput, aRequired) {
         if (aRequired && !(name in aInput))
           throw new Error(`Required input property is missing: ${name}`);
         return this.validateValue(aInput[name]);
       },
 
       isArrayProperty: false
     });
   }
@@ -768,32 +768,32 @@ function(aNames, aValidationFunction, aD
 
 DefineTransaction.defineArrayInputProp =
 function(aName, aBasePropertyName) {
   let baseProp = this.inputProps.get(aBasePropertyName);
   if (!baseProp)
     throw new Error(`Unknown input property: ${aBasePropertyName}`);
 
   this.inputProps.set(aName, {
-    validateValue: function(aValue) {
+    validateValue(aValue) {
       if (aValue == undefined)
         return [];
 
       if (!Array.isArray(aValue))
         throw new Error(`${aName} input property value must be an array`);
 
       // This also takes care of abandoning the global scope of the input
       // array (through Array.prototype).
       return aValue.map(baseProp.validateValue);
     },
 
     // We allow setting either the array property itself (e.g. urls), or a
     // single element of it (url, in that example), that is then transformed
     // into a single-element array.
-    validateInput: function(aInput, aRequired) {
+    validateInput(aInput, aRequired) {
       if (aName in aInput) {
         // It's not allowed to set both though.
         if (aBasePropertyName in aInput) {
           throw new Error(`It is not allowed to set both ${aName} and
                           ${aBasePropertyName} as  input properties`);
         }
         let array = this.validateValue(aInput[aName]);
         if (aRequired && array.length == 0) {
@@ -1020,21 +1020,21 @@ function* createItemsFromBookmarksTree(a
             for (let child of aItem.children) {
               yield createItem(child, guid);
             }
           }
         }
         else {
           let livemark =
             yield PlacesUtils.livemarks.addLivemark({ title: aItem.title
-                                                    , feedURI: feedURI
-                                                    , siteURI: siteURI
-                                                    , parentId: parentId
+                                                    , feedURI
+                                                    , siteURI
+                                                    , parentId
                                                     , index: aIndex
-                                                    , guid: guid});
+                                                    , guid});
           itemId = livemark.id;
         }
         break;
       }
       case PlacesUtils.TYPE_X_MOZ_PLACE_SEPARATOR: {
         itemId = PlacesUtils.bookmarks.insertSeparator(parentId, aIndex, guid);
         break;
       }
@@ -1077,17 +1077,17 @@ var PT = PlacesTransactions;
  * Optional Input Properties: index, title, keyword, annotations, tags.
  *
  * When this transaction is executed, it's resolved to the new bookmark's GUID.
  */
 PT.NewBookmark = DefineTransaction(["parentGuid", "url"],
                                    ["index", "title", "keyword", "postData",
                                     "annotations", "tags"]);
 PT.NewBookmark.prototype = Object.seal({
-  execute: function(aParentGuid, aURI, aIndex, aTitle,
+  execute(aParentGuid, aURI, aIndex, aTitle,
                     aKeyword, aPostData, aAnnos, aTags) {
     return ExecuteCreateItem(this, aParentGuid,
       function* (parentId, guidToRestore = "") {
         let itemId = PlacesUtils.bookmarks.insertBookmark(
           parentId, aURI, aIndex, aTitle, guidToRestore);
 
         if (aKeyword) {
           yield PlacesUtils.keywords.insert({
@@ -1121,17 +1121,17 @@ PT.NewBookmark.prototype = Object.seal({
  * Required Input Properties: title, parentGuid.
  * 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: function(aParentGuid, aTitle, aIndex, aAnnos) {
+  execute(aParentGuid, aTitle, aIndex, aAnnos) {
     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;
       });
@@ -1144,17 +1144,17 @@ PT.NewFolder.prototype = Object.seal({
  * Required Input Properties: parentGuid.
  * Optional Input Properties: index.
  *
  * When this transaction is executed, it's resolved to the new separator's
  * GUID.
  */
 PT.NewSeparator = DefineTransaction(["parentGuid"], ["index"]);
 PT.NewSeparator.prototype = Object.seal({
-  execute: function(aParentGuid, aIndex) {
+  execute(aParentGuid, aIndex) {
     return ExecuteCreateItem(this, aParentGuid,
       function* (parentId, guidToRestore = "") {
         let itemId = PlacesUtils.bookmarks.insertSeparator(
           parentId, aIndex, guidToRestore);
         return itemId;
       });
   }
 });
@@ -1167,17 +1167,17 @@ PT.NewSeparator.prototype = Object.seal(
  * Optional Input Properties: siteUrl, index, annotations.
  *
  * When this transaction is executed, it's resolved to the new livemark's
  * GUID.
  */
 PT.NewLivemark = DefineTransaction(["feedUrl", "title", "parentGuid"],
                                    ["siteUrl", "index", "annotations"]);
 PT.NewLivemark.prototype = Object.seal({
-  execute: function* (aFeedURI, aTitle, aParentGuid, aSiteURI, aIndex, aAnnos) {
+  *execute(aFeedURI, aTitle, aParentGuid, aSiteURI, aIndex, aAnnos) {
     let livemarkInfo = { title: aTitle
                        , feedURI: aFeedURI
                        , siteURI: aSiteURI
                        , index: aIndex };
     let createItem = function* () {
       livemarkInfo.parentId = yield PlacesUtils.promiseItemId(aParentGuid);
       let livemark = yield PlacesUtils.livemarks.addLivemark(livemarkInfo);
       if (aAnnos.length > 0)
@@ -1213,17 +1213,17 @@ PT.NewLivemark.prototype = Object.seal({
 /**
  * Transaction for moving an item.
  *
  * Required Input Properties: guid, newParentGuid.
  * Optional Input Properties  newIndex.
  */
 PT.Move = DefineTransaction(["guid", "newParentGuid"], ["newIndex"]);
 PT.Move.prototype = Object.seal({
-  execute: function* (aGuid, aNewParentGuid, aNewIndex) {
+  *execute(aGuid, aNewParentGuid, aNewIndex) {
     let itemId = yield PlacesUtils.promiseItemId(aGuid),
         oldParentId = PlacesUtils.bookmarks.getFolderIdForItem(itemId),
         oldIndex = PlacesUtils.bookmarks.getItemIndex(itemId),
         newParentId = yield PlacesUtils.promiseItemId(aNewParentGuid);
 
     PlacesUtils.bookmarks.moveItem(itemId, newParentId, aNewIndex);
 
     let undoIndex = PlacesUtils.bookmarks.getItemIndex(itemId);
@@ -1240,32 +1240,32 @@ PT.Move.prototype = Object.seal({
 
 /**
  * Transaction for setting the title for an item.
  *
  * Required Input Properties: guid, title.
  */
 PT.EditTitle = DefineTransaction(["guid", "title"]);
 PT.EditTitle.prototype = Object.seal({
-  execute: function* (aGuid, aTitle) {
+  *execute(aGuid, aTitle) {
     let itemId = yield PlacesUtils.promiseItemId(aGuid),
         oldTitle = PlacesUtils.bookmarks.getItemTitle(itemId);
     PlacesUtils.bookmarks.setItemTitle(itemId, aTitle);
     this.undo = () => { PlacesUtils.bookmarks.setItemTitle(itemId, oldTitle); };
   }
 });
 
 /**
  * Transaction for setting the URI for an item.
  *
  * Required Input Properties: guid, url.
  */
 PT.EditUrl = DefineTransaction(["guid", "url"]);
 PT.EditUrl.prototype = Object.seal({
-  execute: function* (aGuid, aURI) {
+  *execute(aGuid, aURI) {
     let itemId = yield PlacesUtils.promiseItemId(aGuid),
         oldURI = PlacesUtils.bookmarks.getBookmarkURI(itemId),
         oldURITags = PlacesUtils.tagging.getTagsForURI(oldURI),
         newURIAdditionalTags = null;
     PlacesUtils.bookmarks.changeBookmarkURI(itemId, aURI);
 
     // Move tags from old URI to new URI.
     if (oldURITags.length > 0) {
@@ -1341,31 +1341,31 @@ PT.Annotate.prototype = {
 /**
  * Transaction for setting the keyword for a bookmark.
  *
  * Required Input Properties: guid, keyword.
  */
 PT.EditKeyword = DefineTransaction(["guid", "keyword"],
                                    ["postData", "oldKeyword"]);
 PT.EditKeyword.prototype = Object.seal({
-  execute: function* (aGuid, aKeyword, aPostData, aOldKeyword) {
+  *execute(aGuid, aKeyword, aPostData, aOldKeyword) {
     let url;
     let oldKeywordEntry;
     if (aOldKeyword) {
       oldKeywordEntry = yield PlacesUtils.keywords.fetch(aOldKeyword);
       url = oldKeywordEntry.url;
       yield PlacesUtils.keywords.remove(aOldKeyword);
     }
 
     if (aKeyword) {
       if (!url) {
         url = (yield PlacesUtils.bookmarks.fetch(aGuid)).url;
       }
       yield PlacesUtils.keywords.insert({
-        url: url,
+        url,
         keyword: aKeyword,
         postData: aPostData || (oldKeywordEntry ? oldKeywordEntry.postData : "")
       });
     }
 
     this.undo = function* () {
       if (aKeyword) {
         yield PlacesUtils.keywords.remove(aKeyword);
@@ -1379,17 +1379,17 @@ PT.EditKeyword.prototype = Object.seal({
 
 /**
  * Transaction for sorting a folder by name.
  *
  * Required Input Properties: guid.
  */
 PT.SortByName = DefineTransaction(["guid"]);
 PT.SortByName.prototype = {
-  execute: function* (aGuid) {
+  *execute(aGuid) {
     let itemId = yield PlacesUtils.promiseItemId(aGuid),
         oldOrder = [],  // [itemId] = old index
         contents = PlacesUtils.getFolderContents(itemId, false, false).root,
         count = contents.childCount;
 
     // Sort between separators.
     let newOrder = [], // nodes, in the new order.
         preSep   = []; // Temporary array for sorting each group of nodes.
@@ -1419,27 +1419,27 @@ PT.SortByName.prototype = {
 
     if (preSep.length > 0) {
       preSep.sort(sortingMethod);
       newOrder = newOrder.concat(preSep);
     }
 
     // Set the nex indexes.
     let callback = {
-      runBatched: function() {
+      runBatched() {
         for (let i = 0; i < newOrder.length; ++i) {
           PlacesUtils.bookmarks.setItemIndex(newOrder[i].itemId, i);
         }
       }
     };
     PlacesUtils.bookmarks.runInBatchMode(callback, null);
 
     this.undo = () => {
       let callback = {
-        runBatched: function() {
+        runBatched() {
           for (let item in oldOrder) {
             PlacesUtils.bookmarks.setItemIndex(item, oldOrder[item]);
           }
         }
       };
       PlacesUtils.bookmarks.runInBatchMode(callback, null);
     };
   }
@@ -1507,17 +1507,17 @@ PT.RemoveBookmarksForUrls.prototype = {
 
 /**
  * Transaction for tagging urls.
  *
  * Required Input Properties: urls, tags.
  */
 PT.Tag = DefineTransaction(["urls", "tags"]);
 PT.Tag.prototype = {
-  execute: function* (aURIs, aTags) {
+  *execute(aURIs, aTags) {
     let onUndo = [], onRedo = [];
     for (let uri of aURIs) {
 
       let promiseIsBookmarked = function* () {
         let deferred = Promise.defer();
         PlacesUtils.asyncGetBookmarkIds(
           uri, ids => { deferred.resolve(ids.length > 0); });
         return deferred.promise;
@@ -1563,17 +1563,17 @@ PT.Tag.prototype = {
  *
  * Required Input Properties: urls.
  * Optional Input Properties: tags.
  *
  * If |tags| is not set, all tags set for |url| are removed.
  */
 PT.Untag = DefineTransaction(["urls"], ["tags"]);
 PT.Untag.prototype = {
-  execute: function* (aURIs, aTags) {
+  *execute(aURIs, aTags) {
     let onUndo = [], onRedo = [];
     for (let uri of aURIs) {
       let tagsToRemove;
       let tagsSet = PlacesUtils.tagging.getTagsForURI(uri);
       if (aTags.length > 0)
         tagsToRemove = aTags.filter(t => tagsSet.includes(t));
       else
         tagsToRemove = tagsSet;
@@ -1602,17 +1602,17 @@ PT.Untag.prototype = {
  * Transaction for copying an item.
  *
  * Required Input Properties: guid, newParentGuid
  * Optional Input Properties: newIndex, excludingAnnotations.
  */
 PT.Copy = DefineTransaction(["guid", "newParentGuid"],
                             ["newIndex", "excludingAnnotations"]);
 PT.Copy.prototype = {
-  execute: function* (aGuid, aNewParentGuid, aNewIndex, aExcludingAnnotations) {
+  *execute(aGuid, aNewParentGuid, aNewIndex, aExcludingAnnotations) {
     let creationInfo = null;
     try {
       creationInfo = yield PlacesUtils.promiseBookmarksTree(aGuid);
     }
     catch (ex) {
       throw new Error("Failed to get info for the specified item (guid: " +
                       aGuid + "). Ex: " + ex);
     }
--- a/toolkit/components/places/PlacesUtils.jsm
+++ b/toolkit/components/places/PlacesUtils.jsm
@@ -618,18 +618,18 @@ this.PlacesUtils = {
         // Initialize the keywords cache to start observing bookmarks
         // notifications.  This is needed as far as we support both the old and
         // the new bookmarking APIs at the same time.
         gKeywordsCachePromise.catch(Cu.reportError);
         break;
     }
   },
 
-  onPageAnnotationSet: function() {},
-  onPageAnnotationRemoved: function() {},
+  onPageAnnotationSet() {},
+  onPageAnnotationRemoved() {},
 
 
   // nsITransactionListener
 
   didDo: function PU_didDo(aManager, aTransaction, aDoResult)
   {
     updateCommandsOnActiveWindow();
   },
@@ -649,21 +649,21 @@ this.PlacesUtils = {
     // 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)!
-    this.transactionManager.doTransaction({ doTransaction: function() {},
-                                            undoTransaction: function() {},
-                                            redoTransaction: function() {},
+    this.transactionManager.doTransaction({ doTransaction() {},
+                                            undoTransaction() {},
+                                            redoTransaction() {},
                                             isTransient: false,
-                                            merge: function() { return false; }
+                                            merge() { return false; }
                                           });
   },
 
   willDo: function PU_willDo() {},
   willUndo: function PU_willUndo() {},
   willRedo: function PU_willRedo() {},
   willBeginBatch: function PU_willBeginBatch() {},
   willEndBatch: function PU_willEndBatch() {},
@@ -1621,33 +1621,33 @@ this.PlacesUtils = {
     PlacesUtils.asyncHistory.getPlacesInfo(aPlaceIdentifier, {
       _placeInfo: null,
       handleResult: function handleResult(aPlaceInfo) {
         this._placeInfo = aPlaceInfo;
       },
       handleError: function handleError(aResultCode, aPlaceInfo) {
         deferred.reject(new Components.Exception("Error", aResultCode));
       },
-      handleCompletion: function() {
+      handleCompletion() {
         deferred.resolve(this._placeInfo);
       }
     });
 
     return deferred.promise;
   },
 
   /**
    * Gets favicon data for a given page url.
    *
    * @param aPageUrl url of the page to look favicon for.
    * @resolves to an object representing a favicon entry, having the following
    *           properties: { uri, dataLen, data, mimeType }
    * @rejects JavaScript exception if the given url has no associated favicon.
    */
-  promiseFaviconData: function(aPageUrl) {
+  promiseFaviconData(aPageUrl) {
     let deferred = Promise.defer();
     PlacesUtils.favicons.getFaviconDataForPage(NetUtil.newURI(aPageUrl),
       function(aURI, aDataLen, aData, aMimeType) {
         if (aURI) {
           deferred.resolve({ uri: aURI,
                              dataLen: aDataLen,
                              data: aData,
                              mimeType: aMimeType });
@@ -1660,17 +1660,17 @@ this.PlacesUtils = {
 
   /**
    * Gets the favicon link url (moz-anno:) for a given page url.
    *
    * @param aPageURL url of the page to lookup the favicon for.
    * @resolves to the nsIURL of the favicon link
    * @rejects if the given url has no associated favicon.
    */
-  promiseFaviconLinkUrl: function(aPageUrl) {
+  promiseFaviconLinkUrl(aPageUrl) {
     let deferred = Promise.defer();
     if (!(aPageUrl instanceof Ci.nsIURI))
       aPageUrl = NetUtil.newURI(aPageUrl);
 
     PlacesUtils.favicons.getFaviconURLForPage(aPageUrl, uri => {
       if (uri) {
         uri = PlacesUtils.favicons.getFaviconLinkForIcon(uri);
         deferred.resolve(uri);
@@ -1971,17 +1971,17 @@ this.PlacesUtils = {
 };
 
 XPCOMUtils.defineLazyGetter(PlacesUtils, "history", function() {
   let hs = Cc["@mozilla.org/browser/nav-history-service;1"]
              .getService(Ci.nsINavHistoryService)
              .QueryInterface(Ci.nsIBrowserHistory)
              .QueryInterface(Ci.nsPIPlacesDatabase);
   return Object.freeze(new Proxy(hs, {
-    get: function(target, name) {
+    get(target, name) {
       let property, object;
       if (name in target) {
         property = target[name];
         object = target;
       } else {
         property = History[name];
         object = History;
       }
@@ -2048,17 +2048,17 @@ XPCOMUtils.defineLazyGetter(PlacesUtils,
   // is independent of the global from which doTransaction was called.
   // To avoid such a leak, we hide the native doTransaction from callers,
   // and let each doTransaction call go through this module.
   // Doing so ensures that, as long as the transaction is any of the
   // PlacesXXXTransaction objects declared in this module, the object
   // referenced by the transaction manager has the module itself as global.
   return Object.create(tm, {
     "doTransaction": {
-      value: function(aTransaction) {
+      value(aTransaction) {
         tm.doTransaction(aTransaction);
       }
     }
   });
 });
 
 XPCOMUtils.defineLazyGetter(this, "bundle", function() {
   const PLACES_STRING_BUNDLE_URI = "chrome://places/locale/places.properties";
@@ -2261,32 +2261,32 @@ var Keywords = {
         // Note we cannot use INSERT OR REPLACE cause it wouldn't invoke the delete
         // trigger.
         if (oldEntry) {
           yield db.executeCached(
             `UPDATE moz_keywords
              SET place_id = (SELECT id FROM moz_places WHERE url_hash = hash(:url) AND url = :url),
                  post_data = :post_data
              WHERE keyword = :keyword
-            `, { url: url.href, keyword: keyword, post_data: postData });
+            `, { url: url.href, keyword, post_data: postData });
           yield notifyKeywordChange(oldEntry.url.href, "", source);
         } else {
           // An entry for the given page could be missing, in such a case we need to
           // create it.  The IGNORE conflict can trigger on `guid`.
           yield db.executeCached(
             `INSERT OR IGNORE INTO moz_places (url, url_hash, rev_host, hidden, frecency, guid)
              VALUES (:url, hash(:url), :rev_host, 0, :frecency,
                      IFNULL((SELECT guid FROM moz_places WHERE url_hash = hash(:url) AND url = :url),
                             GENERATE_GUID()))
             `, { url: url.href, rev_host: PlacesUtils.getReversedHost(url),
                  frecency: url.protocol == "place:" ? 0 : -1 });
           yield db.executeCached(
             `INSERT INTO moz_keywords (keyword, place_id, post_data)
              VALUES (:keyword, (SELECT id FROM moz_places WHERE url_hash = hash(:url) AND url = :url), :post_data)
-            `, { url: url.href, keyword: keyword, post_data: postData });
+            `, { url: url.href, keyword, post_data: postData });
         }
 
         yield PlacesSyncUtils.bookmarks.addSyncChangesForBookmarksWithURL(
           db, url, PlacesSyncUtils.bookmarks.determineSyncChangeDelta(source));
 
         cache.set(keyword, { keyword, url, postData });
 
         // In any case, notify about the new keyword.
@@ -2530,17 +2530,17 @@ var GuidHelper = {
   },
 
   invalidateCacheForItemId(aItemId) {
     let guid = this.guidsForIds.get(aItemId);
     this.guidsForIds.delete(aItemId);
     this.idsForGuids.delete(guid);
   },
 
-  ensureObservingRemovedItems: function() {
+  ensureObservingRemovedItems() {
     if (!("observer" in this)) {
       /**
        * This observers serves two purposes:
        * (1) Invalidate cached id<->GUID paris on when items are removed.
        * (2) Cache GUIDs given us free of charge by onItemAdded/onItemRemoved.
       *      So, for exmaple, when the NewBookmark needs the new GUID, we already
       *      have it cached.
       */
@@ -2554,21 +2554,21 @@ var GuidHelper = {
         (aItemId, aParentId, aIndex, aItemTyep, aURI, aGuid, aParentGuid) => {
           this.guidsForIds.delete(aItemId);
           this.idsForGuids.delete(aGuid);
           this.updateCache(aParentId, aParentGuid);
         },
 
         QueryInterface: XPCOMUtils.generateQI(Ci.nsINavBookmarkObserver),
 
-        onBeginUpdateBatch: function() {},
-        onEndUpdateBatch: function() {},
-        onItemChanged: function() {},
-        onItemVisited: function() {},
-        onItemMoved: function() {},
+        onBeginUpdateBatch() {},
+        onEndUpdateBatch() {},
+        onItemChanged() {},
+        onItemVisited() {},
+        onItemMoved() {},
       };
       PlacesUtils.bookmarks.addObserver(this.observer, false);
       PlacesUtils.registerShutdownFunction(() => {
         PlacesUtils.bookmarks.removeObserver(this.observer);
       });
     }
   }
 };
@@ -3393,17 +3393,17 @@ PlacesSetItemAnnotationTransaction.proto
       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: value,
+                                value,
                                 expires: expires.value }];
     }
     else {
       // create an empty old anno
       this.item.annotations = [{ name: annoName,
                                 flags: 0,
                                 value: null,
                                 expires: Ci.nsIAnnotationService.EXPIRE_NEVER }];
@@ -3450,17 +3450,17 @@ PlacesSetPageAnnotationTransaction.proto
       // 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: value,
+                                value,
                                 expires: expires.value }];
     }
     else {
       // create an empty old anno
       this.item.annotations = [{ name: annoName,
                                 type: Ci.nsIAnnotationService.TYPE_STRING,
                                 flags: 0,
                                 value: null,
@@ -3738,30 +3738,30 @@ PlacesSortFolderByNameTransaction.protot
 
     if (preSep.length > 0) {
       preSep.sort(sortingMethod);
       newOrder = newOrder.concat(preSep);
     }
 
     // set the nex indexes
     let callback = {
-      runBatched: function() {
+      runBatched() {
         for (let i = 0; i < newOrder.length; ++i) {
           PlacesUtils.bookmarks.setItemIndex(newOrder[i].itemId, i);
         }
       }
     };
     PlacesUtils.bookmarks.runInBatchMode(callback, null);
   },
 
   undoTransaction: function SFBNTXN_undoTransaction()
   {
     let callback = {
       _self: this,
-      runBatched: function() {
+      runBatched() {
         for (let item in this._self._oldOrder)
           PlacesUtils.bookmarks.setItemIndex(item, this._self._oldOrder[item]);
       }
     };
     PlacesUtils.bookmarks.runInBatchMode(callback, null);
   }
 };
 
--- a/toolkit/components/places/UnifiedComplete.js
+++ b/toolkit/components/places/UnifiedComplete.js
@@ -379,17 +379,17 @@ XPCOMUtils.defineLazyGetter(this, "Switc
     this._conn.executeCached(
       `UPDATE moz_openpages_temp
        SET open_count = open_count - 1
        WHERE url = :url
        AND userContextId = :userContextId`
     , { url: uri.spec, userContextId });
   },
 
-  shutdown: function() {
+  shutdown() {
     this._conn = null;
     this._queue.clear();
   }
 }));
 
 /**
  * This helper keeps track of preferences and keeps their values up-to-date.
  */
@@ -764,17 +764,17 @@ function Search(searchString, searchPara
 
 Search.prototype = {
   /**
    * Enables the desired AutoComplete behavior.
    *
    * @param type
    *        The behavior type to set.
    */
-  setBehavior: function(type) {
+  setBehavior(type) {
     type = type.toUpperCase();
     this._behavior |=
       Ci.mozIPlacesAutoComplete["BEHAVIOR_" + type];
 
     // Setting the "typed" behavior should also set the "history" behavior.
     if (type == "TYPED") {
       this.setBehavior("history");
     }
@@ -782,33 +782,33 @@ Search.prototype = {
 
   /**
    * Determines if the specified AutoComplete behavior is set.
    *
    * @param aType
    *        The behavior type to test for.
    * @return true if the behavior is set, false otherwise.
    */
-  hasBehavior: function(type) {
+  hasBehavior(type) {
     let behavior = Ci.mozIPlacesAutoComplete["BEHAVIOR_" + type.toUpperCase()];
 
     if (this._disablePrivateActions &&
         behavior == Ci.mozIPlacesAutoComplete.BEHAVIOR_OPENPAGE) {
       return false;
     }
 
     return this._behavior & behavior;
   },
 
   /**
    * Used to delay the most complex queries, to save IO while the user is
    * typing.
    */
   _sleepDeferred: null,
-  _sleep: function(aTimeMs) {
+  _sleep(aTimeMs) {
     // Reuse a single instance to try shaving off some usless work before
     // the first query.
     if (!this._sleepTimer)
       this._sleepTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     this._sleepDeferred = PromiseUtils.defer();
     this._sleepTimer.initWithCallback(() => this._sleepDeferred.resolve(),
                                       aTimeMs, Ci.nsITimer.TYPE_ONE_SHOT);
     return this._sleepDeferred.promise;
@@ -817,17 +817,17 @@ Search.prototype = {
   /**
    * Given an array of tokens, this function determines which query should be
    * ran.  It also removes any special search tokens.
    *
    * @param tokens
    *        An array of search tokens.
    * @return the filtered list of tokens to search with.
    */
-  filterTokens: function(tokens) {
+  filterTokens(tokens) {
     let foundToken = false;
     // Set the proper behavior while filtering tokens.
     for (let i = tokens.length - 1; i >= 0; i--) {
       let behavior = Prefs.tokenToBehaviorMap.get(tokens[i]);
       // Don't remove the token if it didn't match, or if it's an action but
       // actions are not enabled.
       if (behavior && (behavior != "openpage" || this._enableActions)) {
         // Don't use the suggest preferences if it is a token search and
@@ -1147,17 +1147,17 @@ Search.prototype = {
       return true;
     }
 
     // Disallow fetching search suggestions for strings looking like URLs, to
     // avoid disclosing information about networks or passwords.
     return this._searchTokens.some(looksLikeUrl);
   },
 
-  _matchKnownUrl: function* (conn) {
+  *_matchKnownUrl(conn) {
     // Hosts have no "/" in them.
     let lastSlashIndex = this._searchString.lastIndexOf("/");
     // Search only URLs if there's a slash in the search string...
     if (lastSlashIndex != -1) {
       // ...but not if it's exactly at the end of the search string.
       if (lastSlashIndex < this._searchString.length - 1) {
         // We don't want to execute this query right away because it needs to
         // search the entire DB without an index, but we need to know if we have
@@ -1179,27 +1179,27 @@ Search.prototype = {
     let [ query, params ] = this._hostQuery;
     yield conn.executeCached(query, params, row => {
       gotResult = true;
       this._onResultRow(row);
     });
     return gotResult;
   },
 
-  _matchExtensionHeuristicResult: function* () {
+  *_matchExtensionHeuristicResult() {
     if (ExtensionSearchHandler.isKeywordRegistered(this._searchTokens[0]) &&
         this._originalSearchString.length > this._searchTokens[0].length) {
       let description = ExtensionSearchHandler.getDescription(this._searchTokens[0]);
       this._addExtensionMatch(this._originalSearchString, description);
       return true;
     }
     return false;
   },
 
-  _matchPlacesKeyword: function* () {
+  *_matchPlacesKeyword() {
     // The first word could be a keyword, so that's what we'll search.
     let keyword = this._searchTokens[0];
     let entry = yield PlacesUtils.keywords.fetch(this._searchTokens[0]);
     if (!entry)
       return false;
 
     let searchString = this._trimmedOriginalSearchString.substr(keyword.length + 1);
 
@@ -1223,17 +1223,17 @@ Search.prototype = {
     let value = this._enableActions ? actionURL : url;
     // The title will end up being "host: queryString"
     let comment = entry.url.host;
 
     this._addMatch({ value, comment, style, frecency: FRECENCY_DEFAULT });
     return true;
   },
 
-  _matchSearchEngineUrl: function* () {
+  *_matchSearchEngineUrl() {
     if (!Prefs.autofillSearchEngines)
       return false;
 
     let match = yield PlacesSearchAutocompleteProvider.findMatchByToken(
                                                            this._searchString);
     if (!match)
       return false;
 
@@ -1265,43 +1265,43 @@ Search.prototype = {
     if (!value.startsWith(this._originalSearchString)) {
       Components.utils.reportError(`Trying to inline complete in-the-middle
                                     ${this._originalSearchString} to ${value}`);
       return false;
     }
 
     this._result.setDefaultIndex(0);
     this._addMatch({
-      value: value,
+      value,
       comment: match.engineName,
       icon: match.iconUrl,
       style: "priority-search",
       finalCompleteValue: match.url,
       frecency: FRECENCY_DEFAULT
     });
     return true;
   },
 
-  _matchSearchEngineAlias: function* () {
+  *_matchSearchEngineAlias() {
     if (this._searchTokens.length < 1)
       return false;
 
     let alias = this._searchTokens[0];
     let match = yield PlacesSearchAutocompleteProvider.findMatchByAlias(alias);
     if (!match)
       return false;
 
     match.engineAlias = alias;
     let query = this._trimmedOriginalSearchString.substr(alias.length + 1);
 
     this._addSearchEngineMatch(match, query);
     return true;
   },
 
-  _matchCurrentSearchEngine: function* () {
+  *_matchCurrentSearchEngine() {
     let match = yield PlacesSearchAutocompleteProvider.getDefaultMatch();
     if (!match)
       return false;
 
     let query = this._originalSearchString;
     this._addSearchEngineMatch(match, query);
     return true;
   },
@@ -1333,17 +1333,17 @@ Search.prototype = {
     if (suggestion)
       actionURLParams.searchSuggestion = suggestion;
     if (match.engineAlias) {
       actionURLParams.alias = match.engineAlias;
     }
     let value = PlacesUtils.mozActionURI("searchengine", actionURLParams);
 
     this._addMatch({
-      value: value,
+      value,
       comment: match.engineName,
       icon: match.iconUrl,
       style: "action searchengine",
       frecency: FRECENCY_DEFAULT,
       remote: !!suggestion
     });
   },
 
@@ -1388,17 +1388,17 @@ Search.prototype = {
         icon,
       }
       this._addMatch(match);
     }
   },
 
   // TODO (bug 1054814): Use visited URLs to inform which scheme to use, if the
   // scheme isn't specificed.
-  _matchUnknownUrl: function* () {
+  *_matchUnknownUrl() {
     let flags = Ci.nsIURIFixup.FIXUP_FLAG_FIX_SCHEME_TYPOS |
                 Ci.nsIURIFixup.FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP;
     let fixupInfo = null;
     try {
       fixupInfo = Services.uriFixup.getFixupURIInfo(this._originalSearchString,
                                                     flags);
     } catch (e) {
       return false;
@@ -1430,17 +1430,17 @@ Search.prototype = {
     let displayURL = textURIService.unEscapeURIForUI("UTF-8", uri.spec);
 
     let value = PlacesUtils.mozActionURI("visiturl", {
       url: escapedURL,
       input: this._originalSearchString,
     });
 
     let match = {
-      value: value,
+      value,
       comment: displayURL,
       style: "action visiturl",
       frecency: 0,
     };
 
     try {
       let favicon = yield PlacesUtils.promiseFaviconLinkUrl(uri);
       if (favicon)
@@ -1448,17 +1448,17 @@ Search.prototype = {
     } catch (e) {
       // It's possible we don't have a favicon for this - and that's ok.
     }
 
     this._addMatch(match);
     return true;
   },
 
-  _onResultRow: function(row) {
+  _onResultRow(row) {
     if (this._localMatchesCount == 0) {
       TelemetryStopwatch.finish(TELEMETRY_1ST_RESULT, this);
     }
     let queryType = row.getResultByIndex(QUERYINDEX_QUERYTYPE);
     let match;
     switch (queryType) {
       case QUERYTYPE_AUTOFILL_HOST:
         this._result.setDefaultIndex(0);
@@ -1474,17 +1474,17 @@ Search.prototype = {
     }
     this._addMatch(match);
     // If the search has been canceled by the user or by _addMatch, or we
     // fetched enough results, we can stop the underlying Sqlite query.
     if (!this.pending || this._localMatchesCount == Prefs.maxRichResults)
       throw StopIteration;
   },
 
-  _maybeRestyleSearchMatch: function(match) {
+  _maybeRestyleSearchMatch(match) {
     // Return if the URL does not represent a search result.
     let parseResult =
       PlacesSearchAutocompleteProvider.parseSubmissionURL(match.value);
     if (!parseResult) {
       return;
     }
 
     // Do not apply the special style if the user is doing a search from the
@@ -1580,17 +1580,17 @@ Search.prototype = {
         // Append after remote matches.
         index = this._localMatchesCount + this._remoteMatchesCount;
       }
       this._localMatchesCount++;
     }
     return index;
   },
 
-  _processHostRow: function(row) {
+  _processHostRow(row) {
     let match = {};
     let trimmedHost = row.getResultByIndex(QUERYINDEX_URL);
     let untrimmedHost = row.getResultByIndex(QUERYINDEX_TITLE);
     let frecency = row.getResultByIndex(QUERYINDEX_FRECENCY);
     let faviconUrl = row.getResultByIndex(QUERYINDEX_ICONURL);
 
     // If the untrimmed value doesn't preserve the user's input just
     // ignore it and complete to the found host.
@@ -1609,17 +1609,17 @@ Search.prototype = {
     }
     // Although this has a frecency, this query is executed before any other
     // queries that would result in frecency matches.
     match.frecency = frecency;
     match.style = "autofill";
     return match;
   },
 
-  _processUrlRow: function(row) {
+  _processUrlRow(row) {
     let match = {};
     let value = row.getResultByIndex(QUERYINDEX_URL);
     let url = fixupSearchText(value);
     let frecency = row.getResultByIndex(QUERYINDEX_FRECENCY);
     let faviconUrl = row.getResultByIndex(QUERYINDEX_ICONURL);
 
     let prefix = value.slice(0, value.length - stripPrefix(value).length);
 
@@ -1651,17 +1651,17 @@ Search.prototype = {
     }
     // Although this has a frecency, this query is executed before any other
     // queries that would result in frecency matches.
     match.frecency = frecency;
     match.style = "autofill";
     return match;
   },
 
-  _processRow: function(row) {
+  _processRow(row) {
     let match = {};
     match.placeId = row.getResultByIndex(QUERYINDEX_PLACEID);
     let escapedURL = row.getResultByIndex(QUERYINDEX_URL);
     let openPageCount = row.getResultByIndex(QUERYINDEX_SWITCHTAB) || 0;
     let historyTitle = row.getResultByIndex(QUERYINDEX_TITLE) || "";
     let iconurl = row.getResultByIndex(QUERYINDEX_ICONURL) || "";
     let bookmarked = row.getResultByIndex(QUERYINDEX_BOOKMARKED);
     let bookmarkTitle = bookmarked ?
@@ -1928,17 +1928,17 @@ Search.prototype = {
   },
 
  /**
    * Notifies the listener about results.
    *
    * @param searchOngoing
    *        Indicates whether the search is ongoing.
    */
-  notifyResults: function(searchOngoing) {
+  notifyResults(searchOngoing) {
     let result = this._result;
     let resultCode = result.matchCount ? "RESULT_SUCCESS" : "RESULT_NOMATCH";
     if (searchOngoing) {
       resultCode += "_ONGOING";
     }
     result.setSearchResult(Ci.nsIAutoCompleteResult[resultCode]);
     this._listener.onSearchResult(this._autocompleteSearch, result);
   },
@@ -1966,17 +1966,17 @@ UnifiedComplete.prototype = {
 
   /**
    * Gets a Sqlite database handle.
    *
    * @return {Promise}
    * @resolves to the Sqlite database handle (according to Sqlite.jsm).
    * @rejects javascript exception.
    */
-  getDatabaseHandle: function() {
+  getDatabaseHandle() {
     if (Prefs.enabled && !this._promiseDatabase) {
       this._promiseDatabase = Task.spawn(function* () {
         let conn = yield Sqlite.cloneStorageConnection({
           connection: PlacesUtils.history.DBConnection,
           readOnly: true
         });
 
         try {
@@ -2013,17 +2013,17 @@ UnifiedComplete.prototype = {
   },
 
   unregisterOpenPage(uri, userContextId) {
     SwitchToTabStorage.delete(uri, userContextId);
   },
 
   // nsIAutoCompleteSearch
 
-  startSearch: function(searchString, searchParam, previousResult, listener) {
+  startSearch(searchString, searchParam, previousResult, listener) {
     // Stop the search in case the controller has not taken care of it.
     if (this._currentSearch) {
       this.stopSearch();
     }
 
     // Note: We don't use previousResult to make sure ordering of results are
     //       consistent.  See bug 412730 for more details.
 
@@ -2052,33 +2052,33 @@ UnifiedComplete.prototype = {
                             })
                             .then(() => {
                               if (search == this._currentSearch) {
                                 this.finishSearch(true);
                               }
                             });
   },
 
-  stopSearch: function() {
+  stopSearch() {
     if (this._currentSearch) {
       this._currentSearch.stop();
     }
     // Don't notify since we are canceling this search.  This also means we
     // won't fire onSearchComplete for this search.
     this.finishSearch();
   },
 
   /**
    * Properly cleans up when searching is completed.
    *
    * @param notify [optional]
    *        Indicates if we should notify the AutoComplete listener about our
    *        results or not.
    */
-  finishSearch: function(notify = false) {
+  finishSearch(notify = false) {
     TelemetryStopwatch.cancel(TELEMETRY_1ST_RESULT, this);
     TelemetryStopwatch.cancel(TELEMETRY_6_FIRST_RESULTS, this);
     // Clear state now to avoid race conditions, see below.
     let search = this._currentSearch;
     if (!search)
       return;
     this._lastLowResultsSearchSuggestion = search._lastLowResultsSearchSuggestion;
     delete this._currentSearch;
@@ -2095,17 +2095,17 @@ UnifiedComplete.prototype = {
     // notifyResults.
     // Thus, ensure that notifyResults is the last call in this method,
     // otherwise you might be touching the wrong search.
     search.notifyResults(false);
   },
 
   // nsIAutoCompleteSimpleResultListener
 
-  onValueRemoved: function(result, spec, removeFromDB) {
+  onValueRemoved(result, spec, removeFromDB) {
     if (removeFromDB) {
       PlacesUtils.history.removePage(NetUtil.newURI(spec));
     }
   },
 
   // nsIAutoCompleteSearchDescriptor
 
   get searchType() {
--- a/toolkit/components/places/nsLivemarkService.js
+++ b/toolkit/components/places/nsLivemarkService.js
@@ -777,17 +777,17 @@ LivemarkLoadListener.prototype = {
                   .checkLoadURIWithPrincipal(feedPrincipal, uri,
                                              Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL);
         }
         catch (ex) {
           continue;
         }
 
         let title = entry.title ? entry.title.plainText() : "";
-        livemarkChildren.push({ uri: uri, title: title, visited: false });
+        livemarkChildren.push({ uri, title, visited: false });
       }
 
       this._livemark.children = livemarkChildren;
     }
     catch (ex) {
       this.abort(ex);
     }
     finally {
--- a/toolkit/components/places/nsPlacesExpiration.js
+++ b/toolkit/components/places/nsPlacesExpiration.js
@@ -615,21 +615,21 @@ nsPlacesExpiration.prototype = {
   _lastClearHistoryTime: 0,
   onClearHistory: function PEX_onClearHistory() {
     this._lastClearHistoryTime = Date.now();
     // Expire orphans.  History status is clean after a clear history.
     this.status = STATUS.CLEAN;
     this._expireWithActionAndLimit(ACTION.CLEAR_HISTORY, LIMIT.UNLIMITED);
   },
 
-  onVisit: function() {},
-  onTitleChanged: function() {},
-  onDeleteURI: function() {},
-  onPageChanged: function() {},
-  onDeleteVisits: function() {},
+  onVisit() {},
+  onTitleChanged() {},
+  onDeleteURI() {},
+  onPageChanged() {},
+  onDeleteVisits() {},
 
   // nsITimerCallback
 
   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;
@@ -897,27 +897,27 @@ nsPlacesExpiration.prototype = {
         `SELECT (SELECT COUNT(*) FROM moz_places),
                 (SELECT SUBSTR(stat,1,LENGTH(stat)-2) FROM sqlite_stat1
                  WHERE idx = 'moz_places_url_uniqueindex')`
       );
     }
     this._cachedStatements["LIMIT_COUNT"].executeAsync({
       _pagesCount: 0,
       _statsCount: 0,
-      handleResult: function(aResults) {
+      handleResult(aResults) {
         let row = aResults.getNextRow();
         this._pagesCount = row.getResultByIndex(0);
         this._statsCount = row.getResultByIndex(1);
       },
-      handleCompletion: function(aReason) {
+      handleCompletion(aReason) {
         if (aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED) {
           aCallback(this._pagesCount, this._statsCount);
         }
       },
-      handleError: function(aError) {
+      handleError(aError) {
         Cu.reportError("Async statement execution returned with '" +
                        aError.result + "', '" + aError.message + "'");
       }
     });
   },
 
   /**
    * Execute async statements to expire with the specified queries.
--- a/toolkit/components/places/nsTaggingService.js
+++ b/toolkit/components/places/nsTaggingService.js
@@ -459,19 +459,19 @@ TaggingService.prototype = {
 
   onItemMoved: function TS_onItemMoved(aItemId, aOldParent, aOldIndex,
                                       aNewParent, aNewIndex, aItemType) {
     if (this._tagFolders[aItemId] && PlacesUtils.tagsFolderId == aOldParent &&
         PlacesUtils.tagsFolderId != aNewParent)
       delete this._tagFolders[aItemId];
   },
 
-  onItemVisited: function() {},
-  onBeginUpdateBatch: function() {},
-  onEndUpdateBatch: function() {},
+  onItemVisited() {},
+  onBeginUpdateBatch() {},
+  onEndUpdateBatch() {},
 
   // nsISupports
 
   classID: Components.ID("{bbc23860-2553-479d-8b78-94d9038334f7}"),
 
   _xpcom_factory: XPCOMUtils.generateSingletonFactory(TaggingService),
 
   QueryInterface: XPCOMUtils.generateQI([
--- a/toolkit/components/places/tests/bookmarks/test_1017502-bookmarks_foreign_count.js
+++ b/toolkit/components/places/tests/bookmarks/test_1017502-bookmarks_foreign_count.js
@@ -68,17 +68,17 @@ add_task(function* maintenance_foreign_c
 
   // Adjust the foreign_count for the added entry to an incorrect value
   let deferred = Promise.defer();
   let stmt = DBConn().createAsyncStatement(
     `UPDATE moz_places SET foreign_count = 10 WHERE url_hash = hash(:t_url)
                                                 AND url = :t_url `);
   stmt.params.t_url = T_URI.spec;
   stmt.executeAsync({
-    handleCompletion: function() {
+    handleCompletion() {
       deferred.resolve();
     }
   });
   stmt.finalize();
   yield deferred.promise;
   Assert.equal((yield getForeignCountForURL(conn, T_URI)), 10);
 
   // Run maintenance
--- a/toolkit/components/places/tests/bookmarks/test_393498.js
+++ b/toolkit/components/places/tests/bookmarks/test_393498.js
@@ -2,22 +2,22 @@
 /* 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/. */
 
 var observer = {
   __proto__: NavBookmarkObserver.prototype,
 
-  onItemAdded: function(id, folder, index) {
+  onItemAdded(id, folder, index) {
     this._itemAddedId = id;
     this._itemAddedParent = folder;
     this._itemAddedIndex = index;
   },
-  onItemChanged: function(id, property, isAnnotationProperty, value) {
+  onItemChanged(id, property, isAnnotationProperty, value) {
     this._itemChangedId = id;
     this._itemChangedProperty = property;
     this._itemChanged_isAnnotationProperty = isAnnotationProperty;
     this._itemChangedValue = value;
   }
 };
 PlacesUtils.bookmarks.addObserver(observer, false);
 
--- a/toolkit/components/places/tests/bookmarks/test_405938_restore_queries.js
+++ b/toolkit/components/places/tests/bookmarks/test_405938_restore_queries.js
@@ -86,17 +86,17 @@ var test = {
     options.queryType = options.QUERY_TYPE_BOOKMARKS;
     this._queryURI3 =
       uri(PlacesUtils.history.queriesToQueryString(queries, queries.length, options));
     this._queryTitle3 = "query3";
     PlacesUtils.bookmarks.insertBookmark(this._testRootId, this._queryURI3,
                                          DEFAULT_INDEX, this._queryTitle3);
   },
 
-  clean: function() {},
+  clean() {},
 
   validate: function validate() {
     // Throw a wrench in the works by inserting some new bookmarks,
     // ensuring folder ids won't be the same, when restoring.
     for (let i = 0; i < 10; i++) {
       PlacesUtils.bookmarks.
                   insertBookmark(PlacesUtils.bookmarksMenuFolderId, uri("http://aaaa" + i), DEFAULT_INDEX, "");
     }
--- a/toolkit/components/places/tests/bookmarks/test_424958-json-quoted-folders.js
+++ b/toolkit/components/places/tests/bookmarks/test_424958-json-quoted-folders.js
@@ -18,28 +18,28 @@ var myTest = {
 this.push(myTest);
 
 */
 
 var quotesTest = {
   _folderTitle: '"quoted folder"',
   _folderId: null,
 
-  populate: function() {
+  populate() {
     this._folderId =
       PlacesUtils.bookmarks.createFolder(PlacesUtils.toolbarFolderId,
                                          this._folderTitle,
                                          PlacesUtils.bookmarks.DEFAULT_INDEX);
   },
 
-  clean: function() {
+  clean() {
     PlacesUtils.bookmarks.removeItem(this._folderId);
   },
 
-  validate: function() {
+  validate() {
     var query = PlacesUtils.history.getNewQuery();
     query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
     var result = PlacesUtils.history.executeQuery(query, PlacesUtils.history.getNewQueryOptions());
 
     var toolbar = result.root;
     toolbar.containerOpen = true;
 
     // test for our quoted folder
--- a/toolkit/components/places/tests/bookmarks/test_448584.js
+++ b/toolkit/components/places/tests/bookmarks/test_448584.js
@@ -20,35 +20,35 @@ catch (ex) {
     - don't try to add invalid uri nodes to a JSON backup
 */
 
 var invalidURITest = {
   _itemTitle: "invalid uri",
   _itemUrl: "http://test.mozilla.org/",
   _itemId: null,
 
-  populate: function() {
+  populate() {
     // add a valid bookmark
     PlacesUtils.bookmarks.insertBookmark(PlacesUtils.toolbarFolderId,
                                          PlacesUtils._uri(this._itemUrl),
                                          PlacesUtils.bookmarks.DEFAULT_INDEX,
                                          this._itemTitle);
     // this bookmark will go corrupt
     this._itemId =
       PlacesUtils.bookmarks.insertBookmark(PlacesUtils.toolbarFolderId,
                                            PlacesUtils._uri(this._itemUrl),
                                            PlacesUtils.bookmarks.DEFAULT_INDEX,
                                            this._itemTitle);
   },
 
-  clean: function() {
+  clean() {
     PlacesUtils.bookmarks.removeItem(this._itemId);
   },
 
-  validate: function(aExpectValidItemsCount) {
+  validate(aExpectValidItemsCount) {
     var query = PlacesUtils.history.getNewQuery();
     query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
     var options = PlacesUtils.history.getNewQueryOptions();
     var result = PlacesUtils.history.executeQuery(query, options);
 
     var toolbar = result.root;
     toolbar.containerOpen = true;
 
--- a/toolkit/components/places/tests/bookmarks/test_458683.js
+++ b/toolkit/components/places/tests/bookmarks/test_458683.js
@@ -23,17 +23,17 @@ catch (ex) {
 
 var invalidTagChildTest = {
   _itemTitle: "invalid uri",
   _itemUrl: "http://test.mozilla.org/",
   _itemId: -1,
   _tag: "testTag",
   _tagItemId: -1,
 
-  populate: function() {
+  populate() {
     // add a valid bookmark
     this._itemId = PlacesUtils.bookmarks
                               .insertBookmark(PlacesUtils.toolbarFolderId,
                                               PlacesUtils._uri(this._itemUrl),
                                               PlacesUtils.bookmarks.DEFAULT_INDEX,
                                               this._itemTitle);
 
     // create a tag
@@ -61,22 +61,22 @@ var invalidTagChildTest = {
     // add a separator and a folder inside tag root
     PlacesUtils.bookmarks.insertSeparator(PlacesUtils.bookmarks.tagsFolder,
                                           PlacesUtils.bookmarks.DEFAULT_INDEX);
     PlacesUtils.bookmarks.createFolder(PlacesUtils.bookmarks.tagsFolder,
                                        "test tags root folder",
                                        PlacesUtils.bookmarks.DEFAULT_INDEX);
   },
 
-  clean: function() {
+  clean() {
     PlacesUtils.tagging.untagURI(PlacesUtils._uri(this._itemUrl), [this._tag]);
     PlacesUtils.bookmarks.removeItem(this._itemId);
   },
 
-  validate: function() {
+  validate() {
     var query = PlacesUtils.history.getNewQuery();
     query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
     var options = PlacesUtils.history.getNewQueryOptions();
     var result = PlacesUtils.history.executeQuery(query, options);
 
     var toolbar = result.root;
     toolbar.containerOpen = true;
 
--- a/toolkit/components/places/tests/bookmarks/test_675416.js
+++ b/toolkit/components/places/tests/bookmarks/test_675416.js
@@ -12,17 +12,17 @@ function run_test() {
   }
 
   let observer = {
     onBeginUpdateBatch: () => forceBookmarkCaching(itemId1),
     onEndUpdateBatch: () => forceBookmarkCaching(itemId1),
     onItemAdded: forceBookmarkCaching,
     onItemChanged: forceBookmarkCaching,
     onItemMoved: forceBookmarkCaching,
-    onItemRemoved: function(id) {
+    onItemRemoved(id) {
       try {
         forceBookmarkCaching(id);
         do_throw("trying to fetch a removed bookmark should throw");
       } catch (ex) {}
     },
     onItemVisited: forceBookmarkCaching,
     QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
   };
--- a/toolkit/components/places/tests/bookmarks/test_711914.js
+++ b/toolkit/components/places/tests/bookmarks/test_711914.js
@@ -14,17 +14,17 @@ function run_test() {
   }
 
   let observer = {
     onBeginUpdateBatch: () => forceBookmarkCaching(itemId1),
     onEndUpdateBatch: () => forceBookmarkCaching(itemId1),
     onItemAdded: forceBookmarkCaching,
     onItemChanged: forceBookmarkCaching,
     onItemMoved: forceBookmarkCaching,
-    onItemRemoved: function(id) {
+    onItemRemoved(id) {
       try {
         forceBookmarkCaching(id);
         do_throw("trying to fetch a removed bookmark should throw");
       } catch (ex) {}
     },
     onItemVisited: forceBookmarkCaching,
     QueryInterface: XPCOMUtils.generateQI([Ci.nsINavBookmarkObserver])
   };
--- a/toolkit/components/places/tests/bookmarks/test_async_observers.js
+++ b/toolkit/components/places/tests/bookmarks/test_async_observers.js
@@ -13,29 +13,29 @@ 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: function()
+  setupCompletionPromise()
   {
     this.observedBookmarks = 0;
     this.deferred = Promise.defer();
     return this.deferred.promise;
   },
 
-  onBeginUpdateBatch: function() {},
-  onEndUpdateBatch: function() {},
-  onItemAdded: function() {},
-  onItemRemoved: function() {},
-  onItemMoved: function() {},
-  onItemChanged: function(aItemId, aProperty, aIsAnnotation, aNewValue,
+  onBeginUpdateBatch() {},
+  onEndUpdateBatch() {},
+  onItemAdded() {},
+  onItemRemoved() {},
+  onItemMoved() {},
+  onItemChanged(aItemId, aProperty, aIsAnnotation, aNewValue,
                           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);
@@ -50,17 +50,17 @@ var observer = {
     else {
       do_throw("Unexpected property change " + aProperty);
     }
 
     if (++this.observedBookmarks == this.bookmarks.length) {
       this.deferred.resolve();
     }
   },
-  onItemVisited: function(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();
     }
@@ -81,17 +81,17 @@ add_task(function* test_add_visit()
   let deferUpdatePlaces = Promise.defer();
   PlacesUtils.asyncHistory.updatePlaces({
     uri: NetUtil.newURI("http://book.ma.rk/"),
     visits: [{ transitionType: TRANSITION_TYPED, visitDate: NOW }]
   }, {
     handleError: function TAV_handleError() {
       deferUpdatePlaces.reject(new Error("Unexpected error in adding visit."));
     },
-    handleResult: function(aPlaceInfo) {
+    handleResult(aPlaceInfo) {
       visitId = aPlaceInfo.visits[0].visitId;
     },
     handleCompletion: function TAV_handleCompletion() {
       deferUpdatePlaces.resolve();
     }
   });
 
   // Wait for both the observer and the asynchronous update, in any order.
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks.js
+++ b/toolkit/components/places/tests/bookmarks/test_bookmarks.js
@@ -5,23 +5,23 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var bs = PlacesUtils.bookmarks;
 var hs = PlacesUtils.history;
 var anno = PlacesUtils.annotations;
 
 
 var bookmarksObserver = {
-  onBeginUpdateBatch: function() {
+  onBeginUpdateBatch() {
     this._beginUpdateBatch = true;
   },
-  onEndUpdateBatch: function() {
+  onEndUpdateBatch() {
     this._endUpdateBatch = true;
   },
-  onItemAdded: function(id, folder, index, itemType, uri, title, dateAdded,
+  onItemAdded(id, folder, index, itemType, uri, title, dateAdded,
                         guid) {
     this._itemAddedId = id;
     this._itemAddedParent = folder;
     this._itemAddedIndex = index;
     this._itemAddedURI = uri;
     this._itemAddedTitle = title;
 
     // Ensure that we've created a guid for this item.
@@ -32,36 +32,36 @@ var bookmarksObserver = {
     );
     stmt.params.item_id = id;
     do_check_true(stmt.executeStep());
     do_check_false(stmt.getIsNull(0));
     do_check_valid_places_guid(stmt.row.guid);
     do_check_eq(stmt.row.guid, guid);
     stmt.finalize();
   },
-  onItemRemoved: function(id, folder, index, itemType) {
+  onItemRemoved(id, folder, index, itemType) {
     this._itemRemovedId = id;
     this._itemRemovedFolder = folder;
     this._itemRemovedIndex = index;
   },
-  onItemChanged: function(id, property, isAnnotationProperty, value,
+  onItemChanged(id, property, isAnnotationProperty, value,
                           lastModified, itemType, parentId, guid, parentGuid,
                           oldValue) {
     this._itemChangedId = id;
     this._itemChangedProperty = property;
     this._itemChanged_isAnnotationProperty = isAnnotationProperty;
     this._itemChangedValue = value;
     this._itemChangedOldValue = oldValue;
   },
-  onItemVisited: function(id, visitID, time) {
+  onItemVisited(id, visitID, time) {
     this._itemVisitedId = id;
     this._itemVisitedVistId = visitID;
     this._itemVisitedTime = time;
   },
-  onItemMoved: function(id, oldParent, oldIndex, newParent, newIndex,
+  onItemMoved(id, oldParent, oldIndex, newParent, newIndex,
                         itemType) {
     this._itemMovedId = id
     this._itemMovedOldParent = oldParent;
     this._itemMovedOldIndex = oldIndex;
     this._itemMovedNewParent = newParent;
     this._itemMovedNewIndex = newIndex;
   },
   QueryInterface: XPCOMUtils.generateQI([
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks_insert.js
+++ b/toolkit/components/places/tests/bookmarks/test_bookmarks_insert.js
@@ -191,47 +191,47 @@ add_task(function* create_folder() {
   checkBookmarkObject(bm);
   Assert.equal(bm.parentGuid, PlacesUtils.bookmarks.unfiledGuid);
   Assert.equal(bm.dateAdded, bm.lastModified);
   Assert.equal(bm.type, PlacesUtils.bookmarks.TYPE_FOLDER);
   Assert.ok(!("title" in bm), "title should not be set");
 
   // And then create a nested folder.
   let parentGuid = bm.guid;
-  bm = yield PlacesUtils.bookmarks.insert({ parentGuid: parentGuid,
+  bm = yield PlacesUtils.bookmarks.insert({ parentGuid,
                                             type: PlacesUtils.bookmarks.TYPE_FOLDER,
                                             title: "a folder" });
   checkBookmarkObject(bm);
   Assert.equal(bm.parentGuid, parentGuid);
   Assert.equal(bm.index, 0);
   Assert.equal(bm.type, PlacesUtils.bookmarks.TYPE_FOLDER);
   Assert.strictEqual(bm.title, "a folder");
 });
 
 add_task(function* create_bookmark() {
   let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
                                                 type: PlacesUtils.bookmarks.TYPE_FOLDER });
   let parentGuid = bm.guid;
 
-  bm = yield PlacesUtils.bookmarks.insert({ parentGuid: parentGuid,
+  bm = yield PlacesUtils.bookmarks.insert({ parentGuid,
                                             type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
                                             url: "http://example.com/",
                                             title: "a bookmark" });
   checkBookmarkObject(bm);
   Assert.equal(bm.parentGuid, parentGuid);
   Assert.equal(bm.index, 0);
   Assert.equal(bm.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
   Assert.equal(bm.url.href, "http://example.com/");
   Assert.equal(bm.title, "a bookmark");
 
   // Check parent lastModified.
   let parent = yield PlacesUtils.bookmarks.fetch({ guid: bm.parentGuid });
   Assert.deepEqual(parent.lastModified, bm.dateAdded);
 
-  bm = yield PlacesUtils.bookmarks.insert({ parentGuid: parentGuid,
+  bm = yield PlacesUtils.bookmarks.insert({ parentGuid,
                                             type: PlacesUtils.bookmarks.TYPE_BOOKMARK,
                                             url: new URL("http://example.com/") });
   checkBookmarkObject(bm);
   Assert.equal(bm.parentGuid, parentGuid);
   Assert.equal(bm.index, 1);
   Assert.equal(bm.type, PlacesUtils.bookmarks.TYPE_BOOKMARK);
   Assert.equal(bm.url.href, "http://example.com/");
   Assert.ok(!("title" in bm), "title should not be set");
--- a/toolkit/components/places/tests/bookmarks/test_bookmarks_notifications.js
+++ b/toolkit/components/places/tests/bookmarks/test_bookmarks_notifications.js
@@ -504,17 +504,17 @@ function expectNotifications() {
         return (...origArgs) => {
           let args = Array.from(origArgs, arg => {
             if (arg && arg instanceof Ci.nsIURI)
               return new URL(arg.spec);
             if (arg && typeof(arg) == "number" && arg >= Date.now() * 1000)
               return new Date(parseInt(arg / 1000));
             return arg;
           });
-          notifications.push({ name: name, arguments: args });
+          notifications.push({ name, arguments: args });
         }
       }
 
       if (name in target)
         return target[name];
       return undefined;
     }
   });
--- a/toolkit/components/places/tests/bookmarks/test_keywords.js
+++ b/toolkit/components/places/tests/bookmarks/test_keywords.js
@@ -49,17 +49,17 @@ function expectNotifications() {
             return;
           let args = Array.from(arguments, arg => {
             if (arg && arg instanceof Ci.nsIURI)
               return new URL(arg.spec);
             if (arg && typeof(arg) == "number" && arg >= Date.now() * 1000)
               return new Date(parseInt(arg / 1000));
             return arg;
           });
-          notifications.push({ name: name, arguments: args });
+          notifications.push({ name, arguments: args });
         }
       }
 
       return target[name];
     }
   });
   PlacesUtils.bookmarks.addObserver(observer, false);
   return observer;
--- a/toolkit/components/places/tests/bookmarks/test_nsINavBookmarkObserver.js
+++ b/toolkit/components/places/tests/bookmarks/test_nsINavBookmarkObserver.js
@@ -8,17 +8,17 @@ const GUID_RE = /^[a-zA-Z0-9\-_]{12}$/;
 
 var gBookmarksObserver = {
   expected: [],
   setup(expected) {
     this.expected = expected;
     this.deferred = PromiseUtils.defer();
     return this.deferred.promise;
   },
-  validate: function(aMethodName, aArguments) {
+  validate(aMethodName, aArguments) {
     do_check_eq(this.expected[0].name, aMethodName);
 
     let args = this.expected.shift().args;
     do_check_eq(aArguments.length, args.length);
     for (let i = 0; i < aArguments.length; i++) {
       do_check_true(args[i].check(aArguments[i]), aMethodName + "(args[" + i + "]: " + args[i].name + ")");
     }
 
@@ -59,17 +59,17 @@ var gBookmarkSkipObserver = {
   skipDescendantsOnItemRemoval: true,
 
   expected: null,
   setup(expected) {
     this.expected = expected;
     this.deferred = PromiseUtils.defer();
     return this.deferred.promise;
   },
-  validate: function(aMethodName) {
+  validate(aMethodName) {
     do_check_eq(this.expected.shift(), aMethodName);
     if (this.expected.length === 0) {
       this.deferred.resolve();
     }
   },
 
   // nsINavBookmarkObserver
   onBeginUpdateBatch() {
@@ -111,17 +111,17 @@ add_task(function* batch() {
        args: [] },
       { name: "onEndUpdateBatch",
        args: [] },
     ]),
     gBookmarkSkipObserver.setup([
       "onBeginUpdateBatch", "onEndUpdateBatch"
   ])]);
   PlacesUtils.bookmarks.runInBatchMode({
-    runBatched: function() {
+    runBatched() {
       // Nothing.
     }
   }, null);
   yield promise;
 });
 
 add_task(function* onItemAdded_bookmark() {
   const TITLE = "Bookmark 1";
@@ -375,17 +375,17 @@ add_task(function* onItemMoved_bookmark(
           { name: "time", check: v => typeof(v) == "number" && v > 0 },
           { name: "transitionType", check: v => v === PlacesUtils.history.TRANSITION_TYPED },
           { name: "uri", check: v => v instanceof Ci.nsIURI && v.equals(uri) },
           { name: "parentId", check: v => v === PlacesUtils.unfiledBookmarksFolderId },
           { name: "guid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
           { name: "parentGuid", check: v => typeof(v) == "string" && GUID_RE.test(v) },
         ] },
   ])]);
-  PlacesTestUtils.addVisits({ uri: uri, transition: TRANSITION_TYPED });
+  PlacesTestUtils.addVisits({ uri, transition: TRANSITION_TYPED });
   yield promise;
 });
 
 add_task(function* onItemRemoved_bookmark() {
   let id = PlacesUtils.bookmarks.getIdForItemAt(PlacesUtils.unfiledBookmarksFolderId, 0);
   let uri = PlacesUtils.bookmarks.getBookmarkURI(id);
   let promise = Promise.all([
     gBookmarkSkipObserver.setup([
--- a/toolkit/components/places/tests/browser/browser_bug399606.js
+++ b/toolkit/components/places/tests/browser/browser_bug399606.js
@@ -16,31 +16,31 @@ function test() {
     "http://example.com/tests/toolkit/components/places/tests/browser/399606-window.location.html",
   ];
   var hs = Cc["@mozilla.org/browser/nav-history-service;1"].
            getService(Ci.nsINavHistoryService);
 
   // Create and add history observer.
   var historyObserver = {
     visitCount: Array(),
-    onBeginUpdateBatch: function() {},
-    onEndUpdateBatch: function() {},
-    onVisit: function(aURI, aVisitID, aTime, aSessionID, aReferringID,
+    onBeginUpdateBatch() {},
+    onEndUpdateBatch() {},
+    onVisit(aURI, aVisitID, aTime, aSessionID, aReferringID,
                       aTransitionType) {
       info("Received onVisit: " + aURI.spec);
       if (aURI.spec in this.visitCount)
         this.visitCount[aURI.spec]++;
       else
         this.visitCount[aURI.spec] = 1;
     },
-    onTitleChanged: function() {},
-    onDeleteURI: function() {},
-    onClearHistory: function() {},
-    onPageChanged: function() {},
-    onDeleteVisits: function() {},
+    onTitleChanged() {},
+    onDeleteURI() {},
+    onClearHistory() {},
+    onPageChanged() {},
+    onDeleteVisits() {},
     QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
   };
   hs.addObserver(historyObserver, false);
 
   function confirm_results() {
     gBrowser.removeCurrentTab();
     hs.removeObserver(historyObserver, false);
     for (let aURI in historyObserver.visitCount) {
--- a/toolkit/components/places/tests/browser/browser_bug646422.js
+++ b/toolkit/components/places/tests/browser/browser_bug646422.js
@@ -7,32 +7,32 @@
  * history.pushState, the history service has a title stored for the new URI.
  **/
 
 add_task(function* () {
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, 'http://example.com');
 
   let newTitlePromise = new Promise(resolve => {
     let observer = {
-      onTitleChanged: function(uri, title) {
+      onTitleChanged(uri, title) {
         // If the uri of the page whose title is changing ends with 'new_page',
         // then it's the result of our pushState.
         if (/new_page$/.test(uri.spec)) {
           resolve(title);
           PlacesUtils.history.removeObserver(observer);
         }
       },
 
-      onBeginUpdateBatch: function() { },
-      onEndUpdateBatch: function() { },
-      onVisit: function() { },
-      onDeleteURI: function() { },
-      onClearHistory: function() { },
-      onPageChanged: function() { },
-      onDeleteVisits: function() { },
+      onBeginUpdateBatch() { },
+      onEndUpdateBatch() { },
+      onVisit() { },
+      onDeleteURI() { },
+      onClearHistory() { },
+      onPageChanged() { },
+      onDeleteVisits() { },
       QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
     };
 
     PlacesUtils.history.addObserver(observer, false);
   });
 
   yield ContentTask.spawn(tab.linkedBrowser, null, function* () {
     let title =  content.document.title;
--- a/toolkit/components/places/tests/browser/browser_double_redirect.js
+++ b/toolkit/components/places/tests/browser/browser_double_redirect.js
@@ -9,17 +9,17 @@ add_task(function* () {
   const TEST_URI = NetUtil.newURI(BASE_URL + "begin.html");
   const FIRST_REDIRECTING_URI = NetUtil.newURI(BASE_URL + "redirect_twice.sjs");
   const FINAL_URI = NetUtil.newURI(BASE_URL + "final.html");
 
   let promiseVisits = new Promise(resolve => {
     PlacesUtils.history.addObserver({
       __proto__: NavHistoryObserver.prototype,
       _notified: [],
-      onVisit: function(uri, id, time, sessionId, referrerId, transition) {
+      onVisit(uri, id, time, sessionId, referrerId, transition) {
         info("Received onVisit: " + uri.spec);
         this._notified.push(uri);
 
         if (!uri.equals(FINAL_URI)) {
           return;
         }
 
         is(this._notified.length, 4);
--- a/toolkit/components/places/tests/browser/browser_notfound.js
+++ b/toolkit/components/places/tests/browser/browser_notfound.js
@@ -6,38 +6,38 @@ add_task(function* () {
   const TEST_URL = "http://mochi.test:8888/notFoundPage.html";
 
   // Used to verify errors are not marked as typed.
   PlacesUtils.history.markPageAsTyped(NetUtil.newURI(TEST_URL));
 
   // Create and add history observer.
   let visitedPromise = new Promise(resolve => {
     let historyObserver = {
-      onVisit: function(aURI, aVisitID, aTime, aSessionID, aReferringID,
+      onVisit(aURI, aVisitID, aTime, aSessionID, aReferringID,
                         aTransitionType) {
         PlacesUtils.history.removeObserver(historyObserver);
         info("Received onVisit: " + aURI.spec);
         fieldForUrl(aURI, "frecency", function(aFrecency) {
           is(aFrecency, 0, "Frecency should be 0");
           fieldForUrl(aURI, "hidden", function(aHidden) {
             is(aHidden, 0, "Page should not be hidden");
             fieldForUrl(aURI, "typed", function(aTyped) {
               is(aTyped, 0, "page should not be marked as typed");
               resolve();
             });
           });
         });
       },
-      onBeginUpdateBatch: function() {},
-      onEndUpdateBatch: function() {},
-      onTitleChanged: function() {},
-      onDeleteURI: function() {},
-      onClearHistory: function() {},
-      onPageChanged: function() {},
-      onDeleteVisits: function() {},
+      onBeginUpdateBatch() {},
+      onEndUpdateBatch() {},
+      onTitleChanged() {},
+      onDeleteURI() {},
+      onClearHistory() {},
+      onPageChanged() {},
+      onDeleteVisits() {},
       QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
     };
     PlacesUtils.history.addObserver(historyObserver, false);
   });
 
   let newTabPromise = BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_URL);
   yield Promise.all([visitedPromise, newTabPromise]);
 
--- a/toolkit/components/places/tests/browser/browser_redirect.js
+++ b/toolkit/components/places/tests/browser/browser_redirect.js
@@ -5,17 +5,17 @@
 add_task(function* () {
   const REDIRECT_URI = NetUtil.newURI("http://mochi.test:8888/tests/toolkit/components/places/tests/browser/redirect.sjs");
   const TARGET_URI = NetUtil.newURI("http://mochi.test:8888/tests/toolkit/components/places/tests/browser/redirect-target.html");
 
   // Create and add history observer.
   let visitedPromise = new Promise(resolve => {
     let historyObserver = {
       _redirectNotified: false,
-      onVisit: function(aURI, aVisitID, aTime, aSessionID, aReferringID,
+      onVisit(aURI, aVisitID, aTime, aSessionID, aReferringID,
                         aTransitionType) {
         info("Received onVisit: " + aURI.spec);
 
         if (aURI.equals(REDIRECT_URI)) {
           this._redirectNotified = true;
           // Wait for the target page notification.
           return;
         }
@@ -36,23 +36,23 @@ add_task(function* () {
               fieldForUrl(TARGET_URI, "hidden", function(aHidden2) {
                 is(aHidden2, 0, "The target page should not be hidden");
                 resolve();
               });
             });
           });
         });
       },
-      onBeginUpdateBatch: function() {},
-      onEndUpdateBatch: function() {},
-      onTitleChanged: function() {},
-      onDeleteURI: function() {},
-      onClearHistory: function() {},
-      onPageChanged: function() {},
-      onDeleteVisits: function() {},
+      onBeginUpdateBatch() {},
+      onEndUpdateBatch() {},
+      onTitleChanged() {},
+      onDeleteURI() {},
+      onClearHistory() {},
+      onPageChanged() {},
+      onDeleteVisits() {},
       QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
     };
     PlacesUtils.history.addObserver(historyObserver, false);
   });
 
   let newTabPromise = BrowserTestUtils.openNewForegroundTab(gBrowser, REDIRECT_URI.spec);
   yield Promise.all([visitedPromise, newTabPromise]);
 
--- a/toolkit/components/places/tests/browser/browser_settitle.js
+++ b/toolkit/components/places/tests/browser/browser_settitle.js
@@ -21,37 +21,37 @@ 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: function() {},
-      onEndUpdateBatch: function() {},
-      onVisit: function(aURI, aVisitID, aTime, aSessionID, aReferringID,
+      onBeginUpdateBatch() {},
+      onEndUpdateBatch() {},
+      onVisit(aURI, aVisitID, aTime, aSessionID, aReferringID,
                         aTransitionType) {
       },
-      onTitleChanged: function(aURI, aPageTitle, aGUID) {
+      onTitleChanged(aURI, aPageTitle, aGUID) {
         this.data.push({ uri: aURI, title: aPageTitle, guid: aGUID });
 
         // We only expect one title change.
         //
         // Although we are loading two different pages, the first page does not
         // have a title.  Since the title starts out as empty and then is set
         // to empty, there is no title change notification.
 
         PlacesUtils.history.removeObserver(this);
         resolve(this.data);
       },
-      onDeleteURI: function() {},
-      onClearHistory: function() {},
-      onPageChanged: function() {},
-      onDeleteVisits: function() {},
+      onDeleteURI() {},
+      onClearHistory() {},
+      onPageChanged() {},
+      onDeleteVisits() {},
       QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
     };
     PlacesUtils.history.addObserver(historyObserver, false);
   });
 
   const url1 = "http://example.com/tests/toolkit/components/places/tests/browser/title1.html";
   yield BrowserTestUtils.openNewForegroundTab(gBrowser, url1);
 
--- a/toolkit/components/places/tests/browser/browser_visited_notfound.js
+++ b/toolkit/components/places/tests/browser/browser_visited_notfound.js
@@ -26,17 +26,17 @@ function test() {
 function continueTest(aOldFrecency) {
   // Used to verify errors are not marked as typed.
   PlacesUtils.history.markPageAsTyped(TEST_URI);
   gBrowser.selectedBrowser.loadURI(TEST_URI.spec);
 
   // Create and add history observer.
   let historyObserver = {
     __proto__: NavHistoryObserver.prototype,
-    onVisit: function(aURI, aVisitID, aTime, aSessionID, aReferringID,
+    onVisit(aURI, aVisitID, aTime, aSessionID, aReferringID,
                       aTransitionType) {
       PlacesUtils.history.removeObserver(historyObserver);
       info("Received onVisit: " + aURI.spec);
       fieldForUrl(aURI, "frecency", function(aFrecency) {
         is(aFrecency, aOldFrecency, "Frecency should be unchanged");
         fieldForUrl(aURI, "hidden", function(aHidden) {
           is(aHidden, 0, "Page should not be hidden");
           fieldForUrl(aURI, "typed", function(aTyped) {
--- a/toolkit/components/places/tests/browser/browser_visituri_privatebrowsing_perwindowpb.js
+++ b/toolkit/components/places/tests/browser/browser_visituri_privatebrowsing_perwindowpb.js
@@ -12,17 +12,17 @@ function test() {
     "http://example.com/tests/toolkit/components/places/tests/browser/final.html";
   let observer = null;
   let enumerator = null;
   let currentObserver = null;
   let uri = null;
 
   function doTest(aIsPrivateMode, aWindow, aTestURI, aCallback) {
     observer = {
-      observe: function(aSubject, aTopic, aData) {
+      observe(aSubject, aTopic, aData) {
         // The uri-visit-saved topic should only work when on normal mode.
         if (aTopic == "uri-visit-saved") {
           // Remove the observers set on per window private mode and normal
           // mode.
           enumerator = aWindow.Services.obs.enumerateObservers("uri-visit-saved");
           while (enumerator.hasMoreElements()) {
             currentObserver = enumerator.getNext();
             aWindow.Services.obs.removeObserver(currentObserver, "uri-visit-saved");
--- a/toolkit/components/places/tests/browser/head.js
+++ b/toolkit/components/places/tests/browser/head.js
@@ -28,47 +28,47 @@ function fieldForUrl(aURI, aFieldName, a
   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,
-    handleResult: function(aResultSet) {
+    handleResult(aResultSet) {
       let row = aResultSet.getNextRow();
       if (!row)
         ok(false, "The page should exist in the database");
       this._value = row.getResultByName(aFieldName);
     },
-    handleError: function() {},
-    handleCompletion: function(aReason) {
+    handleError() {},
+    handleCompletion(aReason) {
       if (aReason != Ci.mozIStorageStatementCallback.REASON_FINISHED)
          ok(false, "The statement should properly succeed");
       aCallback(this._value);
     }
   });
   stmt.finalize();
 }
 
 /**
  * Generic nsINavHistoryObserver that doesn't implement anything, but provides
  * dummy methods to prevent errors about an object not having a certain method.
  */
 function NavHistoryObserver() {}
 
 NavHistoryObserver.prototype = {
-  onBeginUpdateBatch: function() {},
-  onEndUpdateBatch: function() {},
-  onVisit: function() {},
-  onTitleChanged: function() {},
-  onDeleteURI: function() {},
-  onClearHistory: function() {},
-  onPageChanged: function() {},
-  onDeleteVisits: function() {},
+  onBeginUpdateBatch() {},
+  onEndUpdateBatch() {},
+  onVisit() {},
+  onTitleChanged() {},
+  onDeleteURI() {},
+  onClearHistory() {},
+  onPageChanged() {},
+  onDeleteVisits() {},
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsINavHistoryObserver,
   ])
 };
 
 /**
  * Waits for the first OnPageChanged notification for ATTRIBUTE_FAVICON, and
  * verifies that it matches the expected page URI and associated favicon URI.
@@ -150,17 +150,17 @@ function addVisits(aPlaceInfo, aWindow, 
   }
 
   aWindow.PlacesUtils.asyncHistory.updatePlaces(
     places,
     {
       handleError: function AAV_handleError() {
         throw ("Unexpected error in adding visit.");
       },
-      handleResult: function() {},
+      handleResult() {},
       handleCompletion: function UP_handleCompletion() {
         if (aCallback)
           aCallback();
       }
     }
   );
 }
 
--- a/toolkit/components/places/tests/expiration/test_analyze_runs.js
+++ b/toolkit/components/places/tests/expiration/test_analyze_runs.js
@@ -64,17 +64,17 @@ add_task(function* init_tests() {
   let thing = {
     QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput,
                                            Ci.nsIAutoCompletePopup,
                                            Ci.nsIAutoCompleteController]),
     get popup() { return thing; },
     get controller() { return thing; },
     popupOpen: true,
     selectedIndex: 0,
-    getValueAt: function() { return TEST_URI.spec; },
+    getValueAt() { return TEST_URI.spec; },
     searchString: TEST_TITLE,
   };
   Services.obs.notifyObservers(thing, TOPIC_AUTOCOMPLETE_FEEDBACK_INCOMING,
                                null);
 });
 
 add_task(function* test_timed() {
   clearAnalyzeData();
--- a/toolkit/components/places/tests/expiration/test_annos_expire_session.js
+++ b/toolkit/components/places/tests/expiration/test_annos_expire_session.js
@@ -58,26 +58,26 @@ add_task(function* test_annos_expire_ses
     let stmt = DBConn(true).createAsyncStatement(
       `SELECT id FROM moz_annos
        UNION ALL
        SELECT id FROM moz_items_annos
        WHERE expiration = :expiration`
     );
     stmt.params.expiration = as.EXPIRE_SESSION;
     stmt.executeAsync({
-      handleResult: function(aResultSet) {
+      handleResult(aResultSet) {
         dump_table("moz_annos");
         dump_table("moz_items_annos");
         do_throw("Should not find any leftover session annotations");
       },
-      handleError: function(aError) {
+      handleError(aError) {
         do_throw("Error code " + aError.result + " with message '" +
                  aError.message + "' returned.");
       },
-      handleCompletion: function(aReason) {
+      handleCompletion(aReason) {
         do_check_eq(aReason, Ci.mozIStorageStatementCallback.REASON_FINISHED);
         deferred.resolve();
       }
     });
     stmt.finalize();
   });
   yield deferred.promise;
 });
--- a/toolkit/components/places/tests/expiration/test_notifications.js
+++ b/toolkit/components/places/tests/expiration/test_notifications.js
@@ -10,17 +10,17 @@
  * Ensure that History (through category cache) notifies us just once.
  */
 
 var os = Cc["@mozilla.org/observer-service;1"].
          getService(Ci.nsIObserverService);
 
 var gObserver = {
   notifications: 0,
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     this.notifications++;
   }
 };
 os.addObserver(gObserver, PlacesUtils.TOPIC_EXPIRATION_FINISHED, false);
 
 function run_test() {
   // Set interval to a large value so we don't expire on it.
   setInterval(3600); // 1h
--- a/toolkit/components/places/tests/expiration/test_notifications_onDeleteURI.js
+++ b/toolkit/components/places/tests/expiration/test_notifications_onDeleteURI.js
@@ -75,28 +75,28 @@ add_task(function* test_notifications_on
       });
       currentTest.bookmarks.push(page);
     }
 
     // Observe history.
     let historyObserver = {
       onBeginUpdateBatch: function PEX_onBeginUpdateBatch() {},
       onEndUpdateBatch: function PEX_onEndUpdateBatch() {},
-      onClearHistory: function() {},
-      onVisit: function() {},
-      onTitleChanged: function() {},
-      onDeleteURI: function(aURI, aGUID, aReason) {
+      onClearHistory() {},
+      onVisit() {},
+      onTitleChanged() {},
+      onDeleteURI(aURI, aGUID, aReason) {
         currentTest.receivedNotifications++;
         // Check this uri was not bookmarked.
         do_check_eq(currentTest.bookmarks.indexOf(aURI.spec), -1);
         do_check_valid_places_guid(aGUID);
         do_check_eq(aReason, Ci.nsINavHistoryObserver.REASON_EXPIRED);
       },
-      onPageChanged: function() {},
-      onDeleteVisits: function(aURI, aTime) { },
+      onPageChanged() {},
+      onDeleteVisits(aURI, aTime) { },
     };
     hs.addObserver(historyObserver, false);
 
     // Expire now.
     yield promiseForceExpirationStep(-1);
 
     hs.removeObserver(historyObserver, false);
 
--- a/toolkit/components/places/tests/expiration/test_notifications_onDeleteVisits.js
+++ b/toolkit/components/places/tests/expiration/test_notifications_onDeleteVisits.js
@@ -100,27 +100,27 @@ add_task(function* test_notifications_on
       });
       currentTest.bookmarks.push(page);
     }
 
     // Observe history.
     let historyObserver = {
       onBeginUpdateBatch: function PEX_onBeginUpdateBatch() {},
       onEndUpdateBatch: function PEX_onEndUpdateBatch() {},
-      onClearHistory: function() {},
-      onVisit: function() {},
-      onTitleChanged: function() {},
-      onDeleteURI: function(aURI, aGUID, aReason) {
+      onClearHistory() {},
+      onVisit() {},
+      onTitleChanged() {},
+      onDeleteURI(aURI, aGUID, aReason) {
         // Check this uri was not bookmarked.
         do_check_eq(currentTest.bookmarks.indexOf(aURI.spec), -1);
         do_check_valid_places_guid(aGUID);
         do_check_eq(aReason, Ci.nsINavHistoryObserver.REASON_EXPIRED);
       },
-      onPageChanged: function() {},
-      onDeleteVisits: function(aURI, aTime, aGUID, aReason) {
+      onPageChanged() {},
+      onDeleteVisits(aURI, aTime, aGUID, aReason) {
         currentTest.receivedNotifications++;
         do_check_guid_for_uri(aURI, aGUID);
         do_check_eq(aReason, Ci.nsINavHistoryObserver.REASON_EXPIRED);
       },
     };
     hs.addObserver(historyObserver, false);
 
     // Expire now.
--- a/toolkit/components/places/tests/expiration/test_outdated_analyze.js
+++ b/toolkit/components/places/tests/expiration/test_outdated_analyze.js
@@ -50,23 +50,23 @@ function run_test() {
 
     // 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')"
     );
     stmt.executeAsync({
-      handleResult: function(aResultSet) {
+      handleResult(aResultSet) {
         let row = aResultSet.getNextRow();
         this._difference = row.getResultByIndex(0);
       },
-      handleError: function(aError) {
+      handleError(aError) {
         do_throw("Unexpected error (" + aError.result + "): " + aError.message);
       },
-      handleCompletion: function(aReason) {
+      handleCompletion(aReason) {
         do_check_true(this._difference === 0);
         do_test_finished();
       }
     });
     stmt.finalize();
   }, PlacesUtils.TOPIC_EXPIRATION_FINISHED, false);
 }
--- a/toolkit/components/places/tests/expiration/test_pref_maxpages.js
+++ b/toolkit/components/places/tests/expiration/test_pref_maxpages.js
@@ -86,25 +86,25 @@ add_task(function* test_pref_maxpages() 
       let page = "http://" + testIndex + "." + i + ".mozilla.org/";
       yield PlacesTestUtils.addVisits({ uri: uri(page), visitDate: now++ });
     }
 
     // Observe history.
     let historyObserver = {
       onBeginUpdateBatch: function PEX_onBeginUpdateBatch() {},
       onEndUpdateBatch: function PEX_onEndUpdateBatch() {},
-      onClearHistory: function() {},
-      onVisit: function() {},
-      onTitleChanged: function() {},
-      onDeleteURI: function(aURI) {
+      onClearHistory() {},
+      onVisit() {},
+      onTitleChanged() {},
+      onDeleteURI(aURI) {
         print("onDeleteURI " + aURI.spec);
         currentTest.receivedNotifications++;
       },
-      onPageChanged: function() {},
-      onDeleteVisits: function(aURI, aTime) {
+      onPageChanged() {},
+      onDeleteVisits(aURI, aTime) {
         print("onDeleteVisits " + aURI.spec + " " + aTime);
       },
     };
     hs.addObserver(historyObserver, false);
 
     setMaxPages(currentTest.maxPages);
 
     // Expire now.
--- 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
@@ -18,34 +18,34 @@ const moz_anno_favicon_prefix = "moz-ann
 // streamListener
 
 function streamListener(aExpectedContentType)
 {
   this._expectedContentType = aExpectedContentType;
 }
 streamListener.prototype =
 {
-  onStartRequest: function(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: function()
+  onStopRequest()
   {
     do_check_true(this._checked);
     do_test_finished();
   },
-  onDataAvailable: function(aRequest, aContext, aInputStream, aOffset, aCount)
+  onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount)
   {
     aRequest.cancel(Cr.NS_ERROR_ABORT);
   }
 };
 
 // Test Runner
 
 function run_test()
--- a/toolkit/components/places/tests/head_common.js
+++ b/toolkit/components/places/tests/head_common.js
@@ -743,72 +743,72 @@ function do_compare_arrays(a1, a2, sorte
 
 /**
  * Generic nsINavBookmarkObserver that doesn't implement anything, but provides
  * dummy methods to prevent errors about an object not having a certain method.
  */
 function NavBookmarkObserver() {}
 
 NavBookmarkObserver.prototype = {
-  onBeginUpdateBatch: function() {},
-  onEndUpdateBatch: function() {},
-  onItemAdded: function() {},
-  onItemRemoved: function() {},
-  onItemChanged: function() {},
-  onItemVisited: function() {},
-  onItemMoved: function() {},
+  onBeginUpdateBatch() {},
+  onEndUpdateBatch() {},
+  onItemAdded() {},
+  onItemRemoved() {},
+  onItemChanged() {},
+  onItemVisited() {},
+  onItemMoved() {},
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsINavBookmarkObserver,
   ])
 };
 
 /**
  * Generic nsINavHistoryObserver that doesn't implement anything, but provides
  * dummy methods to prevent errors about an object not having a certain method.
  */
 function NavHistoryObserver() {}
 
 NavHistoryObserver.prototype = {
-  onBeginUpdateBatch: function() {},
-  onEndUpdateBatch: function() {},
-  onVisit: function() {},
-  onTitleChanged: function() {},
-  onDeleteURI: function() {},
-  onClearHistory: function() {},
-  onPageChanged: function() {},
-  onDeleteVisits: function() {},
+  onBeginUpdateBatch() {},
+  onEndUpdateBatch() {},
+  onVisit() {},
+  onTitleChanged() {},
+  onDeleteURI() {},
+  onClearHistory() {},
+  onPageChanged() {},
+  onDeleteVisits() {},
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsINavHistoryObserver,
   ])
 };
 
 /**
  * Generic nsINavHistoryResultObserver that doesn't implement anything, but
  * provides dummy methods to prevent errors about an object not having a certain
  * method.
  */
 function NavHistoryResultObserver() {}
 
 NavHistoryResultObserver.prototype = {
-  batching: function() {},
-  containerStateChanged: function() {},
-  invalidateContainer: function() {},
-  nodeAnnotationChanged: function() {},
-  nodeDateAddedChanged: function() {},
-  nodeHistoryDetailsChanged: function() {},
-  nodeIconChanged: function() {},
-  nodeInserted: function() {},
-  nodeKeywordChanged: function() {},
-  nodeLastModifiedChanged: function() {},
-  nodeMoved: function() {},
-  nodeRemoved: function() {},
-  nodeTagsChanged: function() {},
-  nodeTitleChanged: function() {},
-  nodeURIChanged: function() {},
-  sortingChanged: function() {},
+  batching() {},
+  containerStateChanged() {},
+  invalidateContainer() {},
+  nodeAnnotationChanged() {},
+  nodeDateAddedChanged() {},
+  nodeHistoryDetailsChanged() {},
+  nodeIconChanged() {},
+  nodeInserted() {},
+  nodeKeywordChanged() {},
+  nodeLastModifiedChanged() {},
+  nodeMoved() {},
+  nodeRemoved() {},
+  nodeTagsChanged() {},
+  nodeTitleChanged() {},
+  nodeURIChanged() {},
+  sortingChanged() {},
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsINavHistoryResultObserver,
   ])
 };
 
 /**
  * Asynchronously check a url is visited.
  *
--- a/toolkit/components/places/tests/history/test_insert.js
+++ b/toolkit/components/places/tests/history/test_insert.js
@@ -103,17 +103,17 @@ add_task(function* test_history_insert()
     do_print(`filter: ${filter}, referrer: ${referrer}, date: ${date}, transition: ${transition}`);
 
     let uri = NetUtil.newURI(TEST_URL + Math.random());
     let title = "Visit " + Math.random();
 
     let pageInfo = {
       title,
       visits: [
-        {transition: transition, referrer: referrer, date: date, }
+        {transition, referrer, date, }
       ]
     };
 
     pageInfo.url = yield filter(uri);
 
     let result = yield PlacesUtils.history.insert(pageInfo);
 
     Assert.ok(PlacesUtils.isValidGuid(result.guid), "guid for pageInfo object is valid");
--- a/toolkit/components/places/tests/history/test_remove.js
+++ b/toolkit/components/places/tests/history/test_remove.js
@@ -20,71 +20,71 @@ add_task(function* test_remove_single() 
 
   let remover = Task.async(function*(name, filter, options) {
     do_print(name);
     do_print(JSON.stringify(options));
     do_print("Setting up visit");
 
     let uri = NetUtil.newURI("http://mozilla.com/test_browserhistory/test_remove/" + Math.random());
     let title = "Visit " + Math.random();
-    yield PlacesTestUtils.addVisits({uri: uri, title: title});
+    yield PlacesTestUtils.addVisits({uri, title});
     Assert.ok(visits_in_database(uri), "History entry created");
 
     let removeArg = yield filter(uri);
 
     if (options.addBookmark) {
       PlacesUtils.bookmarks.insertBookmark(
         PlacesUtils.unfiledBookmarksFolderId,
         uri,
         PlacesUtils.bookmarks.DEFAULT_INDEX,
         "test bookmark");
     }
 
     let shouldRemove = !options.addBookmark;
     let observer;
     let promiseObserved = new Promise((resolve, reject) => {
       observer = {
-        onBeginUpdateBatch: function() {},
-        onEndUpdateBatch: function() {},
-        onVisit: function(aUri) {
+        onBeginUpdateBatch() {},
+        onEndUpdateBatch() {},
+        onVisit(aUri) {
           reject(new Error("Unexpected call to onVisit " + aUri.spec));
         },
-        onTitleChanged: function(aUri) {
+        onTitleChanged(aUri) {
           reject(new Error("Unexpected call to onTitleChanged " + aUri.spec));
         },
-        onClearHistory: function() {
+        onClearHistory() {
           reject("Unexpected call to onClearHistory");
         },
-        onPageChanged: function(aUri) {
+        onPageChanged(aUri) {
           reject(new Error("Unexpected call to onPageChanged " + aUri.spec));
         },
-        onFrecencyChanged: function(aURI) {
+        onFrecencyChanged(aURI) {
           try {
             Assert.ok(!shouldRemove, "Observing onFrecencyChanged");
             Assert.equal(aURI.spec, uri.spec, "Observing effect on the right uri");
           } finally {
             resolve();
           }
         },
-        onManyFrecenciesChanged: function() {
+        onManyFrecenciesChanged() {
           try {
             Assert.ok(!shouldRemove, "Observing onManyFrecenciesChanged");
           } finally {
             resolve();
           }
         },
-        onDeleteURI: function(aURI) {
+        onDeleteURI(aURI) {
           try {
             Assert.ok(shouldRemove, "Observing onDeleteURI");
             Assert.equal(aURI.spec, uri.spec, "Observing effect on the right uri");
           } finally {
             resolve();
           }
         },
-        onDeleteVisits: function(aURI) {
+        onDeleteVisits(aURI) {
           Assert.equal(aURI.spec, uri.spec, "Observing onDeleteVisits on the right uri");
         }
       };
     });
     PlacesUtils.history.addObserver(observer, false);
 
     do_print("Performing removal");
     let removed = false;
@@ -116,17 +116,17 @@ add_task(function* test_remove_single() 
       Assert.ok(!removed, "The page was not removed, as there was a bookmark");
       Assert.notEqual(page_in_database(uri), 0, "The page is still present");
     }
   });
 
   try {
     for (let useCallback of [false, true]) {
       for (let addBookmark of [false, true]) {
-        let options = { useCallback: useCallback, addBookmark: addBookmark };
+        let options = { useCallback, addBookmark };
         yield remover("Testing History.remove() with a single URI", x => x, options);
         yield remover("Testing History.remove() with a single string url", x => x.spec, options);
         yield remover("Testing History.remove() with a single string guid", x => do_get_guid_for_uri(x), options);
         yield remover("Testing History.remove() with a single URI in an array", x => [x], options);
         yield remover("Testing History.remove() with a single string url in an array", x => [x.spec], options);
         yield remover("Testing History.remove() with a single string guid in an array", x => [do_get_guid_for_uri(x)], options);
       }
     }
@@ -150,19 +150,19 @@ add_task(function* test_remove_many() {
 
   do_print("Generating samples");
   let pages = [];
   for (let i = 0; i < SIZE; ++i) {
     let uri = NetUtil.newURI("http://mozilla.com/test_browserhistory/test_remove?sample=" + i + "&salt=" + Math.random());
     let title = "Visit " + i + ", " + Math.random();
     let hasBookmark = i % 3 == 0;
     let page = {
-      uri: uri,
-      title: title,
-      hasBookmark: hasBookmark,
+      uri,
+      title,
+      hasBookmark,
       // `true` once `onResult` has been called for this page
       onResultCalled: false,
       // `true` once `onDeleteVisits` has been called for this page
       onDeleteVisitsCalled: false,
       // `true` once `onFrecencyChangedCalled` has been called for this page
       onFrecencyChangedCalled: false,
       // `true` once `onDeleteURI` has been called for this page
       onDeleteURICalled: false,
@@ -196,48 +196,48 @@ add_task(function* test_remove_many() {
       keys.push("http://example.org/dangling/stringuri/" + i);
     } else {
       keys.push(pages[i].guid);
       keys.push(("guid_" + i + "_01234567890").substr(0, 12));
     }
   }
 
   let observer = {
-    onBeginUpdateBatch: function() {},
-    onEndUpdateBatch: function() {},
-    onVisit: function(aURI) {
+    onBeginUpdateBatch() {},
+    onEndUpdateBatch() {},
+    onVisit(aURI) {
       Assert.ok(false, "Unexpected call to onVisit " + aURI.spec);
     },
-    onTitleChanged: function(aURI) {
+    onTitleChanged(aURI) {
       Assert.ok(false, "Unexpected call to onTitleChanged " + aURI.spec);
     },
-    onClearHistory: function() {
+    onClearHistory() {
       Assert.ok(false, "Unexpected call to onClearHistory");
     },
-    onPageChanged: function(aURI) {
+    onPageChanged(aURI) {
       Assert.ok(false, "Unexpected call to onPageChanged " + aURI.spec);
     },
-    onFrecencyChanged: function(aURI) {
+    onFrecencyChanged(aURI) {
       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: function() {
+    onManyFrecenciesChanged() {
       Assert.ok(false, "Observing onManyFrecenciesChanges, this is most likely correct but not covered by this test");
     },
-    onDeleteURI: function(aURI) {
+    onDeleteURI(aURI) {
       let origin = pages.find(x => x.uri.spec == aURI.spec);
       Assert.ok(origin);
       Assert.ok(!origin.hasBookmark, "Observing onDeleteURI on a page without a bookmark");
       Assert.ok(!origin.onDeleteURICalled, "Observing onDeleteURI for the first time");
       origin.onDeleteURICalled = true;
     },
-    onDeleteVisits: function(aURI) {
+    onDeleteVisits(aURI) {
       let origin = pages.find(x => x.uri.spec == aURI.spec);
       Assert.ok(origin);
       Assert.ok(!origin.onDeleteVisitsCalled, "Observing onDeleteVisits for the first time");
       origin.onDeleteVisitsCalled = true;
     }
   };
   PlacesUtils.history.addObserver(observer, false);
 
--- a/toolkit/components/places/tests/history/test_removeVisitsByFilter.js
+++ b/toolkit/components/places/tests/history/test_removeVisitsByFilter.js
@@ -45,24 +45,24 @@ add_task(function* test_removeVisitsByFi
       }
       do_print("Generating " + uri.spec + ", " + dbDate);
       let visit = {
         uri,
         title: "visit " + i,
         visitDate: dbDate,
         test: {
           // `visitDate`, as a Date
-          jsDate: jsDate,
+          jsDate,
           // `true` if we expect that the visit will be removed
           toRemove: false,
           // `true` if `onRow` informed of the removal of this visit
           announcedByOnRow: false,
           // `true` if there is a bookmark for this URI, i.e. of the page
           // should not be entirely removed.
-          hasBookmark: hasBookmark,
+          hasBookmark,
           onFrecencyChanged: null,
           onDeleteURI: null,
         },
       };
       visits.push(visit);
       if (hasOwnBookmark) {
         do_print("Adding a bookmark to visit " + i);
         yield PlacesUtils.bookmarks.insert({
@@ -127,49 +127,49 @@ add_task(function* test_removeVisitsByFi
         frecencyChangePromises.set(removedItems[i].uri.spec, PromiseUtils.defer());
       } else if (!options.url || i == 0) {
         uriDeletePromises.set(removedItems[i].uri.spec, PromiseUtils.defer());
       }
     }
 
     let observer = {
       deferred: PromiseUtils.defer(),
-      onBeginUpdateBatch: function() {},
-      onEndUpdateBatch: function() {},
-      onVisit: function(uri) {
+      onBeginUpdateBatch() {},
+      onEndUpdateBatch() {},
+      onVisit(uri) {
         this.deferred.reject(new Error("Unexpected call to onVisit " + uri.spec));
       },
-      onTitleChanged: function(uri) {
+      onTitleChanged(uri) {
         this.deferred.reject(new Error("Unexpected call to onTitleChanged " + uri.spec));
       },
-      onClearHistory: function() {
+      onClearHistory() {
         this.deferred.reject("Unexpected call to onClearHistory");
       },
-      onPageChanged: function(uri) {
+      onPageChanged(uri) {
         this.deferred.reject(new Error("Unexpected call to onPageChanged " + uri.spec));
       },
-      onFrecencyChanged: function(aURI) {
+      onFrecencyChanged(aURI) {
         do_print("onFrecencyChanged " + aURI.spec);
         let deferred = frecencyChangePromises.get(aURI.spec);
         Assert.ok(!!deferred, "Observing onFrecencyChanged");
         deferred.resolve();
       },
-      onManyFrecenciesChanged: function() {
+      onManyFrecenciesChanged() {
         do_print("Many frecencies changed");
         for (let [, deferred] of frecencyChangePromises) {
           deferred.resolve();
         }
       },
-      onDeleteURI: function(aURI) {
+      onDeleteURI(aURI) {
         do_print("onDeleteURI " + aURI.spec);
         let deferred = uriDeletePromises.get(aURI.spec);
         Assert.ok(!!deferred, "Observing onDeleteURI");
         deferred.resolve();
       },
-      onDeleteVisits: function(aURI) {
+      onDeleteVisits(aURI) {
         // Not sure we can test anything.
       }
     };
     PlacesUtils.history.addObserver(observer, false);
 
     let cbarg;
     if (options.useCallback) {
       do_print("Setting up callback");
@@ -233,17 +233,17 @@ add_task(function* test_removeVisitsByFi
     {begin: 0, end: 10},
     {begin: 3, end: 4},
     {begin: 5, end: 8, limit: 2},
     {begin: 10, end: 18, limit: 5},
   ]) {
     for (let bookmarks of [[], [5, 6]]) {
       let options = {
         sampleSize: size,
-        bookmarks: bookmarks,
+        bookmarks,
       };
       if ("begin" in range) {
         options.begin = range.begin;
       }
       if ("end" in range) {
         options.end = range.end;
       }
       if ("limit" in range) {
--- a/toolkit/components/places/tests/migration/test_current_from_downgraded.js
+++ b/toolkit/components/places/tests/migration/test_current_from_downgraded.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 add_task(function* setup() {
   yield setupPlacesDatabase(`places_v${CURRENT_SCHEMA_VERSION}.sqlite`);
   // Downgrade the schema version to the first supported one.
   let path = OS.Path.join(OS.Constants.Path.profileDir, DB_FILENAME);
-  let db = yield Sqlite.openConnection({ path: path });
+  let db = yield Sqlite.openConnection({ path });
   yield db.setSchemaVersion(FIRST_UPGRADABLE_SCHEMA_VERSION);
   yield db.close();
 });
 
 add_task(function* database_is_valid() {
   Assert.equal(PlacesUtils.history.databaseStatus,
                PlacesUtils.history.DATABASE_STATUS_UPGRADED);
 
--- a/toolkit/components/places/tests/migration/test_current_from_v19.js
+++ b/toolkit/components/places/tests/migration/test_current_from_v19.js
@@ -14,17 +14,17 @@ var getTotalGuidAnnotationsCount = Task.
 });
 
 add_task(function* setup() {
   yield setupPlacesDatabase("places_v19.sqlite");
 });
 
 add_task(function* initial_state() {
   let path = OS.Path.join(OS.Constants.Path.profileDir, DB_FILENAME);
-  let db = yield Sqlite.openConnection({ path: path });
+  let db = yield Sqlite.openConnection({ path });
 
   Assert.equal((yield getTotalGuidAnnotationsCount(db)), 1,
                "There should be 1 obsolete guid annotation");
   yield db.close();
 });
 
 add_task(function* database_is_valid() {
   Assert.equal(PlacesUtils.history.databaseStatus,
--- a/toolkit/components/places/tests/queries/test_async.js
+++ b/toolkit/components/places/tests/queries/test_async.js
@@ -4,64 +4,64 @@
  * 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 tests = [
   {
     desc: "nsNavHistoryFolderResultNode: Basic test, asynchronously open and " +
           "close container with a single child",
 
-    loading: function(node, newState, oldState) {
+    loading(node, newState, oldState) {
       this.checkStateChanged("loading", 1);
       this.checkArgs("loading", node, oldState, node.STATE_CLOSED);
     },
 
-    opened: function(node, newState, oldState) {
+    opened(node, newState, oldState) {
       this.checkStateChanged("opened", 1);
       this.checkState("loading", 1);
       this.checkArgs("opened", node, oldState, node.STATE_LOADING);
 
       print("Checking node children");
       compareArrayToResult(this.data, node);
 
       print("Closing container");
       node.containerOpen = false;
     },
 
-    closed: function(node, newState, oldState) {
+    closed(node, newState, oldState) {
       this.checkStateChanged("closed", 1);
       this.checkState("opened", 1);
       this.checkArgs("closed", node, oldState, node.STATE_OPENED);
       this.success();
     }
   },
 
   {
     desc: "nsNavHistoryFolderResultNode: After async open and no changes, " +
           "second open should be synchronous",
 
-    loading: function(node, newState, oldState) {
+    loading(node, newState, oldState) {
       this.checkStateChanged("loading", 1);
       this.checkState("closed", 0);
       this.checkArgs("loading", node, oldState, node.STATE_CLOSED);
     },
 
-    opened: function(node, newState, oldState) {
+    opened(node, newState, oldState) {
       let cnt = this.checkStateChanged("opened", 1, 2);
       let expectOldState = cnt === 1 ? node.STATE_LOADING : node.STATE_CLOSED;
       this.checkArgs("opened", node, oldState, expectOldState);
 
       print("Checking node children");
       compareArrayToResult(this.data, node);
 
       print("Closing container");
       node.containerOpen = false;
     },
 
-    closed: function(node, newState, oldState) {
+    closed(node, newState, oldState) {
       let cnt = this.checkStateChanged("closed", 1, 2);
       this.checkArgs("closed", node, oldState, node.STATE_OPENED);
 
       switch (cnt) {
       case 1:
         node.containerOpen = true;
         break;
       case 2:
@@ -70,28 +70,28 @@ var tests = [
       }
     }
   },
 
   {
     desc: "nsNavHistoryFolderResultNode: After closing container in " +
           "loading(), opened() should not be called",
 
-    loading: function(node, newState, oldState) {
+    loading(node, newState, oldState) {
       this.checkStateChanged("loading", 1);
       this.checkArgs("loading", node, oldState, node.STATE_CLOSED);
       print("Closing container");
       node.containerOpen = false;
     },
 
-    opened: function(node, newState, oldState) {
+    opened(node, newState, oldState) {
       do_throw("opened should not be called");
     },
 
-    closed: function(node, newState, oldState) {
+    closed(node, newState, oldState) {
       this.checkStateChanged("closed", 1);
       this.checkState("loading", 1);
       this.checkArgs("closed", node, oldState, node.STATE_LOADING);
       this.success();
     }
   }
 ];
 
@@ -117,17 +117,17 @@ Test.prototype = {
    *        The name of the new state.  Used only for printing out helpful info.
    * @param aNode
    *        The node argument passed to containerStateChanged.
    * @param aOldState
    *        The old state argument passed to containerStateChanged.
    * @param aExpectOldState
    *        The expected old state.
    */
-  checkArgs: function(aNewState, aNode, aOldState, aExpectOldState) {
+  checkArgs(aNewState, aNode, aOldState, aExpectOldState) {
     print("Node passed on " + aNewState + " should be result.root");
     do_check_eq(this.result.root, aNode);
     print("Old state passed on " + aNewState + " should be " + aExpectOldState);
 
     // aOldState comes from xpconnect and will therefore be defined.  It may be
     // zero, though, so use strict equality just to make sure aExpectOldState is
     // also defined.
     do_check_true(aOldState === aExpectOldState);
@@ -136,17 +136,17 @@ Test.prototype = {
   /**
    * Call this when an observer observes a container state change.  It registers
    * the state change and ensures that it has been observed the given number
    * of times.  See checkState for parameter explanations.
    *
    * @return The number of times aState has been observed, including the new
    *         observation.
    */
-  checkStateChanged: function(aState, aExpectedMin, aExpectedMax) {
+  checkStateChanged(aState, aExpectedMin, aExpectedMax) {
     print(aState + " state change observed");
     if (!this.stateCounts.hasOwnProperty(aState))
       this.stateCounts[aState] = 0;
     this.stateCounts[aState]++;
     return this.checkState(aState, aExpectedMin, aExpectedMax);
   },
 
   /**
@@ -158,17 +158,17 @@ Test.prototype = {
    *         The state must have been observed at least this number of times.
    * @param  aExpectedMax
    *         The state must have been observed at most this number of times.
    *         This parameter is optional.  If undefined, it's set to
    *         aExpectedMin.
    * @return The number of times aState has been observed, including the new
    *         observation.
    */
-  checkState: function(aState, aExpectedMin, aExpectedMax) {
+  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 {
@@ -178,22 +178,22 @@ Test.prototype = {
     }
     do_check_true(cnt >= aExpectedMin && cnt <= aExpectedMax);
     return cnt;
   },
 
   /**
    * Asynchronously opens the root of the test's result.
    */
-  openContainer: function() {
+  openContainer() {
     // Set up the result observer.  It delegates to this object's callbacks and
     // wraps them in a try-catch so that errors don't get eaten.
     let self = this;
     this.observer = {
-      containerStateChanged: function(container, oldState, newState) {
+      containerStateChanged(container, oldState, newState) {
         print("New state passed to containerStateChanged() should equal the " +
               "container's current state");
         do_check_eq(newState, container.state);
 
         try {
           switch (newState) {
           case Ci.nsINavHistoryContainerResultNode.STATE_LOADING:
             self.loading(container, newState, oldState);
@@ -217,26 +217,26 @@ Test.prototype = {
 
     print("Opening container");
     this.result.root.containerOpen = true;
   },
 
   /**
    * Starts the test and returns a promise resolved when the test completes.
    */
-  run: function() {
+  run() {
     this.openContainer();
     return this.deferNextTest.promise;
   },
 
   /**
    * This must be called before run().  It adds a bookmark and sets up the
    * test's result.  Override if need be.
    */
-  setup: function*() {
+  *setup() {
     // Populate the database with different types of bookmark items.
     this.data = DataHelper.makeDataArray([
       { type: "bookmark" },
       { type: "separator" },
       { type: "folder" },
       { type: "bookmark", uri: "place:terms=foo" }
     ]);
     yield task_populateDB(this.data);
@@ -248,17 +248,17 @@ Test.prototype = {
     this.opts.asyncEnabled = true;
     this.result = PlacesUtils.history.executeQuery(this.query, this.opts);
   },
 
   /**
    * Call this when the test has succeeded.  It cleans up resources and starts
    * the next test.
    */
-  success: function() {
+  success() {
     this.result.removeObserver(this.observer);
 
     // Resolve the promise object that indicates that the next test can be run.
     this.deferNextTest.resolve();
   }
 };
 
 /**
--- a/toolkit/components/places/tests/queries/test_history_queries_titles_liveUpdate.js
+++ b/toolkit/components/places/tests/queries/test_history_queries_titles_liveUpdate.js
@@ -63,19 +63,19 @@ add_task(function* pages_query()
   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++) {
     let node = root.getChild(i);
     do_check_eq(node.title, gTestData[i].title);
     let uri = NetUtil.newURI(node.uri);
-    yield PlacesTestUtils.addVisits({uri: uri, title: "changedTitle"});
+    yield PlacesTestUtils.addVisits({uri, title: "changedTitle"});
     do_check_eq(node.title, "changedTitle");
-    yield PlacesTestUtils.addVisits({uri: uri, title: gTestData[i].title});
+    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()
@@ -88,20 +88,20 @@ add_task(function* visits_query()
   root.containerOpen = true;
 
   compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
 
   for (let testData of gTestData) {
     let uri = NetUtil.newURI(testData.uri);
     let node = searchNodeHavingUrl(root, testData.uri);
     do_check_eq(node.title, testData.title);
-    yield PlacesTestUtils.addVisits({uri: uri, title: "changedTitle"});
+    yield PlacesTestUtils.addVisits({uri, title: "changedTitle"});
     node = searchNodeHavingUrl(root, testData.uri);
     do_check_eq(node.title, "changedTitle");
-    yield PlacesTestUtils.addVisits({uri: uri, title: testData.title});
+    yield PlacesTestUtils.addVisits({uri, title: testData.title});
     node = searchNodeHavingUrl(root, testData.uri);
     do_check_eq(node.title, testData.title);
   }
 
   root.containerOpen = false;
   yield PlacesTestUtils.clearHistory();
 });
 
@@ -114,19 +114,19 @@ add_task(function* pages_searchterm_quer
   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++) {
     let node = root.getChild(i);
     let uri = NetUtil.newURI(node.uri);
     do_check_eq(node.title, gTestData[i].title);
-    yield PlacesTestUtils.addVisits({uri: uri, title: "changedTitle"});
+    yield PlacesTestUtils.addVisits({uri, title: "changedTitle"});
     do_check_eq(node.title, "changedTitle");
-    yield PlacesTestUtils.addVisits({uri: uri, title: gTestData[i].title});
+    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()
@@ -139,20 +139,20 @@ add_task(function* visits_searchterm_que
   let root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
 
   compareArrayToResult([gTestData[0], gTestData[1], gTestData[2]], root);
   for (let testData of gTestData) {
     let uri = NetUtil.newURI(testData.uri);
     let node = searchNodeHavingUrl(root, testData.uri);
     do_check_eq(node.title, testData.title);
-    yield PlacesTestUtils.addVisits({uri: uri, title: "changedTitle"});
+    yield PlacesTestUtils.addVisits({uri, title: "changedTitle"});
     node = searchNodeHavingUrl(root, testData.uri);
     do_check_eq(node.title, "changedTitle");
-    yield PlacesTestUtils.addVisits({uri: uri, title: testData.title});
+    yield PlacesTestUtils.addVisits({uri, title: testData.title});
     node = searchNodeHavingUrl(root, testData.uri);
     do_check_eq(node.title, testData.title);
   }
 
   root.containerOpen = false;
   yield PlacesTestUtils.clearHistory();
 });
 
@@ -164,21 +164,21 @@ add_task(function* pages_searchterm_is_t
   query.searchTerms = "match";
   let root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
   compareArrayToResult([], root);
   for (let data of gTestData) {
     let uri = NetUtil.newURI(data.uri);
     let origTitle = data.title;
     data.title = "match";
-    yield PlacesTestUtils.addVisits({ uri: uri, title: data.title,
+    yield PlacesTestUtils.addVisits({ uri, title: data.title,
                                       visitDate: data.lastVisit });
     compareArrayToResult([data], root);
     data.title = origTitle;
-    yield PlacesTestUtils.addVisits({ uri: uri, title: data.title,
+    yield PlacesTestUtils.addVisits({ uri, title: data.title,
                                       visitDate: data.lastVisit });
     compareArrayToResult([], root);
   }
 
   root.containerOpen = false;
   yield PlacesTestUtils.clearHistory();
 });
 
@@ -191,20 +191,20 @@ add_task(function* visits_searchterm_is_
   options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT;
   let root = PlacesUtils.history.executeQuery(query, options).root;
   root.containerOpen = true;
   compareArrayToResult([], root);
   for (let data of gTestData) {
     let uri = NetUtil.newURI(data.uri);
     let origTitle = data.title;
     data.title = "match";
-    yield PlacesTestUtils.addVisits({ uri: uri, title: data.title,
+    yield PlacesTestUtils.addVisits({ uri, title: data.title,
                                       visitDate: data.lastVisit });
     compareArrayToResult([data], root);
     data.title = origTitle;
-    yield PlacesTestUtils.addVisits({ uri: uri, title: data.title,
+    yield PlacesTestUtils.addVisits({ uri, title: data.title,
                                       visitDate: data.lastVisit });
     compareArrayToResult([], root);
   }
 
   root.containerOpen = false;
   yield PlacesTestUtils.clearHistory();
 });
--- a/toolkit/components/places/tests/queries/test_querySerialization.js
+++ b/toolkit/components/places/tests/queries/test_querySerialization.js
@@ -223,17 +223,17 @@ const querySwitches = [
       function(aQuery, aQueryOptions) {
         aQuery.onlyBookmarked = true;
       }
     ]
   },
   // getFolders
   {
     desc:    "nsINavHistoryQuery.getFolders",
-    matches: function(aQuery1, aQuery2) {
+    matches(aQuery1, aQuery2) {
       var q1Folders = aQuery1.getFolders();
       var q2Folders = aQuery2.getFolders();
       if (q1Folders.length !== q2Folders.length)
         return false;
       for (let i = 0; i < q1Folders.length; i++) {
         if (q2Folders.indexOf(q1Folders[i]) < 0)
           return false;
       }
@@ -253,17 +253,17 @@ const querySwitches = [
       function(aQuery, aQueryOptions) {
         aQuery.setFolders([PlacesUtils.placesRootId, PlacesUtils.tagsFolderId], 2);
       }
     ]
   },
   // tags
   {
     desc:    "nsINavHistoryQuery.getTags",
-    matches: function(aQuery1, aQuery2) {
+    matches(aQuery1, aQuery2) {
       if (aQuery1.tagsAreNot !== aQuery2.tagsAreNot)
         return false;
       var q1Tags = aQuery1.tags;
       var q2Tags = aQuery2.tags;
       if (q1Tags.length !== q2Tags.length)
         return false;
       for (let i = 0; i < q1Tags.length; i++) {
         if (q2Tags.indexOf(q1Tags[i]) < 0)
@@ -309,17 +309,17 @@ const querySwitches = [
         ];
         aQuery.tagsAreNot =  true;
       }
     ]
   },
   // transitions
   {
     desc: "tests nsINavHistoryQuery.getTransitions",
-    matches: function(aQuery1, aQuery2) {
+    matches(aQuery1, aQuery2) {
       var q1Trans = aQuery1.getTransitions();
       var q2Trans = aQuery2.getTransitions();
       if (q1Trans.length !== q2Trans.length)
         return false;
       for (let i = 0; i < q1Trans.length; i++) {
         if (q2Trans.indexOf(q1Trans[i]) < 0)
           return false;
       }
@@ -345,17 +345,17 @@ const querySwitches = [
   },
 ];
 
 // nsINavHistoryQueryOptions switches
 const queryOptionSwitches = [
   // sortingMode
   {
     desc:    "nsINavHistoryQueryOptions.sortingMode",
-    matches: function(aOptions1, aOptions2) {
+    matches(aOptions1, aOptions2) {
       if (aOptions1.sortingMode === aOptions2.sortingMode) {
         switch (aOptions1.sortingMode) {
           case aOptions1.SORT_BY_ANNOTATION_ASCENDING:
           case aOptions1.SORT_BY_ANNOTATION_DESCENDING:
             return aOptions1.sortingAnnotation === aOptions2.sortingAnnotation;
         }
         return true;
       }
--- a/toolkit/components/places/tests/queries/test_sorting.js
+++ b/toolkit/components/places/tests/queries/test_sorting.js
@@ -39,17 +39,17 @@ tests.push({
     ];
 
     this._sortedData = this._unsortedData;
 
     // This function in head_queries.js creates our database with the above data
     yield task_populateDB(this._unsortedData);
   },
 
-  check: function() {
+  check() {
     // Query
     var query = PlacesUtils.history.getNewQuery();
     query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
     query.onlyBookmarked = true;
 
     // query options
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingMode = this._sortingMode;
@@ -57,17 +57,17 @@ tests.push({
     // Results - this gets the result set and opens it for reading and modification.
     var result = PlacesUtils.history.executeQuery(query, options);
     var root = result.root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     // no reverse sorting for SORT BY NONE
   }
 });
 
 tests.push({
   _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_ASCENDING,
 
   *setup() {
@@ -110,17 +110,17 @@ tests.push({
       this._unsortedData[3],
       this._unsortedData[1],
     ];
 
     // This function in head_queries.js creates our database with the above data
     yield task_populateDB(this._unsortedData);
   },
 
-  check: function() {
+  check() {
     // Query
     var query = PlacesUtils.history.getNewQuery();
     query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
     query.onlyBookmarked = true;
 
     // query options
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingMode = this._sortingMode;
@@ -128,17 +128,17 @@ tests.push({
     // Results - this gets the result set and opens it for reading and modification.
     var result = PlacesUtils.history.executeQuery(query, options);
     var root = result.root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
 tests.push({
   _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_ASCENDING,
@@ -208,17 +208,17 @@ tests.push({
       this._unsortedData[4],
       this._unsortedData[1],
     ];
 
     // This function in head_queries.js creates our database with the above data
     yield task_populateDB(this._unsortedData);
   },
 
-  check: function() {
+  check() {
     // Query
     var query = PlacesUtils.history.getNewQuery();
     query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
     query.onlyBookmarked = true;
 
     // query options
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingMode = this._sortingMode;
@@ -226,17 +226,17 @@ tests.push({
     // Results - this gets the result set and opens it for reading and modification.
     var result = PlacesUtils.history.executeQuery(query, options);
     var root = result.root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
 tests.push({
   _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_URI_ASCENDING,
@@ -313,34 +313,34 @@ tests.push({
       this._unsortedData[3],
       this._unsortedData[5],
     ];
 
     // This function in head_queries.js creates our database with the above data
     yield task_populateDB(this._unsortedData);
   },
 
-  check: function() {
+  check() {
     // Query
     var query = PlacesUtils.history.getNewQuery();
     query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
 
     // query options
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingMode = this._sortingMode;
 
     // Results - this gets the result set and opens it for reading and modification.
     var result = PlacesUtils.history.executeQuery(query, options);
     var root = result.root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_URI_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
 tests.push({
   _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_VISITCOUNT_ASCENDING,
@@ -411,17 +411,17 @@ tests.push({
       { uri: uri("http://example.com/b2"), transition: TRANSITION_TYPED, visitDate: timeInMicroseconds + 1000 },
       { uri: uri("http://example.com/b2"), transition: TRANSITION_TYPED, visitDate: timeInMicroseconds + 1000 },
       { uri: uri("http://example.com/c"), transition: TRANSITION_TYPED, visitDate: timeInMicroseconds },
       { uri: uri("http://example.com/c"), transition: TRANSITION_TYPED, visitDate: timeInMicroseconds },
       { uri: uri("http://example.com/c"), transition: TRANSITION_TYPED, visitDate: timeInMicroseconds },
     ]);
   },
 
-  check: function() {
+  check() {
     // Query
     var query = PlacesUtils.history.getNewQuery();
     query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
     query.onlyBookmarked = true;
 
     // query options
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingMode = this._sortingMode;
@@ -429,17 +429,17 @@ tests.push({
     // Results - this gets the result set and opens it for reading and modification.
     var result = PlacesUtils.history.executeQuery(query, options);
     var root = result.root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_VISITCOUNT_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
 tests.push({
   _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_KEYWORD_ASCENDING,
@@ -508,17 +508,17 @@ tests.push({
       this._unsortedData[2],
       this._unsortedData[1],
     ];
 
     // This function in head_queries.js creates our database with the above data
     yield task_populateDB(this._unsortedData);
   },
 
-  check: function() {
+  check() {
     // Query
     var query = PlacesUtils.history.getNewQuery();
     query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
     query.onlyBookmarked = true;
 
     // query options
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingMode = this._sortingMode;
@@ -526,17 +526,17 @@ tests.push({
     // Results - this gets the result set and opens it for reading and modification.
     var result = PlacesUtils.history.executeQuery(query, options);
     var root = result.root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_KEYWORD_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
 tests.push({
   _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_DATEADDED_ASCENDING,
@@ -596,17 +596,17 @@ tests.push({
       this._unsortedData[4],
       this._unsortedData[2],
     ];
 
     // This function in head_queries.js creates our database with the above data
     yield task_populateDB(this._unsortedData);
   },
 
-  check: function() {
+  check() {
     // Query
     var query = PlacesUtils.history.getNewQuery();
     query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
     query.onlyBookmarked = true;
 
     // query options
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingMode = this._sortingMode;
@@ -614,17 +614,17 @@ tests.push({
     // Results - this gets the result set and opens it for reading and modification.
     var result = PlacesUtils.history.executeQuery(query, options);
     var root = result.root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_DATEADDED_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
 tests.push({
   _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_LASTMODIFIED_ASCENDING,
@@ -692,17 +692,17 @@ tests.push({
       this._unsortedData[4],
       this._unsortedData[2],
     ];
 
     // This function in head_queries.js creates our database with the above data
     yield task_populateDB(this._unsortedData);
   },
 
-  check: function() {
+  check() {
     // Query
     var query = PlacesUtils.history.getNewQuery();
     query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
     query.onlyBookmarked = true;
 
     // query options
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingMode = this._sortingMode;
@@ -710,17 +710,17 @@ tests.push({
     // Results - this gets the result set and opens it for reading and modification.
     var result = PlacesUtils.history.executeQuery(query, options);
     var root = result.root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_LASTMODIFIED_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
 tests.push({
   _sortingMode: Ci.nsINavHistoryQueryOptions.SORT_BY_TAGS_ASCENDING,
@@ -790,17 +790,17 @@ tests.push({
       this._unsortedData[3],
       this._unsortedData[0],
     ];
 
     // This function in head_queries.js creates our database with the above data
     yield task_populateDB(this._unsortedData);
   },
 
-  check: function() {
+  check() {
     // Query
     var query = PlacesUtils.history.getNewQuery();
     query.setFolders([PlacesUtils.bookmarks.toolbarFolder], 1);
     query.onlyBookmarked = true;
 
     // query options
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingMode = this._sortingMode;
@@ -808,17 +808,17 @@ tests.push({
     // Results - this gets the result set and opens it for reading and modification.
     var result = PlacesUtils.history.executeQuery(query, options);
     var root = result.root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_TAGS_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
 // SORT_BY_ANNOTATION_* (int32)
 
@@ -886,34 +886,34 @@ tests.push({
       this._unsortedData[3],
       this._unsortedData[2],
     ];
 
     // This function in head_queries.js creates our database with the above data
     yield task_populateDB(this._unsortedData);
   },
 
-  check: function() {
+  check() {
     // Query
     var query = PlacesUtils.history.getNewQuery();
 
     // query options
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingAnnotation = "sorting";
     options.sortingMode = this._sortingMode;
 
     // Results - this gets the result set and opens it for reading and modification.
     var result = PlacesUtils.history.executeQuery(query, options);
     var root = result.root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_ANNOTATION_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
 // SORT_BY_ANNOTATION_* (int64)
 
@@ -967,34 +967,34 @@ tests.push({
       this._unsortedData[0],
       this._unsortedData[2],
     ];
 
     // This function in head_queries.js creates our database with the above data
     yield task_populateDB(this._unsortedData);
   },
 
-  check: function() {
+  check() {
     // Query
     var query = PlacesUtils.history.getNewQuery();
 
     // query options
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingAnnotation = "sorting";
     options.sortingMode = this._sortingMode;
 
     // Results - this gets the result set and opens it for reading and modification.
     var result = PlacesUtils.history.executeQuery(query, options);
     var root = result.root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_ANNOTATION_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
 // SORT_BY_ANNOTATION_* (string)
 
@@ -1048,34 +1048,34 @@ tests.push({
       this._unsortedData[0],
       this._unsortedData[2],
     ];
 
     // This function in head_queries.js creates our database with the above data
     yield task_populateDB(this._unsortedData);
   },
 
-  check: function() {
+  check() {
     // Query
     var query = PlacesUtils.history.getNewQuery();
 
     // query options
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingAnnotation = "sorting";
     options.sortingMode = this._sortingMode;
 
     // Results - this gets the result set and opens it for reading and modification.
     var result = PlacesUtils.history.executeQuery(query, options);
     var root = result.root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_ANNOTATION_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
 // SORT_BY_ANNOTATION_* (double)
 
@@ -1129,34 +1129,34 @@ tests.push({
       this._unsortedData[0],
       this._unsortedData[2],
     ];
 
     // This function in head_queries.js creates our database with the above data
     yield task_populateDB(this._unsortedData);
   },
 
-  check: function() {
+  check() {
     // Query
     var query = PlacesUtils.history.getNewQuery();
 
     // query options
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingAnnotation = "sorting";
     options.sortingMode = this._sortingMode;
 
     // Results - this gets the result set and opens it for reading and modification.
     var result = PlacesUtils.history.executeQuery(query, options);
     var root = result.root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_ANNOTATION_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
 // SORT_BY_FRECENCY_*
 
@@ -1222,28 +1222,28 @@ tests.push({
       this._unsortedData[5],
       this._unsortedData[2],
     ];
 
     // This function in head_queries.js creates our database with the above data
     yield task_populateDB(this._unsortedData);
   },
 
-  check: function() {
+  check() {
     var query = PlacesUtils.history.getNewQuery();
     var options = PlacesUtils.history.getNewQueryOptions();
     options.sortingMode = this._sortingMode;
 
     var root = PlacesUtils.history.executeQuery(query, options).root;
     root.containerOpen = true;
     compareArrayToResult(this._sortedData, root);
     root.containerOpen = false;
   },
 
-  check_reverse: function() {
+  check_reverse() {
     this._sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_FRECENCY_DESCENDING;
     this._sortedData.reverse();
     this.check();
   }
 });
 
 function run_test()
 {
--- a/toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
+++ b/toolkit/components/places/tests/unifiedcomplete/head_autocomplete.js
@@ -54,17 +54,17 @@ do_register_cleanup(cleanup);
  *        Array of AutoCompleteSearch names.
  */
 function AutoCompleteInput(aSearches) {
   this.searches = aSearches;
 }
 AutoCompleteInput.prototype = {
   popup: {
     selectedIndex: -1,
-    invalidate: function() {},
+    invalidate() {},
     QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompletePopup])
   },
   popupOpen: false,
 
   disableAutoComplete: false,
   completeDefaultIndex: true,
   completeSelectedIndex: true,
   forceComplete: false,
@@ -76,37 +76,37 @@ AutoCompleteInput.prototype = {
   showImageColumn: false,
 
   timeout: 10,
   searchParam: "",
 
   get searchCount() {
     return this.searches.length;
   },
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
   textValue: "",
   // Text selection range
   _selStart: 0,
   _selEnd: 0,
   get selectionStart() {
     return this._selStart;
   },
   get selectionEnd() {
     return this._selEnd;
   },
-  selectTextRange: function(aStart, aEnd) {
+  selectTextRange(aStart, aEnd) {
     this._selStart = aStart;
     this._selEnd = aEnd;
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   onTextEntered: () => false,
   onTextReverted: () => false,
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput])
 }
 
 // A helper for check_autocomplete to check a specific match against data from
--- a/toolkit/components/places/tests/unifiedcomplete/test_416211.js
+++ b/toolkit/components/places/tests/unifiedcomplete/test_416211.js
@@ -5,18 +5,18 @@
 /*
  * Test bug 416211 to make sure results that match the tag show the bookmark
  * title instead of the page title.
  */
 
 add_task(function* test_tag_match_has_bookmark_title() {
   do_print("Make sure the tag match gives the bookmark title");
   let uri = NetUtil.newURI("http://theuri/");
-  yield PlacesTestUtils.addVisits({ uri: uri, title: "Page title" });
-  yield addBookmark({ uri: uri,
+  yield PlacesTestUtils.addVisits({ uri, title: "Page title" });
+  yield addBookmark({ uri,
                       title: "Bookmark title",
                       tags: [ "superTag" ]});
   yield check_autocomplete({
     search: "superTag",
-    matches: [ { uri: uri, title: "Bookmark title", tags: [ "superTag" ], style: [ "bookmark-tag" ] } ]
+    matches: [ { uri, title: "Bookmark title", tags: [ "superTag" ], style: [ "bookmark-tag" ] } ]
   });
   yield cleanup();
 });
--- a/toolkit/components/places/tests/unifiedcomplete/test_avoid_stripping_to_empty_tokens.js
+++ b/toolkit/components/places/tests/unifiedcomplete/test_avoid_stripping_to_empty_tokens.js
@@ -26,16 +26,16 @@ add_task(function* test_protocol_trimmin
       "www. ",
       "www. mo",
       "www.mo te"
     ];
     for (let input of inputs) {
       do_print("Searching for: " + input);
       yield check_autocomplete({
         search: input,
-        matches: matches
+        matches
       });
     }
 
     yield cleanup();
   }
 });
 
--- a/toolkit/components/places/tests/unifiedcomplete/test_enabled.js
+++ b/toolkit/components/places/tests/unifiedcomplete/test_enabled.js
@@ -1,32 +1,32 @@
 add_task(function* test_enabled() {
   // Test for bug 471903 to make sure searching in autocomplete can be turned on
   // and off. Also test bug 463535 for pref changing search.
   let uri = NetUtil.newURI("http://url/0");
-  yield PlacesTestUtils.addVisits([ { uri: uri, title: "title" } ]);
+  yield PlacesTestUtils.addVisits([ { uri, title: "title" } ]);
 
   do_print("plain search");
   yield check_autocomplete({
     search: "url",
-    matches: [ { uri: uri, title: "title" } ]
+    matches: [ { uri, title: "title" } ]
   });
 
   do_print("search disabled");
   Services.prefs.setBoolPref("browser.urlbar.autocomplete.enabled", false);
   yield check_autocomplete({
     search: "url",
     matches: [ ]
   });
 
   do_print("resume normal search");
   Services.prefs.setBoolPref("browser.urlbar.autocomplete.enabled", true);
   yield check_autocomplete({
     search: "url",
-    matches: [ { uri: uri, title: "title" } ]
+    matches: [ { uri, title: "title" } ]
   });
 
   yield cleanup();
 });
 
 add_task(function* test_sync_enabled() {
   // Initialize unified complete.
   Cc["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"]
--- a/toolkit/components/places/tests/unifiedcomplete/test_remote_tab_matches.js
+++ b/toolkit/components/places/tests/unifiedcomplete/test_remote_tab_matches.js
@@ -184,17 +184,17 @@ add_task(function* test_localtab_matches
         title: "An Example",
       }],
     }
   });
 
   // Setup Places to think the tab is open locally.
   let uri = NetUtil.newURI("http://foo.com/");
   yield PlacesTestUtils.addVisits([
-    { uri: uri, title: "An Example" },
+    { uri, title: "An Example" },
   ]);
   addOpenPages(uri, 1);
 
   yield check_autocomplete({
     search: "ex",
     searchParam: "enable-actions",
     matches: [ makeSearchMatch("ex", { heuristic: true }),
                makeSwitchToTabMatch("http://foo.com/", { title: "An Example" }),
--- a/toolkit/components/places/tests/unifiedcomplete/test_search_engine_host.js
+++ b/toolkit/components/places/tests/unifiedcomplete/test_search_engine_host.js
@@ -10,17 +10,17 @@ add_task(function* test_searchEngine_aut
 
   // Add an uri that matches the search string with high frecency.
   let uri = NetUtil.newURI("http://www.example.com/my/");
   let visits = [];
   for (let i = 0; i < 100; ++i) {
     visits.push({ uri, title: "Terms - SearchEngine Search" });
   }
   yield PlacesTestUtils.addVisits(visits);
-  yield addBookmark({ uri: uri, title: "Example bookmark" });
+  yield addBookmark({ uri, title: "Example bookmark" });
   yield PlacesTestUtils.promiseAsyncUpdates();
   ok(frecencyForUrl(uri) > 10000, "Added URI should have expected high frecency");
 
   do_print("Check search domain is autoFilled even if there's an higher frecency match");
   yield check_autocomplete({
     search: "my",
     autofilled: "my.search.com",
     completed: "http://my.search.com"
--- a/toolkit/components/places/tests/unit/nsDummyObserver.js
+++ b/toolkit/components/places/tests/unit/nsDummyObserver.js
@@ -10,37 +10,37 @@ const Ci = Components.interfaces;
 
 // Dummy boomark/history observer
 function DummyObserver() {
   Services.obs.notifyObservers(null, "dummy-observer-created", null);
 }
 
 DummyObserver.prototype = {
   // history observer
-  onBeginUpdateBatch: function() {},
-  onEndUpdateBatch: function() {},
-  onVisit: function(aURI, aVisitID, aTime, aSessionID, aReferringID, aTransitionType) {
+  onBeginUpdateBatch() {},
+  onEndUpdateBatch() {},
+  onVisit(aURI, aVisitID, aTime, aSessionID, aReferringID, aTransitionType) {
     Services.obs.notifyObservers(null, "dummy-observer-visited", null);
   },
-  onTitleChanged: function() {},
-  onDeleteURI: function() {},
-  onClearHistory: function() {},
-  onPageChanged: function() {},
-  onDeleteVisits: function() {},
+  onTitleChanged() {},
+  onDeleteURI() {},
+  onClearHistory() {},
+  onPageChanged() {},
+  onDeleteVisits() {},
 
   // bookmark observer
   // onBeginUpdateBatch: function() {},
   // onEndUpdateBatch: function() {},
-  onItemAdded: function(aItemId, aParentId, aIndex, aItemType, aURI) {
+  onItemAdded(aItemId, aParentId, aIndex, aItemType, aURI) {
     Services.obs.notifyObservers(null, "dummy-observer-item-added", null);
   },
-  onItemChanged: function() {},
-  onItemRemoved: function() {},
-  onItemVisited: function() {},
-  onItemMoved: function() {},
+  onItemChanged() {},
+  onItemRemoved() {},
+  onItemVisited() {},
+  onItemMoved() {},
 
   classID: Components.ID("62e221d3-68c3-4e1a-8943-a27beb5005fe"),
 
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsINavBookmarkObserver,
     Ci.nsINavHistoryObserver,
   ])
 };
--- a/toolkit/components/places/tests/unit/test_000_frecency.js
+++ b/toolkit/components/places/tests/unit/test_000_frecency.js
@@ -161,41 +161,41 @@ AutoCompleteInput.prototype = {
   textValue: "",
   disableAutoComplete: false,
   completeDefaultIndex: false,
 
   get searchCount() {
     return this.searches.length;
   },
 
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   popupOpen: false,
 
   popup: {
-    setSelectedIndex: function(aIndex) {},
-    invalidate: function() {},
+    setSelectedIndex(aIndex) {},
+    invalidate() {},
 
     // nsISupports implementation
-    QueryInterface: function(iid) {
+    QueryInterface(iid) {
       if (iid.equals(Ci.nsISupports) ||
           iid.equals(Ci.nsIAutoCompletePopup))
         return this;
 
       throw Components.results.NS_ERROR_NO_INTERFACE;
     }
   },
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
--- a/toolkit/components/places/tests/unit/test_405497.js
+++ b/toolkit/components/places/tests/unit/test_405497.js
@@ -22,17 +22,17 @@ var bs = Cc["@mozilla.org/browser/nav-bo
 function callback(aService)
 {
   this.callCount = 0;
   this.service = aService;
 }
 callback.prototype = {
   // nsINavHistoryBatchCallback
 
-  runBatched: function(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
@@ -20,41 +20,41 @@ AutoCompleteInput.prototype = {
   textValue: "",
   disableAutoComplete: false,
   completeDefaultIndex: false,
 
   get searchCount() {
     return this.searches.length;
   },
 
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   popupOpen: false,
 
   popup: {
-    setSelectedIndex: function(aIndex) {},
-    invalidate: function() {},
+    setSelectedIndex(aIndex) {},
+    invalidate() {},
 
     // nsISupports implementation
-    QueryInterface: function(iid) {
+    QueryInterface(iid) {
       if (iid.equals(Ci.nsISupports) ||
           iid.equals(Ci.nsIAutoCompletePopup))
         return this;
 
       throw Components.results.NS_ERROR_NO_INTERFACE;
     }
   },
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
--- a/toolkit/components/places/tests/unit/test_413784.js
+++ b/toolkit/components/places/tests/unit/test_413784.js
@@ -39,41 +39,41 @@ AutoCompleteInput.prototype = {
   textValue: "",
   disableAutoComplete: false,
   completeDefaultIndex: false,
 
   get searchCount() {
     return this.searches.length;
   },
 
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   popupOpen: false,
 
   popup: {
-    setSelectedIndex: function(aIndex) {},
-    invalidate: function() {},
+    setSelectedIndex(aIndex) {},
+    invalidate() {},
 
     // nsISupports implementation
-    QueryInterface: function(iid) {
+    QueryInterface(iid) {
       if (iid.equals(Ci.nsISupports) ||
           iid.equals(Ci.nsIAutoCompletePopup))
         return this;
 
       throw Components.results.NS_ERROR_NO_INTERFACE;
     }
   },
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
--- a/toolkit/components/places/tests/unit/test_418643_removeFolderChildren.js
+++ b/toolkit/components/places/tests/unit/test_418643_removeFolderChildren.js
@@ -24,27 +24,27 @@ var bookmarkedURI = uri("http://www.mozi
 // set lastModified to the past to prevent VM timing bugs
 var pastDate = Date.now() * 1000 - 1;
 var deletedBookmarkIds = [];
 
 // bookmarks observer
 var observer = {
   // cached ordered array of notified items
   _onItemRemovedItemIds: [],
-  onItemRemoved: function(aItemId, aParentId, aIndex) {
+  onItemRemoved(aItemId, aParentId, aIndex) {
     // We should first get notifications for children, then for their parent
     do_check_eq(this._onItemRemovedItemIds.indexOf(aParentId), -1);
     // Ensure we are not wrongly removing 1 level up
     do_check_neq(aParentId, bmSvc.toolbarFolder);
     // Removed item must be one of those we have manually deleted
     do_check_neq(deletedBookmarkIds.indexOf(aItemId), -1);
     this._onItemRemovedItemIds.push(aItemId);
   },
 
-  QueryInterface: function(aIID) {
+  QueryInterface(aIID) {
     if (aIID.equals(Ci.nsINavBookmarkObserver) ||
         aIID.equals(Ci.nsISupports)) {
       return this;
     }
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 };
 
--- a/toolkit/components/places/tests/unit/test_452777.js
+++ b/toolkit/components/places/tests/unit/test_452777.js
@@ -21,16 +21,16 @@ function run_test()
   // 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: function(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
@@ -15,17 +15,17 @@ function* task_add_visit(aURI, aVisitTyp
   {
     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: function(aPlaceInfo) {
+      handleResult(aPlaceInfo) {
         this.visitId = aPlaceInfo.visits[0].visitId;
       },
       handleCompletion: function TAV_handleCompletion() {
         resolve(this.visitId);
       }
     });
   });
 
--- a/toolkit/components/places/tests/unit/test_463863.js
+++ b/toolkit/components/places/tests/unit/test_463863.js
@@ -46,15 +46,15 @@ function run_test()
 }
 
 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: transition
+      transition
     });
   }
 
   runQuery(Ci.nsINavHistoryQueryOptions.RESULTS_AS_VISIT);
   runQuery(Ci.nsINavHistoryQueryOptions.RESULTS_AS_URI);
 });
--- a/toolkit/components/places/tests/unit/test_PlacesUtils_lazyobservers.js
+++ b/toolkit/components/places/tests/unit/test_PlacesUtils_lazyobservers.js
@@ -5,27 +5,27 @@ function run_test() {
   do_test_pending();
 
   const TEST_URI = NetUtil.newURI("http://moz.org/")
   let observer = {
     QueryInterface: XPCOMUtils.generateQI([
       Ci.nsINavBookmarkObserver,
     ]),
 
-    onBeginUpdateBatch: function() {},
-    onEndUpdateBatch: function() {},
-    onItemAdded: function(aItemId, aParentId, aIndex, aItemType, aURI) {
+    onBeginUpdateBatch() {},
+    onEndUpdateBatch() {},
+    onItemAdded(aItemId, aParentId, aIndex, aItemType, aURI) {
       do_check_true(aURI.equals(TEST_URI));
       PlacesUtils.removeLazyBookmarkObserver(this);
       do_test_finished();
     },
-    onItemRemoved: function() {},
-    onItemChanged: function() {},
-    onItemVisited: function() {},
-    onItemMoved: function() {},
+    onItemRemoved() {},
+    onItemChanged() {},
+    onItemVisited() {},
+    onItemMoved() {},
   };
 
   // Check registration and removal with uninitialized bookmarks service.
   PlacesUtils.addLazyBookmarkObserver(observer);
   PlacesUtils.removeLazyBookmarkObserver(observer);
 
   // Add a proper lazy observer we will test.
   PlacesUtils.addLazyBookmarkObserver(observer);
--- a/toolkit/components/places/tests/unit/test_adaptive.js
+++ b/toolkit/components/places/tests/unit/test_adaptive.js
@@ -41,29 +41,29 @@ AutoCompleteInput.prototype = {
   },
   get completeDefaultIndex() {
     return false;
   },
 
   get searchCount() {
     return this.searches.length;
   },
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   get popupOpen() {
     return false;
   },
   popup: {
     set selectedIndex(aIndex) {},
-    invalidate: function() {},
+    invalidate() {},
     QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompletePopup])
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput])
 }
 
 /**
  * Checks that autocomplete results are ordered correctly.
@@ -115,17 +115,17 @@ function* task_setCountRank(aURI, aCount
     get popup() {
       return thing;
     },
     get controller() {
       return thing;
     },
     popupOpen: true,
     selectedIndex: 0,
-    getValueAt: function() {
+    getValueAt() {
       return aURI.spec;
     },
     searchString: aSearch
   };
 
   // Bump up the instrumentation feedback.
   for (let i = 0; i < aRank; i++) {
     Services.obs.notifyObservers(thing, "autocomplete-will-enter-text", null);
@@ -146,17 +146,17 @@ function* task_setCountRank(aURI, aCount
 }
 
 /**
  * Decay the adaptive entries by sending the daily idle topic.
  */
 function doAdaptiveDecay()
 {
   PlacesUtils.history.runInBatchMode({
-    runBatched: function() {
+    runBatched() {
       for (let i = 0; i < 10; i++) {
         PlacesUtils.history.QueryInterface(Ci.nsIObserver)
                            .observe(null, "idle-daily", null);
       }
     }
   }, this);
 }
 
@@ -172,17 +172,17 @@ var c2 = 1;
 var s0 = "";
 var s1 = "si";
 var s2 = "site";
 
 var observer = {
   results: null,
   search: null,
   runCount: -1,
-  observe: function(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);
 
--- a/toolkit/components/places/tests/unit/test_adaptive_bug527311.js
+++ b/toolkit/components/places/tests/unit/test_adaptive_bug527311.js
@@ -49,31 +49,31 @@ AutoCompleteInput.prototype = {
     return this.searches[aIndex];
   },
 
   onSearchComplete: function ACI_onSearchComplete() {},
 
   popupOpen: false,
 
   popup: {
-    setSelectedIndex: function() {},
-    invalidate: function() {},
+    setSelectedIndex() {},
+    invalidate() {},
 
-    QueryInterface: function(iid) {
+    QueryInterface(iid) {
       if (iid.equals(Ci.nsISupports) ||
           iid.equals(Ci.nsIAutoCompletePopup))
         return this;
 
       throw Components.results.NS_ERROR_NO_INTERFACE;
     }
   },
 
-  onSearchBegin: function() {},
+  onSearchBegin() {},
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
@@ -96,17 +96,17 @@ function check_results() {
  };
 
   controller.startSearch(SEARCH_STRING);
 }
 
 
 function addAdaptiveFeedback(aUrl, aSearch, aCallback) {
   let observer = {
-    observe: function(aSubject, aTopic, aData) {
+    observe(aSubject, aTopic, aData) {
       os.removeObserver(observer, PLACES_AUTOCOMPLETE_FEEDBACK_UPDATED_TOPIC);
       do_timeout(0, aCallback);
     }
   };
   os.addObserver(observer, PLACES_AUTOCOMPLETE_FEEDBACK_UPDATED_TOPIC, false);
 
   let thing = {
     QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteInput,
--- a/toolkit/components/places/tests/unit/test_analyze.js
+++ b/toolkit/components/places/tests/unit/test_analyze.js
@@ -8,21 +8,21 @@
 function run_test() {
   do_test_pending();
 
   let stmt = DBConn().createAsyncStatement(
     "SELECT ROWID FROM sqlite_stat1"
   );
   stmt.executeAsync({
     _gotResult: false,
-    handleResult: function(aResultSet) {
+    handleResult(aResultSet) {
       this._gotResult = true;
     },
-    handleError: function(aError) {
+    handleError(aError) {
       do_throw("Unexpected error (" + aError.result + "): " + aError.message);
     },
-    handleCompletion: function(aReason) {
+    handleCompletion(aReason) {
       do_check_true(this._gotResult);
        do_test_finished();
     }
   });
   stmt.finalize();
 }
--- a/toolkit/components/places/tests/unit/test_annotations.js
+++ b/toolkit/components/places/tests/unit/test_annotations.js
@@ -17,38 +17,38 @@ try {
 } catch (ex) {
   do_throw("Could not get annotation service\n");
 }
 
 var annoObserver = {
   PAGE_lastSet_URI: "",
   PAGE_lastSet_AnnoName: "",
 
-  onPageAnnotationSet: function(aURI, aName) {
+  onPageAnnotationSet(aURI, aName) {
     this.PAGE_lastSet_URI = aURI.spec;
     this.PAGE_lastSet_AnnoName = aName;
   },
 
   ITEM_lastSet_Id: -1,
   ITEM_lastSet_AnnoName: "",
-  onItemAnnotationSet: function(aItemId, aName) {
+  onItemAnnotationSet(aItemId, aName) {
     this.ITEM_lastSet_Id = aItemId;
     this.ITEM_lastSet_AnnoName = aName;
   },
 
   PAGE_lastRemoved_URI: "",
   PAGE_lastRemoved_AnnoName: "",
-  onPageAnnotationRemoved: function(aURI, aName) {
+  onPageAnnotationRemoved(aURI, aName) {
     this.PAGE_lastRemoved_URI = aURI.spec;
     this.PAGE_lastRemoved_AnnoName = aName;
   },
 
   ITEM_lastRemoved_Id: -1,
   ITEM_lastRemoved_AnnoName: "",
-  onItemAnnotationRemoved: function(aItemId, aName) {
+  onItemAnnotationRemoved(aItemId, aName) {
     this.ITEM_lastRemoved_Id = aItemId;
     this.ITEM_lastRemoved_AnnoName = aName;
   }
 };
 
 // main
 function run_test()
 {
--- a/toolkit/components/places/tests/unit/test_asyncExecuteLegacyQueries.js
+++ b/toolkit/components/places/tests/unit/test_asyncExecuteLegacyQueries.js
@@ -4,37 +4,37 @@
 
 // This is a test for asyncExecuteLegacyQueries API.
 
 var tests = [
 
 function test_history_query() {
   let uri = NetUtil.newURI("http://test.visit.mozilla.com/");
   let title = "Test visit";
-  PlacesTestUtils.addVisits({ uri: uri, title: title }).then(function() {
+  PlacesTestUtils.addVisits({ uri, title }).then(function() {
     let options = PlacesUtils.history.getNewQueryOptions();
     options.sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING;
     let query = PlacesUtils.history.getNewQuery();
 
     PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                        .asyncExecuteLegacyQueries([query], 1, options, {
-      handleResult: function(aResultSet) {
+      handleResult(aResultSet) {
         for (let row; (row = aResultSet.getNextRow());) {
           try {
             do_check_eq(row.getResultByIndex(1), uri.spec);
             do_check_eq(row.getResultByIndex(2), title);
           } catch (e) {
             do_throw("Error while fetching page data.");
           }
         }
       },
-      handleError: function(aError) {
+      handleError(aError) {
         do_throw("Async execution error (" + aError.result + "): " + aError.message);
       },
-      handleCompletion: function(aReason) {
+      handleCompletion(aReason) {
         run_next_test();
       },
     });
   });
 },
 
 function test_bookmarks_query() {
   let uri = NetUtil.newURI("http://test.bookmark.mozilla.com/");
@@ -42,30 +42,30 @@ function test_bookmarks_query() {
   bookmark(uri, title);
   let options = PlacesUtils.history.getNewQueryOptions();
   options.sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_LASMODIFIED_DESCENDING;
   options.queryType = options.QUERY_TYPE_BOOKMARKS;
   let query = PlacesUtils.history.getNewQuery();
 
   PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                      .asyncExecuteLegacyQueries([query], 1, options, {
-    handleResult: function(aResultSet) {
+    handleResult(aResultSet) {
       for (let row; (row = aResultSet.getNextRow());) {
         try {
           do_check_eq(row.getResultByIndex(1), uri.spec);
           do_check_eq(row.getResultByIndex(2), title);
         } catch (e) {
           do_throw("Error while fetching page data.");
         }
       }
     },
-    handleError: function(aError) {
+    handleError(aError) {
       do_throw("Async execution error (" + aError.result + "): " + aError.message);
     },
-    handleCompletion: function(aReason) {
+    handleCompletion(aReason) {
       run_next_test();
     },
   });
 },
 
 ];
 
 function bookmark(aURI, aTitle)
--- a/toolkit/components/places/tests/unit/test_async_history_api.js
+++ b/toolkit/components/places/tests/unit/test_async_history_api.js
@@ -88,17 +88,17 @@ function VisitObserver(aURI,
                        aCallback)
 {
   this.uri = aURI;
   this.guid = aGUID;
   this.callback = aCallback;
 }
 VisitObserver.prototype = {
   __proto__: NavHistoryObserver.prototype,
-  onVisit: function(aURI,
+  onVisit(aURI,
                     aVisitId,
                     aTime,
                     aSessionId,
                     aReferringId,
                     aTransitionType,
                     aGUID)
   {
     do_print("onVisit(" + aURI.spec + ", " + aVisitId + ", " + aTime +
@@ -572,17 +572,17 @@ add_task(function* test_place_id_ignored
   let placeId = placeInfo.placeId;
   do_check_neq(placeId, 0);
 
   let badPlace = {
     uri: NetUtil.newURI(TEST_DOMAIN + "test_place_id_ignored_second"),
     visits: [
       new VisitInfo(),
     ],
-    placeId: placeId,
+    placeId,
   };
 
   do_check_false(yield promiseIsURIVisited(badPlace.uri));
   placesResult = yield promiseUpdatePlaces(badPlace);
   if (placesResult.errors.length > 0) {
     do_throw("Unexpected error.");
   }
   placeInfo = placesResult.results[0];
--- a/toolkit/components/places/tests/unit/test_async_transactions.js
+++ b/toolkit/components/places/tests/unit/test_async_transactions.js
@@ -13,35 +13,34 @@ const rootGuid = PlacesUtils.bookmarks.r
 Components.utils.importGlobalProperties(["URL"]);
 
 // Create and add bookmarks observer.
 var observer = {
   __proto__: NavBookmarkObserver.prototype,
 
   tagRelatedGuids: new Set(),
 
-  reset: function() {
+  reset() {
     this.itemsAdded = new Map();
     this.itemsRemoved = new Map();
     this.itemsChanged = new Map();
     this.itemsMoved = new Map();
     this.beginUpdateBatch = false;
     this.endUpdateBatch = false;
   },
 
-  onBeginUpdateBatch: function() {
+  onBeginUpdateBatch() {
     this.beginUpdateBatch = true;
   },
 
-  onEndUpdateBatch: function() {
+  onEndUpdateBatch() {
     this.endUpdateBatch = true;
   },
 
-  onItemAdded:
-  function(aItemId, aParentId, aIndex, aItemType, aURI, aTitle, aDateAdded,
+  onItemAdded(aItemId, aParentId, aIndex, aItemType, aURI, aTitle, aDateAdded,
            aGuid, aParentGuid) {
     // Ignore tag items.
     if (aParentId == PlacesUtils.tagsFolderId ||
         (aParentId != PlacesUtils.placesRootId &&
          bmsvc.getFolderIdForItem(aParentId) == PlacesUtils.tagsFolderId)) {
       this.tagRelatedGuids.add(aGuid);
       return;
     }
@@ -49,28 +48,26 @@ var observer = {
     this.itemsAdded.set(aGuid, { itemId:         aItemId
                                , parentGuid:     aParentGuid
                                , index:          aIndex
                                , itemType:       aItemType
                                , title:          aTitle
                                , url:            aURI });
   },
 
-  onItemRemoved:
-  function(aItemId, aParentId, aIndex, aItemType, aURI, aGuid, aParentGuid) {
+  onItemRemoved(aItemId, aParentId, aIndex, aItemType, aURI, aGuid, aParentGuid) {
     if (this.tagRelatedGuids.has(aGuid))
       return;
 
     this.itemsRemoved.set(aGuid, { parentGuid: aParentGuid
                                  , index:      aIndex
                                  , itemType:   aItemType });
   },
 
-  onItemChanged:
-  function(aItemId, aProperty, aIsAnnoProperty, aNewValue, aLastModified,
+  onItemChanged(aItemId, aProperty, aIsAnnoProperty, aNewValue, aLastModified,
            aItemType, aParentId, aGuid, aParentGuid) {
     if (this.tagRelatedGuids.has(aGuid))
       return;
 
     let changesForGuid = this.itemsChanged.get(aGuid);
     if (changesForGuid === undefined) {
       changesForGuid = new Map();
       this.itemsChanged.set(aGuid, changesForGuid);
@@ -79,26 +76,25 @@ var observer = {
     let newValue = aNewValue;
     if (aIsAnnoProperty) {
       if (annosvc.itemHasAnnotation(aItemId, aProperty))
         newValue = annosvc.getItemAnnotation(aItemId, aProperty);
       else
         newValue = null;
     }
     let change = { isAnnoProperty: aIsAnnoProperty
-                 , newValue: newValue
+                 , newValue
                  , lastModified: aLastModified
                  , itemType: aItemType };
     changesForGuid.set(aProperty, change);
   },
 
   onItemVisited: () => {},
 
-  onItemMoved:
-  function(aItemId, aOldParent, aOldIndex, aNewParent, aNewIndex, aItemType,
+  onItemMoved(aItemId, aOldParent, aOldIndex, aNewParent, aNewIndex, aItemType,
            aGuid, aOldParentGuid, aNewParentGuid) {
     this.itemsMoved.set(aGuid, { oldParentGuid: aOldParentGuid
                                , oldIndex:      aOldIndex
                                , newParentGuid: aNewParentGuid
                                , newIndex:      aNewIndex
                                , itemType:      aItemType });
   }
 };
@@ -1339,28 +1335,28 @@ add_task(function* test_annotate_multipl
     if (a !== null)
       expectedAnnos.push(new AnnoObj("A", a));
     if (b !== null)
       expectedAnnos.push(new AnnoObj("B", b));
 
     Assert.deepEqual(currentAnnos, expectedAnnos);
   }
 
-  yield PT.Annotate({ guid: guid, annotations: annos(1, 2) }).transact();
+  yield PT.Annotate({ guid, annotations: annos(1, 2) }).transact();
   verifyAnnoValues(1, 2);
   yield PT.undo();
   verifyAnnoValues();
   yield PT.redo();
   verifyAnnoValues(1, 2);
 
-  yield PT.Annotate({ guid: guid
+  yield PT.Annotate({ guid
                     , annotation: { name: "A" } }).transact();
   verifyAnnoValues(null, 2);
 
-  yield PT.Annotate({ guid: guid
+  yield PT.Annotate({ guid
                     , annotation: { name: "B", value: 0 } }).transact();
   verifyAnnoValues(null, 0);
   yield PT.undo();
   verifyAnnoValues(null, 2);
   yield PT.redo();
   verifyAnnoValues(null, 0);
   yield PT.undo();
   verifyAnnoValues(null, 2);
--- a/toolkit/components/places/tests/unit/test_bookmarks_html.js
+++ b/toolkit/components/places/tests/unit/test_bookmarks_html.js
@@ -356,17 +356,17 @@ function* checkItem(aExpected, aNode)
           Assert.equal(entry.postData, aExpected.postData);
           break;
         }
         case "charset":
           let testURI = NetUtil.newURI(aNode.uri);
           do_check_eq((yield PlacesUtils.getCharsetForURI(testURI)), aExpected.charset);
           break;
         case "feedUrl":
-          let livemark = yield PlacesUtils.livemarks.getLivemark({ id: id });
+          let livemark = yield PlacesUtils.livemarks.getLivemark({ id });
           do_check_eq(livemark.siteURI.spec, aExpected.url);
           do_check_eq(livemark.feedURI.spec, aExpected.feedUrl);
           break;
         case "children":
           let folder = aNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);
           do_check_eq(folder.hasChildren, aExpected.children.length > 0);
           folder.containerOpen = true;
           do_check_eq(folder.childCount, aExpected.children.length);
--- a/toolkit/components/places/tests/unit/test_bookmarks_json.js
+++ b/toolkit/components/places/tests/unit/test_bookmarks_json.js
@@ -212,17 +212,17 @@ function* checkItem(aExpected, aNode) {
           Assert.equal(entry.postData, aExpected.postData);
           break;
         }
         case "charset":
           let testURI = NetUtil.newURI(aNode.uri);
           do_check_eq((yield PlacesUtils.getCharsetForURI(testURI)), aExpected.charset);
           break;
         case "feedUrl":
-          let livemark = yield PlacesUtils.livemarks.getLivemark({ id: id });
+          let livemark = yield PlacesUtils.livemarks.getLivemark({ id });
           do_check_eq(livemark.siteURI.spec, aExpected.url);
           do_check_eq(livemark.feedURI.spec, aExpected.feedUrl);
           break;
         case "children":
           let folder = aNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);
           do_check_eq(folder.hasChildren, aExpected.children.length > 0);
           folder.containerOpen = true;
           do_check_eq(folder.childCount, aExpected.children.length);
--- a/toolkit/components/places/tests/unit/test_bookmarks_restore_notification.js
+++ b/toolkit/components/places/tests/unit/test_bookmarks_restore_notification.js
@@ -29,17 +29,17 @@ var uris = [
 ];
 
 /**
  * Adds some bookmarks for the URIs in |uris|.
  */
 function* addBookmarks() {
   for (let url of uris) {
     yield PlacesUtils.bookmarks.insert({
-      url: url, parentGuid: PlacesUtils.bookmarks.menuGuid
+      url, parentGuid: PlacesUtils.bookmarks.menuGuid
     })
   }
   checkBookmarksExist();
 }
 
 /**
  * Checks that all of the bookmarks created for |uris| exist.  It works by
  * creating one query per URI and then ORing all the queries.  The number of
--- a/toolkit/components/places/tests/unit/test_browserhistory.js
+++ b/toolkit/components/places/tests/unit/test_browserhistory.js
@@ -18,17 +18,17 @@ add_task(function* test_removePage() {
 });
 
 add_task(function* test_removePages() {
   let pages = [];
   for (let i = 0; i < 8; i++) {
     pages.push(NetUtil.newURI(TEST_URI.spec + i));
   }
 
-  yield PlacesTestUtils.addVisits(pages.map(uri => ({ uri: uri })));
+  yield PlacesTestUtils.addVisits(pages.map(uri => ({ uri })));
   // Bookmarked item should not be removed from moz_places.
   const ANNO_INDEX = 1;
   const ANNO_NAME = "testAnno";
   const ANNO_VALUE = "foo";
   const BOOKMARK_INDEX = 2;
   PlacesUtils.annotations.setPageAnnotation(pages[ANNO_INDEX],
                                             ANNO_NAME, ANNO_VALUE, 0,
                                             Ci.nsIAnnotationService.EXPIRE_NEVER);
@@ -104,22 +104,22 @@ add_task(function* test_history_clear() 
 
 add_task(function* test_getObservers() {
   // Ensure that getObservers() invalidates the hasHistoryEntries cache.
   yield PlacesTestUtils.addVisits(TEST_URI);
   do_check_eq(1, PlacesUtils.history.hasHistoryEntries);
   // This is just for testing purposes, never do it.
   return new Promise((resolve, reject) => {
     DBConn().executeSimpleSQLAsync("DELETE FROM moz_historyvisits", {
-      handleError: function(error) {
+      handleError(error) {
         reject(error);
       },
-      handleResult: function(result) {
+      handleResult(result) {
       },
-      handleCompletion: function(result) {
+      handleCompletion(result) {
         // Just invoking getObservers should be enough to invalidate the cache.
         PlacesUtils.history.getObservers();
         do_check_eq(0, PlacesUtils.history.hasHistoryEntries);
         resolve();
       }
     });
   });
 });
--- a/toolkit/components/places/tests/unit/test_childlessTags.js
+++ b/toolkit/components/places/tests/unit/test_childlessTags.js
@@ -9,17 +9,17 @@
  * contained in any regular, non-tag folders.  See bug 444849.
  */
 
 // Add your tests here.  Each is an object with a summary string |desc| and a
 // method run() that's called to run the test.
 var tests = [
   {
     desc: "Removing a tagged bookmark should cause the tag to be removed.",
-    run:   function() {
+    run() {
       print("  Make a bookmark.");
       var bmId = bmsvc.insertBookmark(bmsvc.unfiledBookmarksFolder,
                                       BOOKMARK_URI,
                                       bmsvc.DEFAULT_INDEX,
                                       "test bookmark");
       do_check_true(bmId > 0);
 
       print("  Tag it up.");
@@ -31,17 +31,17 @@ var tests = [
       bmsvc.removeItem(bmId);
       ensureTagsExist([]);
     }
   },
 
   {
     desc: "Removing a folder containing a tagged bookmark should cause the " +
           "tag to be removed.",
-    run:   function() {
+    run() {
       print("  Make a folder.");
       var folderId = bmsvc.createFolder(bmsvc.unfiledBookmarksFolder,
                                         "test folder",
                                         bmsvc.DEFAULT_INDEX);
       do_check_true(folderId > 0);
 
       print("  Stick a bookmark in the folder.");
       var bmId = bmsvc.insertBookmark(folderId,
--- a/toolkit/components/places/tests/unit/test_download_history.js
+++ b/toolkit/components/places/tests/unit/test_download_history.js
@@ -241,37 +241,37 @@ add_test(function test_dh_details()
           case "downloads/destinationFileName":
             destinationFileNameSet = true;
             do_check_eq(value, DEST_FILE_NAME);
             break;
         }
         checkFinished();
       }
     },
-    onItemAnnotationSet: function() {},
-    onPageAnnotationRemoved: function() {},
-    onItemAnnotationRemoved: function() {}
+    onItemAnnotationSet() {},
+    onPageAnnotationRemoved() {},
+    onItemAnnotationRemoved() {}
   }
 
   let historyObserver = {
-    onBeginUpdateBatch: function() {},
-    onEndUpdateBatch: function() {},
-    onVisit: function() {},
+    onBeginUpdateBatch() {},
+    onEndUpdateBatch() {},
+    onVisit() {},
     onTitleChanged: function HO_onTitleChanged(aURI, aPageTitle)
     {
       if (aURI.equals(SOURCE_URI)) {
         titleSet = true;
         do_check_eq(aPageTitle, DEST_FILE_NAME);
         checkFinished();
       }
     },
-    onDeleteURI: function() {},
-    onClearHistory: function() {},
-    onPageChanged: function() {},
-    onDeleteVisits: function() {}
+    onDeleteURI() {},
+    onClearHistory() {},
+    onPageChanged() {},
+    onDeleteVisits() {}
   };
 
   PlacesUtils.annotations.addObserver(annoObserver, false);
   PlacesUtils.history.addObserver(historyObserver, false);
 
   // Both null values and remote URIs should not cause errors.
   gDownloadHistory.addDownload(SOURCE_URI, null, Date.now() * 1000);
   gDownloadHistory.addDownload(SOURCE_URI, null, Date.now() * 1000, null);
--- a/toolkit/components/places/tests/unit/test_frecency.js
+++ b/toolkit/components/places/tests/unit/test_frecency.js
@@ -33,41 +33,41 @@ AutoCompleteInput.prototype = {
   textValue: "",
   disableAutoComplete: false,
   completeDefaultIndex: false,
 
   get searchCount() {
     return this.searches.length;
   },
 
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   popupOpen: false,
 
   popup: {
-    setSelectedIndex: function(aIndex) {},
-    invalidate: function() {},
+    setSelectedIndex(aIndex) {},
+    invalidate() {},
 
     // nsISupports implementation
-    QueryInterface: function(iid) {
+    QueryInterface(iid) {
       if (iid.equals(Ci.nsISupports) ||
           iid.equals(Ci.nsIAutoCompletePopup))
         return this;
 
       throw Components.results.NS_ERROR_NO_INTERFACE;
     }
   },
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
--- a/toolkit/components/places/tests/unit/test_history_autocomplete_tags.js
+++ b/toolkit/components/places/tests/unit/test_history_autocomplete_tags.js
@@ -20,41 +20,41 @@ AutoCompleteInput.prototype = {
   textValue: "",
   disableAutoComplete: false,
   completeDefaultIndex: false,
 
   get searchCount() {
     return this.searches.length;
   },
 
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   popupOpen: false,
 
   popup: {
-    setSelectedIndex: function(aIndex) {},
-    invalidate: function() {},
+    setSelectedIndex(aIndex) {},
+    invalidate() {},
 
     // nsISupports implementation
-    QueryInterface: function(iid) {
+    QueryInterface(iid) {
       if (iid.equals(Ci.nsISupports) ||
           iid.equals(Ci.nsIAutoCompletePopup))
         return this;
 
       throw Components.results.NS_ERROR_NO_INTERFACE;
     }
   },
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
--- a/toolkit/components/places/tests/unit/test_history_clear.js
+++ b/toolkit/components/places/tests/unit/test_history_clear.js
@@ -5,25 +5,25 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var mDBConn = DBConn();
 
 function promiseOnClearHistoryObserved() {
   let deferred = Promise.defer();
 
   let historyObserver = {
-    onBeginUpdateBatch: function() {},
-    onEndUpdateBatch: function() {},
-    onVisit: function() {},
-    onTitleChanged: function() {},
-    onDeleteURI: function(aURI) {},
-    onPageChanged: function() {},
-    onDeleteVisits: function() {},
+    onBeginUpdateBatch() {},
+    onEndUpdateBatch() {},
+    onVisit() {},
+    onTitleChanged() {},
+    onDeleteURI(aURI) {},
+    onPageChanged() {},
+    onDeleteVisits() {},
 
-    onClearHistory: function() {
+    onClearHistory() {
       PlacesUtils.history.removeObserver(this, false);
       deferred.resolve();
     },
 
     QueryInterface: XPCOMUtils.generateQI([
       Ci.nsINavHistoryObserver,
     ])
   }
--- a/toolkit/components/places/tests/unit/test_history_observer.js
+++ b/toolkit/components/places/tests/unit/test_history_observer.js
@@ -3,24 +3,24 @@
 
 /**
  * Generic nsINavHistoryObserver that doesn't implement anything, but provides
  * dummy methods to prevent errors about an object not having a certain method.
  */
 function NavHistoryObserver() {
 }
 NavHistoryObserver.prototype = {
-  onBeginUpdateBatch: function() { },
-  onEndUpdateBatch: function() { },
-  onVisit: function() { },
-  onTitleChanged: function() { },
-  onDeleteURI: function() { },
-  onClearHistory: function() { },
-  onPageChanged: function() { },
-  onDeleteVisits: function() { },
+  onBeginUpdateBatch() { },
+  onEndUpdateBatch() { },
+  onVisit() { },
+  onTitleChanged() { },
+  onDeleteURI() { },
+  onClearHistory() { },
+  onPageChanged() { },
+  onDeleteVisits() { },
   QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
 };
 
 /**
  * Registers a one-time history observer for and calls the callback
  * when the specified nsINavHistoryObserver method is called.
  * Returns a promise that is resolved when the callback returns.
  */
@@ -38,17 +38,17 @@ function onNotify(callback) {
 
 /**
  * Asynchronous task that adds a visit to the history database.
  */
 function* task_add_visit(uri, timestamp, transition) {
   uri = uri || NetUtil.newURI("http://firefox.com/");
   timestamp = timestamp || Date.now() * 1000;
   yield PlacesTestUtils.addVisits({
-    uri: uri,
+    uri,
     transition: transition || TRANSITION_TYPED,
     visitDate: timestamp
   });
   return [uri, timestamp];
 }
 
 add_task(function* test_onVisit() {
   let promiseNotify = onNotify(function onVisit(aURI, aVisitID, aTime,
@@ -182,17 +182,17 @@ add_task(function* test_onTitleChanged()
     Assert.equal(aTitle, title);
     do_check_guid_for_uri(aURI, aGUID);
   });
 
   let [testuri] = yield task_add_visit();
   let title = "test-title";
   yield PlacesTestUtils.addVisits({
     uri: testuri,
-    title: title
+    title
   });
   yield promiseNotify;
 });
 
 add_task(function* test_onPageChanged() {
   let promiseNotify = onNotify(function onPageChanged(aURI, aChangedAttribute,
                                                       aNewValue, aGUID) {
     Assert.equal(aChangedAttribute, Ci.nsINavHistoryObserver.ATTRIBUTE_FAVICON);
--- a/toolkit/components/places/tests/unit/test_isURIVisited.js
+++ b/toolkit/components/places/tests/unit/test_isURIVisited.js
@@ -44,19 +44,19 @@ function* step()
 
       let uri = NetUtil.newURI(scheme + "mozilla.org/");
 
       history.isURIVisited(uri, function(aURI, aIsVisited) {
         do_check_true(uri.equals(aURI));
         do_check_false(aIsVisited);
 
         let callback = {
-          handleError:  function() {},
-          handleResult: function() {},
-          handleCompletion: function() {
+          handleError() {},
+          handleResult() {},
+          handleCompletion() {
             do_print("Added visit to " + uri.spec);
 
             history.isURIVisited(uri, function(aURI2, aIsVisited2) {
               do_check_true(uri.equals(aURI2));
               let checker = SCHEMES[scheme] ? do_check_true : do_check_false;
               checker(aIsVisited2);
 
               PlacesTestUtils.clearHistory().then(function() {
@@ -65,17 +65,17 @@ function* step()
                   do_check_false(aIsVisited3);
                   gRunner.next();
                 });
               });
             });
           },
         };
 
-        history.updatePlaces({ uri:    uri
+        history.updatePlaces({ uri
                              , visits: [ { transitionType: transition
                                          , visitDate:      Date.now() * 1000
                                          } ]
                              }, callback);
       });
       yield undefined;
     }
   }
--- a/toolkit/components/places/tests/unit/test_isvisited.js
+++ b/toolkit/components/places/tests/unit/test_isvisited.js
@@ -10,29 +10,29 @@ function run_test()
 }
 
 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: referrer});
+  yield PlacesTestUtils.addVisits({uri: uri1, referrer});
   do_check_guid_for_uri(uri1);
   do_check_true(yield promiseIsURIVisited(uri1));
 
   // add a https:// uri
   var uri2 = uri("https://etrade.com");
-  yield PlacesTestUtils.addVisits({uri: uri2, referrer: referrer});
+  yield PlacesTestUtils.addVisits({uri: uri2, referrer});
   do_check_guid_for_uri(uri2);
   do_check_true(yield promiseIsURIVisited(uri2));
 
   // add a ftp:// uri
   var uri3 = uri("ftp://ftp.mozilla.org");
-  yield PlacesTestUtils.addVisits({uri: uri3, referrer: referrer});
+  yield PlacesTestUtils.addVisits({uri: uri3, referrer});
   do_check_guid_for_uri(uri3);
   do_check_true(yield promiseIsURIVisited(uri3));
 
   // check if a nonexistent uri is visited
   var uri4 = uri("http://foobarcheese.com");
   do_check_false(yield promiseIsURIVisited(uri4));
 
   // check that certain schemes never show up as visited
@@ -58,17 +58,17 @@ add_task(function* test_execute()
     }
     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: referrer}).then(() => {
+      PlacesTestUtils.addVisits({uri: cantAddUri, referrer}).then(() => {
         do_throw("Should not have added history for invalid URI.");
       }, error => {
         do_check_true(error.message.includes("No items were added to history"));
       });
       do_check_false(yield promiseIsURIVisited(cantAddUri));
     }
   }
 });
--- a/toolkit/components/places/tests/unit/test_keywords.js
+++ b/toolkit/components/places/tests/unit/test_keywords.js
@@ -61,17 +61,17 @@ function expectBookmarkNotifications() {
             return;
           let args = Array.from(arguments, arg => {
             if (arg && arg instanceof Ci.nsIURI)
               return new URL(arg.spec);
             if (arg && typeof(arg) == "number" && arg >= Date.now() * 1000)
               return new Date(parseInt(arg / 1000));
             return arg;
           });
-          notifications.push({ name: name, arguments: args });
+          notifications.push({ name, arguments: args });
         }
       }
 
       if (name in target)
         return target[name];
       return undefined;
     }
   });
--- a/toolkit/components/places/tests/unit/test_markpageas.js
+++ b/toolkit/components/places/tests/unit/test_markpageas.js
@@ -18,17 +18,17 @@ function run_test()
 
 add_task(function* test_execute()
 {
   let observer;
   let completionPromise = new Promise(resolveCompletionPromise => {
     observer = {
       __proto__: NavHistoryObserver.prototype,
       _visitCount: 0,
-      onVisit: function(aURI, aVisitID, aTime, aSessionID, aReferringID,
+      onVisit(aURI, aVisitID, aTime, aSessionID, aReferringID,
                         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_nsINavHistoryViewer.js
+++ b/toolkit/components/places/tests/unit/test_nsINavHistoryViewer.js
@@ -6,73 +6,73 @@
 
 // Get history service
 var histsvc = PlacesUtils.history;
 var bhist = PlacesUtils.bhistory;
 var bmsvc = PlacesUtils.bookmarks;
 
 var resultObserver = {
   insertedNode: null,
-  nodeInserted: function(parent, node, newIndex) {
+  nodeInserted(parent, node, newIndex) {
     this.insertedNode = node;
   },
   removedNode: null,
-  nodeRemoved: function(parent, node, oldIndex) {
+  nodeRemoved(parent, node, oldIndex) {
     this.removedNode = node;
   },
 
-  nodeAnnotationChanged: function() {},
+  nodeAnnotationChanged() {},
 
   newTitle: "",
   nodeChangedByTitle: null,
-  nodeTitleChanged: function(node, newTitle) {
+  nodeTitleChanged(node, newTitle) {
     this.nodeChangedByTitle = node;
     this.newTitle = newTitle;
   },
 
   newAccessCount: 0,
   newTime: 0,
   nodeChangedByHistoryDetails: null,
-  nodeHistoryDetailsChanged: function(node,
+  nodeHistoryDetailsChanged(node,
                                          updatedVisitDate,
                                          updatedVisitCount) {
     this.nodeChangedByHistoryDetails = node
     this.newTime = updatedVisitDate;
     this.newAccessCount = updatedVisitCount;
   },
 
   movedNode: null,
-  nodeMoved: function(node, oldParent, oldIndex, newParent, newIndex) {
+  nodeMoved(node, oldParent, oldIndex, newParent, newIndex) {
     this.movedNode = node;
   },
   openedContainer: null,
   closedContainer: null,
-  containerStateChanged: function(aNode, aOldState, aNewState) {
+  containerStateChanged(aNode, aOldState, aNewState) {
     if (aNewState == Ci.nsINavHistoryContainerResultNode.STATE_OPENED) {
       this.openedContainer = aNode;
     }
     else if (aNewState == Ci.nsINavHistoryContainerResultNode.STATE_CLOSED) {
       this.closedContainer = aNode;
     }
   },
   invalidatedContainer: null,
-  invalidateContainer: function(node) {
+  invalidateContainer(node) {
     this.invalidatedContainer = node;
   },
   sortingMode: null,
-  sortingChanged: function(sortingMode) {
+  sortingChanged(sortingMode) {
     this.sortingMode = sortingMode;
   },
   inBatchMode: false,
-  batching: function(aToggleMode) {
+  batching(aToggleMode) {
     do_check_neq(this.inBatchMode, aToggleMode);
     this.inBatchMode = aToggleMode;
   },
   result: null,
-  reset: function() {
+  reset() {
     this.insertedNode = null;
     this.removedNode = null;
     this.nodeChangedByTitle = null;
     this.nodeChangedByHistoryDetails = null;
     this.replacedNode = null;
     this.movedNode = null;
     this.openedContainer = null;
     this.closedContainer = null;
@@ -130,23 +130,23 @@ add_test(function check_history_query() 
 
         // nsINavHistoryResultObserver.invalidateContainer
         PlacesTestUtils.clearHistoryEnabled().then(() => {
           do_check_eq(root.uri, resultObserver.invalidatedContainer.uri);
 
           // nsINavHistoryResultObserver.batching
           do_check_false(resultObserver.inBatchMode);
           histsvc.runInBatchMode({
-            runBatched: function(aUserData) {
+            runBatched(aUserData) {
               do_check_true(resultObserver.inBatchMode);
             }
           }, null);
           do_check_false(resultObserver.inBatchMode);
           bmsvc.runInBatchMode({
-            runBatched: function(aUserData) {
+            runBatched(aUserData) {
               do_check_true(resultObserver.inBatchMode);
             }
           }, null);
           do_check_false(resultObserver.inBatchMode);
 
           root.containerOpen = false;
           do_check_eq(resultObserver.closedContainer, resultObserver.openedContainer);
           result.removeObserver(resultObserver);
@@ -198,23 +198,23 @@ add_test(function check_bookmarks_query(
   resultObserver.invalidatedContainer = null;
   result.sortingMode = options.SORT_BY_TITLE_ASCENDING;
   do_check_eq(resultObserver.sortingMode, options.SORT_BY_TITLE_ASCENDING);
   do_check_eq(resultObserver.invalidatedContainer, result.root);
 
   // nsINavHistoryResultObserver.batching
   do_check_false(resultObserver.inBatchMode);
   histsvc.runInBatchMode({
-    runBatched: function(aUserData) {
+    runBatched(aUserData) {
       do_check_true(resultObserver.inBatchMode);
     }
   }, null);
   do_check_false(resultObserver.inBatchMode);
   bmsvc.runInBatchMode({
-    runBatched: function(aUserData) {
+    runBatched(aUserData) {
       do_check_true(resultObserver.inBatchMode);
     }
   }, null);
   do_check_false(resultObserver.inBatchMode);
 
   root.containerOpen = false;
   do_check_eq(resultObserver.closedContainer, resultObserver.openedContainer);
   result.removeObserver(resultObserver);
@@ -231,23 +231,23 @@ add_test(function check_mixed_query() {
   var root = result.root;
   root.containerOpen = true;
 
   do_check_neq(resultObserver.openedContainer, null);
 
   // nsINavHistoryResultObserver.batching
   do_check_false(resultObserver.inBatchMode);
   histsvc.runInBatchMode({
-    runBatched: function(aUserData) {
+    runBatched(aUserData) {
       do_check_true(resultObserver.inBatchMode);
     }
   }, null);
   do_check_false(resultObserver.inBatchMode);
   bmsvc.runInBatchMode({
-    runBatched: function(aUserData) {
+    runBatched(aUserData) {
       do_check_true(resultObserver.inBatchMode);
     }
   }, null);
   do_check_false(resultObserver.inBatchMode);
 
   root.containerOpen = false;
   do_check_eq(resultObserver.closedContainer, resultObserver.openedContainer);
   result.removeObserver(resultObserver);
--- a/toolkit/components/places/tests/unit/test_onItemChanged_tags.js
+++ b/toolkit/components/places/tests/unit/test_onItemChanged_tags.js
@@ -17,36 +17,36 @@ function run_test() {
   PlacesUtils.tagging.tagURI(uri, tags);
 
   let bookmarksObserver = {
     QueryInterface: XPCOMUtils.generateQI([
       Ci.nsINavBookmarkObserver
     ]),
 
     _changedCount: 0,
-    onItemChanged: function(aItemId, aProperty, aIsAnnotationProperty, aValue,
+    onItemChanged(aItemId, aProperty, aIsAnnotationProperty, aValue,
                             aLastModified, aItemType) {
       if (aProperty == "tags") {
         do_check_eq(aItemId, id);
         this._changedCount++;
       }
     },
 
-    onItemRemoved: function(aItemId, aParentId, aIndex, aItemType) {
+    onItemRemoved(aItemId, aParentId, aIndex, aItemType) {
       if (aItemId == id) {
         PlacesUtils.bookmarks.removeObserver(this);
         do_check_eq(this._changedCount, 2);
         do_test_finished();
       }
     },
 
-    onItemAdded: function() {},
-    onBeginUpdateBatch: function() {},
-    onEndUpdateBatch: function() {},
-    onItemVisited: function() {},
-    onItemMoved: function() {},
+    onItemAdded() {},
+    onBeginUpdateBatch() {},
+    onEndUpdateBatch() {},
+    onItemVisited() {},
+    onItemMoved() {},
   };
   PlacesUtils.bookmarks.addObserver(bookmarksObserver, false);
 
   PlacesUtils.tagging.tagURI(uri, ["d"]);
   PlacesUtils.tagging.tagURI(uri, ["e"]);
   PlacesUtils.bookmarks.removeItem(id);
 }
--- a/toolkit/components/places/tests/unit/test_placesTxn.js
+++ b/toolkit/components/places/tests/unit/test_placesTxn.js
@@ -21,86 +21,86 @@ function* promiseKeyword(keyword, href, 
 
     yield new Promise(resolve => do_timeout(100, resolve));
   }
 }
 
 // create and add bookmarks observer
 var observer = {
 
-  onBeginUpdateBatch: function() {
+  onBeginUpdateBatch() {
     this._beginUpdateBatch = true;
   },
   _beginUpdateBatch: false,
 
-  onEndUpdateBatch: function() {
+  onEndUpdateBatch() {
     this._endUpdateBatch = true;
   },
   _endUpdateBatch: false,
 
-  onItemAdded: function(id, folder, index, itemType, uri) {
+  onItemAdded(id, folder, index, itemType, uri) {
     this._itemAddedId = id;
     this._itemAddedParent = folder;
     this._itemAddedIndex = index;
     this._itemAddedType = itemType;
   },
   _itemAddedId: null,
   _itemAddedParent: null,
   _itemAddedIndex: null,
   _itemAddedType: null,
 
-  onItemRemoved: function(id, folder, index, itemType) {
+  onItemRemoved(id, folder, index, itemType) {
     this._itemRemovedId = id;
     this._itemRemovedFolder = folder;
     this._itemRemovedIndex = index;
   },
   _itemRemovedId: null,
   _itemRemovedFolder: null,
   _itemRemovedIndex: null,
 
-  onItemChanged: function(id, property, isAnnotationProperty, newValue,
+  onItemChanged(id, property, isAnnotationProperty, newValue,
                           lastModified, itemType) {
     // The transaction manager is being rewritten in bug 891303, so just
     // skip checking this for now.
     if (property == "tags")
       return;
     this._itemChangedId = id;
     this._itemChangedProperty = property;
     this._itemChanged_isAnnotationProperty = isAnnotationProperty;
     this._itemChangedValue = newValue;
   },
   _itemChangedId: null,
   _itemChangedProperty: null,
   _itemChanged_isAnnotationProperty: null,
   _itemChangedValue: null,
 
-  onItemVisited: function(id, visitID, time) {
+  onItemVisited(id, visitID, time) {
     this._itemVisitedId = id;
     this._itemVisitedVistId = visitID;
     this._itemVisitedTime = time;
   },
   _itemVisitedId: null,
   _itemVisitedVistId: null,
   _itemVisitedTime: null,
 
-  onItemMoved: function(id, oldParent, oldIndex, newParent, newIndex,
+  onItemMoved(id, oldParent, oldIndex, newParent, newIndex,
                         itemType) {
     this._itemMovedId = id;
     this._itemMovedOldParent = oldParent;
     this._itemMovedOldIndex = oldIndex;
     this._itemMovedNewParent = newParent;
     this._itemMovedNewIndex = newIndex;
   },
   _itemMovedId: null,
   _itemMovedOldParent: null,
   _itemMovedOldIndex: null,
   _itemMovedNewParent: null,
   _itemMovedNewIndex: null,
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsINavBookmarkObserver) ||
         iid.equals(Ci.nsISupports)) {
       return this;
     }
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 };
 
--- a/toolkit/components/places/tests/unit/test_preventive_maintenance.js
+++ b/toolkit/components/places/tests/unit/test_preventive_maintenance.js
@@ -76,17 +76,17 @@ var tests = [];
 
 tests.push({
   name: "A.1",
   desc: "Remove obsolete annotations from moz_annos",
 
   _obsoleteWeaveAttribute: "weave/test",
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid.
     this._placeId = addPlace();
     // Add an obsolete attribute.
     let stmt = mDBConn.createStatement(
       "INSERT INTO moz_anno_attributes (name) VALUES (:anno)"
     );
     stmt.params['anno'] = this._obsoleteWeaveAttribute;
     stmt.execute();
@@ -98,17 +98,17 @@ tests.push({
        )`
     );
     stmt.params['place_id'] = this._placeId;
     stmt.params['anno'] = this._obsoleteWeaveAttribute;
     stmt.execute();
     stmt.finalize();
   },
 
-  check: function() {
+  check() {
     // Check that the obsolete annotation has been removed.
     let stmt = mDBConn.createStatement(
       "SELECT id FROM moz_anno_attributes WHERE name = :anno"
     );
     stmt.params['anno'] = this._obsoleteWeaveAttribute;
     do_check_false(stmt.executeStep());
     stmt.finalize();
   }
@@ -119,17 +119,17 @@ tests.push({
   desc: "Remove obsolete annotations from moz_items_annos",
 
   _obsoleteSyncAttribute: "sync/children",
   _obsoleteGuidAttribute: "placesInternal/GUID",
   _obsoleteWeaveAttribute: "weave/test",
   _placeId: null,
   _bookmarkId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid.
     this._placeId = addPlace();
     // Add a bookmark.
     this._bookmarkId = addBookmark(this._placeId);
     // Add an obsolete attribute.
     let stmt = mDBConn.createStatement(
       `INSERT INTO moz_anno_attributes (name)
        VALUES (:anno1), (:anno2), (:anno3)`
@@ -148,17 +148,17 @@ tests.push({
     stmt.params['item_id'] = this._bookmarkId;
     stmt.params['anno1'] = this._obsoleteSyncAttribute;
     stmt.params['anno2'] = this._obsoleteGuidAttribute;
     stmt.params['anno3'] = this._obsoleteWeaveAttribute;
     stmt.execute();
     stmt.finalize();
   },
 
-  check: function() {
+  check() {
     // Check that the obsolete annotations have been removed.
     let stmt = mDBConn.createStatement(
       `SELECT id FROM moz_anno_attributes
        WHERE name IN (:anno1, :anno2, :anno3)`
     );
     stmt.params['anno1'] = this._obsoleteSyncAttribute;
     stmt.params['anno2'] = this._obsoleteGuidAttribute;
     stmt.params['anno3'] = this._obsoleteWeaveAttribute;
@@ -172,17 +172,17 @@ tests.push({
   desc: "Remove unused attributes",
 
   _usedPageAttribute: "usedPage",
   _usedItemAttribute: "usedItem",
   _unusedAttribute: "unused",
   _placeId: null,
   _bookmarkId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this._placeId = addPlace();
     // add a bookmark
     this._bookmarkId = addBookmark(this._placeId);
     // Add a used attribute and an unused one.
     let stmt = mDBConn.createStatement("INSERT INTO moz_anno_attributes (name) VALUES (:anno)");
     stmt.params['anno'] = this._usedPageAttribute;
     stmt.execute();
@@ -201,17 +201,17 @@ tests.push({
     stmt.finalize();
     stmt = mDBConn.createStatement("INSERT INTO moz_items_annos (item_id, anno_attribute_id) VALUES(:item_id, (SELECT id FROM moz_anno_attributes WHERE name = :anno))");
     stmt.params['item_id'] = this._bookmarkId;
     stmt.params['anno'] = this._usedItemAttribute;
     stmt.execute();
     stmt.finalize();
   },
 
-  check: function() {
+  check() {
     // Check that used attributes are still there
     let stmt = mDBConn.createStatement("SELECT id FROM moz_anno_attributes WHERE name = :anno");
     stmt.params['anno'] = this._usedPageAttribute;
     do_check_true(stmt.executeStep());
     stmt.reset();
     stmt.params['anno'] = this._usedItemAttribute;
     do_check_true(stmt.executeStep());
     stmt.reset();
@@ -226,17 +226,17 @@ tests.push({
 
 tests.push({
   name: "B.1",
   desc: "Remove annotations with an invalid attribute",
 
   _usedPageAttribute: "usedPage",
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this._placeId = addPlace();
     // Add a used attribute.
     let stmt = mDBConn.createStatement("INSERT INTO moz_anno_attributes (name) VALUES (:anno)");
     stmt.params['anno'] = this._usedPageAttribute;
     stmt.execute();
     stmt.finalize();
     stmt = mDBConn.createStatement("INSERT INTO moz_annos (place_id, anno_attribute_id) VALUES(:place_id, (SELECT id FROM moz_anno_attributes WHERE name = :anno))");
@@ -246,17 +246,17 @@ tests.push({
     stmt.finalize();
     // Add an annotation with a nonexistent attribute
     stmt = mDBConn.createStatement("INSERT INTO moz_annos (place_id, anno_attribute_id) VALUES(:place_id, 1337)");
     stmt.params['place_id'] = this._placeId;
     stmt.execute();
     stmt.finalize();
   },
 
-  check: function() {
+  check() {
     // Check that used attribute is still there
     let stmt = mDBConn.createStatement("SELECT id FROM moz_anno_attributes WHERE name = :anno");
     stmt.params['anno'] = this._usedPageAttribute;
     do_check_true(stmt.executeStep());
     stmt.finalize();
     // check that annotation with valid attribute is still there
     stmt = mDBConn.createStatement("SELECT id FROM moz_annos WHERE anno_attribute_id = (SELECT id FROM moz_anno_attributes WHERE name = :anno)");
     stmt.params['anno'] = this._usedPageAttribute;
@@ -273,17 +273,17 @@ tests.push({
 
 tests.push({
   name: "B.2",
   desc: "Remove orphan page annotations",
 
   _usedPageAttribute: "usedPage",
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this._placeId = addPlace();
     // Add a used attribute.
     let stmt = mDBConn.createStatement("INSERT INTO moz_anno_attributes (name) VALUES (:anno)");
     stmt.params['anno'] = this._usedPageAttribute;
     stmt.execute();
     stmt.finalize();
     stmt = mDBConn.createStatement("INSERT INTO moz_annos (place_id, anno_attribute_id) VALUES(:place_id, (SELECT id FROM moz_anno_attributes WHERE name = :anno))");
@@ -293,17 +293,17 @@ tests.push({
     stmt.reset();
     // Add an annotation to a nonexistent page
     stmt.params['place_id'] = 1337;
     stmt.params['anno'] = this._usedPageAttribute;
     stmt.execute();
     stmt.finalize();
   },
 
-  check: function() {
+  check() {
     // Check that used attribute is still there
     let stmt = mDBConn.createStatement("SELECT id FROM moz_anno_attributes WHERE name = :anno");
     stmt.params['anno'] = this._usedPageAttribute;
     do_check_true(stmt.executeStep());
     stmt.finalize();
     // check that annotation with valid attribute is still there
     stmt = mDBConn.createStatement("SELECT id FROM moz_annos WHERE anno_attribute_id = (SELECT id FROM moz_anno_attributes WHERE name = :anno)");
     stmt.params['anno'] = this._usedPageAttribute;
@@ -316,57 +316,57 @@ tests.push({
   }
 });
 
 // ------------------------------------------------------------------------------
 tests.push({
   name: "C.1",
   desc: "fix missing Places root",
 
-  setup: function() {
+  setup() {
     // Sanity check: ensure that roots are intact.
     do_check_eq(bs.getFolderIdForItem(bs.placesRoot), 0);
     do_check_eq(bs.getFolderIdForItem(bs.bookmarksMenuFolder), bs.placesRoot);
     do_check_eq(bs.getFolderIdForItem(bs.tagsFolder), bs.placesRoot);
     do_check_eq(bs.getFolderIdForItem(bs.unfiledBookmarksFolder), bs.placesRoot);
     do_check_eq(bs.getFolderIdForItem(bs.toolbarFolder), bs.placesRoot);
 
     // Remove the root.
     mDBConn.executeSimpleSQL("DELETE FROM moz_bookmarks WHERE parent = 0");
     let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE parent = 0");
     do_check_false(stmt.executeStep());
     stmt.finalize();
   },
 
-  check: function() {
+  check() {
     // Ensure the roots have been correctly restored.
     do_check_eq(bs.getFolderIdForItem(bs.placesRoot), 0);
     do_check_eq(bs.getFolderIdForItem(bs.bookmarksMenuFolder), bs.placesRoot);
     do_check_eq(bs.getFolderIdForItem(bs.tagsFolder), bs.placesRoot);
     do_check_eq(bs.getFolderIdForItem(bs.unfiledBookmarksFolder), bs.placesRoot);
     do_check_eq(bs.getFolderIdForItem(bs.toolbarFolder), bs.placesRoot);
   }
 });
 
 // ------------------------------------------------------------------------------
 tests.push({
   name: "C.2",
   desc: "Fix roots titles",
 
-  setup: function() {
+  setup() {
     // Sanity check: ensure that roots titles are correct. We can use our check.
     this.check();
     // Change some roots' titles.
     bs.setItemTitle(bs.placesRoot, "bad title");
     do_check_eq(bs.getItemTitle(bs.placesRoot), "bad title");
     bs.setItemTitle(bs.unfiledBookmarksFolder, "bad title");
     do_check_eq(bs.getItemTitle(bs.unfiledBookmarksFolder), "bad title");
   },
 
-  check: function() {
+  check() {
     // Ensure all roots titles are correct.
     do_check_eq(bs.getItemTitle(bs.placesRoot), "");
     do_check_eq(bs.getItemTitle(bs.bookmarksMenuFolder),
                 PlacesUtils.getString("BookmarksMenuFolderTitle"));
     do_check_eq(bs.getItemTitle(bs.tagsFolder),
                 PlacesUtils.getString("TagsFolderTitle"));
     do_check_eq(bs.getItemTitle(bs.unfiledBookmarksFolder),
                 PlacesUtils.getString("OtherBookmarksFolderTitle"));
@@ -380,26 +380,26 @@ tests.push({
 tests.push({
   name: "D.1",
   desc: "Remove items without a valid place",
 
   _validItemId: null,
   _invalidItemId: null,
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this.placeId = addPlace();
     // Insert a valid bookmark
     this._validItemId = addBookmark(this.placeId);
     // Insert a bookmark with an invalid place
     this._invalidItemId = addBookmark(1337);
   },
 
-  check: function() {
+  check() {
     // Check that valid bookmark is still there
     let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE id = :item_id");
     stmt.params["item_id"] = this._validItemId;
     do_check_true(stmt.executeStep());
     stmt.reset();
     // Check that invalid bookmark has been removed
     stmt.params["item_id"] = this._invalidItemId;
     do_check_false(stmt.executeStep());
@@ -414,30 +414,30 @@ tests.push({
   desc: "Remove items that are not uri bookmarks from tag containers",
 
   _tagId: null,
   _bookmarkId: null,
   _separatorId: null,
   _folderId: null,
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this._placeId = addPlace();
     // Create a tag
     this._tagId = addBookmark(null, bs.TYPE_FOLDER, bs.tagsFolder);
     // Insert a bookmark in the tag
     this._bookmarkId = addBookmark(this._placeId, bs.TYPE_BOOKMARK, this._tagId);
     // Insert a separator in the tag
     this._separatorId = addBookmark(null, bs.TYPE_SEPARATOR, this._tagId);
     // Insert a folder in the tag
     this._folderId = addBookmark(null, bs.TYPE_FOLDER, this._tagId);
   },
 
-  check: function() {
+  check() {
     // Check that valid bookmark is still there
     let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE type = :type AND parent = :parent");
     stmt.params["type"] = bs.TYPE_BOOKMARK;
     stmt.params["parent"] = this._tagId;
     do_check_true(stmt.executeStep());
     stmt.reset();
     // Check that separator is no more there
     stmt.params["type"] = bs.TYPE_SEPARATOR;
@@ -458,28 +458,28 @@ tests.push({
   name: "D.3",
   desc: "Remove empty tags",
 
   _tagId: null,
   _bookmarkId: null,
   _emptyTagId: null,
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this._placeId = addPlace();
     // Create a tag
     this._tagId = addBookmark(null, bs.TYPE_FOLDER, bs.tagsFolder);
     // Insert a bookmark in the tag
     this._bookmarkId = addBookmark(this._placeId, bs.TYPE_BOOKMARK, this._tagId);
     // Create another tag (empty)
     this._emptyTagId = addBookmark(null, bs.TYPE_FOLDER, bs.tagsFolder);
   },
 
-  check: function() {
+  check() {
     // Check that valid bookmark is still there
     let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE id = :id AND type = :type AND parent = :parent");
     stmt.params["id"] = this._bookmarkId;
     stmt.params["type"] = bs.TYPE_BOOKMARK;
     stmt.params["parent"] = this._tagId;
     do_check_true(stmt.executeStep());
     stmt.reset();
     stmt.params["id"] = this._tagId;
@@ -502,30 +502,30 @@ tests.push({
   desc: "Move orphan items to unsorted folder",
 
   _orphanBookmarkId: null,
   _orphanSeparatorId: null,
   _orphanFolderId: null,
   _bookmarkId: null,
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this._placeId = addPlace();
     // Insert an orphan bookmark
     this._orphanBookmarkId = addBookmark(this._placeId, bs.TYPE_BOOKMARK, 8888);
     // Insert an orphan separator
     this._orphanSeparatorId = addBookmark(null, bs.TYPE_SEPARATOR, 8888);
     // Insert a orphan folder
     this._orphanFolderId = addBookmark(null, bs.TYPE_FOLDER, 8888);
     // Create a child of the last created folder
     this._bookmarkId = addBookmark(this._placeId, bs.TYPE_BOOKMARK, this._orphanFolderId);
   },
 
-  check: function() {
+  check() {
     // Check that bookmarks are now children of a real folder (unsorted)
     let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE id = :item_id AND parent = :parent");
     stmt.params["item_id"] = this._orphanBookmarkId;
     stmt.params["parent"] = bs.unfiledBookmarksFolder;
     do_check_true(stmt.executeStep());
     stmt.reset();
     stmt.params["item_id"] = this._orphanSeparatorId;
     stmt.params["parent"] = bs.unfiledBookmarksFolder;
@@ -547,26 +547,26 @@ tests.push({
 tests.push({
   name: "D.6",
   desc: "Fix wrong item types | bookmarks",
 
   _separatorId: null,
   _folderId: null,
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this._placeId = addPlace();
     // Add a separator with a fk
     this._separatorId = addBookmark(this._placeId, bs.TYPE_SEPARATOR);
     // Add a folder with a fk
     this._folderId = addBookmark(this._placeId, bs.TYPE_FOLDER);
   },
 
-  check: function() {
+  check() {
     // Check that items with an fk have been converted to bookmarks
     let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE id = :item_id AND type = :type");
     stmt.params["item_id"] = this._separatorId;
     stmt.params["type"] = bs.TYPE_BOOKMARK;
     do_check_true(stmt.executeStep());
     stmt.reset();
     stmt.params["item_id"] = this._folderId;
     stmt.params["type"] = bs.TYPE_BOOKMARK;
@@ -580,26 +580,26 @@ tests.push({
 tests.push({
   name: "D.7",
   desc: "Fix wrong item types | bookmarks",
 
   _validBookmarkId: null,
   _invalidBookmarkId: null,
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this._placeId = addPlace();
     // Add a bookmark with a valid place id
     this._validBookmarkId = addBookmark(this._placeId, bs.TYPE_BOOKMARK);
     // Add a bookmark with a null place id
     this._invalidBookmarkId = addBookmark(null, bs.TYPE_BOOKMARK);
   },
 
-  check: function() {
+  check() {
     // Check valid bookmark
     let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE id = :item_id AND type = :type");
     stmt.params["item_id"] = this._validBookmarkId;
     stmt.params["type"] = bs.TYPE_BOOKMARK;
     do_check_true(stmt.executeStep());
     stmt.reset();
     // Check invalid bookmark has been converted to a folder
     stmt.params["item_id"] = this._invalidBookmarkId;
@@ -616,29 +616,29 @@ tests.push({
   desc: "Fix wrong parents",
 
   _bookmarkId: null,
   _separatorId: null,
   _bookmarkId1: null,
   _bookmarkId2: null,
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this._placeId = addPlace();
     // Insert a bookmark
     this._bookmarkId = addBookmark(this._placeId, bs.TYPE_BOOKMARK);
     // Insert a separator
     this._separatorId = addBookmark(null, bs.TYPE_SEPARATOR);
     // Create 3 children of these items
     this._bookmarkId1 = addBookmark(this._placeId, bs.TYPE_BOOKMARK, this._bookmarkId);
     this._bookmarkId2 = addBookmark(this._placeId, bs.TYPE_BOOKMARK, this._separatorId);
   },
 
-  check: function() {
+  check() {
     // Check that bookmarks are now children of a real folder (unsorted)
     let stmt = mDBConn.createStatement("SELECT id FROM moz_bookmarks WHERE id = :item_id AND parent = :parent");
     stmt.params["item_id"] = this._bookmarkId1;
     stmt.params["parent"] = bs.unfiledBookmarksFolder;
     do_check_true(stmt.executeStep());
     stmt.reset();
     stmt.params["item_id"] = this._bookmarkId2;
     stmt.params["parent"] = bs.unfiledBookmarksFolder;
@@ -651,20 +651,20 @@ tests.push({
 
 tests.push({
   name: "D.10",
   desc: "Recalculate positions",
 
   _unfiledBookmarks: [],
   _toolbarBookmarks: [],
 
-  setup: function() {
+  setup() {
     const NUM_BOOKMARKS = 20;
     bs.runInBatchMode({
-      runBatched: function(aUserData) {
+      runBatched(aUserData) {
         // Add bookmarks to two folders to better perturbate the table.
         for (let i = 0; i < NUM_BOOKMARKS; i++) {
           bs.insertBookmark(PlacesUtils.unfiledBookmarksFolderId,
                             NetUtil.newURI("http://example.com/"),
                             bs.DEFAULT_INDEX, "testbookmark");
         }
         for (let i = 0; i < NUM_BOOKMARKS; i++) {
           bs.insertBookmark(PlacesUtils.toolbarFolderId,
@@ -706,17 +706,17 @@ tests.push({
     }
 
     // Set random positions for the added bookmarks.
     randomize_positions(PlacesUtils.unfiledBookmarksFolderId,
                         this._unfiledBookmarks);
     randomize_positions(PlacesUtils.toolbarFolderId, this._toolbarBookmarks);
   },
 
-  check: function() {
+  check() {
     function check_order(aParent, aResultArray) {
       // Build the expected ordered list of bookmarks.
       let stmt = mDBConn.createStatement(
         `SELECT id, position FROM moz_bookmarks WHERE parent = :parent
          ORDER BY position ASC`
       );
       stmt.params["parent"] = aParent;
       let pass = true;
@@ -739,34 +739,34 @@ tests.push({
 });
 
 // ------------------------------------------------------------------------------
 
 tests.push({
   name: "D.12",
   desc: "Fix empty-named tags",
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     let placeId = addPlace();
     // Create a empty-named tag.
     this._untitledTagId = addBookmark(null, bs.TYPE_FOLDER, bs.tagsFolder, null, null, "");
     // Insert a bookmark in the tag, otherwise it will be removed.
     addBookmark(placeId, bs.TYPE_BOOKMARK, this._untitledTagId);
     // Create a empty-named folder.
     this._untitledFolderId = addBookmark(null, bs.TYPE_FOLDER, bs.toolbarFolder, null, null, "");
     // Create a titled tag.
     this._titledTagId = addBookmark(null, bs.TYPE_FOLDER, bs.tagsFolder, null, null, "titledTag");
     // Insert a bookmark in the tag, otherwise it will be removed.
     addBookmark(placeId, bs.TYPE_BOOKMARK, this._titledTagId);
     // Create a titled folder.
     this._titledFolderId = addBookmark(null, bs.TYPE_FOLDER, bs.toolbarFolder, null, null, "titledFolder");
   },
 
-  check: function() {
+  check() {
     // Check that valid bookmark is still there
     let stmt = mDBConn.createStatement(
       "SELECT title FROM moz_bookmarks WHERE id = :id"
     );
     stmt.params["id"] = this._untitledTagId;
     do_check_true(stmt.executeStep());
     do_check_eq(stmt.row.title, "(notitle)");
     stmt.reset();
@@ -788,32 +788,32 @@ tests.push({
 // ------------------------------------------------------------------------------
 
 tests.push({
   name: "E.1",
   desc: "Remove orphan icons",
 
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Insert favicon entries
     let stmt = mDBConn.createStatement("INSERT INTO moz_favicons (id, url) VALUES(:favicon_id, :url)");
     stmt.params["favicon_id"] = 1;
     stmt.params["url"] = "http://www1.mozilla.org/favicon.ico";
     stmt.execute();
     stmt.reset();
     stmt.params["favicon_id"] = 2;
     stmt.params["url"] = "http://www2.mozilla.org/favicon.ico";
     stmt.execute();
     stmt.finalize();
     // Insert a place using the existing favicon entry
     this._placeId = addPlace("http://www.mozilla.org", 1);
   },
 
-  check: function() {
+  check() {
     // Check that used icon is still there
     let stmt = mDBConn.createStatement("SELECT id FROM moz_favicons WHERE id = :favicon_id");
     stmt.params["favicon_id"] = 1;
     do_check_true(stmt.executeStep());
     stmt.reset();
     // Check that unused icon has been removed
     stmt.params["favicon_id"] = 2;
     do_check_false(stmt.executeStep());
@@ -825,30 +825,30 @@ tests.push({
 
 tests.push({
   name: "F.1",
   desc: "Remove orphan visits",
 
   _placeId: null,
   _invalidPlaceId: 1337,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this._placeId = addPlace();
     // Add a valid visit and an invalid one
     let stmt = mDBConn.createStatement("INSERT INTO moz_historyvisits(place_id) VALUES (:place_id)");
     stmt.params["place_id"] = this._placeId;
     stmt.execute();
     stmt.reset();
     stmt.params["place_id"] = this._invalidPlaceId;
     stmt.execute();
     stmt.finalize();
   },
 
-  check: function() {
+  check() {
     // Check that valid visit is still there
     let stmt = mDBConn.createStatement("SELECT id FROM moz_historyvisits WHERE place_id = :place_id");
     stmt.params["place_id"] = this._placeId;
     do_check_true(stmt.executeStep());
     stmt.reset();
     // Check that invalid visit has been removed
     stmt.params["place_id"] = this._invalidPlaceId;
     do_check_false(stmt.executeStep());
@@ -860,32 +860,32 @@ tests.push({
 
 tests.push({
   name: "G.1",
   desc: "Remove orphan input history",
 
   _placeId: null,
   _invalidPlaceId: 1337,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this._placeId = addPlace();
     // Add input history entries
     let stmt = mDBConn.createStatement("INSERT INTO moz_inputhistory (place_id, input) VALUES (:place_id, :input)");
     stmt.params["place_id"] = this._placeId;
     stmt.params["input"] = "moz";
     stmt.execute();
     stmt.reset();
     stmt.params["place_id"] = this._invalidPlaceId;
     stmt.params["input"] = "moz";
     stmt.execute();
     stmt.finalize();
   },
 
-  check: function() {
+  check() {
     // Check that inputhistory on valid place is still there
     let stmt = mDBConn.createStatement("SELECT place_id FROM moz_inputhistory WHERE place_id = :place_id");
     stmt.params["place_id"] = this._placeId;
     do_check_true(stmt.executeStep());
     stmt.reset();
     // Check that inputhistory on invalid place has gone
     stmt.params["place_id"] = this._invalidPlaceId;
     do_check_false(stmt.executeStep());
@@ -898,17 +898,17 @@ tests.push({
 tests.push({
   name: "H.1",
   desc: "Remove item annos with an invalid attribute",
 
   _usedItemAttribute: "usedItem",
   _bookmarkId: null,
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this._placeId = addPlace();
     // Insert a bookmark
     this._bookmarkId = addBookmark(this._placeId);
     // Add a used attribute.
     let stmt = mDBConn.createStatement("INSERT INTO moz_anno_attributes (name) VALUES (:anno)");
     stmt.params['anno'] = this._usedItemAttribute;
     stmt.execute();
@@ -920,17 +920,17 @@ tests.push({
     stmt.finalize();
     // Add an annotation with a nonexistent attribute
     stmt = mDBConn.createStatement("INSERT INTO moz_items_annos (item_id, anno_attribute_id) VALUES(:item_id, 1337)");
     stmt.params['item_id'] = this._bookmarkId;
     stmt.execute();
     stmt.finalize();
   },
 
-  check: function() {
+  check() {
     // Check that used attribute is still there
     let stmt = mDBConn.createStatement("SELECT id FROM moz_anno_attributes WHERE name = :anno");
     stmt.params['anno'] = this._usedItemAttribute;
     do_check_true(stmt.executeStep());
     stmt.finalize();
     // check that annotation with valid attribute is still there
     stmt = mDBConn.createStatement("SELECT id FROM moz_items_annos WHERE anno_attribute_id = (SELECT id FROM moz_anno_attributes WHERE name = :anno)");
     stmt.params['anno'] = this._usedItemAttribute;
@@ -949,17 +949,17 @@ tests.push({
   name: "H.2",
   desc: "Remove orphan item annotations",
 
   _usedItemAttribute: "usedItem",
   _bookmarkId: null,
   _invalidBookmarkId: 8888,
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Add a place to ensure place_id = 1 is valid
     this._placeId = addPlace();
     // Insert a bookmark
     this._bookmarkId = addBookmark(this._placeId);
     // Add a used attribute.
     let stmt = mDBConn.createStatement("INSERT INTO moz_anno_attributes (name) VALUES (:anno)");
     stmt.params['anno'] = this._usedItemAttribute;
     stmt.execute();
@@ -971,17 +971,17 @@ tests.push({
     stmt.reset();
     // Add an annotation to a nonexistent item
     stmt.params["item_id"] = this._invalidBookmarkId;
     stmt.params["anno"] = this._usedItemAttribute;
     stmt.execute();
     stmt.finalize();
   },
 
-  check: function() {
+  check() {
     // Check that used attribute is still there
     let stmt = mDBConn.createStatement("SELECT id FROM moz_anno_attributes WHERE name = :anno");
     stmt.params['anno'] = this._usedItemAttribute;
     do_check_true(stmt.executeStep());
     stmt.finalize();
     // check that annotation with valid attribute is still there
     stmt = mDBConn.createStatement("SELECT id FROM moz_items_annos WHERE anno_attribute_id = (SELECT id FROM moz_anno_attributes WHERE name = :anno)");
     stmt.params['anno'] = this._usedItemAttribute;
@@ -999,27 +999,27 @@ tests.push({
 
 tests.push({
   name: "I.1",
   desc: "Remove unused keywords",
 
   _bookmarkId: null,
   _placeId: null,
 
-  setup: function() {
+  setup() {
     // Insert 2 keywords
     let stmt = mDBConn.createStatement("INSERT INTO moz_keywords (id, keyword, place_id) VALUES(:id, :keyword, :place_id)");
     stmt.params["id"] = 1;
     stmt.params["keyword"] = "unused";
     stmt.params["place_id"] = 100;
     stmt.execute();
     stmt.finalize();
   },
 
-  check: function() {
+  check() {
     // Check that "used" keyword is still there
     let stmt = mDBConn.createStatement("SELECT id FROM moz_keywords WHERE keyword = :keyword");
     // Check that "unused" keyword has gone
     stmt.params["keyword"] = "unused";
     do_check_false(stmt.executeStep());
     stmt.finalize();
   }
 });
@@ -1029,30 +1029,30 @@ tests.push({
 
 tests.push({
   name: "L.1",
   desc: "Fix wrong favicon ids",
 
   _validIconPlaceId: null,
   _invalidIconPlaceId: null,
 
-  setup: function() {
+  setup() {
     // Insert a favicon entry
     let stmt = mDBConn.createStatement("INSERT INTO moz_favicons (id, url) VALUES(1, :url)");
     stmt.params["url"] = "http://www.mozilla.org/favicon.ico";
     stmt.execute();
     stmt.finalize();
     // Insert a place using the existing favicon entry
     this._validIconPlaceId = addPlace("http://www1.mozilla.org", 1);
 
     // Insert a place using a nonexistent favicon entry
     this._invalidIconPlaceId = addPlace("http://www2.mozilla.org", 1337);
   },
 
-  check: function() {
+  check() {
     // Check that bogus favicon is not there
     let stmt = mDBConn.createStatement("SELECT id FROM moz_places WHERE favicon_id = :favicon_id");
     stmt.params["favicon_id"] = 1337;
     do_check_false(stmt.executeStep());
     stmt.reset();
     // Check that valid favicon is still there
     stmt.params["favicon_id"] = 1;
     do_check_true(stmt.executeStep());
@@ -1069,17 +1069,17 @@ tests.push({
 });
 
 // ------------------------------------------------------------------------------
 
 tests.push({
   name: "L.2",
   desc: "Recalculate visit_count and last_visit_date",
 
-  setup: function* () {
+  *setup() {
     function setVisitCount(aURL, aValue) {
       let stmt = mDBConn.createStatement(
         `UPDATE moz_places SET visit_count = :count WHERE url_hash = hash(:url)
                                                       AND url = :url`
       );
       stmt.params.count = aValue;
       stmt.params.url = aURL;
       stmt.execute();
@@ -1127,17 +1127,17 @@ tests.push({
     setLastVisitDate(url, now++);
     // Add a page without visits and set wrong stats.
     url = "http://8.moz.org/";
     addPlace(url);
     setVisitCount(url, 10);
     setLastVisitDate(url, now++);
   },
 
-  check: function() {
+  check() {
     let stmt = mDBConn.createStatement(
       `SELECT h.id FROM moz_places h
        JOIN moz_historyvisits v ON v.place_id = h.id AND visit_type NOT IN (0,4,7,8,9)
        GROUP BY h.id HAVING h.visit_count <> count(*)
        UNION ALL
        SELECT h.id FROM moz_places h
        JOIN moz_historyvisits v ON v.place_id = h.id
        GROUP BY h.id HAVING h.last_visit_date <> MAX(v.visit_date)`
@@ -1163,33 +1163,33 @@ tests.push({
         transition: TRANSITION_REDIRECT_TEMPORARY,
         referrer: NetUtil.newURI("http://l3.moz.org/redirecting/") },
       { uri: NetUtil.newURI("http://l3.moz.org/target/"),
         transition: TRANSITION_REDIRECT_PERMANENT,
         referrer: NetUtil.newURI("http://l3.moz.org/redirecting2/") },
     ]);
   },
 
-  check: function() {
+  check() {
     return new Promise(resolve => {
       let stmt = mDBConn.createAsyncStatement(
         "SELECT h.url FROM moz_places h WHERE h.hidden = 1"
       );
       stmt.executeAsync({
         _count: 0,
-        handleResult: function(aResultSet) {
+        handleResult(aResultSet) {
           for (let row; (row = aResultSet.getNextRow());) {
             let url = row.getResultByIndex(0);
             do_check_true(/redirecting/.test(url));
             this._count++;
           }
         },
-        handleError: function(aError) {
+        handleError(aError) {
         },
-        handleCompletion: function(aReason) {
+        handleCompletion(aReason) {
           dump_table("moz_places");
           dump_table("moz_historyvisits");
           do_check_eq(aReason, Ci.mozIStorageStatementCallback.REASON_FINISHED);
           do_check_eq(this._count, 2);
           resolve();
         }
       });
       stmt.finalize();
@@ -1259,17 +1259,17 @@ tests.push({
   desc: "Sanity: Preventive maintenance does not touch valid items",
 
   _uri1: uri("http://www1.mozilla.org"),
   _uri2: uri("http://www2.mozilla.org"),
   _folderId: null,
   _bookmarkId: null,
   _separatorId: null,
 
-  setup: function* () {
+  *setup() {
     // use valid api calls to create a bunch of items
     yield PlacesTestUtils.addVisits([
       { uri: this._uri1 },
       { uri: this._uri2 },
     ]);
 
     this._folderId = bs.createFolder(bs.toolbarFolder, "testfolder",
                                      bs.DEFAULT_INDEX);
--- a/toolkit/components/places/tests/unit/test_sql_guid_functions.js
+++ b/toolkit/components/places/tests/unit/test_sql_guid_functions.js
@@ -68,28 +68,28 @@ function test_guid_invariants()
 }
 
 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: function(aResult) {
+    handleResult(aResult) {
       try {
         let row = aResult.getNextRow();
         check_invariants(row.getResultByIndex(0));
         do_check_eq(aResult.getNextRow(), null);
         checked = true;
       }
       catch (e) {
         do_throw(e);
       }
     },
-    handleCompletion: function(aReason) {
+    handleCompletion(aReason) {
       do_check_eq(aReason, Ci.mozIStorageStatementCallback.REASON_FINISHED);
       do_check_true(checked);
       run_next_test();
     }
   });
   stmt.finalize();
 }
 
--- a/toolkit/components/places/tests/unit/test_tag_autocomplete_search.js
+++ b/toolkit/components/places/tests/unit/test_tag_autocomplete_search.js
@@ -20,41 +20,41 @@ AutoCompleteInput.prototype = {
   textValue: "",
   disableAutoComplete: false,
   completeDefaultIndex: false,
 
   get searchCount() {
     return this.searches.length;
   },
 
-  getSearchAt: function(aIndex) {
+  getSearchAt(aIndex) {
     return this.searches[aIndex];
   },
 
-  onSearchBegin: function() {},
-  onSearchComplete: function() {},
+  onSearchBegin() {},
+  onSearchComplete() {},
 
   popupOpen: false,
 
   popup: {
-    setSelectedIndex: function(aIndex) {},
-    invalidate: function() {},
+    setSelectedIndex(aIndex) {},
+    invalidate() {},
 
     // nsISupports implementation
-    QueryInterface: function(iid) {
+    QueryInterface(iid) {
       if (iid.equals(Ci.nsISupports) ||
           iid.equals(Ci.nsIAutoCompletePopup))
         return this;
 
       throw Components.results.NS_ERROR_NO_INTERFACE;
     }
   },
 
   // nsISupports implementation
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsISupports) ||
         iid.equals(Ci.nsIAutoCompleteInput))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
--- a/toolkit/components/printing/content/printPreviewProgress.js
+++ b/toolkit/components/printing/content/printPreviewProgress.js
@@ -30,49 +30,49 @@ function ellipseString(aStr, 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: function(aWebProgress, aRequest, aStateFlags, aStatus)
+  onStateChange(aWebProgress, aRequest, aStateFlags, aStatus)
   {
     if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
       window.close();
   },
 
-  onProgressChange: function(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);
     if (docURLStr != docURL && dialog.title != null) {
       docURL = docURLStr;
       if (docTitle == "")
         dialog.title.value = docURLStr;
     }
   },
 
-  onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {},
-  onSecurityChange: function(aWebProgress, aRequest, state) {},
+  onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {},
+  onSecurityChange(aWebProgress, aRequest, state) {},
 
-  onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage)
+  onStatusChange(aWebProgress, aRequest, aStatus, aMessage)
   {
     if (aMessage)
       dialog.title.setAttribute("value", aMessage);
   },
 
-  QueryInterface: function(iid)
+  QueryInterface(iid)
   {
     if (iid.equals(Components.interfaces.nsIWebProgressListener) || iid.equals(Components.interfaces.nsISupportsWeakReference))
       return this;
     throw Components.results.NS_NOINTERFACE;
   }
 }
 
 function onLoad() {
--- a/toolkit/components/printing/content/printProgress.js
+++ b/toolkit/components/printing/content/printProgress.js
@@ -33,17 +33,17 @@ 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: function(aWebProgress, aRequest, aStateFlags, aStatus)
+    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" );
       }
 
@@ -79,17 +79,17 @@ var progressListener = {
           // progress dialog with the mouse long enough).
           opener.focus();
         }
 
         window.close();
       }
     },
 
-    onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress)
+    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 == "") {
@@ -136,33 +136,33 @@ var progressListener = {
       {
         // 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: function(aWebProgress, aRequest, aLocation, aFlags)
+	  onLocationChange(aWebProgress, aRequest, aLocation, aFlags)
     {
       // we can ignore this notification
     },
 
-    onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage)
+    onStatusChange(aWebProgress, aRequest, aStatus, aMessage)
     {
       if (aMessage != "")
         dialog.title.setAttribute("value", aMessage);
     },
 
-    onSecurityChange: function(aWebProgress, aRequest, state)
+    onSecurityChange(aWebProgress, aRequest, state)
     {
       // we can ignore this notification
     },
 
-    QueryInterface : function(iid)
+    QueryInterface(iid)
     {
      if (iid.equals(Components.interfaces.nsIWebProgressListener) || iid.equals(Components.interfaces.nsISupportsWeakReference))
       return this;
 
      throw Components.results.NS_NOINTERFACE;
     }
 };
 
--- a/toolkit/components/printing/content/printUtils.js
+++ b/toolkit/components/printing/content/printUtils.js
@@ -76,17 +76,17 @@ var PrintUtils = {
   },
 
   /**
    * Shows the page setup dialog, and saves any settings changed in
    * that dialog if print.save_print_settings is set to true.
    *
    * @return true on success, false on failure
    */
-  showPageSetup: function() {
+  showPageSetup() {
     try {
       var printSettings = this.getPrintSettings();
       var PRINTPROMPTSVC = Components.classes["@mozilla.org/embedcomp/printingprompt-service;1"]
                                      .getService(Components.interfaces.nsIPrintingPromptService);
       PRINTPROMPTSVC.showPageSetup(window, printSettings, null);
       if (gSavePrintSettings) {
         // Page Setup data is a "native" setting on the Mac
         var PSSVC = Components.classes["@mozilla.org/gfx/printsettings-service;1"]
@@ -103,32 +103,32 @@ 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: function(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: function()
+  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 " +
@@ -181,17 +181,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: function(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;
@@ -249,17 +249,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: function(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);
 
@@ -274,17 +274,17 @@ var PrintUtils = {
 
   /**
    * Returns the nsIWebBrowserPrint from the print preview browser's docShell.
    * This method is being kept here for compatibility reasons, but should not
    * be called by code hoping to support e10s / remote browsers.
    *
    * @return nsIWebBrowserPrint
    */
-  getPrintPreview: function() {
+  getPrintPreview() {
     let Deprecated = Components.utils.import("resource://gre/modules/Deprecated.jsm", {}).Deprecated;
     let text = "getPrintPreview 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,28 +425,28 @@ var PrintUtils = {
         return listener.onStateChange(null, null,
                                       data.stateFlags,
                                       data.status);
       }
     }
     return undefined;
   },
 
-  setPrinterDefaultsForSelectedPrinter: function(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);
   },
 
-  getPrintSettings: function()
+  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);
     }
 
@@ -464,38 +464,38 @@ var PrintUtils = {
       dump("getPrintSettings: " + e + "\n");
     }
     return printSettings;
   },
 
   // This observer is called once the progress dialog has been "opened"
   _obsPP:
   {
-    observe: function(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 : function(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: function(shouldSimplify)
+  setSimplifiedMode(shouldSimplify)
   {
     this._shouldSimplify = shouldSimplify;
   },
 
-  enterPrintPreview: function()
+  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,17 +615,17 @@ var PrintUtils = {
       ppBrowser.focus();
       // on Enter PP Call back
       this._listener.onEnter();
     };
 
     mm.addMessageListener("Printing:Preview:Entered", onEntered);
   },
 
-  exitPrintPreview: function()
+  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
@@ -644,31 +644,31 @@ var PrintUtils = {
       this._sourceBrowser.focus();
     gFocusedElement = null;
 
     this.setSimplifiedMode(false);
 
     this._listener.onExit();
   },
 
-  logTelemetry: function(ID)
+  logTelemetry(ID)
   {
     let histogram = Services.telemetry.getHistogramById(ID);
     histogram.add(true);
   },
 
-  onKeyDownPP: function(aEvent)
+  onKeyDownPP(aEvent)
   {
     // Esc exits the PP
     if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE) {
       PrintUtils.exitPrintPreview();
     }
   },
 
-  onKeyPressPP: function(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;
--- a/toolkit/components/printing/content/printdialog.js
+++ b/toolkit/components/printing/content/printdialog.js
@@ -93,28 +93,26 @@ function getPrinterDescription(printerNa
 // ---------------------------------------------------
 function listElement(aListElement)
   {
     this.listElement = aListElement;
   }
 
 listElement.prototype =
   {
-    clearList:
-      function()
+    clearList()
         {
           // remove the menupopup node child of the menulist.
           var popup = this.listElement.firstChild;
           if (popup) {
             this.listElement.removeChild(popup);
           }
         },
 
-    appendPrinterNames:
-      function(aDataObject)
+    appendPrinterNames(aDataObject)
         {
           if ((null == aDataObject) || !aDataObject.hasMore()) {
             // disable dialog
             this.listElement.setAttribute("value", "");
             this.listElement.setAttribute("label",
               document.getElementById("printingBundle")
                       .getString("noprinter"));
 
--- a/toolkit/components/printing/content/printjoboptions.js
+++ b/toolkit/components/printing/content/printjoboptions.js
@@ -86,25 +86,23 @@ function round10(val)
 // ---------------------------------------------------
 function paperListElement(aPaperListElement)
   {
     this.paperListElement = aPaperListElement;
   }
 
 paperListElement.prototype =
   {
-    clearPaperList:
-      function()
+    clearPaperList()
         {
           // remove the menupopup node child of the menulist.
           this.paperListElement.removeChild(this.paperListElement.firstChild);
         },
 
-    appendPaperNames:
-      function(aDataObject)
+    appendPaperNames(aDataObject)
         {
           var popupNode = document.createElement("menupopup");
           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);
--- a/toolkit/components/privatebrowsing/PrivateBrowsingTrackingProtectionWhitelist.js
+++ b/toolkit/components/privatebrowsing/PrivateBrowsingTrackingProtectionWhitelist.js
@@ -53,16 +53,16 @@ PrivateBrowsingTrackingProtectionWhiteli
    *
    * @param uri nsIURI
    *        The URI to add to the list.
    */
   existsInAllowList(uri) {
     return this._allowlist.indexOf(uri.spec) !== -1;
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     if (topic == "last-pb-context-exited") {
       this._allowlist = [];
     }
   }
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([PrivateBrowsingTrackingProtectionWhitelist]);
--- a/toolkit/components/processsingleton/ContentProcessSingleton.js
+++ b/toolkit/components/processsingleton/ContentProcessSingleton.js
@@ -36,17 +36,17 @@ const MSG_MGR_CONSOLE_VAR_SIZE = 8;
 const MSG_MGR_CONSOLE_INFO_MAX = 1024;
 
 function ContentProcessSingleton() {}
 ContentProcessSingleton.prototype = {
   classID: Components.ID("{ca2a8470-45c7-11e4-916c-0800200c9a66}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                          Ci.nsISupportsWeakReference]),
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
     case "app-startup": {
       Services.obs.addObserver(this, "console-api-log-event", false);
       Services.obs.addObserver(this, "xpcom-shutdown", false);
       cpmm.addMessageListener("DevTools:InitDebuggerServer", this);
       break;
     }
     case "console-api-log-event": {
@@ -99,17 +99,17 @@ ContentProcessSingleton.prototype = {
     case "xpcom-shutdown":
       Services.obs.removeObserver(this, "console-api-log-event");
       Services.obs.removeObserver(this, "xpcom-shutdown");
       cpmm.removeMessageListener("DevTools:InitDebuggerServer", this);
       break;
     }
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     // load devtools component on-demand
     // Only reply if we are in a real content process
     if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
       let {init} = Cu.import("resource://devtools/server/content-server.jsm", {});
       init(message);
     }
   },
 };
--- a/toolkit/components/processsingleton/MainProcessSingleton.js
+++ b/toolkit/components/processsingleton/MainProcessSingleton.js
@@ -13,24 +13,24 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/NetUtil.jsm");
 
 function MainProcessSingleton() {}
 MainProcessSingleton.prototype = {
   classID: Components.ID("{0636a680-45cb-11e4-916c-0800200c9a66}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                          Ci.nsISupportsWeakReference]),
 
-  logConsoleMessage: function(message) {
+  logConsoleMessage(message) {
     let logMsg = message.data;
     logMsg.wrappedJSObject = logMsg;
     Services.obs.notifyObservers(logMsg, "console-api-log-event", null);
   },
 
   // Called when a webpage calls window.external.AddSearchProvider
-  addSearchEngine: function({ target: browser, data: { pageURL, engineURL } }) {
+  addSearchEngine({ target: browser, data: { pageURL, engineURL } }) {
     pageURL = NetUtil.newURI(pageURL);
     engineURL = NetUtil.newURI(engineURL, null, pageURL);
 
     let iconURL;
     let tabbrowser = browser.getTabBrowser();
     if (browser.mIconURL && (!tabbrowser || tabbrowser.shouldLoadFavIcon(pageURL)))
       iconURL = NetUtil.newURI(browser.mIconURL);
 
@@ -60,17 +60,17 @@ MainProcessSingleton.prototype = {
     Services.search.init(function(status) {
       if (status != Cr.NS_OK)
         return;
 
       Services.search.addEngine(engineURL.spec, null, iconURL ? iconURL.spec : null, true);
     })
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
     case "app-startup": {
       Services.obs.addObserver(this, "xpcom-shutdown", false);
 
       // Load this script early so that console.* is initialized
       // before other frame scripts.
       Services.mm.loadFrameScript("chrome://global/content/browser-content.js", true);
       Services.ppmm.loadProcessScript("chrome://global/content/process-content.js", true);
--- a/toolkit/components/promiseworker/PromiseWorker.jsm
+++ b/toolkit/components/promiseworker/PromiseWorker.jsm
@@ -50,52 +50,52 @@ Queue.prototype = {
   }
 };
 
 /**
  * Constructors for decoding standard exceptions received from the
  * worker.
  */
 const EXCEPTION_CONSTRUCTORS = {
-  EvalError: function(error) {
+  EvalError(error) {
     let result = new EvalError(error.message, error.fileName, error.lineNumber);
     result.stack = error.stack;
     return result;
   },
-  InternalError: function(error) {
+  InternalError(error) {
     let result = new InternalError(error.message, error.fileName, error.lineNumber);
     result.stack = error.stack;
     return result;
   },
-  RangeError: function(error) {
+  RangeError(error) {
     let result = new RangeError(error.message, error.fileName, error.lineNumber);
     result.stack = error.stack;
     return result;
   },
-  ReferenceError: function(error) {
+  ReferenceError(error) {
     let result = new ReferenceError(error.message, error.fileName, error.lineNumber);
     result.stack = error.stack;
     return result;
   },
-  SyntaxError: function(error) {
+  SyntaxError(error) {
     let result = new SyntaxError(error.message, error.fileName, error.lineNumber);
     result.stack = error.stack;
     return result;
   },
-  TypeError: function(error) {
+  TypeError(error) {
     let result = new TypeError(error.message, error.fileName, error.lineNumber);
     result.stack = error.stack;
     return result;
   },
-  URIError: function(error) {
+  URIError(error) {
     let result = new URIError(error.message, error.fileName, error.lineNumber);
     result.stack = error.stack;
     return result;
   },
-  StopIteration: function() {
+  StopIteration() {
     return StopIteration;
   }
 };
 
 /**
  * An object responsible for dispatching messages to a chrome worker
  * and routing the responses.
  *
@@ -156,17 +156,17 @@ this.BasePromiseWorker = function(url) {
   this.launchTimeStamp = null;
 
   /**
    * Timestamps provided by the worker for statistics purposes.
    */
   this.workerTimeStamps = null;
 };
 this.BasePromiseWorker.prototype = {
-  log: function() {
+  log() {
     // By Default, ignore all logs.
   },
 
   /**
    * Instantiate the worker lazily.
    */
   get _worker() {
     delete this._worker;
@@ -254,17 +254,17 @@ this.BasePromiseWorker.prototype = {
    * @param {*=} closure An object holding references that should not be
    * garbage-collected before the message treatment is complete.
    * @param {Array=} transfers An array of objects that should be transfered
    * to the worker instead of being copied. If any of the objects is a Promise,
    * it is resolved before posting the message.
    *
    * @return {promise}
    */
-  post: function(fun, args, closure, transfers) {
+  post(fun, args, closure, transfers) {
     return Task.spawn(function* postMessage() {
       // Normalize in case any of the arguments is a promise
       if (args) {
         args = yield Promise.resolve(Promise.all(args));
       }
       if (transfers) {
         transfers = yield Promise.resolve(Promise.all(transfers));
       } else {
@@ -280,33 +280,33 @@ this.BasePromiseWorker.prototype = {
             }
             return arg.data;
           }
           return arg;
         });
       }
 
       let id = ++this._id;
-      let message = {fun: fun, args: args, id: id};
+      let message = {fun, args, id};
       this.log("Posting message", message);
       try {
         this._worker.postMessage(message, ...[transfers]);
       } catch (ex) {
         if (typeof ex == "number") {
           this.log("Could not post message", message, "due to xpcom error", ex);
           // handle raw xpcom errors (see eg bug 961317)
           throw new Components.Exception("Error in postMessage", ex);
         }
 
         this.log("Could not post message", message, "due to error", ex);
         throw ex;
       }
 
       let deferred = Promise.defer();
-      this._queue.push({deferred:deferred, closure: closure, id: id});
+      this._queue.push({deferred, closure, id});
       this.log("Message posted");
 
       let reply;
       try {
         this.log("Expecting reply");
         reply = yield deferred.promise;
       } catch (error) {
         this.log("Got error", error);
--- a/toolkit/components/promiseworker/tests/xpcshell/data/worker.js
+++ b/toolkit/components/promiseworker/tests/xpcshell/data/worker.js
@@ -19,16 +19,16 @@ worker.close = function() {
   self.close();
 };
 worker.log = function(...args) {
   dump("Worker: " + args.join(" ") + "\n");
 };
 self.addEventListener("message", msg => worker.handleMessage(msg));
 
 var Agent = {
-  bounce: function(...args) {
+  bounce(...args) {
     return args;
   },
 
-  throwError: function(msg, ...args) {
+  throwError(msg, ...args) {
      throw new Error(msg);
   },
 };
--- a/toolkit/components/promiseworker/worker/PromiseWorker.js
+++ b/toolkit/components/promiseworker/worker/PromiseWorker.js
@@ -86,23 +86,23 @@ exports.Meta = Meta;
  * To connect it, use `onmessage`, as follows:
  *   self.addEventListener("message", msg => myWorkerInstance.handleMessage(msg));
  */
 function AbstractWorker(agent) {
   this._agent = agent;
 }
 AbstractWorker.prototype = {
   // Default logger: discard all messages
-  log: function() {
+  log() {
   },
 
   /**
    * Handle a message.
    */
-  handleMessage: function(msg) {
+  handleMessage(msg) {
     let data = msg.data;
     this.log("Received message", data);
     let id = data.id;
 
     let start;
     let options;
     if (data.args) {
       options = data.args[data.args.length - 1];
@@ -136,59 +136,59 @@ AbstractWorker.prototype = {
     // We post this message from outside the |try ... catch| block
     // to avoid capturing errors that take place during |postMessage| and
     // built-in serialization.
     if (!exn) {
       this.log("Sending positive reply", result, "id is", id);
       if (result instanceof Meta) {
         if ("transfers" in result.meta) {
           // Take advantage of zero-copy transfers
-          this.postMessage({ok: result.data, id: id, durationMs: durationMs},
+          this.postMessage({ok: result.data, id, durationMs},
             result.meta.transfers);
         } else {
-          this.postMessage({ok: result.data, id:id, durationMs: durationMs});
+          this.postMessage({ok: result.data, id, durationMs});
         }
         if (result.meta.shutdown || false) {
           // Time to close the worker
           this.close();
         }
       } else {
-        this.postMessage({ok: result, id:id, durationMs: durationMs});
+        this.postMessage({ok: result, id, durationMs});
       }
     } else if (exn.constructor.name in EXCEPTION_NAMES) {
       // Rather than letting the DOM mechanism [de]serialize built-in
       // JS errors, which loses lots of information (in particular,
       // the constructor name, the moduleName and the moduleStack),
       // we [de]serialize them manually with a little more care.
       this.log("Sending back exception", exn.constructor.name, "id is", id);
       let error = {
         exn: exn.constructor.name,
         message: exn.message,
         fileName: exn.moduleName || exn.fileName,
         lineNumber: exn.lineNumber,
         stack: exn.moduleStack
       };
-      this.postMessage({fail: error, id: id, durationMs: durationMs});
+      this.postMessage({fail: error, id, durationMs});
     } else if (exn == StopIteration) {
       // StopIteration is a well-known singleton, and requires a
       // slightly different treatment.
       this.log("Sending back StopIteration, id is", id);
       let error = {
         exn: "StopIteration"
       };
-      this.postMessage({fail: error, id: id, durationMs: durationMs});
+      this.postMessage({fail: error, id, durationMs});
     } else if ("toMsg" in exn) {
       // Extension mechanism for exception [de]serialization. We
       // assume that any exception with a method `toMsg()` knows how
       // to serialize itself. The other side is expected to have
       // registered a deserializer using the `ExceptionHandlers`
       // object.
       this.log("Sending back an error that knows how to serialize itself", exn, "id is", id);
       let msg = exn.toMsg();
-      this.postMessage({fail: msg, id:id, durationMs: durationMs});
+      this.postMessage({fail: msg, id, durationMs});
     } else {
       // If we encounter an exception for which we have no
       // serialization mechanism in place, we have no choice but to
       // let the DOM handle said [de]serialization. We can just
       // attempt to mitigate the data loss by injecting `moduleName` and
       // `moduleStack`.
       this.log("Sending back regular error", exn, exn.moduleStack || exn.stack, "id is", id);
 
--- a/toolkit/components/prompts/src/CommonDialog.jsm
+++ b/toolkit/components/prompts/src/CommonDialog.jsm
@@ -25,17 +25,17 @@ CommonDialog.prototype = {
     ui   : null,
 
     hasInputField : true,
     numButtons    : undefined,
     iconClass     : undefined,
     soundID       : undefined,
     focusTimer    : null,
 
-    onLoad : function(xulDialog) {
+    onLoad(xulDialog) {
         switch (this.args.promptType) {
           case "alert":
           case "alertCheck":
             this.hasInputField = false;
             this.numButtons    = 1;
             this.iconClass     = ["alert-icon"];
             this.soundID       = Ci.nsISound.EVENT_ALERT_DIALOG_OPEN;
             break;
@@ -186,17 +186,17 @@ CommonDialog.prototype = {
         }
 
         let topic = "common-dialog-loaded";
         if (!xulDialog)
             topic = "tabmodal-dialog-loaded";
         Services.obs.notifyObservers(this.ui.prompt, topic, null);
     },
 
-    setLabelForNode: function(aNode, aLabel) {
+    setLabelForNode(aNode, aLabel) {
         // This is for labels which may contain embedded access keys.
         // If we end in (&X) where X represents the access key, optionally preceded
         // by spaces and/or followed by the ':' character, store the access key and
         // remove the access key placeholder + leading spaces from the label.
         // Otherwise a character preceded by one but not two &s is the access key.
         // Store it and remove the &.
 
         // Note that if you change the following code, see the comment of
@@ -216,30 +216,30 @@ CommonDialog.prototype = {
 
         // XXXjag bug 325251
         // Need to set this after aNode.setAttribute("value", aLabel);
         if (accessKey)
             aNode.accessKey = accessKey;
     },
 
 
-    initTextbox : function(aName, aValue) {
+    initTextbox(aName, aValue) {
         this.ui[aName + "Container"].hidden = false;
         this.ui[aName + "Textbox"].setAttribute("value",
                                                 aValue !== null ? aValue : "");
     },
 
-    setButtonsEnabledState : function(enabled) {
+    setButtonsEnabledState(enabled) {
         this.ui.button0.disabled = !enabled;
         // button1 (cancel) remains enabled.
         this.ui.button2.disabled = !enabled;
         this.ui.button3.disabled = !enabled;
     },
 
-    setDefaultFocus : function(isInitialLoad) {
+    setDefaultFocus(isInitialLoad) {
         let b = (this.args.defaultButtonNum || 0);
         let button = this.ui["button" + b];
 
         if (!this.hasInputField) {
             let isOSX = ("nsILocalFileMac" in Components.interfaces);
             if (isOSX)
                 this.ui.infoBody.focus();
             else
@@ -253,21 +253,21 @@ CommonDialog.prototype = {
                 this.ui.password1Textbox.focus();
         } else if (isInitialLoad) {
                 this.ui.loginTextbox.select();
         } else {
                 this.ui.loginTextbox.focus();
         }
     },
 
-    onCheckbox : function() {
+    onCheckbox() {
         this.args.checked = this.ui.checkbox.checked;
     },
 
-    onButton0 : function() {
+    onButton0() {
         this.args.promptActive = false;
         this.args.ok = true;
         this.args.buttonNumClicked = 0;
 
         let username = this.ui.loginTextbox.value;
         let password = this.ui.password1Textbox.value;
 
         // Return textfield values
@@ -280,29 +280,29 @@ CommonDialog.prototype = {
             this.args.pass = password;
             break;
           case "promptPassword":
             this.args.pass = password;
             break;
         }
     },
 
-    onButton1 : function() {
+    onButton1() {
         this.args.promptActive = false;
         this.args.buttonNumClicked = 1;
     },
 
-    onButton2 : function() {
+    onButton2() {
         this.args.promptActive = false;
         this.args.buttonNumClicked = 2;
     },
 
-    onButton3 : function() {
+    onButton3() {
         this.args.promptActive = false;
         this.args.buttonNumClicked = 3;
     },
 
-    abortPrompt : function() {
+    abortPrompt() {
         this.args.promptActive = false;
         this.args.promptAborted = true;
     },
 
 };
--- a/toolkit/components/prompts/src/SharedPromptUtils.jsm
+++ b/toolkit/components/prompts/src/SharedPromptUtils.jsm
@@ -11,40 +11,40 @@ this.PromptUtils = {
     // Fire a dialog open/close event. Used by tabbrowser to focus the
     // tab which is triggering a prompt.
     // For remote dialogs, we pass in a different DOM window and a separate
     // target. If the caller doesn't pass in the target, then we'll simply use
     // the passed-in DOM window.
     // The detail may contain information about the principal on which the
     // prompt is triggered, as well as whether or not this is a tabprompt
     // (ie tabmodal alert/prompt/confirm and friends)
-    fireDialogEvent : function(domWin, eventName, maybeTarget, detail) {
+    fireDialogEvent(domWin, eventName, maybeTarget, detail) {
         let target = maybeTarget || domWin;
         let eventOptions = {cancelable: true, bubbles: true};
         if (detail) {
           eventOptions.detail = detail;
         }
         let event = new domWin.CustomEvent(eventName, eventOptions);
         let winUtils = domWin.QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIDOMWindowUtils);
         winUtils.dispatchEventToChromeOnly(target, event);
     },
 
-    objectToPropBag : function(obj) {
+    objectToPropBag(obj) {
         let bag = Cc["@mozilla.org/hash-property-bag;1"].
                   createInstance(Ci.nsIWritablePropertyBag2);
         bag.QueryInterface(Ci.nsIWritablePropertyBag);
 
         for (let propName in obj)
             bag.setProperty(propName, obj[propName]);
 
         return bag;
     },
 
-    propBagToObject : function(propBag, obj) {
+    propBagToObject(propBag, obj) {
         // Here we iterate over the object's original properties, not the bag
         // (ie, the prompt can't return more/different properties than were
         // passed in). This just helps ensure that the caller provides default
         // values, lest the prompt forget to set them.
         for (let propName in obj)
             obj[propName] = propBag.getProperty(propName);
     },
 };
@@ -75,17 +75,17 @@ this.EnableDelayHelper = function({enabl
     this.startOnFocusDelay();
 };
 
 this.EnableDelayHelper.prototype = {
     get delayTime() {
         return Services.prefs.getIntPref("security.dialog_enable_delay");
     },
 
-    handleEvent : function(event) {
+    handleEvent(event) {
         if (event.target != this.focusTarget &&
             event.target != this.focusTarget.document)
             return;
 
         switch (event.type) {
             case "blur":
                 this.onBlur();
                 break;
@@ -95,57 +95,57 @@ this.EnableDelayHelper.prototype = {
                 break;
 
             case "unload":
                 this.onUnload();
                 break;
         }
     },
 
-    onBlur : function() {
+    onBlur() {
         this.disableDialog();
         // If we blur while waiting to enable the buttons, just cancel the
         // timer to ensure the delay doesn't fire while not focused.
         if (this._focusTimer) {
             this._focusTimer.cancel();
             this._focusTimer = null;
         }
     },
 
-    onFocus : function() {
+    onFocus() {
         this.startOnFocusDelay();
     },
 
-    onUnload: function() {
+    onUnload() {
         this.focusTarget.removeEventListener("blur", this, false);
         this.focusTarget.removeEventListener("focus", this, false);
         this.focusTarget.document.removeEventListener("unload", this, false);
 
         if (this._focusTimer) {
             this._focusTimer.cancel();
             this._focusTimer = null;
         }
 
         this.focusTarget = this.enableDialog = this.disableDialog = null;
     },
 
-    startOnFocusDelay : function() {
+    startOnFocusDelay() {
         if (this._focusTimer)
             return;
 
         this._focusTimer = Cc["@mozilla.org/timer;1"]
                              .createInstance(Ci.nsITimer);
         this._focusTimer.initWithCallback(
             () => { this.onFocusTimeout(); },
             this.delayTime,
             Ci.nsITimer.TYPE_ONE_SHOT
         );
     },
 
-    onFocusTimeout : function() {
+    onFocusTimeout() {
         this._focusTimer = null;
         this.enableDialog();
     },
 };
 
 function makeSafe(fn) {
     return function() {
         // The dialog could be gone by now (if the user closed it),
--- a/toolkit/components/prompts/src/nsPrompter.js
+++ b/toolkit/components/prompts/src/nsPrompter.js
@@ -19,25 +19,25 @@ function Prompter() {
 
 Prompter.prototype = {
     classID          : Components.ID("{1c978d25-b37f-43a8-a2d6-0c7a239ead87}"),
     QueryInterface   : XPCOMUtils.generateQI([Ci.nsIPromptFactory, Ci.nsIPromptService, Ci.nsIPromptService2]),
 
 
     /* ----------  private members  ---------- */
 
-    pickPrompter : function(domWin) {
+    pickPrompter(domWin) {
         return new ModalPrompter(domWin);
     },
 
 
     /* ----------  nsIPromptFactory  ---------- */
 
 
-    getPrompt : function(domWin, iid) {
+    getPrompt(domWin, iid) {
         // This is still kind of dumb; the C++ code delegated to login manager
         // here, which in turn calls back into us via nsIPromptService2.
         if (iid.equals(Ci.nsIAuthPrompt2) || iid.equals(Ci.nsIAuthPrompt)) {
             try {
                 let pwmgr = Cc["@mozilla.org/passwordmanager/authpromptfactory;1"].
                             getService(Ci.nsIPromptFactory);
                 return pwmgr.getPrompt(domWin, iid);
             } catch (e) {
@@ -49,89 +49,89 @@ Prompter.prototype = {
         p.QueryInterface(iid);
         return p;
     },
 
 
     /* ----------  nsIPromptService  ---------- */
 
 
-    alert : function(domWin, title, text) {
+    alert(domWin, title, text) {
         let p = this.pickPrompter(domWin);
         p.alert(title, text);
     },
 
-    alertCheck : function(domWin, title, text, checkLabel, checkValue) {
+    alertCheck(domWin, title, text, checkLabel, checkValue) {
         let p = this.pickPrompter(domWin);
         p.alertCheck(title, text, checkLabel, checkValue);
     },
 
-    confirm : function(domWin, title, text) {
+    confirm(domWin, title, text) {
         let p = this.pickPrompter(domWin);
         return p.confirm(title, text);
     },
 
-    confirmCheck : function(domWin, title, text, checkLabel, checkValue) {
+    confirmCheck(domWin, title, text, checkLabel, checkValue) {
         let p = this.pickPrompter(domWin);
         return p.confirmCheck(title, text, checkLabel, checkValue);
     },
 
-    confirmEx : function(domWin, title, text, flags, button0, button1, button2, 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);
     },
 
-    prompt : function(domWin, title, text, value, checkLabel, checkValue) {
+    prompt(domWin, title, text, value, checkLabel, checkValue) {
         let p = this.pickPrompter(domWin);
         return p.nsIPrompt_prompt(title, text, value, checkLabel, checkValue);
     },
 
-    promptUsernameAndPassword : function(domWin, title, text, user, pass, checkLabel, checkValue) {
+    promptUsernameAndPassword(domWin, title, text, user, pass, checkLabel, checkValue) {
         let p = this.pickPrompter(domWin);
         return p.nsIPrompt_promptUsernameAndPassword(title, text, user, pass, checkLabel, checkValue);
     },
 
-    promptPassword : function(domWin, title, text, pass, checkLabel, checkValue) {
+    promptPassword(domWin, title, text, pass, checkLabel, checkValue) {
         let p = this.pickPrompter(domWin);
         return p.nsIPrompt_promptPassword(title, text, pass, checkLabel, checkValue);
     },
 
-    select : function(domWin, title, text, count, list, selected) {
+    select(domWin, title, text, count, list, selected) {
         let p = this.pickPrompter(domWin);
         return p.select(title, text, count, list, selected);
     },
 
 
     /* ----------  nsIPromptService2  ---------- */
 
 
-    promptAuth : function(domWin, channel, level, authInfo, checkLabel, checkValue) {
+    promptAuth(domWin, channel, level, authInfo, checkLabel, checkValue) {
         let p = this.pickPrompter(domWin);
         return p.promptAuth(channel, level, authInfo, checkLabel, checkValue);
     },
 
-    asyncPromptAuth : function(domWin, channel, callback, context, level, authInfo, checkLabel, checkValue) {
+    asyncPromptAuth(domWin, channel, callback, context, level, authInfo, checkLabel, checkValue) {
         let p = this.pickPrompter(domWin);
         return p.asyncPromptAuth(channel, callback, context, level, authInfo, checkLabel, checkValue);
     },
 
 };
 
 
 // Common utils not specific to a particular prompter style.
 var PromptUtilsTemp = {
     __proto__ : PromptUtils,
 
-    getLocalizedString : function(key, formatArgs) {
+    getLocalizedString(key, formatArgs) {
         if (formatArgs)
             return this.strBundle.formatStringFromName(key, formatArgs, formatArgs.length);
         return this.strBundle.GetStringFromName(key);
     },
 
-    confirmExHelper : function(flags, button0, button1, button2) {
+    confirmExHelper(flags, button0, button1, button2) {
         const BUTTON_DEFAULT_MASK = 0x03000000;
         let defaultButtonNum = (flags & BUTTON_DEFAULT_MASK) >> 24;
         let isDelayEnabled = (flags & Ci.nsIPrompt.BUTTON_DELAY_ENABLE);
 
         // Flags can be used to select a specific pre-defined button label or
         // a caller-supplied string (button0/button1/button2). If no flags are
         // set for a button, then the button won't be shown.
         let argText = [button0, button1, button2];
@@ -167,31 +167,31 @@ var PromptUtilsTemp = {
             if (buttonLabel)
                 buttonLabels[i] = buttonLabel;
             flags >>= 8;
         }
 
         return [buttonLabels[0], buttonLabels[1], buttonLabels[2], defaultButtonNum, isDelayEnabled];
     },
 
-    getAuthInfo : function(authInfo) {
+    getAuthInfo(authInfo) {
         let username, password;
 
         let flags = authInfo.flags;
         if (flags & Ci.nsIAuthInformation.NEED_DOMAIN && authInfo.domain)
             username = authInfo.domain + "\\" + authInfo.username;
         else
             username = authInfo.username;
 
         password = authInfo.password;
 
         return [username, password];
     },
 
-    setAuthInfo : function(authInfo, username, password) {
+    setAuthInfo(authInfo, username, password) {
         let flags = authInfo.flags;
         if (flags & Ci.nsIAuthInformation.NEED_DOMAIN) {
             // Domain is separated from username by a backslash
             let idx = username.indexOf("\\");
             if (idx == -1) {
                 authInfo.username = username;
             } else {
                 authInfo.domain   =  username.substring(0, idx);
@@ -201,22 +201,22 @@ var PromptUtilsTemp = {
             authInfo.username = username;
         }
         authInfo.password = password;
     },
 
     /**
      * Strip out things like userPass and path for display.
      */
-    getFormattedHostname : function(uri) {
+    getFormattedHostname(uri) {
         return uri.scheme + "://" + uri.hostPort;
     },
 
     // Copied from login manager
-    getAuthTarget : function(aChannel, aAuthInfo) {
+    getAuthTarget(aChannel, aAuthInfo) {
         let hostname, realm;
 
         // If our proxy is demanding authentication, don't use the
         // channel's actual destination.
         if (aAuthInfo.flags & Ci.nsIAuthInformation.AUTH_PROXY) {
             if (!(aChannel instanceof Ci.nsIProxiedChannel))
                 throw "proxy auth needs nsIProxiedChannel";
 
@@ -246,17 +246,17 @@ var PromptUtilsTemp = {
         realm = aAuthInfo.realm;
         if (!realm)
             realm = hostname;
 
         return [hostname, realm];
     },
 
 
-    makeAuthMessage : function(channel, authInfo) {
+    makeAuthMessage(channel, authInfo) {
         let isProxy    = (authInfo.flags & Ci.nsIAuthInformation.AUTH_PROXY);
         let isPassOnly = (authInfo.flags & Ci.nsIAuthInformation.ONLY_PASSWORD);
         let isCrossOrig = (authInfo.flags &
                            Ci.nsIAuthInformation.CROSS_ORIGIN_SUB_RESOURCE);
 
         let username = authInfo.username;
         let [displayHost, realm] = this.getAuthTarget(channel, authInfo);
 
@@ -282,17 +282,17 @@ var PromptUtilsTemp = {
             text = PromptUtils.getLocalizedString("EnterUserPasswordFor2", [displayHost]);
         } else {
             text = PromptUtils.getLocalizedString("EnterLoginForRealm3", [realm, displayHost]);
         }
 
         return text;
     },
 
-    getTabModalPrompt : function(domWin) {
+    getTabModalPrompt(domWin) {
         var promptBox = null;
 
         try {
             // Get the topmost window, in case we're in a frame.
             var promptWin = domWin.top;
 
             // Get the chrome window for the content window we're using.
             // (Unwrap because we need a non-IDL property below.)
@@ -511,17 +511,17 @@ ModalPrompter.prototype = {
     QueryInterface : XPCOMUtils.generateQI([Ci.nsIPrompt, Ci.nsIAuthPrompt,
                                             Ci.nsIAuthPrompt2,
                                             Ci.nsIWritablePropertyBag2]),
 
 
     /* ---------- internal methods ---------- */
 
 
-    openPrompt : function(args) {
+    openPrompt(args) {
         // Check pref, if false/missing do not ever allow tab-modal prompts.
         const prefName = "prompts.tab_modal.enabled";
         let prefValue = false;
         if (Services.prefs.getPrefType(prefName) == Services.prefs.PREF_BOOL)
             prefValue = Services.prefs.getBoolPref(prefName);
 
         let allowTabModal = this.allowTabModal && prefValue;
 
@@ -560,122 +560,122 @@ ModalPrompter.prototype = {
     /*
      * ---------- interface disambiguation ----------
      *
      * nsIPrompt and nsIAuthPrompt share 3 method names with slightly
      * different arguments. All but prompt() have the same number of
      * arguments, so look at the arg types to figure out how we're being
      * called. :-(
      */
-    prompt : function() {
+    prompt() {
         // also, the nsIPrompt flavor has 5 args instead of 6.
         if (typeof arguments[2] == "object")
             return this.nsIPrompt_prompt.apply(this, arguments);
         return this.nsIAuthPrompt_prompt.apply(this, arguments);
     },
 
-    promptUsernameAndPassword : function() {
+    promptUsernameAndPassword() {
         // Both have 6 args, so use types.
         if (typeof arguments[2] == "object")
             return this.nsIPrompt_promptUsernameAndPassword.apply(this, arguments);
         return this.nsIAuthPrompt_promptUsernameAndPassword.apply(this, arguments);
     },
 
-    promptPassword : function() {
+    promptPassword() {
         // Both have 5 args, so use types.
         if (typeof arguments[2] == "object")
             return this.nsIPrompt_promptPassword.apply(this, arguments);
         return this.nsIAuthPrompt_promptPassword.apply(this, arguments);
     },
 
 
     /* ----------  nsIPrompt  ---------- */
 
 
-    alert : function(title, text) {
+    alert(title, text) {
         if (!title)
             title = PromptUtils.getLocalizedString("Alert");
 
         let args = {
             promptType: "alert",
-            title:      title,
-            text:       text,
+            title,
+            text,
         };
 
         this.openPrompt(args);
     },
 
-    alertCheck : function(title, text, checkLabel, checkValue) {
+    alertCheck(title, text, checkLabel, checkValue) {
         if (!title)
             title = PromptUtils.getLocalizedString("Alert");
 
         let args = {
             promptType: "alertCheck",
-            title:      title,
-            text:       text,
-            checkLabel: checkLabel,
+            title,
+            text,
+            checkLabel,
             checked:    checkValue.value,
         };
 
         this.openPrompt(args);
 
         // Checkbox state always returned, even if cancel clicked.
         checkValue.value = args.checked;
     },
 
-    confirm : function(title, text) {
+    confirm(title, text) {
         if (!title)
             title = PromptUtils.getLocalizedString("Confirm");
 
         let args = {
             promptType: "confirm",
-            title:      title,
-            text:       text,
+            title,
+            text,
             ok:         false,
         };
 
         this.openPrompt(args);
 
         // Did user click Ok or Cancel?
         return args.ok;
     },
 
-    confirmCheck : function(title, text, checkLabel, checkValue) {
+    confirmCheck(title, text, checkLabel, checkValue) {
         if (!title)
             title = PromptUtils.getLocalizedString("ConfirmCheck");
 
         let args = {
             promptType: "confirmCheck",
-            title:      title,
-            text:       text,
-            checkLabel: checkLabel,
+            title,
+            text,
+            checkLabel,
             checked:    checkValue.value,
             ok:         false,
         };
 
         this.openPrompt(args);
 
         // Checkbox state always returned, even if cancel clicked.
         checkValue.value = args.checked;
 
         // Did user click Ok or Cancel?
         return args.ok;
     },
 
-    confirmEx : function(title, text, flags, button0, button1, button2,
+    confirmEx(title, text, flags, button0, button1, button2,
                          checkLabel, checkValue) {
 
         if (!title)
             title = PromptUtils.getLocalizedString("Confirm");
 
         let args = {
             promptType:  "confirmEx",
-            title:       title,
-            text:        text,
-            checkLabel:  checkLabel,
+            title,
+            text,
+            checkLabel,
             checked:     checkValue.value,
             ok:          false,
             buttonNumClicked: 1,
         };
 
         let [label0, label1, label2, defaultButtonNum, isDelayEnabled] =
             PromptUtils.confirmExHelper(flags, button0, button1, button2);
 
@@ -696,53 +696,53 @@ ModalPrompter.prototype = {
 
         // Checkbox state always returned, even if cancel clicked.
         checkValue.value = args.checked;
 
         // Get the number of the button the user clicked.
         return args.buttonNumClicked;
     },
 
-    nsIPrompt_prompt : function(title, text, value, checkLabel, checkValue) {
+    nsIPrompt_prompt(title, text, value, checkLabel, checkValue) {
         if (!title)
             title = PromptUtils.getLocalizedString("Prompt");
 
         let args = {
             promptType: "prompt",
-            title:      title,
-            text:       text,
+            title,
+            text,
             value:      value.value,
-            checkLabel: checkLabel,
+            checkLabel,
             checked:    checkValue.value,
             ok:         false,
         };
 
         this.openPrompt(args);
 
         // Did user click Ok or Cancel?
         let ok  = args.ok;
         if (ok) {
             checkValue.value = args.checked;
             value.value      = args.value;
         }
 
         return ok;
     },
 
-    nsIPrompt_promptUsernameAndPassword : function(title, text, user, pass, checkLabel, checkValue) {
+    nsIPrompt_promptUsernameAndPassword(title, text, user, pass, checkLabel, checkValue) {
         if (!title)
             title = PromptUtils.getLocalizedString("PromptUsernameAndPassword2");
 
         let args = {
             promptType: "promptUserAndPass",
-            title:      title,
-            text:       text,
+            title,
+            text,
             user:       user.value,
             pass:       pass.value,
-            checkLabel: checkLabel,
+            checkLabel,
             checked:    checkValue.value,
             ok:         false,
         };
 
         this.openPrompt(args);
 
         // Did user click Ok or Cancel?
         let ok  = args.ok;
@@ -750,51 +750,51 @@ ModalPrompter.prototype = {
             checkValue.value = args.checked;
             user.value       = args.user;
             pass.value       = args.pass;
         }
 
         return ok;
     },
 
-    nsIPrompt_promptPassword : function(title, text, pass, checkLabel, checkValue) {
+    nsIPrompt_promptPassword(title, text, pass, checkLabel, checkValue) {
         if (!title)
             title = PromptUtils.getLocalizedString("PromptPassword2");
 
         let args = {
             promptType: "promptPassword",
-            title:      title,
-            text:       text,
+            title,
+            text,
             pass:       pass.value,
-            checkLabel: checkLabel,
+            checkLabel,
             checked:    checkValue.value,
             ok:         false,
         }
 
         this.openPrompt(args);
 
         // Did user click Ok or Cancel?
         let ok  = args.ok;
         if (ok) {
             checkValue.value = args.checked;
             pass.value       = args.pass;
         }
 
         return ok;
     },
 
-    select : function(title, text, count, list, selected) {
+    select(title, text, count, list, selected) {
         if (!title)
             title = PromptUtils.getLocalizedString("Select");
 
         let args = {
             promptType: "select",
-            title:      title,
-            text:       text,
-            list:       list,
+            title,
+            text,
+            list,
             selected:   -1,
             ok:         false,
         };
 
         this.openPrompt(args);
 
         // Did user click Ok or Cancel?
         let ok  = args.ok;
@@ -803,38 +803,38 @@ ModalPrompter.prototype = {
 
         return ok;
     },
 
 
     /* ----------  nsIAuthPrompt  ---------- */
 
 
-    nsIAuthPrompt_prompt : function(title, text, passwordRealm, savePassword, defaultText, result) {
+    nsIAuthPrompt_prompt(title, text, passwordRealm, savePassword, defaultText, result) {
         // The passwordRealm and savePassword args were ignored by nsPrompt.cpp
         if (defaultText)
             result.value = defaultText;
         return this.nsIPrompt_prompt(title, text, result, null, {});
     },
 
-    nsIAuthPrompt_promptUsernameAndPassword : function(title, text, passwordRealm, savePassword, user, pass) {
+    nsIAuthPrompt_promptUsernameAndPassword(title, text, passwordRealm, savePassword, user, pass) {
         // The passwordRealm and savePassword args were ignored by nsPrompt.cpp
         return this.nsIPrompt_promptUsernameAndPassword(title, text, user, pass, null, {});
     },
 
-    nsIAuthPrompt_promptPassword : function(title, text, passwordRealm, savePassword, pass) {
+    nsIAuthPrompt_promptPassword(title, text, passwordRealm, savePassword, pass) {
         // The passwordRealm and savePassword args were ignored by nsPrompt.cpp
         return this.nsIPrompt_promptPassword(title, text, pass, null, {});
     },
 
 
     /* ----------  nsIAuthPrompt2  ---------- */
 
 
-    promptAuth : function(channel, level, authInfo, checkLabel, checkValue) {
+    promptAuth(channel, level, authInfo, checkLabel, checkValue) {
         let message = PromptUtils.makeAuthMessage(channel, authInfo);
 
         let [username, password] = PromptUtils.getAuthInfo(authInfo);
 
         let userParam = { value: username };
         let passParam = { value: password };
 
         let ok;
@@ -843,64 +843,64 @@ ModalPrompter.prototype = {
         else
             ok = this.nsIPrompt_promptUsernameAndPassword(null, message, userParam, passParam, checkLabel, checkValue);
 
         if (ok)
             PromptUtils.setAuthInfo(authInfo, userParam.value, passParam.value);
         return ok;
     },
 
-    asyncPromptAuth : function(channel, callback, context, level, authInfo, checkLabel, checkValue) {
+    asyncPromptAuth(channel, callback, context, level, authInfo, checkLabel, checkValue) {
         // Nothing calls this directly; netwerk ends up going through
         // nsIPromptService::GetPrompt, which delegates to login manager.
         // Login manger handles the async bits itself, and only calls out
         // promptAuth, never asyncPromptAuth.
         //
         // Bug 565582 will change this.
         throw Cr.NS_ERROR_NOT_IMPLEMENTED;
     },
 
     /* ----------  nsIWritablePropertyBag2 ---------- */
 
     // Only a partial implementation, for one specific use case...
 
-    setPropertyAsBool : function(name, value) {
+    setPropertyAsBool(name, value) {
         if (name == "allowTabModal")
             this.allowTabModal = value;
         else
             throw Cr.NS_ERROR_ILLEGAL_VALUE;
     },
 };
 
 
 function AuthPromptAdapterFactory() {
 }
 AuthPromptAdapterFactory.prototype = {
     classID          : Components.ID("{6e134924-6c3a-4d86-81ac-69432dd971dc}"),
     QueryInterface   : XPCOMUtils.generateQI([Ci.nsIAuthPromptAdapterFactory]),
 
     /* ----------  nsIAuthPromptAdapterFactory ---------- */
 
-    createAdapter : function(oldPrompter) {
+    createAdapter(oldPrompter) {
         return new AuthPromptAdapter(oldPrompter);
     }
 };
 
 
 // Takes an nsIAuthPrompt implementation, wraps it with a nsIAuthPrompt2 shell.
 function AuthPromptAdapter(oldPrompter) {
     this.oldPrompter = oldPrompter;
 }
 AuthPromptAdapter.prototype = {
     QueryInterface : XPCOMUtils.generateQI([Ci.nsIAuthPrompt2]),
     oldPrompter    : null,
 
     /* ----------  nsIAuthPrompt2 ---------- */
 
-    promptAuth : function(channel, level, authInfo, checkLabel, checkValue) {
+    promptAuth(channel, level, authInfo, checkLabel, checkValue) {
         let message = PromptUtils.makeAuthMessage(channel, authInfo);
 
         let [username, password] = PromptUtils.getAuthInfo(authInfo);
         let userParam = { value: username };
         let passParam = { value: password };
 
         let [host, realm]  = PromptUtils.getAuthTarget(channel, authInfo);
         let authTarget = host + " (" + realm + ")";
@@ -911,17 +911,17 @@ AuthPromptAdapter.prototype = {
         else
             ok = this.oldPrompter.promptUsernameAndPassword(null, message, authTarget, Ci.nsIAuthPrompt.SAVE_PASSWORD_PERMANENTLY, userParam, passParam);
 
         if (ok)
             PromptUtils.setAuthInfo(authInfo, userParam.value, passParam.value);
         return ok;
     },
 
-    asyncPromptAuth : function(channel, callback, context, level, authInfo, checkLabel, checkValue) {
+    asyncPromptAuth(channel, callback, context, level, authInfo, checkLabel, checkValue) {
         throw Cr.NS_ERROR_NOT_IMPLEMENTED;
     }
 };
 
 
 // Wrapper using the old embedding contractID, since it's already common in
 // the addon ecosystem.
 function EmbedPrompter() {
--- a/toolkit/components/prompts/test/chromeScript.js
+++ b/toolkit/components/prompts/test/chromeScript.js
@@ -53,17 +53,17 @@ function handlePrompt(action, isTabModal
   let promptState;
   if (isSelect) {
     promptState = getSelectState(ui);
     dismissSelect(ui, action);
   } else {
     promptState = getPromptState(ui);
     dismissPrompt(ui, action);
   }
-  sendAsyncMessage("promptHandled", { promptState: promptState });
+  sendAsyncMessage("promptHandled", { promptState });
   return true;
 }
 
 function getSelectState(ui) {
   let listbox = ui.getElementById("list");
 
   let state = {};
   state.msg = ui.getElementById("info.txt").value;
--- a/toolkit/components/prompts/test/prompt_common.js
+++ b/toolkit/components/prompts/test/prompt_common.js
@@ -30,17 +30,17 @@ function onloadPromiseFor(id) {
 
 function handlePrompt(state, action) {
   return new Promise(resolve => {
     gChromeScript.addMessageListener("promptHandled", function handled(msg) {
       gChromeScript.removeMessageListener("promptHandled", handled);
       checkPromptState(msg.promptState, state);
       resolve(true);
     });
-    gChromeScript.sendAsyncMessage("handlePrompt", { action: action, isTabModal: isTabModal});
+    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");
     if (isOSX && !isTabModal)
       ok(!promptState.titleHidden, "Checking title always visible on OS X");
--- a/toolkit/components/reader/AboutReader.jsm
+++ b/toolkit/components/reader/AboutReader.jsm
@@ -85,17 +85,17 @@ var AboutReader = function(mm, win, arti
   if (gIsFirefoxDesktop) {
     // we're ready for any external setup, send a signal for that.
     this._mm.sendAsyncMessage("Reader:OnSetup");
   }
 
   let colorSchemeValues = JSON.parse(Services.prefs.getCharPref("reader.color_scheme.values"));
   let colorSchemeOptions = colorSchemeValues.map((value) => {
     return { name: gStrings.GetStringFromName("aboutReader.colorScheme." + value),
-             value: value,
+             value,
              itemClass: value + "-button" };
   });
 
   let colorScheme = Services.prefs.getCharPref("reader.color_scheme");
   this._setupSegmentedButton("color-scheme-buttons", colorSchemeOptions, colorScheme, this._setColorSchemePref.bind(this));
   this._setColorSchemePref(colorScheme);
 
   let fontTypeSample = gStrings.GetStringFromName("aboutReader.fontTypeSample");
@@ -185,17 +185,17 @@ AboutReader.prototype = {
   get viewId() {
     let _viewId = Cc["@mozilla.org/uuid-generator;1"].
       getService(Ci.nsIUUIDGenerator).generateUUID().toString();
     Object.defineProperty(this, "viewId", { value: _viewId });
 
     return _viewId;
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     switch (message.name) {
       // Triggered by Android user pressing BACK while the banner font-dropdown is open.
       case "Reader:CloseDropdown": {
         // Just close it.
         this._closeDropdowns();
         break;
       }
 
@@ -227,17 +227,17 @@ AboutReader.prototype = {
         break;
       }
       case "Reader:GetStoredArticleData": {
         this._mm.sendAsyncMessage("Reader:StoredArticleData", { article: this._article });
       }
     }
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     if (!aEvent.isTrusted)
       return;
 
     switch (aEvent.type) {
       case "click":
         let target = aEvent.target;
         if (target.classList.contains('dropdown-toggle')) {
           this._toggleDropdownClicked(aEvent);
@@ -278,45 +278,45 @@ AboutReader.prototype = {
         this._mm.removeMessageListener("Reader:AddButton", this);
         this._mm.removeMessageListener("Reader:RemoveButton", this);
         this._mm.removeMessageListener("Reader:GetStoredArticleData", this);
         this._windowUnloaded = true;
         break;
     }
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     if (subject.QueryInterface(Ci.nsISupportsPRUint64).data != this._innerWindowId) {
       return;
     }
 
     Services.obs.removeObserver(this, "inner-window-destroyed", false);
 
     this._mm.removeMessageListener("Reader:CloseDropdown", this);
     this._mm.removeMessageListener("Reader:AddButton", this);
     this._mm.removeMessageListener("Reader:RemoveButton", this);
     this._windowUnloaded = true;
   },
 
-  _onReaderClose: function() {
+  _onReaderClose() {
     ReaderMode.leaveReaderMode(this._mm.docShell, this._win);
   },
 
-  _setFontSize: function(newFontSize) {
+  _setFontSize(newFontSize) {
     let containerClasses = this._doc.getElementById("container").classList;
 
     if (this._fontSize > 0)
       containerClasses.remove("font-size" + this._fontSize);
 
     this._fontSize = newFontSize;
     containerClasses.add("font-size" + this._fontSize);
     return AsyncPrefs.set("reader.font_size", this._fontSize);
   },
 
-  _setupFontSizeButtons: function() {
+  _setupFontSizeButtons() {
     const FONT_SIZE_MIN = 1;
     const FONT_SIZE_MAX = 9;
 
     // Sample text shown in Android UI.
     let sampleText = this._doc.getElementById("font-size-sample");
     sampleText.textContent = gStrings.GetStringFromName("aboutReader.fontTypeSample");
 
     let currentSize = Services.prefs.getIntPref("reader.font_size");
@@ -367,28 +367,28 @@ AboutReader.prototype = {
       }
 
       currentSize--;
       updateControls();
       this._setFontSize(currentSize);
     }, true);
   },
 
-  _setContentWidth: function(newContentWidth) {
+  _setContentWidth(newContentWidth) {
     let containerClasses = this._doc.getElementById("container").classList;
 
     if (this._contentWidth > 0)
       containerClasses.remove("content-width" + this._contentWidth);
 
     this._contentWidth = newContentWidth;
     containerClasses.add("content-width" + this._contentWidth);
     return AsyncPrefs.set("reader.content_width", this._contentWidth);
   },
 
-  _setupContentWidthButtons: function() {
+  _setupContentWidthButtons() {
     const CONTENT_WIDTH_MIN = 1;
     const CONTENT_WIDTH_MAX = 9;
 
     let currentContentWidth = Services.prefs.getIntPref("reader.content_width");
     currentContentWidth = Math.max(CONTENT_WIDTH_MIN, Math.min(CONTENT_WIDTH_MAX, currentContentWidth));
 
     let plusButton = this._doc.getElementById("content-width-plus");
     let minusButton = this._doc.getElementById("content-width-minus");
@@ -435,28 +435,28 @@ AboutReader.prototype = {
       }
 
       currentContentWidth--;
       updateControls();
       this._setContentWidth(currentContentWidth);
     }, true);
   },
 
-  _setLineHeight: function(newLineHeight) {
+  _setLineHeight(newLineHeight) {
     let contentClasses = this._doc.getElementById("moz-reader-content").classList;
 
     if (this._lineHeight > 0)
       contentClasses.remove("line-height" + this._lineHeight);
 
     this._lineHeight = newLineHeight;
     contentClasses.add("line-height" + this._lineHeight);
     return AsyncPrefs.set("reader.line_height", this._lineHeight);
   },
 
-  _setupLineHeightButtons: function() {
+  _setupLineHeightButtons() {
     const LINE_HEIGHT_MIN = 1;
     const LINE_HEIGHT_MAX = 9;
 
     let currentLineHeight = Services.prefs.getIntPref("reader.line_height");
     currentLineHeight = Math.max(LINE_HEIGHT_MIN, Math.min(LINE_HEIGHT_MAX, currentLineHeight));
 
     let plusButton = this._doc.getElementById("line-height-plus");
     let minusButton = this._doc.getElementById("line-height-minus");
@@ -503,17 +503,17 @@ AboutReader.prototype = {
       }
 
       currentLineHeight--;
       updateControls();
       this._setLineHeight(currentLineHeight);
     }, true);
   },
 
-  _handleDeviceLight: function(newLux) {
+  _handleDeviceLight(newLux) {
     // Desired size of the this._luxValues array.
     let luxValuesSize = 10;
     // Add new lux value at the front of the array.
     this._luxValues.unshift(newLux);
     // Add new lux value to this._totalLux for averaging later.
     this._totalLux += newLux;
 
     // Don't update when length of array is less than luxValuesSize except when it is 1.
@@ -529,40 +529,40 @@ AboutReader.prototype = {
 
     this._updateColorScheme(averageLuxValue);
     // Pop the oldest value off the array.
     let oldLux = this._luxValues.pop();
     // Subtract oldLux since it has been discarded from the array.
     this._totalLux -= oldLux;
   },
 
-  _handleVisibilityChange: function() {
+  _handleVisibilityChange() {
     let colorScheme = Services.prefs.getCharPref("reader.color_scheme");
     if (colorScheme != "auto") {
       return;
     }
 
     // Turn off the ambient light sensor if the page is hidden
     this._enableAmbientLighting(!this._doc.hidden);
   },
 
   // Setup or teardown the ambient light tracking system.
-  _enableAmbientLighting: function(enable) {
+  _enableAmbientLighting(enable) {
     if (enable) {
       this._win.addEventListener("devicelight", this, false);
       this._luxValues = [];
       this._totalLux = 0;
     } else {
       this._win.removeEventListener("devicelight", this, false);
       delete this._luxValues;
       delete this._totalLux;
     }
   },
 
-  _updateColorScheme: function(luxValue) {
+  _updateColorScheme(luxValue) {
     // Upper bound value for "dark" color scheme beyond which it changes to "light".
     let upperBoundDark = 50;
     // Lower bound value for "light" color scheme beyond which it changes to "dark".
     let lowerBoundLight = 10;
     // Threshold for color scheme change.
     let colorChangeThreshold = 20;
 
     // Ignore changes that are within a certain threshold of previous lux values.
@@ -571,56 +571,56 @@ AboutReader.prototype = {
       return;
 
     if (luxValue < colorChangeThreshold)
       this._setColorScheme("dark");
     else
       this._setColorScheme("light");
   },
 
-  _setColorScheme: function(newColorScheme) {
+  _setColorScheme(newColorScheme) {
     // "auto" is not a real color scheme
     if (this._colorScheme === newColorScheme || newColorScheme === "auto")
       return;
 
     let bodyClasses = this._doc.body.classList;
 
     if (this._colorScheme)
       bodyClasses.remove(this._colorScheme);
 
     this._colorScheme = newColorScheme;
     bodyClasses.add(this._colorScheme);
   },
 
   // Pref values include "dark", "light", and "auto", which automatically switches
   // between light and dark color schemes based on the ambient light level.
-  _setColorSchemePref: function(colorSchemePref) {
+  _setColorSchemePref(colorSchemePref) {
     this._enableAmbientLighting(colorSchemePref === "auto");
     this._setColorScheme(colorSchemePref);
 
     AsyncPrefs.set("reader.color_scheme", colorSchemePref);
   },
 
-  _setFontType: function(newFontType) {
+  _setFontType(newFontType) {
     if (this._fontType === newFontType)
       return;
 
     let bodyClasses = this._doc.body.classList;
 
     if (this._fontType)
       bodyClasses.remove(this._fontType);
 
     this._fontType = newFontType;
     bodyClasses.add(this._fontType);
 
     AsyncPrefs.set("reader.font_type", this._fontType);
   },
 
-  _setSystemUIVisibility: function(visible) {
-    this._mm.sendAsyncMessage("Reader:SystemUIVisibility", { visible: visible });
+  _setSystemUIVisibility(visible) {
+    this._mm.sendAsyncMessage("Reader:SystemUIVisibility", { visible });
   },
 
   _loadArticle: Task.async(function* () {
     let url = this._getOriginalUrl();
     this._showProgressDelayed();
 
     let article;
     if (this._articlePromise) {
@@ -647,55 +647,55 @@ AboutReader.prototype = {
     if (!article) {
       this._showError();
       return;
     }
 
     this._showContent(article);
   }),
 
-  _getArticle: function(url) {
+  _getArticle(url) {
     return new Promise((resolve, reject) => {
       let listener = (message) => {
         this._mm.removeMessageListener("Reader:ArticleData", listener);
         if (message.data.newURL) {
           reject({ newURL: message.data.newURL });
           return;
         }
         resolve(message.data.article);
       };
       this._mm.addMessageListener("Reader:ArticleData", listener);
-      this._mm.sendAsyncMessage("Reader:ArticleGet", { url: url });
+      this._mm.sendAsyncMessage("Reader:ArticleGet", { url });
     });
   },
 
-  _requestFavicon: function() {
+  _requestFavicon() {
     let handleFaviconReturn = (message) => {
       this._mm.removeMessageListener("Reader:FaviconReturn", handleFaviconReturn);
       this._loadFavicon(message.data.url, message.data.faviconUrl);
     };
 
     this._mm.addMessageListener("Reader:FaviconReturn", handleFaviconReturn);
     this._mm.sendAsyncMessage("Reader:FaviconRequest", { url: this._article.url });
   },
 
-  _loadFavicon: function(url, faviconUrl) {
+  _loadFavicon(url, faviconUrl) {
     if (this._article.url !== url)
       return;
 
     let doc = this._doc;
 
     let link = doc.createElement('link');
     link.rel = 'shortcut icon';
     link.href = faviconUrl;
 
     doc.getElementsByTagName('head')[0].appendChild(link);
   },
 
-  _updateImageMargins: function() {
+  _updateImageMargins() {
     let windowWidth = this._win.innerWidth;
     let bodyWidth = this._doc.body.clientWidth;
 
     let setImageMargins = function(img) {
       // If the image is at least as wide as the window, make it fill edge-to-edge on mobile.
       if (img.naturalWidth >= windowWidth) {
         img.setAttribute("moz-reader-full-width", true);
       } else {
@@ -760,47 +760,47 @@ AboutReader.prototype = {
       displayStringKey = "aboutReader.estimatedReadTimeValue1";
     }
 
     return PluralForm.get(slowEstimate, gStrings.GetStringFromName(displayStringKey))
       .replace("#1", fastEstimate)
       .replace("#2", slowEstimate);
   },
 
-  _showError: function() {
+  _showError() {
     this._headerElement.style.display = "none";
     this._contentElement.style.display = "none";
 
     let errorMessage = gStrings.GetStringFromName("aboutReader.loadError");
     this._messageElement.textContent = errorMessage;
     this._messageElement.style.display = "block";
 
     this._doc.title = errorMessage;
 
     this._error = true;
   },
 
   // This function is the JS version of Java's StringUtils.stripCommonSubdomains.
-  _stripHost: function(host) {
+  _stripHost(host) {
     if (!host)
       return host;
 
     let start = 0;
 
     if (host.startsWith("www."))
       start = 4;
     else if (host.startsWith("m."))
       start = 2;
     else if (host.startsWith("mobile."))
       start = 7;
 
     return host.substring(start);
   },
 
-  _showContent: function(article) {
+  _showContent(article) {
     this._messageElement.style.display = "none";
 
     this._article = article;
 
     this._domainElement.href = article.url;
     let articleUri = Services.io.newURI(article.url, null, null);
     this._domainElement.textContent = this._stripHost(articleUri.host);
     this._creditsElement.textContent = article.byline;
@@ -830,22 +830,22 @@ AboutReader.prototype = {
     this._goToReference(articleUri.ref);
 
     Services.obs.notifyObservers(this._win, "AboutReader:Ready", "");
 
     this._doc.dispatchEvent(
       new this._win.CustomEvent("AboutReaderContentReady", { bubbles: true, cancelable: false }));
   },
 
-  _hideContent: function() {
+  _hideContent() {
     this._headerElement.style.display = "none";
     this._contentElement.style.display = "none";
   },
 
-  _showProgressDelayed: function() {
+  _showProgressDelayed() {
     this._win.setTimeout(function() {
       // No need to show progress if the article has been loaded,
       // if the window has been unloaded, or if there was an error
       // trying to load the article.
       if (this._article || this._windowUnloaded || this._error) {
         return;
       }
 
@@ -855,22 +855,22 @@ AboutReader.prototype = {
       this._messageElement.textContent = gStrings.GetStringFromName("aboutReader.loading2");
       this._messageElement.style.display = "block";
     }.bind(this), 300);
   },
 
   /**
    * Returns the original article URL for this about:reader view.
    */
-  _getOriginalUrl: function(win) {
+  _getOriginalUrl(win) {
     let url = win ? win.location.href : this._win.location.href;
     return ReaderMode.getOriginalUrl(url) || url;
   },
 
-  _setupSegmentedButton: function(id, options, initialValue, callback) {
+  _setupSegmentedButton(id, options, initialValue, callback) {
     let doc = this._doc;
     let segmentedButton = doc.getElementById(id);
 
     for (let i = 0; i < options.length; i++) {
       let option = options[i];
 
       let item = doc.createElement("button");
 
@@ -911,17 +911,17 @@ AboutReader.prototype = {
         callback(option.value);
       }.bind(this), true);
 
       if (option.value === initialValue)
         item.classList.add("selected");
     }
   },
 
-  _setupButton: function(id, callback, titleEntity, textEntity) {
+  _setupButton(id, callback, titleEntity, textEntity) {
     if (titleEntity) {
       this._setButtonTip(id, titleEntity);
     }
 
     let button = this._doc.getElementById(id);
     if (textEntity) {
       button.textContent = gStrings.GetStringFromName(textEntity);
     }
@@ -936,38 +936,38 @@ AboutReader.prototype = {
     }, true);
   },
 
   /**
    * Sets a toolTip for a button. Performed at initial button setup
    * and dynamically as button state changes.
    * @param   Localizable string providing UI element usage tip.
    */
-  _setButtonTip: function(id, titleEntity) {
+  _setButtonTip(id, titleEntity) {
     let button = this._doc.getElementById(id);
     button.setAttribute("title", gStrings.GetStringFromName(titleEntity));
   },
 
-  _setupStyleDropdown: function() {
+  _setupStyleDropdown() {
     let dropdownToggle = this._doc.querySelector("#style-dropdown .dropdown-toggle");
     dropdownToggle.setAttribute("title", gStrings.GetStringFromName("aboutReader.toolbar.typeControls"));
   },
 
-  _updatePopupPosition: function(dropdown) {
+  _updatePopupPosition(dropdown) {
     let dropdownToggle = dropdown.querySelector(".dropdown-toggle");
     let dropdownPopup = dropdown.querySelector(".dropdown-popup");
 
     let toggleHeight = dropdownToggle.offsetHeight;
     let toggleTop = dropdownToggle.offsetTop;
     let popupTop = toggleTop - toggleHeight / 2;
 
     dropdownPopup.style.top = popupTop + "px";
   },
 
-  _toggleDropdownClicked: function(event) {
+  _toggleDropdownClicked(event) {
     let dropdown = event.target.closest('.dropdown');
 
     if (!dropdown)
       return;
 
     event.stopPropagation();
 
     if (dropdown.classList.contains("open")) {
@@ -978,34 +978,34 @@ AboutReader.prototype = {
         this._updatePopupPosition(dropdown);
       }
     }
   },
 
   /*
    * If the ReaderView banner font-dropdown is closed, open it.
    */
-  _openDropdown: function(dropdown) {
+  _openDropdown(dropdown) {
     if (dropdown.classList.contains("open")) {
       return;
     }
 
     this._closeDropdowns();
 
     // Trigger BackPressListener initialization in Android.
     dropdown.classList.add("open");
     this._mm.sendAsyncMessage("Reader:DropdownOpened", this.viewId);
   },
 
   /*
    * If the ReaderView has open dropdowns, close them. If we are closing the
    * dropdowns because the page is scrolling, allow popups to stay open with
    * the keep-open class.
    */
-  _closeDropdowns: function(scrolling) {
+  _closeDropdowns(scrolling) {
     let selector = ".dropdown.open";
     if (scrolling) {
       selector += ":not(.keep-open)";
     }
 
     let openDropdowns = this._doc.querySelectorAll(selector);
     for (let dropdown of openDropdowns) {
       dropdown.classList.remove("open");
--- a/toolkit/components/reader/ReaderMode.jsm
+++ b/toolkit/components/reader/ReaderMode.jsm
@@ -65,41 +65,41 @@ this.ReaderMode = {
   },
 
   get isOnLowMemoryPlatform() {
     let memory = Cc["@mozilla.org/xpcom/memory-service;1"].getService(Ci.nsIMemory);
     delete this.isOnLowMemoryPlatform;
     return this.isOnLowMemoryPlatform = memory.isLowMemoryPlatform();
   },
 
-  _getStateForParseOnLoad: function() {
+  _getStateForParseOnLoad() {
     let isEnabled = Services.prefs.getBoolPref("reader.parse-on-load.enabled");
     let isForceEnabled = Services.prefs.getBoolPref("reader.parse-on-load.force-enabled");
     // For low-memory devices, don't allow reader mode since it takes up a lot of memory.
     // See https://bugzilla.mozilla.org/show_bug.cgi?id=792603 for details.
     return isForceEnabled || (isEnabled && !this.isOnLowMemoryPlatform);
   },
 
-  observe: function(aMessage, aTopic, aData) {
+  observe(aMessage, aTopic, aData) {
     switch (aTopic) {
       case "nsPref:changed":
         if (aData.startsWith("reader.parse-on-load.")) {
           this.isEnabledForParseOnLoad = this._getStateForParseOnLoad();
         } else if (aData === "reader.parse-node-limit") {
           this.parseNodeLimit = Services.prefs.getIntPref(aData);
         }
         break;
     }
   },
 
   /**
    * Enter the reader mode by going forward one step in history if applicable,
    * if not, append the about:reader page in the history instead.
    */
-  enterReaderMode: function(docShell, win) {
+  enterReaderMode(docShell, win) {
     let url = win.document.location.href;
     let readerURL = "about:reader?url=" + encodeURIComponent(url);
     let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
     let sh = webNav.sessionHistory;
     if (webNav.canGoForward) {
       let forwardEntry = sh.getEntryAtIndex(sh.index + 1, false);
       let forwardURL = forwardEntry.URI.spec;
       if (forwardURL && (forwardURL == readerURL || !readerURL)) {
@@ -110,17 +110,17 @@ this.ReaderMode = {
 
     win.document.location = readerURL;
   },
 
   /**
    * Exit the reader mode by going back one step in history if applicable,
    * if not, append the original page in the history instead.
    */
-  leaveReaderMode: function(docShell, win) {
+  leaveReaderMode(docShell, win) {
     let url = win.document.location.href;
     let originalURL = this.getOriginalUrl(url);
     let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
     let sh = webNav.sessionHistory;
     if (webNav.canGoBack) {
       let prevEntry = sh.getEntryAtIndex(sh.index - 1, false);
       let prevURL = prevEntry.URI.spec;
       if (prevURL && (prevURL == originalURL || !originalURL)) {
@@ -134,17 +134,17 @@ this.ReaderMode = {
 
   /**
    * Returns original URL from an about:reader URL.
    *
    * @param url An about:reader URL.
    * @return The original URL for the article, or null if we did not find
    *         a properly formatted about:reader URL.
    */
-  getOriginalUrl: function(url) {
+  getOriginalUrl(url) {
     if (!url.startsWith("about:reader?")) {
       return null;
     }
 
     let outerHash = "";
     try {
       let uriObj = Services.io.newURI(url, null, null);
       url = uriObj.specIgnoringRef;
@@ -167,17 +167,17 @@ this.ReaderMode = {
   },
 
   /**
    * Decides whether or not a document is reader-able without parsing the whole thing.
    *
    * @param doc A document to parse.
    * @return boolean Whether or not we should show the reader mode button.
    */
-  isProbablyReaderable: function(doc) {
+  isProbablyReaderable(doc) {
     // Only care about 'real' HTML documents:
     if (doc.mozSyntheticDocument || !(doc instanceof doc.defaultView.HTMLDocument)) {
       return false;
     }
 
     let uri = Services.io.newURI(doc.location.href, null, null);
     if (!this._shouldCheckUri(uri)) {
       return false;
@@ -185,22 +185,22 @@ this.ReaderMode = {
 
     let utils = this.getUtilsForWin(doc.defaultView);
     // We pass in a helper function to determine if a node is visible, because
     // it uses gecko APIs that the engine-agnostic readability code can't rely
     // upon.
     return new Readability(uri, doc).isProbablyReaderable(this.isNodeVisible.bind(this, utils));
   },
 
-  isNodeVisible: function(utils, node) {
+  isNodeVisible(utils, node) {
     let bounds = utils.getBoundsWithoutFlushing(node);
     return bounds.height > 0 && bounds.width > 0;
   },
 
-  getUtilsForWin: function(win) {
+  getUtilsForWin(win) {
     return win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
   },
 
   /**
    * Gets an article from a loaded browser's document. This method will not attempt
    * to parse certain URIs (e.g. about: URIs).
    *
    * @param doc A document to parse.
@@ -231,17 +231,17 @@ this.ReaderMode = {
     if (!this._shouldCheckUri(uri, true)) {
       this.log("Reader mode disabled for URI");
       return null;
     }
 
     return yield this._readerParse(uri, doc);
   }),
 
-  _downloadDocument: function(url) {
+  _downloadDocument(url) {
     let histogram = Services.telemetry.getHistogramById("READER_MODE_DOWNLOAD_RESULT");
     return new Promise((resolve, reject) => {
       let xhr = new XMLHttpRequest();
       xhr.open("GET", url, true);
       xhr.onerror = evt => reject(evt.error);
       xhr.responseType = "document";
       xhr.onload = evt => {
         if (xhr.status !== 200) {
@@ -347,17 +347,17 @@ this.ReaderMode = {
     yield this._ensureCacheDir();
     return OS.File.writeAtomic(path, array, { tmpPath: path + ".tmp" })
       .then(success => {
         OS.File.stat(path).then(info => {
           return Messaging.sendRequest({
             type: "Reader:AddedToCache",
             url: article.url,
             size: info.size,
-            path: path,
+            path,
           });
         });
       });
   }),
 
   /**
    * Removes an article from the cache given an article URI.
    *
@@ -366,31 +366,31 @@ this.ReaderMode = {
    * @resolves When the article is removed.
    * @rejects OS.File.Error
    */
   removeArticleFromCache: Task.async(function* (url) {
     let path = this._toHashedPath(url);
     yield OS.File.remove(path);
   }),
 
-  log: function(msg) {
+  log(msg) {
     if (this.DEBUG)
       dump("Reader: " + msg);
   },
 
   _blockedHosts: [
     "mail.google.com",
     "github.com",
     "pinterest.com",
     "reddit.com",
     "twitter.com",
     "youtube.com",
   ],
 
-  _shouldCheckUri: function(uri, isBaseUri = false) {
+  _shouldCheckUri(uri, isBaseUri = false) {
     if (!(uri.schemeIs("http") || uri.schemeIs("https"))) {
       this.log("Not parsing URI scheme: " + uri.scheme);
       return false;
     }
 
     try {
       uri.QueryInterface(Ci.nsIURL);
     } catch (ex) {
@@ -489,34 +489,34 @@ this.ReaderMode = {
   },
 
   /**
    * Calculate the hashed path for a stripped article URL.
    *
    * @param url The article URL. This should have referrers removed.
    * @return The file path to the cached article.
    */
-  _toHashedPath: function(url) {
+  _toHashedPath(url) {
     let value = this._unicodeConverter.convertToByteArray(url);
     this._cryptoHash.init(this._cryptoHash.MD5);
     this._cryptoHash.update(value, value.length);
 
     let hash = CommonUtils.encodeBase32(this._cryptoHash.finish(false));
     let fileName = hash.substring(0, hash.indexOf("=")) + ".json";
     return OS.Path.join(OS.Constants.Path.profileDir, "readercache", fileName);
   },
 
   /**
    * Ensures the cache directory exists.
    *
    * @return Promise
    * @resolves When the cache directory exists.
    * @rejects OS.File.Error
    */
-  _ensureCacheDir: function() {
+  _ensureCacheDir() {
     let dir = OS.Path.join(OS.Constants.Path.profileDir, "readercache");
     return OS.File.exists(dir).then(exists => {
       if (!exists) {
         return OS.File.makeDir(dir);
       }
       return undefined;
     });
   },
--- a/toolkit/components/reader/ReaderWorker.js
+++ b/toolkit/components/reader/ReaderWorker.js
@@ -38,13 +38,13 @@ var Agent = {
   /**
    * Parses structured article data from a document.
    *
    * @param {object} uri URI data for the document.
    * @param {string} serializedDoc The serialized document.
    *
    * @return {object} Article object returned from Readability.
    */
-  parseDocument: function(uri, serializedDoc) {
+  parseDocument(uri, serializedDoc) {
     let doc = new JSDOMParser().parse(serializedDoc);
     return new Readability(uri, doc).parse();
   },
 };
--- a/toolkit/components/remotebrowserutils/RemoteWebNavigation.js
+++ b/toolkit/components/remotebrowserutils/RemoteWebNavigation.js
@@ -29,17 +29,17 @@ function RemoteWebNavigation()
 
 RemoteWebNavigation.prototype = {
   classDescription: "nsIWebNavigation for remote browsers",
   classID: Components.ID("{4b56964e-cdf3-4bb8-830c-0e2dad3f4ebd}"),
   contractID: "@mozilla.org/remote-web-navigation;1",
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebNavigation, Ci.nsISupports]),
 
-  swapBrowser: function(aBrowser) {
+  swapBrowser(aBrowser) {
     this._browser = aBrowser;
   },
 
   LOAD_FLAGS_MASK: 65535,
   LOAD_FLAGS_NONE: 0,
   LOAD_FLAGS_IS_REFRESH: 16,
   LOAD_FLAGS_IS_LINK: 32,
   LOAD_FLAGS_BYPASS_HISTORY: 64,
@@ -56,51 +56,51 @@ RemoteWebNavigation.prototype = {
   LOAD_FLAGS_FORCE_ALLOW_COOKIES: 131072,
 
   STOP_NETWORK: 1,
   STOP_CONTENT: 2,
   STOP_ALL: 3,
 
   canGoBack: false,
   canGoForward: false,
-  goBack: function() {
+  goBack() {
     this._sendMessage("WebNavigation:GoBack", {});
   },
-  goForward: function() {
+  goForward() {
     this._sendMessage("WebNavigation:GoForward", {});
   },
-  gotoIndex: function(aIndex) {
+  gotoIndex(aIndex) {
     this._sendMessage("WebNavigation:GotoIndex", {index: aIndex});
   },
-  loadURI: function(aURI, aLoadFlags, aReferrer, aPostData, aHeaders) {
+  loadURI(aURI, aLoadFlags, aReferrer, aPostData, aHeaders) {
     this.loadURIWithOptions(aURI, aLoadFlags, aReferrer,
                             Ci.nsIHttpChannel.REFERRER_POLICY_DEFAULT,
                             aPostData, aHeaders, null);
   },
-  loadURIWithOptions: function(aURI, aLoadFlags, aReferrer, aReferrerPolicy,
+  loadURIWithOptions(aURI, aLoadFlags, aReferrer, aReferrerPolicy,
                                aPostData, aHeaders, aBaseURI) {
     this._sendMessage("WebNavigation:LoadURI", {
       uri: aURI,
       flags: aLoadFlags,
       referrer: aReferrer ? aReferrer.spec : null,
       referrerPolicy: aReferrerPolicy,
       postData: aPostData ? readInputStreamToString(aPostData) : null,
       headers: aHeaders ? readInputStreamToString(aHeaders) : null,
       baseURI: aBaseURI ? aBaseURI.spec : null,
     });
   },
-  setOriginAttributesBeforeLoading: function(aOriginAttributes) {
+  setOriginAttributesBeforeLoading(aOriginAttributes) {
     this._sendMessage("WebNavigation:SetOriginAttributes", {
       originAttributes: aOriginAttributes,
     });
   },
-  reload: function(aReloadFlags) {
+  reload(aReloadFlags) {
     this._sendMessage("WebNavigation:Reload", {flags: aReloadFlags});
   },
-  stop: function(aStopFlags) {
+  stop(aStopFlags) {
     this._sendMessage("WebNavigation:Stop", {flags: aStopFlags});
   },
 
   get document() {
     return this._browser.contentDocument;
   },
 
   _currentURI: null,
@@ -121,17 +121,17 @@ RemoteWebNavigation.prototype = {
   // done in content scripts.
   get sessionHistory() {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
   set sessionHistory(aValue) {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
-  _sendMessage: function(aMessage, aData) {
+  _sendMessage(aMessage, aData) {
     try {
       this._browser.messageManager.sendAsyncMessage(aMessage, aData);
     }
     catch (e) {
       Cu.reportError(e);
     }
   },
 };
--- a/toolkit/components/satchel/AutoCompletePopup.jsm
+++ b/toolkit/components/satchel/AutoCompletePopup.jsm
@@ -49,21 +49,21 @@ var AutoCompleteResultView = {
   getStyleAt(index) {
     return this.results[index].style;
   },
 
   getImageAt(index) {
     return this.results[index].image;
   },
 
-  handleEnter: function(aIsPopupSelection) {
+  handleEnter(aIsPopupSelection) {
     AutoCompletePopup.handleEnter(aIsPopupSelection);
   },
 
-  stopSearch: function() {},
+  stopSearch() {},
 
   searchString: "",
 
   // nsIAutoCompleteInput
   get controller() {
     return this;
   },
 
@@ -71,50 +71,50 @@ var AutoCompleteResultView = {
     return null;
   },
 
   _focus() {
     AutoCompletePopup.requestFocus();
   },
 
   // Internal JS-only API
-  clearResults: function() {
+  clearResults() {
     this.results = [];
   },
 
-  setResults: function(results) {
+  setResults(results) {
     this.results = results;
   },
 };
 
 this.AutoCompletePopup = {
   MESSAGES: [
     "FormAutoComplete:SelectBy",
     "FormAutoComplete:GetSelectedIndex",
     "FormAutoComplete:SetSelectedIndex",
     "FormAutoComplete:MaybeOpenPopup",
     "FormAutoComplete:ClosePopup",
     "FormAutoComplete:Disconnect",
     "FormAutoComplete:RemoveEntry",
     "FormAutoComplete:Invalidate",
   ],
 
-  init: function() {
+  init() {
     for (let msg of this.MESSAGES) {
       Services.mm.addMessageListener(msg, this);
     }
   },
 
-  uninit: function() {
+  uninit() {
     for (let msg of this.MESSAGES) {
       Services.mm.removeMessageListener(msg, this);
     }
   },
 
-  handleEvent: function(evt) {
+  handleEvent(evt) {
     switch (evt.type) {
       case "popupshowing": {
         this.sendMessageToBrowser("FormAutoComplete:PopupOpened");
         break;
       }
 
       case "popuphidden": {
         AutoCompleteResultView.clearResults();
@@ -131,17 +131,17 @@ this.AutoCompletePopup = {
       }
     }
   },
 
   // Along with being called internally by the receiveMessage handler,
   // this function is also called directly by the login manager, which
   // uses a single message to fill in the autocomplete results. See
   // "RemoteLogins:autoCompleteLogins".
-  showPopupWithResults: function({ browser, rect, dir, results }) {
+  showPopupWithResults({ browser, rect, dir, results }) {
     if (!results.length || this.openedPopup) {
       // We shouldn't ever be showing an empty popup, and if we
       // already have a popup open, the old one needs to close before
       // we consider opening a new one.
       return;
     }
 
     let window = browser.ownerDocument.defaultView;
@@ -201,17 +201,17 @@ this.AutoCompletePopup = {
       this.openedPopup.hidePopup();
     }
   },
 
   removeLogin(login) {
     Services.logins.removeLogin(login);
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     if (!message.target.autoCompletePopup) {
       // Returning false to pacify ESLint, but this return value is
       // ignored by the messaging infrastructure.
       return false;
     }
 
     switch (message.name) {
       case "FormAutoComplete:SelectBy": {
@@ -295,20 +295,20 @@ this.AutoCompletePopup = {
   sendMessageToBrowser(msgName, data) {
     let browser = this.weakBrowser ? this.weakBrowser.get()
                                    : null;
     if (browser) {
       browser.messageManager.sendAsyncMessage(msgName, data);
     }
   },
 
-  stopSearch: function() {},
+  stopSearch() {},
 
   /**
    * Sends a message to the browser requesting that the input
    * that the AutoCompletePopup is open for be focused.
    */
-  requestFocus: function() {
+  requestFocus() {
     if (this.openedPopup) {
       this.sendMessageToBrowser("FormAutoComplete:Focus");
     }
   },
 }
--- a/toolkit/components/satchel/FormHistory.jsm
+++ b/toolkit/components/satchel/FormHistory.jsm
@@ -106,17 +106,17 @@ var supportsDeletedTable = AppConstants.
 
 var Prefs = {
   initialized: false,
 
   get debug() { this.ensureInitialized(); return this._debug; },
   get enabled() { this.ensureInitialized(); return this._enabled; },
   get expireDays() { this.ensureInitialized(); return this._expireDays; },
 
-  ensureInitialized: function() {
+  ensureInitialized() {
     if (this.initialized)
       return;
 
     this.initialized = true;
 
     this._debug = Services.prefs.getBoolPref("browser.formfill.debug");
     this._enabled = Services.prefs.getBoolPref("browser.formfill.enable");
     this._expireDays = Services.prefs.getIntPref("browser.formfill.expire_days");
@@ -684,29 +684,29 @@ function updateFormHistoryWrite(aChanges
     }
   }
 
   for (let stmt of stmts) {
     stmt.bindParameters(bindingArrays.get(stmt));
   }
 
   let handlers = {
-    handleCompletion : function(aReason) {
+    handleCompletion(aReason) {
       if (aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED) {
         for (let [notification, param] of notifications) {
           // We're either sending a GUID or nothing at all.
           sendNotification(notification, param);
         }
       }
 
       if (aCallbacks && aCallbacks.handleCompletion) {
         aCallbacks.handleCompletion(aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED ? 0 : 1);
       }
     },
-    handleError : function(aError) {
+    handleError(aError) {
       if (aCallbacks && aCallbacks.handleError) {
         aCallbacks.handleError(aError);
       }
     },
     handleResult : NOOP
   };
 
   dbConnection.executeAsync(stmts, stmts.length, handlers);
@@ -725,49 +725,49 @@ function updateFormHistoryWrite(aChanges
 function expireOldEntriesDeletion(aExpireTime, aBeginningCount) {
   log("expireOldEntriesDeletion(" + aExpireTime + "," + aBeginningCount + ")");
 
   FormHistory.update([
     {
       op: "remove",
       lastUsedEnd : aExpireTime,
     }], {
-      handleCompletion: function() {
+      handleCompletion() {
         expireOldEntriesVacuum(aExpireTime, aBeginningCount);
       },
-      handleError: function(aError) {
+      handleError(aError) {
         log("expireOldEntriesDeletionFailure");
       }
   });
 }
 
 /**
  * expireOldEntriesVacuum
  *
  * Counts number of entries removed and shrinks database as necessary.
  */
 function expireOldEntriesVacuum(aExpireTime, aBeginningCount) {
   FormHistory.count({}, {
-    handleResult: function(aEndingCount) {
+    handleResult(aEndingCount) {
       if (aBeginningCount - aEndingCount > 500) {
         log("expireOldEntriesVacuum");
 
         let stmt = dbCreateAsyncStatement("VACUUM");
         stmt.executeAsync({
           handleResult : NOOP,
-          handleError : function(aError) {
+          handleError(aError) {
             log("expireVacuumError");
           },
           handleCompletion : NOOP
         });
       }
 
       sendNotification("formhistory-expireoldentries", aExpireTime);
     },
-    handleError: function(aError) {
+    handleError(aError) {
       log("expireEndCountFailure");
     }
   });
 }
 
 this.FormHistory = {
   get enabled() {
     return Prefs.enabled;
@@ -776,30 +776,30 @@ this.FormHistory = {
   search : function formHistorySearch(aSelectTerms, aSearchData, aCallbacks) {
     // if no terms selected, select everything
     aSelectTerms = (aSelectTerms) ?  aSelectTerms : validFields;
     validateSearchData(aSearchData, "Search");
 
     let stmt = makeSearchStatement(aSearchData, aSelectTerms);
 
     let handlers = {
-      handleResult : function(aResultSet) {
+      handleResult(aResultSet) {
         for (let row = aResultSet.getNextRow(); row; row = aResultSet.getNextRow()) {
           let result = {};
           for (let field of aSelectTerms) {
             result[field] = row.getResultByName(field);
           }
 
           if (aCallbacks && aCallbacks.handleResult) {
             aCallbacks.handleResult(result);
           }
         }
       },
 
-      handleError : function(aError) {
+      handleError(aError) {
         if (aCallbacks && aCallbacks.handleError) {
           aCallbacks.handleError(aError);
         }
       },
 
       handleCompletion : function searchCompletionHandler(aReason) {
         if (aCallbacks && aCallbacks.handleCompletion) {
           aCallbacks.handleCompletion(aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED ? 0 : 1);
@@ -817,17 +817,17 @@ this.FormHistory = {
       handleResult : function countResultHandler(aResultSet) {
         let row = aResultSet.getNextRow();
         let count = row.getResultByName("numEntries");
         if (aCallbacks && aCallbacks.handleResult) {
           aCallbacks.handleResult(count);
         }
       },
 
-      handleError : function(aError) {
+      handleError(aError) {
         if (aCallbacks && aCallbacks.handleError) {
           aCallbacks.handleError(aError);
         }
       },
 
       handleCompletion : function searchCompletionHandler(aReason) {
         if (aCallbacks && aCallbacks.handleCompletion) {
           aCallbacks.handleCompletion(aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED ? 0 : 1);
@@ -916,17 +916,17 @@ this.FormHistory = {
       let changeToUpdate = change;
       FormHistory.search(
         [ "guid" ],
         {
           fieldname : change.fieldname,
           value : change.value
         }, {
           foundResult : false,
-          handleResult : function(aResult) {
+          handleResult(aResult) {
             if (this.foundResult) {
               log("Database contains multiple entries with the same fieldname/value pair.");
               if (aCallbacks && aCallbacks.handleError) {
                 aCallbacks.handleError({
                   message :
                     "Database contains multiple entries with the same fieldname/value pair.",
                   result : 19 // Constraint violation
                 });
@@ -935,23 +935,23 @@ this.FormHistory = {
               searchFailed = true;
               return;
             }
 
             this.foundResult = true;
             changeToUpdate.guid = aResult["guid"];
           },
 
-          handleError : function(aError) {
+          handleError(aError) {
             if (aCallbacks && aCallbacks.handleError) {
               aCallbacks.handleError(aError);
             }
           },
 
-          handleCompletion : function(aReason) {
+          handleCompletion(aReason) {
             completedSearches++;
             if (completedSearches == numSearches) {
               if (!aReason && !searchFailed) {
                 updateFormHistoryWrite(aChanges, aCallbacks);
               }
               else if (aCallbacks && aCallbacks.handleCompletion) {
                 aCallbacks.handleCompletion(1);
               }
@@ -1040,39 +1040,39 @@ this.FormHistory = {
         stmt.params["tokenContains" + i] = "%" + escapedToken + "%";
       }
     } else {
       // no additional params need to be substituted into the query when the
       // length is zero or one
     }
 
     let pending = stmt.executeAsync({
-      handleResult : function(aResultSet) {
+      handleResult(aResultSet) {
         for (let row = aResultSet.getNextRow(); row; row = aResultSet.getNextRow()) {
           let value = row.getResultByName("value");
           let frecency = row.getResultByName("frecency");
           let entry = {
             text :          value,
             textLowerCase : value.toLowerCase(),
-            frecency :      frecency,
+            frecency,
             totalScore :    Math.round(frecency * row.getResultByName("boundaryBonuses"))
           };
           if (aCallbacks && aCallbacks.handleResult) {
             aCallbacks.handleResult(entry);
           }
         }
       },
 
-      handleError : function(aError) {
+      handleError(aError) {
         if (aCallbacks && aCallbacks.handleError) {
           aCallbacks.handleError(aError);
         }
       },
 
-      handleCompletion : function(aReason) {
+      handleCompletion(aReason) {
         if (aCallbacks && aCallbacks.handleCompletion) {
           aCallbacks.handleCompletion(aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED ? 0 : 1);
         }
       }
     });
     return pending;
   },
 
@@ -1098,20 +1098,20 @@ this.FormHistory = {
 
     // Determine how many days of history we're supposed to keep.
     // Calculate expireTime in microseconds
     let expireTime = (Date.now() - Prefs.expireDays * DAY_IN_MS) * 1000;
 
     sendNotification("formhistory-beforeexpireoldentries", expireTime);
 
     FormHistory.count({}, {
-      handleResult: function(aBeginningCount) {
+      handleResult(aBeginningCount) {
         expireOldEntriesDeletion(expireTime, aBeginningCount);
       },
-      handleError: function(aError) {
+      handleError(aError) {
         log("expireStartCountFailure");
       }
     });
   },
 
   shutdown: function shutdown() { dbClose(true); }
 };
 
--- a/toolkit/components/satchel/FormHistoryStartup.js
+++ b/toolkit/components/satchel/FormHistoryStartup.js
@@ -17,17 +17,17 @@ FormHistoryStartup.prototype = {
   classID: Components.ID("{3A0012EB-007F-4BB8-AA81-A07385F77A25}"),
 
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsIObserver,
     Ci.nsISupportsWeakReference,
     Ci.nsIFrameMessageListener
   ]),
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case "nsPref:changed":
         FormHistory.updatePrefs();
         break;
       case "idle-daily":
       case "formhistory-expire-now":
         FormHistory.expireOldEntries();
         break;
@@ -39,17 +39,17 @@ FormHistoryStartup.prototype = {
       default:
         break;
     }
   },
 
   inited: false,
   pendingQuery: null,
 
-  init: function()
+  init()
   {
     if (this.inited)
       return;
     this.inited = true;
 
     Services.prefs.addObserver("browser.formfill.", this, true);
 
     // triggers needed service cleanup and db shutdown
@@ -65,17 +65,17 @@ FormHistoryStartup.prototype = {
     // or we might receive them from the ppmm if the searchbar is
     // having its history queried.
     for (let manager of [messageManager, Services.ppmm]) {
       manager.addMessageListener("FormHistory:AutoCompleteSearchAsync", this);
       manager.addMessageListener("FormHistory:RemoveEntry", this);
     }
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     switch (message.name) {
       case "FormHistory:FormSubmitEntries": {
         let entries = message.data;
         let changes = entries.map(function(entry) {
           return {
             op : "bump",
             fieldname : entry.name,
             value : entry.value,
--- a/toolkit/components/satchel/formSubmitListener.js
+++ b/toolkit/components/satchel/formSubmitListener.js
@@ -16,32 +16,32 @@ var satchelFormListener = {
                                             Ci.nsIDOMEventListener,
                                             Ci.nsIObserver,
                                             Ci.nsISupportsWeakReference]),
 
     debug          : true,
     enabled        : true,
     saveHttpsForms : true,
 
-    init : function() {
+    init() {
         Services.obs.addObserver(this, "earlyformsubmit", false);
         Services.prefs.addObserver("browser.formfill.", this, false);
         this.updatePrefs();
         addEventListener("unload", this, false);
     },
 
-    updatePrefs : function() {
+    updatePrefs() {
         this.debug          = Services.prefs.getBoolPref("browser.formfill.debug");
         this.enabled        = Services.prefs.getBoolPref("browser.formfill.enable");
         this.saveHttpsForms = Services.prefs.getBoolPref("browser.formfill.saveHttpsForms");
     },
 
     // Implements the Luhn checksum algorithm as described at
     // http://wikipedia.org/wiki/Luhn_algorithm
-    isValidCCNumber : function(ccNumber) {
+    isValidCCNumber(ccNumber) {
         // Remove dashes and whitespace
         ccNumber = ccNumber.replace(/[\-\s]/g, '');
 
         let len = ccNumber.length;
         if (len != 9 && len != 15 && len != 16)
             return false;
 
         if (!/^\d+$/.test(ccNumber))
@@ -56,50 +56,50 @@ var satchelFormListener = {
                 if (ch > 9)
                     ch -= 9;
             }
             total += ch;
         }
         return total % 10 == 0;
     },
 
-    log : function(message) {
+    log(message) {
         if (!this.debug)
             return;
         dump("satchelFormListener: " + message + "\n");
         Services.console.logStringMessage("satchelFormListener: " + message);
     },
 
     /* ---- dom event handler ---- */
 
-    handleEvent: function(e) {
+    handleEvent(e) {
         switch (e.type) {
             case "unload":
                 Services.obs.removeObserver(this, "earlyformsubmit");
                 Services.prefs.removeObserver("browser.formfill.", this);
                 break;
 
             default:
                 this.log("Oops! Unexpected event: " + e.type);
                 break;
         }
     },
 
     /* ---- nsIObserver interface ---- */
 
-    observe : function(subject, topic, data) {
+    observe(subject, topic, data) {
         if (topic == "nsPref:changed")
             this.updatePrefs();
         else
             this.log("Oops! Unexpected notification: " + topic);
     },
 
     /* ---- nsIFormSubmitObserver interfaces ---- */
 
-    notify : function(form, domWin, actionURI, cancelSubmit) {
+    notify(form, domWin, actionURI, cancelSubmit) {
         try {
             // Even though the global context is for a specific browser, we
             // can receive observer events from other tabs! Ensure this event
             // is about our content.
             if (domWin.top != content)
                 return;
             if (!this.enabled)
                 return;
@@ -166,17 +166,17 @@ var satchelFormListener = {
                 }
 
                 // Limit number of fields stored per form.
                 if (entries.length >= 100) {
                     this.log("not saving any more entries for this form.");
                     break;
                 }
 
-                entries.push({ name: name, value: value });
+                entries.push({ name, value });
             }
 
             if (entries.length) {
                 this.log("sending entries to parent process for form " + form.id);
                 sendAsyncMessage("FormHistory:FormSubmitEntries", entries);
             }
         }
         catch (e) {
--- a/toolkit/components/satchel/nsFormAutoComplete.js
+++ b/toolkit/components/satchel/nsFormAutoComplete.js
@@ -184,17 +184,17 @@ FormAutoComplete.prototype = {
 
     // Only one query via FormHistoryClient is performed at a time, and the
     // most recent FormHistoryClient which will be stored in _pendingClient
     // while the query is being performed. It will be cleared when the query
     // finishes, is cancelled, or an error occurs. If a new query occurs while
     // one is already pending, the existing one is cancelled.
     _pendingClient       : null,
 
-    init : function() {
+    init() {
         // Preferences. Add observer so we get notified of changes.
         this._prefBranch = Services.prefs.getBranch("browser.formfill.");
         this._prefBranch.addObserver("", this.observer, true);
         this.observer._self = this;
 
         this._debug            = this._prefBranch.getBoolPref("debug");
         this._enabled          = this._prefBranch.getBoolPref("enable");
         this._agedWeight       = this._prefBranch.getIntPref("agedWeight");
@@ -205,17 +205,17 @@ FormAutoComplete.prototype = {
     },
 
     observer : {
         _self : null,
 
         QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver,
                                                 Ci.nsISupportsWeakReference]),
 
-        observe : function(subject, topic, data) {
+        observe(subject, topic, data) {
             let self = this._self;
             if (topic == "nsPref:changed") {
                 let prefName = data;
                 self.log("got change to " + prefName + " preference");
 
                 switch (prefName) {
                     case "agedWeight":
                         self._agedWeight = self._prefBranch.getIntPref(prefName);
@@ -255,17 +255,17 @@ FormAutoComplete.prototype = {
     },
 
     /*
      * log
      *
      * Internal function for logging debug messages to the Error Console
      * window
      */
-    log : function(message) {
+    log(message) {
         if (!this._debug)
             return;
         dump("FormAutoComplete: " + message + "\n");
         Services.console.logStringMessage("FormAutoComplete: " + message);
     },
 
     /*
      * autoCompleteSearchAsync
@@ -273,17 +273,17 @@ FormAutoComplete.prototype = {
      * aInputName    -- |name| attribute from the form input being autocompleted.
      * aUntrimmedSearchString -- current value of the input
      * aField -- nsIDOMHTMLInputElement being autocompleted (may be null if from chrome)
      * aPreviousResult -- previous search result, if any.
      * aDatalistResult -- results from list=datalist for aField.
      * aListener -- nsIFormAutoCompleteObserver that listens for the nsIAutoCompleteResult
      *              that may be returned asynchronously.
      */
-    autoCompleteSearchAsync : function(aInputName,
+    autoCompleteSearchAsync(aInputName,
                                         aUntrimmedSearchString,
                                         aField,
                                         aPreviousResult,
                                         aDatalistResult,
                                         aListener) {
         function sortBytotalScore(a, b) {
             return b.totalScore - a.totalScore;
         }
@@ -463,34 +463,34 @@ FormAutoComplete.prototype = {
         // FormAutoCompleteResult.
         let {FormAutoCompleteResult} = Cu.import("resource://gre/modules/nsFormAutoCompleteResult.jsm", {});
         return new FormAutoCompleteResult(datalistResult.searchString,
                                           Ci.nsIAutoCompleteResult.RESULT_SUCCESS,
                                           0, "", finalValues, finalLabels,
                                           finalComments, historyResult);
     },
 
-    stopAutoCompleteSearch : function() {
+    stopAutoCompleteSearch() {
         if (this._pendingClient) {
             this._pendingClient.cancel();
             this._pendingClient = null;
         }
     },
 
     /*
      * Get the values for an autocomplete list given a search string.
      *
      *  client - a FormHistoryClient instance to perform the search with
      *  fieldName - fieldname field within form history (the form input name)
      *  searchString - string to search for
      *  callback - called when the values are available. Passed an array of objects,
      *             containing properties for each result. The callback is only called
      *             when successful.
      */
-    getAutoCompleteValues : function(client, fieldName, searchString, callback) {
+    getAutoCompleteValues(client, fieldName, searchString, callback) {
         let params = {
             agedWeight:         this._agedWeight,
             bucketSize:         this._bucketSize,
             expiryDate:         1000 * (Date.now() - this._expireDays * 24 * 60 * 60 * 1000),
             fieldname:          fieldName,
             maxTimeGroupings:   this._maxTimeGroupings,
             timeGroupingSize:   this._timeGroupingSize,
             prefixWeight:       this._prefixWeight,
@@ -509,17 +509,17 @@ FormAutoComplete.prototype = {
      * _calculateScore
      *
      * entry    -- an nsIAutoCompleteResult entry
      * aSearchString -- current value of the input (lowercase)
      * searchTokens -- array of tokens of the search string
      *
      * Returns: an int
      */
-    _calculateScore : function(entry, aSearchString, searchTokens) {
+    _calculateScore(entry, aSearchString, searchTokens) {
         let boundaryCalc = 0;
         // for each word, calculate word boundary weights
         for (let token of searchTokens) {
             boundaryCalc += (entry.textLowerCase.indexOf(token) == 0);
             boundaryCalc += (entry.textLowerCase.indexOf(" " + token) >= 0);
         }
         boundaryCalc = boundaryCalc * this._boundaryWeight;
         // now add more weight if we have a traditional prefix match and
@@ -549,17 +549,17 @@ FormAutoCompleteResult.prototype = {
     QueryInterface : XPCOMUtils.generateQI([Ci.nsIAutoCompleteResult,
                                             Ci.nsISupportsWeakReference]),
 
     // private
     client : null,
     entries : null,
     fieldName : null,
 
-    _checkIndexBounds : function(index) {
+    _checkIndexBounds(index) {
         if (index < 0 || index >= this.entries.length)
             throw Components.Exception("Index out of range.", Cr.NS_ERROR_ILLEGAL_VALUE);
     },
 
     // Allow autoCompleteSearch to get at the JS object so it can
     // modify some readonly properties for internal use.
     get wrappedJSObject() {
         return this;
@@ -577,45 +577,45 @@ FormAutoCompleteResult.prototype = {
         if (this.entries.length == 0)
             return Ci.nsIAutoCompleteResult.RESULT_NOMATCH;
         return Ci.nsIAutoCompleteResult.RESULT_SUCCESS;
     },
     get matchCount() {
         return this.entries.length;
     },
 
-    getValueAt : function(index) {
+    getValueAt(index) {
         this._checkIndexBounds(index);
         return this.entries[index].text;
     },
 
-    getLabelAt: function(index) {
+    getLabelAt(index) {
         return this.getValueAt(index);
     },
 
-    getCommentAt : function(index) {
+    getCommentAt(index) {
         this._checkIndexBounds(index);
         return "";
     },
 
-    getStyleAt : function(index) {
+    getStyleAt(index) {
         this._checkIndexBounds(index);
         return "";
     },
 
-    getImageAt : function(index) {
+    getImageAt(index) {
         this._checkIndexBounds(index);
         return "";
     },
 
-    getFinalCompleteValueAt : function(index) {
+    getFinalCompleteValueAt(index) {
         return this.getValueAt(index);
     },
 
-    removeValueAt : function(index, removeFromDB) {
+    removeValueAt(index, removeFromDB) {
         this._checkIndexBounds(index);
 
         let [removedEntry] = this.entries.splice(index, 1);
 
         if (removeFromDB) {
             this.client.remove(removedEntry.text);
         }
     }
--- a/toolkit/components/satchel/nsFormAutoCompleteResult.jsm
+++ b/toolkit/components/satchel/nsFormAutoCompleteResult.jsm
@@ -87,53 +87,53 @@ FormAutoCompleteResult.prototype = {
 
   /**
    * @return the number of results
    */
   get matchCount() {
     return this._values.length;
   },
 
-  _checkIndexBounds : function(index) {
+  _checkIndexBounds(index) {
     if (index < 0 || index >= this._values.length) {
       throw Components.Exception("Index out of range.", Cr.NS_ERROR_ILLEGAL_VALUE);
     }
   },
 
   /**
    * Retrieves a result
    * @param  index    the index of the result requested
    * @return          the result at the specified index
    */
-  getValueAt: function(index) {
+  getValueAt(index) {
     this._checkIndexBounds(index);
     return this._values[index];
   },
 
-  getLabelAt: function(index) {
+  getLabelAt(index) {
     this._checkIndexBounds(index);
     return this._labels[index] || this._values[index];
   },
 
   /**
    * Retrieves a comment (metadata instance)
    * @param  index    the index of the comment requested
    * @return          the comment at the specified index
    */
-  getCommentAt: function(index) {
+  getCommentAt(index) {
     this._checkIndexBounds(index);
     return this._comments[index];
   },
 
   /**
    * Retrieves a style hint specific to a particular index.
    * @param  index    the index of the style hint requested
    * @return          the style hint at the specified index
    */
-  getStyleAt: function(index) {
+  getStyleAt(index) {
     this._checkIndexBounds(index);
 
     if (this._formHistResult && index < this._formHistResult.matchCount) {
       return "fromhistory";
     }
 
     if (this._formHistResult &&
         this._formHistResult.matchCount > 0 &&
@@ -144,35 +144,35 @@ FormAutoCompleteResult.prototype = {
     return null;
   },
 
   /**
    * Retrieves an image url.
    * @param  index    the index of the image url requested
    * @return          the image url at the specified index
    */
-  getImageAt: function(index) {
+  getImageAt(index) {
     this._checkIndexBounds(index);
     return "";
   },
 
   /**
    * Retrieves a result
    * @param  index    the index of the result requested
    * @return          the result at the specified index
    */
-  getFinalCompleteValueAt: function(index) {
+  getFinalCompleteValueAt(index) {
     return this.getValueAt(index);
   },
 
   /**
    * Removes a result from the resultset
    * @param  index    the index of the result to remove
    */
-  removeValueAt: function(index, removeFromDatabase) {
+  removeValueAt(index, removeFromDatabase) {
     this._checkIndexBounds(index);
     // Forward the removeValueAt call to the underlying result if we have one
     // Note: this assumes that the form history results were added to the top
     // of our arrays.
     if (removeFromDatabase && this._formHistResult &&
         index < this._formHistResult.matchCount) {
       // Delete the history result from the DB
       this._formHistResult.removeValueAt(index, true);
--- a/toolkit/components/satchel/nsFormHistory.js
+++ b/toolkit/components/satchel/nsFormHistory.js
@@ -116,17 +116,17 @@ FormHistory.prototype = {
         let [id, guid] = this.getExistingEntryID(name, value);
         let stmt;
 
         if (id != -1) {
             // Update existing entry.
             let query = "UPDATE moz_formhistory SET timesUsed = timesUsed + 1, lastUsed = :lastUsed WHERE id = :id";
             let params = {
                             lastUsed : now,
-                            id       : id
+                            id
                          };
 
             try {
                 stmt = this.dbCreateStatement(query, params);
                 stmt.execute();
                 this.sendStringNotification("modifyEntry", name, value, guid);
             } catch (e) {
                 this.log("addEntry (modify) failed: " + e);
@@ -140,21 +140,21 @@ FormHistory.prototype = {
         } else {
             // Add new entry.
             guid = this.generateGUID();
 
             let query = "INSERT INTO moz_formhistory (fieldname, value, timesUsed, firstUsed, lastUsed, guid) " +
                             "VALUES (:fieldname, :value, :timesUsed, :firstUsed, :lastUsed, :guid)";
             let params = {
                             fieldname : name,
-                            value     : value,
+                            value,
                             timesUsed : 1,
                             firstUsed : now,
                             lastUsed  : now,
-                            guid      : guid
+                            guid
                         };
 
             try {
                 stmt = this.dbCreateStatement(query, params);
                 stmt.execute();
                 this.sendStringNotification("addEntry", name, value, guid);
             } catch (e) {
                 this.log("addEntry (create) failed: " + e);
@@ -171,26 +171,26 @@ FormHistory.prototype = {
     removeEntry : function removeEntry(name, value) {
         this.log("removeEntry for " + name + "=" + value);
 
         let [id, guid] = this.getExistingEntryID(name, value);
         this.sendStringNotification("before-removeEntry", name, value, guid);
 
         let stmt;
         let query = "DELETE FROM moz_formhistory WHERE id = :id";
-        let params = { id : id };
+        let params = { id };
         let existingTransactionInProgress;
 
         try {
             // Don't start a transaction if one is already in progress since we can't nest them.
             existingTransactionInProgress = this.dbConnection.transactionInProgress;
             if (!existingTransactionInProgress)
                 this.dbConnection.beginTransaction();
             this.moveToDeletedTable("VALUES (:guid, :timeDeleted)", {
-              guid: guid,
+              guid,
               timeDeleted: Date.now()
             });
 
             // remove from the formhistory database
             stmt = this.dbCreateStatement(query, params);
             stmt.execute();
             this.sendStringNotification("removeEntry", name, value, guid);
         } catch (e) {
@@ -311,31 +311,31 @@ FormHistory.prototype = {
     removeEntriesByTimeframe : function removeEntriesByTimeframe(beginTime, endTime) {
         this.log("removeEntriesByTimeframe for " + beginTime + " to " + endTime);
 
         this.sendIntNotification("before-removeEntriesByTimeframe", beginTime, endTime);
 
         let stmt;
         let query = "DELETE FROM moz_formhistory WHERE firstUsed >= :beginTime AND firstUsed <= :endTime";
         let params = {
-                        beginTime : beginTime,
-                        endTime   : endTime
+                        beginTime,
+                        endTime
                      };
         let existingTransactionInProgress;
 
         try {
             // Don't start a transaction if one is already in progress since we can't nest them.
             existingTransactionInProgress = this.dbConnection.transactionInProgress;
             if (!existingTransactionInProgress)
                 this.dbConnection.beginTransaction();
             this.moveToDeletedTable(
                   "SELECT guid, :timeDeleted FROM moz_formhistory " +
                   "WHERE firstUsed >= :beginTime AND firstUsed <= :endTime", {
-              beginTime: beginTime,
-              endTime: endTime
+              beginTime,
+              endTime
             });
 
             stmt = this.dbCreateStatement(query, params);
             stmt.executeStep();
             this.sendIntNotification("removeEntriesByTimeframe", beginTime, endTime);
         } catch (e) {
             if (!existingTransactionInProgress)
                 this.dbConnection.rollbackTransaction();
@@ -420,34 +420,34 @@ FormHistory.prototype = {
             break;
         }
     },
 
 
     /* ---- helpers ---- */
 
 
-    generateGUID : function() {
+    generateGUID() {
         // string like: "{f60d9eac-9421-4abc-8491-8e8322b063d4}"
         let uuid = this.uuidService.generateUUID().toString();
         let raw = ""; // A string with the low bytes set to random values
         let bytes = 0;
         for (let i = 1; bytes < 12 ; i += 2) {
             // Skip dashes
             if (uuid[i] == "-")
                 i++;
             let hexVal = parseInt(uuid[i] + uuid[i + 1], 16);
             raw += String.fromCharCode(hexVal);
             bytes++;
         }
         return btoa(raw);
     },
 
 
-    sendStringNotification : function(changeType, str1, str2, str3) {
+    sendStringNotification(changeType, str1, str2, str3) {
         function wrapit(str) {
             let wrapper = Cc["@mozilla.org/supports-string;1"].
                           createInstance(Ci.nsISupportsString);
             wrapper.data = str;
             return wrapper;
         }
 
         let strData;
@@ -461,17 +461,17 @@ FormHistory.prototype = {
             strData.appendElement(wrapit(str1), false);
             strData.appendElement(wrapit(str2), false);
             strData.appendElement(wrapit(str3), false);
         }
         this.sendNotification(changeType, strData);
     },
 
 
-    sendIntNotification : function(changeType, int1, int2) {
+    sendIntNotification(changeType, int1, int2) {
         function wrapit(int) {
             let wrapper = Cc["@mozilla.org/supports-PRInt64;1"].
                           createInstance(Ci.nsISupportsPRInt64);
             wrapper.data = int;
             return wrapper;
         }
 
         let intData;
@@ -484,28 +484,28 @@ FormHistory.prototype = {
                       createInstance(Ci.nsIMutableArray);
             intData.appendElement(wrapit(int1), false);
             intData.appendElement(wrapit(int2), false);
         }
         this.sendNotification(changeType, intData);
     },
 
 
-    sendNotification : function(changeType, data) {
+    sendNotification(changeType, data) {
         Services.obs.notifyObservers(data, "satchel-storage-changed", changeType);
     },
 
 
-    getExistingEntryID : function(name, value) {
+    getExistingEntryID(name, value) {
         let id = -1, guid = null;
         let stmt;
         let query = "SELECT id, guid FROM moz_formhistory WHERE fieldname = :fieldname AND value = :value";
         let params = {
                         fieldname : name,
-                        value     : value
+                        value
                      };
         try {
             stmt = this.dbCreateStatement(query, params);
             if (stmt.executeStep()) {
                 id   = stmt.row.id;
                 guid = stmt.row.guid;
             }
         } catch (e) {
@@ -516,17 +516,17 @@ FormHistory.prototype = {
                 stmt.reset();
             }
         }
 
         return [id, guid];
     },
 
 
-    countAllEntries : function() {
+    countAllEntries() {
         let query = "SELECT COUNT(1) AS numEntries FROM moz_formhistory";
 
         let stmt, numEntries;
         try {
             stmt = this.dbCreateStatement(query, null);
             stmt.executeStep();
             numEntries = stmt.row.numEntries;
         } catch (e) {
@@ -538,30 +538,30 @@ FormHistory.prototype = {
             }
         }
 
         this.log("countAllEntries: counted entries: " + numEntries);
         return numEntries;
     },
 
 
-    updatePrefs : function() {
+    updatePrefs() {
         this.debug          = Services.prefs.getBoolPref("browser.formfill.debug");
         this.enabled        = Services.prefs.getBoolPref("browser.formfill.enable");
     },
 
     // Database Creation & Access
 
     /*
      * dbCreateStatement
      *
      * Creates a statement, wraps it, and then does parameter replacement
      * Will use memoization so that statements can be reused.
      */
-    dbCreateStatement : function(query, params) {
+    dbCreateStatement(query, params) {
         let stmt = this.dbStmts[query];
         // Memoize the statements
         if (!stmt) {
             this.log("Creating new statement for query: " + query);
             stmt = this.dbConnection.createStatement(query);
             this.dbStmts[query] = stmt;
         }
         // Replace parameters, must be done 1 at a time
@@ -573,45 +573,45 @@ FormHistory.prototype = {
 
     /*
      * dbOpen
      *
      * Open a connection with the database and returns it.
      *
      * @returns a db connection object.
      */
-    dbOpen : function() {
+    dbOpen() {
         this.log("Open Database");
 
         let storage = Cc["@mozilla.org/storage/service;1"].
                       getService(Ci.mozIStorageService);
         return storage.openDatabase(this.dbFile);
     },
 
     /*
      * dbInit
      *
      * Attempts to initialize the database. This creates the file if it doesn't
      * exist, performs any migrations, etc.
      */
-    dbInit : function() {
+    dbInit() {
         this.log("Initializing Database");
 
         let version = this.dbConnection.schemaVersion;
 
         // Note: Firefox 3 didn't set a schema value, so it started from 0.
         // So we can't depend on a simple version == 0 check
         if (version == 0 && !this.dbConnection.tableExists("moz_formhistory"))
             this.dbCreate();
         else if (version != DB_VERSION)
             this.dbMigrate(version);
     },
 
 
-    dbCreate: function() {
+    dbCreate() {
         this.log("Creating DB -- tables");
         for (let name in this.dbSchema.tables) {
             let table = this.dbSchema.tables[name];
             this.dbCreateTable(name, table);
         }
 
         this.log("Creating DB -- indices");
         for (let name in this.dbSchema.indices) {
@@ -619,23 +619,23 @@ FormHistory.prototype = {
             let statement = "CREATE INDEX IF NOT EXISTS " + name + " ON " + index.table +
                             "(" + index.columns.join(", ") + ")";
             this.dbConnection.executeSimpleSQL(statement);
         }
 
         this.dbConnection.schemaVersion = DB_VERSION;
     },
 
-    dbCreateTable: function(name, table) {
+    dbCreateTable(name, table) {
         let tSQL = Object.keys(table).map(col => [col, table[col]].join(" ")).join(", ");
         this.log("Creating table " + name + " with " + tSQL);
         this.dbConnection.createTable(name, tSQL);
     },
 
-    dbMigrate : function(oldVersion) {
+    dbMigrate(oldVersion) {
         this.log("Attempting to migrate from version " + oldVersion);
 
         if (oldVersion > DB_VERSION) {
             this.log("Downgrading to version " + DB_VERSION);
             // User's DB is newer. Sanity check that our expected columns are
             // present, and if so mark the lower version and merrily continue
             // on. If the columns are borked, something is wrong so blow away
             // the DB and start from scratch. [Future incompatible upgrades
@@ -675,17 +675,17 @@ FormHistory.prototype = {
 
 
     /*
      * dbMigrateToVersion1
      *
      * Updates the DB schema to v1 (bug 463154).
      * Adds firstUsed, lastUsed, timesUsed columns.
      */
-    dbMigrateToVersion1 : function() {
+    dbMigrateToVersion1() {
         // Check to see if the new columns already exist (could be a v1 DB that
         // was downgraded to v0). If they exist, we don't need to add them.
         let query;
         ["timesUsed", "firstUsed", "lastUsed"].forEach(function(column) {
             if (!this.dbColumnExists(column)) {
                 query = "ALTER TABLE moz_formhistory ADD COLUMN " + column + " INTEGER";
                 this.dbConnection.executeSimpleSQL(query);
             }
@@ -717,32 +717,32 @@ FormHistory.prototype = {
 
 
     /*
      * dbMigrateToVersion2
      *
      * Updates the DB schema to v2 (bug 243136).
      * Adds lastUsed index, removes moz_dummy_table
      */
-    dbMigrateToVersion2 : function() {
+    dbMigrateToVersion2() {
         let query = "DROP TABLE IF EXISTS moz_dummy_table";
         this.dbConnection.executeSimpleSQL(query);
 
         query = "CREATE INDEX IF NOT EXISTS moz_formhistory_lastused_index ON moz_formhistory (lastUsed)";
         this.dbConnection.executeSimpleSQL(query);
     },
 
 
     /*
      * dbMigrateToVersion3
      *
      * Updates the DB schema to v3 (bug 506402).
      * Adds guid column and index.
      */
-    dbMigrateToVersion3 : function() {
+    dbMigrateToVersion3() {
         // Check to see if GUID column already exists, add if needed
         let query;
         if (!this.dbColumnExists("guid")) {
             query = "ALTER TABLE moz_formhistory ADD COLUMN guid TEXT";
             this.dbConnection.executeSimpleSQL(query);
 
             query = "CREATE INDEX IF NOT EXISTS moz_formhistory_guid_index ON moz_formhistory (guid)";
             this.dbConnection.executeSimpleSQL(query);
@@ -764,17 +764,17 @@ FormHistory.prototype = {
                 stmt.reset();
             }
         }
 
         // Generate a GUID for each login and update the DB.
         query = "UPDATE moz_formhistory SET guid = :guid WHERE id = :id";
         for (let id of ids) {
             let params = {
-                id   : id,
+                id,
                 guid : this.generateGUID()
             };
 
             try {
                 stmt = this.dbCreateStatement(query, params);
                 stmt.execute();
             } catch (e) {
                 this.log("Failed setting GUID: " + e);
@@ -782,29 +782,29 @@ FormHistory.prototype = {
             } finally {
                 if (stmt) {
                     stmt.reset();
                 }
             }
         }
     },
 
-    dbMigrateToVersion4 : function() {
+    dbMigrateToVersion4() {
         if (!this.dbConnection.tableExists("moz_deleted_formhistory")) {
             this.dbCreateTable("moz_deleted_formhistory", this.dbSchema.tables.moz_deleted_formhistory);
         }
     },
 
     /*
      * dbAreExpectedColumnsPresent
      *
      * Sanity check to ensure that the columns this version of the code expects
      * are present in the DB we're using.
      */
-    dbAreExpectedColumnsPresent : function() {
+    dbAreExpectedColumnsPresent() {
         for (let name in this.dbSchema.tables) {
             let table = this.dbSchema.tables[name];
             let query = "SELECT " +
                         Object.keys(table).join(", ") +
                         " FROM " + name;
             try {
                 let stmt = this.dbConnection.createStatement(query);
                 // (no need to execute statement, if it compiled we're good)
@@ -819,17 +819,17 @@ FormHistory.prototype = {
     },
 
 
     /*
      * dbColumnExists
      *
      * Checks to see if the named column already exists.
      */
-    dbColumnExists : function(columnName) {
+    dbColumnExists(columnName) {
         let query = "SELECT " + columnName + " FROM moz_formhistory";
         try {
             let stmt = this.dbConnection.createStatement(query);
             // (no need to execute statement, if it compiled we're good)
             stmt.finalize();
             return true;
         } catch (e) {
             return false;
@@ -871,17 +871,17 @@ FormHistory.prototype = {
     },
 
     /*
      * dbCleanup
      *
      * Called when database creation fails. Finalizes database statements,
      * closes the database connection, deletes the database file.
      */
-    dbCleanup : function() {
+    dbCleanup() {
         this.log("Cleaning up DB file - close & remove & backup")
 
         // Create backup file
         let storage = Cc["@mozilla.org/storage/service;1"].
                       getService(Ci.mozIStorageService);
         let backupFile = this.dbFile.leafName + ".corrupt";
         storage.backupDatabaseFile(this.dbFile, backupFile);
 
--- a/toolkit/components/satchel/nsInputListAutoComplete.js
+++ b/toolkit/components/satchel/nsInputListAutoComplete.js
@@ -9,27 +9,27 @@ Components.utils.import("resource://gre/
 Components.utils.import("resource://gre/modules/nsFormAutoCompleteResult.jsm");
 
 function InputListAutoComplete() {}
 
 InputListAutoComplete.prototype = {
   classID       : Components.ID("{bf1e01d0-953e-11df-981c-0800200c9a66}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIInputListAutoComplete]),
 
-  autoCompleteSearch : function(aUntrimmedSearchString, aField) {
+  autoCompleteSearch(aUntrimmedSearchString, aField) {
     let [values, labels] = this.getListSuggestions(aField);
     let searchResult = values.length > 0 ? Ci.nsIAutoCompleteResult.RESULT_SUCCESS
                                          : Ci.nsIAutoCompleteResult.RESULT_NOMATCH;
     let defaultIndex = values.length > 0 ? 0 : -1;
     return new FormAutoCompleteResult(aUntrimmedSearchString,
                                       searchResult, defaultIndex, "",
                                       values, labels, [], null);
   },
 
-  getListSuggestions : function(aField) {
+  getListSuggestions(aField) {
     let values = [];
     let labels = [];
 
     if (aField) {
       let filter = !aField.hasAttribute("mozNoFilter");
       let lowerFieldValue = aField.value.toLowerCase();
 
       if (aField.list) {
--- a/toolkit/components/satchel/test/parent_utils.js
+++ b/toolkit/components/satchel/test/parent_utils.js
@@ -20,21 +20,21 @@ var ParentUtils = {
   },
 
   cleanUpFormHist() {
     FormHistory.update({ op: "remove" });
   },
 
   updateFormHistory(changes) {
     let handler = {
-      handleError: function(error) {
+      handleError(error) {
         assert.ok(false, error);
         sendAsyncMessage("formHistoryUpdated", { ok: false });
       },
-      handleCompletion: function(reason) {
+      handleCompletion(reason) {
         if (!reason)
           sendAsyncMessage("formHistoryUpdated", { ok: true });
       },
     };
     FormHistory.update(changes, handler);
   },
 
   popupshownListener() {
--- a/toolkit/components/satchel/test/satchel_common.js
+++ b/toolkit/components/satchel/test/satchel_common.js
@@ -88,24 +88,24 @@ var checkObserver = {
     gChromeScript.sendAsyncMessage("addObserver");
     gChromeScript.addMessageListener("satchel-storage-changed", this.observe.bind(this));
   },
 
   uninit() {
     gChromeScript.sendAsyncMessage("removeObserver");
   },
 
-  waitForChecks: function(callback) {
+  waitForChecks(callback) {
     if (this.verifyStack.length == 0)
       callback();
     else
       this.callback = callback;
   },
 
-  observe: function({ subject, topic, data }) {
+  observe({ subject, topic, data }) {
     if (data != "formhistory-add" && data != "formhistory-update")
       return;
     ok(this.verifyStack.length > 0, "checking if saved form data was expected");
 
     // Make sure that every piece of data we expect to be saved is saved, and no
     // more. Here it is assumed that for every entry satchel saves or modifies, a
     // message is sent.
     //
@@ -124,17 +124,17 @@ var checkObserver = {
           checkObserver.callback = null;
           callback();
         }
       });
   }
 };
 
 function checkForSave(name, value, message) {
-  checkObserver.verifyStack.push({ name : name, value: value, message: message });
+  checkObserver.verifyStack.push({ name, value, message });
 }
 
 function getFormSubmitButton(formNum) {
   var form = $("form" + formNum); // by id, not name
   ok(form != null, "getting form " + formNum);
 
   // we can't just call form.submit(), because that doesn't seem to
   // invoke the form onsubmit handler.
--- a/toolkit/components/satchel/test/unit/head_satchel.js
+++ b/toolkit/components/satchel/test/unit/head_satchel.js
@@ -35,64 +35,64 @@ function getDBVersion(dbfile) {
 }
 
 const isGUID = /[A-Za-z0-9\+\/]{16}/;
 
 // Find form history entries.
 function searchEntries(terms, params, iter) {
   let results = [];
   FormHistory.search(terms, params, { handleResult: result => results.push(result),
-                                      handleError: function(error) {
+                                      handleError(error) {
                                         do_throw("Error occurred searching form history: " + error);
                                       },
-                                      handleCompletion: function(reason) { if (!reason) iter.next(results); }
+                                      handleCompletion(reason) { if (!reason) iter.next(results); }
                                     });
 }
 
 // Count the number of entries with the given name and value, and call then(number)
 // when done. If name or value is null, then the value of that field does not matter.
 function countEntries(name, value, then) {
   var obj = {};
   if (name !== null)
     obj.fieldname = name;
   if (value !== null)
     obj.value = value;
 
   let count = 0;
   FormHistory.count(obj, { handleResult: result => count = result,
-                           handleError: function(error) {
+                           handleError(error) {
                              do_throw("Error occurred searching form history: " + error);
                            },
-                           handleCompletion: function(reason) { if (!reason) then(count); }
+                           handleCompletion(reason) { if (!reason) then(count); }
                          });
 }
 
 // Perform a single form history update and call then() when done.
 function updateEntry(op, name, value, then) {
-  var obj = { op: op };
+  var obj = { op };
   if (name !== null)
     obj.fieldname = name;
   if (value !== null)
     obj.value = value;
   updateFormHistory(obj, then);
 }
 
 // Add a single form history entry with the current time and call then() when done.
 function addEntry(name, value, then) {
   let now = Date.now() * 1000;
-  updateFormHistory({ op: "add", fieldname: name, value: value, timesUsed: 1,
+  updateFormHistory({ op: "add", fieldname: name, value, timesUsed: 1,
                       firstUsed: now, lastUsed: now }, then);
 }
 
 // Wrapper around FormHistory.update which handles errors. Calls then() when done.
 function updateFormHistory(changes, then) {
-  FormHistory.update(changes, { handleError: function(error) {
+  FormHistory.update(changes, { handleError(error) {
                                   do_throw("Error occurred updating form history: " + error);
                                 },
-                                handleCompletion: function(reason) { if (!reason) then(); },
+                                handleCompletion(reason) { if (!reason) then(); },
                               });
 }
 
 /**
  * Logs info to the console in the standard way (includes the filename).
  *
  * @param aMessage
  *        The message to log to the console.
--- a/toolkit/components/satchel/test/unit/test_async_expire.js
+++ b/toolkit/components/satchel/test/unit/test_async_expire.js
@@ -13,17 +13,17 @@ function triggerExpiration() {
 }
 
 var checkExists = function(num) { do_check_true(num > 0); next_test(); }
 var checkNotExists = function(num) { do_check_true(!num); next_test(); }
 
 var TestObserver = {
   QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
 
-  observe : function(subject, topic, data) {
+  observe(subject, topic, data) {
     do_check_eq(topic, "satchel-storage-changed");
 
     if (data == "formhistory-expireoldentries") {
       next_test();
     }
   }
 };
 
@@ -83,17 +83,17 @@ function* tests()
   // 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 lastUsed = now - age * 24 * PR_HOURS;
 
     let changes = [ ];
     for (let r = 0; r < results.length; r++) {
-      changes.push({ op: "update", lastUsed: lastUsed, guid: results[r].guid });
+      changes.push({ op: "update", lastUsed, guid: results[r].guid });
     }
 
     return changes;
   }
 
   let results = yield searchEntries(["guid"], { lastUsed: 181 }, iter);
   yield updateFormHistory(updateLastUsed(results, 181), next_test);
 
--- a/toolkit/components/satchel/test/unit/test_autocomplete.js
+++ b/toolkit/components/satchel/test/unit/test_autocomplete.js
@@ -81,44 +81,44 @@ add_test(function test1() {
       });
     });
 });
 
 add_test(function test2() {
     do_log_info("Check search contains all entries");
 
     fac.autoCompleteSearchAsync("field1", "", null, null, null, {
-        onSearchCompletion : function(aResults) {
+        onSearchCompletion(aResults) {
             do_check_eq(numRecords, aResults.matchCount);
             run_next_test();
         }
     });
 });
 
 add_test(function test3() {
     do_log_info("Check search result ordering with empty search term");
 
     let lastFound = numRecords;
     fac.autoCompleteSearchAsync("field1", "", null, null, null, {
-        onSearchCompletion : function(aResults) {
+        onSearchCompletion(aResults) {
             for (let i = 0; i < numRecords; i += 2) {
                 do_check_eq(parseInt(aResults.getValueAt(i + 1).substr(5), 10), --lastFound);
                 do_check_eq(parseInt(aResults.getValueAt(i).substr(5), 10), --lastFound);
             }
             run_next_test();
         }
     });
 });
 
 add_test(function test4() {
     do_log_info("Check search result ordering with \"v\"");
 
     let lastFound = numRecords;
     fac.autoCompleteSearchAsync("field1", "v", null, null, null, {
-        onSearchCompletion : function(aResults) {
+        onSearchCompletion(aResults) {
             for (let i = 0; i < numRecords; i += 2) {
                 do_check_eq(parseInt(aResults.getValueAt(i + 1).substr(5), 10), --lastFound);
                 do_check_eq(parseInt(aResults.getValueAt(i).substr(5), 10), --lastFound);
             }
             run_next_test();
         }
     });
 });
@@ -138,31 +138,31 @@ add_test(function test5() {
     updateFormHistory(changes, run_next_test);
 });
 
 add_test(function test6() {
     do_log_info("Check search result ordering with empty search term");
 
     let lastFound = timesUsedSamples;
     fac.autoCompleteSearchAsync("field2", "", null, null, null, {
-        onSearchCompletion : function(aResults) {
+        onSearchCompletion(aResults) {
             for (let i = 0; i < timesUsedSamples; i++) {
                 do_check_eq(parseInt(aResults.getValueAt(i).substr(5)), --lastFound);
             }
             run_next_test();
         }
     });
 });
 
 add_test(function test7() {
     do_log_info("Check search result ordering with \"v\"");
 
     let lastFound = timesUsedSamples;
     fac.autoCompleteSearchAsync("field2", "v", null, null, null, {
-        onSearchCompletion : function(aResults) {
+        onSearchCompletion(aResults) {
             for (let i = 0; i < timesUsedSamples; i++) {
                 do_check_eq(parseInt(aResults.getValueAt(i).substr(5)), --lastFound);
             }
             run_next_test();
         }
     });
 });
 
@@ -176,17 +176,17 @@ add_test(function test8() {
                    timesUsed: 100, firstUsed: (agedDate + 60 * 1000 * 1000), lastUsed: now });
     changes.push({ op : "add", fieldname: "field3", value: "senior citizen",
                    timesUsed: 100, firstUsed: (agedDate - 60 * 1000 * 1000), lastUsed: now });
     updateFormHistory(changes, run_next_test);
 });
 
 add_test(function test9() {
     fac.autoCompleteSearchAsync("field3", "", null, null, null, {
-        onSearchCompletion : function(aResults) {
+        onSearchCompletion(aResults) {
             do_check_eq(aResults.getValueAt(0), "senior citizen");
             do_check_eq(aResults.getValueAt(1), "old but not senior");
             run_next_test();
         }
     });
 });
 
 add_test(function test10() {
@@ -199,46 +199,46 @@ add_test(function test10() {
                    timesUsed: 1, firstUsed: 0, lastUsed: now * 2 });
     changes.push({ op : "add", fieldname: "field4", value: "in the future 2",
                    timesUsed: 1, firstUsed: now * 2, lastUsed: now * 2 });
     updateFormHistory(changes, run_next_test);
 });
 
 add_test(function test11() {
     fac.autoCompleteSearchAsync("field4", "", null, null, null, {
-        onSearchCompletion : function(aResults) {
+        onSearchCompletion(aResults) {
             do_check_eq(aResults.matchCount, 3);
             run_next_test();
         }
     });
 });
 
 var syncValues = ["sync1", "sync1a", "sync2", "sync3"]
 
 add_test(function test12() {
     do_log_info("Check old synchronous api");
 
     let changes = [ ];
     for (let value of syncValues) {
-      changes.push({ op : "add", fieldname: "field5", value: value });
+      changes.push({ op : "add", fieldname: "field5", value });
     }
     updateFormHistory(changes, run_next_test);
 });
 
 add_test(function test_token_limit_DB() {
     function test_token_limit_previousResult(previousResult) {
         do_log_info("Check that the number of tokens used in a search is not capped to " +
                     "MAX_SEARCH_TOKENS when using a previousResult");
         // This provide more accuracy since performance is less of an issue.
         // Search for a string where the first 10 tokens match the previous value but the 11th does not
         // when re-using a previous result.
         fac.autoCompleteSearchAsync("field_token_cap",
                                     "a b c d e f g h i j .",
                                     null, previousResult, null, {
-                                        onSearchCompletion : function(aResults) {
+                                        onSearchCompletion(aResults) {
                                             do_check_eq(aResults.matchCount, 0,
                                                         "All search tokens should be used with " +
                                                         "previous results");
                                             run_next_test();
                                         }
                                     });
     }
 
@@ -250,17 +250,17 @@ add_test(function test_token_limit_DB() 
                    value: "a b c d e f g h i j k l m n o",
                    timesUsed: 1, firstUsed: 0, lastUsed: 0 });
     updateFormHistory(changes, () => {
         // Search for a string where the first 10 tokens match the value above but the 11th does not
         // (which would prevent the result from being returned if the 11th term was used).
         fac.autoCompleteSearchAsync("field_token_cap",
                                     "a b c d e f g h i j .",
                                     null, null, null, {
-                                        onSearchCompletion : function(aResults) {
+                                        onSearchCompletion(aResults) {
                                             do_check_eq(aResults.matchCount, 1,
                                                         "Only the first MAX_SEARCH_TOKENS tokens " +
                                                         "should be used for DB queries");
                                             test_token_limit_previousResult(aResults);
                                         }
         });
     });
 });
--- a/toolkit/components/satchel/test/unit/test_db_corrupt.js
+++ b/toolkit/components/satchel/test/unit/test_db_corrupt.js
@@ -39,29 +39,29 @@ add_test(function test_corruptFormHistor
   run_next_test();
 });
 
 
 add_test(function test_corruptFormHistoryDB_emptyInit() {
   do_log_info("test that FormHistory initializes an empty DB in place of corrupt DB.");
 
   FormHistory.count({}, {
-    handleResult : function(aNumEntries) {
+    handleResult(aNumEntries) {
       do_check_true(aNumEntries == 0);
       FormHistory.count({ fieldname : "name-A", value : "value-A" }, {
-        handleResult : function(aNumEntries2) {
+        handleResult(aNumEntries2) {
           do_check_true(aNumEntries2 == 0);
           run_next_test();
         },
-        handleError : function(aError2) {
+        handleError(aError2) {
           do_throw("DB initialized after reading a corrupt DB file found an entry.");
         }
       });
     },
-    handleError : function(aError) {
+    handleError(aError) {
       do_throw("DB initialized after reading a corrupt DB file is not empty.");
     }
   });
 });
 
 add_test(function test_corruptFormHistoryDB_addEntry() {
   do_log_info("test adding an entry to the empty DB.");
 
--- a/toolkit/components/satchel/test/unit/test_history_api.js
+++ b/toolkit/components/satchel/test/unit/test_history_api.js
@@ -7,55 +7,55 @@ var dbConnection; // used for deleted ta
 
 Cu.import("resource://gre/modules/Promise.jsm");
 
 function countDeletedEntries(expected)
 {
   let deferred = Promise.defer();
   let stmt = dbConnection.createAsyncStatement("SELECT COUNT(*) AS numEntries FROM moz_deleted_formhistory");
   stmt.executeAsync({
-    handleResult: function(resultSet) {
+    handleResult(resultSet) {
       do_check_eq(expected, resultSet.getNextRow().getResultByName("numEntries"));
       deferred.resolve();
     },
-    handleError : function(error) {
+    handleError(error) {
       do_throw("Error occurred counting deleted entries: " + error);
       deferred.reject();
     },
-    handleCompletion : function() {
+    handleCompletion() {
       stmt.finalize();
     }
   });
   return deferred.promise;
 }
 
 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: function(resultSet) {
+    handleResult(resultSet) {
       checkFunction(resultSet.getNextRow().getResultByName("timeDeleted"));
       deferred.resolve();
     },
-    handleError : function(error) {
+    handleError(error) {
       do_throw("Error occurred getting deleted entries: " + error);
       deferred.reject();
     },
-    handleCompletion : function() {
+    handleCompletion() {
       stmt.finalize();
     }
   });
   return deferred.promise;
 }
 
 function promiseUpdateEntry(op, name, value)
 {
-  var change = { op: op };
+  var change = { op };
   if (name !== null)
     change.fieldname = name;
   if (value !== null)
     change.value = value;
   return promiseUpdate(change);
 }
 
 function promiseUpdate(change) {
@@ -76,21 +76,21 @@ function promiseUpdate(change) {
 }
 
 function promiseSearchEntries(terms, params)
 {
   let deferred = Promise.defer();
   let results = [];
   FormHistory.search(terms, params,
                      { handleResult: result => results.push(result),
-                       handleError: function(error) {
+                       handleError(error) {
                          do_throw("Error occurred searching form history: " + error);
                          deferred.reject(error);
                        },
-                       handleCompletion: function(reason) { if (!reason) deferred.resolve(results); }
+                       handleCompletion(reason) { if (!reason) deferred.resolve(results); }
                      });
   return deferred.promise;
 }
 
 function promiseCountEntries(name, value, checkFn)
 {
   let deferred = Promise.defer();
   countEntries(name, value, function(result) { checkFn(result); deferred.resolve(); } );
@@ -137,21 +137,21 @@ add_task(function* ()
   let dbFile = Services.dirsvc.get("ProfD", Ci.nsIFile).clone();
   dbFile.append("formhistory.sqlite");
   dbConnection = Services.storage.openUnsharedDatabase(dbFile);
 
   let deferred = Promise.defer();
 
   let stmt = dbConnection.createAsyncStatement("DELETE FROM moz_deleted_formhistory");
   stmt.executeAsync({
-    handleResult: function(resultSet) { },
-    handleError : function(error) {
+    handleResult(resultSet) { },
+    handleError(error) {
       do_throw("Error occurred counting deleted all entries: " + error);
     },
-    handleCompletion : function() {
+    handleCompletion() {
       stmt.finalize();
       deferred.resolve();
     }
   });
   yield deferred.promise;
 
   // ===== 2 =====
   // Test looking for nonexistent / bogus data.
@@ -165,20 +165,20 @@ add_task(function* ()
   yield promiseCountEntries("", "value-A", checkNotExists);
   yield promiseCountEntries(null, "value-A", checkExists);
 
   // Cannot use promiseCountEntries when name and value are null because it treats null values as not set
   // and here a search should be done explicity for null.
   deferred = Promise.defer();
   yield FormHistory.count({ fieldname: null, value: null },
                           { handleResult: result => checkNotExists(result),
-                            handleError: function(error) {
+                            handleError(error) {
                               do_throw("Error occurred searching form history: " + error);
                             },
-                            handleCompletion: function(reason) { if (!reason) deferred.resolve() }
+                            handleCompletion(reason) { if (!reason) deferred.resolve() }
                           });
   yield deferred.promise;
 
   // ===== 3 =====
   // Test removeEntriesForName with a single matching value
   testnum++;
   yield promiseUpdateEntry("remove", "name-A", null);
 
@@ -286,17 +286,17 @@ add_task(function* ()
 
   // ===== 12 =====
   // Update a single entry
   testnum++;
 
   results = yield promiseSearchEntries(["guid"], { fieldname: "field1", value: "value1" });
   let guid = processFirstResult(results)[3];
 
-  yield promiseUpdate({ op : "update", guid: guid, value: "modifiedValue" });
+  yield promiseUpdate({ op : "update", guid, value: "modifiedValue" });
   yield promiseCountEntries("field1", "modifiedValue", checkExists);
   yield promiseCountEntries("field1", "value1", checkNotExists);
   yield promiseCountEntries("field1", "value1b", checkExists);
   yield promiseCountEntries(null, null, num => do_check_eq(num, 2));
 
   // ===== 13 =====
   // Add a single entry with times
   testnum++;
@@ -338,34 +338,34 @@ add_task(function* ()
   do_check_eq(400, lastUsed);
   yield promiseCountEntries(null, null, num => do_check_eq(num, 4));
 
   // ===== 16 =====
   // Bump an entry with a guid
   testnum++;
   results = yield promiseSearchEntries(["guid"], { fieldname: "field3", value: "value3" });
   guid = processFirstResult(results)[3];
-  yield promiseUpdate({ op : "bump", guid: guid, timesUsed: 20, firstUsed: 55, lastUsed: 400 });
+  yield promiseUpdate({ op : "bump", guid, timesUsed: 20, firstUsed: 55, lastUsed: 400 });
   results = yield promiseSearchEntries(["timesUsed", "firstUsed", "lastUsed"],
                                        { fieldname: "field3", value: "value3" });
   [timesUsed, firstUsed, lastUsed] = processFirstResult(results);
   do_check_eq(11, timesUsed);
   do_check_eq(50, firstUsed);
   do_check_true(lastUsed > 400);
   yield promiseCountEntries(null, null, num => do_check_eq(num, 4));
 
   // ===== 17 =====
   // Remove an entry
   testnum++;
   yield countDeletedEntries(7);
 
   results = yield promiseSearchEntries(["guid"], { fieldname: "field1", value: "value1b" });
   guid = processFirstResult(results)[3];
 
-  yield promiseUpdate({ op : "remove", guid: guid});
+  yield promiseUpdate({ op : "remove", guid});
   yield promiseCountEntries("field1", "modifiedValue", checkExists);
   yield promiseCountEntries("field1", "value1b", checkNotExists);
   yield promiseCountEntries(null, null, num => do_check_eq(num, 3));
 
   yield countDeletedEntries(8);
   yield checkTimeDeleted(guid, timeDeleted => do_check_true(timeDeleted > 10000));
 
   // ===== 18 =====
--- a/toolkit/components/satchel/test/unit/test_notify.js
+++ b/toolkit/components/satchel/test/unit/test_notify.js
@@ -6,17 +6,17 @@
  */
 
 var expectedNotification;
 var expectedData;
 
 var TestObserver = {
   QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
 
-  observe : function(subject, topic, data) {
+  observe(subject, topic, data) {
     do_check_eq(topic, "satchel-storage-changed");
     do_check_eq(data, expectedNotification);
 
     switch (data) {
         case "formhistory-add":
         case "formhistory-update":
             do_check_true(subject instanceof Ci.nsISupportsString);
             do_check_true(isGUID.test(subject.toString()));
@@ -135,18 +135,18 @@ do_check_eq(expectedNotification, null);
 /* ========== 8 ========== */
 testnum++;
 testdesc = "removeEntriesByTimeframe";
 
 expectedNotification = "formhistory-remove";
 expectedData = [10, 99999999999];
 
 yield FormHistory.update({ op: "remove", firstUsedStart: expectedData[0], firstUsedEnd: expectedData[1] },
-                         { handleCompletion: function(reason) { if (!reason) next_test() },
-                           handleErrors: function(error) {
+                         { handleCompletion(reason) { if (!reason) next_test() },
+                           handleErrors(error) {
                              do_throw("Error occurred updating form history: " + error);
                            }
                          });
 
 do_check_eq(expectedNotification, null);
 
 os.removeObserver(TestObserver, "satchel-storage-changed", false);
 
--- a/toolkit/components/satchel/test/unit/test_previous_result.js
+++ b/toolkit/components/satchel/test/unit/test_previous_result.js
@@ -1,21 +1,21 @@
 /* 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 aaaListener = {
-  onSearchResult: function(search, result) {
+  onSearchResult(search, result) {
     do_check_eq(result.searchString, "aaa");
     do_test_finished();
   }
 };
 
 var aaListener = {
-  onSearchResult: function(search, result) {
+  onSearchResult(search, result) {
     do_check_eq(result.searchString, "aa");
     search.startSearch("aaa", "", result, aaaListener);
   }
 };
 
 function run_test()
 {
   do_test_pending();
--- a/toolkit/components/search/SearchStaticData.jsm
+++ b/toolkit/components/search/SearchStaticData.jsm
@@ -32,12 +32,12 @@ this.SearchStaticData = {
    * @param aDomain
    *        Lowercase host name to look up. For example, if this argument is
    *        "www.google.com" or "www.google.co.uk", the function returns the
    *        full list of supported Google domains.
    *
    * @return Array containing one entry for each alternate host name, or empty
    *         array if none is known.  The returned array should not be modified.
    */
-  getAlternateDomains: function(aDomain) {
+  getAlternateDomains(aDomain) {
     return gGoogleDomains.indexOf(aDomain) == -1 ? [] : gGoogleDomains;
   },
 };
--- a/toolkit/components/search/SearchSuggestionController.jsm
+++ b/toolkit/components/search/SearchSuggestionController.jsm
@@ -101,17 +101,17 @@ this.SearchSuggestionController.prototyp
    *
    * @param {string} searchTerm - the term to provide suggestions for
    * @param {bool} privateMode - whether the request is being made in the context of private browsing
    * @param {nsISearchEngine} engine - search engine for the suggestions.
    * @param {int} userContextId - the userContextId of the selected tab.
    *
    * @return {Promise} resolving to an object containing results or null.
    */
-  fetch: function(searchTerm, privateMode, engine, userContextId) {
+  fetch(searchTerm, privateMode, engine, userContextId) {
     // There is no smart filtering from previous results here (as there is when looking through
     // history/form data) because the result set returned by the server is different for every typed
     // value - e.g. "ocean breathes" does not return a subset of the results returned for "ocean".
 
     this.stop();
 
     if (!Services.search.isInitialized) {
       throw new Error("Search not initialized yet (how did you get here?)");
@@ -159,29 +159,29 @@ this.SearchSuggestionController.prototyp
 
   /**
    * Stop pending fetches so no results are returned from them.
    *
    * Note: If there was no remote results fetched, the fetching cannot be stopped and local results
    * will still be returned because stopping relies on aborting the XMLHTTPRequest to reject the
    * promise for Promise.all.
    */
-  stop: function() {
+  stop() {
     if (this._request) {
       this._request.abort();
     } else if (!this.maxRemoteResults) {
       Cu.reportError("SearchSuggestionController: Cannot stop fetching if remote results were not " +
                      "requested");
     }
     this._reset();
   },
 
   // Private methods
 
-  _fetchFormHistory: function(searchTerm) {
+  _fetchFormHistory(searchTerm) {
     let deferredFormHistory = Promise.defer();
 
     let acSearchObserver = {
       // Implements nsIAutoCompleteSearch
       onSearchResult: (search, result) => {
         this._formHistoryResult = result;
 
         if (this._request) {
@@ -221,17 +221,17 @@ this.SearchSuggestionController.prototyp
                             this._formHistoryResult,
                             acSearchObserver);
     return deferredFormHistory;
   },
 
   /**
    * Fetch suggestions from the search engine over the network.
    */
-  _fetchRemote: function(searchTerm, engine, privateMode, userContextId) {
+  _fetchRemote(searchTerm, engine, privateMode, userContextId) {
     let deferredResponse = Promise.defer();
     this._request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
                     createInstance(Ci.nsIXMLHttpRequest);
     let submission = engine.getSubmission(searchTerm,
                                           SEARCH_RESPONSE_SUGGESTION_JSON);
     let method = (submission.postData ? "POST" : "GET");
     this._request.open(method, submission.uri.spec, true);
 
@@ -251,17 +251,17 @@ this.SearchSuggestionController.prototyp
     return deferredResponse;
   },
 
   /**
    * Called when the request completed successfully (thought the HTTP status could be anything)
    * so we can handle the response data.
    * @private
    */
-  _onRemoteLoaded: function(deferredResponse) {
+  _onRemoteLoaded(deferredResponse) {
     if (!this._request) {
       deferredResponse.resolve("Got HTTP response after the request was cancelled");
       return;
     }
 
     let status, serverResults;
     try {
       status = this._request.status;
@@ -292,17 +292,17 @@ this.SearchSuggestionController.prototyp
     }
     let results = serverResults[1] || [];
     deferredResponse.resolve({ result: results });
   },
 
   /**
    * Called when this._remoteResultTimer fires indicating the remote request took too long.
    */
-  _onRemoteTimeout: function() {
+  _onRemoteTimeout() {
     this._request = null;
 
     // FIXME: bug 387341
     // Need to break the cycle between us and the timer.
     this._remoteResultTimer = null;
 
     // The XMLHTTPRequest for suggest results is taking too long
     // so send out the form history results and cancel the request.
@@ -311,17 +311,17 @@ this.SearchSuggestionController.prototyp
       this._deferredRemoteResult = null;
     }
   },
 
   /**
    * @param {Array} suggestResults - an array of result objects from different sources (local or remote)
    * @return {Object}
    */
-  _dedupeAndReturnResults: function(suggestResults) {
+  _dedupeAndReturnResults(suggestResults) {
     if (this._searchString === null) {
       // _searchString can be null if stop() was called and remote suggestions
       // were disabled (stopping if we are fetching remote suggestions will
       // cause a promise rejection before we reach _dedupeAndReturnResults).
       return null;
     }
 
     let results = {
@@ -366,17 +366,17 @@ this.SearchSuggestionController.prototyp
     if (this._callback) {
       this._callback(results);
     }
     this._reset();
 
     return results;
   },
 
-  _reset: function() {
+  _reset() {
     this._request = null;
     if (this._remoteResultTimer) {
       this._remoteResultTimer.cancel();
       this._remoteResultTimer = null;
     }
     this._deferredRemoteResult = null;
     this._searchString = null;
   },
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -366,20 +366,20 @@ loadListener.prototype = {
 
   // nsIInterfaceRequestor
   getInterface: function SRCH_load_GI(aIID) {
     return this.QueryInterface(aIID);
   },
 
   // FIXME: bug 253127
   // nsIHttpEventSink
-  onRedirect: function(aChannel, aNewChannel) {},
+  onRedirect(aChannel, aNewChannel) {},
   // nsIProgressEventSink
-  onProgress: function(aRequest, aContext, aProgress, aProgressMax) {},
-  onStatus: function(aRequest, aContext, aStatus, aStatusArg) {}
+  onProgress(aRequest, aContext, aProgress, aProgressMax) {},
+  onStatus(aRequest, aContext, aStatus, aStatusArg) {}
 }
 
 function isPartnerBuild() {
   try {
     let distroID = Services.prefs.getCharPref("distribution.id");
 
     // Mozilla-provided builds (i.e. funnelcake) are not partner builds
     if (distroID && !distroID.startsWith("mozilla")) {
@@ -1422,17 +1422,17 @@ Engine.prototype = {
   _initFromURIAndLoad: function SRCH_ENG_initFromURIAndLoad(uri) {
     ENSURE_WARN(uri instanceof Ci.nsIURI,
                 "Must have URI when calling _initFromURIAndLoad!",
                 Cr.NS_ERROR_UNEXPECTED);
 
     LOG("_initFromURIAndLoad: Downloading engine from: \"" + uri.spec + "\".");
 
     var chan = NetUtil.newChannel({
-                 uri: uri,
+                 uri,
                  loadUsingSystemPrincipal: true
                });
 
     if (this._engineToUpdate && (chan instanceof Ci.nsIHttpChannel)) {
       var lastModified = this._engineToUpdate.getAttr("updatelastmodified");
       if (lastModified)
         chan.setRequestHeader("If-Modified-Since", lastModified, false);
     }
@@ -1488,17 +1488,17 @@ Engine.prototype = {
                 Cr.NS_ERROR_UNEXPECTED);
 
     ENSURE_WARN(uri.schemeIs("resource"), "_initFromURISync called for non-resource URI",
                 Cr.NS_ERROR_FAILURE);
 
     LOG("_initFromURISync: Loading engine from: \"" + uri.spec + "\".");
 
     var chan = NetUtil.newChannel({
-                 uri: uri,
+                 uri,
                  loadUsingSystemPrincipal: true
                });
 
     var stream = chan.open2();
     var parser = Cc["@mozilla.org/xmlextras/domparser;1"].
                  createInstance(Ci.nsIDOMParser);
     var doc = parser.parseFromStream(stream, "UTF-8", stream.available(), "text/xml");
 
@@ -1774,17 +1774,17 @@ Engine.prototype = {
         }
         break;
       case "http":
       case "https":
       case "ftp":
         LOG("_setIcon: Downloading icon: \"" + uri.spec +
             "\" for engine: \"" + this.name + "\"");
         var chan = NetUtil.newChannel({
-                     uri: uri,
+                     uri,
                      loadUsingSystemPrincipal: true
                    });
 
         let iconLoadCallback = function(aByteArray, aEngine) {
           // This callback may run after we've already set a preferred icon,
           // so check again.
           if (aEngine._hasPreferredIcon && !aIsPreferred)
             return;
@@ -2472,17 +2472,17 @@ Engine.prototype = {
     if (url)
       return url.resultDomain;
     return "";
   },
 
   /**
    * Returns URL parsing properties used by _buildParseSubmissionMap.
    */
-  getURLParsingInfo: function() {
+  getURLParsingInfo() {
     let responseType = AppConstants.platform == "android" ? this._defaultMobileResponseType :
                                                             URLTYPE_SEARCH_HTML;
 
     LOG("getURLParsingInfo: responseType: \"" + responseType + "\"");
 
     let url = this._getURLOfType(responseType);
     if (!url || url.method != "GET") {
       return null;
@@ -2492,17 +2492,17 @@ Engine.prototype = {
     if (!termsParameterName) {
       return null;
     }
 
     let templateUrl = NetUtil.newURI(url.template).QueryInterface(Ci.nsIURL);
     return {
       mainDomain: templateUrl.host,
       path: templateUrl.filePath.toLowerCase(),
-      termsParameterName: termsParameterName,
+      termsParameterName,
     };
   },
 
   // nsISupports
   QueryInterface: XPCOMUtils.generateQI([Ci.nsISearchEngine]),
 
   get wrappedJSObject() {
     return this;
@@ -3109,17 +3109,17 @@ SearchService.prototype = {
     }
 
     LOG("_asyncLoadEngines: loading from cache directories");
     this._loadEnginesFromCache(cache);
 
     LOG("_asyncLoadEngines: done");
   }),
 
-  _asyncReInit: function() {
+  _asyncReInit() {
     LOG("_asyncReInit");
     // Start by clearing the initialized state, so we don't abort early.
     gInitialized = false;
 
     Task.spawn(function* () {
       try {
         if (this._batchTask) {
           LOG("finalizing batch task");
@@ -3543,17 +3543,17 @@ SearchService.prototype = {
           throw ex;
         }
         LOG("_asyncLoadFromChromeURLs: failed to load engine: " + ex);
       }
     }
     return engines;
   }),
 
-  _convertChannelToFile: function(chan) {
+  _convertChannelToFile(chan) {
     let fileURI = chan.URI;
     while (fileURI instanceof Ci.nsIJARURI)
       fileURI = fileURI.JARFile;
     fileURI.QueryInterface(Ci.nsIFileURL);
 
     return fileURI.file;
   },
 
@@ -4344,17 +4344,17 @@ SearchService.prototype = {
         uri.userPass = ""; // Avoid reporting a username or password.
         result.submissionURL = uri.spec;
       }
     }
 
     return result;
   },
 
-  _recordEngineTelemetry: function() {
+  _recordEngineTelemetry() {
     Services.telemetry.getHistogramById("SEARCH_SERVICE_ENGINE_COUNT")
             .add(Object.keys(this._engines).length);
     let hasUpdates = false;
     let hasIconUpdates = false;
     for (let name in this._engines) {
       let engine = this._engines[name];
       if (engine._hasUpdates) {
         hasUpdates = true;
@@ -4405,17 +4405,17 @@ SearchService.prototype = {
       let urlParsingInfo = engine.getURLParsingInfo();
       if (!urlParsingInfo) {
         LOG("Engine does not support URL parsing.");
         continue;
       }
 
       // Store the same object on each matching map key, as an optimization.
       let mapValueForEngine = {
-        engine: engine,
+        engine,
         termsParameterName: urlParsingInfo.termsParameterName,
       };
 
       let processDomain = (domain, isAlternate) => {
         let key = domain + urlParsingInfo.path;
 
         // Apply the logic for which main domains take priority over alternate
         // domains, even if they are found later in the ordered engine list.
@@ -4443,17 +4443,17 @@ SearchService.prototype = {
                       .forEach(d => processDomain(d, true));
     }
   },
 
   /**
    * Checks to see if any engine has an EngineURL of type URLTYPE_SEARCH_HTML
    * for this request-method, template URL, and query params.
    */
-  hasEngineWithURL: function(method, template, formData) {
+  hasEngineWithURL(method, template, formData) {
     this._ensureInitialized();
 
     // Quick helper method to ensure formData filtered/sorted for compares.
     let getSortedFormData = data => {
       return data.filter(a => a.name && a.value).sort((a, b) => {
         if (a.name > b.name) {
           return 1;
         } else if (b.name > a.name) {
--- a/toolkit/components/search/nsSearchSuggestions.js
+++ b/toolkit/components/search/nsSearchSuggestions.js
@@ -18,17 +18,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
  * providers is identical.
  * @constructor
  */
 function SuggestAutoComplete() {
   this._init();
 }
 SuggestAutoComplete.prototype = {
 
-  _init: function() {
+  _init() {
     this._suggestionController = new SearchSuggestionController(obj => this.onResultsReturned(obj));
     this._suggestionController.maxLocalResults = this._historyLimit;
   },
 
   get _suggestionLabel() {
     let bundle = Services.strings.createBundle("chrome://global/locale/search/search.properties");
     let label = bundle.GetStringFromName("suggestion_label");
     Object.defineProperty(SuggestAutoComplete.prototype, "_suggestionLabel", {value: label});
@@ -49,17 +49,17 @@ SuggestAutoComplete.prototype = {
    * to be visible.
    */
   _historyLimit: 7,
 
   /**
    * Callback for handling results from SearchSuggestionController.jsm
    * @private
    */
-  onResultsReturned: function(results) {
+  onResultsReturned(results) {
     let finalResults = [];
     let finalComments = [];
 
     // If form history has results, add them to the list.
     for (let i = 0; i < results.local.length; ++i) {
       finalResults.push(results.local[i]);
       finalComments.push("");
     }
@@ -80,17 +80,17 @@ SuggestAutoComplete.prototype = {
 
   /**
    * Notifies the front end of new results.
    * @param searchString  the user's query string
    * @param results       an array of results to the search
    * @param comments      an array of metadata corresponding to the results
    * @private
    */
-  onResultsReady: function(searchString, results, comments, formHistoryResult) {
+  onResultsReady(searchString, results, comments, formHistoryResult) {
     if (this._listener) {
       // Create a copy of the results array to use as labels, since
       // FormAutoCompleteResult doesn't like being passed the same array
       // for both.
       let labels = results.slice();
       let result = new FormAutoCompleteResult(
           searchString,
           Ci.nsIAutoCompleteResult.RESULT_SUCCESS,
@@ -117,17 +117,17 @@ SuggestAutoComplete.prototype = {
    *                        this parameter and the next are unused, pass
    *                        them through in case the form history
    *                        service wants them
    * @param previousResult  unused, a client-cached store of the previous
    *                        generated resultset for faster searching.
    * @param listener        object implementing nsIAutoCompleteObserver which
    *                        we notify when results are ready.
    */
-  startSearch: function(searchString, searchParam, previousResult, listener) {
+  startSearch(searchString, searchParam, previousResult, listener) {
     // Don't reuse a previous form history result when it no longer applies.
     if (!previousResult)
       this._formHistoryResult = null;
 
     var formHistorySearchParam = searchParam.split("|")[0];
 
     // Receive the information about the privacy mode of the window to which
     // this search box belongs.  The front-end's search.xml bindings passes this
@@ -152,28 +152,28 @@ SuggestAutoComplete.prototype = {
       }
       this._triggerSearch(searchString, formHistorySearchParam, listener, privacyMode);
     }).bind(this));
   },
 
   /**
    * Actual implementation of search.
    */
-  _triggerSearch: function(searchString, searchParam, listener, privacyMode) {
+  _triggerSearch(searchString, searchParam, listener, privacyMode) {
     this._listener = listener;
     this._suggestionController.fetch(searchString,
                                      privacyMode,
                                      Services.search.currentEngine);
   },
 
   /**
    * Ends the search result gathering process. Part of nsIAutoCompleteSearch
    * implementation.
    */
-  stopSearch: function() {
+  stopSearch() {
     this._suggestionController.stop();
   },
 
   // nsISupports
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteSearch,
                                          Ci.nsIAutoCompleteObserver])
 };
 
--- a/toolkit/components/search/nsSidebar.js
+++ b/toolkit/components/search/nsSidebar.js
@@ -9,57 +9,57 @@ Cu.import("resource://gre/modules/XPCOMU
 
 // File extension for Sherlock search plugin description files
 const SHERLOCK_FILE_EXT_REGEXP = /\.src$/i;
 
 function nsSidebar() {
 }
 
 nsSidebar.prototype = {
-  init: function(window) {
+  init(window) {
     this.window = window;
     try {
       this.mm = window.QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsIDocShell)
                       .QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsIContentFrameMessageManager);
     } catch (e) {
       Cu.reportError(e);
     }
   },
 
   // Deprecated, only left here to avoid breaking old browser-detection scripts.
-  addSearchEngine: function(engineURL, iconURL, suggestedTitle, suggestedCategory) {
+  addSearchEngine(engineURL, iconURL, suggestedTitle, suggestedCategory) {
     if (SHERLOCK_FILE_EXT_REGEXP.test(engineURL)) {
       Cu.reportError("Installing Sherlock search plugins is no longer supported.");
       return;
     }
 
     this.AddSearchProvider(engineURL);
   },
 
   // This function implements window.external.AddSearchProvider().
   // The capitalization, although nonstandard here, is to match other browsers'
   // APIs and is therefore important.
-  AddSearchProvider: function(engineURL) {
+  AddSearchProvider(engineURL) {
     if (!this.mm) {
       Cu.reportError(`Installing a search provider from this context is not currently supported: ${Error().stack}.`);
       return;
     }
 
     this.mm.sendAsyncMessage("Search:AddEngine", {
       pageURL: this.window.document.documentURIObject.spec,
       engineURL
     });
   },
 
   // This function exists to implement window.external.IsSearchProviderInstalled(),
   // for compatibility with other browsers.  The function has been deprecated
   // and so will not be implemented.
-  IsSearchProviderInstalled: function(engineURL) {
+  IsSearchProviderInstalled(engineURL) {
     return 0;
   },
 
   classID: Components.ID("{22117140-9c6e-11d3-aaf1-00805f8a4905}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,
                                          Ci.nsIDOMGlobalPropertyInitializer])
 }
 
--- a/toolkit/components/search/tests/xpcshell/head_search.js
+++ b/toolkit/components/search/tests/xpcshell/head_search.js
@@ -94,21 +94,21 @@ function installAddonEngine(name = "engi
   dir.append("searchplugins");
   dir.create(dir.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
   do_get_file("data/" + name + ".xml").copyTo(dir, "bug645970.xml");
 
   Services.dirsvc.registerProvider({
     QueryInterface: XPCOMUtils.generateQI([Ci.nsIDirectoryServiceProvider,
                                            Ci.nsIDirectoryServiceProvider2]),
 
-    getFile: function(prop, persistant) {
+    getFile(prop, persistant) {
       throw Cr.NS_ERROR_FAILURE;
     },
 
-    getFiles: function(prop) {
+    getFiles(prop) {
       let result = [];
 
       switch (prop) {
       case XRE_EXTENSIONS_DIR_LIST:
         result.push(addonDir);
         break;
       default:
         throw Cr.NS_ERROR_FAILURE;
@@ -142,17 +142,17 @@ function installDistributionEngine()
   dir.create(dir.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
 
   dir.append("common");
   dir.create(dir.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
 
   do_get_file("data/engine-override.xml").copyTo(dir, "bug645970.xml");
 
   Services.dirsvc.registerProvider({
-    getFile: function(aProp, aPersistent) {
+    getFile(aProp, aPersistent) {
       aPersistent.value = true;
       if (aProp == XRE_APP_DISTRIBUTION_DIR)
         return distDir.clone();
       return null;
     }
   });
 }
 
--- a/toolkit/components/search/tests/xpcshell/test_addEngine_callback.js
+++ b/toolkit/components/search/tests/xpcshell/test_addEngine_callback.js
@@ -7,21 +7,21 @@
 
 Components.utils.import("resource://testing-common/MockRegistrar.jsm");
 
 "use strict";
 
 // Only need to stub the methods actually called by nsSearchService
 var promptService = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIPromptService]),
-  confirmEx: function() {}
+  confirmEx() {}
 };
 var prompt = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIPrompt]),
-  alert: function() {}
+  alert() {}
 };
 // Override the prompt service and nsIPrompt, since the search service currently
 // prompts in response to certain installation failures we test here
 // XXX this should disappear once bug 863474 is fixed
 MockRegistrar.register("@mozilla.org/embedcomp/prompt-service;1", promptService);
 MockRegistrar.register("@mozilla.org/prompter;1", prompt);
 
 
@@ -33,55 +33,55 @@ add_test(function init_search_service() 
 
     run_next_test();
   });
 });
 
 // Simple test of the search callback
 add_test(function simple_callback_test() {
   let searchCallback = {
-    onSuccess: function(engine) {
+    onSuccess(engine) {
       do_check_true(!!engine);
       do_check_neq(engine.name, Services.search.defaultEngine.name);
       do_check_eq(engine.wrappedJSObject._loadPath,
                   "[http]localhost/test-search-engine.xml");
       run_next_test();
     },
-    onError: function(errorCode) {
+    onError(errorCode) {
       do_throw("search callback returned error: " + errorCode);
     }
   }
   Services.search.addEngine(gDataUrl + "engine.xml", null,
                             null, false, searchCallback);
 });
 
 // Test of the search callback on duplicate engine failures
 add_test(function duplicate_failure_test() {
   let searchCallback = {
-    onSuccess: function(engine) {
+    onSuccess(engine) {
       do_throw("this addition should not have succeeded");
     },
-    onError: function(errorCode) {
+    onError(errorCode) {
       do_check_true(!!errorCode);
       do_check_eq(errorCode, Ci.nsISearchInstallCallback.ERROR_DUPLICATE_ENGINE);
       run_next_test();
     }
   }
   // Re-add the same engine added in the previous test
   Services.search.addEngine(gDataUrl + "engine.xml", null,
                             null, false, searchCallback);
 });
 
 // Test of the search callback on failure to load the engine failures
 add_test(function load_failure_test() {
   let searchCallback = {
-    onSuccess: function(engine) {
+    onSuccess(engine) {
       do_throw("this addition should not have succeeded");
     },
-    onError: function(errorCode) {
+    onError(errorCode) {
       do_check_true(!!errorCode);
       do_check_eq(errorCode, Ci.nsISearchInstallCallback.ERROR_UNKNOWN_FAILURE);
       run_next_test();
     }
   }
   // Try adding an engine that doesn't exist
   Services.search.addEngine("http://invalid/data/engine.xml", null,
                             null, false, searchCallback);
--- a/toolkit/components/search/tests/xpcshell/test_location_malformed_json.js
+++ b/toolkit/components/search/tests/xpcshell/test_location_malformed_json.js
@@ -1,17 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // A console listener so we can listen for a log message from nsSearchService.
 function promiseTimezoneMessage() {
   return new Promise(resolve => {
     let listener = {
       QueryInterface: XPCOMUtils.generateQI([Ci.nsIConsoleListener]),
-      observe : function(msg) {
+      observe(msg) {
         if (msg.message.startsWith("getIsUS() fell back to a timezone check with the result=")) {
           Services.console.unregisterListener(listener);
           resolve(msg);
         }
       }
     };
     Services.console.registerListener(listener);
   });
--- a/toolkit/components/search/tests/xpcshell/test_location_sync.js
+++ b/toolkit/components/search/tests/xpcshell/test_location_sync.js
@@ -17,17 +17,17 @@ function getIsUSPref() {
   }
 }
 
 // A console listener so we can listen for a log message from nsSearchService.
 function promiseTimezoneMessage() {
   return new Promise(resolve => {
     let listener = {
       QueryInterface: XPCOMUtils.generateQI([Ci.nsIConsoleListener]),
-      observe : function(msg) {
+      observe(msg) {
         if (msg.message.startsWith("getIsUS() fell back to a timezone check with the result=")) {
           Services.console.unregisterListener(listener);
           resolve(msg);
         }
       }
     };
     Services.console.registerListener(listener);
   });
--- a/toolkit/components/search/tests/xpcshell/test_searchSuggest.js
+++ b/toolkit/components/search/tests/xpcshell/test_searchSuggest.js
@@ -551,22 +551,22 @@ add_task(function* test_userContextId() 
 
 // Helpers
 
 function updateSearchHistory(operation, value) {
   let deferred = Promise.defer();
   FormHistory.update({
                        op: operation,
                        fieldname: "searchbar-history",
-                       value: value,
+                       value,
                      },
                      {
-                       handleError: function(error) {
+                       handleError(error) {
                          do_throw("Error occurred updating form history: " + error);
                          deferred.reject(error);
                        },
-                       handleCompletion: function(reason) {
+                       handleCompletion(reason) {
                          if (!reason)
                            deferred.resolve();
                        }
                      });
   return deferred.promise;
 }
--- a/toolkit/components/securityreporter/SecurityReporter.js
+++ b/toolkit/components/securityreporter/SecurityReporter.js
@@ -33,17 +33,17 @@ function getDERString(cert)
 
 function SecurityReporter() { }
 
 SecurityReporter.prototype = {
   classDescription: "Security reporter component",
   classID:          Components.ID("{8a997c9a-bea1-11e5-a1fa-be6aBc8e7f8b}"),
   contractID:       "@mozilla.org/securityreporter;1",
   QueryInterface: XPCOMUtils.generateQI([Ci.nsISecurityReporter]),
-  reportTLSError: function(transportSecurityInfo, hostname, port) {
+  reportTLSError(transportSecurityInfo, hostname, port) {
     // don't send if there's no transportSecurityInfo (since the report cannot
     // contain anything of interest)
     if (!transportSecurityInfo) {
       return;
     }
 
     // don't send a report if the pref is not enabled
     if (!Services.prefs.getBoolPref("security.ssl.errorReporting.enabled")) {
@@ -69,18 +69,18 @@ SecurityReporter.prototype = {
       while (certs.hasMoreElements()) {
         let cert = certs.getNext();
         cert.QueryInterface(Ci.nsIX509Cert);
         asciiCertChain.push(btoa(getDERString(cert)));
       }
     }
 
     let report = {
-      hostname: hostname,
-      port: port,
+      hostname,
+      port,
       timestamp: Math.round(Date.now() / 1000),
       errorCode: transportSecurityInfo.errorCode,
       failedCertChain: asciiCertChain,
       userAgent: protocolHandler.userAgent,
       version: 1,
       build: Services.appinfo.appBuildID,
       product: Services.appinfo.name,
       channel: UpdateUtils.UpdateChannel
--- a/toolkit/components/sqlite/sqlite_internal.js
+++ b/toolkit/components/sqlite/sqlite_internal.js
@@ -105,18 +105,18 @@ Constants.SQLITE_ROW = 100;
 
 /**
  * |SQLITE_DONE|
  * sqlite3_step() has finished executing.
  */
 Constants.SQLITE_DONE = 101;
 
 var Sqlite3 = {
-  Constants: Constants,
-  Type: Type
+  Constants,
+  Type
 };
 
 declareLazyFFI(Sqlite3, "open", lib, "sqlite3_open", null,
                /* return*/    Type.int,
                /* path*/      Type.char.in_ptr,
                /* db handle*/ Type.sqlite3_ptr.out_ptr);
 
 declareLazyFFI(Sqlite3, "open_v2", lib, "sqlite3_open_v2", null,
--- a/toolkit/components/startup/tests/unit/head_startup.js
+++ b/toolkit/components/startup/tests/unit/head_startup.js
@@ -13,17 +13,17 @@ function createAppInfo(ID, name, version
   Components.utils.import("resource://testing-common/AppInfo.jsm", tmp);
   gAppInfo = tmp.newAppInfo({
     ID, name, version, platformVersion,
     crashReporter: true,
     replacedLockTime: 0,
   });
 
   let XULAppInfoFactory = {
-    createInstance: function(outer, iid) {
+    createInstance(outer, iid) {
       if (outer != null)
         throw Components.results.NS_ERROR_NO_AGGREGATION;
       return gAppInfo.QueryInterface(iid);
     }
   };
 
   let registrar =
     Components.manager.QueryInterface(Components.interfaces.nsIComponentRegistrar);
--- a/toolkit/components/telemetry/TelemetryArchive.jsm
+++ b/toolkit/components/telemetry/TelemetryArchive.jsm
@@ -32,37 +32,37 @@ this.TelemetryArchive = {
    * use promizeInitialized() to access this after scanning.
    *
    * @return {Promise<sequence<Object>>}
    *                    A list of the archived ping info in the form:
    *                    { id: <string>,
    *                      timestampCreated: <number>,
    *                      type: <string> }
    */
-  promiseArchivedPingList: function() {
+  promiseArchivedPingList() {
     return TelemetryArchiveImpl.promiseArchivedPingList();
   },
 
   /**
    * Load an archived ping from disk by id, asynchronously.
    *
    * @param id {String} The pings UUID.
    * @return {Promise<PingData>} A promise resolved with the pings data on success.
    */
-  promiseArchivedPingById: function(id) {
+  promiseArchivedPingById(id) {
     return TelemetryArchiveImpl.promiseArchivedPingById(id);
   },
 
   /**
    * Archive a ping and persist it to disk.
    *
    * @param {object} ping The ping data to archive.
    * @return {promise} Promise that is resolved when the ping is successfully archived.
    */
-  promiseArchivePing: function(ping) {
+  promiseArchivePing(ping) {
     return TelemetryArchiveImpl.promiseArchivePing(ping);
   },
 };
 
 /**
  * Checks if pings can be archived. Some products (e.g. Thunderbird) might not want
  * to do that.
  * @return {Boolean} True if pings should be archived, false otherwise.
@@ -77,49 +77,49 @@ var TelemetryArchiveImpl = {
   get _log() {
     if (!this._logger) {
       this._logger = Log.repository.getLoggerWithMessagePrefix(LOGGER_NAME, LOGGER_PREFIX);
     }
 
     return this._logger;
   },
 
-  promiseArchivePing: function(ping) {
+  promiseArchivePing(ping) {
     if (!shouldArchivePings()) {
       this._log.trace("promiseArchivePing - archiving is disabled");
       return Promise.resolve();
     }
 
     for (let field of ["creationDate", "id", "type"]) {
       if (!(field in ping)) {
         this._log.warn("promiseArchivePing - missing field " + field)
         return Promise.reject(new Error("missing field " + field));
       }
     }
 
     return TelemetryStorage.saveArchivedPing(ping);
   },
 
-  _buildArchivedPingList: function(archivedPingsMap) {
+  _buildArchivedPingList(archivedPingsMap) {
     let list = Array.from(archivedPingsMap, p => ({
       id: p[0],
       timestampCreated: p[1].timestampCreated,
       type: p[1].type,
     }));
 
     list.sort((a, b) => a.timestampCreated - b.timestampCreated);
 
     return list;
   },
 
-  promiseArchivedPingList: function() {
+  promiseArchivedPingList() {
     this._log.trace("promiseArchivedPingList");
 
     return TelemetryStorage.loadArchivedPingList().then(loadedInfo => {
       return this._buildArchivedPingList(loadedInfo);
     });
   },
 
-  promiseArchivedPingById: function(id) {
+  promiseArchivedPingById(id) {
     this._log.trace("promiseArchivedPingById - id: " + id);
     return TelemetryStorage.loadArchivedPing(id);
   },
 };
--- a/toolkit/components/telemetry/TelemetryController.jsm
+++ b/toolkit/components/telemetry/TelemetryController.jsm
@@ -126,60 +126,60 @@ var Policy = {
   generatePingId: () => Utils.generateUUID(),
   getCachedClientID: () => ClientID.getCachedClientID(),
 }
 
 this.EXPORTED_SYMBOLS = ["TelemetryController"];
 
 this.TelemetryController = Object.freeze({
   Constants: Object.freeze({
-    PREF_LOG_LEVEL: PREF_LOG_LEVEL,
-    PREF_LOG_DUMP: PREF_LOG_DUMP,
-    PREF_SERVER: PREF_SERVER,
+    PREF_LOG_LEVEL,
+    PREF_LOG_DUMP,
+    PREF_SERVER,
   }),
 
   /**
    * Used only for testing purposes.
    */
-  testInitLogging: function() {
+  testInitLogging() {
     configureLogging();
   },
 
   /**
    * Used only for testing purposes.
    */
-  testReset: function() {
+  testReset() {
     return Impl.reset();
   },
 
   /**
    * Used only for testing purposes.
    */
-  testSetup: function() {
+  testSetup() {
     return Impl.setupTelemetry(true);
   },
 
   /**
    * Used only for testing purposes.
    */
-  testShutdown: function() {
+  testShutdown() {
     return Impl.shutdown();
   },
 
   /**
    * Used only for testing purposes.
    */
-  testSetupContent: function() {
+  testSetupContent() {
     return Impl.setupContentTelemetry(true);
   },
 
   /**
    * Send a notification.
    */
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     return Impl.observe(aSubject, aTopic, aData);
   },
 
   /**
    * Submit ping payloads to Telemetry. This will assemble a complete ping, adding
    * environment data, client id and some general info.
    * Depending on configuration, the ping will be sent to the server (immediately or later)
    * and archived locally.
@@ -194,30 +194,30 @@ this.TelemetryController = Object.freeze
    * @param {Object} [aOptions] Options object.
    * @param {Boolean} [aOptions.addClientId=false] true if the ping should contain the client
    *                  id, false otherwise.
    * @param {Boolean} [aOptions.addEnvironment=false] true if the ping should contain the
    *                  environment data.
    * @param {Object}  [aOptions.overrideEnvironment=null] set to override the environment data.
    * @returns {Promise} Test-only - a promise that resolves with the ping id once the ping is stored or sent.
    */
-  submitExternalPing: function(aType, aPayload, aOptions = {}) {
+  submitExternalPing(aType, aPayload, aOptions = {}) {
     aOptions.addClientId = aOptions.addClientId || false;
     aOptions.addEnvironment = aOptions.addEnvironment || false;
 
     return Impl.submitExternalPing(aType, aPayload, aOptions);
   },
 
   /**
    * Get the current session ping data as it would be sent out or stored.
    *
    * @param {bool} aSubsession Whether to get subsession data. Optional, defaults to false.
    * @return {object} The current ping data if Telemetry is enabled, null otherwise.
    */
-  getCurrentPingData: function(aSubsession = false) {
+  getCurrentPingData(aSubsession = false) {
     return Impl.getCurrentPingData(aSubsession);
   },
 
   /**
    * Save a ping to disk.
    *
    * @param {String} aType The type of the ping.
    * @param {Object} aPayload The actual data payload for the ping.
@@ -228,51 +228,51 @@ this.TelemetryController = Object.freeze
    *                  environment data.
    * @param {Boolean} [aOptions.overwrite=false] true overwrites a ping with the same name,
    *                  if found.
    * @param {Object}  [aOptions.overrideEnvironment=null] set to override the environment data.
    *
    * @returns {Promise} A promise that resolves with the ping id when the ping is saved to
    *                    disk.
    */
-  addPendingPing: function(aType, aPayload, aOptions = {}) {
+  addPendingPing(aType, aPayload, aOptions = {}) {
     let options = aOptions;
     options.addClientId = aOptions.addClientId || false;
     options.addEnvironment = aOptions.addEnvironment || false;
     options.overwrite = aOptions.overwrite || false;
 
     return Impl.addPendingPing(aType, aPayload, options);
   },
 
   /**
    * Check if we have an aborted-session ping from a previous session.
    * If so, submit and then remove it.
    *
    * @return {Promise} Promise that is resolved when the ping is saved.
    */
-  checkAbortedSessionPing: function() {
+  checkAbortedSessionPing() {
     return Impl.checkAbortedSessionPing();
   },
 
   /**
    * Save an aborted-session ping to disk without adding it to the pending pings.
    *
    * @param {Object} aPayload The ping payload data.
    * @return {Promise} Promise that is resolved when the ping is saved.
    */
-  saveAbortedSessionPing: function(aPayload) {
+  saveAbortedSessionPing(aPayload) {
     return Impl.saveAbortedSessionPing(aPayload);
   },
 
   /**
    * Remove the aborted-session ping if any exists.
    *
    * @return {Promise} Promise that is resolved when the ping was removed.
    */
-  removeAbortedSessionPing: function() {
+  removeAbortedSessionPing() {
     return Impl.removeAbortedSessionPing();
   },
 
   /**
    * Write a ping to a specified location on the disk. Does not add the ping to the
    * pending pings.
    *
    * @param {String} aType The type of the ping.
@@ -285,39 +285,39 @@ this.TelemetryController = Object.freeze
    *                  environment data.
    * @param {Boolean} [aOptions.overwrite=false] true overwrites a ping with the same name,
    *                  if found.
    * @param {Object}  [aOptions.overrideEnvironment=null] set to override the environment data.
    *
    * @returns {Promise} A promise that resolves with the ping id when the ping is saved to
    *                    disk.
    */
-  savePing: function(aType, aPayload, aFilePath, aOptions = {}) {
+  savePing(aType, aPayload, aFilePath, aOptions = {}) {
     let options = aOptions;
     options.addClientId = aOptions.addClientId || false;
     options.addEnvironment = aOptions.addEnvironment || false;
     options.overwrite = aOptions.overwrite || false;
 
     return Impl.savePing(aType, aPayload, aFilePath, options);
   },
 
   /**
    * The session recorder instance managed by Telemetry.
    * @return {Object} The active SessionRecorder instance or null if not available.
    */
-  getSessionRecorder: function() {
+  getSessionRecorder() {
     return Impl._sessionRecorder;
   },
 
   /**
    * Allows waiting for TelemetryControllers delayed initialization to complete.
    * The returned promise is guaranteed to resolve before TelemetryController is shutting down.
    * @return {Promise} Resolved when delayed TelemetryController initialization completed.
    */
-  promiseInitialized: function() {
+  promiseInitialized() {
     return Impl.promiseInitialized();
   },
 });
 
 var Impl = {
   _initialized: false,
   _initStarted: false, // Whether we started setting up TelemetryController.
   _logger: null,
@@ -348,17 +348,17 @@ var Impl = {
     }
 
     return this._logger;
   },
 
   /**
    * Get the data for the "application" section of the ping.
    */
-  _getApplicationSection: function() {
+  _getApplicationSection() {
     // Querying architecture and update channel can throw. Make sure to recover and null
     // those fields.
     let arch = null;
     try {
       arch = Services.sysinfo.get("arch");
     } catch (e) {
       this._log.trace("_getApplicationSection - Unable to get system architecture.", e);
     }
@@ -407,17 +407,17 @@ var Impl = {
 
     // Fill the common ping fields.
     let pingData = {
       type: aType,
       id: Policy.generatePingId(),
       creationDate: (Policy.now()).toISOString(),
       version: PING_FORMAT_VERSION,
       application: this._getApplicationSection(),
-      payload: payload,
+      payload,
     };
 
     if (aOptions.addClientId) {
       pingData.clientId = this._clientID;
     }
 
     if (aOptions.addEnvironment) {
       pingData.environment = aOptions.overrideEnvironment || TelemetryEnvironment.currentEnvironment;
@@ -425,17 +425,17 @@ var Impl = {
 
     return pingData;
   },
 
   /**
    * Track any pending ping send and save tasks through the promise passed here.
    * This is needed to block shutdown on any outstanding ping activity.
    */
-  _trackPendingPingTask: function(aPromise) {
+  _trackPendingPingTask(aPromise) {
     this._connectionsBarrier.client.addBlocker("Waiting for ping task", aPromise);
   },
 
   /**
    * Internal function to assemble a complete ping, adding environment data, client id
    * and some general info. This waits on the client id to be loaded/generated if it's
    * not yet available. Note that this function is synchronous unless we need to load
    * the client id.
@@ -597,24 +597,24 @@ var Impl = {
   }),
 
   /**
    * Save an aborted-session ping to disk without adding it to the pending pings.
    *
    * @param {Object} aPayload The ping payload data.
    * @return {Promise} Promise that is resolved when the ping is saved.
    */
-  saveAbortedSessionPing: function(aPayload) {
+  saveAbortedSessionPing(aPayload) {
     this._log.trace("saveAbortedSessionPing");
     const options = {addClientId: true, addEnvironment: true};
     const pingData = this.assemblePing(PING_TYPE_MAIN, aPayload, options);
     return TelemetryStorage.saveAbortedSessionPing(pingData);
   },
 
-  removeAbortedSessionPing: function() {
+  removeAbortedSessionPing() {
     return TelemetryStorage.removeAbortedSessionPing();
   },
 
   /**
    * Perform telemetry initialization for either chrome or content process.
    * @return {Boolean} True if Telemetry is allowed to record at least base (FHR) data,
    *                   false otherwise.
    */
@@ -740,17 +740,17 @@ var Impl = {
     this._delayedInitTask.arm();
     return this._delayedInitTaskDeferred.promise;
   },
 
   /**
    * This triggers basic telemetry initialization for content processes.
    * @param {Boolean} [testing=false] True if we are in test mode, false otherwise.
    */
-  setupContentTelemetry: function(testing = false) {
+  setupContentTelemetry(testing = false) {
     this._testMode = testing;
 
     // We call |enableTelemetryRecording| here to make sure that Telemetry.canRecord* flags
     // are in sync between chrome and content processes.
     if (!this.enableTelemetryRecording()) {
       this._log.trace("setupContentTelemetry - Content process recording disabled.");
       return;
     }
@@ -787,17 +787,17 @@ var Impl = {
       yield TelemetryStorage.shutdown();
     } finally {
       // Reset state.
       this._initialized = false;
       this._initStarted = false;
     }
   }),
 
-  shutdown: function() {
+  shutdown() {
     this._log.trace("shutdown");
 
     // We can be in one the following states here:
     // 1) setupTelemetry was never called
     // or it was called and
     //   2) _delayedInitTask was scheduled, but didn't run yet.
     //   3) _delayedInitTask is running now.
     //   4) _delayedInitTask finished running already.
@@ -815,17 +815,17 @@ var Impl = {
 
     // This handles 2) and 3).
     return this._delayedInitTask.finalize().then(() => this._cleanupOnShutdown());
   },
 
   /**
    * This observer drives telemetry.
    */
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     // The logger might still be not available at this point.
     if (aTopic == "profile-after-change" || aTopic == "app-startup") {
       // If we don't have a logger, we need to make sure |Log.repository.getLogger()| is
       // called before |getLoggerWithMessagePrefix|. Otherwise logging won't work.
       configureLogging();
     }
 
     this._log.trace("observe - " + aTopic + " notified.");
@@ -839,32 +839,32 @@ var Impl = {
       return this.setupContentTelemetry();
     }
     return undefined;
   },
 
   /**
    * Get an object describing the current state of this module for AsyncShutdown diagnostics.
    */
-  _getState: function() {
+  _getState() {
     return {
       initialized: this._initialized,
       initStarted: this._initStarted,
       haveDelayedInitTask: !!this._delayedInitTask,
       shutdownBarrier: this._shutdownBarrier.state,
       connectionsBarrier: this._connectionsBarrier.state,
       sendModule: TelemetrySend.getShutdownState(),
     };
   },
 
   /**
    * Called whenever the FHR Upload preference changes (e.g. when user disables FHR from
    * the preferences panel), this triggers sending the deletion ping.
    */
-  _onUploadPrefChange: function() {
+  _onUploadPrefChange() {
     const uploadEnabled = Preferences.get(PREF_FHR_UPLOAD_ENABLED, false);
     if (uploadEnabled) {
       // There's nothing we should do if we are enabling upload.
       return;
     }
 
     let p = Task.spawn(function*() {
       try {
@@ -881,42 +881,42 @@ var Impl = {
         this.submitExternalPing(PING_TYPE_DELETION, {}, { addClientId: true });
       }
     }.bind(this));
 
     this._shutdownBarrier.client.addBlocker(
       "TelemetryController: removing pending pings after data upload was disabled", p);
   },
 
-  _attachObservers: function() {
+  _attachObservers() {
     if (IS_UNIFIED_TELEMETRY) {
       // Watch the FHR upload setting to trigger deletion pings.
       Preferences.observe(PREF_FHR_UPLOAD_ENABLED, this._onUploadPrefChange, this);
     }
   },
 
   /**
    * Remove the preference observer to avoid leaks.
    */
-  _detachObservers: function() {
+  _detachObservers() {
     if (IS_UNIFIED_TELEMETRY) {
       Preferences.ignore(PREF_FHR_UPLOAD_ENABLED, this._onUploadPrefChange, this);
     }
   },
 
   /**
    * Allows waiting for TelemetryControllers delayed initialization to complete.
    * This will complete before TelemetryController is shutting down.
    * @return {Promise} Resolved when delayed TelemetryController initialization completed.
    */
-  promiseInitialized: function() {
+  promiseInitialized() {
     return this._delayedInitTaskDeferred.promise;
   },
 
-  getCurrentPingData: function(aSubsession) {
+  getCurrentPingData(aSubsession) {
     this._log.trace("getCurrentPingData - subsession: " + aSubsession)
 
     // Telemetry is disabled, don't gather any data.
     if (!Telemetry.canRecordBase) {
       return null;
     }
 
     const reason = aSubsession ? REASON_GATHER_SUBSESSION_PAYLOAD : REASON_GATHER_PAYLOAD;
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -60,61 +60,61 @@ function getGlobal() {
   return gGlobalEnvironment;
 }
 
 this.TelemetryEnvironment = {
   get currentEnvironment() {
     return getGlobal().currentEnvironment;
   },
 
-  onInitialized: function() {
+  onInitialized() {
     return getGlobal().onInitialized();
   },
 
-  delayedInit: function() {
+  delayedInit() {
     return getGlobal().delayedInit();
   },
 
-  registerChangeListener: function(name, listener) {
+  registerChangeListener(name, listener) {
     return getGlobal().registerChangeListener(name, listener);
   },
 
-  unregisterChangeListener: function(name) {
+  unregisterChangeListener(name) {
     return getGlobal().unregisterChangeListener(name);
   },
 
-  shutdown: function() {
+  shutdown() {
     return getGlobal().shutdown();
   },
 
   // Policy to use when saving preferences. Exported for using them in tests.
   RECORD_PREF_STATE: 1, // Don't record the preference value
   RECORD_PREF_VALUE: 2, // We only record user-set prefs.
 
   // Testing method
-  testWatchPreferences: function(prefMap) {
+  testWatchPreferences(prefMap) {
     return getGlobal()._watchPreferences(prefMap);
   },
 
   /**
    * Intended for use in tests only.
    *
    * In multiple tests we need a way to shut and re-start telemetry together
    * with TelemetryEnvironment. This is problematic due to the fact that
    * TelemetryEnvironment is a singleton. We, therefore, need this helper
    * method to be able to re-set TelemetryEnvironment.
    */
-  testReset: function() {
+  testReset() {
     return getGlobal().reset();
   },
 
   /**
    * Intended for use in tests only.
    */
-  testCleanRestart: function() {
+  testCleanRestart() {
     getGlobal().shutdown();
     gGlobalEnvironment = null;
     return getGlobal();
   },
 };
 
 const RECORD_PREF_STATE = TelemetryEnvironment.RECORD_PREF_STATE;
 const RECORD_PREF_VALUE = TelemetryEnvironment.RECORD_PREF_VALUE;
@@ -420,17 +420,17 @@ function EnvironmentAddonBuilder(environ
   // Set to true once initial load is complete and we're watching for changes.
   this._loaded = false;
 }
 EnvironmentAddonBuilder.prototype = {
   /**
    * Get the initial set of addons.
    * @returns Promise<void> when the initial load is complete.
    */
-  init: function() {
+  init() {
     // Some tests don't initialize the addon manager. This accounts for the
     // unfortunate reality of life.
     try {
       AddonManager.shutdown.addBlocker("EnvironmentAddonBuilder",
         () => this._shutdownBlocker());
     } catch (err) {
       return Promise.reject(err);
     }
@@ -444,48 +444,48 @@ EnvironmentAddonBuilder.prototype = {
     );
 
     return this._pendingTask;
   },
 
   /**
    * Register an addon listener and watch for changes.
    */
-  watchForChanges: function() {
+  watchForChanges() {
     this._loaded = true;
     AddonManager.addAddonListener(this);
     Services.obs.addObserver(this, EXPERIMENTS_CHANGED_TOPIC, false);
   },
 
   // AddonListener
-  onEnabled: function() {
+  onEnabled() {
     this._onAddonChange();
   },
-  onDisabled: function() {
+  onDisabled() {
     this._onAddonChange();
   },
-  onInstalled: function() {
+  onInstalled() {
     this._onAddonChange();
   },
-  onUninstalling: function() {
+  onUninstalling() {
     this._onAddonChange();
   },
 
-  _onAddonChange: function() {
+  _onAddonChange() {
     this._environment._log.trace("_onAddonChange");
     this._checkForChanges("addons-changed");
   },
 
   // nsIObserver
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     this._environment._log.trace("observe - Topic " + aTopic);
     this._checkForChanges("experiment-changed");
   },
 
-  _checkForChanges: function(changeReason) {
+  _checkForChanges(changeReason) {
     if (this._pendingTask) {
       this._environment._log.trace("_checkForChanges - task already pending, dropping change with reason " + changeReason);
       return;
     }
 
     this._pendingTask = this._updateAddons().then(
       (result) => {
         this._pendingTask = null;
@@ -494,17 +494,17 @@ EnvironmentAddonBuilder.prototype = {
         }
       },
       (err) => {
         this._pendingTask = null;
         this._environment._log.error("_checkForChanges: Error collecting addons", err);
       });
   },
 
-  _shutdownBlocker: function() {
+  _shutdownBlocker() {
     if (this._loaded) {
       AddonManager.removeAddonListener(this);
       Services.obs.removeObserver(this, EXPERIMENTS_CHANGED_TOPIC);
     }
     return this._pendingTask;
   },
 
   /**
@@ -635,17 +635,17 @@ EnvironmentAddonBuilder.prototype = {
 
     return activeTheme;
   }),
 
   /**
    * Get the plugins data in object form.
    * @return Object containing the plugins data.
    */
-  _getActivePlugins: function() {
+  _getActivePlugins() {
     let pluginTags =
       Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost).getPluginTags({});
 
     let activePlugins = [];
     for (let tag of pluginTags) {
       // Skip plugins which are not active.
       if (tag.disabled) {
         continue;
@@ -706,17 +706,17 @@ EnvironmentAddonBuilder.prototype = {
 
     return activeGMPlugins;
   }),
 
   /**
    * Get the active experiment data in object form.
    * @return Object containing the active experiment data.
    */
-  _getActiveExperiment: function() {
+  _getActiveExperiment() {
     let experimentInfo = {};
     try {
       let scope = {};
       Cu.import("resource:///modules/experiments/Experiments.jsm", scope);
       let experiments = scope.Experiments.instance();
       let activeExperiment = experiments.getActiveExperimentID();
       if (activeExperiment) {
         experimentInfo.id = activeExperiment;
@@ -757,17 +757,17 @@ function EnvironmentCache() {
   this._addObservers();
 
   // Build the remaining asynchronous parts of the environment. Don't register change listeners
   // until the initial environment has been built.
 
   let p = [];
   if (AppConstants.platform === "gonk") {
     this._addonBuilder = {
-      watchForChanges: function() {}
+      watchForChanges() {}
     };
   } else {
     this._addonBuilder = new EnvironmentAddonBuilder(this);
     p = [ this._addonBuilder.init() ];
   }
 
   this._currentEnvironment.profile = {};
   p.push(this._updateProfile());
@@ -801,83 +801,83 @@ EnvironmentCache.prototype = {
   get currentEnvironment() {
     return Cu.cloneInto(this._currentEnvironment, myScope);
   },
 
   /**
    * Wait for the current enviroment to be fully initialized.
    * @returns Promise<object>
    */
-  onInitialized: function() {
+  onInitialized() {
     if (this._initTask) {
       return this._initTask;
     }
     return Promise.resolve(this.currentEnvironment);
   },
 
   /**
    * This gets called when the delayed init completes.
    */
-  delayedInit: function() {
+  delayedInit() {
     this._delayedInitFinished = true;
   },
 
   /**
    * Register a listener for environment changes.
    * @param name The name of the listener. If a new listener is registered
    *             with the same name, the old listener will be replaced.
    * @param listener function(reason, oldEnvironment) - Will receive a reason for
                      the change and the environment data before the change.
    */
-  registerChangeListener: function(name, listener) {
+  registerChangeListener(name, listener) {
     this._log.trace("registerChangeListener for " + name);
     if (this._shutdown) {
       this._log.warn("registerChangeListener - already shutdown");
       return;
     }
     this._changeListeners.set(name, listener);
   },
 
   /**
    * Unregister from listening to environment changes.
    * It's fine to call this on an unitialized TelemetryEnvironment.
    * @param name The name of the listener to remove.
    */
-  unregisterChangeListener: function(name) {
+  unregisterChangeListener(name) {
     this._log.trace("unregisterChangeListener for " + name);
     if (this._shutdown) {
       this._log.warn("registerChangeListener - already shutdown");
       return;
     }
     this._changeListeners.delete(name);
   },
 
-  shutdown: function() {
+  shutdown() {
     this._log.trace("shutdown");
     this._shutdown = true;
   },
 
   /**
    * Only used in tests, set the preferences to watch.
    * @param aPreferences A map of preferences names and their recording policy.
    */
-  _watchPreferences: function(aPreferences) {
+  _watchPreferences(aPreferences) {
     this._stopWatchingPrefs();
     this._watchedPrefs = aPreferences;
     this._updateSettings();
     this._startWatchingPrefs();
   },
 
   /**
    * Get an object containing the values for the watched preferences. Depending on the
    * policy, the value for a preference or whether it was changed by user is reported.
    *
    * @return An object containing the preferences values.
    */
-  _getPrefData: function() {
+  _getPrefData() {
     let prefData = {};
     for (let [pref, policy] of this._watchedPrefs.entries()) {
       // Only record preferences if they are non-default
       if (!Preferences.isSet(pref)) {
         continue;
       }
 
       // Check the policy for the preference and decide if we need to store its value
@@ -891,68 +891,68 @@ EnvironmentCache.prototype = {
       prefData[pref] = prefValue;
     }
     return prefData;
   },
 
   /**
    * Start watching the preferences.
    */
-  _startWatchingPrefs: function() {
+  _startWatchingPrefs() {
     this._log.trace("_startWatchingPrefs - " + this._watchedPrefs);
 
     for (let [pref, options] of this._watchedPrefs) {
       if (!("requiresRestart" in options) || !options.requiresRestart) {
         Preferences.observe(pref, this._onPrefChanged, this);
       }
     }
   },
 
-  _onPrefChanged: function() {
+  _onPrefChanged() {
     this._log.trace("_onPrefChanged");
     let oldEnvironment = Cu.cloneInto(this._currentEnvironment, myScope);
     this._updateSettings();
     this._onEnvironmentChange("pref-changed", oldEnvironment);
   },
 
   /**
    * Do not receive any more change notifications for the preferences.
    */
-  _stopWatchingPrefs: function() {
+  _stopWatchingPrefs() {
     this._log.trace("_stopWatchingPrefs");
 
     for (let [pref, options] of this._watchedPrefs) {
       if (!("requiresRestart" in options) || !options.requiresRestart) {
         Preferences.ignore(pref, this._onPrefChanged, this);
       }
     }
   },
 
-  _addObservers: function() {
+  _addObservers() {
     // Watch the search engine change and service topics.
     Services.obs.addObserver(this, COMPOSITOR_CREATED_TOPIC, false);
     Services.obs.addObserver(this, COMPOSITOR_PROCESS_ABORTED_TOPIC, false);
     Services.obs.addObserver(this, DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC, false);
     Services.obs.addObserver(this, GFX_FEATURES_READY_TOPIC, false);
     Services.obs.addObserver(this, SEARCH_ENGINE_MODIFIED_TOPIC, false);
     Services.obs.addObserver(this, SEARCH_SERVICE_TOPIC, false);
   },
 
-  _removeObservers: function() {
+  _removeObservers() {
     Services.obs.removeObserver(this, COMPOSITOR_CREATED_TOPIC);
     Services.obs.removeObserver(this, COMPOSITOR_PROCESS_ABORTED_TOPIC);
     try {
       Services.obs.removeObserver(this, DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC);
     } catch (ex) {}
     Services.obs.removeObserver(this, GFX_FEATURES_READY_TOPIC);
     Services.obs.removeObserver(this, SEARCH_ENGINE_MODIFIED_TOPIC);
     Services.obs.removeObserver(this, SEARCH_SERVICE_TOPIC);
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     this._log.trace("observe - aTopic: " + aTopic + ", aData: " + aData);
     switch (aTopic) {
       case SEARCH_ENGINE_MODIFIED_TOPIC:
         if (aData != "engine-current") {
           return;
         }
         // Record the new default search choice and send the change notification.
         this._onSearchEngineChange();
@@ -985,17 +985,17 @@ EnvironmentCache.prototype = {
     }
   },
 
   /**
    * Get the default search engine.
    * @return {String} Returns the search engine identifier, "NONE" if no default search
    *         engine is defined or "UNDEFINED" if no engine identifier or name can be found.
    */
-  _getDefaultSearchEngine: function() {
+  _getDefaultSearchEngine() {
     let engine;
     try {
       engine = Services.search.defaultEngine;
     } catch (e) {}
 
     let name;
     if (!engine) {
       name = "NONE";
@@ -1008,17 +1008,17 @@ EnvironmentCache.prototype = {
     }
 
     return name;
   },
 
   /**
    * Update the default search engine value.
    */
-  _updateSearchEngine: function() {
+  _updateSearchEngine() {
     if (!Services.search) {
       // Just ignore cases where the search service is not implemented.
       return;
     }
 
     this._log.trace("_updateSearchEngine - isInitialized: " + Services.search.isInitialized);
     if (!Services.search.isInitialized) {
       return;
@@ -1034,64 +1034,64 @@ EnvironmentCache.prototype = {
     // Record the cohort identifier used for search defaults A/B testing.
     if (Services.prefs.prefHasUserValue(PREF_SEARCH_COHORT))
       this._currentEnvironment.settings.searchCohort = Services.prefs.getCharPref(PREF_SEARCH_COHORT);
   },
 
   /**
    * Update the default search engine value and trigger the environment change.
    */
-  _onSearchEngineChange: function() {
+  _onSearchEngineChange() {
     this._log.trace("_onSearchEngineChange");
 
     // Finally trigger the environment change notification.
     let oldEnvironment = Cu.cloneInto(this._currentEnvironment, myScope);
     this._updateSearchEngine();
     this._onEnvironmentChange("search-engine-changed", oldEnvironment);
   },
 
   /**
    * Refresh the Telemetry environment and trigger an environment change due to
    * a change in compositor process (normally this will mean we've fallen back
    * from out-of-process to in-process compositing).
    */
-  _onCompositorProcessAborted: function() {
+  _onCompositorProcessAborted() {
     this._log.trace("_onCompositorProcessAborted");
 
     // Trigger the environment change notification.
     let oldEnvironment = Cu.cloneInto(this._currentEnvironment, myScope);
     this._updateGraphicsFeatures();
     this._onEnvironmentChange("gfx-features-changed", oldEnvironment);
   },
 
   /**
    * Update the graphics features object.
    */
-  _updateGraphicsFeatures: function() {
+  _updateGraphicsFeatures() {
     let gfxData = this._currentEnvironment.system.gfx;
     try {
       let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
       gfxData.features = gfxInfo.getFeatures();
     } catch (e) {
       this._log.error("nsIGfxInfo.getFeatures() caught error", e);
     }
   },
 
   /**
    * Update the partner prefs.
    */
-  _updatePartner: function() {
+  _updatePartner() {
     this._currentEnvironment.partner = this._getPartner();
   },
 
   /**
    * Get the build data in object form.
    * @return Object containing the build data.
    */
-  _getBuild: function() {
+  _getBuild() {
     let buildData = {
       applicationId: Services.appinfo.ID || null,
       applicationName: Services.appinfo.name || null,
       architecture: Services.sysinfo.get("arch"),
       buildId: Services.appinfo.appBuildID || null,
       version: Services.appinfo.version || null,
       vendor: Services.appinfo.vendor || null,
       platformVersion: Services.appinfo.platformVersion || null,
@@ -1109,17 +1109,17 @@ EnvironmentCache.prototype = {
 
     return buildData;
   },
 
   /**
    * Determine if we're the default browser.
    * @returns null on error, true if we are the default browser, or false otherwise.
    */
-  _isDefaultBrowser: function() {
+  _isDefaultBrowser() {
     if (AppConstants.platform === "gonk") {
       return true;
     }
 
     if (!("@mozilla.org/browser/shell-service;1" in Cc)) {
       this._log.info("_isDefaultBrowser - Could not obtain browser shell service");
       return null;
     }
@@ -1150,17 +1150,17 @@ EnvironmentCache.prototype = {
       this._log.error("_isDefaultBrowser - Could not determine if default browser", ex);
       return null;
     }
   },
 
   /**
    * Update the cached settings data.
    */
-  _updateSettings: function() {
+  _updateSettings() {
     let updateChannel = null;
     try {
       updateChannel = UpdateUtils.getUpdateChannel(false);
     } catch (e) {}
 
     this._currentEnvironment.settings = {
       blocklistEnabled: Preferences.get(PREF_BLOCKLIST_ENABLED, true),
       e10sEnabled: Services.appinfo.browserTabsRemoteAutostart,
@@ -1221,17 +1221,17 @@ EnvironmentCache.prototype = {
       }
     }
   }),
 
   /**
    * Get the partner data in object form.
    * @return Object containing the partner data.
    */
-  _getPartner: function() {
+  _getPartner() {
     let partnerData = {
       distributionId: Preferences.get(PREF_DISTRIBUTION_ID, null),
       distributionVersion: Preferences.get(PREF_DISTRIBUTION_VERSION, null),
       partnerId: Preferences.get(PREF_PARTNER_ID, null),
       distributor: Preferences.get(PREF_DISTRIBUTOR, null),
       distributorChannel: Preferences.get(PREF_DISTRIBUTOR_CHANNEL, null),
     };
 
@@ -1241,17 +1241,17 @@ EnvironmentCache.prototype = {
 
     return partnerData;
   },
 
   /**
    * Get the CPU information.
    * @return Object containing the CPU information data.
    */
-  _getCpuData: function() {
+  _getCpuData() {
     let cpuData = {
       count: getSysinfoProperty("cpucount", null),
       cores: getSysinfoProperty("cpucores", null),
       vendor: getSysinfoProperty("cpuvendor", null),
       family: getSysinfoProperty("cpufamily", null),
       model: getSysinfoProperty("cpumodel", null),
       stepping: getSysinfoProperty("cpustepping", null),
       l2cacheKB: getSysinfoProperty("cpucachel2", null),
@@ -1276,34 +1276,34 @@ EnvironmentCache.prototype = {
     return cpuData;
   },
 
   /**
    * Get the device information, if we are on a portable device.
    * @return Object containing the device information data, or null if
    * not a portable device.
    */
-  _getDeviceData: function() {
+  _getDeviceData() {
     if (!["gonk", "android"].includes(AppConstants.platform)) {
       return null;
     }
 
     return {
       model: getSysinfoProperty("device", null),
       manufacturer: getSysinfoProperty("manufacturer", null),
       hardware: getSysinfoProperty("hardware", null),
       isTablet: getSysinfoProperty("tablet", null),
     };
   },
 
   /**
    * Get the OS information.
    * @return Object containing the OS data.
    */
-  _getOSData: function() {
+  _getOSData() {
     let data = {
       name: forceToStringOrNull(getSysinfoProperty("name", null)),
       version: forceToStringOrNull(getSysinfoProperty("version", null)),
       locale: forceToStringOrNull(getSystemLocale()),
     };
 
     if (["gonk", "android"].includes(AppConstants.platform)) {
       data.kernelVersion = forceToStringOrNull(getSysinfoProperty("kernel_version", null));
@@ -1330,17 +1330,17 @@ EnvironmentCache.prototype = {
 
     return data;
   },
 
   /**
    * Get the HDD information.
    * @return Object containing the HDD data.
    */
-  _getHDDData: function() {
+  _getHDDData() {
     return {
       profile: { // hdd where the profile folder is located
         model: getSysinfoProperty("profileHDDModel", null),
         revision: getSysinfoProperty("profileHDDRevision", null),
       },
       binary:  { // hdd where the application binary is located
         model: getSysinfoProperty("binHDDModel", null),
         revision: getSysinfoProperty("binHDDRevision", null),
@@ -1351,17 +1351,17 @@ EnvironmentCache.prototype = {
       },
     };
   },
 
   /**
    * Get the GFX information.
    * @return Object containing the GFX data.
    */
-  _getGFXData: function() {
+  _getGFXData() {
     let gfxData = {
       D2DEnabled: getGfxField("D2DEnabled", null),
       DWriteEnabled: getGfxField("DWriteEnabled", null),
       ContentBackend: getGfxField("ContentBackend", null),
       // The following line is disabled due to main thread jank and will be enabled
       // again as part of bug 1154500.
       // DWriteVersion: getGfxField("DWriteVersion", null),
       adapters: [],
@@ -1403,50 +1403,50 @@ EnvironmentCache.prototype = {
 
     return gfxData;
   },
 
   /**
    * Get the system data in object form.
    * @return Object containing the system data.
    */
-  _getSystem: function() {
+  _getSystem() {
     let memoryMB = getSysinfoProperty("memsize", null);
     if (memoryMB) {
       // Send RAM size in megabytes. Rounding because sysinfo doesn't
       // always provide RAM in multiples of 1024.
       memoryMB = Math.round(memoryMB / 1024 / 1024);
     }
 
     let virtualMB = getSysinfoProperty("virtualmemsize", null);
     if (virtualMB) {
       // Send the total virtual memory size in megabytes. Rounding because
       // sysinfo doesn't always provide RAM in multiples of 1024.
       virtualMB = Math.round(virtualMB / 1024 / 1024);
     }
 
     let data = {
-      memoryMB: memoryMB,
+      memoryMB,
       virtualMaxMB: virtualMB,
       cpu: this._getCpuData(),
       os: this._getOSData(),
       hdd: this._getHDDData(),
       gfx: this._getGFXData(),
     };
 
     if (AppConstants.platform === "win") {
       data.isWow64 = getSysinfoProperty("isWow64", null);
     } else if (["gonk", "android"].includes(AppConstants.platform)) {
       data.device = this._getDeviceData();
     }
 
     return data;
   },
 
-  _onEnvironmentChange: function(what, oldEnvironment) {
+  _onEnvironmentChange(what, oldEnvironment) {
     this._log.trace("_onEnvironmentChange for " + what);
 
     // We are already skipping change events in _checkChanges if there is a pending change task running.
     if (this._shutdown) {
       this._log.trace("_onEnvironmentChange - Already shut down.");
       return;
     }
 
@@ -1455,13 +1455,13 @@ EnvironmentCache.prototype = {
         this._log.debug("_onEnvironmentChange - calling " + name);
         listener(what, oldEnvironment);
       } catch (e) {
         this._log.error("_onEnvironmentChange - listener " + name + " caught error", e);
       }
     }
   },
 
-  reset: function() {
+  reset() {
     this._shutdown = false;
     this._delayedInitFinished = false;
   }
 };
--- a/toolkit/components/telemetry/TelemetryLog.jsm
+++ b/toolkit/components/telemetry/TelemetryLog.jsm
@@ -6,17 +6,17 @@ this.EXPORTED_SYMBOLS = ["TelemetryLog"]
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 
 const Telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
 var gLogEntries = [];
 
 this.TelemetryLog = Object.freeze({
-  log: function(id, data) {
+  log(id, data) {
     id = String(id);
     var ts;
     try {
       ts = Math.floor(Telemetry.msSinceProcessStart());
     } catch (e) {
       // If timestamp is screwed up, we just give up instead of making up
       // data.
       return;
@@ -24,12 +24,12 @@ this.TelemetryLog = Object.freeze({
 
     var entry = [id, ts];
     if (data !== undefined) {
       entry = entry.concat(Array.prototype.map.call(data, String));
     }
     gLogEntries.push(entry);
   },
 
-  entries: function() {
+  entries() {
     return gLogEntries;
   }
 });
--- a/toolkit/components/telemetry/TelemetryReportingPolicy.jsm
+++ b/toolkit/components/telemetry/TelemetryReportingPolicy.jsm
@@ -93,81 +93,81 @@ var Policy = {
 function NotifyPolicyRequest(aLog) {
   this._log = aLog;
 }
 
 NotifyPolicyRequest.prototype = Object.freeze({
   /**
    * Called when the user is notified of the policy.
    */
-  onUserNotifyComplete: function() {
+  onUserNotifyComplete() {
     return TelemetryReportingPolicyImpl._userNotified();
    },
 
   /**
    * Called when there was an error notifying the user about the policy.
    *
    * @param error
    *        (Error) Explains what went wrong.
    */
-  onUserNotifyFailed: function(error) {
+  onUserNotifyFailed(error) {
     this._log.error("onUserNotifyFailed - " + error);
   },
 });
 
 this.TelemetryReportingPolicy = {
   // The current policy version number. If the version number stored in the prefs
   // is smaller than this, data upload will be disabled until the user is re-notified
   // about the policy changes.
   DEFAULT_DATAREPORTING_POLICY_VERSION: 1,
 
   /**
    * Setup the policy.
    */
-  setup: function() {
+  setup() {
     return TelemetryReportingPolicyImpl.setup();
   },
 
   /**
    * Shutdown and clear the policy.
    */
-  shutdown: function() {
+  shutdown() {
     return TelemetryReportingPolicyImpl.shutdown();
   },
 
   /**
    * Check if we are allowed to upload data. In order to submit data both these conditions
    * should be true:
    * - The data submission preference should be true.
    * - The datachoices infobar should have been displayed.
    *
    * @return {Boolean} True if we are allowed to upload data, false otherwise.
    */
-  canUpload: function() {
+  canUpload() {
     return TelemetryReportingPolicyImpl.canUpload();
   },
 
   /**
    * Test only method, restarts the policy.
    */
-  reset: function() {
+  reset() {
     return TelemetryReportingPolicyImpl.reset();
   },
 
   /**
    * Test only method, used to check if user is notified of the policy in tests.
    */
-  testIsUserNotified: function() {
+  testIsUserNotified() {
     return TelemetryReportingPolicyImpl.isUserNotifiedOfCurrentPolicy;
   },
 
   /**
    * Test only method, used to simulate the infobar being shown in xpcshell tests.
    */
-  testInfobarShown: function() {
+  testInfobarShown() {
     return TelemetryReportingPolicyImpl._userNotified();
   },
 };
 
 var TelemetryReportingPolicyImpl = {
   _logger: null,
   // Keep track of the notification status if user wasn't notified already.
   _notificationInProgress: false,
@@ -290,88 +290,88 @@ var TelemetryReportingPolicyImpl = {
 
     // Otherwise the user was already notified.
     return true;
   },
 
   /**
    * Test only method, restarts the policy.
    */
-  reset: function() {
+  reset() {
     this.shutdown();
     return this.setup();
   },
 
   /**
    * Setup the policy.
    */
-  setup: function() {
+  setup() {
     this._log.trace("setup");
 
     // Migrate the data choices infobar, if needed.
     this._migratePreferences();
 
     // Add the event observers.
     Services.obs.addObserver(this, "sessionstore-windows-restored", false);
   },
 
   /**
    * Clean up the reporting policy.
    */
-  shutdown: function() {
+  shutdown() {
     this._log.trace("shutdown");
 
     this._detachObservers();
 
     Policy.clearShowInfobarTimeout(this._startupNotificationTimerId);
   },
 
   /**
    * Detach the observers that were attached during setup.
    */
-  _detachObservers: function() {
+  _detachObservers() {
     Services.obs.removeObserver(this, "sessionstore-windows-restored");
   },
 
   /**
    * Check if we are allowed to upload data. In order to submit data both these conditions
    * should be true:
    * - The data submission preference should be true.
    * - The datachoices infobar should have been displayed.
    *
    * @return {Boolean} True if we are allowed to upload data, false otherwise.
    */
-  canUpload: function() {
+  canUpload() {
     // If data submission is disabled, there's no point in showing the infobar. Just
     // forbid to upload.
     if (!this.dataSubmissionEnabled) {
       return false;
     }
 
     // Submission is enabled. We enable upload if user is notified or we need to bypass
     // the policy.
     const bypassNotification = Preferences.get(PREF_BYPASS_NOTIFICATION, false);
     return this.isUserNotifiedOfCurrentPolicy || bypassNotification;
   },
 
   /**
    * Migrate the data policy preferences, if needed.
    */
-  _migratePreferences: function() {
+  _migratePreferences() {
     // Current prefs are mostly the same than the old ones, except for some deprecated ones.
     for (let pref of DEPRECATED_FHR_PREFS) {
       Preferences.reset(pref);
     }
   },
 
   /**
    * Show the data choices infobar if the user wasn't already notified and data submission
    * is enabled.
    */
-  _showInfobar: function() {
+  _showInfobar() {
     if (!this.dataSubmissionEnabled) {
       this._log.trace("_showInfobar - Data submission disabled by the policy.");
       return;
     }
 
     const bypassNotification = Preferences.get(PREF_BYPASS_NOTIFICATION, false);
     if (this.isUserNotifiedOfCurrentPolicy || bypassNotification) {
       this._log.trace("_showInfobar - User already notified or bypassing the policy.");
@@ -396,17 +396,17 @@ var TelemetryReportingPolicyImpl = {
     this._log.trace("_userNotified");
     this._recordNotificationData();
     TelemetrySend.notifyCanUpload();
   },
 
   /**
    * Record date and the version of the accepted policy.
    */
-  _recordNotificationData: function() {
+  _recordNotificationData() {
     this._log.trace("_recordNotificationData");
     this.dataSubmissionPolicyNotifiedDate = Policy.now();
     this.dataSubmissionPolicyAcceptedVersion = this.currentPolicyVersion;
     // The user was notified and the notification data saved: the notification
     // is no longer in progress.
     this._notificationInProgress = false;
   },
 
@@ -459,17 +459,17 @@ var TelemetryReportingPolicyImpl = {
     win.addEventListener("unload", removeListeners);
     win.gBrowser.addTabsProgressListener(progressListener);
 
     let tab = win.gBrowser.loadOneTab(firstRunPolicyURL, { inBackground: true });
 
     return true;
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic != "sessionstore-windows-restored") {
       return;
     }
 
     const isFirstRun = Preferences.get(PREF_FIRST_RUN, true);
     if (isFirstRun) {
       // We're performing the first run, flip firstRun preference for subsequent runs.
       Preferences.set(PREF_FIRST_RUN, false);
--- a/toolkit/components/telemetry/TelemetrySend.jsm
+++ b/toolkit/components/telemetry/TelemetrySend.jsm
@@ -136,17 +136,17 @@ function savePing(aPing) {
 }
 
 /**
  * @return {String} This returns a string with the gzip compressed data.
  */
 function gzipCompressString(string) {
   let observer = {
     buffer: "",
-    onStreamComplete: function(loader, context, status, length, result) {
+    onStreamComplete(loader, context, status, length, result) {
       this.buffer = String.fromCharCode.apply(this, result);
     }
   };
 
   let scs = Cc["@mozilla.org/streamConverters;1"]
             .getService(Ci.nsIStreamConverterService);
   let listener = Cc["@mozilla.org/network/stream-loader;1"]
                 .createInstance(Ci.nsIStreamLoader);
@@ -177,128 +177,128 @@ this.TelemetrySend = {
 
   /**
    * Initializes this module.
    *
    * @param {Boolean} testing Whether this is run in a test. This changes some behavior
    * to enable proper testing.
    * @return {Promise} Resolved when setup is finished.
    */
-  setup: function(testing = false) {
+  setup(testing = false) {
     return TelemetrySendImpl.setup(testing);
   },
 
   /**
    * Shutdown this module - this will cancel any pending ping tasks and wait for
    * outstanding async activity like network and disk I/O.
    *
    * @return {Promise} Promise that is resolved when shutdown is finished.
    */
-  shutdown: function() {
+  shutdown() {
     return TelemetrySendImpl.shutdown();
   },
 
   /**
    * Submit a ping for sending. This will:
    * - send the ping right away if possible or
    * - save the ping to disk and send it at the next opportunity
    *
    * @param {Object} ping The ping data to send, must be serializable to JSON.
    * @return {Promise} Test-only - a promise that is resolved when the ping is sent or saved.
    */
-  submitPing: function(ping) {
+  submitPing(ping) {
     return TelemetrySendImpl.submitPing(ping);
   },
 
   /**
    * Count of pending pings that were found to be overdue at startup.
    */
   get overduePingsCount() {
     return TelemetrySendImpl.overduePingsCount;
   },
 
   /**
    * Notify that we can start submitting data to the servers.
    */
-  notifyCanUpload: function() {
+  notifyCanUpload() {
     return TelemetrySendImpl.notifyCanUpload();
   },
 
   /**
    * Only used in tests. Used to reset the module data to emulate a restart.
    */
-  reset: function() {
+  reset() {
     return TelemetrySendImpl.reset();
   },
 
   /**
    * Only used in tests.
    */
-  setServer: function(server) {
+  setServer(server) {
     return TelemetrySendImpl.setServer(server);
   },
 
   /**
    * Clear out unpersisted, yet to be sent, pings and cancel outgoing ping requests.
    */
-  clearCurrentPings: function() {
+  clearCurrentPings() {
     return TelemetrySendImpl.clearCurrentPings();
   },
 
   /**
    * Only used in tests to wait on outgoing pending pings.
    */
-  testWaitOnOutgoingPings: function() {
+  testWaitOnOutgoingPings() {
     return TelemetrySendImpl.promisePendingPingActivity();
   },
 
   /**
    * Test-only - this allows overriding behavior to enable ping sending in debug builds.
    */
-  setTestModeEnabled: function(testing) {
+  setTestModeEnabled(testing) {
     TelemetrySendImpl.setTestModeEnabled(testing);
   },
 
   /**
    * This returns state info for this module for AsyncShutdown timeout diagnostics.
    */
-  getShutdownState: function() {
+  getShutdownState() {
     return TelemetrySendImpl.getShutdownState();
   },
 };
 
 var CancellableTimeout = {
   _deferred: null,
   _timer: null,
 
   /**
    * This waits until either the given timeout passed or the timeout was cancelled.
    *
    * @param {Number} timeoutMs The timeout in ms.
    * @return {Promise<bool>} Promise that is resolved with false if the timeout was cancelled,
    *                         false otherwise.
    */
-  promiseWaitOnTimeout: function(timeoutMs) {
+  promiseWaitOnTimeout(timeoutMs) {
     if (!this._deferred) {
       this._deferred = PromiseUtils.defer();
       this._timer = Policy.setSchedulerTickTimeout(() => this._onTimeout(), timeoutMs);
     }
 
     return this._deferred.promise;
   },
 
-  _onTimeout: function() {
+  _onTimeout() {
     if (this._deferred) {
       this._deferred.resolve(false);
       this._timer = null;
       this._deferred = null;
     }
   },
 
-  cancelTimeout: function() {
+  cancelTimeout() {
     if (this._deferred) {
       Policy.clearSchedulerTickTimeout(this._timer);
       this._deferred.resolve(true);
       this._timer = null;
       this._deferred = null;
     }
   },
 };
@@ -323,66 +323,66 @@ var SendScheduler = {
   get _log() {
     if (!this._logger) {
       this._logger = Log.repository.getLoggerWithMessagePrefix(LOGGER_NAME, LOGGER_PREFIX + "Scheduler::");
     }
 
     return this._logger;
   },
 
-  shutdown: function() {
+  shutdown() {
     this._log.trace("shutdown");
     this._shutdown = true;
     CancellableTimeout.cancelTimeout();
     return Promise.resolve(this._sendTask);
   },
 
-  start: function() {
+  start() {
     this._log.trace("start");
     this._sendsFailed = false;
     this._backoffDelay = SEND_TICK_DELAY;
     this._shutdown = false;
   },
 
   /**
    * Only used for testing, resets the state to emulate a restart.
    */
-  reset: function() {
+  reset() {
     this._log.trace("reset");
     return this.shutdown().then(() => this.start());
   },
 
   /**
    * Notify the scheduler of a failure in sending out pings that warrants retrying.
    * This will trigger the exponential backoff timer behavior on the next tick.
    */
-  notifySendsFailed: function() {
+  notifySendsFailed() {
     this._log.trace("notifySendsFailed");
     if (this._sendsFailed) {
       return;
     }
 
     this._sendsFailed = true;
     this._log.trace("notifySendsFailed - had send failures");
   },
 
   /**
    * Returns whether ping submissions are currently throttled.
    */
-  isThrottled: function() {
+  isThrottled() {
     const now = Policy.now();
     const nextPingSendTime = this._getNextPingSendTime(now);
     return (nextPingSendTime > now.getTime());
   },
 
-  waitOnSendTask: function() {
+  waitOnSendTask() {
     return Promise.resolve(this._sendTask);
   },
 
-  triggerSendingPings: function(immediately) {
+  triggerSendingPings(immediately) {
     this._log.trace("triggerSendingPings - active send task: " + !!this._sendTask + ", immediately: " + immediately);
 
     if (!this._sendTask) {
       this._sendTask = this._doSendTask();
       let clear = () => this._sendTask = null;
       this._sendTask.then(clear, clear);
     } else if (immediately) {
       CancellableTimeout.cancelTimeout();
@@ -497,17 +497,17 @@ var SendScheduler = {
   /**
    * This helper calculates the next time that we can send pings at.
    * Currently this mostly redistributes ping sends from midnight until one hour after
    * to avoid submission spikes around local midnight for daily pings.
    *
    * @param now Date The current time.
    * @return Number The next time (ms from UNIX epoch) when we can send pings.
    */
-  _getNextPingSendTime: function(now) {
+  _getNextPingSendTime(now) {
     // 1. First we check if the time is between 0am and 1am. If it's not, we send
     // immediately.
     // 2. If we confirmed the time is indeed between 0am and 1am in step 1, we disallow
     // sending before (midnight + fuzzing delay), which is a random time between 0am-1am
     // (decided at startup).
 
     const midnight = Utils.truncateToDays(now);
     // Don't delay pings if we are not within the fuzzing interval.
@@ -515,17 +515,17 @@ var SendScheduler = {
       return now.getTime();
     }
 
     // Delay ping send if we are within the midnight fuzzing range.
     // We spread those ping sends out between |midnight| and |midnight + midnightPingFuzzingDelay|.
     return midnight.getTime() + Policy.midnightPingFuzzingDelay();
   },
 
-  getShutdownState: function() {
+  getShutdownState() {
     return {
       shutdown: this._shutdown,
       hasSendTask: !!this._sendTask,
       sendsFailed: this._sendsFailed,
       sendTaskState: this._sendTaskState,
       backoffDelay: this._backoffDelay,
     };
   },
@@ -567,17 +567,17 @@ var TelemetrySendImpl = {
   get pendingPingRequests() {
     return this._pendingPingRequests;
   },
 
   get pendingPingCount() {
     return TelemetryStorage.getPendingPingList().length + this._currentPings.size;
   },
 
-  setTestModeEnabled: function(testing) {
+  setTestModeEnabled(testing) {
     this._testMode = testing;
   },
 
   setup: Task.async(function*(testing) {
     this._log.trace("setup");
 
     this._testMode = testing;
     this._sendingEnabled = true;
@@ -651,17 +651,17 @@ var TelemetrySendImpl = {
 
     // Wait for any outstanding async ping activity.
     yield this.promisePendingPingActivity();
 
     // Save any outstanding pending pings to disk.
     yield this._persistCurrentPings();
   }),
 
-  reset: function() {
+  reset() {
     this._log.trace("reset");
 
     this._shutdown = false;
     this._currentPings = new Map();
     this._overduePingCount = 0;
 
     const histograms = [
       "TELEMETRY_SUCCESS",
@@ -672,31 +672,31 @@ var TelemetrySendImpl = {
     histograms.forEach(h => Telemetry.getHistogramById(h).clear());
 
     return SendScheduler.reset();
   },
 
   /**
    * Notify that we can start submitting data to the servers.
    */
-  notifyCanUpload: function() {
+  notifyCanUpload() {
     // Let the scheduler trigger sending pings if possible.
     SendScheduler.triggerSendingPings(true);
     return this.promisePendingPingActivity();
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
     case TOPIC_IDLE_DAILY:
       SendScheduler.triggerSendingPings(true);
       break;
     }
   },
 
-  submitPing: function(ping) {
+  submitPing(ping) {
     this._log.trace("submitPing - ping id: " + ping.id);
 
     if (!this.sendingEnabled(ping)) {
       this._log.trace("submitPing - Telemetry is not allowed to send pings.");
       return Promise.resolve();
     }
 
     if (!this.canSendNow) {
@@ -712,17 +712,17 @@ var TelemetrySendImpl = {
     this._currentPings.set(ping.id, ping);
     SendScheduler.triggerSendingPings(true);
     return Promise.resolve();
   },
 
   /**
    * Only used in tests.
    */
-  setServer: function(server) {
+  setServer(server) {
     this._log.trace("setServer", server);
     this._server = server;
   },
 
   /**
    * Clear out unpersisted, yet to be sent, pings and cancel outgoing ping requests.
    */
   clearCurrentPings: Task.async(function*() {
@@ -749,30 +749,30 @@ var TelemetrySendImpl = {
       return;
     }
 
     // Enable the scheduler again and spin the send task.
     SendScheduler.start();
     SendScheduler.triggerSendingPings(true);
   }),
 
-  _cancelOutgoingRequests: function() {
+  _cancelOutgoingRequests() {
     // Abort any pending ping XHRs.
     for (let [id, request] of this._pendingPingRequests) {
       this._log.trace("_cancelOutgoingRequests - aborting ping request for id " + id);
       try {
         request.abort();
       } catch (e) {
         this._log.error("_cancelOutgoingRequests - failed to abort request for id " + id, e);
       }
     }
     this._pendingPingRequests.clear();
   },
 
-  sendPings: function(currentPings, persistedPingIds) {
+  sendPings(currentPings, persistedPingIds) {
     let pingSends = [];
 
     for (let current of currentPings) {
       let ping = current;
       let p = Task.spawn(function*() {
         try {
           yield this._doPing(ping, ping.id, false);
         } catch (ex) {
@@ -829,17 +829,17 @@ var TelemetrySendImpl = {
           .catch(e => this._log.error("sendPersistedPings - failed to send ping " + id, e)));
     }
 
     let promise = Promise.all(pingSendPromises);
     this._trackPendingPingTask(promise);
     yield promise;
   }),
 
-  _onPingRequestFinished: function(success, startTime, id, isPersisted) {
+  _onPingRequestFinished(success, startTime, id, isPersisted) {
     this._log.trace("_onPingRequestFinished - success: " + success + ", persisted: " + isPersisted);
 
     let sendId = success ? "TELEMETRY_SEND_SUCCESS" : "TELEMETRY_SEND_FAILURE";
     let hsend = Telemetry.getHistogramById(sendId);
     let hsuccess = Telemetry.getHistogramById("TELEMETRY_SUCCESS");
 
     hsend.add(monotonicNow() - startTime);
     hsuccess.add(success);
@@ -853,17 +853,17 @@ var TelemetrySendImpl = {
       if (TelemetryStorage.isDeletionPing(id)) {
         return TelemetryStorage.removeDeletionPing();
       }
       return TelemetryStorage.removePendingPing(id);
     }
     return Promise.resolve();
   },
 
-  _getSubmissionPath: function(ping) {
+  _getSubmissionPath(ping) {
     // The new ping format contains an "application" section, the old one doesn't.
     let pathComponents;
     if (isV4PingFormat(ping)) {
       // We insert the Ping id in the URL to simplify server handling of duplicated
       // pings.
       let app = ping.application;
       pathComponents = [
         ping.id, ping.type, app.name, app.version, app.channel, app.buildId
@@ -886,17 +886,17 @@ var TelemetrySendImpl = {
         pathComponents = [ ping.slug ];
       }
     }
 
     let slug = pathComponents.join("/");
     return "/submit/telemetry/" + slug;
   },
 
-  _doPing: function(ping, id, isPersisted) {
+  _doPing(ping, id, isPersisted) {
     if (!this.sendingEnabled(ping)) {
       // We can't send the pings to the server, so don't try to.
       this._log.trace("_doPing - Can't send ping " + ping.id);
       return Promise.resolve();
     }
 
     this._log.trace("_doPing - server: " + this._server + ", persisted: " + isPersisted +
                     ", id: " + id);
@@ -1030,17 +1030,17 @@ var TelemetrySendImpl = {
    * Check if sending is disabled. If FHR is not allowed to upload,
    * pings are not sent to the server (Telemetry is a sub-feature of FHR). If trying
    * to send a deletion ping, don't block it.
    * If unified telemetry is off, don't send pings if Telemetry is disabled.
    *
    * @param {Object} [ping=null] A ping to be checked.
    * @return {Boolean} True if pings can be send to the servers, false otherwise.
    */
-  sendingEnabled: function(ping = null) {
+  sendingEnabled(ping = null) {
     // We only send pings from official builds, but allow overriding this for tests.
     if (!Telemetry.isOfficialTelemetry && !this._testMode) {
       return false;
     }
 
     // With unified Telemetry, the FHR upload setting controls whether we can send pings.
     // The Telemetry pref enables sending extended data sets instead.
     if (IS_UNIFIED_TELEMETRY) {
@@ -1054,28 +1054,28 @@ var TelemetrySendImpl = {
     // Without unified Telemetry, the Telemetry enabled pref controls ping sending.
     return Utils.isTelemetryEnabled;
   },
 
   /**
    * Track any pending ping send and save tasks through the promise passed here.
    * This is needed to block shutdown on any outstanding ping activity.
    */
-  _trackPendingPingTask: function(promise) {
+  _trackPendingPingTask(promise) {
     let clear = () => this._pendingPingActivity.delete(promise);
     promise.then(clear, clear);
     this._pendingPingActivity.add(promise);
   },
 
   /**
    * Return a promise that allows to wait on pending pings.
    * @return {Object<Promise>} A promise resolved when all the pending pings promises
    *         are resolved.
    */
-  promisePendingPingActivity: function() {
+  promisePendingPingActivity() {
     this._log.trace("promisePendingPingActivity - Waiting for ping task");
     let p = Array.from(this._pendingPingActivity, p => p.catch(ex => {
       this._log.error("promisePendingPingActivity - ping activity had an error", ex);
     }));
     p.push(SendScheduler.waitOnSendTask());
     return Promise.all(p);
   },
 
@@ -1090,23 +1090,23 @@ var TelemetrySendImpl = {
         this._currentPings.delete(id);
       }
     }
   }),
 
   /**
    * Returns the current pending, not yet persisted, pings, newest first.
    */
-  getUnpersistedPings: function() {
+  getUnpersistedPings() {
     let current = [...this._currentPings.values()];
     current.reverse();
     return current;
   },
 
-  getShutdownState: function() {
+  getShutdownState() {
     return {
       sendingEnabled: this._sendingEnabled,
       pendingPingRequestCount: this._pendingPingRequests.size,
       pendingPingActivityCount: this._pendingPingActivity.size,
       unpersistedPingCount: this._currentPings.size,
       persistedPingCount: TelemetryStorage.getPendingPingList().length,
       schedulerState: SendScheduler.getShutdownState(),
     };
--- a/toolkit/components/telemetry/TelemetrySession.jsm
+++ b/toolkit/components/telemetry/TelemetrySession.jsm
@@ -213,23 +213,23 @@ function annotateCrashReport(sessionId) 
  * Read current process I/O counters.
  */
 var processInfo = {
   _initialized: false,
   _IO_COUNTERS: null,
   _kernel32: null,
   _GetProcessIoCounters: null,
   _GetCurrentProcess: null,
-  getCounters: function() {
+  getCounters() {
     let isWindows = ("@mozilla.org/windows-registry-key;1" in Components.classes);
     if (isWindows)
       return this.getCounters_Windows();
     return null;
   },
-  getCounters_Windows: function() {
+  getCounters_Windows() {
     if (!this._initialized) {
       Cu.import("resource://gre/modules/ctypes.jsm");
       this._IO_COUNTERS = new ctypes.StructType("IO_COUNTERS", [
         {'readOps': ctypes.unsigned_long_long},
         {'writeOps': ctypes.unsigned_long_long},
         {'otherOps': ctypes.unsigned_long_long},
         {'readBytes': ctypes.unsigned_long_long},
         {'writeBytes': ctypes.unsigned_long_long},
@@ -277,17 +277,17 @@ var TelemetryScheduler = {
   // The interval used by the scheduler timer.
   _schedulerInterval: 0,
   _shuttingDown: true,
   _isUserIdle: false,
 
   /**
    * Initialises the scheduler and schedules the first daily/aborted session pings.
    */
-  init: function() {
+  init() {
     this._log = Log.repository.getLoggerWithMessagePrefix(LOGGER_NAME, "TelemetryScheduler::");
     this._log.trace("init");
     this._shuttingDown = false;
     this._isUserIdle = false;
 
     // Initialize the last daily ping and aborted session last due times to the current time.
     // Otherwise, we might end up sending daily pings even if the subsession is not long enough.
     let now = Policy.now();
@@ -297,17 +297,17 @@ var TelemetryScheduler = {
 
     idleService.addIdleObserver(this, IDLE_TIMEOUT_SECONDS);
     Services.obs.addObserver(this, "wake_notification", false);
   },
 
   /**
    * Stops the scheduler.
    */
-  shutdown: function() {
+  shutdown() {
     if (this._shuttingDown) {
       if (this._log) {
         this._log.error("shutdown - Already shut down");
       } else {
         Cu.reportError("TelemetryScheduler.shutdown - Already shut down");
       }
       return;
     }
@@ -319,26 +319,26 @@ var TelemetryScheduler = {
     }
 
     idleService.removeIdleObserver(this, IDLE_TIMEOUT_SECONDS);
     Services.obs.removeObserver(this, "wake_notification");
 
     this._shuttingDown = true;
   },
 
-  _clearTimeout: function() {
+  _clearTimeout() {
     if (this._schedulerTimer) {
       Policy.clearSchedulerTickTimeout(this._schedulerTimer);
     }
   },
 
   /**
    * Reschedules the tick timer.
    */
-  _rescheduleTimeout: function() {
+  _rescheduleTimeout() {
     this._log.trace("_rescheduleTimeout - isUserIdle: " + this._isUserIdle);
     if (this._shuttingDown) {
       this._log.warn("_rescheduleTimeout - already shutdown");
       return;
     }
 
     this._clearTimeout();
 
@@ -354,29 +354,29 @@ var TelemetryScheduler = {
       timeout = Math.min(timeout, nextMidnight.getTime() - now.getTime());
     }
 
     this._log.trace("_rescheduleTimeout - scheduling next tick for " + new Date(now.getTime() + timeout));
     this._schedulerTimer =
       Policy.setSchedulerTickTimeout(() => this._onSchedulerTick(), timeout);
   },
 
-  _sentDailyPingToday: function(nowDate) {
+  _sentDailyPingToday(nowDate) {
     // This is today's date and also the previous midnight (0:00).
     const todayDate = Utils.truncateToDays(nowDate);
     // We consider a ping sent for today if it occured after or at 00:00 today.
     return (this._lastDailyPingTime >= todayDate.getTime());
   },
 
   /**
    * Checks if we can send a daily ping or not.
    * @param {Object} nowDate A date object.
    * @return {Boolean} True if we can send the daily ping, false otherwise.
    */
-  _isDailyPingDue: function(nowDate) {
+  _isDailyPingDue(nowDate) {
     // The daily ping is not due if we already sent one today.
     if (this._sentDailyPingToday(nowDate)) {
       this._log.trace("_isDailyPingDue - already sent one today");
       return false;
     }
 
     // Avoid overly short sessions.
     const timeSinceLastDaily = nowDate.getTime() - this._lastDailyPingTime;
@@ -392,26 +392,26 @@ var TelemetryScheduler = {
   /**
    * An helper function to save an aborted-session ping.
    * @param {Number} now The current time, in milliseconds.
    * @param {Object} [competingPayload=null] If we are coalescing the daily and the
    *                 aborted-session pings, this is the payload for the former. Note
    *                 that the reason field of this payload will be changed.
    * @return {Promise} A promise resolved when the ping is saved.
    */
-  _saveAbortedPing: function(now, competingPayload = null) {
+  _saveAbortedPing(now, competingPayload = null) {
     this._lastSessionCheckpointTime = now;
     return Impl._saveAbortedSessionPing(competingPayload)
                 .catch(e => this._log.error("_saveAbortedPing - Failed", e));
   },
 
   /**
    * The notifications handler.
    */
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     this._log.trace("observe - aTopic: " + aTopic);
     switch (aTopic) {
       case "idle":
         // If the user is idle, increase the tick interval.
         this._isUserIdle = true;
         return this._onSchedulerTick();
       case "active":
         // User is back to work, restore the original tick interval.
@@ -427,17 +427,17 @@ var TelemetryScheduler = {
     return undefined;
   },
 
   /**
    * Performs a scheduler tick. This function manages Telemetry recurring operations.
    * @return {Promise} A promise, only used when testing, resolved when the scheduled
    *                   operation completes.
    */
-  _onSchedulerTick: function() {
+  _onSchedulerTick() {
     // This call might not be triggered from a timeout. In that case we don't want to
     // leave any previously scheduled timeouts pending.
     this._clearTimeout();
 
     if (this._shuttingDown) {
       this._log.warn("_onSchedulerTick - already shutdown.");
       return Promise.reject(new Error("Already shutdown."));
     }
@@ -455,17 +455,17 @@ var TelemetryScheduler = {
     // This promise is returned to make testing easier.
     return promise;
   },
 
   /**
    * Implements the scheduler logic.
    * @return {Promise} Resolved when the scheduled task completes. Only used in tests.
    */
-  _schedulerTickLogic: function() {
+  _schedulerTickLogic() {
     this._log.trace("_schedulerTickLogic");
 
     let nowDate = Policy.now();
     let now = nowDate.getTime();
 
     if ((now - this._lastTickTime) > (1.1 * SCHEDULER_TICK_INTERVAL_MS) &&
         (this._lastTickTime != 0)) {
       Telemetry.getHistogramById("TELEMETRY_SCHEDULER_WAKEUP").add(1);
@@ -497,17 +497,17 @@ var TelemetryScheduler = {
   },
 
   /**
    * Update the scheduled pings if some other ping was sent.
    * @param {String} reason The reason of the ping that was sent.
    * @param {Object} [competingPayload=null] The payload of the ping that was sent. The
    *                 reason of this payload will be changed.
    */
-  reschedulePings: function(reason, competingPayload = null) {
+  reschedulePings(reason, competingPayload = null) {
     if (this._shuttingDown) {
       this._log.error("reschedulePings - already shutdown");
       return;
     }
 
     this._log.trace("reschedulePings - reason: " + reason);
     let now = Policy.now();
     this._lastAdhocPingTime = now.getTime();
@@ -525,131 +525,131 @@ var TelemetryScheduler = {
     this._rescheduleTimeout();
   },
 };
 
 this.EXPORTED_SYMBOLS = ["TelemetrySession"];
 
 this.TelemetrySession = Object.freeze({
   Constants: Object.freeze({
-    PREF_PREVIOUS_BUILDID: PREF_PREVIOUS_BUILDID,
+    PREF_PREVIOUS_BUILDID,
   }),
   /**
    * Send a ping to a test server. Used only for testing.
    */
-  testPing: function() {
+  testPing() {
     return Impl.testPing();
   },
   /**
    * Returns the current telemetry payload.
    * @param reason Optional, the reason to trigger the payload.
    * @param clearSubsession Optional, whether to clear subsession specific data.
    * @returns Object
    */
-  getPayload: function(reason, clearSubsession = false) {
+  getPayload(reason, clearSubsession = false) {
     return Impl.getPayload(reason, clearSubsession);
   },
   /**
    * Returns a promise that resolves to an array of thread hang stats from content processes, one entry per process.
    * The structure of each entry is identical to that of "threadHangStats" in nsITelemetry.
    * While thread hang stats are also part of the child payloads, this function is useful for cheaply getting this information,
    * which is useful for realtime hang monitoring.
    * Child processes that do not respond, or spawn/die during execution of this function are excluded from the result.
    * @returns Promise
    */
-  getChildThreadHangs: function() {
+  getChildThreadHangs() {
     return Impl.getChildThreadHangs();
   },
   /**
    * Save the session state to a pending file.
    * Used only for testing purposes.
    */
-  testSavePendingPing: function() {
+  testSavePendingPing() {
     return Impl.testSavePendingPing();
   },
   /**
    * Collect and store information about startup.
    */
-  gatherStartup: function() {
+  gatherStartup() {
     return Impl.gatherStartup();
   },
   /**
    * Inform the ping which AddOns are installed.
    *
    * @param aAddOns - The AddOns.
    */
-  setAddOns: function(aAddOns) {
+  setAddOns(aAddOns) {
     return Impl.setAddOns(aAddOns);
   },
   /**
    * Descriptive metadata
    *
    * @param  reason
    *         The reason for the telemetry ping, this will be included in the
    *         returned metadata,
    * @return The metadata as a JS object
    */
-  getMetadata: function(reason) {
+  getMetadata(reason) {
     return Impl.getMetadata(reason);
   },
   /**
    * Used only for testing purposes.
    */
-  testReset: function() {
+  testReset() {
     Impl._sessionId = null;
     Impl._subsessionId = null;
     Impl._previousSessionId = null;
     Impl._previousSubsessionId = null;
     Impl._subsessionCounter = 0;
     Impl._profileSubsessionCounter = 0;
     Impl._subsessionStartActiveTicks = 0;
     Impl._subsessionStartTimeMonotonic = 0;
     Impl._lastEnvironmentChangeDate = Policy.monotonicNow();
     this.testUninstall();
   },
   /**
    * Triggers shutdown of the module.
    */
-  shutdown: function() {
+  shutdown() {
     return Impl.shutdownChromeProcess();
   },
   /**
    * Sets up components used in the content process.
    */
-  setupContent: function(testing = false) {
+  setupContent(testing = false) {
     return Impl.setupContentProcess(testing);
   },
   /**
    * Used only for testing purposes.
    */
-  testUninstall: function() {
+  testUninstall() {
     try {
       Impl.uninstall();
     } catch (ex) {
       // Ignore errors
     }
   },
   /**
    * Lightweight init function, called as soon as Firefox starts.
    */
-  earlyInit: function(aTesting = false) {
+  earlyInit(aTesting = false) {
     return Impl.earlyInit(aTesting);
   },
   /**
    * Does the "heavy" Telemetry initialization later on, so we
    * don't impact startup performance.
    * @return {Promise} Resolved when the initialization completes.
    */
-  delayedInit: function() {
+  delayedInit() {
     return Impl.delayedInit();
   },
   /**
    * Send a notification.
    */
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     return Impl.observe(aSubject, aTopic, aData);
   },
 });
 
 var Impl = {
   _histograms: {},
   _initialized: false,
   _logger: null,
@@ -872,17 +872,17 @@ var Impl = {
       retgram.values[r[last]] = 0;
     return retgram;
   },
 
   /**
    * Get the type of the dataset that needs to be collected, based on the preferences.
    * @return {Integer} A value from nsITelemetry.DATASET_*.
    */
-  getDatasetType: function() {
+  getDatasetType() {
     return Telemetry.canRecordExtended ? Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN
                                        : Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTOUT;
   },
 
   getHistograms: function getHistograms(subsession, clearSubsession) {
     this._log.trace("getHistograms - subsession: " + subsession +
                     ", clearSubsession: " + clearSubsession);
 
@@ -926,17 +926,17 @@ var Impl = {
       }
       if (Object.keys(packedHistograms).length != 0)
         ret[addonName] = packedHistograms;
     }
 
     return ret;
   },
 
-  getKeyedHistograms: function(subsession, clearSubsession) {
+  getKeyedHistograms(subsession, clearSubsession) {
     this._log.trace("getKeyedHistograms - subsession: " + subsession +
                     ", clearSubsession: " + clearSubsession);
 
     let registered =
       Telemetry.registeredKeyedHistograms(this.getDatasetType(), []);
     if (this._testing == false) {
       // Omit telemetry test histograms outside of tests.
       registered = registered.filter(id => !id.startsWith("TELEMETRY_TEST_"));
@@ -975,17 +975,17 @@ var Impl = {
 
   /**
    * Get a snapshot of the scalars and clear them.
    * @param {subsession} If true, then we collect the data for a subsession.
    * @param {clearSubsession} If true, we  need to clear the subsession.
    * @param {keyed} Take a snapshot of keyed or non keyed scalars.
    * @return {Object} The scalar data as a Javascript object.
    */
-  getScalars: function(subsession, clearSubsession, keyed) {
+  getScalars(subsession, clearSubsession, keyed) {
     this._log.trace("getScalars - subsession: " + subsession + ", clearSubsession: " +
                     clearSubsession + ", keyed: " + keyed);
 
     if (!subsession) {
       // We only support scalars for subsessions.
       this._log.trace("getScalars - We only support scalars in subsessions.");
       return {};
     }
@@ -1002,17 +1002,17 @@ var Impl = {
       } else {
         ret[name] = scalarsSnapshot[name];
       }
     }
 
     return ret;
   },
 
-  getEvents: function(isSubsession, clearSubsession) {
+  getEvents(isSubsession, clearSubsession) {
     if (!isSubsession) {
       // We only support scalars for subsessions.
       this._log.trace("getEvents - We only support events in subsessions.");
       return [];
     }
 
     let events = Telemetry.snapshotBuiltinEvents(this.getDatasetType(),
                                                  clearSubsession);
@@ -1048,35 +1048,35 @@ var Impl = {
   getMetadata: function getMetadata(reason) {
     this._log.trace("getMetadata - Reason " + reason);
 
     const sessionStartDate = Utils.toLocalTimeISOString(Utils.truncateToDays(this._sessionStartDate));
     const subsessionStartDate = Utils.toLocalTimeISOString(Utils.truncateToDays(this._subsessionStartDate));
     const monotonicNow = Policy.monotonicNow();
 
     let ret = {
-      reason: reason,
+      reason,
       revision: AppConstants.SOURCE_REVISION_URL,
       asyncPluginInit: Preferences.get(PREF_ASYNC_PLUGIN_INIT, false),
 
       // Date.getTimezoneOffset() unintuitively returns negative values if we are ahead of
       // UTC and vice versa (e.g. -60 for UTC+1). We invert the sign here.
       timezoneOffset: -this._subsessionStartDate.getTimezoneOffset(),
       previousBuildId: this._previousBuildId,
 
       sessionId: this._sessionId,
       subsessionId: this._subsessionId,
       previousSessionId: this._previousSessionId,
       previousSubsessionId: this._previousSubsessionId,
 
       subsessionCounter: this._subsessionCounter,
       profileSubsessionCounter: this._profileSubsessionCounter,
 
-      sessionStartDate: sessionStartDate,
-      subsessionStartDate: subsessionStartDate,
+      sessionStartDate,
+      subsessionStartDate,
 
       // Compute the session and subsession length in seconds.
       // We use monotonic clocks as Date() is affected by jumping clocks (leading
       // to negative lengths and other issues).
       sessionLength: Math.floor(monotonicNow / 1000),
       subsessionLength:
         Math.floor((monotonicNow - this._subsessionStartTimeMonotonic) / 1000),
     };
@@ -1198,17 +1198,17 @@ var Impl = {
           Ci.nsIMemoryReporter.UNITS_BYTES,
           this._totalMemory);
       }
     }
 
     histogram.add(new Date() - startTime);
   },
 
-  handleMemoryReport: function(id, units, amount) {
+  handleMemoryReport(id, units, amount) {
     let val;
     if (units == Ci.nsIMemoryReporter.UNITS_BYTES) {
       val = Math.floor(amount / 1024);
     }
     else if (units == Ci.nsIMemoryReporter.UNITS_PERCENTAGE) {
       // UNITS_PERCENTAGE amounts are 100x greater than their raw value.
       val = Math.floor(amount / 100);
     }
@@ -1248,17 +1248,17 @@ var Impl = {
   },
 
   /**
    * Get the current session's payload using the provided
    * simpleMeasurements and info, which are typically obtained by a call
    * to |this.getSimpleMeasurements| and |this.getMetadata|,
    * respectively.
    */
-  assemblePayloadWithMeasurements: function(simpleMeasurements, info, reason, clearSubsession) {
+  assemblePayloadWithMeasurements(simpleMeasurements, info, reason, clearSubsession) {
     const isSubsession = IS_UNIFIED_TELEMETRY && !this._isClassicReason(reason);
     clearSubsession = IS_UNIFIED_TELEMETRY && clearSubsession;
     this._log.trace("assemblePayloadWithMeasurements - reason: " + reason +
                     ", submitting subsession data: " + isSubsession);
 
     // This allows wrapping data retrieval calls in a try-catch block so that
     // failures don't break the rest of the ping assembly.
     const protect = (fn, defaultReturn = null) => {
@@ -1268,17 +1268,17 @@ var Impl = {
         this._log.error("assemblePayloadWithMeasurements - caught exception", ex);
         return defaultReturn;
       }
     };
 
     // Payload common to chrome and content processes.
     let payloadObj = {
       ver: PAYLOAD_VERSION,
-      simpleMeasurements: simpleMeasurements,
+      simpleMeasurements,
     };
 
     // Add extended set measurements common to chrome & content processes
     if (Telemetry.canRecordExtended) {
       payloadObj.chromeHangs = protect(() => Telemetry.chromeHangs);
       payloadObj.threadHangStats = protect(() => this.getThreadHangStats(Telemetry.threadHangStats));
       payloadObj.log = protect(() => TelemetryLog.entries());
       payloadObj.webrtc = protect(() => Telemetry.webrtcStats);
@@ -1359,17 +1359,17 @@ var Impl = {
     }
 
     return payloadObj;
   },
 
   /**
    * Start a new subsession.
    */
-  startNewSubsession: function() {
+  startNewSubsession() {
     this._subsessionStartDate = Policy.now();
     this._subsessionStartTimeMonotonic = Policy.monotonicNow();
     this._previousSubsessionId = this._subsessionId;
     this._subsessionId = Policy.generateSubsessionUUID();
     this._subsessionCounter++;
     this._profileSubsessionCounter++;
   },
 
@@ -1445,17 +1445,17 @@ var Impl = {
     } catch (e) {
       this._log.warn("detachObservers - Failed to remove " + TOPIC_CYCLE_COLLECTOR_BEGIN, e);
     }
   },
 
   /**
    * Lightweight init function, called as soon as Firefox starts.
    */
-  earlyInit: function(testing) {
+  earlyInit(testing) {
     this._log.trace("earlyInit");
 
     this._initStarted = true;
     this._testing = testing;
 
     if (this._initialized && !testing) {
       this._log.error("earlyInit - already initialized");
       return;
@@ -1503,17 +1503,17 @@ var Impl = {
     ppml.addMessageListener(MESSAGE_TELEMETRY_USS, this);
 },
 
 /**
   * Does the "heavy" Telemetry initialization later on, so we
   * don't impact startup performance.
   * @return {Promise} Resolved when the initialization completes.
   */
-  delayedInit:function() {
+  delayedInit() {
     this._log.trace("delayedInit");
 
     this._delayedInitTask = Task.spawn(function* () {
       try {
         this._initialized = true;
 
         yield this._loadSessionData();
         // Update the session data to keep track of new subsessions created before
@@ -1609,17 +1609,17 @@ var Impl = {
     switch (message.name) {
     case MESSAGE_TELEMETRY_PAYLOAD:
     {
       // In parent process, receive Telemetry payload from child
       let source = message.data.childUUID;
       delete message.data.childUUID;
 
       this._childTelemetry.push({
-        source: source,
+        source,
         payload: message.data,
       });
 
       if (this._childTelemetry.length == MAX_NUM_CONTENT_PAYLOADS + 1) {
         this._childTelemetry.shift();
         Telemetry.getHistogramById("TELEMETRY_DISCARDED_CONTENT_PINGS_COUNT").add();
       }
 
@@ -1720,17 +1720,17 @@ var Impl = {
     cpmm.sendAsyncMessage(MESSAGE_TELEMETRY_THREAD_HANGS, payload);
   },
 
    /**
     * Save both the "saved-session" and the "shutdown" pings to disk.
     * This needs to be called after TelemetrySend shuts down otherwise pings
     * would be sent instead of getting persisted to disk.
     */
-  saveShutdownPings: function() {
+  saveShutdownPings() {
     this._log.trace("saveShutdownPings");
 
     // We don't wait for "shutdown" pings to be written to disk before gathering the
     // "saved-session" payload. Instead we append the promises to this list and wait
     // on both to be saved after kicking off their collection.
     let p = [];
 
     if (IS_UNIFIED_TELEMETRY) {
@@ -1864,17 +1864,17 @@ var Impl = {
 
   testPing: function testPing() {
     return this.send(REASON_TEST_PING);
   },
 
   /**
    * This observer drives telemetry.
    */
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     // Prevent the cycle collector begin topic from cluttering the log.
     if (aTopic != TOPIC_CYCLE_COLLECTOR_BEGIN) {
       this._log.trace("observe - " + aTopic + " notified.");
     }
 
     switch (aTopic) {
     case "content-child-shutdown":
       // content-child-shutdown is only registered for content processes.
@@ -1948,17 +1948,17 @@ var Impl = {
       break;
     }
     return undefined;
   },
 
   /**
    * This tells TelemetrySession to uninitialize and save any pending pings.
    */
-  shutdownChromeProcess: function() {
+  shutdownChromeProcess() {
     this._log.trace("shutdownChromeProcess");
 
     let cleanup = () => {
       if (IS_UNIFIED_TELEMETRY) {
         TelemetryEnvironment.unregisterChangeListener(ENVIRONMENT_CHANGE_LISTENER);
         TelemetryScheduler.shutdown();
       }
       this.uninstall();
@@ -1999,17 +1999,17 @@ var Impl = {
      // This handles 2).
      return this._delayedInitTask.then(cleanup);
    },
 
   /**
    * Gather and send a daily ping.
    * @return {Promise} Resolved when the ping is sent.
    */
-  _sendDailyPing: function() {
+  _sendDailyPing() {
     this._log.trace("_sendDailyPing");
     let payload = this.getSessionPayload(REASON_DAILY, true);
 
     let options = {
       addClientId: true,
       addEnvironment: true,
     };
 
@@ -2052,25 +2052,25 @@ var Impl = {
     this._profileSubsessionCounter = data.profileSubsessionCounter +
                                      this._subsessionCounter;
     return data;
   }),
 
   /**
    * Get the session data object to serialise to disk.
    */
-  _getSessionDataObject: function() {
+  _getSessionDataObject() {
     return {
       sessionId: this._sessionId,
       subsessionId: this._subsessionId,
       profileSubsessionCounter: this._profileSubsessionCounter,
     };
   },
 
-  _onEnvironmentChange: function(reason, oldEnvironment) {
+  _onEnvironmentChange(reason, oldEnvironment) {
     this._log.trace("_onEnvironmentChange", reason);
 
     let now = Policy.monotonicNow();
     let timeDelta = now - this._lastEnvironmentChangeDate;
     if (timeDelta <= CHANGE_THROTTLE_INTERVAL_MS) {
       this._log.trace(`_onEnvironmentChange - throttling; last change was ${Math.round(timeDelta / 1000)}s ago.`);
       return;
     }
@@ -2082,43 +2082,43 @@ var Impl = {
     let options = {
       addClientId: true,
       addEnvironment: true,
       overrideEnvironment: oldEnvironment,
     };
     TelemetryController.submitExternalPing(getPingType(payload), payload, options);
   },
 
-  _isClassicReason: function(reason) {
+  _isClassicReason(reason) {
     const classicReasons = [
       REASON_SAVED_SESSION,
       REASON_GATHER_PAYLOAD,
       REASON_TEST_PING,
     ];
     return classicReasons.includes(reason);
   },
 
   /**
    * Get an object describing the current state of this module for AsyncShutdown diagnostics.
    */
-  _getState: function() {
+  _getState() {
     return {
       initialized: this._initialized,
       initStarted: this._initStarted,
       haveDelayedInitTask: !!this._delayedInitTask,
     };
   },
 
   /**
    * Saves the aborted session ping to disk.
    * @param {Object} [aProvidedPayload=null] A payload object to be used as an aborted
    *                 session ping. The reason of this payload is changed to aborted-session.
    *                 If not provided, a new payload is gathered.
    */
-  _saveAbortedSessionPing: function(aProvidedPayload = null) {
+  _saveAbortedSessionPing(aProvidedPayload = null) {
     this._log.trace("_saveAbortedSessionPing");
 
     let payload = null;
     if (aProvidedPayload) {
       payload = Cu.cloneInto(aProvidedPayload, myScope);
       // Overwrite the original reason.
       payload.info.reason = REASON_ABORTED_SESSION;
     } else {
--- a/toolkit/components/telemetry/TelemetryStopwatch.jsm
+++ b/toolkit/components/telemetry/TelemetryStopwatch.jsm
@@ -39,62 +39,62 @@ const NULL_KEY = {};
  *
  * @example
  * // Returns information about a simple Stopwatch.
  * let startTime = Timers.get("PLAYING_WITH_CUTE_ANIMALS", null, "CATS");
  */
 let Timers = {
   _timers: new Map(),
 
-  _validTypes: function(histogram, obj, key) {
+  _validTypes(histogram, obj, key) {
     let nonEmptyString = value => {
       return typeof value === "string" && value !== "" && value.length > 0;
     };
     return  nonEmptyString(histogram) &&
             typeof obj == "object" &&
            (key === NULL_KEY || nonEmptyString(key));
   },
 
-  get: function(histogram, obj, key) {
+  get(histogram, obj, key) {
     key = key === null ? NULL_KEY : key;
     obj = obj || NULL_OBJECT;
 
     if (!this.has(histogram, obj, key)) {
       return null;
     }
 
     return this._timers.get(histogram).get(obj).get(key);
   },
 
-  put: function(histogram, obj, key, startTime) {
+  put(histogram, obj, key, startTime) {
     key = key === null ? NULL_KEY : key;
     obj = obj || NULL_OBJECT;
 
     if (!this._validTypes(histogram, obj, key)) {
       return false;
     }
 
     let objectMap = this._timers.get(histogram) || new WeakMap();
     let keyedInfo = objectMap.get(obj) || new Map();
     keyedInfo.set(key, startTime);
     objectMap.set(obj, keyedInfo);
     this._timers.set(histogram, objectMap);
     return true;
   },
 
-  has: function(histogram, obj, key) {
+  has(histogram, obj, key) {
     key = key === null ? NULL_KEY : key;
     obj = obj || NULL_OBJECT;
 
     return this._timers.has(histogram) &&
       this._timers.get(histogram).has(obj) &&
       this._timers.get(histogram).get(obj).has(key);
   },
 
-  delete: function(histogram, obj, key) {
+  delete(histogram, obj, key) {
     key = key === null ? NULL_KEY : key;
     obj = obj || NULL_OBJECT;
 
     if (!this.has(histogram, obj, key)) {
       return false;
     }
     let objectMap = this._timers.get(histogram);
     let keyedInfo = objectMap.get(obj);
@@ -127,17 +127,17 @@ this.TelemetryStopwatch = {
    *                        concurrently, as long as they are associated with
    *                        different objects.
    *
    * @returns {Boolean} True if the timer was successfully started, false
    *                    otherwise. If a timer already exists, it can't be
    *                    started again, and the existing one will be cleared in
    *                    order to avoid measurements errors.
    */
-  start: function(aHistogram, aObj) {
+  start(aHistogram, aObj) {
     return TelemetryStopwatchImpl.start(aHistogram, aObj, null);
   },
 
   /**
    * Deletes the timer associated with a telemetry histogram. The timer can be
    * directly associated with a histogram, or with a pair of a histogram and
    * an object. Important: Only use this method when a legitimate cancellation
    * should be done.
@@ -148,17 +148,17 @@ this.TelemetryStopwatch = {
    *                        associated with this object, meaning that multiple
    *                        timers or a same histogram may be run concurrently,
    *                        as long as they are associated with different
    *                        objects.
    *
    * @returns {Boolean} True if the timer exist and it was cleared, False
    *                   otherwise.
    */
-  cancel: function(aHistogram, aObj) {
+  cancel(aHistogram, aObj) {
     return TelemetryStopwatchImpl.cancel(aHistogram, aObj, null);
   },
 
   /**
    * Returns the elapsed time for a particular stopwatch. Primarily for
    * debugging purposes. Must be called prior to finish.
    *
    * @param {String} aHistogram - a string which must be a valid histogram name.
@@ -166,34 +166,34 @@ this.TelemetryStopwatch = {
    *                              throw.
    *
    * @param (Object) aObj - Optional parameter which associates the histogram
    *                        timer with the given object.
    *
    * @returns {Integer} time in milliseconds or -1 if the stopwatch was not
    *                   found.
    */
-  timeElapsed: function(aHistogram, aObj) {
+  timeElapsed(aHistogram, aObj) {
     return TelemetryStopwatchImpl.timeElapsed(aHistogram, aObj, null);
   },
 
   /**
    * Stops the timer associated with the given histogram (and object),
    * calculates the time delta between start and finish, and adds the value
    * to the histogram.
    *
    * @param {String} aHistogram - a string which must be a valid histogram name.
    *
    * @param {Object} aObj - Optional parameter which associates the histogram
    *                        timer with the given object.
    *
    * @returns {Boolean} True if the timer was succesfully stopped and the data
    *                    was added to the histogram, False otherwise.
    */
-  finish: function(aHistogram, aObj) {
+  finish(aHistogram, aObj) {
     return TelemetryStopwatchImpl.finish(aHistogram, aObj, null);
   },
 
   /**
    * Starts a timer associated with a keyed telemetry histogram. The timer can
    * be directly associated with a histogram and its key. Similarly to
    * @see{TelemetryStopwatch.stat} the histogram and its key can be associated
    * with an object. Each key may have multiple associated objects and each
@@ -209,17 +209,17 @@ this.TelemetryStopwatch = {
    *                        concurrently,as long as they are associated with
    *                        different objects.
    *
    * @returns {Boolean} True if the timer was successfully started, false
    *                    otherwise. If a timer already exists, it can't be
    *                    started again, and the existing one will be cleared in
    *                    order to avoid measurements errors.
    */
-  startKeyed: function(aHistogram, aKey, aObj) {
+  startKeyed(aHistogram, aKey, aObj) {
     return TelemetryStopwatchImpl.start(aHistogram, aObj, aKey);
   },
 
   /**
    * Deletes the timer associated with a keyed histogram. Important: Only use
    * this method when a legitimate cancellation should be done.
    *
    * @param {String} aHistogram - a string which must be a valid histogram name.
@@ -227,17 +227,17 @@ this.TelemetryStopwatch = {
    * @param {String} aKey - a string which must be a valid histgram key.
    *
    * @param {Object} aObj - Optional parameter. If specified, the timer
    *                        associated with this object is deleted.
    *
    * @return {Boolean} True if the timer exist and it was cleared, False
    *                   otherwise.
    */
-  cancelKeyed: function(aHistogram, aKey, aObj) {
+  cancelKeyed(aHistogram, aKey, aObj) {
     return TelemetryStopwatchImpl.cancel(aHistogram, aObj, aKey);
   },
 
   /**
    * Returns the elapsed time for a particular stopwatch. Primarily for
    * debugging purposes. Must be called prior to finish.
    *
    * @param {String} aHistogram - a string which must be a valid histogram name.
@@ -246,17 +246,17 @@ this.TelemetryStopwatch = {
    *
    * @param {Object} aObj - Optional parameter. If specified, the timer
    *                        associated with this object is used to calculate
    *                        the elapsed time.
    *
    * @return {Integer} time in milliseconds or -1 if the stopwatch was not
    *                   found.
    */
-  timeElapsedKeyed: function(aHistogram, aKey, aObj) {
+  timeElapsedKeyed(aHistogram, aKey, aObj) {
     return TelemetryStopwatchImpl.timeElapsed(aHistogram, aObj, aKey);
   },
 
   /**
    * Stops the timer associated with the given keyed histogram (and object),
    * calculates the time delta between start and finish, and adds the value
    * to the keyed histogram.
    *
@@ -265,38 +265,38 @@ this.TelemetryStopwatch = {
    * @param {String} aKey - a string which must be a valid histgram key.
    *
    * @param {Object} aObj - optional parameter which associates the histogram
    *                        timer with the given object.
    *
    * @returns {Boolean} True if the timer was succesfully stopped and the data
    *                   was added to the histogram, False otherwise.
    */
-  finishKeyed: function(aHistogram, aKey, aObj) {
+  finishKeyed(aHistogram, aKey, aObj) {
     return TelemetryStopwatchImpl.finish(aHistogram, aObj, aKey);
   }
 };
 
 this.TelemetryStopwatchImpl = {
-  start: function(histogram, object, key) {
+  start(histogram, object, key) {
     if (Timers.has(histogram, object, key)) {
       Timers.delete(histogram, object, key);
       Cu.reportError(`TelemetryStopwatch: key "${histogram}" was already ` +
                      "initialized");
       return false;
     }
 
     return Timers.put(histogram, object, key, Components.utils.now());
   },
 
-  cancel: function(histogram, object, key) {
+  cancel(histogram, object, key) {
     return Timers.delete(histogram, object, key);
   },
 
-  timeElapsed: function(histogram, object, key) {
+  timeElapsed(histogram, object, key) {
     let startTime = Timers.get(histogram, object, key);
     if (startTime === null) {
       Cu.reportError("TelemetryStopwatch: requesting elapsed time for " +
                      `nonexisting stopwatch. Histogram: "${histogram}", ` +
                      `key: "${key}"`);
       return -1;
     }
 
@@ -306,17 +306,17 @@ this.TelemetryStopwatchImpl = {
     } catch (e) {
       Cu.reportError("TelemetryStopwatch: failed to calculate elapsed time " +
                      `for Histogram: "${histogram}", key: "${key}", ` +
                      `exception: ${Log.exceptionStr(e)}`);
       return -1;
     }
   },
 
-  finish: function(histogram, object, key) {
+  finish(histogram, object, key) {
     let delta = this.timeElapsed(histogram, object, key);
     if (delta == -1) {
       return false;
     }
 
     try {
       if (key) {
         Telemetry.getKeyedHistogramById(histogram).add(key, delta);
--- a/toolkit/components/telemetry/TelemetryStorage.jsm
+++ b/toolkit/components/telemetry/TelemetryStorage.jsm
@@ -141,273 +141,273 @@ this.TelemetryStorage = {
   get MAXIMUM_PING_SIZE() {
     return PING_FILE_MAXIMUM_SIZE_BYTES;
   },
   /**
    * Shutdown & block on any outstanding async activity in this module.
    *
    * @return {Promise} Promise that is resolved when shutdown is complete.
    */
-  shutdown: function() {
+  shutdown() {
     return TelemetryStorageImpl.shutdown();
   },
 
   /**
    * Save an archived ping to disk.
    *
    * @param {object} ping The ping data to archive.
    * @return {promise} Promise that is resolved when the ping is successfully archived.
    */
-  saveArchivedPing: function(ping) {
+  saveArchivedPing(ping) {
     return TelemetryStorageImpl.saveArchivedPing(ping);
   },
 
   /**
    * Load an archived ping from disk.
    *
    * @param {string} id The pings id.
    * @return {promise<object>} Promise that is resolved with the ping data.
    */
-  loadArchivedPing: function(id) {
+  loadArchivedPing(id) {
     return TelemetryStorageImpl.loadArchivedPing(id);
   },
 
   /**
    * Get a list of info on the archived pings.
    * This will scan the archive directory and grab basic data about the existing
    * pings out of their filename.
    *
    * @return {promise<sequence<object>>}
    */
-  loadArchivedPingList: function() {
+  loadArchivedPingList() {
     return TelemetryStorageImpl.loadArchivedPingList();
   },
 
   /**
    * Clean the pings archive by removing old pings.
    * This will scan the archive directory.
    *
    * @return {Promise} Resolved when the cleanup task completes.
    */
-  runCleanPingArchiveTask: function() {
+  runCleanPingArchiveTask() {
     return TelemetryStorageImpl.runCleanPingArchiveTask();
   },
 
   /**
    * Run the task to enforce the pending pings quota.
    *
    * @return {Promise} Resolved when the cleanup task completes.
    */
-  runEnforcePendingPingsQuotaTask: function() {
+  runEnforcePendingPingsQuotaTask() {
     return TelemetryStorageImpl.runEnforcePendingPingsQuotaTask();
   },
 
   /**
    * Run the task to remove all the pending pings (except the deletion ping).
    *
    * @return {Promise} Resolved when the pings are removed.
    */
-  runRemovePendingPingsTask: function() {
+  runRemovePendingPingsTask() {
     return TelemetryStorageImpl.runRemovePendingPingsTask();
   },
 
   /**
    * Reset the storage state in tests.
    */
-  reset: function() {
+  reset() {
     return TelemetryStorageImpl.reset();
   },
 
   /**
    * Test method that allows waiting on the archive clean task to finish.
    */
-  testCleanupTaskPromise: function() {
+  testCleanupTaskPromise() {
     return (TelemetryStorageImpl._cleanArchiveTask || Promise.resolve());
   },
 
   /**
    * Test method that allows waiting on the pending pings quota task to finish.
    */
-  testPendingQuotaTaskPromise: function() {
+  testPendingQuotaTaskPromise() {
     return (TelemetryStorageImpl._enforcePendingPingsQuotaTask || Promise.resolve());
   },
 
   /**
    * Save a pending - outgoing - ping to disk and track it.
    *
    * @param {Object} ping The ping data.
    * @return {Promise} Resolved when the ping was saved.
    */
-  savePendingPing: function(ping) {
+  savePendingPing(ping) {
     return TelemetryStorageImpl.savePendingPing(ping);
   },
 
   /**
    * Saves session data to disk.
    * @param {Object}  sessionData The session data.
    * @return {Promise} Resolved when the data was saved.
    */
-  saveSessionData: function(sessionData) {
+  saveSessionData(sessionData) {
     return TelemetryStorageImpl.saveSessionData(sessionData);
   },
 
   /**
    * Loads session data from a session data file.
    * @return {Promise<object>} Resolved with the session data in object form.
    */
-  loadSessionData: function() {
+  loadSessionData() {
     return TelemetryStorageImpl.loadSessionData();
   },
 
   /**
    * Load a pending ping from disk by id.
    *
    * @param {String} id The pings id.
    * @return {Promise} Resolved with the loaded ping data.
    */
-  loadPendingPing: function(id) {
+  loadPendingPing(id) {
     return TelemetryStorageImpl.loadPendingPing(id);
   },
 
   /**
    * Remove a pending ping from disk by id.
    *
    * @param {String} id The pings id.
    * @return {Promise} Resolved when the ping was removed.
    */
-  removePendingPing: function(id) {
+  removePendingPing(id) {
     return TelemetryStorageImpl.removePendingPing(id);
   },
 
   /**
    * Returns a list of the currently pending pings in the format:
    * {
    *   id: <string>, // The pings UUID.
    *   lastModificationDate: <number>, // Timestamp of the pings last modification.
    * }
    * This populates the list by scanning the disk.
    *
    * @return {Promise<sequence>} Resolved with the ping list.
    */
-  loadPendingPingList: function() {
+  loadPendingPingList() {
     return TelemetryStorageImpl.loadPendingPingList();
    },
 
   /**
    * Returns a list of the currently pending pings in the format:
    * {
    *   id: <string>, // The pings UUID.
    *   lastModificationDate: <number>, // Timestamp of the pings last modification.
    * }
    * This does not scan pending pings on disk.
    *
    * @return {sequence} The current pending ping list.
    */
-  getPendingPingList: function() {
+  getPendingPingList() {
     return TelemetryStorageImpl.getPendingPingList();
    },
 
   /**
    * Save an aborted-session ping to disk. This goes to a special location so
    * it is not picked up as a pending ping.
    *
    * @param {object} ping The ping data to save.
    * @return {promise} Promise that is resolved when the ping is successfully saved.
    */
-  saveAbortedSessionPing: function(ping) {
+  saveAbortedSessionPing(ping) {
     return TelemetryStorageImpl.saveAbortedSessionPing(ping);
   },
 
   /**
    * Load the aborted-session ping from disk if present.
    *
    * @return {promise<object>} Promise that is resolved with the ping data if found.
    *                           Otherwise returns null.
    */
-  loadAbortedSessionPing: function() {
+  loadAbortedSessionPing() {
     return TelemetryStorageImpl.loadAbortedSessionPing();
   },
 
   /**
    * Save the deletion ping.
    * @param ping The deletion ping.
    * @return {Promise} A promise resolved when the ping is saved.
    */
-  saveDeletionPing: function(ping) {
+  saveDeletionPing(ping) {
     return TelemetryStorageImpl.saveDeletionPing(ping);
   },
 
   /**
    * Remove the deletion ping.
    * @return {Promise} Resolved when the ping is deleted from the disk.
    */
-  removeDeletionPing: function() {
+  removeDeletionPing() {
     return TelemetryStorageImpl.removeDeletionPing();
   },
 
   /**
    * Check if the ping id identifies a deletion ping.
    */
-  isDeletionPing: function(aPingId) {
+  isDeletionPing(aPingId) {
     return TelemetryStorageImpl.isDeletionPing(aPingId);
   },
 
   /**
    * Remove the aborted-session ping if present.
    *
    * @return {promise} Promise that is resolved once the ping is removed.
    */
-  removeAbortedSessionPing: function() {
+  removeAbortedSessionPing() {
     return TelemetryStorageImpl.removeAbortedSessionPing();
   },
 
   /**
    * Save a single ping to a file.
    *
    * @param {object} ping The content of the ping to save.
    * @param {string} file The destination file.
    * @param {bool} overwrite If |true|, the file will be overwritten if it exists,
    * if |false| the file will not be overwritten and no error will be reported if
    * the file exists.
    * @returns {promise}
    */
-  savePingToFile: function(ping, file, overwrite) {
+  savePingToFile(ping, file, overwrite) {
     return TelemetryStorageImpl.savePingToFile(ping, file, overwrite);
   },
 
   /**
    * Save a ping to its file.
    *
    * @param {object} ping The content of the ping to save.
    * @param {bool} overwrite If |true|, the file will be overwritten
    * if it exists.
    * @returns {promise}
    */
-  savePing: function(ping, overwrite) {
+  savePing(ping, overwrite) {
     return TelemetryStorageImpl.savePing(ping, overwrite);
   },
 
   /**
    * Add a ping to the saved pings directory so that it gets saved
    * and sent along with other pings.
    *
    * @param {Object} pingData The ping object.
    * @return {Promise} A promise resolved when the ping is saved to the pings directory.
    */
-  addPendingPing: function(pingData) {
+  addPendingPing(pingData) {
     return TelemetryStorageImpl.addPendingPing(pingData);
   },
 
   /**
    * Remove the file for a ping
    *
    * @param {object} ping The ping.
    * @returns {promise}
    */
-  cleanupPingFile: function(ping) {
+  cleanupPingFile(ping) {
     return TelemetryStorageImpl.cleanupPingFile(ping);
   },
 
   /**
    * The number of pending pings on disk.
    */
   get pendingPingCount() {
     return TelemetryStorageImpl.pendingPingCount;
@@ -423,49 +423,49 @@ this.TelemetryStorage = {
     return TelemetryStorageImpl.loadPingFile(aFilePath);
   }),
 
   /**
    * Remove FHR database files. This is temporary and will be dropped in
    * the future.
    * @return {Promise} Resolved when the database files are deleted.
    */
-  removeFHRDatabase: function() {
+  removeFHRDatabase() {
     return TelemetryStorageImpl.removeFHRDatabase();
   },
 
   /**
    * Only used in tests, builds an archived ping path from the ping metadata.
    * @param {String} aPingId The ping id.
    * @param {Object} aDate The ping creation date.
    * @param {String} aType The ping type.
    * @return {String} The full path to the archived ping.
    */
-  _testGetArchivedPingPath: function(aPingId, aDate, aType) {
+  _testGetArchivedPingPath(aPingId, aDate, aType) {
     return getArchivedPingPath(aPingId, aDate, aType);
   },
 
   /**
    * Only used in tests, this helper extracts ping metadata from a given filename.
    *
    * @param fileName {String} The filename.
    * @return {Object} Null if the filename didn't match the expected form.
    *                  Otherwise an object with the extracted data in the form:
    *                  { timestamp: <number>,
    *                    id: <string>,
    *                    type: <string> }
    */
-  _testGetArchivedPingDataFromFileName: function(aFileName) {
+  _testGetArchivedPingDataFromFileName(aFileName) {
     return TelemetryStorageImpl._getArchivedPingDataFromFileName(aFileName);
   },
 
   /**
    * Only used in tests, this helper allows cleaning up the pending ping storage.
    */
-  testClearPendingPings: function() {
+  testClearPendingPings() {
     return TelemetryStorageImpl.runRemovePendingPingsTask();
   }
 };
 
 /**
  * This object allows the serialisation of asynchronous tasks. This is particularly
  * useful to serialise write access to the disk in order to prevent race conditions
  * to corrupt the data being written.
@@ -481,40 +481,40 @@ function SaveSerializer() {
 SaveSerializer.prototype = {
   /**
    * Enqueues an operation to a list to serialise their execution in order to prevent race
    * conditions. Useful to serialise access to disk.
    *
    * @param {Function} aFunction The task function to enqueue. It must return a promise.
    * @return {Promise} A promise resolved when the enqueued task completes.
    */
-  enqueueTask: function(aFunction) {
+  enqueueTask(aFunction) {
     let promise = new Promise((resolve, reject) =>
       this._queuedOperations.push([aFunction, resolve, reject]));
 
     if (this._queuedOperations.length == 1) {
       this._popAndPerformQueuedOperation();
     }
     return promise;
   },
 
   /**
    * Make sure to flush all the pending operations.
    * @return {Promise} A promise resolved when all the pending operations have completed.
    */
-  flushTasks: function() {
+  flushTasks() {
     let dummyTask = () => new Promise(resolve => resolve());
     return this.enqueueTask(dummyTask);
   },
 
   /**
    * Pop a task from the queue, executes it and continue to the next one.
    * This function recursively pops all the tasks.
    */
-  _popAndPerformQueuedOperation: function() {
+  _popAndPerformQueuedOperation() {
     if (!this._queuedOperations.length || this._queuedInProgress) {
       return;
     }
 
     this._log.trace("_popAndPerformQueuedOperation - Performing queued operation.");
     let [func, resolve, reject] = this._queuedOperations.shift();
     let promise;
 
@@ -644,17 +644,17 @@ var TelemetryStorageImpl = {
   }),
 
   /**
    * Save an archived ping to disk.
    *
    * @param {object} ping The ping data to archive.
    * @return {promise} Promise that is resolved when the ping is successfully archived.
    */
-  saveArchivedPing: function(ping) {
+  saveArchivedPing(ping) {
     let promise = this._saveArchivedPingTask(ping);
     this._activelyArchiving.add(promise);
     promise.then((r) => { this._activelyArchiving.delete(promise); },
                  (e) => { this._activelyArchiving.delete(promise); });
     return promise;
   },
 
   _saveArchivedPingTask: Task.async(function*(ping) {
@@ -727,17 +727,17 @@ var TelemetryStorageImpl = {
       yield* checkSize(path);
       return yield this.loadPingFile(path, /* compressed*/ false);
     }
   }),
 
   /**
    * Saves session data to disk.
    */
-  saveSessionData: function(sessionData) {
+  saveSessionData(sessionData) {
     return this._stateSaveSerializer.enqueueTask(() => this._saveSessionData(sessionData));
   },
 
   _saveSessionData: Task.async(function* (sessionData) {
     let dataDir = OS.Path.join(OS.Constants.Path.profileDir, DATAREPORTING_DIR);
     yield OS.File.makeDir(dataDir);
 
     let filePath = OS.Path.join(gDataReportingDir, SESSION_STATE_FILE_NAME);
@@ -749,17 +749,17 @@ var TelemetryStorageImpl = {
     }
   }),
 
   /**
    * Loads session data from the session data file.
    * @return {Promise<Object>} A promise resolved with an object on success,
    *                           with null otherwise.
    */
-  loadSessionData: function() {
+  loadSessionData() {
     return this._stateSaveSerializer.enqueueTask(() => this._loadSessionData());
   },
 
   _loadSessionData: Task.async(function* () {
     const dataFile = OS.Path.join(OS.Constants.Path.profileDir, DATAREPORTING_DIR,
                                   SESSION_STATE_FILE_NAME);
     let content;
     try {
@@ -802,17 +802,17 @@ var TelemetryStorageImpl = {
     this._archivedPings.delete(id);
   }),
 
   /**
    * Clean the pings archive by removing old pings.
    *
    * @return {Promise} Resolved when the cleanup task completes.
    */
-  runCleanPingArchiveTask: function() {
+  runCleanPingArchiveTask() {
     // If there's an archive cleaning task already running, return it.
     if (this._cleanArchiveTask) {
       return this._cleanArchiveTask;
     }
 
     // Make sure to clear |_cleanArchiveTask| once done.
     let clear = () => this._cleanArchiveTask = null;
     // Since there's no archive cleaning task running, start it.
@@ -1136,17 +1136,17 @@ var TelemetryStorageImpl = {
     // this condition.
     recordHistograms(PENDING_PINGS_SIZE_PROBE_SPECIAL_VALUE, pingsToPurge.length,
                  Math.ceil(endTimeStamp - startTimeStamp));
   }),
 
   /**
    * Reset the storage state in tests.
    */
-  reset: function() {
+  reset() {
     this._shutdown = false;
     this._scannedArchiveDirectory = false;
     this._archivedPings = new Map();
     this._scannedPendingDirectory = false;
     this._pendingPings = new Map();
   },
 
   /**
@@ -1288,34 +1288,34 @@ var TelemetryStorageImpl = {
   /**
    * Add a ping to the saved pings directory so that it gets saved
    * and sent along with other pings.
    * Note: that the original ping file will not be modified.
    *
    * @param {Object} ping The ping object.
    * @return {Promise} A promise resolved when the ping is saved to the pings directory.
    */
-  addPendingPing: function(ping) {
+  addPendingPing(ping) {
     return this.savePendingPing(ping);
   },
 
   /**
    * Remove the file for a ping
    *
    * @param {object} ping The ping.
    * @returns {promise}
    */
-  cleanupPingFile: function(ping) {
+  cleanupPingFile(ping) {
     return OS.File.remove(pingFilePath(ping));
   },
 
-  savePendingPing: function(ping) {
+  savePendingPing(ping) {
     let p = this.savePing(ping, true).then((path) => {
       this._pendingPings.set(ping.id, {
-        path: path,
+        path,
         lastModificationDate: Policy.now().getTime(),
       });
       this._log.trace("savePendingPing - saved ping with id " + ping.id);
     });
     this._trackPendingPingSaveTask(p);
     return p;
   },
 
@@ -1362,17 +1362,17 @@ var TelemetryStorageImpl = {
       this._pendingPings.delete(id);
       // Then propagate the rejection.
       throw e;
     }
 
     return ping;
   }),
 
-  removePendingPing: function(id) {
+  removePendingPing(id) {
     let info = this._pendingPings.get(id);
     if (!info) {
       this._log.trace("removePendingPing - unknown id " + id);
       return Promise.resolve();
     }
 
     this._log.trace("removePendingPing - deleting ping with id: " + id +
                     ", path: " + info.path);
@@ -1382,28 +1382,28 @@ var TelemetryStorageImpl = {
   },
 
   /**
    * Track any pending ping save tasks through the promise passed here.
    * This is needed to block on any outstanding ping save activity.
    *
    * @param {Object<Promise>} The save promise to track.
    */
-  _trackPendingPingSaveTask: function(promise) {
+  _trackPendingPingSaveTask(promise) {
     let clear = () => this._activePendingPingSaves.delete(promise);
     promise.then(clear, clear);
     this._activePendingPingSaves.add(promise);
   },
 
   /**
    * Return a promise that allows to wait on pending pings being saved.
    * @return {Object<Promise>} A promise resolved when all the pending pings save promises
    *         are resolved.
    */
-  promisePendingPingSaves: function() {
+  promisePendingPingSaves() {
     // Make sure to wait for all the promises, even if they reject. We don't need to log
     // the failures here, as they are already logged elsewhere.
     return waitForAll(this._activePendingPingSaves);
   },
 
   /**
    * Run the task to remove all the pending pings (except the deletion ping).
    *
@@ -1451,17 +1451,17 @@ var TelemetryStorageImpl = {
           continue;
         }
       }
     } finally {
       yield iter.close();
     }
   }),
 
-  loadPendingPingList: function() {
+  loadPendingPingList() {
     // If we already have a pending scanning task active, return that.
     if (this._scanPendingPingsTask) {
       return this._scanPendingPingsTask;
     }
 
     if (this._scannedPendingDirectory) {
       this._log.trace("loadPendingPingList - Pending already scanned, hitting cache.");
       return Promise.resolve(this._buildPingList());
@@ -1474,17 +1474,17 @@ var TelemetryStorageImpl = {
       return pings;
     }, ex => {
       this._scanPendingPingsTask = null;
       throw ex;
     });
     return this._scanPendingPingsTask;
   },
 
-  getPendingPingList: function() {
+  getPendingPingList() {
     return this._buildPingList();
   },
 
   _scanPendingPings: Task.async(function*() {
     this._log.trace("_scanPendingPings");
 
     let directory = TelemetryStorage.pingDirectoryPath;
     let iter = new OS.File.DirectoryIterator(directory);
@@ -1550,17 +1550,17 @@ var TelemetryStorageImpl = {
         lastModificationDate: Date.now(),
       });
     }
 
     this._scannedPendingDirectory = true;
     return this._buildPingList();
   }),
 
-  _buildPingList: function() {
+  _buildPingList() {
     const list = Array.from(this._pendingPings, p => ({
       id: p[0],
       lastModificationDate: p[1].lastModificationDate,
     }));
 
     list.sort((a, b) => b.lastModificationDate - a.lastModificationDate);
     return list;
   },
@@ -1615,17 +1615,17 @@ var TelemetryStorageImpl = {
    *
    * @param fileName {String} The filename.
    * @return {Object} Null if the filename didn't match the expected form.
    *                  Otherwise an object with the extracted data in the form:
    *                  { timestamp: <number>,
    *                    id: <string>,
    *                    type: <string> }
    */
-  _getArchivedPingDataFromFileName: function(fileName) {
+  _getArchivedPingDataFromFileName(fileName) {
     // Extract the parts.
     let parts = fileName.split(".");
     if (parts.length != 4) {
       this._log.trace("_getArchivedPingDataFromFileName - should have 4 parts");
       return null;
     }
 
     let [timestamp, uuid, type, extension] = parts;
@@ -1650,19 +1650,19 @@ var TelemetryStorageImpl = {
     // Check for a valid type string.
     const typeRegex = /^[a-z0-9][a-z0-9-]+[a-z0-9]$/i;
     if (!typeRegex.test(type)) {
       this._log.trace("_getArchivedPingDataFromFileName - should have a valid type");
       return null;
     }
 
     return {
-      timestamp: timestamp,
+      timestamp,
       id: uuid,
-      type: type,
+      type,
     };
   },
 
   saveAbortedSessionPing: Task.async(function*(ping) {
     this._log.trace("saveAbortedSessionPing - ping path: " + gAbortedSessionFilePath);
     yield OS.File.makeDir(gDataReportingDir, { ignoreExisting: true });
 
     return this._abortedSessionSerializer.enqueueTask(() =>
@@ -1678,17 +1678,17 @@ var TelemetryStorageImpl = {
         this._log.trace("loadAbortedSessionPing - no such file");
       } else {
         this._log.error("loadAbortedSessionPing - error loading ping", ex)
       }
     }
     return ping;
   }),
 
-  removeAbortedSessionPing: function() {
+  removeAbortedSessionPing() {
     return this._abortedSessionSerializer.enqueueTask(Task.async(function*() {
       try {
         yield OS.File.remove(gAbortedSessionFilePath, { ignoreAbsent: false });
         this._log.trace("removeAbortedSessionPing - success");
       } catch (ex) {
         if (ex.becauseNoSuchFile) {
           this._log.trace("removeAbortedSessionPing - no such file");
         } else {
@@ -1727,17 +1727,17 @@ var TelemetryStorageImpl = {
           this._log.trace("removeDeletionPing - no such file");
         } else {
           this._log.error("removeDeletionPing - error removing ping", ex)
         }
       }
     }.bind(this)));
   }),
 
-  isDeletionPing: function(aPingId) {
+  isDeletionPing(aPingId) {
     this._log.trace("isDeletionPing - id: " + aPingId);
     let pingInfo = this._pendingPings.get(aPingId);
     if (!pingInfo) {
       return false;
     }
 
     if (pingInfo.path != gDeletionPingFilePath) {
       return false;
--- a/toolkit/components/telemetry/TelemetryUtils.jsm
+++ b/toolkit/components/telemetry/TelemetryUtils.jsm
@@ -40,97 +40,97 @@ this.TelemetryUtils = {
   },
 
   /**
    * Turn a millisecond timestamp into a day timestamp.
    *
    * @param aMsec A number of milliseconds since Unix epoch.
    * @return The number of whole days since Unix epoch.
    */
-  millisecondsToDays: function(aMsec) {
+  millisecondsToDays(aMsec) {
     return Math.floor(aMsec / MILLISECONDS_PER_DAY);
   },
 
   /**
    * Takes a date and returns it trunctated to a date with daily precision.
    */
-  truncateToDays: function(date) {
+  truncateToDays(date) {
     return new Date(date.getFullYear(),
                     date.getMonth(),
                     date.getDate(),
                     0, 0, 0, 0);
   },
 
   /**
    * Check if the difference between the times is within the provided tolerance.
    * @param {Number} t1 A time in milliseconds.
    * @param {Number} t2 A time in milliseconds.
    * @param {Number} tolerance The tolerance, in milliseconds.
    * @return {Boolean} True if the absolute time difference is within the tolerance, false
    *                   otherwise.
    */
-  areTimesClose: function(t1, t2, tolerance) {
+  areTimesClose(t1, t2, tolerance) {
     return Math.abs(t1 - t2) <= tolerance;
   },
 
   /**
    * Get the next midnight for a date.
    * @param {Object} date The date object to check.
    * @return {Object} The Date object representing the next midnight.
    */
-  getNextMidnight: function(date) {
+  getNextMidnight(date) {
     let nextMidnight = new Date(this.truncateToDays(date));
     nextMidnight.setDate(nextMidnight.getDate() + 1);
     return nextMidnight;
   },
 
   /**
    * Get the midnight which is closer to the provided date.
    * @param {Object} date The date object to check.
    * @param {Number} tolerance The tolerance within we find the closest midnight.
    * @return {Object} The Date object representing the closes midnight, or null if midnight
    *                  is not within the midnight tolerance.
    */
-  getNearestMidnight: function(date, tolerance) {
+  getNearestMidnight(date, tolerance) {
     let lastMidnight = this.truncateToDays(date);
     if (this.areTimesClose(date.getTime(), lastMidnight.getTime(), tolerance)) {
       return lastMidnight;
     }
 
     const nextMidnightDate = this.getNextMidnight(date);
     if (this.areTimesClose(date.getTime(), nextMidnightDate.getTime(), tolerance)) {
       return nextMidnightDate;
     }
     return null;
   },
 
-  generateUUID: function() {
+  generateUUID() {
     let str = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator).generateUUID().toString();
     // strip {}
     return str.substring(1, str.length - 1);
   },
 
   /**
    * Find how many months passed between two dates.
    * @param {Object} aStartDate The starting date.
    * @param {Object} aEndDate The ending date.
    * @return {Integer} The number of months between the two dates.
    */
-  getElapsedTimeInMonths: function(aStartDate, aEndDate) {
+  getElapsedTimeInMonths(aStartDate, aEndDate) {
     return (aEndDate.getMonth() - aStartDate.getMonth())
            + 12 * (aEndDate.getFullYear() - aStartDate.getFullYear());
   },
 
   /**
    * Date.toISOString() gives us UTC times, this gives us local times in
    * the ISO date format. See http://www.w3.org/TR/NOTE-datetime
    * @param {Object} date The input date.
    * @return {String} The local time ISO string.
    */
-  toLocalTimeISOString: function(date) {
+  toLocalTimeISOString(date) {
     function padNumber(number, places) {
       number = number.toString();
       while (number.length < places) {
         number = "0" + number;
       }
       return number;
     }
 
--- a/toolkit/components/telemetry/ThirdPartyCookieProbe.jsm
+++ b/toolkit/components/telemetry/ThirdPartyCookieProbe.jsm
@@ -41,34 +41,34 @@ this.ThirdPartyCookieProbe = function() 
   /**
    * Timestamp of the latest call to flush() in milliseconds since the Epoch.
    */
   this._latestFlush = Date.now();
 };
 
 this.ThirdPartyCookieProbe.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
-  init: function() {
+  init() {
     Services.obs.addObserver(this, "profile-before-change", false);
     Services.obs.addObserver(this, "third-party-cookie-accepted", false);
     Services.obs.addObserver(this, "third-party-cookie-rejected", false);
   },
-  dispose: function() {
+  dispose() {
     Services.obs.removeObserver(this, "profile-before-change");
     Services.obs.removeObserver(this, "third-party-cookie-accepted");
     Services.obs.removeObserver(this, "third-party-cookie-rejected");
   },
   /**
    * Observe either
    * - "profile-before-change" (no meaningful subject or data) - time to flush statistics and unregister; or
    * - "third-party-cookie-accepted"/"third-party-cookie-rejected" with
    *    subject: the nsIURI of the third-party that attempted to set the cookie;
    *    data: a string holding the uri of the page seen by the user.
    */
-  observe: function(docURI, topic, referrer) {
+  observe(docURI, topic, referrer) {
     try {
       if (topic == "profile-before-change") {
         // A final flush, then unregister
         this.flush();
         this.dispose();
       }
       if (topic != "third-party-cookie-accepted"
           && topic != "third-party-cookie-rejected") {
@@ -103,17 +103,17 @@ this.ThirdPartyCookieProbe.prototype = {
   },
 
   /**
    * Clear internal data, fill up corresponding histograms.
    *
    * @param {number} aNow (optional, used for testing purposes only)
    * The current instant. Used to make tests time-independent.
    */
-  flush: function(aNow = Date.now()) {
+  flush(aNow = Date.now()) {
     let updays = (aNow - this._latestFlush) / MILLISECONDS_PER_DAY;
     if (updays <= 0) {
       // Unlikely, but regardless, don't risk division by zero
       // or weird stuff.
       return;
     }
     this._latestFlush = aNow;
     this._thirdPartyCookies.clear();
@@ -146,21 +146,21 @@ var RejectStats = function() {
   /**
    * Total number of attempts to set a third-party cookie that have
    * been rejected. Two rejected attempts on the same site will both
    * augment this count.
    */
   this._rejectedRequests = 0;
 };
 RejectStats.prototype = {
-  addAccepted: function(firstParty) {
+  addAccepted(firstParty) {
     this._acceptedSites.add(firstParty);
     this._acceptedRequests++;
   },
-  addRejected: function(firstParty) {
+  addRejected(firstParty) {
     this._rejectedSites.add(firstParty);
     this._rejectedRequests++;
   },
   get countAcceptedSites() {
     return this._acceptedSites.size;
   },
   get countRejectedSites() {
     return this._rejectedSites.size;
--- a/toolkit/components/telemetry/UITelemetry.jsm
+++ b/toolkit/components/telemetry/UITelemetry.jsm
@@ -40,17 +40,17 @@ this.UITelemetry = {
       this._enabled = Services.prefs.getBoolPref(PREF_ENABLED);
     } catch (e) {
       this._enabled = false;
     }
 
     return this._enabled;
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic == "profile-before-change") {
       Services.obs.removeObserver(this, "profile-before-change");
       Services.prefs.removeObserver(PREF_ENABLED, this);
       this._enabled = undefined;
       return;
     }
 
     if (aTopic == "nsPref:changed") {
@@ -84,69 +84,69 @@ this.UITelemetry = {
    */
   _simpleMeasureFunctions: {},
 
   /**
    * A hack to generate the relative timestamp from start when we don't have
    * access to the Java timer.
    * XXX: Bug 1007647 - Support realtime and/or uptime in JavaScript.
    */
-  uptimeMillis: function() {
+  uptimeMillis() {
     return Date.now() - Services.startup.getStartupInfo().process;
   },
 
   /**
    * Adds a single event described by a timestamp, an action, and the calling
    * method.
    *
    * Optionally provide a string 'extras', which will be recorded as part of
    * the event.
    *
    * All extant sessions will be recorded by name for each event.
    */
-  addEvent: function(aAction, aMethod, aTimestamp, aExtras) {
+  addEvent(aAction, aMethod, aTimestamp, aExtras) {
     if (!this.enabled) {
       return;
     }
 
     let sessions = Object.keys(this._activeSessions);
     let aEvent = {
       type: "event",
       action: aAction,
       method: aMethod,
-      sessions: sessions,
+      sessions,
       timestamp: (aTimestamp == undefined) ? this.uptimeMillis() : aTimestamp,
     };
 
     if (aExtras) {
       aEvent.extras = aExtras;
     }
 
     this._recordEvent(aEvent);
   },
 
   /**
    * Begins tracking a session by storing a timestamp for session start.
    */
-  startSession: function(aName, aTimestamp) {
+  startSession(aName, aTimestamp) {
     if (!this.enabled) {
       return;
     }
 
     if (this._activeSessions[aName]) {
       // Do not overwrite a previous event start if it already exists.
       return;
     }
     this._activeSessions[aName] = (aTimestamp == undefined) ? this.uptimeMillis() : aTimestamp;
   },
 
   /**
    * Tracks the end of a session with a timestamp.
    */
-  stopSession: function(aName, aReason, aTimestamp) {
+  stopSession(aName, aReason, aTimestamp) {
     if (!this.enabled) {
       return;
     }
 
     let sessionStart = this._activeSessions[aName];
     delete this._activeSessions[aName];
 
     if (!sessionStart) {
@@ -159,27 +159,27 @@ this.UITelemetry = {
       reason: aReason,
       start: sessionStart,
       end: (aTimestamp == undefined) ? this.uptimeMillis() : aTimestamp,
     };
 
     this._recordEvent(aEvent);
   },
 
-  _recordEvent: function(aEvent) {
+  _recordEvent(aEvent) {
     this._measurements.push(aEvent);
   },
 
   /**
    * Called by TelemetrySession to populate the simple measurement
    * blob. This function will iterate over all functions added
    * via addSimpleMeasureFunction and return an object with the
    * results of those functions.
    */
-  getSimpleMeasures: function() {
+  getSimpleMeasures() {
     if (!this.enabled) {
       return {};
     }
 
     let result = {};
     for (let name in this._simpleMeasureFunctions) {
       result[name] = this._simpleMeasureFunctions[name]();
     }
@@ -190,43 +190,43 @@ this.UITelemetry = {
    * Allows the caller to register functions that will get called
    * for simple measures during a Telemetry ping. aName is a unique
    * identifier used as they key for the simple measurement in the
    * object that getSimpleMeasures returns.
    *
    * This function throws an exception if aName already has a function
    * registered for it.
    */
-  addSimpleMeasureFunction: function(aName, aFunction) {
+  addSimpleMeasureFunction(aName, aFunction) {
     if (!this.enabled) {
       return;
     }
 
     if (aName in this._simpleMeasureFunctions) {
       throw new Error("A simple measurement function is already registered for " + aName);
     }
 
     if (!aFunction || typeof aFunction !== 'function') {
       throw new Error("addSimpleMeasureFunction called with non-function argument.");
     }
 
     this._simpleMeasureFunctions[aName] = aFunction;
   },
 
-  removeSimpleMeasureFunction: function(aName) {
+  removeSimpleMeasureFunction(aName) {
     delete this._simpleMeasureFunctions[aName];
   },
 
   /**
    * Called by TelemetrySession to populate the UI measurement
    * blob.
    *
    * Optionally clears the set of measurements based on aClear.
    */
-  getUIMeasurements: function(aClear) {
+  getUIMeasurements(aClear) {
     if (!this.enabled) {
       return [];
     }
 
     let measurements = this._measurements.slice();
     if (aClear) {
       this._measurements = [];
     }
--- a/toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm
+++ b/toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm
@@ -28,17 +28,17 @@ function checkForProperties(ping, expect
 /**
  * A helper object that allows test code to check whether a telemetry ping
  * was properly saved. To use, first initialize to collect the starting pings
  * and then check for new ping data.
  */
 function Checker() {
 }
 Checker.prototype = {
-  promiseInit: function() {
+  promiseInit() {
     this._pingMap = new Map();
     return TelemetryArchive.promiseArchivedPingList().then((plist) => {
       for (let ping of plist) {
         this._pingMap.set(ping.id, ping);
       }
     });
   },
 
@@ -72,15 +72,15 @@ Checker.prototype = {
         return ping;
       }
     }
     return null;
   }),
 };
 
 const TelemetryArchiveTesting = {
-  setup: function() {
+  setup() {
     Services.prefs.setCharPref("toolkit.telemetry.log.level", "Trace");
     Services.prefs.setBoolPref("toolkit.telemetry.archive.enabled", true);
   },
 
-  Checker: Checker,
+  Checker,
 };
--- a/toolkit/components/telemetry/tests/unit/head.js
+++ b/toolkit/components/telemetry/tests/unit/head.js
@@ -44,71 +44,71 @@ const PingServer = {
   get port() {
     return this._httpServer.identity.primaryPort;
   },
 
   get started() {
     return this._started;
   },
 
-  registerPingHandler: function(handler) {
+  registerPingHandler(handler) {
     const wrapped = wrapWithExceptionHandler(handler);
     this._httpServer.registerPrefixHandler("/submit/telemetry/", wrapped);
   },
 
-  resetPingHandler: function() {
+  resetPingHandler() {
     this.registerPingHandler((request, response) => {
       let deferred = this._defers[this._defers.length - 1];
       this._defers.push(PromiseUtils.defer());
       deferred.resolve(request);
     });
   },
 
-  start: function() {
+  start() {
     this._httpServer = new HttpServer();
     this._httpServer.start(-1);
     this._started = true;
     this.clearRequests();
     this.resetPingHandler();
   },
 
-  stop: function() {
+  stop() {
     return new Promise(resolve => {
       this._httpServer.stop(resolve);
       this._started = false;
     });
   },
 
-  clearRequests: function() {
+  clearRequests() {
     this._defers = [ PromiseUtils.defer() ];
     this._currentDeferred = 0;
   },
 
-  promiseNextRequest: function() {
+  promiseNextRequest() {
     const deferred = this._defers[this._currentDeferred++];
     // Send the ping to the consumer on the next tick, so that the completion gets
     // signaled to Telemetry.
     return new Promise(r => Services.tm.currentThread.dispatch(() => r(deferred.promise),
                                                                Ci.nsIThread.DISPATCH_NORMAL));
   },
 
-  promiseNextPing: function() {
+  promiseNextPing() {
     return this.promiseNextRequest().then(request => decodeRequestPayload(request));
   },
 
   promiseNextRequests: Task.async(function*(count) {
     let results = [];
     for (let i = 0; i < count; ++i) {
       results.push(yield this.promiseNextRequest());
     }
 
     return results;
   }),
 
-  promiseNextPings: function(count) {
+  promiseNextPings(count) {
     return this.promiseNextRequests(count).then(requests => {
       return Array.from(requests, decodeRequestPayload);
     });
   },
 };
 
 /**
  * Decode the payload of an HTTP request into a ping.
@@ -118,17 +118,17 @@ const PingServer = {
 function decodeRequestPayload(request) {
   let s = request.bodyInputStream;
   let payload = null;
   let decoder = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON)
 
   if (request.getHeader("content-encoding") == "gzip") {
     let observer = {
       buffer: "",
-      onStreamComplete: function(loader, context, status, length, result) {
+      onStreamComplete(loader, context, status, length, result) {
         this.buffer = String.fromCharCode.apply(this, result);
       }
     };
 
     let scs = Cc["@mozilla.org/streamConverters;1"]
               .getService(Ci.nsIStreamConverterService);
     let listener = Cc["@mozilla.org/network/stream-loader;1"]
                   .createInstance(Ci.nsIStreamLoader);
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
@@ -92,36 +92,36 @@ PluginTag.prototype = {
   filename: null,
   fullpath: null,
   disabled: false,
   blocklisted: false,
   clicktoplay: true,
 
   mimeTypes: [ PLUGIN_MIME_TYPE1, PLUGIN_MIME_TYPE2 ],
 
-  getMimeTypes: function(count) {
+  getMimeTypes(count) {
     count.value = this.mimeTypes.length;
     return this.mimeTypes;
   }
 };
 
 // A container for the plugins handled by the fake plugin host.
 var gInstalledPlugins = [
   new PluginTag("Java", "A mock Java plugin", "1.0", false /* Disabled */),
   new PluginTag(FLASH_PLUGIN_NAME, FLASH_PLUGIN_DESC, FLASH_PLUGIN_VERSION, true),
 ];
 
 // A fake plugin host for testing plugin telemetry environment.
 var PluginHost = {
-  getPluginTags: function(countRef) {
+  getPluginTags(countRef) {
     countRef.value = gInstalledPlugins.length;
     return gInstalledPlugins;
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIPluginHost)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
@@ -233,22 +233,22 @@ MockAddonWrapper.prototype = {
 function createMockAddonProvider(aName) {
   let mockProvider = {
     _addons: [],
 
     get name() {
       return aName;
     },
 
-    addAddon: function(aAddon) {
+    addAddon(aAddon) {
       this._addons.push(aAddon);
       AddonManagerPrivate.callAddonListeners("onInstalled", new MockAddonWrapper(aAddon));
     },
 
-    getAddonsByTypes: function(aTypes, aCallback) {
+    getAddonsByTypes(aTypes, aCallback) {
       aCallback(this._addons.map(a => new MockAddonWrapper(a)));
     },
 
     shutdown() {
       return Promise.resolve();
     },
   };
 
@@ -667,17 +667,17 @@ function checkActiveAddon(data) {
     appDisabled: "boolean",
     version: "string",
     scope: "number",
     type: "string",
     foreignInstall: "boolean",
     hasBinaryComponents: "boolean",
     installDay: "number",
     updateDay: "number",
-    signedState: signedState,
+    signedState,
     isSystem: "boolean",
   };
 
   for (let f in EXPECTED_ADDON_FIELDS_TYPES) {
     Assert.ok(f in data, f + " must be available.");
     Assert.equal(typeof data[f], EXPECTED_ADDON_FIELDS_TYPES[f],
                  f + " must have the correct type.");
   }
--- a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
+++ b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm
@@ -54,17 +54,17 @@ const BackgroundPageThumbs = {
    * @opt onDone     A function that will be asynchronously called when the
    *                 capture is complete or times out.  It's called as
    *                   onDone(url),
    *                 where `url` is the captured URL.
    * @opt timeout    The capture will time out after this many milliseconds have
    *                 elapsed after the capture has progressed to the head of
    *                 the queue and started.  Defaults to 30000 (30 seconds).
    */
-  capture: function(url, options = {}) {
+  capture(url, options = {}) {
     if (!PageThumbs._prefEnabled()) {
       if (options.onDone)
         schedule(() => options.onDone(url));
       return;
     }
     this._captureQueue = this._captureQueue || [];
     this._capturesByURL = this._capturesByURL || new Map();
 
@@ -134,28 +134,28 @@ const BackgroundPageThumbs = {
     }
     return url;
   }),
 
   /**
    * Tell the service that the thumbnail browser should be recreated at next
    * call of _ensureBrowser().
    */
-  renewThumbnailBrowser: function() {
+  renewThumbnailBrowser() {
     this._renewThumbBrowser = true;
   },
 
   /**
    * Ensures that initialization of the thumbnail browser's parent window has
    * begun.
    *
    * @return  True if the parent window is completely initialized and can be
    *          used, and false if initialization has started but not completed.
    */
-  _ensureParentWindowReady: function() {
+  _ensureParentWindowReady() {
     if (this._parentWin)
       // Already fully initialized.
       return true;
     if (this._startedParentWinInit)
       // Already started initializing.
       return false;
 
     this._startedParentWinInit = true;
@@ -177,32 +177,32 @@ const BackgroundPageThumbs = {
 
     return false;
   },
 
   /**
    * Destroys the service.  Queued and pending captures will never complete, and
    * their consumer callbacks will never be called.
    */
-  _destroy: function() {
+  _destroy() {
     if (this._captureQueue)
       this._captureQueue.forEach(cap => cap.destroy());
     this._destroyBrowser();
     if (this._hostIframe)
       this._hostIframe.remove();
     delete this._captureQueue;
     delete this._hostIframe;
     delete this._startedParentWinInit;
     delete this._parentWin;
   },
 
   /**
    * Creates the thumbnail browser if it doesn't already exist.
    */
-  _ensureBrowser: function() {
+  _ensureBrowser() {
     if (this._thumbBrowser && !this._renewThumbBrowser)
       return;
 
     this._destroyBrowser();
     this._renewThumbBrowser = false;
 
     let browser = this._parentWin.document.createElementNS(XUL_NS, "browser");
     browser.setAttribute("type", "content");
@@ -259,28 +259,28 @@ const BackgroundPageThumbs = {
       // maybe a GC or similar crashed) - so there's no need to attempt a
       // queue restart - the next capture request will set everything up.
     });
 
     browser.messageManager.loadFrameScript(FRAME_SCRIPT_URL, false);
     this._thumbBrowser = browser;
   },
 
-  _destroyBrowser: function() {
+  _destroyBrowser() {
     if (!this._thumbBrowser)
       return;
     this._thumbBrowser.remove();
     delete this._thumbBrowser;
   },
 
   /**
    * Starts the next capture if the queue is not empty and the service is fully
    * initialized.
    */
-  _processCaptureQueue: function() {
+  _processCaptureQueue() {
     if (!this._captureQueue.length ||
         this._captureQueue[0].pending ||
         !this._ensureParentWindowReady())
       return;
 
     // Ready to start the first capture in the queue.
     this._ensureBrowser();
     this._captureQueue[0].start(this._thumbBrowser.messageManager);
@@ -289,17 +289,17 @@ const BackgroundPageThumbs = {
       delete this._destroyBrowserTimer;
     }
   },
 
   /**
    * Called when the current capture completes or fails (eg, times out, remote
    * process crashes.)
    */
-  _onCaptureOrTimeout: function(capture) {
+  _onCaptureOrTimeout(capture) {
     // Since timeouts start as an item is being processed, only the first
     // item in the queue can be passed to this method.
     if (capture !== this._captureQueue[0])
       throw new Error("The capture should be at the head of the queue.");
     this._captureQueue.shift();
     this._capturesByURL.delete(capture.url);
     if (capture.doneReason != TEL_CAPTURE_DONE_OK) {
       Services.obs.notifyObservers(null, "page-thumbnail:error", capture.url);
@@ -358,17 +358,17 @@ Capture.prototype = {
     return !!this._msgMan;
   },
 
   /**
    * Sends a message to the content script to start the capture.
    *
    * @param messageManager  The nsIMessageSender of the thumbnail browser.
    */
-  start: function(messageManager) {
+  start(messageManager) {
     this.startDate = new Date();
     tel("CAPTURE_QUEUE_TIME_MS", this.startDate - this.creationDate);
 
     // timeout timer
     let timeout = typeof(this.options.timeout) == "number" ?
                   this.options.timeout :
                   DEFAULT_CAPTURE_TIMEOUT;
     this._timeoutTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
@@ -382,17 +382,17 @@ Capture.prototype = {
     this._msgMan.addMessageListener("BackgroundPageThumbs:didCapture", this);
   },
 
   /**
    * The only intended external use of this method is by the service when it's
    * uninitializing and doing things like destroying the thumbnail browser.  In
    * that case the consumer's completion callback will never be called.
    */
-  destroy: function() {
+  destroy() {
     // This method may be called for captures that haven't started yet, so
     // guard against not yet having _timeoutTimer, _msgMan etc properties...
     if (this._timeoutTimer) {
       this._timeoutTimer.cancel();
       delete this._timeoutTimer;
     }
     if (this._msgMan) {
       this._msgMan.removeMessageListener("BackgroundPageThumbs:didCapture",
@@ -400,17 +400,17 @@ Capture.prototype = {
       delete this._msgMan;
     }
     delete this.captureCallback;
     delete this.doneCallbacks;
     delete this.options;
   },
 
   // Called when the didCapture message is received.
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     if (msg.data.imageData)
       tel("CAPTURE_SERVICE_TIME_MS", new Date() - this.startDate);
 
     // A different timed-out capture may have finally successfully completed, so
     // discard messages that aren't meant for this capture.
     if (msg.data.id != this.id)
       return;
 
@@ -419,21 +419,21 @@ Capture.prototype = {
       this._done(null, reason);
       return;
     }
 
     this._done(msg.data, TEL_CAPTURE_DONE_OK);
   },
 
   // Called when the timeout timer fires.
-  notify: function() {
+  notify() {
     this._done(null, TEL_CAPTURE_DONE_TIMEOUT);
   },
 
-  _done: function(data, reason) {
+  _done(data, reason) {
     // Note that _done will be called only once, by either receiveMessage or
     // notify, since it calls destroy here, which cancels the timeout timer and
     // removes the didCapture message listener.
     let { captureCallback, doneCallbacks, options } = this;
     this.destroy();
     this.doneReason = reason;
 
     if (typeof(reason) != "number") {
--- a/toolkit/components/thumbnails/PageThumbUtils.jsm
+++ b/toolkit/components/thumbnails/PageThumbUtils.jsm
@@ -30,17 +30,17 @@ this.PageThumbUtils = {
    * is undefined, in the context of hiddenDOMWindow.
    *
    * @param aWindow (optional) The document of this window will be used to
    *  create the canvas.  If not given, the hidden window will be used.
    * @param aWidth (optional) width of the canvas to create
    * @param aHeight (optional) height of the canvas to create
    * @return The newly created canvas.
    */
-  createCanvas: function(aWindow, aWidth = 0, aHeight = 0) {
+  createCanvas(aWindow, aWidth = 0, aHeight = 0) {
     let doc = (aWindow || Services.appShell.hiddenDOMWindow).document;
     let canvas = doc.createElementNS(this.HTML_NAMESPACE, "canvas");
     canvas.mozOpaque = true;
     canvas.imageSmoothingEnabled = true;
     let [thumbnailWidth, thumbnailHeight] = this.getThumbnailSize(aWindow);
     canvas.width = aWidth ? aWidth : thumbnailWidth;
     canvas.height = aHeight ? aHeight : thumbnailHeight;
     return canvas;
@@ -49,17 +49,17 @@ this.PageThumbUtils = {
   /**
    * Calculates a preferred initial thumbnail size based based on newtab.css
    * sizes or a preference for other applications. The sizes should be the same
    * as set for the tile sizes in newtab.
    *
    * @param aWindow (optional) aWindow that is used to calculate the scaling size.
    * @return The calculated thumbnail size or a default if unable to calculate.
    */
-  getThumbnailSize: function(aWindow = null) {
+  getThumbnailSize(aWindow = null) {
     if (!this._thumbnailWidth || !this._thumbnailHeight) {
       let screenManager = Cc["@mozilla.org/gfx/screenmanager;1"]
                             .getService(Ci.nsIScreenManager);
       let left = {}, top = {}, screenWidth = {}, screenHeight = {};
       screenManager.primaryScreen.GetRectDisplayPix(left, top, screenWidth, screenHeight);
 
       /** *
        * The system default scale might be different than
@@ -100,17 +100,17 @@ this.PageThumbUtils = {
 
     return [this._thumbnailWidth, this._thumbnailHeight];
   },
 
   /** *
    * Given a browser window, return the size of the content
    * minus the scroll bars.
    */
-  getContentSize: function(aWindow) {
+  getContentSize(aWindow) {
     let utils = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                        .getInterface(Ci.nsIDOMWindowUtils);
     // aWindow may be a cpow, add exposed props security values.
     let sbWidth = {}, sbHeight = {};
 
     try {
       utils.getScrollbarSize(false, sbWidth, sbHeight);
     } catch (e) {
@@ -143,17 +143,17 @@ this.PageThumbUtils = {
    *
    * @params aWindow - the window to create a snapshot of.
    * @params aDestCanvas destination canvas to draw the final
    *   snapshot to. Can be null.
    * @param aArgs (optional) Additional named parameters:
    *   fullScale - request that a non-downscaled image be returned.
    * @return Canvas with a scaled thumbnail of the window.
    */
-  createSnapshotThumbnail: function(aWindow, aDestCanvas, aArgs) {
+  createSnapshotThumbnail(aWindow, aDestCanvas, aArgs) {
     if (Cu.isCrossProcessWrapper(aWindow)) {
       throw new Error('Do not pass cpows here.');
     }
     let fullScale = aArgs ? aArgs.fullScale : false;
     let [contentWidth, contentHeight] = this.getContentSize(aWindow);
     let [thumbnailWidth, thumbnailHeight] = aDestCanvas ?
                                             [aDestCanvas.width, aDestCanvas.height] :
                                             this.getThumbnailSize(aWindow);
@@ -224,17 +224,17 @@ this.PageThumbUtils = {
   /**
    * Determine a good thumbnail crop size and scale for a given content
    * window.
    *
    * @param aWindow The content window.
    * @param aCanvas The target canvas.
    * @return An array containing width, height and scale.
    */
-  determineCropSize: function(aWindow, aCanvas) {
+  determineCropSize(aWindow, aCanvas) {
     if (Cu.isCrossProcessWrapper(aWindow)) {
       throw new Error('Do not pass cpows here.');
     }
     let utils = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                        .getInterface(Ci.nsIDOMWindowUtils);
     // aWindow may be a cpow, add exposed props security values.
     let sbWidth = {}, sbHeight = {};
 
@@ -260,17 +260,17 @@ this.PageThumbUtils = {
       height -= Math.floor(Math.abs(scaledHeight - thumbnailHeight) * scale);
 
     if (scaledWidth > thumbnailWidth)
       width -= Math.floor(Math.abs(scaledWidth - thumbnailWidth) * scale);
 
     return [width, height, scale];
   },
 
-  shouldStoreContentThumbnail: function(aDocument, aDocShell) {
+  shouldStoreContentThumbnail(aDocument, aDocShell) {
     if (BrowserUtils.isToolbarVisible(aDocShell, "findbar")) {
       return false;
     }
 
     // FIXME Bug 720575 - Don't capture thumbnails for SVG or XML documents as
     //       that currently regresses Talos SVG tests.
     if (aDocument instanceof Ci.nsIDOMXMLDocument) {
       return false;
@@ -332,17 +332,17 @@ this.PageThumbUtils = {
     } // httpChannel
     return true;
   },
 
   /**
    * Given a channel, returns true if it should be considered an "error
    * response", false otherwise.
    */
-  isChannelErrorResponse: function(channel) {
+  isChannelErrorResponse(channel) {
     // No valid document channel sounds like an error to me!
     if (!channel)
       return true;
     if (!(channel instanceof Ci.nsIHttpChannel))
       // it might be FTP etc, so assume it's ok.
       return false;
     try {
       return !channel.requestSucceeded;
--- a/toolkit/components/thumbnails/PageThumbs.jsm
+++ b/toolkit/components/thumbnails/PageThumbs.jsm
@@ -210,17 +210,17 @@ this.PageThumbs = {
    * @param aCanvas The canvas to draw to. The thumbnail will be scaled to match
    *   the dimensions of this canvas. If callers pass a 0x0 canvas, the canvas
    *   will be resized to default thumbnail dimensions just prior to painting.
    * @param aCallback (optional) A callback invoked once the thumbnail has been
    *   rendered to aCanvas.
    * @param aArgs (optional) Additional named parameters:
    *   fullScale - request that a non-downscaled image be returned.
    */
-  captureToCanvas: function(aBrowser, aCanvas, aCallback, aArgs) {
+  captureToCanvas(aBrowser, aCanvas, aCallback, aArgs) {
     let telemetryCaptureTime = new Date();
     let args = {
       fullScale: aArgs ? aArgs.fullScale : false
     };
     this._captureToCanvas(aBrowser, aCanvas, args, (aCanvas) => {
       Services.telemetry
               .getHistogramById("FX_THUMBNAILS_CAPTURE_TIME_MS")
               .add(new Date() - telemetryCaptureTime);
@@ -237,17 +237,17 @@ this.PageThumbs = {
    * transitory as it is based on current navigation state and the type of
    * content being displayed.
    *
    * @param aBrowser The target browser
    * @param aCallback(aResult) A callback invoked once security checks have
    *   completed. aResult is a boolean indicating the combined result of the
    *   security checks performed.
    */
-  shouldStoreThumbnail: function(aBrowser, aCallback) {
+  shouldStoreThumbnail(aBrowser, aCallback) {
     // Don't capture in private browsing mode.
     if (PrivateBrowsingUtils.isBrowserPrivate(aBrowser)) {
       aCallback(false);
       return;
     }
     if (aBrowser.isRemoteBrowser) {
       let mm = aBrowser.messageManager;
       let resultFunc = function(aMsg) {
@@ -266,17 +266,17 @@ this.PageThumbs = {
     } else {
       aCallback(PageThumbUtils.shouldStoreContentThumbnail(aBrowser.contentDocument,
                                                            aBrowser.docShell));
     }
   },
 
   // The background thumbnail service captures to canvas but doesn't want to
   // participate in this service's telemetry, which is why this method exists.
-  _captureToCanvas: function(aBrowser, aCanvas, aArgs, aCallback) {
+  _captureToCanvas(aBrowser, aCanvas, aArgs, aCallback) {
     if (aBrowser.isRemoteBrowser) {
       Task.spawn(function* () {
         let data =
           yield this._captureRemoteThumbnail(aBrowser, aCanvas.width,
                                              aCanvas.height, aArgs);
         let canvas = data.thumbnail;
         let ctx = canvas.getContext("2d");
         let imgData = ctx.getImageData(0, 0, canvas.width, canvas.height);
@@ -304,17 +304,17 @@ this.PageThumbs = {
    *
    * @param aBrowser The browser to capture a thumbnail from.
    * @param aWidth The desired canvas width.
    * @param aHeight The desired canvas height.
    * @param aArgs (optional) Additional named parameters:
    *   fullScale - request that a non-downscaled image be returned.
    * @return a promise
    */
-  _captureRemoteThumbnail: function(aBrowser, aWidth, aHeight, aArgs) {
+  _captureRemoteThumbnail(aBrowser, aWidth, aHeight, aArgs) {
     let deferred = Promise.defer();
 
     // The index we send with the request so we can identify the
     // correct response.
     let index = gRemoteThumbId++;
 
     // Thumbnail request response handler
     let mm = aBrowser.messageManager;
@@ -334,17 +334,17 @@ this.PageThumbs = {
         let image = doc.createElementNS(PageThumbUtils.HTML_NAMESPACE, "img");
         image.onload = function() {
           let thumbnail = doc.createElementNS(PageThumbUtils.HTML_NAMESPACE, "canvas");
           thumbnail.width = image.naturalWidth;
           thumbnail.height = image.naturalHeight;
           let ctx = thumbnail.getContext("2d");
           ctx.drawImage(image, 0, 0);
           deferred.resolve({
-            thumbnail: thumbnail
+            thumbnail
           });
         }
         image.src = reader.result;
       });
       // xxx wish there was a way to skip this encoding step
       reader.readAsDataURL(imageBlob);
     }
 
@@ -885,17 +885,17 @@ var PageThumbsHistoryObserver = {
   onDeleteURI: function Thumbnails_onDeleteURI(aURI, aGUID) {
     PageThumbsStorage.remove(aURI.spec);
   },
 
   onClearHistory: function Thumbnails_onClearHistory() {
     PageThumbsStorage.wipe();
   },
 
-  onTitleChanged: function() {},
-  onBeginUpdateBatch: function() {},
-  onEndUpdateBatch: function() {},
-  onVisit: function() {},
-  onPageChanged: function() {},
-  onDeleteVisits: function() {},
+  onTitleChanged() {},
+  onBeginUpdateBatch() {},
+  onEndUpdateBatch() {},
+  onVisit() {},
+  onPageChanged() {},
+  onDeleteVisits() {},
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver])
 };
--- a/toolkit/components/thumbnails/content/backgroundPageThumbsContent.js
+++ b/toolkit/components/thumbnails/content/backgroundPageThumbsContent.js
@@ -19,17 +19,17 @@ const STATE_CANCELED = 3;
  * This flag prevents content from creating new auxiliary browsing contexts,
  * e.g. using the target attribute, the window.open() method, or the
  * showModalDialog() method.
  */
 const SANDBOXED_AUXILIARY_NAVIGATION = 0x2;
 
 const backgroundPageThumbsContent = {
 
-  init: function() {
+  init() {
     Services.obs.addObserver(this, "document-element-inserted", true);
 
     // We want a low network priority for this service - lower than b/g tabs
     // etc - so set it to the lowest priority available.
     this._webNav.QueryInterface(Ci.nsIDocumentLoader).
       loadGroup.QueryInterface(Ci.nsISupportsPriority).
       priority = Ci.nsISupportsPriority.PRIORITY_LOWEST;
 
@@ -46,34 +46,34 @@ const backgroundPageThumbsContent = {
     addMessageListener("BackgroundPageThumbs:capture",
                        this._onCapture.bind(this));
     docShell.
       QueryInterface(Ci.nsIInterfaceRequestor).
       getInterface(Ci.nsIWebProgress).
       addProgressListener(this, Ci.nsIWebProgress.NOTIFY_STATE_WINDOW);
   },
 
-  observe: function(subj, topic, data) {
+  observe(subj, topic, data) {
     // Arrange to prevent (most) popup dialogs for this window - popups done
     // in the parent (eg, auth) aren't prevented, but alert() etc are.
     // disableDialogs only works on the current inner window, so it has
     // to be called every page load, but before scripts run.
     if (content && subj == content.document) {
       content.
         QueryInterface(Ci.nsIInterfaceRequestor).
         getInterface(Ci.nsIDOMWindowUtils).
         disableDialogs();
     }
   },
 
   get _webNav() {
     return docShell.QueryInterface(Ci.nsIWebNavigation);
   },
 
-  _onCapture: function(msg) {
+  _onCapture(msg) {
     this._nextCapture = {
       id: msg.data.id,
       url: msg.data.url,
     };
     if (this._currentCapture) {
       if (this._state == STATE_LOADING) {
         // Cancel the current capture.
         this._state = STATE_CANCELED;
@@ -81,17 +81,17 @@ const backgroundPageThumbsContent = {
       }
       // Let the current capture finish capturing, or if it was just canceled,
       // wait for onStateChange due to the about:blank load.
       return;
     }
     this._startNextCapture();
   },
 
-  _startNextCapture: function() {
+  _startNextCapture() {
     if (!this._nextCapture)
       return;
     this._currentCapture = this._nextCapture;
     delete this._nextCapture;
     this._state = STATE_LOADING;
     this._currentCapture.pageLoadStartDate = new Date();
 
     try {
@@ -100,17 +100,17 @@ const backgroundPageThumbsContent = {
                            null, null, null);
     } catch (e) {
       this._failCurrentCapture("BAD_URI");
       delete this._currentCapture;
       this._startNextCapture();
     }
   },
 
-  onStateChange: function(webProgress, req, flags, status) {
+  onStateChange(webProgress, req, flags, status) {
     if (webProgress.isTopLevel &&
         (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;
@@ -139,51 +139,51 @@ const backgroundPageThumbsContent = {
             this._loadAboutBlank();
             delete this._cancelTimer;
           }, 0, Ci.nsITimer.TYPE_ONE_SHOT);
         }
       }
     }
   },
 
-  _captureCurrentPage: function() {
+  _captureCurrentPage() {
     let capture = this._currentCapture;
     capture.finalURL = this._webNav.currentURI.spec;
     capture.pageLoadTime = new Date() - capture.pageLoadStartDate;
 
     let canvasDrawDate = new Date();
 
     let finalCanvas = PageThumbUtils.createSnapshotThumbnail(content, null);
     capture.canvasDrawTime = new Date() - canvasDrawDate;
 
     finalCanvas.toBlob(blob => {
       capture.imageBlob = new Blob([blob]);
       // Load about:blank to finish the capture and wait for onStateChange.
       this._loadAboutBlank();
     });
   },
 
-  _finishCurrentCapture: function() {
+  _finishCurrentCapture() {
     let capture = this._currentCapture;
     let fileReader = new FileReader();
     fileReader.onloadend = () => {
       sendAsyncMessage("BackgroundPageThumbs:didCapture", {
         id: capture.id,
         imageData: fileReader.result,
         finalURL: capture.finalURL,
         telemetry: {
           CAPTURE_PAGE_LOAD_TIME_MS: capture.pageLoadTime,
           CAPTURE_CANVAS_DRAW_TIME_MS: capture.canvasDrawTime,
         },
       });
     };
     fileReader.readAsArrayBuffer(capture.imageBlob);
   },
 
-  _failCurrentCapture: function(reason) {
+  _failCurrentCapture(reason) {
     let capture = this._currentCapture;
     sendAsyncMessage("BackgroundPageThumbs:didCapture", {
       id: capture.id,
       failReason: reason,
     });
   },
 
   // We load about:blank to finish all captures, even canceled captures.  Two
--- a/toolkit/components/thumbnails/test/head.js
+++ b/toolkit/components/thumbnails/test/head.js
@@ -35,17 +35,17 @@ function test() {
 
 /**
  * The test runner that controls the execution flow of our tests.
  */
 var TestRunner = {
   /**
    * Starts the test runner.
    */
-  run: function() {
+  run() {
     waitForExplicitFinish();
 
     SessionStore.promiseInitialized.then(function() {
       this._iter = runTests();
       if (this._iter) {
         this.next();
       } else {
         finish();
@@ -53,17 +53,17 @@ var TestRunner = {
     }.bind(this));
   },
 
   /**
    * Runs the next available test or finishes if there's no test left.
    * @param aValue This value will be passed to the yielder via the runner's
    *               iterator.
    */
-  next: function(aValue) {
+  next(aValue) {
     let obj = TestRunner._iter.next(aValue);
     if (obj.done) {
       finish();
       return;
     }
 
     let value = obj.value || obj;
     if (value && typeof value.then == "function") {
--- a/toolkit/components/thumbnails/test/thumbnails_crash_content_helper.js
+++ b/toolkit/components/thumbnails/test/thumbnails_crash_content_helper.js
@@ -9,21 +9,21 @@ Cu.import("resource://gre/modules/ctypes
 var crash = function() { // this will crash when called.
   let zero = new ctypes.intptr_t(8);
   let badptr = ctypes.cast(zero, ctypes.PointerType(ctypes.int32_t));
   badptr.contents
 };
 
 
 var TestHelper = {
-  init: function() {
+  init() {
     addMessageListener("thumbnails-test:crash", this);
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "thumbnails-test:crash":
         privateNoteIntentionalCrash();
         crash();
       break;
     }
   },
 }
--- a/toolkit/components/timermanager/nsUpdateTimerManager.js
+++ b/toolkit/components/timermanager/nsUpdateTimerManager.js
@@ -274,34 +274,34 @@ TimerManager.prototype = {
       this._cancelTimer();
     }
   },
 
   /**
    * Starts the timer, if necessary, and ensures that it will fire soon enough
    * to happen after time |interval| (in milliseconds).
    */
-  _ensureTimer: function(interval) {
+  _ensureTimer(interval) {
     if (!this._canEnsureTimer) {
       return;
     }
     if (!this._timer) {
       this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
       this._timer.initWithCallback(this, interval,
                                    Ci.nsITimer.TYPE_REPEATING_SLACK);
       this.lastTimerReset = Date.now();
     } else if (Date.now() + interval < this.lastTimerReset + this._timer.delay) {
       this._timer.delay = Math.max(this.lastTimerReset + interval - Date.now(), 0);
     }
   },
 
   /**
    * Stops the timer, if it is running.
    */
-  _cancelTimer: function() {
+  _cancelTimer() {
     if (this._timer) {
       this._timer.cancel();
       this._timer = null;
     }
   },
 
   /**
    * See nsIUpdateTimerManager.idl
@@ -318,19 +318,19 @@ TimerManager.prototype = {
     let lastUpdateTime = getPref("getIntPref", prefLastUpdate, 0);
     let now = Math.round(Date.now() / 1000);
     if (lastUpdateTime > now) {
       lastUpdateTime = 0;
     }
     if (lastUpdateTime == 0) {
       Services.prefs.setIntPref(prefLastUpdate, lastUpdateTime);
     }
-    this._timers[id] = {callback: callback,
-                        interval: interval,
-                        lastUpdateTime: lastUpdateTime};
+    this._timers[id] = {callback,
+                        interval,
+                        lastUpdateTime};
 
     this._ensureTimer(interval * 1000);
   },
 
   classID: Components.ID("{B322A5C0-A419-484E-96BA-D7182163899F}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIUpdateTimerManager,
                                          Ci.nsITimerCallback,
                                          Ci.nsIObserver])
--- a/toolkit/components/viewconfig/content/config.js
+++ b/toolkit/components/viewconfig/content/config.js
@@ -35,54 +35,54 @@ var gPrefView = gPrefArray; // share the
 var gSortedColumn = "prefCol";
 var gSortFunction = null;
 var gSortDirection = 1; // 1 is ascending; -1 is descending
 var gConfigBundle = null;
 var gFilter = null;
 
 var view = {
   get rowCount() { return gPrefView.length; },
-  getCellText : function(index, col) {
+  getCellText(index, col) {
     if (!(index in gPrefView))
       return "";
 
     var value = gPrefView[index][col.id];
 
     switch (col.id) {
       case "lockCol":
         return gLockStrs[value];
       case "typeCol":
         return gTypeStrs[value];
       default:
         return value;
     }
   },
-  getRowProperties : function(index) { return ""; },
-  getCellProperties : function(index, col) {
+  getRowProperties(index) { return ""; },
+  getCellProperties(index, col) {
     if (index in gPrefView)
       return gLockProps[gPrefView[index].lockCol];
 
     return "";
   },
-  getColumnProperties : function(col) { return ""; },
+  getColumnProperties(col) { return ""; },
   treebox : null,
   selection : null,
-  isContainer : function(index) { return false; },
-  isContainerOpen : function(index) { return false; },
-  isContainerEmpty : function(index) { return false; },
-  isSorted : function() { return true; },
-  canDrop : function(index, orientation) { return false; },
-  drop : function(row, orientation) {},
-  setTree : function(out) { this.treebox = out; },
-  getParentIndex: function(rowIndex) { return -1; },
-  hasNextSibling: function(rowIndex, afterIndex) { return false; },
-  getLevel: function(index) { return 1; },
-  getImageSrc: function(row, col) { return ""; },
-  toggleOpenState : function(index) {},
-  cycleHeader: function(col) {
+  isContainer(index) { return false; },
+  isContainerOpen(index) { return false; },
+  isContainerEmpty(index) { return false; },
+  isSorted() { return true; },
+  canDrop(index, orientation) { return false; },
+  drop(row, orientation) {},
+  setTree(out) { this.treebox = out; },
+  getParentIndex(rowIndex) { return -1; },
+  hasNextSibling(rowIndex, afterIndex) { return false; },
+  getLevel(index) { return 1; },
+  getImageSrc(row, col) { return ""; },
+  toggleOpenState(index) {},
+  cycleHeader(col) {
     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;
@@ -103,26 +103,26 @@ var view = {
     }
     col.element.setAttribute("sortDirection", gSortDirection > 0 ? "ascending" : "descending");
     this.treebox.invalidate();
     if (index >= 0) {
       this.selection.select(index);
       this.treebox.ensureRowIsVisible(index);
     }
   },
-  selectionChanged : function() {},
-  cycleCell: function(row, col) {},
-  isEditable: function(row, col) { return false; },
-  isSelectable: function(row, col) { return false; },
-  setCellValue: function(row, col, value) {},
-  setCellText: function(row, col, value) {},
-  performAction: function(action) {},
-  performActionOnRow: function(action, row) {},
-  performActionOnCell: function(action, row, col) {},
-  isSeparator: function(index) { return false; }
+  selectionChanged() {},
+  cycleCell(row, col) {},
+  isEditable(row, col) { return false; },
+  isSelectable(row, col) { return false; },
+  setCellValue(row, col, value) {},
+  setCellText(row, col, value) {},
+  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)
 {
   var low = -1, high = gPrefView.length;
   var index = (low + high) >> 1;
@@ -183,17 +183,17 @@ function getNearestIndexOfPref(pref)
       high = index;
     index = (low + high) >> 1;
   }
   return high;
 }
 
 var gPrefListener =
 {
-  observe: function(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;
--- a/toolkit/components/viewsource/content/viewSource-content.js
+++ b/toolkit/components/viewsource/content/viewSource-content.js
@@ -444,18 +444,18 @@ var ViewSourceContent = {
       this.selectionListenerAttached = false;
     }
     sendAsyncMessage("ViewSource:SourceUnloaded");
   },
 
   onContextMenu(event) {
     let addonInfo = {};
     let subject = {
-      event: event,
-      addonInfo: addonInfo,
+      event,
+      addonInfo,
     };
 
     subject.wrappedJSObject = subject;
     Services.obs.notifyObservers(subject, "content-contextmenu", null);
 
     let node = event.target;
 
     let result = {
--- a/toolkit/components/viewsource/content/viewSource.js
+++ b/toolkit/components/viewsource/content/viewSource.js
@@ -436,17 +436,17 @@ ViewSourceChrome.prototype = {
    */
   onSetCharacterSet(event) {
     if (event.target.hasAttribute("charset")) {
       let charset = event.target.getAttribute("charset");
 
       // If we don't have history enabled, we have to do a reload in order to
       // show the character set change. See bug 136322.
       this.sendAsyncMessage("ViewSource:SetCharacterSet", {
-        charset: charset,
+        charset,
         doPageLoad: this.historyEnabled,
       });
 
       if (!this.historyEnabled) {
         this.browser
             .reloadWithFlags(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
       }
     }
--- a/toolkit/components/viewsource/content/viewSourceUtils.js
+++ b/toolkit/components/viewsource/content/viewSourceUtils.js
@@ -54,17 +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: function(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);
     }
@@ -86,17 +86,17 @@ var gViewSourceUtils = {
    *          source of. This is required if outerWindowID is passed.
    *        outerWindowID (optional):
    *          The outerWindowID of the content window containing the document that
    *          we want to view the source of. Pass this if you want to attempt to
    *          load the document source out of the network cache.
    *        lineNumber (optional):
    *          The line number to focus on once the source is loaded.
    */
-  viewSourceInBrowser: function(aArgs) {
+  viewSourceInBrowser(aArgs) {
     Services.telemetry
             .getHistogramById("VIEW_SOURCE_IN_BROWSER_OPENED_BOOLEAN")
             .add(true);
     let viewSourceBrowser = new ViewSourceBrowser(aArgs.viewSourceBrowser);
     viewSourceBrowser.loadViewSource(aArgs);
   },
 
   /**
@@ -107,17 +107,17 @@ var gViewSourceUtils = {
    * @param aViewSourceInBrowser
    *        The browser containing the page to view the source of.
    * @param aTarget
    *        Set to the target node for MathML. Null for other types of elements.
    * @param aGetBrowserFn
    *        If set, a function that will return a browser to open the source in.
    *        If null, or this function returns null, opens the source in a new window.
    */
-  viewPartialSourceInBrowser: function(aViewSourceInBrowser, aTarget, aGetBrowserFn) {
+  viewPartialSourceInBrowser(aViewSourceInBrowser, aTarget, aGetBrowserFn) {
     let mm = aViewSourceInBrowser.messageManager;
     mm.addMessageListener("ViewSource:GetSelectionDone", function gotSelection(message) {
       mm.removeMessageListener("ViewSource:GetSelectionDone", gotSelection);
 
       if (!message.data)
         return;
 
       let browserToOpenIn = aGetBrowserFn ? aGetBrowserFn() : null;
@@ -137,17 +137,17 @@ var gViewSourceUtils = {
                           });
       }
     });
 
     mm.sendAsyncMessage("ViewSource:GetSelection", { }, { target: aTarget });
   },
 
   // Opens the interval view source viewer
-  _openInInternalViewer: function(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.");
       }
@@ -166,17 +166,17 @@ var gViewSourceUtils = {
             .getHistogramById("VIEW_SOURCE_IN_WINDOW_OPENED_BOOLEAN")
             .add(true);
     openDialog("chrome://global/content/viewSource.xul",
                "_blank",
                "all,dialog=no",
                aArgsOrURL, charset, aPageDescriptor, aLineNumber, isForcedCharset);
   },
 
-  buildEditorArgs: function(aPath, aLineNumber) {
+  buildEditorArgs(aPath, aLineNumber) {
     // Determine the command line arguments to pass to the editor.
     // We currently support a %LINE% placeholder which is set to the passed
     // line number (or to 0 if there's none)
     var editorArgs = [];
     var prefs = Components.classes["@mozilla.org/preferences-service;1"]
                           .getService(Components.interfaces.nsIPrefBranch);
     var args = prefs.getCharPref("view_source.editor.args");
     if (args) {
@@ -222,17 +222,17 @@ var gViewSourceUtils = {
    *        The line number to focus on once the source is loaded.
    * @param aCallBack
    *        A function accepting two arguments:
    *          * result (true = success)
    *          * data object
    *        The function defaults to opening an internal viewer if external
    *        viewing fails.
    */
-  openInExternalEditor: function(aArgsOrURL, aPageDescriptor, aDocument,
+  openInExternalEditor(aArgsOrURL, aPageDescriptor, aDocument,
                                  aLineNumber, aCallBack) {
     let data;
     if (typeof aArgsOrURL == "string") {
       Deprecated.warning("The arguments you're passing to " +
                          "openInExternalEditor are using an out-of-date API.",
                          "https://developer.mozilla.org/en-US/Add-ons/" +
                          "Code_snippets/View_Source_for_XUL_Applications");
       if (Components.utils.isCrossProcessWrapper(aDocument)) {
@@ -338,39 +338,39 @@ 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: function(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: function(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: function()
+  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']
@@ -385,39 +385,39 @@ var gViewSourceUtils = {
 
     return null;
   },
 
   viewSourceProgressListener: {
 
     mnsIWebProgressListener: Components.interfaces.nsIWebProgressListener,
 
-    QueryInterface: function(aIID) {
+    QueryInterface(aIID) {
      if (aIID.equals(this.mnsIWebProgressListener) ||
          aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
          aIID.equals(Components.interfaces.nsISupports))
        return this;
      throw Components.results.NS_NOINTERFACE;
     },
 
-    destroy: function() {
+    destroy() {
       if (this.webShell) {
         this.webShell.QueryInterface(Components.interfaces.nsIBaseWindow).destroy();
       }
       this.webShell = null;
       this.editor = null;
       this.callBack = null;
       this.data = null;
       this.file = null;
     },
 
     // This listener is used both for tracking the progress of an HTML parse
     // in one case and for tracking the progress of nsIWebBrowserPersist in
     // another case.
-    onStateChange: function(aProgress, aRequest, aFlag, aStatus) {
+    onStateChange(aProgress, aRequest, aFlag, aStatus) {
       // once it's done loading...
       if ((aFlag & this.mnsIWebProgressListener.STATE_STOP) && aStatus == 0) {
         if (!this.webShell) {
           // We aren't waiting for the parser. Instead, we are waiting for
           // an nsIWebBrowserPersist.
           this.onContentLoaded();
           return 0;
         }
@@ -428,17 +428,17 @@ var gViewSourceUtils = {
         } else {
           webNavigation.document.addEventListener("DOMContentLoaded",
                                                   this.onContentLoaded.bind(this));
         }
       }
       return 0;
     },
 
-    onContentLoaded: function() {
+    onContentLoaded() {
       // The progress listener may call this multiple times, so be sure we only
       // run once.
       if (this.contentLoaded) {
         return;
       }
       try {
         if (!this.file) {
           // it's not saved to file yet, it's in the webshell
@@ -485,30 +485,30 @@ var gViewSourceUtils = {
         // we failed loading it with the external editor.
         Components.utils.reportError(ex);
         gViewSourceUtils.handleCallBack(this.callBack, false, this.data);
       } finally {
         this.destroy();
       }
     },
 
-    onLocationChange: function() { return 0; },
-    onProgressChange: function() { return 0; },
-    onStatusChange: function() { return 0; },
-    onSecurityChange: function() { return 0; },
+    onLocationChange() { return 0; },
+    onProgressChange() { return 0; },
+    onStatusChange() { return 0; },
+    onSecurityChange() { return 0; },
 
     webShell: null,
     editor: null,
     callBack: null,
     data: null,
     file: null
   },
 
   // returns an nsIFile for the passed document in the system temp directory
-  getTemporaryFile: function(aURI, aDocument, aContentType) {
+  getTemporaryFile(aURI, aDocument, aContentType) {
     // include contentAreaUtils.js in our own context when we first need it
     if (!this._caUtils) {
       var scriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
                                    .getService(Components.interfaces.mozIJSSubScriptLoader);
       this._caUtils = {};
       scriptLoader.loadSubScript("chrome://global/content/contentAreaUtils.js", this._caUtils);
     }
 
--- a/toolkit/components/viewsource/test/browser/browser_contextmenu.js
+++ b/toolkit/components/viewsource/test/browser/browser_contextmenu.js
@@ -73,17 +73,17 @@ function* onViewSourceWindowOpen(aWindow
   expectedData.push(["a[href]", true, false, "http://example.com/"]);
   expectedData.push(["a[href^=mailto]", false, true, "abc@def.ghi"]);
   expectedData.push(["span", false, false, null]);
 }
 
 function* checkMenuItems(contextMenu, isTab, selector, copyLinkExpected, copyEmailExpected, expectedClipboardContent) {
 
   let browser = isTab ? gBrowser.selectedBrowser : gViewSourceWindow.gBrowser;
-  yield ContentTask.spawn(browser, { selector: selector }, function* (arg) {
+  yield ContentTask.spawn(browser, { selector }, function* (arg) {
     content.document.querySelector(arg.selector).scrollIntoView();
   });
 
   let popupShownPromise = BrowserTestUtils.waitForEvent(contextMenu, "popupshown");
   yield BrowserTestUtils.synthesizeMouseAtCenter(selector,
           { type: "contextmenu", button: 2}, browser);
   yield popupShownPromise;
 
--- a/toolkit/components/viewsource/test/browser/head.js
+++ b/toolkit/components/viewsource/test/browser/head.js
@@ -22,17 +22,17 @@ function openViewSourceWindow(aURI, aCal
 function loadViewSourceWindow(URL) {
   return new Promise((resolve) => {
     openViewSourceWindow(URL, resolve);
   })
 }
 
 function closeViewSourceWindow(aWindow, aCallback) {
   Services.wm.addListener({
-    onCloseWindow: function() {
+    onCloseWindow() {
       Services.wm.removeListener(this);
       executeSoon(aCallback);
     }
   });
   aWindow.close();
 }
 
 function testViewSourceWindow(aURI, aTestCallback, aCloseCallback) {
--- a/toolkit/components/workerloader/require.js
+++ b/toolkit/components/workerloader/require.js
@@ -61,28 +61,28 @@
 
     /**
      * A human-readable version of |stack|.
      *
      * @type {string}
      */
     Object.defineProperty(Error.prototype, "moduleStack",
     {
-      get: function() {
+      get() {
         return this.stack;
       }
     });
     /**
      * A human-readable version of |fileName|.
      *
      * @type {string}
      */
     Object.defineProperty(Error.prototype, "moduleName",
     {
-      get: function() {
+      get() {
         let match = this.stack.match(/\@(.*):.*:/);
         if (match) {
           return match[1];
         }
         return "(unknown module)";
       }
     });
 
@@ -105,18 +105,18 @@
       }
 
       // Exports provided by the module
       let exports = Object.create(null);
 
       // Identification of the module
       let module = {
         id: path,
-        uri: uri,
-        exports: exports
+        uri,
+        exports
       };
 
       // Make module available immediately
       // (necessary in case of circular dependencies)
       if (modules.has(path)) {
         return modules.get(path).exports;
       }
       modules.set(path, module);
--- a/toolkit/components/workerloader/tests/utils_worker.js
+++ b/toolkit/components/workerloader/tests/utils_worker.js
@@ -14,19 +14,19 @@ function finish() {
 }
 
 function ok(condition, description) {
   send({kind: "ok", condition: !!condition, description: "" + description});
 }
 
 function is(a, b, description) {
   let outcome = a == b; // Need to decide outcome here, as not everything can be serialized
-  send({kind: "is", outcome: outcome, description: "" + description, a: "" + a, b: "" + b});
+  send({kind: "is", outcome, description: "" + description, a: "" + a, b: "" + b});
 }
 
 function isnot(a, b, description) {
   let outcome = a != b; // Need to decide outcome here, as not everything can be serialized
-  send({kind: "isnot", outcome: outcome, description: "" + description, a: "" + a, b: "" + b});
+  send({kind: "isnot", outcome, description: "" + description, a: "" + a, b: "" + b});
 }
 
 function info(description) {
   send({kind: "info", description: "" + description});
 }
--- a/toolkit/components/xulstore/XULStore.js
+++ b/toolkit/components/xulstore/XULStore.js
@@ -55,47 +55,47 @@ XULStore.prototype = {
    *  }
    */
   _data: {},
   _storeFile: null,
   _needsSaving: false,
   _saveAllowed: true,
   _writeTimer: Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer),
 
-  load: function() {
+  load() {
     Services.obs.addObserver(this, "profile-before-change", true);
 
     this._storeFile = Services.dirsvc.get("ProfD", Ci.nsIFile);
     this._storeFile.append(STOREDB_FILENAME);
 
     if (!this._storeFile.exists()) {
       this.import();
     } else {
       this.readFile();
     }
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     this.writeFile();
     if (topic == "profile-before-change") {
       this._saveAllowed = false;
     }
   },
 
   /*
    * Internal function for logging debug messages to the Error Console window
    */
-  log: function(message) {
+  log(message) {
     if (!debugMode)
       return;
     dump("XULStore: " + message + "\n");
     Services.console.logStringMessage("XULStore: " + message);
   },
 
-  import: function() {
+  import() {
     let localStoreFile = Services.dirsvc.get("ProfD", Ci.nsIFile);
 
     localStoreFile.append("localstore.rdf");
     if (!localStoreFile.exists()) {
       return;
     }
 
     const RDF = Cc["@mozilla.org/rdf/rdf-service;1"].getService(Ci.nsIRDFService);
@@ -137,17 +137,17 @@ XULStore.prototype = {
 
         if (value instanceof Ci.nsIRDFLiteral) {
           this.setValue(docURI, id, attr.ValueUTF8, value.Value);
         }
       }
     }
   },
 
-  readFile: function() {
+  readFile() {
     const MODE_RDONLY = 0x01;
     const FILE_PERMS  = 0o600;
 
     let stream = Cc["@mozilla.org/network/file-input-stream;1"].
                  createInstance(Ci.nsIFileInputStream);
     let json = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
     try {
       stream.init(this._storeFile, MODE_RDONLY, FILE_PERMS, 0);
@@ -176,28 +176,28 @@ XULStore.prototype = {
       yield OS.File.writeAtomic(this._storeFile.path, data,
                               { tmpPath: this._storeFile.path + ".tmp" });
     } catch (e) {
       this.log("Failed to write xulstore.json: " + e);
       throw e;
     }
   }),
 
-  markAsChanged: function() {
+  markAsChanged() {
     if (this._needsSaving || !this._storeFile)
       return;
 
     // Don't write the file more than once every 30 seconds.
     this._needsSaving = true;
     this._writeTimer.init(this, WRITE_DELAY_MS, Ci.nsITimer.TYPE_ONE_SHOT);
   },
 
   /* ---------- interface implementation ---------- */
 
-  setValue: function(docURI, id, attr, value) {
+  setValue(docURI, id, attr, value) {
     this.log("Saving " + attr + "=" + value + " for id=" + id + ", doc=" + docURI);
 
     if (!this._saveAllowed) {
       Services.console.logStringMessage("XULStore: Changes after profile-before-change are ignored!");
       return;
     }
 
     // bug 319846 -- don't save really long attributes or values.
@@ -224,45 +224,45 @@ XULStore.prototype = {
     if (attr in obj && obj[attr] == value)
       return;
 
     obj[attr] = value; // IE, this._data[docURI][id][attr] = value;
 
     this.markAsChanged();
   },
 
-  hasValue: function(docURI, id, attr) {
+  hasValue(docURI, id, attr) {
     this.log("has store value for id=" + id + ", attr=" + attr + ", doc=" + docURI);
 
     let ids = this._data[docURI];
     if (ids) {
       let attrs = ids[id];
       if (attrs) {
         return attr in attrs;
       }
     }
 
     return false;
   },
 
-  getValue: function(docURI, id, attr) {
+  getValue(docURI, id, attr) {
     this.log("get store value for id=" + id + ", attr=" + attr + ", doc=" + docURI);
 
     let ids = this._data[docURI];
     if (ids) {
       let attrs = ids[id];
       if (attrs) {
         return attrs[attr] || "";
       }
     }
 
     return "";
   },
 
-  removeValue: function(docURI, id, attr) {
+  removeValue(docURI, id, attr) {
     this.log("remove store value for id=" + id + ", attr=" + attr + ", doc=" + docURI);
 
     if (!this._saveAllowed) {
       Services.console.logStringMessage("XULStore: Changes after profile-before-change are ignored!");
       return;
     }
 
     let ids = this._data[docURI];
@@ -279,34 +279,34 @@ XULStore.prototype = {
           }
         }
 
         this.markAsChanged();
       }
     }
   },
 
-  getIDsEnumerator: function(docURI) {
+  getIDsEnumerator(docURI) {
     this.log("Getting ID enumerator for doc=" + docURI);
 
     if (!(docURI in this._data))
       return new nsStringEnumerator([]);
 
     let result = [];
     let ids = this._data[docURI];
     if (ids) {
       for (let id in this._data[docURI]) {
         result.push(id);
       }
     }
 
     return new nsStringEnumerator(result);
   },
 
-  getAttributeEnumerator: function(docURI, id) {
+  getAttributeEnumerator(docURI, id) {
     this.log("Getting attribute enumerator for id=" + id + ", doc=" + docURI);
 
     if (!(docURI in this._data) || !(id in this._data[docURI]))
       return new nsStringEnumerator([]);
 
     let attrs = [];
     for (let attr in this._data[docURI][id]) {
       attrs.push(attr);
@@ -318,19 +318,19 @@ XULStore.prototype = {
 
 function nsStringEnumerator(items) {
   this._items = items;
 }
 
 nsStringEnumerator.prototype = {
   QueryInterface : XPCOMUtils.generateQI([Ci.nsIStringEnumerator]),
   _nextIndex : 0,
-  hasMore: function() {
+  hasMore() {
     return this._nextIndex < this._items.length;
   },
-  getNext : function() {
+  getNext() {
     if (!this.hasMore())
       throw Cr.NS_ERROR_NOT_AVAILABLE;
     return this._items[this._nextIndex++];
   },
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([XULStore]);
--- a/toolkit/content/aboutProfiles.js
+++ b/toolkit/content/aboutProfiles.js
@@ -62,17 +62,17 @@ function refreshUI() {
     defaultProfile = ProfileService.defaultProfile;
   } catch (e) {}
 
   let currentProfile = findCurrentProfile() || defaultProfile;
 
   let iter = ProfileService.profiles;
   while (iter.hasMoreElements()) {
     let profile = iter.getNext().QueryInterface(Ci.nsIToolkitProfile);
-    display({ profile: profile,
+    display({ profile,
               isDefault: profile == defaultProfile,
               isCurrentProfile: profile == currentProfile });
   }
 
   let createButton = document.getElementById('create-button');
   createButton.onclick = createProfileWizard;
 
   let restartSafeModeButton = document.getElementById('restart-in-safe-mode-button');
--- a/toolkit/content/aboutServiceWorkers.js
+++ b/toolkit/content/aboutServiceWorkers.js
@@ -147,26 +147,26 @@ function display(info, pushService) {
 
   let loadingMessage = document.createElement('span');
   loadingMessage.appendChild(document.createTextNode(bundle.GetStringFromName('waiting')));
   loadingMessage.classList.add('inactive');
   div.appendChild(loadingMessage);
 
   unregisterButton.onclick = function() {
     let cb = {
-      unregisterSucceeded: function() {
+      unregisterSucceeded() {
         parent.removeChild(div);
 
         if (!--gSWCount) {
          let div = document.getElementById("warning_no_serviceworkers");
          div.classList.add("active");
         }
       },
 
-      unregisterFailed: function() {
+      unregisterFailed() {
         alert(bundle.GetStringFromName('unregisterError'));
       },
 
       QueryInterface: XPCOMUtils.generateQI([Ci.nsIServiceWorkerUnregisterCallback])
     };
 
     loadingMessage.classList.remove('inactive');
     gSWM.propagateUnregister(info.principal, cb, info.scope);
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -751,17 +751,17 @@ function createTextForElement(elem) {
   return text;
 }
 
 function Serializer() {
 }
 
 Serializer.prototype = {
 
-  serialize: function(rootElem) {
+  serialize(rootElem) {
     this._lines = [];
     this._startNewLine();
     this._serializeElement(rootElem);
     this._startNewLine();
     return this._lines.join("\n").trim() + "\n";
   },
 
   // The current line is always the line that writing will start at next.  When
@@ -770,17 +770,17 @@ Serializer.prototype = {
   get _currentLine() {
     return this._lines.length ? this._lines[this._lines.length - 1] : null;
   },
 
   set _currentLine(val) {
     return this._lines[this._lines.length - 1] = val;
   },
 
-  _serializeElement: function(elem) {
+  _serializeElement(elem) {
     if (this._ignoreElement(elem))
       return;
 
     // table
     if (elem.localName == "table") {
       this._serializeTable(elem);
       return;
     }
@@ -812,37 +812,37 @@ Serializer.prototype = {
       let display = window.getComputedStyle(elem).getPropertyValue("display");
       if (display == "block") {
         this._startNewLine();
         this._startNewLine();
       }
     }
   },
 
-  _startNewLine: function(lines) {
+  _startNewLine(lines) {
     let currLine = this._currentLine;
     if (currLine) {
       // The current line is not empty.  Trim it.
       this._currentLine = currLine.trim();
       if (!this._currentLine)
         // The current line became empty.  Discard it.
         this._lines.pop();
     }
     this._lines.push("");
   },
 
-  _appendText: function(text, lines) {
+  _appendText(text, lines) {
     this._currentLine += text;
   },
 
-  _isHiddenSubHeading: function(th) {
+  _isHiddenSubHeading(th) {
     return th.parentNode.parentNode.style.display == "none";
   },
 
-  _serializeTable: function(table) {
+  _serializeTable(table) {
     // Collect the table's column headings if in fact there are any.  First
     // check thead.  If there's no thead, check the first tr.
     let colHeadings = {};
     let tableHeadingElem = table.querySelector("thead");
     if (!tableHeadingElem)
       tableHeadingElem = table.querySelector("tr");
     if (tableHeadingElem) {
       let tableHeadingCols = tableHeadingElem.querySelectorAll("th,td");
@@ -912,21 +912,21 @@ Serializer.prototype = {
           this._appendText(rowHeading + ": " + this._nodeText(children[1]).trim());
         }
       }
       this._startNewLine();
     }
     this._startNewLine();
   },
 
-  _ignoreElement: function(elem) {
+  _ignoreElement(elem) {
     return elem.classList.contains("no-copy");
   },
 
-  _nodeText: function(node) {
+  _nodeText(node) {
     return node.textContent.replace(/\s+/g, " ");
   },
 };
 
 function openProfileDirectory() {
   // Get the profile directory.
   let currProfD = Services.dirsvc.get("ProfD", Ci.nsIFile);
   let profileDir = currProfD.path;
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -218,17 +218,17 @@ var Settings = {
     {
       pref: PREF_TELEMETRY_ENABLED,
       defaultPrefValue: false,
       descriptionEnabledId: "description-extended-recording-enabled",
       descriptionDisabledId: "description-extended-recording-disabled",
     },
   ],
 
-  attachObservers: function() {
+  attachObservers() {
     for (let s of this.SETTINGS) {
       let setting = s;
       Preferences.observe(setting.pref, this.render, this);
     }
 
     let elements = document.getElementsByClassName("change-data-choices-link");
     for (let el of elements) {
       el.addEventListener("click", function() {
@@ -242,26 +242,26 @@ var Settings = {
           // Show the data choices preferences on desktop.
           let mainWindow = getMainWindowWithPreferencesPane();
           mainWindow.openAdvancedPreferences("dataChoicesTab");
         }
       }, false);
     }
   },
 
-  detachObservers: function() {
+  detachObservers() {
     for (let setting of this.SETTINGS) {
       Preferences.ignore(setting.pref, this.render, this);
     }
   },
 
   /**
    * Updates the button & text at the top of the page to reflect Telemetry state.
    */
-  render: function() {
+  render() {
     for (let setting of this.SETTINGS) {
       let enabledElement = document.getElementById(setting.descriptionEnabledId);
       let disabledElement = document.getElementById(setting.descriptionDisabledId);
 
       if (Preferences.get(setting.pref, setting.defaultPrefValue)) {
         enabledElement.classList.remove("hidden");
         disabledElement.classList.add("hidden");
       } else {
@@ -272,17 +272,17 @@ var Settings = {
   }
 };
 
 var PingPicker = {
   viewCurrentPingData: null,
   viewStructuredPingData: null,
   _archivedPings: null,
 
-  attachObservers: function() {
+  attachObservers() {
     let elements = document.getElementsByName("choose-ping-source");
     for (let el of elements) {
       el.addEventListener("change", () => this.onPingSourceChanged(), false);
     }
 
     let displays = document.getElementsByName("choose-ping-display");
     for (let el of displays) {
       el.addEventListener("change", () => this.onPingDisplayChanged(), false);
@@ -307,21 +307,21 @@ var PingPicker = {
     document.getElementById("choose-payload")
             .addEventListener("change", () => displayPingData(gPingData), false);
     document.getElementById("histograms-processes")
             .addEventListener("change", () => displayPingData(gPingData), false);
     document.getElementById("keyed-histograms-processes")
             .addEventListener("change", () => displayPingData(gPingData), false);
   },
 
-  onPingSourceChanged: function() {
+  onPingSourceChanged() {
     this.update();
   },
 
-  onPingDisplayChanged: function() {
+  onPingDisplayChanged() {
     this.update();
   },
 
   update: Task.async(function*() {
     let viewCurrent = document.getElementById("ping-source-current").checked;
     let viewStructured = document.getElementById("ping-source-structured").checked;
     let currentChanged = viewCurrent !== this.viewCurrentPingData;
     let structuredChanged = viewStructured !== this.viewStructuredPingData;
@@ -350,26 +350,26 @@ var PingPicker = {
       if (this.viewStructuredPingData) {
         this._showStructuredPingData();
       } else {
         this._showRawPingData();
       }
     }
   }),
 
-  _updateCurrentPingData: function() {
+  _updateCurrentPingData() {
     const subsession = document.getElementById("show-subsession-data").checked;
     const ping = TelemetryController.getCurrentPingData(subsession);
     if (!ping) {
       return;
     }
     displayPingData(ping, true);
   },
 
-  _updateArchivedPingData: function() {
+  _updateArchivedPingData() {
     let id = this._getSelectedPingId();
     return TelemetryArchive.promiseArchivedPingById(id)
                            .then((ping) => displayPingData(ping, true));
   },
 
   _updateArchivedPingList: Task.async(function*(pingList) {
     // The archived ping list is sorted in ascending timestamp order,
     // but descending is more practical for the operations we do here.
@@ -405,37 +405,37 @@ var PingPicker = {
     // Render the archive data.
     this._renderWeeks();
     this._renderPingList();
 
     // Update the displayed ping.
     yield this._updateArchivedPingData();
   }),
 
-  _renderWeeks: function() {
+  _renderWeeks() {
     let weekSelector = document.getElementById("choose-ping-week");
     removeAllChildNodes(weekSelector);
 
     for (let week of this._weeks) {
       let text = shortDateString(week.startDate)
                  + " - " + shortDateString(yesterday(week.endDate));
 
       let option = document.createElement("option");
       let content = document.createTextNode(text);
       option.appendChild(content);
       weekSelector.appendChild(option);
     }
   },
 
-  _getSelectedWeek: function() {
+  _getSelectedWeek() {
     let weekSelector = document.getElementById("choose-ping-week");
     return this._weeks[weekSelector.selectedIndex];
   },
 
-  _renderPingList: function(id = null) {
+  _renderPingList(id = null) {
     let pingSelector = document.getElementById("choose-ping-id");
     removeAllChildNodes(pingSelector);
 
     let weekRange = this._getSelectedWeek();
     let pings = this._archivedPings.filter(
       (p) => p.timestampCreated >= weekRange.startDate.getTime() &&
              p.timestampCreated < weekRange.endDate.getTime());
 
@@ -451,54 +451,54 @@ var PingPicker = {
       option.setAttribute("value", p.id);
       if (id && p.id == id) {
         option.selected = true;
       }
       pingSelector.appendChild(option);
     }
   },
 
-  _getSelectedPingId: function() {
+  _getSelectedPingId() {
     let pingSelector = document.getElementById("choose-ping-id");
     let selected = pingSelector.selectedOptions.item(0);
     return selected.getAttribute("value");
   },
 
-  _movePingIndex: function(offset) {
+  _movePingIndex(offset) {
     const id = this._getSelectedPingId();
     const index = this._archivedPings.findIndex((p) => p.id == id);
     const newIndex = Math.min(Math.max(index + offset, 0), this._archivedPings.length - 1);
     const ping = this._archivedPings[newIndex];
 
     const weekIndex = this._weeks.findIndex(
       (week) => ping.timestampCreated >= week.startDate.getTime() &&
                 ping.timestampCreated < week.endDate.getTime());
     const options = document.getElementById("choose-ping-week").options;
     options.item(weekIndex).selected = true;
 
     this._renderPingList(ping.id);
     this._updateArchivedPingData();
   },
 
-  _showRawPingData: function() {
+  _showRawPingData() {
     document.getElementById("raw-ping-data-section").classList.remove("hidden");
     document.getElementById("structured-ping-data-section").classList.add("hidden");
   },
 
-  _showStructuredPingData: function() {
+  _showStructuredPingData() {
     document.getElementById("raw-ping-data-section").classList.add("hidden");
     document.getElementById("structured-ping-data-section").classList.remove("hidden");
   },
 };
 
 var GeneralData = {
   /**
    * Renders the general data
    */
-  render: function(aPing) {
+  render(aPing) {
     setHasData("general-data-section", true);
     let table = document.createElement("table");
 
     let caption = document.createElement("caption");
     let captionString = bundle.GetStringFromName("generalDataTitle");
     caption.appendChild(document.createTextNode(captionString + "\n"));
     table.appendChild(caption);
 
@@ -525,29 +525,29 @@ var GeneralData = {
 
   /**
    * Helper function for appending a column to the data table.
    *
    * @param aRowElement Parent row element
    * @param aColType Column's tag name
    * @param aColText Column contents
    */
-  appendColumn: function(aRowElement, aColType, aColText) {
+  appendColumn(aRowElement, aColType, aColText) {
     let colElement = document.createElement(aColType);
     let colTextElement = document.createTextNode(aColText);
     colElement.appendChild(colTextElement);
     aRowElement.appendChild(colElement);
   },
 };
 
 var EnvironmentData = {
   /**
    * Renders the environment data
    */
-  render: function(ping) {
+  render(ping) {
     let dataDiv = document.getElementById("environment-data");
     removeAllChildNodes(dataDiv);
     const hasData = !!ping.environment;
     setHasData("environment-data-section", hasData);
     if (!hasData) {
       return;
     }
 
@@ -572,17 +572,17 @@ var EnvironmentData = {
       this.createSubsection(section, hasData, table, dataDiv);
     }
 
     // We use specialized rendering here to make the addon and plugin listings
     // more readable.
     this.createAddonSection(dataDiv, ping);
   },
 
-  createSubsection: function(title, hasSubdata, subSectionData, dataDiv) {
+  createSubsection(title, hasSubdata, subSectionData, dataDiv) {
     let dataSection = document.createElement("section");
     dataSection.classList.add("data-subsection");
 
     if (hasSubdata) {
       dataSection.classList.add("has-subdata");
     }
 
     // Create section heading
@@ -613,42 +613,42 @@ var EnvironmentData = {
     dataSection.appendChild(sectionName);
     dataSection.appendChild(toggleCaption);
     dataSection.appendChild(emptyCaption);
     dataSection.appendChild(data);
 
     dataDiv.appendChild(dataSection);
   },
 
-  renderPersona: function(addonObj, addonSection, sectionTitle) {
+  renderPersona(addonObj, addonSection, sectionTitle) {
     let table = document.createElement("table");
     table.setAttribute("id", sectionTitle);
     this.appendAddonSubsectionTitle(sectionTitle, table);
     this.appendRow(table, "persona", addonObj.persona);
     addonSection.appendChild(table);
   },
 
-  renderActivePlugins: function(addonObj, addonSection, sectionTitle) {
+  renderActivePlugins(addonObj, addonSection, sectionTitle) {
     let table = document.createElement("table");
     table.setAttribute("id", sectionTitle);
     this.appendAddonSubsectionTitle(sectionTitle, table);
 
     for (let plugin of addonObj) {
       let data = explodeObject(plugin);
       this.appendHeadingName(table, data.get("name"));
 
       for (let [key, value] of data) {
         this.appendRow(table, key, value);
       }
     }
 
     addonSection.appendChild(table);
   },
 
-  renderAddonsObject: function(addonObj, addonSection, sectionTitle) {
+  renderAddonsObject(addonObj, addonSection, sectionTitle) {
     let table = document.createElement("table");
     table.setAttribute("id", sectionTitle);
     this.appendAddonSubsectionTitle(sectionTitle, table);
 
     for (let id of Object.keys(addonObj)) {
       let addon = addonObj[id];
       this.appendHeadingName(table, addon.name || id);
       this.appendAddonID(table, id);
@@ -657,95 +657,95 @@ var EnvironmentData = {
       for (let [key, value] of data) {
         this.appendRow(table, key, value);
       }
     }
 
     addonSection.appendChild(table);
   },
 
-  renderKeyValueObject: function(addonObj, addonSection, sectionTitle) {
+  renderKeyValueObject(addonObj, addonSection, sectionTitle) {
     let data = explodeObject(addonObj);
     let table = document.createElement("table");
     table.setAttribute("class", sectionTitle);
     this.appendAddonSubsectionTitle(sectionTitle, table);
     this.appendHeading(table);
 
     for (let [key, value] of data) {
       this.appendRow(table, key, value);
     }
 
     addonSection.appendChild(table);
   },
 
-  appendAddonID: function(table, addonID) {
+  appendAddonID(table, addonID) {
     this.appendRow(table, "id", addonID);
   },
 
-  appendHeading: function(table) {
+  appendHeading(table) {
     let headings = document.createElement("tr");
     this.appendColumn(headings, "th", bundle.GetStringFromName("environmentDataHeadingName"));
     this.appendColumn(headings, "th", bundle.GetStringFromName("environmentDataHeadingValue"));
     table.appendChild(headings);
   },
 
-  appendHeadingName: function(table, name) {
+  appendHeadingName(table, name) {
     let headings = document.createElement("tr");
     this.appendColumn(headings, "th", name);
     headings.cells[0].colSpan = 2;
     table.appendChild(headings);
   },
 
-  appendAddonSubsectionTitle: function(section, table) {
+  appendAddonSubsectionTitle(section, table) {
     let caption = document.createElement("caption");
     caption.setAttribute("class", "addon-caption");
     caption.appendChild(document.createTextNode(section));
     table.appendChild(caption);
   },
 
-  createAddonSection: function(dataDiv, ping) {
+  createAddonSection(dataDiv, ping) {
     let addonSection = document.createElement("div");
     let addons = ping.environment.addons;
     this.renderAddonsObject(addons.activeAddons, addonSection, "activeAddons");
     this.renderActivePlugins(addons.activePlugins, addonSection, "activePlugins");
     this.renderKeyValueObject(addons.theme, addonSection, "theme");
     this.renderKeyValueObject(addons.activeExperiment, addonSection, "activeExperiment");
     this.renderAddonsObject(addons.activeGMPlugins, addonSection, "activeGMPlugins");
     this.renderPersona(addons, addonSection, "persona");
 
     let hasAddonData = Object.keys(ping.environment.addons).length > 0;
     this.createSubsection("addons", hasAddonData, addonSection, dataDiv);
   },
 
-  appendRow: function(table, id, value) {
+  appendRow(table, id, value) {
     let row = document.createElement("tr");
     this.appendColumn(row, "td", id);
     this.appendColumn(row, "td", value);
     table.appendChild(row);
   },
   /**
    * Helper function for appending a column to the data table.
    *
    * @param aRowElement Parent row element
    * @param aColType Column's tag name
    * @param aColText Column contents
    */
-  appendColumn: function(aRowElement, aColType, aColText) {
+  appendColumn(aRowElement, aColType, aColText) {
     let colElement = document.createElement(aColType);
     let colTextElement = document.createTextNode(aColText);
     colElement.appendChild(colTextElement);
     aRowElement.appendChild(colElement);
   },
 };
 
 var TelLog = {
   /**
    * Renders the telemetry log
    */
-  render: function(aPing) {
+  render(aPing) {
     let entries = aPing.payload.log;
     const hasData = entries && entries.length > 0;
     setHasData("telemetry-log-section", hasData);
     if (!hasData) {
       return;
     }
 
     let table = document.createElement("table");
@@ -776,17 +776,17 @@ var TelLog = {
 
   /**
    * Helper function for appending a column to the data table.
    *
    * @param aRowElement Parent row element
    * @param aColType Column's tag name
    * @param aColText Column contents
    */
-  appendColumn: function(aRowElement, aColType, aColText) {
+  appendColumn(aRowElement, aColType, aColText) {
     let colElement = document.createElement(aColType);
     let colTextElement = document.createTextNode(aColText);
     colElement.appendChild(colTextElement);
     aRowElement.appendChild(colElement);
   },
 };
 
 var SlowSQL = {
@@ -997,17 +997,17 @@ var StackRenderer = {
     div.appendChild(document.createElement("br"));
   }
 };
 
 var RawPayload = {
   /**
    * Renders the raw payload
    */
-  render: function(aPing) {
+  render(aPing) {
     setHasData("raw-payload-section", true);
     let pre = document.getElementById("raw-payload-data-pre");
     pre.textContent = JSON.stringify(aPing.payload, null, 2);
   }
 };
 
 function SymbolicationRequest(aPrefix, aRenderHeader,
                               aMemoryMap, aStacks, aDurations = null) {
@@ -1128,17 +1128,17 @@ var CapturedStacks = {
   },
 };
 
 var ThreadHangStats = {
 
   /**
    * Renders raw thread hang stats data
    */
-  render: function(aPayload) {
+  render(aPayload) {
     let div = document.getElementById("thread-hang-stats");
     removeAllChildNodes(div);
 
     let stats = aPayload.threadHangStats;
     setHasData("thread-hang-stats-section", stats && (stats.length > 0));
     if (!stats) {
       return;
     }
@@ -1146,17 +1146,17 @@ var ThreadHangStats = {
     stats.forEach((thread) => {
       div.appendChild(this.renderThread(thread));
     });
   },
 
   /**
    * Creates and fills data corresponding to a thread
    */
-  renderThread: function(aThread) {
+  renderThread(aThread) {
     let div = document.createElement("div");
 
     let title = document.createElement("h2");
     title.textContent = aThread.name;
     div.appendChild(title);
 
     // Don't localize the histogram name, because the
     // name is also used as the div element's ID
@@ -1238,17 +1238,17 @@ var Histogram = {
                                                  .copyString(this.histogramText);
     });
     outerDiv.appendChild(copyButton);
 
     aParent.appendChild(outerDiv);
     return outerDiv;
   },
 
-  processHistogram: function(aHgram, aName, aIsBHR) {
+  processHistogram(aHgram, aName, aIsBHR) {
     const values = Object.keys(aHgram.values).map(k => aHgram.values[k]);
     if (!values.length) {
       // If we have no values collected for this histogram, just return
       // zero values so we still render it.
       return {
         values: [],
         pretty_average: 0,
         max: 0,
@@ -1285,30 +1285,30 @@ var Histogram = {
     const labelledValues = Object.keys(aHgram.values)
                            .filter(label => !aIsBHR || Number(label) != 0) // remove dummy 0 label for BHR
                            .map(k => [labelFunc(Number(k)), aHgram.values[k]]);
 
     let result = {
       values: labelledValues,
       pretty_average: average,
       max: max_value,
-      sample_count: sample_count,
+      sample_count,
       sum: aHgram.sum
     };
 
     return result;
   },
 
   /**
    * Return a non-negative, logarithmic representation of a non-negative number.
    * e.g. 0 => 0, 1 => 1, 10 => 2, 100 => 3
    *
    * @param aNumber Non-negative number
    */
-  getLogValue: function(aNumber) {
+  getLogValue(aNumber) {
     return Math.max(0, Math.log10(aNumber) + 1);
   },
 
   /**
    * Create histogram HTML bars, also returns a textual representation
    * Both aMaxValue and aSumValues must be positive.
    * Values are assumed to use 0 as baseline.
    *
@@ -1525,31 +1525,31 @@ var KeyValueTable = {
 
 var GenericTable = {
   /**
    * Returns a n-column table.
    * @param rows An array of arrays, each containing data to render
    *             for one row.
    * @param headings The column header strings.
    */
-  render: function(rows, headings) {
+  render(rows, headings) {
     let table = document.createElement("table");
     this.renderHeader(table, headings);
     this.renderBody(table, rows);
     return table;
   },
 
   /**
    * Create the table header.
    * Tabs & newlines added to cells to make it easier to copy-paste.
    *
    * @param table Table element
    * @param headings Array of column header strings.
    */
-  renderHeader: function(table, headings) {
+  renderHeader(table, headings) {
     let headerRow = document.createElement("tr");
     table.appendChild(headerRow);
 
     for (let i = 0; i < headings.length; ++i) {
       let suffix = (i == (headings.length - 1)) ? "\n" : "\t";
       let column = document.createElement("th");
       column.appendChild(document.createTextNode(headings[i] + suffix));
       headerRow.appendChild(column);
@@ -1559,17 +1559,17 @@ var GenericTable = {
   /**
    * Create the table body
    * Tabs & newlines added to cells to make it easier to copy-paste.
    *
    * @param table Table element
    * @param rows An array of arrays, each containing data to render
    *             for one row.
    */
-  renderBody: function(table, rows) {
+  renderBody(table, rows) {
     for (let row of rows) {
       row = row.map(value => {
         // use .valueOf() to unbox Number, String, etc. objects
         if (value &&
            (typeof value == "object") &&
            (typeof value.valueOf() == "object")) {
           return RenderObject(value);
         }
@@ -1585,17 +1585,17 @@ var GenericTable = {
         field.appendChild(document.createTextNode(row[i] + suffix));
         newRow.appendChild(field);
       }
     }
   }
 };
 
 var KeyedHistogram = {
-  render: function(parent, id, keyedHistogram) {
+  render(parent, id, keyedHistogram) {
     let outerDiv = document.createElement("div");
     outerDiv.className = "keyed-histogram";
     outerDiv.id = id;
 
     let divTitle = document.createElement("div");
     divTitle.className = "keyed-histogram-title";
     divTitle.appendChild(document.createTextNode(id));
     outerDiv.appendChild(divTitle);
@@ -1639,17 +1639,17 @@ var AddonDetails = {
   }
 };
 
 var Scalars = {
   /**
    * Render the scalar data - if present - from the payload in a simple key-value table.
    * @param aPayload A payload object to render the data from.
    */
-  render: function(aPayload) {
+  render(aPayload) {
     let scalarsSection = document.getElementById("scalars");
     removeAllChildNodes(scalarsSection);
 
     if (!aPayload.processes || !aPayload.processes.parent) {
       return;
     }
 
     let scalars = aPayload.processes.parent.scalars;
@@ -1666,17 +1666,17 @@ var Scalars = {
   }
 };
 
 var KeyedScalars = {
   /**
    * Render the keyed scalar data - if present - from the payload in a simple key-value table.
    * @param aPayload A payload object to render the data from.
    */
-  render: function(aPayload) {
+  render(aPayload) {
     let scalarsSection = document.getElementById("keyed-scalars");
     removeAllChildNodes(scalarsSection);
 
     if (!aPayload.processes || !aPayload.processes.parent) {
       return;
     }
 
     let keyedScalars = aPayload.processes.parent.keyedScalars;
@@ -1700,17 +1700,17 @@ var KeyedScalars = {
   }
 };
 
 var Events = {
   /**
    * Render the event data - if present - from the payload in a simple table.
    * @param aPayload A payload object to render the data from.
    */
-  render: function(aPayload) {
+  render(aPayload) {
     let eventsSection = document.getElementById("events");
     removeAllChildNodes(eventsSection);
 
     if (!aPayload.processes || !aPayload.processes.parent) {
       return;
     }
 
     const events = aPayload.processes.parent.events;
--- a/toolkit/content/aboutwebrtc/aboutWebrtc.js
+++ b/toolkit/content/aboutwebrtc/aboutWebrtc.js
@@ -56,66 +56,66 @@ function onLoad() {
   }
 
   let contentInit = function(data) {
     AboutWebRTC.init(onClearStats, onClearLog);
     AboutWebRTC.render(contentElem, data);
   };
 
   Promise.all([reportsRetrieved, logRetrieved])
-    .then(([stats, log]) => contentInit({reports: stats.reports, log: log}))
-    .catch(error => contentInit({error: error}));
+    .then(([stats, log]) => contentInit({reports: stats.reports, log}))
+    .catch(error => contentInit({error}));
 }
 
 function onClearLog() {
   WebrtcGlobalInformation.clearLogging();
   getLog()
-    .then(log => AboutWebRTC.refresh({log: log}))
+    .then(log => AboutWebRTC.refresh({log}))
     .catch(error => AboutWebRTC.refresh({logError: error}));
 }
 
 function onClearStats() {
   WebrtcGlobalInformation.clearAllStats();
   getStats()
     .then(stats => AboutWebRTC.refresh({reports: stats.reports}))
     .catch(error => AboutWebRTC.refresh({reportError: error}));
 }
 
 var ControlSet = {
-  render: function() {
+  render() {
     let controls = document.createElement("div");
     let control = document.createElement("div");
     let message = document.createElement("div");
 
     controls.className = "controls";
     control.className = "control";
     message.className = "message";
     controls.appendChild(control);
     controls.appendChild(message);
 
     this.controlSection = control;
     this.messageSection = message;
     return controls;
   },
 
-  add: function(controlObj) {
+  add(controlObj) {
     let [controlElem, messageElem] = controlObj.render();
     this.controlSection.appendChild(controlElem);
     this.messageSection.appendChild(messageElem);
   }
 };
 
 function Control() {
   this._label = null;
   this._message = null;
   this._messageHeader = null;
 }
 
 Control.prototype = {
-  render: function() {
+  render() {
     let controlElem = document.createElement("button");
     let messageElem = document.createElement("p");
 
     this.ctrl = controlElem;
     controlElem.onclick = this.onClick.bind(this);
     this.msg = messageElem;
     this.update();
 
@@ -133,28 +133,28 @@ Control.prototype = {
   set message(val) {
     return this._messageVal = val;
   },
 
   get message() {
     return this._messageVal;
   },
 
-  update: function() {
+  update() {
     this.ctrl.textContent = this._label;
 
     if (this._message) {
       this.msg.innerHTML =
         `<span class="info-label">${this._messageHeader}:</span> ${this._message}`;
     } else {
       this.msg.innerHTML = null;
     }
   },
 
-  onClick: function(event) {
+  onClick(event) {
     return true;
   }
 };
 
 function SavePage() {
   Control.call(this);
   this._messageHeader = getString("save_page_label");
   this._label = getString("save_page_label");
@@ -288,22 +288,22 @@ AecLogging.prototype.onClick = function(
   }
   this.update();
 };
 
 var AboutWebRTC = {
   _reports: [],
   _log: [],
 
-  init: function(onClearStats, onClearLog) {
+  init(onClearStats, onClearLog) {
     this._onClearStats = onClearStats;
     this._onClearLog = onClearLog;
   },
 
-  render: function(parent, data) {
+  render(parent, data) {
     this._content = parent;
     this._setData(data);
 
     if (data.error) {
       let msg = document.createElement("h3");
       msg.textContent = getString("cannot_retrieve_log");
       parent.appendChild(msg);
       msg = document.createElement("p");
@@ -313,37 +313,37 @@ var AboutWebRTC = {
     }
 
     this._peerConnections = this.renderPeerConnections();
     this._connectionLog = this.renderConnectionLog();
     this._content.appendChild(this._peerConnections);
     this._content.appendChild(this._connectionLog);
   },
 
-  _setData: function(data) {
+  _setData(data) {
     if (data.reports) {
       this._reports = data.reports;
     }
 
     if (data.log) {
       this._log = data.log;
     }
   },
 
-  refresh: function(data) {
+  refresh(data) {
     this._setData(data);
     let pc = this._peerConnections;
     this._peerConnections = this.renderPeerConnections();
     let log = this._connectionLog;
     this._connectionLog = this.renderConnectionLog();
     this._content.replaceChild(this._peerConnections, pc);
     this._content.replaceChild(this._connectionLog, log);
   },
 
-  renderPeerConnections: function() {
+  renderPeerConnections() {
     let connections = document.createElement("div");
     connections.className = "stats";
 
     let heading = document.createElement("span");
     heading.className = "section-heading";
     let elem = document.createElement("h3");
     elem.textContent = getString("stats_heading");
     heading.appendChild(elem);
@@ -364,17 +364,17 @@ var AboutWebRTC = {
     for (let report of reports) {
       let peerConnection = new PeerConnection(report);
       connections.appendChild(peerConnection.render());
     }
 
     return connections;
   },
 
-  renderConnectionLog: function() {
+  renderConnectionLog() {
     let content = document.createElement("div");
     content.className = "log";
 
     let heading = document.createElement("span");
     heading.className = "section-heading";
     let elem = document.createElement("h3");
     elem.textContent = getString("log_heading");
     heading.appendChild(elem);
@@ -410,17 +410,17 @@ var AboutWebRTC = {
   }
 };
 
 function PeerConnection(report) {
   this._report = report;
 }
 
 PeerConnection.prototype = {
-  render: function() {
+  render() {
     let pc = document.createElement("div");
     pc.className = "peer-connection";
     pc.appendChild(this.renderHeading());
 
     let div = document.createElement("div");
     let sectionCtrl = document.createElement("div");
     sectionCtrl.className = "section-ctrl no-print";
     let foldEffect = new FoldEffect(div);
@@ -431,56 +431,56 @@ PeerConnection.prototype = {
     div.appendChild(new ICEStats(this._report).render());
     div.appendChild(new SDPStats(this._report).render());
     div.appendChild(new RTPStats(this._report).render());
 
     pc.appendChild(div);
     return pc;
   },
 
-  renderHeading: function() {
+  renderHeading() {
     let pcInfo = this.getPCInfo(this._report);
     let heading = document.createElement("h3");
     let now = new Date(this._report.timestamp).toTimeString();
     heading.textContent =
       `[ ${pcInfo.id} ] ${pcInfo.url} ${pcInfo.closed ? `(${getString("connection_closed")})` : ""} ${now}`;
     return heading;
   },
 
-  renderDesc: function() {
+  renderDesc() {
     let info = document.createElement("div");
     let label = document.createElement("span");
     let body = document.createElement("span");
 
     label.className = "info-label";
     label.textContent = `${getString("peer_connection_id_label")}: `;
     info.appendChild(label);
 
     body.className = "info-body";
     body.textContent = this._report.pcid;
     info.appendChild(body);
 
     return info;
   },
 
-  getPCInfo: function(report) {
+  getPCInfo(report) {
     return {
       id: report.pcid.match(/id=(\S+)/)[1],
       url: report.pcid.match(/url=([^)]+)/)[1],
       closed: report.closed
     };
   }
 };
 
 function SDPStats(report) {
   this._report = report;
 }
 
 SDPStats.prototype = {
-  render: function() {
+  render() {
     let div = document.createElement("div");
     let elem = document.createElement("h4");
 
     elem.textContent = getString("sdp_heading");
     div.appendChild(elem);
 
     elem = document.createElement("h5");
     elem.textContent = getString("local_sdp_heading");
@@ -503,33 +503,33 @@ SDPStats.prototype = {
 };
 
 function RTPStats(report) {
   this._report = report;
   this._stats = [];
 }
 
 RTPStats.prototype = {
-  render: function() {
+  render() {
     let div = document.createElement("div");
     let heading = document.createElement("h4");
 
     heading.textContent = getString("rtp_stats_heading");
     div.appendChild(heading);
 
     this.generateRTPStats();
 
     for (let statSet of this._stats) {
       div.appendChild(this.renderRTPStatSet(statSet));
     }
 
     return div;
   },
 
-  generateRTPStats: function() {
+  generateRTPStats() {
     let remoteRtpStats = {};
     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) {
@@ -544,32 +544,32 @@ RTPStats.prototype = {
       if (stats.remoteId) {
         stats.remoteRtpStats = remoteRtpStats[stats.remoteId];
       }
     }
 
     this._stats = rtpStats;
   },
 
-  renderAvStats: function(stats) {
+  renderAvStats(stats) {
     let statsString = "";
 
     if (stats.mozAvSyncDelay) {
       statsString += `${getString("av_sync_label")}: ${stats.mozAvSyncDelay} ms `;
     }
     if (stats.mozJitterBufferDelay) {
       statsString += `${getString("jitter_buffer_delay_label")}: ${stats.mozJitterBufferDelay} ms`;
     }
 
     let line = document.createElement("p");
     line.textContent = statsString;
     return line;
   },
 
-  renderCoderStats: function(stats) {
+  renderCoderStats(stats) {
     let statsString = "";
     let label;
 
     if (stats.bitrateMean) {
       statsString += ` ${getString("avg_bitrate_label")}: ${(stats.bitrateMean / 1000000).toFixed(2)} Mbps`;
       if (stats.bitrateStdDev) {
         statsString += ` (${(stats.bitrateStdDev / 1000000).toFixed(2)} SD)`;
       }
@@ -594,17 +594,17 @@ RTPStats.prototype = {
       statsString = label + statsString;
     }
 
     let line = document.createElement("p");
     line.textContent = statsString;
     return line;
   },
 
-  renderTransportStats: function(stats, typeLabel) {
+  renderTransportStats(stats, typeLabel) {
     let time  = new Date(stats.timestamp).toTimeString();
     let statsString = `${typeLabel}: ${time} ${stats.type} SSRC: ${stats.ssrc}`;
 
     if (stats.packetsReceived) {
       statsString += ` ${getString("received_label")}: ${stats.packetsReceived} ${getString("packets")}`;
 
       if (stats.bytesReceived) {
         statsString += ` (${(stats.bytesReceived / 1024).toFixed(2)} Kb)`;
@@ -622,17 +622,17 @@ RTPStats.prototype = {
       }
     }
 
     let line = document.createElement("p");
     line.textContent = statsString;
     return line;
   },
 
-  renderRTPStatSet: function(stats) {
+  renderRTPStatSet(stats) {
     let div = document.createElement("div");
     let heading = document.createElement("h5");
 
     heading.textContent = stats.id;
     div.appendChild(heading);
 
     if (stats.MozAvSyncDelay || stats.mozJitterBufferDelay) {
       div.appendChild(this.renderAvStats(stats));
@@ -649,17 +649,17 @@ RTPStats.prototype = {
   },
 };
 
 function ICEStats(report) {
   this._report = report;
 }
 
 ICEStats.prototype = {
-  render: function() {
+  render() {
     let tbody = [];
     for (let stat of this.generateICEStats()) {
       tbody.push([
         stat.localcandidate || "",
         stat.remotecandidate || "",
         stat.state || "",
         stat.priority || "",
         stat.nominated || "",
@@ -682,32 +682,32 @@ ICEStats.prototype = {
     div.appendChild(this.renderIceMetric("ice_restart_count_label",
                                          this._report.iceRestarts));
     div.appendChild(this.renderIceMetric("ice_rollback_count_label",
                                          this._report.iceRollbacks));
 
     return div;
   },
 
-  renderIceMetric: function(labelName, value) {
+  renderIceMetric(labelName, value) {
     let info = document.createElement("div");
     let label = document.createElement("span");
     let body = document.createElement("span");
 
     label.className = "info-label";
     label.textContent = `${getString(labelName)}: `;
     info.appendChild(label);
 
     body.className = "info-body";
     body.textContent = value;
     info.appendChild(body);
     return info;
   },
 
-  generateICEStats: function() {
+  generateICEStats() {
     // Create an index based on candidate ID for each element in the
     // iceCandidateStats array.
     let candidates = new Map();
 
     for (let candidate of this._report.iceCandidateStats) {
       candidates.set(candidate.id, candidate);
     }
 
@@ -746,17 +746,17 @@ ICEStats.prototype = {
       stat = {};
       stat[c.type] = this.candidateToString(c);
       stats.push(stat);
     }
 
     return stats.sort((a, b) => (b.priority || 0) - (a.priority || 0));
   },
 
-  candidateToString: function(c) {
+  candidateToString(c) {
     if (!c) {
       return "*";
     }
 
     var type = c.candidateType;
 
     if (c.type == "localcandidate" && c.candidateType == "relayed") {
       type = `${c.candidateType}-${c.mozLocalTransport}`;
@@ -767,29 +767,29 @@ ICEStats.prototype = {
 };
 
 function SimpleTable(heading, data) {
   this._heading = heading || [];
   this._data = data;
 }
 
 SimpleTable.prototype = {
-  renderRow: function(list) {
+  renderRow(list) {
     let row = document.createElement("tr");
 
     for (let elem of list) {
       let cell = document.createElement("td");
       cell.textContent = elem;
       row.appendChild(cell);
     }
 
     return row;
   },
 
-  render: function() {
+  render() {
     let table = document.createElement("table");
 
     if (this._heading) {
       table.appendChild(this.renderRow(this._heading));
     }
 
     for (let row of this._data) {
       table.appendChild(this.renderRow(row));
@@ -805,45 +805,45 @@ function FoldEffect(targetElem, options 
     this._showHint = options.showHint || getString("fold_show_hint");
     this._hideMsg = "\u25B2 " + (options.hideMsg || getString("fold_hide_msg"));
     this._hideHint = options.hideHint || getString("fold_hide_hint");
     this._target = targetElem;
   }
 }
 
 FoldEffect.prototype = {
-  render: function() {
+  render() {
     this._target.classList.add("fold-target");
 
     let ctrl = document.createElement("div");
     this._trigger = ctrl;
     ctrl.className = "fold-trigger";
     ctrl.addEventListener("click", this.onClick.bind(this));
     this.close();
 
     FoldEffect._sections.push(this);
     return ctrl;
   },
 
-  onClick: function() {
+  onClick() {
     if (this._target.classList.contains("fold-closed")) {
       this.open();
     } else {
       this.close();
     }
     return true;
   },
 
-  open: function() {
+  open() {
     this._target.classList.remove("fold-closed");
     this._trigger.setAttribute("title", this._hideHint);
     this._trigger.textContent = this._hideMsg;
   },
 
-  close: function() {
+  close() {
     this._target.classList.add("fold-closed");
     this._trigger.setAttribute("title", this._showHint);
     this._trigger.textContent = this._showMsg;
   }
 };
 
 FoldEffect._sections = [];
 
--- a/toolkit/content/browser-child.js
+++ b/toolkit/content/browser-child.js
@@ -26,17 +26,17 @@ if (AppConstants.MOZ_CRASHREPORTER) {
 function makeInputStream(aString) {
   let stream = Cc["@mozilla.org/io/string-input-stream;1"].
                createInstance(Ci.nsISupportsCString);
   stream.data = aString;
   return stream; // XPConnect will QI this to nsIInputStream for us.
 }
 
 var WebProgressListener = {
-  init: function() {
+  init() {
     this._filter = Cc["@mozilla.org/appshell/component/browser-status-filter;1"]
                      .createInstance(Ci.nsIWebProgress);
     this._filter.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_ALL);
 
     let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                               .getInterface(Ci.nsIWebProgress);
     webProgress.addProgressListener(this._filter, Ci.nsIWebProgress.NOTIFY_ALL);
   },
@@ -45,17 +45,17 @@ var WebProgressListener = {
     let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                               .getInterface(Ci.nsIWebProgress);
     webProgress.removeProgressListener(this._filter);
 
     this._filter.removeProgressListener(this);
     this._filter = null;
   },
 
-  _requestSpec: function(aRequest, aPropertyName) {
+  _requestSpec(aRequest, aPropertyName) {
     if (!aRequest || !(aRequest instanceof Ci.nsIChannel))
       return null;
     return aRequest.QueryInterface(Ci.nsIChannel)[aPropertyName].spec;
   },
 
   _setupJSON: function setupJSON(aWebProgress, aRequest) {
     let innerWindowID = null;
     if (aWebProgress) {
@@ -229,17 +229,17 @@ var WebProgressListener = {
 };
 
 WebProgressListener.init();
 addEventListener("unload", () => {
   WebProgressListener.uninit();
 });
 
 var WebNavigation =  {
-  init: function() {
+  init() {
     addMessageListener("WebNavigation:GoBack", this);
     addMessageListener("WebNavigation:GoForward", this);
     addMessageListener("WebNavigation:GotoIndex", this);
     addMessageListener("WebNavigation:LoadURI", this);
     addMessageListener("WebNavigation:SetOriginAttributes", this);
     addMessageListener("WebNavigation:Reload", this);
     addMessageListener("WebNavigation:Stop", this);
   },
@@ -249,17 +249,17 @@ var WebNavigation =  {
   },
 
   _inLoadURI: false,
 
   get inLoadURI() {
     return this._inLoadURI;
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     switch (message.name) {
       case "WebNavigation:GoBack":
         this.goBack();
         break;
       case "WebNavigation:GoForward":
         this.goForward();
         break;
       case "WebNavigation:GotoIndex":
@@ -288,33 +288,33 @@ var WebNavigation =  {
     try {
       fn();
     } finally {
       this._inLoadURI = false;
       WebProgressListener.sendLoadCallResult();
     }
   },
 
-  goBack: function() {
+  goBack() {
     if (this.webNavigation.canGoBack) {
       this._wrapURIChangeCall(() => this.webNavigation.goBack());
     }
   },
 
-  goForward: function() {
+  goForward() {
     if (this.webNavigation.canGoForward) {
       this._wrapURIChangeCall(() => this.webNavigation.goForward());
     }
   },
 
-  gotoIndex: function(index) {
+  gotoIndex(index) {
     this._wrapURIChangeCall(() => this.webNavigation.gotoIndex(index));
   },
 
-  loadURI: function(uri, flags, referrer, referrerPolicy, postData, headers, baseURI) {
+  loadURI(uri, flags, referrer, referrerPolicy, postData, headers, baseURI) {
     if (AppConstants.MOZ_CRASHREPORTER && CrashReporter.enabled) {
       let annotation = uri;
       try {
         let url = Services.io.newURI(uri, null, null);
         // If the current URI contains a username/password, remove it.
         url.userPass = "";
         annotation = url.spec;
       } catch (ex) { /* Ignore failures to parse and failures
@@ -330,56 +330,56 @@ var WebNavigation =  {
     if (baseURI)
       baseURI = Services.io.newURI(baseURI, null, null);
     this._wrapURIChangeCall(() => {
       return this.webNavigation.loadURIWithOptions(uri, flags, referrer, referrerPolicy,
                                                    postData, headers, baseURI);
     });
   },
 
-  setOriginAttributes: function(originAttributes) {
+  setOriginAttributes(originAttributes) {
     if (originAttributes) {
       this.webNavigation.setOriginAttributesBeforeLoading(originAttributes);
     }
   },
 
-  reload: function(flags) {
+  reload(flags) {
     this.webNavigation.reload(flags);
   },
 
-  stop: function(flags) {
+  stop(flags) {
     this.webNavigation.stop(flags);
   }
 };
 
 WebNavigation.init();
 
 var SecurityUI = {
-  getSSLStatusAsString: function() {
+  getSSLStatusAsString() {
     let status = docShell.securityUI.QueryInterface(Ci.nsISSLStatusProvider).SSLStatus;
 
     if (status) {
       let helper = Cc["@mozilla.org/network/serialization-helper;1"]
                       .getService(Ci.nsISerializationHelper);
 
       status.QueryInterface(Ci.nsISerializable);
       return helper.serializeToString(status);
     }
 
     return null;
   }
 };
 
 var ControllerCommands = {
-  init: function() {
+  init() {
     addMessageListener("ControllerCommands:Do", this);
     addMessageListener("ControllerCommands:DoWithParams", this);
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     switch (message.name) {
       case "ControllerCommands:Do":
         if (docShell.isCommandEnabled(message.data))
           docShell.doCommand(message.data);
         break;
 
       case "ControllerCommands:DoWithParams":
         var data = message.data;
@@ -445,32 +445,32 @@ const ZoomManager = {
     this._markupViewer.fullZoom = value;
   },
 
   set textZoom(value) {
     this._cache.textZoom = value;
     this._markupViewer.textZoom = value;
   },
 
-  refreshFullZoom: function() {
+  refreshFullZoom() {
     return this._refreshZoomValue('fullZoom');
   },
 
-  refreshTextZoom: function() {
+  refreshTextZoom() {
     return this._refreshZoomValue('textZoom');
   },
 
   /**
    * Retrieves specified zoom property value from markupViewer and refreshes
    * cache if needed.
    * @param valueName Either 'fullZoom' or 'textZoom'.
    * @returns Returns true if cached value was actually refreshed.
    * @private
    */
-  _refreshZoomValue: function(valueName) {
+  _refreshZoomValue(valueName) {
     let actualZoomValue = this._markupViewer[valueName];
     // Round to remove any floating-point error.
     actualZoomValue = Number(actualZoomValue.toFixed(2));
     if (actualZoomValue != this._cache[valueName]) {
       this._cache[valueName] = actualZoomValue;
       return true;
     }
     return false;
@@ -541,33 +541,33 @@ addMessageListener("Browser:Thumbnail:Re
 });
 
 /**
  * Remote isSafeForCapture request handler for PageThumbs.
  */
 addMessageListener("Browser:Thumbnail:CheckState", function(aMessage) {
   let result = PageThumbUtils.shouldStoreContentThumbnail(content, docShell);
   sendAsyncMessage("Browser:Thumbnail:CheckState:Response", {
-    result: result
+    result
   });
 });
 
 /**
  * Remote GetOriginalURL request handler for PageThumbs.
  */
 addMessageListener("Browser:Thumbnail:GetOriginalURL", function(aMessage) {
   let channel = docShell.currentDocumentChannel;
   let channelError = PageThumbUtils.isChannelErrorResponse(channel);
   let originalURL;
   try {
     originalURL = channel.originalURI.spec;
   } catch (ex) {}
   sendAsyncMessage("Browser:Thumbnail:GetOriginalURL:Response", {
-    channelError: channelError,
-    originalURL: originalURL,
+    channelError,
+    originalURL,
   });
 });
 
 /**
  * Remote createAboutBlankContentViewer request handler.
  */
 addMessageListener("Browser:CreateAboutBlank", function(aMessage) {
   if (!content.document || content.document.documentURI != "about:blank") {
@@ -617,9 +617,9 @@ addMessageListener("PermitUnload", msg =
   sendAsyncMessage("PermitUnload", {id: msg.data.id, kind: "end", permitUnload});
 });
 
 // We may not get any responses to Browser:Init if the browser element
 // is torn down too quickly.
 var outerWindowID = content.QueryInterface(Ci.nsIInterfaceRequestor)
                            .getInterface(Ci.nsIDOMWindowUtils)
                            .outerWindowID;
-sendAsyncMessage("Browser:Init", {outerWindowID: outerWindowID});
+sendAsyncMessage("Browser:Init", {outerWindowID});
--- a/toolkit/content/browser-content.js
+++ b/toolkit/content/browser-content.js
@@ -36,17 +36,17 @@ var ClickEventHandler = {
     this._lastFrame = null;
     this.autoscrollLoop = this.autoscrollLoop.bind(this);
 
     Services.els.addSystemEventListener(global, "mousedown", this, true);
 
     addMessageListener("Autoscroll:Stop", this);
   },
 
-  isAutoscrollBlocker: function(node) {
+  isAutoscrollBlocker(node) {
     let mmPaste = Services.prefs.getBoolPref("middlemouse.paste");
     let mmScrollbarPosition = Services.prefs.getBoolPref("middlemouse.scrollbarPosition");
 
     while (node) {
       if ((node instanceof content.HTMLAnchorElement || node instanceof content.HTMLAreaElement) &&
           node.hasAttribute("href")) {
         return true;
       }
@@ -61,17 +61,17 @@ var ClickEventHandler = {
         return true;
       }
 
       node = node.parentNode;
     }
     return false;
   },
 
-  findNearestScrollableElement: function(aNode) {
+  findNearestScrollableElement(aNode) {
     // this is a list of overflow property values that allow scrolling
     const scrollingAllowed = ['scroll', 'auto'];
 
     // go upward in the DOM and find any parent element that has a overflow
     // area and can therefore be scrolled
     for (this._scrollable = aNode; this._scrollable;
          this._scrollable = this._scrollable.parentNode) {
       // do not use overflow based autoscroll for <html> and <body>
@@ -118,17 +118,17 @@ var ClickEventHandler = {
       } else if (this._scrollable.frameElement) {
         this.findNearestScrollableElement(this._scrollable.frameElement);
       } else {
         this._scrollable = null; // abort scrolling
       }
     }
   },
 
-  startScroll: function(event) {
+  startScroll(event) {
 
     this.findNearestScrollableElement(event.originalTarget);
 
     if (!this._scrollable)
       return;
 
     let [enabled] = sendSyncMessage("Autoscroll:Start",
                                     {scrolldir: this._scrolldir,
@@ -149,44 +149,44 @@ var ClickEventHandler = {
     this._screenY = event.screenY;
     this._scrollErrorX = 0;
     this._scrollErrorY = 0;
     this._lastFrame = content.performance.now();
 
     content.requestAnimationFrame(this.autoscrollLoop);
   },
 
-  stopScroll: function() {
+  stopScroll() {
     if (this._scrollable) {
       this._scrollable.mozScrollSnap();
       this._scrollable = null;
 
       Services.els.removeSystemEventListener(global, "mousemove", this, true);
       removeEventListener("pagehide", this, true);
     }
   },
 
-  accelerate: function(curr, start) {
+  accelerate(curr, start) {
     const speed = 12;
     var val = (curr - start) / speed;
 
     if (val > 1)
       return val * Math.sqrt(val) - 1;
     if (val < -1)
       return val * Math.sqrt(-val) + 1;
     return 0;
   },
 
-  roundToZero: function(num) {
+  roundToZero(num) {
     if (num > 0)
       return Math.floor(num);
     return Math.ceil(num);
   },
 
-  autoscrollLoop: function(timestamp) {
+  autoscrollLoop(timestamp) {
     if (!this._scrollable) {
       // Scrolling has been canceled
       return;
     }
 
     // avoid long jumps when the browser hangs for more than
     // |maxTimeDelta| ms
     const maxTimeDelta = 100;
@@ -218,17 +218,17 @@ var ClickEventHandler = {
     this._scrollable.scrollBy({
       left: actualScrollX,
       top: actualScrollY,
       behavior: "instant"
     });
     content.requestAnimationFrame(this.autoscrollLoop);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (event.type == "mousemove") {
       this._screenX = event.screenX;
       this._screenY = event.screenY;
     } else if (event.type == "mousedown") {
       if (event.isTrusted &
           !event.defaultPrevented &&
           event.button == 1 &&
           !this._scrollable &&
@@ -241,41 +241,41 @@ var ClickEventHandler = {
           this._scrollable.ownerDocument || this._scrollable.document;
         if (doc == event.target) {
           sendAsyncMessage("Autoscroll:Cancel");
         }
       }
     }
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "Autoscroll:Stop": {
         this.stopScroll();
         break;
       }
     }
   },
 };
 ClickEventHandler.init();
 
 var PopupBlocking = {
   popupData: null,
   popupDataInternal: null,
 
-  init: function() {
+  init() {
     addEventListener("DOMPopupBlocked", this, true);
     addEventListener("pageshow", this, true);
     addEventListener("pagehide", this, true);
 
     addMessageListener("PopupBlocking:UnblockPopup", this);
     addMessageListener("PopupBlocking:GetBlockedPopupList", this);
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "PopupBlocking:UnblockPopup": {
         let i = msg.data.index;
         if (this.popupData && this.popupData[i]) {
           let data = this.popupData[i];
           let internals = this.popupDataInternal[i];
           let dwi = internals.requestingWindow;
 
@@ -310,29 +310,29 @@ var PopupBlocking = {
         }
 
         sendAsyncMessage("PopupBlocking:ReplyGetBlockedPopupList", {popupData});
         break;
       }
     }
   },
 
-  handleEvent: function(ev) {
+  handleEvent(ev) {
     switch (ev.type) {
       case "DOMPopupBlocked":
         return this.onPopupBlocked(ev);
       case "pageshow":
         return this.onPageShow(ev);
       case "pagehide":
         return this.onPageHide(ev);
     }
     return undefined;
   },
 
-  onPopupBlocked: function(ev) {
+  onPopupBlocked(ev) {
     if (!this.popupData) {
       this.popupData = new Array();
       this.popupDataInternal = new Array();
     }
 
     let obj = {
       popupWindowURIspec: ev.popupWindowURI ? ev.popupWindowURI.spec : "about:blank",
       popupWindowFeatures: ev.popupWindowFeatures,
@@ -344,17 +344,17 @@ var PopupBlocking = {
       requestingDocument: ev.requestingWindow.document,
     };
 
     this.popupData.push(obj);
     this.popupDataInternal.push(internals);
     this.updateBlockedPopups(true);
   },
 
-  onPageShow: function(ev) {
+  onPageShow(ev) {
     if (this.popupData) {
       let i = 0;
       while (i < this.popupData.length) {
         // Filter out irrelevant reports.
         if (this.popupDataInternal[i].requestingWindow &&
             (this.popupDataInternal[i].requestingWindow.document ==
              this.popupDataInternal[i].requestingDocument)) {
           i++;
@@ -366,25 +366,25 @@ var PopupBlocking = {
       if (this.popupData.length == 0) {
         this.popupData = null;
         this.popupDataInternal = null;
       }
       this.updateBlockedPopups(false);
     }
   },
 
-  onPageHide: function(ev) {
+  onPageHide(ev) {
     if (this.popupData) {
       this.popupData = null;
       this.popupDataInternal = null;
       this.updateBlockedPopups(false);
     }
   },
 
-  updateBlockedPopups: function(freshPopup) {
+  updateBlockedPopups(freshPopup) {
     sendAsyncMessage("PopupBlocking:UpdateBlockedPopups",
       {
         count: this.popupData ? this.popupData.length : 0,
         freshPopup
       });
   },
 };
 PopupBlocking.init();
@@ -427,17 +427,17 @@ var Printing = {
   handleEvent(event) {
     if (event.type == "PrintingError") {
       let win = event.target.defaultView;
       let wbp = win.QueryInterface(Ci.nsIInterfaceRequestor)
                    .getInterface(Ci.nsIWebBrowserPrint);
       let nsresult = event.detail;
       sendAsyncMessage("Printing:Error", {
         isPrinting: wbp.doingPrint,
-        nsresult: nsresult,
+        nsresult,
       });
     }
   },
 
   receiveMessage(message) {
     let data = message.data;
     switch (message.name) {
       case "Printing:Preview:Enter": {
@@ -500,17 +500,17 @@ var Printing = {
     // By using ReaderMode primitives, we parse given document and place the
     // resulting JS object into the DOM of current browser.
     let articlePromise = ReaderMode.parseDocument(contentWindow.document).catch(Cu.reportError);
     articlePromise.then(function(article) {
       // We make use of a web progress listener in order to know when the content we inject
       // into the DOM has finished rendering. If our layout engine is still painting, we
       // will wait for MozAfterPaint event to be fired.
       let webProgressListener = {
-        onStateChange: function(webProgress, req, flags, status) {
+        onStateChange(webProgress, req, flags, status) {
           if (flags & Ci.nsIWebProgressListener.STATE_STOP) {
             webProgress.removeProgressListener(webProgressListener);
             let domUtils = content.QueryInterface(Ci.nsIInterfaceRequestor)
                                   .getInterface(Ci.nsIDOMWindowUtils);
             // Here we tell the parent that we have parsed the document successfully
             // using ReaderMode primitives and we are able to enter on preview mode.
             if (domUtils.isMozAfterPaintPending) {
               addEventListener("MozAfterPaint", function onPaint() {
@@ -720,17 +720,17 @@ var Printing = {
   logKeyedTelemetry(id, key) {
     let histogram = Services.telemetry.getKeyedHistogramById(id);
     histogram.add(key);
   },
 
   updatePageCount() {
     let numPages = docShell.printPreview.printPreviewNumPages;
     sendAsyncMessage("Printing:Preview:UpdatePageCount", {
-      numPages: numPages,
+      numPages,
     });
   },
 
   navigate(navType, pageNum) {
     docShell.printPreview.printPreviewNavigate(navType, pageNum);
   },
 
   /* nsIWebProgressListener for print preview */
@@ -843,17 +843,17 @@ var FindBar = {
     for (let k in event) {
       if (typeof event[k] != "object" && typeof event[k] != "function" &&
           !(k in content.KeyboardEvent)) {
         fakeEvent[k] = event[k];
       }
     }
     // sendSyncMessage returns an array of the responses from all listeners
     let rv = sendSyncMessage("Findbar:Keypress", {
-      fakeEvent: fakeEvent,
+      fakeEvent,
       shouldFastFind: fastFind.should
     });
     if (rv.indexOf(false) !== -1) {
       event.preventDefault();
       return false;
     }
     return undefined;
   },
@@ -1054,38 +1054,38 @@ addMessageListener("Browser:PurgeSession
   }
 
   if (purge > 0) {
     sessionHistory.PurgeHistory(purge);
   }
 });
 
 var ViewSelectionSource = {
-  init: function() {
+  init() {
     addMessageListener("ViewSource:GetSelection", this);
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     if (message.name == "ViewSource:GetSelection") {
       let selectionDetails;
       try {
         selectionDetails = message.objects.target ? this.getMathMLSelection(message.objects.target)
                                                   : this.getSelection();
       } finally {
         sendAsyncMessage("ViewSource:GetSelectionDone", selectionDetails);
       }
     }
   },
 
   /**
    * A helper to get a path like FIXptr, but with an array instead of the
    * "tumbler" notation.
    * See FIXptr: http://lists.w3.org/Archives/Public/www-xml-linking-comments/2001AprJun/att-0074/01-NOTE-FIXptr-20010425.htm
    */
-  getPath: function(ancestor, node) {
+  getPath(ancestor, node) {
     var n = node;
     var p = n.parentNode;
     if (n == ancestor || !p)
       return null;
     var path = new Array();
     if (!path)
       return null;
     do {
@@ -1096,17 +1096,17 @@ var ViewSelectionSource = {
         }
       }
       n = p;
       p = n.parentNode;
     } while (n != ancestor && p);
     return path;
   },
 
-  getSelection: function() {
+  getSelection() {
     // These are markers used to delimit the selection during processing. They
     // are removed from the final rendering.
     // We use noncharacter Unicode codepoints to minimize the risk of clashing
     // with anything that might legitimately be present in the document.
     // U+FDD0..FDEF <noncharacters>
     const MARK_SELECTION_START = "\uFDD0";
     const MARK_SELECTION_END = "\uFDEF";
 
@@ -1234,17 +1234,17 @@ var ViewSelectionSource = {
   },
 
   /**
    * Reformat the source of a MathML node to highlight the node that was targetted.
    *
    * @param node
    *        Some element within the fragment of interest.
    */
-  getMathMLSelection: function(node) {
+  getMathMLSelection(node) {
     var Node = node.ownerDocument.defaultView.Node;
     this._lineCount = 0;
     this._startTargetLine = 0;
     this._endTargetLine = 0;
     this._targetNode = node;
     if (this._targetNode && this._targetNode.nodeType == Node.TEXT_NODE)
       this._targetNode = this._targetNode.parentNode;
 
@@ -1283,25 +1283,25 @@ var ViewSelectionSource = {
     return { uri: "data:text/html;charset=utf-8," + encodeURIComponent(source),
              drawSelection: false, baseURI: node.ownerDocument.baseURI };
   },
 
   get wrapLongLines() {
     return Services.prefs.getBoolPref("view_source.wrap_long_lines");
   },
 
-  getInnerMarkup: function(node, indent) {
+  getInnerMarkup(node, indent) {
     var str = '';
     for (var i = 0; i < node.childNodes.length; i++) {
       str += this.getOuterMarkup(node.childNodes.item(i), indent);
     }
     return str;
   },
 
-  getOuterMarkup: function(node, indent) {
+  getOuterMarkup(node, indent) {
     var Node = node.ownerDocument.defaultView.Node;
     var newline = "";
     var padding = "";
     var str = "";
     if (node == this._targetNode) {
       this._startTargetLine = this._lineCount;
       str += '</pre><pre id="target">';
     }
@@ -1366,17 +1366,17 @@ var ViewSelectionSource = {
 
     if (node == this._targetNode) {
       this._endTargetLine = this._lineCount;
       str += '</pre><pre>';
     }
     return str;
   },
 
-  unicodeToEntity: function(text) {
+  unicodeToEntity(text) {
     const charTable = {
       '&': '&amp;<span class="entity">amp;</span>',
       '<': '&amp;<span class="entity">lt;</span>',
       '>': '&amp;<span class="entity">gt;</span>',
       '"': '&amp;<span class="entity">quot;</span>'
     };
 
     function charTableLookup(letter) {
@@ -1435,29 +1435,29 @@ let AutoCompletePopup = {
 
   MESSAGES: [
     "FormAutoComplete:HandleEnter",
     "FormAutoComplete:PopupClosed",
     "FormAutoComplete:PopupOpened",
     "FormAutoComplete:RequestFocus",
   ],
 
-  init: function() {
+  init() {
     addEventListener("unload", this);
     addEventListener("DOMContentLoaded", this);
 
     for (let messageName of this.MESSAGES) {
       addMessageListener(messageName, this);
     }
 
     this._input = null;
     this._popupOpen = false;
   },
 
-  destroy: function() {
+  destroy() {
     if (this._connected) {
       let controller = Cc["@mozilla.org/satchel/form-fill-controller;1"]
                          .getService(Ci.nsIFormFillController);
       controller.detachFromBrowser(docShell);
       this._connected = false;
     }
 
     removeEventListener("unload", this);
@@ -1537,51 +1537,51 @@ let AutoCompletePopup = {
     // selectedIndex is trivial to catch (e.g. moving the mouse over the
     // list).
     return sendSyncMessage("FormAutoComplete:GetSelectedIndex", {});
   },
   get popupOpen() {
     return this._popupOpen;
   },
 
-  openAutocompletePopup: function(input, element) {
+  openAutocompletePopup(input, element) {
     if (this._popupOpen || !input) {
       return;
     }
 
     let rect = BrowserUtils.getElementBoundingScreenRect(element);
     let window = element.ownerDocument.defaultView;
     let dir = window.getComputedStyle(element).direction;
     let results = this.getResultsFromController(input);
 
     sendAsyncMessage("FormAutoComplete:MaybeOpenPopup",
                      { results, rect, dir });
     this._input = input;
   },
 
-  closePopup: function() {
+  closePopup() {
     // We set this here instead of just waiting for the
     // PopupClosed message to do it so that we don't end
     // up in a state where the content thinks that a popup
     // is open when it isn't (or soon won't be).
     this._popupOpen = false;
     sendAsyncMessage("FormAutoComplete:ClosePopup", {});
   },
 
-  invalidate: function() {
+  invalidate() {
     if (this._popupOpen) {
       let results = this.getResultsFromController(this._input);
       sendAsyncMessage("FormAutoComplete:Invalidate", { results });
     }
   },
 
-  selectBy: function(reverse, page) {
+  selectBy(reverse, page) {
     this._index = sendSyncMessage("FormAutoComplete:SelectBy", {
-      reverse: reverse,
-      page: page
+      reverse,
+      page
     });
   },
 
   getResultsFromController(inputField) {
     let results = [];
 
     if (!inputField) {
       return results;
@@ -1612,88 +1612,88 @@ AutoCompletePopup.init();
  * DateTimePickerListener is the communication channel between the input box
  * (content) for date/time input types and its picker (chrome).
  */
 let DateTimePickerListener = {
   /**
    * On init, just listen for the event to open the picker, once the picker is
    * opened, we'll listen for update and close events.
    */
-  init: function() {
+  init() {
     addEventListener("MozOpenDateTimePicker", this);
     this._inputElement = null;
 
     addEventListener("unload", () => {
       this.uninit();
     });
   },
 
-  uninit: function() {
+  uninit() {
     removeEventListener("MozOpenDateTimePicker", this);
     this._inputElement = null;
   },
 
   /**
    * Cleanup function called when picker is closed.
    */
-  close: function() {
+  close() {
     this.removeListeners();
     this._inputElement.setDateTimePickerState(false);
     this._inputElement = null;
   },
 
   /**
    * Called after picker is opened to start listening for input box update
    * events.
    */
-  addListeners: function() {
+  addListeners() {
     addEventListener("MozUpdateDateTimePicker", this);
     addEventListener("MozCloseDateTimePicker", this);
     addEventListener("pagehide", this);
 
     addMessageListener("FormDateTime:PickerValueChanged", this);
     addMessageListener("FormDateTime:PickerClosed", this);
   },
 
   /**
    * Stop listeneing for events when picker is closed.
    */
-  removeListeners: function() {
+  removeListeners() {
     removeEventListener("MozUpdateDateTimePicker", this);
     removeEventListener("MozCloseDateTimePicker", this);
     removeEventListener("pagehide", this);
 
     removeMessageListener("FormDateTime:PickerValueChanged", this);
     removeMessageListener("FormDateTime:PickerClosed", this);
   },
 
   /**
    * Helper function that returns the CSS direction property of the element.
    */
-  getComputedDirection: function(aElement) {
+  getComputedDirection(aElement) {
     return aElement.ownerDocument.defaultView.getComputedStyle(aElement)
       .getPropertyValue("direction");
   },
 
   /**
    * Helper function that returns the rect of the element, which is the position
    * relative to the left/top of the content area.
    */
-  getBoundingContentRect: function(aElement) {
+  getBoundingContentRect(aElement) {
     return BrowserUtils.getElementBoundingRect(aElement);
   },
 
-  getTimePickerPref: function() {
+  getTimePickerPref() {
     return Services.prefs.getBoolPref("dom.forms.datetime.timepicker");
   },
 
   /**
    * nsIMessageListener.
    */
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     switch (aMessage.name) {
       case "FormDateTime:PickerClosed": {
         this.close();
         break;
       }
       case "FormDateTime:PickerValueChanged": {
         this._inputElement.updateDateTimeInputBox(aMessage.data);
         break;
@@ -1702,17 +1702,17 @@ let DateTimePickerListener = {
         break;
     }
   },
 
   /**
    * nsIDOMEventListener, for chrome events sent by the input element and other
    * DOM events.
    */
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "MozOpenDateTimePicker": {
         // Time picker is disabled when preffed off
         if (!(aEvent.originalTarget instanceof content.HTMLInputElement) ||
             (aEvent.originalTarget.type == "time" && !this.getTimePickerPref())) {
           return;
         }
         this._inputElement = aEvent.originalTarget;
@@ -1764,30 +1764,30 @@ DateTimePickerListener.init();
 
 /*
  * Telemetry probe to track the amount of scrolling a user does up and down the root frame
  * of a page, and also the maximum distance a user scrolls down the root frame of a page.
  * This doesn't include scrolling sub frames, but does include scrolling from JavaScript.
  * See bug 1312881 and bug 1297867 for more details.
  */
 let TelemetryScrollTracker = {
-  init: function() {
+  init() {
     this._ignore = false;
     this._prevScrollY = 0;
     this._maxScrollY = 0;
     this._amountHistogram = Services.telemetry.getHistogramById("TOTAL_SCROLL_Y");
     this._maxHistogram = Services.telemetry.getHistogramById("PAGE_MAX_SCROLL_Y");
 
     addEventListener("DOMWindowCreated", this, { passive: true });
     addEventListener("pageshow", this, { passive: true });
     addEventListener("scroll", this, { passive: true });
     addEventListener("pagehide", this, { passive: true });
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     if (aEvent.target !== content.document) {
       return;
     }
 
     switch (aEvent.type) {
       case "DOMWindowCreated": {
         this._ignore = this.shouldIgnorePage();
         this._prevScrollY = 0;
@@ -1817,15 +1817,15 @@ let TelemetryScrollTracker = {
         }
 
         this._maxHistogram.add(this._maxScrollY);
         break;
       }
     }
   },
 
-  shouldIgnorePage: function() {
+  shouldIgnorePage() {
     return content.location == "" ||
            content.location.protocol === "about:";
   }
 };
 
 TelemetryScrollTracker.init();
--- a/toolkit/content/contentAreaUtils.js
+++ b/toolkit/content/contentAreaUtils.js
@@ -193,20 +193,20 @@ function saveBrowser(aBrowser, aSkipProm
   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, {
-    onDocumentReady: function(document) {
+    onDocumentReady(document) {
       saveDocument(document, aSkipPrompt);
     },
-    onError: function(status) {
+    onError(status) {
       throw new Components.Exception("saveBrowser failed asynchronously in startPersistence",
                                      status, stack);
     }
   });
 }
 
 // Saves a document; aDocument can be an nsIWebBrowserPersistDocument
 // (see saveBrowser, above) or an nsIDOMDocument.
@@ -421,21 +421,21 @@ function internalSave(aURL, aDocument, a
       charset = aReferrer.originCharset;
     var fileInfo = new FileInfo(aDefaultFileName);
     initFileInfo(fileInfo, aURL, charset, aDocument,
                  aContentType, aContentDisposition);
     sourceURI = fileInfo.uri;
 
     var fpParams = {
       fpTitleKey: aFilePickerTitleKey,
-      fileInfo: fileInfo,
+      fileInfo,
       contentType: aContentType,
-      saveMode: saveMode,
+      saveMode,
       saveAsType: kSaveAsType_Complete,
-      file: file
+      file
     };
 
     // Find a URI to use for determining last-downloaded-to directory
     let relatedURI = aReferrer || sourceURI;
 
     promiseTargetFile(fpParams, aSkipPrompt, relatedURI).then(aDialogAccepted => {
       if (!aDialogAccepted)
         return;
@@ -463,25 +463,25 @@ function internalSave(aURL, aDocument, a
     let isPrivate = aIsContentWindowPrivate;
     if (isPrivate === undefined) {
       isPrivate = aInitiatingDocument instanceof Components.interfaces.nsIDOMDocument
         ? PrivateBrowsingUtils.isContentWindowPrivate(aInitiatingDocument.defaultView)
         : aInitiatingDocument.isPrivate;
     }
 
     var persistArgs = {
-      sourceURI         : sourceURI,
+      sourceURI,
       sourceReferrer    : aReferrer,
       sourceDocument    : useSaveDocument ? aDocument : null,
       targetContentType : (saveAsType == kSaveAsType_Text) ? "text/plain" : null,
       targetFile        : file,
       sourceCacheKey    : aCacheKey,
       sourcePostData    : nonCPOWDocument ? getPostData(aDocument) : null,
       bypassCache       : aShouldBypassCache,
-      isPrivate         : isPrivate,
+      isPrivate,
     };
 
     // Start the actual save process
     internalPersist(persistArgs);
   }
 }
 
 /**
@@ -816,28 +816,28 @@ function DownloadURL(aURL, aFileName, aI
                                      .getInterface(Components.interfaces.nsIWebNavigation)
                                      .QueryInterface(Components.interfaces.nsILoadContext)
                                      .usePrivateBrowsing;
 
   let fileInfo = new FileInfo(aFileName);
   initFileInfo(fileInfo, aURL, null, null, null, null);
 
   let filepickerParams = {
-    fileInfo: fileInfo,
+    fileInfo,
     saveMode: SAVEMODE_FILEONLY
   };
 
   Task.spawn(function* () {
     let accepted = yield promiseTargetFile(filepickerParams, true, fileInfo.uri);
     if (!accepted)
       return;
 
     let file = filepickerParams.file;
     let download = yield Downloads.createDownload({
-      source: { url: aURL, isPrivate: isPrivate },
+      source: { url: aURL, isPrivate },
       target: { path: file.path, partFilePath: file.path + ".part" }
     });
     download.tryToKeepPartialData = true;
 
     // Ignore errors because failures are reported through the download list.
     download.start().catch(() => {});
 
     // Add the download to the list, allowing it to be managed.
@@ -1296,33 +1296,33 @@ function openURL(aURL)
             iid.equals(Components.interfaces.nsISupportsWeakReference))
           return this;
         throw Components.results.NS_ERROR_NO_INTERFACE;
       }
     }
     loadgroup.groupObserver = loadListener;
 
     var uriListener = {
-      onStartURIOpen: function(uri) { return false; },
-      doContent: function(ctype, preferred, request, handler) { return false; },
-      isPreferred: function(ctype, desired) { return false; },
-      canHandleContent: function(ctype, preferred, desired) { return false; },
+      onStartURIOpen(uri) { return false; },
+      doContent(ctype, preferred, request, handler) { return false; },
+      isPreferred(ctype, desired) { return false; },
+      canHandleContent(ctype, preferred, desired) { return false; },
       loadCookie: null,
       parentContentListener: null,
-      getInterface: function(iid) {
+      getInterface(iid) {
         if (iid.equals(Components.interfaces.nsIURIContentListener))
           return this;
         if (iid.equals(Components.interfaces.nsILoadGroup))
           return loadgroup;
         throw Components.results.NS_ERROR_NO_INTERFACE;
       }
     }
 
     var channel = NetUtil.newChannel({
-      uri: uri,
+      uri,
       loadUsingSystemPrincipal: true
     });
 
     var uriLoader = Components.classes["@mozilla.org/uriloader;1"]
                               .getService(Components.interfaces.nsIURILoader);
     uriLoader.openURI(channel,
                       Components.interfaces.nsIURILoader.IS_CONTENT_PREFERRED,
                       uriListener);
--- a/toolkit/content/findUtils.js
+++ b/toolkit/content/findUtils.js
@@ -26,28 +26,28 @@ nsFindInstData.prototype =
       focusedWindow = this.window.content;
 
     return focusedWindow;
   },
   set currentSearchWindow(val) { this._current = val; },
 
   get webBrowserFind() { return this.browser.webBrowserFind; },
 
-  init : function() {
+  init() {
     var findInst = this.webBrowserFind;
     // set up the find to search the focussedWindow, bounded by the content window.
     var findInFrames = findInst.QueryInterface(Components.interfaces.nsIWebBrowserFindInFrames);
     findInFrames.rootSearchFrame = this.rootSearchWindow;
     findInFrames.currentSearchFrame = this.currentSearchWindow;
 
     // always search in frames for now. We could add a checkbox to the dialog for this.
     findInst.searchFrames = true;
   },
 
-  window : window,
+  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)
--- a/toolkit/content/finddialog.js
+++ b/toolkit/content/finddialog.js
@@ -137,15 +137,15 @@ function updateFormHistory()
     return;
 
   if (FormHistory.enabled) {
     FormHistory.update({
       op: "bump",
       fieldname: "find-dialog",
       value: dialog.findKey.value
     }, {
-      handleError: function(aError) {
+      handleError(aError) {
         Components.utils.reportError("Saving find to form history failed: " +
                                      aError.message);
       }
     });
   }
 }
--- a/toolkit/content/tests/browser/browser_bug1170531.js
+++ b/toolkit/content/tests/browser/browser_bug1170531.js
@@ -37,17 +37,17 @@ add_task(function* () {
       executeSoon(aCallback);
     }, false);
 
     executeSoon(function() {
       editMenu.open = true;
     });
   };
 
-  yield BrowserTestUtils.withNewTab({ gBrowser: gBrowser, url: "about:blank" }, function* (browser) {
+  yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" }, function* (browser) {
     let menu_cut_disabled, menu_copy_disabled;
 
     yield BrowserTestUtils.loadURI(browser, "data:text/html,<div>hello!</div>");
     browser.focus();
     yield new Promise(resolve => waitForFocus(resolve, window));
     yield new Promise(openMenu);
     menu_cut_disabled = menuPopup.querySelector("#menu_cut").getAttribute('disabled') == "true";
     is(menu_cut_disabled, false, "menu_cut should be enabled");
--- a/toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js
+++ b/toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js
@@ -158,18 +158,18 @@ body > div > div {width: 1000px;height: 
     } while (timeCompensation < 5);
 
     // Close the autoscroll popup by synthesizing Esc.
     EventUtils.synthesizeKey("VK_ESCAPE", {});
     let scrollVert = test.expected & expectScrollVert;
     let scrollHori = test.expected & expectScrollHori;
 
     yield ContentTask.spawn(gBrowser.selectedBrowser,
-                            { scrollVert : scrollVert,
-                              scrollHori: scrollHori,
+                            { scrollVert,
+                              scrollHori,
                               elemid : test.elem,
                               checkWindow: test.testwindow },
       function* (args) {
         let msg = "";
         if (args.checkWindow) {
           if (!((args.scrollVert && content.scrollY > 0) ||
                 (!args.scrollVert && content.scrollY == 0))) {
             msg += "Failed: ";
--- a/toolkit/content/tests/browser/browser_content_url_annotation.js
+++ b/toolkit/content/tests/browser/browser_content_url_annotation.js
@@ -40,17 +40,17 @@ function getMinidumpDirectory() {
 /**
  * Checks that the URL is correctly annotated on a content process crash.
  */
 add_task(function* test_content_url_annotation() {
   let url = "https://example.com/browser/toolkit/content/tests/browser/file_redirect.html";
   let redirect_url = "https://example.com/browser/toolkit/content/tests/browser/file_redirect_to.html";
 
   yield BrowserTestUtils.withNewTab({
-    gBrowser: gBrowser
+    gBrowser
   }, function* (browser) {
     ok(browser.isRemoteBrowser, "Should be a remote browser");
 
     // file_redirect.html should send us to file_redirect_to.html
     let promise = ContentTask.spawn(browser, {}, function* () {
       dump('ContentTask starting...\n');
       yield new Promise((resolve) => {
         addEventListener("RedirectDone", function listener() {
--- a/toolkit/content/tests/browser/browser_isSynthetic.js
+++ b/toolkit/content/tests/browser/browser_isSynthetic.js
@@ -2,21 +2,21 @@ function LocationChangeListener(browser)
   this.browser = browser;
   browser.addProgressListener(this);
 }
 
 LocationChangeListener.prototype = {
   wasSynthetic: false,
   browser: null,
 
-  destroy: function() {
+  destroy() {
     this.browser.removeProgressListener(this);
   },
 
-  onLocationChange: function(webProgress, request, location, flags) {
+  onLocationChange(webProgress, request, location, flags) {
     this.wasSynthetic = this.browser.isSyntheticDocument;
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
                                          Ci.nsISupportsWeakReference])
 }
 
 const FILES = gTestPath.replace("browser_isSynthetic.js", "")
--- a/toolkit/content/tests/browser/common/mockTransfer.js
+++ b/toolkit/content/tests/browser/common/mockTransfer.js
@@ -32,34 +32,34 @@ MockTransfer.prototype = {
       this._downloadIsSuccessful = false;
 
     // If the download is finished
     if ((aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) &&
         (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK))
       // Continue the test, reporting the success or failure condition.
       mockTransferCallback(this._downloadIsSuccessful);
   },
-  onProgressChange: function() {},
-  onLocationChange: function() {},
+  onProgressChange() {},
+  onLocationChange() {},
   onStatusChange: function MTFC_onStatusChange(aWebProgress, aRequest, aStatus,
                                                aMessage) {
     // If at least one notification reported an error, the download failed.
     if (!Components.isSuccessCode(aStatus))
       this._downloadIsSuccessful = false;
   },
-  onSecurityChange: function() {},
+  onSecurityChange() {},
 
   /* nsIWebProgressListener2 */
-  onProgressChange64: function() {},
-  onRefreshAttempted: function() {},
+  onProgressChange64() {},
+  onRefreshAttempted() {},
 
   /* nsITransfer */
-  init: function() {},
-  setSha256Hash: function() {},
-  setSignatureInfo: function() {}
+  init() {},
+  setSha256Hash() {},
+  setSignatureInfo() {}
 };
 
 // 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.
--- a/toolkit/content/tests/chrome/file_autocomplete_with_composition.js
+++ b/toolkit/content/tests/chrome/file_autocomplete_with_composition.js
@@ -40,20 +40,20 @@ function nsDoTestsForAutoCompleteWithCom
 nsDoTestsForAutoCompleteWithComposition.prototype = {
   _window: null,
   _target: null,
   _controller: null,
   _DefaultCompleteDefaultIndex: false,
   _description: "",
 
   _is: null,
-  _getTargetValue: function() { return "not initialized"; },
+  _getTargetValue() { return "not initialized"; },
   _onFinish: null,
 
-  _doTests: function()
+  _doTests()
   {
     if (++this._testingIndex == this._tests.length) {
       this._controller.input.completeDefaultIndex =
         this._DefaultCompleteDefaultIndex;
       this._onFinish();
       return;
     }
 
@@ -65,17 +65,17 @@ nsDoTestsForAutoCompleteWithComposition.
 
     waitForCondition(() => {
       return this._controller.searchStatus >=
              Components.interfaces.nsIAutoCompleteController.STATUS_COMPLETE_NO_MATCH;
     },
     this._checkResult.bind(this));
   },
 
-  _checkResult: function()
+  _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");
@@ -84,155 +84,155 @@ nsDoTestsForAutoCompleteWithComposition.
 
   _testingIndex: -1,
   _tests: [
     // Simple composition when popup hasn't been shown.
     // The autocomplete popup should not be shown during composition, but
     // after compositionend, the popup should be shown.
     { description: "compositionstart shouldn't open the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "M",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 1, "length": 0 },
             "key": { key: "M", code: "KeyM", keyCode: KeyboardEvent.DOM_VK_M,
                      shiftKey: true },
           }, aWindow);
       }, popup: false, value: "M", searchString: ""
     },
     { description: "modifying composition string shouldn't open the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "Mo",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 2, "length": 0 },
             "key": { key: "o", code: "KeyO", keyCode: KeyboardEvent.DOM_VK_O },
           }, aWindow);
       }, popup: false, value: "Mo", searchString: ""
     },
     { description: "compositionend should open the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeComposition({ type: "compositioncommitasis",
           key: { key: "KEY_Enter", code: "Enter" } }, aWindow);
       }, popup: true, value: "Mo", searchString: "Mo"
     },
     // If composition starts when popup is shown, the compositionstart event
     // should cause closing the popup.
     { description: "compositionstart should close the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "z",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 1, "length": 0 },
             "key": { key: "z", code: "KeyZ", keyCode: KeyboardEvent.DOM_VK_Z },
           }, aWindow);
       }, popup: false, value: "Moz", searchString: "Mo"
     },
     { description: "modifying composition string shouldn't reopen the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "zi",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 2, "length": 0 },
             "key": { key: "i", code: "KeyI", keyCode: KeyboardEvent.DOM_VK_I },
           }, aWindow);
       }, popup: false, value: "Mozi", searchString: "Mo"
     },
     { description: "compositionend should research the result and open the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeComposition({ type: "compositioncommitasis",
           key: { key: "KEY_Enter", code: "Enter" } }, aWindow);
       }, popup: true, value: "Mozi", searchString: "Mozi"
     },
     // If composition is cancelled, the value shouldn't be changed.
     { description: "compositionstart should reclose the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "l",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 1, "length": 0 },
             "key": { key: "l", code: "KeyL", keyCode: KeyboardEvent.DOM_VK_L },
           }, aWindow);
       }, popup: false, value: "Mozil", searchString: "Mozi"
     },
     { description: "modifying composition string shouldn't reopen the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "ll",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 2, "length": 0 },
             "key": { key: "l", code: "KeyL", keyCode: KeyboardEvent.DOM_VK_L },
           }, aWindow);
       }, popup: false, value: "Mozill", searchString: "Mozi"
     },
     { description: "modifying composition string to empty string shouldn't reopen the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "",
               "clauses":
               [
                 { "length": 0, "attr": 0 }
               ]
             },
             "caret": { "start": 0, "length": 0 }
           }, aWindow);
       }, popup: false, value: "Mozi", searchString: "Mozi"
     },
     { description: "cancled compositionend should reopen the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeComposition({ type: "compositioncommit", data: "",
           key: { key: "KEY_Escape", code: "Escape" } }, aWindow);
       }, popup: true, value: "Mozi", searchString: "Mozi"
     },
     // But if composition replaces some characters and canceled, the search
     // string should be the latest value.
     { description: "compositionstart with selected string should close the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeKey("VK_LEFT", { shiftKey: true }, aWindow);
         synthesizeKey("VK_LEFT", { shiftKey: true }, aWindow);
         synthesizeCompositionChange(
           { "composition":
             { "string": "z",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
@@ -240,299 +240,299 @@ nsDoTestsForAutoCompleteWithComposition.
             },
             "caret": { "start": 1, "length": 0 },
             "key": { key: "z", code: "KeyZ", keyCode: KeyboardEvent.DOM_VK_Z },
           }, aWindow);
       }, popup: false, value: "Moz", searchString: "Mozi"
     },
     { description: "modifying composition string shouldn't reopen the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "zi",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 2, "length": 0 },
             "key": { key: "i", code: "KeyI", keyCode: KeyboardEvent.DOM_VK_I },
           }, aWindow);
       }, popup: false, value: "Mozi", searchString: "Mozi"
     },
     { description: "modifying composition string to empty string shouldn't reopen the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "",
               "clauses":
               [
                 { "length": 0, "attr": 0 }
               ]
             },
             "caret": { "start": 0, "length": 0 }
           }, aWindow);
       }, popup: false, value: "Mo", searchString: "Mozi"
     },
     { description: "canceled compositionend should search the result with the latest value",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeComposition({ type: "compositioncommitasis",
           key: { key: "KEY_Escape", code: "Escape" } }, aWindow);
       }, popup: true, value: "Mo", searchString: "Mo"
     },
     // If all characters are removed, the popup should be closed.
     { description: "the value becomes empty by backspace, the popup should be closed",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeKey("VK_BACK_SPACE", {}, aWindow);
         synthesizeKey("VK_BACK_SPACE", {}, aWindow);
       }, popup: false, value: "", searchString: ""
     },
     // composition which is canceled shouldn't cause opening the popup.
     { description: "compositionstart shouldn't open the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "M",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 1, "length": 0 },
             "key": { key: "m", code: "KeyM", keyCode: KeyboardEvent.DOM_VK_M,
                      shiftKey: true },
           }, aWindow);
       }, popup: false, value: "M", searchString: ""
     },
     { description: "modifying composition string shouldn't open the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "Mo",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 2, "length": 0 },
             "key": { key: "o", code: "KeyO", keyCode: KeyboardEvent.DOM_VK_O },
           }, aWindow);
       }, popup: false, value: "Mo", searchString: ""
     },
     { description: "modifying composition string to empty string shouldn't open the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "",
               "clauses":
               [
                 { "length": 0, "attr": 0 }
               ]
             },
             "caret": { "start": 0, "length": 0 }
           }, aWindow);
       }, popup: false, value: "", searchString: ""
     },
     { description: "canceled compositionend shouldn't open the popup if it was closed",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeComposition({ type: "compositioncommitasis",
           key: { key: "KEY_Escape", code: "Escape" } }, aWindow);
       }, popup: false, value: "", searchString: ""
     },
     // Down key should open the popup even if the editor is empty.
     { description: "DOWN key should open the popup even if the value is empty",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeKey("VK_DOWN", {}, aWindow);
       }, popup: true, value: "", searchString: ""
     },
     // If popup is open at starting composition, the popup should be reopened
     // after composition anyway.
     { description: "compositionstart shouldn't open the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "M",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 1, "length": 0 },
             "key": { key: "M", code: "KeyM", keyCode: KeyboardEvent.DOM_VK_M,
                      shiftKey: true },
           }, aWindow);
       }, popup: false, value: "M", searchString: ""
     },
     { description: "modifying composition string shouldn't open the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "Mo",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 2, "length": 0 },
             "key": { key: "o", code: "KeyO", keyCode: KeyboardEvent.DOM_VK_O },
           }, aWindow);
       }, popup: false, value: "Mo", searchString: ""
     },
     { description: "modifying composition string to empty string shouldn't open the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "",
               "clauses":
               [
                 { "length": 0, "attr": 0 }
               ]
             },
             "caret": { "start": 0, "length": 0 }
           }, aWindow);
       }, popup: false, value: "", searchString: ""
     },
     { description: "canceled compositionend should open the popup if it was opened",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeComposition({ type: "compositioncommitasis",
           key: { key: "KEY_Escape", code: "Escape" } }, aWindow);
       }, popup: true, value: "", searchString: ""
     },
     // Type normally, and hit escape, the popup should be closed.
     { description: "ESCAPE should close the popup after typing something",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeKey("M", { shiftKey: true }, aWindow);
         synthesizeKey("o", { shiftKey: true }, aWindow);
         synthesizeKey("VK_ESCAPE", {}, aWindow);
       }, popup: false, value: "Mo", searchString: "Mo"
     },
     // Even if the popup is closed, composition which is canceled should open
     // the popup if the value isn't empty.
     // XXX This might not be good behavior, but anyway, this is minor issue...
     { description: "compositionstart shouldn't open the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "z",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 1, "length": 0 },
             "key": { key: "z", code: "KeyZ", keyCode: KeyboardEvent.DOM_VK_Z },
           }, aWindow);
       }, popup: false, value: "Moz", searchString: "Mo"
     },
     { description: "modifying composition string shouldn't open the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "zi",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 2, "length": 0 },
             "key": { key: "i", code: "KeyI", keyCode: KeyboardEvent.DOM_VK_I },
           }, aWindow);
       }, popup: false, value: "Mozi", searchString: "Mo"
     },
     { description: "modifying composition string to empty string shouldn't open the popup",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "",
               "clauses":
               [
                 { "length": 0, "attr": 0 }
               ]
             },
             "caret": { "start": 0, "length": 0 }
           }, aWindow);
       }, popup: false, value: "Mo", searchString: "Mo"
     },
     { description: "canceled compositionend shouldn't open the popup if the popup was closed",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeComposition({ type: "compositioncommitasis",
           key: { key: "KEY_Escape", code: "Escape" } }, aWindow);
       }, popup: true, value: "Mo", searchString: "Mo"
     },
     // House keeping...
     { description: "house keeping for next tests",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeKey("VK_BACK_SPACE", {}, aWindow);
         synthesizeKey("VK_BACK_SPACE", {}, aWindow);
       }, popup: false, value: "", searchString: ""
     },
     // Testing for nsIAutoCompleteInput.completeDefaultIndex being true.
     { description: "compositionstart shouldn't open the popup (completeDefaultIndex is true)",
       completeDefaultIndex: true,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "M",
               "clauses":
               [
                 { "length": 1, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 1, "length": 0 },
             "key": { key: "M", code: "KeyM", keyCode: KeyboardEvent.DOM_VK_M,
                      shiftKey: true },
           }, aWindow);
       }, popup: false, value: "M", searchString: ""
     },
     { description: "modifying composition string shouldn't open the popup (completeDefaultIndex is true)",
       completeDefaultIndex: true,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeCompositionChange(
           { "composition":
             { "string": "Mo",
               "clauses":
               [
                 { "length": 2, "attr": COMPOSITION_ATTR_RAW_CLAUSE }
               ]
             },
             "caret": { "start": 2, "length": 0 },
             "key": { key: "o", code: "KeyO", keyCode: KeyboardEvent.DOM_VK_O },
           }, aWindow);
       }, popup: false, value: "Mo", searchString: ""
     },
     { description: "compositionend should open the popup (completeDefaultIndex is true)",
       completeDefaultIndex: true,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeComposition({ type: "compositioncommitasis",
           key: { key: "KEY_Enter", code: "Enter" } }, aWindow);
       }, popup: true, value: "Mozilla", searchString: "Mo"
     },
     // House keeping...
     { description: "house keeping for next tests",
       completeDefaultIndex: false,
-      execute: function(aWindow) {
+      execute(aWindow) {
         synthesizeKey("VK_BACK_SPACE", {}, aWindow);
         synthesizeKey("VK_BACK_SPACE", {}, aWindow);
         synthesizeKey("VK_BACK_SPACE", {}, aWindow);
         synthesizeKey("VK_BACK_SPACE", {}, aWindow);
         synthesizeKey("VK_BACK_SPACE", {}, aWindow);
         synthesizeKey("VK_BACK_SPACE", {}, aWindow);
       }, popup: false, value: "", searchString: ""
     }
--- a/toolkit/content/tests/chrome/popup_trigger.js
+++ b/toolkit/content/tests/chrome/popup_trigger.js
@@ -40,23 +40,23 @@ function runTests()
 
   startPopupTests(popupTests);
 }
 
 var popupTests = [
 {
   testname: "mouse click on trigger",
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
-  test: function() {
+  test() {
     // for menus, no trigger will be set. For non-menus using the popup
     // attribute, the trigger will be set to the node with the popup attribute
     gExpectedTriggerNode = gIsMenu ? "notset" : gTrigger;
     synthesizeMouse(gTrigger, 4, 4, { });
   },
-  result: function(testname) {
+  result(testname) {
     gExpectedTriggerNode = null;
     // menus are the anchor but non-menus are opened at screen coordinates
     is(gMenuPopup.anchorNode, gIsMenu ? gTrigger : null, testname + " anchorNode");
     // menus are opened internally, but non-menus have a mouse event which
     // triggered them
     is(gMenuPopup.triggerNode, gIsMenu ? null : gTrigger, testname + " triggerNode");
     is(document.popupNode, gIsMenu ? null : gTrigger, testname + " document.popupNode");
     is(document.tooltipNode, null, testname + " document.tooltipNode");
@@ -77,112 +77,112 @@ var popupTests = [
       compareEdge(gTrigger, gMenuPopup, "after_start", 0, 0, testname);
   }
 },
 {
   // check that pressing cursor down while there is no selection
   // highlights the first item
   testname: "cursor down no selection",
   events: [ "DOMMenuItemActive item1" ],
-  test: function() { synthesizeKey("VK_DOWN", { }); },
-  result: function(testname) { checkActive(gMenuPopup, "item1", testname); }
+  test() { synthesizeKey("VK_DOWN", { }); },
+  result(testname) { checkActive(gMenuPopup, "item1", testname); }
 },
 {
   // check that pressing cursor up wraps and highlights the last item
   testname: "cursor up wrap",
-  events: function() {
+  events() {
     // No wrapping on menus on Mac
     return platformIsMac() ? [] : [ "DOMMenuItemInactive item1", "DOMMenuItemActive last" ]
   },
-  test: function() { synthesizeKey("VK_UP", { }); },
-  result: function(testname) {
+  test() { synthesizeKey("VK_UP", { }); },
+  result(testname) {
     checkActive(gMenuPopup, platformIsMac() ? "item1" : "last", testname);
   }
 },
 {
   // check that pressing cursor down wraps and highlights the first item
   testname: "cursor down wrap",
-  condition: function() { return !platformIsMac() },
+  condition() { return !platformIsMac() },
   events: ["DOMMenuItemInactive last", "DOMMenuItemActive item1" ],
-  test: function() { synthesizeKey("VK_DOWN", { }); },
-  result: function(testname) { checkActive(gMenuPopup, "item1", testname); }
+  test() { synthesizeKey("VK_DOWN", { }); },
+  result(testname) { checkActive(gMenuPopup, "item1", testname); }
 },
 {
   // check that pressing cursor down highlights the second item
   testname: "cursor down",
   events: [ "DOMMenuItemInactive item1", "DOMMenuItemActive item2" ],
-  test: function() { synthesizeKey("VK_DOWN", { }); },
-  result: function(testname) { checkActive(gMenuPopup, "item2", testname); }
+  test() { synthesizeKey("VK_DOWN", { }); },
+  result(testname) { checkActive(gMenuPopup, "item2", testname); }
 },
 {
   // check that pressing cursor up highlights the second item
   testname: "cursor up",
   events: [ "DOMMenuItemInactive item2", "DOMMenuItemActive item1" ],
-  test: function() { synthesizeKey("VK_UP", { }); },
-  result: function(testname) { checkActive(gMenuPopup, "item1", testname); }
+  test() { synthesizeKey("VK_UP", { }); },
+  result(testname) { checkActive(gMenuPopup, "item1", testname); }
 },
 {
   // cursor left should not do anything
   testname: "cursor left",
-  test: function() { synthesizeKey("VK_LEFT", { }); },
-  result: function(testname) { checkActive(gMenuPopup, "item1", testname); }
+  test() { synthesizeKey("VK_LEFT", { }); },
+  result(testname) { checkActive(gMenuPopup, "item1", testname); }
 },
 {
   // cursor right should not do anything
   testname: "cursor right",
-  test: function() { synthesizeKey("VK_RIGHT", { }); },
-  result: function(testname) { checkActive(gMenuPopup, "item1", testname); }
+  test() { synthesizeKey("VK_RIGHT", { }); },
+  result(testname) { checkActive(gMenuPopup, "item1", testname); }
 },
 {
   // check cursor down when a disabled item exists in the menu
   testname: "cursor down disabled",
-  events: function() {
+  events() {
     // On Windows, disabled items are included when navigating, but on
     // other platforms, disabled items are skipped over
     if (navigator.platform.indexOf("Win") == 0) {
       return [ "DOMMenuItemInactive item1", "DOMMenuItemActive item2" ];
     }
     return [ "DOMMenuItemInactive item1", "DOMMenuItemActive amenu" ];
   },
-  test: function() {
+  test() {
     document.getElementById("item2").disabled = true;
     synthesizeKey("VK_DOWN", { });
   }
 },
 {
   // check cursor up when a disabled item exists in the menu
   testname: "cursor up disabled",
-  events: function() {
+  events() {
     if (navigator.platform.indexOf("Win") == 0) {
       return [ "DOMMenuItemInactive item2", "DOMMenuItemActive amenu",
                "DOMMenuItemInactive amenu", "DOMMenuItemActive item2",
                "DOMMenuItemInactive item2", "DOMMenuItemActive item1" ];
     }
     return [ "DOMMenuItemInactive amenu", "DOMMenuItemActive item1" ];
   },
-  test: function() {
+  test() {
     if (navigator.platform.indexOf("Win") == 0)
       synthesizeKey("VK_DOWN", { });
     synthesizeKey("VK_UP", { });
     if (navigator.platform.indexOf("Win") == 0)
       synthesizeKey("VK_UP", { });
   }
 },
 {
   testname: "mouse click outside",
   events: [ "popuphiding thepopup", "popuphidden thepopup",
             "DOMMenuItemInactive item1", "DOMMenuInactive thepopup" ],
-  test: function() {
+  test() {
     gMenuPopup.hidePopup();
     // XXXndeakin event simulation fires events outside of the platform specific
     // widget code so the popup capturing isn't handled. Thus, the menu won't
     // rollup this way.
     // synthesizeMouse(gTrigger, 0, -12, { });
   },
-  result: function(testname, step) {
+  result(testname, step) {
     is(gMenuPopup.anchorNode, null, testname + " anchorNode");
     is(gMenuPopup.triggerNode, null, testname + " triggerNode");
     is(document.popupNode, null, testname + " document.popupNode");
     checkClosed("trigger", testname);
   }
 },
 {
   // these tests check to ensure that passing an anchor and position
@@ -191,21 +191,21 @@ var popupTests = [
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
   steps: ["before_start", "before_end", "after_start", "after_end",
           "start_before", "start_after", "end_before", "end_after", "after_pointer", "overlap",
           "topleft topleft", "topcenter topleft", "topright topleft",
           "leftcenter topright", "rightcenter topright",
           "bottomleft bottomleft", "bottomcenter bottomleft", "bottomright bottomleft",
           "topleft bottomright", "bottomcenter bottomright", "rightcenter topright"],
-  test: function(testname, step) {
+  test(testname, step) {
     gExpectedTriggerNode = "notset";
     gMenuPopup.openPopup(gTrigger, step, 0, 0, false, false);
   },
-  result: function(testname, step) {
+  result(testname, step) {
     // no triggerNode because it was opened without passing an event
     gExpectedTriggerNode = null;
     is(gMenuPopup.anchorNode, gTrigger, testname + " anchorNode");
     is(gMenuPopup.triggerNode, null, testname + " triggerNode");
     is(document.popupNode, null, testname + " document.popupNode");
     compareEdge(gTrigger, gMenuPopup, step, 0, 0, testname);
   }
 },
@@ -215,21 +215,21 @@ var popupTests = [
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
   steps: ["before_start", "before_end", "after_start", "after_end",
           "start_before", "start_after", "end_before", "end_after", "after_pointer", "overlap",
           "topleft topleft", "topcenter topleft", "topright topleft",
           "leftcenter topright", "rightcenter topright",
           "bottomleft bottomleft", "bottomcenter bottomleft", "bottomright bottomleft",
           "topleft bottomright", "bottomcenter bottomright", "rightcenter topright"],
-  test: function(testname, step) {
+  test(testname, step) {
     gMenuPopup.setAttribute("style", "margin: 10px;");
     gMenuPopup.openPopup(gTrigger, step, 0, 0, false, false);
   },
-  result: function(testname, step) {
+  result(testname, step) {
     var rightmod = step == "before_end" || step == "after_end" ||
                    step == "start_before" || step == "start_after" ||
                    step.match(/topright$/) || step.match(/bottomright$/);
     var bottommod = step == "before_start" || step == "before_end" ||
                     step == "start_after" || step == "end_after" ||
                    step.match(/bottomleft$/) || step.match(/bottomright$/);
     compareEdge(gTrigger, gMenuPopup, step, rightmod ? -10 : 10, bottommod ? -10 : 10, testname);
     gMenuPopup.removeAttribute("style");
@@ -237,40 +237,40 @@ var popupTests = [
 },
 {
   // these tests check the same but with a -8 pixel margin on the popup
   testname: "open popup anchored with negative margin",
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
   steps: ["before_start", "before_end", "after_start", "after_end",
           "start_before", "start_after", "end_before", "end_after", "after_pointer", "overlap"],
-  test: function(testname, step) {
+  test(testname, step) {
     gMenuPopup.setAttribute("style", "margin: -8px;");
     gMenuPopup.openPopup(gTrigger, step, 0, 0, false, false);
   },
-  result: function(testname, step) {
+  result(testname, step) {
     var rightmod = step == "before_end" || step == "after_end" ||
                    step == "start_before" || step == "start_after";
     var bottommod = step == "before_start" || step == "before_end" ||
                     step == "start_after" || step == "end_after";
     compareEdge(gTrigger, gMenuPopup, step, rightmod ? 8 : -8, bottommod ? 8 : -8, testname);
     gMenuPopup.removeAttribute("style");
   }
 },
  {
   testname: "open popup with large positive margin",
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
   steps: ["before_start", "before_end", "after_start", "after_end",
           "start_before", "start_after", "end_before", "end_after", "after_pointer", "overlap"],
-  test: function(testname, step) {
+  test(testname, step) {
     gMenuPopup.setAttribute("style", "margin: 1000px;");
     gMenuPopup.openPopup(gTrigger, step, 0, 0, false, false);
   },
-  result: function(testname, step) {
+  result(testname, step) {
     var popuprect = gMenuPopup.getBoundingClientRect();
     // as there is more room on the 'end' or 'after' side, popups will always
     // appear on the right or bottom corners, depending on which side they are
     // allowed to be flipped by.
     var expectedleft = step == "before_end" || step == "after_end" ?
                        0 : Math.round(window.innerWidth - gPopupWidth);
     var expectedtop = step == "start_after" || step == "end_after" ?
                       0 : Math.round(window.innerHeight - gPopupHeight);
@@ -280,190 +280,190 @@ var popupTests = [
   }
 },
 {
   testname: "open popup with large negative margin",
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
   steps: ["before_start", "before_end", "after_start", "after_end",
           "start_before", "start_after", "end_before", "end_after", "after_pointer", "overlap"],
-  test: function(testname, step) {
+  test(testname, step) {
     gMenuPopup.setAttribute("style", "margin: -1000px;");
     gMenuPopup.openPopup(gTrigger, step, 0, 0, false, false);
   },
-  result: function(testname, step) {
+  result(testname, step) {
     var popuprect = gMenuPopup.getBoundingClientRect();
     // using negative margins causes the reverse of positive margins, and
     // popups will appear on the left or top corners.
     var expectedleft = step == "before_end" || step == "after_end" ?
                        Math.round(window.innerWidth - gPopupWidth) : 0;
     var expectedtop = step == "start_after" || step == "end_after" ?
                       Math.round(window.innerHeight - gPopupHeight) : 0;
     is(Math.round(popuprect.left), expectedleft, testname + " x position " + step);
     is(Math.round(popuprect.top), expectedtop, testname + " y position " + step);
     gMenuPopup.removeAttribute("style");
   }
 },
 {
   testname: "popup with unknown step",
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
-  test: function() {
+  test() {
     gMenuPopup.openPopup(gTrigger, "other", 0, 0, false, false);
   },
-  result: function(testname) {
+  result(testname) {
     var triggerrect = gMenuPopup.getBoundingClientRect();
     var popuprect = gMenuPopup.getBoundingClientRect();
     is(Math.round(popuprect.left), triggerrect.left, testname + " x position ");
     is(Math.round(popuprect.top), triggerrect.top, testname + " y position ");
   }
 },
 {
   // these tests check to ensure that the position attribute can be used
   // to set the position of a popup instead of passing it as an argument
   testname: "open popup anchored with attribute",
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
   steps: ["before_start", "before_end", "after_start", "after_end",
           "start_before", "start_after", "end_before", "end_after", "after_pointer", "overlap",
           "topcenter topleft", "topright bottomright", "leftcenter topright"],
-  test: function(testname, step) {
+  test(testname, step) {
     gMenuPopup.setAttribute("position", step);
     gMenuPopup.openPopup(gTrigger, "", 0, 0, false, false);
   },
-  result: function(testname, step) { compareEdge(gTrigger, gMenuPopup, step, 0, 0, testname); }
+  result(testname, step) { compareEdge(gTrigger, gMenuPopup, step, 0, 0, testname); }
 },
 {
   // this test checks to ensure that the attributes override flag to openPopup
   // can be used to override the popup's position. This test also passes an
   // event to openPopup to check the trigger node.
   testname: "open popup anchored with override",
   events: [ "popupshowing thepopup 0010", "popupshown thepopup" ],
-  test: function(testname, step) {
+  test(testname, step) {
     // attribute overrides the position passed in
     gMenuPopup.setAttribute("position", "end_after");
     gExpectedTriggerNode = gCachedEvent.target;
     gMenuPopup.openPopup(gTrigger, "before_start", 0, 0, false, true, gCachedEvent);
   },
-  result: function(testname, step) {
+  result(testname, step) {
     gExpectedTriggerNode = null;
     is(gMenuPopup.anchorNode, gTrigger, testname + " anchorNode");
     is(gMenuPopup.triggerNode, gCachedEvent.target, testname + " triggerNode");
     is(document.popupNode, gCachedEvent.target, testname + " document.popupNode");
     compareEdge(gTrigger, gMenuPopup, "end_after", 0, 0, testname);
   }
 },
 {
   testname: "close popup with escape",
   events: [ "popuphiding thepopup", "popuphidden thepopup",
             "DOMMenuInactive thepopup", ],
-  test: function(testname, step) {
+  test(testname, step) {
     synthesizeKey("VK_ESCAPE", { });
     checkClosed("trigger", testname);
   }
 },
 {
   // check that offsets may be supplied to the openPopup method
   testname: "open popup anchored with offsets",
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
-  test: function(testname, step) {
+  test(testname, step) {
     // attribute is empty so does not override
     gMenuPopup.setAttribute("position", "");
     gMenuPopup.openPopup(gTrigger, "before_start", 5, 10, true, true);
   },
-  result: function(testname, step) { compareEdge(gTrigger, gMenuPopup, "before_start", 5, 10, testname); }
+  result(testname, step) { compareEdge(gTrigger, gMenuPopup, "before_start", 5, 10, testname); }
 },
 {
   // these tests check to ensure that passing an anchor and position
   // puts the popup in the right place
   testname: "show popup anchored",
-  condition: function() {
+  condition() {
     // only perform this test for popups not in a menu, such as those using
     // the popup attribute, as the showPopup implementation in popup.xml
     // calls openMenu if the popup is inside a menu
     return !gIsMenu;
   },
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
   steps: [["topleft", "topleft"],
           ["topleft", "topright"], ["topleft", "bottomleft"],
           ["topright", "topleft"], ["topright", "bottomright"],
           ["bottomleft", "bottomright"], ["bottomleft", "topleft"],
           ["bottomright", "bottomleft"], ["bottomright", "topright"]],
-  test: function(testname, step) {
+  test(testname, step) {
     // the attributes should be ignored
     gMenuPopup.setAttribute("popupanchor", "topright");
     gMenuPopup.setAttribute("popupalign", "bottomright");
     gMenuPopup.setAttribute("position", "end_after");
     gMenuPopup.showPopup(gTrigger, -1, -1, "popup", step[0], step[1]);
   },
-  result: function(testname, step) {
+  result(testname, step) {
     var pos = convertPosition(step[0], step[1]);
     compareEdge(gTrigger, gMenuPopup, pos, 0, 0, testname);
     gMenuPopup.removeAttribute("popupanchor");
     gMenuPopup.removeAttribute("popupalign");
     gMenuPopup.removeAttribute("position");
   }
 },
 {
   testname: "show popup with position",
-  condition: function() { return !gIsMenu; },
+  condition() { return !gIsMenu; },
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
-  test: function(testname, step) {
+  test(testname, step) {
     gMenuPopup.showPopup(gTrigger, gScreenX + 60, gScreenY + 15,
                          "context", "topleft", "bottomright");
   },
-  result: function(testname, step) {
+  result(testname, step) {
     var rect = gMenuPopup.getBoundingClientRect();
     ok(true, gScreenX + "," + gScreenY);
     is(rect.left, 60, testname + " left");
     is(rect.top, 15, testname + " top");
     ok(rect.right, testname + " right is " + rect.right);
     ok(rect.bottom, testname + " bottom is " + rect.bottom);
   }
 },
 {
   // if no anchor is supplied to openPopup, it should be opened relative
   // to the viewport.
   testname: "open popup unanchored",
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
-  test: function(testname, step) { gMenuPopup.openPopup(null, "after_start", 6, 8, false); },
-  result: function(testname, step) {
+  test(testname, step) { gMenuPopup.openPopup(null, "after_start", 6, 8, false); },
+  result(testname, step) {
     var rect = gMenuPopup.getBoundingClientRect();
     ok(rect.left == 6 && rect.top == 8 && rect.right && rect.bottom, testname);
   }
 },
 {
   testname: "activate menuitem with mouse",
   events: [ "DOMMenuInactive thepopup", "command item3",
             "popuphiding thepopup", "popuphidden thepopup",
             "DOMMenuItemInactive item3" ],
-  test: function(testname, step) {
+  test(testname, step) {
     var item3 = document.getElementById("item3");
     synthesizeMouse(item3, 4, 4, { });
   },
-  result: function(testname, step) { checkClosed("trigger", testname); }
+  result(testname, step) { checkClosed("trigger", testname); }
 },
 {
   testname: "close popup",
-  condition: function() { return false; },
+  condition() { return false; },
   events: [ "popuphiding thepopup", "popuphidden thepopup",
             "DOMMenuInactive thepopup" ],
-  test: function(testname, step) { gMenuPopup.hidePopup(); }
+  test(testname, step) { gMenuPopup.hidePopup(); }
 },
 {
   testname: "open popup at screen",
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
-  test: function(testname, step) {
+  test(testname, step) {
     gExpectedTriggerNode = "notset";
     gMenuPopup.openPopupAtScreen(gScreenX + 24, gScreenY + 20, false);
   },
-  result: function(testname, step) {
+  result(testname, step) {
     gExpectedTriggerNode = null;
     is(gMenuPopup.anchorNode, null, testname + " anchorNode");
     is(gMenuPopup.triggerNode, null, testname + " triggerNode");
     is(document.popupNode, null, testname + " document.popupNode");
     var rect = gMenuPopup.getBoundingClientRect();
     is(rect.left, 24, testname + " left");
     is(rect.top, 20, testname + " top");
     ok(rect.right, testname + " right is " + rect.right);
@@ -475,27 +475,27 @@ var popupTests = [
   // the menuitem with the M accesskey overrides the earlier menuitem that
   // begins with M.
   testname: "menuitem accelerator",
   events: [ "DOMMenuItemActive amenu", "DOMMenuItemInactive amenu",
             "DOMMenuInactive thepopup",
             "command amenu", "popuphiding thepopup", "popuphidden thepopup",
             "DOMMenuItemInactive amenu"
            ],
-  test: function() { synthesizeKey("M", { }); },
-  result: function(testname) { checkClosed("trigger", testname); }
+  test() { synthesizeKey("M", { }); },
+  result(testname) { checkClosed("trigger", testname); }
 },
 {
   testname: "open context popup at screen",
   events: [ "popupshowing thepopup 0010", "popupshown thepopup" ],
-  test: function(testname, step) {
+  test(testname, step) {
     gExpectedTriggerNode = gCachedEvent.target;
     gMenuPopup.openPopupAtScreen(gScreenX + 8, gScreenY + 16, true, gCachedEvent);
   },
-  result: function(testname, step) {
+  result(testname, step) {
     gExpectedTriggerNode = null;
     is(gMenuPopup.anchorNode, null, testname + " anchorNode");
     is(gMenuPopup.triggerNode, gCachedEvent.target, testname + " triggerNode");
     is(document.popupNode, gCachedEvent.target, testname + " document.popupNode");
 
     var childframe = document.getElementById("childframe");
     if (childframe) {
       for (var t = 0; t < 2; t++) {
@@ -521,338 +521,338 @@ var popupTests = [
   }
 },
 {
   // pressing a letter that doesn't correspond to an accelerator, but does
   // correspond to the first letter in a menu's label. The menu should not
   // close because there is more than one item corresponding to that letter
   testname: "menuitem with non accelerator",
   events: [ "DOMMenuItemActive one" ],
-  test: function() { synthesizeKey("O", { }); },
-  result: function(testname) {
+  test() { synthesizeKey("O", { }); },
+  result(testname) {
     checkOpen("trigger", testname);
     checkActive(gMenuPopup, "one", testname);
   }
 },
 {
   // pressing the letter again should select the next one that starts with
   // that letter
   testname: "menuitem with non accelerator again",
   events: [ "DOMMenuItemInactive one", "DOMMenuItemActive submenu" ],
-  test: function() { synthesizeKey("O", { }); },
-  result: function(testname) {
+  test() { synthesizeKey("O", { }); },
+  result(testname) {
     // 'submenu' is a menu but it should not be open
     checkOpen("trigger", testname);
     checkClosed("submenu", testname);
     checkActive(gMenuPopup, "submenu", testname);
   }
 },
 {
   // open the submenu with the cursor right key
   testname: "open submenu with cursor right",
   events: [ "popupshowing submenupopup", "DOMMenuItemActive submenuitem",
             "popupshown submenupopup" ],
-  test: function() { synthesizeKey("VK_RIGHT", { }); },
-  result: function(testname) {
+  test() { synthesizeKey("VK_RIGHT", { }); },
+  result(testname) {
     checkOpen("trigger", testname);
     checkOpen("submenu", testname);
     checkActive(gMenuPopup, "submenu", testname);
     checkActive(document.getElementById("submenupopup"), "submenuitem", testname);
   }
 },
 {
   // close the submenu with the cursor left key
   testname: "close submenu with cursor left",
   events: [ "popuphiding submenupopup", "popuphidden submenupopup",
             "DOMMenuItemInactive submenuitem", "DOMMenuInactive submenupopup",
             "DOMMenuItemActive submenu" ],
-  test: function() { synthesizeKey("VK_LEFT", { }); },
-  result: function(testname) {
+  test() { synthesizeKey("VK_LEFT", { }); },
+  result(testname) {
     checkOpen("trigger", testname);
     checkClosed("submenu", testname);
     checkActive(gMenuPopup, "submenu", testname);
     checkActive(document.getElementById("submenupopup"), "", testname);
   }
 },
 {
   // open the submenu with the enter key
   testname: "open submenu with enter",
   events: [ "popupshowing submenupopup", "DOMMenuItemActive submenuitem",
             "popupshown submenupopup" ],
-  test: function() { synthesizeKey("VK_RETURN", { }); },
-  result: function(testname) {
+  test() { synthesizeKey("VK_RETURN", { }); },
+  result(testname) {
     checkOpen("trigger", testname);
     checkOpen("submenu", testname);
     checkActive(gMenuPopup, "submenu", testname);
     checkActive(document.getElementById("submenupopup"), "submenuitem", testname);
   }
 },
 {
   // close the submenu with the escape key
   testname: "close submenu with escape",
   events: [ "popuphiding submenupopup", "popuphidden submenupopup",
             "DOMMenuItemInactive submenuitem", "DOMMenuInactive submenupopup",
             "DOMMenuItemActive submenu" ],
-  test: function() { synthesizeKey("VK_ESCAPE", { }); },
-  result: function(testname) {
+  test() { synthesizeKey("VK_ESCAPE", { }); },
+  result(testname) {
     checkOpen("trigger", testname);
     checkClosed("submenu", testname);
     checkActive(gMenuPopup, "submenu", testname);
     checkActive(document.getElementById("submenupopup"), "", testname);
   }
 },
 {
   // pressing the letter again when the next item is disabled should still
   // select the disabled item on Windows, but select the next item on other
   // platforms
   testname: "menuitem with non accelerator disabled",
-  events: function() {
+  events() {
     if (navigator.platform.indexOf("Win") == 0) {
       return [ "DOMMenuItemInactive submenu", "DOMMenuItemActive other",
                "DOMMenuItemInactive other", "DOMMenuItemActive item1" ];
     }
     return [ "DOMMenuItemInactive submenu", "DOMMenuItemActive last",
              "DOMMenuItemInactive last", "DOMMenuItemActive item1" ];
   },
-  test: function() { synthesizeKey("O", { }); synthesizeKey("F", { }); },
-  result: function(testname) {
+  test() { synthesizeKey("O", { }); synthesizeKey("F", { }); },
+  result(testname) {
     checkActive(gMenuPopup, "item1", testname);
   }
 },
 {
   // pressing a letter that doesn't correspond to an accelerator nor the
   // first letter of a menu. This should have no effect.
   testname: "menuitem with keypress no accelerator found",
-  test: function() { synthesizeKey("G", { }); },
-  result: function(testname) {
+  test() { synthesizeKey("G", { }); },
+  result(testname) {
     checkOpen("trigger", testname);
     checkActive(gMenuPopup, "item1", testname);
   }
 },
 {
   // when only one menuitem starting with that letter exists, it should be
   // selected and the menu closed
   testname: "menuitem with non accelerator single",
   events: [ "DOMMenuItemInactive item1", "DOMMenuItemActive amenu",
             "DOMMenuItemInactive amenu", "DOMMenuInactive thepopup",
             "command amenu", "popuphiding thepopup", "popuphidden thepopup",
             "DOMMenuItemInactive amenu",
            ],
-  test: function() { synthesizeKey("M", { }); },
-  result: function(testname) {
+  test() { synthesizeKey("M", { }); },
+  result(testname) {
     checkClosed("trigger", testname);
     checkActive(gMenuPopup, "", testname);
   }
 },
 {
   testname: "open context popup at screen with all modifiers set",
   events: [ "popupshowing thepopup 1111", "popupshown thepopup" ],
   autohide: "thepopup",
-  test: function(testname, step) {
+  test(testname, step) {
     gMenuPopup.openPopupAtScreen(gScreenX + 8, gScreenY + 16, true, gCachedEvent2);
   }
 },
 {
   testname: "open popup with open property",
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
-  test: function(testname, step) { openMenu(gTrigger); },
-  result: function(testname, step) {
+  test(testname, step) { openMenu(gTrigger); },
+  result(testname, step) {
     checkOpen("trigger", testname);
     if (gIsMenu)
       compareEdge(gTrigger, gMenuPopup, "after_start", 0, 0, testname);
   }
 },
 {
   testname: "open submenu with open property",
   events: [ "popupshowing submenupopup", "DOMMenuItemActive submenu",
             "popupshown submenupopup" ],
-  test: function(testname, step) { openMenu(document.getElementById("submenu")); },
-  result: function(testname, step) {
+  test(testname, step) { openMenu(document.getElementById("submenu")); },
+  result(testname, step) {
     checkOpen("trigger", testname);
     checkOpen("submenu", testname);
     // XXXndeakin
     // getBoundingClientRect doesn't seem to working right for submenus
     // so disable this test for now
     // compareEdge(document.getElementById("submenu"),
     //             document.getElementById("submenupopup"), "end_before", 0, 0, testname);
   }
 },
 {
   testname: "hidePopup hides entire chain",
   events: [ "popuphiding submenupopup", "popuphidden submenupopup",
             "popuphiding thepopup", "popuphidden thepopup",
             "DOMMenuInactive submenupopup",
             "DOMMenuItemInactive submenu", "DOMMenuItemInactive submenu",
             "DOMMenuInactive thepopup", ],
-  test: function() { gMenuPopup.hidePopup(); },
-  result: function(testname, step) {
+  test() { gMenuPopup.hidePopup(); },
+  result(testname, step) {
     checkClosed("trigger", testname);
     checkClosed("submenu", testname);
   }
 },
 {
   testname: "open submenu with open property without parent open",
-  test: function(testname, step) { openMenu(document.getElementById("submenu")); },
-  result: function(testname, step) {
+  test(testname, step) { openMenu(document.getElementById("submenu")); },
+  result(testname, step) {
     checkClosed("trigger", testname);
     checkClosed("submenu", testname);
   }
 },
 {
   testname: "open popup with open property and position",
-  condition: function() { return gIsMenu; },
+  condition() { return gIsMenu; },
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
-  test: function(testname, step) {
+  test(testname, step) {
     gMenuPopup.setAttribute("position", "before_start");
     openMenu(gTrigger);
   },
-  result: function(testname, step) {
+  result(testname, step) {
     compareEdge(gTrigger, gMenuPopup, "before_start", 0, 0, testname);
   }
 },
 {
   testname: "close popup with open property",
-  condition: function() { return gIsMenu; },
+  condition() { return gIsMenu; },
   events: [ "popuphiding thepopup", "popuphidden thepopup",
             "DOMMenuInactive thepopup" ],
-  test: function(testname, step) { closeMenu(gTrigger, gMenuPopup); },
-  result: function(testname, step) { checkClosed("trigger", testname); }
+  test(testname, step) { closeMenu(gTrigger, gMenuPopup); },
+  result(testname, step) { checkClosed("trigger", testname); }
 },
 {
   testname: "open popup with open property, position, anchor and alignment",
-  condition: function() { return gIsMenu; },
+  condition() { return gIsMenu; },
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
-  test: function(testname, step) {
+  test(testname, step) {
     gMenuPopup.setAttribute("position", "start_after");
     gMenuPopup.setAttribute("popupanchor", "topright");
     gMenuPopup.setAttribute("popupalign", "bottomright");
     openMenu(gTrigger);
   },
-  result: function(testname, step) {
+  result(testname, step) {
     compareEdge(gTrigger, gMenuPopup, "start_after", 0, 0, testname);
   }
 },
 {
   testname: "open popup with open property, anchor and alignment",
-  condition: function() { return gIsMenu; },
+  condition() { return gIsMenu; },
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
-  test: function(testname, step) {
+  test(testname, step) {
     gMenuPopup.removeAttribute("position");
     gMenuPopup.setAttribute("popupanchor", "bottomright");
     gMenuPopup.setAttribute("popupalign", "topright");
     openMenu(gTrigger);
   },
-  result: function(testname, step) {
+  result(testname, step) {
     compareEdge(gTrigger, gMenuPopup, "after_end", 0, 0, testname);
     gMenuPopup.removeAttribute("popupanchor");
     gMenuPopup.removeAttribute("popupalign");
   }
 },
 {
   testname: "focus and cursor down on trigger",
-  condition: function() { return gIsMenu; },
+  condition() { return gIsMenu; },
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
-  test: function(testname, step) {
+  test(testname, step) {
     gTrigger.focus();
     synthesizeKey("VK_DOWN", { altKey: !platformIsMac() });
   },
-  result: function(testname, step) {
+  result(testname, step) {
     checkOpen("trigger", testname);
     checkActive(gMenuPopup, "", testname);
   }
 },
 {
   testname: "focus and cursor up on trigger",
-  condition: function() { return gIsMenu; },
+  condition() { return gIsMenu; },
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
-  test: function(testname, step) {
+  test(testname, step) {
     gTrigger.focus();
     synthesizeKey("VK_UP", { altKey: !platformIsMac() });
   },
-  result: function(testname, step) {
+  result(testname, step) {
     checkOpen("trigger", testname);
     checkActive(gMenuPopup, "", testname);
   }
 },
 {
   testname: "select and enter on menuitem",
-  condition: function() { return gIsMenu; },
+  condition() { return gIsMenu; },
   events: [ "DOMMenuItemActive item1", "DOMMenuItemInactive item1",
             "DOMMenuInactive thepopup", "command item1",
             "popuphiding thepopup", "popuphidden thepopup",
             "DOMMenuItemInactive item1" ],
-  test: function(testname, step) {
+  test(testname, step) {
     synthesizeKey("VK_DOWN", { });
     synthesizeKey("VK_RETURN", { });
   },
-  result: function(testname, step) { checkClosed("trigger", testname); }
+  result(testname, step) { checkClosed("trigger", testname); }
 },
 {
   testname: "focus trigger and key to open",
-  condition: function() { return gIsMenu; },
+  condition() { return gIsMenu; },
   events: [ "popupshowing thepopup", "popupshown thepopup" ],
   autohide: "thepopup",
-  test: function(testname, step) {
+  test(testname, step) {
     gTrigger.focus();
     synthesizeKey(platformIsMac() ? " " : "VK_F4", { });
   },
-  result: function(testname, step) {
+  result(testname, step) {
     checkOpen("trigger", testname);
     checkActive(gMenuPopup, "", testname);
   }
 },
 {
   // the menu should only open when the meta or alt key is not pressed
   testname: "focus trigger and key wrong modifier",
-  condition: function() { return gIsMenu; },
-  test: function(testname, step) {
+  condition() { return gIsMenu; },
+  test(testname, step) {
     gTrigger.focus();
     if (platformIsMac())
       synthesizeKey("VK_F4", { altKey: true });
     else
       synthesizeKey("", { metaKey: true });
   },
-  result: function(testname, step) {
+  result(testname, step) {
     checkClosed("trigger", testname);
   }
 },
 {
   testname: "mouse click on disabled menu",
-  condition: function() { return gIsMenu; },
-  test: function(testname, step) {
+  condition() { return gIsMenu; },
+  test(testname, step) {
     gTrigger.setAttribute("disabled", "true");
     synthesizeMouse(gTrigger, 4, 4, { });
   },
-  result: function(testname, step) {
+  result(testname, step) {
     checkClosed("trigger", testname);
     gTrigger.removeAttribute("disabled");
   }
 },
 {
   // openPopup should open the menu synchronously, however popupshown
   // is fired asynchronously
   testname: "openPopup synchronous",
   events: [ "popupshowing thepopup", "popupshowing submenupopup",
             "popupshown thepopup", "DOMMenuItemActive submenu",
             "popupshown submenupopup" ],
-  test: function(testname, step) {
+  test(testname, step) {
     gMenuPopup.openPopup(gTrigger, "after_start", 0, 0, false, true);
     document.getElementById("submenupopup").
       openPopup(gTrigger, "end_before", 0, 0, false, true);
     checkOpen("trigger", testname);
     checkOpen("submenu", testname);
   }
 },
 {
   // remove the content nodes for the popup
   testname: "remove content",
-  test: function(testname, step) {
+  test(testname, step) {
     var submenupopup = document.getElementById("submenupopup");
     submenupopup.parentNode.removeChild(submenupopup);
     var popup = document.getElementById("thepopup");
     popup.parentNode.removeChild(popup);
   }
 }
 
 ];
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js
+++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js
@@ -933,17 +933,17 @@ TileManager.CrawlIterator = function Cra
   this._queue = [];
 
   // used to prevent tiles from being enqueued twice --- "patience, we'll get to
   // it in a moment"
   this._enqueued = {};
 };
 
 TileManager.CrawlIterator.prototype = {
-  __iterator__: function*() {
+  *__iterator__() {
     while (true) {
       let tile = this.next();
       if (!tile) break;
       yield tile;
     }
   },
 
   becomeQueue: function becomeQueue() {
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js
+++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js
@@ -54,24 +54,24 @@ var reportError = log;
  * Simple container for top,left,bottom,right "border" values
  */
 function wsBorder(t, l, b, r) {
   this.setBorder(t, l, b, r);
 }
 
 wsBorder.prototype = {
 
-  setBorder: function(t, l, b, r) {
+  setBorder(t, l, b, r) {
     this.top = t;
     this.left = l;
     this.bottom = b;
     this.right = r;
   },
 
-  toString: function() {
+  toString() {
     return "[l:" + this.left + ",t:" + this.top + ",r:" + this.right + ",b:" + this.bottom + "]";
   }
 };
 
 /*
  * wsRect class
  *
  * Rectangle class, with both x/y/w/h and t/l/b/r accessors.
@@ -97,26 +97,26 @@ wsRect.prototype = {
   set y(v) {
     let diff = this.top - v;
     this.top = v;
     this.bottom -= diff;
   },
   set width(v) { this.right = this.left + v; },
   set height(v) { this.bottom = this.top + v; },
 
-  setRect: function(x, y, w, h) {
+  setRect(x, y, w, h) {
     this.left = x;
     this.top = y;
     this.right = x + w;
     this.bottom = y + h;
 
     return this;
   },
 
-  setBounds: function(t, l, b, r) {
+  setBounds(t, l, b, r) {
     this.top = t;
     this.left = l;
     this.bottom = b;
     this.right = r;
 
     return this;
   },
 
@@ -136,73 +136,73 @@ wsRect.prototype = {
     return [this.left + (this.right - this.left) / 2,
             this.top + (this.bottom - this.top) / 2];
   },
 
   centerRounded: function centerRounded() {
     return this.center().map(Math.round);
   },
 
-  copyFrom: function(r) {
+  copyFrom(r) {
     this.top = r.top;
     this.left = r.left;
     this.bottom = r.bottom;
     this.right = r.right;
 
     return this;
   },
 
-  copyFromTLBR: function(r) {
+  copyFromTLBR(r) {
     this.left = r.left;
     this.top = r.top;
     this.right = r.right;
     this.bottom = r.bottom;
 
     return this;
   },
 
-  translate: function(x, y) {
+  translate(x, y) {
     this.left += x;
     this.right += x;
     this.top += y;
     this.bottom += y;
 
     return this;
   },
 
   // return a new wsRect that is the union of that one and this one
-  union: function(rect) {
+  union(rect) {
     let l = Math.min(this.left, rect.left);
     let r = Math.max(this.right, rect.right);
     let t = Math.min(this.top, rect.top);
     let b = Math.max(this.bottom, rect.bottom);
 
     return new wsRect(l, t, r - l, b - t);
   },
 
-  toString: function() {
+  toString() {
     return "[" + this.x + "," + this.y + "," + this.width + "," + this.height + "]";
   },
 
-  expandBy: function(b) {
+  expandBy(b) {
     this.left += b.left;
     this.right += b.right;
     this.top += b.top;
     this.bottom += b.bottom;
     return this;
   },
 
-  contains: function(other) {
+  contains(other) {
     return !!(other.left >= this.left &&
               other.right <= this.right &&
               other.top >= this.top &&
               other.bottom <= this.bottom);
   },
 
-  intersect: function(r2) {
+  intersect(r2) {
     let xmost1 = this.right;
     let xmost2 = r2.right;
 
     let x = Math.max(this.left, r2.left);
 
     let temp = Math.min(xmost1, xmost2);
     if (temp <= x)
       return null;
@@ -217,17 +217,17 @@ wsRect.prototype = {
     if (temp <= y)
       return null;
 
     let height = temp - y;
 
     return new wsRect(x, y, width, height);
   },
 
-  intersects: function(other) {
+  intersects(other) {
     let xok = (other.left > this.left && other.left < this.right) ||
       (other.right > this.left && other.right < this.right) ||
       (other.left <= this.left && other.right >= this.right);
     let yok = (other.top > this.top && other.top < this.bottom) ||
       (other.bottom > this.top && other.bottom < this.bottom) ||
       (other.top <= this.top && other.bottom >= this.bottom);
     return xok && yok;
   },
@@ -375,17 +375,17 @@ WidgetStack.prototype = {
 
   _skipViewportUpdates: 0,
   _forceViewportUpdate: false,
 
   //
   // init:
   //   el: the <stack> element whose children are to be managed
   //
-  init: function(el, ew, eh) {
+  init(el, ew, eh) {
     this._el = el;
     this._widgetState = {};
     this._barriers = [];
 
     let rect = this._el.getBoundingClientRect();
     let width = rect.width;
     let height = rect.height;
 
@@ -417,17 +417,17 @@ WidgetStack.prototype = {
       this._viewportBounds = new wsRect(0, 0, 0, 0);
     }
   },
 
   // moveWidgetBy: move the widget with the given id by x,y.  Should
   // not be used on vp-relative or otherwise frozen widgets (using it
   // on the x coordinate for x-ignore widgets and similarily for y is
   // ok, as long as the other coordinate remains 0.)
-  moveWidgetBy: function(wid, x, y) {
+  moveWidgetBy(wid, x, y) {
     let state = this._getState(wid);
 
     state.rect.x += x;
     state.rect.y += y;
 
     this._commitState(state);
   },
 
@@ -467,47 +467,47 @@ WidgetStack.prototype = {
       y = this._viewingRect.y;
     this.panBy(x - this._viewingRect.x, y - this._viewingRect.y, true);
   },
 
   // freeze: set a widget as frozen.  A frozen widget won't be moved
   // in the stack -- its x,y position will still be tracked in the
   // state, but the left/top attributes won't be overwritten.  Call unfreeze
   // to move the widget back to where the ws thinks it should be.
-  freeze: function(wid) {
+  freeze(wid) {
     let state = this._getState(wid);
 
     state.frozen = true;
   },
 
-  unfreeze: function(wid) {
+  unfreeze(wid) {
     let state = this._getState(wid);
     if (!state.frozen)
       return;
 
     state.frozen = false;
     this._commitState(state);
   },
 
   // moveFrozenTo: move a frozen widget with id wid to x, y in the stack.
   // can only be used on frozen widgets
-  moveFrozenTo: function(wid, x, y) {
+  moveFrozenTo(wid, x, y) {
     let state = this._getState(wid);
     if (!state.frozen)
       throw "moveFrozenTo on non-frozen widget " + wid;
 
     state.widget.setAttribute("left", x);
     state.widget.setAttribute("top", y);
   },
 
   // moveUnfrozenTo: move an unfrozen, pannable widget with id wid to x, y in
   // the stack. should only be used on unfrozen widgets when a dynamic change
   // in position needs to be made. we basically remove, adjust and re-add
   // the widget
-  moveUnfrozenTo: function(wid, x, y) {
+  moveUnfrozenTo(wid, x, y) {
     delete this._widgetState[wid];
     let widget = document.getElementById(wid);
     if (x) widget.setAttribute("left", x);
     if (y) widget.setAttribute("top", y);
     this._addNewWidget(widget);
     this._updateWidgets();
   },
 
@@ -520,37 +520,37 @@ WidgetStack.prototype = {
   },
 
   isWidgetFrozen: function isWidgetFrozen(wid) {
     return this._getState(wid).frozen;
   },
 
   // isWidgetVisible: return true if any portion of widget with id wid is
   // visible; otherwise return false.
-  isWidgetVisible: function(wid) {
+  isWidgetVisible(wid) {
     let state = this._getState(wid);
     let visibleStackRect = new wsRect(0, 0, this._viewingRect.width, this._viewingRect.height);
 
     return visibleStackRect.intersects(state.rect);
   },
 
   // getWidgetVisibility: returns the percentage that the widget is visible
-  getWidgetVisibility: function(wid) {
+  getWidgetVisibility(wid) {
     let state = this._getState(wid);
     let visibleStackRect = new wsRect(0, 0, this._viewingRect.width, this._viewingRect.height);
 
     let visibleRect = visibleStackRect.intersect(state.rect);
     if (visibleRect)
       return [visibleRect.width / state.rect.width, visibleRect.height / state.rect.height]
 
     return [0, 0];
   },
 
   // offsetAll: add an offset to all widgets
-  offsetAll: function(x, y) {
+  offsetAll(x, y) {
     this.globalOffsetX += x;
     this.globalOffsetY += y;
 
     for (let wid in this._widgetState) {
       let state = this._widgetState[wid];
       state.rect.x += x;
       state.rect.y += y;
 
@@ -653,26 +653,26 @@ WidgetStack.prototype = {
 
   // setViewportHandler
   //  uh: A function object
   //
   // The given function object is called at the end of every drag and viewport
   // bounds change, passing in the new rect that's to be displayed in the
   // viewport.
   //
-  setViewportHandler: function(uh) {
+  setViewportHandler(uh) {
     this._viewportUpdateHandler = uh;
   },
 
   // setPanHandler
   // uh: A function object
   //
   // The given functin object is called whenever elements pan; it provides
   // the new area of the pannable bounds that's visible in the stack.
-  setPanHandler: function(uh) {
+  setPanHandler(uh) {
     this._panHandler = uh;
   },
 
   // dragStart: start a drag, with the current coordinates being clientX,clientY
   dragStart: function dragStart(clientX, clientY) {
     log("(dragStart)", clientX, clientY);
 
     if (this._dragState) {
@@ -804,17 +804,17 @@ WidgetStack.prototype = {
       this._startViewportBoundsString != this._viewportBounds.toString();
     this._callViewportUpdateHandler(boundsSizeChanged || this._forceViewportUpdate);
   },
 
   //
   // Internal code
   //
 
-  _updateWidgetRect: function(state) {
+  _updateWidgetRect(state) {
     // don't need to support updating the viewport rect at the moment
     // (we'd need to duplicate the vptarget* code from _addNewWidget if we did)
     if (state == this._viewport)
       return;
 
     let w = state.widget;
     let x = w.getAttribute("left") || 0;
     let y = w.getAttribute("top") || 0;
@@ -823,17 +823,17 @@ WidgetStack.prototype = {
                             rect.right - rect.left,
                             rect.bottom - rect.top);
     if (w.hasAttribute("widgetwidth") && w.hasAttribute("widgetheight")) {
       state.rect.width = parseInt(w.getAttribute("widgetwidth"));
       state.rect.height = parseInt(w.getAttribute("widgetheight"));
     }
   },
 
-  _dumpRects: function() {
+  _dumpRects() {
     dump("WidgetStack:\n");
     dump("\tthis._viewportBounds: " + this._viewportBounds + "\n");
     dump("\tthis._viewingRect: " + this._viewingRect + "\n");
     dump("\tthis._viewport.viewportInnerBounds: " + this._viewport.viewportInnerBounds + "\n");
     dump("\tthis._viewport.rect: " + this._viewport.rect + "\n");
     dump("\tthis._viewportOverflow: " + this._viewportOverflow + "\n");
     dump("\tthis.pannableBounds: " + this.pannableBounds + "\n");
   },
@@ -861,17 +861,17 @@ WidgetStack.prototype = {
     if (vr.bottom > pb.bottom)
       panY = pb.bottom - vr.bottom;
     else if (vr.top < pb.top)
       panY = pb.top - vr.top;
 
     this.panBy(panX, panY, true);
   },
 
-  _getState: function(wid) {
+  _getState(wid) {
     let w = this._widgetState[wid];
     if (!w)
       throw "Unknown widget id '" + wid + "'; widget not in stack";
     return w;
   },
 
   get _dragging() {
     return this._dragState && this._dragState.dragging;
@@ -925,28 +925,28 @@ WidgetStack.prototype = {
     vwib.left += this._viewport.offsetLeft;
     vwib.top += this._viewport.offsetTop;
     vwib.right += this._viewport.offsetRight;
     vwib.bottom += this._viewport.offsetBottom;
 
     this._viewportUpdateHandler.apply(window, [vwb, vwib, vis, boundsChanged]);
   },
 
-  _dragCoordsFromClient: function(cx, cy, t) {
+  _dragCoordsFromClient(cx, cy, t) {
     this._dragState.curTime = t ? t : Date.now();
     this._dragState.outerCurX = cx;
     this._dragState.outerCurY = cy;
 
     let dx = this._dragState.outerCurX - this._dragState.outerStartX;
     let dy = this._dragState.outerCurY - this._dragState.outerStartY;
     this._dragState.outerDX = dx;
     this._dragState.outerDY = dy;
   },
 
-  _panHandleBarriers: function(dx, dy) {
+  _panHandleBarriers(dx, dy) {
     // XXX unless the barriers are sorted by position, this will break
     // with multiple barriers that are near enough to eachother that a
     // drag could cross more than one.
 
     let vr = this._viewingRect;
 
     // XXX this just stops at the first horizontal and vertical barrier it finds
 
@@ -1138,17 +1138,17 @@ WidgetStack.prototype = {
     this._dragState.outerLastUpdateDY = this._dragState.outerDY;
 
     return this.panBy(dx, dy);
   },
 
   //
   // widget addition/removal
   //
-  _addNewWidget: function(w) {
+  _addNewWidget(w) {
     let wid = w.getAttribute("id");
     if (!wid) {
       reportError("WidgetStack: child widget without id!");
       return;
     }
 
     if (w.getAttribute("hidden") == "true")
       return;
@@ -1215,30 +1215,30 @@ WidgetStack.prototype = {
       state.viewportInnerBounds = new wsRect(0, 0, state.rect.width, state.rect.height);
     }
 
     this._widgetState[wid] = state;
 
     log("(New widget: " + wid + (state.viewport ? " [viewport]" : "") + " at: " + state.rect + ")");
   },
 
-  _removeWidget: function(w) {
+  _removeWidget(w) {
     let wid = w.getAttribute("id");
     delete this._widgetState[wid];
     this._updateWidgets();
   },
 
   // updateWidgets:
   //   Go through all the widgets and figure out their viewport-relative offsets.
   // If the widget goes to the left or above the viewport widget, then
   // vpOffsetXBefore or vpOffsetYBefore is set.
   // See setViewportBounds for use of vpOffset* state variables, and for how
   // the actual x and y coords of each widget are calculated based on their offsets
   // and the viewport bounds.
-  _updateWidgets: function() {
+  _updateWidgets() {
     let vp = this._viewport;
 
     for (let wid in this._widgetState) {
       let state = this._widgetState[wid];
       if (vp && state.vpRelative) {
         // compute the vpOffset from 0,0 assuming that the viewport rect is 0,0
         if (state.rect.left >= vp.rect.right) {
           state.vpOffsetXBefore = false;
@@ -1259,17 +1259,17 @@ WidgetStack.prototype = {
         log("widget", state.id, "offset", state.vpOffsetX, state.vpOffsetXBefore ? "b" : "a", state.vpOffsetY, state.vpOffsetYBefore ? "b" : "a", "rect", state.rect);
       }
     }
 
     this._updateViewportOverflow();
   },
 
   // updates the viewportOverflow/pannableBounds
-  _updateViewportOverflow: function() {
+  _updateViewportOverflow() {
     let vp = this._viewport;
     if (!vp)
       return;
 
     let ofRect = new wsRect(0, 0, this._viewingRect.width, this._viewingRect.height);
 
     for (let wid in this._widgetState) {
       let state = this._widgetState[wid];
@@ -1291,28 +1291,28 @@ WidgetStack.prototype = {
       /* right*/ Math.round(Math.max(ofRect.right - vp.rect.width, 0))
     );
 
     // clear the _pannableBounds cache, since it depends on the
     // viewportOverflow
     this._pannableBounds = null;
   },
 
-  _widgetBounds: function() {
+  _widgetBounds() {
     let r = new wsRect(0, 0, 0, 0);
 
     for (let wid in this._widgetState) {
       let state = this._widgetState[wid];
       r = r.union(state.rect);
     }
 
     return r;
   },
 
-  _commitState: function(state) {
+  _commitState(state) {
     // if the widget is frozen, don't actually update its left/top;
     // presumably the caller is managing those directly for now.
     if (state.frozen)
       return;
     let w = state.widget;
     let l = state.rect.x + state.offsetLeft;
     let t = state.rect.y + state.offsetTop;
 
@@ -1325,17 +1325,17 @@ WidgetStack.prototype = {
     if (state._top != t) {
       state._top = t;
       w.setAttribute("top", t);
     }
   },
 
   // constrain translate of rect by dx dy to bounds; return dx dy that can
   // be used to bring rect up to the edge of bounds if we'd go over.
-  _rectTranslateConstrain: function(dx, dy, rect, bounds) {
+  _rectTranslateConstrain(dx, dy, rect, bounds) {
     let newX, newY;
 
     // If the rect is larger than the bounds, allow it to increase its overlap
     let woverflow = rect.width > bounds.width;
     let hoverflow = rect.height > bounds.height;
     if (woverflow || hoverflow) {
       let intersection = rect.intersect(bounds);
       let newIntersection = rect.clone().translate(dx, dy).intersect(bounds);
@@ -1352,17 +1352,17 @@ WidgetStack.prototype = {
       newX = Math.min(Math.max(bounds.left, rect.x + dx), bounds.right - rect.width);
     if (isNaN(newY))
       newY = Math.min(Math.max(bounds.top, rect.y + dy), bounds.bottom - rect.height);
 
     return [newX - rect.x, newY - rect.y];
   },
 
   // add a new barrier from a <spacer>
-  _addNewBarrierFromSpacer: function(el) {
+  _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")
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/overlay.js
+++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/overlay.js
@@ -1,15 +1,15 @@
 var tile = {
-  onLoad: function() {
+  onLoad() {
     // initialization code
     this.initialized = true;
     this.strings = document.getElementById("tile-strings");
   },
-  onMenuItemCommand: function(e) {
+  onMenuItemCommand(e) {
     var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
                                   .getService(Components.interfaces.nsIPromptService);
     promptService.alert(window, this.strings.getString("helloMessageTitle"),
                                 this.strings.getString("helloMessage"));
   },
 
 };
 window.addEventListener("load", function(e) { tile.onLoad(e); }, false);
--- a/toolkit/content/tests/widgets/tree_shared.js
+++ b/toolkit/content/tests/widgets/tree_shared.js
@@ -894,35 +894,35 @@ function testtag_tree_TreeView_rows(tree
   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 =
   {
-    isContainer: function(row) { return row.container },
-    isContainerOpen: function(row) { return false },
-    isContainerEmpty: function(row) { return (row.children != null && row.children.rows.length == 0) },
-    isSeparator: function(row) { return row.separator },
-    getRowProperties: function(row) { return row.properties },
-    getLevel: function(row) { return row.level },
-    getParentIndex: function(row) { return row.parent },
-    hasNextSibling: function(row) { return r < startRow + length - 1; }
+    isContainer(row) { return row.container },
+    isContainerOpen(row) { return false },
+    isContainerEmpty(row) { return (row.children != null && row.children.rows.length == 0) },
+    isSeparator(row) { return row.separator },
+    getRowProperties(row) { return row.properties },
+    getLevel(row) { return row.level },
+    getParentIndex(row) { return row.parent },
+    hasNextSibling(row) { return r < startRow + length - 1; }
   };
 
   var checkCellMethods =
   {
-    getCellText: function(row, cell) { return cell.label },
-    getCellValue: function(row, cell) { return cell.value },
-    getCellProperties: function(row, cell) { return cell.properties },
-    isEditable: function(row, cell) { return cell.editable },
-    isSelectable: function(row, cell) { return cell.selectable },
-    getImageSrc: function(row, cell) { return cell.image },
-    getProgressMode: function(row, cell) { return cell.mode }
+    getCellText(row, cell) { return cell.label },
+    getCellValue(row, cell) { return cell.value },
+    getCellProperties(row, cell) { return cell.properties },
+    isEditable(row, cell) { return cell.editable },
+    isSelectable(row, cell) { return cell.selectable },
+    getImageSrc(row, cell) { return cell.image },
+    getProgressMode(row, cell) { return cell.mode }
   };
 
   var failedMethods = { };
   var checkMethod, actual, expected;
   var toggleOpenStateOK = true;
 
   for (r = startRow; r < length; r++) {
     var row = rowInfo.rows[r];
@@ -1388,16 +1388,16 @@ function convertDOMtoTreeRowInfo(treechi
 
       var descendants = treeitem.lastChild;
       var children = (treerow == descendants) ? null :
                      convertDOMtoTreeRowInfo(descendants, level + 1, rowidx);
       obj.rows.push({ cells: cellInfo,
                       properties: treerow.getAttribute("properties"),
                       container: treeitem.getAttribute("container") == "true",
                       separator: treeitem.localName == "treeseparator",
-                      children: children,
-                      level: level,
+                      children,
+                      level,
                       parent: parentidx });
     }
   }
 
   return obj;
 }
--- a/toolkit/content/treeUtils.js
+++ b/toolkit/content/treeUtils.js
@@ -1,26 +1,26 @@
 // -*- 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: function(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: function(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);
@@ -46,17 +46,17 @@ var gTreeUtils = {
     if (aItems.length) {
       selection.select(nextSelection);
       aTree.treeBoxObject.ensureRowIsVisible(nextSelection);
       aTree.focus();
     }
     selection.selectEventsSuppressed = false;
   },
 
-  sort: function(aTree, aView, aDataSet, aColumn, aComparator,
+  sort(aTree, aView, aDataSet, aColumn, aComparator,
                  aLastSortColumn, aLastSortAscending)
   {
     var ascending = (aColumn == aLastSortColumn) ? !aLastSortAscending : true;
     if (aDataSet.length == 0)
       return ascending;
 
     var sortFunction = null;
     if (aComparator) {
--- a/toolkit/crashreporter/CrashReports.jsm
+++ b/toolkit/crashreporter/CrashReports.jsm
@@ -44,17 +44,17 @@ this.CrashReports = {
       let uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
       let entries = this.pendingDir.directoryEntries;
       while (entries.hasMoreElements()) {
         let file = entries.getNext().QueryInterface(Components.interfaces.nsIFile);
         let leaf = file.leafName;
         let id = leaf.slice(0, -4);
         if (leaf.endsWith(".dmp") && uuidRegex.test(id)) {
           let entry = {
-            id: id,
+            id,
             date: file.lastModifiedTime,
             pending: true
           };
           reports.push(entry);
         }
       }
     }
 
--- a/toolkit/crashreporter/content/crashes.js
+++ b/toolkit/crashreporter/content/crashes.js
@@ -88,22 +88,22 @@ function populateReportList() {
                                                       month: 'numeric',
                                                       day: 'numeric' });
     timeFormatter = new Intl.DateTimeFormat(locale, { hour: 'numeric',
                                                       minute: 'numeric' });
   } catch (e) {
     // XXX Fallback to be removed once bug 1215247 is complete
     // and the Intl API is available on all platforms.
     dateFormatter = {
-      format: function(date) {
+      format(date) {
         return date.toLocaleDateString();
       }
     }
     timeFormatter = {
-      format: function(date) {
+      format(date) {
         return date.toLocaleTimeString();
       }
     }
   }
   var ios = Cc["@mozilla.org/network/io-service;1"].
             getService(Ci.nsIIOService);
   var reportURI = ios.newURI(reportURL, null, null);
   // resolving this URI relative to /report/index
--- a/toolkit/crashreporter/test/browser/browser_bug471404.js
+++ b/toolkit/crashreporter/test/browser/browser_bug471404.js
@@ -10,19 +10,19 @@ function check_clear_visible(browser, aV
         visible = true;
     }
     Assert.equal(visible, aVisible,
       "clear reports button is " + (aVisible ? "visible" : "hidden"));
   });
 }
 
 // each test here has a setup (run before loading about:crashes) and onload (run after about:crashes loads)
-var _tests = [{setup: null, onload: function(browser) { return check_clear_visible(browser, false); }},
-              {setup: function(crD) { return add_fake_crashes(crD, 1); },
-               onload: function(browser) { return check_clear_visible(browser, true); }}
+var _tests = [{setup: null, onload(browser) { return check_clear_visible(browser, false); }},
+              {setup(crD) { return add_fake_crashes(crD, 1); },
+               onload(browser) { return check_clear_visible(browser, true); }}
               ];
 
 add_task(function* test() {
   let appD = make_fake_appdir();
   let crD = appD.clone();
   crD.append("Crash Reports");
 
   yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" }, function* (browser) {
--- a/toolkit/crashreporter/test/browser/browser_clearReports.js
+++ b/toolkit/crashreporter/test/browser/browser_clearReports.js
@@ -38,17 +38,17 @@ function clickClearReports(browser) {
   button.click();
   return deferred.promise;
 }
 
 var promptShown = false;
 
 var oldPrompt = Services.prompt;
 Services.prompt = {
-  confirm: function() {
+  confirm() {
     promptShown = true;
     return true;
   },
 };
 
 registerCleanupFunction(function() {
   Services.prompt = oldPrompt;
 });
--- a/toolkit/crashreporter/test/browser/head.js
+++ b/toolkit/crashreporter/test/browser/head.js
@@ -21,30 +21,30 @@ function make_fake_appdir() {
   // create a subdir just to keep our files out of the way
   let appD = create_subdir(profD, "UAppData");
 
   let crashesDir = create_subdir(appD, "Crash Reports");
   create_subdir(crashesDir, "pending");
   create_subdir(crashesDir, "submitted");
 
   _provider = {
-    getFile: function(prop, persistent) {
+    getFile(prop, persistent) {
       persistent.value = true;
       if (prop == "UAppData") {
         return appD.clone();
       }
       // Depending on timing we can get requests for other files.
       // When we threw an exception here, in the world before bug 997440, this got lost
       // because of the arbitrary JSContext being used in XPCWrappedJSClass::CallMethod.
       // After bug 997440 this gets reported to our window and causes the tests to fail.
       // So, we'll just dump out a message to the logs.
       dump("WARNING: make_fake_appdir - fake nsIDirectoryServiceProvider - Unexpected getFile for: '" + prop + "'\n");
       return null;
     },
-    QueryInterface: function(iid) {
+    QueryInterface(iid) {
       if (iid.equals(Ci.nsIDirectoryServiceProvider) ||
           iid.equals(Ci.nsISupports)) {
         return this;
       }
       throw Components.results.NS_ERROR_NO_INTERFACE;
     }
   };
   // register our new provider
--- a/toolkit/crashreporter/test/unit/test_crash_with_memory_report.js
+++ b/toolkit/crashreporter/test/unit/test_crash_with_memory_report.js
@@ -22,25 +22,25 @@ function run_test()
       let profd = env.get("XPCSHELL_TEST_PROFILE_DIR");
       let file = Cc["@mozilla.org/file/local;1"]
                    .createInstance(Ci.nsILocalFile);
       file.initWithPath(profd);
 
       let dirSvc = Cc["@mozilla.org/file/directory_service;1"]
                      .getService(Ci.nsIProperties);
       let provider = {
-        getFile: function(prop, persistent) {
+        getFile(prop, persistent) {
           persistent.value = true;
               if (prop == "ProfD" || prop == "ProfLD" || prop == "ProfDS" ||
               prop == "ProfLDS" || prop == "TmpD") {
             return file.clone();
           }
           throw Components.results.NS_ERROR_FAILURE;
         },
-        QueryInterface: function(iid) {
+        QueryInterface(iid) {
           if (iid.equals(Ci.nsIDirectoryServiceProvider) ||
               iid.equals(Ci.nsISupports)) {
             return this;
           }
           throw Components.results.NS_ERROR_NO_INTERFACE;
         }
       };
       dirSvc.QueryInterface(Ci.nsIDirectoryService)
--- a/toolkit/forgetaboutsite/ForgetAboutSite.jsm
+++ b/toolkit/forgetaboutsite/ForgetAboutSite.jsm
@@ -173,17 +173,17 @@ this.ForgetAboutSite = {
       Services.obs.notifyObservers(null, "browser:purge-domain-data", aDomain);
     }
 
     // Content Preferences
     let cps2 = Cc["@mozilla.org/content-pref/service;1"].
                getService(Ci.nsIContentPrefService2);
     cps2.removeBySubdomain(aDomain, null, {
       handleCompletion: () => onContentPrefsRemovalFinished(),
-      handleError: function() {}
+      handleError() {}
     });
 
     // Predictive network data - like cache, no way to clear this per
     // domain, so just trash it all
     let np = Cc["@mozilla.org/network/predictor;1"].
              getService(Ci.nsINetworkPredictor);
     np.reset();
 
--- a/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
+++ b/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
@@ -399,17 +399,17 @@ function test_permission_manager_not_cle
   pm.removeAll();
   check_permission_exists(TEST_URI, false);
 }
 
 function waitForPurgeNotification() {
   let deferred = Promise.defer();
 
   let observer = {
-    observe: function(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);
@@ -543,17 +543,17 @@ function test_cache_cleared()
   // 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: function(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);
--- a/toolkit/identity/Identity.jsm
+++ b/toolkit/identity/Identity.jsm
@@ -280,17 +280,17 @@ IDService.prototype = {
             idpParams['public-key'])) {
           let errStr = "Invalid well-known file from: " + aDomain;
           log("_fetchWellKnownFile:", errStr);
           return aCallback(errStr);
         }
 
         let callbackObj = {
           domain: aDomain,
-          idpParams: idpParams,
+          idpParams,
         };
         log("_fetchWellKnownFile result: ", callbackObj);
         // Yay.  Valid IdP configuration for the domain.
         return aCallback(null, callbackObj);
 
       } catch (err) {
         reportError("_fetchWellKnownFile", "Bad configuration from", aDomain, err);
         return aCallback(err.toString());
--- a/toolkit/identity/IdentityProvider.jsm
+++ b/toolkit/identity/IdentityProvider.jsm
@@ -422,17 +422,17 @@ IdentityProviderService.prototype = {
     let errStr = "Authentication canceled by IDP";
     log("ERROR: cancelAuthentication:", errStr);
     provFlow.callback(errStr);
   },
 
   /**
    * Called by the UI to set the ID and caller for the authentication flow after it gets its ID
    */
-  setAuthenticationFlow: function(aAuthId, aProvId) {
+  setAuthenticationFlow(aAuthId, aProvId) {
     // this is the transition point between the two flows,
     // provision and authenticate.  We tell the auth flow which
     // provisioning flow it is started from.
     log("setAuthenticationFlow: authId:", aAuthId, "provId:", aProvId);
     this._authenticationFlows[aAuthId] = { provId: aProvId };
     this._provisionFlows[aProvId].authId = aAuthId;
   },
 
--- a/toolkit/identity/MinimalIdentity.jsm
+++ b/toolkit/identity/MinimalIdentity.jsm
@@ -58,17 +58,17 @@ IDService.prototype = {
   observe: function observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "quit-application-granted":
         this.shutdown();
         break;
     }
   },
 
-  shutdown: function() {
+  shutdown() {
     Services.obs.removeObserver(this, "quit-application-granted");
   },
 
   /**
    * Parse an email into username and domain if it is valid, else return null
    */
   parseEmail: function parseEmail(email) {
     var match = email.match(/^([^@]+)@([^@^/]+.[a-z]+)$/);
--- a/toolkit/identity/RelyingParty.jsm
+++ b/toolkit/identity/RelyingParty.jsm
@@ -103,33 +103,33 @@ IdentityRelyingParty.prototype = {
     //   3. the email has changed:             'login'; 'ready'
     if (state.isLoggedIn) {
       if (state.email && aRpCaller.loggedInUser === state.email) {
         this._notifyLoginStateChanged(aRpCaller.id, state.email);
         return aRpCaller.doReady();
 
       } else if (aRpCaller.loggedInUser === null) {
         // Generate assertion for existing login
-        let options = {loggedInUser: state.email, origin: origin};
+        let options = {loggedInUser: state.email, origin};
         return this._doLogin(aRpCaller, options);
       }
       // A loggedInUser different from state.email has been specified.
       // Change login identity.
 
-      let options = {loggedInUser: state.email, origin: origin};
+      let options = {loggedInUser: state.email, origin};
       return this._doLogin(aRpCaller, options);
 
     // If the user is not logged in, there are two cases:
     //
     //   1. a logged in email was provided: 'ready'; 'logout'
     //   2. not logged in, no email given:  'ready';
 
     }
     if (aRpCaller.loggedInUser) {
-      return this._doLogout(aRpCaller, {origin: origin});
+      return this._doLogout(aRpCaller, {origin});
     }
     return aRpCaller.doReady();
   },
 
   /**
    * A utility for watch() to set state and notify the dom
    * on login
    *
@@ -235,17 +235,17 @@ IdentityRelyingParty.prototype = {
    *
    */
   logout: function logout(aRpCallerId) {
     log("logout: RP caller id:", aRpCallerId);
     let rp = this._rpFlows[aRpCallerId];
     if (rp && rp.origin) {
       let origin = rp.origin;
       log("logout: origin:", origin);
-      this._doLogout(rp, {origin: origin});
+      this._doLogout(rp, {origin});
     } else {
       log("logout: no RP found with id:", aRpCallerId);
     }
     // We don't delete this._rpFlows[aRpCallerId], because
     // the user might log back in again.
   },
 
   getDefaultEmailForOrigin: function getDefaultEmailForOrigin(aOrigin) {
--- a/toolkit/identity/jwcrypto.jsm
+++ b/toolkit/identity/jwcrypto.jsm
@@ -96,26 +96,26 @@ jwcryptoClass.prototype = {
    *        The number of milliseconds that must be added to the local clock
    *        for it to agree with the server.  For example, if the local clock
    *        if two minutes fast, localtimeOffsetMsec would be -120000
    *
    * @param now (options)
    *        Current date in milliseconds.  Useful for mocking clock
    *        skew in testing.
    */
-  getExpiration: function(duration = DURATION_MS, localtimeOffsetMsec = 0, now = Date.now()) {
+  getExpiration(duration = DURATION_MS, localtimeOffsetMsec = 0, now = Date.now()) {
     return now + localtimeOffsetMsec + duration;
   },
 
-  isCertValid: function(aCert, aCallback) {
+  isCertValid(aCert, aCallback) {
     // XXX check expiration, bug 769850
     aCallback(true);
   },
 
-  generateKeyPair: function(aAlgorithmName, aCallback) {
+  generateKeyPair(aAlgorithmName, aCallback) {
     log("generating");
     generateKeyPair(aAlgorithmName, aCallback);
   },
 
   /*
    * Generate an assertion and return it through the provided callback.
    *
    * @param aCert
@@ -139,17 +139,17 @@ jwcryptoClass.prototype = {
    *        added to the local clock time to make it concur with the server.
    *        For example, if the local clock is two minutes fast, the offset in
    *        milliseconds would be -120000.
    *
    * @param aCallback
    *        Function to invoke with resulting assertion.  Assertion
    *        will be string or null on failure.
    */
-  generateAssertion: function(aCert, aKeyPair, aAudience, aOptions, aCallback) {
+  generateAssertion(aCert, aKeyPair, aAudience, aOptions, aCallback) {
     if (typeof aOptions == "function") {
       aCallback = aOptions;
       aOptions = { };
     }
 
     // for now, we hack the algorithm name
     // XXX bug 769851
     var header = {"alg": "DS128"};
--- a/toolkit/identity/tests/unit/head_identity.js
+++ b/toolkit/identity/tests/unit/head_identity.js
@@ -140,17 +140,17 @@ function mock_fxa_rp(aIdentity, aOrigin,
 // this observer auto-removes itself after the observe function
 // is called, so this is meant to observe only ONE event.
 function makeObserver(aObserveTopic, aObserveFunc) {
   let observer = {
     // nsISupports provides type management in C++
     // nsIObserver is to be an observer
     QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports, Ci.nsIObserver]),
 
-    observe: function(aSubject, aTopic, aData) {
+    observe(aSubject, aTopic, aData) {
       if (aTopic == aObserveTopic) {
         aObserveFunc(aSubject, aTopic, aData);
         Services.obs.removeObserver(observer, aObserveTopic);
       }
     }
   };
 
   Services.obs.addObserver(observer, aObserveTopic, false);
@@ -201,25 +201,25 @@ function call_sequentially() {
  * frameCallbacks is optional, contains the callbacks that the sandbox
  * frame would provide in response to DOM calls.
  */
 function setup_provisioning(identity, afterSetupCallback, doneProvisioningCallback, callerCallbacks) {
   IDService.reset();
 
   let provId = uuid();
   IDService.IDP._provisionFlows[provId] = {
-    identity : identity,
+    identity,
     idpParams: TEST_IDPPARAMS,
-    callback: function(err) {
+    callback(err) {
       if (doneProvisioningCallback)
         doneProvisioningCallback(err);
     },
     sandbox: {
       // Emulate the free() method on the iframe sandbox
-      free: function() {}
+      free() {}
     }
   };
 
   let caller = {};
   caller.id = provId;
   caller.doBeginProvisioningCallback = function(id, duration_s) {
     if (callerCallbacks && callerCallbacks.beginProvisioningCallback)
       callerCallbacks.beginProvisioningCallback(id, duration_s);
--- a/toolkit/identity/tests/unit/test_authentication.js
+++ b/toolkit/identity/tests/unit/test_authentication.js
@@ -32,17 +32,17 @@ function test_begin_authentication_flow(
 
   setup_provisioning(
     TEST_USER,
     function(caller) {
       _provId = caller.id;
       IDService.IDP.beginProvisioning(caller);
     }, function() {},
     {
-      beginProvisioningCallback: function(email, duration_s) {
+      beginProvisioningCallback(email, duration_s) {
 
         // let's say this user needs to authenticate
         IDService.IDP._doAuthentication(_provId, {idpParams:TEST_IDPPARAMS});
       }
     }
   );
 }
 
@@ -108,17 +108,17 @@ function test_complete_authentication_fl
     setup_provisioning(
       TEST_USER,
       function(provFlow) {
         _provId = provFlow.id;
 
         IDService.IDP.beginProvisioning(provFlow);
       }, function() {},
       {
-        beginProvisioningCallback: function(email, duration_s) {
+        beginProvisioningCallback(email, duration_s) {
           // let's say this user needs to authenticate
           IDService.IDP._doAuthentication(_provId, {idpParams:TEST_IDPPARAMS});
 
           // test_begin_authentication_flow verifies that the right
           // message is sent to the UI.  So that works.  Moving on,
           // the UI calls setAuthenticationFlow ...
           _authId = uuid();
           IDService.IDP.setAuthenticationFlow(_authId, _provId);
@@ -135,17 +135,17 @@ function test_complete_authentication_fl
   // A mock calling context
   let authCaller = {
     doBeginAuthenticationCallback: function doBeginAuthenticationCallback(identity) {
       do_check_eq(identity, TEST_USER);
       // completeAuthentication will emit "identity-auth-complete"
       IDService.IDP.completeAuthentication(_authId);
     },
 
-    doError: function(err) {
+    doError(err) {
       log("OW! My doError callback hurts!", err);
     },
   };
 
 }
 
 var TESTS = [];
 
--- a/toolkit/identity/tests/unit/test_firefox_accounts.js
+++ b/toolkit/identity/tests/unit/test_firefox_accounts.js
@@ -13,27 +13,27 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 // services/fxaccounts/FxAccounts.jsm can read and write its signed-in user
 // data.
 do_get_profile();
 
 function MockFXAManager() {
   this.signedInUser = true;
 }
 MockFXAManager.prototype = {
-  getAssertion: function(audience) {
+  getAssertion(audience) {
     let result = this.signedInUser ? TEST_ASSERTION : null;
     return Promise.resolve(result);
   },
 
-  signOut: function() {
+  signOut() {
     this.signedInUser = false;
     return Promise.resolve(null);
   },
 
-  signIn: function(user) {
+  signIn(user) {
     this.signedInUser = user;
     return Promise.resolve(user);
   },
 }
 
 var originalManager = FirefoxAccounts.fxAccountsManager;
 FirefoxAccounts.fxAccountsManager = new MockFXAManager();
 do_register_cleanup(() => {
--- a/toolkit/identity/tests/unit/test_jwcrypto.js
+++ b/toolkit/identity/tests/unit/test_jwcrypto.js
@@ -138,17 +138,17 @@ function test_get_assertion_with_offset(
   let localtimeOffsetMsec = -1 * 12 * HOUR_MS;
   let localMsec = serverMsec - localtimeOffsetMsec;
 
   jwcrypto.generateKeyPair(
     "DS160",
     function(err, kp) {
       jwcrypto.generateAssertion("fake-cert", kp, RP_ORIGIN,
         { duration: MINUTE_MS,
-          localtimeOffsetMsec: localtimeOffsetMsec,
+          localtimeOffsetMsec,
           now: localMsec},
           function(err2, backedAssertion) {
             do_check_null(err2);
 
             // properly formed
             let cert;
             let assertion;
             [cert, assertion] = backedAssertion.split("~");
@@ -251,21 +251,21 @@ function extractComponents(signedObject)
   do_check_eq(Object.keys(header).length, 1);
   do_check_true(!!header.alg);
 
   // Ensure well-formed payload
   for (let field of ["exp", "aud"]) {
     do_check_true(!!payload[field]);
   }
 
-  return {header: header,
-          payload: payload,
-          headerSegment: headerSegment,
-          payloadSegment: payloadSegment,
-          cryptoSegment: cryptoSegment};
+  return {header,
+          payload,
+          headerSegment,
+          payloadSegment,
+          cryptoSegment};
 }
 
 var TESTS = [
   test_sanity,
   test_generate,
   test_get_assertion,
   test_get_assertion_with_offset,
   test_assertion_lifetime,
--- a/toolkit/identity/tests/unit/test_log_utils.js
+++ b/toolkit/identity/tests/unit/test_log_utils.js
@@ -18,17 +18,17 @@ function toggle_debug() {
       if (aTopic === "nsPref:changed") {
         // race condition?
         do_check_eq(Logger._debug, true);
         do_test_finished();
         run_next_test();
       }
     },
 
-    init: function() {
+    init() {
       Services.prefs.addObserver('toolkit.identity.debug', this, false);
     }
   };
 
   new Wrapper();
   Services.prefs.setBoolPref('toolkit.identity.debug', true);
 }
 
--- a/toolkit/identity/tests/unit/test_provisioning.js
+++ b/toolkit/identity/tests/unit/test_provisioning.js
@@ -14,17 +14,17 @@ function test_begin_provisioning() {
 
   setup_provisioning(
     TEST_USER,
     function(caller) {
       // call .beginProvisioning()
       IdentityProvider.beginProvisioning(caller);
     }, function() {},
     {
-      beginProvisioningCallback: function(email, duration_s) {
+      beginProvisioningCallback(email, duration_s) {
         do_check_eq(email, TEST_USER);
         do_check_true(duration_s > 0);
         do_check_true(duration_s <= (24 * 3600));
 
         do_test_finished();
         run_next_test();
       }
     });
@@ -44,17 +44,17 @@ function test_raise_provisioning_failure
       // this should be invoked with a populated error
       do_check_neq(err, null);
       do_check_true(err.indexOf("can't authenticate this email") > -1);
 
       do_test_finished();
       run_next_test();
     },
     {
-      beginProvisioningCallback: function(email, duration_s) {
+      beginProvisioningCallback(email, duration_s) {
         // raise the failure as if we can't provision this email
         IdentityProvider.raiseProvisioningFailure(_callerId, "can't authenticate this email");
       }
     });
 }
 
 function test_genkeypair_before_begin_provisioning() {
   do_test_pending();
@@ -69,17 +69,17 @@ function test_genkeypair_before_begin_pr
     function(err) {
       do_check_neq(err, null);
 
       do_test_finished();
       run_next_test();
     },
     {
       // this should not be called at all!
-      genKeyPairCallback: function(pk) {
+      genKeyPairCallback(pk) {
         // a test that will surely fail because we shouldn't be here.
         do_check_true(false);
 
         do_test_finished();
         run_next_test();
       }
     }
   );
@@ -98,20 +98,20 @@ function test_genkeypair() {
     function(err) {
       // should not be called!
       do_check_true(false);
 
       do_test_finished();
       run_next_test();
     },
     {
-      beginProvisioningCallback: function(email, time_s) {
+      beginProvisioningCallback(email, time_s) {
         IdentityProvider.genKeyPair(_callerId);
       },
-      genKeyPairCallback: function(kp) {
+      genKeyPairCallback(kp) {
         do_check_neq(kp, null);
 
         // yay!
         do_test_finished();
         run_next_test();
       }
     }
   );
@@ -134,17 +134,17 @@ function test_register_certificate_befor
     // expect this to be called with an error
     function(err) {
       do_check_neq(err, null);
 
       do_test_finished();
       run_next_test();
     },
     {
-      beginProvisioningCallback: function(email, duration_s) {
+      beginProvisioningCallback(email, duration_s) {
         // now we try to register cert but no keygen has been done
         IdentityProvider.registerCertificate(_callerID, "fake-cert");
       }
     }
   );
 }
 
 function test_register_certificate() {
@@ -170,20 +170,20 @@ function test_register_certificate() {
         // cleanup will happen after the callback is called
         check_provision_flow_done(_callerId);
 
         do_test_finished();
         run_next_test();
       });
     },
     {
-      beginProvisioningCallback: function(email, duration_s) {
+      beginProvisioningCallback(email, duration_s) {
         IdentityProvider.genKeyPair(_callerId);
       },
-      genKeyPairCallback: function(pk) {
+      genKeyPairCallback(pk) {
         IdentityProvider.registerCertificate(_callerId, "fake-cert-42");
       }
     }
   );
 }
 
 
 function test_get_assertion_after_provision() {
@@ -209,20 +209,20 @@ function test_get_assertion_after_provis
         // cleanup will happen after the callback is called
         check_provision_flow_done(_callerId);
 
         do_test_finished();
         run_next_test();
       });
     },
     {
-      beginProvisioningCallback: function(email, duration_s) {
+      beginProvisioningCallback(email, duration_s) {
         IdentityProvider.genKeyPair(_callerId);
       },
-      genKeyPairCallback: function(pk) {
+      genKeyPairCallback(pk) {
         IdentityProvider.registerCertificate(_callerId, "fake-cert-42");
       }
     }
   );
 
 }
 
 var TESTS = [];
--- a/toolkit/modules/Battery.jsm
+++ b/toolkit/modules/Battery.jsm
@@ -51,23 +51,23 @@ this.GetBattery = function() {
   });
 };
 
 this.Battery = {};
 
 for (let k of ["charging", "chargingTime", "dischargingTime", "level"]) {
   let prop = k;
   Object.defineProperty(this.Battery, prop, {
-    get: function() {
+    get() {
       // Return fake value if spoofing is enabled, otherwise fetch the real value from the BatteryManager API
       if (Debugging.fake) {
         return gFakeBattery[prop];
       }
       return Services.appShell.hiddenDOMWindow.navigator.battery[prop];
     },
-    set: function(fakeSetting) {
+    set(fakeSetting) {
       if (!Debugging.fake) {
         throw new Error("Tried to set fake battery value when battery spoofing was disabled");
       }
       gFakeBattery[prop] = fakeSetting;
     }
   })
 }
--- a/toolkit/modules/BinarySearch.jsm
+++ b/toolkit/modules/BinarySearch.jsm
@@ -13,31 +13,31 @@ this.BinarySearch = Object.freeze({
   /**
    * Returns the index of the given target in the given array or -1 if the
    * target is not found.
    *
    * See search() for a description of this function's parameters.
    *
    * @return The index of `target` in `array` or -1 if `target` is not found.
    */
-  indexOf: function(comparator, array, target) {
+  indexOf(comparator, array, target) {
     let [found, idx] = this.search(comparator, array, target);
     return found ? idx : -1;
   },
 
   /**
    * Returns the index within the given array where the given target may be
    * inserted to keep the array ordered.
    *
    * See search() for a description of this function's parameters.
    *
    * @return The index in `array` where `target` may be inserted to keep `array`
    *         ordered.
    */
-  insertionIndexOf: function(comparator, array, target) {
+  insertionIndexOf(comparator, array, target) {
     return this.search(comparator, array, target)[1];
   },
 
   /**
    * Searches for the given target in the given array.
    *
    * @param  comparator
    *         A function that takes two arguments and compares them, returning a
@@ -51,17 +51,17 @@ this.BinarySearch = Object.freeze({
    * @param  target
    *         The value to search for.
    * @return An array with two elements.  If `target` is found, the first
    *         element is true, and the second element is its index in the array.
    *         If `target` is not found, the first element is false, and the
    *         second element is the index where it may be inserted to keep the
    *         array ordered.
    */
-  search: function(comparator, array, target) {
+  search(comparator, array, target) {
     let low = 0;
     let high = array.length - 1;
     while (low <= high) {
       // Thanks to http://jsperf.com/code-review-1480 for this tip.
       let mid = (low + high) >> 1;
       let cmp = comparator(target, array[mid]);
       if (cmp == 0)
         return [true, mid];
--- a/toolkit/modules/BrowserUtils.jsm
+++ b/toolkit/modules/BrowserUtils.jsm
@@ -17,27 +17,27 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 Cu.importGlobalProperties(['URL']);
 
 this.BrowserUtils = {
 
   /**
    * Prints arguments separated by a space and appends a new line.
    */
-  dumpLn: function(...args) {
+  dumpLn(...args) {
     for (let a of args)
       dump(a + " ");
     dump("\n");
   },
 
   /**
    * restartApplication: Restarts the application, keeping it in
    * safe mode if it is already in safe mode.
    */
-  restartApplication: function() {
+  restartApplication() {
     let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"]
                        .getService(Ci.nsIAppStartup);
     let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"]
                        .createInstance(Ci.nsISupportsPRBool);
     Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
     if (cancelQuit.data) { // The quit request has been canceled.
       return false;
     }
@@ -60,17 +60,17 @@ this.BrowserUtils = {
    *        The URL a page has linked to. This could be passed either as a string
    *        or as a nsIURI object.
    * @param aPrincipal
    *        The principal of the document from which aURL came.
    * @param aFlags
    *        Flags to be passed to checkLoadURIStr. If undefined,
    *        nsIScriptSecurityManager.STANDARD will be passed.
    */
-  urlSecurityCheck: function(aURL, aPrincipal, aFlags) {
+  urlSecurityCheck(aURL, aPrincipal, aFlags) {
     var secMan = Services.scriptSecurityManager;
     if (aFlags === undefined) {
       aFlags = secMan.STANDARD;
     }
 
     try {
       if (aURL instanceof Ci.nsIURI)
         secMan.checkLoadURIWithPrincipal(aPrincipal, aURL, aFlags);
@@ -125,45 +125,45 @@ this.BrowserUtils = {
 
   /**
    * Constructs a new URI, using nsIIOService.
    * @param aURL The URI spec.
    * @param aOriginCharset The charset of the URI.
    * @param aBaseURI Base URI to resolve aURL, or null.
    * @return an nsIURI object based on aURL.
    */
-  makeURI: function(aURL, aOriginCharset, aBaseURI) {
+  makeURI(aURL, aOriginCharset, aBaseURI) {
     return Services.io.newURI(aURL, aOriginCharset, aBaseURI);
   },
 
-  makeFileURI: function(aFile) {
+  makeFileURI(aFile) {
     return Services.io.newFileURI(aFile);
   },
 
-  makeURIFromCPOW: function(aCPOWURI) {
+  makeURIFromCPOW(aCPOWURI) {
     return Services.io.newURI(aCPOWURI.spec, aCPOWURI.originCharset, null);
   },
 
   /**
    * For a given DOM element, returns its position in "screen"
    * coordinates. In a content process, the coordinates returned will
    * be relative to the left/top of the tab. In the chrome process,
    * the coordinates are relative to the user's screen.
    */
-  getElementBoundingScreenRect: function(aElement) {
+  getElementBoundingScreenRect(aElement) {
     return this.getElementBoundingRect(aElement, true);
   },
 
   /**
    * For a given DOM element, returns its position as an offset from the topmost
    * window. In a content process, the coordinates returned will be relative to
    * the left/top of the topmost content area. If aInScreenCoords is true,
    * screen coordinates will be returned instead.
    */
-  getElementBoundingRect: function(aElement, aInScreenCoords) {
+  getElementBoundingRect(aElement, aInScreenCoords) {
     let rect = aElement.getBoundingClientRect();
     let win = aElement.ownerDocument.defaultView;
 
     let x = rect.left, y = rect.top;
 
     // We need to compensate for any iframes that might shift things
     // over. We also need to compensate for zooming.
     let parentFrame = win.frameElement;
@@ -189,17 +189,17 @@ this.BrowserUtils = {
       top: y * fullZoom,
       width: rect.width * fullZoom,
       height: rect.height * fullZoom
     };
 
     return rect;
   },
 
-  onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) {
+  onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab) {
     // Don't modify non-default targets or targets that aren't in top-level app
     // tab docshells (isAppTab will be false for app tab subframes).
     if (originalTarget != "" || !isAppTab)
       return originalTarget;
 
     // External links from within app tabs should always open in new tabs
     // instead of replacing the app tab's page (Bug 575561)
     let linkHost;
@@ -226,17 +226,17 @@ this.BrowserUtils = {
   },
 
   /**
    * Map the plugin's name to a filtered version more suitable for UI.
    *
    * @param aName The full-length name string of the plugin.
    * @return the simplified name string.
    */
-  makeNicePluginName: function(aName) {
+  makeNicePluginName(aName) {
     if (aName == "Shockwave Flash")
       return "Adobe Flash";
     // Regex checks if aName begins with "Java" + non-letter char
     if (/^Java\W/.exec(aName))
       return "Java";
 
     // Clean up the plugin name by stripping off parenthetical clauses,
     // trailing version numbers or "plugin".
@@ -251,17 +251,17 @@ this.BrowserUtils = {
   },
 
   /**
    * Return true if linkNode has a rel="noreferrer" attribute.
    *
    * @param linkNode The <a> element, or null.
    * @return a boolean indicating if linkNode has a rel="noreferrer" attribute.
    */
-  linkHasNoReferrer: function(linkNode) {
+  linkHasNoReferrer(linkNode) {
     // A null linkNode typically means that we're checking a link that wasn't
     // provided via an <a> link, like a text-selected URL.  Don't leak
     // referrer information in this case.
     if (!linkNode)
       return true;
 
     let rel = linkNode.getAttribute("rel");
     if (!rel)
@@ -274,17 +274,17 @@ this.BrowserUtils = {
   },
 
   /**
    * Returns true if |mimeType| is text-based, or false otherwise.
    *
    * @param mimeType
    *        The MIME type to check.
    */
-  mimeTypeIsTextBased: function(mimeType) {
+  mimeTypeIsTextBased(mimeType) {
     return mimeType.startsWith("text/") ||
            mimeType.endsWith("+xml") ||
            mimeType == "application/x-javascript" ||
            mimeType == "application/javascript" ||
            mimeType == "application/json" ||
            mimeType == "application/xml" ||
            mimeType == "mozilla.application/cached-xul";
   },
@@ -293,17 +293,17 @@ this.BrowserUtils = {
    * Return true if we should FAYT for this node + window (could be CPOW):
    *
    * @param elt
    *        The element that is focused
    * @param win
    *        The window that is focused
    *
    */
-  shouldFastFind: function(elt, win) {
+  shouldFastFind(elt, win) {
     if (elt) {
       if (elt instanceof win.HTMLInputElement && elt.mozIsTextField(false))
         return false;
 
       if (elt.isContentEditable || win.document.designMode == "on")
         return false;
 
       if (elt instanceof win.HTMLTextAreaElement ||
@@ -318,17 +318,17 @@ this.BrowserUtils = {
 
   /**
    * Return true if we can FAYT for this window (could be CPOW):
    *
    * @param win
    *        The top level window that is focused
    *
    */
-  canFastFind: function(win) {
+  canFastFind(win) {
     if (!win)
       return false;
 
     if (!this.mimeTypeIsTextBased(win.document.contentType))
       return false;
 
     // disable FAYT in about:blank to prevent FAYT opening unexpectedly.
     let loc = win.location;
@@ -395,17 +395,17 @@ this.BrowserUtils = {
    * @return {nsIDOMWindow}
    */
   getRootWindow(docShell) {
     return docShell.QueryInterface(Ci.nsIDocShellTreeItem)
       .sameTypeRootTreeItem.QueryInterface(Ci.nsIInterfaceRequestor)
       .getInterface(Ci.nsIDOMWindow);
   },
 
-  getSelectionDetails: function(topWindow, aCharLen) {
+  getSelectionDetails(topWindow, aCharLen) {
     // selections of more than 150 characters aren't useful
     const kMaxSelectionLen = 150;
     const charLen = Math.min(aCharLen || kMaxSelectionLen, kMaxSelectionLen);
 
     let focusedWindow = {};
     let focusedElement = Services.focus.getFocusedElementForWindow(topWindow, true, focusedWindow);
     focusedWindow = focusedWindow.value;
 
--- a/toolkit/modules/CertUtils.jsm
+++ b/toolkit/modules/CertUtils.jsm
@@ -186,37 +186,37 @@ function isBuiltinToken(tokenName) {
  */
 this.BadCertHandler =
   function BadCertHandler(aAllowNonBuiltInCerts) {
   this.allowNonBuiltInCerts = aAllowNonBuiltInCerts;
 }
 BadCertHandler.prototype = {
 
   // nsIChannelEventSink
-  asyncOnChannelRedirect: function(oldChannel, newChannel, flags, callback) {
+  asyncOnChannelRedirect(oldChannel, newChannel, flags, callback) {
     if (this.allowNonBuiltInCerts) {
       callback.onRedirectVerifyCallback(Components.results.NS_OK);
       return;
     }
 
     // make sure the certificate of the old channel checks out before we follow
     // a redirect from it.  See bug 340198.
     // Don't call checkCert for internal redirects. See bug 569648.
     if (!(flags & Ci.nsIChannelEventSink.REDIRECT_INTERNAL))
       checkCert(oldChannel);
 
     callback.onRedirectVerifyCallback(Components.results.NS_OK);
   },
 
   // nsIInterfaceRequestor
-  getInterface: function(iid) {
+  getInterface(iid) {
     return this.QueryInterface(iid);
   },
 
   // nsISupports
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (!iid.equals(Ci.nsIChannelEventSink) &&
         !iid.equals(Ci.nsIInterfaceRequestor) &&
         !iid.equals(Ci.nsISupports))
       throw Cr.NS_ERROR_NO_INTERFACE;
     return this;
   }
 };
--- a/toolkit/modules/CharsetMenu.jsm
+++ b/toolkit/modules/CharsetMenu.jsm
@@ -115,17 +115,17 @@ function UpdateDetectorMenu(event) {
   if (menuitem) {
     menuitem.setAttribute("checked", "true");
   }
 }
 
 var gDetectorInfoCache, gCharsetInfoCache, gPinnedInfoCache;
 
 var CharsetMenu = {
-  build: function(parent, deprecatedShowAccessKeys = true, showDetector = true) {
+  build(parent, deprecatedShowAccessKeys = true, showDetector = true) {
     if (!deprecatedShowAccessKeys) {
       Deprecated.warning("CharsetMenu no longer supports building a menu with no access keys.",
                          "https://bugzilla.mozilla.org/show_bug.cgi?id=1088710");
     }
     function createDOMNode(doc, nodeInfo) {
       let node = doc.createElement("menuitem");
       node.setAttribute("type", "radio");
       node.setAttribute("name", nodeInfo.name + "Group");
@@ -159,108 +159,108 @@ var CharsetMenu = {
       parent.appendChild(doc.createElement("menuseparator"));
     }
 
     gPinnedInfoCache.forEach(charsetInfo => parent.appendChild(createDOMNode(doc, charsetInfo)));
     parent.appendChild(doc.createElement("menuseparator"));
     gCharsetInfoCache.forEach(charsetInfo => parent.appendChild(createDOMNode(doc, charsetInfo)));
   },
 
-  getData: function() {
+  getData() {
     this._ensureDataReady();
     return {
       detectors: gDetectorInfoCache,
       pinnedCharsets: gPinnedInfoCache,
       otherCharsets: gCharsetInfoCache
     };
   },
 
-  _ensureDataReady: function() {
+  _ensureDataReady() {
     if (!gDetectorInfoCache) {
       gDetectorInfoCache = this.getDetectorInfo();
       gPinnedInfoCache = this.getCharsetInfo(kPinned, false);
       gCharsetInfoCache = this.getCharsetInfo(kEncodings);
     }
   },
 
-  getDetectorInfo: function() {
+  getDetectorInfo() {
     return kAutoDetectors.map(([detectorName, nodeId]) => ({
       label: this._getDetectorLabel(detectorName),
       accesskey: this._getDetectorAccesskey(detectorName),
       name: "detector",
       value: nodeId
     }));
   },
 
-  getCharsetInfo: function(charsets, sort = true) {
+  getCharsetInfo(charsets, sort = true) {
     let list = Array.from(charsets, charset => ({
       label: this._getCharsetLabel(charset),
       accesskey: this._getCharsetAccessKey(charset),
       name: "charset",
       value: charset
     }));
 
     if (sort) {
       list.sort(CharsetComparator);
     }
     return list;
   },
 
-  _getDetectorLabel: function(detector) {
+  _getDetectorLabel(detector) {
     try {
       return gBundle.GetStringFromName("charsetMenuAutodet." + detector);
     } catch (ex) {}
     return detector;
   },
-  _getDetectorAccesskey: function(detector) {
+  _getDetectorAccesskey(detector) {
     try {
       return gBundle.GetStringFromName("charsetMenuAutodet." + detector + ".key");
     } catch (ex) {}
     return "";
   },
 
-  _getCharsetLabel: function(charset) {
+  _getCharsetLabel(charset) {
     if (charset == "gbk") {
       // Localization key has been revised
       charset = "gbk.bis";
     }
     try {
       return gBundle.GetStringFromName(charset);
     } catch (ex) {}
     return charset;
   },
-  _getCharsetAccessKey: function(charset) {
+  _getCharsetAccessKey(charset) {
     if (charset == "gbk") {
       // Localization key has been revised
       charset = "gbk.bis";
     }
     try {
       return gBundle.GetStringFromName(charset + ".key");
     } catch (ex) {}
     return "";
   },
 
   /**
    * For substantially similar encodings, treat two encodings as the same
    * for the purpose of the check mark.
    */
-  foldCharset: function(charset) {
+  foldCharset(charset) {
     switch (charset) {
       case "ISO-8859-8-I":
         return "windows-1255";
 
       case "gb18030":
         return "gbk";
 
       default:
         return charset;
     }
   },
 
-  update: function(parent, charset) {
+  update(parent, charset) {
     let menuitem = parent.getElementsByAttribute("charset", this.foldCharset(charset)).item(0);
     if (menuitem) {
       menuitem.setAttribute("checked", "true");
     }
   },
 };
 
 Object.freeze(CharsetMenu);
--- a/toolkit/modules/ClientID.jsm
+++ b/toolkit/modules/ClientID.jsm
@@ -50,47 +50,47 @@ this.ClientID = Object.freeze({
    *
    * WARNING: This functionality is duplicated for Android (see GeckoProfile.getClientId
    * for more). There are Java tests (TestGeckoProfile) to ensure the functionality is
    * consistent and Gecko tests to come (bug 1249156). However, THIS IS NOT FOOLPROOF.
    * Be careful when changing this code and, in particular, the underlying file format.
    *
    * @return {Promise<string>} The stable client ID.
    */
-  getClientID: function() {
+  getClientID() {
     return ClientIDImpl.getClientID();
   },
 
 /**
    * Get the client id synchronously without hitting the disk.
    * This returns:
    *  - the current on-disk client id if it was already loaded
    *  - the client id that we cached into preferences (if any)
    *  - null otherwise
    */
-  getCachedClientID: function() {
+  getCachedClientID() {
     return ClientIDImpl.getCachedClientID();
   },
 
   /**
    * Only used for testing. Invalidates the client ID so that it gets read
    * again from file.
    */
-  _reset: function() {
+  _reset() {
     return ClientIDImpl._reset();
   },
 });
 
 var ClientIDImpl = {
   _clientID: null,
   _loadClientIdTask: null,
   _saveClientIdTask: null,
   _logger: null,
 
-  _loadClientID: function() {
+  _loadClientID() {
     if (this._loadClientIdTask) {
       return this._loadClientIdTask;
     }
 
     this._loadClientIdTask = this._doLoadClientID();
     let clear = () => this._loadClientIdTask = null;
     this._loadClientIdTask.then(clear, clear);
     return this._loadClientIdTask;
@@ -151,32 +151,32 @@ var ClientIDImpl = {
 
   /**
    * This returns a promise resolving to the the stable client ID we use for
    * data reporting (FHR & Telemetry). Previously exising FHR client IDs are
    * migrated to this.
    *
    * @return {Promise<string>} The stable client ID.
    */
-  getClientID: function() {
+  getClientID() {
     if (!this._clientID) {
       return this._loadClientID();
     }
 
     return Promise.resolve(this._clientID);
   },
 
   /**
    * Get the client id synchronously without hitting the disk.
    * This returns:
    *  - the current on-disk client id if it was already loaded
    *  - the client id that we cached into preferences (if any)
    *  - null otherwise
    */
-  getCachedClientID: function() {
+  getCachedClientID() {
     if (this._clientID) {
       // Already loaded the client id from disk.
       return this._clientID;
     }
 
     // Not yet loaded, return the cached client id if we have one.
     let id = Preferences.get(PREF_CACHED_CLIENTID, null);
     if (id === null) {
@@ -202,17 +202,17 @@ var ClientIDImpl = {
   /**
    * Sets the client id to the given value and updates the value cached in
    * preferences only if the given id is a valid.
    *
    * @param {String} id A string containing the client ID.
    * @return {Boolean} True when the client ID has valid format, or False
    * otherwise.
    */
-  updateClientID: function(id) {
+  updateClientID(id) {
     if (!isValidClientID(id)) {
       this._log.error("updateClientID - invalid client ID", id);
       return false;
     }
 
     this._clientID = id;
     Preferences.set(PREF_CACHED_CLIENTID, this._clientID);
     return true;
--- a/toolkit/modules/Console.jsm
+++ b/toolkit/modules/Console.jsm
@@ -439,17 +439,17 @@ function startTimer(aName, aTimestamp) {
  * @return {object}
  *         The name property holds the timer name and the duration property
  *         holds the number of milliseconds since the timer was started.
  */
 function stopTimer(aName, aTimestamp) {
   let key = aName.toString();
   let duration = (aTimestamp || Date.now()) - gTimerRegistry.get(key);
   gTimerRegistry.delete(key);
-  return { name: aName, duration: duration };
+  return { name: aName, duration };
 }
 
 /**
  * Dump a new message header to stdout by taking care of adding an eventual
  * prefix
  *
  * @param {object} aConsole
  *        ConsoleAPI instance
@@ -680,29 +680,29 @@ ConsoleAPI.prototype = {
 
   time: function Console_time() {
     if (!shouldLog("time", this.maxLogLevel)) {
       return;
     }
     let args = Array.prototype.slice.call(arguments, 0);
     let frame = getStack(Components.stack.caller, 1)[0];
     let timer = startTimer(args[0]);
-    sendConsoleAPIMessage(this, "time", frame, args, { timer: timer });
+    sendConsoleAPIMessage(this, "time", frame, args, { timer });
     dumpMessage(this, "time",
                 "'" + timer.name + "' @ " + (new Date()));
   },
 
   timeEnd: function Console_timeEnd() {
     if (!shouldLog("timeEnd", this.maxLogLevel)) {
       return;
     }
     let args = Array.prototype.slice.call(arguments, 0);
     let frame = getStack(Components.stack.caller, 1)[0];
     let timer = stopTimer(args[0]);
-    sendConsoleAPIMessage(this, "timeEnd", frame, args, { timer: timer });
+    sendConsoleAPIMessage(this, "timeEnd", frame, args, { timer });
     dumpMessage(this, "timeEnd",
                 "'" + timer.name + "' " + timer.duration + "ms");
   },
 
   profile(profileName) {
     if (!shouldLog("profile", this.maxLogLevel)) {
       return;
     }
--- a/toolkit/modules/DateTimePickerHelper.jsm
+++ b/toolkit/modules/DateTimePickerHelper.jsm
@@ -33,30 +33,30 @@ this.DateTimePickerHelper = {
   weakBrowser: null,
 
   MESSAGES: [
     "FormDateTime:OpenPicker",
     "FormDateTime:ClosePicker",
     "FormDateTime:UpdatePicker"
   ],
 
-  init: function() {
+  init() {
     for (let msg of this.MESSAGES) {
       Services.mm.addMessageListener(msg, this);
     }
   },
 
-  uninit: function() {
+  uninit() {
     for (let msg of this.MESSAGES) {
       Services.mm.removeMessageListener(msg, this);
     }
   },
 
   // nsIMessageListener
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     debug("receiveMessage: " + aMessage.name);
     switch (aMessage.name) {
       case "FormDateTime:OpenPicker": {
         this.showPicker(aMessage.target, aMessage.data);
         break;
       }
       case "FormDateTime:ClosePicker": {
         if (!this.picker) {
@@ -70,17 +70,17 @@ this.DateTimePickerHelper = {
         break;
       }
       default:
         break;
     }
   },
 
   // nsIDOMEventListener
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     debug("handleEvent: " + aEvent.type);
     switch (aEvent.type) {
       case "DateTimePickerValueChanged": {
         this.updateInputBoxValue(aEvent);
         break;
       }
       case "popuphidden": {
         let browser = this.weakBrowser ? this.weakBrowser.get() : null;
@@ -91,29 +91,29 @@ this.DateTimePickerHelper = {
         break;
       }
       default:
         break;
     }
   },
 
   // Called when picker value has changed, notify input box about it.
-  updateInputBoxValue: function(aEvent) {
+  updateInputBoxValue(aEvent) {
     // TODO: parse data based on input type.
     const { hour, minute } = aEvent.detail;
     debug("hour: " + hour + ", minute: " + minute);
     let browser = this.weakBrowser ? this.weakBrowser.get() : null;
     if (browser) {
       browser.messageManager.sendAsyncMessage(
         "FormDateTime:PickerValueChanged", { hour, minute });
     }
   },
 
   // Get picker from browser and show it anchored to the input box.
-  showPicker: function(aBrowser, aData) {
+  showPicker(aBrowser, aData) {
     let rect = aData.rect;
     let type = aData.type;
     let detail = aData.detail;
 
     this._anchor = aBrowser.ownerGlobal.gBrowser.popupAnchor;
     this._anchor.left = rect.left;
     this._anchor.top = rect.top;
     this._anchor.width = rect.width;
@@ -141,33 +141,33 @@ this.DateTimePickerHelper = {
     // The arrow panel needs an anchor to work. The popupAnchor (this._anchor)
     // is a transparent div that the arrow can point to.
     this.picker.openPopup(this._anchor, "after_start", 0, 0);
 
     this.addPickerListeners();
   },
 
   // Picker is closed, do some cleanup.
-  close: function() {
+  close() {
     this.removePickerListeners();
     this.picker = null;
     this.weakBrowser = null;
     this._anchor.hidden = true;
   },
 
   // Listen to picker's event.
-  addPickerListeners: function() {
+  addPickerListeners() {
     if (!this.picker) {
       return;
     }
     this.picker.addEventListener("popuphidden", this);
     this.picker.addEventListener("DateTimePickerValueChanged", this);
   },
 
   // Stop listening to picker's event.
-  removePickerListeners: function() {
+  removePickerListeners() {
     if (!this.picker) {
       return;
     }
     this.picker.removeEventListener("popuphidden", this);
     this.picker.removeEventListener("DateTimePickerValueChanged", this);
   },
 };
--- a/toolkit/modules/DeferredTask.jsm
+++ b/toolkit/modules/DeferredTask.jsm
@@ -156,17 +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: function()
+  _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
@@ -180,17 +180,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: function()
+  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,
@@ -203,17 +203,17 @@ this.DeferredTask.prototype = {
 
   /**
    * Cancels any request for a delayed the execution of the task, though the
    * task itself cannot be canceled in case it is already running.
    *
    * This method stops any currently running timer, thus the delay will restart
    * from its original value in case the "arm" method is called again.
    */
-  disarm: function() {
+  disarm() {
     this._armed = false;
     if (this._timer) {
       // Calling the "cancel" method and discarding the timer reference makes
       // sure that the timer callback will not be called later, even if the
       // timer thread has already posted the timer event on the main thread.
       this._timer.cancel();
       this._timer = null;
     }
@@ -233,17 +233,17 @@ this.DeferredTask.prototype = {
    *   execution terminates.
    * - If the task is not running and the timer is not armed, the method returns
    *   a resolved promise.
    *
    * @return {Promise}
    * @resolves After the last execution of the task is finished.
    * @rejects Never.
    */
-  finalize: function() {
+  finalize() {
     if (this._finalized) {
       throw new Error("The object has been already finalized.");
     }
     this._finalized = true;
 
     // If the timer is armed, it means that the task is not running but it is
     // scheduled for execution.  Cancel the timer and run the task immediately.
     if (this._timer) {
@@ -257,17 +257,17 @@ this.DeferredTask.prototype = {
     }
     return Promise.resolve();
   },
   _finalized: false,
 
   /**
    * Timer callback used to run the delayed task.
    */
-  _timerCallback: function()
+  _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.
--- a/toolkit/modules/Deprecated.jsm
+++ b/toolkit/modules/Deprecated.jsm
@@ -52,17 +52,17 @@ this.Deprecated = {
    * @param string aUrl
    *        A URL pointing to documentation describing deprecation
    *        and the way to address it.
    * @param nsIStackFrame aStack
    *        An optional callstack. If it is not provided a
    *        snapshot of the current JavaScript callstack will be
    *        logged.
    */
-  warning: function(aText, aUrl, aStack) {
+  warning(aText, aUrl, aStack) {
     if (!logWarnings) {
       return;
     }
 
     // If URL is not provided, report an error.
     if (!aUrl) {
       Cu.reportError("Error in Deprecated.warning: warnings must " +
         "provide a URL documenting this deprecation.");
--- a/toolkit/modules/Finder.jsm
+++ b/toolkit/modules/Finder.jsm
@@ -49,17 +49,17 @@ function Finder(docShell) {
 Finder.prototype = {
   get iterator() {
     if (this._iterator)
       return this._iterator;
     this._iterator = Cu.import("resource://gre/modules/FinderIterator.jsm", null).FinderIterator;
     return this._iterator;
   },
 
-  destroy: function() {
+  destroy() {
     if (this._iterator)
       this._iterator.reset();
     if (this._highlighter) {
       // if we clear all the references before we hide the highlights (in both
       // highlighting modes), we simply can't use them to find the ranges we
       // need to clear from the selection.
       this._highlighter.hide();
       this._highlighter.clear();
@@ -68,26 +68,26 @@ Finder.prototype = {
     this._docShell.QueryInterface(Ci.nsIInterfaceRequestor)
       .getInterface(Ci.nsIWebProgress)
       .removeProgressListener(this, Ci.nsIWebProgress.NOTIFY_LOCATION);
     this._listeners = [];
     this._currentFoundRange = this._fastFind = this._docShell = this._previousLink =
       this._highlighter = null;
   },
 
-  addResultListener: function(aListener) {
+  addResultListener(aListener) {
     if (this._listeners.indexOf(aListener) === -1)
       this._listeners.push(aListener);
   },
 
-  removeResultListener: function(aListener) {
+  removeResultListener(aListener) {
     this._listeners = this._listeners.filter(l => l != aListener);
   },
 
-  _notify: function(options) {
+  _notify(options) {
     if (typeof options.storeResult != "boolean")
       options.storeResult = true;
 
     if (options.storeResult) {
       this._searchString = options.searchString;
       this.clipboardSearchString = options.searchString
     }
 
@@ -182,17 +182,17 @@ Finder.prototype = {
 
   /**
    * Used for normal search operations, highlights the first match.
    *
    * @param aSearchString String to search for.
    * @param aLinksOnly Only consider nodes that are links for the search.
    * @param aDrawOutline Puts an outline around matched links.
    */
-  fastFind: function(aSearchString, aLinksOnly, aDrawOutline) {
+  fastFind(aSearchString, aLinksOnly, aDrawOutline) {
     this._lastFindResult = this._fastFind.find(aSearchString, aLinksOnly);
     let searchString = this._fastFind.searchString;
     this._notify({
       searchString,
       result: this._lastFindResult,
       findBackwards: false,
       findAgain: false,
       drawOutline: aDrawOutline,
@@ -204,60 +204,60 @@ Finder.prototype = {
    * Repeat the previous search. Should only be called after a previous
    * call to Finder.fastFind.
    *
    * @param aFindBackwards Controls the search direction:
    *    true: before current match, false: after current match.
    * @param aLinksOnly Only consider nodes that are links for the search.
    * @param aDrawOutline Puts an outline around matched links.
    */
-  findAgain: function(aFindBackwards, aLinksOnly, aDrawOutline) {
+  findAgain(aFindBackwards, aLinksOnly, aDrawOutline) {
     this._lastFindResult = this._fastFind.findAgain(aFindBackwards, aLinksOnly);
     let searchString = this._fastFind.searchString;
     this._notify({
       searchString,
       result: this._lastFindResult,
       findBackwards: aFindBackwards,
       findAgain: true,
       drawOutline: aDrawOutline,
       linksOnly: aLinksOnly
     });
   },
 
   /**
    * Forcibly set the search string of the find clipboard to the currently
    * selected text in the window, on supported platforms (i.e. OSX).
    */
-  setSearchStringToSelection: function() {
+  setSearchStringToSelection() {
     let searchString = this.getActiveSelectionText();
 
     // Empty strings are rather useless to search for.
     if (!searchString.length)
       return null;
 
     this.clipboardSearchString = searchString;
     return searchString;
   },
 
   highlight: Task.async(function* (aHighlight, aWord, aLinksOnly) {
     yield this.highlighter.highlight(aHighlight, aWord, null, aLinksOnly);
   }),
 
-  getInitialSelection: function() {
+  getInitialSelection() {
     this._getWindow().setTimeout(() => {
       let initialSelection = this.getActiveSelectionText();
       for (let l of this._listeners) {
         try {
           l.onCurrentSelection(initialSelection, true);
         } catch (ex) {}
       }
     }, 0);
   },
 
-  getActiveSelectionText: function() {
+  getActiveSelectionText() {
     let focusedWindow = {};
     let focusedElement =
       Services.focus.getFocusedElementForWindow(this._getWindow(), true,
                                                 focusedWindow);
     focusedWindow = focusedWindow.value;
 
     let selText;
 
@@ -283,28 +283,28 @@ Finder.prototype = {
       if (truncChar >= 0xDC00 && truncChar <= 0xDFFF)
         truncLength++;
       selText = selText.substr(0, truncLength);
     }
 
     return selText;
   },
 
-  enableSelection: function() {
+  enableSelection() {
     this._fastFind.setSelectionModeAndRepaint(Ci.nsISelectionController.SELECTION_ON);
     this._restoreOriginalOutline();
   },
 
-  removeSelection: function() {
+  removeSelection() {
     this._fastFind.collapseSelection();
     this.enableSelection();
     this.highlighter.clear();
   },
 
-  focusContent: function() {
+  focusContent() {
     // Allow Finder listeners to cancel focusing the content.
     for (let l of this._listeners) {
       try {
         if ("shouldFocusContent" in l &&
             !l.shouldFocusContent())
           return;
       } catch (ex) {
         Cu.reportError(ex);
@@ -323,48 +323,48 @@ Finder.prototype = {
         fm.setFocus(fastFind.foundEditable, fm.FLAG_NOSCROLL);
         fastFind.collapseSelection();
       } else {
         this._getWindow().focus()
       }
     } catch (e) {}
   },
 
-  onFindbarClose: function() {
+  onFindbarClose() {
     this.enableSelection();
     this.highlighter.highlight(false);
     this.iterator.reset();
     BrowserUtils.trackToolbarVisibility(this._docShell, "findbar", false);
   },
 
-  onFindbarOpen: function() {
+  onFindbarOpen() {
     BrowserUtils.trackToolbarVisibility(this._docShell, "findbar", true);
   },
 
   onModalHighlightChange(useModalHighlight) {
     if (this._highlighter)
       this._highlighter.onModalHighlightChange(useModalHighlight);
   },
 
   onHighlightAllChange(highlightAll) {
     if (this._highlighter)
       this._highlighter.onHighlightAllChange(highlightAll);
     if (this._iterator)
       this._iterator.reset();
   },
 
-  keyPress: function(aEvent) {
+  keyPress(aEvent) {
     let controller = this._getSelectionController(this._getWindow());
 
     switch (aEvent.keyCode) {
       case Ci.nsIDOMKeyEvent.DOM_VK_RETURN:
         if (this._fastFind.foundLink) {
           let view = this._fastFind.foundLink.ownerDocument.defaultView;
           this._fastFind.foundLink.dispatchEvent(new view.MouseEvent("click", {
-            view: view,
+            view,
             cancelable: true,
             bubbles: true,
             ctrlKey: aEvent.ctrlKey,
             altKey: aEvent.altKey,
             shiftKey: aEvent.shiftKey,
             metaKey: aEvent.metaKey
           }));
         }
@@ -386,33 +386,33 @@ Finder.prototype = {
         controller.scrollLine(false);
         break;
       case Ci.nsIDOMKeyEvent.DOM_VK_DOWN:
         controller.scrollLine(true);
         break;
     }
   },
 
-  _notifyMatchesCount: function(result = this._currentMatchesCountResult) {
+  _notifyMatchesCount(result = this._currentMatchesCountResult) {
     // The `_currentFound` property is only used for internal bookkeeping.
     delete result._currentFound;
     result.limit = this.matchesCountLimit;
     if (result.total == result.limit)
       result.total = -1;
 
     for (let l of this._listeners) {
       try {
         l.onMatchesCountResult(result);
       } catch (ex) {}
     }
 
     this._currentMatchesCountResult = null;
   },
 
-  requestMatchesCount: function(aWord, aLinksOnly) {
+  requestMatchesCount(aWord, aLinksOnly) {
     if (this._lastFindResult == Ci.nsITypeAheadFind.FIND_NOTFOUND ||
         this.searchString == "" || !aWord || !this.matchesCountLimit) {
       this._notifyMatchesCount({
         total: 0,
         current: 0
       });
       return;
     }
@@ -469,25 +469,25 @@ Finder.prototype = {
   onIteratorStart() {
     this._currentMatchesCountResult = {
       total: 0,
       current: 0,
       _currentFound: false
     };
   },
 
-  _getWindow: function() {
+  _getWindow() {
     return this._docShell.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow);
   },
 
   /**
    * Get the bounding selection rect in CSS px relative to the origin of the
    * top-level content document.
    */
-  _getResultRect: function() {
+  _getResultRect() {
     let topWin = this._getWindow();
     let win = this._fastFind.currentWindow;
     if (!win)
       return null;
 
     let selection = win.getSelection();
     if (!selection.rangeCount || selection.isCollapsed) {
       // The selection can be into an input or a textarea element.
@@ -524,17 +524,17 @@ Finder.prototype = {
       let top = frame.getComputedStyle(frame.frameElement, "").borderTopWidth;
       scrollX.value += rect.left + parseInt(left, 10);
       scrollY.value += rect.top + parseInt(top, 10);
     }
     let rect = Rect.fromRect(selection.getRangeAt(0).getBoundingClientRect());
     return rect.translate(scrollX.value, scrollY.value);
   },
 
-  _outlineLink: function(aDrawOutline) {
+  _outlineLink(aDrawOutline) {
     let foundLink = this._fastFind.foundLink;
 
     // Optimization: We are drawing outlines and we matched
     // the same link before, so don't duplicate work.
     if (foundLink == this._previousLink && aDrawOutline)
       return;
 
     this._restoreOriginalOutline();
@@ -551,26 +551,26 @@ Finder.prototype = {
       // Don't set the outline-color, we should always use initial value.
       foundLink.style.outline = "1px dotted";
       foundLink.style.outlineOffset = "0";
 
       this._previousLink = foundLink;
     }
   },
 
-  _restoreOriginalOutline: function() {
+  _restoreOriginalOutline() {
     // Removes the outline around the last found link.
     if (this._previousLink) {
       this._previousLink.style.outline = this._tmpOutline;
       this._previousLink.style.outlineOffset = this._tmpOutlineOffset;
       this._previousLink = null;
     }
   },
 
-  _getSelectionController: function(aWindow) {
+  _getSelectionController(aWindow) {
     // display: none iframes don't have a selection controller, see bug 493658
     try {
       if (!aWindow.innerWidth || !aWindow.innerHeight)
         return null;
     } catch (e) {
       // If getting innerWidth or innerHeight throws, we can't get a selection
       // controller.
       return null;
@@ -584,17 +584,17 @@ Finder.prototype = {
     let controller = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsISelectionDisplay)
                              .QueryInterface(Ci.nsISelectionController);
     return controller;
   },
 
   // Start of nsIWebProgressListener implementation.
 
-  onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {
+  onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
     if (!aWebProgress.isTopLevel)
       return;
     // Ignore events that don't change the document.
     if (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT)
       return;
 
     // Avoid leaking if we change the page.
     this._lastFindResult = this._previousLink = this._currentFoundRange = null;
--- a/toolkit/modules/FinderHighlighter.jsm
+++ b/toolkit/modules/FinderHighlighter.jsm
@@ -1588,26 +1588,26 @@ FinderHighlighter.prototype = {
    * to work out which editor was being destroyed. Therefore, we create new
    * listeners on the fly, and cache them in sync with the editors they
    * listen to.
    */
   _createStateListener() {
     return {
       findbar: this,
 
-      QueryInterface: function(iid) {
+      QueryInterface(iid) {
         if (iid.equals(Ci.nsIDocumentStateListener) ||
             iid.equals(Ci.nsISupports))
           return this;
 
         throw Components.results.NS_ERROR_NO_INTERFACE;
       },
 
-      NotifyDocumentWillBeDestroyed: function() {
+      NotifyDocumentWillBeDestroyed() {
         this.findbar._onEditorDestruction(this);
       },
 
       // Unimplemented
-      notifyDocumentCreated: function() {},
-      notifyDocumentStateChanged: function(aDirty) {}
+      notifyDocumentCreated() {},
+      notifyDocumentStateChanged(aDirty) {}
     };
   }
 };
--- a/toolkit/modules/FinderIterator.jsm
+++ b/toolkit/modules/FinderIterator.jsm
@@ -332,17 +332,17 @@ this.FinderIterator = {
    * @param {Array}        rangeSource Set of ranges to iterate over
    * @param {nsIDOMWindow} window      The window object is only really used
    *                                   for access to `setTimeout`
    * @param {Boolean}      [withPause] Whether to pause after each `kIterationSizeMax`
    *                                   number of ranges yielded. Optional, defaults
    *                                   to `true`.
    * @yield {nsIDOMRange}
    */
-  _yieldResult: function* (listener, rangeSource, window, withPause = true) {
+  *_yieldResult(listener, rangeSource, window, withPause = true) {
     // We keep track of the number of iterations to allow a short pause between
     // every `kIterationSizeMax` number of iterations.
     let iterCount = 0;
     let { limit, onEnd } = this._listeners.get(listener);
     let ranges = rangeSource.slice(0, limit > -1 ? limit : undefined);
     for (let range of ranges) {
       try {
         range.startContainer;
@@ -511,17 +511,17 @@ this.FinderIterator = {
    * @param {Boolean}      options.caseSensitive Whether to search in case
    *                                             sensitive mode
    * @param {Boolean}      options.entireWord    Whether to search in entire-word
    *                                             mode
    * @param {String}       options.word          The word to search for
    * @param {nsIDOMWindow} window                The window to search in
    * @yield {nsIDOMRange}
    */
-  _iterateDocument: function* ({ caseSensitive, entireWord, word }, window) {
+  *_iterateDocument({ caseSensitive, entireWord, word }, window) {
     let doc = window.document;
     let body = (doc instanceof Ci.nsIDOMHTMLDocument && doc.body) ?
                doc.body : doc.documentElement;
 
     if (!body)
       return;
 
     let searchRange = doc.createRange();
--- a/toolkit/modules/GMPInstallManager.jsm
+++ b/toolkit/modules/GMPInstallManager.jsm
@@ -55,17 +55,17 @@ function GMPInstallManager() {
 }
 /**
  * Temp file name used for downloading
  */
 GMPInstallManager.prototype = {
   /**
    * Obtains a URL with replacement of vars
    */
-  _getURL: function() {
+  _getURL() {
     let log = getScopedLogger("GMPInstallManager._getURL");
     // Use the override URL if it is specified.  The override URL is just like
     // the normal URL but it does not check the cert.
     let url = GMPPrefs.get(GMPPrefs.KEY_URL_OVERRIDE);
     if (url) {
       log.info("Using override url: " + url);
     } else {
       url = GMPPrefs.get(GMPPrefs.KEY_URL);
@@ -84,17 +84,17 @@ GMPInstallManager.prototype = {
    *           gmpAddons: array of GMPAddons
    *           usedFallback: whether the data was collected from online or
    *                         from fallback data within the build
    *         The promise is rejected with an object with properties:
    *           target: The XHR request object
    *           status: The HTTP status code
    *           type: Sometimes specifies type of rejection
    */
-  checkForAddons: function() {
+  checkForAddons() {
     let log = getScopedLogger("GMPInstallManager.checkForAddons");
     if (this._deferred) {
         log.error("checkForAddons already called");
         return Promise.reject({type: "alreadycalled"});
     }
     this._deferred = Promise.defer();
     let url = this._getURL();
 
@@ -132,51 +132,51 @@ GMPInstallManager.prototype = {
    * @return a promise which will be resolved or rejected
    *         The promise will resolve with an array of paths that were extracted
    *         The promise will reject with an error object:
    *           target: The XHR request object
    *           status: The HTTP status code
    *           type: A string to represent the type of error
    *                 downloaderr, verifyerr or previouserrorencountered
    */
-  installAddon: function(gmpAddon) {
+  installAddon(gmpAddon) {
     if (this._deferred) {
         log.error("previous error encountered");
         return Promise.reject({type: "previouserrorencountered"});
     }
     this.gmpDownloader = new GMPDownloader(gmpAddon);
     return this.gmpDownloader.start();
   },
-  _getTimeSinceLastCheck: function() {
+  _getTimeSinceLastCheck() {
     let now = Math.round(Date.now() / 1000);
     // Default to 0 here because `now - 0` will be returned later if that case
     // is hit. We want a large value so a check will occur.
     let lastCheck = GMPPrefs.get(GMPPrefs.KEY_UPDATE_LAST_CHECK, 0);
     // Handle clock jumps, return now since we want it to represent
     // a lot of time has passed since the last check.
     if (now < lastCheck) {
       return now;
     }
     return now - lastCheck;
   },
   get _isEMEEnabled() {
     return GMPPrefs.get(GMPPrefs.KEY_EME_ENABLED, true);
   },
-  _isAddonEnabled: function(aAddon) {
+  _isAddonEnabled(aAddon) {
     return GMPPrefs.get(GMPPrefs.KEY_PLUGIN_ENABLED, true, aAddon);
   },
-  _isAddonUpdateEnabled: function(aAddon) {
+  _isAddonUpdateEnabled(aAddon) {
     return this._isAddonEnabled(aAddon) &&
            GMPPrefs.get(GMPPrefs.KEY_PLUGIN_AUTOUPDATE, true, aAddon);
   },
-  _updateLastCheck: function() {
+  _updateLastCheck() {
     let now = Math.round(Date.now() / 1000);
     GMPPrefs.set(GMPPrefs.KEY_UPDATE_LAST_CHECK, now);
   },
-  _versionchangeOccurred: function() {
+  _versionchangeOccurred() {
     let savedBuildID = GMPPrefs.get(GMPPrefs.KEY_BUILDID, null);
     let buildID = Services.appinfo.platformBuildID;
     if (savedBuildID == buildID) {
       return false;
     }
     GMPPrefs.set(GMPPrefs.KEY_BUILDID, buildID);
     return true;
   },
@@ -288,17 +288,17 @@ GMPInstallManager.prototype = {
       log.error("Could not check for addons", e);
       throw e;
     }
   }),
 
   /**
    * Makes sure everything is cleaned up
    */
-  uninit: function() {
+  uninit() {
     let log = getScopedLogger("GMPInstallManager.uninit");
     if (this._request) {
       log.info("Aborting request");
       this._request.abort();
     }
     if (this._deferred) {
         log.info("Rejecting deferred");
         this._deferred.reject({type: "uninitialized"});
@@ -327,17 +327,17 @@ function GMPAddon(addon) {
   }
   log.info("Created new addon: " + this.toString());
 }
 
 GMPAddon.prototype = {
   /**
    * Returns a string representation of the addon
    */
-  toString: function() {
+  toString() {
     return this.id + " (" +
            "isValid: " + this.isValid +
            ", isInstalled: " + this.isInstalled +
            ", hashFunction: " + this.hashFunction +
            ", hashValue: " + this.hashValue +
            (this.size !== undefined ? ", size: " + this.size : "" ) +
            ")";
   },
@@ -378,32 +378,32 @@ GMPExtractor.prototype = {
   /**
    * Obtains a list of all the entries in a zipfile in the format of *.*.
    * This also includes files inside directories.
    *
    * @param zipReader the nsIZipReader to check
    * @return An array of string name entries which can be used
    *         in nsIZipReader.extract
    */
-  _getZipEntries: function(zipReader) {
+  _getZipEntries(zipReader) {
     let entries = [];
     let enumerator = zipReader.findEntries("*.*");
     while (enumerator.hasMore()) {
       entries.push(enumerator.getNext());
     }
     return entries;
   },
   /**
    * Installs the this.zipPath contents into the directory used to store GMP
    * addons for the current platform.
    *
    * @return a promise which will be resolved or rejected
    *         See GMPInstallManager.installAddon for resolve/rejected info
    */
-  install: function() {
+  install() {
     try {
       let log = getScopedLogger("GMPExtractor.install");
       this._deferred = Promise.defer();
       log.info("Installing " + this.zipPath + "...");
       // Get the input zip file
       let zipFile = Cc["@mozilla.org/file/local;1"].
                     createInstance(Ci.nsIFile);
       zipFile.initWithPath(this.zipPath);
@@ -479,25 +479,25 @@ function GMPDownloader(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
    */
-  start: function() {
+  start() {
     let log = getScopedLogger("GMPDownloader");
     let gmpAddon = this._gmpAddon;
 
     if (!gmpAddon.isValid) {
       log.info("gmpAddon is not valid, will not continue");
       return Promise.reject({
         target: this,
-        status: status,
+        status,
         type: "downloaderr"
       });
     }
 
     return ProductAddonChecker.downloadAddon(gmpAddon).then((zipPath) => {
       let path = OS.Path.join(OS.Constants.Path.profileDir,
                               gmpAddon.id,
                               gmpAddon.version);
--- a/toolkit/modules/GMPUtils.jsm
+++ b/toolkit/modules/GMPUtils.jsm
@@ -36,17 +36,17 @@ var GMPPluginHiddenReason = {
 
 this.GMPUtils = {
   /**
    * Checks whether or not a given plugin is hidden. Hidden plugins are neither
    * downloaded nor displayed in the addons manager.
    * @param   aPlugin
    *          The plugin to check.
    */
-  isPluginHidden: function(aPlugin) {
+  isPluginHidden(aPlugin) {
     if (this._is32bitModeMacOS()) {
       // GMPs are hidden on MacOS when running in 32 bit mode.
       // See bug 1291537.
       return true;
     }
     if (!aPlugin.isEME) {
       return false;
     }
@@ -63,17 +63,17 @@ this.GMPUtils = {
     return false;
   },
 
   /**
    * Checks whether or not a given plugin is supported by the current OS.
    * @param   aPlugin
    *          The plugin to check.
    */
-  _isPluginSupported: function(aPlugin) {
+  _isPluginSupported(aPlugin) {
     if (this._isPluginForceSupported(aPlugin)) {
       return true;
     }
     if (aPlugin.id == EME_ADOBE_ID) {
       // Windows Vista and later only supported by Adobe EME.
       return AppConstants.isPlatformAndVersionAtLeast("win", "6");
     } else if (aPlugin.id == WIDEVINE_ID) {
       // The Widevine plugin is available for Windows versions Vista and later,
@@ -81,42 +81,42 @@ this.GMPUtils = {
       return AppConstants.isPlatformAndVersionAtLeast("win", "6") ||
              AppConstants.platform == "macosx" ||
              AppConstants.platform == "linux";
     }
 
     return true;
   },
 
-  _is32bitModeMacOS: function() {
+  _is32bitModeMacOS() {
     if (AppConstants.platform != "macosx") {
       return false;
     }
     return Services.appinfo.XPCOMABI.split("-")[0] == "x86";
   },
 
   /**
    * Checks whether or not a given plugin is visible in the addons manager
    * UI and the "enable DRM" notification box. This can be used to test
    * plugins that aren't yet turned on in the mozconfig.
    * @param   aPlugin
    *          The plugin to check.
    */
-  _isPluginVisible: function(aPlugin) {
+  _isPluginVisible(aPlugin) {
     return GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VISIBLE, false, aPlugin.id);
   },
 
   /**
    * Checks whether or not a given plugin is forced-supported. This is used
    * in automated tests to override the checks that prevent GMPs running on an
    * unsupported platform.
    * @param   aPlugin
    *          The plugin to check.
    */
-  _isPluginForceSupported: function(aPlugin) {
+  _isPluginForceSupported(aPlugin) {
     return GMPPrefs.get(GMPPrefs.KEY_PLUGIN_FORCE_SUPPORTED, false, aPlugin.id);
   },
 };
 
 /**
  * Manages preferences for GMP addons
  */
 this.GMPPrefs = {
@@ -146,17 +146,17 @@ this.GMPPrefs = {
 
   /**
    * Obtains the specified preference in relation to the specified plugin.
    * @param aKey The preference key value to use.
    * @param aDefaultValue The default value if no preference exists.
    * @param aPlugin The plugin to scope the preference to.
    * @return The obtained preference value, or the defaultValue if none exists.
    */
-  get: function(aKey, aDefaultValue, aPlugin) {
+  get(aKey, aDefaultValue, aPlugin) {
     if (aKey === this.KEY_APP_DISTRIBUTION ||
         aKey === this.KEY_APP_DISTRIBUTION_VERSION) {
       let prefValue = "default";
       try {
         prefValue = Services.prefs.getDefaultBranch(null).getCharPref(aKey);
       } catch (e) {
         // use default when pref not found
       }
@@ -166,43 +166,43 @@ this.GMPPrefs = {
   },
 
   /**
    * Sets the specified preference in relation to the specified plugin.
    * @param aKey The preference key value to use.
    * @param aVal The value to set.
    * @param aPlugin The plugin to scope the preference to.
    */
-  set: function(aKey, aVal, aPlugin) {
+  set(aKey, aVal, aPlugin) {
     Preferences.set(this.getPrefKey(aKey, aPlugin), aVal);
   },
 
   /**
    * Checks whether or not the specified preference is set in relation to the
    * specified plugin.
    * @param aKey The preference key value to use.
    * @param aPlugin The plugin to scope the preference to.
    * @return true if the preference is set, false otherwise.
    */
-  isSet: function(aKey, aPlugin) {
+  isSet(aKey, aPlugin) {
     return Preferences.isSet(this.getPrefKey(aKey, aPlugin));
   },
 
   /**
    * Resets the specified preference in relation to the specified plugin to its
    * default.
    * @param aKey The preference key value to use.
    * @param aPlugin The plugin to scope the preference to.
    */
-  reset: function(aKey, aPlugin) {
+  reset(aKey, aPlugin) {
     Preferences.reset(this.getPrefKey(aKey, aPlugin));
   },
 
   /**
    * Scopes the specified preference key to the specified plugin.
    * @param aKey The preference key value to use.
    * @param aPlugin The plugin to scope the preference to.
    * @return A preference key scoped to the specified plugin.
    */
-  getPrefKey: function(aKey, aPlugin) {
+  getPrefKey(aKey, aPlugin) {
     return aKey.replace("{0}", aPlugin || "");
   },
 };
--- a/toolkit/modules/Geometry.jsm
+++ b/toolkit/modules/Geometry.jsm
@@ -51,17 +51,17 @@ Point.prototype = {
   },
 
   scale: function scale(s) {
     this.x *= s;
     this.y *= s;
     return this;
   },
 
-  isZero: function() {
+  isZero() {
     return this.x == 0 && this.y == 0;
   }
 };
 
 (function() {
   function takePointOrArgs(f) {
     return function(arg1, arg2) {
       if (arg2 === undefined)
@@ -111,26 +111,26 @@ Rect.prototype = {
   },
   set width(v) { this.right = this.left + v; },
   set height(v) { this.bottom = this.top + v; },
 
   isEmpty: function isEmpty() {
     return this.left >= this.right || this.top >= this.bottom;
   },
 
-  setRect: function(x, y, w, h) {
+  setRect(x, y, w, h) {
     this.left = x;
     this.top = y;
     this.right = x + w;
     this.bottom = y + h;
 
     return this;
   },
 
-  setBounds: function(l, t, r, b) {
+  setBounds(l, t, r, b) {
     this.top = t;
     this.left = l;
     this.bottom = b;
     this.right = r;
 
     return this;
   },
 
@@ -149,58 +149,58 @@ Rect.prototype = {
 
   center: function center() {
     if (this.isEmpty())
       throw "Empty rectangles do not have centers";
     return new Point(this.left + (this.right - this.left) / 2,
                           this.top + (this.bottom - this.top) / 2);
   },
 
-  copyFrom: function(other) {
+  copyFrom(other) {
     this.top = other.top;
     this.left = other.left;
     this.bottom = other.bottom;
     this.right = other.right;
 
     return this;
   },
 
-  translate: function(x, y) {
+  translate(x, y) {
     this.left += x;
     this.right += x;
     this.top += y;
     this.bottom += y;
 
     return this;
   },
 
-  toString: function() {
+  toString() {
     return "[" + this.x + "," + this.y + "," + this.width + "," + this.height + "]";
   },
 
   /** return a new rect that is the union of that one and this one */
-  union: function(other) {
+  union(other) {
     return this.clone().expandToContain(other);
   },
 
-  contains: function(other) {
+  contains(other) {
     if (other.isEmpty()) return true;
     if (this.isEmpty()) return false;
 
     return (other.left >= this.left &&
             other.right <= this.right &&
             other.top >= this.top &&
             other.bottom <= this.bottom);
   },
 
-  intersect: function(other) {
+  intersect(other) {
     return this.clone().restrictTo(other);
   },
 
-  intersects: function(other) {
+  intersects(other) {
     if (this.isEmpty() || other.isEmpty())
       return false;
 
     let x1 = Math.max(this.left, other.left);
     let x2 = Math.min(this.right, other.right);
     let y1 = Math.max(this.top, other.top);
     let y2 = Math.min(this.bottom, other.bottom);
     return x1 < x2 && y1 < y2;
--- a/toolkit/modules/InlineSpellChecker.jsm
+++ b/toolkit/modules/InlineSpellChecker.jsm
@@ -14,43 +14,43 @@ 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: function(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: function(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: function()
+  uninit()
   {
     if (this.mRemote) {
       this.mRemote.uninit();
       this.mRemote = null;
     }
 
     this.mEditor = null;
     this.mInlineSpellChecker = null;
@@ -62,17 +62,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: function(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);
@@ -129,17 +129,17 @@ InlineSpellChecker.prototype = {
   // returns true if the given event is over a misspelled word
   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: function(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 (?)
@@ -167,25 +167,25 @@ 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: function()
+  clearSuggestionsFromMenu()
   {
     for (var i = 0; i < this.mSuggestionItems.length; i++) {
       this.mMenu.removeChild(this.mSuggestionItems[i]);
     }
     this.mSuggestionItems = [];
   },
 
-  sortDictionaryList: function(list) {
+  sortDictionaryList(list) {
     var sortedList = [];
     for (var i = 0; i < list.length; i++) {
       sortedList.push({"id": list[i],
                        "label": this.getDictionaryDisplayName(list[i])});
     }
     sortedList.sort(function(a, b) {
       if (a.label < b.label)
         return -1;
@@ -194,17 +194,17 @@ 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: function(menu, insertBefore)
+  addDictionaryListToMenu(menu, insertBefore)
   {
     this.mDictionaryMenu = menu;
     this.mDictionaryNames = [];
     this.mDictionaryItems = [];
 
     if (!this.enabled)
       return 0;
 
@@ -253,17 +253,17 @@ InlineSpellChecker.prototype = {
         menu.insertBefore(item, insertBefore);
       else
         menu.appendChild(item);
     }
     return list.length;
   },
 
   // Formats a valid BCP 47 language tag based on available localized names.
-  getDictionaryDisplayName: function(dictionaryName) {
+  getDictionaryDisplayName(dictionaryName) {
     try {
       // Get the display name for this dictionary.
       let languageTagMatch = /^([a-z]{2,3}|[a-z]{4}|[a-z]{5,8})(?:[-_]([a-z]{4}))?(?:[-_]([A-Z]{2}|[0-9]{3}))?((?:[-_](?:[a-z0-9]{5,8}|[0-9][a-z0-9]{3}))*)(?:[-_][a-wy-z0-9](?:[-_][a-z0-9]{2,8})+)*(?:[-_]x(?:[-_][a-z0-9]{1,8})+)?$/i;
       var [/* languageTag */, languageSubtag, scriptSubtag, regionSubtag, variantSubtags] = dictionaryName.match(languageTagMatch);
     } catch (e) {
       // If we weren't given a valid language tag, just use the raw dictionary name.
       return dictionaryName;
     }
@@ -313,94 +313,94 @@ 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: function()
+  clearDictionaryListFromMenu()
   {
     for (var i = 0; i < this.mDictionaryItems.length; i++) {
       this.mDictionaryMenu.removeChild(this.mDictionaryItems[i]);
     }
     this.mDictionaryItems = [];
   },
 
   // callback for selecting a dictionary
-  selectDictionary: function(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: function(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: function()
+  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: function()
+  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: function()
+  undoAddToDictionary()
   {
     if (this.mAddedWordStack.length > 0)
     {
       var word = this.mAddedWordStack.pop();
       if (this.mRemote)
         this.mRemote.undoAddToDictionary(word);
       else
         this.mInlineSpellChecker.removeWordFromDictionary(word);
     }
   },
-  canUndo : function()
+  canUndo()
   {
     // Return true if we have words on the stack
     return (this.mAddedWordStack.length > 0);
   },
-  ignoreWord: function()
+  ignoreWord()
   {
     if (this.mRemote)
       this.mRemote.ignoreWord();
     else
       this.mInlineSpellChecker.ignoreWord(this.mMisspelling);
   }
 };
 
--- a/toolkit/modules/InlineSpellCheckerContent.jsm
+++ b/toolkit/modules/InlineSpellCheckerContent.jsm
@@ -63,17 +63,17 @@ var InlineSpellCheckerContent = {
 
     return { canSpellCheck: spellChecker.canSpellCheck,
              initialSpellCheckPending: spellChecker.initialSpellCheckPending,
              enableRealTimeSpell: spellChecker.enabled,
              overMisspelling: spellChecker.overMisspelling,
              misspelling: spellChecker.mMisspelling,
              spellSuggestions: this._generateSpellSuggestions(),
              currentDictionary: spellChecker.mInlineSpellChecker.spellChecker.GetCurrentDictionary(),
-             dictionaryList: dictionaryList };
+             dictionaryList };
   },
 
   uninitContextMenu() {
     for (let i of this._messages)
       this._manager.removeMessageListener(i, this);
 
     this._manager = null;
     this._spellChecker = null;
--- a/toolkit/modules/Integration.jsm
+++ b/toolkit/modules/Integration.jsm
@@ -138,17 +138,17 @@ this.Integration = new Proxy({}, {
 });
 
 /**
  * Individual integration point for which overrides can be registered.
  */
 this.IntegrationPoint = function() {
   this._overrideFns = new Set();
   this._combined = {
-    QueryInterface: function() {
+    QueryInterface() {
       let ex = new Components.Exception(
                    "Integration objects should not be used with XPCOM because" +
                    " they change when new overrides are registered.",
                    Cr.NS_ERROR_NO_INTERFACE);
       Cu.reportError(ex);
       throw ex;
     },
   };
--- a/toolkit/modules/LightweightThemeConsumer.jsm
+++ b/toolkit/modules/LightweightThemeConsumer.jsm
@@ -43,66 +43,66 @@ LightweightThemeConsumer.prototype = {
   _lastData: null,
   _lastScreenWidth: null,
   _lastScreenHeight: null,
   // Whether the active lightweight theme should be shown on the window.
   _enabled: true,
   // Whether a lightweight theme is enabled.
   _active: false,
 
-  enable: function() {
+  enable() {
     this._enabled = true;
     this._update(this._lastData);
   },
 
-  disable: function() {
+  disable() {
     // Dance to keep the data, but reset the applied styles:
     let lastData = this._lastData
     this._update(null);
     this._enabled = false;
     this._lastData = lastData;
   },
 
-  getData: function() {
+  getData() {
     return this._enabled ? Cu.cloneInto(this._lastData, this._win) : null;
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic != "lightweight-theme-styling-update")
       return;
 
     this._update(JSON.parse(aData));
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     let {width, height} = this._win.screen;
 
     if (this._lastScreenWidth != width || this._lastScreenHeight != height) {
       this._lastScreenWidth = width;
       this._lastScreenHeight = height;
       if (!this._active)
         return;
       this._update(this._lastData);
       Services.obs.notifyObservers(this._win, "lightweight-theme-optimized",
                                    JSON.stringify(this._lastData));
     }
   },
 
-  destroy: function() {
+  destroy() {
     if (!PrivateBrowsingUtils.isWindowPrivate(this._win) ||
         PrivateBrowsingUtils.permanentPrivateBrowsing) {
       Services.obs.removeObserver(this, "lightweight-theme-styling-update");
 
       this._win.removeEventListener("resize", this);
     }
 
     this._win = this._doc = null;
   },
 
-  _update: function(aData) {
+  _update(aData) {
     if (!aData) {
       aData = { headerURL: "", footerURL: "", textcolor: "", accentcolor: "" };
       this._lastData = aData;
     } else {
       this._lastData = aData;
       aData = LightweightThemeImageOptimizer.optimize(aData, this._win.screen);
     }
     if (!this._enabled)
--- a/toolkit/modules/Log.jsm
+++ b/toolkit/modules/Log.jsm
@@ -68,34 +68,34 @@ this.Log = {
     Log.repository = new LoggerRepository();
     return Log.repository;
   },
   set repository(value) {
     delete Log.repository;
     Log.repository = value;
   },
 
-  LogMessage: LogMessage,
-  Logger: Logger,
-  LoggerRepository: LoggerRepository,
+  LogMessage,
+  Logger,
+  LoggerRepository,
 
-  Formatter: Formatter,
-  BasicFormatter: BasicFormatter,
-  MessageOnlyFormatter: MessageOnlyFormatter,
-  StructuredFormatter: StructuredFormatter,
+  Formatter,
+  BasicFormatter,
+  MessageOnlyFormatter,
+  StructuredFormatter,
 
-  Appender: Appender,
-  DumpAppender: DumpAppender,
-  ConsoleAppender: ConsoleAppender,
-  StorageStreamAppender: StorageStreamAppender,
+  Appender,
+  DumpAppender,
+  ConsoleAppender,
+  StorageStreamAppender,
 
-  FileAppender: FileAppender,
-  BoundedFileAppender: BoundedFileAppender,
+  FileAppender,
+  BoundedFileAppender,
 
-  ParameterFormatter: ParameterFormatter,
+  ParameterFormatter,
   // Logging helper:
   // let logger = Log.repository.getLogger("foo");
   // logger.info(Log.enumerateInterfaces(someObject).join(","));
   enumerateInterfaces: function Log_enumerateInterfaces(aObject) {
     let interfaces = [];
 
     for (i in Ci) {
       try {
@@ -106,17 +106,17 @@ this.Log = {
     }
 
     return interfaces;
   },
 
   // Logging helper:
   // let logger = Log.repository.getLogger("foo");
   // logger.info(Log.enumerateProperties(someObject).join(","));
-  enumerateProperties: function(aObject, aExcludeComplexTypes) {
+  enumerateProperties(aObject, aExcludeComplexTypes) {
     let properties = [];
 
     for (p in aObject) {
       try {
         if (aExcludeComplexTypes &&
             (typeof(aObject[p]) == "object" || typeof(aObject[p]) == "function"))
           continue;
         properties.push(p + " = " + aObject[p]);
@@ -340,17 +340,17 @@ Logger.prototype = {
    *          log consumer.
    * @param params
    *        (object) Parameters to be included in the message.
    *          If _level is included as a key and the corresponding value
    *          is a number or known level name, the message will be logged
    *          at the indicated level. If _message is included as a key, the
    *          value is used as the descriptive text for the message.
    */
-  logStructured: function(action, params) {
+  logStructured(action, params) {
     if (!action) {
       throw "An action is required when logging a structured message.";
     }
     if (!params) {
       this.log(this.level, undefined, {"action": action});
       return;
     }
     if (typeof(params) != "object") {
@@ -366,17 +366,17 @@ Logger.prototype = {
     } else {
       level = this.level;
     }
 
     params.action = action;
     this.log(level, params._message, params);
   },
 
-  log: function(level, string, params) {
+  log(level, string, params) {
     if (this.level > level)
       return;
 
     // Hold off on creating the message object until we actually have
     // an appender that's responsible.
     let message;
     let appenders = this.appenders;
     for (let appender of appenders) {
@@ -385,35 +385,35 @@ Logger.prototype = {
       }
       if (!message) {
         message = new LogMessage(this._name, level, string, params);
       }
       appender.append(message);
     }
   },
 
-  fatal: function(string, params) {
+  fatal(string, params) {
     this.log(Log.Level.Fatal, string, params);
   },
-  error: function(string, params) {
+  error(string, params) {
     this.log(Log.Level.Error, string, params);
   },
-  warn: function(string, params) {
+  warn(string, params) {
     this.log(Log.Level.Warn, string, params);
   },
-  info: function(string, params) {
+  info(string, params) {
     this.log(Log.Level.Info, string, params);
   },
-  config: function(string, params) {
+  config(string, params) {
     this.log(Log.Level.Config, string, params);
   },
-  debug: function(string, params) {
+  debug(string, params) {
     this.log(Log.Level.Debug, string, params);
   },
-  trace: function(string, params) {
+  trace(string, params) {
     this.log(Log.Level.Trace, string, params);
   }
 };
 
 /*
  * LoggerRepository
  * Implements a hierarchy of Loggers
  */
@@ -467,17 +467,17 @@ LoggerRepository.prototype = {
    * Obtain a named Logger.
    *
    * The returned Logger instance for a particular name is shared among
    * all callers. In other words, if two consumers call getLogger("foo"),
    * they will both have a reference to the same object.
    *
    * @return Logger
    */
-  getLogger: function(name) {
+  getLogger(name) {
     if (name in this._loggers)
       return this._loggers[name];
     this._loggers[name] = new Logger(name, this);
     this._updateParents(name);
     return this._loggers[name];
   },
 
   /**
@@ -492,17 +492,17 @@ LoggerRepository.prototype = {
    * up to the original Logger instance. The new prototype has log functions
    * that prefix content to each message.
    *
    * @param name
    *        (string) The Logger to retrieve.
    * @param prefix
    *        (string) The string to prefix each logged message with.
    */
-  getLoggerWithMessagePrefix: function(name, prefix) {
+  getLoggerWithMessagePrefix(name, prefix) {
     let log = this.getLogger(name);
 
     let proxy = Object.create(log);
     proxy.log = (level, string, params) => log.log(level, prefix + string, params);
     return proxy;
   },
 };
 
@@ -531,17 +531,17 @@ BasicFormatter.prototype = {
   /**
    * Format the text of a message with optional parameters.
    * If the text contains ${identifier}, replace that with
    * the value of params[identifier]; if ${}, replace that with
    * the entire params object. If no params have been substituted
    * into the text, format the entire object and append that
    * to the message.
    */
-  formatText: function(message) {
+  formatText(message) {
     let params = message.params;
     if (typeof(params) == "undefined") {
       return message.message || "";
     }
     // Defensive handling of non-object params
     // We could add a special case for NSRESULT values here...
     let pIsObject = (typeof(params) == 'object' || typeof(params) == 'function');
 
@@ -590,29 +590,29 @@ BasicFormatter.prototype = {
 /**
  * A formatter that only formats the string message component.
  */
 function MessageOnlyFormatter() {
 }
 MessageOnlyFormatter.prototype = Object.freeze({
   __proto__: Formatter.prototype,
 
-  format: function(message) {
+  format(message) {
     return message.message;
   },
 });
 
 // Structured formatter that outputs JSON based on message data.
 // This formatter will format unstructured messages by supplying
 // default values.
 function StructuredFormatter() { }
 StructuredFormatter.prototype = {
   __proto__: Formatter.prototype,
 
-  format: function(logMessage) {
+  format(logMessage) {
     let output = {
       _time: logMessage.time,
       _namespace: logMessage.loggerName,
       _level: logMessage.levelDesc
     };
 
     for (let key in logMessage.params) {
       output[key] = logMessage.params[key];
@@ -643,17 +643,17 @@ function isError(aObj) {
  * These massage an object used as a parameter for a LogMessage into
  * a string representation of the object.
  */
 
 function ParameterFormatter() {
   this._name = "ParameterFormatter"
 }
 ParameterFormatter.prototype = {
-  format: function(ob) {
+  format(ob) {
     try {
       if (ob === undefined) {
         return "undefined";
       }
       if (ob === null) {
         return "null";
       }
       // Pass through primitive types and objects that unbox to primitive types.
@@ -823,17 +823,17 @@ StorageStreamAppender.prototype = {
     if (!this._outputStream) {
       return;
     }
     this.outputStream.close();
     this._outputStream = null;
     this._ss = null;
   },
 
-  doAppend: function(formatted) {
+  doAppend(formatted) {
     if (!formatted) {
       return;
     }
     try {
       this.outputStream.writeString(formatted + "\n");
     } catch (ex) {
       if (ex.result == Cr.NS_BASE_STREAM_CLOSED) {
         // The underlying output stream is closed, so let's open a new one
@@ -863,55 +863,55 @@ function FileAppender(path, formatter) {
 
   // This is a promise exposed for testing/debugging the logger itself.
   this._lastWritePromise = null;
 }
 
 FileAppender.prototype = {
   __proto__: Appender.prototype,
 
-  _openFile: function() {
+  _openFile() {
     return Task.spawn(function* _openFile() {
       try {
         this._file = yield OS.File.open(this._path,
                                         {truncate: true});
       } catch (err) {
         if (err instanceof OS.File.Error) {
           this._file = null;
         } else {
           throw err;
         }
       }
     }.bind(this));
   },
 
-  _getFile: function() {
+  _getFile() {
     if (!this._fileReadyPromise) {
       this._fileReadyPromise = this._openFile();
     }
 
     return this._fileReadyPromise;
   },
 
-  doAppend: function(formatted) {
+  doAppend(formatted) {
     let array = this._encoder.encode(formatted + "\n");
     if (this._file) {
       this._lastWritePromise = this._file.write(array);
     } else {
       this._lastWritePromise = this._getFile().then(_ => {
         this._fileReadyPromise = null;
         if (this._file) {
           return this._file.write(array);
         }
         return undefined;
       });
     }
   },
 
-  reset: function() {
+  reset() {
     let fileClosePromise = this._file.close();
     return fileClosePromise.then(_ => {
       this._file = null;
       return OS.File.remove(this._path);
     });
   }
 };
 
@@ -928,32 +928,32 @@ function BoundedFileAppender(path, forma
   this._size = 0;
   this._maxSize = maxSize;
   this._closeFilePromise = null;
 }
 
 BoundedFileAppender.prototype = {
   __proto__: FileAppender.prototype,
 
-  doAppend: function(formatted) {
+  doAppend(formatted) {
     if (!this._removeFilePromise) {
       if (this._size < this._maxSize) {
         this._size += formatted.length;
         return FileAppender.prototype.doAppend.call(this, formatted);
       }
       this._removeFilePromise = this.reset();
     }
     this._removeFilePromise.then(_ => {
       this._removeFilePromise = null;
       this.doAppend(formatted);
     });
     return undefined;
   },
 
-  reset: function() {
+  reset() {
     let fileClosePromise;
     if (this._fileReadyPromise) {
       // An attempt to open the file may still be in progress.
       fileClosePromise = this._fileReadyPromise.then(_ => {
         return this._file.close();
       });
     } else {
       fileClosePromise = this._file.close();
--- a/toolkit/modules/NewTabUtils.jsm
+++ b/toolkit/modules/NewTabUtils.jsm
@@ -517,17 +517,17 @@ var BlockedLinks = {
   /**
    * The cached list of blocked links.
    */
   _links: null,
 
   /**
    * Registers an object that will be notified when the blocked links change.
    */
-  addObserver: function(aObserver) {
+  addObserver(aObserver) {
     this._observers.push(aObserver);
   },
 
   /**
    * The list of blocked links.
    */
   get links() {
     if (!this._links)
@@ -643,42 +643,42 @@ var PlacesProvider = {
     options.maxResults = this.maxNumLinks;
 
     // Sort by frecency, descending.
     options.sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_FRECENCY_DESCENDING
 
     let links = [];
 
     let callback = {
-      handleResult: function(aResultSet) {
+      handleResult(aResultSet) {
         let row;
 
         while ((row = aResultSet.getNextRow())) {
           let url = row.getResultByIndex(1);
           if (LinkChecker.checkLoadURI(url)) {
             let title = row.getResultByIndex(2);
             let frecency = row.getResultByIndex(12);
             let lastVisitDate = row.getResultByIndex(5);
             links.push({
-              url: url,
-              title: title,
-              frecency: frecency,
-              lastVisitDate: lastVisitDate,
+              url,
+              title,
+              frecency,
+              lastVisitDate,
               type: "history",
             });
           }
         }
       },
 
-      handleError: function(aError) {
+      handleError(aError) {
         // Should we somehow handle this error?
         aCallback([]);
       },
 
-      handleCompletion: function(aReason) {
+      handleCompletion(aReason) {
         // The Places query breaks ties in frecency by place ID descending, but
         // that's different from how Links.compareLinks breaks ties, because
         // compareLinks doesn't have access to place IDs.  It's very important
         // that the initial list of links is sorted in the same order imposed by
         // compareLinks, because Links uses compareLinks to perform binary
         // searches on the list.  So, ensure the list is so ordered.
         let i = 1;
         let outOfOrder = [];
@@ -723,36 +723,36 @@ var PlacesProvider = {
     this._observers.push(aObserver);
   },
 
   _observers: [],
 
   /**
    * Called by the history service.
    */
-  onBeginUpdateBatch: function() {
+  onBeginUpdateBatch() {
     this._batchProcessingDepth += 1;
   },
 
-  onEndUpdateBatch: function() {
+  onEndUpdateBatch() {
     this._batchProcessingDepth -= 1;
     if (this._batchProcessingDepth == 0 && this._batchCalledFrecencyChanged) {
       this.onManyFrecenciesChanged();
       this._batchCalledFrecencyChanged = false;
     }
   },
 
   onDeleteURI: function PlacesProvider_onDeleteURI(aURI, aGUID, aReason) {
     // let observers remove sensetive data associated with deleted visit
     this._callObservers("onDeleteURI", {
       url: aURI.spec,
     });
   },
 
-  onClearHistory: function() {
+  onClearHistory() {
     this._callObservers("onClearHistory")
   },
 
   /**
    * Called by the history service.
    */
   onFrecencyChanged: function PlacesProvider_onFrecencyChanged(aURI, aNewFrecency, aGUID, aHidden, aLastVisitDate) {
     // If something is doing a batch update of history entries we don't want
@@ -852,17 +852,17 @@ var Links = {
   /**
    * A list of objects that are observing links updates.
    */
   _observers: [],
 
   /**
    * Registers an object that will be notified when links updates.
    */
-  addObserver: function(aObserver) {
+  addObserver(aObserver) {
     this._observers.push(aObserver);
   },
 
   /**
    * Adds a link provider.
    * @param aProvider The link provider.
    */
   addProvider: function Links_addProvider(aProvider) {
@@ -984,26 +984,26 @@ var Links = {
       if (!(prop in aLink1) || !(prop in aLink2))
         throw new Error("Comparable link missing required property: " + prop);
     }
     return aLink2.frecency - aLink1.frecency ||
            aLink2.lastVisitDate - aLink1.lastVisitDate ||
            aLink1.url.localeCompare(aLink2.url);
   },
 
-  _incrementSiteMap: function(map, link) {
+  _incrementSiteMap(map, link) {
     if (NewTabUtils.blockedLinks.isBlocked(link)) {
       // Don't count blocked URLs.
       return;
     }
     let site = NewTabUtils.extractSite(link.url);
     map.set(site, (map.get(site) || 0) + 1);
   },
 
-  _decrementSiteMap: function(map, link) {
+  _decrementSiteMap(map, link) {
     if (NewTabUtils.blockedLinks.isBlocked(link)) {
       // Blocked URLs are not included in map.
       return;
     }
     let site = NewTabUtils.extractSite(link.url);
     let previousURLCount = map.get(site);
     if (previousURLCount === 1) {
       map.delete(site);
@@ -1016,54 +1016,54 @@ var Links = {
     * Update the siteMap cache based on the link given and whether we need
     * to increment or decrement it. We do this by iterating over all stored providers
     * to find which provider this link already exists in. For providers that
     * have this link, we will adjust siteMap for them accordingly.
     *
     * @param aLink The link that will affect siteMap
     * @param increment A boolean for whether to increment or decrement siteMap
     */
-  _adjustSiteMapAndNotify: function(aLink, increment = true) {
+  _adjustSiteMapAndNotify(aLink, increment = true) {
     for (let [/* provider */, cache] of this._providers) {
       // We only update siteMap if aLink is already stored in linkMap.
       if (cache.linkMap.get(aLink.url)) {
         if (increment) {
           this._incrementSiteMap(cache.siteMap, aLink);
           continue;
         }
         this._decrementSiteMap(cache.siteMap, aLink);
       }
     }
     this._callObservers("onLinkChanged", aLink);
   },
 
-  onLinkBlocked: function(aLink) {
+  onLinkBlocked(aLink) {
     this._adjustSiteMapAndNotify(aLink, false);
   },
 
-  onLinkUnblocked: function(aLink) {
+  onLinkUnblocked(aLink) {
     this._adjustSiteMapAndNotify(aLink);
   },
 
-  populateProviderCache: function(provider, callback) {
+  populateProviderCache(provider, callback) {
     if (!this._providers.has(provider)) {
       throw new Error("Can only populate provider cache for existing provider.");
     }
 
     return this._populateProviderCache(provider, callback, false);
   },
 
   /**
    * Calls getLinks on the given provider and populates our cache for it.
    * @param aProvider The provider whose cache will be populated.
    * @param aCallback The callback to call when finished.
    * @param aForce When true, populates the provider's cache even when it's
    *               already filled.
    */
-  _populateProviderCache: function(aProvider, aCallback, aForce) {
+  _populateProviderCache(aProvider, aCallback, aForce) {
     let cache = this._providers.get(aProvider);
     let createCache = !cache;
     if (createCache) {
       cache = {
         // Start with a resolved promise.
         populatePromise: new Promise(resolve => resolve()),
       };
       this._providers.set(aProvider, cache);
@@ -1428,33 +1428,33 @@ this.NewTabUtils = {
       this._initialized = true;
       ExpirationFilter.init();
       Telemetry.init();
       return true;
     }
     return false;
   },
 
-  getProviderLinks: function(aProvider) {
+  getProviderLinks(aProvider) {
     let cache = Links._providers.get(aProvider);
     if (cache && cache.sortedLinks) {
       return cache.sortedLinks;
     }
     return [];
   },
 
-  isTopSiteGivenProvider: function(aSite, aProvider) {
+  isTopSiteGivenProvider(aSite, aProvider) {
     let cache = Links._providers.get(aProvider);
     if (cache && cache.siteMap) {
       return cache.siteMap.has(aSite);
     }
     return false;
   },
 
-  isTopPlacesSite: function(aSite) {
+  isTopPlacesSite(aSite) {
     return this.isTopSiteGivenProvider(aSite, PlacesProvider);
   },
 
   /**
    * Restores all sites that have been removed from the grid.
    */
   restore: function NewTabUtils_restore() {
     Storage.clear();
--- a/toolkit/modules/ObjectUtils.jsm
+++ b/toolkit/modules/ObjectUtils.jsm
@@ -28,17 +28,17 @@ this.ObjectUtils = {
    * to keep the chance of false positives to a minimum.
    * `JSON.stringify` is not designed to be used for this purpose; objects may
    * have ambiguous `toJSON()` implementations that would influence the test.
    *
    * @param a (mixed) Object or value to be compared.
    * @param b (mixed) Object or value to be compared.
    * @return Boolean Whether the objects are deep equal.
    */
-  deepEqual: function(a, b) {
+  deepEqual(a, b) {
     return _deepEqual(a, b);
   },
 
   /**
    * A thin wrapper on an object, designed to prevent client code from
    * accessing non-existent properties because of typos.
    *
    * // Without `strict`
@@ -47,17 +47,17 @@ this.ObjectUtils = {
    *
    * // With `strict`
    * let strictFoo = ObjectUtils.strict(foo);
    * strictFoo.myProperty; // 1
    * strictFoo.MyProperty; // TypeError: No such property "MyProperty"
    *
    * Note that `strict` has no effect in non-DEBUG mode.
    */
-  strict: function(obj) {
+  strict(obj) {
     return _strict(obj);
   }
 };
 
 // ... Start of previously MIT-licensed code.
 // This deepEqual implementation is originally from narwhal.js (http://narwhaljs.org)
 // Copyright (c) 2009 Thomas Robinson <280north.com>
 // MIT license: http://opensource.org/licenses/MIT
@@ -166,17 +166,17 @@ function objEquiv(a, b) {
 // ... End of previously MIT-licensed code.
 
 function _strict(obj) {
   if (typeof obj != "object") {
     throw new TypeError("Expected an object");
   }
 
   return new Proxy(obj, {
-    get: function(target, name) {
+    get(target, name) {
       if (name in obj) {
         return obj[name];
       }
 
       let error = new TypeError(`No such property: "${name}"`);
       Promise.reject(error); // Cause an xpcshell/mochitest failure.
       throw error;
     }
--- a/toolkit/modules/PageMenu.jsm
+++ b/toolkit/modules/PageMenu.jsm
@@ -15,32 +15,32 @@ PageMenu.prototype = {
 
   _popup: null,
 
   // Only one of builder or browser will end up getting set.
   _builder: null,
   _browser: null,
 
   // Given a target node, get the context menu for it or its ancestor.
-  getContextMenu: function(aTarget) {
+  getContextMenu(aTarget) {
     let target = aTarget;
     while (target) {
       let contextMenu = target.contextMenu;
       if (contextMenu) {
         return contextMenu;
       }
       target = target.parentNode;
     }
 
     return null;
   },
 
   // Given a target node, generate a JSON object for any context menu
   // associated with it, or null if there is no context menu.
-  maybeBuild: function(aTarget) {
+  maybeBuild(aTarget) {
     let pageMenu = this.getContextMenu(aTarget);
     if (!pageMenu) {
       return null;
     }
 
     pageMenu.sendShowEvent();
     // the show event is not cancelable, so no need to check a result here
 
@@ -57,17 +57,17 @@ PageMenu.prototype = {
     if (!menuString) {
       return null;
     }
 
     return JSON.parse(menuString);
   },
 
   // Given a JSON menu object and popup, add the context menu to the popup.
-  buildAndAttachMenuWithObject: function(aMenu, aBrowser, aPopup) {
+  buildAndAttachMenuWithObject(aMenu, aBrowser, aPopup) {
     if (!aMenu) {
       return false;
     }
 
     let insertionPoint = this.getInsertionPoint(aPopup);
     if (!insertionPoint) {
       return false;
     }
@@ -90,17 +90,17 @@ PageMenu.prototype = {
 
     this._popup.addEventListener("command", this);
     this._popup.addEventListener("popuphidden", this);
 
     return true;
   },
 
   // Construct the XUL menu structure for a given JSON object.
-  buildXULMenu: function(aNode, aElementForAppending) {
+  buildXULMenu(aNode, aElementForAppending) {
     let document = aElementForAppending.ownerDocument;
 
     let children = aNode.children;
     for (let child of children) {
       let menuitem;
       switch (child.type) {
         case "menuitem":
           if (!child.id) {
@@ -146,17 +146,17 @@ PageMenu.prototype = {
       }
 
       menuitem.setAttribute(this.GENERATEDITEMID_ATTR, child.id ? child.id : 0);
       aElementForAppending.appendChild(menuitem);
     }
   },
 
   // Called when the generated menuitem is executed.
-  handleEvent: function(event) {
+  handleEvent(event) {
     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));
@@ -178,31 +178,31 @@ PageMenu.prototype = {
 
       this._popup = null;
       this._builder = null;
       this._browser = null;
     }
   },
 
   // Get the first child of the given element with the given tag name.
-  getImmediateChild: function(element, tag) {
+  getImmediateChild(element, tag) {
     let child = element.firstChild;
     while (child) {
       if (child.localName == tag) {
         return child;
       }
       child = child.nextSibling;
     }
     return null;
   },
 
   // Return the location where the generated items should be inserted into the
   // given popup. They should be inserted as the next sibling of the returned
   // element.
-  getInsertionPoint: function(aPopup) {
+  getInsertionPoint(aPopup) {
     if (aPopup.hasAttribute(this.PAGEMENU_ATTR))
       return aPopup;
 
     let element = aPopup.firstChild;
     while (element) {
       if (element.localName == "menu") {
         let popup = this.getImmediateChild(element, "menupopup");
         if (popup) {
@@ -214,17 +214,17 @@ PageMenu.prototype = {
       }
       element = element.nextSibling;
     }
 
     return null;
   },
 
   // Remove the generated content from the given popup.
-  removeGeneratedContent: function(aPopup) {
+  removeGeneratedContent(aPopup) {
     let ungenerated = [];
     ungenerated.push(aPopup);
 
     let count;
     while (0 != (count = ungenerated.length)) {
       let last = count - 1;
       let element = ungenerated[last];
       ungenerated.splice(last, 1);
@@ -251,34 +251,34 @@ PageMenuParent.prototype = {
 
   /*
    * Given a target node and popup, add the context menu to the popup. This is
    * intended to be called when a single process is used. This is equivalent to
    * calling PageMenuChild.build and PageMenuParent.addToPopup in sequence.
    *
    * Returns true if custom menu items were present.
    */
-  buildAndAddToPopup: function(aTarget, aPopup) {
+  buildAndAddToPopup(aTarget, aPopup) {
     let menuObject = this.maybeBuild(aTarget);
     if (!menuObject) {
       return false;
     }
 
     return this.buildAndAttachMenuWithObject(menuObject, null, aPopup);
   },
 
   /*
    * Given a JSON menu object and popup, add the context menu to the popup. This
    * is intended to be called when the child page is in a different process.
    * aBrowser should be the browser containing the page the context menu is
    * displayed for, which may be null.
    *
    * Returns true if custom menu items were present.
    */
-  addToPopup: function(aMenu, aBrowser, aPopup) {
+  addToPopup(aMenu, aBrowser, aPopup) {
     return this.buildAndAttachMenuWithObject(aMenu, aBrowser, aPopup);
   }
 }
 
 // This object is expected to be used from a child process.
 this.PageMenuChild = function PageMenuChild() {
 }
 
@@ -295,24 +295,24 @@ PageMenuChild.prototype = {
    *
    * In addition, the id of each item will be used to identify the item
    * when it is executed. The type will either be 'menu', 'menuitem' or
    * 'separator'. The toplevel node will be a menu with a children property. The
    * children property of a menu is an array of zero or more other items.
    *
    * If there is no menu associated with aTarget, null will be returned.
    */
-  build: function(aTarget) {
+  build(aTarget) {
     return this.maybeBuild(aTarget);
   },
 
   /*
    * Given the id of a menu, execute the command associated with that menu. It
    * is assumed that only one command will be executed so the builder is
    * cleared afterwards.
    */
-  executeMenu: function(aId) {
+  executeMenu(aId) {
     if (this._builder) {
       this._builder.click(aId);
       this._builder = null;
     }
   }
 }
--- a/toolkit/modules/PageMetadata.jsm
+++ b/toolkit/modules/PageMetadata.jsm
@@ -169,17 +169,17 @@ this.PageMetadata = {
 
   /**
    * Get metadata as defined in <link> tags.
    * This adds properties to an existing result object.
    *
    * @param {Document} document - Document to extract data from.
    * @param {Object}  result - Existing result object to add properties to.
    */
-  _getLinkData: function(document, result) {
+  _getLinkData(document, result) {
     let elements = document.querySelectorAll("head > link[rel], head > link[id]");
 
     for (let element of elements) {
       let url = element.getAttribute("href");
       if (!url) {
         continue;
       }
       url = this._validateURL(document, UnescapeService.unescape(url.trim()));
--- a/toolkit/modules/PermissionsUtils.jsm
+++ b/toolkit/modules/PermissionsUtils.jsm
@@ -76,17 +76,17 @@ this.PermissionsUtils = {
    *                     The value is expected to be a comma separated list of
    *                     host named. eg:
    *                     * something.example.com
    *                     * foo.exmaple.com,bar.example.com
    *
    * @param aPermission Permission name to be passsed to the Permissions
    *                    Manager.
    */
-  importFromPrefs: function(aPrefBranch, aPermission) {
+  importFromPrefs(aPrefBranch, aPermission) {
     if (!aPrefBranch.endsWith("."))
       aPrefBranch += ".";
 
     // Ensure we only import this pref branch once.
     if (gImportedPrefBranches.has(aPrefBranch))
      return;
 
     importPrefBranch(aPrefBranch + "whitelist.add", aPermission,
--- a/toolkit/modules/PopupNotifications.jsm
+++ b/toolkit/modules/PopupNotifications.jsm
@@ -138,17 +138,17 @@ Notification.prototype = {
     // Use a default anchor icon if it's available
     if (!anchorElement)
       anchorElement = iconBox.querySelector("#default-notification-icon") ||
                       iconBox;
 
     return anchorElement;
   },
 
-  reshow: function() {
+  reshow() {
     this.owner._reshowNotifications(this.anchorElement, this.browser);
   },
 
   /**
    * Adds a value to the specified histogram, that must be keyed by ID.
    */
   _recordTelemetry(histogramId, value) {
     if (this.isPrivate) {
@@ -505,17 +505,17 @@ PopupNotifications.prototype = {
   },
 
   /**
    * Called by the consumer to indicate that the visibility of the notification
    * anchors may have changed, but the location has not changed. This may result
    * in the "showing" and "shown" events for visible notifications to be
    * invoked even if the anchor has not changed.
    */
-  anchorVisibilityChange: function() {
+  anchorVisibilityChange() {
     let notifications =
       this._getNotificationsForBrowser(this.tabbrowser.selectedBrowser);
     this._update(notifications, this._getAnchorsForNotifications(notifications,
       getAnchorFromBrowser(this.tabbrowser.selectedBrowser)));
   },
 
   /**
    * Removes a Notification.
@@ -526,17 +526,17 @@ PopupNotifications.prototype = {
     this._remove(notification);
 
     if (this._isActiveBrowser(notification.browser)) {
       let notifications = this._getNotificationsForBrowser(notification.browser);
       this._update(notifications);
     }
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "popuphidden":
         this._onPopupHidden(aEvent);
         break;
       case "activate":
       case "TabSelect":
         let self = this;
         // This is where we could detect if the panel is dismissed if the page
@@ -625,17 +625,17 @@ PopupNotifications.prototype = {
     this._ignoreDismissal = deferred;
     this.panel.hidePopup();
     return deferred.promise;
   },
 
   /**
    * Removes all notifications from the notification popup.
    */
-  _clearPanel: function() {
+  _clearPanel() {
     let popupnotification;
     while ((popupnotification = this.panel.lastChild)) {
       this.panel.removeChild(popupnotification);
 
       // If this notification was provided by the chrome document rather than
       // created ad hoc, move it back to where we got it from.
       let originalParent = gNotificationParents.get(popupnotification);
       if (originalParent) {
@@ -1094,17 +1094,17 @@ PopupNotifications.prototype = {
       if (notification.anchorElement)
         anchors.add(notification.anchorElement)
     }
     if (defaultAnchor && !anchors.size)
       anchors.add(defaultAnchor);
     return anchors;
   },
 
-  _isActiveBrowser: function(browser) {
+  _isActiveBrowser(browser) {
     // We compare on frameLoader instead of just comparing the
     // selectedBrowser and browser directly because browser tabs in
     // Responsive Design Mode put the actual web content into a
     // mozbrowser iframe and proxy property read/write and method
     // calls from the tab to that iframe. This is so that attempts
     // to reload the tab end up reloading the content in
     // Responsive Design Mode, and not the Responsive Design Mode
     // viewer itself.
@@ -1241,17 +1241,17 @@ PopupNotifications.prototype = {
 
     this._dismissOrRemoveCurrentNotifications();
 
     this._clearPanel();
 
     this._update();
   },
 
-  _dismissOrRemoveCurrentNotifications: function() {
+  _dismissOrRemoveCurrentNotifications() {
     let browser = this.panel.firstChild &&
                   this.panel.firstChild.notification.browser;
     if (!browser)
       return;
 
     let notifications = this._getNotificationsForBrowser(browser);
     // Mark notifications as dismissed and call dismissal callbacks
     Array.forEach(this.panel.childNodes, function(nEl) {
--- a/toolkit/modules/Preferences.jsm
+++ b/toolkit/modules/Preferences.jsm
@@ -395,17 +395,17 @@ function PrefObserver(prefName, callback
   this.prefName = prefName;
   this.callback = callback;
   this.thisObject = thisObject;
 }
 
 PrefObserver.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     // The pref service only observes whole branches, but we only observe
     // individual preferences, so we check here that the pref that changed
     // is the exact one we're observing (and not some sub-pref on the branch).
     if (data.indexOf(this.prefName) != 0)
       return;
 
     if (typeof this.callback == "function") {
       let prefValue = Preferences.get(data);
--- a/toolkit/modules/PrivateBrowsingUtils.jsm
+++ b/toolkit/modules/PrivateBrowsingUtils.jsm
@@ -28,17 +28,17 @@ this.PrivateBrowsingUtils = {
     return this.privacyContextFromWindow(aWindow).usePrivateBrowsing;
   },
 
   // This should be used only in frame scripts.
   isContentWindowPrivate: function pbu_isWindowPrivate(aWindow) {
     return this.privacyContextFromWindow(aWindow).usePrivateBrowsing;
   },
 
-  isBrowserPrivate: function(aBrowser) {
+  isBrowserPrivate(aBrowser) {
     let chromeWin = aBrowser.ownerDocument.defaultView;
     if (chromeWin.gMultiProcessBrowser) {
       // In e10s we have to look at the chrome window's private
       // browsing status since the only alternative is to check the
       // content window, which is in another process.
       return this.isWindowPrivate(chromeWin);
     }
     return this.privacyContextFromWindow(aBrowser.contentWindow).usePrivateBrowsing;
--- a/toolkit/modules/ProfileAge.jsm
+++ b/toolkit/modules/ProfileAge.jsm
@@ -58,56 +58,56 @@ this.ProfileAge.prototype = {
                .then(onSuccess.bind(this),
                      onFailure.bind(this));
   },
 
   /**
    * Explicitly make `file`, a filename, a full path
    * relative to our profile path.
    */
-  getPath: function(file) {
+  getPath(file) {
     return OS.Path.join(this.profilePath, file);
   },
 
   /**
    * Return a promise which resolves to the JSON contents
    * of the time file, using the already read value if possible.
    */
-  getTimes: function(file = "times.json") {
+  getTimes(file = "times.json") {
     if (this._times) {
       return Promise.resolve(this._times);
     }
     return this.readTimes(file).then(
       times => {
         return this.times = times || {};
       }
     );
   },
 
   /**
    * Return a promise which resolves to the JSON contents
    * of the time file in this accessor's profile.
    */
-  readTimes: function(file = "times.json") {
+  readTimes(file = "times.json") {
     return CommonUtils.readJSON(this.getPath(file));
   },
 
   /**
    * Return a promise representing the writing of `contents`
    * to `file` in the specified profile.
    */
-  writeTimes: function(contents, file = "times.json") {
+  writeTimes(contents, file = "times.json") {
     return CommonUtils.writeJSON(contents, this.getPath(file));
   },
 
   /**
    * Merge existing contents with a 'created' field, writing them
    * to the specified file. Promise, naturally.
    */
-  computeAndPersistCreated: function(existingContents, file = "times.json") {
+  computeAndPersistCreated(existingContents, file = "times.json") {
     let path = this.getPath(file);
     function onOldest(oldest) {
       let contents = existingContents || {};
       contents.created = oldest;
       this._times = contents;
       return this.writeTimes(contents, path)
                  .then(function onSuccess() {
                    return oldest;
@@ -117,17 +117,17 @@ this.ProfileAge.prototype = {
     return this.getOldestProfileTimestamp()
                .then(onOldest.bind(this));
   },
 
   /**
    * Traverse the contents of the profile directory, finding the oldest file
    * and returning its creation timestamp.
    */
-  getOldestProfileTimestamp: function() {
+  getOldestProfileTimestamp() {
     let self = this;
     let oldest = Date.now() + 1000;
     let iterator = new OS.File.DirectoryIterator(this.profilePath);
     self._log.debug("Iterating over profile " + this.profilePath);
     if (!iterator) {
       throw new Error("Unable to fetch oldest profile entry: no profile iterator.");
     }
 
@@ -180,17 +180,17 @@ this.ProfileAge.prototype = {
 
   /**
    * Record (and persist) when a profile reset happened.  We just store a
    * single value - the timestamp of the most recent reset - but there is scope
    * to keep a list of reset times should our health-reporter successor
    * be able to make use of that.
    * Returns a promise that is resolved once the file has been written.
    */
-  recordProfileReset: function(time = Date.now(), file = "times.json") {
+  recordProfileReset(time = Date.now(), file = "times.json") {
     return this.getTimes(file).then(
       times => {
         times.reset = time;
         return this.writeTimes(times, file);
       }
     );
   },
 
--- a/toolkit/modules/Promise-backend.js
+++ b/toolkit/modules/Promise-backend.js
@@ -113,28 +113,28 @@ var PendingErrors = {
   // Functions registered to be notified when a pending error
   // is reported as uncaught.
   _observers: new Set(),
   _map: new Map(),
 
   /**
    * Initialize PendingErrors
    */
-  init: function() {
+  init() {
     Services.obs.addObserver(function observe(aSubject, aTopic, aValue) {
       PendingErrors.report(aValue);
     }, "promise-finalization-witness", false);
   },
 
   /**
    * Register an error as tracked.
    *
    * @return The unique identifier of the error.
    */
-  register: function(error) {
+  register(error) {
     let id = "pending-error-" + (this._counter++);
     //
     // At this stage, ideally, we would like to store the error itself
     // and delay any treatment until we are certain that we will need
     // to report that error. However, in the (unlikely but possible)
     // case the error holds a reference to the promise itself, doing so
     // would prevent the promise from being garbabe-collected, which
     // would both cause a memory leak and ensure that we cannot report
@@ -217,69 +217,69 @@ var PendingErrors = {
   },
 
   /**
    * Notify all observers that a pending error is now uncaught.
    *
    * @param id The identifier of the pending error, as returned by
    * |register|.
    */
-  report: function(id) {
+  report(id) {
     let value = this._map.get(id);
     if (!value) {
       return; // The error has already been reported
     }
     this._map.delete(id);
     for (let obs of this._observers.values()) {
       obs(value);
     }
   },
 
   /**
    * Mark all pending errors are uncaught, notify the observers.
    */
-  flush: function() {
+  flush() {
     // Since we are going to modify the map while walking it,
     // let's copying the keys first.
     for (let key of Array.from(this._map.keys())) {
       this.report(key);
     }
   },
 
   /**
    * Stop tracking an error, as this error has been caught,
    * eventually.
    */
-  unregister: function(id) {
+  unregister(id) {
     this._map.delete(id);
   },
 
   /**
    * Add an observer notified when an error is reported as uncaught.
    *
    * @param {function} observer A function notified when an error is
    * reported as uncaught. Its arguments are
    *   {message, date, fileName, stack, lineNumber}
    * All arguments are optional.
    */
-  addObserver: function(observer) {
+  addObserver(observer) {
     this._observers.add(observer);
   },
 
   /**
    * Remove an observer added with addObserver
    */
-  removeObserver: function(observer) {
+  removeObserver(observer) {
     this._observers.delete(observer);
   },
 
   /**
    * Remove all the observers added with addObserver
    */
-  removeAllObservers: function() {
+  removeAllObservers() {
     this._observers.clear();
   }
 };
 
 // Initialize the warn-upon-finalization mechanism if and only if Cu is defined.
 // Otherwise, FinalizationWitnessService won't be defined (see above).
 if (Cu) {
   PendingErrors.init();
@@ -615,42 +615,42 @@ Promise.Debugging = {
   /**
    * Add an observer notified when an error is reported as uncaught.
    *
    * @param {function} observer A function notified when an error is
    * reported as uncaught. Its arguments are
    *   {message, date, fileName, stack, lineNumber}
    * All arguments are optional.
    */
-  addUncaughtErrorObserver: function(observer) {
+  addUncaughtErrorObserver(observer) {
     PendingErrors.addObserver(observer);
   },
 
   /**
    * Remove an observer added with addUncaughtErrorObserver
    *
    * @param {function} An observer registered with
    * addUncaughtErrorObserver.
    */
-  removeUncaughtErrorObserver: function(observer) {
+  removeUncaughtErrorObserver(observer) {
     PendingErrors.removeObserver(observer);
   },
 
   /**
    * Remove all the observers added with addUncaughtErrorObserver
    */
-  clearUncaughtErrorObservers: function() {
+  clearUncaughtErrorObservers() {
     PendingErrors.removeAllObservers();
   },
 
   /**
    * Force all pending errors to be reported immediately as uncaught.
    * Note that this may cause some false positives.
    */
-  flushUncaughtErrors: function() {
+  flushUncaughtErrors() {
     PendingErrors.flush();
   },
 };
 Object.freeze(Promise.Debugging);
 
 Object.freeze(Promise);
 
 // If module is defined, this file is loaded as a CommonJS module. Make sure
@@ -683,17 +683,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: function(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.
@@ -717,17 +717,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: function()
+  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,17 +758,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: function(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.
@@ -785,17 +785,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: function()
+  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
@@ -912,17 +912,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: function()
+  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
--- a/toolkit/modules/PromiseUtils.jsm
+++ b/toolkit/modules/PromiseUtils.jsm
@@ -10,17 +10,17 @@ Components.utils.import("resource://gre/
 
 this.PromiseUtils = {
   /*
    * Creates a new pending Promise and provide methods to resolve and reject this Promise.
    *
    * @return {Deferred} an object consisting of a pending Promise "promise"
    * and methods "resolve" and "reject" to change its state.
    */
-  defer : function() {
+  defer() {
     return new Deferred();
   },
 }
 
 /**
  * The definition of Deferred object which is returned by PromiseUtils.defer(),
  * It contains a Promise and methods to resolve/reject it.
  */
--- a/toolkit/modules/PropertyListUtils.jsm
+++ b/toolkit/modules/PropertyListUtils.jsm
@@ -484,17 +484,17 @@ BinaryPropertyListReader.prototype = {
                                       aNumberOfObjects);
 
     let array = new Array(aNumberOfObjects);
     let readObjectBound = this._readObject.bind(this);
 
     // Each index in the returned array is a lazy getter for its object.
     Array.prototype.forEach.call(refs, function(ref, objIndex) {
       Object.defineProperty(array, objIndex, {
-        get: function() {
+        get() {
           delete array[objIndex];
           return array[objIndex] = readObjectBound(ref);
         },
         configurable: true,
         enumerable: true
       });
     }, this);
     return array;
@@ -503,17 +503,17 @@ BinaryPropertyListReader.prototype = {
   /**
    * Reads dictionary from the buffer and wraps it as a Map object.
    * @param aObjectOffset
    *        the offset in the buffer at which the dictionary starts
    * @param aNumberOfObjects
    *        the number of keys in the dictionary
    * @return Map-style dictionary.
    */
-  _wrapDictionary: function(aObjectOffset, aNumberOfObjects) {
+  _wrapDictionary(aObjectOffset, aNumberOfObjects) {
     // A dictionary in the binary format is stored as a list of references to
     // key-objects, followed by a list of references to the value-objects for
     // those keys. The size of each list is aNumberOfObjects * this._objectRefSize.
     let dict = new Proxy(new Map(), LazyMapProxyHandler());
     if (aNumberOfObjects == 0)
       return dict;
 
     let keyObjsRefs = this._readUnsignedInts(aObjectOffset, this._objectRefSize,
@@ -749,17 +749,17 @@ XMLPropertyListReader.prototype = {
     //   </dict>
     // </array>
 
     // Each element in the array is a lazy getter for its property list object.
     let array = [];
     let readObjectBound = this._readObject.bind(this);
     Array.prototype.forEach.call(aDOMElt.children, function(elem, elemIndex) {
       Object.defineProperty(array, elemIndex, {
-        get: function() {
+        get() {
           delete array[elemIndex];
           return array[elemIndex] = readObjectBound(elem);
         },
         configurable: true,
         enumerable: true
       });
     });
     return array;
@@ -783,17 +783,17 @@ XMLPropertyListReader.prototype = {
    * @param  key
    *         Key to be set, retrieved or deleted. Keys are checked for laziness.
    * @return Returns value of "name" property of target by default. Otherwise returns
    *         updated target.
    */
 function LazyMapProxyHandler() {
   return {
     _lazyGetters: new Set(),
-    get: function(target, name) {
+    get(target, name) {
       switch (name) {
         case "setAsLazyGetter":
           return (key, value) => {
             this._lazyGetters.add(key);
             target.set(key, value);
           };
         case "get":
           return key => {
--- a/toolkit/modules/RemoteController.jsm
+++ b/toolkit/modules/RemoteController.jsm
@@ -20,33 +20,33 @@ function RemoteController(browser)
   // value of each key will be true if enabled, and false if disabled.
   this._supportedCommands = { };
 }
 
 RemoteController.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIController,
                                          Ci.nsICommandController]),
 
-  isCommandEnabled: function(aCommand) {
+  isCommandEnabled(aCommand) {
     return this._supportedCommands[aCommand] || false;
   },
 
-  supportsCommand: function(aCommand) {
+  supportsCommand(aCommand) {
     return aCommand in this._supportedCommands;
   },
 
-  doCommand: function(aCommand) {
+  doCommand(aCommand) {
     this._browser.messageManager.sendAsyncMessage("ControllerCommands:Do", aCommand);
   },
 
-  getCommandStateWithParams: function(aCommand, aCommandParams) {
+  getCommandStateWithParams(aCommand, aCommandParams) {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
-  doCommandWithParams: function(aCommand, aCommandParams) {
+  doCommandWithParams(aCommand, aCommandParams) {
     let cmd = {
       cmd: aCommand,
       params: null
     };
     if (aCommand == "cmd_lookUpDictionary") {
       // Although getBoundingClientRect of the element is logical pixel, but
       // x and y parameter of cmd_lookUpDictionary are device pixel.
       // So we need calculate child process's coordinate using correct unit.
@@ -64,25 +64,25 @@ RemoteController.prototype = {
       };
     } else {
       throw Cr.NS_ERROR_NOT_IMPLEMENTED;
     }
     this._browser.messageManager.sendAsyncMessage(
       "ControllerCommands:DoWithParams", cmd);
   },
 
-  getSupportedCommands: function(aCount, aCommands) {
+  getSupportedCommands(aCount, aCommands) {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
-  onEvent: function() {},
+  onEvent() {},
 
   // This is intended to be called from the remote-browser binding to update
   // the enabled and disabled commands.
-  enableDisableCommands: function(aAction,
+  enableDisableCommands(aAction,
                                   aEnabledLength, aEnabledCommands,
                                   aDisabledLength, aDisabledCommands) {
     // Clear the list first
     this._supportedCommands = { };
 
     for (let c = 0; c < aEnabledLength; c++) {
       this._supportedCommands[aEnabledCommands[c]] = true;
     }
--- a/toolkit/modules/RemoteFinder.jsm
+++ b/toolkit/modules/RemoteFinder.jsm
@@ -23,17 +23,17 @@ function RemoteFinder(browser) {
   this._searchString = null;
 
   this.swapBrowser(browser);
 }
 
 RemoteFinder.prototype = {
   destroy() {},
 
-  swapBrowser: function(aBrowser) {
+  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 {
       aBrowser.messageManager.sendAsyncMessage("Finder:Initialize");
@@ -46,25 +46,25 @@ RemoteFinder.prototype = {
     this._messageManager.addMessageListener("Finder:CurrentSelectionResult", this);
     this._messageManager.addMessageListener("Finder:HighlightFinished", this);
 
     // Ideally listeners would have removed themselves but that doesn't happen
     // right now
     this._listeners.clear();
   },
 
-  addResultListener: function(aListener) {
+  addResultListener(aListener) {
     this._listeners.add(aListener);
   },
 
-  removeResultListener: function(aListener) {
+  removeResultListener(aListener) {
     this._listeners.delete(aListener);
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     // Only Finder:Result messages have the searchString field.
     let callback;
     let params;
     switch (aMessage.name) {
       case "Finder:Result":
         this._searchString = aMessage.data.searchString;
         // The rect stops being a Geometry.jsm:Rect over IPC.
         if (aMessage.data.rect) {
@@ -117,95 +117,95 @@ RemoteFinder.prototype = {
                                                   { caseSensitive: aSensitive });
   },
 
   set entireWord(aEntireWord) {
     this._browser.messageManager.sendAsyncMessage("Finder:EntireWord",
                                                   { entireWord: aEntireWord });
   },
 
-  getInitialSelection: function() {
+  getInitialSelection() {
     this._browser.messageManager.sendAsyncMessage("Finder:GetInitialSelection", {});
   },
 
-  fastFind: function(aSearchString, aLinksOnly, aDrawOutline) {
+  fastFind(aSearchString, aLinksOnly, aDrawOutline) {
     this._browser.messageManager.sendAsyncMessage("Finder:FastFind",
                                                   { searchString: aSearchString,
                                                     linksOnly: aLinksOnly,
                                                     drawOutline: aDrawOutline });
   },
 
-  findAgain: function(aFindBackwards, aLinksOnly, aDrawOutline) {
+  findAgain(aFindBackwards, aLinksOnly, aDrawOutline) {
     this._browser.messageManager.sendAsyncMessage("Finder:FindAgain",
                                                   { findBackwards: aFindBackwards,
                                                     linksOnly: aLinksOnly,
                                                     drawOutline: aDrawOutline });
   },
 
-  highlight: function(aHighlight, aWord, aLinksOnly) {
+  highlight(aHighlight, aWord, aLinksOnly) {
     this._browser.messageManager.sendAsyncMessage("Finder:Highlight",
                                                   { highlight: aHighlight,
                                                     linksOnly: aLinksOnly,
                                                     word: aWord });
   },
 
-  enableSelection: function() {
+  enableSelection() {
     this._browser.messageManager.sendAsyncMessage("Finder:EnableSelection");
   },
 
-  removeSelection: function() {
+  removeSelection() {
     this._browser.messageManager.sendAsyncMessage("Finder:RemoveSelection");
   },
 
-  focusContent: function() {
+  focusContent() {
     // Allow Finder listeners to cancel focusing the content.
     for (let l of this._listeners) {
       try {
         if ("shouldFocusContent" in l &&
             !l.shouldFocusContent())
           return;
       } catch (ex) {
         Cu.reportError(ex);
       }
     }
 
     this._browser.focus();
     this._browser.messageManager.sendAsyncMessage("Finder:FocusContent");
   },
 
-  onFindbarClose: function() {
+  onFindbarClose() {
     this._browser.messageManager.sendAsyncMessage("Finder:FindbarClose");
   },
 
-  onFindbarOpen: function() {
+  onFindbarOpen() {
     this._browser.messageManager.sendAsyncMessage("Finder:FindbarOpen");
   },
 
-  onModalHighlightChange: function(aUseModalHighlight) {
+  onModalHighlightChange(aUseModalHighlight) {
     this._browser.messageManager.sendAsyncMessage("Finder:ModalHighlightChange", {
       useModalHighlight: aUseModalHighlight
     });
   },
 
-  onHighlightAllChange: function(aHighlightAll) {
+  onHighlightAllChange(aHighlightAll) {
     this._browser.messageManager.sendAsyncMessage("Finder:HighlightAllChange", {
       highlightAll: aHighlightAll
     });
   },
 
-  keyPress: function(aEvent) {
+  keyPress(aEvent) {
     this._browser.messageManager.sendAsyncMessage("Finder:KeyPress",
                                                   { keyCode: aEvent.keyCode,
                                                     ctrlKey: aEvent.ctrlKey,
                                                     metaKey: aEvent.metaKey,
                                                     altKey: aEvent.altKey,
                                                     shiftKey: aEvent.shiftKey });
   },
 
-  requestMatchesCount: function(aSearchString, aLinksOnly) {
+  requestMatchesCount(aSearchString, aLinksOnly) {
     this._browser.messageManager.sendAsyncMessage("Finder:MatchesCount",
                                                   { searchString: aSearchString,
                                                     linksOnly: aLinksOnly });
   }
 }
 
 function RemoteFinderListener(global) {
   let {Finder} = Cu.import("resource://gre/modules/Finder.jsm", {});
@@ -233,54 +233,54 @@ RemoteFinderListener.prototype = {
     "Finder:FocusContent",
     "Finder:FindbarClose",
     "Finder:FindbarOpen",
     "Finder:KeyPress",
     "Finder:MatchesCount",
     "Finder:ModalHighlightChange"
   ],
 
-  onFindResult: function(aData) {
+  onFindResult(aData) {
     this._global.sendAsyncMessage("Finder:Result", aData);
   },
 
   // When the child receives messages with results of requestMatchesCount,
   // it passes them forward to the parent.
-  onMatchesCountResult: function(aData) {
+  onMatchesCountResult(aData) {
     this._global.sendAsyncMessage("Finder:MatchesResult", aData);
   },
 
-  onHighlightFinished: function(aData) {
+  onHighlightFinished(aData) {
     this._global.sendAsyncMessage("Finder:HighlightFinished", aData);
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     let data = aMessage.data;
 
     switch (aMessage.name) {
       case "Finder:CaseSensitive":
         this._finder.caseSensitive = data.caseSensitive;
         break;
 
       case "Finder:EntireWord":
         this._finder.entireWord = data.entireWord;
         break;
 
       case "Finder:SetSearchStringToSelection": {
         let selection = this._finder.setSearchStringToSelection();
         this._global.sendAsyncMessage("Finder:CurrentSelectionResult",
-                                      { selection: selection,
+                                      { selection,
                                         initial: false });
         break;
       }
 
       case "Finder:GetInitialSelection": {
         let selection = this._finder.getActiveSelectionText();
         this._global.sendAsyncMessage("Finder:CurrentSelectionResult",
-                                      { selection: selection,
+                                      { selection,
                                         initial: true });
         break;
       }
 
       case "Finder:FastFind":
         this._finder.fastFind(data.searchString, data.linksOnly, data.drawOutline);
         break;
 
--- a/toolkit/modules/RemotePageManager.jsm
+++ b/toolkit/modules/RemotePageManager.jsm
@@ -11,48 +11,48 @@ const { classes: Cc, interfaces: Ci, uti
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 
 function MessageListener() {
   this.listeners = new Map();
 }
 
 MessageListener.prototype = {
-  keys: function() {
+  keys() {
     return this.listeners.keys();
   },
 
-  has: function(name) {
+  has(name) {
     return this.listeners.has(name);
   },
 
-  callListeners: function(message) {
+  callListeners(message) {
     let listeners = this.listeners.get(message.name);
     if (!listeners) {
       return;
     }
 
     for (let listener of listeners.values()) {
       try {
         listener(message);
       }
       catch (e) {
         Cu.reportError(e);
       }
     }
   },
 
-  addMessageListener: function(name, callback) {
+  addMessageListener(name, callback) {
     if (!this.listeners.has(name))
       this.listeners.set(name, new Set([callback]));
     else
       this.listeners.get(name).add(callback);
   },
 
-  removeMessageListener: function(name, callback) {
+  removeMessageListener(name, callback) {
     if (!this.listeners.has(name))
       return;
 
     this.listeners.get(name).delete(callback);
   },
 }
 
 
@@ -73,93 +73,93 @@ this.RemotePages = function(url) {
 }
 
 RemotePages.prototype = {
   url: null,
   messagePorts: null,
   listener: null,
   destroyed: null,
 
-  destroy: function() {
+  destroy() {
     RemotePageManager.removeRemotePageListener(this.url);
 
     for (let port of this.messagePorts.values()) {
       this.removeMessagePort(port);
     }
 
     this.messagePorts = null;
     this.listener = null;
     this.destroyed = true;
   },
 
   // Called when a page matching the url has loaded in a frame.
-  portCreated: function(port) {
+  portCreated(port) {
     this.messagePorts.add(port);
 
     port.addMessageListener("RemotePage:Unload", this.portMessageReceived);
 
     for (let name of this.listener.keys()) {
       this.registerPortListener(port, name);
     }
 
     this.listener.callListeners({ target: port, name: "RemotePage:Init" });
   },
 
   // A message has been received from one of the pages
-  portMessageReceived: function(message) {
+  portMessageReceived(message) {
     if (message.name == "RemotePage:Unload")
       this.removeMessagePort(message.target);
 
     this.listener.callListeners(message);
   },
 
   // A page has closed
-  removeMessagePort: function(port) {
+  removeMessagePort(port) {
     for (let name of this.listener.keys()) {
       port.removeMessageListener(name, this.portMessageReceived);
     }
 
     port.removeMessageListener("RemotePage:Unload", this.portMessageReceived);
     this.messagePorts.delete(port);
   },
 
-  registerPortListener: function(port, name) {
+  registerPortListener(port, name) {
     port.addMessageListener(name, this.portMessageReceived);
   },
 
   // Sends a message to all known pages
-  sendAsyncMessage: function(name, data = null) {
+  sendAsyncMessage(name, data = null) {
     for (let port of this.messagePorts.values()) {
       port.sendAsyncMessage(name, data);
     }
   },
 
-  addMessageListener: function(name, callback) {
+  addMessageListener(name, callback) {
     if (this.destroyed) {
       throw new Error("RemotePages has been destroyed");
     }
 
     if (!this.listener.has(name)) {
       for (let port of this.messagePorts.values()) {
         this.registerPortListener(port, name)
       }
     }
 
     this.listener.addMessageListener(name, callback);
   },
 
-  removeMessageListener: function(name, callback) {
+  removeMessageListener(name, callback) {
     if (this.destroyed) {
       throw new Error("RemotePages has been destroyed");
     }
 
     this.listener.removeMessageListener(name, callback);
   },
 
-  portsForBrowser: function(browser) {
+  portsForBrowser(browser) {
     return [...this.messagePorts].filter(port => port.browser == browser);
   },
 };
 
 
 // Only exposes the public properties of the MessagePort
 function publicMessagePort(port) {
   let properties = ["addMessageListener", "removeMessageListener",
@@ -167,17 +167,17 @@ function publicMessagePort(port) {
 
   let clean = {};
   for (let property of properties) {
     clean[property] = port[property].bind(port);
   }
 
   if (port instanceof ChromeMessagePort) {
     Object.defineProperty(clean, "browser", {
-      get: function() {
+      get() {
         return port.browser;
       }
     });
   }
 
   return clean;
 }
 
@@ -205,66 +205,66 @@ MessagePort.prototype = {
   portID: null,
   destroyed: null,
   listener: null,
   _browser: null,
   remotePort: null,
 
   // Called when the message manager used to connect to the other process has
   // changed, i.e. when a tab is detached.
-  swapMessageManager: function(messageManager) {
+  swapMessageManager(messageManager) {
     this.messageManager.removeMessageListener("RemotePage:Message", this.message);
 
     this.messageManager = messageManager;
 
     this.messageManager.addMessageListener("RemotePage:Message", this.message);
   },
 
   /* Adds a listener for messages. Many callbacks can be registered for the
    * same message if necessary. An attempt to register the same callback for the
    * same message twice will be ignored. When called the callback is passed an
    * object with these properties:
    *   target: This message port
    *   name:   The message name
    *   data:   Any data sent with the message
    */
-  addMessageListener: function(name, callback) {
+  addMessageListener(name, callback) {
     if (this.destroyed) {
       throw new Error("Message port has been destroyed");
     }
 
     this.listener.addMessageListener(name, callback);
   },
 
   /*
    * Removes a listener for messages.
    */
-  removeMessageListener: function(name, callback) {
+  removeMessageListener(name, callback) {
     if (this.destroyed) {
       throw new Error("Message port has been destroyed");
     }
 
     this.listener.removeMessageListener(name, callback);
   },
 
   // Sends a message asynchronously to the other process
-  sendAsyncMessage: function(name, data = null) {
+  sendAsyncMessage(name, data = null) {
     if (this.destroyed) {
       throw new Error("Message port has been destroyed");
     }
 
     this.messageManager.sendAsyncMessage("RemotePage:Message", {
       portID: this.portID,
-      name: name,
-      data: data,
+      name,
+      data,
     });
   },
 
   // Called to destroy this port
-  destroy: function() {
+  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) { }
     this.messageManager = null;
     this.destroyed = true;
     this.portID = null;
@@ -285,17 +285,17 @@ function ChromeMessagePort(browser, port
 
   this.swapBrowsers = this.swapBrowsers.bind(this);
   this._browser.addEventListener("SwapDocShells", this.swapBrowsers, false);
 }
 
 ChromeMessagePort.prototype = Object.create(MessagePort.prototype);
 
 Object.defineProperty(ChromeMessagePort.prototype, "browser", {
-  get: function() {
+  get() {
     return this._browser;
   }
 });
 
 // Called when the docshell is being swapped with another browser. We have to
 // update to use the new browser's message manager
 ChromeMessagePort.prototype.swapBrowsers = function({ detail: newBrowser }) {
   // We can see this event for the new browser before the swap completes so
@@ -395,17 +395,17 @@ function ChildMessagePort(contentFrame, 
       // 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", {
-    portID: portID,
+    portID,
     url: window.document.documentURI.replace(/[\#|\?].*$/, ""),
   });
 }
 
 ChildMessagePort.prototype = Object.create(MessagePort.prototype);
 
 ChildMessagePort.prototype.nextPortID = 0;
 
@@ -430,59 +430,59 @@ ChildMessagePort.prototype.destroy = fun
 
 // Allows callers to register to connect to specific content pages. Registration
 // is done through the addRemotePageListener method
 var RemotePageManagerInternal = {
   // The currently registered remote pages
   pages: new Map(),
 
   // Initialises all the needed listeners
-  init: function() {
+  init() {
     Services.ppmm.addMessageListener("RemotePage:InitListener", this.initListener.bind(this));
     Services.mm.addMessageListener("RemotePage:InitPort", this.initPort.bind(this));
   },
 
   // Registers interest in a remote page. A callback is called with a port for
   // the new page when loading begins (i.e. the page hasn't actually loaded yet).
   // Only one callback can be registered per URL.
-  addRemotePageListener: function(url, callback) {
+  addRemotePageListener(url, callback) {
     if (Services.appinfo.processType != Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT)
       throw new Error("RemotePageManager can only be used in the main process.");
 
     if (this.pages.has(url)) {
       throw new Error("Remote page already registered: " + url);
     }
 
     this.pages.set(url, callback);
 
     // Notify all the frame scripts of the new registration
     Services.ppmm.broadcastAsyncMessage("RemotePage:Register", { urls: [url] });
   },
 
   // Removes any interest in a remote page.
-  removeRemotePageListener: function(url) {
+  removeRemotePageListener(url) {
     if (Services.appinfo.processType != Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT)
       throw new Error("RemotePageManager can only be used in the main process.");
 
     if (!this.pages.has(url)) {
       throw new Error("Remote page is not registered: " + url);
     }
 
     // Notify all the frame scripts of the removed registration
     Services.ppmm.broadcastAsyncMessage("RemotePage:Unregister", { urls: [url] });
     this.pages.delete(url);
   },
 
   // A listener is requesting the list of currently registered urls
-  initListener: function({ target: messageManager }) {
+  initListener({ target: messageManager }) {
     messageManager.sendAsyncMessage("RemotePage:Register", { urls: Array.from(this.pages.keys()) })
   },
 
   // A remote page has been created and a port is ready in the content side
-  initPort: function({ target: browser, data: { url, portID } }) {
+  initPort({ target: browser, data: { url, portID } }) {
     let callback = this.pages.get(url);
     if (!callback) {
       Cu.reportError("Unexpected remote page load: " + url);
       return;
     }
 
     let port = new ChromeMessagePort(browser, portID);
     callback(port.publicPort);
--- a/toolkit/modules/RemoteSecurityUI.jsm
+++ b/toolkit/modules/RemoteSecurityUI.jsm
@@ -22,13 +22,13 @@ RemoteSecurityUI.prototype = {
 
   // nsISSLStatusProvider
   get SSLStatus() { return this._SSLStatus; },
 
   // nsISecureBrowserUI
   get state() { return this._state; },
   get tooltipText() { return ""; },
 
-  _update: function(aStatus, aState) {
+  _update(aStatus, aState) {
     this._SSLStatus = aStatus;
     this._state = aState;
   }
 };
--- a/toolkit/modules/RemoteWebProgress.jsm
+++ b/toolkit/modules/RemoteWebProgress.jsm
@@ -59,21 +59,21 @@ RemoteWebProgress.prototype = {
   NOTIFY_ALL:            0x000001ff,
 
   get isLoadingDocument() { return this._isLoadingDocument },
   get DOMWindow() { return this._DOMWindow; },
   get DOMWindowID() { return this._DOMWindowID; },
   get isTopLevel() { return this._isTopLevel },
   get loadType() { return this._loadType; },
 
-  addProgressListener: function(aListener) {
+  addProgressListener(aListener) {
     this._manager.addProgressListener(aListener);
   },
 
-  removeProgressListener: function(aListener) {
+  removeProgressListener(aListener) {
     this._manager.removeProgressListener(aListener);
   }
 };
 
 function RemoteWebProgressManager(aBrowser) {
   this._topLevelWebProgress = new RemoteWebProgress(this, true);
   this._progressListeners = [];
 
@@ -105,17 +105,17 @@ RemoteWebProgressManager.argumentsForAdd
   if (checkType(args[requestIndex], RemoteWebProgressRequest)) {
     args[requestIndex] = args[requestIndex].wrappedJSObject._requestCPOW;
   }
 
   return args;
 };
 
 RemoteWebProgressManager.prototype = {
-  swapBrowser: function(aBrowser) {
+  swapBrowser(aBrowser) {
     if (this._messageManager) {
       this._messageManager.removeMessageListener("Content:StateChange", this);
       this._messageManager.removeMessageListener("Content:LocationChange", this);
       this._messageManager.removeMessageListener("Content:SecurityChange", this);
       this._messageManager.removeMessageListener("Content:StatusChange", this);
       this._messageManager.removeMessageListener("Content:ProgressChange", this);
       this._messageManager.removeMessageListener("Content:LoadURIResult", this);
     }
@@ -129,64 +129,64 @@ RemoteWebProgressManager.prototype = {
     this._messageManager.addMessageListener("Content:ProgressChange", this);
     this._messageManager.addMessageListener("Content:LoadURIResult", this);
   },
 
   get topLevelWebProgress() {
     return this._topLevelWebProgress;
   },
 
-  addProgressListener: function(aListener) {
+  addProgressListener(aListener) {
     let listener = aListener.QueryInterface(Ci.nsIWebProgressListener);
     this._progressListeners.push(listener);
   },
 
-  removeProgressListener: function(aListener) {
+  removeProgressListener(aListener) {
     this._progressListeners =
       this._progressListeners.filter(l => l != aListener);
   },
 
-  _fixSSLStatusAndState: function(aStatus, aState) {
+  _fixSSLStatusAndState(aStatus, aState) {
     let deserialized = null;
     if (aStatus) {
       let helper = Cc["@mozilla.org/network/serialization-helper;1"]
                     .getService(Components.interfaces.nsISerializationHelper);
 
       deserialized = helper.deserializeObject(aStatus)
       deserialized.QueryInterface(Ci.nsISSLStatus);
     }
 
     return [deserialized, aState];
   },
 
-  setCurrentURI: function(aURI) {
+  setCurrentURI(aURI) {
     // This function is simpler than nsDocShell::SetCurrentURI since
     // it doesn't have to deal with child docshells.
     let remoteWebNav = this._browser._remoteWebNavigationImpl;
     remoteWebNav._currentURI = aURI;
 
     let webProgress = this.topLevelWebProgress;
     for (let p of this._progressListeners) {
       p.onLocationChange(webProgress, null, aURI);
     }
   },
 
-  _callProgressListeners: function(methodName, ...args) {
+  _callProgressListeners(methodName, ...args) {
     for (let p of this._progressListeners) {
       if (p[methodName]) {
         try {
           p[methodName].apply(p, args);
         } catch (ex) {
           Cu.reportError("RemoteWebProgress failed to call " + methodName + ": " + ex + "\n");
         }
       }
     }
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     let json = aMessage.json;
     let objects = aMessage.objects;
     // This message is a custom one we send as a result of a loadURI call.
     // It shouldn't go through the same processing as all the forwarded
     // webprogresslistener messages.
     if (aMessage.name == "Content:LoadURIResult") {
       this._browser.inLoadURI = false;
       return;
--- a/toolkit/modules/ResetProfile.jsm
+++ b/toolkit/modules/ResetProfile.jsm
@@ -15,17 +15,17 @@ const MOZ_APP_NAME = AppConstants.MOZ_AP
 const MOZ_BUILD_APP = AppConstants.MOZ_BUILD_APP;
 
 this.ResetProfile = {
   /**
    * Check if reset is supported for the currently running profile.
    *
    * @return boolean whether reset is supported.
    */
-  resetSupported: function() {
+  resetSupported() {
     // Reset is only supported if the self-migrator used for reset exists.
     let migrator = "@mozilla.org/profile/migrator;1?app=" + MOZ_BUILD_APP +
                    "&type=" + MOZ_APP_NAME;
     if (!(migrator in Cc)) {
       return false;
     }
     // We also need to be using a profile the profile manager knows about.
     let profileService = Cc["@mozilla.org/toolkit/profile-service;1"].
@@ -39,17 +39,17 @@ this.ResetProfile = {
       }
     }
     return false;
   },
 
   /**
    * Ask the user if they wish to restart the application to reset the profile.
    */
-  openConfirmationDialog: function(window) {
+  openConfirmationDialog(window) {
     // Prompt the user to confirm.
     let params = {
       reset: false,
     };
     window.openDialog("chrome://global/content/resetProfile.xul", null,
                       "chrome,modal,centerscreen,titlebar,dialog=yes", params);
     if (!params.reset)
       return;
--- a/toolkit/modules/SelectContentHelper.jsm
+++ b/toolkit/modules/SelectContentHelper.jsm
@@ -37,23 +37,23 @@ this.SelectContentHelper = function(aEle
   this.closedWithEnter = false;
   this.isOpenedViaTouch = aOptions.isOpenedViaTouch;
   this.init();
   this.showDropDown();
   this._updateTimer = new DeferredTask(this._update.bind(this), 0);
 }
 
 Object.defineProperty(SelectContentHelper, "open", {
-  get: function() {
+  get() {
     return gOpen;
   },
 });
 
 this.SelectContentHelper.prototype = {
-  init: function() {
+  init() {
     this.global.addMessageListener("Forms:SelectDropDownItem", this);
     this.global.addMessageListener("Forms:DismissedDropDown", this);
     this.global.addMessageListener("Forms:MouseOver", this);
     this.global.addMessageListener("Forms:MouseOut", this);
     this.global.addMessageListener("Forms:MouseUp", this);
     this.global.addEventListener("pagehide", this);
     this.global.addEventListener("mozhidedropdown", this);
     let MutationObserver = this.element.ownerDocument.defaultView.MutationObserver;
@@ -61,64 +61,64 @@ this.SelectContentHelper.prototype = {
       // Something changed the <select> while it was open, so
       // we'll poke a DeferredTask to update the parent sometime
       // in the very near future.
       this._updateTimer.arm();
     });
     this.mut.observe(this.element, {childList: true, subtree: true});
   },
 
-  uninit: function() {
+  uninit() {
     this.element.openInParentProcess = false;
     this.global.removeMessageListener("Forms:SelectDropDownItem", this);
     this.global.removeMessageListener("Forms:DismissedDropDown", this);
     this.global.removeMessageListener("Forms:MouseOver", this);
     this.global.removeMessageListener("Forms:MouseOut", this);
     this.global.removeMessageListener("Forms:MouseUp", this);
     this.global.removeEventListener("pagehide", this);
     this.global.removeEventListener("mozhidedropdown", this);
     this.element = null;
     this.global = null;
     this.mut.disconnect();
     this._updateTimer.disarm();
     this._updateTimer = null;
     gOpen = false;
   },
 
-  showDropDown: function() {
+  showDropDown() {
     this.element.openInParentProcess = true;
     let rect = this._getBoundingContentRect();
     this.global.sendAsyncMessage("Forms:ShowDropDown", {
-      rect: rect,
+      rect,
       options: this._buildOptionList(),
       selectedIndex: this.element.selectedIndex,
       direction: getComputedStyles(this.element).direction,
       isOpenedViaTouch: this.isOpenedViaTouch
     });
     gOpen = true;
   },
 
-  _getBoundingContentRect: function() {
+  _getBoundingContentRect() {
     return BrowserUtils.getElementBoundingScreenRect(this.element);
   },
 
-  _buildOptionList: function() {
+  _buildOptionList() {
     return buildOptionListForChildren(this.element);
   },
 
   _update() {
     // The <select> was updated while the dropdown was open.
     // Let's send up a new list of options.
     this.global.sendAsyncMessage("Forms:UpdateDropDown", {
       options: this._buildOptionList(),
       selectedIndex: this.element.selectedIndex,
     });
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     switch (message.name) {
       case "Forms:SelectDropDownItem":
         this.element.selectedIndex = message.data.value;
         this.closedWithEnter = message.data.closedWithEnter;
         break;
 
       case "Forms:DismissedDropDown":
         let selectedOption = this.element.item(this.element.selectedIndex);
@@ -176,17 +176,17 @@ this.SelectContentHelper.prototype = {
 
       case "Forms:MouseUp":
         DOMUtils.removeContentState(this.element, kStateActive);
         break;
 
     }
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
       case "pagehide":
         if (this.element.ownerDocument === event.target) {
           this.global.sendAsyncMessage("Forms:HideDropDown", {});
           this.uninit();
         }
         break;
       case "mozhidedropdown":
@@ -221,18 +221,18 @@ function buildOptionListForChildren(node
       if (textContent == null) {
         textContent = "";
       }
 
       let cs = getComputedStyles(child);
 
       let info = {
         index: child.index,
-        tagName: tagName,
-        textContent: textContent,
+        tagName,
+        textContent,
         disabled: child.disabled,
         display: cs.display,
         // We need to do this for every option element as each one can have
         // an individual style set for direction
         textDirection: cs.direction,
         tooltip: child.title,
         // XXX this uses a highlight color when this is the selected element.
         // We need to suppress such highlighting in the content process to get
--- a/toolkit/modules/SelectParentHelper.jsm
+++ b/toolkit/modules/SelectParentHelper.jsm
@@ -15,25 +15,25 @@ const {AppConstants} = Cu.import("resour
 const MAX_ROWS = 20;
 
 var currentBrowser = null;
 var currentMenulist = null;
 var currentZoom = 1;
 var closedWithEnter = false;
 
 this.SelectParentHelper = {
-  populate: function(menulist, items, selectedIndex, zoom) {
+  populate(menulist, items, selectedIndex, zoom) {
     // Clear the current contents of the popup
     menulist.menupopup.textContent = "";
     currentZoom = zoom;
     currentMenulist = menulist;
     populateChildren(menulist, items, selectedIndex, zoom);
   },
 
-  open: function(browser, menulist, rect, isOpenedViaTouch) {
+  open(browser, menulist, rect, isOpenedViaTouch) {
     menulist.hidden = false;
     currentBrowser = browser;
     closedWithEnter = false;
     this._registerListeners(browser, menulist.menupopup);
 
     let win = browser.ownerDocument.defaultView;
 
     // Set the maximum height to show exactly MAX_ROWS items.
@@ -58,23 +58,23 @@ this.SelectParentHelper = {
     let constraintRect = browser.getBoundingClientRect();
     constraintRect = new win.DOMRect(constraintRect.left + win.mozInnerScreenX,
                                      constraintRect.top + win.mozInnerScreenY,
                                      constraintRect.width, constraintRect.height);
     menupopup.setConstraintRect(constraintRect);
     menupopup.openPopupAtScreenRect(AppConstants.platform == "macosx" ? "selection" : "after_start", rect.left, rect.top, rect.width, rect.height, false, false);
   },
 
-  hide: function(menulist, browser) {
+  hide(menulist, browser) {
     if (currentBrowser == browser) {
       menulist.menupopup.hidePopup();
     }
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
       case "mouseup":
         currentBrowser.messageManager.sendAsyncMessage("Forms:MouseUp", {});
         break;
 
       case "mouseover":
         currentBrowser.messageManager.sendAsyncMessage("Forms:MouseOver", {});
         break;
@@ -88,17 +88,17 @@ this.SelectParentHelper = {
           closedWithEnter = true;
         }
         break;
 
       case "command":
         if (event.target.hasAttribute("value")) {
           currentBrowser.messageManager.sendAsyncMessage("Forms:SelectDropDownItem", {
             value: event.target.value,
-            closedWithEnter: closedWithEnter
+            closedWithEnter
           });
         }
         break;
 
       case "fullscreen":
         if (currentMenulist) {
           currentMenulist.menupopup.hidePopup();
         }
@@ -125,28 +125,28 @@ this.SelectParentHelper = {
       }
 
       let options = msg.data.options;
       let selectedIndex = msg.data.selectedIndex;
       this.populate(currentMenulist, options, selectedIndex, currentZoom);
     }
   },
 
-  _registerListeners: function(browser, popup) {
+  _registerListeners(browser, popup) {
     popup.addEventListener("command", this);
     popup.addEventListener("popuphidden", this);
     popup.addEventListener("mouseover", this);
     popup.addEventListener("mouseout", this);
     browser.ownerDocument.defaultView.addEventListener("mouseup", this, true);
     browser.ownerDocument.defaultView.addEventListener("keydown", this, true);
     browser.ownerDocument.defaultView.addEventListener("fullscreen", this, true);
     browser.messageManager.addMessageListener("Forms:UpdateDropDown", this);
   },
 
-  _unregisterListeners: function(browser, popup) {
+  _unregisterListeners(browser, popup) {
     popup.removeEventListener("command", this);
     popup.removeEventListener("popuphidden", this);
     popup.removeEventListener("mouseover", this);
     popup.removeEventListener("mouseout", this);
     browser.ownerDocument.defaultView.removeEventListener("mouseup", this, true);
     browser.ownerDocument.defaultView.removeEventListener("keydown", this, true);
     browser.ownerDocument.defaultView.removeEventListener("fullscreen", this, true);
     browser.messageManager.removeMessageListener("Forms:UpdateDropDown", this);
--- a/toolkit/modules/SessionRecorder.jsm
+++ b/toolkit/modules/SessionRecorder.jsm
@@ -80,17 +80,17 @@ this.SessionRecorder = function(branch) 
   this._os = Cc["@mozilla.org/observer-service;1"]
                .getService(Ci.nsIObserverService);
 
 };
 
 SessionRecorder.prototype = Object.freeze({
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
 
-  STARTUP_RETRY_INTERVAL_MS: STARTUP_RETRY_INTERVAL_MS,
+  STARTUP_RETRY_INTERVAL_MS,
 
   get _currentIndex() {
     return this._prefs.get("currentIndex", 0);
   },
 
   set _currentIndex(value) {
     this._prefs.set("currentIndex", value);
   },
@@ -110,30 +110,30 @@ SessionRecorder.prototype = Object.freez
   set _startDate(value) {
     CommonUtils.setDatePref(this._prefs, "current.startTime", value);
   },
 
   get activeTicks() {
     return this._prefs.get("current.activeTicks", 0);
   },
 
-  incrementActiveTicks: function() {
+  incrementActiveTicks() {
     this._prefs.set("current.activeTicks", ++this._activeTicks);
   },
 
   /**
    * Total time of this session in integer seconds.
    *
    * See also fineTotalTime for the time in milliseconds.
    */
   get totalTime() {
     return this._prefs.get("current.totalTime", 0);
   },
 
-  updateTotalTime: function() {
+  updateTotalTime() {
     // We store millisecond precision internally to prevent drift from
     // repeated rounding.
     this.fineTotalTime = Date.now() - this.startDate;
     this._prefs.set("current.totalTime", Math.floor(this.fineTotalTime / 1000));
   },
 
   get main() {
     return this._prefs.get("current.main", -1);
@@ -166,57 +166,57 @@ SessionRecorder.prototype = Object.freez
   set _sessionRestored(value) {
     if (!Number.isInteger(value)) {
       throw new Error("sessionRestored must be an integer.");
     }
 
     this._prefs.set("current.sessionRestored", value);
   },
 
-  getPreviousSessions: function() {
+  getPreviousSessions() {
     let result = {};
 
     for (let i = this._prunedIndex; i < this._currentIndex; i++) {
       let s = this.getPreviousSession(i);
       if (!s) {
         continue;
       }
 
       result[i] = s;
     }
 
     return result;
   },
 
-  getPreviousSession: function(index) {
+  getPreviousSession(index) {
     return this._deserialize(this._prefs.get("previous." + index));
   },
 
   /**
    * Prunes old, completed sessions that started earlier than the
    * specified date.
    */
-  pruneOldSessions: function(date) {
+  pruneOldSessions(date) {
     for (let i = this._prunedIndex; i < this._currentIndex; i++) {
       let s = this.getPreviousSession(i);
       if (!s) {
         continue;
       }
 
       if (s.startDate >= date) {
         continue;
       }
 
       this._log.debug("Pruning session #" + i + ".");
       this._prefs.reset("previous." + i);
       this._prunedIndex = i;
     }
   },
 
-  recordStartupFields: function() {
+  recordStartupFields() {
     let si = this._getStartupInfo();
 
     if (!si.process) {
       throw new Error("Startup info not available.");
     }
 
     let missing = false;
 
@@ -242,29 +242,29 @@ SessionRecorder.prototype = Object.freez
     if (!this._timer) {
       this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
       this._timer.initWithCallback({
         notify: this.recordStartupFields.bind(this),
       }, this.STARTUP_RETRY_INTERVAL_MS, this._timer.TYPE_REPEATING_SLACK);
     }
   },
 
-  _clearStartupTimer: function() {
+  _clearStartupTimer() {
     if (this._timer) {
       this._timer.cancel();
       delete this._timer;
     }
   },
 
   /**
    * Perform functionality on application startup.
    *
    * This is typically called in a "profile-do-change" handler.
    */
-  onStartup: function() {
+  onStartup() {
     if (this._started) {
       throw new Error("onStartup has already been called.");
     }
 
     let si = this._getStartupInfo();
     if (!si.process) {
       throw new Error("Process information not available. Misconfigured app?");
     }
@@ -284,28 +284,28 @@ SessionRecorder.prototype = Object.freez
     this.updateTotalTime();
 
     this.recordStartupFields();
   },
 
   /**
    * Record application activity.
    */
-  onActivity: function(active) {
+  onActivity(active) {
     let updateActive = active && !this._lastActivityWasInactive;
     this._lastActivityWasInactive = !active;
 
     this.updateTotalTime();
 
     if (updateActive) {
       this.incrementActiveTicks();
     }
   },
 
-  onShutdown: function() {
+  onShutdown() {
     this._log.info("Recording clean session shutdown.");
     this._prefs.set("current.clean", true);
     this.updateTotalTime();
     this._clearStartupTimer();
 
     this._os.removeObserver(this, "profile-before-change");
     this._os.removeObserver(this, "user-interaction-active");
     this._os.removeObserver(this, "user-interaction-inactive");
@@ -318,17 +318,17 @@ SessionRecorder.prototype = Object.freez
     "current.totalTime",
     "current.main",
     "current.firstPaint",
     "current.sessionRestored",
     "current.clean",
   ],
 
   // This is meant to be called only during onStartup().
-  _moveCurrentToPrevious: function() {
+  _moveCurrentToPrevious() {
     try {
       if (!this.startDate.getTime()) {
         this._log.info("No previous session. Is this first app run?");
         return;
       }
 
       let clean = this._prefs.get("current.clean", false);
 
@@ -350,17 +350,17 @@ SessionRecorder.prototype = Object.freez
     } finally {
       this._log.debug("Resetting prefs from last session.");
       for (let pref of this._CURRENT_PREFS) {
         this._prefs.reset(pref);
       }
     }
   },
 
-  _deserialize: function(s) {
+  _deserialize(s) {
     let o;
     try {
       o = JSON.parse(s);
     } catch (ex) {
       return null;
     }
 
     return {
@@ -370,23 +370,23 @@ SessionRecorder.prototype = Object.freez
       clean: !!o.c,
       main: o.m,
       firstPaint: o.fp,
       sessionRestored: o.sr,
     };
   },
 
   // Implemented as a function to allow for monkeypatching in tests.
-  _getStartupInfo: function() {
+  _getStartupInfo() {
     return Cc["@mozilla.org/toolkit/app-startup;1"]
              .getService(Ci.nsIAppStartup)
              .getStartupInfo();
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case "profile-before-change":
         this.onShutdown();
         break;
 
       case "user-interaction-active":
         this.onActivity(true);
         break;
--- a/toolkit/modules/ShortcutUtils.jsm
+++ b/toolkit/modules/ShortcutUtils.jsm
@@ -26,17 +26,17 @@ var ShortcutUtils = {
     *
     * @param Node aElemKey
     *        The key element to get the modifiers from.
     * @param boolean aNoCloverLeaf
     *        Pass true to use a descriptive string instead of the cloverleaf symbol. (OS X only)
     * @return string
     *         A prettified and properly separated modifier keys string.
     */
-  prettifyShortcut: function(aElemKey, aNoCloverLeaf) {
+  prettifyShortcut(aElemKey, aNoCloverLeaf) {
     let elemString = "";
     let elemMod = aElemKey.getAttribute("modifiers");
     let haveCloverLeaf = false;
 
     if (elemMod.match("accel")) {
       if (Services.appinfo.OS == "Darwin") {
         // XXX bug 779642 Use "Cmd-" literal vs. cloverleaf meta-key until
         // Orion adds variable height lines.
@@ -97,17 +97,17 @@ var ShortcutUtils = {
       }
     } else {
       key = aElemKey.getAttribute("key");
       key = key.toUpperCase();
     }
     return elemString + key;
   },
 
-  findShortcut: function(aElemCommand) {
+  findShortcut(aElemCommand) {
     let document = aElemCommand.ownerDocument;
     return document.querySelector("key[command=\"" + aElemCommand.getAttribute("id") + "\"]");
   }
 };
 
 Object.freeze(ShortcutUtils);
 
 this.ShortcutUtils = ShortcutUtils;
--- a/toolkit/modules/SpatialNavigation.jsm
+++ b/toolkit/modules/SpatialNavigation.jsm
@@ -17,17 +17,17 @@
  *    function optional_callback(element) {}
  */
 
 "use strict";
 
 this.EXPORTED_SYMBOLS = ["SpatialNavigation"];
 
 var SpatialNavigation = {
-  init: function(browser, callback) {
+  init(browser, callback) {
           browser.addEventListener("keydown", function(event) {
             _onInputKeyPress(event, callback);
           }, true);
   }
 };
 
 // Private stuff
 
@@ -482,17 +482,17 @@ function _spatialDistanceOfCorner(from, 
       break;
   }
   return Math.round(Math.pow(hDistance, 2) +
                     Math.pow(vDistance, 2));
 }
 
 // Snav preference observer
 var PrefObserver = {
-  register: function() {
+  register() {
     this.prefService = Cc["@mozilla.org/preferences-service;1"]
                           .getService(Ci.nsIPrefService);
 
     this._branch = this.prefService.getBranch("snav.");
     this._branch.QueryInterface(Ci.nsIPrefBranch2);
     this._branch.addObserver("", this, false);
 
     // set current or default pref values
@@ -501,17 +501,17 @@ var PrefObserver = {
     this.observe(null, "nsPref:changed", "keyCode.modifier");
     this.observe(null, "nsPref:changed", "keyCode.right");
     this.observe(null, "nsPref:changed", "keyCode.up");
     this.observe(null, "nsPref:changed", "keyCode.down");
     this.observe(null, "nsPref:changed", "keyCode.left");
     this.observe(null, "nsPref:changed", "keyCode.return");
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic != "nsPref:changed") {
       return;
     }
 
     // aSubject is the nsIPrefBranch we're observing (after appropriate QI)
     // aData is the name of the pref that's been changed (relative to aSubject)
     switch (aData) {
       case "enabled":
--- a/toolkit/modules/Sqlite.jsm
+++ b/toolkit/modules/Sqlite.jsm
@@ -305,17 +305,17 @@ ConnectionData.prototype = Object.freeze
    *     yield db.execute(...);
    * }));
    *
    * @param {string} name A human-readable name for the ongoing operation, used
    *  for logging and debugging purposes.
    * @param {function(db)} task A function that takes as argument a Sqlite.jsm
    *  db and returns a Promise.
    */
-  executeBeforeShutdown: function(parent, name, task) {
+  executeBeforeShutdown(parent, name, task) {
     if (!name) {
       throw new TypeError("Expected a human-readable name as first argument");
     }
     if (typeof task != "function") {
       throw new TypeError("Expected a function as second argument");
     }
     if (this._closeRequested) {
       throw new Error(`${this._identifier}: cannot execute operation ${name}, the connection is already closing`);
@@ -384,17 +384,17 @@ ConnectionData.prototype = Object.freeze
     return Task.spawn(function*() {
       try {
         return (yield promiseResult);
       } finally {
         this._barrier.client.removeBlocker(key, promiseComplete)
       }
     }.bind(this));
   },
-  close: function() {
+  close() {
     this._closeRequested = true;
 
     if (!this._dbConn) {
       return this._deferredClose.promise;
     }
 
     this._log.debug("Request to close connection.");
     this._clearIdleShrinkTimer();
@@ -402,34 +402,34 @@ ConnectionData.prototype = Object.freeze
     return this._barrier.wait().then(() => {
       if (!this._dbConn) {
         return undefined;
       }
       return this._finalize();
     });
   },
 
-  clone: function(readOnly = false) {
+  clone(readOnly = false) {
     this.ensureOpen();
 
     this._log.debug("Request to clone connection.");
 
     let options = {
       connection: this._dbConn,
-      readOnly: readOnly,
+      readOnly,
     };
     if (this._idleShrinkMS)
       options.shrinkMemoryOnConnectionIdleMS = this._idleShrinkMS;
 
     return cloneStorageConnection(options);
   },
-  _getOperationId: function() {
+  _getOperationId() {
     return this._operationsCounter++;
   },
-  _finalize: function() {
+  _finalize() {
     this._log.debug("Finalizing connection.");
     // Cancel any pending statements.
     for (let [/* k */, statement] of this._pendingStatements) {
       statement.cancel();
     }
     this._pendingStatements.clear();
 
     // We no longer need to track these.
@@ -466,17 +466,17 @@ ConnectionData.prototype = Object.freeze
     } else {
       this._log.debug("Calling asyncClose().");
       this._dbConn.asyncClose(markAsClosed);
       this._dbConn = null;
     }
     return this._deferredClose.promise;
   },
 
-  executeCached: function(sql, params = null, onRow = null) {
+  executeCached(sql, params = null, onRow = null) {
     this.ensureOpen();
 
     if (!sql) {
       throw new Error("sql argument is empty.");
     }
 
     let statement = this._cachedStatements.get(sql);
     if (!statement) {
@@ -500,17 +500,17 @@ ConnectionData.prototype = Object.freeze
         );
       } catch (ex) {
         this._startIdleShrinkTimer();
         throw ex;
       }
     });
   },
 
-  execute: function(sql, params = null, onRow = null) {
+  execute(sql, params = null, onRow = null) {
     if (typeof(sql) != "string") {
       throw new Error("Must define SQL to execute as a string: " + sql);
     }
 
     this.ensureOpen();
 
     let statement = this._dbConn.createAsyncStatement(sql);
     let index = this._anonymousCounter++;
@@ -542,17 +542,17 @@ ConnectionData.prototype = Object.freeze
       }
     });
   },
 
   get transactionInProgress() {
     return this._open && this._hasInProgressTransaction;
   },
 
-  executeTransaction: function(func, type) {
+  executeTransaction(func, type) {
     if (typeof type == "undefined") {
       throw new Error("Internal error: expected a type");
     }
     this.ensureOpen();
 
     this._log.debug("Beginning transaction");
 
     let promise = this._transactionQueue.then(() => {
@@ -648,38 +648,38 @@ ConnectionData.prototype = Object.freeze
     this._transactionQueue = promise.catch(ex => { console.error(ex) });
 
     // Make sure that we do not shutdown the connection during a transaction.
     this._barrier.client.addBlocker(`Transaction (${this._getOperationId()})`,
       this._transactionQueue);
     return promise;
   },
 
-  shrinkMemory: function() {
+  shrinkMemory() {
     this._log.info("Shrinking memory usage.");
     let onShrunk = this._clearIdleShrinkTimer.bind(this);
     return this.execute("PRAGMA shrink_memory").then(onShrunk, onShrunk);
   },
 
-  discardCachedStatements: function() {
+  discardCachedStatements() {
     let count = 0;
     for (let [/* k */, statement] of this._cachedStatements) {
       ++count;
       statement.finalize();
     }
     this._cachedStatements.clear();
     this._log.debug("Discarded " + count + " cached statements.");
     return count;
   },
 
   /**
    * Helper method to bind parameters of various kinds through
    * reflection.
    */
-  _bindParameters: function(statement, params) {
+  _bindParameters(statement, params) {
     if (!params) {
       return;
     }
 
     if (Array.isArray(params)) {
       // It's an array of separate params.
       if (params.length && (typeof(params[0]) == "object")) {
         let paramsArray = statement.newBindingParamsArray();
@@ -709,17 +709,17 @@ ConnectionData.prototype = Object.freeze
       }
       return;
     }
 
     throw new Error("Invalid type for bound parameters. Expected Array or " +
                     "object. Got: " + params);
   },
 
-  _executeStatement: function(sql, statement, params, onRow) {
+  _executeStatement(sql, statement, params, onRow) {
     if (statement.state != statement.MOZ_STORAGE_STATEMENT_READY) {
       throw new Error("Statement is not ready for execution.");
     }
 
     if (onRow && typeof(onRow) != "function") {
       throw new Error("onRow must be a function. Got: " + onRow);
     }
 
@@ -743,17 +743,17 @@ ConnectionData.prototype = Object.freeze
       }
       this._log.trace(msg);
     } else {
       this._log.debug("Stmt #" + index + " starting");
     }
 
     let self = this;
     let pending = statement.executeAsync({
-      handleResult: function(resultSet) {
+      handleResult(resultSet) {
         // .cancel() may not be immediate and handleResult() could be called
         // after a .cancel().
         for (let row = resultSet.getNextRow(); row && !userCancelled; row = resultSet.getNextRow()) {
           if (!onRow) {
             rows.push(row);
             continue;
           }
 
@@ -768,23 +768,23 @@ ConnectionData.prototype = Object.freeze
               break;
             }
 
             self._log.warn("Exception when calling onRow callback", e);
           }
         }
       },
 
-      handleError: function(error) {
+      handleError(error) {
         self._log.info("Error when executing SQL (" +
                        error.result + "): " + error.message);
         errors.push(error);
       },
 
-      handleCompletion: function(reason) {
+      handleCompletion(reason) {
         self._log.debug("Stmt #" + index + " finished.");
         self._pendingStatements.delete(index);
 
         switch (reason) {
           case Ci.mozIStorageStatementCallback.REASON_FINISHED:
             // If there is an onRow handler, we always instead resolve to a
             // boolean indicating whether the onRow handler was called or not.
             let result = onRow ? handledRow : rows;
@@ -816,31 +816,31 @@ ConnectionData.prototype = Object.freeze
         }
       },
     });
 
     this._pendingStatements.set(index, pending);
     return deferred.promise;
   },
 
-  ensureOpen: function() {
+  ensureOpen() {
     if (!this._open) {
       throw new Error("Connection is not open.");
     }
   },
 
-  _clearIdleShrinkTimer: function() {
+  _clearIdleShrinkTimer() {
     if (!this._idleShrinkTimer) {
       return;
     }
 
     this._idleShrinkTimer.cancel();
   },
 
-  _startIdleShrinkTimer: function() {
+  _startIdleShrinkTimer() {
     if (!this._idleShrinkTimer) {
       return;
     }
 
     this._idleShrinkTimer.initWithCallback(this.shrinkMemory.bind(this),
                                            this._idleShrinkMS,
                                            this._idleShrinkTimer.TYPE_ONE_SHOT);
   }
@@ -1164,28 +1164,28 @@ OpenedConnection.prototype = Object.free
 
   /**
    * The integer schema version of the database.
    *
    * This is 0 if not schema version has been set.
    *
    * @return Promise<int>
    */
-  getSchemaVersion: function() {
+  getSchemaVersion() {
     return this.execute("PRAGMA user_version").then(
       function onSuccess(result) {
         if (result == null) {
           return 0;
         }
         return JSON.stringify(result[0].getInt32(0));
       }
     );
   },
 
-  setSchemaVersion: function(value) {
+  setSchemaVersion(value) {
     if (!Number.isInteger(value)) {
       // Guarding against accidental SQLi
       throw new TypeError("Schema version must be an integer. Got " + value);
     }
     this._connectionData.ensureOpen();
     return this.execute("PRAGMA user_version = " + value);
   },
 
@@ -1202,17 +1202,17 @@ OpenedConnection.prototype = Object.free
    * The returned promise will be resolved once the connection is closed.
    * Successive calls to close() return the same promise.
    *
    * IMPROVEMENT: Resolve the promise to a closed connection which can be
    * reopened.
    *
    * @return Promise<>
    */
-  close: function() {
+  close() {
     // Unless cleanup has already been done by a previous call to
     // `close`, delete the database entry from map and tell the
     // finalization witness to forget.
     if (ConnectionData.byId.has(this._connectionData._identifier)) {
       ConnectionData.byId.delete(this._connectionData._identifier);
       this._witness.forget();
     }
     return this._connectionData.close();
@@ -1227,21 +1227,21 @@ OpenedConnection.prototype = Object.free
    *        (boolean) - If true the clone will be read-only.  If the original
    *        connection is already read-only, the clone will be, regardless of
    *        this option.  If the original connection is using the shared cache,
    *        this parameter will be ignored and the clone will be as privileged as
    *        the original connection.
    *
    * @return Promise<OpenedConnection>
    */
-  clone: function(readOnly = false) {
+  clone(readOnly = false) {
     return this._connectionData.clone(readOnly);
   },
 
-  executeBeforeShutdown: function(name, task) {
+  executeBeforeShutdown(name, task) {
     return this._connectionData.executeBeforeShutdown(this, name, task);
   },
 
   /**
    * Execute a SQL statement and cache the underlying statement object.
    *
    * This function executes a SQL statement and also caches the underlying
    * derived statement object so subsequent executions are faster and use
@@ -1293,17 +1293,17 @@ OpenedConnection.prototype = Object.free
    *
    * @param name
    *        (string) The name of the registered statement to execute.
    * @param params optional
    *        (Array or object) Parameters to bind.
    * @param onRow optional
    *        (function) Callback to receive each row from result.
    */
-  executeCached: function(sql, params = null, onRow = null) {
+  executeCached(sql, params = null, onRow = null) {
     if (isInvalidBoundLikeQuery(sql)) {
       throw new Error("Please enter a LIKE clause with bindings");
     }
     return this._connectionData.executeCached(sql, params, onRow);
   },
 
   /**
    * Execute a one-shot SQL statement.
@@ -1315,17 +1315,17 @@ OpenedConnection.prototype = Object.free
    *
    * @param sql
    *        (string) SQL to execute.
    * @param params optional
    *        (Array or Object) Parameters to bind to the statement.
    * @param onRow optional
    *        (function) Callback to receive result of a single row.
    */
-  execute: function(sql, params = null, onRow = null) {
+  execute(sql, params = null, onRow = null) {
     if (isInvalidBoundLikeQuery(sql)) {
       throw new Error("Please enter a LIKE clause with bindings");
     }
     return this._connectionData.execute(sql, params, onRow);
   },
 
   /**
    * Whether a transaction is currently in progress.
@@ -1367,33 +1367,33 @@ OpenedConnection.prototype = Object.free
    * be resolved to whatever value the supplied function resolves to. If
    * the transaction is rolled back, the promise is rejected.
    *
    * @param func
    *        (function) What to perform as part of the transaction.
    * @param type optional
    *        One of the TRANSACTION_* constants attached to this type.
    */
-  executeTransaction: function(func, type = this.TRANSACTION_DEFERRED) {
+  executeTransaction(func, type = this.TRANSACTION_DEFERRED) {
     if (this.TRANSACTION_TYPES.indexOf(type) == -1) {
       throw new Error("Unknown transaction type: " + type);
     }
 
     return this._connectionData.executeTransaction(() => func(this), type);
   },
 
   /**
    * Whether a table exists in the database (both persistent and temporary tables).
    *
    * @param name
    *        (string) Name of the table.
    *
    * @return Promise<bool>
    */
-  tableExists: function(name) {
+  tableExists(name) {
     return this.execute(
       "SELECT name FROM (SELECT * FROM sqlite_master UNION ALL " +
                         "SELECT * FROM sqlite_temp_master) " +
       "WHERE type = 'table' AND name=?",
       [name])
       .then(function onResult(rows) {
         return Promise.resolve(rows.length > 0);
       }
@@ -1403,56 +1403,56 @@ OpenedConnection.prototype = Object.free
   /**
    * Whether a named index exists (both persistent and temporary tables).
    *
    * @param name
    *        (string) Name of the index.
    *
    * @return Promise<bool>
    */
-  indexExists: function(name) {
+  indexExists(name) {
     return this.execute(
       "SELECT name FROM (SELECT * FROM sqlite_master UNION ALL " +
                         "SELECT * FROM sqlite_temp_master) " +
       "WHERE type = 'index' AND name=?",
       [name])
       .then(function onResult(rows) {
         return Promise.resolve(rows.length > 0);
       }
     );
   },
 
   /**
    * Free up as much memory from the underlying database connection as possible.
    *
    * @return Promise<>
    */
-  shrinkMemory: function() {
+  shrinkMemory() {
     return this._connectionData.shrinkMemory();
   },
 
   /**
    * Discard all cached statements.
    *
    * Note that this relies on us being non-interruptible between
    * the insertion or retrieval of a statement in the cache and its
    * execution: we finalize all statements, which is only safe if
    * they will not be executed again.
    *
    * @return (integer) the number of statements discarded.
    */
-  discardCachedStatements: function() {
+  discardCachedStatements() {
     return this._connectionData.discardCachedStatements();
   },
 });
 
 this.Sqlite = {
-  openConnection: openConnection,
-  cloneStorageConnection: cloneStorageConnection,
-  wrapStorageConnection: wrapStorageConnection,
+  openConnection,
+  cloneStorageConnection,
+  wrapStorageConnection,
   /**
    * Shutdown barrier client. May be used by clients to perform last-minute
    * cleanup prior to the shutdown of this module.
    *
    * See the documentation of AsyncShutdown.Barrier.prototype.client.
    */
   get shutdown() {
     return Barriers.shutdown.client;
--- a/toolkit/modules/Task.jsm
+++ b/toolkit/modules/Task.jsm
@@ -495,17 +495,17 @@ Task.Debugging = {
 
   /**
    * Generate a human-readable stack for an error raised in
    * a Task.
    *
    * @param {string} topStack The stack provided by the error.
    * @param {string=} prefix Optionally, a prefix for each line.
    */
-  generateReadableStack: function(topStack, prefix = "") {
+  generateReadableStack(topStack, prefix = "") {
     if (!gCurrentTask) {
       return topStack;
     }
 
     // Cut `topStack` at the first line that contains Task.jsm, keep the head.
     let lines = [];
     for (let [line] of linesOf(topStack)) {
       if (line.indexOf("/Task.jsm:") != -1) {
--- a/toolkit/modules/WebChannel.jsm
+++ b/toolkit/modules/WebChannel.jsm
@@ -28,17 +28,17 @@ Cu.import("resource://gre/modules/Servic
 
 var WebChannelBroker = Object.create({
   /**
    * Register a new channel that callbacks messages
    * based on proper origin and channel name
    *
    * @param channel {WebChannel}
    */
-  registerChannel: function(channel) {
+  registerChannel(channel) {
     if (!this._channelMap.has(channel)) {
       this._channelMap.set(channel);
     } else {
       Cu.reportError("Failed to register the channel. Channel already exists.");
     }
 
     // attach the global message listener if needed
     if (!this._messageListenerAttached) {
@@ -50,28 +50,28 @@ var WebChannelBroker = Object.create({
   /**
    * Unregister a channel
    *
    * @param channelToRemove {WebChannel}
    *        WebChannel to remove from the channel map
    *
    * Removes the specified channel from the channel map
    */
-  unregisterChannel: function(channelToRemove) {
+  unregisterChannel(channelToRemove) {
     if (!this._channelMap.delete(channelToRemove)) {
       Cu.reportError("Failed to unregister the channel. Channel not found.");
     }
   },
 
   /**
    * @param event {Event}
    *        Message Manager event
    * @private
    */
-  _listener: function(event) {
+  _listener(event) {
     let data = event.data;
     let sendingContext = {
       browser: event.target,
       eventTarget: event.objects.eventTarget,
       principal: event.principal,
     };
     // data must be a string except for a few legacy origins allowed by browser-content.js.
     if (typeof data == "string") {
@@ -124,29 +124,29 @@ var WebChannelBroker = Object.create({
    * @param id {String}
    *        The WebChannel id to include in the message
    * @param sendingContext {Object}
    *        Message sending context
    * @param [errorMsg] {String}
    *        Error message
    * @private
    */
-  _sendErrorEventToContent: function(id, sendingContext, errorNo, errorMsg) {
+  _sendErrorEventToContent(id, sendingContext, errorNo, errorMsg) {
     let { browser: targetBrowser, eventTarget, principal: targetPrincipal } = sendingContext;
 
     errorMsg = errorMsg || "Web Channel Broker error";
 
     if (targetBrowser && targetBrowser.messageManager) {
       targetBrowser.messageManager.sendAsyncMessage("WebChannelMessageToContent", {
-        id: id,
+        id,
         message: {
           errno: errorNo,
           error: errorMsg,
         },
-      }, { eventTarget: eventTarget }, targetPrincipal);
+      }, { eventTarget }, targetPrincipal);
     } else {
       Cu.reportError("Failed to send a WebChannel error. Target invalid.");
     }
     Cu.reportError(id.toString() + " error message. " + errorMsg);
   },
 });
 
 
@@ -244,32 +244,32 @@ this.WebChannel.prototype = {
    *                      The <browser> object that captured the
    *                      WebChannelMessageToChrome.
    *               @param sendingContext.eventTarget {EventTarget}
    *                      The <EventTarget> where the message was sent.
    *               @param sendingContext.principal {Principal}
    *                      The <Principal> of the EventTarget where the
    *                      message was sent.
    */
-  listen: function(callback) {
+  listen(callback) {
     if (this._deliverCallback) {
       throw new Error("Failed to listen. Listener already attached.");
     } else if (!callback) {
       throw new Error("Failed to listen. Callback argument missing.");
     } else {
       this._deliverCallback = callback;
       this._broker.registerChannel(this);
     }
   },
 
   /**
    * Resets the callback for messages on this channel
    * Removes the channel from the WebChannelBroker
    */
-  stopListening: function() {
+  stopListening() {
     this._broker.unregisterChannel(this);
     this._deliverCallback = null;
   },
 
   /**
    * Sends messages over the WebChannel id using the "WebChannelMessageToContent" event
    *
    * @param message {Object}
@@ -282,23 +282,23 @@ this.WebChannel.prototype = {
    *        @param target.principal {Principal}
    *               Principal of the target. Prevents messages from
    *               being dispatched to unexpected origins. The system principal
    *               can be specified to send to any target.
    *        @param [target.eventTarget] {EventTarget}
    *               Optional eventTarget within the browser, use to send to a
    *               specific element, e.g., an iframe.
    */
-  send: function(message, target) {
+  send(message, target) {
     let { browser, principal, eventTarget } = target;
 
     if (message && browser && browser.messageManager && principal) {
       browser.messageManager.sendAsyncMessage("WebChannelMessageToContent", {
         id: this.id,
-        message: message
+        message
       }, { eventTarget }, principal);
     } else if (!message) {
       Cu.reportError("Failed to send a WebChannel message. Message not set.");
     } else {
       Cu.reportError("Failed to send a WebChannel message. Target invalid.");
     }
   },
 
@@ -313,17 +313,17 @@ this.WebChannel.prototype = {
    *               The <browser> object that captured the
    *               WebChannelMessageToChrome.
    *        @param sendingContext.eventTarget {EventTarget}
    *               The <EventTarget> where the message was sent.
    *        @param sendingContext.principal {Principal}
    *               The <Principal> of the EventTarget where the message was sent.
    *
    */
-  deliver: function(data, sendingContext) {
+  deliver(data, sendingContext) {
     if (this._deliverCallback) {
       try {
         this._deliverCallback(data.id, data.message, sendingContext);
       } catch (ex) {
         this.send({
           errno: ERRNO_UNKNOWN_ERROR,
           error: ex.message ? ex.message : ERROR_UNKNOWN
         }, sendingContext);
--- a/toolkit/modules/WindowDraggingUtils.jsm
+++ b/toolkit/modules/WindowDraggingUtils.jsm
@@ -14,21 +14,21 @@ this.WindowDraggingElement = function Wi
   if (HAVE_CSS_WINDOW_DRAG_SUPPORT && !this.isPanel()) {
     return;
   }
 
   this._elem.addEventListener("mousedown", this, false);
 };
 
 WindowDraggingElement.prototype = {
-  mouseDownCheck: function(e) { return true; },
+  mouseDownCheck(e) { return true; },
   dragTags: ["box", "hbox", "vbox", "spacer", "label", "statusbarpanel", "stack",
              "toolbaritem", "toolbarseparator", "toolbarspring", "toolbarspacer",
              "radiogroup", "deck", "scrollbox", "arrowscrollbox", "tabs"],
-  shouldDrag: function(aEvent) {
+  shouldDrag(aEvent) {
     if (aEvent.button != 0 ||
         this._window.fullScreen ||
         !this.mouseDownCheck.call(this._elem, aEvent) ||
         aEvent.defaultPrevented)
       return false;
 
     let target = aEvent.originalTarget, parent = aEvent.originalTarget;
 
@@ -46,21 +46,21 @@ WindowDraggingElement.prototype = {
     }
     while (target != this._elem) {
       if (this.dragTags.indexOf(target.localName) == -1)
         return false;
       target = target.parentNode;
     }
     return true;
   },
-  isPanel : function() {
+  isPanel() {
     return this._elem instanceof Components.interfaces.nsIDOMXULElement &&
            this._elem.localName == "panel";
   },
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     let isPanel = this.isPanel();
     switch (aEvent.type) {
       case "mousedown":
         if (!this.shouldDrag(aEvent))
           return;
 
         if (/^gtk/i.test(AppConstants.MOZ_WIDGET_TOOLKIT)) {
           // On GTK, there is a toolkit-level function which handles
--- a/toolkit/modules/WindowsRegistry.jsm
+++ b/toolkit/modules/WindowsRegistry.jsm
@@ -18,17 +18,17 @@ var WindowsRegistry = {
    * @param aKey
    *        The key name.
    * @param [aRegistryNode=0]
    *        Optionally set to nsIWindowsRegKey.WOW64_64 (or nsIWindowsRegKey.WOW64_32)
    *        to access a 64-bit (32-bit) key from either a 32-bit or 64-bit application.
    * @return The key value or undefined if it doesn't exist.  If the key is
    *         a REG_MULTI_SZ, an array is returned.
    */
-  readRegKey: function(aRoot, aPath, aKey, aRegistryNode = 0) {
+  readRegKey(aRoot, aPath, aKey, aRegistryNode = 0) {
     const kRegMultiSz = 7;
     const kMode = Ci.nsIWindowsRegKey.ACCESS_READ | aRegistryNode;
     let registry = Cc["@mozilla.org/windows-registry-key;1"].
                    createInstance(Ci.nsIWindowsRegKey);
     try {
       registry.open(aRoot, aPath, kMode);
       if (registry.hasValue(aKey)) {
         let type = registry.getValueType(aKey);
@@ -61,17 +61,17 @@ var WindowsRegistry = {
    *        The registry path to the key.
    * @param aKey
    *        The key name.
    * @param [aRegistryNode=0]
    *        Optionally set to nsIWindowsRegKey.WOW64_64 (or nsIWindowsRegKey.WOW64_32)
    *        to access a 64-bit (32-bit) key from either a 32-bit or 64-bit application.
    * @return True if the key was removed or never existed, false otherwise.
    */
-  removeRegKey: function(aRoot, aPath, aKey, aRegistryNode = 0) {
+  removeRegKey(aRoot, aPath, aKey, aRegistryNode = 0) {
     let registry = Cc["@mozilla.org/windows-registry-key;1"].
                    createInstance(Ci.nsIWindowsRegKey);
     let result = false;
     try {
       let mode = Ci.nsIWindowsRegKey.ACCESS_QUERY_VALUE |
                  Ci.nsIWindowsRegKey.ACCESS_SET_VALUE |
                  aRegistryNode;
       registry.open(aRoot, aPath, mode);
--- a/toolkit/modules/secondscreen/RokuApp.jsm
+++ b/toolkit/modules/secondscreen/RokuApp.jsm
@@ -152,20 +152,20 @@ function RemoteMedia(url, listener) {
 
   this._inputStream = this._socket.openInputStream(0, 0, 0);
   this._pump = Cc["@mozilla.org/network/input-stream-pump;1"].createInstance(Ci.nsIInputStreamPump);
   this._pump.init(this._inputStream, -1, -1, 0, 0, true);
   this._pump.asyncRead(this, null);
 }
 
 RemoteMedia.prototype = {
-  onStartRequest: function(request, context) {
+  onStartRequest(request, context) {
   },
 
-  onDataAvailable: function(request, context, stream, offset, count) {
+  onDataAvailable(request, context, stream, offset, count) {
     this._scriptableStream.init(stream);
     let data = this._scriptableStream.read(count);
     if (!data) {
       return;
     }
 
     let msg = JSON.parse(data);
     if (this._status === msg._s) {
@@ -181,17 +181,17 @@ RemoteMedia.prototype = {
       }
 
       if ("onRemoteMediaStatus" in this._listener) {
         this._listener.onRemoteMediaStatus(this);
       }
     }
   },
 
-  onStopRequest: function(request, context, result) {
+  onStopRequest(request, context, result) {
     if (this._listener && "onRemoteMediaStop" in this._listener)
       this._listener.onRemoteMediaStop(this);
   },
 
   _sendMsg: function _sendMsg(data) {
     if (!data)
       return;
 
--- a/toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm
+++ b/toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm
@@ -54,26 +54,26 @@ var SimpleServiceDiscovery = {
   _services: new Map(),
   _searchSocket: null,
   _searchInterval: 0,
   _searchTimestamp: 0,
   _searchTimeout: Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer),
   _searchRepeat: Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer),
   _discoveryMethods: [],
 
-  _forceTrailingSlash: function(aURL) {
+  _forceTrailingSlash(aURL) {
     // Cleanup the URL to make it consistent across devices
     try {
       aURL = Services.io.newURI(aURL, null, null).spec;
     } catch (e) {}
     return aURL;
   },
 
   // nsIUDPSocketListener implementation
-  onPacketReceived: function(aSocket, aMessage) {
+  onPacketReceived(aSocket, aMessage) {
     // Listen for responses from specific devices. There could be more than one
     // available.
     let response = aMessage.data.split("\n");
     let service = {};
     response.forEach(function(row) {
       let name = row.toUpperCase();
       if (name.startsWith("LOCATION")) {
         service.location = row.substr(10).trim();
@@ -88,17 +88,17 @@ var SimpleServiceDiscovery = {
       // When we find a valid response, package up the service information
       // and pass it on.
       try {
         this._processService(service);
       } catch (e) {}
     }
   },
 
-  onStopListening: function(aSocket, aStatus) {
+  onStopListening(aSocket, aStatus) {
     // This is fired when the socket is closed expectedly or unexpectedly.
     // nsITimer.cancel() is a no-op if the timer is not active.
     this._searchTimeout.cancel();
     this._searchSocket = null;
   },
 
   // Start a search. Make it continuous by passing an interval (in milliseconds).
   // This will stop a current search loop because the timer resets itself.
@@ -113,17 +113,17 @@ var SimpleServiceDiscovery = {
     return existingSearchInterval;
   },
 
   // Stop the current continuous search
   stopSearch: function stopSearch() {
     this._searchRepeat.cancel();
   },
 
-  _usingLAN: function() {
+  _usingLAN() {
     let network = Cc["@mozilla.org/network/network-link-service;1"].getService(Ci.nsINetworkLinkService);
     return (network.linkType == Ci.nsINetworkLinkService.LINK_TYPE_WIFI ||
             network.linkType == Ci.nsINetworkLinkService.LINK_TYPE_ETHERNET ||
             network.linkType == Ci.nsINetworkLinkService.LINK_TYPE_UNKNOWN);
   },
 
   _search: function _search() {
     // If a search is already active, shut it down.
@@ -229,27 +229,27 @@ var SimpleServiceDiscovery = {
           this.removeService(service.uuid);
         }
       }
     }
 
     this._stopExternalDiscovery();
   },
 
-  getSupportedExtensions: function() {
+  getSupportedExtensions() {
     let extensions = [];
     this.services.forEach(function(service) {
         extensions = extensions.concat(service.extensions);
       }, this);
     return extensions.filter(function(extension, pos) {
       return extensions.indexOf(extension) == pos;
     });
   },
 
-  getSupportedMimeTypes: function() {
+  getSupportedMimeTypes() {
     let types = [];
     this.services.forEach(function(service) {
         types = types.concat(service.types);
       }, this);
     return types.filter(function(type, pos) {
       return types.indexOf(type) == pos;
     });
   },
@@ -371,65 +371,65 @@ var SimpleServiceDiscovery = {
       }
     }).bind(this), false);
 
     xhr.send(null);
   },
 
   // Add a service to the WeakMap, even if one already exists with this id.
   // Returns true if this succeeded or false if it failed
-  _addService: function(service) {
+  _addService(service) {
     // Filter out services that do not match the device filter
     if (!this._filterService(service)) {
       return false;
     }
 
     let device = this._devices.get(service.target);
     if (device && device.mirror) {
       service.mirror = true;
     }
     this._services.set(service.uuid, service);
     return true;
   },
 
-  addService: function(service) {
+  addService(service) {
     // Only add and notify if we don't already know about this service
     if (!this._services.has(service.uuid)) {
       if (!this._addService(service)) {
         return;
       }
       Services.obs.notifyObservers(null, EVENT_SERVICE_FOUND, service.uuid);
     }
 
     // Make sure we remember this service is not stale
     this._services.get(service.uuid).lastPing = this._searchTimestamp;
   },
 
-  removeService: function(uuid) {
+  removeService(uuid) {
     Services.obs.notifyObservers(null, EVENT_SERVICE_LOST, uuid);
     this._services.delete(uuid);
   },
 
-  updateService: function(service) {
+  updateService(service) {
     if (!this._addService(service)) {
       return;
     }
 
     // Make sure we remember this service is not stale
     this._services.get(service.uuid).lastPing = this._searchTimestamp;
   },
 
-  addExternalDiscovery: function(discovery) {
+  addExternalDiscovery(discovery) {
     this._discoveryMethods.push(discovery);
   },
 
-  _startExternalDiscovery: function() {
+  _startExternalDiscovery() {
     for (let discovery of this._discoveryMethods) {
       discovery.startDiscovery();
     }
   },
 
-  _stopExternalDiscovery: function() {
+  _stopExternalDiscovery() {
     for (let discovery of this._discoveryMethods) {
       discovery.stopDiscovery();
     }
   },
 }
--- a/toolkit/modules/sessionstore/FormData.jsm
+++ b/toolkit/modules/sessionstore/FormData.jsm
@@ -77,21 +77,21 @@ function isValidCCNumber(value) {
   return total % 10 == 0;
 }
 
 /**
  * The public API exported by this module that allows to collect
  * and restore form data for a document and its subframes.
  */
 this.FormData = Object.freeze({
-  collect: function(frame) {
+  collect(frame) {
     return FormDataInternal.collect(frame);
   },
 
-  restoreTree: function(root, data) {
+  restoreTree(root, data) {
     FormDataInternal.restoreTree(root, data);
   }
 });
 
 /**
  * This module's internal API.
  */
 var FormDataInternal = {
@@ -113,17 +113,17 @@ var FormDataInternal = {
    *     }
    *   }
    *
    * @param  doc
    *         DOMDocument instance to obtain form data for.
    * @return object
    *         Form data encoded in an object.
    */
-  collect: function({document: doc}) {
+  collect({document: doc}) {
     let formNodes = doc.evaluate(
       XPathGenerator.restorableFormNodes,
       doc,
       XPathGenerator.resolveNS,
       Ci.nsIDOMXPathResult.UNORDERED_NODE_ITERATOR_TYPE, null
     );
 
     let node;
@@ -227,17 +227,17 @@ var FormDataInternal = {
    * Restores form |data| for the given frame. The data is expected to be in
    * the same format that FormData.collect() returns.
    *
    * @param frame (DOMWindow)
    *        The frame to restore form data to.
    * @param data (object)
    *        An object holding form data.
    */
-  restore: function({document: doc}, data) {
+  restore({document: doc}, data) {
     // Don't restore any data for the given frame if the URL
     // stored in the form data doesn't match its current URL.
     if (!data.url || data.url != getDocumentURI(doc)) {
       return;
     }
 
     // For about:{sessionrestore,welcomeback} we saved the field as JSON to
     // avoid nested instances causing humongous sessionstore.js files.
@@ -270,17 +270,17 @@ var FormDataInternal = {
    *
    * @param data (object)
    *        A subset of the form data as collected by FormData.collect(). This
    *        is either data stored under "id" or under "xpath".
    * @param retrieve (function)
    *        The function used to retrieve the input field belonging to a key
    *        in the given |data| object.
    */
-  restoreManyInputValues: function(data, retrieve) {
+  restoreManyInputValues(data, retrieve) {
     for (let key of Object.keys(data)) {
       let input = retrieve(key);
       if (input) {
         this.restoreSingleInputValue(input, data[key]);
       }
     }
   },
 
@@ -288,17 +288,17 @@ var FormDataInternal = {
    * Restores a given form value to a given DOMNode and takes care of firing
    * the appropriate DOM event should the input's value change.
    *
    * @param  aNode
    *         DOMNode to set form value on.
    * @param  aValue
    *         Value to set form element to.
    */
-  restoreSingleInputValue: function(aNode, aValue) {
+  restoreSingleInputValue(aNode, aValue) {
     let eventType;
 
     if (typeof aValue == "string" && aNode.type != "file") {
       // Don't dispatch an input event if there is no change.
       if (aNode.value == aValue) {
         return;
       }
 
@@ -354,17 +354,17 @@ var FormDataInternal = {
   },
 
   /**
    * Dispatches an event of type |type| to the given |node|.
    *
    * @param node (DOMNode)
    * @param type (string)
    */
-  fireEvent: function(node, type) {
+  fireEvent(node, type) {
     let doc = node.ownerDocument;
     let event = doc.createEvent("UIEvents");
     event.initUIEvent(type, true, true, doc.defaultView, 0);
     node.dispatchEvent(event);
   },
 
   /**
    * Restores form data for the current frame hierarchy starting at |root|
@@ -382,17 +382,17 @@ var FormDataInternal = {
    *          formdata: {id: {input1: "value1"}},
    *          children: [
    *            {formdata: {id: {input2: "value2"}}},
    *            null,
    *            {formdata: {xpath: { ... }}, children: [ ... ]}
    *          ]
    *        }
    */
-  restoreTree: function(root, data) {
+  restoreTree(root, data) {
     // Don't restore any data for the root frame and its subframes if there
     // is a URL stored in the form data and it doesn't match its current URL.
     if (data.url && data.url != getDocumentURI(root.document)) {
       return;
     }
 
     if (data.url) {
       this.restore(root, data);
--- a/toolkit/modules/sessionstore/ScrollPosition.jsm
+++ b/toolkit/modules/sessionstore/ScrollPosition.jsm
@@ -32,17 +32,17 @@ var ScrollPositionInternal = {
    * Collects scroll position data for any given |frame| in the frame hierarchy.
    *
    * @param frame (DOMWindow)
    *
    * @return {scroll: "x,y"} e.g. {scroll: "100,200"}
    *         Returns null when there is no scroll data we want to store for the
    *         given |frame|.
    */
-  collect: function(frame) {
+  collect(frame) {
     let ifreq = frame.QueryInterface(Ci.nsIInterfaceRequestor);
     let utils = ifreq.getInterface(Ci.nsIDOMWindowUtils);
     let scrollX = {}, scrollY = {};
     utils.getScrollXY(false /* no layout flush */, scrollX, scrollY);
 
     if (scrollX.value || scrollY.value) {
       return {scroll: scrollX.value + "," + scrollY.value};
     }
@@ -51,17 +51,17 @@ var ScrollPositionInternal = {
   },
 
   /**
    * Restores scroll position data for any given |frame| in the frame hierarchy.
    *
    * @param frame (DOMWindow)
    * @param value (object, see collect())
    */
-  restore: function(frame, value) {
+  restore(frame, value) {
     let match;
 
     if (value && (match = /(\d+),(\d+)/.exec(value))) {
       frame.scrollTo(match[1], match[2]);
     }
   },
 
   /**
@@ -79,17 +79,17 @@ var ScrollPositionInternal = {
    *          scroll: "100,200",
    *          children: [
    *            {scroll: "100,200"},
    *            null,
    *            {scroll: "200,300", children: [ ... ]}
    *          ]
    *        }
    */
-  restoreTree: function(root, data) {
+  restoreTree(root, data) {
     if (data.hasOwnProperty("scroll")) {
       this.restore(root, data.scroll);
     }
 
     if (!data.hasOwnProperty("children")) {
       return;
     }
 
--- a/toolkit/modules/sessionstore/Utils.jsm
+++ b/toolkit/modules/sessionstore/Utils.jsm
@@ -13,34 +13,34 @@ const Ci = Components.interfaces;
 Cu.import("resource://gre/modules/Services.jsm", this);
 Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
 
 XPCOMUtils.defineLazyServiceGetter(this, "serializationHelper",
                                    "@mozilla.org/network/serialization-helper;1",
                                    "nsISerializationHelper");
 
 this.Utils = Object.freeze({
-  makeURI: function(url) {
+  makeURI(url) {
     return Services.io.newURI(url, null, null);
   },
 
-  makeInputStream: function(aString) {
+  makeInputStream(aString) {
     let stream = Cc["@mozilla.org/io/string-input-stream;1"].
                  createInstance(Ci.nsISupportsCString);
     stream.data = aString;
     return stream; // XPConnect will QI this to nsIInputStream for us.
   },
 
   /**
    * Returns true if the |url| passed in is part of the given root |domain|.
    * For example, if |url| is "www.mozilla.org", and we pass in |domain| as
    * "mozilla.org", this will return true. It would return false the other way
    * around.
    */
-  hasRootDomain: function(url, domain) {
+  hasRootDomain(url, domain) {
     let host;
 
     try {
       host = this.makeURI(url).host;
     } catch (e) {
       // The given URL probably doesn't have a host.
       return false;
     }
@@ -52,17 +52,17 @@ this.Utils = Object.freeze({
     if (host == domain)
       return true;
 
     let prevChar = host[index - 1];
     return (index == (host.length - domain.length)) &&
            (prevChar == "." || prevChar == "/");
   },
 
-  shallowCopy: function(obj) {
+  shallowCopy(obj) {
     let retval = {};
 
     for (let key of Object.keys(obj)) {
       retval[key] = obj[key];
     }
 
     return retval;
   },
--- a/toolkit/modules/tests/browser/browser_Deprecated.js
+++ b/toolkit/modules/tests/browser/browser_Deprecated.js
@@ -32,54 +32,54 @@ function deprecationFunctionCustomCallst
     getStack());
   return true;
 }
 
 var tests = [
 // Test deprecation warning without passing the callstack.
 {
   deprecatedFunction: basicDeprecatedFunction,
-  expectedObservation: function(aMessage) {
+  expectedObservation(aMessage) {
     testAMessage(aMessage);
     ok(aMessage.errorMessage.indexOf("basicDeprecatedFunction") > 0,
       "Callstack is correctly logged.");
   }
 },
 // Test a reported error when URL to documentation is not passed.
 {
-  deprecatedFunction: function() {
+  deprecatedFunction() {
     Deprecated.warning("this method is deprecated.");
     return true;
   },
-  expectedObservation: function(aMessage) {
+  expectedObservation(aMessage) {
     ok(aMessage.errorMessage.indexOf("must provide a URL") > 0,
       "Deprecation warning logged an empty URL argument.");
   }
 },
 // Test deprecation with a bogus callstack passed as an argument (it will be
 // replaced with the current call stack).
 {
   deprecatedFunction: deprecationFunctionBogusCallstack,
-  expectedObservation: function(aMessage) {
+  expectedObservation(aMessage) {
     testAMessage(aMessage);
     ok(aMessage.errorMessage.indexOf("deprecationFunctionBogusCallstack") > 0,
       "Callstack is correctly logged.");
   }
 },
 // When pref is unset Deprecated.warning should not log anything.
 {
   deprecatedFunction: basicDeprecatedFunction,
   expectedObservation: null,
   // Set pref to false.
   logWarnings: false
 },
 // Test deprecation with a valid custom callstack passed as an argument.
 {
   deprecatedFunction: deprecationFunctionCustomCallstack,
-  expectedObservation: function(aMessage) {
+  expectedObservation(aMessage) {
     testAMessage(aMessage);
     ok(aMessage.errorMessage.indexOf("deprecationFunctionCustomCallstack") > 0,
       "Callstack is correctly logged.");
   },
   // Set pref to true.
   logWarnings: true
 }];
 
@@ -117,17 +117,17 @@ function nextTest() {
 
   // Deprecation warnings will be logged only when the preference is set.
   if (typeof test.logWarnings !== "undefined") {
     Services.prefs.setBoolPref(PREF_DEPRECATION_WARNINGS, test.logWarnings);
   }
 
   // Create a console listener.
   let consoleListener = {
-    observe: function(aMessage) {
+    observe(aMessage) {
       // Ignore unexpected messages.
       if (!(aMessage instanceof Ci.nsIScriptError)) {
         return;
       }
       if (aMessage.errorMessage.indexOf("DEPRECATION WARNING: ") < 0 &&
           aMessage.errorMessage.indexOf("must provide a URL") < 0) {
         return;
       }
--- a/toolkit/modules/tests/browser/browser_Finder.js
+++ b/toolkit/modules/tests/browser/browser_Finder.js
@@ -7,20 +7,20 @@ var Ci = Components.interfaces;
 add_task(function* () {
   const url = "data:text/html;base64," +
               btoa("<body><iframe srcdoc=\"content\"/></iframe>" +
                    "<a href=\"http://test.com\">test link</a>");
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, url);
 
   let finder = tab.linkedBrowser.finder;
   let listener = {
-    onFindResult: function() {
+    onFindResult() {
       ok(false, "onFindResult callback wasn't replaced");
     },
-    onHighlightFinished: function() {
+    onHighlightFinished() {
       ok(false, "onHighlightFinished callback wasn't replaced");
     }
   };
   finder.addResultListener(listener);
 
   function waitForFind(which = "onFindResult") {
     return new Promise(resolve => {
       listener[which] = resolve;
--- a/toolkit/modules/tests/browser/browser_FinderHighlighter.js
+++ b/toolkit/modules/tests/browser/browser_FinderHighlighter.js
@@ -187,17 +187,17 @@ add_task(function* testModalResults() {
       rectCount: 2,
       insertCalls: [2, 4],
       removeCalls: [0, 1]
     }],
     ["their law might propagate their kind", {
       rectCount: 2,
       insertCalls: [5, 6],
       removeCalls: [4, 5],
-      extraTest: function(maskNode, outlineNode, rects) {
+      extraTest(maskNode, outlineNode, rects) {
         Assert.equal(outlineNode.getElementsByTagName("div").length, 2,
           "There should be multiple rects drawn");
       }
     }],
     ["ro", {
       rectCount: 41,
       insertCalls: [1, 4],
       removeCalls: [1, 3]
--- a/toolkit/modules/tests/browser/browser_Finder_hidden_textarea.js
+++ b/toolkit/modules/tests/browser/browser_Finder_hidden_textarea.js
@@ -8,17 +8,17 @@ add_task(function* test_bug1174036() {
     function* (browser) {
       // Hide the first textarea.
       yield ContentTask.spawn(browser, null, function() {
         content.document.getElementsByTagName("textarea")[0].style.display = "none";
       });
 
       let finder = browser.finder;
       let listener = {
-        onFindResult: function() {
+        onFindResult() {
           ok(false, "callback wasn't replaced");
         }
       };
       finder.addResultListener(listener);
 
       function waitForFind() {
         return new Promise(resolve => {
           listener.onFindResult = resolve;
--- a/toolkit/modules/tests/browser/browser_Geometry.js
+++ b/toolkit/modules/tests/browser/browser_Geometry.js
@@ -10,38 +10,38 @@ var Rect = tempScope.Rect;
 function test() {
   ok(Rect, "Rect class exists");
   for (var fname in tests) {
     tests[fname]();
   }
 }
 
 var tests = {
-  testGetDimensions: function() {
+  testGetDimensions() {
     let r = new Rect(5, 10, 100, 50);
     ok(r.left == 5, "rect has correct left value");
     ok(r.top == 10, "rect has correct top value");
     ok(r.right == 105, "rect has correct right value");
     ok(r.bottom == 60, "rect has correct bottom value");
     ok(r.width == 100, "rect has correct width value");
     ok(r.height == 50, "rect has correct height value");
     ok(r.x == 5, "rect has correct x value");
     ok(r.y == 10, "rect has correct y value");
   },
 
-  testIsEmpty: function() {
+  testIsEmpty() {
     let r = new Rect(0, 0, 0, 10);
     ok(r.isEmpty(), "rect with nonpositive width is empty");
     r = new Rect(0, 0, 10, 0);
     ok(r.isEmpty(), "rect with nonpositive height is empty");
     r = new Rect(0, 0, 10, 10);
     ok(!r.isEmpty(), "rect with positive dimensions is not empty");
   },
 
-  testRestrictTo: function() {
+  testRestrictTo() {
     let r1 = new Rect(10, 10, 100, 100);
     let r2 = new Rect(50, 50, 100, 100);
     r1.restrictTo(r2);
     ok(r1.equals(new Rect(50, 50, 60, 60)), "intersection is non-empty");
 
     r1 = new Rect(10, 10, 100, 100);
     r2 = new Rect(120, 120, 100, 100);
     r1.restrictTo(r2);
@@ -53,17 +53,17 @@ var tests = {
     ok(r1.isEmpty(), "intersection of rect and empty is empty");
 
     r1 = new Rect(0, 0, 0, 0);
     r2 = new Rect(0, 0, 0, 0);
     r1.restrictTo(r2);
     ok(r1.isEmpty(), "intersection of empty and empty is empty");
   },
 
-  testExpandToContain: function() {
+  testExpandToContain() {
     let r1 = new Rect(10, 10, 100, 100);
     let r2 = new Rect(50, 50, 100, 100);
     r1.expandToContain(r2);
     ok(r1.equals(new Rect(10, 10, 140, 140)), "correct expandToContain on intersecting rectangles");
 
     r1 = new Rect(10, 10, 100, 100);
     r2 = new Rect(120, 120, 100, 100);
     r1.expandToContain(r2);
--- a/toolkit/modules/tests/browser/browser_InlineSpellChecker.js
+++ b/toolkit/modules/tests/browser/browser_InlineSpellChecker.js
@@ -7,17 +7,17 @@ function test() {
   for (var fname in tests) {
     tests[fname]();
   }
 }
 
 var tests = {
   // Test various possible dictionary name to ensure they display as expected.
   // XXX: This only works for the 'en-US' locale, as the testing involves localized output.
-  testDictionaryDisplayNames: function() {
+  testDictionaryDisplayNames() {
     let isc = new InlineSpellChecker();
 
     // Check non-well-formed language tag.
     is(isc.getDictionaryDisplayName("-invalid-"), "-invalid-", "'-invalid-' should display as '-invalid-'");
 
     // XXX: It isn't clear how we'd ideally want to display variant subtags.
 
     // Check valid language subtag.
--- a/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
+++ b/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
@@ -639,31 +639,31 @@ function xhr(inputStatus, inputResponse,
   this._ontimeout = null;
   this._url = null;
   this._method = null;
   this._timeout = 0;
   this._notified = false;
   this._options = options || {};
 }
 xhr.prototype = {
-  overrideMimeType: function(aMimetype) { },
-  setRequestHeader: function(aHeader, aValue) { },
+  overrideMimeType(aMimetype) { },
+  setRequestHeader(aHeader, aValue) { },
   status: null,
   channel: { set notificationCallbacks(aVal) { } },
-  open: function(aMethod, aUrl) {
+  open(aMethod, aUrl) {
     this.channel.originalURI = Services.io.newURI(aUrl, null, null);
     this._method = aMethod; this._url = aUrl;
   },
-  abort: function() {
+  abort() {
     this._dropRequest = true;
     this._notify(["abort", "loadend"]);
   },
   responseXML: null,
   responseText: null,
-  send: function(aBody) {
+  send(aBody) {
     do_execute_soon(function() {
       try {
         if (this._options.dropRequest) {
           if (this._timeout > 0 && this._options.timeout) {
             this._notify(["timeout", "loadend"]);
           }
           return;
         }
@@ -695,17 +695,17 @@ xhr.prototype = {
   get onerror() { return this._onerror; },
   set onload(aValue) { this._onload = makeHandler(aValue); },
   get onload() { return this._onload; },
   set onloadend(aValue) { this._onloadend = makeHandler(aValue); },
   get onloadend() { return this._onloadend; },
   set ontimeout(aValue) { this._ontimeout = makeHandler(aValue); },
   get ontimeout() { return this._ontimeout; },
   set timeout(aValue) { this._timeout = aValue; },
-  _notify: function(events) {
+  _notify(events) {
     if (this._notified) {
       return;
     }
     this._notified = true;
     for (let item of events) {
       let k = "on" + item;
       if (this[k]) {
         do_print("Notifying " + item);
@@ -714,35 +714,35 @@ xhr.prototype = {
           type: item,
         };
         this[k](e);
       } else {
         do_print("Notifying " + item + ", but there are no listeners");
       }
     }
   },
-  addEventListener: function(aEvent, aValue, aCapturing) {
+  addEventListener(aEvent, aValue, aCapturing) {
     eval("this._on" + aEvent + " = aValue");
   },
   flags: Ci.nsIClassInfo.SINGLETON,
   getScriptableHelper: () => null,
-  getInterfaces: function(aCount) {
+  getInterfaces(aCount) {
     let interfaces = [Ci.nsISupports];
     aCount.value = interfaces.length;
     return interfaces;
   },
   classDescription: "XMLHttpRequest",
   contractID: "@mozilla.org/xmlextras/xmlhttprequest;1",
   classID: Components.ID("{c9b37f43-4278-4304-a5e0-600991ab08cb}"),
-  createInstance: function(aOuter, aIID) {
+  createInstance(aOuter, aIID) {
     if (aOuter == null)
       return this.QueryInterface(aIID);
     throw Cr.NS_ERROR_NO_AGGREGATION;
   },
-  QueryInterface: function(aIID) {
+  QueryInterface(aIID) {
     if (aIID.equals(Ci.nsIClassInfo) ||
         aIID.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
   get wrappedJSObject() { return this; }
 };
 
--- a/toolkit/modules/tests/xpcshell/test_Http.js
+++ b/toolkit/modules/tests/xpcshell/test_Http.js
@@ -63,93 +63,93 @@ function getDataChecker(aExpectedMethod,
     aResponse.setHeader("Content-Type", "application/json");
     aResponse.write("Success!");
   }
 }
 
 add_test(function test_successCallback() {
   do_test_pending();
   let options = {
-    onLoad: function(aResponse) {
+    onLoad(aResponse) {
       do_check_eq(aResponse, "Success!");
       do_test_finished();
       run_next_test();
     },
-    onError: function(e) {
+    onError(e) {
       do_check_true(false);
       do_test_finished();
       run_next_test();
     }
   }
   httpRequest(kSuccessUrl, options);
 });
 
 add_test(function test_errorCallback() {
   do_test_pending();
   let options = {
-    onSuccess: function(aResponse) {
+    onSuccess(aResponse) {
       do_check_true(false);
       do_test_finished();
       run_next_test();
     },
-    onError: function(e, aResponse) {
+    onError(e, aResponse) {
       do_check_eq(e, "404 - Not Found");
       do_test_finished();
       run_next_test();
     }
   }
   httpRequest(kBaseUrl + "/failure", options);
 });
 
 add_test(function test_PostData() {
   do_test_pending();
   let options = {
-    onLoad: function(aResponse) {
+    onLoad(aResponse) {
       do_check_eq(aResponse, "Success!");
       do_test_finished();
       run_next_test();
     },
-    onError: function(e) {
+    onError(e) {
       do_check_true(false);
       do_test_finished();
       run_next_test();
     },
     postData: kPostDataSent
   }
   httpRequest(kPostUrl, options);
 });
 
 add_test(function test_PutData() {
   do_test_pending();
   let options = {
     method: "PUT",
-    onLoad: function(aResponse) {
+    onLoad(aResponse) {
       do_check_eq(aResponse, "Success!");
       do_test_finished();
       run_next_test();
     },
-    onError: function(e) {
+    onError(e) {
       do_check_true(false);
       do_test_finished();
       run_next_test();
     },
     postData: kPutDataSent
   }
   httpRequest(kPutUrl, options);
 });
 
 add_test(function test_GetData() {
   do_test_pending();
   let options = {
-    onLoad: function(aResponse) {
+    onLoad(aResponse) {
       do_check_eq(aResponse, "Success!");
       do_test_finished();
       run_next_test();
     },
-    onError: function(e) {
+    onError(e) {
       do_check_true(false);
       do_test_finished();
       run_next_test();
     },
     postData: null
   }
   httpRequest(kGetUrl, options);
 });
@@ -170,22 +170,22 @@ add_test(function test_OptionalParameter
  * Makes sure that httpRequest API allows setting a custom Content-Type header
  * for POST requests when data is a string.
  */
 add_test(function test_CustomContentTypeOnPost() {
   do_test_pending();
 
   // Preparing the request parameters.
   let options = {
-    onLoad: function(aResponse) {
+    onLoad(aResponse) {
       do_check_eq(aResponse, "Success!");
       do_test_finished();
       run_next_test();
     },
-    onError: function(e) {
+    onError(e) {
       do_check_true(false);
       do_test_finished();
       run_next_test();
     },
     postData: kJsonPostData,
     // Setting a custom Content-Type header.
     headers: [['Content-Type', "application/json"]]
   }
@@ -199,30 +199,30 @@ add_test(function test_CustomContentType
  * MIME type.
  */
 add_test(function test_OverrideMimeType() {
   do_test_pending();
 
   // Preparing the request parameters.
   const kMimeType = 'text/xml; charset=UTF-8';
   let options = {
-    onLoad: function(aResponse, xhr) {
+    onLoad(aResponse, xhr) {
       do_check_eq(aResponse, "Success!");
 
       // Set the expected MIME-type.
       let reportedMimeType = xhr.getResponseHeader("Content-Type");
       do_check_neq(reportedMimeType, kMimeType);
 
       // responseXML should not be not null if overriding mime type succeeded.
       do_check_true(xhr.responseXML != null);
 
       do_test_finished();
       run_next_test();
     },
-    onError: function(e) {
+    onError(e) {
       do_check_true(false);
       do_test_finished();
       run_next_test();
     }
   };
 
   // Firing the request.
   let xhr = httpRequest(kGetUrl, options);
--- a/toolkit/modules/tests/xpcshell/test_Log.js
+++ b/toolkit/modules/tests/xpcshell/test_Log.js
@@ -443,19 +443,21 @@ add_task(function* log_message_with_para
   str = formatMessage(null, err);
   do_check_true(str.startsWith('[Exception... "test exception"'));
   // If the text is null and 'params' is a String object, the message is exactly that string.
   str = formatMessage(null, new String("String in place of params"));
   do_check_eq(str, "String in place of params");
 
   // We use object.valueOf() internally; make sure a broken valueOf() method
   // doesn't cause the logger to fail.
+  /* eslint-disable object-shorthand */
   let vOf = {a: 1, valueOf: function() {throw "oh noes valueOf"}};
   do_check_eq(formatMessage("Broken valueOf ${}", vOf),
               'Broken valueOf ({a:1, valueOf:(function () {throw "oh noes valueOf"})})');
+  /* eslint-enable object-shorthand */
 
   // Test edge cases of bad data to formatter:
   // If 'params' is not an object, format it as a basic type.
   do_check_eq(formatMessage("non-object no subst", 1),
               'non-object no subst: 1');
   do_check_eq(formatMessage("non-object all subst ${}", 2),
               'non-object all subst 2');
   do_check_eq(formatMessage("false no subst", false),
--- a/toolkit/modules/tests/xpcshell/test_NewTabUtils.js
+++ b/toolkit/modules/tests/xpcshell/test_NewTabUtils.js
@@ -321,26 +321,26 @@ add_task(function* extractSite() {
 });
 
 function TestProvider(getLinksFn) {
   this.getLinks = getLinksFn;
   this._observers = new Set();
 }
 
 TestProvider.prototype = {
-  addObserver: function(observer) {
+  addObserver(observer) {
     this._observers.add(observer);
   },
-  notifyLinkChanged: function(link, index = -1, deleted = false) {
+  notifyLinkChanged(link, index = -1, deleted = false) {
     this._notifyObservers("onLinkChanged", link, index, deleted);
   },
-  notifyManyLinksChanged: function() {
+  notifyManyLinksChanged() {
     this._notifyObservers("onManyLinksChanged");
   },
-  _notifyObservers: function() {
+  _notifyObservers() {
     let observerMethodName = arguments[0];
     let args = Array.prototype.slice.call(arguments, 1);
     args.unshift(this);
     for (let obs of this._observers) {
       if (obs[observerMethodName])
         obs[observerMethodName].apply(NewTabUtils.links, args);
     }
   },
@@ -367,12 +367,12 @@ function makeLinks(frecRangeStart, frecR
   }
   return links;
 }
 
 function makeLink(frecency) {
   return {
     url: "http://example" + frecency + ".com/",
     title: "My frecency is " + frecency,
-    frecency: frecency,
+    frecency,
     lastVisitDate: 0,
   };
 }
--- a/toolkit/modules/tests/xpcshell/test_ObjectUtils.js
+++ b/toolkit/modules/tests/xpcshell/test_ObjectUtils.js
@@ -54,17 +54,17 @@ add_task(function* test_deepEqual() {
   a1.a = "test";
   a1.b = true;
   a2.b = true;
   a2.a = "test";
   Assert.ok(!deepEqual(Object.keys(a1), Object.keys(a2)));
   Assert.ok(deepEqual(a1, a2));
 
   let nbRoot = {
-    toString: function() { return this.first + " " + this.last; }
+    toString() { return this.first + " " + this.last; }
   };
 
   function nameBuilder(first, last) {
     this.first = first;
     this.last = last;
     return this;
   }
   nameBuilder.prototype = nbRoot;
--- a/toolkit/modules/tests/xpcshell/test_Preferences.js
+++ b/toolkit/modules/tests/xpcshell/test_Preferences.js
@@ -225,17 +225,17 @@ add_test(function test_observe_prefs_fun
   Preferences.reset("test_observe_prefs_function");
 
   run_next_test();
 });
 
 add_test(function test_observe_prefs_object() {
   let observer = {
     observed: false,
-    observe: function() {
+    observe() {
       this.observed = !this.observed;
     }
   };
 
   Preferences.observe("test_observe_prefs_object", observer.observe, observer);
   Preferences.set("test_observe_prefs_object", "something");
   do_check_true(observer.observed);
 
@@ -247,17 +247,17 @@ add_test(function test_observe_prefs_obj
   Preferences.reset("test_observe_prefs_object");
 
   run_next_test();
 });
 
 add_test(function test_observe_prefs_nsIObserver() {
   let observer = {
     observed: false,
-    observe: function(subject, topic, data) {
+    observe(subject, topic, data) {
       this.observed = !this.observed;
       do_check_true(subject instanceof Ci.nsIPrefBranch);
       do_check_eq(topic, "nsPref:changed");
       do_check_eq(data, "test_observe_prefs_nsIObserver");
     }
   };
 
   Preferences.observe("test_observe_prefs_nsIObserver", observer);
--- a/toolkit/modules/tests/xpcshell/test_Promise.js
+++ b/toolkit/modules/tests/xpcshell/test_Promise.js
@@ -1008,17 +1008,17 @@ function wait_for_uncaught(aMustAppear, 
     // include the closure doing the actual rejection.
     return {mustFind: ["test_rejection_closure"], error: undefined};
   };
   let make_error_rejection = function make_error_rejection() {
     let salt = (Math.random() * ( Math.pow(2, 24) - 1 ));
     let error = new Error("This is an uncaught error " + salt);
     return {
       mustFind: [error.message, error.fileName, error.lineNumber, error.stack],
-      error: error
+      error
     };
   };
   let make_exception_rejection = function make_exception_rejection() {
     let salt = (Math.random() * ( Math.pow(2, 24) - 1 ));
     let exn = new Components.Exception("This is an uncaught exception " + salt,
                                        Components.results.NS_ERROR_NOT_AVAILABLE);
     return {
       mustFind: [exn.message, exn.filename, exn.lineNumber, exn.location.toString()],
--- a/toolkit/modules/tests/xpcshell/test_client_id.js
+++ b/toolkit/modules/tests/xpcshell/test_client_id.js
@@ -24,17 +24,17 @@ add_task(function* () {
   const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
   const invalidIDs = [-1, 0.5, "INVALID-UUID", true, "", "3d1e1560-682a-4043-8cf2-aaaaaaaaaaaZ"];
   const PREF_CACHED_CLIENTID = "toolkit.telemetry.cachedClientID";
 
   yield OS.File.makeDir(fhrDir);
 
   // Check that we are importing the FHR client ID.
   let clientID = CommonUtils.generateUUID();
-  yield CommonUtils.writeJSON({clientID: clientID}, fhrPath);
+  yield CommonUtils.writeJSON({clientID}, fhrPath);
   Assert.equal(clientID, yield ClientID.getClientID());
 
   // We should persist the ID in DRS now and not pick up a differing ID from FHR.
   yield ClientID._reset();
   yield CommonUtils.writeJSON({clientID: CommonUtils.generateUUID()}, fhrPath);
   Assert.equal(clientID, yield ClientID.getClientID());
 
   // We should be guarded against broken FHR data.
@@ -55,17 +55,17 @@ add_task(function* () {
   Assert.equal(typeof(clientID), 'string');
   Assert.ok(uuidRegex.test(clientID));
 
   // We should be guarded against broken DRS data too and fall back to loading
   // the FHR ID.
   for (let invalidID of invalidIDs) {
     yield ClientID._reset();
     clientID = CommonUtils.generateUUID();
-    yield CommonUtils.writeJSON({clientID: clientID}, fhrPath);
+    yield CommonUtils.writeJSON({clientID}, fhrPath);
     yield CommonUtils.writeJSON({clientID: invalidID}, drsPath);
     Assert.equal(clientID, yield ClientID.getClientID());
   }
 
   // We should be guarded against invalid DRS json too.
   yield ClientID._reset();
   yield OS.File.remove(fhrPath);
   yield OS.File.writeAtomic(drsPath, "abcd", {encoding: "utf-8", tmpPath: drsPath + ".tmp"});
--- a/toolkit/modules/tests/xpcshell/test_session_recorder.js
+++ b/toolkit/modules/tests/xpcshell/test_session_recorder.js
@@ -96,17 +96,17 @@ add_task(function* test_current_availabi
   Object.defineProperty(recorder, "STARTUP_RETRY_INTERVAL_MS", {
     value: 100,
   });
 
   let oldRecord = recorder.recordStartupFields;
   let recordCount = 0;
 
   Object.defineProperty(recorder, "recordStartupFields", {
-    value: function() {
+    value() {
       recordCount++;
       return oldRecord.call(recorder);
     }
   });
 
   do_check_null(recorder._timer);
   recorder.onStartup();
   do_check_eq(recordCount, 1);
--- a/toolkit/modules/tests/xpcshell/test_sqlite.js
+++ b/toolkit/modules/tests/xpcshell/test_sqlite.js
@@ -21,33 +21,33 @@ Cu.import("resource://services-common/as
 
 function sleep(ms) {
   let deferred = Promise.defer();
 
   let timer = Cc["@mozilla.org/timer;1"]
                 .createInstance(Ci.nsITimer);
 
   timer.initWithCallback({
-    notify: function() {
+    notify() {
       deferred.resolve();
     },
   }, 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)  {
   Cu.getGlobalForObject(Sqlite).Debugging.failTestsOnAutoClose = enabled;
 }
 
 function getConnection(dbName, extraOptions = {}) {
   let path = dbName + ".sqlite";
-  let options = {path: path};
+  let options = {path};
   for (let [k, v] of Object.entries(extraOptions)) {
     options[k] = v;
   }
 
   return Sqlite.openConnection(options);
 }
 
 function* getDummyDatabase(name, extraOptions = {}) {
@@ -94,17 +94,17 @@ function run_test() {
 add_task(function* test_open_normal() {
   let c = yield Sqlite.openConnection({path: "test_open_normal.sqlite"});
   yield c.close();
 });
 
 add_task(function* test_open_unshared() {
   let path = OS.Path.join(OS.Constants.Path.profileDir, "test_open_unshared.sqlite");
 
-  let c = yield Sqlite.openConnection({path: path, sharedMemoryCache: false});
+  let c = yield Sqlite.openConnection({path, sharedMemoryCache: false});
   yield c.close();
 });
 
 add_task(function* test_get_dummy_database() {
   let db = yield getDummyDatabase("get_dummy_database");
 
   do_check_eq(typeof(db), "object");
   yield db.close();
@@ -491,17 +491,17 @@ add_task(function* test_shrink_memory() 
 });
 
 add_task(function* test_no_shrink_on_init() {
   let c = yield getConnection("no_shrink_on_init",
                               {shrinkMemoryOnConnectionIdleMS: 200});
 
   let count = 0;
   Object.defineProperty(c._connectionData, "shrinkMemory", {
-    value: function() {
+    value() {
       count++;
     },
   });
 
   // We should not shrink until a statement has been executed.
   yield sleep(220);
   do_check_eq(count, 0);
 
@@ -517,17 +517,17 @@ add_task(function* test_idle_shrink_fire
                                  {shrinkMemoryOnConnectionIdleMS: 200});
   c._connectionData._clearIdleShrinkTimer();
 
   let oldShrink = c._connectionData.shrinkMemory;
   let shrinkPromises = [];
 
   let count = 0;
   Object.defineProperty(c._connectionData, "shrinkMemory", {
-    value: function() {
+    value() {
       count++;
       let promise = oldShrink.call(c._connectionData);
       shrinkPromises.push(promise);
       return promise;
     },
   });
 
   // We reset the idle shrink timer after monkeypatching because otherwise the
@@ -561,17 +561,17 @@ add_task(function* test_idle_shrink_rese
 
   c._connectionData._clearIdleShrinkTimer();
 
   let oldShrink = c._connectionData.shrinkMemory;
   let shrinkPromises = [];
   let count = 0;
 
   Object.defineProperty(c._connectionData, "shrinkMemory", {
-    value: function() {
+    value() {
       count++;
       let promise = oldShrink.call(c._connectionData);
       shrinkPromises.push(promise);
       return promise;
     },
   });
 
   let now = new Date();
@@ -832,49 +832,49 @@ add_task(function* test_direct() {
   params.addParams(two);
 
   print("Beginning transaction.");
   let begin = db.createAsyncStatement("BEGIN DEFERRED TRANSACTION");
   let end = db.createAsyncStatement("COMMIT TRANSACTION");
 
   let deferred = Promise.defer();
   begin.executeAsync({
-    handleCompletion: function(reason) {
+    handleCompletion(reason) {
       deferred.resolve();
     }
   });
   yield deferred.promise;
 
   statement.bindParameters(params);
 
   deferred = Promise.defer();
   print("Executing async.");
   statement.executeAsync({
-    handleResult: function(resultSet) {
+    handleResult(resultSet) {
     },
 
-    handleError:  function(error) {
+    handleError(error) {
       print("Error when executing SQL (" + error.result + "): " +
             error.message);
       print("Original error: " + error.error);
       errors.push(error);
       deferred.reject();
     },
 
-    handleCompletion: function(reason) {
+    handleCompletion(reason) {
       print("Completed.");
       deferred.resolve();
     }
   });
 
   yield deferred.promise;
 
   deferred = Promise.defer();
   end.executeAsync({
-    handleCompletion: function(reason) {
+    handleCompletion(reason) {
       deferred.resolve();
     }
   });
   yield deferred.promise;
 
   statement.finalize();
   begin.finalize();
   end.finalize();
@@ -936,17 +936,17 @@ add_task(function* test_clone() {
   // Closing order should not matter.
   yield c.close();
   yield clone.close();
 });
 
 // Test clone(readOnly) method.
 add_task(function* test_readOnly_clone() {
   let path = OS.Path.join(OS.Constants.Path.profileDir, "test_readOnly_clone.sqlite");
-  let c = yield Sqlite.openConnection({path: path, sharedMemoryCache: false});
+  let c = yield Sqlite.openConnection({path, sharedMemoryCache: false});
 
   let clone = yield c.clone(true);
   // Just check that it works.
   yield clone.execute("SELECT 1");
   // But should not be able to write.
 
   yield Assert.rejects(clone.execute("CREATE TABLE test (id INTEGER PRIMARY KEY)"),
                        /readonly/);
@@ -997,17 +997,17 @@ add_task(function* test_closed_by_witnes
 
 add_task(function* test_warning_message_on_finalization() {
   failTestsOnAutoClose(false);
   let c = yield getDummyDatabase("warning_message_on_finalization");
   let identifier = c._connectionData._identifier;
   let deferred = Promise.defer();
 
   let listener = {
-    observe: function(msg) {
+    observe(msg) {
       let messageText = msg.message;
       // Make sure the message starts with a warning containing the
       // connection identifier
       if (messageText.indexOf("Warning: Sqlite connection '" + identifier + "'") !== -1) {
         deferred.resolve();
       }
     }
   };
@@ -1023,17 +1023,17 @@ add_task(function* test_warning_message_
   failTestsOnAutoClose(true);
 });
 
 add_task(function* test_error_message_on_unknown_finalization() {
   failTestsOnAutoClose(false);
   let deferred = Promise.defer();
 
   let listener = {
-    observe: function(msg) {
+    observe(msg) {
       let messageText = msg.message;
       if (messageText.indexOf("Error: Attempt to finalize unknown " +
                               "Sqlite connection: foo") !== -1) {
         deferred.resolve();
       }
     }
   };
   Services.console.registerListener(listener);
@@ -1045,17 +1045,17 @@ add_task(function* test_error_message_on
 });
 
 add_task(function* test_forget_witness_on_close() {
   let c = yield getDummyDatabase("forget_witness_on_close");
 
   let forgetCalled = false;
   let oldWitness = c._witness;
   c._witness = {
-    forget: function() {
+    forget() {
       forgetCalled = true;
       oldWitness.forget();
     },
   };
 
   yield c.close();
   // After close, witness should have forgotten the connection
   do_check_true(forgetCalled);
--- a/toolkit/modules/tests/xpcshell/test_sqlite_shutdown.js
+++ b/toolkit/modules/tests/xpcshell/test_sqlite_shutdown.js
@@ -12,17 +12,17 @@ Cu.import("resource://gre/modules/osfile
 Cu.import("resource://gre/modules/Sqlite.jsm");
 Cu.import("resource://gre/modules/Task.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/AsyncShutdown.jsm");
 Cu.import("resource://gre/modules/Promise.jsm");
 
 function getConnection(dbName, extraOptions = {}) {
   let path = dbName + ".sqlite";
-  let options = {path: path};
+  let options = {path};
   for (let [k, v] of Object.entries(extraOptions)) {
     options[k] = v;
   }
 
   return Sqlite.openConnection(options);
 }
 
 function* getDummyDatabase(name, extraOptions = {}) {
@@ -44,17 +44,17 @@ function* getDummyDatabase(name, extraOp
 
 function sleep(ms) {
   let deferred = Promise.defer();
 
   let timer = Cc["@mozilla.org/timer;1"]
                 .createInstance(Ci.nsITimer);
 
   timer.initWithCallback({
-    notify: function() {
+    notify() {
       deferred.resolve();
     },
   }, ms, timer.TYPE_ONE_SHOT);
 
   return deferred.promise;
 }
 
 function run_test() {
--- a/toolkit/modules/tests/xpcshell/test_web_channel.js
+++ b/toolkit/modules/tests/xpcshell/test_web_channel.js
@@ -11,22 +11,22 @@ Cu.import("resource://gre/modules/WebCha
 const ERROR_ID_ORIGIN_REQUIRED = "WebChannel id and originOrPermission are required.";
 const VALID_WEB_CHANNEL_ID = "id";
 const URL_STRING = "http://example.com";
 const VALID_WEB_CHANNEL_ORIGIN = Services.io.newURI(URL_STRING, null, null);
 const TEST_PERMISSION_NAME = "test-webchannel-permissions";
 
 var MockWebChannelBroker = {
   _channelMap: new Map(),
-  registerChannel: function(channel) {
+  registerChannel(channel) {
     if (!this._channelMap.has(channel)) {
       this._channelMap.set(channel);
     }
   },
-  unregisterChannel: function(channelToRemove) {
+  unregisterChannel(channelToRemove) {
     this._channelMap.delete(channelToRemove)
   }
 };
 
 function run_test() {
   run_next_test();
 }
 
--- a/toolkit/modules/tests/xpcshell/test_web_channel_broker.js
+++ b/toolkit/modules/tests/xpcshell/test_web_channel_broker.js
@@ -53,17 +53,17 @@ add_test(function test_web_channel_broke
  */
 add_task(function test_web_channel_broker_listener() {
   return new Promise((resolve, reject) => {
     var channel = {
       id: VALID_WEB_CHANNEL_ID,
       _originCheckCallback: requestPrincipal => {
         return VALID_WEB_CHANNEL_ORIGIN.prePath === requestPrincipal.origin;
       },
-      deliver: function(data, sender) {
+      deliver(data, sender) {
         do_check_eq(data.id, VALID_WEB_CHANNEL_ID);
         do_check_eq(data.message.command, "hello");
         do_check_neq(sender, undefined);
         WebChannelBroker.unregisterChannel(channel);
         resolve();
       }
     };
 
--- a/toolkit/mozapps/downloads/DownloadLastDir.jsm
+++ b/toolkit/mozapps/downloads/DownloadLastDir.jsm
@@ -30,24 +30,24 @@ const nsIFile = Components.interfaces.ns
 
 this.EXPORTED_SYMBOLS = [ "DownloadLastDir" ];
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 var observer = {
-  QueryInterface: function(aIID) {
+  QueryInterface(aIID) {
     if (aIID.equals(Components.interfaces.nsIObserver) ||
         aIID.equals(Components.interfaces.nsISupports) ||
         aIID.equals(Components.interfaces.nsISupportsWeakReference))
       return this;
     throw Components.results.NS_NOINTERFACE;
   },
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "last-pb-context-exited":
         gDownloadLastDirFile = null;
         break;
       case "browser:purge-session-history":
         gDownloadLastDirFile = null;
         if (Services.prefs.prefHasUserValue(LAST_DIR_PREF))
           Services.prefs.clearUserPref(LAST_DIR_PREF);
@@ -104,22 +104,22 @@ this.DownloadLastDir = function Download
 
 DownloadLastDir.prototype = {
   isPrivate: function DownloadLastDir_isPrivate() {
     return this.fakeContext.usePrivateBrowsing;
   },
   // compat shims
   get file() { return this._getLastFile(); },
   set file(val) { this.setFile(null, val); },
-  cleanupPrivateFile: function() {
+  cleanupPrivateFile() {
     gDownloadLastDirFile = null;
   },
   // This function is now deprecated as it uses the sync nsIContentPrefService
   // interface. New consumers should use the getFileAsync function.
-  getFile: function(aURI) {
+  getFile(aURI) {
     let Deprecated = Components.utils.import("resource://gre/modules/Deprecated.jsm", {}).Deprecated;
     Deprecated.warning("DownloadLastDir.getFile is deprecated. Please use getFileAsync instead.",
                        "https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/DownloadLastDir.jsm",
                        Components.stack.caller);
 
     if (aURI && isContentPrefEnabled()) {
       let lastDir = Services.contentPrefs.getPref(aURI, LAST_DIR_PREF, this.fakeContext);
       if (lastDir) {
@@ -127,56 +127,56 @@ DownloadLastDir.prototype = {
                                     .createInstance(Components.interfaces.nsIFile);
         lastDirFile.initWithPath(lastDir);
         return lastDirFile;
       }
     }
     return this._getLastFile();
   },
 
-  _getLastFile: function() {
+  _getLastFile() {
     if (gDownloadLastDirFile && !gDownloadLastDirFile.exists())
       gDownloadLastDirFile = null;
 
     if (this.isPrivate()) {
       if (!gDownloadLastDirFile)
         gDownloadLastDirFile = readLastDirPref();
       return gDownloadLastDirFile;
     }
     return readLastDirPref();
   },
 
-  getFileAsync: function(aURI, aCallback) {
+  getFileAsync(aURI, aCallback) {
     let plainPrefFile = this._getLastFile();
     if (!aURI || !isContentPrefEnabled()) {
       Services.tm.mainThread.dispatch(() => aCallback(plainPrefFile),
                                       Components.interfaces.nsIThread.DISPATCH_NORMAL);
       return;
     }
 
     let uri = aURI instanceof Components.interfaces.nsIURI ? aURI.spec : aURI;
     let cps2 = Components.classes["@mozilla.org/content-pref/service;1"]
                          .getService(Components.interfaces.nsIContentPrefService2);
     let result = null;
     cps2.getByDomainAndName(uri, LAST_DIR_PREF, this.fakeContext, {
       handleResult: aResult => result = aResult,
-      handleCompletion: function(aReason) {
+      handleCompletion(aReason) {
         let file = plainPrefFile;
         if (aReason == Components.interfaces.nsIContentPrefCallback2.COMPLETE_OK &&
            result instanceof Components.interfaces.nsIContentPref) {
           file = Components.classes["@mozilla.org/file/local;1"]
                            .createInstance(Components.interfaces.nsIFile);
           file.initWithPath(result.value);
         }
         aCallback(file);
       }
     });
   },
 
-  setFile: function(aURI, aFile) {
+  setFile(aURI, aFile) {
     if (aURI && isContentPrefEnabled()) {
       let uri = aURI instanceof Components.interfaces.nsIURI ? aURI.spec : aURI;
       let cps2 = Components.classes["@mozilla.org/content-pref/service;1"]
                            .getService(Components.interfaces.nsIContentPrefService2);
       if (aFile instanceof Components.interfaces.nsIFile)
         cps2.set(uri, LAST_DIR_PREF, aFile.path, this.fakeContext);
       else
         cps2.removeByDomainAndName(uri, LAST_DIR_PREF, this.fakeContext);
--- a/toolkit/mozapps/extensions/AddonManager.jsm
+++ b/toolkit/mozapps/extensions/AddonManager.jsm
@@ -140,23 +140,23 @@ function providerName(aProvider) {
 }
 
 /**
  * Preference listener which listens for a change in the
  * "extensions.logging.enabled" preference and changes the logging level of the
  * parent 'addons' level logger accordingly.
  */
 var PrefObserver = {
-    init: function() {
+    init() {
       Services.prefs.addObserver(PREF_LOGGING_ENABLED, this, false);
       Services.obs.addObserver(this, "xpcom-shutdown", false);
       this.observe(null, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, PREF_LOGGING_ENABLED);
     },
 
-    observe: function(aSubject, aTopic, aData) {
+    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) {
         let debugLogEnabled = false;
         try {
           debugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED);
@@ -388,77 +388,77 @@ function BrowserListener(aBrowser, aInst
 }
 
 BrowserListener.prototype = {
   browser: null,
   installs: null,
   installCount: null,
   registered: false,
 
-  unregister: function() {
+  unregister() {
     if (!this.registered)
       return;
     this.registered = false;
 
     Services.obs.removeObserver(this, "message-manager-close");
     // The browser may have already been detached
     if (this.browser.removeProgressListener)
       this.browser.removeProgressListener(this);
 
     for (let install of this.installs)
       install.removeListener(this);
     this.installs = null;
   },
 
-  cancelInstalls: function() {
+  cancelInstalls() {
     for (let install of this.installs) {
       try {
         install.cancel();
       }
       catch (e) {
         // Some installs may have already failed or been cancelled, ignore these
       }
     }
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     if (subject != this.browser.messageManager)
       return;
 
     // The browser's message manager has closed and so the browser is
     // going away, cancel all installs
     this.cancelInstalls();
   },
 
-  onLocationChange: function(webProgress, request, location) {
+  onLocationChange(webProgress, request, location) {
     if (this.browser.contentPrincipal && this.principal.subsumes(this.browser.contentPrincipal))
       return;
 
     // The browser has navigated to a new origin so cancel all installs
     this.cancelInstalls();
   },
 
-  onDownloadCancelled: function(install) {
+  onDownloadCancelled(install) {
     // Don't need to hear more events from this install
     install.removeListener(this);
 
     // Once all installs have ended unregister everything
     if (--this.installCount == 0)
       this.unregister();
   },
 
-  onDownloadFailed: function(install) {
+  onDownloadFailed(install) {
     this.onDownloadCancelled(install);
   },
 
-  onInstallFailed: function(install) {
+  onInstallFailed(install) {
     this.onDownloadCancelled(install);
   },
 
-  onInstallEnded: function(install) {
+  onInstallEnded(install) {
     this.onDownloadCancelled(install);
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference,
                                          Ci.nsIWebProgressListener,
                                          Ci.nsIObserver])
 };
 
@@ -475,17 +475,17 @@ function AddonAuthor(aName, aURL) {
   this.url = aURL;
 }
 
 AddonAuthor.prototype = {
   name: null,
   url: null,
 
   // Returns the author's name, defaulting to the empty string
-  toString: function() {
+  toString() {
     return this.name || "";
   }
 }
 
 /**
  * This represents an screenshot for an add-on
  *
  * @param  aURL
@@ -519,17 +519,17 @@ AddonScreenshot.prototype = {
   width: null,
   height: null,
   thumbnailURL: null,
   thumbnailWidth: null,
   thumbnailHeight: null,
   caption: null,
 
   // Returns the screenshot URL, defaulting to the empty string
-  toString: function() {
+  toString() {
     return this.url || "";
   }
 }
 
 
 /**
  * This represents a compatibility override for an addon.
  *
@@ -668,21 +668,21 @@ var AddonManagerInternal = {
   providers: new Set(),
   providerShutdowns: new Map(),
   types: {},
   startupChanges: {},
   // Store telemetry details per addon provider
   telemetryDetails: {},
   upgradeListeners: new Map(),
 
-  recordTimestamp: function(name, value) {
+  recordTimestamp(name, value) {
     this.TelemetryTimestamps.add(name, value);
   },
 
-  validateBlocklist: function() {
+  validateBlocklist() {
     let appBlocklist = FileUtils.getFile(KEY_APPDIR, [FILE_BLOCKLIST]);
 
     // If there is no application shipped blocklist then there is nothing to do
     if (!appBlocklist.exists())
       return;
 
     let profileBlocklist = FileUtils.getFile(KEY_PROFILEDIR, [FILE_BLOCKLIST]);
 
@@ -807,17 +807,17 @@ var AddonManagerInternal = {
     }
     return undefined;
   },
 
   /**
    * Initializes the AddonManager, loading any known providers and initializing
    * them.
    */
-  startup: function() {
+  startup() {
     try {
       if (gStarted)
         return;
 
       this.recordTimestamp("AMI_startup_begin");
 
       // clear this for xpcshell test restarts
       for (let provider in this.telemetryDetails)
@@ -985,17 +985,17 @@ var AddonManagerInternal = {
   /**
    * Registers a new AddonProvider.
    *
    * @param  aProvider
    *         The provider to register
    * @param  aTypes
    *         An optional array of add-on types
    */
-  registerProvider: function(aProvider, aTypes) {
+  registerProvider(aProvider, aTypes) {
     if (!aProvider || typeof aProvider != "object")
       throw Components.Exception("aProvider must be specified",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     if (aTypes && !Array.isArray(aTypes))
       throw Components.Exception("aTypes must be an array or null",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -1005,17 +1005,17 @@ var AddonManagerInternal = {
       for (let type of aTypes) {
         if (!(type.id in this.types)) {
           if (!VALID_TYPES_REGEXP.test(type.id)) {
             logger.warn("Ignoring invalid type " + type.id);
             return;
           }
 
           this.types[type.id] = {
-            type: type,
+            type,
             providers: [aProvider]
           };
 
           let typeListeners = this.typeListeners.slice(0);
           for (let listener of typeListeners)
             safeCall(() => listener.onTypeAdded(type));
         }
         else {
@@ -1034,17 +1034,17 @@ var AddonManagerInternal = {
    * Unregisters an AddonProvider.
    *
    * @param  aProvider
    *         The provider to unregister
    * @return Whatever the provider's 'shutdown' method returns (if anything).
    *         For providers that have async shutdown methods returning Promises,
    *         the caller should wait for that Promise to resolve.
    */
-  unregisterProvider: function(aProvider) {
+  unregisterProvider(aProvider) {
     if (!aProvider || typeof aProvider != "object")
       throw Components.Exception("aProvider must be specified",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     this.providers.delete(aProvider);
     // The test harness will unregister XPIProvider *after* shutdown, which is
     // after the provider will have been moved from providers to
     // pendingProviders.
@@ -1086,17 +1086,17 @@ var AddonManagerInternal = {
    * it won't be used by any of the AddonManager APIs. markProviderSafe()
    * allows a provider to mark itself as safe during its startup; this can be
    * useful if the provider wants to perform tasks that block startup, which
    * happen after its required initialization tasks and therefore when the
    * provider is in a safe state.
    *
    * @param aProvider Provider object to mark safe
    */
-  markProviderSafe: function(aProvider) {
+  markProviderSafe(aProvider) {
     if (!gStarted) {
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
     }
 
     if (!aProvider || typeof aProvider != "object") {
       throw Components.Exception("aProvider must be specified",
                                  Cr.NS_ERROR_INVALID_ARG);
@@ -1116,17 +1116,17 @@ var AddonManagerInternal = {
    * method parameter are passed to the provider's method.
    * WARNING: Do not use for asynchronous calls; callProviders() does not
    * invoke callbacks if provider methods throw synchronous exceptions.
    *
    * @param  aMethod
    *         The method name to call
    * @see    callProvider
    */
-  callProviders: function(aMethod, ...aArgs) {
+  callProviders(aMethod, ...aArgs) {
     if (!aMethod || typeof aMethod != "string")
       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)
@@ -1215,17 +1215,17 @@ var AddonManagerInternal = {
     gStartupComplete = false;
     gShutdownBarrier = null;
     gShutdownInProgress = false;
     if (savedError) {
       throw savedError;
     }
   }),
 
-  requestPlugins: function({ target: port }) {
+  requestPlugins({ target: port }) {
     // Lists all the properties that plugins.html needs
     const NEEDED_PROPS = ["name", "pluginLibraries", "pluginFullpath", "version",
                           "isActive", "blocklistState", "description",
                           "pluginMimeTypes"];
     function filterProperties(plugin) {
       let filtered = {};
       for (let prop of NEEDED_PROPS) {
         filtered[prop] = plugin[prop];
@@ -1238,17 +1238,17 @@ var AddonManagerInternal = {
     });
   },
 
   /**
    * Notified when a preference we're interested in has changed.
    *
    * @see nsIObserver
    */
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aData) {
       case PREF_EM_CHECK_COMPATIBILITY: {
         let oldValue = gCheckCompatibility;
         try {
           gCheckCompatibility = Services.prefs.getBoolPref(PREF_EM_CHECK_COMPATIBILITY);
         } catch (e) {
           gCheckCompatibility = true;
         }
@@ -1332,17 +1332,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: function(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);
@@ -1403,17 +1403,17 @@ var AddonManagerInternal = {
   },
 
   /**
    * Performs a background update check by starting an update for all add-ons
    * that can be updated.
    * @return Promise{null} Resolves when the background update check is complete
    *                       (the resulting addon installations may still be in progress).
    */
-  backgroundUpdateCheck: function() {
+  backgroundUpdateCheck() {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     let buPromise = Task.spawn(function*() {
       let hotfixID = this.hotfixID;
 
       let appUpdateEnabled = Services.prefs.getBoolPref(PREF_APP_UPDATE_ENABLED) &&
@@ -1442,17 +1442,17 @@ var AddonManagerInternal = {
           if (addon.id == hotfixID) {
             continue;
           }
 
           // Check all add-ons for updates so that any compatibility updates will
           // be applied
           updates.push(new Promise((resolve, reject) => {
             addon.findUpdates({
-              onUpdateAvailable: function(aAddon, aInstall) {
+              onUpdateAvailable(aAddon, aInstall) {
                 // Start installing updates when the add-on can be updated and
                 // background updates should be applied.
                 logger.debug("Found update for add-on ${id}", aAddon);
                 if (aAddon.permissions & AddonManager.PERM_CAN_UPGRADE &&
                     AddonManager.shouldAutoUpdate(aAddon)) {
                   // XXX we really should resolve when this install is done,
                   // not when update-available check completes, no?
                   logger.debug(`Starting upgrade install of ${aAddon.id}`);
@@ -1507,17 +1507,17 @@ var AddonManagerInternal = {
         if (update) {
           if (Services.vc.compare(hotfixVersion, update.version) < 0) {
             logger.debug("Downloading hotfix version " + update.version);
             let aInstall = yield AddonManagerInternal.getInstallForURL(
                 update.updateURL, "application/x-xpinstall", update.updateHash,
                 null, null, update.version);
 
             aInstall.addListener({
-              onDownloadEnded: function(aInstall) {
+              onDownloadEnded(aInstall) {
                 if (aInstall.addon.id != hotfixID) {
                   logger.warn("The downloaded hotfix add-on did not have the " +
                               "expected ID and so will not be installed.");
                   aInstall.cancel();
                   return;
                 }
 
                 // If XPIProvider has reported the hotfix as properly signed then
@@ -1540,23 +1540,23 @@ var AddonManagerInternal = {
                 }
                 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: function(aInstall) {
+              onInstallEnded(aInstall) {
                 // Remember the last successfully installed version.
                 Services.prefs.setCharPref(PREF_EM_HOTFIX_LASTVERSION,
                                            aInstall.version);
               },
 
-              onInstallCancelled: function(aInstall) {
+              onInstallCancelled(aInstall) {
                 // Revert to the previous version if the installation was
                 // cancelled.
                 Services.prefs.setCharPref(PREF_EM_HOTFIX_LASTVERSION,
                                            hotfixVersion);
               }
             });
 
             aInstall.install();
@@ -1590,17 +1590,17 @@ var AddonManagerInternal = {
    *
    * @param  aType
    *         The type of change as a string. Providers can define their own
    *         types of changes or use the existing defined STARTUP_CHANGE_*
    *         constants
    * @param  aID
    *         The ID of the add-on
    */
-  addStartupChange: function(aType, aID) {
+  addStartupChange(aType, aID) {
     if (!aType || typeof aType != "string")
       throw Components.Exception("aType must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     if (!aID || typeof aID != "string")
       throw Components.Exception("aID must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -1620,17 +1620,17 @@ var AddonManagerInternal = {
   /**
    * Removes a startup change for an add-on.
    *
    * @param  aType
    *         The type of change
    * @param  aID
    *         The ID of the add-on
    */
-  removeStartupChange: function(aType, aID) {
+  removeStartupChange(aType, aID) {
     if (!aType || typeof aType != "string")
       throw Components.Exception("aType must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     if (!aID || typeof aID != "string")
       throw Components.Exception("aID must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -1645,17 +1645,17 @@ var AddonManagerInternal = {
 
   /**
    * Calls all registered AddonManagerListeners with an event. Any parameters
    * after the method parameter are passed to the listener.
    *
    * @param  aMethod
    *         The method on the listeners to call
    */
-  callManagerListeners: function(aMethod, ...aArgs) {
+  callManagerListeners(aMethod, ...aArgs) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (!aMethod || typeof aMethod != "string")
       throw Components.Exception("aMethod must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -1676,17 +1676,17 @@ var AddonManagerInternal = {
    * the extraListeners parameter are passed to the listener.
    *
    * @param  aMethod
    *         The method on the listeners to call
    * @param  aExtraListeners
    *         An optional array of extra InstallListeners to also call
    * @return false if any of the listeners returned false, true otherwise
    */
-  callInstallListeners: function(aMethod,
+  callInstallListeners(aMethod,
                                  aExtraListeners, ...aArgs) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (!aMethod || typeof aMethod != "string")
       throw Components.Exception("aMethod must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
@@ -1718,17 +1718,17 @@ var AddonManagerInternal = {
 
   /**
    * Calls all registered AddonListeners with an event. Any parameters after
    * the method parameter are passed to the listener.
    *
    * @param  aMethod
    *         The method on the listeners to call
    */
-  callAddonListeners: function(aMethod, ...aArgs) {
+  callAddonListeners(aMethod, ...aArgs) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (!aMethod || typeof aMethod != "string")
       throw Components.Exception("aMethod must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -1752,17 +1752,17 @@ var AddonManagerInternal = {
    * @param  aID
    *         The ID of the enabled add-on
    * @param  aType
    *         The type of the enabled add-on
    * @param  aPendingRestart
    *         A boolean indicating if the change will only take place the next
    *         time the application is restarted
    */
-  notifyAddonChanged: function(aID, aType, aPendingRestart) {
+  notifyAddonChanged(aID, aType, aPendingRestart) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (aID && typeof aID != "string")
       throw Components.Exception("aID must be a string or null",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -1789,29 +1789,29 @@ var AddonManagerInternal = {
     }
   },
 
   /**
    * Notifies all providers they need to update the appDisabled property for
    * their add-ons in response to an application change such as a blocklist
    * update.
    */
-  updateAddonAppDisabledStates: function() {
+  updateAddonAppDisabledStates() {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     this.callProviders("updateAddonAppDisabledStates");
   },
 
   /**
    * Notifies all providers that the repository has updated its data for
    * installed add-ons.
    */
-  updateAddonRepositoryData: function() {
+  updateAddonRepositoryData() {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     return Task.spawn(function*() {
       for (let provider of this.providers) {
         yield promiseCallProvider(provider, "updateAddonRepositoryData");
       }
@@ -1835,17 +1835,17 @@ var AddonManagerInternal = {
    * @param  aIcons
    *         Optional placeholder icons while the add-on is being downloaded
    * @param  aVersion
    *         An optional placeholder version while the add-on is being downloaded
    * @param  aBrowser
    *         An optional <browser> element for download permissions prompts.
    * @throws if the aUrl, aCallback or aMimetype arguments are not specified
    */
-  getInstallForURL: function(aUrl, aMimetype, aHash, aName,
+  getInstallForURL(aUrl, aMimetype, aHash, aName,
                              aIcons, aVersion, aBrowser) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (!aUrl || typeof aUrl != "string")
       throw Components.Exception("aURL must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
@@ -1895,17 +1895,17 @@ var AddonManagerInternal = {
    * Asynchronously gets an AddonInstall for an nsIFile.
    *
    * @param  aFile
    *         The nsIFile where the add-on is located
    * @param  aMimetype
    *         An optional mimetype hint for the add-on
    * @throws if the aFile or aCallback arguments are not specified
    */
-  getInstallForFile: function(aFile, aMimetype) {
+  getInstallForFile(aFile, aMimetype) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (!(aFile instanceof Ci.nsIFile))
       throw Components.Exception("aFile must be a nsIFile",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -1929,17 +1929,17 @@ var AddonManagerInternal = {
   /**
    * Asynchronously gets all current AddonInstalls optionally limiting to a list
    * of types.
    *
    * @param  aTypes
    *         An optional array of types to retrieve. Each type is a string name
    * @throws If the aCallback argument is not specified
    */
-  getInstallsByTypes: function(aTypes) {
+  getInstallsByTypes(aTypes) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (aTypes && !Array.isArray(aTypes))
       throw Components.Exception("aTypes must be an array or null",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -1956,17 +1956,17 @@ var AddonManagerInternal = {
 
       return installs;
     }.bind(this));
   },
 
   /**
    * Asynchronously gets all current AddonInstalls.
    */
-  getAllInstalls: function() {
+  getAllInstalls() {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     return this.getInstallsByTypes(null);
   },
 
   /**
@@ -1976,17 +1976,17 @@ var AddonManagerInternal = {
    * add-on, such as Javascript compartments, XUL windows, XBL bindings, etc.
    * but do not include URIs from meta data, such as the add-on homepage.
    *
    * @param  aURI
    *         nsIURI to map to an addon id
    * @return string containing the Addon ID or null
    * @see    amIAddonManager.mapURIToAddonID
    */
-  mapURIToAddonID: function(aURI) {
+  mapURIToAddonID(aURI) {
     if (!(aURI instanceof Ci.nsIURI)) {
       throw Components.Exception("aURI is not a nsIURI",
                                  Cr.NS_ERROR_INVALID_ARG);
     }
 
     // Try all providers
     let providers = [...this.providers];
     for (let provider of providers) {
@@ -2001,17 +2001,17 @@ var AddonManagerInternal = {
 
   /**
    * Checks whether installation is enabled for a particular mimetype.
    *
    * @param  aMimetype
    *         The mimetype to check
    * @return true if installation is enabled for the mimetype
    */
-  isInstallEnabled: function(aMimetype) {
+  isInstallEnabled(aMimetype) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (!aMimetype || typeof aMimetype != "string")
       throw Components.Exception("aMimetype must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -2029,17 +2029,17 @@ var AddonManagerInternal = {
    * given mimetype.
    *
    * @param  aMimetype
    *         The mimetype of the add-on
    * @param  aInstallingPrincipal
    *         The nsIPrincipal that initiated the install
    * @return true if the source is allowed to install this mimetype
    */
-  isInstallAllowed: function(aMimetype, aInstallingPrincipal) {
+  isInstallAllowed(aMimetype, aInstallingPrincipal) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (!aMimetype || typeof aMimetype != "string")
       throw Components.Exception("aMimetype must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -2064,17 +2064,17 @@ var AddonManagerInternal = {
    *         The mimetype of add-ons being installed
    * @param  aBrowser
    *         The optional browser element that started the installs
    * @param  aInstallingPrincipal
    *         The nsIPrincipal that initiated the install
    * @param  aInstalls
    *         The array of AddonInstalls to be installed
    */
-  installAddonsFromWebpage: function(aMimetype, aBrowser,
+  installAddonsFromWebpage(aMimetype, aBrowser,
                                      aInstallingPrincipal, aInstalls) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (!aMimetype || typeof aMimetype != "string")
       throw Components.Exception("aMimetype must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
@@ -2163,33 +2163,33 @@ var AddonManagerInternal = {
   },
 
   /**
    * Adds a new InstallListener if the listener is not already registered.
    *
    * @param  aListener
    *         The InstallListener to add
    */
-  addInstallListener: function(aListener) {
+  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; }))
       this.installListeners.push(aListener);
   },
 
   /**
    * Removes an InstallListener if the listener is registered.
    *
    * @param  aListener
    *         The InstallListener to remove
    */
-  removeInstallListener: function(aListener) {
+  removeInstallListener(aListener) {
     if (!aListener || typeof aListener != "object")
       throw Components.Exception("aListener must be a InstallListener object",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     let pos = 0;
     while (pos < this.installListeners.length) {
       if (this.installListeners[pos] == aListener)
         this.installListeners.splice(pos, 1);
@@ -2201,17 +2201,17 @@ var AddonManagerInternal = {
    * Adds new or overrides existing UpgradeListener.
    *
    * @param  aInstanceID
    *         The instance ID of an addon to register a listener for.
    * @param  aCallback
    *         The callback to invoke when updates are available for this addon.
    * @throws if there is no addon matching the instanceID
    */
-  addUpgradeListener: function(aInstanceID, aCallback) {
+  addUpgradeListener(aInstanceID, aCallback) {
    if (!aInstanceID || typeof aInstanceID != "symbol")
      throw Components.Exception("aInstanceID must be a symbol",
                                 Cr.NS_ERROR_INVALID_ARG);
 
   if (!aCallback || typeof aCallback != "function")
     throw Components.Exception("aCallback must be a function",
                                Cr.NS_ERROR_INVALID_ARG);
 
@@ -2226,17 +2226,17 @@ var AddonManagerInternal = {
   },
 
   /**
    * Removes an UpgradeListener if the listener is registered.
    *
    * @param  aInstanceID
    *         The instance ID of the addon to remove
    */
-  removeUpgradeListener: function(aInstanceID) {
+  removeUpgradeListener(aInstanceID) {
     if (!aInstanceID || typeof aInstanceID != "symbol")
       throw Components.Exception("aInstanceID must be a symbol",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     this.getAddonByInstanceID(aInstanceID).then(addon => {
       if (!addon) {
         throw Error("No addon for instanceID:", aInstanceID.toString());
       }
@@ -2251,30 +2251,30 @@ var AddonManagerInternal = {
   /**
    * Installs a temporary add-on from a local file or directory.
    * @param  aFile
    *         An nsIFile for the file or directory of the add-on to be
    *         temporarily installed.
    * @return a Promise that rejects if the add-on is not a valid restartless
    *         add-on or if the same ID is already temporarily installed.
    */
-  installTemporaryAddon: function(aFile) {
+  installTemporaryAddon(aFile) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (!(aFile instanceof Ci.nsIFile))
       throw Components.Exception("aFile must be a nsIFile",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     return AddonManagerInternal._getProviderByName("XPIProvider")
                                .installTemporaryAddon(aFile);
   },
 
-  installAddonFromSources: function(aFile) {
+  installAddonFromSources(aFile) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (!(aFile instanceof Ci.nsIFile))
       throw Components.Exception("aFile must be a nsIFile",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -2287,17 +2287,17 @@ var AddonManagerInternal = {
    * @param aInstanceID
    *        An Addon Instance ID symbol
    * @return {Promise}
    * @resolves The found Addon or null if no such add-on exists.
    * @rejects  Never
    * @throws if the aInstanceID argument is not specified
    *         or the AddonManager is not initialized
    */
-   getAddonByInstanceID: function(aInstanceID) {
+   getAddonByInstanceID(aInstanceID) {
      if (!gStarted)
        throw Components.Exception("AddonManager is not initialized",
                                   Cr.NS_ERROR_NOT_INITIALIZED);
 
      if (!aInstanceID || typeof aInstanceID != "symbol")
        throw Components.Exception("aInstanceID must be a Symbol()",
                                   Cr.NS_ERROR_INVALID_ARG);
 
@@ -2320,17 +2320,17 @@ var AddonManagerInternal = {
    *         list of icon size and icon URL, or an object having an iconURL
    *         and icon64URL property.
    * @param  aSize
    *         Ideal icon size in pixels
    * @param  aWindow
    *         Optional window object for determining the correct scale.
    * @return {String} The absolute URL of the icon or null if the addon doesn't have icons
    */
-  getPreferredIconURL: function(aAddon, aSize, aWindow = undefined) {
+  getPreferredIconURL(aAddon, aSize, aWindow = undefined) {
     if (aWindow && aWindow.devicePixelRatio) {
       aSize *= aWindow.devicePixelRatio;
     }
 
     let icons = aAddon.icons;
 
     // certain addon-types only have iconURLs
     if (!icons) {
@@ -2384,17 +2384,17 @@ var AddonManagerInternal = {
    *
    * @param  aID
    *         The ID of the add-on to retrieve
    * @return {Promise}
    * @resolves The found Addon or null if no such add-on exists.
    * @rejects  Never
    * @throws if the aID argument is not specified
    */
-  getAddonByID: function(aID) {
+  getAddonByID(aID) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (!aID || typeof aID != "string")
       throw Components.Exception("aID must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -2407,17 +2407,17 @@ var AddonManagerInternal = {
 
   /**
    * Asynchronously get an add-on with a specific Sync GUID.
    *
    * @param  aGUID
    *         String GUID of add-on to retrieve
    * @throws if the aGUID argument is not specified
    */
-  getAddonBySyncGUID: function(aGUID) {
+  getAddonBySyncGUID(aGUID) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (!aGUID || typeof aGUID != "string")
       throw Components.Exception("aGUID must be a non-empty string",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -2439,17 +2439,17 @@ var AddonManagerInternal = {
    *
    * @param  aIDs
    *         The array of IDs to retrieve
    * @return {Promise}
    * @resolves The array of found add-ons.
    * @rejects  Never
    * @throws if the aIDs argument is not specified
    */
-  getAddonsByIDs: function(aIDs) {
+  getAddonsByIDs(aIDs) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (!Array.isArray(aIDs))
       throw Components.Exception("aIDs must be an array",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -2458,17 +2458,17 @@ var AddonManagerInternal = {
   },
 
   /**
    * Asynchronously gets add-ons of specific types.
    *
    * @param  aTypes
    *         An optional array of types to retrieve. Each type is a string name
    */
-  getAddonsByTypes: function(aTypes) {
+  getAddonsByTypes(aTypes) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (aTypes && !Array.isArray(aTypes))
       throw Components.Exception("aTypes must be an array or null",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -2485,32 +2485,32 @@ var AddonManagerInternal = {
 
       return addons;
     }.bind(this));
   },
 
   /**
    * Asynchronously gets all installed add-ons.
    */
-  getAllAddons: function() {
+  getAllAddons() {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     return this.getAddonsByTypes(null);
   },
 
   /**
    * Asynchronously gets add-ons that have operations waiting for an application
    * restart to complete.
    *
    * @param  aTypes
    *         An optional array of types to retrieve. Each type is a string name
    */
-  getAddonsWithOperationsByTypes: function(aTypes) {
+  getAddonsWithOperationsByTypes(aTypes) {
     if (!gStarted)
       throw Components.Exception("AddonManager is not initialized",
                                  Cr.NS_ERROR_NOT_INITIALIZED);
 
     if (aTypes && !Array.isArray(aTypes))
       throw Components.Exception("aTypes must be an array or null",
                                  Cr.NS_ERROR_INVALID_ARG);
 
@@ -2530,32 +2530,32 @@ var AddonManagerInternal = {
   },
 
   /**
    * Adds a new AddonManagerListener if the listener is not already registered.
    *
    * @param  aListener
    *         The listener to add
    */
-  addManagerListener: function(aListener) {
+  addManagerListener(aListener) {
     if (!aListener || typeof aListener != "object")
       throw Components.Exception("aListener must be an AddonManagerListener object",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     if (!this.managerListeners.some(i => i == aListener))
       this.managerListeners.push(aListener);
   },
 
   /**
    * Removes an AddonManagerListener if the listener is registered.
    *
    * @param  aListener
    *         The listener to remove
    */
-  removeManagerListener: function(aListener) {
+  removeManagerListener(aListener) {
     if (!aListener || typeof aListener != "object")
       throw Components.Exception("aListener must be an AddonManagerListener object",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     let pos = 0;
     while (pos < this.managerListeners.length) {
       if (this.managerListeners[pos] == aListener)
         this.managerListeners.splice(pos, 1);
@@ -2565,32 +2565,32 @@ var AddonManagerInternal = {
   },
 
   /**
    * Adds a new AddonListener if the listener is not already registered.
    *
    * @param  aListener
    *         The AddonListener to add
    */
-  addAddonListener: function(aListener) {
+  addAddonListener(aListener) {
     if (!aListener || typeof aListener != "object")
       throw Components.Exception("aListener must be an AddonListener object",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     if (!this.addonListeners.some(i => i == aListener))
       this.addonListeners.push(aListener);
   },
 
   /**
    * Removes an AddonListener if the listener is registered.
    *
    * @param  aListener
    *         The AddonListener to remove
    */
-  removeAddonListener: function(aListener) {
+  removeAddonListener(aListener) {
     if (!aListener || typeof aListener != "object")
       throw Components.Exception("aListener must be an AddonListener object",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     let pos = 0;
     while (pos < this.addonListeners.length) {
       if (this.addonListeners[pos] == aListener)
         this.addonListeners.splice(pos, 1);
@@ -2600,32 +2600,32 @@ var AddonManagerInternal = {
   },
 
   /**
    * Adds a new TypeListener if the listener is not already registered.
    *
    * @param  aListener
    *         The TypeListener to add
    */
-  addTypeListener: function(aListener) {
+  addTypeListener(aListener) {
     if (!aListener || typeof aListener != "object")
       throw Components.Exception("aListener must be a TypeListener object",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     if (!this.typeListeners.some(i => i == aListener))
       this.typeListeners.push(aListener);
   },
 
   /**
    * Removes an TypeListener if the listener is registered.
    *
    * @param  aListener
    *         The TypeListener to remove
    */
-  removeTypeListener: function(aListener) {
+  removeTypeListener(aListener) {
     if (!aListener || typeof aListener != "object")
       throw Components.Exception("aListener must be a TypeListener object",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     let pos = 0;
     while (pos < this.typeListeners.length) {
       if (this.typeListeners[pos] == aListener)
         this.typeListeners.splice(pos, 1);
@@ -2914,33 +2914,33 @@ var AddonManagerInternal = {
 
 /**
  * Should not be used outside of core Mozilla code. This is a private API for
  * the startup and platform integration code to use. Refer to the methods on
  * AddonManagerInternal for documentation however note that these methods are
  * subject to change at any time.
  */
 this.AddonManagerPrivate = {
-  startup: function() {
+  startup() {
     AddonManagerInternal.startup();
   },
 
-  registerProvider: function(aProvider, aTypes) {
+  registerProvider(aProvider, aTypes) {
     AddonManagerInternal.registerProvider(aProvider, aTypes);
   },
 
-  unregisterProvider: function(aProvider) {
+  unregisterProvider(aProvider) {
     AddonManagerInternal.unregisterProvider(aProvider);
   },
 
-  markProviderSafe: function(aProvider) {
+  markProviderSafe(aProvider) {
     AddonManagerInternal.markProviderSafe(aProvider);
   },
 
-  backgroundUpdateCheck: function() {
+  backgroundUpdateCheck() {
     return AddonManagerInternal.backgroundUpdateCheck();
   },
 
   backgroundUpdateTimerHandler() {
     // Don't call through to the real update check if no checks are enabled.
     let checkHotfix = AddonManagerInternal.hotfixID &&
                       Services.prefs.getBoolPref(PREF_APP_UPDATE_ENABLED) &&
                       Services.prefs.getBoolPref(PREF_APP_UPDATE_AUTO);
@@ -2948,65 +2948,65 @@ this.AddonManagerPrivate = {
     if (!AddonManagerInternal.updateEnabled && !checkHotfix) {
       logger.info("Skipping background update check");
       return;
     }
     // Don't return the promise here, since the caller doesn't care.
     AddonManagerInternal.backgroundUpdateCheck();
   },
 
-  addStartupChange: function(aType, aID) {
+  addStartupChange(aType, aID) {
     AddonManagerInternal.addStartupChange(aType, aID);
   },
 
-  removeStartupChange: function(aType, aID) {
+  removeStartupChange(aType, aID) {
     AddonManagerInternal.removeStartupChange(aType, aID);
   },
 
-  notifyAddonChanged: function(aID, aType, aPendingRestart) {
+  notifyAddonChanged(aID, aType, aPendingRestart) {
     AddonManagerInternal.notifyAddonChanged(aID, aType, aPendingRestart);
   },
 
-  updateAddonAppDisabledStates: function() {
+  updateAddonAppDisabledStates() {
     AddonManagerInternal.updateAddonAppDisabledStates();
   },
 
-  updateAddonRepositoryData: function(aCallback) {
+  updateAddonRepositoryData(aCallback) {
     return promiseOrCallback(
       AddonManagerInternal.updateAddonRepositoryData(),
       aCallback);
   },
 
-  callInstallListeners: function(...aArgs) {
+  callInstallListeners(...aArgs) {
     return AddonManagerInternal.callInstallListeners.apply(AddonManagerInternal,
                                                            aArgs);
   },
 
-  callAddonListeners: function(...aArgs) {
+  callAddonListeners(...aArgs) {
     AddonManagerInternal.callAddonListeners.apply(AddonManagerInternal, aArgs);
   },
 
-  AddonAuthor: AddonAuthor,
-
-  AddonScreenshot: AddonScreenshot,
-
-  AddonCompatibilityOverride: AddonCompatibilityOverride,
-
-  AddonType: AddonType,
-
-  recordTimestamp: function(name, value) {
+  AddonAuthor,
+
+  AddonScreenshot,
+
+  AddonCompatibilityOverride,
+
+  AddonType,
+
+  recordTimestamp(name, value) {
     AddonManagerInternal.recordTimestamp(name, value);
   },
 
   _simpleMeasures: {},
-  recordSimpleMeasure: function(name, value) {
+  recordSimpleMeasure(name, value) {
     this._simpleMeasures[name] = value;
   },
 
-  recordException: function(aModule, aContext, aException) {
+  recordException(aModule, aContext, aException) {
     let report = {
       module: aModule,
       context: aContext
     };
 
     if (typeof aException == "number") {
       report.message = Components.Exception("", aException).name;
     }
@@ -3016,72 +3016,72 @@ this.AddonManagerPrivate = {
         report.file = aException.fileName;
         report.line = aException.lineNumber;
       }
     }
 
     this._simpleMeasures.exception = report;
   },
 
-  getSimpleMeasures: function() {
+  getSimpleMeasures() {
     return this._simpleMeasures;
   },
 
-  getTelemetryDetails: function() {
+  getTelemetryDetails() {
     return AddonManagerInternal.telemetryDetails;
   },
 
-  setTelemetryDetails: function(aProvider, aDetails) {
+  setTelemetryDetails(aProvider, aDetails) {
     AddonManagerInternal.telemetryDetails[aProvider] = aDetails;
   },
 
   // Start a timer, record a simple measure of the time interval when
   // timer.done() is called
-  simpleTimer: function(aName) {
+  simpleTimer(aName) {
     let startTime = Cu.now();
     return {
       done: () => this.recordSimpleMeasure(aName, Math.round(Cu.now() - startTime))
     };
   },
 
   /**
    * Helper to call update listeners when no update is available.
    *
    * This can be used as an implementation for Addon.findUpdates() when
    * no update mechanism is available.
    */
-  callNoUpdateListeners: function(addon, listener, reason, appVersion, platformVersion) {
+  callNoUpdateListeners(addon, listener, reason, appVersion, platformVersion) {
     if ("onNoCompatibilityUpdateAvailable" in listener) {
       safeCall(listener.onNoCompatibilityUpdateAvailable.bind(listener), addon);
     }
     if ("onNoUpdateAvailable" in listener) {
       safeCall(listener.onNoUpdateAvailable.bind(listener), addon);
     }
     if ("onUpdateFinished" in listener) {
       safeCall(listener.onUpdateFinished.bind(listener), addon);
     }
   },
 
   get webExtensionsMinPlatformVersion() {
     return gWebExtensionsMinPlatformVersion;
   },
 
-  hasUpgradeListener: function(aId) {
+  hasUpgradeListener(aId) {
     return AddonManagerInternal.upgradeListeners.has(aId);
   },
 
-  getUpgradeListener: function(aId) {
+  getUpgradeListener(aId) {
     return AddonManagerInternal.upgradeListeners.get(aId);
   },
 
   /**
    * Predicate that returns true if we think the given extension ID
    * might have been generated by XPIProvider.
    */
-  isTemporaryInstallID: function(extensionId) {
+  isTemporaryInstallID(extensionId) {
      if (!gStarted)
        throw Components.Exception("AddonManager is not initialized",
                                   Cr.NS_ERROR_NOT_INITIALIZED);
 
      if (!extensionId || typeof extensionId != "string")
        throw Components.Exception("extensionId must be a string",
                                   Cr.NS_ERROR_INVALID_ARG);
 
@@ -3342,179 +3342,179 @@ this.AddonManager = {
   stateToString(state) {
     return this._stateToString.get(state);
   },
 
   errorToString(err) {
     return err ? this._errorToString.get(err) : null;
   },
 
-  getInstallForURL: function(aUrl, aCallback, aMimetype,
+  getInstallForURL(aUrl, aCallback, aMimetype,
                                                  aHash, aName, aIcons,
                                                  aVersion, aBrowser) {
     return promiseOrCallback(
       AddonManagerInternal.getInstallForURL(aUrl, aMimetype, aHash,
                                             aName, aIcons, aVersion, aBrowser),
       aCallback);
   },
 
-  getInstallForFile: function(aFile, aCallback, aMimetype) {
+  getInstallForFile(aFile, aCallback, aMimetype) {
     return promiseOrCallback(
       AddonManagerInternal.getInstallForFile(aFile, aMimetype),
       aCallback);
   },
 
   /**
    * Gets an array of add-on IDs that changed during the most recent startup.
    *
    * @param  aType
    *         The type of startup change to get
    * @return An array of add-on IDs
    */
-  getStartupChanges: function(aType) {
+  getStartupChanges(aType) {
     if (!(aType in AddonManagerInternal.startupChanges))
       return [];
     return AddonManagerInternal.startupChanges[aType].slice(0);
   },
 
-  getAddonByID: function(aID, aCallback) {
+  getAddonByID(aID, aCallback) {
     return promiseOrCallback(
       AddonManagerInternal.getAddonByID(aID),
       aCallback);
   },
 
-  getAddonBySyncGUID: function(aGUID, aCallback) {
+  getAddonBySyncGUID(aGUID, aCallback) {
     return promiseOrCallback(
       AddonManagerInternal.getAddonBySyncGUID(aGUID),
       aCallback);
   },
 
-  getAddonsByIDs: function(aIDs, aCallback) {
+  getAddonsByIDs(aIDs, aCallback) {
     return promiseOrCallback(
       AddonManagerInternal.getAddonsByIDs(aIDs),
       aCallback);
   },
 
-  getAddonsWithOperationsByTypes: function(aTypes, aCallback) {
+  getAddonsWithOperationsByTypes(aTypes, aCallback) {
     return promiseOrCallback(
       AddonManagerInternal.getAddonsWithOperationsByTypes(aTypes),
       aCallback);
   },
 
-  getAddonsByTypes: function(aTypes, aCallback) {
+  getAddonsByTypes(aTypes, aCallback) {
     return promiseOrCallback(
       AddonManagerInternal.getAddonsByTypes(aTypes),
       aCallback);
   },
 
-  getAllAddons: function(aCallback) {
+  getAllAddons(aCallback) {
     return promiseOrCallback(
       AddonManagerInternal.getAllAddons(),
       aCallback);
   },
 
-  getInstallsByTypes: function(aTypes, aCallback) {
+  getInstallsByTypes(aTypes, aCallback) {
     return promiseOrCallback(
       AddonManagerInternal.getInstallsByTypes(aTypes),
       aCallback);
   },
 
-  getAllInstalls: function(aCallback) {
+  getAllInstalls(aCallback) {
     return promiseOrCallback(
       AddonManagerInternal.getAllInstalls(),
       aCallback);
   },
 
-  mapURIToAddonID: function(aURI) {
+  mapURIToAddonID(aURI) {
     return AddonManagerInternal.mapURIToAddonID(aURI);
   },
 
-  isInstallEnabled: function(aType) {
+  isInstallEnabled(aType) {
     return AddonManagerInternal.isInstallEnabled(aType);
   },
 
-  isInstallAllowed: function(aType, aInstallingPrincipal) {
+  isInstallAllowed(aType, aInstallingPrincipal) {
     return AddonManagerInternal.isInstallAllowed(aType, aInstallingPrincipal);
   },
 
-  installAddonsFromWebpage: function(aType, aBrowser, aInstallingPrincipal,
+  installAddonsFromWebpage(aType, aBrowser, aInstallingPrincipal,
                                      aInstalls) {
     AddonManagerInternal.installAddonsFromWebpage(aType, aBrowser,
                                                   aInstallingPrincipal,
                                                   aInstalls);
   },
 
-  installTemporaryAddon: function(aDirectory) {
+  installTemporaryAddon(aDirectory) {
     return AddonManagerInternal.installTemporaryAddon(aDirectory);
   },
 
-  installAddonFromSources: function(aDirectory) {
+  installAddonFromSources(aDirectory) {
     return AddonManagerInternal.installAddonFromSources(aDirectory);
   },
 
-  getAddonByInstanceID: function(aInstanceID) {
+  getAddonByInstanceID(aInstanceID) {
     return AddonManagerInternal.getAddonByInstanceID(aInstanceID);
   },
 
-  addManagerListener: function(aListener) {
+  addManagerListener(aListener) {
     AddonManagerInternal.addManagerListener(aListener);
   },
 
-  removeManagerListener: function(aListener) {
+  removeManagerListener(aListener) {
     AddonManagerInternal.removeManagerListener(aListener);
   },
 
-  addInstallListener: function(aListener) {
+  addInstallListener(aListener) {
     AddonManagerInternal.addInstallListener(aListener);
   },
 
-  removeInstallListener: function(aListener) {
+  removeInstallListener(aListener) {
     AddonManagerInternal.removeInstallListener(aListener);
   },
 
-  getUpgradeListener: function(aId) {
+  getUpgradeListener(aId) {
     return AddonManagerInternal.upgradeListeners.get(aId);
   },
 
-  addUpgradeListener: function(aInstanceID, aCallback) {
+  addUpgradeListener(aInstanceID, aCallback) {
     AddonManagerInternal.addUpgradeListener(aInstanceID, aCallback);
   },
 
-  removeUpgradeListener: function(aInstanceID) {
+  removeUpgradeListener(aInstanceID) {
     AddonManagerInternal.removeUpgradeListener(aInstanceID);
   },
 
-  addAddonListener: function(aListener) {
+  addAddonListener(aListener) {
     AddonManagerInternal.addAddonListener(aListener);
   },
 
-  removeAddonListener: function(aListener) {
+  removeAddonListener(aListener) {
     AddonManagerInternal.removeAddonListener(aListener);
   },
 
-  addTypeListener: function(aListener) {
+  addTypeListener(aListener) {
     AddonManagerInternal.addTypeListener(aListener);
   },
 
-  removeTypeListener: function(aListener) {
+  removeTypeListener(aListener) {
     AddonManagerInternal.removeTypeListener(aListener);
   },
 
   get addonTypes() {
     return AddonManagerInternal.addonTypes;
   },
 
   /**
    * Determines whether an Addon should auto-update or not.
    *
    * @param  aAddon
    *         The Addon representing the add-on
    * @return true if the addon should auto-update, false otherwise.
    */
-  shouldAutoUpdate: function(aAddon) {
+  shouldAutoUpdate(aAddon) {
     if (!aAddon || typeof aAddon != "object")
       throw Components.Exception("aAddon must be specified",
                                  Cr.NS_ERROR_INVALID_ARG);
 
     if (!("applyBackgroundUpdates" in aAddon))
       return false;
     if (aAddon.applyBackgroundUpdates == AddonManager.AUTOUPDATE_ENABLE)
       return true;
@@ -3566,21 +3566,21 @@ this.AddonManager = {
   set autoUpdateDefault(aValue) {
     AddonManagerInternal.autoUpdateDefault = aValue;
   },
 
   get hotfixID() {
     return AddonManagerInternal.hotfixID;
   },
 
-  escapeAddonURI: function(aAddon, aUri, aAppVersion) {
+  escapeAddonURI(aAddon, aUri, aAppVersion) {
     return AddonManagerInternal.escapeAddonURI(aAddon, aUri, aAppVersion);
   },
 
-  getPreferredIconURL: function(aAddon, aSize, aWindow = undefined) {
+  getPreferredIconURL(aAddon, aSize, aWindow = undefined) {
     return AddonManagerInternal.getPreferredIconURL(aAddon, aSize, aWindow);
   },
 
   get webAPI() {
     return AddonManagerInternal.webAPI;
   },
 
   get shutdown() {
--- a/toolkit/mozapps/extensions/ChromeManifestParser.jsm
+++ b/toolkit/mozapps/extensions/ChromeManifestParser.jsm
@@ -40,28 +40,28 @@ this.ChromeManifestParser = {
    * secondary manifests it references.
    *
    * @param  aURI
    *         A nsIURI pointing to a chrome manifest.
    *         Typically a file: or jar: URI.
    * @return Array of objects describing each manifest instruction, in the form:
    *         { type: instruction-type, baseURI: string-uri, args: [arguments] }
    **/
-  parseSync: function(aURI) {
+  parseSync(aURI) {
     function parseLine(aLine) {
       let line = aLine.trim();
       if (line.length == 0 || line.charAt(0) == '#')
         return;
       let tokens = line.split(/\s+/);
       let type = tokens.shift();
       if (type == "manifest") {
         let uri = NetUtil.newURI(tokens.shift(), null, aURI);
         data = data.concat(this.parseSync(uri));
       } else {
-        data.push({type: type, baseURI: baseURI, args: tokens});
+        data.push({type, baseURI, args: tokens});
       }
     }
 
     let contents = "";
     try {
       if (aURI.scheme == "jar")
         contents = this._readFromJar(aURI);
       else
@@ -76,17 +76,17 @@ this.ChromeManifestParser = {
     let baseURI = NetUtil.newURI(".", null, aURI).spec;
 
     let data = [];
     let lines = contents.split("\n");
     lines.forEach(parseLine.bind(this));
     return data;
   },
 
-  _readFromJar: function(aURI) {
+  _readFromJar(aURI) {
     let data = "";
     let entries = [];
     let readers = [];
 
     try {
       // Deconstrict URI, which can be nested jar: URIs.
       let uri = aURI.clone();
       while (uri instanceof Ci.nsIJARURI) {
@@ -119,17 +119,17 @@ this.ChromeManifestParser = {
         readers[i].close();
         flushJarCache(readers[i].file);
       }
     }
 
     return data;
   },
 
-  _readFromFile: function(aURI) {
+  _readFromFile(aURI) {
     let file = aURI.QueryInterface(Ci.nsIFileURL).file;
     if (!file.exists() || !file.isFile())
       return "";
 
     let data = "";
     let fis = Cc["@mozilla.org/network/file-input-stream;1"].
               createInstance(Ci.nsIFileInputStream);
     try {
@@ -146,12 +146,12 @@ this.ChromeManifestParser = {
   * chrome manifest.
   *
   * @param  aManifest
   *         Manifest data, as returned by ChromeManifestParser.parseSync().
   * @param  aType
   *         Instruction type to filter by.
   * @return True if any matching instructions were found in the manifest.
   */
-  hasType: function(aManifest, aType) {
+  hasType(aManifest, aType) {
     return aManifest.some(entry => entry.type == aType);
   }
 };
--- a/toolkit/mozapps/extensions/DeferredSave.jsm
+++ b/toolkit/mozapps/extensions/DeferredSave.jsm
@@ -47,23 +47,23 @@ const PREF_LOGGING_ENABLED = "extensions
 const NS_PREFBRANCH_PREFCHANGE_TOPIC_ID = "nsPref:changed";
 
 /**
 * Preference listener which listens for a change in the
 * "extensions.logging.enabled" preference and changes the logging level of the
 * parent 'addons' level logger accordingly.
 */
 var PrefObserver = {
- init: function() {
+ init() {
    Services.prefs.addObserver(PREF_LOGGING_ENABLED, this, false);
    Services.obs.addObserver(this, "xpcom-shutdown", false);
    this.observe(null, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, PREF_LOGGING_ENABLED);
  },
 
- observe: function(aSubject, aTopic, aData) {
+ 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) {
      let debugLogEnabled = false;
      try {
        debugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED);
@@ -159,49 +159,49 @@ this.DeferredSave.prototype = {
     return this._pending || this.writeInProgress;
   },
 
   get lastError() {
     return this._lastError;
   },
 
   // Start the pending timer if data is dirty
-  _startTimer: function() {
+  _startTimer() {
     if (!this._pending) {
       return;
     }
 
       this.logger.debug("Starting timer");
     if (!this._timer)
       this._timer = MakeTimer();
     this._timer.initWithCallback(() => this._deferredSave(),
                                  this._delay, Ci.nsITimer.TYPE_ONE_SHOT);
   },
 
   /**
    * Mark the current stored data dirty, and schedule a flush to disk
    * @return A Promise<integer> that will be resolved after the data is written to disk;
    *         the promise is resolved with the number of bytes written.
    */
-  saveChanges: function() {
+  saveChanges() {
       this.logger.debug("Save changes");
     if (!this._pending) {
       if (this.writeInProgress) {
           this.logger.debug("Data changed while write in progress");
         this.overlappedSaves++;
       }
       this._pending = Promise.defer();
       // Wait until the most recent write completes or fails (if it hasn't already)
       // and then restart our timer
       this._writing.then(count => this._startTimer(), error => this._startTimer());
     }
     return this._pending.promise;
   },
 
-  _deferredSave: function() {
+  _deferredSave() {
     let pending = this._pending;
     this._pending = null;
     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;
@@ -252,17 +252,17 @@ this.DeferredSave.prototype = {
    * 3) Data is currently being written, in-memory copy is clean
    * 4) Data is being written and in-memory copy is dirty
    *
    * @return Promise<integer> that will resolve when all in-memory data
    *         has finished being flushed, returning the number of bytes
    *         written. If all in-memory data is clean, completes with the
    *         result of the most recent write.
    */
-  flush: function() {
+  flush() {
     // If we have pending changes, cancel our timer and set up the write
     // immediately (_deferredSave queues the write for after the most
     // recent write completes, if it hasn't already)
     if (this._pending) {
         this.logger.debug("Flush called while data is dirty");
       if (this._timer) {
         this._timer.cancel();
         this._timer = null;
--- a/toolkit/mozapps/extensions/LightweightThemeManager.jsm
+++ b/toolkit/mozapps/extensions/LightweightThemeManager.jsm
@@ -46,28 +46,28 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   "resource://gre/modules/ServiceRequest.jsm");
 
 
 XPCOMUtils.defineLazyGetter(this, "_prefs", () => {
   return Services.prefs.getBranch("lightweightThemes.");
 });
 
 Object.defineProperty(this, "_maxUsedThemes", {
-  get: function() {
+  get() {
     delete this._maxUsedThemes;
     try {
       this._maxUsedThemes = _prefs.getIntPref("maxUsedThemes");
     }
     catch (e) {
       this._maxUsedThemes = DEFAULT_MAX_USED_THEMES_COUNT;
     }
     return this._maxUsedThemes;
   },
 
-  set: function(val) {
+  set(val) {
     delete this._maxUsedThemes;
     return this._maxUsedThemes = val;
   },
   configurable: true,
 });
 
 // Holds the ID of the theme being enabled or disabled while sending out the
 // events so cached AddonWrapper instances can return correct values for
@@ -146,30 +146,30 @@ this.LightweightThemeManager = {
 
     return data;
   },
 
   set currentTheme(aData) {
     return _setCurrentTheme(aData, false);
   },
 
-  setLocalTheme: function(aData) {
+  setLocalTheme(aData) {
     _setCurrentTheme(aData, true);
   },
 
-  getUsedTheme: function(aId) {
+  getUsedTheme(aId) {
     var usedThemes = this.usedThemes;
     for (let usedTheme of usedThemes) {
       if (usedTheme.id == aId)
         return usedTheme;
     }
     return null;
   },
 
-  forgetUsedTheme: function(aId) {
+  forgetUsedTheme(aId) {
     let theme = this.getUsedTheme(aId);
     if (!theme || LightweightThemeManager._builtInThemes.has(theme.id))
       return;
 
     let wrapper = new AddonWrapper(theme);
     AddonManagerPrivate.callAddonListeners("onUninstalling", wrapper, false);
 
     var currentTheme = this.currentTheme;
@@ -177,45 +177,45 @@ this.LightweightThemeManager = {
       this.themeChanged(null);
       AddonManagerPrivate.notifyAddonChanged(null, ADDON_TYPE, false);
     }
 
     _updateUsedThemes(_usedThemesExceptId(aId));
     AddonManagerPrivate.callAddonListeners("onUninstalled", wrapper);
   },
 
-  addBuiltInTheme: function(theme) {
+  addBuiltInTheme(theme) {
     if (!theme || !theme.id || this.usedThemes.some(t => t.id == theme.id)) {
       throw new Error("Trying to add invalid builtIn theme");
     }
 
     this._builtInThemes.set(theme.id, theme);
 
     if (_prefs.getCharPref("selectedThemeID") == theme.id) {
       this.currentTheme = theme;
     }
   },
 
-  forgetBuiltInTheme: function(id) {
+  forgetBuiltInTheme(id) {
     if (!this._builtInThemes.has(id)) {
       let currentTheme = this.currentTheme;
       if (currentTheme && currentTheme.id == id) {
         this.currentTheme = null;
       }
     }
     return this._builtInThemes.delete(id);
   },
 
-  clearBuiltInThemes: function() {
+  clearBuiltInThemes() {
     for (let id of this._builtInThemes.keys()) {
       this.forgetBuiltInTheme(id);
     }
   },
 
-  previewTheme: function(aData) {
+  previewTheme(aData) {
     let cancel = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
     cancel.data = false;
     Services.obs.notifyObservers(cancel, "lightweight-theme-preview-requested",
                                  JSON.stringify(aData));
     if (cancel.data)
       return;
 
     if (_previewTimer)
@@ -224,33 +224,33 @@ this.LightweightThemeManager = {
       _previewTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     _previewTimer.initWithCallback(_previewTimerCallback,
                                    MAX_PREVIEW_SECONDS * 1000,
                                    _previewTimer.TYPE_ONE_SHOT);
 
     _notifyWindows(aData);
   },
 
-  resetPreview: function() {
+  resetPreview() {
     if (_previewTimer) {
       _previewTimer.cancel();
       _previewTimer = null;
       _notifyWindows(this.currentThemeForDisplay);
     }
   },
 
-  parseTheme: function(aString, aBaseURI) {
+  parseTheme(aString, aBaseURI) {
     try {
       return _sanitizeTheme(JSON.parse(aString), aBaseURI, false);
     } catch (e) {
       return null;
     }
   },
 
-  updateCurrentTheme: function() {
+  updateCurrentTheme() {
     try {
       if (!_prefs.getBoolPref("update.enabled"))
         return;
     } catch (e) {
       return;
     }
 
     var theme = this.currentTheme;
@@ -286,17 +286,17 @@ this.LightweightThemeManager = {
   },
 
   /**
    * Switches to a new lightweight theme.
    *
    * @param  aData
    *         The lightweight theme to switch to
    */
-  themeChanged: function(aData) {
+  themeChanged(aData) {
     if (_previewTimer) {
       _previewTimer.cancel();
       _previewTimer = null;
     }
 
     if (aData) {
       let usedThemes = _usedThemesExceptId(aData.id);
       usedThemes.unshift(aData);
@@ -317,49 +317,49 @@ this.LightweightThemeManager = {
     _notifyWindows(aData);
     Services.obs.notifyObservers(null, "lightweight-theme-changed", null);
   },
 
   /**
    * Starts the Addons provider and enables the new lightweight theme if
    * necessary.
    */
-  startup: function() {
+  startup() {
     if (Services.prefs.prefHasUserValue(PREF_LWTHEME_TO_SELECT)) {
       let id = Services.prefs.getCharPref(PREF_LWTHEME_TO_SELECT);
       if (id)
         this.themeChanged(this.getUsedTheme(id));
       else
         this.themeChanged(null);
       Services.prefs.clearUserPref(PREF_LWTHEME_TO_SELECT);
     }
 
     _prefs.addObserver("", _prefObserver, false);
   },
 
   /**
    * Shuts down the provider.
    */
-  shutdown: function() {
+  shutdown() {
     _prefs.removeObserver("", _prefObserver);
   },
 
   /**
    * Called when a new add-on has been enabled when only one add-on of that type
    * can be enabled.
    *
    * @param  aId
    *         The ID of the newly enabled add-on
    * @param  aType
    *         The type of the newly enabled add-on
    * @param  aPendingRestart
    *         true if the newly enabled add-on will only become enabled after a
    *         restart
    */
-  addonChanged: function(aId, aType, aPendingRestart) {
+  addonChanged(aId, aType, aPendingRestart) {
     if (aType != ADDON_TYPE)
       return;
 
     let id = _getInternalID(aId);
     let current = this.currentTheme;
 
     try {
       let next = Services.prefs.getCharPref(PREF_LWTHEME_TO_SELECT);
@@ -420,17 +420,17 @@ this.LightweightThemeManager = {
   /**
    * Called to get an Addon with a particular ID.
    *
    * @param  aId
    *         The ID of the add-on to retrieve
    * @param  aCallback
    *         A callback to pass the Addon to
    */
-  getAddonByID: function(aId, aCallback) {
+  getAddonByID(aId, aCallback) {
     let id = _getInternalID(aId);
     if (!id) {
       aCallback(null);
       return;
      }
 
     let theme = this.getUsedTheme(id);
     if (!theme) {
@@ -444,17 +444,17 @@ this.LightweightThemeManager = {
   /**
    * Called to get Addons of a particular type.
    *
    * @param  aTypes
    *         An array of types to fetch. Can be null to get all types.
    * @param  aCallback
    *         A callback to pass an array of Addons to
    */
-  getAddonsByTypes: function(aTypes, aCallback) {
+  getAddonsByTypes(aTypes, aCallback) {
     if (aTypes && aTypes.indexOf(ADDON_TYPE) == -1) {
       aCallback([]);
       return;
     }
 
     aCallback(this.usedThemes.map(a => new AddonWrapper(a)));
   },
 };
@@ -593,57 +593,57 @@ AddonWrapper.prototype = {
   get scope() {
     return AddonManager.SCOPE_PROFILE;
   },
 
   get foreignInstall() {
     return false;
   },
 
-  uninstall: function() {
+  uninstall() {
     LightweightThemeManager.forgetUsedTheme(themeFor(this).id);
   },
 
-  cancelUninstall: function() {
+  cancelUninstall() {
     throw new Error("Theme is not marked to be uninstalled");
   },
 
-  findUpdates: function(listener, reason, appVersion, platformVersion) {
+  findUpdates(listener, reason, appVersion, platformVersion) {
     AddonManagerPrivate.callNoUpdateListeners(this, listener, reason, appVersion, platformVersion);
   },
 
   // Lightweight themes are always compatible
-  isCompatibleWith: function(appVersion, platformVersion) {
+  isCompatibleWith(appVersion, platformVersion) {
     return true;
   },
 
   // Lightweight themes are always securely updated
   get providesUpdatesSecurely() {
     return true;
   },
 
   // Lightweight themes are never blocklisted
   get blocklistState() {
     return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
   }
 };
 
 ["description", "homepageURL", "iconURL"].forEach(function(prop) {
   Object.defineProperty(AddonWrapper.prototype, prop, {
-    get: function() {
+    get() {
       let theme = themeFor(this);
       return prop in theme ? theme[prop] : null;
     },
     enumarable: true,
   });
 });
 
 ["installDate", "updateDate"].forEach(function(prop) {
   Object.defineProperty(AddonWrapper.prototype, prop, {
-    get: function() {
+    get() {
       let theme = themeFor(this);
       return prop in theme ? new Date(theme[prop]) : null;
     },
     enumarable: true,
   });
 });
 
 /**
@@ -800,17 +800,17 @@ function _updateUsedThemes(aList) {
 
 function _notifyWindows(aThemeData) {
   Services.obs.notifyObservers(null, "lightweight-theme-styling-update",
                                JSON.stringify(aThemeData));
 }
 
 var _previewTimer;
 var _previewTimerCallback = {
-  notify: function() {
+  notify() {
     LightweightThemeManager.resetPreview();
   }
 };
 
 /**
  * Called when any of the lightweightThemes preferences are changed.
  */
 function _prefObserver(aSubject, aTopic, aData) {
--- a/toolkit/mozapps/extensions/addonManager.js
+++ b/toolkit/mozapps/extensions/addonManager.js
@@ -54,48 +54,48 @@ function amManager() {
 
   AddonManager.webAPI.setEventHandler(this.sendEvent);
 
   // Needed so receiveMessage can be called directly by JS callers
   this.wrappedJSObject = this;
 }
 
 amManager.prototype = {
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "addons-startup":
         AddonManagerPrivate.startup();
         break;
 
       case "message-manager-close":
       case "message-manager-disconnect":
         this.childClosed(aSubject);
         break;
     }
   },
 
   /**
    * @see amIAddonManager.idl
    */
-  mapURIToAddonID: function(uri, id) {
+  mapURIToAddonID(uri, id) {
     id.value = AddonManager.mapURIToAddonID(uri);
     return !!id.value;
   },
 
   /**
    * @see amIWebInstaller.idl
    */
-  isInstallEnabled: function(aMimetype, aReferer) {
+  isInstallEnabled(aMimetype, aReferer) {
     return AddonManager.isInstallEnabled(aMimetype);
   },
 
   /**
    * @see amIWebInstaller.idl
    */
-  installAddonsFromWebpage: function(aMimetype, aBrowser, aInstallingPrincipal,
+  installAddonsFromWebpage(aMimetype, aBrowser, aInstallingPrincipal,
                                      aUris, aHashes, aNames, aIcons, aCallback) {
     if (aUris.length == 0)
       return false;
 
     let retval = true;
     if (!AddonManager.isInstallAllowed(aMimetype, aInstallingPrincipal)) {
       aCallback = null;
       retval = false;
@@ -117,49 +117,49 @@ amManager.prototype = {
             Components.utils.reportError(e);
           }
         }
 
         if (aInstall) {
           installs.push(aInstall);
           if (aCallback) {
             aInstall.addListener({
-              onDownloadCancelled: function(aInstall) {
+              onDownloadCancelled(aInstall) {
                 callCallback(uri, USER_CANCELLED);
               },
 
-              onDownloadFailed: function(aInstall) {
+              onDownloadFailed(aInstall) {
                 if (aInstall.error == AddonManager.ERROR_CORRUPT_FILE)
                   callCallback(uri, CANT_READ_ARCHIVE);
                 else
                   callCallback(uri, DOWNLOAD_ERROR);
               },
 
-              onInstallFailed: function(aInstall) {
+              onInstallFailed(aInstall) {
                 callCallback(uri, EXECUTION_ERROR);
               },
 
-              onInstallEnded: function(aInstall, aStatus) {
+              onInstallEnded(aInstall, aStatus) {
                 callCallback(uri, SUCCESS);
               }
             });
           }
         }
         else if (aCallback) {
           aCallback.onInstallEnded(uri, UNSUPPORTED_TYPE);
         }
         buildNextInstall();
       }, aMimetype, aHashes.shift(), aNames.shift(), aIcons.shift(), null, aBrowser);
     }
     buildNextInstall();
 
     return retval;
   },
 
-  notify: function(aTimer) {
+  notify(aTimer) {
     AddonManagerPrivate.backgroundUpdateTimerHandler();
   },
 
   // Maps message manager instances for content processes to the associated
   // AddonListener instances.
   addonListeners: new Map(),
 
   _addAddonListener(target) {
@@ -191,33 +191,33 @@ amManager.prototype = {
   },
 
   /**
    * messageManager callback function.
    *
    * Listens to requests from child processes for InstallTrigger
    * activity, and sends back callbacks.
    */
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     let payload = aMessage.data;
 
     switch (aMessage.name) {
       case MSG_INSTALL_ENABLED:
         return AddonManager.isInstallEnabled(payload.mimetype);
 
       case MSG_INSTALL_ADDONS: {
         let callback = null;
         if (payload.callbackID != -1) {
           let mm = aMessage.target.messageManager;
           callback = {
-            onInstallEnded: function(url, status) {
+            onInstallEnded(url, status) {
               mm.sendAsyncMessage(MSG_INSTALL_CALLBACK, {
                 callbackID: payload.callbackID,
-                url: url,
-                status: status
+                url,
+                status
               });
             },
           };
         }
 
         return this.installAddonsFromWebpage(payload.mimetype,
           aMessage.target, payload.principalToInherit, payload.uris,
           payload.hashes, payload.names, payload.icons, callback);
@@ -271,17 +271,17 @@ amManager.prototype = {
   },
 
   sendEvent(mm, data) {
     mm.sendAsyncMessage(MSG_INSTALL_EVENT, data);
   },
 
   classID: Components.ID("{4399533d-08d1-458c-a87a-235f74451cfa}"),
   _xpcom_factory: {
-    createInstance: function(aOuter, aIid) {
+    createInstance(aOuter, aIid) {
       if (aOuter != null)
         throw Components.Exception("Component does not support aggregation",
                                    Cr.NS_ERROR_NO_AGGREGATION);
 
       if (!gSingleton)
         gSingleton = new amManager();
       return gSingleton.QueryInterface(aIid);
     }
--- a/toolkit/mozapps/extensions/amContentHandler.js
+++ b/toolkit/mozapps/extensions/amContentHandler.js
@@ -23,17 +23,17 @@ amContentHandler.prototype = {
    *
    * @param  aMimetype
    *         The mimetype of the file
    * @param  aContext
    *         The context passed to nsIChannel.asyncOpen
    * @param  aRequest
    *         The nsIRequest dealing with the content
    */
-  handleContent: function(aMimetype, aContext, aRequest) {
+  handleContent(aMimetype, aContext, aRequest) {
     if (aMimetype != XPI_CONTENT_TYPE)
       throw Cr.NS_ERROR_WONT_HANDLE_CONTENT;
 
     if (!(aRequest instanceof Ci.nsIChannel))
       throw Cr.NS_ERROR_WONT_HANDLE_CONTENT;
 
     let uri = aRequest.URI;
 
@@ -52,17 +52,17 @@ amContentHandler.prototype = {
     }
 
     let installs = {
       uris: [uri.spec],
       hashes: [null],
       names: [null],
       icons: [null],
       mimetype: XPI_CONTENT_TYPE,
-      principalToInherit: principalToInherit,
+      principalToInherit,
       callbackID: -1
     };
 
     if (Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {
       // When running in the main process this might be a frame inside an
       // in-content UI page, walk up to find the first frame element in a chrome
       // privileged document
       let element = window.frameElement;
@@ -89,17 +89,17 @@ amContentHandler.prototype = {
                                .getInterface(Ci.nsIContentFrameMessageManager);
 
     messageManager.sendAsyncMessage(MSG_INSTALL_ADDONS, installs);
   },
 
   classID: Components.ID("{7beb3ba8-6ec3-41b4-b67c-da89b8518922}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentHandler]),
 
-  log : function(aMsg) {
+  log(aMsg) {
     let msg = "amContentHandler.js: " + (aMsg.join ? aMsg.join("") : aMsg);
     Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService).
       logStringMessage(msg);
     dump(msg + "\n");
   }
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([amContentHandler]);
--- a/toolkit/mozapps/extensions/amInstallTrigger.js
+++ b/toolkit/mozapps/extensions/amInstallTrigger.js
@@ -50,34 +50,34 @@ function RemoteMediator(window) {
     .getInterface(Ci.nsIContentFrameMessageManager);
   this.mm.addWeakMessageListener(MSG_INSTALL_CALLBACK, this);
 
   this._lastCallbackID = 0;
   this._callbacks = new Map();
 }
 
 RemoteMediator.prototype = {
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     if (message.name == MSG_INSTALL_CALLBACK) {
       let payload = message.data;
       let callbackHandler = this._callbacks.get(payload.callbackID);
       if (callbackHandler) {
         callbackHandler.callCallback(payload.url, payload.status);
       }
     }
   },
 
-  enabled: function(url) {
+  enabled(url) {
     let params = {
       mimetype: XPINSTALL_MIMETYPE
     };
     return this.mm.sendSyncMessage(MSG_INSTALL_ENABLED, params)[0];
   },
 
-  install: function(installs, principal, callback, window) {
+  install(installs, principal, callback, window) {
     let callbackID = this._addCallback(callback, installs.uris);
 
     installs.mimetype = XPINSTALL_MIMETYPE;
     installs.principalToInherit = principal;
     installs.callbackID = callbackID;
 
     if (Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {
       // When running in the main process this might be a frame inside an
@@ -104,17 +104,17 @@ RemoteMediator.prototype = {
                                .getInterface(Ci.nsIWebNavigation)
                                .QueryInterface(Ci.nsIDocShell)
                                .QueryInterface(Ci.nsIInterfaceRequestor)
                                .getInterface(Ci.nsIContentFrameMessageManager);
 
     return messageManager.sendSyncMessage(MSG_INSTALL_ADDONS, installs)[0];
   },
 
-  _addCallback: function(callback, urls) {
+  _addCallback(callback, urls) {
     if (!callback || typeof callback != "function")
       return -1;
 
     let callbackID = this._windowID + "-" + ++this._lastCallbackID;
     let callbackObject = new CallbackObject(callbackID, callback, urls, this);
     this._callbacks.set(callbackID, callbackObject);
     return callbackID;
   },
@@ -132,41 +132,41 @@ InstallTrigger.prototype = {
   // "JavaScript-global-property" category in the XPCOM category manager. This
   // means that for newly created windows, XPCOM will createinstance this
   // object, and then call init, passing in the window for which we need to
   // provide an instance. We then initialize ourselves and return the webidl
   // version of this object using the webidl-provided _create method, which
   // XPCOM will then duly expose as a property value on the window. All this
   // indirection is necessary because webidl does not (yet) support statics
   // (bug 863952). See bug 926712 for more details about this implementation.
-  init: function(window) {
+  init(window) {
     this._window = window;
     this._principal = window.document.nodePrincipal;
     this._url = window.document.documentURIObject;
 
     try {
       this._mediator = new RemoteMediator(window);
     } catch (ex) {
       // If we can't set up IPC (e.g., because this is a top-level window
       // or something), then don't expose InstallTrigger.
       return null;
     }
 
     return window.InstallTriggerImpl._create(window, this);
   },
 
-  enabled: function() {
+  enabled() {
     return this._mediator.enabled(this._url.spec);
   },
 
-  updateEnabled: function() {
+  updateEnabled() {
     return this.enabled();
   },
 
-  install: function(installs, callback) {
+  install(installs, callback) {
     let installData = {
       uris: [],
       hashes: [],
       names: [],
       icons: [],
     };
 
     for (let name of Object.keys(installs)) {
@@ -195,34 +195,34 @@ InstallTrigger.prototype = {
       installData.hashes.push(item.Hash || null);
       installData.names.push(name);
       installData.icons.push(iconUrl ? iconUrl.spec : null);
     }
 
     return this._mediator.install(installData, this._principal, callback, this._window);
   },
 
-  startSoftwareUpdate: function(url, flags) {
+  startSoftwareUpdate(url, flags) {
     let filename = Services.io.newURI(url, null, null)
                               .QueryInterface(Ci.nsIURL)
                               .filename;
     let args = {};
     args[filename] = { "URL": url };
     return this.install(args);
   },
 
-  installChrome: function(type, url, skin) {
+  installChrome(type, url, skin) {
     return this.startSoftwareUpdate(url);
   },
 
-  _resolveURL: function(url) {
+  _resolveURL(url) {
     return Services.io.newURI(url, null, this._url);
   },
 
-  _checkLoadURIFromScript: function(uri) {
+  _checkLoadURIFromScript(uri) {
     let secman = Services.scriptSecurityManager;
     try {
       secman.checkLoadURIWithPrincipal(this._principal,
                                        uri,
                                        secman.DISALLOW_INHERIT_PRINCIPAL);
       return true;
     }
     catch (e) {
--- a/toolkit/mozapps/extensions/amWebInstallListener.js
+++ b/toolkit/mozapps/extensions/amWebInstallListener.js
@@ -85,17 +85,17 @@ Installer.prototype = {
   browser: null,
   downloads: null,
   installed: null,
   isDownloading: true,
 
   /**
    * Checks if all downloads are now complete and if so prompts to install.
    */
-  checkAllDownloaded: function() {
+  checkAllDownloaded() {
     // Prevent re-entrancy caused by the confirmation dialog cancelling unwanted
     // installs.
     if (!this.isDownloading)
       return;
 
     var failed = [];
     var installs = [];
 
@@ -189,17 +189,17 @@ Installer.prototype = {
       notifyObservers("addon-install-cancelled", this.browser, this.url,
                       this.downloads);
     }
   },
 
   /**
    * Checks if all installs are now complete and if so notifies observers.
    */
-  checkAllInstalled: function() {
+  checkAllInstalled() {
     var failed = [];
 
     for (let install of this.downloads) {
       switch (install.state) {
       case AddonManager.STATE_DOWNLOADED:
       case AddonManager.STATE_INSTALLING:
         // Exit early if any add-ons haven't started installing yet or are
         // still installing
@@ -215,42 +215,42 @@ Installer.prototype = {
     if (failed.length > 0)
       notifyObservers("addon-install-failed", this.browser, this.url, failed);
 
     if (this.installed.length > 0)
       notifyObservers("addon-install-complete", this.browser, this.url, this.installed);
     this.installed = null;
   },
 
-  onDownloadCancelled: function(aInstall) {
+  onDownloadCancelled(aInstall) {
     aInstall.removeListener(this);
     this.checkAllDownloaded();
   },
 
-  onDownloadFailed: function(aInstall) {
+  onDownloadFailed(aInstall) {
     aInstall.removeListener(this);
     this.checkAllDownloaded();
   },
 
-  onDownloadEnded: function(aInstall) {
+  onDownloadEnded(aInstall) {
     this.checkAllDownloaded();
     return false;
   },
 
-  onInstallCancelled: function(aInstall) {
+  onInstallCancelled(aInstall) {
     aInstall.removeListener(this);
     this.checkAllInstalled();
   },
 
-  onInstallFailed: function(aInstall) {
+  onInstallFailed(aInstall) {
     aInstall.removeListener(this);
     this.checkAllInstalled();
   },
 
-  onInstallEnded: function(aInstall) {
+  onInstallEnded(aInstall) {
     aInstall.removeListener(this);
     this.installed.push(aInstall);
 
     // If installing a theme that is disabled and can be enabled then enable it
     if (aInstall.addon.type == "theme" &&
         aInstall.addon.userDisabled == true &&
         aInstall.addon.appDisabled == false) {
       aInstall.addon.userDisabled = false;
@@ -262,70 +262,70 @@ Installer.prototype = {
 
 function extWebInstallListener() {
 }
 
 extWebInstallListener.prototype = {
   /**
    * @see amIWebInstallListener.idl
    */
-  onWebInstallDisabled: function(aBrowser, aUri, aInstalls) {
+  onWebInstallDisabled(aBrowser, aUri, aInstalls) {
     let info = {
       browser: aBrowser,
       originatingURI: aUri,
       installs: aInstalls,
 
       QueryInterface: XPCOMUtils.generateQI([Ci.amIWebInstallInfo])
     };
     Services.obs.notifyObservers(info, "addon-install-disabled", null);
   },
 
   /**
    * @see amIWebInstallListener.idl
    */
-  onWebInstallOriginBlocked: function(aBrowser, aUri, aInstalls) {
+  onWebInstallOriginBlocked(aBrowser, aUri, aInstalls) {
     let info = {
       browser: aBrowser,
       originatingURI: aUri,
       installs: aInstalls,
 
-      install: function() {
+      install() {
       },
 
       QueryInterface: XPCOMUtils.generateQI([Ci.amIWebInstallInfo])
     };
     Services.obs.notifyObservers(info, "addon-install-origin-blocked", null);
 
     return false;
   },
 
   /**
    * @see amIWebInstallListener.idl
    */
-  onWebInstallBlocked: function(aBrowser, aUri, aInstalls) {
+  onWebInstallBlocked(aBrowser, aUri, aInstalls) {
     let info = {
       browser: aBrowser,
       originatingURI: aUri,
       installs: aInstalls,
 
-      install: function() {
+      install() {
         new Installer(this.browser, this.originatingURI, this.installs);
       },
 
       QueryInterface: XPCOMUtils.generateQI([Ci.amIWebInstallInfo])
     };
     Services.obs.notifyObservers(info, "addon-install-blocked", null);
 
     return false;
   },
 
   /**
    * @see amIWebInstallListener.idl
    */
-  onWebInstallRequested: function(aBrowser, aUri, aInstalls) {
+  onWebInstallRequested(aBrowser, aUri, aInstalls) {
     new Installer(aBrowser, aUri, aInstalls);
 
     // We start the installs ourself
     return false;
   },
 
   classDescription: "XPI Install Handler",
   contractID: "@mozilla.org/addons/web-install-listener;1",
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -381,37 +381,37 @@ var HTML5History = {
   },
 
   get canGoForward() {
     return window.QueryInterface(Ci.nsIInterfaceRequestor)
                  .getInterface(Ci.nsIWebNavigation)
                  .canGoForward;
   },
 
-  back: function() {
+  back() {
     window.history.back();
     gViewController.updateCommand("cmd_back");
     gViewController.updateCommand("cmd_forward");
   },
 
-  forward: function() {
+  forward() {
     window.history.forward();
     gViewController.updateCommand("cmd_back");
     gViewController.updateCommand("cmd_forward");
   },
 
-  pushState: function(aState) {
+  pushState(aState) {
     window.history.pushState(aState, document.title);
   },
 
-  replaceState: function(aState) {
+  replaceState(aState) {
     window.history.replaceState(aState, document.title);
   },
 
-  popState: function() {
+  popState() {
     function onStatePopped(aEvent) {
       window.removeEventListener("popstate", onStatePopped, true);
       // TODO To ensure we can't go forward again we put an additional entry
       // for the current state into the history. Ideally we would just strip
       // the history but there doesn't seem to be a way to do that. Bug 590661
       window.history.pushState(aEvent.state, document.title);
     }
     window.addEventListener("popstate", onStatePopped, true);
@@ -435,47 +435,47 @@ var FakeHistory = {
   get canGoBack() {
     return this.pos > 0;
   },
 
   get canGoForward() {
     return (this.pos + 1) < this.states.length;
   },
 
-  back: function() {
+  back() {
     if (this.pos == 0)
       throw Components.Exception("Cannot go back from this point");
 
     this.pos--;
     gViewController.updateState(this.states[this.pos]);
     gViewController.updateCommand("cmd_back");
     gViewController.updateCommand("cmd_forward");
   },
 
-  forward: function() {
+  forward() {
     if ((this.pos + 1) >= this.states.length)
       throw Components.Exception("Cannot go forward from this point");
 
     this.pos++;
     gViewController.updateState(this.states[this.pos]);
     gViewController.updateCommand("cmd_back");
     gViewController.updateCommand("cmd_forward");
   },
 
-  pushState: function(aState) {
+  pushState(aState) {
     this.pos++;
     this.states.splice(this.pos, this.states.length);
     this.states.push(aState);
   },
 
-  replaceState: function(aState) {
+  replaceState(aState) {
     this.states[this.pos] = aState;
   },
 
-  popState: function() {
+  popState() {
     if (this.pos == 0)
       throw Components.Exception("Cannot popState from this view");
 
     this.states.splice(this.pos, this.states.length);
     this.pos--;
 
     gViewController.updateState(this.states[this.pos]);
     gViewController.updateCommand("cmd_back");
@@ -493,17 +493,17 @@ if (window.QueryInterface(Ci.nsIInterfac
 else {
   gHistory = FakeHistory;
 }
 
 var gEventManager = {
   _listeners: {},
   _installListeners: [],
 
-  initialize: function() {
+  initialize() {
     const ADDON_EVENTS = ["onEnabling", "onEnabled", "onDisabling",
                           "onDisabled", "onUninstalling", "onUninstalled",
                           "onInstalled", "onOperationCancelled",
                           "onUpdateAvailable", "onUpdateFinished",
                           "onCompatibilityUpdateAvailable",
                           "onPropertyChanged"];
     for (let evt of ADDON_EVENTS) {
       let event = evt;
@@ -570,53 +570,53 @@ var gEventManager = {
       else if (shouldShowVersionNumber(addonItem.mInstall)) {
         tiptext += " " + addonItem.mInstall.version;
       }
 
       addonTooltip.label = tiptext;
     }, false);
   },
 
-  shutdown: function() {
+  shutdown() {
     AddonManager.removeManagerListener(this);
     AddonManager.removeInstallListener(this);
     AddonManager.removeAddonListener(this);
   },
 
-  registerAddonListener: function(aListener, aAddonId) {
+  registerAddonListener(aListener, aAddonId) {
     if (!(aAddonId in this._listeners))
       this._listeners[aAddonId] = [];
     else if (this._listeners[aAddonId].indexOf(aListener) != -1)
       return;
     this._listeners[aAddonId].push(aListener);
   },
 
-  unregisterAddonListener: function(aListener, aAddonId) {
+  unregisterAddonListener(aListener, aAddonId) {
     if (!(aAddonId in this._listeners))
       return;
     var index = this._listeners[aAddonId].indexOf(aListener);
     if (index == -1)
       return;
     this._listeners[aAddonId].splice(index, 1);
   },
 
-  registerInstallListener: function(aListener) {
+  registerInstallListener(aListener) {
     if (this._installListeners.indexOf(aListener) != -1)
       return;
     this._installListeners.push(aListener);
   },
 
-  unregisterInstallListener: function(aListener) {
+  unregisterInstallListener(aListener) {
     var i = this._installListeners.indexOf(aListener);
     if (i == -1)
       return;
     this._installListeners.splice(i, 1);
   },
 
-  delegateAddonEvent: function(aEvent, aParams) {
+  delegateAddonEvent(aEvent, aParams) {
     var addon = aParams.shift();
     if (!(addon.id in this._listeners))
       return;
 
     var listeners = this._listeners[addon.id];
     for (let listener of listeners) {
       if (!(aEvent in listener))
         continue;
@@ -624,17 +624,17 @@ var gEventManager = {
         listener[aEvent].apply(listener, aParams);
       } catch (e) {
         // this shouldn't be fatal
         Cu.reportError(e);
       }
     }
   },
 
-  delegateInstallEvent: function(aEvent, aParams) {
+  delegateInstallEvent(aEvent, aParams) {
     var existingAddon = aEvent == "onExternalInstall" ? aParams[1] : aParams[0].existingAddon;
     // If the install is an update then send the event to all listeners
     // registered for the existing add-on
     if (existingAddon)
       this.delegateAddonEvent(aEvent, [existingAddon].concat(aParams));
 
     for (let listener of this._installListeners) {
       if (!(aEvent in listener))
@@ -643,17 +643,17 @@ var gEventManager = {
         listener[aEvent].apply(listener, aParams);
       } catch (e) {
         // this shouldn't be fatal
         Cu.reportError(e);
       }
     }
   },
 
-  refreshGlobalWarning: function() {
+  refreshGlobalWarning() {
     var page = document.getElementById("addons-page");
 
     if (Services.appinfo.inSafeMode) {
       page.setAttribute("warning", "safemode");
       return;
     }
 
     if (AddonManager.checkUpdateSecurityDefault &&
@@ -665,54 +665,54 @@ var gEventManager = {
     if (!AddonManager.checkCompatibility) {
       page.setAttribute("warning", "checkcompatibility");
       return;
     }
 
     page.removeAttribute("warning");
   },
 
-  refreshAutoUpdateDefault: function() {
+  refreshAutoUpdateDefault() {
     var updateEnabled = AddonManager.updateEnabled;
     var autoUpdateDefault = AddonManager.autoUpdateDefault;
 
     // The checkbox needs to reflect that both prefs need to be true
     // for updates to be checked for and applied automatically
     document.getElementById("utils-autoUpdateDefault")
             .setAttribute("checked", updateEnabled && autoUpdateDefault);
 
     document.getElementById("utils-resetAddonUpdatesToAutomatic").hidden = !autoUpdateDefault;
     document.getElementById("utils-resetAddonUpdatesToManual").hidden = autoUpdateDefault;
   },
 
-  onCompatibilityModeChanged: function() {
+  onCompatibilityModeChanged() {
     this.refreshGlobalWarning();
   },
 
-  onCheckUpdateSecurityChanged: function() {
+  onCheckUpdateSecurityChanged() {
     this.refreshGlobalWarning();
   },
 
-  onUpdateModeChanged: function() {
+  onUpdateModeChanged() {
     this.refreshAutoUpdateDefault();
   }
 };
 
 
 var gViewController = {
   viewPort: null,
   currentViewId: "",
   currentViewObj: null,
   currentViewRequest: 0,
   viewObjects: {},
   viewChangeCallback: null,
   initialViewSelected: false,
   lastHistoryIndex: -1,
 
-  initialize: function() {
+  initialize() {
     this.viewPort = document.getElementById("view-port");
     this.headeredViews = document.getElementById("headered-views");
     this.headeredViewsDeck = document.getElementById("headered-views-content");
 
     this.viewObjects["search"] = gSearchView;
     this.viewObjects["discover"] = gDiscoverView;
     this.viewObjects["list"] = gListView;
     this.viewObjects["detail"] = gDetailView;
@@ -726,17 +726,17 @@ var gViewController = {
     window.controllers.appendController(this);
 
     window.addEventListener("popstate", function(e) {
                               gViewController.updateState(e.state);
                             },
                             false);
   },
 
-  shutdown: function() {
+  shutdown() {
     if (this.currentViewObj)
       this.currentViewObj.hide();
     this.currentViewRequest = 0;
 
     for (let type in this.viewObjects) {
       let view = this.viewObjects[type];
       if ("shutdown" in view) {
         try {
@@ -746,17 +746,17 @@ var gViewController = {
           Cu.reportError(e);
         }
       }
     }
 
     window.controllers.removeController(this);
   },
 
-  updateState: function(state) {
+  updateState(state) {
     try {
       this.loadViewInternal(state.view, state.previousView, state);
       this.lastHistoryIndex = gHistory.index;
     }
     catch (e) {
       // The attempt to load the view failed, try moving further along history
       if (this.lastHistoryIndex > gHistory.index) {
         if (gHistory.canGoBack)
@@ -766,27 +766,27 @@ var gViewController = {
       } else if (gHistory.canGoForward) {
         gHistory.forward();
       } else {
         gViewController.replaceView(gViewDefault);
       }
     }
   },
 
-  parseViewId: function(aViewId) {
+  parseViewId(aViewId) {
     var matchRegex = /^addons:\/\/([^\/]+)\/(.*)$/;
     var [, viewType, viewParam] = aViewId.match(matchRegex) || [];
     return {type: viewType, param: decodeURIComponent(viewParam)};
   },
 
   get isLoading() {
     return !this.currentViewObj || this.currentViewObj.node.hasAttribute("loading");
   },
 
-  loadView: function(aViewId) {
+  loadView(aViewId) {
     var isRefresh = false;
     if (aViewId == this.currentViewId) {
       if (this.isLoading)
         return;
       if (!("refresh" in this.currentViewObj))
         return;
       if (!this.currentViewObj.canRefresh())
         return;
@@ -801,29 +801,29 @@ var gViewController = {
       gHistory.pushState(state);
       this.lastHistoryIndex = gHistory.index;
     }
     this.loadViewInternal(aViewId, this.currentViewId, state);
   },
 
   // Replaces the existing view with a new one, rewriting the current history
   // entry to match.
-  replaceView: function(aViewId) {
+  replaceView(aViewId) {
     if (aViewId == this.currentViewId)
       return;
 
     var state = {
       view: aViewId,
       previousView: null
     };
     gHistory.replaceState(state);
     this.loadViewInternal(aViewId, null, state);
   },
 
-  loadInitialView: function(aViewId) {
+  loadInitialView(aViewId) {
     var state = {
       view: aViewId,
       previousView: null
     };
     gHistory.replaceState(state);
 
     this.loadViewInternal(aViewId, null, state);
     this.initialViewSelected = true;
@@ -842,17 +842,17 @@ var gViewController = {
     if (node.parentNode == this.headeredViewsDeck) {
       this.headeredViewsDeck.selectedPanel = node;
       this.viewPort.selectedPanel = this.headeredViews;
     } else {
       this.viewPort.selectedPanel = node;
     }
   },
 
-  loadViewInternal: function(aViewId, aPreviousView, aState) {
+  loadViewInternal(aViewId, aPreviousView, aState) {
     var view = this.parseViewId(aViewId);
 
     if (!view.type || !(view.type in this.viewObjects))
       throw Components.Exception("Invalid view: " + view.type);
 
     var viewObj = this.viewObjects[view.type];
     if (!viewObj.node)
       throw Components.Exception("Root node doesn't exist for '" + view.type + "' view");
@@ -880,173 +880,173 @@ var gViewController = {
 
     if (aViewId == aPreviousView)
       this.currentViewObj.refresh(view.param, ++this.currentViewRequest, aState);
     else
       this.currentViewObj.show(view.param, ++this.currentViewRequest, aState);
   },
 
   // Moves back in the document history and removes the current history entry
-  popState: function(aCallback) {
+  popState(aCallback) {
     this.viewChangeCallback = aCallback;
     gHistory.popState();
   },
 
-  notifyViewChanged: function() {
+  notifyViewChanged() {
     this.displayedView.removeAttribute("loading");
 
     if (this.viewChangeCallback) {
       this.viewChangeCallback();
       this.viewChangeCallback = null;
     }
 
     var event = document.createEvent("Events");
     event.initEvent("ViewChanged", true, true);
     this.currentViewObj.node.dispatchEvent(event);
   },
 
   commands: {
     cmd_back: {
-      isEnabled: function() {
+      isEnabled() {
         return gHistory.canGoBack;
       },
-      doCommand: function() {
+      doCommand() {
         gHistory.back();
       }
     },
 
     cmd_forward: {
-      isEnabled: function() {
+      isEnabled() {
         return gHistory.canGoForward;
       },
-      doCommand: function() {
+      doCommand() {
         gHistory.forward();
       }
     },
 
     cmd_focusSearch: {
       isEnabled: () => true,
-      doCommand: function() {
+      doCommand() {
         gHeader.focusSearchBox();
       }
     },
 
     cmd_restartApp: {
-      isEnabled: function() {
+      isEnabled() {
         return true;
       },
-      doCommand: function() {
+      doCommand() {
         let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].
                          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);
       }
     },
 
     cmd_enableCheckCompatibility: {
-      isEnabled: function() {
+      isEnabled() {
         return true;
       },
-      doCommand: function() {
+      doCommand() {
         AddonManager.checkCompatibility = true;
       }
     },
 
     cmd_enableUpdateSecurity: {
-      isEnabled: function() {
+      isEnabled() {
         return true;
       },
-      doCommand: function() {
+      doCommand() {
         AddonManager.checkUpdateSecurity = true;
       }
     },
 
     cmd_toggleAutoUpdateDefault: {
-      isEnabled: function() {
+      isEnabled() {
         return true;
       },
-      doCommand: function() {
+      doCommand() {
         if (!AddonManager.updateEnabled || !AddonManager.autoUpdateDefault) {
           // One or both of the prefs is false, i.e. the checkbox is not checked.
           // Now toggle both to true. If the user wants us to auto-update
           // add-ons, we also need to auto-check for updates.
           AddonManager.updateEnabled = true;
           AddonManager.autoUpdateDefault = true;
         } else {
           // Both prefs are true, i.e. the checkbox is checked.
           // Toggle the auto pref to false, but don't touch the enabled check.
           AddonManager.autoUpdateDefault = false;
         }
       }
     },
 
     cmd_resetAddonAutoUpdate: {
-      isEnabled: function() {
+      isEnabled() {
         return true;
       },
-      doCommand: function() {
+      doCommand() {
         AddonManager.getAllAddons(function(aAddonList) {
           for (let addon of aAddonList) {
             if ("applyBackgroundUpdates" in addon)
               addon.applyBackgroundUpdates = AddonManager.AUTOUPDATE_DEFAULT;
           }
         });
       }
     },
 
     cmd_goToDiscoverPane: {
-      isEnabled: function() {
+      isEnabled() {
         return gDiscoverView.enabled;
       },
-      doCommand: function() {
+      doCommand() {
         gViewController.loadView("addons://discover/");
       }
     },
 
     cmd_goToRecentUpdates: {
-      isEnabled: function() {
+      isEnabled() {
         return true;
       },
-      doCommand: function() {
+      doCommand() {
         gViewController.loadView("addons://updates/recent");
       }
     },
 
     cmd_goToAvailableUpdates: {
-      isEnabled: function() {
+      isEnabled() {
         return true;
       },
-      doCommand: function() {
+      doCommand() {
         gViewController.loadView("addons://updates/available");
       }
     },
 
     cmd_showItemDetails: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         return !!aAddon && (gViewController.currentViewObj != gDetailView);
       },
-      doCommand: function(aAddon, aScrollToPreferences) {
+      doCommand(aAddon, aScrollToPreferences) {
         gViewController.loadView("addons://detail/" +
                                  encodeURIComponent(aAddon.id) +
                                  (aScrollToPreferences ? "/preferences" : ""));
       }
     },
 
     cmd_findAllUpdates: {
       inProgress: false,
-      isEnabled: function() {
+      isEnabled() {
         return !this.inProgress;
       },
-      doCommand: function() {
+      doCommand() {
         this.inProgress = true;
         gViewController.updateCommand("cmd_findAllUpdates");
         document.getElementById("updates-noneFound").hidden = true;
         document.getElementById("updates-progress").hidden = false;
         document.getElementById("updates-manualUpdatesFound-btn").hidden = true;
 
         var pendingChecks = 0;
         var numUpdated = 0;
@@ -1076,51 +1076,51 @@ var gViewController = {
             document.getElementById("updates-downloaded").hidden = false;
             document.getElementById("updates-restart-btn").hidden = false;
           } else {
             document.getElementById("updates-installed").hidden = false;
           }
         }
 
         var updateInstallListener = {
-          onDownloadFailed: function() {
+          onDownloadFailed() {
             pendingChecks--;
             updateStatus();
           },
-          onInstallFailed: function() {
+          onInstallFailed() {
             pendingChecks--;
             updateStatus();
           },
-          onInstallEnded: function(aInstall, aAddon) {
+          onInstallEnded(aInstall, aAddon) {
             pendingChecks--;
             numUpdated++;
             if (isPending(aInstall.existingAddon, "upgrade"))
               restartNeeded = true;
             updateStatus();
           }
         };
 
         var updateCheckListener = {
-          onUpdateAvailable: function(aAddon, aInstall) {
+          onUpdateAvailable(aAddon, aInstall) {
             gEventManager.delegateAddonEvent("onUpdateAvailable",
                                              [aAddon, aInstall]);
             if (AddonManager.shouldAutoUpdate(aAddon)) {
               aInstall.addListener(updateInstallListener);
               aInstall.install();
             } else {
               pendingChecks--;
               numManualUpdates++;
               updateStatus();
             }
           },
-          onNoUpdateAvailable: function(aAddon) {
+          onNoUpdateAvailable(aAddon) {
             pendingChecks--;
             updateStatus();
           },
-          onUpdateFinished: function(aAddon, aError) {
+          onUpdateFinished(aAddon, aError) {
             gEventManager.delegateAddonEvent("onUpdateFinished",
                                              [aAddon, aError]);
           }
         };
 
         AddonManager.getAddonsByTypes(null, function(aAddonList) {
           for (let addon of aAddonList) {
             if (addon.permissions & AddonManager.PERM_CAN_UPGRADE) {
@@ -1132,56 +1132,56 @@ var gViewController = {
 
           if (pendingChecks == 0)
             updateStatus();
         });
       }
     },
 
     cmd_findItemUpdates: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         if (!aAddon)
           return false;
         return hasPermission(aAddon, "upgrade");
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         var listener = {
-          onUpdateAvailable: function(aAddon, aInstall) {
+          onUpdateAvailable(aAddon, aInstall) {
             gEventManager.delegateAddonEvent("onUpdateAvailable",
                                              [aAddon, aInstall]);
             if (AddonManager.shouldAutoUpdate(aAddon))
               aInstall.install();
           },
-          onNoUpdateAvailable: function(aAddon) {
+          onNoUpdateAvailable(aAddon) {
             gEventManager.delegateAddonEvent("onNoUpdateAvailable",
                                              [aAddon]);
           }
         };
         gEventManager.delegateAddonEvent("onCheckingUpdate", [aAddon]);
         aAddon.findUpdates(listener, AddonManager.UPDATE_WHEN_USER_REQUESTED);
       }
     },
 
     cmd_showItemPreferences: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         if (!aAddon ||
             (!aAddon.isActive && !aAddon.isGMPlugin) ||
             !aAddon.optionsURL) {
           return false;
         }
         if (gViewController.currentViewObj == gDetailView &&
             (aAddon.optionsType == AddonManager.OPTIONS_TYPE_INLINE ||
              aAddon.optionsType == AddonManager.OPTIONS_TYPE_INLINE_BROWSER)) {
           return false;
         }
         if (aAddon.optionsType == AddonManager.OPTIONS_TYPE_INLINE_INFO)
           return false;
         return true;
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         if (hasInlineOptions(aAddon)) {
           gViewController.commands.cmd_showItemDetails.doCommand(aAddon, true);
           return;
         }
         var optionsURL = aAddon.optionsURL;
         if (aAddon.optionsType == AddonManager.OPTIONS_TYPE_TAB &&
             openOptionsInTab(optionsURL)) {
           return;
@@ -1204,140 +1204,140 @@ var gViewController = {
         } catch (e) {
           features += ",modal";
         }
         openDialog(optionsURL, "", features);
       }
     },
 
     cmd_showItemAbout: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         // XXXunf This may be applicable to install items too. See bug 561260
         return !!aAddon;
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         var aboutURL = aAddon.aboutURL;
         if (aboutURL)
           openDialog(aboutURL, "", "chrome,centerscreen,modal", aAddon);
         else
           openDialog("chrome://mozapps/content/extensions/about.xul",
                      "", "chrome,centerscreen,modal", aAddon);
       }
     },
 
     cmd_enableItem: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         if (!aAddon)
           return false;
         let addonType = AddonManager.addonTypes[aAddon.type];
         return (!(addonType.flags & AddonManager.TYPE_SUPPORTS_ASK_TO_ACTIVATE) &&
                 hasPermission(aAddon, "enable"));
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         aAddon.userDisabled = false;
       },
-      getTooltip: function(aAddon) {
+      getTooltip(aAddon) {
         if (!aAddon)
           return "";
         if (aAddon.operationsRequiringRestart & AddonManager.OP_NEEDS_RESTART_ENABLE)
           return gStrings.ext.GetStringFromName("enableAddonRestartRequiredTooltip");
         return gStrings.ext.GetStringFromName("enableAddonTooltip");
       }
     },
 
     cmd_disableItem: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         if (!aAddon)
           return false;
         let addonType = AddonManager.addonTypes[aAddon.type];
         return (!(addonType.flags & AddonManager.TYPE_SUPPORTS_ASK_TO_ACTIVATE) &&
                 hasPermission(aAddon, "disable"));
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         aAddon.userDisabled = true;
       },
-      getTooltip: function(aAddon) {
+      getTooltip(aAddon) {
         if (!aAddon)
           return "";
         if (aAddon.operationsRequiringRestart & AddonManager.OP_NEEDS_RESTART_DISABLE)
           return gStrings.ext.GetStringFromName("disableAddonRestartRequiredTooltip");
         return gStrings.ext.GetStringFromName("disableAddonTooltip");
       }
     },
 
     cmd_installItem: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         if (!aAddon)
           return false;
         return aAddon.install && aAddon.install.state == AddonManager.STATE_AVAILABLE;
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         function doInstall() {
           gViewController.currentViewObj.getListItemForID(aAddon.id)._installStatus.installRemote();
         }
 
         if (gViewController.currentViewObj == gDetailView)
           gViewController.popState(doInstall);
         else
           doInstall();
       }
     },
 
     cmd_purchaseItem: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         if (!aAddon)
           return false;
         return !!aAddon.purchaseURL;
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         openURL(aAddon.purchaseURL);
       }
     },
 
     cmd_uninstallItem: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         if (!aAddon)
           return false;
         return hasPermission(aAddon, "uninstall");
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         if (gViewController.currentViewObj != gDetailView) {
           aAddon.uninstall();
           return;
         }
 
         gViewController.popState(function() {
           gViewController.currentViewObj.getListItemForID(aAddon.id).uninstall();
         });
       },
-      getTooltip: function(aAddon) {
+      getTooltip(aAddon) {
         if (!aAddon)
           return "";
         if (aAddon.operationsRequiringRestart & AddonManager.OP_NEEDS_RESTART_UNINSTALL)
           return gStrings.ext.GetStringFromName("uninstallAddonRestartRequiredTooltip");
         return gStrings.ext.GetStringFromName("uninstallAddonTooltip");
       }
     },
 
     cmd_cancelUninstallItem: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         if (!aAddon)
           return false;
         return isPending(aAddon, "uninstall");
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         aAddon.cancelUninstall();
       }
     },
 
     cmd_installFromFile: {
-      isEnabled: function() {
+      isEnabled() {
         return true;
       },
-      doCommand: function() {
+      doCommand() {
         const nsIFilePicker = Ci.nsIFilePicker;
         var fp = Cc["@mozilla.org/filepicker;1"]
                    .createInstance(nsIFilePicker);
         fp.init(window,
                 gStrings.ext.GetStringFromName("installFromFile.dialogTitle"),
                 nsIFilePicker.modeOpenMultiple);
         try {
           fp.appendFilter(gStrings.ext.GetStringFromName("installFromFile.filterName"),
@@ -1371,185 +1371,185 @@ var gViewController = {
           });
         }
 
         buildNextInstall();
       }
     },
 
     cmd_debugAddons: {
-      isEnabled: function() {
+      isEnabled() {
         return true;
       },
-      doCommand: function() {
+      doCommand() {
         let mainWindow = getMainWindow();
         if ("switchToTabHavingURI" in mainWindow) {
           mainWindow.switchToTabHavingURI("about:debugging#addons", true);
         }
       },
     },
 
     cmd_cancelOperation: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         if (!aAddon)
           return false;
         return aAddon.pendingOperations != AddonManager.PENDING_NONE;
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         if (isPending(aAddon, "install")) {
           aAddon.install.cancel();
         } else if (isPending(aAddon, "upgrade")) {
           aAddon.pendingUpgrade.install.cancel();
         } else if (isPending(aAddon, "uninstall")) {
           aAddon.cancelUninstall();
         } else if (isPending(aAddon, "enable")) {
           aAddon.userDisabled = true;
         } else if (isPending(aAddon, "disable")) {
           aAddon.userDisabled = false;
         }
       }
     },
 
     cmd_contribute: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         if (!aAddon)
           return false;
         return ("contributionURL" in aAddon && aAddon.contributionURL);
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         openURL(aAddon.contributionURL);
       }
     },
 
     cmd_askToActivateItem: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         if (!aAddon)
           return false;
         let addonType = AddonManager.addonTypes[aAddon.type];
         return ((addonType.flags & AddonManager.TYPE_SUPPORTS_ASK_TO_ACTIVATE) &&
                 hasPermission(aAddon, "ask_to_activate"));
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         aAddon.userDisabled = AddonManager.STATE_ASK_TO_ACTIVATE;
       }
     },
 
     cmd_alwaysActivateItem: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         if (!aAddon)
           return false;
         let addonType = AddonManager.addonTypes[aAddon.type];
         return ((addonType.flags & AddonManager.TYPE_SUPPORTS_ASK_TO_ACTIVATE) &&
                 hasPermission(aAddon, "enable"));
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         aAddon.userDisabled = false;
       }
     },
 
     cmd_neverActivateItem: {
-      isEnabled: function(aAddon) {
+      isEnabled(aAddon) {
         if (!aAddon)
           return false;
         let addonType = AddonManager.addonTypes[aAddon.type];
         return ((addonType.flags & AddonManager.TYPE_SUPPORTS_ASK_TO_ACTIVATE) &&
                 hasPermission(aAddon, "disable"));
       },
-      doCommand: function(aAddon) {
+      doCommand(aAddon) {
         aAddon.userDisabled = true;
       }
     },
 
     cmd_experimentsLearnMore: {
-      isEnabled: function() {
+      isEnabled() {
         let mainWindow = getMainWindow();
         return mainWindow && "switchToTabHavingURI" in mainWindow;
       },
-      doCommand: function() {
+      doCommand() {
         let url = Services.prefs.getCharPref("toolkit.telemetry.infoURL");
         openOptionsInTab(url);
       },
     },
 
     cmd_experimentsOpenTelemetryPreferences: {
-      isEnabled: function() {
+      isEnabled() {
         return !!getMainWindowWithPreferencesPane();
       },
-      doCommand: function() {
+      doCommand() {
         let mainWindow = getMainWindowWithPreferencesPane();
         mainWindow.openAdvancedPreferences("dataChoicesTab");
       },
     },
 
     cmd_showUnsignedExtensions: {
-      isEnabled: function() {
+      isEnabled() {
         return true;
       },
-      doCommand: function() {
+      doCommand() {
         gViewController.loadView("addons://list/extension?unsigned=true");
       },
     },
 
     cmd_showAllExtensions: {
-      isEnabled: function() {
+      isEnabled() {
         return true;
       },
-      doCommand: function() {
+      doCommand() {
         gViewController.loadView("addons://list/extension");
       },
     },
   },
 
-  supportsCommand: function(aCommand) {
+  supportsCommand(aCommand) {
     return (aCommand in this.commands);
   },
 
-  isCommandEnabled: function(aCommand) {
+  isCommandEnabled(aCommand) {
     if (!this.supportsCommand(aCommand))
       return false;
     var addon = this.currentViewObj.getSelectedAddon();
     return this.commands[aCommand].isEnabled(addon);
   },
 
-  updateCommands: function() {
+  updateCommands() {
     // wait until the view is initialized
     if (!this.currentViewObj)
       return;
     var addon = this.currentViewObj.getSelectedAddon();
     for (let commandId in this.commands)
       this.updateCommand(commandId, addon);
   },
 
-  updateCommand: function(aCommandId, aAddon) {
+  updateCommand(aCommandId, aAddon) {
     if (typeof aAddon == "undefined")
       aAddon = this.currentViewObj.getSelectedAddon();
     var cmd = this.commands[aCommandId];
     var cmdElt = document.getElementById(aCommandId);
     cmdElt.setAttribute("disabled", !cmd.isEnabled(aAddon));
     if ("getTooltip" in cmd) {
       let tooltip = cmd.getTooltip(aAddon);
       if (tooltip)
         cmdElt.setAttribute("tooltiptext", tooltip);
       else
         cmdElt.removeAttribute("tooltiptext");
     }
   },
 
-  doCommand: function(aCommand, aAddon) {
+  doCommand(aCommand, aAddon) {
     if (!this.supportsCommand(aCommand))
       return;
     var cmd = this.commands[aCommand];
     if (!aAddon)
       aAddon = this.currentViewObj.getSelectedAddon();
     if (!cmd.isEnabled(aAddon))
       return;
     cmd.doCommand(aAddon);
   },
 
-  onEvent: function() {}
+  onEvent() {}
 };
 
 function hasInlineOptions(aAddon) {
   return (aAddon.optionsType == AddonManager.OPTIONS_TYPE_INLINE ||
           aAddon.optionsType == AddonManager.OPTIONS_TYPE_INLINE_BROWSER ||
           aAddon.optionsType == AddonManager.OPTIONS_TYPE_INLINE_INFO);
 }
 
@@ -1818,17 +1818,17 @@ function doPendingUninstalls(aListBox) {
   for (let addon of items)
     addon.uninstall();
 }
 
 var gCategories = {
   node: null,
   _search: null,
 
-  initialize: function() {
+  initialize() {
     this.node = document.getElementById("categories");
     this._search = this.get("addons://search/");
 
     var types = AddonManager.addonTypes;
     for (var type in types)
       this.onTypeAdded(types[type]);
 
     AddonManager.addTypeListener(this);
@@ -1858,21 +1858,21 @@ var gCategories = {
           viewId += encodeURIComponent(gHeader.searchQuery);
         }
 
         gViewController.loadView(viewId);
       }
     }, false);
   },
 
-  shutdown: function() {
+  shutdown() {
     AddonManager.removeTypeListener(this);
   },
 
-  _insertCategory: function(aId, aName, aView, aPriority, aStartHidden) {
+  _insertCategory(aId, aName, aView, aPriority, aStartHidden) {
     // If this category already exists then don't re-add it
     if (document.getElementById("category-" + aId))
       return;
 
     var category = document.createElement("richlistitem");
     category.setAttribute("id", "category-" + aId);
     category.setAttribute("value", aView);
     category.setAttribute("class", "category");
@@ -1896,29 +1896,29 @@ var gCategories = {
       // alphabetically then this is the insertion point
       if (String(aName).localeCompare(node.getAttribute("name")) < 0)
         break;
     }
 
     this.node.insertBefore(category, node);
   },
 
-  _removeCategory: function(aId) {
+  _removeCategory(aId) {
     var category = document.getElementById("category-" + aId);
     if (!category)
       return;
 
     // If this category is currently selected then switch to the default view
     if (this.node.selectedItem == category)
       gViewController.replaceView(gViewDefault);
 
     this.node.removeChild(category);
   },
 
-  onTypeAdded: function(aType) {
+  onTypeAdded(aType) {
     // Ignore types that we don't have a view object for
     if (!(aType.viewType in gViewController.viewObjects))
       return;
 
     var aViewId = "addons://" + aType.viewType + "/" + aType.id;
 
     var startHidden = false;
     if (aType.flags & AddonManager.TYPE_UI_HIDE_EMPTY) {
@@ -1944,29 +1944,29 @@ var gCategories = {
         Services.prefs.setBoolPref(prefName, hidden);
 
         if (aAddonsList.length > 0 || aInstallsList.length > 0) {
           notifyInitialized();
           return;
         }
 
         gEventManager.registerInstallListener({
-          onDownloadStarted: function(aInstall) {
+          onDownloadStarted(aInstall) {
             this._maybeShowCategory(aInstall);
           },
 
-          onInstallStarted: function(aInstall) {
+          onInstallStarted(aInstall) {
             this._maybeShowCategory(aInstall);
           },
 
-          onInstallEnded: function(aInstall, aAddon) {
+          onInstallEnded(aInstall, aAddon) {
             this._maybeShowCategory(aAddon);
           },
 
-          onExternalInstall: function(aAddon, aExistingAddon, aRequiresRestart) {
+          onExternalInstall(aAddon, aExistingAddon, aRequiresRestart) {
             this._maybeShowCategory(aAddon);
           },
 
           _maybeShowCategory: aAddon => {
             if (aType.id == aAddon.type) {
               this.get(aViewId).hidden = false;
               Services.prefs.setBoolPref(prefName, false);
               gEventManager.unregisterInstallListener(this);
@@ -1977,25 +1977,25 @@ var gCategories = {
         notifyInitialized();
       });
     }
 
     this._insertCategory(aType.id, aType.name, aViewId, aType.uiPriority,
                          startHidden);
   },
 
-  onTypeRemoved: function(aType) {
+  onTypeRemoved(aType) {
     this._removeCategory(aType.id);
   },
 
   get selected() {
     return this.node.selectedItem ? this.node.selectedItem.value : null;
   },
 
-  select: function(aId, aPreviousView) {
+  select(aId, aPreviousView) {
     var view = gViewController.parseViewId(aId);
     if (view.type == "detail" && aPreviousView) {
       aId = aPreviousView;
       view = gViewController.parseViewId(aPreviousView);
     }
     aId = aId.replace(/\?.*/, "");
 
     Services.prefs.setCharPref(PREF_UI_LASTCATEGORY, aId);
@@ -2020,41 +2020,41 @@ var gCategories = {
       this.node.selectedItem = item;
       this.node.suppressOnSelect = false;
       this.node.ensureElementIsVisible(item);
 
       this.maybeHideSearch();
     }
   },
 
-  get: function(aId) {
+  get(aId) {
     var items = document.getElementsByAttribute("value", aId);
     if (items.length)
       return items[0];
     return null;
   },
 
-  setBadge: function(aId, aCount) {
+  setBadge(aId, aCount) {
     let item = this.get(aId);
     if (item)
       item.badgeCount = aCount;
   },
 
-  maybeHideSearch: function() {
+  maybeHideSearch() {
     var view = gViewController.parseViewId(this.node.selectedItem.value);
     this._search.disabled = view.type != "search";
   }
 };
 
 
 var gHeader = {
   _search: null,
   _dest: "",
 
-  initialize: function() {
+  initialize() {
     this._search = document.getElementById("header-search");
 
     this._search.addEventListener("command", function(aEvent) {
       var query = aEvent.target.value;
       if (query.length == 0)
         return;
 
       gViewController.loadView("addons://search/" + encodeURIComponent(query));
@@ -2069,21 +2069,21 @@ var gHeader = {
     window.addEventListener("focus", function(aEvent) {
       if (aEvent.target == window)
         updateNavButtonVisibility();
     }, false);
 
     updateNavButtonVisibility();
   },
 
-  focusSearchBox: function() {
+  focusSearchBox() {
     this._search.focus();
   },
 
-  onKeyPress: function(aEvent) {
+  onKeyPress(aEvent) {
     if (String.fromCharCode(aEvent.charCode) == "/") {
       this.focusSearchBox();
       return;
     }
   },
 
   get shouldShowNavButtons() {
     var docshellItem = window.QueryInterface(Ci.nsIInterfaceRequestor)
@@ -2134,17 +2134,17 @@ var gDiscoverView = {
   loaded: false,
   _browser: null,
   _loading: null,
   _error: null,
   homepageURL: null,
   _loadListeners: [],
   hideHeader: true,
 
-  initialize: function() {
+  initialize() {
     this.enabled = isDiscoverEnabled();
     if (!this.enabled) {
       gCategories.get("addons://discover/").hidden = true;
       return;
     }
 
     this.node = document.getElementById("discover-view");
     this._loading = document.getElementById("discover-loading");
@@ -2203,26 +2203,26 @@ var gDiscoverView = {
           isBlocklisted: addon.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED
         }
       }
 
       setURL(url + "#" + JSON.stringify(list));
     });
   },
 
-  destroy: function() {
+  destroy() {
     try {
       this._browser.removeProgressListener(this);
     }
     catch (e) {
       // Ignore the case when the listener wasn't already registered
     }
   },
 
-  show: function(aParam, aRequest, aState, aIsRefresh) {
+  show(aParam, aRequest, aState, aIsRefresh) {
     gViewController.updateCommands();
 
     // If we're being told to load a specific URL then just do that
     if (aState && "url" in aState) {
       this.loaded = true;
       this._loadURL(aState.url);
     }
 
@@ -2243,51 +2243,51 @@ var gDiscoverView = {
       this._loadListeners.push(gViewController.notifyViewChanged.bind(gViewController));
       return;
     }
 
     this._loadURL(this.homepageURL.spec, aIsRefresh,
                   gViewController.notifyViewChanged.bind(gViewController));
   },
 
-  canRefresh: function() {
+  canRefresh() {
     if (this._browser.currentURI &&
         this._browser.currentURI.spec == this._browser.homePage)
       return false;
     return true;
   },
 
-  refresh: function(aParam, aRequest, aState) {
+  refresh(aParam, aRequest, aState) {
     this.show(aParam, aRequest, aState, true);
   },
 
-  hide: function() { },
-
-  showError: function() {
+  hide() { },
+
+  showError() {
     this.node.selectedPanel = this._error;
   },
 
-  _loadURL: function(aURL, aKeepHistory, aCallback) {
+  _loadURL(aURL, aKeepHistory, aCallback) {
     if (this._browser.currentURI.spec == aURL) {
       if (aCallback)
         aCallback();
       return;
     }
 
     if (aCallback)
       this._loadListeners.push(aCallback);
 
     var flags = 0;
     if (!aKeepHistory)
       flags |= Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY;
 
     this._browser.loadURIWithFlags(aURL, flags);
   },
 
-  onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {
+  onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
     // Ignore the about:blank load
     if (aLocation.spec == "about:blank")
       return;
 
     // When using the real session history the inner-frame will update the
     // session history automatically, if using the fake history though it must
     // be manually updated
     if (gHistory == FakeHistory) {
@@ -2315,31 +2315,31 @@ var gDiscoverView = {
         (!this.homepageURL.schemeIs("https") || aLocation.schemeIs("https")))
       return;
 
     // Canceling the request will send an error to onStateChange which will show
     // the error page
     aRequest.cancel(Components.results.NS_BINDING_ABORTED);
   },
 
-  onSecurityChange: function(aWebProgress, aRequest, aState) {
+  onSecurityChange(aWebProgress, aRequest, aState) {
     // Don't care about security if the page is not https
     if (!this.homepageURL.schemeIs("https"))
       return;
 
     // If the request was secure then it is ok
     if (aState & Ci.nsIWebProgressListener.STATE_IS_SECURE)
       return;
 
     // Canceling the request will send an error to onStateChange which will show
     // the error page
     aRequest.cancel(Components.results.NS_BINDING_ABORTED);
   },
 
-  onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
     let transferStart = Ci.nsIWebProgressListener.STATE_IS_DOCUMENT |
                         Ci.nsIWebProgressListener.STATE_IS_REQUEST |
                         Ci.nsIWebProgressListener.STATE_TRANSFERRING;
     // Once transferring begins show the content
     if ((aStateFlags & transferStart) === transferStart)
       this.node.selectedPanel = this._browser;
 
     // Only care about the network events
@@ -2373,23 +2373,23 @@ var gDiscoverView = {
 
     var listeners = this._loadListeners;
     this._loadListeners = [];
 
     for (let listener of listeners)
       listener();
   },
 
-  onProgressChange: function() { },
-  onStatusChange: function() { },
+  onProgressChange() { },
+  onStatusChange() { },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
                                          Ci.nsISupportsWeakReference]),
 
-  getSelectedAddon: function() {
+  getSelectedAddon() {
     return null;
   }
 };
 
 
 var gCachedAddons = {};
 
 var gSearchView = {
@@ -2399,17 +2399,17 @@ var gSearchView = {
   _loading: null,
   _listBox: null,
   _emptyNotice: null,
   _allResultsLink: null,
   _lastQuery: null,
   _lastRemoteTotal: 0,
   _pendingSearches: 0,
 
-  initialize: function() {
+  initialize() {
     this.node = document.getElementById("search-view");
     this._filter = document.getElementById("search-filter-radiogroup");
     this._sorters = document.getElementById("search-sorters");
     this._sorters.handler = this;
     this._loading = document.getElementById("search-loading");
     this._listBox = document.getElementById("search-list");
     this._emptyNotice = document.getElementById("search-list-empty");
     this._allResultsLink = document.getElementById("search-allresults-link");
@@ -2423,26 +2423,26 @@ var gSearchView = {
         if (item)
           item.showInDetailView();
       }
     }, false);
 
     this._filter.addEventListener("command", () => this.updateView(), false);
   },
 
-  shutdown: function() {
+  shutdown() {
     if (AddonRepository.isSearching)
       AddonRepository.cancelSearch();
   },
 
   get isSearching() {
     return this._pendingSearches > 0;
   },
 
-  show: function(aQuery, aRequest) {
+  show(aQuery, aRequest) {
     gEventManager.registerInstallListener(this);
 
     this.showEmptyNotice(false);
     this.showAllResultsLink(0);
     this.showLoading(true);
     this._sorters.showprice = false;
 
     gHeader.searchQuery = aQuery;
@@ -2543,22 +2543,22 @@ var gSearchView = {
           this._lastRemoteTotal = 0;
 
         var createdCount = createSearchResults(aAddonsList, false, true);
         finishSearch(createdCount);
       }
     });
   },
 
-  showLoading: function(aLoading) {
+  showLoading(aLoading) {
     this._loading.hidden = !aLoading;
     this._listBox.hidden = aLoading;
   },
 
-  updateView: function() {
+  updateView() {
     var showLocal = this._filter.value == "local";
 
     if (!showLocal && !AddonManager.isInstallEnabled("application/x-xpinstall"))
       showLocal = true;
 
     this._listBox.setAttribute("local", showLocal);
     this._listBox.setAttribute("remote", !showLocal);
 
@@ -2576,31 +2576,31 @@ var gSearchView = {
 
       this.showEmptyNotice(isEmpty);
       this.showAllResultsLink(this._lastRemoteTotal);
     }
 
     gViewController.updateCommands();
   },
 
-  hide: function() {
+  hide() {
     gEventManager.unregisterInstallListener(this);
     doPendingUninstalls(this._listBox);
   },
 
-  getMatchScore: function(aObj, aQuery) {
+  getMatchScore(aObj, aQuery) {
     var score = 0;
     score += this.calculateMatchScore(aObj.name, aQuery,
                                       SEARCH_SCORE_MULTIPLIER_NAME);
     score += this.calculateMatchScore(aObj.description, aQuery,
                                       SEARCH_SCORE_MULTIPLIER_DESCRIPTION);
     return score;
   },
 
-  calculateMatchScore: function(aStr, aQuery, aMultiplier) {
+  calculateMatchScore(aStr, aQuery, aMultiplier) {
     var score = 0;
     if (!aStr || aQuery.length == 0)
       return score;
 
     aStr = aStr.trim().toLocaleLowerCase();
     var haystack = aStr.split(/\s+/);
     var needles = aQuery.split(/\s+/);
 
@@ -2622,38 +2622,38 @@ var gSearchView = {
     // give progressively higher score for longer queries, since longer queries
     // are more likely to be unique and therefore more relevant.
     if (needles.length > 1 && aStr.indexOf(aQuery) != -1)
       score += needles.length;
 
     return score * aMultiplier;
   },
 
-  showEmptyNotice: function(aShow) {
+  showEmptyNotice(aShow) {
     this._emptyNotice.hidden = !aShow;
     this._listBox.hidden = aShow;
   },
 
-  showAllResultsLink: function(aTotalResults) {
+  showAllResultsLink(aTotalResults) {
     if (aTotalResults == 0) {
       this._allResultsLink.hidden = true;
       return;
     }
 
     var linkStr = gStrings.ext.GetStringFromName("showAllSearchResults");
     linkStr = PluralForm.get(aTotalResults, linkStr);
     linkStr = linkStr.replace("#1", aTotalResults);
     this._allResultsLink.setAttribute("value", linkStr);
 
     this._allResultsLink.setAttribute("href",
                                       AddonRepository.getSearchURL(this._lastQuery));
     this._allResultsLink.hidden = false;
  },
 
-  updateListAttributes: function() {
+  updateListAttributes() {
     var item = this._listBox.querySelector("richlistitem[remote='true'][first]");
     if (item)
       item.removeAttribute("first");
     item = this._listBox.querySelector("richlistitem[remote='true'][last]");
     if (item)
       item.removeAttribute("last");
     var items = this._listBox.querySelectorAll("richlistitem[remote='true']");
     if (items.length > 0) {
@@ -2670,51 +2670,51 @@ var gSearchView = {
     items = this._listBox.querySelectorAll("richlistitem:not([remote='true'])");
     if (items.length > 0) {
       items[0].setAttribute("first", true);
       items[items.length - 1].setAttribute("last", true);
     }
 
   },
 
-  onSortChanged: function(aSortBy, aAscending) {
+  onSortChanged(aSortBy, aAscending) {
     var footer = this._listBox.lastChild;
     this._listBox.removeChild(footer);
 
     sortList(this._listBox, aSortBy, aAscending);
     this.updateListAttributes();
 
     this._listBox.appendChild(footer);
   },
 
-  onDownloadCancelled: function(aInstall) {
+  onDownloadCancelled(aInstall) {
     this.removeInstall(aInstall);
   },
 
-  onInstallCancelled: function(aInstall) {
+  onInstallCancelled(aInstall) {
     this.removeInstall(aInstall);
   },
 
-  removeInstall: function(aInstall) {
+  removeInstall(aInstall) {
     for (let item of this._listBox.childNodes) {
       if (item.mInstall == aInstall) {
         this._listBox.removeChild(item);
         return;
       }
     }
   },
 
-  getSelectedAddon: function() {
+  getSelectedAddon() {
     var item = this._listBox.selectedItem;
     if (item)
       return item.mAddon;
     return null;
   },
 
-  getListItemForID: function(aId) {
+  getListItemForID(aId) {
     var listitem = this._listBox.firstChild;
     while (listitem) {
       if (listitem.getAttribute("status") == "installed" && listitem.mAddon.id == aId)
         return listitem;
       listitem = listitem.nextSibling;
     }
     return null;
   }
@@ -2722,17 +2722,17 @@ var gSearchView = {
 
 
 var gListView = {
   node: null,
   _listBox: null,
   _emptyNotice: null,
   _type: null,
 
-  initialize: function() {
+  initialize() {
     this.node = document.getElementById("list-view");
     this._listBox = document.getElementById("addon-list");
     this._emptyNotice = document.getElementById("addon-list-empty");
 
     this._listBox.addEventListener("keydown", (aEvent) => {
       if (aEvent.keyCode == aEvent.DOM_VK_RETURN) {
         var item = this._listBox.selectedItem;
         if (item)
@@ -2768,17 +2768,17 @@ var gListView = {
     if (Preferences.get("extensions.getAddons.themes.browseURL", "")) {
       document.getElementById("getthemes-learnmore-link")
         .setAttribute("href", Services.urlFormatter.formatURLPref("extensions.getAddons.themes.browseURL"));
     } else {
       document.getElementById("getthemes-container").hidden = true;
     }
   },
 
-  show: function(aType, aRequest) {
+  show(aType, aRequest) {
     let showOnlyDisabledUnsigned = false;
     if (aType.endsWith("?unsigned=true")) {
       aType = aType.replace(/\?.*/, "");
       showOnlyDisabledUnsigned = true;
     }
 
     if (!(aType in AddonManager.addonTypes))
       throw Components.Exception("Attempting to show unknown type " + aType, Cr.NS_ERROR_INVALID_ARG);
@@ -2816,22 +2816,22 @@ var gListView = {
       this.filterDisabledUnsigned(showOnlyDisabledUnsigned);
 
       gEventManager.registerInstallListener(this);
       gViewController.updateCommands();
       gViewController.notifyViewChanged();
     });
   },
 
-  hide: function() {
+  hide() {
     gEventManager.unregisterInstallListener(this);
     doPendingUninstalls(this._listBox);
   },
 
-  filterDisabledUnsigned: function(aFilter = true) {
+  filterDisabledUnsigned(aFilter = true) {
     let foundDisabledUnsigned = false;
 
     if (SIGNING_REQUIRED) {
       for (let item of this._listBox.childNodes) {
         if (!isCorrectlySigned(item.mAddon))
           foundDisabledUnsigned = true;
         else
           item.hidden = aFilter;
@@ -2840,67 +2840,67 @@ var gListView = {
 
     document.getElementById("show-disabled-unsigned-extensions").hidden =
       aFilter || !foundDisabledUnsigned;
 
     document.getElementById("show-all-extensions").hidden = !aFilter;
     document.getElementById("disabled-unsigned-addons-info").hidden = !aFilter;
   },
 
-  showEmptyNotice: function(aShow) {
+  showEmptyNotice(aShow) {
     this._emptyNotice.hidden = !aShow;
     this._listBox.hidden = aShow;
   },
 
-  onSortChanged: function(aSortBy, aAscending) {
+  onSortChanged(aSortBy, aAscending) {
     sortList(this._listBox, aSortBy, aAscending);
   },
 
-  onExternalInstall: function(aAddon, aExistingAddon, aRequiresRestart) {
+  onExternalInstall(aAddon, aExistingAddon, aRequiresRestart) {
     // The existing list item will take care of upgrade installs
     if (aExistingAddon)
       return;
 
     if (aAddon.hidden)
       return;
 
     this.addItem(aAddon);
   },
 
-  onDownloadStarted: function(aInstall) {
+  onDownloadStarted(aInstall) {
     this.addItem(aInstall, true);
   },
 
-  onInstallStarted: function(aInstall) {
+  onInstallStarted(aInstall) {
     this.addItem(aInstall, true);
   },
 
-  onDownloadCancelled: function(aInstall) {
+  onDownloadCancelled(aInstall) {
     this.removeItem(aInstall, true);
   },
 
-  onInstallCancelled: function(aInstall) {
+  onInstallCancelled(aInstall) {
     this.removeItem(aInstall, true);
   },
 
-  onInstallEnded: function(aInstall) {
+  onInstallEnded(aInstall) {
     // Remove any install entries for upgrades, their status will appear against
     // the existing item
     if (aInstall.existingAddon)
       this.removeItem(aInstall, true);
 
     if (aInstall.addon.type == "experiment") {
       let item = this.getListItemForID(aInstall.addon.id);
       if (item) {
         item.endDate = getExperimentEndDate(aInstall.addon);
       }
     }
   },
 
-  addItem: function(aObj, aIsInstall) {
+  addItem(aObj, aIsInstall) {
     if (aObj.type != this._type)
       return;
 
     if (aIsInstall && aObj.existingAddon)
       return;
 
     let prop = aIsInstall ? "mInstall" : "mAddon";
     for (let item of this._listBox.childNodes) {
@@ -2908,36 +2908,36 @@ var gListView = {
         return;
     }
 
     let item = createItem(aObj, aIsInstall);
     this._listBox.insertBefore(item, this._listBox.firstChild);
     this.showEmptyNotice(false);
   },
 
-  removeItem: function(aObj, aIsInstall) {
+  removeItem(aObj, aIsInstall) {
     let prop = aIsInstall ? "mInstall" : "mAddon";
 
     for (let item of this._listBox.childNodes) {
       if (item[prop] == aObj) {
         this._listBox.removeChild(item);
         this.showEmptyNotice(this._listBox.itemCount == 0);
         return;
       }
     }
   },
 
-  getSelectedAddon: function() {
+  getSelectedAddon() {
     var item = this._listBox.selectedItem;
     if (item)
       return item.mAddon;
     return null;
   },
 
-  getListItemForID: function(aId) {
+  getListItemForID(aId) {
     var listitem = this._listBox.firstChild;
     while (listitem) {
       if (listitem.getAttribute("status") == "installed" && listitem.mAddon.id == aId)
         return listitem;
       listitem = listitem.nextSibling;
     }
     return null;
   }
@@ -2945,35 +2945,35 @@ var gListView = {
 
 
 var gDetailView = {
   node: null,
   _addon: null,
   _loadingTimer: null,
   _autoUpdate: null,
 
-  initialize: function() {
+  initialize() {
     this.node = document.getElementById("detail-view");
 
     this._autoUpdate = document.getElementById("detail-autoUpdate");
 
     this._autoUpdate.addEventListener("command", () => {
       this._addon.applyBackgroundUpdates = this._autoUpdate.value;
     }, true);
   },
 
-  shutdown: function() {
+  shutdown() {
     AddonManager.removeManagerListener(this);
   },
 
-  onUpdateModeChanged: function() {
+  onUpdateModeChanged() {
     this.onPropertyChanged(["applyBackgroundUpdates"]);
   },
 
-  _updateView: function(aAddon, aIsRemote, aScrollToPreferences) {
+  _updateView(aAddon, aIsRemote, aScrollToPreferences) {
     AddonManager.addManagerListener(this);
     this.clearLoading();
 
     this._addon = aAddon;
     gEventManager.registerAddonListener(this, aAddon.id);
     gEventManager.registerInstallListener(this);
 
     this.node.setAttribute("type", aAddon.type);
@@ -3180,17 +3180,17 @@ var gDetailView = {
     }
 
     this.fillSettingsRows(aScrollToPreferences, (function() {
       this.updateState();
       gViewController.notifyViewChanged();
     }).bind(this));
   },
 
-  show: function(aAddonId, aRequest) {
+  show(aAddonId, aRequest) {
     let index = aAddonId.indexOf("/preferences");
     let scrollToPreferences = false;
     if (index >= 0) {
       aAddonId = aAddonId.substring(0, index);
       scrollToPreferences = true;
     }
 
     this._loadingTimer = setTimeout(() => {
@@ -3224,17 +3224,17 @@ var gDetailView = {
         // This might happen due to session restore restoring us back to an
         // add-on that doesn't exist but otherwise shouldn't normally happen.
         // Either way just revert to the default view.
         gViewController.replaceView(gViewDefault);
       });
     });
   },
 
-  hide: function() {
+  hide() {
     AddonManager.removeManagerListener(this);
     this.clearLoading();
     if (this._addon) {
       if (hasInlineOptions(this._addon)) {
         Services.obs.notifyObservers(document,
                                      AddonManager.OPTIONS_NOTIFICATION_HIDDEN,
                                      this._addon.id);
       }
@@ -3244,17 +3244,17 @@ var gDetailView = {
       this._addon = null;
 
       // Flush the preferences to disk so they survive any crash
       if (this.node.getElementsByTagName("setting").length)
         Services.prefs.savePrefFile(null);
     }
   },
 
-  updateState: function() {
+  updateState() {
     gViewController.updateCommands();
 
     var pending = this._addon.pendingOperations;
     if (pending != AddonManager.PENDING_NONE) {
       this.node.removeAttribute("notification");
 
       pending = null;
       const PENDING_OPERATIONS = ["enable", "disable", "install", "uninstall",
@@ -3382,33 +3382,33 @@ var gDetailView = {
       menulist.classList.add('no-auto-hide');
     } else {
       menulist.hidden = true;
     }
 
     this.node.setAttribute("active", this._addon.isActive);
   },
 
-  clearLoading: function() {
+  clearLoading() {
     if (this._loadingTimer) {
       clearTimeout(this._loadingTimer);
       this._loadingTimer = null;
     }
 
     this.node.removeAttribute("loading-extended");
   },
 
-  emptySettingsRows: function() {
+  emptySettingsRows() {
     var lastRow = document.getElementById("detail-downloads");
     var rows = lastRow.parentNode;
     while (lastRow.nextSibling)
       rows.removeChild(rows.lastChild);
   },
 
-  fillSettingsRows: function(aScrollToPreferences, aCallback) {
+  fillSettingsRows(aScrollToPreferences, aCallback) {
     this.emptySettingsRows();
     if (!hasInlineOptions(this._addon)) {
       if (aCallback)
         aCallback();
       return;
     }
 
     // We can't use a promise for this, since some code (especially in tests)
@@ -3523,17 +3523,17 @@ var gDetailView = {
       }
     } catch (e) {
       Cu.reportError(e);
       if (aCallback)
         aCallback();
     }
   },
 
-  scrollToPreferencesRows: function() {
+  scrollToPreferencesRows() {
     // We find this row, rather than remembering it from above,
     // in case it has been changed by the observers.
     let firstRow = gDetailView.node.querySelector('setting[first-row="true"]');
     if (firstRow) {
       let top = firstRow.boxObject.y;
       top -= parseInt(window.getComputedStyle(firstRow, null).getPropertyValue("margin-top"));
 
       let detailViewBoxObject = gDetailView.node.boxObject;
@@ -3586,95 +3586,95 @@ var gDetailView = {
       mm.addMessageListener("Extension:BrowserContentLoaded", messageListener);
       mm.addMessageListener("Extension:BrowserResized", messageListener);
       mm.sendAsyncMessage("Extension:InitBrowser", {fixedWidth: true});
 
       browser.loadURI(optionsURL);
     });
   }),
 
-  getSelectedAddon: function() {
+  getSelectedAddon() {
     return this._addon;
   },
 
-  onEnabling: function() {
+  onEnabling() {
     this.updateState();
   },
 
-  onEnabled: function() {
+  onEnabled() {
     this.updateState();
     this.fillSettingsRows();
   },
 
-  onDisabling: function(aNeedsRestart) {
+  onDisabling(aNeedsRestart) {
     this.updateState();
     if (!aNeedsRestart && hasInlineOptions(this._addon)) {
       Services.obs.notifyObservers(document,
                                    AddonManager.OPTIONS_NOTIFICATION_HIDDEN,
                                    this._addon.id);
     }
   },
 
-  onDisabled: function() {
+  onDisabled() {
     this.updateState();
     this.emptySettingsRows();
   },
 
-  onUninstalling: function() {
+  onUninstalling() {
     this.updateState();
   },
 
-  onUninstalled: function() {
+  onUninstalled() {
     gViewController.popState();
   },
 
-  onOperationCancelled: function() {
+  onOperationCancelled() {
     this.updateState();
   },
 
-  onPropertyChanged: function(aProperties) {
+  onPropertyChanged(aProperties) {
     if (aProperties.indexOf("applyBackgroundUpdates") != -1) {
       this._autoUpdate.value = this._addon.applyBackgroundUpdates;
       let hideFindUpdates = AddonManager.shouldAutoUpdate(this._addon);
       document.getElementById("detail-findUpdates-btn").hidden = hideFindUpdates;
     }
 
     if (aProperties.indexOf("appDisabled") != -1 ||
         aProperties.indexOf("signedState") != -1 ||
         aProperties.indexOf("userDisabled") != -1)
       this.updateState();
   },
 
-  onExternalInstall: function(aAddon, aExistingAddon, aNeedsRestart) {
+  onExternalInstall(aAddon, aExistingAddon, aNeedsRestart) {
     // Only care about upgrades for the currently displayed add-on
     if (!aExistingAddon || aExistingAddon.id != this._addon.id)
       return;
 
     if (!aNeedsRestart)
       this._updateView(aAddon, false);
     else
       this.updateState();
   },
 
-  onInstallCancelled: function(aInstall) {
+  onInstallCancelled(aInstall) {
     if (aInstall.addon.id == this._addon.id)
       gViewController.popState();
   }
 };
 
 
 var gUpdatesView = {
   node: null,
   _listBox: null,
   _emptyNotice: null,
   _sorters: null,
   _updateSelected: null,
   _categoryItem: null,
 
-  initialize: function() {
+  initialize() {
     this.node = document.getElementById("updates-view");
     this._listBox = document.getElementById("updates-list");
     this._emptyNotice = document.getElementById("updates-list-empty");
     this._sorters = document.getElementById("updates-sorters");
     this._sorters.handler = this;
 
     this._categoryItem = gCategories.get("addons://updates/available");
 
@@ -3684,43 +3684,43 @@ var gUpdatesView = {
     }, false);
 
     this.updateAvailableCount(true);
 
     AddonManager.addAddonListener(this);
     AddonManager.addInstallListener(this);
   },
 
-  shutdown: function() {
+  shutdown() {
     AddonManager.removeAddonListener(this);
     AddonManager.removeInstallListener(this);
   },
 
-  show: function(aType, aRequest) {
+  show(aType, aRequest) {
     document.getElementById("empty-availableUpdates-msg").hidden = aType != "available";
     document.getElementById("empty-recentUpdates-msg").hidden = aType != "recent";
     this.showEmptyNotice(false);
 
     while (this._listBox.itemCount > 0)
       this._listBox.removeItemAt(0);
 
     this.node.setAttribute("updatetype", aType);
     if (aType == "recent")
       this._showRecentUpdates(aRequest);
     else
       this._showAvailableUpdates(false, aRequest);
   },
 
-  hide: function() {
+  hide() {
     this._updateSelected.hidden = true;
     this._categoryItem.disabled = this._categoryItem.badgeCount == 0;
     doPendingUninstalls(this._listBox);
   },
 
-  _showRecentUpdates: function(aRequest) {
+  _showRecentUpdates(aRequest) {
     AddonManager.getAllAddons((aAddonsList) => {
       if (gViewController && aRequest != gViewController.currentViewRequest)
         return;
 
       var elements = [];
       let threshold = Date.now() - UPDATES_RECENT_TIMESPAN;
       for (let addon of aAddonsList) {
         if (addon.hidden || !addon.updateDate || addon.updateDate.getTime() < threshold)
@@ -3735,17 +3735,17 @@ var gUpdatesView = {
         for (let element of elements)
           this._listBox.appendChild(element);
       }
 
       gViewController.notifyViewChanged();
     });
   },
 
-  _showAvailableUpdates: function(aIsRefresh, aRequest) {
+  _showAvailableUpdates(aIsRefresh, aRequest) {
     /* Disable the Update Selected button so it can't get clicked
        before everything is initialized asynchronously.
        It will get re-enabled by maybeDisableUpdateSelected(). */
     this._updateSelected.disabled = true;
 
     AddonManager.getAllInstalls((aInstallsList) => {
       if (!aIsRefresh && gViewController && aRequest &&
           aRequest != gViewController.currentViewRequest)
@@ -3783,122 +3783,122 @@ var gUpdatesView = {
 
       // ensure badge count is in sync
       this._categoryItem.badgeCount = this._listBox.itemCount;
 
       gViewController.notifyViewChanged();
     });
   },
 
-  showEmptyNotice: function(aShow) {
+  showEmptyNotice(aShow) {
     this._emptyNotice.hidden = !aShow;
     this._listBox.hidden = aShow;
   },
 
-  isManualUpdate: function(aInstall, aOnlyAvailable) {
+  isManualUpdate(aInstall, aOnlyAvailable) {
     var isManual = aInstall.existingAddon &&
                    !AddonManager.shouldAutoUpdate(aInstall.existingAddon);
     if (isManual && aOnlyAvailable)
       return isInState(aInstall, "available");
     return isManual;
   },
 
-  maybeRefresh: function() {
+  maybeRefresh() {
     if (gViewController.currentViewId == "addons://updates/available")
       this._showAvailableUpdates(true);
     this.updateAvailableCount();
   },
 
-  updateAvailableCount: function(aInitializing) {
+  updateAvailableCount(aInitializing) {
     if (aInitializing)
       gPendingInitializations++;
     AddonManager.getAllInstalls((aInstallsList) => {
       var count = aInstallsList.filter(aInstall => {
         return this.isManualUpdate(aInstall, true);
       }).length;
       this._categoryItem.disabled = gViewController.currentViewId != "addons://updates/available" &&
                                     count == 0;
       this._categoryItem.badgeCount = count;
       if (aInitializing)
         notifyInitialized();
     });
   },
 
-  maybeDisableUpdateSelected: function() {
+  maybeDisableUpdateSelected() {
     for (let item of this._listBox.childNodes) {
       if (item.includeUpdate) {
         this._updateSelected.disabled = false;
         return;
       }
     }
     this._updateSelected.disabled = true;
   },
 
-  installSelected: function() {
+  installSelected() {
     for (let item of this._listBox.childNodes) {
       if (item.includeUpdate)
         item.upgrade();
     }
 
     this._updateSelected.disabled = true;
   },
 
-  getSelectedAddon: function() {
+  getSelectedAddon() {
     var item = this._listBox.selectedItem;
     if (item)
       return item.mAddon;
     return null;
   },
 
-  getListItemForID: function(aId) {
+  getListItemForID(aId) {
     var listitem = this._listBox.firstChild;
     while (listitem) {
       if (listitem.mAddon.id == aId)
         return listitem;
       listitem = listitem.nextSibling;
     }
     return null;
   },
 
-  onSortChanged: function(aSortBy, aAscending) {
+  onSortChanged(aSortBy, aAscending) {
     sortList(this._listBox, aSortBy, aAscending);
   },
 
-  onNewInstall: function(aInstall) {
+  onNewInstall(aInstall) {
     if (!this.isManualUpdate(aInstall))
       return;
     this.maybeRefresh();
   },
 
-  onInstallStarted: function(aInstall) {
+  onInstallStarted(aInstall) {
     this.updateAvailableCount();
   },
 
-  onInstallCancelled: function(aInstall) {
+  onInstallCancelled(aInstall) {
     if (!this.isManualUpdate(aInstall))
       return;
     this.maybeRefresh();
   },
 
-  onPropertyChanged: function(aAddon, aProperties) {
+  onPropertyChanged(aAddon, aProperties) {
     if (aProperties.indexOf("applyBackgroundUpdates") != -1)
       this.updateAvailableCount();
   }
 };
 
 var gDragDrop = {
-  onDragOver: function(aEvent) {
+  onDragOver(aEvent) {
     var types = aEvent.dataTransfer.types;
     if (types.includes("text/uri-list") ||
         types.includes("text/x-moz-url") ||
         types.includes("application/x-moz-file"))
       aEvent.preventDefault();
   },
 
-  onDrop: function(aEvent) {
+  onDrop(aEvent) {
     var dataTransfer = aEvent.dataTransfer;
     var urls = [];
 
     // Convert every dropped item into a url
     for (var i = 0; i < dataTransfer.mozItemCount; i++) {
       var url = dataTransfer.mozGetDataAt("text/uri-list", i);
       if (url) {
         urls.push(url);
--- a/toolkit/mozapps/extensions/content/newaddon.js
+++ b/toolkit/mozapps/extensions/content/newaddon.js
@@ -10,17 +10,17 @@ var Cu = Components.utils;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/AddonManager.jsm");
 
 var gAddon = null;
 
 // If the user enables the add-on through some other UI close this window
 var EnableListener = {
-  onEnabling: function(aAddon) {
+  onEnabling(aAddon) {
     if (aAddon.id == gAddon.id)
       window.close();
   }
 }
 AddonManager.addAddonListener(EnableListener);
 
 function initialize() {
   // About URIs don't implement nsIURL so we have to find the query string
--- a/toolkit/mozapps/extensions/content/update.js
+++ b/toolkit/mozapps/extensions/content/update.js
@@ -48,17 +48,17 @@ var gUpdateWizard = {
   // metadata checks, and upgraded.
   disabled: 0,
   metadataEnabled: 0,
   metadataDisabled: 0,
   upgraded: 0,
   upgradeFailed: 0,
   upgradeDeclined: 0,
 
-  init: function()
+  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);
@@ -80,55 +80,55 @@ var gUpdateWizard = {
   },
 
   onWizardFinish: function gUpdateWizard_onWizardFinish()
   {
     if (this.shouldSuggestAutoChecking)
       Services.prefs.setBoolPref(PREF_UPDATE_EXTENSIONS_ENABLED, this.shouldAutoCheck);
   },
 
-  _setUpButton: function(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) {
       }
     }
     button.disabled = aDisabled;
   },
 
-  setButtonLabels: function(aBackButton, aBackButtonIsDisabled,
+  setButtonLabels(aBackButton, aBackButtonIsDisabled,
                              aNextButton, aNextButtonIsDisabled,
                              aCancelButton, aCancelButtonIsDisabled)
   {
     this._setUpButton("back", aBackButton, aBackButtonIsDisabled);
     this._setUpButton("next", aNextButton, aNextButtonIsDisabled);
     this._setUpButton("cancel", aCancelButton, aCancelButtonIsDisabled);
   },
 
   // Update Errors
   errorItems: [],
 
-  checkForErrors: function(aElementIDToShow)
+  checkForErrors(aElementIDToShow)
   {
     if (this.errorItems.length > 0)
       document.getElementById(aElementIDToShow).hidden = false;
   },
 
-  onWizardClose: function(aEvent)
+  onWizardClose(aEvent)
   {
     return this.onWizardCancel();
   },
 
-  onWizardCancel: function()
+  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");
@@ -147,36 +147,36 @@ var gUpdateWizard = {
     else {
       logger.info("Dialog closed while downloading and installing updates");
     }
     return true;
   }
 };
 
 var gOfflinePage = {
-  onPageAdvanced: function()
+  onPageAdvanced()
   {
     Services.io.offline = false;
     return true;
   },
 
-  toggleOffline: function()
+  toggleOffline()
   {
     var nextbtn = document.documentElement.getButton("next");
     nextbtn.disabled = !nextbtn.disabled;
   }
 }
 
 // Addon listener to count addons enabled/disabled by metadata checks
 var listener = {
-  onDisabled: function(aAddon) {
+  onDisabled(aAddon) {
     gUpdateWizard.affectedAddonIDs.add(aAddon.id);
     gUpdateWizard.metadataDisabled++;
   },
-  onEnabled: function(aAddon) {
+  onEnabled(aAddon) {
     gUpdateWizard.affectedAddonIDs.delete(aAddon.id);
     gUpdateWizard.metadataEnabled++;
   }
 };
 
 var gVersionInfoPage = {
   _completeCount: 0,
   _totalCount: 0,
@@ -219,17 +219,17 @@ var gVersionInfoPage = {
     gVersionInfoPage._totalCount = gUpdateWizard.addons.length;
 
     for (let addon of gUpdateWizard.addons) {
       logger.debug("VersionInfo Finding updates for ${id}", addon);
       addon.findUpdates(gVersionInfoPage, AddonManager.UPDATE_WHEN_NEW_APP_INSTALLED);
     }
   }),
 
-  onAllUpdatesFinished: function() {
+  onAllUpdatesFinished() {
     AddonManager.removeAddonListener(listener);
     AddonManagerPrivate.recordSimpleMeasure("appUpdate_disabled",
         gUpdateWizard.disabled);
     AddonManagerPrivate.recordSimpleMeasure("appUpdate_metadata_enabled",
         gUpdateWizard.metadataEnabled);
     AddonManagerPrivate.recordSimpleMeasure("appUpdate_metadata_disabled",
         gUpdateWizard.metadataDisabled);
     // Record 0 for these here in case we exit early; values will be replaced
@@ -275,17 +275,17 @@ var gVersionInfoPage = {
       // 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);
     }
   },
 
   // UpdateListener
-  onUpdateFinished: function(aAddon, status) {
+  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 {
@@ -314,26 +314,26 @@ var gVersionInfoPage = {
       progress.mode = "normal";
       progress.value = Math.ceil((this._completeCount / this._totalCount) * 100);
     }
 
     if (this._completeCount == this._totalCount)
       this.onAllUpdatesFinished();
   },
 
-  onUpdateAvailable: function(aAddon, aInstall) {
+  onUpdateAvailable(aAddon, aInstall) {
     logger.debug("VersionInfo got an install for " + aAddon.id + ": " + aAddon.version);
     gUpdateWizard.addonInstalls.set(aAddon.id, aInstall);
   },
 };
 
 var gMismatchPage = {
   waiting: false,
 
-  onPageShow: function()
+  onPageShow()
   {
     gMismatchPage.waiting = true;
     gUpdateWizard.setButtonLabels(null, true,
                                   "mismatchCheckNow", false,
                                   "mismatchDontCheck", false);
     document.documentElement.getButton("next").focus();
 
     var incompatible = document.getElementById("mismatch.incompatible");
@@ -343,17 +343,17 @@ var gMismatchPage = {
       incompatible.appendChild(listitem);
     }
   }
 };
 
 var gUpdatePage = {
   _totalCount: 0,
   _completeCount: 0,
-  onPageShow: function()
+  onPageShow()
   {
     gMismatchPage.waiting = false;
     gUpdateWizard.setButtonLabels(null, true,
                                   "nextButtonText", true,
                                   "cancelButtonText", false);
     document.documentElement.getButton("next").focus();
 
     gUpdateWizard.errorItems = [];
@@ -362,33 +362,33 @@ var gUpdatePage = {
     for (let addon of gUpdateWizard.addons) {
       logger.debug("UpdatePage requesting update for " + addon.id);
       // Redundant call to find updates again here when we already got them
       // in the VersionInfo page: https://bugzilla.mozilla.org/show_bug.cgi?id=960597
       addon.findUpdates(this, AddonManager.UPDATE_WHEN_NEW_APP_INSTALLED);
     }
   },
 
-  onAllUpdatesFinished: function() {
+  onAllUpdatesFinished() {
     if (gUpdateWizard.shuttingDown)
       return;
 
     var nextPage = document.getElementById("noupdates");
     if (gUpdateWizard.addonsToUpdate.length > 0)
       nextPage = document.getElementById("found");
     document.documentElement.currentPage = nextPage;
   },
 
   // UpdateListener
-  onUpdateAvailable: function(aAddon, aInstall) {
+  onUpdateAvailable(aAddon, aInstall) {
     logger.debug("UpdatePage got an update for " + aAddon.id + ": " + aAddon.version);
     gUpdateWizard.addonsToUpdate.push(aInstall);
   },
 
-  onUpdateFinished: function(aAddon, status) {
+  onUpdateFinished(aAddon, status) {
     if (status != AddonManager.UPDATE_STATUS_NO_ERROR)
       gUpdateWizard.errorItems.push(aAddon);
 
     ++this._completeCount;
 
     if (!gUpdateWizard.shuttingDown) {
       // Update the status text and progress bar
       var updateStrings = document.getElementById("updateStrings");
@@ -401,17 +401,17 @@ var gUpdatePage = {
     }
 
     if (this._completeCount == this._totalCount)
       this.onAllUpdatesFinished()
   },
 };
 
 var gFoundPage = {
-  onPageShow: function()
+  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);
@@ -426,27 +426,27 @@ var gFoundPage = {
       document.documentElement.getButton("next").disabled = true;
     }
     else {
       document.documentElement.getButton("next").focus();
       document.documentElement.getButton("next").disabled = false;
     }
   },
 
-  toggleXPInstallEnable: function(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: function()
+  updateNextButton()
   {
     if (!gUpdateWizard.xpinstallEnabled) {
       document.documentElement.getButton("next").disabled = true;
       return;
     }
 
     var oneChecked = false;
     var foundUpdates = document.getElementById("found.updates");
@@ -470,30 +470,30 @@ var gInstallingPage = {
   _installs         : [],
   _errors           : [],
   _strings          : null,
   _currentInstall   : -1,
   _installing       : false,
 
   // Initialize fields we need for installing and tracking progress,
   // and start iterating through the installations
-  startInstalls: function(aInstallList) {
+  startInstalls(aInstallList) {
     if (!gUpdateWizard.xpinstallEnabled) {
       return;
     }
 
     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: function()
+  onPageShow()
   {
     gUpdateWizard.setButtonLabels(null, true,
                                   "nextButtonText", true,
                                   null, true);
 
     var foundUpdates = document.getElementById("found.updates");
     var updates = foundUpdates.getElementsByTagName("listitem");
     let toInstall = [];
@@ -506,17 +506,17 @@ var gInstallingPage = {
       }
       toInstall.push(update.install);
     }
     this._strings = document.getElementById("updateStrings");
 
     this.startInstalls(toInstall);
   },
 
-  startNextInstall: function() {
+  startNextInstall() {
     if (this._currentInstall >= 0) {
       this._installs[this._currentInstall].removeListener(this);
     }
 
     this._currentInstall++;
 
     if (this._installs.length == this._currentInstall) {
       Services.obs.notifyObservers(null, "TEST:all-updates-done", null);
@@ -545,96 +545,96 @@ var gInstallingPage = {
       this.startNextInstall();
       return;
     }
     install.addListener(this);
     install.install();
   },
 
   // InstallListener
-  onDownloadStarted: function(aInstall) {
+  onDownloadStarted(aInstall) {
     if (gUpdateWizard.shuttingDown) {
       return;
     }
     var strings = document.getElementById("updateStrings");
     var label = strings.getFormattedString("downloadingPrefix", [aInstall.name]);
     var actionItem = document.getElementById("actionItem");
     actionItem.value = label;
   },
 
-  onDownloadProgress: function(aInstall) {
+  onDownloadProgress(aInstall) {
     if (gUpdateWizard.shuttingDown) {
       return;
     }
     var downloadProgress = document.getElementById("downloadProgress");
     downloadProgress.value = Math.ceil(100 * aInstall.progress / aInstall.maxProgress);
   },
 
-  onDownloadEnded: function(aInstall) {
+  onDownloadEnded(aInstall) {
   },
 
-  onDownloadFailed: function(aInstall) {
+  onDownloadFailed(aInstall) {
     this._errors.push(aInstall);
 
     gUpdateWizard.upgradeFailed++;
     this.startNextInstall();
   },
 
-  onInstallStarted: function(aInstall) {
+  onInstallStarted(aInstall) {
     if (gUpdateWizard.shuttingDown) {
       return;
     }
     var strings = document.getElementById("updateStrings");
     var label = strings.getFormattedString("installingPrefix", [aInstall.name]);
     var actionItem = document.getElementById("actionItem");
     actionItem.value = label;
   },
 
-  onInstallEnded: function(aInstall, aAddon) {
+  onInstallEnded(aInstall, aAddon) {
     if (!gUpdateWizard.shuttingDown) {
       // Remember that this add-on was updated during startup
       AddonManagerPrivate.addStartupChange(AddonManager.STARTUP_CHANGE_CHANGED,
                                            aAddon.id);
     }
 
     gUpdateWizard.upgraded++;
     this.startNextInstall();
   },
 
-  onInstallFailed: function(aInstall) {
+  onInstallFailed(aInstall) {
     this._errors.push(aInstall);
 
     gUpdateWizard.upgradeFailed++;
     this.startNextInstall();
   }
 };
 
 var gInstallErrorsPage = {
-  onPageShow: function()
+  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: function()
+  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: function()
+  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;
     }
@@ -643,17 +643,17 @@ var gFinishedPage = {
 
     document.documentElement.getButton("finish").focus();
   }
 };
 
 // Displayed when there are incompatible add-ons and there are no available
 // updates.
 var gNoUpdatesPage = {
-  onPageShow: function(aEvent)
+  onPageShow(aEvent)
   {
     gUpdateWizard.setButtonLabels(null, true, null, true, null, true);
     if (gUpdateWizard.shouldSuggestAutoChecking) {
       document.getElementById("noupdatesCheckDisabled").hidden = false;
       gUpdateWizard.shouldAutoCheck = true;
     }
     else
       document.getElementById("noupdatesCheckEnabled").hidden = false;
--- a/toolkit/mozapps/extensions/content/xpinstallConfirm.js
+++ b/toolkit/mozapps/extensions/content/xpinstallConfirm.js
@@ -36,17 +36,17 @@ XPInstallConfirm.init = function()
     var delay_in_milliseconds = prefs.getIntPref("security.dialog_enable_delay");
     _installCountdownLength = Math.round(delay_in_milliseconds / 500);
   } catch (ex) { }
 
   var itemList = document.getElementById("itemList");
 
   let installMap = new WeakMap();
   let installListener = {
-    onDownloadCancelled: function(install) {
+    onDownloadCancelled(install) {
       itemList.removeChild(installMap.get(install));
       if (--numItemsToInstall == 0)
         window.close();
     }
   };
 
   var numItemsToInstall = args.installs.length;
   for (let install of args.installs) {
--- a/toolkit/mozapps/extensions/internal/AddonLogging.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonLogging.jsm
@@ -76,17 +76,17 @@ function getStackDetails(aException) {
 
 function AddonLogger(aName) {
   this.name = aName;
 }
 
 AddonLogger.prototype = {
   name: null,
 
-  error: function(aStr, aException) {
+  error(aStr, aException) {
     let message = formatLogMessage("error", this.name, aStr, aException);
 
     let stack = getStackDetails(aException);
 
     let consoleMessage = Cc["@mozilla.org/scripterror;1"].
                          createInstance(Ci.nsIScriptError);
     consoleMessage.init(message, stack.sourceName, null, stack.lineNumber, 0,
                         Ci.nsIScriptError.errorFlag, "component javascript");
@@ -119,42 +119,42 @@ AddonLogger.prototype = {
       writer.writeString(formatTimestamp(tstamp) + " " +
                          message + " at " + stack.sourceName + ":" +
                          stack.lineNumber + "\n");
       writer.close();
     }
     catch (e) { }
   },
 
-  warn: function(aStr, aException) {
+  warn(aStr, aException) {
     let message = formatLogMessage("warn", this.name, aStr, aException);
 
     let stack = getStackDetails(aException);
 
     let consoleMessage = Cc["@mozilla.org/scripterror;1"].
                          createInstance(Ci.nsIScriptError);
     consoleMessage.init(message, stack.sourceName, null, stack.lineNumber, 0,
                         Ci.nsIScriptError.warningFlag, "component javascript");
     Services.console.logMessage(consoleMessage);
 
     if (gDebugLogEnabled)
       dump("*** " + message + "\n");
   },
 
-  log: function(aStr, aException) {
+  log(aStr, aException) {
     if (gDebugLogEnabled) {
       let message = formatLogMessage("log", this.name, aStr, aException);
       dump("*** " + message + "\n");
       Services.console.logStringMessage(message);
     }
   }
 };
 
 this.LogManager = {
-  getLogger: function(aName, aTarget) {
+  getLogger(aName, aTarget) {
     let logger = new AddonLogger(aName);
 
     if (aTarget) {
       ["error", "warn", "log"].forEach(function(name) {
         let fname = name.toUpperCase();
         delete aTarget[fname];
         aTarget[fname] = function(aStr, aException) {
           logger[name](aStr, aException);
@@ -162,23 +162,23 @@ this.LogManager = {
       });
     }
 
     return logger;
   }
 };
 
 var PrefObserver = {
-  init: function() {
+  init() {
     Services.prefs.addObserver(PREF_LOGGING_ENABLED, this, false);
     Services.obs.addObserver(this, "xpcom-shutdown", false);
     this.observe(null, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, PREF_LOGGING_ENABLED);
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  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) {
       try {
         gDebugLogEnabled = Services.prefs.getBoolPref(PREF_LOGGING_ENABLED);
       }
--- a/toolkit/mozapps/extensions/internal/AddonRepository.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonRepository.jsm
@@ -384,43 +384,43 @@ AddonSearchResult.prototype = {
    * particular application and platform version.
    *
    * @param  appVersion
    *         An application version to test against
    * @param  platformVersion
    *         A platform version to test against
    * @return Boolean representing if the add-on is compatible
    */
-  isCompatibleWith: function(aAppVersion, aPlatformVersion) {
+  isCompatibleWith(aAppVersion, aPlatformVersion) {
     return true;
   },
 
   /**
    * Starts an update check for this add-on. This will perform
    * asynchronously and deliver results to the given listener.
    *
    * @param  aListener
    *         An UpdateListener for the update process
    * @param  aReason
    *         A reason code for performing the update
    * @param  aAppVersion
    *         An application version to check for updates for
    * @param  aPlatformVersion
    *         A platform version to check for updates for
    */
-  findUpdates: function(aListener, aReason, aAppVersion, aPlatformVersion) {
+  findUpdates(aListener, aReason, aAppVersion, aPlatformVersion) {
     if ("onNoCompatibilityUpdateAvailable" in aListener)
       aListener.onNoCompatibilityUpdateAvailable(this);
     if ("onNoUpdateAvailable" in aListener)
       aListener.onNoUpdateAvailable(this);
     if ("onUpdateFinished" in aListener)
       aListener.onUpdateFinished(this);
   },
 
-  toJSON: function() {
+  toJSON() {
     let json = {};
 
     for (let property of Object.keys(this)) {
       let value = this[property];
       if (property.startsWith("_") ||
           typeof(value) === "function")
         continue;
 
@@ -510,39 +510,39 @@ this.AddonRepository = {
   // Maximum number of results to return
   _maxResults: null,
 
   /**
    * Shut down AddonRepository
    * return: promise{integer} resolves with the result of flushing
    *         the AddonRepository database
    */
-  shutdown: function() {
+  shutdown() {
     this.cancelSearch();
 
     this._addons = null;
     return AddonDatabase.shutdown(false);
   },
 
-  metadataAge: function() {
+  metadataAge() {
     let now = Math.round(Date.now() / 1000);
 
     let lastUpdate = 0;
     try {
       lastUpdate = Services.prefs.getIntPref(PREF_METADATA_LASTUPDATE);
     } catch (e) {}
 
     // Handle clock jumps
     if (now < lastUpdate) {
       return now;
     }
     return now - lastUpdate;
   },
 
-  isMetadataStale: function() {
+  isMetadataStale() {
     let threshold = DEFAULT_METADATA_UPDATETHRESHOLD_SEC;
     try {
       threshold = Services.prefs.getIntPref(PREF_METADATA_UPDATETHRESHOLD_SEC);
     } catch (e) {}
     return (this.metadataAge() > threshold);
   },
 
   /**
@@ -583,25 +583,25 @@ this.AddonRepository = {
    * the cache is completely removed.
    *
    * @param  aTimeout
    *         (Optional) timeout in milliseconds to abandon the XHR request
    *         if we have not received a response from the server.
    * @return Promise{null}
    *         Resolves when the metadata ping is complete
    */
-  repopulateCache: function(aTimeout) {
+  repopulateCache(aTimeout) {
     return this._repopulateCacheInternal(false, aTimeout);
   },
 
   /*
    * Clear and delete the AddonRepository database
    * @return Promise{null} resolves when the database is deleted
    */
-  _clearCache: function() {
+  _clearCache() {
     this._addons = null;
     return AddonDatabase.delete().then(() =>
       AddonManagerPrivate.updateAddonRepositoryData());
   },
 
   _repopulateCacheInternal: Task.async(function*(aSendPerformance, aTimeout) {
     let allAddons = yield AddonManager.getAllAddons();
 
@@ -651,17 +651,17 @@ this.AddonRepository = {
    * ids. If caching is disabled, the cache is unchanged and the callback is
    * immediately called if it is defined.
    *
    * @param  aIds
    *         The array of add-on ids to add to the cache
    * @param  aCallback
    *         The optional callback to call once complete
    */
-  cacheAddons: function(aIds, aCallback) {
+  cacheAddons(aIds, aCallback) {
     logger.debug("cacheAddons: enabled " + this.cacheEnabled + " IDs " + aIds.toSource());
     if (!this.cacheEnabled) {
       if (aCallback)
         aCallback();
       return;
     }
 
     getAddonsToCache(aIds).then(aAddons => {
@@ -704,41 +704,41 @@ this.AddonRepository = {
   get isSearching() {
     return this._searching;
   },
 
   /**
    * The url that can be visited to see recommended add-ons in this repository.
    * If the corresponding preference is not defined, defaults to about:blank.
    */
-  getRecommendedURL: function() {
+  getRecommendedURL() {
     let url = this._formatURLPref(PREF_GETADDONS_BROWSERECOMMENDED, {});
     return (url != null) ? url : "about:blank";
   },
 
   /**
    * Retrieves the url that can be visited to see search results for the given
    * terms. If the corresponding preference is not defined, defaults to
    * about:blank.
    *
    * @param  aSearchTerms
    *         Search terms used to search the repository
    */
-  getSearchURL: function(aSearchTerms) {
+  getSearchURL(aSearchTerms) {
     let url = this._formatURLPref(PREF_GETADDONS_BROWSESEARCHRESULTS, {
       TERMS : encodeURIComponent(aSearchTerms)
     });
     return (url != null) ? url : "about:blank";
   },
 
   /**
    * Cancels the search in progress. If there is no search in progress this
    * does nothing.
    */
-  cancelSearch: function() {
+  cancelSearch() {
     this._searching = false;
     if (this._request) {
       this._request.abort();
       this._request = null;
     }
     this._callback = null;
   },
 
@@ -746,17 +746,17 @@ this.AddonRepository = {
    * Begins a search for add-ons in this repository by ID. Results will be
    * passed to the given callback.
    *
    * @param  aIDs
    *         The array of ids to search for
    * @param  aCallback
    *         The callback to pass results to
    */
-  getAddonsByIDs: function(aIDs, aCallback) {
+  getAddonsByIDs(aIDs, aCallback) {
     return this._beginGetAddons(aIDs, aCallback, false);
   },
 
   /**
    * Begins a search of add-ons, potentially sending performance data.
    *
    * @param  aIDs
    *         Array of ids to search for.
@@ -764,21 +764,21 @@ this.AddonRepository = {
    *         Function to pass results to.
    * @param  aSendPerformance
    *         Boolean indicating whether to send performance data with the
    *         request.
    * @param  aTimeout
    *         (Optional) timeout in milliseconds to abandon the XHR request
    *         if we have not received a response from the server.
    */
-  _beginGetAddons: function(aIDs, aCallback, aSendPerformance, aTimeout) {
+  _beginGetAddons(aIDs, aCallback, aSendPerformance, aTimeout) {
     let ids = aIDs.slice(0);
 
     let params = {
-      API_VERSION : API_VERSION,
+      API_VERSION,
       IDS : ids.map(encodeURIComponent).join(',')
     };
 
     let pref = PREF_GETADDONS_BYIDS;
 
     if (aSendPerformance) {
       let type = Services.prefs.getPrefType(PREF_GETADDONS_BYIDS_PERFORMANCE);
       if (type == Services.prefs.PREF_STRING) {
@@ -840,17 +840,17 @@ this.AddonRepository = {
         if (addonCompat.hosted)
           continue;
 
         let addon = new AddonSearchResult(addonCompat.id);
         // Compatibility overrides can only be for extensions.
         addon.type = "extension";
         addon.compatibilityOverrides = addonCompat.compatRanges;
         let result = {
-          addon: addon,
+          addon,
           xpiURL: null,
           xpiHash: null
         };
         results.push(result);
       }
 
       // aTotalResults irrelevant
       this._reportSuccess(results, -1);
@@ -863,32 +863,32 @@ this.AddonRepository = {
    * Performs the daily background update check.
    *
    * This API both searches for the add-on IDs specified and sends performance
    * data. It is meant to be called as part of the daily update ping. It should
    * not be used for any other purpose. Use repopulateCache instead.
    *
    * @return Promise{null} Resolves when the metadata update is complete.
    */
-  backgroundUpdateCheck: function() {
+  backgroundUpdateCheck() {
     return this._repopulateCacheInternal(true);
   },
 
   /**
    * Begins a search for recommended add-ons in this repository. Results will
    * be passed to the given callback.
    *
    * @param  aMaxResults
    *         The maximum number of results to return
    * @param  aCallback
    *         The callback to pass results to
    */
-  retrieveRecommendedAddons: function(aMaxResults, aCallback) {
+  retrieveRecommendedAddons(aMaxResults, aCallback) {
     let url = this._formatURLPref(PREF_GETADDONS_GETRECOMMENDED, {
-      API_VERSION : API_VERSION,
+      API_VERSION,
 
       // Get twice as many results to account for potential filtering
       MAX_RESULTS : 2 * aMaxResults
     });
 
     let handleResults = (aElements, aTotalResults) => {
       this._getLocalAddonIds(aLocalAddonIds => {
         // aTotalResults irrelevant
@@ -905,25 +905,25 @@ this.AddonRepository = {
    *
    * @param  aSearchTerms
    *         The terms to search for
    * @param  aMaxResults
    *         The maximum number of results to return
    * @param  aCallback
    *         The callback to pass results to
    */
-  searchAddons: function(aSearchTerms, aMaxResults, aCallback) {
+  searchAddons(aSearchTerms, aMaxResults, aCallback) {
     let compatMode = "normal";
     if (!AddonManager.checkCompatibility)
       compatMode = "ignore";
     else if (AddonManager.strictCompatibility)
       compatMode = "strict";
 
     let substitutions = {
-      API_VERSION : API_VERSION,
+      API_VERSION,
       TERMS : encodeURIComponent(aSearchTerms),
       // Get twice as many results to account for potential filtering
       MAX_RESULTS : 2 * aMaxResults,
       COMPATIBILITY_MODE : compatMode,
     };
 
     let url = this._formatURLPref(PREF_GETADDONS_GETSEARCHRESULTS, substitutions);
 
@@ -932,67 +932,67 @@ this.AddonRepository = {
         this._parseAddons(aElements, aTotalResults, aLocalAddonIds);
       });
     }
 
     this._beginSearch(url, aMaxResults, aCallback, handleResults);
   },
 
   // Posts results to the callback
-  _reportSuccess: function(aResults, aTotalResults) {
+  _reportSuccess(aResults, aTotalResults) {
     this._searching = false;
     this._request = null;
     // The callback may want to trigger a new search so clear references early
     let addons = aResults.map(result => result.addon);
     let callback = this._callback;
     this._callback = null;
     callback.searchSucceeded(addons, addons.length, aTotalResults);
   },
 
   // Notifies the callback of a failure
-  _reportFailure: function() {
+  _reportFailure() {
     this._searching = false;
     this._request = null;
     // The callback may want to trigger a new search so clear references early
     let callback = this._callback;
     this._callback = null;
     callback.searchFailed();
   },
 
   // Get descendant by unique tag name. Returns null if not unique tag name.
-  _getUniqueDescendant: function(aElement, aTagName) {
+  _getUniqueDescendant(aElement, aTagName) {
     let elementsList = aElement.getElementsByTagName(aTagName);
     return (elementsList.length == 1) ? elementsList[0] : null;
   },
 
   // Get direct descendant by unique tag name.
   // Returns null if not unique tag name.
-  _getUniqueDirectDescendant: function(aElement, aTagName) {
+  _getUniqueDirectDescendant(aElement, aTagName) {
     let elementsList = Array.filter(aElement.children,
                                     aChild => aChild.tagName == aTagName);
     return (elementsList.length == 1) ? elementsList[0] : null;
   },
 
   // Parse out trimmed text content. Returns null if text content empty.
-  _getTextContent: function(aElement) {
+  _getTextContent(aElement) {
     let textContent = aElement.textContent.trim();
     return (textContent.length > 0) ? textContent : null;
   },
 
   // Parse out trimmed text content of a descendant with the specified tag name
   // Returns null if the parsing unsuccessful.
-  _getDescendantTextContent: function(aElement, aTagName) {
+  _getDescendantTextContent(aElement, aTagName) {
     let descendant = this._getUniqueDescendant(aElement, aTagName);
     return (descendant != null) ? this._getTextContent(descendant) : null;
   },
 
   // Parse out trimmed text content of a direct descendant with the specified
   // tag name.
   // Returns null if the parsing unsuccessful.
-  _getDirectDescendantTextContent: function(aElement, aTagName) {
+  _getDirectDescendantTextContent(aElement, aTagName) {
     let descendant = this._getUniqueDirectDescendant(aElement, aTagName);
     return (descendant != null) ? this._getTextContent(descendant) : null;
   },
 
   /*
    * Creates an AddonSearchResult by parsing an <addon> element
    *
    * @param  aElement
@@ -1000,27 +1000,27 @@ this.AddonRepository = {
    * @param  aSkip
    *         Object containing ids and sourceURIs of add-ons to skip.
    * @param  aCompatData
    *         Array of parsed addon_compatibility elements to accosiate with the
    *         resulting AddonSearchResult. Optional.
    * @return Result object containing the parsed AddonSearchResult, xpiURL and
    *         xpiHash if the parsing was successful. Otherwise returns null.
    */
-  _parseAddon: function(aElement, aSkip, aCompatData) {
+  _parseAddon(aElement, aSkip, aCompatData) {
     let skipIDs = (aSkip && aSkip.ids) ? aSkip.ids : [];
     let skipSourceURIs = (aSkip && aSkip.sourceURIs) ? aSkip.sourceURIs : [];
 
     let guid = this._getDescendantTextContent(aElement, "guid");
     if (guid == null || skipIDs.indexOf(guid) != -1)
       return null;
 
     let addon = new AddonSearchResult(guid);
     let result = {
-      addon: addon,
+      addon,
       xpiURL: null,
       xpiHash: null
     };
 
     if (aCompatData && guid in aCompatData)
       addon.compatibilityOverrides = aCompatData[guid].compatRanges;
 
     for (let node = aElement.firstChild; node; node = node.nextSibling) {
@@ -1225,17 +1225,17 @@ this.AddonRepository = {
           addon.icons[node.getAttribute("size")] = this._getTextContent(node);
           break;
       }
     }
 
     return result;
   },
 
-  _parseAddons: function(aElements, aTotalResults, aSkip) {
+  _parseAddons(aElements, aTotalResults, aSkip) {
     let results = [];
 
     let isSameApplication = aAppNode => this._getTextContent(aAppNode) == Services.appinfo.ID;
 
     for (let i = 0; i < aElements.length && results.length < this._maxResults; i++) {
       let element = aElements[i];
 
       let tags = this._getUniqueDescendant(element, "compatible_applications");
@@ -1324,17 +1324,17 @@ this.AddonRepository = {
       }
       else {
         callback(null);
       }
     }
   },
 
   // Parses addon_compatibility nodes, that describe compatibility overrides.
-  _parseAddonCompatElement: function(aResultObj, aElement) {
+  _parseAddonCompatElement(aResultObj, aElement) {
     let guid = this._getDescendantTextContent(aElement, "guid");
     if (!guid) {
         logger.debug("Compatibility override is missing guid.");
       return;
     }
 
     let compat = {id: guid};
     compat.hosted = aElement.getAttribute("hosted") != "false";
@@ -1346,17 +1346,17 @@ this.AddonRepository = {
         if (appID != Services.appinfo.ID && appID != TOOLKIT_ID)
           continue;
 
         let minVersion = this._getDescendantTextContent(node, "min_version");
         let maxVersion = this._getDescendantTextContent(node, "max_version");
         if (minVersion == null || maxVersion == null)
           continue;
 
-        let appRange = { appID: appID,
+        let appRange = { appID,
                          appMinVersion: minVersion,
                          appMaxVersion: maxVersion };
 
         // Only use Toolkit app ranges if no ranges match the application ID.
         if (appID == TOOLKIT_ID)
           toolkitAppRange = appRange;
         else
           return appRange;
@@ -1405,24 +1405,24 @@ this.AddonRepository = {
                                .filter(aItem => !!aItem);
     if (compat.compatRanges.length == 0)
       return;
 
     aResultObj[compat.id] = compat;
   },
 
   // Parses addon_compatibility elements.
-  _parseAddonCompatData: function(aElements) {
+  _parseAddonCompatData(aElements) {
     let compatData = {};
     Array.forEach(aElements, this._parseAddonCompatElement.bind(this, compatData));
     return compatData;
   },
 
   // Begins a new search if one isn't currently executing
-  _beginSearch: function(aURI, aMaxResults, aCallback, aHandleResults, aTimeout) {
+  _beginSearch(aURI, aMaxResults, aCallback, aHandleResults, aTimeout) {
     if (this._searching || aURI == null || aMaxResults <= 0) {
       logger.warn("AddonRepository search failed: searching " + this._searching + " aURI " + aURI +
                   " aMaxResults " + aMaxResults);
       aCallback.searchFailed();
       return;
     }
 
     this._searching = true;
@@ -1465,17 +1465,17 @@ this.AddonRepository = {
 
       aHandleResults(elements, totalResults, compatData);
     }, false);
     this._request.send(null);
   },
 
   // Gets the id's of local add-ons, and the sourceURI's of local installs,
   // passing the results to aCallback
-  _getLocalAddonIds: function(aCallback) {
+  _getLocalAddonIds(aCallback) {
     let localAddonIds = {ids: null, sourceURIs: null};
 
     AddonManager.getAllAddons(function(aAddons) {
       localAddonIds.ids = aAddons.map(a => a.id);
       if (localAddonIds.sourceURIs)
         aCallback(localAddonIds);
     });
 
@@ -1487,17 +1487,17 @@ this.AddonRepository = {
       }
 
       if (localAddonIds.ids)
         aCallback(localAddonIds);
     });
   },
 
   // Create url from preference, returning null if preference does not exist
-  _formatURLPref: function(aPreference, aSubstitutions) {
+  _formatURLPref(aPreference, aSubstitutions) {
     let url = null;
     try {
       url = Services.prefs.getCharPref(aPreference);
     } catch (e) {
       logger.warn("_formatURLPref: Couldn't get pref: " + aPreference);
       return null;
     }
 
@@ -1505,17 +1505,17 @@ this.AddonRepository = {
       return (aKey in aSubstitutions) ? aSubstitutions[aKey] : aMatch;
     });
 
     return Services.urlFormatter.formatURL(url);
   },
 
   // Find a AddonCompatibilityOverride that matches a given aAddonVersion and
   // application/platform version.
-  findMatchingCompatOverride: function(aAddonVersion,
+  findMatchingCompatOverride(aAddonVersion,
                                                                      aCompatOverrides,
                                                                      aAppVersion,
                                                                      aPlatformVersion) {
     for (let override of aCompatOverrides) {
 
       let appVersion = null;
       if (override.appID == TOOLKIT_ID)
         appVersion = aPlatformVersion || Services.appinfo.platformVersion;
@@ -1527,17 +1527,17 @@ this.AddonRepository = {
           Services.vc.compare(override.appMinVersion, appVersion) <= 0 &&
           Services.vc.compare(appVersion, override.appMaxVersion) <= 0) {
         return override;
       }
     }
     return null;
   },
 
-  flush: function() {
+  flush() {
     return AddonDatabase.flush();
   }
 };
 
 var AddonDatabase = {
   connectionPromise: null,
   // the in-memory database
   DB: BLANK_DB(),
@@ -1549,17 +1549,17 @@ var AddonDatabase = {
     return OS.Path.join(OS.Constants.Path.profileDir, FILE_DATABASE);
  },
 
   /**
    * Asynchronously opens a new connection to the database file.
    *
    * @return {Promise} a promise that resolves to the database.
    */
-  openConnection: function() {
+  openConnection() {
     if (!this.connectionPromise) {
      this.connectionPromise = Task.spawn(function*() {
        this.DB = BLANK_DB();
 
        let inputDB, schema;
 
        try {
          let data = yield OS.File.read(this.jsonFile, { encoding: "utf-8"})
@@ -1638,17 +1638,17 @@ var AddonDatabase = {
    * cached objects
    *
    * @param  aCallback
    *         An optional callback to call once complete
    * @param  aSkipFlush
    *         An optional boolean to skip flushing data to disk. Useful
    *         when the database is going to be deleted afterwards.
    */
-  shutdown: function(aSkipFlush) {
+  shutdown(aSkipFlush) {
     if (!this.connectionPromise) {
       return Promise.resolve();
     }
 
     this.connectionPromise = null;
 
     if (aSkipFlush) {
       return Promise.resolve();
@@ -1659,32 +1659,32 @@ var AddonDatabase = {
   /**
    * Asynchronously deletes the database, shutting down the connection
    * first if initialized
    *
    * @param  aCallback
    *         An optional callback to call once complete
    * @return Promise{null} resolves when the database has been deleted
    */
-  delete: function(aCallback) {
+  delete(aCallback) {
     this.DB = BLANK_DB();
 
     this._deleting = this.Writer.flush()
       .then(null, () => {})
       // shutdown(true) never rejects
       .then(() => this.shutdown(true))
       .then(() => OS.File.remove(this.jsonFile, {}))
       .then(null, error => logger.error("Unable to delete Addon Repository file " +
                                  this.jsonFile, error))
       .then(() => this._deleting = null)
       .then(aCallback);
     return this._deleting;
   },
 
-  toJSON: function() {
+  toJSON() {
     let json = {
       schema: this.DB.schema,
       addons: []
     }
 
     for (let [, value] of this.DB.addons)
       json.addons.push(value);
 
@@ -1707,42 +1707,42 @@ var AddonDatabase = {
   },
 
   /**
    * Flush any pending I/O on the addons.json file
    * @return: Promise{null}
    *          Resolves when the pending I/O (writing out or deleting
    *          addons.json) completes
    */
-  flush: function() {
+  flush() {
     if (this._deleting) {
       return this._deleting;
     }
     return this.Writer.flush();
   },
 
   /**
    * Asynchronously retrieve all add-ons from the database
    * @return: Promise{Map}
    *          Resolves when the add-ons are retrieved from the database
    */
-  retrieveStoredData: function() {
+  retrieveStoredData() {
     return this.openConnection().then(db => db.addons);
   },
 
   /**
    * Asynchronously repopulates the database so it only contains the
    * specified add-ons
    *
    * @param  aAddons
    *         The array of add-ons to repopulate the database with
    * @param  aCallback
    *         An optional callback to call once complete
    */
-  repopulate: function(aAddons, aCallback) {
+  repopulate(aAddons, aCallback) {
     this.DB.addons.clear();
     this.insertAddons(aAddons, function() {
       let now = Math.round(Date.now() / 1000);
       logger.debug("Cache repopulated, setting " + PREF_METADATA_LASTUPDATE + " to " + now);
       Services.prefs.setIntPref(PREF_METADATA_LASTUPDATE, now);
       if (aCallback)
         aCallback();
     });
@@ -1775,17 +1775,17 @@ var AddonDatabase = {
    * exists in the database (by id), then the specified add-on will not be
    * inserted.
    *
    * @param  aAddon
    *         The add-on to insert into the database
    * @param  aCallback
    *         The callback to call once complete
    */
-  _insertAddon: function(aAddon) {
+  _insertAddon(aAddon) {
     let newAddon = this._parseAddon(aAddon);
     if (!newAddon ||
         !newAddon.id ||
         this.DB.addons.has(newAddon.id))
       return;
 
     this.DB.addons.set(newAddon.id, newAddon);
   },
@@ -1793,17 +1793,17 @@ var AddonDatabase = {
   /*
    * Creates an AddonSearchResult by parsing an object structure
    * retrieved from the DB JSON representation.
    *
    * @param  aObj
    *         The object to parse
    * @return Returns an AddonSearchResult object.
    */
-  _parseAddon: function(aObj) {
+  _parseAddon(aObj) {
     if (aObj instanceof AddonSearchResult)
       return aObj;
 
     let id = aObj.id;
     if (!aObj.id)
       return null;
 
     let addon = new AddonSearchResult(id);
@@ -1904,45 +1904,45 @@ var AddonDatabase = {
 
   /**
    * Write the in-memory DB to disk, after waiting for
    * the DB_BATCH_TIMEOUT_MS timeout.
    *
    * @return Promise A promise that resolves after the
    *                 write to disk has completed.
    */
-  _saveDBToDisk: function() {
+  _saveDBToDisk() {
     return this.Writer.saveChanges().then(
       null,
       e => logger.error("SaveDBToDisk failed", e));
   },
 
   /**
    * Make a developer object from a vanilla
    * JS object from the JSON database
    *
    * @param  aObj
    *         The JS object to use
    * @return The created developer
    */
-  _makeDeveloper: function(aObj) {
+  _makeDeveloper(aObj) {
     let name = aObj.name;
     let url = aObj.url;
     return new AddonManagerPrivate.AddonAuthor(name, url);
   },
 
   /**
    * Make a screenshot object from a vanilla
    * JS object from the JSON database
    *
    * @param  aObj
    *         The JS object to use
    * @return The created screenshot
    */
-  _makeScreenshot: function(aObj) {
+  _makeScreenshot(aObj) {
     let url = aObj.url;
     let width = aObj.width;
     let height = aObj.height;
     let thumbnailURL = aObj.thumbnailURL;
     let thumbnailWidth = aObj.thumbnailWidth;
     let thumbnailHeight = aObj.thumbnailHeight;
     let caption = aObj.caption;
     return new AddonManagerPrivate.AddonScreenshot(url, width, height, thumbnailURL,
@@ -1952,17 +1952,17 @@ var AddonDatabase = {
   /**
    * Make a CompatibilityOverride from a vanilla
    * JS object from the JSON database
    *
    * @param  aObj
    *         The JS object to use
    * @return The created CompatibilityOverride
    */
-  _makeCompatOverride: function(aObj) {
+  _makeCompatOverride(aObj) {
     let type = aObj.type;
     let minVersion = aObj.minVersion;
     let maxVersion = aObj.maxVersion;
     let appID = aObj.appID;
     let appMinVersion = aObj.appMinVersion;
     let appMaxVersion = aObj.appMaxVersion;
     return new AddonManagerPrivate.AddonCompatibilityOverride(type,
                                                               minVersion,
--- a/toolkit/mozapps/extensions/internal/AddonRepository_SQLiteMigrator.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonRepository_SQLiteMigrator.jsm
@@ -45,17 +45,17 @@ this.AddonRepository_SQLiteMigrator = {
    * @param structFunctions an object that contains functions
    *                        to create the various objects used
    *                        in the new JSON format
    * @param aCallback       A callback to be called when migration
    *                        finishes, with the results in an array
    * @returns bool          True if a migration will happen (DB was
    *                        found and succesfully opened)
    */
-  migrate: function(aCallback) {
+  migrate(aCallback) {
     if (!this._openConnection()) {
       this._closeConnection();
       aCallback([]);
       return false;
     }
 
     logger.debug("Importing addon repository from previous " + FILE_DATABASE + " storage.");
 
@@ -69,17 +69,17 @@ this.AddonRepository_SQLiteMigrator = {
     return true;
   },
 
   /**
    * Synchronously opens a new connection to the database file.
    *
    * @return bool           Whether the DB was opened successfully.
    */
-  _openConnection: function() {
+  _openConnection() {
     delete this.connection;
 
     let dbfile = FileUtils.getFile(KEY_PROFILEDIR, [FILE_DATABASE], true);
     if (!dbfile.exists())
       return false;
 
     try {
       this.connection = Services.storage.openUnsharedDatabase(dbfile);
@@ -136,17 +136,17 @@ this.AddonRepository_SQLiteMigrator = {
       this.logSQLError(this.connection.lastError, this.connection.lastErrorString);
       this.connection.rollbackTransaction();
       return false;
     }
 
     return true;
   },
 
-  _closeConnection: function() {
+  _closeConnection() {
     for (let key in this.asyncStatementsCache) {
       let stmt = this.asyncStatementsCache[key];
       stmt.finalize();
     }
     this.asyncStatementsCache = {};
 
     if (this.connection)
       this.connection.asyncClose();
@@ -156,33 +156,33 @@ this.AddonRepository_SQLiteMigrator = {
 
   /**
    * Asynchronously retrieve all add-ons from the database, and pass it
    * to the specified callback
    *
    * @param  aCallback
    *         The callback to pass the add-ons back to
    */
-  _retrieveStoredData: function(aCallback) {
+  _retrieveStoredData(aCallback) {
     let addons = {};
 
     // Retrieve all data from the addon table
     let getAllAddons = () => {
       this.getAsyncStatement("getAllAddons").executeAsync({
         handleResult: aResults => {
           let row = null;
           while ((row = aResults.getNextRow())) {
             let internal_id = row.getResultByName("internal_id");
             addons[internal_id] = this._makeAddonFromAsyncRow(row);
           }
         },
 
         handleError: this.asyncErrorLogger,
 
-        handleCompletion: function(aReason) {
+        handleCompletion(aReason) {
           if (aReason != Ci.mozIStorageStatementCallback.REASON_FINISHED) {
             logger.error("Error retrieving add-ons from database. Returning empty results");
             aCallback({});
             return;
           }
 
           getAllDevelopers();
         }
@@ -206,17 +206,17 @@ this.AddonRepository_SQLiteMigrator = {
               addon.developers = [];
 
             addon.developers.push(this._makeDeveloperFromAsyncRow(row));
           }
         },
 
         handleError: this.asyncErrorLogger,
 
-        handleCompletion: function(aReason) {
+        handleCompletion(aReason) {
           if (aReason != Ci.mozIStorageStatementCallback.REASON_FINISHED) {
             logger.error("Error retrieving developers from database. Returning empty results");
             aCallback({});
             return;
           }
 
           getAllScreenshots();
         }
@@ -239,17 +239,17 @@ this.AddonRepository_SQLiteMigrator = {
             if (!addon.screenshots)
               addon.screenshots = [];
             addon.screenshots.push(this._makeScreenshotFromAsyncRow(row));
           }
         },
 
         handleError: this.asyncErrorLogger,
 
-        handleCompletion: function(aReason) {
+        handleCompletion(aReason) {
           if (aReason != Ci.mozIStorageStatementCallback.REASON_FINISHED) {
             logger.error("Error retrieving screenshots from database. Returning empty results");
             aCallback({});
             return;
           }
 
           getAllCompatOverrides();
         }
@@ -271,17 +271,17 @@ this.AddonRepository_SQLiteMigrator = {
             if (!addon.compatibilityOverrides)
               addon.compatibilityOverrides = [];
             addon.compatibilityOverrides.push(this._makeCompatOverrideFromAsyncRow(row));
           }
         },
 
         handleError: this.asyncErrorLogger,
 
-        handleCompletion: function(aReason) {
+        handleCompletion(aReason) {
           if (aReason != Ci.mozIStorageStatementCallback.REASON_FINISHED) {
             logger.error("Error retrieving compatibility overrides from database. Returning empty results");
             aCallback({});
             return;
           }
 
           getAllIcons();
         }
@@ -304,17 +304,17 @@ this.AddonRepository_SQLiteMigrator = {
             addon.icons[size] = url;
             if (size == 32)
               addon.iconURL = url;
           }
         },
 
         handleError: this.asyncErrorLogger,
 
-        handleCompletion: function(aReason) {
+        handleCompletion(aReason) {
           if (aReason != Ci.mozIStorageStatementCallback.REASON_FINISHED) {
             logger.error("Error retrieving icons from database. Returning empty results");
             aCallback({});
             return;
           }
 
           let returnedAddons = {};
           for (let id in addons) {
@@ -337,17 +337,17 @@ this.AddonRepository_SQLiteMigrator = {
    * Gets a cached async statement or creates a new statement if it doesn't
    * already exist.
    *
    * @param  aKey
    *         A unique key to reference the statement
    * @return a mozIStorageAsyncStatement for the SQL corresponding to the
    *         unique key
    */
-  getAsyncStatement: function(aKey) {
+  getAsyncStatement(aKey) {
     if (aKey in this.asyncStatementsCache)
       return this.asyncStatementsCache[aKey];
 
     let sql = this.queries[aKey];
     try {
       return this.asyncStatementsCache[aKey] = this.connection.createAsyncStatement(sql);
     } catch (e) {
       logger.error("Error creating statement " + aKey + " (" + sql + ")");
@@ -384,17 +384,17 @@ this.AddonRepository_SQLiteMigrator = {
 
   /**
    * Make add-on structure from an asynchronous row.
    *
    * @param  aRow
    *         The asynchronous row to use
    * @return The created add-on
    */
-  _makeAddonFromAsyncRow: function(aRow) {
+  _makeAddonFromAsyncRow(aRow) {
     // This is intentionally not an AddonSearchResult object in order
     // to allow AddonDatabase._parseAddon to parse it, same as if it
     // was read from the JSON database.
 
     let addon = { icons: {} };
 
     for (let prop of PROP_SINGLE) {
       addon[prop] = aRow.getResultByName(prop)
@@ -405,30 +405,30 @@ this.AddonRepository_SQLiteMigrator = {
 
   /**
    * Make a developer from an asynchronous row
    *
    * @param  aRow
    *         The asynchronous row to use
    * @return The created developer
    */
-  _makeDeveloperFromAsyncRow: function(aRow) {
+  _makeDeveloperFromAsyncRow(aRow) {
     let name = aRow.getResultByName("name");
     let url = aRow.getResultByName("url")
     return new AddonManagerPrivate.AddonAuthor(name, url);
   },
 
   /**
    * Make a screenshot from an asynchronous row
    *
    * @param  aRow
    *         The asynchronous row to use
    * @return The created screenshot
    */
-  _makeScreenshotFromAsyncRow: function(aRow) {
+  _makeScreenshotFromAsyncRow(aRow) {
     let url = aRow.getResultByName("url");
     let width = aRow.getResultByName("width");
     let height = aRow.getResultByName("height");
     let thumbnailURL = aRow.getResultByName("thumbnailURL");
     let thumbnailWidth = aRow.getResultByName("thumbnailWidth");
     let thumbnailHeight = aRow.getResultByName("thumbnailHeight");
     let caption = aRow.getResultByName("caption");
     return new AddonManagerPrivate.AddonScreenshot(url, width, height, thumbnailURL,
@@ -437,17 +437,17 @@ this.AddonRepository_SQLiteMigrator = {
 
   /**
    * Make a CompatibilityOverride from an asynchronous row
    *
    * @param  aRow
    *         The asynchronous row to use
    * @return The created CompatibilityOverride
    */
-  _makeCompatOverrideFromAsyncRow: function(aRow) {
+  _makeCompatOverrideFromAsyncRow(aRow) {
     let type = aRow.getResultByName("type");
     let minVersion = aRow.getResultByName("minVersion");
     let maxVersion = aRow.getResultByName("maxVersion");
     let appID = aRow.getResultByName("appID");
     let appMinVersion = aRow.getResultByName("appMinVersion");
     let appMaxVersion = aRow.getResultByName("appMaxVersion");
     return new AddonManagerPrivate.AddonCompatibilityOverride(type,
                                                               minVersion,
@@ -459,62 +459,62 @@ this.AddonRepository_SQLiteMigrator = {
 
   /**
    * Make an icon from an asynchronous row
    *
    * @param  aRow
    *         The asynchronous row to use
    * @return An object containing the size and URL of the icon
    */
-  _makeIconFromAsyncRow: function(aRow) {
+  _makeIconFromAsyncRow(aRow) {
     let size = aRow.getResultByName("size");
     let url = aRow.getResultByName("url");
-    return { size: size, url: url };
+    return { size, url };
   },
 
   /**
    * A helper function to log an SQL error.
    *
    * @param  aError
    *         The storage error code associated with the error
    * @param  aErrorString
    *         An error message
    */
-  logSQLError: function(aError, aErrorString) {
+  logSQLError(aError, aErrorString) {
     logger.error("SQL error " + aError + ": " + aErrorString);
   },
 
   /**
    * A helper function to log any errors that occur during async statements.
    *
    * @param  aError
    *         A mozIStorageError to log
    */
-  asyncErrorLogger: function(aError) {
+  asyncErrorLogger(aError) {
     logger.error("Async SQL error " + aError.result + ": " + aError.message);
   },
 
   /**
    * Synchronously creates the triggers in the database.
    */
-  _createTriggers: function() {
+  _createTriggers() {
     this.connection.executeSimpleSQL("DROP TRIGGER IF EXISTS delete_addon");
     this.connection.executeSimpleSQL("CREATE TRIGGER delete_addon AFTER DELETE " +
       "ON addon BEGIN " +
       "DELETE FROM developer WHERE addon_internal_id=old.internal_id; " +
       "DELETE FROM screenshot WHERE addon_internal_id=old.internal_id; " +
       "DELETE FROM compatibility_override WHERE addon_internal_id=old.internal_id; " +
       "DELETE FROM icon WHERE addon_internal_id=old.internal_id; " +
       "END");
   },
 
   /**
    * Synchronously creates the indices in the database.
    */
-  _createIndices: function() {
+  _createIndices() {
     this.connection.executeSimpleSQL("CREATE INDEX IF NOT EXISTS developer_idx " +
                                      "ON developer (addon_internal_id)");
     this.connection.executeSimpleSQL("CREATE INDEX IF NOT EXISTS screenshot_idx " +
                                      "ON screenshot (addon_internal_id)");
     this.connection.executeSimpleSQL("CREATE INDEX IF NOT EXISTS compatibility_override_idx " +
                                      "ON compatibility_override (addon_internal_id)");
     this.connection.executeSimpleSQL("CREATE INDEX IF NOT EXISTS icon_idx " +
                                      "ON icon (addon_internal_id)");
--- a/toolkit/mozapps/extensions/internal/AddonTestUtils.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonTestUtils.jsm
@@ -74,17 +74,17 @@ var {AddonManager, AddonManagerPrivate} 
 
 
 // Mock out AddonManager's reference to the AsyncShutdown module so we can shut
 // down AddonManager from the test
 var MockAsyncShutdown = {
   hook: null,
   status: null,
   profileBeforeChange: {
-    addBlocker: function(name, blocker, options) {
+    addBlocker(name, blocker, options) {
       MockAsyncShutdown.hook = blocker;
       MockAsyncShutdown.status = options.fetchState;
     }
   },
   // We can use the real Barrier
   Barrier: AsyncShutdown.Barrier,
 };
 
@@ -1095,49 +1095,49 @@ var AddonTestUtils = {
    * @param {integer} reason The type of update to find.
    * @return {Promise<object>} an object containing information about the update.
    */
   promiseFindAddonUpdates(addon, reason = AddonManager.UPDATE_WHEN_PERIODIC_UPDATE) {
     let equal = this.testScope.equal;
     return new Promise((resolve, reject) => {
       let result = {};
       addon.findUpdates({
-        onNoCompatibilityUpdateAvailable: function(addon2) {
+        onNoCompatibilityUpdateAvailable(addon2) {
           if ("compatibilityUpdate" in result) {
             throw new Error("Saw multiple compatibility update events");
           }
           equal(addon, addon2, "onNoCompatibilityUpdateAvailable");
           result.compatibilityUpdate = false;
         },
 
-        onCompatibilityUpdateAvailable: function(addon2) {
+        onCompatibilityUpdateAvailable(addon2) {
           if ("compatibilityUpdate" in result) {
             throw new Error("Saw multiple compatibility update events");
           }
           equal(addon, addon2, "onCompatibilityUpdateAvailable");
           result.compatibilityUpdate = true;
         },
 
-        onNoUpdateAvailable: function(addon2) {
+        onNoUpdateAvailable(addon2) {
           if ("updateAvailable" in result) {
             throw new Error("Saw multiple update available events");
           }
           equal(addon, addon2, "onNoUpdateAvailable");
           result.updateAvailable = false;
         },
 
-        onUpdateAvailable: function(addon2, install) {
+        onUpdateAvailable(addon2, install) {
           if ("updateAvailable" in result) {
             throw new Error("Saw multiple update available events");
           }
           equal(addon, addon2, "onUpdateAvailable");
           result.updateAvailable = install;
         },
 
-        onUpdateFinished: function(addon2, error) {
+        onUpdateFinished(addon2, error) {
           equal(addon, addon2, "onUpdateFinished");
           if (error == AddonManager.UPDATE_STATUS_NO_ERROR) {
             resolve(result);
           } else {
             result.error = error;
             reject(result);
           }
         }
--- a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm
@@ -77,17 +77,17 @@ RDFSerializer.prototype = {
   /**
    * Escapes characters from a string that should not appear in XML.
    *
    * @param  aString
    *         The string to be escaped
    * @return a string with all characters invalid in XML character data
    *         converted to entity references.
    */
-  escapeEntities: function(aString) {
+  escapeEntities(aString) {
     aString = aString.replace(/&/g, "&amp;");
     aString = aString.replace(/</g, "&lt;");
     aString = aString.replace(/>/g, "&gt;");
     return aString.replace(/"/g, "&quot;");
   },
 
   /**
    * Serializes all the elements of an RDF container.
@@ -95,17 +95,17 @@ RDFSerializer.prototype = {
    * @param  aDs
    *         The RDF datasource
    * @param  aContainer
    *         The RDF container to output the child elements of
    * @param  aIndent
    *         The current level of indent for pretty-printing
    * @return a string containing the serialized elements.
    */
-  serializeContainerItems: function(aDs, aContainer, aIndent) {
+  serializeContainerItems(aDs, aContainer, aIndent) {
     var result = "";
     var items = aContainer.GetElements();
     while (items.hasMoreElements()) {
       var item = items.getNext().QueryInterface(Ci.nsIRDFResource);
       result += aIndent + "<RDF:li>\n"
       result += this.serializeResource(aDs, item, aIndent + this.INDENT);
       result += aIndent + "</RDF:li>\n"
     }
@@ -121,17 +121,17 @@ RDFSerializer.prototype = {
    *         The RDF datasource
    * @param  aResource
    *         The RDF resource that contains the properties to serialize
    * @param  aIndent
    *         The current level of indent for pretty-printing
    * @return a string containing the serialized properties.
    * @throws if the resource contains a property that cannot be serialized
    */
-  serializeResourceProperties: function(aDs, aResource, aIndent) {
+  serializeResourceProperties(aDs, aResource, aIndent) {
     var result = "";
     var items = [];
     var arcs = aDs.ArcLabelsOut(aResource);
     while (arcs.hasMoreElements()) {
       var arc = arcs.getNext().QueryInterface(Ci.nsIRDFResource);
       if (arc.ValueUTF8.substring(0, PREFIX_NS_EM.length) != PREFIX_NS_EM)
         continue;
       var prop = arc.ValueUTF8.substring(PREFIX_NS_EM.length);
@@ -175,17 +175,17 @@ RDFSerializer.prototype = {
    * @param  aResource
    *         The RDF resource to serialize
    * @param  aIndent
    *         The current level of indent for pretty-printing. If undefined no
    *         indent will be added
    * @return a string containing the serialized resource.
    * @throws if the RDF data contains multiple references to the same resource.
    */
-  serializeResource: function(aDs, aResource, aIndent) {
+  serializeResource(aDs, aResource, aIndent) {
     if (this.resources.indexOf(aResource) != -1 ) {
       // We cannot output multiple references to the same resource.
       throw Components.Exception("Cannot serialize multiple references to " + aResource.Value);
     }
     if (aIndent === undefined)
       aIndent = "";
 
     this.resources.push(aResource);
@@ -407,17 +407,17 @@ function parseRDFManifest(aId, aUpdateKe
       }
       catch (e) {
         logger.warn(e);
         continue;
       }
 
       let result = {
         id: aId,
-        version: version,
+        version,
         multiprocessCompatible: getBooleanProperty(ds, item, "multiprocessCompatible"),
         updateURL: getProperty(ds, targetApp, "updateLink"),
         updateHash: getProperty(ds, targetApp, "updateHash"),
         updateInfoURL: getProperty(ds, targetApp, "updateInfoURL"),
         strictCompatibility: !!getBooleanProperty(ds, targetApp, "strictCompatibility"),
         targetApplications: [appEntry]
       };
 
@@ -518,17 +518,17 @@ function parseJSONManifest(aId, aUpdateK
       id: TOOLKIT_ID,
       minVersion: getProperty(app, "strict_min_version", "string",
                               AddonManagerPrivate.webExtensionsMinPlatformVersion),
       maxVersion: "*",
     };
 
     let result = {
       id: aId,
-      version: version,
+      version,
       multiprocessCompatible: getProperty(update, "multiprocess_compatible", "boolean", true),
       updateURL: getProperty(update, "update_link", "string"),
       updateHash: getProperty(update, "update_hash", "string"),
       updateInfoURL: getProperty(update, "update_info_url", "string"),
       strictCompatibility: false,
       targetApplications: [appEntry],
     };
 
@@ -605,17 +605,17 @@ UpdateParser.prototype = {
   updateKey: null,
   observer: null,
   request: null,
   url: null,
 
   /**
    * Called when the manifest has been successfully loaded.
    */
-  onLoad: function() {
+  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);
     }
@@ -691,27 +691,27 @@ UpdateParser.prototype = {
     else {
       logger.warn("onUpdateCheckComplete may not properly cancel", new Error("stack marker"));
     }
   },
 
   /**
    * Called when the request times out
    */
-  onTimeout: function() {
+  onTimeout() {
     this.request = null;
     this._doneAt = new Error("Timed out");
     logger.warn("Request for " + this.url + " timed out");
     this.notifyError(AddonUpdateChecker.ERROR_TIMEOUT);
   },
 
   /**
    * Called when the manifest failed to load.
    */
-  onError: function() {
+  onError() {
     if (!Components.isSuccessCode(this.request.status)) {
       logger.warn("Request failed: " + this.url + " - " + this.request.status);
     }
     else if (this.request.channel instanceof Ci.nsIHttpChannel) {
       try {
         if (this.request.channel.requestSucceeded) {
           logger.warn("Request failed: " + this.url + " - " +
                this.request.channel.responseStatus + ": " +
@@ -730,31 +730,31 @@ UpdateParser.prototype = {
     this._doneAt = new Error("UP_onError");
 
     this.notifyError(AddonUpdateChecker.ERROR_DOWNLOAD_ERROR);
   },
 
   /**
    * Helper method to notify the observer that an error occured.
    */
-  notifyError: function(aStatus) {
+  notifyError(aStatus) {
     if ("onUpdateCheckError" in this.observer) {
       try {
         this.observer.onUpdateCheckError(aStatus);
       }
       catch (e) {
         logger.warn("onUpdateCheckError notification failed", e);
       }
     }
   },
 
   /**
    * Called to cancel an in-progress update check.
    */
-  cancel: function() {
+  cancel() {
     if (!this.request) {
       logger.error("Trying to cancel already-complete request", this._doneAt);
       return;
     }
     this.request.abort();
     this.request = null;
     this._doneAt = new Error("UP_cancel");
     this.notifyError(AddonUpdateChecker.ERROR_CANCELLED);
@@ -838,17 +838,17 @@ this.AddonUpdateChecker = {
    * @param  aPlatformVersion
    *         The version of the platform or null to use the current version
    * @param  aIgnoreMaxVersion
    *         Ignore maxVersion when testing if an update matches. Optional.
    * @param  aIgnoreStrictCompat
    *         Ignore strictCompatibility when testing if an update matches. Optional.
    * @return an update object if one matches or null if not
    */
-  getCompatibilityUpdate: function(aUpdates, aVersion, aIgnoreCompatibility,
+  getCompatibilityUpdate(aUpdates, aVersion, aIgnoreCompatibility,
                                    aAppVersion, aPlatformVersion,
                                    aIgnoreMaxVersion, aIgnoreStrictCompat) {
     if (!aAppVersion)
       aAppVersion = Services.appinfo.version;
     if (!aPlatformVersion)
       aPlatformVersion = Services.appinfo.platformVersion;
 
     for (let update of aUpdates) {
@@ -881,17 +881,17 @@ this.AddonUpdateChecker = {
    * @param  aIgnoreMaxVersion
    *         When determining compatible updates, ignore maxVersion. Optional.
    * @param  aIgnoreStrictCompat
    *         When determining compatible updates, ignore strictCompatibility. Optional.
    * @param  aCompatOverrides
    *         Array of AddonCompatibilityOverride to take into account. Optional.
    * @return an update object if one matches or null if not
    */
-  getNewestCompatibleUpdate: function(aUpdates, aAppVersion, aPlatformVersion,
+  getNewestCompatibleUpdate(aUpdates, aAppVersion, aPlatformVersion,
                                       aIgnoreMaxVersion, aIgnoreStrictCompat,
                                       aCompatOverrides) {
     if (!aAppVersion)
       aAppVersion = Services.appinfo.version;
     if (!aPlatformVersion)
       aPlatformVersion = Services.appinfo.platformVersion;
 
     let blocklist = Cc["@mozilla.org/extensions/blocklist;1"].
@@ -923,12 +923,12 @@ this.AddonUpdateChecker = {
    *         An optional update key for the add-on
    * @param  aUrl
    *         The URL of the add-on's update manifest
    * @param  aObserver
    *         An observer to notify of results
    * @return UpdateParser so that the caller can use UpdateParser.cancel() to shut
    *         down in-progress update requests
    */
-  checkForUpdates: function(aId, aUpdateKey, aUrl, aObserver) {
+  checkForUpdates(aId, aUpdateKey, aUrl, aObserver) {
     return new UpdateParser(aId, aUpdateKey, aUrl, aObserver);
   }
 };
--- a/toolkit/mozapps/extensions/internal/GMPProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/GMPProvider.jsm
@@ -227,17 +227,17 @@ GMPWrapper.prototype = {
   get providesUpdatesSecurely() {
     return true;
   },
 
   get foreignInstall() {
     return false;
   },
 
-  isCompatibleWith: function(aAppVersion, aPlatformVersion) {
+  isCompatibleWith(aAppVersion, aPlatformVersion) {
     return true;
   },
 
   get applyBackgroundUpdates() {
     if (!GMPPrefs.isSet(GMPPrefs.KEY_PLUGIN_AUTOUPDATE, this._plugin.id)) {
       return AddonManager.AUTOUPDATE_DEFAULT;
     }
 
@@ -250,17 +250,17 @@ GMPWrapper.prototype = {
       GMPPrefs.reset(GMPPrefs.KEY_PLUGIN_AUTOUPDATE, this._plugin.id);
     } else if (aVal == AddonManager.AUTOUPDATE_ENABLE) {
       GMPPrefs.set(GMPPrefs.KEY_PLUGIN_AUTOUPDATE, true, this._plugin.id);
     } else if (aVal == AddonManager.AUTOUPDATE_DISABLE) {
       GMPPrefs.set(GMPPrefs.KEY_PLUGIN_AUTOUPDATE, false, this._plugin.id);
     }
   },
 
-  findUpdates: function(aListener, aReason, aAppVersion, aPlatformVersion) {
+  findUpdates(aListener, aReason, aAppVersion, aPlatformVersion) {
     this._log.trace("findUpdates() - " + this._plugin.id + " - reason=" +
                     aReason);
 
     AddonManagerPrivate.callNoUpdateListeners(this, aListener);
 
     if (aReason === AddonManager.UPDATE_WHEN_PERIODIC_UPDATE) {
       if (!AddonManager.shouldAutoUpdate(this)) {
         this._log.trace("findUpdates() - " + this._plugin.id +
@@ -332,17 +332,17 @@ GMPWrapper.prototype = {
     }
     return [];
   },
 
   get isInstalled() {
     return this.version && this.version.length > 0;
   },
 
-  _handleEnabledChanged: function() {
+  _handleEnabledChanged() {
     this._log.info("_handleEnabledChanged() id=" +
       this._plugin.id + " isActive=" + this.isActive);
 
     AddonManagerPrivate.callAddonListeners(this.isActive ?
                                            "onEnabling" : "onDisabling",
                                            this, false);
     if (this._gmpPath) {
       if (this.isActive) {
@@ -355,17 +355,17 @@ GMPWrapper.prototype = {
         gmpService.removePluginDirectory(this._gmpPath);
       }
     }
     AddonManagerPrivate.callAddonListeners(this.isActive ?
                                            "onEnabled" : "onDisabled",
                                            this);
   },
 
-  onPrefEMEGlobalEnabledChanged: function() {
+  onPrefEMEGlobalEnabledChanged() {
     this._log.info("onPrefEMEGlobalEnabledChanged() id=" + this._plugin.id +
       " appDisabled=" + this.appDisabled + " isActive=" + this.isActive +
       " hidden=" + GMPUtils.isPluginHidden(this._plugin));
 
     AddonManagerPrivate.callAddonListeners("onPropertyChanged", this,
                                            ["appDisabled"]);
     // If EME or the GMP itself are disabled, uninstall the GMP.
     // Otherwise, check for updates, so we download and install the GMP.
@@ -378,17 +378,17 @@ GMPWrapper.prototype = {
       AddonManagerPrivate.callAddonListeners("onInstalled", this);
       this.checkForUpdates(GMP_CHECK_DELAY);
     }
     if (!this.userDisabled) {
       this._handleEnabledChanged();
     }
   },
 
-  checkForUpdates: function(delay) {
+  checkForUpdates(delay) {
     if (this._isUpdateCheckPending) {
       return;
     }
     this._isUpdateCheckPending = true;
     GMPPrefs.reset(GMPPrefs.KEY_UPDATE_LAST_CHECK, null);
     // Delay this in case the user changes his mind and doesn't want to
     // enable EME after all.
     setTimeout(() => {
@@ -397,38 +397,38 @@ GMPWrapper.prototype = {
         // We don't really care about the results, if someone is interested
         // they can check the log.
         gmpInstallManager.simpleCheckAndInstall().then(null, () => {});
       }
       this._isUpdateCheckPending = false;
     }, delay);
   },
 
-  receiveMessage: function({target: browser, data: data}) {
+  receiveMessage({target: browser, data: data}) {
     this._log.trace("receiveMessage() data=" + data);
     let parsedData;
     try {
       parsedData = JSON.parse(data);
     } catch (ex) {
       this._log.error("Malformed EME video message with data: " + data);
       return;
     }
     let {status} = parsedData;
     if (status == "cdm-not-installed") {
       this.checkForUpdates(0);
     }
   },
 
-  onPrefEnabledChanged: function() {
+  onPrefEnabledChanged() {
     if (!this._plugin.isEME || !this.appDisabled) {
       this._handleEnabledChanged();
     }
   },
 
-  onPrefVersionChanged: function() {
+  onPrefVersionChanged() {
     AddonManagerPrivate.callAddonListeners("onUninstalling", this, false);
     if (this._gmpPath) {
       this._log.info("onPrefVersionChanged() - unregistering gmp directory " +
                      this._gmpPath);
       gmpService.removeAndDeletePluginDirectory(this._gmpPath, true /* can defer */);
     }
     AddonManagerPrivate.callAddonListeners("onUninstalled", this);
 
@@ -445,45 +445,45 @@ GMPWrapper.prototype = {
     if (this._gmpPath && this.isActive) {
       this._log.info("onPrefVersionChanged() - registering gmp directory " +
                      this._gmpPath);
       gmpService.addPluginDirectory(this._gmpPath);
     }
     AddonManagerPrivate.callAddonListeners("onInstalled", this);
   },
 
-  uninstallPlugin: function() {
+  uninstallPlugin() {
     AddonManagerPrivate.callAddonListeners("onUninstalling", this, false);
     if (this.gmpPath) {
       this._log.info("uninstallPlugin() - unregistering gmp directory " +
                      this.gmpPath);
       gmpService.removeAndDeletePluginDirectory(this.gmpPath);
     }
     GMPPrefs.reset(GMPPrefs.KEY_PLUGIN_VERSION, this.id);
     GMPPrefs.reset(GMPPrefs.KEY_PLUGIN_ABI, this.id);
     GMPPrefs.reset(GMPPrefs.KEY_PLUGIN_LAST_UPDATE, this.id);
     AddonManagerPrivate.callAddonListeners("onUninstalled", this);
   },
 
-  shutdown: function() {
+  shutdown() {
     Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_ENABLED,
                                            this._plugin.id),
                        this.onPrefEnabledChanged, this);
     Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_VERSION,
                                            this._plugin.id),
                        this.onPrefVersionChanged, this);
     if (this._plugin.isEME) {
       Preferences.ignore(GMPPrefs.KEY_EME_ENABLED,
                          this.onPrefEMEGlobalEnabledChanged, this);
       messageManager.removeMessageListener("EMEVideo:ContentMediaKeysRequest", this);
     }
     return this._updateTask;
   },
 
-  _arePluginFilesOnDisk: function() {
+  _arePluginFilesOnDisk() {
     let fileExists = function(aGmpPath, aFileName) {
       let f = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
       let path = OS.Path.join(aGmpPath, aFileName);
       f.initWithPath(path);
       return f.exists();
     };
 
     let id = this._plugin.id.substring(4);
@@ -495,17 +495,17 @@ GMPWrapper.prototype = {
       infoName = id + ".info";
     }
 
     return fileExists(this.gmpPath, libName) &&
            fileExists(this.gmpPath, infoName) &&
            (this._plugin.id != EME_ADOBE_ID || fileExists(this.gmpPath, id + ".voucher"));
   },
 
-  validate: function() {
+  validate() {
     if (!this.isInstalled) {
       // Not installed -> Valid.
       return {
         installed: false,
         valid: true
       };
     }
 
@@ -529,17 +529,17 @@ GMPWrapper.prototype = {
   },
 };
 
 var GMPProvider = {
   get name() { return "GMPProvider"; },
 
   _plugins: null,
 
-  startup: function() {
+  startup() {
     configureLogging();
     this._log = Log.repository.getLoggerWithMessagePrefix("Toolkit.GMP",
                                                           "GMPProvider.");
     this.buildPluginList();
     this.ensureProperCDMInstallState();
 
     Preferences.observe(GMPPrefs.KEY_LOG_BASE, configureLogging);
 
@@ -585,17 +585,17 @@ var GMPProvider = {
       this._log.info("startup - adding clearkey CDM directory " +
                      clearkeyPath);
       gmpService.addPluginDirectory(clearkeyPath);
     } catch (e) {
       this._log.warn("startup - adding clearkey CDM failed", e);
     }
   },
 
-  shutdown: function() {
+  shutdown() {
     this._log.trace("shutdown");
     Preferences.ignore(GMPPrefs.KEY_LOG_BASE, configureLogging);
 
     let shutdownTask = Task.spawn(function*() {
       this._log.trace("shutdown - shutdownTask");
       let shutdownSucceeded = true;
 
       for (let plugin of this._plugins.values()) {
@@ -611,31 +611,31 @@ var GMPProvider = {
       if (!shutdownSucceeded) {
         throw new Error("Shutdown failed");
       }
     }.bind(this));
 
     return shutdownTask;
   },
 
-  getAddonByID: function(aId, aCallback) {
+  getAddonByID(aId, aCallback) {
     if (!this.isEnabled) {
       aCallback(null);
       return;
     }
 
     let plugin = this._plugins.get(aId);
     if (plugin && !GMPUtils.isPluginHidden(plugin)) {
       aCallback(plugin.wrapper);
     } else {
       aCallback(null);
     }
   },
 
-  getAddonsByTypes: function(aTypes, aCallback) {
+  getAddonsByTypes(aTypes, aCallback) {
     if (!this.isEnabled ||
         (aTypes && aTypes.indexOf("plugin") < 0)) {
       aCallback([]);
       return;
     }
 
     let results = Array.from(this._plugins.values())
       .filter(p => !GMPUtils.isPluginHidden(p))
@@ -643,30 +643,30 @@ var GMPProvider = {
 
     aCallback(results);
   },
 
   get isEnabled() {
     return GMPPrefs.get(GMPPrefs.KEY_PROVIDER_ENABLED, false);
   },
 
-  generateFullDescription: function(aPlugin) {
+  generateFullDescription(aPlugin) {
     let rv = [];
     for (let [urlProp, labelId] of [["learnMoreURL", GMP_LEARN_MORE],
                                     ["licenseURL", aPlugin.id == WIDEVINE_ID ?
                                      GMP_PRIVACY_INFO : GMP_LICENSE_INFO]]) {
       if (aPlugin[urlProp]) {
         let label = pluginsBundle.GetStringFromName(labelId);
         rv.push(`<xhtml:a href="${aPlugin[urlProp]}" target="_blank">${label}</xhtml:a>.`);
       }
     }
     return rv.length ? rv.join("<xhtml:br /><xhtml:br />") : undefined;
   },
 
-  buildPluginList: function() {
+  buildPluginList() {
     this._plugins = new Map();
     for (let aPlugin of GMP_PLUGINS) {
       let plugin = {
         id: aPlugin.id,
         name: pluginsBundle.GetStringFromName(aPlugin.name),
         description: pluginsBundle.GetStringFromName(aPlugin.description),
         homepageURL: aPlugin.homepageURL,
         optionsURL: aPlugin.optionsURL,
@@ -674,17 +674,17 @@ var GMPProvider = {
         isEME: aPlugin.isEME,
       };
       plugin.fullDescription = this.generateFullDescription(aPlugin);
       plugin.wrapper = new GMPWrapper(plugin);
       this._plugins.set(plugin.id, plugin);
     }
   },
 
-  ensureProperCDMInstallState: function() {
+  ensureProperCDMInstallState() {
     if (!GMPPrefs.get(GMPPrefs.KEY_EME_ENABLED, true)) {
       for (let plugin of this._plugins.values()) {
         if (plugin.isEME && plugin.wrapper.isInstalled) {
           gmpService.addPluginDirectory(plugin.wrapper.gmpPath);
           plugin.wrapper.uninstallPlugin();
         }
       }
     }
--- a/toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm
+++ b/toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm
@@ -16,48 +16,48 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
   "resource://gre/modules/FileUtils.jsm");
 
 const ORIGIN_TOP_RIGHT = 1;
 const ORIGIN_BOTTOM_LEFT = 2;
 
 this.LightweightThemeImageOptimizer = {
-  optimize: function(aThemeData, aScreen) {
+  optimize(aThemeData, aScreen) {
     let data = Object.assign({}, aThemeData);
     if (!data.headerURL) {
       return data;
     }
 
     data.headerURL = ImageCropper.getCroppedImageURL(
       data.headerURL, aScreen, ORIGIN_TOP_RIGHT);
 
     if (data.footerURL) {
       data.footerURL = ImageCropper.getCroppedImageURL(
         data.footerURL, aScreen, ORIGIN_BOTTOM_LEFT);
     }
 
     return data;
   },
 
-  purge: function() {
+  purge() {
     let dir = FileUtils.getDir("ProfD", ["lwtheme"]);
     dir.followLinks = false;
     try {
       dir.remove(true);
     } catch (e) {}
   }
 };
 
 Object.freeze(LightweightThemeImageOptimizer);
 
 var ImageCropper = {
   _inProgress: {},
 
-  getCroppedImageURL: function(aImageURL, aScreen, aOrigin) {
+  getCroppedImageURL(aImageURL, aScreen, aOrigin) {
     // We can crop local files, only.
     if (!aImageURL.startsWith("file://")) {
       return aImageURL;
     }
 
     // Generate the cropped image's file name using its
     // base name and the current screen size.
     let uri = Services.io.newURI(aImageURL, null, null);
@@ -83,17 +83,17 @@ var ImageCropper = {
     // Crop the given image in the background.
     this._crop(uri, croppedFile, aScreen, aOrigin);
 
     // Return the original image while we're waiting for the cropped version
     // to be written to disk.
     return aImageURL;
   },
 
-  _crop: function(aURI, aTargetFile, aScreen, aOrigin) {
+  _crop(aURI, aTargetFile, aScreen, aOrigin) {
     let inProgress = this._inProgress;
     inProgress[aTargetFile.path] = true;
 
     function resetInProgress() {
       delete inProgress[aTargetFile.path];
     }
 
     ImageFile.read(aURI, function(aInputStream, aContentType) {
@@ -109,32 +109,32 @@ var ImageCropper = {
       }
 
       resetInProgress();
     });
   }
 };
 
 var ImageFile = {
-  read: function(aURI, aCallback) {
+  read(aURI, aCallback) {
     this._netUtil.asyncFetch({
       uri: aURI,
       loadUsingSystemPrincipal: true,
       contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE
     }, function(aInputStream, aStatus, aRequest) {
         if (Components.isSuccessCode(aStatus) && aRequest instanceof Ci.nsIChannel) {
           let channel = aRequest.QueryInterface(Ci.nsIChannel);
           aCallback(aInputStream, channel.contentType);
         } else {
           aCallback();
         }
       });
   },
 
-  write: function(aFile, aInputStream, aCallback) {
+  write(aFile, aInputStream, aCallback) {
     let fos = FileUtils.openSafeFileOutputStream(aFile);
     this._netUtil.asyncCopy(aInputStream, fos, function(aResult) {
       FileUtils.closeSafeFileOutputStream(fos);
 
       // Remove the file if writing was not successful.
       if (!Components.isSuccessCode(aResult)) {
         try {
           aFile.remove(false);
@@ -145,27 +145,27 @@ var ImageFile = {
     });
   }
 };
 
 XPCOMUtils.defineLazyModuleGetter(ImageFile, "_netUtil",
   "resource://gre/modules/NetUtil.jsm", "NetUtil");
 
 var ImageTools = {
-  decode: function(aInputStream, aContentType) {
+  decode(aInputStream, aContentType) {
     let outParam = {value: null};
 
     try {
       this._imgTools.decodeImageData(aInputStream, aContentType, outParam);
     } catch (e) {}
 
     return outParam.value;
   },
 
-  encode: function(aImage, aScreen, aOrigin, aContentType) {
+  encode(aImage, aScreen, aOrigin, aContentType) {
     let stream;
     let width = Math.min(aImage.width, aScreen.width);
     let height = Math.min(aImage.height, aScreen.height);
     let x = aOrigin == ORIGIN_TOP_RIGHT ? aImage.width - width : 0;
 
     try {
       stream = this._imgTools.encodeCroppedImage(aImage, aContentType, x, 0,
                                                  width, height);
--- a/toolkit/mozapps/extensions/internal/PluginProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/PluginProvider.jsm
@@ -54,32 +54,32 @@ function getIDHashForString(aStr) {
 var PluginProvider = {
   get name() {
     return "PluginProvider";
   },
 
   // A dictionary mapping IDs to names and descriptions
   plugins: null,
 
-  startup: function() {
+  startup() {
     Services.obs.addObserver(this, LIST_UPDATED_TOPIC, false);
     Services.obs.addObserver(this, AddonManager.OPTIONS_NOTIFICATION_DISPLAYED, false);
   },
 
   /**
    * Called when the application is shutting down. Only necessary for tests
    * to be able to simulate a shutdown.
    */
-  shutdown: function() {
+  shutdown() {
     this.plugins = null;
     Services.obs.removeObserver(this, AddonManager.OPTIONS_NOTIFICATION_DISPLAYED);
     Services.obs.removeObserver(this, LIST_UPDATED_TOPIC);
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
     case AddonManager.OPTIONS_NOTIFICATION_DISPLAYED:
       this.getAddonByID(aData, function(plugin) {
         if (!plugin)
           return;
 
         let libLabel = aSubject.getElementById("pluginLibraries");
         libLabel.textContent = plugin.pluginLibraries.join(", ");
@@ -101,32 +101,32 @@ var PluginProvider = {
         this.updatePluginList();
       break;
     }
   },
 
   /**
    * Creates a PluginWrapper for a plugin object.
    */
-  buildWrapper: function(aPlugin) {
+  buildWrapper(aPlugin) {
     return new PluginWrapper(aPlugin.id,
                              aPlugin.name,
                              aPlugin.description,
                              aPlugin.tags);
   },
 
   /**
    * Called to get an Addon with a particular ID.
    *
    * @param  aId
    *         The ID of the add-on to retrieve
    * @param  aCallback
    *         A callback to pass the Addon to
    */
-  getAddonByID: function(aId, aCallback) {
+  getAddonByID(aId, aCallback) {
     if (!this.plugins)
       this.buildPluginList();
 
     if (aId in this.plugins)
       aCallback(this.buildWrapper(this.plugins[aId]));
     else
       aCallback(null);
   },
@@ -134,17 +134,17 @@ var PluginProvider = {
   /**
    * Called to get Addons of a particular type.
    *
    * @param  aTypes
    *         An array of types to fetch. Can be null to get all types.
    * @param  callback
    *         A callback to pass an array of Addons to
    */
-  getAddonsByTypes: function(aTypes, aCallback) {
+  getAddonsByTypes(aTypes, aCallback) {
     if (aTypes && aTypes.indexOf("plugin") < 0) {
       aCallback([]);
       return;
     }
 
     if (!this.plugins)
       this.buildPluginList();
 
@@ -159,38 +159,38 @@ var PluginProvider = {
   /**
    * Called to get Addons that have pending operations.
    *
    * @param  aTypes
    *         An array of types to fetch. Can be null to get all types
    * @param  aCallback
    *         A callback to pass an array of Addons to
    */
-  getAddonsWithOperationsByTypes: function(aTypes, aCallback) {
+  getAddonsWithOperationsByTypes(aTypes, aCallback) {
     aCallback([]);
   },
 
   /**
    * Called to get the current AddonInstalls, optionally restricting by type.
    *
    * @param  aTypes
    *         An array of types or null to get all types
    * @param  aCallback
    *         A callback to pass the array of AddonInstalls to
    */
-  getInstallsByTypes: function(aTypes, aCallback) {
+  getInstallsByTypes(aTypes, aCallback) {
     aCallback([]);
   },
 
   /**
    * Builds a list of the current plugins reported by the plugin host
    *
    * @return a dictionary of plugins indexed by our generated ID
    */
-  getPluginList: function() {
+  getPluginList() {
     let tags = Cc["@mozilla.org/plugin/host;1"].
                getService(Ci.nsIPluginHost).
                getPluginTags({});
 
     let list = {};
     let seenPlugins = {};
     for (let tag of tags) {
       if (!(tag.name in seenPlugins))
@@ -212,26 +212,26 @@ var PluginProvider = {
     }
 
     return list;
   },
 
   /**
    * Builds the list of known plugins from the plugin host
    */
-  buildPluginList: function() {
+  buildPluginList() {
     this.plugins = this.getPluginList();
   },
 
   /**
    * Updates the plugins from the plugin host by comparing the current plugins
    * to the last known list sending out any necessary API notifications for
    * changes.
    */
-  updatePluginList: function() {
+  updatePluginList() {
     let newList = this.getPluginList();
 
     let lostPlugins = Object.keys(this.plugins).filter(id => !(id in newList)).
                       map(id => this.buildWrapper(this.plugins[id]));
     let newPlugins = Object.keys(newList).filter(id => !(id in this.plugins)).
                      map(id => this.buildWrapper(newList[id]));
     let matchedIDs = Object.keys(newList).filter(id => id in this.plugins);
 
@@ -575,21 +575,21 @@ PluginWrapper.prototype = {
   get providesUpdatesSecurely() {
     return true;
   },
 
   get foreignInstall() {
     return true;
   },
 
-  isCompatibleWith: function(aAppVersion, aPlatformVersion) {
+  isCompatibleWith(aAppVersion, aPlatformVersion) {
     return true;
   },
 
-  findUpdates: function(aListener, aReason, aAppVersion, aPlatformVersion) {
+  findUpdates(aListener, aReason, aAppVersion, aPlatformVersion) {
     if ("onNoCompatibilityUpdateAvailable" in aListener)
       aListener.onNoCompatibilityUpdateAvailable(this);
     if ("onNoUpdateAvailable" in aListener)
       aListener.onNoUpdateAvailable(this);
     if ("onUpdateFinished" in aListener)
       aListener.onUpdateFinished(this);
   }
 };
--- a/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
+++ b/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm
@@ -37,28 +37,25 @@ Cu.import("resource://gre/modules/osfile
 XPCOMUtils.defineLazyModuleGetter(this, "GMPPrefs",
                                   "resource://gre/modules/GMPUtils.jsm");
 
 /* globals OS */
 
 XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
                                   "resource://gre/modules/UpdateUtils.jsm");
 
-XPCOMUtils.defineLazyModuleGetter(this, "ServiceRequest",
-                                  "resource://gre/modules/ServiceRequest.jsm");
+var logger = Log.repository.getLogger("addons.productaddons");
 
 // This exists so that tests can override the XHR behaviour for downloading
 // the addon update XML file.
 var CreateXHR = function() {
   return Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
-  createInstance(Ci.nsISupports);
+    createInstance(Ci.nsISupports);
 }
 
-var logger = Log.repository.getLogger("addons.productaddons");
-
 /**
  * Number of milliseconds after which we need to cancel `downloadXML`.
  *
  * Bug 1087674 suggests that the XHR we use in `downloadXML` may
  * never terminate in presence of network nuisances (e.g. strange
  * antivirus behavior). This timeout is a defensive measure to ensure
  * that we fail cleanly in such case.
  */
@@ -111,21 +108,16 @@ function downloadXML(url, allowNonBuiltI
       request = request.wrappedJSObject;
     }
     request.open("GET", url, true);
     request.channel.notificationCallbacks = new BadCertHandler(allowNonBuiltIn);
     // Prevent the request from reading from the cache.
     request.channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE;
     // Prevent the request from writing to the cache.
     request.channel.loadFlags |= Ci.nsIRequest.INHIBIT_CACHING;
-    // Use conservative TLS settings. See bug 1325501.
-    // TODO move to ServiceRequest.
-    if (request.channel instanceof Ci.nsIHttpChannelInternal) {
-      request.channel.QueryInterface(Ci.nsIHttpChannelInternal).beConservative = true;
-    }
     request.timeout = TIMEOUT_DELAY_MS;
 
     request.overrideMimeType("text/xml");
     // The Cache-Control header is only interpreted by proxies and the
     // final destination. It does not help if a resource is already
     // cached locally.
     request.setRequestHeader("Cache-Control", "no-cache");
     // HTTP/1.0 servers might not implement Cache-Control and
@@ -166,17 +158,17 @@ function downloadXML(url, allowNonBuiltI
     logger.info("sending request to: " + url);
     request.send(null);
   });
 }
 
 function downloadJSON(uri) {
   logger.info("fetching config from: " + uri);
   return new Promise((resolve, reject) => {
-    let xmlHttp = new ServiceRequest({mozAnon: true});
+    let xmlHttp = new XMLHttpRequest({mozAnon: true});
 
     xmlHttp.onload = function(aResponse) {
       resolve(JSON.parse(this.responseText));
     };
 
     xmlHttp.onerror = function(e) {
       reject("Fetching " + uri + " results in error code: " + e.target.status);
     };
@@ -293,17 +285,18 @@ function downloadLocalConfig() {
  *
  * @param  url
  *         The url to download from.
  * @return a promise that resolves to the path of a temporary file or rejects
  *         with a JS exception in case of error.
  */
 function downloadFile(url) {
   return new Promise((resolve, reject) => {
-    let xhr = new XMLHttpRequest();
+    let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
+                  createInstance(Ci.nsISupports);
     xhr.onload = function(response) {
       logger.info("downloadXHR File download. status=" + xhr.status);
       if (xhr.status != 200 && xhr.status != 206) {
         reject(Components.Exception("File download failed", xhr.status));
         return;
       }
       Task.spawn(function* () {
         let f = yield OS.File.openUnique(OS.Path.join(OS.Constants.Path.tmpDir, "tmpaddon"));
@@ -325,21 +318,16 @@ function downloadFile(url) {
       reject(ex);
     };
     xhr.addEventListener("error", fail);
     xhr.addEventListener("abort", fail);
 
     xhr.responseType = "arraybuffer";
     try {
       xhr.open("GET", url);
-      // Use conservative TLS settings. See bug 1325501.
-      // TODO move to ServiceRequest.
-      if (xhr.channel instanceof Ci.nsIHttpChannelInternal) {
-        xhr.channel.QueryInterface(Ci.nsIHttpChannelInternal).beConservative = true;
-      }
       xhr.send(null);
     } catch (ex) {
       reject(ex);
     }
   });
 }
 
 /**
@@ -426,22 +414,17 @@ const ProductAddonChecker = {
    *         Whether to trust SSL certificates without a built-in CA issuer.
    * @param  allowedCerts
    *         The list of certificate attributes to match the SSL certificate
    *         against or null to skip checks.
    * @return a promise that resolves to an object containing the list of add-ons
    *         and whether the local fallback was used, or rejects with a JS
    *         exception in case of error.
    */
-  getProductAddonList: function(url, allowNonBuiltIn = false, allowedCerts = null) {
-    if (!GMPPrefs.get(GMPPrefs.KEY_UPDATE_ENABLED, true)) {
-      logger.info("Updates are disabled via media.gmp-manager.updateEnabled");
-      return Promise.resolve({usedFallback: true, gmpAddons: []});
-    }
-
+  getProductAddonList(url, allowNonBuiltIn = false, allowedCerts = null) {
     return downloadXML(url, allowNonBuiltIn, allowedCerts)
       .then(parseXML)
       .catch(downloadLocalConfig);
   },
 
   /**
    * Downloads an add-on to a local file and checks that it matches the expected
    * file. The caller is responsible for deleting the temporary file returned.
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -343,17 +343,17 @@ function loadLazyObjects() {
     gGlobalScope[name] = scope[name];
   }
   gLazyObjectsLoaded = true;
   return scope;
 }
 
 LAZY_OBJECTS.forEach(name => {
   Object.defineProperty(gGlobalScope, name, {
-    get: function() {
+    get() {
       let objs = loadLazyObjects();
       return objs[name];
     },
     configurable: true
   });
 });
 
 
@@ -453,17 +453,17 @@ function SafeInstallOperation() {
   this._installedFiles = [];
   this._createdDirs = [];
 }
 
 SafeInstallOperation.prototype = {
   _installedFiles: null,
   _createdDirs: null,
 
-  _installFile: function(aFile, aTargetDirectory, aCopy) {
+  _installFile(aFile, aTargetDirectory, aCopy) {
     let oldFile = aCopy ? null : aFile.clone();
     let newFile = aFile.clone();
     try {
       if (aCopy) {
         newFile.copyTo(aTargetDirectory, null);
         // copyTo does not update the nsIFile with the new.
         newFile = aTargetDirectory.clone();
         newFile.append(aFile.leafName);
@@ -475,20 +475,20 @@ SafeInstallOperation.prototype = {
         newFile.moveTo(aTargetDirectory, null);
       }
     }
     catch (e) {
       logger.error("Failed to " + (aCopy ? "copy" : "move") + " file " + aFile.path +
             " to " + aTargetDirectory.path, e);
       throw e;
     }
-    this._installedFiles.push({ oldFile: oldFile, newFile: newFile });
-  },
-
-  _installDirectory: function(aDirectory, aTargetDirectory, aCopy) {
+    this._installedFiles.push({ oldFile, newFile });
+  },
+
+  _installDirectory(aDirectory, aTargetDirectory, aCopy) {
     if (aDirectory.contains(aTargetDirectory)) {
       let err = new Error(`Not installing ${aDirectory} into its own descendent ${aTargetDirectory}`);
       logger.error(err);
       throw err;
     }
 
     let newDir = aTargetDirectory.clone();
     newDir.append(aDirectory.leafName);
@@ -532,17 +532,17 @@ SafeInstallOperation.prototype = {
       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: function(aDirEntry, aTargetDirectory, aCopy) {
+  _installDirEntry(aDirEntry, aTargetDirectory, aCopy) {
     let isDir = null;
 
     try {
       isDir = aDirEntry.isDirectory() && !aDirEntry.isSymlink();
     }
     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
@@ -573,17 +573,17 @@ SafeInstallOperation.prototype = {
    * files that have been moved will be moved back to their original location.
    *
    * @param  aFile
    *         The file or directory to be moved.
    * @param  aTargetDirectory
    *         The directory to move into, this is expected to be an empty
    *         directory.
    */
-  moveUnder: function(aFile, aTargetDirectory) {
+  moveUnder(aFile, aTargetDirectory) {
     try {
       this._installDirEntry(aFile, aTargetDirectory, false);
     }
     catch (e) {
       this.rollback();
       throw e;
     }
   },
@@ -592,21 +592,21 @@ SafeInstallOperation.prototype = {
    * 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.
    *
    * @param  aOldLocation
    *         The old location of the file.
    * @param  aNewLocation
    *         The new location of the file.
    */
-  moveTo: function(aOldLocation, aNewLocation) {
+  moveTo(aOldLocation, aNewLocation) {
     try {
       let oldFile = aOldLocation.clone(), newFile = aNewLocation.clone();
       oldFile.moveTo(newFile.parent, newFile.leafName);
-      this._installedFiles.push({ oldFile: oldFile, newFile: newFile, isMoveTo: true});
+      this._installedFiles.push({ oldFile, newFile, isMoveTo: true});
     }
     catch (e) {
       this.rollback();
       throw e;
     }
   },
 
   /**
@@ -614,32 +614,32 @@ SafeInstallOperation.prototype = {
    * all new files that have been created will be removed.
    *
    * @param  aFile
    *         The file or directory to be copied.
    * @param  aTargetDirectory
    *         The directory to copy into, this is expected to be an empty
    *         directory.
    */
-  copy: function(aFile, aTargetDirectory) {
+  copy(aFile, aTargetDirectory) {
     try {
       this._installDirEntry(aFile, aTargetDirectory, true);
     }
     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: function() {
+  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()) {
         let oldDir = move.oldFile.parent.clone();
         oldDir.append(move.oldFile.leafName);
@@ -1828,17 +1828,17 @@ function verifyZipSignedState(aFile, aAd
     });
 
   let root = Ci.nsIX509CertDB.AddonsPublicRoot;
   if (!REQUIRE_SIGNING && Preferences.get(PREF_XPI_SIGNATURES_DEV_ROOT, false))
     root = Ci.nsIX509CertDB.AddonsStageRoot;
 
   return new Promise(resolve => {
     let callback = {
-      openSignedAppFileFinished: function(aRv, aZipReader, aCert) {
+      openSignedAppFileFinished(aRv, aZipReader, aCert) {
         if (aZipReader)
           aZipReader.close();
         resolve({
           signedState: getSignedStatus(aRv, aCert, aAddon.id),
           cert: aCert
         });
       }
     };
@@ -1870,17 +1870,17 @@ function verifyDirSignedState(aDir, aAdd
     });
 
   let root = Ci.nsIX509CertDB.AddonsPublicRoot;
   if (!REQUIRE_SIGNING && Preferences.get(PREF_XPI_SIGNATURES_DEV_ROOT, false))
     root = Ci.nsIX509CertDB.AddonsStageRoot;
 
   return new Promise(resolve => {
     let callback = {
-      verifySignedDirectoryFinished: function(aRv, aCert) {
+      verifySignedDirectoryFinished(aRv, aCert) {
         resolve({
           signedState: getSignedStatus(aRv, aCert, aAddon.id),
           cert: null,
         });
       }
     };
     // This allows the certificate DB to get the raw JS callback object so the
     // test code can pass through objects that XPConnect would reject.
@@ -2190,17 +2190,17 @@ XPIState.prototype = {
       delete this.manifestTime;
       try {
         let dtime = aFile.lastModifiedTime;
         if (dtime != this.scanTime) {
           changed = true;
           this.scanTime = dtime;
         }
       } catch (e) {
-        logger.warn("Can't get modified time of ${file}: ${e}", {file: aFile.path, e: e});
+        logger.warn("Can't get modified time of ${file}: ${e}", {file: aFile.path, e});
         changed = true;
         this.scanTime = 0;
       }
     }
     // Record duration of file-modified check
     XPIProvider.setTelemetry(aId, "scan_MS", Math.round(Cu.now() - scanStarted));
 
     return changed;
@@ -2307,36 +2307,36 @@ this.XPIStates = {
       if (location.name in oldState) {
         locState = oldState[location.name];
         // We've seen this location.
         delete oldState[location.name];
       }
 
       for (let [id, file] of addons) {
         if (!(id in locState)) {
-          logger.debug("New add-on ${id} in ${location}", {id: id, location: location.name});
+          logger.debug("New add-on ${id} in ${location}", {id, location: location.name});
           let xpiState = new XPIState({d: file.persistentDescriptor});
           changed = xpiState.getModTime(file, id) || changed;
           foundAddons.set(id, xpiState);
         } else {
           let xpiState = new XPIState(locState[id]);
           // We found this add-on in the file system
           delete locState[id];
 
           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: id, location: location.name});
+            logger.debug("Changed add-on ${id} in ${location}", {id, location: location.name});
           }
           else {
-            logger.debug("Existing add-on ${id} in ${location}", {id: id, location: location.name});
+            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.
       if (Object.keys(locState).length) {
@@ -2501,17 +2501,17 @@ this.XPIProvider = {
    * before itself.
    *
    * @returns {Array<object>}
    *   A sorted array of add-on objects. Each value is a copy of the
    *   corresponding value in the `bootstrappedAddons` object, with an
    *   additional `id` property, which corresponds to the key in that
    *   object, which is the same as the add-ons ID.
    */
-  sortBootstrappedAddons: function() {
+  sortBootstrappedAddons() {
     let addons = {};
 
     // Sort the list of IDs so that the ordering is deterministic.
     for (let id of Object.keys(this.bootstrappedAddons).sort()) {
       addons[id] = Object.assign({id}, this.bootstrappedAddons[id]);
     }
 
     let res = new Set();
@@ -2532,39 +2532,39 @@ this.XPIProvider = {
     Object.values(addons).forEach(add);
 
     return Array.from(res, id => addons[id]);
   },
 
   /*
    * Set a value in the telemetry hash for a given ID
    */
-  setTelemetry: function(aId, aName, aValue) {
+  setTelemetry(aId, aName, aValue) {
     if (!this._telemetryDetails[aId])
       this._telemetryDetails[aId] = {};
     this._telemetryDetails[aId][aName] = aValue;
   },
 
   // Keep track of in-progress operations that support cancel()
   _inProgress: [],
 
-  doing: function(aCancellable) {
+  doing(aCancellable) {
     this._inProgress.push(aCancellable);
   },
 
-  done: function(aCancellable) {
+  done(aCancellable) {
     let i = this._inProgress.indexOf(aCancellable);
     if (i != -1) {
       this._inProgress.splice(i, 1);
       return true;
     }
     return false;
   },
 
-  cancelAll: function() {
+  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) {
         logger.warn("Cancel failed", e);
@@ -2574,34 +2574,34 @@ this.XPIProvider = {
 
   /**
    * Adds or updates a URI mapping for an Addon.id.
    *
    * Mappings should not be removed at any point. This is so that the mappings
    * will be still valid after an add-on gets disabled or uninstalled, as
    * consumers may still have URIs of (leaked) resources they want to map.
    */
-  _addURIMapping: function(aID, aFile) {
+  _addURIMapping(aID, aFile) {
     logger.info("Mapping " + aID + " to " + aFile.path);
     this._addonFileMap.set(aID, aFile.path);
 
     AddonPathService.insertPath(aFile.path, aID);
   },
 
   /**
    * Resolve a URI back to physical file.
    *
    * Of course, this works only for URIs pointing to local resources.
    *
    * @param  aURI
    *         URI to resolve
    * @return
    *         resolved nsIFileURL
    */
-  _resolveURIToFile: function(aURI) {
+  _resolveURIToFile(aURI) {
     switch (aURI.scheme) {
       case "jar":
       case "file":
         if (aURI instanceof Ci.nsIJARURI) {
           return this._resolveURIToFile(aURI.JARFile);
         }
         return aURI;
 
@@ -2659,17 +2659,17 @@ this.XPIProvider = {
    *         application.
    * @param  aOldAppVersion
    *         The version of the application last run with this profile or null
    *         if it is a new profile or the version is unknown
    * @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: function(aAppChanged, aOldAppVersion, aOldPlatformVersion) {
+  startup(aAppChanged, aOldAppVersion, aOldPlatformVersion) {
     function addDirectoryInstallLocation(aName, aKey, aPaths, aScope, aLocked) {
       try {
         var dir = FileUtils.getDir(aKey, aPaths);
       }
       catch (e) {
         // Some directories aren't defined on some platforms, ignore them
         logger.debug("Skipping unavailable install location " + aName);
         return;
@@ -2896,17 +2896,17 @@ this.XPIProvider = {
       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: function(aSubject, aTopic, aData) {
+        observe(aSubject, aTopic, aData) {
           XPIProvider._closing = true;
           for (let addon of XPIProvider.sortBootstrappedAddons().reverse()) {
             // If no scope has been loaded for this add-on then there is no need
             // to shut it down (should only happen when a bootstrapped add-on is
             // pending enable)
             if (!XPIProvider.activeAddons.has(addon.id))
               continue;
 
@@ -2927,17 +2927,17 @@ this.XPIProvider = {
             }
           }
           Services.obs.removeObserver(this, "quit-application-granted");
         }
       }, "quit-application-granted", false);
 
       // Detect final-ui-startup for telemetry reporting
       Services.obs.addObserver({
-        observe: function(aSubject, aTopic, aData) {
+        observe(aSubject, aTopic, aData) {
           AddonManagerPrivate.recordTimestamp("XPI_finalUIStartup");
           XPIProvider.runPhase = XPI_AFTER_UI_STARTUP;
           Services.obs.removeObserver(this, "final-ui-startup");
         }
       }, "final-ui-startup", false);
 
       AddonManagerPrivate.recordTimestamp("XPI_startup_end");
 
@@ -2957,17 +2957,17 @@ this.XPIProvider = {
   },
 
   /**
    * Shuts down the database and releases all references.
    * Return: Promise{integer} resolves / rejects with the result of
    *                          flushing the XPI Database if it was loaded,
    *                          0 otherwise.
    */
-  shutdown: function() {
+  shutdown() {
     logger.debug("shutdown");
 
     // Stop anything we were doing asynchronously
     this.cancelAll();
 
     this.bootstrappedAddons = {};
     this.activeAddons.clear();
     this.enabledAddons = null;
@@ -3008,17 +3008,17 @@ this.XPIProvider = {
     logger.debug("Notifying XPI shutdown observers");
     Services.obs.notifyObservers(null, "xpi-provider-shutdown", null);
     return undefined;
   },
 
   /**
    * Applies any pending theme change to the preferences.
    */
-  applyThemeChange: function() {
+  applyThemeChange() {
     if (!Preferences.get(PREF_DSS_SWITCHPENDING, false))
       return;
 
     // 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);
@@ -3036,17 +3036,17 @@ this.XPIProvider = {
    * If the application has been upgraded and there are add-ons outside the
    * application directory then we may need to synchronize compatibility
    * information but only if the mismatch UI isn't disabled.
    *
    * @returns False if no update check is needed, otherwise an array of add-on
    *          IDs to check for updates. Array may be empty if no add-ons can be/need
    *           to be updated, but the metadata check needs to be performed.
    */
-  shouldForceUpdateCheck: function(aAppChanged) {
+  shouldForceUpdateCheck(aAppChanged) {
     AddonManagerPrivate.recordSimpleMeasure("XPIDB_metadata_age", AddonRepository.metadataAge());
 
     let startupChanges = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_DISABLED);
     logger.debug("shouldForceUpdateCheck startupChanges: " + startupChanges.toSource());
     AddonManagerPrivate.recordSimpleMeasure("XPIDB_startup_disabled", startupChanges.length);
 
     let forceUpdate = [];
     if (startupChanges.length > 0) {
@@ -3074,17 +3074,17 @@ this.XPIProvider = {
 
   /**
    * Shows the "Compatibility Updates" UI.
    *
    * @param  aAddonIDs
    *         Array opf addon IDs that were disabled by the application update, and
    *         should therefore be checked for updates.
    */
-  showUpgradeUI: function(aAddonIDs) {
+  showUpgradeUI(aAddonIDs) {
     logger.debug("XPI_showUpgradeUI: " + aAddonIDs.toSource());
     Services.telemetry.getHistogramById("ADDON_MANAGER_UPGRADE_UI_SHOWN").add(1);
 
     // Flip a flag to indicate that we interrupted startup with an interactive prompt
     Services.startup.interrupted = true;
 
     var variant = Cc["@mozilla.org/variant;1"].
                   createInstance(Ci.nsIWritableVariant);
@@ -3234,17 +3234,17 @@ this.XPIProvider = {
     logger.info("Installing new system add-on set");
     yield systemAddonLocation.installAddonSet(Array.from(addonList.values())
       .map(a => a.addon));
   }),
 
   /**
    * Verifies that all installed add-ons are still correctly signed.
    */
-  verifySignatures: function() {
+  verifySignatures() {
     XPIDatabase.getAddonList(a => true, (addons) => {
       Task.spawn(function*() {
         let changes = {
           enabled: [],
           disabled: []
         };
 
         for (let addon of addons) {
@@ -3273,17 +3273,17 @@ this.XPIProvider = {
         logger.error("XPI_verifySignature: " + err);
       })
     });
   },
 
   /**
    * Persists changes to XPIProvider.bootstrappedAddons to its store (a pref).
    */
-  persistBootstrappedAddons: function() {
+  persistBootstrappedAddons() {
     // Experiments are disabled upon app load, so don't persist references.
     let filtered = {};
     for (let id in this.bootstrappedAddons) {
       let entry = this.bootstrappedAddons[id];
       if (entry.type == "experiment") {
         continue;
       }
 
@@ -3292,17 +3292,17 @@ this.XPIProvider = {
 
     Services.prefs.setCharPref(PREF_BOOTSTRAP_ADDONS,
                                JSON.stringify(filtered));
   },
 
   /**
    * Adds a list of currently active add-ons to the next crash report.
    */
-  addAddonsToCrashReporter: function() {
+  addAddonsToCrashReporter() {
     if (!("nsICrashReporter" in Ci) ||
         !(Services.appinfo instanceof Ci.nsICrashReporter))
       return;
 
     // In safe mode no add-ons are loaded so we should not include them in the
     // crash report
     if (Services.appinfo.inSafeMode)
       return;
@@ -3327,17 +3327,17 @@ this.XPIProvider = {
    * Check the staging directories of install locations for any add-ons to be
    * installed or add-ons to be uninstalled.
    *
    * @param  aManifests
    *         A dictionary to add detected install manifests to for the purpose
    *         of passing through updated compatibility information
    * @return true if an add-on was installed or uninstalled
    */
-  processPendingFileChanges: function(aManifests) {
+  processPendingFileChanges(aManifests) {
     let changed = false;
     for (let location of this.installLocations) {
       aManifests[location.name] = {};
       // We can't install or uninstall anything in locked locations
       if (location.locked) {
         continue;
       }
 
@@ -3504,17 +3504,17 @@ this.XPIProvider = {
               let newVersion = addon.version;
               let oldVersion = oldBootstrap.version;
               let uninstallReason = Services.vc.compare(oldVersion, newVersion) < 0 ?
                                     BOOTSTRAP_REASONS.ADDON_UPGRADE :
                                     BOOTSTRAP_REASONS.ADDON_DOWNGRADE;
 
               this.callBootstrapMethod(createAddonDetails(existingAddonID, oldBootstrap),
                                        existingAddon, "uninstall", uninstallReason,
-                                       { newVersion: newVersion });
+                                       { newVersion });
               this.unloadBootstrapScope(existingAddonID);
               flushChromeCaches();
             }
           }
           catch (e) {
           }
         }
 
@@ -3564,17 +3564,17 @@ this.XPIProvider = {
    *
    * @param  aManifests
    *         A dictionary to add new install manifests to to save having to
    *         reload them later
    * @param  aAppChanged
    *         See checkForChanges
    * @return true if any new add-ons were installed
    */
-  installDistributionAddons: function(aManifests, aAppChanged) {
+  installDistributionAddons(aManifests, aAppChanged) {
     let distroDir;
     try {
       distroDir = FileUtils.getDir(KEY_APP_DISTRIBUTION, [DIR_EXTENSIONS]);
     }
     catch (e) {
       return false;
     }
 
@@ -3685,22 +3685,22 @@ this.XPIProvider = {
 
     return changed;
   },
 
   /**
    * Imports the xpinstall permissions from preferences into the permissions
    * manager for the user to change later.
    */
-  importPermissions: function() {
+  importPermissions() {
     PermissionsUtils.importFromPrefs(PREF_XPI_PERMISSIONS_BRANCH,
                                      XPI_PERMISSION);
   },
 
-  getDependentAddons: function(aAddon) {
+  getDependentAddons(aAddon) {
     return Array.from(XPIDatabase.getAddons())
                 .filter(addon => addon.dependencies.includes(aAddon.id));
   },
 
   /**
    * Checks for any changes that have occurred since the last time the
    * application was launched.
    *
@@ -3713,17 +3713,17 @@ this.XPIProvider = {
    * @param  aOldAppVersion
    *         The version of the application last run with this profile or null
    *         if it is a new profile or the version is unknown
    * @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
    * @return true if a change requiring a restart was detected
    */
-  checkForChanges: function(aAppChanged, aOldAppVersion,
+  checkForChanges(aAppChanged, aOldAppVersion,
                                                 aOldPlatformVersion) {
     logger.debug("checkForChanges");
 
     // Keep track of whether and why we need to open and update the database at
     // startup time.
     let updateReasons = [];
     if (aAppChanged) {
       updateReasons.push("appChanged");
@@ -3889,60 +3889,60 @@ this.XPIProvider = {
   /**
    * Called to test whether this provider supports installing a particular
    * mimetype.
    *
    * @param  aMimetype
    *         The mimetype to check for
    * @return true if the mimetype is application/x-xpinstall
    */
-  supportsMimetype: function(aMimetype) {
+  supportsMimetype(aMimetype) {
     return aMimetype == "application/x-xpinstall";
   },
 
   /**
    * Called to test whether installing XPI add-ons is enabled.
    *
    * @return true if installing is enabled
    */
-  isInstallEnabled: function() {
+  isInstallEnabled() {
     // Default to enabled if the preference does not exist
     return Preferences.get(PREF_XPI_ENABLED, true);
   },
 
   /**
    * Called to test whether installing XPI add-ons by direct URL requests is
    * whitelisted.
    *
    * @return true if installing by direct requests is whitelisted
    */
-  isDirectRequestWhitelisted: function() {
+  isDirectRequestWhitelisted() {
     // Default to whitelisted if the preference does not exist.
     return Preferences.get(PREF_XPI_DIRECT_WHITELISTED, true);
   },
 
   /**
    * Called to test whether installing XPI add-ons from file referrers is
    * whitelisted.
    *
    * @return true if installing from file referrers is whitelisted
    */
-  isFileRequestWhitelisted: function() {
+  isFileRequestWhitelisted() {
     // Default to whitelisted if the preference does not exist.
     return Preferences.get(PREF_XPI_FILE_WHITELISTED, true);
   },
 
   /**
    * Called to test whether installing XPI add-ons from a URI is allowed.
    *
    * @param  aInstallingPrincipal
    *         The nsIPrincipal that initiated the install
    * @return true if installing is allowed
    */
-  isInstallAllowed: function(aInstallingPrincipal) {
+  isInstallAllowed(aInstallingPrincipal) {
     if (!this.isInstallEnabled())
       return false;
 
     let uri = aInstallingPrincipal.URI;
 
     // Direct requests without a referrer are either whitelisted or blocked.
     if (!uri)
       return this.isDirectRequestWhitelisted();
@@ -3966,17 +3966,17 @@ this.XPIProvider = {
     let safeSchemes = ["https", "chrome", "file"];
     if (requireSecureOrigin && safeSchemes.indexOf(uri.scheme) == -1)
       return false;
 
     return true;
   },
 
   // Identify temporary install IDs.
-  isTemporaryInstallID: function(id) {
+  isTemporaryInstallID(id) {
     return id.endsWith(TEMPORARY_ADDON_SUFFIX);
   },
 
   /**
    * Called to get an AddonInstall to download and install an add-on from a URL.
    *
    * @param  aUrl
    *         The URL to be installed
@@ -3988,17 +3988,17 @@ this.XPIProvider = {
    *         Icon URLs for the install
    * @param  aVersion
    *         A version for the install
    * @param  aBrowser
    *         The browser performing the install
    * @param  aCallback
    *         A callback to pass the AddonInstall to
    */
-  getInstallForURL: function(aUrl, aHash, aName, aIcons, aVersion, aBrowser,
+  getInstallForURL(aUrl, aHash, aName, aIcons, aVersion, aBrowser,
                              aCallback) {
     let location = XPIProvider.installLocationsByName[KEY_APP_PROFILE];
     let url = NetUtil.newURI(aUrl);
 
     let options = {
       hash: aHash,
       browser: aBrowser,
       name: aName,
@@ -4018,33 +4018,33 @@ this.XPIProvider = {
   /**
    * Called to get an AddonInstall to install an add-on from a local file.
    *
    * @param  aFile
    *         The file to be installed
    * @param  aCallback
    *         A callback to pass the AddonInstall to
    */
-  getInstallForFile: function(aFile, aCallback) {
+  getInstallForFile(aFile, aCallback) {
     createLocalInstall(aFile).then(install => {
       aCallback(install ? install.wrapper : null);
     });
   },
 
   /**
    * Temporarily installs add-on from a local XPI file or directory.
    * As this is intended for development, the signature is not checked and
    * the add-on does not persist on application restart.
    *
    * @param aFile
    *        An nsIFile for the unpacked add-on directory or XPI file.
    *
    * @return See installAddonFromLocation return value.
    */
-  installTemporaryAddon: function(aFile) {
+  installTemporaryAddon(aFile) {
     return this.installAddonFromLocation(aFile, TemporaryInstallLocation);
   },
 
   /**
    * Permanently installs add-on from a local XPI file or directory.
    * The signature is checked but the add-on persist on application restart.
    *
    * @param aFile
@@ -4171,17 +4171,17 @@ this.XPIProvider = {
    * Returns an Addon corresponding to an instance ID.
    * @param aInstanceID
    *        An Addon Instance ID
    * @return {Promise}
    * @resolves The found Addon or null if no such add-on exists.
    * @rejects  Never
    * @throws if the aInstanceID argument is not specified
    */
-   getAddonByInstanceID: function(aInstanceID) {
+   getAddonByInstanceID(aInstanceID) {
      if (!aInstanceID || typeof aInstanceID != "symbol")
        throw Components.Exception("aInstanceID must be a Symbol()",
                                   Cr.NS_ERROR_INVALID_ARG);
 
      for (let [id, val] of this.activeAddons) {
        if (aInstanceID == val.instanceID) {
          if (val.safeWrapper) {
            return Promise.resolve(val.safeWrapper);
@@ -4200,73 +4200,73 @@ this.XPIProvider = {
    },
 
   /**
    * Removes an AddonInstall from the list of active installs.
    *
    * @param  install
    *         The AddonInstall to remove
    */
-  removeActiveInstall: function(aInstall) {
+  removeActiveInstall(aInstall) {
     this.installs.delete(aInstall);
   },
 
   /**
    * Called to get an Addon with a particular ID.
    *
    * @param  aId
    *         The ID of the add-on to retrieve
    * @param  aCallback
    *         A callback to pass the Addon to
    */
-  getAddonByID: function(aId, aCallback) {
+  getAddonByID(aId, aCallback) {
     XPIDatabase.getVisibleAddonForID(aId, function(aAddon) {
       aCallback(aAddon ? aAddon.wrapper : null);
     });
   },
 
   /**
    * Called to get Addons of a particular type.
    *
    * @param  aTypes
    *         An array of types to fetch. Can be null to get all types.
    * @param  aCallback
    *         A callback to pass an array of Addons to
    */
-  getAddonsByTypes: function(aTypes, aCallback) {
+  getAddonsByTypes(aTypes, aCallback) {
     let typesToGet = getAllAliasesForTypes(aTypes);
 
     XPIDatabase.getVisibleAddons(typesToGet, function(aAddons) {
       aCallback(aAddons.map(a => a.wrapper));
     });
   },
 
   /**
    * Obtain an Addon having the specified Sync GUID.
    *
    * @param  aGUID
    *         String GUID of add-on to retrieve
    * @param  aCallback
    *         A callback to pass the Addon to. Receives null if not found.
    */
-  getAddonBySyncGUID: function(aGUID, aCallback) {
+  getAddonBySyncGUID(aGUID, aCallback) {
     XPIDatabase.getAddonBySyncGUID(aGUID, function(aAddon) {
       aCallback(aAddon ? aAddon.wrapper : null);
     });
   },
 
   /**
    * Called to get Addons that have pending operations.
    *
    * @param  aTypes
    *         An array of types to fetch. Can be null to get all types
    * @param  aCallback
    *         A callback to pass an array of Addons to
    */
-  getAddonsWithOperationsByTypes: function(aTypes, aCallback) {
+  getAddonsWithOperationsByTypes(aTypes, aCallback) {
     let typesToGet = getAllAliasesForTypes(aTypes);
 
     XPIDatabase.getVisibleAddonsWithPendingOperations(typesToGet, function(aAddons) {
       let results = aAddons.map(a => a.wrapper);
       for (let install of XPIProvider.installs) {
         if (install.state == AddonManager.STATE_INSTALLED &&
             !(install.addon.inDatabase))
           results.push(install.addon.wrapper);
@@ -4279,17 +4279,17 @@ this.XPIProvider = {
    * Called to get the current AddonInstalls, optionally limiting to a list of
    * types.
    *
    * @param  aTypes
    *         An array of types or null to get all types
    * @param  aCallback
    *         A callback to pass the array of AddonInstalls to
    */
-  getInstallsByTypes: function(aTypes, aCallback) {
+  getInstallsByTypes(aTypes, aCallback) {
     let results = [...this.installs];
     if (aTypes) {
       results = results.filter(install => {
         return aTypes.includes(getExternalType(install.type));
       });
     }
 
     aCallback(results.map(install => install.wrapper));
@@ -4303,34 +4303,34 @@ this.XPIProvider = {
    * but do not include URIs from meta data, such as the add-on homepage.
    *
    * @param  aURI
    *         nsIURI to map or null
    * @return string containing the Addon ID
    * @see    AddonManager.mapURIToAddonID
    * @see    amIAddonManager.mapURIToAddonID
    */
-  mapURIToAddonID: function(aURI) {
+  mapURIToAddonID(aURI) {
     // Returns `null` instead of empty string if the URI can't be mapped.
     return AddonPathService.mapURIToAddonId(aURI) || null;
   },
 
   /**
    * Called when a new add-on has been enabled when only one add-on of that type
    * can be enabled.
    *
    * @param  aId
    *         The ID of the newly enabled add-on
    * @param  aType
    *         The type of the newly enabled add-on
    * @param  aPendingRestart
    *         true if the newly enabled add-on will only become enabled after a
    *         restart
    */
-  addonChanged: function(aId, aType, aPendingRestart) {
+  addonChanged(aId, aType, aPendingRestart) {
     // We only care about themes in this provider
     if (aType != "theme")
       return;
 
     if (!aId) {
       // Fallback to the default theme when no theme was enabled
       this.enableDefaultTheme();
       return;
@@ -4378,30 +4378,30 @@ this.XPIProvider = {
     // only enabled calls notifyAddonChanged.
     if (previousTheme)
       this.updateAddonDisabledState(previousTheme, true);
   },
 
   /**
    * Update the appDisabled property for all add-ons.
    */
-  updateAddonAppDisabledStates: function() {
+  updateAddonAppDisabledStates() {
     let addons = XPIDatabase.getAddons();
     for (let addon of addons) {
       this.updateAddonDisabledState(addon);
     }
   },
 
   /**
    * Update the repositoryAddon property for all add-ons.
    *
    * @param  aCallback
    *         Function to call when operation is complete.
    */
-  updateAddonRepositoryData: function(aCallback) {
+  updateAddonRepositoryData(aCallback) {
     XPIDatabase.getVisibleAddons(null, aAddons => {
       let pending = aAddons.length;
       logger.debug("updateAddonRepositoryData found " + pending + " visible add-ons");
       if (pending == 0) {
         aCallback();
         return;
       }
 
@@ -4424,17 +4424,17 @@ this.XPIProvider = {
       }
     });
   },
 
   /**
    * When the previously selected theme is removed this method will be called
    * to enable the default theme.
    */
-  enableDefaultTheme: function() {
+  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) {
         // During startup we may end up trying to enable the default theme when
@@ -4450,32 +4450,32 @@ this.XPIProvider = {
         logger.warn("Attempting to activate an already active default theme");
       }
     }
     else {
       logger.warn("Unable to activate the default theme");
     }
   },
 
-  onDebugConnectionChange: function(aEvent, aWhat, aConnection) {
+  onDebugConnectionChange(aEvent, aWhat, aConnection) {
     if (aWhat != "opened")
       return;
 
     for (let [id, val] of this.activeAddons) {
       aConnection.setAddonOptions(
         id, { global: val.debugGlobal || val.bootstrapScope });
     }
   },
 
   /**
    * Notified when a preference we're interested in has changed.
    *
    * @see nsIObserver
    */
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic == NOTIFICATION_FLUSH_PERMISSIONS) {
       if (!aData || aData == XPI_PERMISSION) {
         this.importPermissions();
       }
       return;
     }
     else if (aTopic == NOTIFICATION_TOOLBOXPROCESS_LOADED) {
       Services.obs.removeObserver(this, NOTIFICATION_TOOLBOXPROCESS_LOADED, false);
@@ -4510,17 +4510,17 @@ this.XPIProvider = {
 
   /**
    * Determine if an add-on should be blocking e10s if enabled.
    *
    * @param  aAddon
    *         The add-on to test
    * @return true if enabling the add-on should block e10s
    */
-  isBlockingE10s: function(aAddon) {
+  isBlockingE10s(aAddon) {
     if (aAddon.type != "extension" &&
         aAddon.type != "webextension" &&
         aAddon.type != "theme")
       return false;
 
     // The hotfix is exempt
     let hotfixID = Preferences.get(PREF_EM_HOTFIX_ID, undefined);
     if (hotfixID && hotfixID == aAddon.id)
@@ -4551,17 +4551,17 @@ this.XPIProvider = {
    * In some cases having add-ons active blocks e10s but turning off e10s
    * requires a restart so some add-ons that are normally restartless will
    * require a restart to install or enable.
    *
    * @param  aAddon
    *         The add-on to test
    * @return true if enabling the add-on requires a restart
    */
-  e10sBlocksEnabling: function(aAddon) {
+  e10sBlocksEnabling(aAddon) {
     // If the preference isn't set then don't block anything
     if (!Preferences.get(PREF_E10S_BLOCK_ENABLE, false))
       return false;
 
     // If e10s isn't active then don't block anything
     if (!Services.appinfo.browserTabsRemoteAutostart)
       return false;
 
@@ -4570,17 +4570,17 @@ this.XPIProvider = {
 
   /**
    * Tests whether enabling an add-on will require a restart.
    *
    * @param  aAddon
    *         The add-on to test
    * @return true if the operation requires a restart
    */
-  enableRequiresRestart: function(aAddon) {
+  enableRequiresRestart(aAddon) {
     // If the platform couldn't have activated extensions then we can make
     // changes without any restart.
     if (!this.extensionsActive)
       return false;
 
     // If the application is in safe mode then any change can be made without
     // restarting
     if (Services.appinfo.inSafeMode)
@@ -4610,17 +4610,17 @@ this.XPIProvider = {
 
   /**
    * Tests whether disabling an add-on will require a restart.
    *
    * @param  aAddon
    *         The add-on to test
    * @return true if the operation requires a restart
    */
-  disableRequiresRestart: function(aAddon) {
+  disableRequiresRestart(aAddon) {
     // If the platform couldn't have activated up extensions then we can make
     // changes without any restart.
     if (!this.extensionsActive)
       return false;
 
     // If the application is in safe mode then any change can be made without
     // restarting
     if (Services.appinfo.inSafeMode)
@@ -4656,17 +4656,17 @@ this.XPIProvider = {
 
   /**
    * Tests whether installing an add-on will require a restart.
    *
    * @param  aAddon
    *         The add-on to test
    * @return true if the operation requires a restart
    */
-  installRequiresRestart: function(aAddon) {
+  installRequiresRestart(aAddon) {
     // If the platform couldn't have activated up extensions then we can make
     // changes without any restart.
     if (!this.extensionsActive)
       return false;
 
     // If the application is in safe mode then any change can be made without
     // restarting
     if (Services.appinfo.inSafeMode)
@@ -4706,17 +4706,17 @@ this.XPIProvider = {
 
   /**
    * Tests whether uninstalling an add-on will require a restart.
    *
    * @param  aAddon
    *         The add-on to test
    * @return true if the operation requires a restart
    */
-  uninstallRequiresRestart: function(aAddon) {
+  uninstallRequiresRestart(aAddon) {
     // If the platform couldn't have activated up extensions then we can make
     // changes without any restart.
     if (!this.extensionsActive)
       return false;
 
     // If the application is in safe mode then any change can be made without
     // restarting
     if (Services.appinfo.inSafeMode)
@@ -4746,17 +4746,17 @@ this.XPIProvider = {
    * @param  aRunInSafeMode
    *         Boolean indicating whether the add-on can run in safe mode.
    * @param  aDependencies
    *         An array of add-on IDs on which this add-on depends.
    * @param  hasEmbeddedWebExtension
    *         Boolean indicating whether the add-on has an embedded webextension.
    * @return a JavaScript scope
    */
-  loadBootstrapScope: function(aId, aFile, aVersion, aType,
+  loadBootstrapScope(aId, aFile, aVersion, aType,
                                aMultiprocessCompatible, aRunInSafeMode,
                                aDependencies, hasEmbeddedWebExtension) {
     // Mark the add-on as active for the crash reporter before loading
     this.bootstrappedAddons[aId] = {
       version: aVersion,
       type: aType,
       descriptor: aFile.persistentDescriptor,
       multiprocessCompatible: aMultiprocessCompatible,
@@ -4856,17 +4856,17 @@ this.XPIProvider = {
 
   /**
    * Unloads a bootstrap scope by dropping all references to it and then
    * updating the list of active add-ons with the crash reporter.
    *
    * @param  aId
    *         The add-on's ID
    */
-  unloadBootstrapScope: function(aId) {
+  unloadBootstrapScope(aId) {
     // In case the add-on was not multiprocess-compatible, deregister
     // any interpositions for it.
     Cu.setAddonInterposition(aId, null);
     Cu.allowCPOWsInAddon(aId, false);
 
     this.activeAddons.delete(aId);
     delete this.bootstrappedAddons[aId];
     this.persistBootstrappedAddons();
@@ -4889,17 +4889,17 @@ this.XPIProvider = {
    * @param  aMethod
    *         The name of the bootstrap method to call
    * @param  aReason
    *         The reason flag to pass to the bootstrap's startup method
    * @param  aExtraParams
    *         An object of additional key/value pairs to pass to the method in
    *         the params argument
    */
-  callBootstrapMethod: function(aAddon, aFile, aMethod, aReason, aExtraParams) {
+  callBootstrapMethod(aAddon, aFile, aMethod, aReason, aExtraParams) {
     if (!aAddon.id || !aAddon.version || !aAddon.type) {
       throw new Error("aAddon must include an id, version, and type");
     }
 
     // Only run in safe mode if allowed to
     let runInSafeMode = "runInSafeMode" in aAddon ? aAddon.runInSafeMode : canRunInSafeMode(aAddon);
     if (Services.appinfo.inSafeMode && !runInSafeMode)
       return;
@@ -5025,17 +5025,17 @@ this.XPIProvider = {
    *         Value for the softDisabled property. If undefined the value will
    *         not change. If true this will force userDisabled to be true
    * @return a tri-state indicating the action taken for the add-on:
    *           - undefined: The add-on did not change state
    *           - true: The add-on because disabled
    *           - false: The add-on became enabled
    * @throws if addon is not a DBAddonInternal
    */
-  updateAddonDisabledState: function(aAddon, aUserDisabled, aSoftDisabled) {
+  updateAddonDisabledState(aAddon, aUserDisabled, aSoftDisabled) {
     if (!(aAddon.inDatabase))
       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) {
@@ -5063,17 +5063,17 @@ this.XPIProvider = {
 
     // If appDisabled changes but addon.disabled doesn't,
     // no onDisabling/onEnabling is sent - so send a onPropertyChanged.
     let appDisabledChanged = aAddon.appDisabled != appDisabled;
 
     // Update the properties in the database.
     XPIDatabase.setAddonProperties(aAddon, {
       userDisabled: aUserDisabled,
-      appDisabled: appDisabled,
+      appDisabled,
       softDisabled: aSoftDisabled
     });
 
     let wrapper = aAddon.wrapper;
 
     if (appDisabledChanged) {
       AddonManagerPrivate.callAddonListeners("onPropertyChanged",
                                              wrapper,
@@ -5169,17 +5169,17 @@ this.XPIProvider = {
    *         The DBAddonInternal to uninstall
    * @param  aForcePending
    *         Force this addon into the pending uninstall state, even if
    *         it isn't marked as requiring a restart (used e.g. while the
    *         add-on manager is open and offering an "undo" button)
    * @throws if the addon cannot be uninstalled because it is in an install
    *         location that does not allow it
    */
-  uninstallAddon: function(aAddon, aForcePending) {
+  uninstallAddon(aAddon, aForcePending) {
     if (!(aAddon.inDatabase))
       throw new Error("Cannot uninstall addon " + aAddon.id + " because it is not installed");
 
     if (aAddon._installLocation.locked)
       throw new Error("Cannot uninstall addon " + aAddon.id
           + " from locked install location " + aAddon._installLocation.name);
 
     // Inactive add-ons don't require a restart to uninstall
@@ -5310,17 +5310,17 @@ this.XPIProvider = {
   },
 
   /**
    * Cancels the pending uninstall of an add-on.
    *
    * @param  aAddon
    *         The DBAddonInternal to cancel uninstall for
    */
-  cancelUninstallAddon: function(aAddon) {
+  cancelUninstallAddon(aAddon) {
     if (!(aAddon.inDatabase))
       throw new Error("Can only cancel uninstall for installed addons.");
     if (!aAddon.pendingUninstall)
       throw new Error("Add-on is not marked to be uninstalled");
 
     if (aAddon._installLocation.name != KEY_APP_TEMPORARY)
       aAddon._installLocation.cleanStagingDir([aAddon.id]);
 
@@ -6711,37 +6711,37 @@ AddonInstallWrapper.prototype = {
   get sourceURI() {
     return installFor(this).sourceURI;
   },
 
   set _permHandler(handler) {
     installFor(this).permHandler = handler;
   },
 
-  install: function() {
+  install() {
     installFor(this).install();
   },
 
-  cancel: function() {
+  cancel() {
     installFor(this).cancel();
   },
 
-  addListener: function(listener) {
+  addListener(listener) {
     installFor(this).addListener(listener);
   },
 
-  removeListener: function(listener) {
+  removeListener(listener) {
     installFor(this).removeListener(listener);
   },
 };
 
 ["name", "version", "icons", "releaseNotesURI", "file", "state", "error",
  "progress", "maxProgress", "certificate", "certName"].forEach(function(aProp) {
   Object.defineProperty(AddonInstallWrapper.prototype, aProp, {
-    get: function() {
+    get() {
       return installFor(this)[aProp];
     },
     enumerable: true,
   });
 });
 
 /**
  * Creates a new update checker.
@@ -6803,17 +6803,17 @@ UpdateChecker.prototype = {
 
   /**
    * Calls a method on the listener passing any number of arguments and
    * consuming any exceptions.
    *
    * @param  aMethod
    *         The method to call on the listener
    */
-  callListener: function(aMethod, ...aArgs) {
+  callListener(aMethod, ...aArgs) {
     if (!(aMethod in this.listener))
       return;
 
     try {
       this.listener[aMethod].apply(this.listener, aArgs);
     }
     catch (e) {
       logger.warn("Exception calling UpdateListener method " + aMethod, e);
@@ -6821,17 +6821,17 @@ UpdateChecker.prototype = {
   },
 
   /**
    * Called when AddonUpdateChecker completes the update check
    *
    * @param  updates
    *         The list of update details for the add-on
    */
-  onUpdateCheckComplete: function(aUpdates) {
+  onUpdateCheckComplete(aUpdates) {
     XPIProvider.done(this.addon._updateCheck);
     this.addon._updateCheck = null;
     let AUC = AddonUpdateChecker;
 
     let ignoreMaxVersion = false;
     let ignoreStrictCompat = false;
     if (!AddonManager.checkCompatibility) {
       ignoreMaxVersion = true;
@@ -6925,28 +6925,28 @@ UpdateChecker.prototype = {
   },
 
   /**
    * Called when AddonUpdateChecker fails the update check
    *
    * @param  aError
    *         An error status
    */
-  onUpdateCheckError: function(aError) {
+  onUpdateCheckError(aError) {
     XPIProvider.done(this.addon._updateCheck);
     this.addon._updateCheck = null;
     this.callListener("onNoCompatibilityUpdateAvailable", this.addon.wrapper);
     this.callListener("onNoUpdateAvailable", this.addon.wrapper);
     this.callListener("onUpdateFinished", this.addon.wrapper, aError);
   },
 
   /**
    * Called to cancel an in-progress update check
    */
-  cancel: function() {
+  cancel() {
     let parser = this._parser;
     if (parser) {
       this._parser = null;
       // This will call back to onUpdateCheckError with a CANCELLED error
       parser.cancel();
     }
   }
 };
@@ -7072,17 +7072,17 @@ AddonInternal.prototype = {
       AddonManagerPrivate.recordException("XPI", message, e);
       // don't trust this add-on
       return false;
     }
 
     return matchedOS && !needsABI;
   },
 
-  isCompatibleWith: function(aAppVersion, aPlatformVersion) {
+  isCompatibleWith(aAppVersion, aPlatformVersion) {
     let app = this.matchingTargetApplication;
     if (!app)
       return false;
 
     // set reasonable defaults for minVersion and maxVersion
     let minVersion = app.minVersion || "0";
     let maxVersion = app.maxVersion || "*";
 
@@ -7156,17 +7156,17 @@ AddonInternal.prototype = {
     if (staticItem) {
       let url = Services.urlFormatter.formatURLPref("extensions.blocklist.itemURL");
       return url.replace(/%blockID%/g, staticItem.blockID);
     }
 
     return Blocklist.getAddonBlocklistURL(this.wrapper);
   },
 
-  applyCompatibilityUpdate: function(aUpdate, aSyncCompatibility) {
+  applyCompatibilityUpdate(aUpdate, aSyncCompatibility) {
     for (let targetApp of this.targetApplications) {
       for (let updateTarget of aUpdate.targetApplications) {
         if (targetApp.id == updateTarget.id && (aSyncCompatibility ||
             Services.vc.compare(targetApp.maxVersion, updateTarget.maxVersion) < 0)) {
           targetApp.minVersion = updateTarget.minVersion;
           targetApp.maxVersion = updateTarget.maxVersion;
         }
       }
@@ -7176,17 +7176,17 @@ AddonInternal.prototype = {
     this.appDisabled = !isUsableAddon(this);
   },
 
   /**
    * getDataDirectory tries to execute the callback with two arguments:
    * 1) the path of the data directory within the profile,
    * 2) any exception generated from trying to build it.
    */
-  getDataDirectory: function(callback) {
+  getDataDirectory(callback) {
     let parentPath = OS.Path.join(OS.Constants.Path.profileDir, "extension-data");
     let dirPath = OS.Path.join(parentPath, this.id);
 
     Task.spawn(function*() {
       yield OS.File.makeDir(parentPath, {ignoreExisting: true});
       yield OS.File.makeDir(dirPath, {ignoreExisting: true});
     }).then(() => callback(dirPath, null),
             e => callback(dirPath, e));
@@ -7200,17 +7200,17 @@ AddonInternal.prototype = {
    *
    * @param  aKey
    *         The key that this object is being serialized as in the JSON.
    *         Unused here since this is always the main object serialized
    *
    * @return an object containing copies of the properties of this object
    *         ignoring private properties, functions, getters and setters
    */
-  toJSON: function(aKey) {
+  toJSON(aKey) {
     let obj = {};
     for (let prop in this) {
       // Ignore the wrapper property
       if (prop == "wrapper")
         continue;
 
       // Ignore private properties
       if (prop.substring(0, 1) == "_")
@@ -7237,29 +7237,29 @@ AddonInternal.prototype = {
   /**
    * When an add-on install is pending its metadata will be cached in a file.
    * This method reads particular properties of that metadata that may be newer
    * than that in the install manifest, like compatibility information.
    *
    * @param  aObj
    *         A JS object containing the cached metadata
    */
-  importMetadata: function(aObj) {
+  importMetadata(aObj) {
     for (let prop of PENDING_INSTALL_METADATA) {
       if (!(prop in aObj))
         continue;
 
       this[prop] = aObj[prop];
     }
 
     // Compatibility info may have changed so update appDisabled
     this.appDisabled = !isUsableAddon(this);
   },
 
-  permissions: function() {
+  permissions() {
     let permissions = 0;
 
     // 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) {
@@ -7306,17 +7306,17 @@ AddonWrapper.prototype = {
   get seen() {
     return addonFor(this).seen;
   },
 
   get hasEmbeddedWebExtension() {
     return addonFor(this).hasEmbeddedWebExtension;
   },
 
-  markAsSeen: function() {
+  markAsSeen() {
     addonFor(this).seen = true;
     XPIDatabase.saveChanges();
   },
 
   get type() {
     return getExternalType(addonFor(this).type);
   },
 
@@ -7653,53 +7653,53 @@ AddonWrapper.prototype = {
     let addon = addonFor(this);
     let hotfixID = Preferences.get(PREF_EM_HOTFIX_ID, undefined);
     if (hotfixID && hotfixID == addon.id) {
       return false;
     }
     return (addon._installLocation.name == KEY_APP_PROFILE);
   },
 
-  isCompatibleWith: function(aAppVersion, aPlatformVersion) {
+  isCompatibleWith(aAppVersion, aPlatformVersion) {
     return addonFor(this).isCompatibleWith(aAppVersion, aPlatformVersion);
   },
 
-  uninstall: function(alwaysAllowUndo) {
+  uninstall(alwaysAllowUndo) {
     let addon = addonFor(this);
     XPIProvider.uninstallAddon(addon, alwaysAllowUndo);
   },
 
-  cancelUninstall: function() {
+  cancelUninstall() {
     let addon = addonFor(this);
     XPIProvider.cancelUninstallAddon(addon);
   },
 
-  findUpdates: function(aListener, aReason, aAppVersion, aPlatformVersion) {
+  findUpdates(aListener, aReason, aAppVersion, aPlatformVersion) {
     // Short-circuit updates for experiments because updates are handled
     // through the Experiments Manager.
     if (this.type == "experiment") {
       AddonManagerPrivate.callNoUpdateListeners(this, aListener, aReason,
                                                 aAppVersion, aPlatformVersion);
       return;
     }
 
     new UpdateChecker(addonFor(this), aListener, aReason, aAppVersion, aPlatformVersion);
   },
 
   // Returns true if there was an update in progress, false if there was no update to cancel
-  cancelUpdate: function() {
+  cancelUpdate() {
     let addon = addonFor(this);
     if (addon._updateCheck) {
       addon._updateCheck.cancel();
       return true;
     }
     return false;
   },
 
-  hasResource: function(aPath) {
+  hasResource(aPath) {
     let addon = addonFor(this);
     if (addon._hasResourceCache.has(aPath))
       return addon._hasResourceCache.get(aPath);
 
     let bundle = addon._sourceBundle.clone();
 
     // Bundle may not exist any more if the addon has just been uninstalled,
     // but explicitly first checking .exists() results in unneeded file I/O.
@@ -7739,17 +7739,17 @@ AddonWrapper.prototype = {
    * Reloads the add-on.
    *
    * For temporarily installed add-ons, this uninstalls and re-installs the
    * add-on. Otherwise, the addon is disabled and then re-enabled, and the cache
    * is flushed.
    *
    * @return Promise
    */
-  reload: function() {
+  reload() {
     return new Promise((resolve) => {
       const addon = addonFor(this);
 
       logger.debug(`reloading add-on ${addon.id}`);
 
       if (!this.temporarilyInstalled) {
         let addonFile = addon.getResourceURI;
         XPIProvider.updateAddonDisabledState(addon, true);
@@ -7769,17 +7769,17 @@ AddonWrapper.prototype = {
    * will be file: URIs if the add-on is unpacked or jar: URIs if the add-on is
    * still an XPI file.
    *
    * @param  aPath
    *         The path in the add-on to get the URI for or null to get a URI to
    *         the file or directory the add-on is installed as.
    * @return an nsIURI
    */
-  getResourceURI: function(aPath) {
+  getResourceURI(aPath) {
     let addon = addonFor(this);
     if (!aPath)
       return NetUtil.newURI(addon._sourceBundle);
 
     return getURIForResourceInFile(addon._sourceBundle, aPath);
   }
 };
 
@@ -8023,17 +8023,17 @@ DirectoryInstallLocation.prototype = {
 
   /**
    * Reads a directory linked to in a file.
    *
    * @param   file
    *          The file containing the directory path
    * @return  An nsIFile object representing the linked directory.
    */
-  _readDirectoryFromFile: function(aFile) {
+  _readDirectoryFromFile(aFile) {
     let linkedDirectory;
     if (aFile.isSymlink()) {
       linkedDirectory = aFile.clone();
       try {
         linkedDirectory.normalize();
       } catch (e) {
         logger.warn("Symbolic link " + aFile.path + " points to a path" +
              " which does not exist");
@@ -8079,17 +8079,17 @@ DirectoryInstallLocation.prototype = {
 
     logger.warn("File pointer " + aFile.path + " does not contain a path");
     return null;
   },
 
   /**
    * Finds all the add-ons installed in this location.
    */
-  _readAddons: function() {
+  _readAddons() {
     // 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).
     let entries = getDirectoryEntries(this._directory);
     for (let entry of entries) {
       let id = entry.leafName;
 
       if (id == DIR_STAGE || id == DIR_TRASH)
@@ -8143,46 +8143,46 @@ DirectoryInstallLocation.prototype = {
    */
   get scope() {
     return this._scope;
   },
 
   /**
    * Gets an array of nsIFiles for add-ons installed in this location.
    */
-  getAddonLocations: function() {
+  getAddonLocations() {
     let locations = new Map();
     for (let id in this._IDToFileMap) {
       locations.set(id, this._IDToFileMap[id].clone());
     }
     return locations;
   },
 
   /**
    * Gets the directory that the add-on with the given ID is installed in.
    *
    * @param  aId
    *         The ID of the add-on
    * @return The nsIFile
    * @throws if the ID does not match any of the add-ons installed
    */
-  getLocationForID: function(aId) {
+  getLocationForID(aId) {
     if (aId in this._IDToFileMap)
       return this._IDToFileMap[aId].clone();
     throw new Error("Unknown add-on ID " + aId);
   },
 
   /**
    * Returns true if the given addon was installed in this location by a text
    * file pointing to its real path.
    *
    * @param aId
    *        The ID of the addon
    */
-  isLinkedAddon: function(aId) {
+  isLinkedAddon(aId) {
     return this._linkedAddons.indexOf(aId) != -1;
   }
 };
 
 /**
  * An extension of DirectoryInstallLocation which adds methods to installing
  * and removing add-ons from the directory at runtime.
  *
@@ -8202,39 +8202,39 @@ function MutableDirectoryInstallLocation
 MutableDirectoryInstallLocation.prototype = Object.create(DirectoryInstallLocation.prototype);
 Object.assign(MutableDirectoryInstallLocation.prototype, {
   /**
    * Gets the staging directory to put add-ons that are pending install and
    * uninstall into.
    *
    * @return an nsIFile
    */
-  getStagingDir: function() {
+  getStagingDir() {
     let dir = this._directory.clone();
     dir.append(DIR_STAGE);
     return dir;
   },
 
-  requestStagingDir: function() {
+  requestStagingDir() {
     this._stagingDirLock++;
 
     if (this._stagingDirPromise)
       return this._stagingDirPromise;
 
     OS.File.makeDir(this._directory.path);
     let stagepath = OS.Path.join(this._directory.path, DIR_STAGE);
     return this._stagingDirPromise = OS.File.makeDir(stagepath).then(null, (e) => {
       if (e instanceof OS.File.Error && e.becauseExists)
         return;
       logger.error("Failed to create staging directory", e);
       throw e;
     });
   },
 
-  releaseStagingDir: function() {
+  releaseStagingDir() {
     this._stagingDirLock--;
 
     if (this._stagingDirLock == 0) {
       this._stagingDirPromise = null;
       this.cleanStagingDir();
     }
 
     return Promise.resolve();
@@ -8243,17 +8243,17 @@ Object.assign(MutableDirectoryInstallLoc
   /**
    * Removes the specified files or directories in the staging directory and
    * then if the staging directory is empty attempts to remove it.
    *
    * @param  aLeafNames
    *         An array of file or directory to remove from the directory, the
    *         array may be empty
    */
-  cleanStagingDir: function(aLeafNames = []) {
+  cleanStagingDir(aLeafNames = []) {
     let dir = this.getStagingDir();
 
     for (let name of aLeafNames) {
       let file = dir.clone();
       file.append(name);
       recursiveRemove(file);
     }
 
@@ -8282,17 +8282,17 @@ Object.assign(MutableDirectoryInstallLoc
   /**
    * 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
    * safe move operations. Calling this method will delete the existing trash
    * directory and its contents.
    *
    * @return an nsIFile
    */
-  getTrashDir: function() {
+  getTrashDir() {
     let trashDir = this._directory.clone();
     trashDir.append(DIR_TRASH);
     let trashDirExists = trashDir.exists();
     try {
       if (trashDirExists)
         recursiveRemove(trashDir);
       trashDirExists = false;
     } catch (e) {
@@ -8319,17 +8319,17 @@ Object.assign(MutableDirectoryInstallLoc
    *           Default action, the source files will be moved to the new
    *           location,
    *           "copy"
    *           The source files will be copied,
    *           "proxy"
    *           A "proxy file" is going to refer to the source file path
    * @return an nsIFile indicating where the add-on was installed to
    */
-  installAddon: function({ id, source, existingAddonID, action = "move" }) {
+  installAddon({ id, source, existingAddonID, action = "move" }) {
     let trashDir = this.getTrashDir();
 
     let transaction = new SafeInstallOperation();
 
     let moveOldAddon = aId => {
       let file = this._directory.clone();
       file.append(aId);
 
@@ -8428,17 +8428,17 @@ Object.assign(MutableDirectoryInstallLoc
 
   /**
    * Uninstalls an add-on from this location.
    *
    * @param  aId
    *         The ID of the add-on to uninstall
    * @throws if the ID does not match any of the add-ons installed
    */
-  uninstallAddon: function(aId) {
+  uninstallAddon(aId) {
     let file = this._IDToFileMap[aId];
     if (!file) {
       logger.warn("Attempted to remove " + aId + " from " +
            this._name + " but it was already gone");
       return;
     }
 
     file = this._directory.clone();
@@ -8526,17 +8526,17 @@ Object.assign(SystemAddonInstallLocation
   /**
    * Removes the specified files or directories in the staging directory and
    * then if the staging directory is empty attempts to remove it.
    *
    * @param  aLeafNames
    *         An array of file or directory to remove from the directory, the
    *         array may be empty
    */
-  cleanStagingDir: function(aLeafNames = []) {
+  cleanStagingDir(aLeafNames = []) {
     let dir = this.getStagingDir();
 
     for (let name of aLeafNames) {
       let file = dir.clone();
       file.append(name);
       recursiveRemove(file);
     }
 
@@ -8563,33 +8563,33 @@ Object.assign(SystemAddonInstallLocation
   },
 
   /**
    * Gets the staging directory to put add-ons that are pending install and
    * uninstall into.
    *
    * @return {nsIFile} - staging directory for system add-on upgrades.
    */
-  getStagingDir: function() {
+  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 {
       logger.info("SystemAddonInstallLocation directory is missing");
     }
 
     return dir;
   },
 
-  requestStagingDir: function() {
+  requestStagingDir() {
     this._stagingDirLock++;
     if (this._stagingDirPromise)
       return this._stagingDirPromise;
 
     this._addonSet = this._loadAddonSet();
     if (this._addonSet.directory) {
       this._directory = this._baseDir.clone();
       this._directory.append(this._addonSet.directory);
@@ -8600,31 +8600,31 @@ Object.assign(SystemAddonInstallLocation
     return this._stagingDirPromise = OS.File.makeDir(stagepath).then(null, (e) => {
       if (e instanceof OS.File.Error && e.becauseExists)
         return;
       logger.error("Failed to create staging directory", e);
       throw e;
     });
   },
 
-  releaseStagingDir: function() {
+  releaseStagingDir() {
     this._stagingDirLock--;
 
     if (this._stagingDirLock == 0) {
       this._stagingDirPromise = null;
       this.cleanStagingDir();
     }
 
     return Promise.resolve();
   },
 
   /**
    * Reads the current set of system add-ons
    */
-  _loadAddonSet: function() {
+  _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;
       }
     }
@@ -8636,21 +8636,21 @@ Object.assign(SystemAddonInstallLocation
   },
 
   /**
    * Saves the current set of system add-ons
    *
    * @param {Object} aAddonSet - object containing schema, directory and set
    *                 of system add-on IDs and versions.
    */
-  _saveAddonSet: function(aAddonSet) {
+  _saveAddonSet(aAddonSet) {
     Preferences.set(PREF_SYSTEM_ADDON_SET, JSON.stringify(aAddonSet));
   },
 
-  getAddonLocations: function() {
+  getAddonLocations() {
     // Updated system add-ons are ignored in safe mode
     if (Services.appinfo.inSafeMode)
       return new Map();
 
     let addons = DirectoryInstallLocation.prototype.getAddonLocations.call(this);
 
     // Strip out any unexpected add-ons from the list
     for (let id of addons.keys()) {
@@ -8659,21 +8659,21 @@ Object.assign(SystemAddonInstallLocation
     }
 
     return addons;
   },
 
   /**
    * Tests whether updated system add-ons are expected.
    */
-  isActive: function() {
+  isActive() {
     return this._directory != null;
   },
 
-  isValidAddon: function(aAddon) {
+  isValidAddon(aAddon) {
     if (aAddon.appDisabled) {
       logger.warn(`System add-on ${aAddon.id} isn't compatible with the application.`);
       return false;
     }
 
     if (aAddon.unpack) {
       logger.warn(`System add-on ${aAddon.id} isn't a packed add-on.`);
       return false;
@@ -8690,17 +8690,17 @@ Object.assign(SystemAddonInstallLocation
     }
 
     return true;
   },
 
   /**
    * Tests whether the loaded add-on information matches what is expected.
    */
-  isValid: function(aAddons) {
+  isValid(aAddons) {
     for (let id of Object.keys(this._addonSet.addons)) {
       if (!aAddons.has(id)) {
         logger.warn(`Expected add-on ${id} is missing from the system add-on location.`);
         return false;
       }
 
       let addon = aAddons.get(id);
       if (addon.version != this._addonSet.addons[id].version) {
@@ -8713,17 +8713,17 @@ Object.assign(SystemAddonInstallLocation
     }
 
     return true;
   },
 
   /**
    * Resets the add-on set so on the next startup the default set will be used.
    */
-  resetAddonSet: function() {
+  resetAddonSet() {
 
     if (this._addonSet) {
       logger.info("Removing all system add-on upgrades.");
 
       // remove everything from the pref first, if uninstall
       // fails then at least they will not be re-activated on
       // next restart.
       this._saveAddonSet({ schema: 1, addons: {} });
@@ -8931,17 +8931,17 @@ Object.assign(SystemAddonInstallLocation
   /**
    * 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
    * safe move operations. Calling this method will delete the existing trash
    * directory and its contents.
    *
    * @return an nsIFile
    */
-  getTrashDir: function() {
+  getTrashDir() {
     let trashDir = this._directory.clone();
     trashDir.append(DIR_TRASH);
     let trashDirExists = trashDir.exists();
     try {
       if (trashDirExists)
         recursiveRemove(trashDir);
       trashDirExists = false;
     } catch (e) {
@@ -8957,17 +8957,17 @@ Object.assign(SystemAddonInstallLocation
    * Installs an add-on into the install location.
    *
    * @param  id
    *         The ID of the add-on to install
    * @param  source
    *         The source nsIFile to install from
    * @return an nsIFile indicating where the add-on was installed to
    */
-  installAddon: function({id, source}) {
+  installAddon({id, source}) {
     let trashDir = this.getTrashDir();
     let transaction = new SafeInstallOperation();
 
     // If any of these operations fails the finally block will clean up the
     // temporary directory
     try {
       if (source.isFile()) {
         flushJarCache(source);
@@ -9080,17 +9080,17 @@ WinRegInstallLocation.prototype = {
 
   /**
    * Read the registry and build a mapping between ID and path for each
    * installed add-on.
    *
    * @param  key
    *         The key that contains the ID to path mapping
    */
-  _readAddons: function(aKey) {
+  _readAddons(aKey) {
     let count = aKey.valueCount;
     for (let i = 0; i < count; ++i) {
       let id = aKey.getValueName(i);
 
       let file = new nsIFile(aKey.readStringValue(id));
 
       if (!file.exists()) {
         logger.warn("Ignoring missing add-on in " + file.path);
@@ -9114,28 +9114,28 @@ WinRegInstallLocation.prototype = {
    */
   get scope() {
     return this._scope;
   },
 
   /**
    * Gets an array of nsIFiles for add-ons installed in this location.
    */
-  getAddonLocations: function() {
+  getAddonLocations() {
     let locations = new Map();
     for (let id in this._IDToFileMap) {
       locations.set(id, this._IDToFileMap[id].clone());
     }
     return locations;
   },
 
   /**
    * @see DirectoryInstallLocation
    */
-  isLinkedAddon: function(aId) {
+  isLinkedAddon(aId) {
     return true;
   }
 };
 
 var addonTypes = [
   new AddonManagerPrivate.AddonType("extension", URI_EXTENSION_STRINGS,
                                     STRING_TYPE_NAME,
                                     AddonManager.VIEW_TYPE_LIST, 4000,
--- a/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
+++ b/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
@@ -333,17 +333,17 @@ function DBAddonInternal(aLoaded) {
         }
       }
       return null;
     });
 }
 
 DBAddonInternal.prototype = Object.create(AddonInternal.prototype);
 Object.assign(DBAddonInternal.prototype, {
-  applyCompatibilityUpdate: function(aUpdate, aSyncCompatibility) {
+  applyCompatibilityUpdate(aUpdate, aSyncCompatibility) {
     let wasCompatible = this.isCompatible;
 
     this.targetApplications.forEach(function(aTargetApp) {
       aUpdate.targetApplications.forEach(function(aUpdateTarget) {
         if (aTargetApp.id == aUpdateTarget.id && (aSyncCompatibility ||
             Services.vc.compare(aTargetApp.maxVersion, aUpdateTarget.maxVersion) < 0)) {
           aTargetApp.minVersion = aUpdateTarget.minVersion;
           aTargetApp.maxVersion = aUpdateTarget.maxVersion;
@@ -356,17 +356,17 @@ Object.assign(DBAddonInternal.prototype,
       this.multiprocessCompatible = aUpdate.multiprocessCompatible;
       XPIDatabase.saveChanges();
     }
 
     if (wasCompatible != this.isCompatible)
       XPIProvider.updateAddonDisabledState(this);
   },
 
-  toJSON: function() {
+  toJSON() {
     let jsonData = copyProperties(this, PROP_JSON_FIELDS);
 
     // Experiments are serialized as disabled so they aren't run on the next
     // startup.
     if (this.type == "experiment") {
       jsonData.userDisabled = true;
       jsonData.active = false;
     }
@@ -418,17 +418,17 @@ this.XPIDatabase = {
     if (this._deferredSave)
       return this._deferredSave.lastError;
     return null;
   },
 
   /**
    * Mark the current stored data dirty, and schedule a flush to disk
    */
-  saveChanges: function() {
+  saveChanges() {
     if (!this.initialized) {
       throw new Error("Attempt to use XPI database when it is not initialized");
     }
 
     if (XPIProvider._closing) {
       // use an Error here so we get a stack trace.
       let err = new Error("XPI database modified after shutdown began");
       logger.warn(err);
@@ -465,30 +465,30 @@ this.XPIDatabase = {
         });
     }
 
     promise.catch(error => {
       logger.warn("Failed to save XPI database", error);
     });
   },
 
-  flush: function() {
+  flush() {
     // handle the "in memory only" and "saveChanges never called" cases
     if (!this._deferredSave) {
       return Promise.resolve(0);
     }
 
     return this._deferredSave.flush();
   },
 
   /**
    * Converts the current internal state of the XPI addon database to
    * a JSON.stringify()-ready structure
    */
-  toJSON: function() {
+  toJSON() {
     if (!this.addonDB) {
       // We never loaded the database?
       throw new Error("Attempt to save database without loading it first");
     }
 
     let toSave = {
       schemaVersion: DB_SCHEMA,
       addons: [...this.addonDB.values()]
@@ -501,17 +501,17 @@ this.XPIDatabase = {
    *
    * @return false if there is no SQLITE database
    *         true and sets this.migrateData to null if the SQLITE DB exists
    *              but does not contain useful information
    *         true and sets this.migrateData to
    *              {location: {id1:{addon1}, id2:{addon2}}, location2:{...}, ...}
    *              if there is useful information
    */
-  getMigrateDataFromSQLITE: function() {
+  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) {
       logger.warn("Failed to open sqlite database " + dbfile.path + " for upgrade", e);
@@ -536,17 +536,17 @@ this.XPIDatabase = {
    * 6) useable RDF DB => upgrade
    * 7) useless RDF DB => build new JSON
    * 8) Nothing at all => build new JSON
    * @param  aRebuildOnError
    *         A boolean indicating whether add-on information should be loaded
    *         from the install locations if the database needs to be rebuilt.
    *         (if false, caller is XPIProvider.checkForChanges() which will rebuild)
    */
-  syncLoadDB: function(aRebuildOnError) {
+  syncLoadDB(aRebuildOnError) {
     this.migrateData = null;
     let fstream = null;
     let data = "";
     try {
       let readTimer = AddonManagerPrivate.simpleTimer("XPIDB_syncRead_MS");
       logger.debug("Opening XPI database " + this.jsonFile.path);
       fstream = Components.classes["@mozilla.org/network/file-input-stream;1"].
               createInstance(Components.interfaces.nsIFileInputStream);
@@ -597,17 +597,17 @@ this.XPIDatabase = {
     this._dbPromise = Promise.resolve(this.addonDB);
   },
 
   /**
    * Parse loaded data, reconstructing the database if the loaded data is not valid
    * @param aRebuildOnError
    *        If true, synchronously reconstruct the database from installed add-ons
    */
-  parseDB: function(aData, aRebuildOnError) {
+  parseDB(aData, aRebuildOnError) {
     let parseTimer = AddonManagerPrivate.simpleTimer("XPIDB_parseDB_MS");
     try {
       // dump("Loaded JSON:\n" + aData + "\n");
       let inputAddons = JSON.parse(aData);
       // Now do some sanity checks on our JSON db
       if (!("schemaVersion" in inputAddons) || !("addons" in inputAddons)) {
         parseTimer.done();
         // Content of JSON file is bad, need to rebuild from scratch
@@ -668,17 +668,17 @@ this.XPIDatabase = {
       this.rebuildDatabase(aRebuildOnError);
       rebuildTimer.done();
     }
   },
 
   /**
    * Upgrade database from earlier (sqlite or RDF) version if available
    */
-  upgradeDB: function(aRebuildOnError) {
+  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();
       }
@@ -697,17 +697,17 @@ this.XPIDatabase = {
     this.rebuildDatabase(aRebuildOnError);
     upgradeTimer.done();
   },
 
   /**
    * Reconstruct when the DB file exists but is unreadable
    * (for example because read permission is denied)
    */
-  rebuildUnreadableDB: function(aError, aRebuildOnError) {
+  rebuildUnreadableDB(aError, aRebuildOnError) {
     let rebuildTimer = AddonManagerPrivate.simpleTimer("XPIDB_rebuildUnreadableDB_MS");
     logger.warn("Extensions database " + this.jsonFile.path +
         " exists but is not readable; rebuilding", aError);
     // Remember the error message until we try and write at least once, so
     // we know at shutdown time that there was a problem
     this._loadError = aError;
     AddonManagerPrivate.recordSimpleMeasure("XPIDB_startupError", "unreadable");
     this.rebuildDatabase(aRebuildOnError);
@@ -717,17 +717,17 @@ this.XPIDatabase = {
   /**
    * Open and read the XPI database asynchronously, upgrading if
    * necessary. If any DB load operation fails, we need to
    * synchronously rebuild the DB from the installed extensions.
    *
    * @return Promise<Map> resolves to the Map of loaded JSON data stored
    *         in this.addonDB; never rejects.
    */
-  asyncLoadDB: function() {
+  asyncLoadDB() {
     // Already started (and possibly finished) loading
     if (this._dbPromise) {
       return this._dbPromise;
     }
 
     logger.debug("Starting async load of XPI database " + this.jsonFile.path);
     AddonManagerPrivate.recordSimpleMeasure("XPIDB_async_load", XPIProvider.runPhase);
     let readOptions = {
@@ -772,17 +772,17 @@ this.XPIDatabase = {
    * Rebuild the database from addon install directories. If this.migrateData
    * is available, uses migrated information for settings on the addons found
    * during rebuild
    * @param aRebuildOnError
    *         A boolean indicating whether add-on information should be loaded
    *         from the install locations if the database needs to be rebuilt.
    *         (if false, caller is XPIProvider.checkForChanges() which will rebuild)
    */
-  rebuildDatabase: function(aRebuildOnError) {
+  rebuildDatabase(aRebuildOnError) {
     this.addonDB = new Map();
     this.initialized = true;
 
     if (XPIStates.size == 0) {
       // No extensions installed, so we're done
       logger.debug("Rebuilding XPI database with no extensions");
       return;
     }
@@ -808,17 +808,17 @@ this.XPIDatabase = {
   /**
    * Gets the list of file descriptors of active extension directories or XPI
    * files from the add-ons list. This must be loaded from disk since the
    * directory service gives no easy way to get both directly. This list doesn't
    * include themes as preferences already say which theme is currently active
    *
    * @return an array of persistent descriptors for the directories
    */
-  getActiveBundles: function() {
+  getActiveBundles() {
     let bundles = [];
 
     // non-bootstrapped extensions
     let addonsList = FileUtils.getFile(KEY_PROFILEDIR, [FILE_XPI_ADDONS_LIST],
                                        true);
 
     if (!addonsList.exists())
       // XXX Irving believes this is broken in the case where there is no
@@ -847,17 +847,17 @@ this.XPIDatabase = {
   },
 
   /**
    * Retrieves migration data from the old extensions.rdf database.
    *
    * @return an object holding information about what add-ons were previously
    *         userDisabled and any updated compatibility information
    */
-  getMigrateDataFromRDF: function(aDbWasMissing) {
+  getMigrateDataFromRDF(aDbWasMissing) {
 
     // Migrate data from extensions.rdf
     let rdffile = FileUtils.getFile(KEY_PROFILEDIR, [FILE_OLD_DATABASE], true);
     if (!rdffile.exists())
       return null;
 
     logger.debug("Migrating data from " + FILE_OLD_DATABASE);
     let migrateData = {};
@@ -919,17 +919,17 @@ this.XPIDatabase = {
   },
 
   /**
    * Retrieves migration data from a database that has an older or newer schema.
    *
    * @return an object holding information about what add-ons were previously
    *         userDisabled and any updated compatibility information
    */
-  getMigrateDataFromDatabase: function(aConnection) {
+  getMigrateDataFromDatabase(aConnection) {
     let migrateData = {};
 
     // Attempt to migrate data from a different (even future!) version of the
     // database
     try {
       var stmt = aConnection.createStatement("PRAGMA table_info(addon)");
 
       const REQUIRED = ["internal_id", "id", "location", "userDisabled",
@@ -1010,17 +1010,17 @@ this.XPIDatabase = {
   },
 
   /**
    * Shuts down the database connection and releases all cached objects.
    * Return: Promise{integer} resolves / rejects with the result of the DB
    *                          flush after the database is flushed and
    *                          all cleanup is done
    */
-  shutdown: function() {
+  shutdown() {
     logger.debug("shutdown");
     if (this.initialized) {
       // If our last database I/O had an error, try one last time to save.
       if (this.lastError)
         this.saveChanges();
 
       this.initialized = false;
 
@@ -1061,17 +1061,17 @@ this.XPIDatabase = {
    * Asynchronously list all addons that match the filter function
    * @param  aFilter
    *         Function that takes an addon instance and returns
    *         true if that addon should be included in the selected array
    * @param  aCallback
    *         Called back with an array of addons matching aFilter
    *         or an empty array if none match
    */
-  getAddonList: function(aFilter, aCallback) {
+  getAddonList(aFilter, aCallback) {
     this.asyncLoadDB().then(
       addonDB => {
         let addonList = _filterDB(addonDB, aFilter);
         asyncMap(addonList, getRepositoryAddon, makeSafe(aCallback));
       })
     .then(null,
         error => {
           logger.error("getAddonList failed", error);
@@ -1082,17 +1082,17 @@ this.XPIDatabase = {
   /**
    * (Possibly asynchronously) get the first addon that matches the filter function
    * @param  aFilter
    *         Function that takes an addon instance and returns
    *         true if that addon should be selected
    * @param  aCallback
    *         Called back with the addon, or null if no matching addon is found
    */
-  getAddon: function(aFilter, aCallback) {
+  getAddon(aFilter, aCallback) {
     return this.asyncLoadDB().then(
       addonDB => {
         getRepositoryAddon(_findAddon(addonDB, aFilter), makeSafe(aCallback));
       })
     .then(null,
         error => {
           logger.error("getAddon failed", error);
           makeSafe(aCallback)(null);
@@ -1105,70 +1105,70 @@ this.XPIDatabase = {
    *
    * @param  aId
    *         The ID of the add-on to retrieve
    * @param  aLocation
    *         The name of the install location
    * @param  aCallback
    *         A callback to pass the DBAddonInternal to
    */
-  getAddonInLocation: function(aId, aLocation, aCallback) {
+  getAddonInLocation(aId, aLocation, aCallback) {
     this.asyncLoadDB().then(
         addonDB => getRepositoryAddon(addonDB.get(aLocation + ":" + aId),
                                       makeSafe(aCallback)));
   },
 
   /**
    * Asynchronously get all the add-ons in a particular install location.
    *
    * @param  aLocation
    *         The name of the install location
    * @param  aCallback
    *         A callback to pass the array of DBAddonInternals to
    */
-  getAddonsInLocation: function(aLocation, aCallback) {
+  getAddonsInLocation(aLocation, aCallback) {
     this.getAddonList(aAddon => aAddon._installLocation.name == aLocation, aCallback);
   },
 
   /**
    * Asynchronously gets the add-on with the specified ID that is visible.
    *
    * @param  aId
    *         The ID of the add-on to retrieve
    * @param  aCallback
    *         A callback to pass the DBAddonInternal to
    */
-  getVisibleAddonForID: function(aId, aCallback) {
+  getVisibleAddonForID(aId, aCallback) {
     this.getAddon(aAddon => ((aAddon.id == aId) && aAddon.visible),
                   aCallback);
   },
 
   /**
    * Asynchronously gets the visible add-ons, optionally restricting by type.
    *
    * @param  aTypes
    *         An array of types to include or null to include all types
    * @param  aCallback
    *         A callback to pass the array of DBAddonInternals to
    */
-  getVisibleAddons: function(aTypes, aCallback) {
+  getVisibleAddons(aTypes, aCallback) {
     this.getAddonList(aAddon => (aAddon.visible &&
                                  (!aTypes || (aTypes.length == 0) ||
                                   (aTypes.indexOf(aAddon.type) > -1))),
                       aCallback);
   },
 
   /**
    * Synchronously gets all add-ons of a particular type.
    *
    * @param  aType
    *         The type of add-on to retrieve
    * @return an array of DBAddonInternals
    */
-  getAddonsByType: function(aType) {
+  getAddonsByType(aType) {
     if (!this.addonDB) {
       // jank-tastic! Must synchronously load DB if the theme switches from
       // an XPI theme to a lightweight theme before the DB has loaded,
       // because we're called from sync XPIProvider.addonChanged
       logger.warn("Synchronous load of XPI database due to getAddonsByType(" + aType + ")");
       AddonManagerPrivate.recordSimpleMeasure("XPIDB_lateOpen_byType", XPIProvider.runPhase);
       this.syncLoadDB(true);
     }
@@ -1177,17 +1177,17 @@ this.XPIDatabase = {
 
   /**
    * Synchronously gets an add-on with a particular internalName.
    *
    * @param  aInternalName
    *         The internalName of the add-on to retrieve
    * @return a DBAddonInternal
    */
-  getVisibleAddonForInternalName: function(aInternalName) {
+  getVisibleAddonForInternalName(aInternalName) {
     if (!this.addonDB) {
       // This may be called when the DB hasn't otherwise been loaded
       logger.warn("Synchronous load of XPI database due to getVisibleAddonForInternalName");
       AddonManagerPrivate.recordSimpleMeasure("XPIDB_lateOpen_forInternalName",
           XPIProvider.runPhase);
       this.syncLoadDB(true);
     }
 
@@ -1199,17 +1199,17 @@ this.XPIDatabase = {
   /**
    * Asynchronously gets all add-ons with pending operations.
    *
    * @param  aTypes
    *         The types of add-ons to retrieve or null to get all types
    * @param  aCallback
    *         A callback to pass the array of DBAddonInternal to
    */
-  getVisibleAddonsWithPendingOperations: function(aTypes, aCallback) {
+  getVisibleAddonsWithPendingOperations(aTypes, aCallback) {
     this.getAddonList(
         aAddon => (aAddon.visible &&
                    (aAddon.pendingUninstall ||
                     // Logic here is tricky. If we're active but disabled,
                     // we're pending disable; !active && !disabled, we're pending enable
                     (aAddon.active == aAddon.disabled)) &&
                    (!aTypes || (aTypes.length == 0) || (aTypes.indexOf(aAddon.type) > -1))),
         aCallback);
@@ -1220,46 +1220,46 @@ this.XPIDatabase = {
    *
    * @param  aGUID
    *         Sync GUID of add-on to fetch
    * @param  aCallback
    *         A callback to pass the DBAddonInternal record to. Receives null
    *         if no add-on with that GUID is found.
    *
    */
-  getAddonBySyncGUID: function(aGUID, aCallback) {
+  getAddonBySyncGUID(aGUID, aCallback) {
     this.getAddon(aAddon => aAddon.syncGUID == aGUID,
                   aCallback);
   },
 
   /**
    * Synchronously gets all add-ons in the database.
    * This is only called from the preference observer for the default
    * compatibility version preference, so we can return an empty list if
    * we haven't loaded the database yet.
    *
    * @return  an array of DBAddonInternals
    */
-  getAddons: function() {
+  getAddons() {
     if (!this.addonDB) {
       return [];
     }
     return _filterDB(this.addonDB, aAddon => true);
   },
 
   /**
    * Synchronously adds an AddonInternal's metadata to the database.
    *
    * @param  aAddon
    *         AddonInternal to add
    * @param  aDescriptor
    *         The file descriptor of the add-on
    * @return The DBAddonInternal that was added to the database
    */
-  addAddonMetadata: function(aAddon, aDescriptor) {
+  addAddonMetadata(aAddon, aDescriptor) {
     if (!this.addonDB) {
       AddonManagerPrivate.recordSimpleMeasure("XPIDB_lateOpen_addMetadata",
           XPIProvider.runPhase);
       this.syncLoadDB(false);
     }
 
     let newAddon = new DBAddonInternal(aAddon);
     newAddon.descriptor = aDescriptor;
@@ -1279,17 +1279,17 @@ this.XPIDatabase = {
    * @param  aOldAddon
    *         The DBAddonInternal to be replaced
    * @param  aNewAddon
    *         The new AddonInternal to add
    * @param  aDescriptor
    *         The file descriptor of the add-on
    * @return The DBAddonInternal that was added to the database
    */
-  updateAddonMetadata: function(aOldAddon, aNewAddon, aDescriptor) {
+  updateAddonMetadata(aOldAddon, aNewAddon, aDescriptor) {
     this.removeAddonMetadata(aOldAddon);
     aNewAddon.syncGUID = aOldAddon.syncGUID;
     aNewAddon.installDate = aOldAddon.installDate;
     aNewAddon.applyBackgroundUpdates = aOldAddon.applyBackgroundUpdates;
     aNewAddon.foreignInstall = aOldAddon.foreignInstall;
     aNewAddon.seen = aOldAddon.seen;
     aNewAddon.active = (aNewAddon.visible && !aNewAddon.disabled && !aNewAddon.pendingUninstall);
 
@@ -1298,29 +1298,29 @@ this.XPIDatabase = {
   },
 
   /**
    * Synchronously removes an add-on from the database.
    *
    * @param  aAddon
    *         The DBAddonInternal being removed
    */
-  removeAddonMetadata: function(aAddon) {
+  removeAddonMetadata(aAddon) {
     this.addonDB.delete(aAddon._key);
     this.saveChanges();
   },
 
   /**
    * Synchronously marks a DBAddonInternal as visible marking all other
    * instances with the same ID as not visible.
    *
    * @param  aAddon
    *         The DBAddonInternal to make visible
    */
-  makeAddonVisible: function(aAddon) {
+  makeAddonVisible(aAddon) {
     logger.debug("Make addon " + aAddon._key + " visible");
     for (let [, otherAddon] of this.addonDB) {
       if ((otherAddon.id == aAddon.id) && (otherAddon._key != aAddon._key)) {
         logger.debug("Hide addon " + otherAddon._key);
         otherAddon.visible = false;
         otherAddon.active = false;
       }
     }
@@ -1331,34 +1331,34 @@ this.XPIDatabase = {
   /**
    * Synchronously sets properties for an add-on.
    *
    * @param  aAddon
    *         The DBAddonInternal being updated
    * @param  aProperties
    *         A dictionary of properties to set
    */
-  setAddonProperties: function(aAddon, aProperties) {
+  setAddonProperties(aAddon, aProperties) {
     for (let key in aProperties) {
       aAddon[key] = aProperties[key];
     }
     this.saveChanges();
   },
 
   /**
    * Synchronously sets the Sync GUID for an add-on.
    * Only called when the database is already loaded.
    *
    * @param  aAddon
    *         The DBAddonInternal being updated
    * @param  aGUID
    *         GUID string to set the value to
    * @throws if another addon already has the specified GUID
    */
-  setAddonSyncGUID: function(aAddon, aGUID) {
+  setAddonSyncGUID(aAddon, aGUID) {
     // Need to make sure no other addon has this GUID
     function excludeSyncGUID(otherAddon) {
       return (otherAddon._key != aAddon._key) && (otherAddon.syncGUID == aGUID);
     }
     let otherAddon = _findAddon(this.addonDB, excludeSyncGUID);
     if (otherAddon) {
       throw new Error("Addon sync GUID conflict for addon " + aAddon._key +
           ": " + otherAddon._key + " already has GUID " + aGUID);
@@ -1368,24 +1368,24 @@ this.XPIDatabase = {
   },
 
   /**
    * Synchronously updates an add-on's active flag in the database.
    *
    * @param  aAddon
    *         The DBAddonInternal to update
    */
-  updateAddonActive: function(aAddon, aActive) {
+  updateAddonActive(aAddon, aActive) {
     logger.debug("Updating active state for add-on " + aAddon.id + " to " + aActive);
 
     aAddon.active = aActive;
     this.saveChanges();
   },
 
-  updateAddonsBlockingE10s: function() {
+  updateAddonsBlockingE10s() {
     let blockE10s = false;
 
     Preferences.set(PREF_E10S_HAS_NONEXEMPT_ADDON, false);
     for (let [, addon] of this.addonDB) {
       let active = (addon.visible && !addon.disabled && !addon.pendingUninstall);
 
       if (active && XPIProvider.isBlockingE10s(addon)) {
         blockE10s = true;
@@ -1393,17 +1393,17 @@ this.XPIDatabase = {
       }
     }
     Preferences.set(PREF_E10S_BLOCKED_BY_ADDONS, blockE10s);
   },
 
   /**
    * Synchronously calculates and updates all the active flags in the database.
    */
-  updateActiveAddons: function() {
+  updateActiveAddons() {
     if (!this.addonDB) {
       logger.warn("updateActiveAddons called when DB isn't loaded");
       // force the DB to load
       AddonManagerPrivate.recordSimpleMeasure("XPIDB_lateOpen_updateActive",
           XPIProvider.runPhase);
       this.syncLoadDB(true);
     }
     logger.debug("Updating add-on states");
@@ -1415,17 +1415,17 @@ this.XPIDatabase = {
       }
     }
   },
 
   /**
    * Writes out the XPI add-ons list for the platform to read.
    * @return true if the file was successfully updated, false otherwise
    */
-  writeAddonsList: function() {
+  writeAddonsList() {
     if (!this.addonDB) {
       // force the DB to load
       AddonManagerPrivate.recordSimpleMeasure("XPIDB_lateOpen_writeList",
           XPIProvider.runPhase);
       this.syncLoadDB(true);
     }
     Services.appinfo.invalidateCachesOnRestart();
 
--- a/toolkit/mozapps/extensions/nsBlocklistService.js
+++ b/toolkit/mozapps/extensions/nsBlocklistService.js
@@ -323,25 +323,25 @@ Blocklist.prototype = {
    *                                 (default = 0)
    *                   "maxVersion"  The maximum version in a version range
    *                                 (default = *)
    */
   _addonEntries: null,
   _gfxEntries: null,
   _pluginEntries: null,
 
-  shutdown: function() {
+  shutdown() {
     Services.obs.removeObserver(this, "xpcom-shutdown");
     Services.ppmm.removeMessageListener("Blocklist:getPluginBlocklistState", this);
     Services.ppmm.removeMessageListener("Blocklist:content-blocklist-updated", this);
     gPref.removeObserver("extensions.blocklist.", this);
     gPref.removeObserver(PREF_EM_LOGGING_ENABLED, this);
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
     case "xpcom-shutdown":
       this.shutdown();
       break;
     case "nsPref:changed":
       switch (aData) {
         case PREF_EM_LOGGING_ENABLED:
           gLoggingEnabled = getPref("getBoolPref", PREF_EM_LOGGING_ENABLED, false);
@@ -361,39 +361,39 @@ Blocklist.prototype = {
     case "sessionstore-windows-restored":
       Services.obs.removeObserver(this, "sessionstore-windows-restored");
       this._preloadBlocklist();
       break;
     }
   },
 
   // Message manager message handlers
-  receiveMessage: function(aMsg) {
+  receiveMessage(aMsg) {
     switch (aMsg.name) {
       case "Blocklist:getPluginBlocklistState":
         return this.getPluginBlocklistState(aMsg.data.addonData,
                                             aMsg.data.appVersion,
                                             aMsg.data.toolkitVersion);
       case "Blocklist:content-blocklist-updated":
         Services.obs.notifyObservers(null, "content-blocklist-updated", null);
         break;
       default:
         throw new Error("Unknown blocklist message received from content: " + aMsg.name);
     }
     return undefined;
   },
 
   /* See nsIBlocklistService */
-  isAddonBlocklisted: function(addon, appVersion, toolkitVersion) {
+  isAddonBlocklisted(addon, appVersion, toolkitVersion) {
     return this.getAddonBlocklistState(addon, appVersion, toolkitVersion) ==
                    Ci.nsIBlocklistService.STATE_BLOCKED;
   },
 
   /* See nsIBlocklistService */
-  getAddonBlocklistState: function(addon, appVersion, toolkitVersion) {
+  getAddonBlocklistState(addon, appVersion, toolkitVersion) {
     if (!this._isBlocklistLoaded())
       this._loadBlocklist();
     return this._getAddonBlocklistState(addon, this._addonEntries,
                                         appVersion, toolkitVersion);
   },
 
   /**
    * Private version of getAddonBlocklistState that allows the caller to pass in
@@ -409,17 +409,17 @@ Blocklist.prototype = {
    *          The application version to compare to, will use the current
    *          version if null.
    * @param   toolkitVersion
    *          The toolkit version to compare to, will use the current version if
    *          null.
    * @returns The blocklist state for the item, one of the STATE constants as
    *          defined in nsIBlocklistService.
    */
-  _getAddonBlocklistState: function(addon, addonEntries, appVersion, toolkitVersion) {
+  _getAddonBlocklistState(addon, addonEntries, appVersion, toolkitVersion) {
     if (!gBlocklistEnabled)
       return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
 
     // Not all applications implement nsIXULAppInfo (e.g. xpcshell doesn't).
     if (!appVersion && !gApp.version)
       return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
 
     if (!appVersion)
@@ -440,22 +440,22 @@ Blocklist.prototype = {
   },
 
   /**
    * Returns the set of prefs of the add-on stored in the blocklist file
    * (probably to revert them on disabling).
    * @param addon
    *        The add-on whose to-be-reset prefs are to be found.
    */
-  _getAddonPrefs: function(addon) {
+  _getAddonPrefs(addon) {
     let entry = this._findMatchingAddonEntry(this._addonEntries, addon);
     return entry.prefs.slice(0);
   },
 
-  _findMatchingAddonEntry: function(aAddonEntries, aAddon) {
+  _findMatchingAddonEntry(aAddonEntries, aAddon) {
     if (!aAddon)
       return null;
     // Returns true if the params object passes the constraints set by entry.
     // (For every non-null property in entry, the same key must exist in
     // params and value must be the same)
     function checkEntry(entry, params) {
       for (let [key, value] of entry) {
         if (value === null || value === undefined)
@@ -485,38 +485,38 @@ Blocklist.prototype = {
       if (checkEntry(entry.attributes, params)) {
          return entry;
        }
      }
      return null;
   },
 
   /* See nsIBlocklistService */
-  getAddonBlocklistURL: function(addon, appVersion, toolkitVersion) {
+  getAddonBlocklistURL(addon, appVersion, toolkitVersion) {
     if (!gBlocklistEnabled)
       return "";
 
     if (!this._isBlocklistLoaded())
       this._loadBlocklist();
 
     let blItem = this._findMatchingAddonEntry(this._addonEntries, addon);
     if (!blItem || !blItem.blockID)
       return null;
 
     return this._createBlocklistURL(blItem.blockID);
   },
 
-  _createBlocklistURL: function(id) {
+  _createBlocklistURL(id) {
     let url = Services.urlFormatter.formatURLPref(PREF_BLOCKLIST_ITEM_URL);
     url = url.replace(/%blockID%/g, id);
 
     return url;
   },
 
-  notify: function(aTimer) {
+  notify(aTimer) {
     if (!gBlocklistEnabled)
       return;
 
     try {
       var dsURI = gPref.getCharPref(PREF_BLOCKLIST_URL);
     }
     catch (e) {
       LOG("Blocklist::notify: The " + PREF_BLOCKLIST_URL + " preference" +
@@ -668,17 +668,17 @@ Blocklist.prototype = {
     try {
       let path = OS.Path.join(OS.Constants.Path.profileDir, FILE_BLOCKLIST);
       yield OS.File.writeAtomic(path, request.responseText, {tmpPath: path + ".tmp"});
     } catch (e) {
       LOG("Blocklist::onXMLLoad: " + e);
     }
   }),
 
-  onXMLError: function(aEvent) {
+  onXMLError(aEvent) {
     try {
       var request = aEvent.target;
       // the following may throw (e.g. a local file or timeout)
       var status = request.status;
     }
     catch (e) {
       request = aEvent.target.channel.QueryInterface(Ci.nsIRequest);
       status = request.status;
@@ -694,17 +694,17 @@ Blocklist.prototype = {
     LOG("Blocklist:onError: There was an error loading the blocklist file\r\n" +
         statusText);
   },
 
   /**
    * Finds the newest blocklist file from the application and the profile and
    * load it or does nothing if neither exist.
    */
-  _loadBlocklist: function() {
+  _loadBlocklist() {
     this._addonEntries = [];
     this._gfxEntries = [];
     this._pluginEntries = [];
     var profFile = FileUtils.getFile(KEY_PROFILEDIR, [FILE_BLOCKLIST]);
     if (profFile.exists()) {
       this._loadBlocklistFromFile(profFile);
       return;
     }
@@ -777,17 +777,17 @@ Blocklist.prototype = {
 #        </certItem>
 #        <!-- subject is the DER subject name data base64 encoded... -->
 #        <certItem subject="MA0xCzAJBgNVBAMMAmNh" pubKeyHash="/xeHA5s+i9/z9d8qy6JEuE1xGoRYIwgJuTE/lmaGJ7M=">
 #        </certItem>
 #      </certItems>
 #    </blocklist>
    */
 
-  _loadBlocklistFromFile: function(file) {
+  _loadBlocklistFromFile(file) {
     if (!gBlocklistEnabled) {
       LOG("Blocklist::_loadBlocklistFromFile: blocklist is disabled");
       return;
     }
 
     let telemetry = Services.telemetry;
 
     if (this._isBlocklistPreloaded()) {
@@ -832,26 +832,26 @@ Blocklist.prototype = {
       if (fstream)
         fstream.close();
     }
 
     if (text)
         this._loadBlocklistFromString(text);
   },
 
-  _isBlocklistLoaded: function() {
+  _isBlocklistLoaded() {
     return this._addonEntries != null && this._gfxEntries != null && this._pluginEntries != null;
   },
 
-  _isBlocklistPreloaded: function() {
+  _isBlocklistPreloaded() {
     return this._preloadedBlocklistContent != null;
   },
 
   /* Used for testing */
-  _clear: function() {
+  _clear() {
     this._addonEntries = null;
     this._gfxEntries = null;
     this._pluginEntries = null;
     this._preloadedBlocklistContent = null;
   },
 
   _preloadBlocklist: Task.async(function*() {
     let profPath = OS.Path.join(OS.Constants.Path.profileDir, FILE_BLOCKLIST);
@@ -887,17 +887,17 @@ Blocklist.prototype = {
     let text = yield OS.File.read(path, { encoding: "utf-8" });
 
     if (!this._addonEntries) {
       // Store the content only if a sync load has not been performed in the meantime.
       this._preloadedBlocklistContent = text;
     }
   }),
 
-  _loadBlocklistFromString : function(text) {
+  _loadBlocklistFromString(text) {
     try {
       var parser = Cc["@mozilla.org/xmlextras/domparser;1"].
                    createInstance(Ci.nsIDOMParser);
       var doc = parser.parseFromString(text, "text/xml");
       if (doc.documentElement.namespaceURI != XMLURI_BLOCKLIST) {
         LOG("Blocklist::_loadBlocklistFromFile: aborting due to incorrect " +
             "XML Namespace.\r\nExpected: " + XMLURI_BLOCKLIST + "\r\n" +
             "Received: " + doc.documentElement.namespaceURI);
@@ -946,30 +946,30 @@ Blocklist.prototype = {
       }
     }
     catch (e) {
       LOG("Blocklist::_loadBlocklistFromFile: Error constructing blocklist " + e);
       return;
     }
   },
 
-  _processItemNodes: function(itemNodes, itemName, handler) {
+  _processItemNodes(itemNodes, itemName, handler) {
     var result = [];
     for (var i = 0; i < itemNodes.length; ++i) {
       var blocklistElement = itemNodes.item(i);
       if (!(blocklistElement instanceof Ci.nsIDOMElement) ||
           blocklistElement.localName != itemName)
         continue;
 
       handler(blocklistElement, result);
     }
     return result;
   },
 
-  _handleCertItemNode: function(blocklistElement, result) {
+  _handleCertItemNode(blocklistElement, result) {
     let issuer = blocklistElement.getAttribute("issuerName");
     if (issuer) {
       for (let snElement of blocklistElement.children) {
         try {
           gCertBlocklistService.revokeCertByIssuerAndSerial(issuer, snElement.textContent);
         } catch (e) {
           // we want to keep trying other elements since missing all items
           // is worse than missing one
@@ -986,17 +986,17 @@ Blocklist.prototype = {
       try {
         gCertBlocklistService.revokeCertBySubjectAndPubKey(subject, pubKeyHash);
       } catch (e) {
         LOG("Blocklist::_handleCertItemNode: Error adding revoked cert by Subject and PubKey" + e);
       }
     }
   },
 
-  _handleEmItemNode: function(blocklistElement, result) {
+  _handleEmItemNode(blocklistElement, result) {
     if (!matchesOSABI(blocklistElement))
       return;
 
     let blockEntry = {
       versions: [],
       prefs: [],
       blockID: null,
       attributes: new Map()
@@ -1039,17 +1039,17 @@ Blocklist.prototype = {
     if (blockEntry.versions.length == 0)
       blockEntry.versions.push(new BlocklistItemData(null));
 
     blockEntry.blockID = blocklistElement.getAttribute("blockID");
 
     result.push(blockEntry);
   },
 
-  _handlePluginItemNode: function(blocklistElement, result) {
+  _handlePluginItemNode(blocklistElement, result) {
     if (!matchesOSABI(blocklistElement))
       return;
 
     var matchNodes = blocklistElement.childNodes;
     var blockEntry = {
       matches: {},
       versions: [],
       blockID: null,
@@ -1103,17 +1103,17 @@ Blocklist.prototype = {
   //   <driverVersion> 8.52.322.2202 </driverVersion>
   //   <driverVersionMax> 8.52.322.2202 </driverVersionMax>
   //   <driverVersionComparator> LESS_THAN_OR_EQUAL </driverVersionComparator>
   //   <model>foo</model>
   //   <product>foo</product>
   //   <manufacturer>foo</manufacturer>
   //   <hardware>foo</hardware>
   // </gfxBlacklistEntry>
-  _handleGfxBlacklistNode: function(blocklistElement, result) {
+  _handleGfxBlacklistNode(blocklistElement, result) {
     const blockEntry = {};
 
     // The blockID attribute is always present in the actual data produced on server
     // (see https://github.com/mozilla/addons-server/blob/2016.05.05/src/olympia/blocklist/templates/blocklist/blocklist.xml#L74)
     // But it is sometimes missing in test fixtures.
     if (blocklistElement.hasAttribute("blockID")) {
       blockEntry.blockID = blocklistElement.getAttribute("blockID");
     }
@@ -1154,17 +1154,17 @@ Blocklist.prototype = {
       if (value) {
         blockEntry[matchElement.localName] = value;
       }
     }
     result.push(blockEntry);
   },
 
   /* See nsIBlocklistService */
-  getPluginBlocklistState: function(plugin, appVersion, toolkitVersion) {
+  getPluginBlocklistState(plugin, appVersion, toolkitVersion) {
     if (AppConstants.platform == "android" ||
         AppConstants.MOZ_B2G) {
       return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
     }
     if (!this._isBlocklistLoaded())
       this._loadBlocklist();
     return this._getPluginBlocklistState(plugin, this._pluginEntries,
                                          appVersion, toolkitVersion);
@@ -1182,17 +1182,17 @@ Blocklist.prototype = {
    *          The application version to compare to, will use the current
    *          version if null.
    * @param   toolkitVersion
    *          The toolkit version to compare to, will use the current version if
    *          null.
    * @returns {entry: blocklistEntry, version: blocklistEntryVersion},
    *          or null if there is no matching entry.
    */
-  _getPluginBlocklistEntry: function(plugin, pluginEntries, appVersion, toolkitVersion) {
+  _getPluginBlocklistEntry(plugin, pluginEntries, appVersion, toolkitVersion) {
     if (!gBlocklistEnabled)
       return null;
 
     // Not all applications implement nsIXULAppInfo (e.g. xpcshell doesn't).
     if (!appVersion && !gApp.version)
       return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
 
     if (!appVersion)
@@ -1237,17 +1237,17 @@ Blocklist.prototype = {
    *          The application version to compare to, will use the current
    *          version if null.
    * @param   toolkitVersion
    *          The toolkit version to compare to, will use the current version if
    *          null.
    * @returns The blocklist state for the item, one of the STATE constants as
    *          defined in nsIBlocklistService.
    */
-  _getPluginBlocklistState: function(plugin, pluginEntries, appVersion, toolkitVersion) {
+  _getPluginBlocklistState(plugin, pluginEntries, appVersion, toolkitVersion) {
 
     let r = this._getPluginBlocklistEntry(plugin, pluginEntries,
                                           appVersion, toolkitVersion);
     if (!r) {
       return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
     }
 
     let {version: blockEntryVersion} = r;
@@ -1261,50 +1261,50 @@ Blocklist.prototype = {
       if (vulnerabilityStatus == VULNERABILITYSTATUS_NO_UPDATE)
         return Ci.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE;
       return Ci.nsIBlocklistService.STATE_OUTDATED;
     }
     return Ci.nsIBlocklistService.STATE_SOFTBLOCKED;
   },
 
   /* See nsIBlocklistService */
-  getPluginBlocklistURL: function(plugin) {
+  getPluginBlocklistURL(plugin) {
     if (!this._isBlocklistLoaded())
       this._loadBlocklist();
 
     let r = this._getPluginBlocklistEntry(plugin, this._pluginEntries);
     if (!r) {
       return null;
     }
     let {entry: blockEntry} = r;
     if (!blockEntry.blockID) {
       return null;
     }
 
     return this._createBlocklistURL(blockEntry.blockID);
   },
 
   /* See nsIBlocklistService */
-  getPluginInfoURL: function(plugin) {
+  getPluginInfoURL(plugin) {
     if (!this._isBlocklistLoaded())
       this._loadBlocklist();
 
     let r = this._getPluginBlocklistEntry(plugin, this._pluginEntries);
     if (!r) {
       return null;
     }
     let {entry: blockEntry} = r;
     if (!blockEntry.blockID) {
       return null;
     }
 
     return blockEntry.infoURL;
   },
 
-  _notifyObserversBlocklistGFX: function() {
+  _notifyObserversBlocklistGFX() {
     // Notify `GfxInfoBase`, by passing a string serialization.
     // This way we avoid spreading XML structure logics there.
     const payload = this._gfxEntries.map((r) => {
       return Object.keys(r).sort().filter((k) => !/id|last_modified/.test(k)).map((key) => {
         let value = r[key];
         if (Array.isArray(value)) {
           value = value.join(",");
         } else if (value.hasOwnProperty("minVersion")) {
@@ -1312,22 +1312,22 @@ Blocklist.prototype = {
           value = `${value.minVersion},${value.maxVersion}`;
         }
         return `${key}:${value}`;
       }).join("\t");
     }).join("\n");
     Services.obs.notifyObservers(null, "blocklist-data-gfxItems", payload);
   },
 
-  _notifyObserversBlocklistUpdated: function() {
+  _notifyObserversBlocklistUpdated() {
     Services.obs.notifyObservers(this, "blocklist-updated", "");
     Services.ppmm.broadcastAsyncMessage("Blocklist:blocklistInvalidated", {});
   },
 
-  _blocklistUpdated: function(oldAddonEntries, oldPluginEntries) {
+  _blocklistUpdated(oldAddonEntries, oldPluginEntries) {
     if (AppConstants.MOZ_B2G) {
       return;
     }
 
     var addonList = [];
 
     // A helper function that reverts the prefs passed to default values.
     function resetPrefs(prefs) {
@@ -1556,17 +1556,17 @@ BlocklistItemData.prototype = {
    *          The version of the item being tested.
    * @param   appVersion
    *          The application version to test with.
    * @param   toolkitVersion
    *          The toolkit version to test with.
    * @returns True if the version range covers the item version and application
    *          or toolkit version.
    */
-  includesItem: function(version, appVersion, toolkitVersion) {
+  includesItem(version, appVersion, toolkitVersion) {
     // Some platforms have no version for plugins, these don't match if there
     // was a min/maxVersion provided
     if (!version && (this.minVersion || this.maxVersion))
       return false;
 
     // Check if the item version matches
     if (!this.matchesRange(version, this.minVersion, this.maxVersion))
       return false;
@@ -1586,34 +1586,34 @@ BlocklistItemData.prototype = {
    *          The version to test.
    * @param   minVersion
    *          The minimum version. If null it is assumed that version is always
    *          larger.
    * @param   maxVersion
    *          The maximum version. If null it is assumed that version is always
    *          smaller.
    */
-  matchesRange: function(version, minVersion, maxVersion) {
+  matchesRange(version, minVersion, maxVersion) {
     if (minVersion && gVersionChecker.compare(version, minVersion) < 0)
       return false;
     if (maxVersion && gVersionChecker.compare(version, maxVersion) > 0)
       return false;
     return true;
   },
 
   /**
    * Tests if there is a matching range for the given target application id and
    * version.
    * @param   appID
    *          The application ID to test for, may be for an application or toolkit
    * @param   appVersion
    *          The version of the application to test for.
    * @returns True if this version range covers the application version given.
    */
-  matchesTargetRange: function(appID, appVersion) {
+  matchesTargetRange(appID, appVersion) {
     var blTargetApp = this.targetApps[appID];
     if (!blTargetApp)
       return false;
 
     for (let app of blTargetApp) {
       if (this.matchesRange(appVersion, app.minVersion, app.maxVersion))
         return true;
     }
@@ -1625,17 +1625,17 @@ BlocklistItemData.prototype = {
    * Retrieves a version range (e.g. minVersion and maxVersion) for a
    * blocklist item's targetApplication element.
    * @param   targetAppElement
    *          A targetApplication blocklist element.
    * @returns An array of JS objects with the following properties:
    *          "minVersion"  The minimum version in a version range (default = null).
    *          "maxVersion"  The maximum version in a version range (default = null).
    */
-  getBlocklistAppVersions: function(targetAppElement) {
+  getBlocklistAppVersions(targetAppElement) {
     var appVersions = [ ];
 
     if (targetAppElement) {
       for (var i = 0; i < targetAppElement.childNodes.length; ++i) {
         var versionRangeElement = targetAppElement.childNodes.item(i);
         if (!(versionRangeElement instanceof Ci.nsIDOMElement) ||
             versionRangeElement.localName != "versionRange")
           continue;
@@ -1653,24 +1653,24 @@ BlocklistItemData.prototype = {
    * Retrieves a version range (e.g. minVersion and maxVersion) for a blocklist
    * versionRange element.
    * @param   versionRangeElement
    *          The versionRange blocklist element.
    * @returns A JS object with the following properties:
    *          "minVersion"  The minimum version in a version range (default = null).
    *          "maxVersion"  The maximum version in a version range (default = null).
    */
-  getBlocklistVersionRange: function(versionRangeElement) {
+  getBlocklistVersionRange(versionRangeElement) {
     var minVersion = null;
     var maxVersion = null;
     if (!versionRangeElement)
-      return { minVersion: minVersion, maxVersion: maxVersion };
+      return { minVersion, maxVersion };
 
     if (versionRangeElement.hasAttribute("minVersion"))
       minVersion = versionRangeElement.getAttribute("minVersion");
     if (versionRangeElement.hasAttribute("maxVersion"))
       maxVersion = versionRangeElement.getAttribute("maxVersion");
 
-    return { minVersion: minVersion, maxVersion: maxVersion };
+    return { minVersion, maxVersion };
   }
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([Blocklist]);
--- a/toolkit/mozapps/extensions/nsBlocklistServiceContent.js
+++ b/toolkit/mozapps/extensions/nsBlocklistServiceContent.js
@@ -25,89 +25,89 @@ function Blocklist() {
 }
 
 Blocklist.prototype = {
   classID: Components.ID("{e0a106ed-6ad4-47a4-b6af-2f1c8aa4712d}"),
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                          Ci.nsIBlocklistService]),
 
-  init: function() {
+  init() {
     Services.cpmm.addMessageListener("Blocklist:blocklistInvalidated", this);
     Services.obs.addObserver(this, "xpcom-shutdown", false);
   },
 
-  uninit: function() {
+  uninit() {
     Services.cpmm.removeMessageListener("Blocklist:blocklistInvalidated", this);
     Services.obs.removeObserver(this, "xpcom-shutdown", false);
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
     case "xpcom-shutdown":
       this.uninit();
       break;
     }
   },
 
   // Message manager message handlers
-  receiveMessage: function(aMsg) {
+  receiveMessage(aMsg) {
     switch (aMsg.name) {
       case "Blocklist:blocklistInvalidated":
         Services.obs.notifyObservers(null, "blocklist-updated", null);
         Services.cpmm.sendAsyncMessage("Blocklist:content-blocklist-updated");
         break;
       default:
         throw new Error("Unknown blocklist message received from content: " + aMsg.name);
     }
   },
 
   /*
    * A helper that queries key data from a plugin or addon object
    * and generates a simple data wrapper suitable for ipc. We hand
    * these directly to the nsBlockListService in the parent which
    * doesn't query for much.. allowing us to get away with this.
    */
-  flattenObject: function(aTag) {
+  flattenObject(aTag) {
     // Based on debugging the nsBlocklistService, these are the props the
     // parent side will check on our objects.
     let props = ["name", "description", "filename", "version"];
     let dataWrapper = {};
     for (let prop of props) {
       dataWrapper[prop] = aTag[prop];
     }
     return dataWrapper;
   },
 
   // We support the addon methods here for completeness, but content currently
   // only calls getPluginBlocklistState.
 
-  isAddonBlocklisted: function(aAddon, aAppVersion, aToolkitVersion) {
+  isAddonBlocklisted(aAddon, aAppVersion, aToolkitVersion) {
     return true;
   },
 
-  getAddonBlocklistState: function(aAddon, aAppVersion, aToolkitVersion) {
+  getAddonBlocklistState(aAddon, aAppVersion, aToolkitVersion) {
     return Components.interfaces.nsIBlocklistService.STATE_BLOCKED;
   },
 
   // There are a few callers in layout that rely on this.
-  getPluginBlocklistState: function(aPluginTag, aAppVersion, aToolkitVersion) {
+  getPluginBlocklistState(aPluginTag, aAppVersion, aToolkitVersion) {
     return Services.cpmm.sendSyncMessage("Blocklist:getPluginBlocklistState", {
       addonData: this.flattenObject(aPluginTag),
       appVersion: aAppVersion,
       toolkitVersion: aToolkitVersion
     })[0];
   },
 
-  getAddonBlocklistURL: function(aAddon, aAppVersion, aToolkitVersion) {
+  getAddonBlocklistURL(aAddon, aAppVersion, aToolkitVersion) {
     throw new Error(kMissingAPIMessage);
   },
 
-  getPluginBlocklistURL: function(aPluginTag) {
+  getPluginBlocklistURL(aPluginTag) {
     throw new Error(kMissingAPIMessage);
   },
 
-  getPluginInfoURL: function(aPluginTag) {
+  getPluginInfoURL(aPluginTag) {
     throw new Error(kMissingAPIMessage);
   }
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([Blocklist]);
--- a/toolkit/mozapps/extensions/test/AddonManagerTesting.jsm
+++ b/toolkit/mozapps/extensions/test/AddonManagerTesting.jsm
@@ -21,59 +21,59 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 this.AddonManagerTesting = {
   /**
    * Get the add-on that is specified by its ID.
    *
    * @return {Promise<Object>} A promise that resolves returning the found addon or null
    *         if it is not found.
    */
-  getAddonById: function(id) {
+  getAddonById(id) {
     return new Promise(resolve => AddonManager.getAddonByID(id, addon => resolve(addon)));
   },
 
   /**
    * Uninstall an add-on that is specified by its ID.
    *
    * The returned promise resolves on successful uninstall and rejects
    * if the add-on is not unknown.
    *
    * @return Promise<restartRequired>
    */
-  uninstallAddonByID: function(id) {
+  uninstallAddonByID(id) {
     let deferred = Promise.defer();
 
     AddonManager.getAddonByID(id, (addon) => {
       if (!addon) {
         deferred.reject(new Error("Add-on is not known: " + id));
         return;
       }
 
       let listener = {
-        onUninstalling: function(addon, needsRestart) {
+        onUninstalling(addon, needsRestart) {
           if (addon.id != id) {
             return;
           }
 
           if (needsRestart) {
             AddonManager.removeAddonListener(listener);
             deferred.resolve(true);
           }
         },
 
-        onUninstalled: function(addon) {
+        onUninstalled(addon) {
           if (addon.id != id) {
             return;
           }
 
           AddonManager.removeAddonListener(listener);
           deferred.resolve(false);
         },
 
-        onOperationCancelled: function(addon) {
+        onOperationCancelled(addon) {
           if (addon.id != id) {
             return;
           }
 
           AddonManager.removeAddonListener(listener);
           deferred.reject(new Error("Uninstall cancelled."));
         },
       };
@@ -85,28 +85,28 @@ this.AddonManagerTesting = {
     return deferred.promise;
   },
 
   /**
    * Install an XPI add-on from a URL.
    *
    * @return Promise<addon>
    */
-  installXPIFromURL: function(url, hash, name, iconURL, version) {
+  installXPIFromURL(url, hash, name, iconURL, version) {
     let deferred = Promise.defer();
 
     AddonManager.getInstallForURL(url, (install) => {
       let fail = () => { deferred.reject(new Error("Add-on install failed.")) };
 
       let listener = {
         onDownloadCancelled: fail,
         onDownloadFailed: fail,
         onInstallCancelled: fail,
         onInstallFailed: fail,
-        onInstallEnded: function(install, addon) {
+        onInstallEnded(install, addon) {
           deferred.resolve(addon);
         },
       };
 
       install.addListener(listener);
       install.install();
     }, "application/x-xpinstall", hash, name, iconURL, version);
 
--- a/toolkit/mozapps/extensions/test/browser/browser_addonrepository_performance.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_addonrepository_performance.js
@@ -84,15 +84,15 @@ function test() {
   Services.prefs.setCharPref(PREF,
     "http://127.0.0.1:8888/extensions-dummy/metadata?appOS=%OS%&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%");
 
   registerCleanupFunction(function() {
     Services.obs.removeObserver(observe, "http-on-modify-request");
   });
 
   AddonRepository._beginGetAddons(["test1@tests.mozilla.org"], {
-    searchFailed: function() {
+    searchFailed() {
       ok(gSeenRequest, "Should have seen metadata request");
       finish();
     }
   }, true);
 }
 
--- a/toolkit/mozapps/extensions/test/browser/browser_bug557956.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug557956.js
@@ -70,17 +70,17 @@ function install_test_addons(aCallback) 
   let installPromises = Promise.all(
     names.map(name => AddonManager.getInstallForURL(`${TESTROOT}addons/${name}.xpi`,
                                                     null, "application/x-xpinstall")));
 
   installPromises.then(installs => {
     var listener = {
       installCount: 0,
 
-      onInstallEnded: function() {
+      onInstallEnded() {
         this.installCount++;
         if (this.installCount == installs.length) {
           // Switch to the test update URL
           Services.prefs.setCharPref(PREF_UPDATEURL, TESTROOT + "browser_bug557956.rdf");
 
           executeSoon(aCallback);
         }
       }
--- a/toolkit/mozapps/extensions/test/browser/browser_bug562797.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug562797.js
@@ -7,31 +7,31 @@
  */
 
 const MAIN_URL = "https://example.com/" + RELATIVE_DIR + "discovery.html";
 const SECOND_URL = "https://example.com/" + RELATIVE_DIR + "releaseNotes.xhtml";
 
 var gLoadCompleteCallback = null;
 
 var gProgressListener = {
-  onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
     // Only care about the network stop status events
     if (!(aStateFlags & (Ci.nsIWebProgressListener.STATE_IS_NETWORK)) ||
         !(aStateFlags & (Ci.nsIWebProgressListener.STATE_STOP)))
       return;
 
     if (gLoadCompleteCallback)
       executeSoon(gLoadCompleteCallback);
     gLoadCompleteCallback = null;
   },
 
-  onLocationChange: function() { },
-  onSecurityChange: function() { },
-  onProgressChange: function() { },
-  onStatusChange: function() { },
+  onLocationChange() { },
+  onSecurityChange() { },
+  onProgressChange() { },
+  onStatusChange() { },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
                                          Ci.nsISupportsWeakReference]),
 };
 
 function waitForLoad(aManager, aCallback) {
   var browser = aManager.document.getElementById("discover-browser");
   browser.addProgressListener(gProgressListener);
--- a/toolkit/mozapps/extensions/test/browser/browser_bug562992.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug562992.js
@@ -44,17 +44,17 @@ add_test(function() {
   });
   gProvider.addInstall(gInstall);
 });
 
 // Finish the install, which will cause the "installing" item to be converted
 // to an "installed" item, which should have the correct add-on name.
 add_test(function() {
   gInstall.addTestListener({
-    onInstallEnded: function() {
+    onInstallEnded() {
       let list = gManagerWindow.document.getElementById("addon-list");
 
       // To help prevent future breakage, don't assume the item is the only one
       // in the list, or that it's first in the list.  Find it by name.
       for (let i = 0; i < list.itemCount; i++) {
         let item = list.getItemAtIndex(i);
         if (item.getAttribute("name") === EXTENSION_NAME) {
           ok(true, "Item with correct name found");
--- a/toolkit/mozapps/extensions/test/browser/browser_bug567127.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug567127.js
@@ -25,39 +25,39 @@ function WindowOpenListener(url, opencal
 
 WindowOpenListener.prototype = {
   url: null,
   opencallback: null,
   closecallback: null,
   window: null,
   domwindow: null,
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     is(this.domwindow.document.location.href, this.url, "Should have opened the correct window");
 
     this.domwindow.removeEventListener("load", this, false);
     // Allow any other load handlers to execute
     var self = this;
     executeSoon(function() { self.opencallback(self.domwindow); } );
   },
 
-  onWindowTitleChange: function(window, title) {
+  onWindowTitleChange(window, title) {
   },
 
-  onOpenWindow: function(window) {
+  onOpenWindow(window) {
     if (this.window)
       return;
 
     this.window = window;
     this.domwindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                            .getInterface(Components.interfaces.nsIDOMWindow);
     this.domwindow.addEventListener("load", this, false);
   },
 
-  onCloseWindow: function(window) {
+  onCloseWindow(window) {
     if (this.window != window)
       return;
 
     var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                        .getService(Components.interfaces.nsIWindowMediator);
     wm.removeListener(this);
     this.opencallback = null;
     this.window = null;
@@ -66,17 +66,17 @@ WindowOpenListener.prototype = {
     // Let the window close complete
     executeSoon(this.closecallback);
     this.closecallback = null;
   }
 };
 
 
 var gInstallNotificationObserver = {
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     var installInfo = aSubject.QueryInterface(Ci.amIWebInstallInfo);
     if (gTestInWindow)
       is(installInfo.browser, null, "Notification should have a null browser");
     else
       isnot(installInfo.browser, null, "Notification should have non-null browser");
     gSawInstallNotification = true;
     Services.obs.removeObserver(this, "addon-install-started");
   }
--- a/toolkit/mozapps/extensions/test/browser/browser_bug572561.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug572561.js
@@ -10,32 +10,32 @@ var gCategoryUtilities;
 var gProvider;
 var gInstallProperties = [{
   name: "Locale Category Test",
   type: "locale"
 }];
 var gInstall;
 var gExpectedCancel = false;
 var gTestInstallListener = {
-  onInstallStarted: function(aInstall) {
+  onInstallStarted(aInstall) {
     check_hidden(false);
   },
 
-  onInstallEnded: function(aInstall) {
+  onInstallEnded(aInstall) {
     check_hidden(false);
     run_next_test();
   },
 
-  onInstallCancelled: function(aInstall) {
+  onInstallCancelled(aInstall) {
     ok(gExpectedCancel, "Should expect install cancel");
     check_hidden(false);
     run_next_test();
   },
 
-  onInstallFailed: function(aInstall) {
+  onInstallFailed(aInstall) {
     ok(false, "Did not expect onInstallFailed");
     run_next_test();
   }
 };
 
 function test() {
   waitForExplicitFinish();
 
--- a/toolkit/mozapps/extensions/test/browser/browser_bug577990.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug577990.js
@@ -33,17 +33,17 @@ function test() {
 
 function end_test() {
   close_manager(gManagerWindow, finish);
 }
 
 function install_locale(aCallback) {
   gInstall = gProvider.createInstalls(gInstallProperties)[0];
   gInstall.addTestListener({
-    onInstallEnded: function(aInstall) {
+    onInstallEnded(aInstall) {
       gInstall.removeTestListener(this);
       executeSoon(aCallback);
     }
   });
   gInstall.install();
 }
 
 function check_hidden(aExpectedHidden) {
--- a/toolkit/mozapps/extensions/test/browser/browser_bug586574.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug586574.js
@@ -94,17 +94,17 @@ add_test(function() {
     is(gSetDefault.getAttribute("checked"), "true",
        "#1 Set Default menuitem should be checked");
     is_element_visible(gResetToAutomatic,
                        "#1 Reset to Automatic menuitem should be visible");
     is_element_hidden(gResetToManual,
                       "#1 Reset to Manual menuitem should be hidden");
 
     var listener = {
-      onPropertyChanged: function(aAddon, aProperties) {
+      onPropertyChanged(aAddon, aProperties) {
         AddonManager.removeAddonListener(listener);
         is(aAddon.id, gProvider.addons[0].id,
            "Should get onPropertyChanged event for correct addon");
         ok(!("applyBackgroundUpdates" in aProperties),
            "Should have gotten applyBackgroundUpdates in properties array");
         is(aAddon.applyBackgroundUpdates, AddonManager.AUTOUPDATE_DEFAULT,
            "Addon.applyBackgroundUpdates should have been reset to default");
 
@@ -213,17 +213,17 @@ add_test(function() {
     isnot(gSetDefault.getAttribute("checked"), "true",
           "#5 Set Default menuitem should not be checked");
     is_element_hidden(gResetToAutomatic,
                       "#5 Reset to automatic menuitem should be hidden");
     is_element_visible(gResetToManual,
                        "#5 Reset to manual menuitem should be visible");
 
     var listener = {
-      onPropertyChanged: function(aAddon, aProperties) {
+      onPropertyChanged(aAddon, aProperties) {
         AddonManager.removeAddonListener(listener);
         is(aAddon.id, gProvider.addons[0].id,
            "Should get onPropertyChanged event for correct addon");
         ok(!("applyBackgroundUpdates" in aProperties),
            "Should have gotten applyBackgroundUpdates in properties array");
         is(aAddon.applyBackgroundUpdates, AddonManager.AUTOUPDATE_DEFAULT,
            "Addon.applyBackgroundUpdates should have been reset to default");
 
--- a/toolkit/mozapps/extensions/test/browser/browser_bug587970.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug587970.js
@@ -127,21 +127,21 @@ add_test(function() {
 
   info("Checking Include Update checkbox for addon3");
   EventUtils.synthesizeMouse(item3._includeUpdate, 2, 2, { }, gManagerWindow);
   is(item3._includeUpdate.checked, true, "Include Update checkbox should now be be checked for addon3");
   is(updateSelected.disabled, false, "Update Selected button should now be enabled");
 
   var installCount = 0;
   var listener = {
-    onDownloadStarted: function(aInstall) {
+    onDownloadStarted(aInstall) {
       isnot(aInstall.existingAddon.id, "addon1@tests.mozilla.org", "Should not have seen a download start for addon1");
     },
 
-    onInstallEnded: function(aInstall) {
+    onInstallEnded(aInstall) {
       if (++installCount < 2)
         return;
 
       gProvider.installs[0].removeTestListener(listener);
       gProvider.installs[1].removeTestListener(listener);
       gProvider.installs[2].removeTestListener(listener);
 
       // Installs are started synchronously so by the time an executeSoon is
--- a/toolkit/mozapps/extensions/test/browser/browser_bug591663.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug591663.js
@@ -83,24 +83,24 @@ add_test(function() {
   gItem = gProvider.createInstalls([gInstallProperties])[0];
   check_list(null);
   run_next_test();
 });
 
 // Test that onInstallStarted properly hides empty notice and adds install to list
 add_test(function() {
   gItem.addTestListener({
-    onDownloadStarted: function() {
+    onDownloadStarted() {
       // Install type unknown until download complete
       check_list(null);
     },
-    onInstallStarted: function() {
+    onInstallStarted() {
       check_list(gItem);
     },
-    onInstallEnded: function() {
+    onInstallEnded() {
       check_list(gItem);
       run_next_test();
     }
   });
 
   gItem.install();
 });
 
@@ -122,23 +122,23 @@ add_test(function() {
 });
 
 // Test that add-ons of a different type do not show up in the list view
 add_test(function() {
   let extension = gProvider.createInstalls([gExtensionProperties])[0];
   check_list(null);
 
   extension.addTestListener({
-    onDownloadStarted: function() {
+    onDownloadStarted() {
       check_list(null);
     },
-    onInstallStarted: function() {
+    onInstallStarted() {
       check_list(null);
     },
-    onInstallEnded: function() {
+    onInstallEnded() {
       check_list(null);
       extension.cancel();
       run_next_test();
     }
   });
 
   extension.install();
 });
--- a/toolkit/mozapps/extensions/test/browser/browser_bug593535.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug593535.js
@@ -82,30 +82,30 @@ function getAnonymousElementByAttribute(
 
 
 
 // Tests that a failed install for a remote add-on will ask to retry the install
 add_test(function() {
   var remoteItem;
 
   var listener = {
-    onDownloadFailed: function(aInstall) {
+    onDownloadFailed(aInstall) {
       aInstall.removeListener(this);
       ok(true, "Install failed as expected");
 
       executeSoon(function() {
         is(remoteItem.getAttribute("notification"), "warning", "Item should have notification attribute set to 'warning'");
         is_element_visible(remoteItem._warning, "Warning text should be visible");
         is(remoteItem._warning.textContent, "There was an error downloading NOTFOUND.", "Warning should show correct message");
         is_element_visible(remoteItem._warningLink, "Retry button should be visible");
         run_next_test();
       });
     },
 
-    onInstallEnded: function() {
+    onInstallEnded() {
       ok(false, "Install should have failed");
     }
   }
 
   search(QUERY, function() {
     var list = gManagerWindow.document.getElementById("search-list");
     remoteItem = get_addon_item("notfound1");
     list.ensureElementIsVisible(remoteItem);
--- a/toolkit/mozapps/extensions/test/browser/browser_bug596336.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug596336.js
@@ -25,17 +25,17 @@ function get_class_node(parent, cls) {
   return parent.ownerDocument.getAnonymousElementByAttribute(parent, "class", cls);
 }
 
 function install_addon(aXpi) {
   return new Promise(resolve => {
     AddonManager.getInstallForURL(TESTROOT + "addons/" + aXpi + ".xpi",
                                   function(aInstall) {
       aInstall.addListener({
-        onInstallEnded: function(aInstall) {
+        onInstallEnded(aInstall) {
           resolve();
         }
       });
       aInstall.install();
     }, "application/x-xpinstall");
   });
 }
 
--- a/toolkit/mozapps/extensions/test/browser/browser_bug608316.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug608316.js
@@ -25,17 +25,17 @@ function test() {
 function end_test() {
   finish();
 }
 
 
 add_test(function() {
   var sawUninstall = false;
   var listener = {
-    onUninstalling: function(aAddon, aRestartRequired) {
+    onUninstalling(aAddon, aRestartRequired) {
       if (aAddon.id != "addon1@tests.mozilla.org")
         return;
       sawUninstall = true;
       aAddon.cancelUninstall();
     }
   }
 
   // Important to add this before opening the UI so it gets its events first
--- a/toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_cancelCompatCheck.js
@@ -74,17 +74,17 @@ function promise_install_test_addons(aAd
   let installPromises = Promise.all(
     aAddonList.map(addon => AddonManager.getInstallForURL(`${TESTROOT}addons/${addon.file}.xpi`,
                                                           null, "application/x-xpinstall")));
 
   installPromises.then(installs => {
     var listener = {
       installCount: 0,
 
-      onInstallEnded: function() {
+      onInstallEnded() {
         this.installCount++;
         if (this.installCount == installs.length) {
           info("Done add-on installs");
           // Switch to the test update URL
           Services.prefs.setCharPref(PREF_UPDATEURL, aUpdateURL);
           deferred.resolve();
         }
       }
@@ -108,17 +108,17 @@ function promise_addons_by_ids(aAddonIDs
 
 function* promise_uninstall_test_addons() {
   info("Starting add-on uninstalls");
   let addons = yield promise_addons_by_ids([ao1.id, ao2.id, ao3.id, ao4.id, ao5.id,
                                             ao6.id, ao7.id, ao8.id, ao9.id, ao10.id]);
   let deferred = Promise.defer();
   let uninstallCount = addons.length;
   let listener = {
-    onUninstalled: function(aAddon) {
+    onUninstalled(aAddon) {
       if (aAddon) {
         info("Finished uninstalling " + aAddon.id);
       }
       if (--uninstallCount == 0) {
         info("Done add-on uninstalls");
         AddonManager.removeAddonListener(listener);
         deferred.resolve();
       }
--- a/toolkit/mozapps/extensions/test/browser/browser_discovery.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_discovery.js
@@ -8,31 +8,31 @@ const MAIN_URL = "https://example.com/" 
 
 var gManagerWindow;
 var gCategoryUtilities;
 var gProvider;
 
 var gLoadCompleteCallback = null;
 
 var gProgressListener = {
-  onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
     // Only care about the network stop status events
     if (!(aStateFlags & (Ci.nsIWebProgressListener.STATE_IS_NETWORK)) ||
         !(aStateFlags & (Ci.nsIWebProgressListener.STATE_STOP)))
       return;
 
     if (gLoadCompleteCallback)
       executeSoon(gLoadCompleteCallback);
     gLoadCompleteCallback = null;
   },
 
-  onLocationChange: function() { },
-  onSecurityChange: function() { },
-  onProgressChange: function() { },
-  onStatusChange: function() { },
+  onLocationChange() { },
+  onSecurityChange() { },
+  onProgressChange() { },
+  onStatusChange() { },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
                                          Ci.nsISupportsWeakReference]),
 };
 
 function test() {
   // Switch to a known url
   Services.prefs.setCharPref(PREF_DISCOVERURL, MAIN_URL);
--- a/toolkit/mozapps/extensions/test/browser/browser_dragdrop.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_dragdrop.js
@@ -31,39 +31,39 @@ function WindowOpenListener(url, opencal
 
 WindowOpenListener.prototype = {
   url: null,
   opencallback: null,
   closecallback: null,
   window: null,
   domwindow: null,
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     is(this.domwindow.document.location.href, this.url, "Should have opened the correct window");
 
     this.domwindow.removeEventListener("load", this, false);
     // Allow any other load handlers to execute
     var self = this;
     executeSoon(function() { self.opencallback(self.domwindow); } );
   },
 
-  onWindowTitleChange: function(window, title) {
+  onWindowTitleChange(window, title) {
   },
 
-  onOpenWindow: function(window) {
+  onOpenWindow(window) {
     if (this.window)
       return;
 
     this.window = window;
     this.domwindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                            .getInterface(Components.interfaces.nsIDOMWindow);
     this.domwindow.addEventListener("load", this, false);
   },
 
-  onCloseWindow: function(window) {
+  onCloseWindow(window) {
     if (this.window != window)
       return;
 
     var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                        .getService(Components.interfaces.nsIWindowMediator);
     wm.removeListener(this);
     this.opencallback = null;
     this.window = null;
@@ -72,17 +72,17 @@ WindowOpenListener.prototype = {
     // Let the window close complete
     executeSoon(this.closecallback);
     this.closecallback = null;
   }
 };
 
 var gSawInstallNotification = false;
 var gInstallNotificationObserver = {
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     var installInfo = aSubject.QueryInterface(Ci.amIWebInstallInfo);
     if (gTestInWindow)
       is(installInfo.browser, null, "Notification should have a null browser");
     else
       isnot(installInfo.browser, null, "Notification should have non-null browser");
     gSawInstallNotification = true;
     Services.obs.removeObserver(this, "addon-install-started");
   }
--- a/toolkit/mozapps/extensions/test/browser/browser_eula.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_eula.js
@@ -45,17 +45,17 @@ function installSearchResult(aCallback) 
 
     let item = get_addon_element(gManagerWindow, "addon1@tests.mozilla.org");
     ok(!!item, "Should see the search result in the list");
 
     let status = get_node(item, "install-status");
     EventUtils.synthesizeMouseAtCenter(get_node(status, "install-remote-btn"), {}, gManagerWindow);
 
     item.mInstall.addListener({
-      onInstallEnded: function() {
+      onInstallEnded() {
         executeSoon(aCallback);
       }
     });
   });
 }
 
 // Install an add-on through the search page, accept the EULA and then undo it
 add_test(function() {
--- a/toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js
@@ -44,17 +44,17 @@ MockGMPInstallManager.prototype = {
     gInstalledAddonId = addon.id;
     gInstallDeferred.resolve();
     return Promise.resolve();
   },
 };
 
 var gOptionsObserver = {
   lastDisplayed: null,
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic == AddonManager.OPTIONS_NOTIFICATION_DISPLAYED) {
       this.lastDisplayed = aData;
     }
   }
 };
 
 function openDetailsView(aId) {
   let view = get_current_view(gManagerWindow);
--- a/toolkit/mozapps/extensions/test/browser/browser_inlinesettings.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_inlinesettings.js
@@ -12,32 +12,32 @@ var gProvider;
 const SETTINGS_ROWS = 9;
 
 var MockFilePicker = SpecialPowers.MockFilePicker;
 MockFilePicker.init(window);
 
 var observer = {
   lastDisplayed: null,
   callback: null,
-  checkDisplayed: function(aExpected) {
+  checkDisplayed(aExpected) {
     is(this.lastDisplayed, aExpected, "'addon-options-displayed' notification should have fired");
     this.lastDisplayed = null;
   },
-  checkNotDisplayed: function() {
+  checkNotDisplayed() {
     is(this.lastDisplayed, null, "'addon-options-displayed' notification should not have fired");
   },
   lastHidden: null,
-  checkHidden: function(aExpected) {
+  checkHidden(aExpected) {
     is(this.lastHidden, aExpected, "'addon-options-hidden' notification should have fired");
     this.lastHidden = null;
   },
-  checkNotHidden: function() {
+  checkNotHidden() {
     is(this.lastHidden, null, "'addon-options-hidden' notification should not have fired");
   },
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic == AddonManager.OPTIONS_NOTIFICATION_DISPLAYED) {
       this.lastDisplayed = aData;
       // Test if the binding has applied before the observers are notified. We test the second setting here,
       // because the code operates on the first setting and we want to check it applies to all.
       var setting = aSubject.querySelector("rows > setting[first-row] ~ setting");
       var input = gManagerWindow.document.getAnonymousElementByAttribute(setting, "class", "preferences-title");
       isnot(input, null, "XBL binding should be applied");
 
@@ -54,17 +54,17 @@ var observer = {
     }
   }
 };
 
 function installAddon(aCallback) {
   AddonManager.getInstallForURL(TESTROOT + "addons/browser_inlinesettings1.xpi",
                                 function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function() {
+      onInstallEnded() {
         executeSoon(aCallback);
       }
     });
     aInstall.install();
   }, "application/x-xpinstall");
 }
 
 function checkScrolling(aShouldHaveScrolled) {
--- a/toolkit/mozapps/extensions/test/browser/browser_inlinesettings_custom.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_inlinesettings_custom.js
@@ -6,17 +6,17 @@
 
 var gManagerWindow;
 var gCategoryUtilities;
 
 function installAddon(aCallback) {
   AddonManager.getInstallForURL(TESTROOT + "addons/browser_inlinesettings1_custom.xpi",
                                 function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function() {
+      onInstallEnded() {
         executeSoon(aCallback);
       }
     });
     aInstall.install();
   }, "application/x-xpinstall");
 }
 
 function test() {
--- a/toolkit/mozapps/extensions/test/browser/browser_inlinesettings_info.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_inlinesettings_info.js
@@ -12,32 +12,32 @@ var gProvider;
 const SETTINGS_ROWS = 8;
 
 var MockFilePicker = SpecialPowers.MockFilePicker;
 MockFilePicker.init(window);
 
 var observer = {
   lastDisplayed: null,
   callback: null,
-  checkDisplayed: function(aExpected) {
+  checkDisplayed(aExpected) {
     is(this.lastDisplayed, aExpected, "'addon-options-displayed' notification should have fired");
     this.lastDisplayed = null;
   },
-  checkNotDisplayed: function() {
+  checkNotDisplayed() {
     is(this.lastDisplayed, null, "'addon-options-displayed' notification should not have fired");
   },
   lastHidden: null,
-  checkHidden: function(aExpected) {
+  checkHidden(aExpected) {
     is(this.lastHidden, aExpected, "'addon-options-hidden' notification should have fired");
     this.lastHidden = null;
   },
-  checkNotHidden: function() {
+  checkNotHidden() {
     is(this.lastHidden, null, "'addon-options-hidden' notification should not have fired");
   },
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic == AddonManager.OPTIONS_NOTIFICATION_DISPLAYED) {
       this.lastDisplayed = aData;
       // Test if the binding has applied before the observers are notified. We test the second setting here,
       // because the code operates on the first setting and we want to check it applies to all.
       var setting = aSubject.querySelector("rows > setting[first-row] ~ setting");
       var input = gManagerWindow.document.getAnonymousElementByAttribute(setting, "class", "preferences-title");
       isnot(input, null, "XBL binding should be applied");
 
@@ -54,17 +54,17 @@ var observer = {
     }
   }
 };
 
 function installAddon(aCallback) {
   AddonManager.getInstallForURL(TESTROOT + "addons/browser_inlinesettings1_info.xpi",
                                 function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function() {
+      onInstallEnded() {
         executeSoon(aCallback);
       }
     });
     aInstall.install();
   }, "application/x-xpinstall");
 }
 
 function checkScrolling(aShouldHaveScrolled) {
--- a/toolkit/mozapps/extensions/test/browser/browser_install.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_install.js
@@ -41,49 +41,49 @@ function end_test() {
 function get_node(parent, anonid) {
   return parent.ownerDocument.getAnonymousElementByAttribute(parent, "anonid", anonid);
 }
 
 function installAddon(aCallback) {
   AddonManager.getInstallForURL(TESTROOT + "addons/browser_install1_2.xpi",
                                 function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function() {
+      onInstallEnded() {
         executeSoon(aCallback);
       }
     });
     aInstall.install();
   }, "application/x-xpinstall");
 }
 
 function installUpgrade(aCallback) {
   AddonManager.getAddonByID("install1@tests.mozilla.org", function(aAddon) {
     aAddon.findUpdates({
-      onUpdateAvailable: function(aAddon, aInstall) {
+      onUpdateAvailable(aAddon, aInstall) {
         is(get_list_item_count(), 1, "Should be only one item in the list");
 
         aInstall.addListener({
-          onDownloadEnded: function() {
+          onDownloadEnded() {
             is(get_list_item_count(), 1, "Should be only one item in the list once the update has started");
           },
-          onInstallEnded: function() {
+          onInstallEnded() {
             executeSoon(aCallback);
           }
         });
         aInstall.install();
       }
     }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
   });
 }
 
 function cancelInstall(aCallback) {
   AddonManager.getInstallForURL(TESTROOT + "addons/browser_install1_2.xpi",
                                 function(aInstall) {
     aInstall.addListener({
-      onDownloadEnded: function(aInstall) {
+      onDownloadEnded(aInstall) {
         executeSoon(function() {
           aInstall.cancel();
           aCallback();
         });
         return false;
       }
     });
     aInstall.install();
@@ -105,17 +105,17 @@ function installSearchResult(aCallback) 
 
     let item = get_addon_element(gManagerWindow, "install1@tests.mozilla.org");
     ok(!!item, "Should see the search result in the list");
 
     let status = get_node(item, "install-status");
     EventUtils.synthesizeMouseAtCenter(get_node(status, "install-remote-btn"), {}, gManagerWindow);
 
     item.mInstall.addListener({
-      onInstallEnded: function() {
+      onInstallEnded() {
         executeSoon(aCallback);
       }
     });
   });
 }
 
 function get_list_item_count() {
   return get_test_items_in_list(gManagerWindow).length;
--- a/toolkit/mozapps/extensions/test/browser/browser_installssl.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_installssl.js
@@ -81,27 +81,27 @@ function run_install_tests(callback) {
       url = mainURL + xpi;
       message = "Should have seen the right result for an install from " +
                 mainURL;
     }
 
     AddonManager.getInstallForURL(url, function(install) {
       gPendingInstall = install;
       install.addListener({
-        onDownloadEnded: function(install) {
+        onDownloadEnded(install) {
           is(SUCCESS, expectedStatus, message);
           info("Install test ran in " + (Date.now() - gLast) + "ms");
           // Don't proceed with the install
           install.cancel();
           gPendingInstall = null;
           run_next_install_test();
           return false;
         },
 
-        onDownloadFailed: function(install) {
+        onDownloadFailed(install) {
           is(install.error, expectedStatus, message);
           info("Install test ran in " + (Date.now() - gLast) + "ms");
           gPendingInstall = null;
           run_next_install_test();
         }
       });
       install.install();
     }, "application/x-xpinstall");
--- a/toolkit/mozapps/extensions/test/browser/browser_manualupdates.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_manualupdates.js
@@ -173,21 +173,21 @@ add_test(function() {
 
   var list = gManagerWindow.document.getElementById("updates-list");
   var item = list.firstChild;
   var updateBtn = item._updateBtn;
   is_element_visible(updateBtn, "Update button should be visible");
 
   var install = gProvider.installs[0];
   var listener = {
-    onInstallStarted: function() {
+    onInstallStarted() {
       info("Install started");
       is_element_visible(item._installStatus, "Install progress widget should be visible");
     },
-    onInstallEnded: function() {
+    onInstallEnded() {
       install.removeTestListener(this);
       info("Install ended");
       is_element_hidden(item._installStatus, "Install progress widget should be hidden");
 
       if (badgeUpdated)
         run_next_test();
       else
         installCompleted = true;
--- a/toolkit/mozapps/extensions/test/browser/browser_searching.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_searching.js
@@ -165,32 +165,32 @@ function get_actual_results() {
     // Only consider items that are currently showing
     var style = gManagerWindow.document.defaultView.getComputedStyle(item, "");
     if (style.display == "none" || style.visibility != "visible")
       continue;
 
     if (item.mInstall || item.isPending("install")) {
       var sourceURI = item.mInstall.sourceURI.spec;
       if (sourceURI == REMOTE_INSTALL_URL) {
-        results.push({name: REMOTE_TO_INSTALL, item: item});
+        results.push({name: REMOTE_TO_INSTALL, item});
         continue;
       }
 
       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: item});
+        results.push({name: result[1], item});
         continue;
       }
     }
     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: item});
+        results.push({name: result[1], item});
         continue;
       }
     }
     else {
       ok(false, "Found an item in the list that was neither installing or installed");
     }
   }
 
@@ -475,17 +475,17 @@ add_test(function() {
     // Simulate clicking on a specific sorter
     var buttonId = buttonIds[currentIndex];
     var sorter = getAnonymousElementByAttribute(sorters, "anonid", buttonId);
     is_element_visible(sorter);
     EventUtils.synthesizeMouseAtCenter(sorter, { }, gManagerWindow);
   }
 
   sorters.handler = {
-    onSortChanged: function(aSortBy, aAscending) {
+    onSortChanged(aSortBy, aAscending) {
       if (originalHandler && "onSortChanged" in originalHandler)
         originalHandler.onSortChanged(aSortBy, aAscending);
 
       check_filtered_results(QUERY, sorterNames[currentIndex], currentReversed);
 
       if (currentReversed)
         currentIndex++;
       currentReversed = !currentReversed;
@@ -532,17 +532,17 @@ add_test(function() {
   });
 });
 
 // Tests that installing a remote add-on works
 add_test(function() {
   var installBtn = null;
 
   var listener = {
-    onInstallEnded: function(aInstall, aAddon) {
+    onInstallEnded(aInstall, aAddon) {
       // Don't immediately consider the installed add-on as local because
       // if the user was filtering out local add-ons, the installed add-on
       // would vanish. Only consider add-on as local on new searches.
 
       aInstall.removeListener(this);
 
       is(installBtn.hidden, true, "Install button should be hidden after install ended");
       check_filtered_results(QUERY, "relevancescore", false);
--- a/toolkit/mozapps/extensions/test/browser/browser_updatessl.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_updatessl.js
@@ -20,17 +20,17 @@ const EXPIRED = "https://expired.example
 
 const PREF_UPDATE_REQUIREBUILTINCERTS = "extensions.update.requireBuiltInCerts";
 
 var gTests = [];
 var gStart = 0;
 var gLast = 0;
 
 var HTTPObserver = {
-  observeActivity: function(aChannel, aType, aSubtype, aTimestamp, aSizeData,
+  observeActivity(aChannel, aType, aSubtype, aTimestamp, aSizeData,
                             aStringData) {
     aChannel.QueryInterface(Ci.nsIChannel);
 
     dump("*** HTTP Activity 0x" + aType.toString(16) + " 0x" + aSubtype.toString(16) +
          " " + aChannel.URI.spec + "\n");
   }
 };
 
@@ -85,24 +85,24 @@ function run_update_tests(callback) {
     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: function(updates) {
+      onUpdateCheckComplete(updates) {
         is(updates.length, 1, "Should be the right number of results");
         is(SUCCESS, expectedStatus, message);
         info("Update test ran in " + (Date.now() - gLast) + "ms");
         run_next_update_test();
       },
 
-      onUpdateCheckError: function(status) {
+      onUpdateCheckError(status) {
         is(status, expectedStatus, message);
         info("Update test ran in " + (Date.now() - gLast) + "ms");
         run_next_update_test();
       }
     });
   }
 
   run_next_update_test();
--- a/toolkit/mozapps/extensions/test/browser/browser_webapi_install.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_webapi_install.js
@@ -5,17 +5,17 @@ const XPI_SHA = "sha256:d4bab17ff9ba5f63
 const ID = "webapi_install@tests.mozilla.org";
 // eh, would be good to just stat the real file instead of this...
 const XPI_LEN = 4782;
 
 function waitForClear() {
   const MSG = "WebAPICleanup";
   return new Promise(resolve => {
     let listener = {
-      receiveMessage: function(msg) {
+      receiveMessage(msg) {
         if (msg.name == MSG) {
           Services.mm.removeMessageListener(MSG, listener);
           resolve();
         }
       }
     };
 
     Services.mm.addMessageListener(MSG, listener, true);
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -472,33 +472,33 @@ function restart_manager(aManagerWindow,
   }
 
   return close_manager(aManagerWindow)
     .then(() => open_manager(aView, aCallback, aLoadCallback));
 }
 
 function wait_for_window_open(aCallback) {
   Services.wm.addListener({
-    onOpenWindow: function(aWindow) {
+    onOpenWindow(aWindow) {
       Services.wm.removeListener(this);
 
       let domwindow = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIDOMWindow);
       domwindow.addEventListener("load", function() {
         domwindow.removeEventListener("load", arguments.callee, false);
         executeSoon(function() {
           aCallback(domwindow);
         });
       }, false);
     },
 
-    onCloseWindow: function(aWindow) {
+    onCloseWindow(aWindow) {
     },
 
-    onWindowTitleChange: function(aWindow, aTitle) {
+    onWindowTitleChange(aWindow, aTitle) {
     }
   });
 }
 
 function get_string(aName, ...aArgs) {
   var bundle = Services.strings.createBundle("chrome://mozapps/locale/extensions/extensions.properties");
   if (aArgs.length == 0)
     return bundle.GetStringFromName(aName);
@@ -583,17 +583,17 @@ CategoryUtilities.prototype = {
   get selectedCategory() {
     isnot(this.window, null, "Should not get selected category when manager window is not loaded");
     var selectedItem = this.window.document.getElementById("categories").selectedItem;
     isnot(selectedItem, null, "A category should be selected");
     var view = this.window.gViewController.parseViewId(selectedItem.value);
     return (view.type == "list") ? view.param : view.type;
   },
 
-  get: function(aCategoryType, aAllowMissing) {
+  get(aCategoryType, aAllowMissing) {
     isnot(this.window, null, "Should not get category when manager window is not loaded");
     var categories = this.window.document.getElementById("categories");
 
     var viewId = "addons://list/" + aCategoryType;
     var items = categories.getElementsByAttribute("value", viewId);
     if (items.length)
       return items[0];
 
@@ -602,73 +602,73 @@ CategoryUtilities.prototype = {
     if (items.length)
       return items[0];
 
     if (!aAllowMissing)
       ok(false, "Should have found a category with type " + aCategoryType);
     return null;
   },
 
-  getViewId: function(aCategoryType) {
+  getViewId(aCategoryType) {
     isnot(this.window, null, "Should not get view id when manager window is not loaded");
     return this.get(aCategoryType).value;
   },
 
-  isVisible: function(aCategory) {
+  isVisible(aCategory) {
     isnot(this.window, null, "Should not check visible state when manager window is not loaded");
     if (aCategory.hasAttribute("disabled") &&
         aCategory.getAttribute("disabled") == "true")
       return false;
 
     return !is_hidden(aCategory);
   },
 
-  isTypeVisible: function(aCategoryType) {
+  isTypeVisible(aCategoryType) {
     return this.isVisible(this.get(aCategoryType));
   },
 
-  open: function(aCategory, aCallback) {
+  open(aCategory, aCallback) {
 
     isnot(this.window, null, "Should not open category when manager window is not loaded");
     ok(this.isVisible(aCategory), "Category should be visible if attempting to open it");
 
     EventUtils.synthesizeMouse(aCategory, 2, 2, { }, this.window);
     let p = new Promise((resolve, reject) => wait_for_view_load(this.window, resolve));
 
     return log_callback(p, aCallback);
   },
 
-  openType: function(aCategoryType, aCallback) {
+  openType(aCategoryType, aCallback) {
     return this.open(this.get(aCategoryType), aCallback);
   }
 }
 
 function CertOverrideListener(host, bits) {
   this.host = host;
   this.bits = bits;
 }
 
 CertOverrideListener.prototype = {
   host: null,
   bits: null,
 
-  getInterface: function(aIID) {
+  getInterface(aIID) {
     return this.QueryInterface(aIID);
   },
 
-  QueryInterface: function(aIID) {
+  QueryInterface(aIID) {
     if (aIID.equals(Ci.nsIBadCertListener2) ||
         aIID.equals(Ci.nsIInterfaceRequestor) ||
         aIID.equals(Ci.nsISupports))
       return this;
 
     throw Components.Exception("No interface", Components.results.NS_ERROR_NO_INTERFACE);
   },
 
-  notifyCertProblem: function(socketInfo, sslStatus, targetHost) {
+  notifyCertProblem(socketInfo, sslStatus, targetHost) {
     var cert = sslStatus.QueryInterface(Components.interfaces.nsISSLStatus)
                         .serverCert;
     var cos = Cc["@mozilla.org/security/certoverride;1"].
               getService(Ci.nsICertOverrideService);
     cos.rememberValidityOverride(this.host, -1, cert, this.bits, false);
     return true;
   }
 }
@@ -1218,54 +1218,54 @@ MockAddon.prototype = {
         val != AddonManager.AUTOUPDATE_DISABLE &&
         val != AddonManager.AUTOUPDATE_ENABLE) {
       ok(false, "addon.applyBackgroundUpdates set to an invalid value: " + val);
     }
     this._applyBackgroundUpdates = val;
     AddonManagerPrivate.callAddonListeners("onPropertyChanged", this, ["applyBackgroundUpdates"]);
   },
 
-  isCompatibleWith: function(aAppVersion, aPlatformVersion) {
+  isCompatibleWith(aAppVersion, aPlatformVersion) {
     return true;
   },
 
-  findUpdates: function(aListener, aReason, aAppVersion, aPlatformVersion) {
+  findUpdates(aListener, aReason, aAppVersion, aPlatformVersion) {
     // Tests can implement this if they need to
   },
 
-  uninstall: function(aAlwaysAllowUndo = false) {
+  uninstall(aAlwaysAllowUndo = false) {
     if ((this.operationsRequiringRestart & AddonManager.OP_NEED_RESTART_UNINSTALL)
         && this.pendingOperations & AddonManager.PENDING_UNINSTALL)
       throw Components.Exception("Add-on is already pending uninstall");
 
     var needsRestart = aAlwaysAllowUndo || !!(this.operationsRequiringRestart & AddonManager.OP_NEEDS_RESTART_UNINSTALL);
     this.pendingOperations |= AddonManager.PENDING_UNINSTALL;
     AddonManagerPrivate.callAddonListeners("onUninstalling", this, needsRestart);
     if (!needsRestart) {
       this.pendingOperations -= AddonManager.PENDING_UNINSTALL;
       this._provider.removeAddon(this);
     } else if (!(this.operationsRequiringRestart & AddonManager.OP_NEEDS_RESTART_DISABLE)) {
       this.isActive = false;
     }
   },
 
-  cancelUninstall: function() {
+  cancelUninstall() {
     if (!(this.pendingOperations & AddonManager.PENDING_UNINSTALL))
       throw Components.Exception("Add-on is not pending uninstall");
 
     this.pendingOperations -= AddonManager.PENDING_UNINSTALL;
     this.isActive = this.shouldBeActive;
     AddonManagerPrivate.callAddonListeners("onOperationCancelled", this);
   },
 
-  markAsSeen: function() {
+  markAsSeen() {
     this.seen = true;
   },
 
-  _updateActiveState: function(currentActive, newActive) {
+  _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) {
@@ -1315,17 +1315,17 @@ function MockInstall(aName, aType, aAddo
   this.listeners = [];
 
   // Another type of install listener for tests that want to check the results
   // of code run from standard install listeners
   this.testListeners = [];
 }
 
 MockInstall.prototype = {
-  install: function() {
+  install() {
     switch (this.state) {
       case AddonManager.STATE_AVAILABLE:
         this.state = AddonManager.STATE_DOWNLOADING;
         if (!this.callListeners("onDownloadStarted")) {
           this.state = AddonManager.STATE_CANCELLED;
           this.callListeners("onDownloadCancelled");
           return;
         }
@@ -1373,52 +1373,52 @@ MockInstall.prototype = {
       case AddonManager.STATE_INSTALLING:
         // Installation is already running
         return;
       default:
         ok(false, "Cannot start installing when state = " + this.state);
     }
   },
 
-  cancel: function() {
+  cancel() {
     switch (this.state) {
       case AddonManager.STATE_AVAILABLE:
         this.state = AddonManager.STATE_CANCELLED;
         break;
       case AddonManager.STATE_INSTALLED:
         this.state = AddonManager.STATE_CANCELLED;
         this._provider.removeInstall(this);
         this.callListeners("onInstallCancelled");
         break;
       default:
         // Handling cancelling when downloading to be implemented when needed
         ok(false, "Cannot cancel when state = " + this.state);
     }
   },
 
 
-  addListener: function(aListener) {
+  addListener(aListener) {
     if (!this.listeners.some(i => i == aListener))
       this.listeners.push(aListener);
   },
 
-  removeListener: function(aListener) {
+  removeListener(aListener) {
     this.listeners = this.listeners.filter(i => i != aListener);
   },
 
-  addTestListener: function(aListener) {
+  addTestListener(aListener) {
     if (!this.testListeners.some(i => i == aListener))
       this.testListeners.push(aListener);
   },
 
-  removeTestListener: function(aListener) {
+  removeTestListener(aListener) {
     this.testListeners = this.testListeners.filter(i => i != aListener);
   },
 
-  callListeners: function(aMethod) {
+  callListeners(aMethod) {
     var result = AddonManagerPrivate.callInstallListeners(aMethod, this.listeners,
                                                           this, this.addon);
 
     // 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)
--- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
@@ -802,183 +802,183 @@ function getExpectedInstall(aAddon) {
   if (!(id in gExpectedInstalls) || !(gExpectedInstalls[id] instanceof Array))
     do_throw("Wasn't expecting events for " + id);
   if (gExpectedInstalls[id].length == 0)
     do_throw("Too many events for " + id);
   return gExpectedInstalls[id].shift();
 }
 
 const AddonListener = {
-  onPropertyChanged: function(aAddon, aProperties) {
+  onPropertyChanged(aAddon, aProperties) {
     do_print(`Got onPropertyChanged event for ${aAddon.id}`);
     let [event, properties] = getExpectedEvent(aAddon.id);
     do_check_eq("onPropertyChanged", event);
     do_check_eq(aProperties.length, properties.length);
     properties.forEach(function(aProperty) {
       // Only test that the expected properties are listed, having additional
       // properties listed is not necessary a problem
       if (aProperties.indexOf(aProperty) == -1)
         do_throw("Did not see property change for " + aProperty);
     });
     return check_test_completed(arguments);
   },
 
-  onEnabling: function(aAddon, aRequiresRestart) {
+  onEnabling(aAddon, aRequiresRestart) {
     do_print(`Got onEnabling event for ${aAddon.id}`);
     let [event, expectedRestart] = getExpectedEvent(aAddon.id);
     do_check_eq("onEnabling", event);
     do_check_eq(aRequiresRestart, expectedRestart);
     if (expectedRestart)
       do_check_true(hasFlag(aAddon.pendingOperations, AddonManager.PENDING_ENABLE));
     do_check_false(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_ENABLE));
     return check_test_completed(arguments);
   },
 
-  onEnabled: function(aAddon) {
+  onEnabled(aAddon) {
     do_print(`Got onEnabled event for ${aAddon.id}`);
     let [event] = getExpectedEvent(aAddon.id);
     do_check_eq("onEnabled", event);
     do_check_false(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_ENABLE));
     return check_test_completed(arguments);
   },
 
-  onDisabling: function(aAddon, aRequiresRestart) {
+  onDisabling(aAddon, aRequiresRestart) {
     do_print(`Got onDisabling event for ${aAddon.id}`);
     let [event, expectedRestart] = getExpectedEvent(aAddon.id);
     do_check_eq("onDisabling", event);
     do_check_eq(aRequiresRestart, expectedRestart);
     if (expectedRestart)
       do_check_true(hasFlag(aAddon.pendingOperations, AddonManager.PENDING_DISABLE));
     do_check_false(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_DISABLE));
     return check_test_completed(arguments);
   },
 
-  onDisabled: function(aAddon) {
+  onDisabled(aAddon) {
     do_print(`Got onDisabled event for ${aAddon.id}`);
     let [event] = getExpectedEvent(aAddon.id);
     do_check_eq("onDisabled", event);
     do_check_false(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_DISABLE));
     return check_test_completed(arguments);
   },
 
-  onInstalling: function(aAddon, aRequiresRestart) {
+  onInstalling(aAddon, aRequiresRestart) {
     do_print(`Got onInstalling event for ${aAddon.id}`);
     let [event, expectedRestart] = getExpectedEvent(aAddon.id);
     do_check_eq("onInstalling", event);
     do_check_eq(aRequiresRestart, expectedRestart);
     if (expectedRestart)
       do_check_true(hasFlag(aAddon.pendingOperations, AddonManager.PENDING_INSTALL));
     return check_test_completed(arguments);
   },
 
-  onInstalled: function(aAddon) {
+  onInstalled(aAddon) {
     do_print(`Got onInstalled event for ${aAddon.id}`);
     let [event] = getExpectedEvent(aAddon.id);
     do_check_eq("onInstalled", event);
     return check_test_completed(arguments);
   },
 
-  onUninstalling: function(aAddon, aRequiresRestart) {
+  onUninstalling(aAddon, aRequiresRestart) {
     do_print(`Got onUninstalling event for ${aAddon.id}`);
     let [event, expectedRestart] = getExpectedEvent(aAddon.id);
     do_check_eq("onUninstalling", event);
     do_check_eq(aRequiresRestart, expectedRestart);
     if (expectedRestart)
       do_check_true(hasFlag(aAddon.pendingOperations, AddonManager.PENDING_UNINSTALL));
     return check_test_completed(arguments);
   },
 
-  onUninstalled: function(aAddon) {
+  onUninstalled(aAddon) {
     do_print(`Got onUninstalled event for ${aAddon.id}`);
     let [event] = getExpectedEvent(aAddon.id);
     do_check_eq("onUninstalled", event);
     return check_test_completed(arguments);
   },
 
-  onOperationCancelled: function(aAddon) {
+  onOperationCancelled(aAddon) {
     do_print(`Got onOperationCancelled event for ${aAddon.id}`);
     let [event] = getExpectedEvent(aAddon.id);
     do_check_eq("onOperationCancelled", event);
     return check_test_completed(arguments);
   }
 };
 
 const InstallListener = {
-  onNewInstall: function(install) {
+  onNewInstall(install) {
     if (install.state != AddonManager.STATE_DOWNLOADED &&
         install.state != AddonManager.STATE_DOWNLOAD_FAILED &&
         install.state != AddonManager.STATE_AVAILABLE)
       do_throw("Bad install state " + install.state);
     if (install.state != AddonManager.STATE_DOWNLOAD_FAILED)
       do_check_eq(install.error, 0);
     else
       do_check_neq(install.error, 0);
     do_check_eq("onNewInstall", getExpectedInstall());
     return check_test_completed(arguments);
   },
 
-  onDownloadStarted: function(install) {
+  onDownloadStarted(install) {
     do_check_eq(install.state, AddonManager.STATE_DOWNLOADING);
     do_check_eq(install.error, 0);
     do_check_eq("onDownloadStarted", getExpectedInstall());
     return check_test_completed(arguments);
   },
 
-  onDownloadEnded: function(install) {
+  onDownloadEnded(install) {
     do_check_eq(install.state, AddonManager.STATE_DOWNLOADED);
     do_check_eq(install.error, 0);
     do_check_eq("onDownloadEnded", getExpectedInstall());
     return check_test_completed(arguments);
   },
 
-  onDownloadFailed: function(install) {
+  onDownloadFailed(install) {
     do_check_eq(install.state, AddonManager.STATE_DOWNLOAD_FAILED);
     do_check_eq("onDownloadFailed", getExpectedInstall());
     return check_test_completed(arguments);
   },
 
-  onDownloadCancelled: function(install) {
+  onDownloadCancelled(install) {
     do_check_eq(install.state, AddonManager.STATE_CANCELLED);
     do_check_eq(install.error, 0);
     do_check_eq("onDownloadCancelled", getExpectedInstall());
     return check_test_completed(arguments);
   },
 
-  onInstallStarted: function(install) {
+  onInstallStarted(install) {
     do_check_eq(install.state, AddonManager.STATE_INSTALLING);
     do_check_eq(install.error, 0);
     do_check_eq("onInstallStarted", getExpectedInstall(install.addon));
     return check_test_completed(arguments);
   },
 
-  onInstallEnded: function(install, newAddon) {
+  onInstallEnded(install, newAddon) {
     do_check_eq(install.state, AddonManager.STATE_INSTALLED);
     do_check_eq(install.error, 0);
     do_check_eq("onInstallEnded", getExpectedInstall(install.addon));
     return check_test_completed(arguments);
   },
 
-  onInstallFailed: function(install) {
+  onInstallFailed(install) {
     do_check_eq(install.state, AddonManager.STATE_INSTALL_FAILED);
     do_check_eq("onInstallFailed", getExpectedInstall(install.addon));
     return check_test_completed(arguments);
   },
 
-  onInstallCancelled: function(install) {
+  onInstallCancelled(install) {
     // If the install was cancelled by a listener returning false from
     // onInstallStarted, then the state will revert to STATE_DOWNLOADED.
     let possibleStates = [AddonManager.STATE_CANCELLED,
                           AddonManager.STATE_DOWNLOADED];
     do_check_true(possibleStates.indexOf(install.state) != -1);
     do_check_eq(install.error, 0);
     do_check_eq("onInstallCancelled", getExpectedInstall(install.addon));
     return check_test_completed(arguments);
   },
 
-  onExternalInstall: function(aAddon, existingAddon, aRequiresRestart) {
+  onExternalInstall(aAddon, existingAddon, aRequiresRestart) {
     do_check_eq("onExternalInstall", getExpectedInstall(aAddon));
     do_check_false(aRequiresRestart);
     return check_test_completed(arguments);
   }
 };
 
 function hasFlag(aBits, aFlag) {
   return (aBits & aFlag) != 0;
--- a/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository.js
@@ -313,35 +313,35 @@ function check_results(aActualAddons, aE
     if (aActualAddon.install)
       do_check_eq(aActualAddon.install.sourceURI.spec, aActualAddon.sourceURI.spec);
   });
 }
 
 // Complete a search, also testing cancelSearch() and isSearching
 function complete_search(aSearch, aSearchCallback) {
   var failCallback = {
-    searchSucceeded: function(addons, length, total) {
+    searchSucceeded(addons, length, total) {
       do_throw("failCallback.searchSucceeded should not be called");
       end_test();
     },
 
-    searchFailed: function() {
+    searchFailed() {
       do_throw("failCallback.searchFailed should not be called");
       end_test();
     }
   };
 
   var callbackCalled = false;
   var testCallback = {
-    searchSucceeded: function(addons, length, total) {
+    searchSucceeded(addons, length, total) {
       do_throw("testCallback.searchSucceeded should not be called");
       end_test();
     },
 
-    searchFailed: function() {
+    searchFailed() {
       callbackCalled = true;
     }
   };
 
   // Should fail because cancelled it immediately
   aSearch(failCallback);
   do_check_true(AddonRepository.isSearching);
   AddonRepository.cancelSearch();
@@ -461,22 +461,22 @@ function run_test_1() {
     preferenceValue:  BASE_URL + "/%TERMS%",
     expectedURL:      BASE_URL + "/odd%3Dsearch%3Awith%26weird%22characters"
   }];
 
   // Setup tests for homepageURL, getRecommendedURL() and getSearchURL()
   var tests = [{
     initiallyUndefined: true,
     preference:         PREF_GETADDONS_BROWSEADDONS,
-    urlTests:           urlTests,
+    urlTests,
     getURL:             () => AddonRepository.homepageURL
   }, {
     initiallyUndefined: true,
     preference:         PREF_GETADDONS_BROWSERECOMMENDED,
-    urlTests:           urlTests,
+    urlTests,
     getURL:             () => AddonRepository.getRecommendedURL()
   }, {
     initiallyUndefined: false,
     preference:         PREF_GETADDONS_BROWSESEARCHRESULTS,
     urlTests:           urlTests.concat(searchURLTests),
     getURL:             function getSearchURL(aTest) {
                           var searchTerms = aTest && aTest.searchTerms ? aTest.searchTerms
                                                                        : "unused terms";
@@ -497,124 +497,124 @@ function run_test_1() {
 
   run_test_getAddonsByID_fails();
 }
 
 // Tests failure of AddonRepository.getAddonsByIDs()
 function run_test_getAddonsByID_fails() {
   Services.prefs.setCharPref(GET_TEST.preference, GET_TEST.preferenceValue);
   var callback = {
-    searchSucceeded: function(aAddonsList, aAddonCount, aTotalResults) {
+    searchSucceeded(aAddonsList, aAddonCount, aTotalResults) {
       do_throw("searchAddons should not have succeeded");
       end_test();
     },
 
-    searchFailed: function() {
+    searchFailed() {
       do_check_false(AddonRepository.isSearching);
       run_test_getAddonsByID_succeeds();
     }
   };
 
   complete_search(function complete_search_fail_callback(aCallback) {
     AddonRepository.getAddonsByIDs(GET_TEST.failedIDs, aCallback);
   }, callback);
 }
 
 // Tests success of AddonRepository.getAddonsByIDs()
 function run_test_getAddonsByID_succeeds() {
   var callback = {
-    searchSucceeded: function(aAddonsList, aAddonCount, aTotalResults) {
+    searchSucceeded(aAddonsList, aAddonCount, aTotalResults) {
       do_check_eq(aTotalResults, -1);
       check_results(aAddonsList, GET_RESULTS, aAddonCount, true);
       run_test_retrieveRecommended_fails();
     },
 
-    searchFailed: function() {
+    searchFailed() {
       do_throw("searchAddons should not have failed");
       end_test();
     }
   };
 
   complete_search(function complete_search_succeed_callback(aCallback) {
     AddonRepository.getAddonsByIDs(GET_TEST.successfulIDs, aCallback);
   }, callback);
 }
 
 // Tests failure of AddonRepository.retrieveRecommendedAddons()
 function run_test_retrieveRecommended_fails() {
   Services.prefs.setCharPref(RECOMMENDED_TEST.preference,
                              RECOMMENDED_TEST.preferenceValue);
   var callback = {
-    searchSucceeded: function(aAddonsList, aAddonCount, aTotalResults) {
+    searchSucceeded(aAddonsList, aAddonCount, aTotalResults) {
       do_throw("retrieveRecommendedAddons should not have succeeded");
       end_test();
     },
 
-    searchFailed: function() {
+    searchFailed() {
       do_check_false(AddonRepository.isSearching);
       run_test_retrieveRecommended_succeed();
     }
   };
 
   complete_search(function retrieveRecommended_failing_callback(aCallback) {
     AddonRepository.retrieveRecommendedAddons(FAILED_MAX_RESULTS, aCallback);
   }, callback);
 }
 
 // Tests success of AddonRepository.retrieveRecommendedAddons()
 function run_test_retrieveRecommended_succeed() {
   var callback = {
-    searchSucceeded: function(aAddonsList, aAddonCount, aTotalResults) {
+    searchSucceeded(aAddonsList, aAddonCount, aTotalResults) {
       do_check_eq(aTotalResults, -1);
       check_results(aAddonsList, SEARCH_RESULTS, aAddonCount);
       run_test_searchAddons_fails();
     },
 
-    searchFailed: function() {
+    searchFailed() {
       do_throw("retrieveRecommendedAddons should not have failed");
       end_test();
     }
   };
 
   complete_search(function retrieveRecommended_succeed_callback(aCallback) {
     AddonRepository.retrieveRecommendedAddons(MAX_RESULTS, aCallback);
   }, callback);
 }
 
 // Tests failure of AddonRepository.searchAddons()
 function run_test_searchAddons_fails() {
   Services.prefs.setCharPref(SEARCH_TEST.preference, SEARCH_TEST.preferenceValue);
   var callback = {
-    searchSucceeded: function(aAddonsList, aAddonCount, aTotalResults) {
+    searchSucceeded(aAddonsList, aAddonCount, aTotalResults) {
       do_throw("searchAddons should not have succeeded");
       end_test();
     },
 
-    searchFailed: function() {
+    searchFailed() {
       do_check_false(AddonRepository.isSearching);
       run_test_searchAddons_succeeds();
     }
   };
 
   complete_search(function(aCallback) {
     var searchTerms = SEARCH_TEST.searchTerms;
     AddonRepository.searchAddons(searchTerms, FAILED_MAX_RESULTS, aCallback);
   }, callback);
 }
 
 // Tests success of AddonRepository.searchAddons()
 function run_test_searchAddons_succeeds() {
   var callback = {
-    searchSucceeded: function(aAddonsList, aAddonCount, aTotalResults) {
+    searchSucceeded(aAddonsList, aAddonCount, aTotalResults) {
       do_check_eq(aTotalResults, TOTAL_RESULTS);
       check_results(aAddonsList, SEARCH_RESULTS, aAddonCount);
       end_test();
     },
 
-    searchFailed: function() {
+    searchFailed() {
       do_throw("searchAddons should not have failed");
       end_test();
     }
   };
 
   complete_search(function(aCallback) {
     var searchTerms = SEARCH_TEST.searchTerms;
     AddonRepository.searchAddons(searchTerms, MAX_RESULTS, aCallback);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository_compatmode.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository_compatmode.js
@@ -32,58 +32,58 @@ function end_test() {
 }
 
 // Strict compatibility checking disabled.
 function run_test_1() {
   do_print("Testing with strict compatibility checking disabled");
   Services.prefs.setBoolPref(PREF_EM_STRICT_COMPATIBILITY, false);
 
   AddonRepository.searchAddons("test", 6, {
-    searchSucceeded: function(aAddons) {
+    searchSucceeded(aAddons) {
       do_check_neq(aAddons, null);
       do_check_eq(aAddons.length, 1);
       do_check_eq(aAddons[0].id, "compatmode-normal@tests.mozilla.org");
 
       run_test_2();
     },
-    searchFailed: function() {
+    searchFailed() {
       do_throw("Search should not have failed");
     }
   });
 }
 
 // Strict compatibility checking enabled.
 function run_test_2() {
   do_print("Testing with strict compatibility checking enabled");
   Services.prefs.setBoolPref(PREF_EM_STRICT_COMPATIBILITY, true);
 
   AddonRepository.searchAddons("test", 6, {
-    searchSucceeded: function(aAddons) {
+    searchSucceeded(aAddons) {
       do_check_neq(aAddons, null);
       do_check_eq(aAddons.length, 1);
       do_check_eq(aAddons[0].id, "compatmode-strict@tests.mozilla.org");
 
       run_test_3();
     },
-    searchFailed: function() {
+    searchFailed() {
       do_throw("Search should not have failed");
     }
   });
 }
 
 // Compatibility checking disabled.
 function run_test_3() {
   do_print("Testing with all compatibility checking disabled");
   AddonManager.checkCompatibility = false;
 
   AddonRepository.searchAddons("test", 6, {
-    searchSucceeded: function(aAddons) {
+    searchSucceeded(aAddons) {
       do_check_neq(aAddons, null);
       do_check_eq(aAddons.length, 1);
       do_check_eq(aAddons[0].id, "compatmode-ignore@tests.mozilla.org");
 
       end_test();
     },
-    searchFailed: function() {
+    searchFailed() {
       do_throw("Search should not have failed");
     }
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_DeferredSave.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_DeferredSave.js
@@ -70,21 +70,21 @@ function DeferredSaveTester(aDataProvide
 }
 
 /**
  * Install a mock nsITimer factory that triggers on the next spin of
  * the event loop after it is scheduled
  */
 function setQuickMockTimer() {
   let quickTimer = {
-    initWithCallback: function(aFunction, aDelay, aType) {
+    initWithCallback(aFunction, aDelay, aType) {
       do_print("Starting quick timer, delay = " + aDelay);
       do_execute_soon(aFunction);
     },
-    cancel: function() {
+    cancel() {
       do_throw("Attempted to cancel a quickMockTimer");
     }
   };
   DSContext.MakeTimer = () => {
     do_print("Creating quick timer");
     return quickTimer;
   };
 }
@@ -102,26 +102,26 @@ function setQuickMockTimer() {
 function setPromiseMockTimer() {
   let waiter = Promise.defer();
   let mockTimer = {
     callback: null,
     delay: null,
     type: null,
     isCancelled: false,
 
-    initWithCallback: function(aFunction, aDelay, aType) {
+    initWithCallback(aFunction, aDelay, aType) {
       do_print("Starting timer, delay = " + aDelay);
       this.callback = aFunction;
       this.delay = aDelay;
       this.type = aType;
       // cancelled timers can be re-used
       this.isCancelled = false;
       waiter.resolve(this);
     },
-    cancel: function() {
+    cancel() {
       do_print("Cancelled mock timer");
       this.callback = null;
       this.delay = null;
       this.type = null;
       this.isCancelled = true;
       // If initWithCallback was never called, resolve to let tests check for cancel
       waiter.resolve(this);
     }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_XPIcancel.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_XPIcancel.js
@@ -9,17 +9,17 @@ var XPIProvider = scope.XPIProvider;
 
 function run_test() {
   // Check that cancelling with nothing in progress doesn't blow up
   XPIProvider.cancelAll();
 
   // Check that a basic object gets cancelled
   let getsCancelled = {
     isCancelled: false,
-    cancel: function() {
+    cancel() {
       if (this.isCancelled)
         do_throw("Already cancelled");
       this.isCancelled = true;
     }
   };
   XPIProvider.doing(getsCancelled);
   XPIProvider.cancelAll();
   do_check_true(getsCancelled.isCancelled);
@@ -31,33 +31,33 @@ function run_test() {
   XPIProvider.doing(doesntGetCancelled);
   do_check_true(XPIProvider.done(doesntGetCancelled));
   XPIProvider.cancelAll();
 
   // A cancellable that adds a cancellable
   getsCancelled.isCancelled = false;
   let addsAnother = {
     isCancelled: false,
-    cancel: function() {
+    cancel() {
       if (this.isCancelled)
         do_throw("Already cancelled");
       this.isCancelled = true;
       XPIProvider.doing(getsCancelled);
     }
   }
   XPIProvider.doing(addsAnother);
   XPIProvider.cancelAll();
   do_check_true(addsAnother.isCancelled);
   do_check_true(getsCancelled.isCancelled);
 
   // A cancellable that removes another. This assumes that Set() iterates in the
   // order that members were added
   let removesAnother = {
     isCancelled: false,
-    cancel: function() {
+    cancel() {
       if (this.isCancelled)
         do_throw("Already cancelled");
       this.isCancelled = true;
       XPIProvider.done(doesntGetCancelled);
     }
   }
   XPIProvider.doing(removesAnother);
   XPIProvider.doing(doesntGetCancelled);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_backgroundupdate.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_backgroundupdate.js
@@ -103,21 +103,21 @@ function run_test_2() {
   Services.obs.addObserver(function() {
     Services.obs.removeObserver(arguments.callee, "addons-background-update-complete");
 
     do_check_eq(installCount, 3);
     sawCompleteNotification = true;
   }, "addons-background-update-complete", false);
 
   AddonManager.addInstallListener({
-    onNewInstall: function(aInstall) {
+    onNewInstall(aInstall) {
       installCount++;
     },
 
-    onDownloadFailed: function(aInstall) {
+    onDownloadFailed(aInstall) {
       completeCount++;
       if (completeCount == 3) {
         do_check_true(sawCompleteNotification);
         end_test();
       }
     }
   });
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_badschema.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_badschema.js
@@ -160,19 +160,19 @@ function run_test() {
                                "theme2@tests.mozilla.org"], function([a2, a3, a4,
                                                                       a7, t2]) {
     // Set up the initial state
     a2.userDisabled = true;
     a4.userDisabled = true;
     a7.userDisabled = true;
     t2.userDisabled = false;
     a3.findUpdates({
-      onUpdateFinished: function() {
+      onUpdateFinished() {
         a4.findUpdates({
-          onUpdateFinished: function() {
+          onUpdateFinished() {
             do_execute_soon(run_test_1);
           }
         }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
       }
     }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
   });
 }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_metadata_filters.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_metadata_filters.js
@@ -19,33 +19,33 @@ gPort = testserver.identity.primaryPort;
 mapFile("/data/test_blocklist_metadata_filters_1.xml", testserver);
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // Don't need the full interface, attempts to call other methods will just
 // throw which is just fine
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, args) {
+  openWindow(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
 
     // Simulate auto-disabling any softblocks
     var list = args.wrappedJSObject.list;
     list.forEach(function(aItem) {
       if (!aItem.blocked)
         aItem.disable = true;
     });
 
     // run the code after the blocklist is closed
     Services.obs.notifyObservers(null, "addon-blocklist-closed", null);
 
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 };
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_prefs.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_prefs.js
@@ -25,33 +25,33 @@ mapFile("/data/test_blocklist_prefs_1.xm
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // A window watcher to handle the blocklist UI.
 // Don't need the full interface, attempts to call other methods will just
 // throw which is just fine
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, args) {
+  openWindow(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
 
     // Simulate auto-disabling any softblocks
     var list = args.wrappedJSObject.list;
     list.forEach(function(aItem) {
       if (!aItem.blocked)
         aItem.disable = true;
     });
 
     // run the code after the blocklist is closed
     Services.obs.notifyObservers(null, "addon-blocklist-closed", null);
 
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 };
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_regexp.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_regexp.js
@@ -20,33 +20,33 @@ gPort = testserver.identity.primaryPort;
 mapFile("/data/test_blocklist_regexp_1.xml", testserver);
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // Don't need the full interface, attempts to call other methods will just
 // throw which is just fine
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, args) {
+  openWindow(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
 
     // Simulate auto-disabling any softblocks
     var list = args.wrappedJSObject.list;
     list.forEach(function(aItem) {
       if (!aItem.blocked)
         aItem.disable = true;
     });
 
     // run the code after the blocklist is closed
     Services.obs.notifyObservers(null, "addon-blocklist-closed", null);
 
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 };
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_blocklistchange.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_blocklistchange.js
@@ -329,51 +329,51 @@ const ADDON_IDS = ["softblock1@tests.moz
                    "softblock4@tests.mozilla.org",
                    "softblock5@tests.mozilla.org",
                    "hardblock@tests.mozilla.org",
                    "regexpblock@tests.mozilla.org"];
 
 // Don't need the full interface, attempts to call other methods will just
 // throw which is just fine
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, openArgs) {
+  openWindow(parent, url, name, features, openArgs) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
 
     // Simulate auto-disabling any softblocks
     var list = openArgs.wrappedJSObject.list;
     list.forEach(function(aItem) {
       if (!aItem.blocked)
         aItem.disable = true;
     });
 
     // run the code after the blocklist is closed
     Services.obs.notifyObservers(null, "addon-blocklist-closed", null);
 
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 };
 
 MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1", WindowWatcher);
 
 var InstallConfirm = {
-  confirm: function(aWindow, aUrl, aInstalls, aInstallCount) {
+  confirm(aWindow, aUrl, aInstalls, aInstallCount) {
     aInstalls.forEach(function(aInstall) {
       aInstall.install();
     });
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.amIWebInstallPrompt)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 };
 
@@ -412,21 +412,21 @@ function Pload_blocklist(aFile) {
 // Does a background update check for add-ons and returns a promise that
 // resolves when any started installs complete
 function Pbackground_update() {
   var installCount = 0;
   var backgroundCheckCompleted = false;
 
   let updated = new Promise((resolve, reject) => {
     AddonManager.addInstallListener({
-      onNewInstall: function(aInstall) {
+      onNewInstall(aInstall) {
         installCount++;
       },
 
-      onInstallEnded: function(aInstall) {
+      onInstallEnded(aInstall) {
         installCount--;
         // Wait until all started installs have completed
         if (installCount)
           return;
 
         AddonManager.removeInstallListener(this);
 
         // If the background check hasn't yet completed then let that call the
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug1180901_2.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug1180901_2.js
@@ -22,21 +22,21 @@ add_task(function* () {
   ok(trashDirExists, "trash directory should have been created");
 
   let file = yield OS.File.open(testFile, {create: true}, {winShare: 0});
   let fileExists = yield OS.File.exists(testFile);
   ok(fileExists, "test.txt should have been created in " + trashDir);
 
   let promiseInstallStatus = new Promise((resolve, reject) => {
     let listener = {
-      onInstallFailed: function() {
+      onInstallFailed() {
         AddonManager.removeInstallListener(listener);
         reject("extension installation should not have failed");
       },
-      onInstallEnded: function() {
+      onInstallEnded() {
         AddonManager.removeInstallListener(listener);
         ok(true, "extension installation should not have failed");
         resolve();
       }
     };
 
     AddonManager.addInstallListener(listener);
   });
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug299716_2.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug299716_2.js
@@ -34,17 +34,17 @@ function run_test() {
   installAllFiles([do_get_addon(ADDON.addon)], function() {
     restartManager();
 
     AddonManager.getAddonByID(ADDON.id, function(item) {
       do_check_eq(item.version, 0.1);
       do_check_false(item.isCompatible);
 
       item.findUpdates({
-        onUpdateFinished: function(addon) {
+        onUpdateFinished(addon) {
           do_check_false(item.isCompatible);
 
           testserver.stop(do_test_finished);
         }
       }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
     });
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug335238.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug335238.js
@@ -75,61 +75,61 @@ var ADDONS = [
   {id: "bug335238_3@tests.mozilla.org",
    addon: "test_bug335238_3"},
   {id: "bug335238_4@tests.mozilla.org",
    addon: "test_bug335238_4"}
 ];
 
 // This is a replacement for the blocklist service
 var BlocklistService = {
-  getAddonBlocklistState: function(aAddon, aAppVersion, aToolkitVersion) {
+  getAddonBlocklistState(aAddon, aAppVersion, aToolkitVersion) {
     if (aAddon.id == "bug335238_3@tests.mozilla.org")
       return Ci.nsIBlocklistService.STATE_SOFTBLOCKED;
     if (aAddon.id == "bug335238_4@tests.mozilla.org")
       return Ci.nsIBlocklistService.STATE_BLOCKED;
     return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
   },
 
-  getPluginBlocklistState: function(aPlugin, aVersion, aAppVersion, aToolkitVersion) {
+  getPluginBlocklistState(aPlugin, aVersion, aAppVersion, aToolkitVersion) {
     return Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
   },
 
-  isAddonBlocklisted: function(aAddon, aAppVersion, aToolkitVersion) {
+  isAddonBlocklisted(aAddon, aAppVersion, aToolkitVersion) {
     return this.getAddonBlocklistState(aAddon, aAppVersion, aToolkitVersion) ==
            Ci.nsIBlocklistService.STATE_BLOCKED;
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIBlocklistService)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 };
 
 MockRegistrar.register("@mozilla.org/extensions/blocklist;1", BlocklistService);
 
 var server;
 
 var updateListener = {
   pendingCount: 0,
 
-  onUpdateAvailable: function(aAddon) {
+  onUpdateAvailable(aAddon) {
     do_throw("Should not have seen an update for " + aAddon.id);
   },
 
-  onUpdateFinished: function() {
+  onUpdateFinished() {
     if (--this.pendingCount == 0)
       server.stop(do_test_finished);
   }
 }
 
 var requestHandler = {
-  handle: function(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]);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug384052.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug384052.js
@@ -11,24 +11,24 @@ var gTestURL = "http://127.0.0.1:" + gPo
 var gExpectedQuery = "itemID=test@mozilla.org&custom1=custom_parameter_1&custom2=custom_parameter_2";
 var gSeenExpectedURL = false;
 
 var gComponentRegistrar = Components.manager.QueryInterface(AM_Ci.nsIComponentRegistrar);
 var gCategoryManager = AM_Cc["@mozilla.org/categorymanager;1"].getService(AM_Ci.nsICategoryManager);
 
 // Factory for our parameter handler
 var paramHandlerFactory = {
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(AM_Ci.nsIFactory) || iid.equals(AM_Ci.nsISupports))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   },
 
-  createInstance: function(outer, iid) {
+  createInstance(outer, iid) {
     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);
   }
 };
 
@@ -80,24 +80,24 @@ function shutdownTest()
 
 function run_test()
 {
   initTest();
 
   AddonManager.getAddonByID("test@mozilla.org", function(item) {
     // Initiate update
     item.findUpdates({
-      onCompatibilityUpdateAvailable: function(addon) {
+      onCompatibilityUpdateAvailable(addon) {
         do_throw("Should not have seen a compatibility update");
       },
 
-      onUpdateAvailable: function(addon, install) {
+      onUpdateAvailable(addon, install) {
         do_throw("Should not have seen an available update");
       },
 
-      onUpdateFinished: function(addon, error) {
+      onUpdateFinished(addon, error) {
         do_check_eq(error, AddonManager.UPDATE_STATUS_DOWNLOAD_ERROR);
         do_check_true(gSeenExpectedURL);
         do_execute_soon(shutdownTest);
       }
     }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug393285.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug393285.js
@@ -32,33 +32,33 @@ var addonIDs = ["test_bug393285_1@tests.
                 "test_bug393285_10@tests.mozilla.org",
                 "test_bug393285_11@tests.mozilla.org",
                 "test_bug393285_12@tests.mozilla.org",
                 "test_bug393285_13@tests.mozilla.org",
                 "test_bug393285_14@tests.mozilla.org"];
 
 // A window watcher to deal with the blocklist UI dialog.
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, args) {
+  openWindow(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
 
     // Simulate auto-disabling any softblocks
     var list = args.wrappedJSObject.list;
     list.forEach(function(aItem) {
       if (!aItem.blocked)
         aItem.disable = true;
     });
 
     // run the code after the blocklist is closed
     Services.obs.notifyObservers(null, "addon-blocklist-closed", null);
 
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 };
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug406118.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug406118.js
@@ -21,33 +21,33 @@ gPort = testserver.identity.primaryPort;
 // register static files with server and interpolate port numbers in them
 mapFile("/data/test_bug393285.xml", testserver);
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // A window watcher to deal with the blocklist UI dialog.
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, args) {
+  openWindow(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
 
     // Simulate auto-disabling any softblocks
     var list = args.wrappedJSObject.list;
     list.forEach(function(aItem) {
       if (!aItem.blocked)
         aItem.disable = true;
     });
 
     // run the code after the blocklist is closed
     Services.obs.notifyObservers(null, "addon-blocklist-closed", null);
 
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 };
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug424262.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug424262.js
@@ -15,29 +15,29 @@ var RESULTS = [
   2,
   4,
   5,
   5,
   5
 ];
 
 var RecommendedCallback = {
-  searchSucceeded: function(addons, length, total) {
+  searchSucceeded(addons, length, total) {
     dump("loaded");
     // Search is complete
     do_check_eq(length, RESULTS.length);
 
     for (var i = 0; i < length; i++) {
       if (addons[i].averageRating != RESULTS[i])
         do_throw("Rating for " + addons[i].id + " was " + addons[i].averageRating + ", should have been " + RESULTS[i]);
     }
     server.stop(do_test_finished);
   },
 
-  searchFailed: function() {
+  searchFailed() {
     server.stop(do_test_finished);
     do_throw("Recommended results failed");
   }
 };
 
 function run_test()
 {
   // EM needs to be running.
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug430120.js
@@ -17,36 +17,36 @@ Components.utils.import("resource://test
 Components.utils.import("resource://testing-common/MockRegistrar.jsm");
 var testserver;
 var gOSVersion;
 var gBlocklist;
 
 // This is a replacement for the timer service so we can trigger timers
 var timerService = {
 
-  hasTimer: function(id) {
+  hasTimer(id) {
     var catMan = Components.classes["@mozilla.org/categorymanager;1"]
                            .getService(Components.interfaces.nsICategoryManager);
     var entries = catMan.enumerateCategory(CATEGORY_UPDATE_TIMER);
     while (entries.hasMoreElements()) {
       var entry = entries.getNext().QueryInterface(Components.interfaces.nsISupportsCString).data;
       var value = catMan.getCategoryEntry(CATEGORY_UPDATE_TIMER, entry);
       var timerID = value.split(",")[2];
       if (id == timerID) {
         return true;
       }
     }
     return false;
   },
 
-  fireTimer: function(id) {
+  fireTimer(id) {
     gBlocklist.QueryInterface(Components.interfaces.nsITimerCallback).notify(null);
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Components.interfaces.nsIUpdateTimerManager)
      || iid.equals(Components.interfaces.nsISupports))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 };
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js
@@ -231,50 +231,50 @@ var PLUGINS = [
 ];
 
 var gCallback = null;
 var gTestserver = null;
 var gNewBlocks = [];
 
 // A fake plugin host for the blocklist service to use
 var PluginHost = {
-  getPluginTags: function(countRef) {
+  getPluginTags(countRef) {
     countRef.value = PLUGINS.length;
     return PLUGINS;
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIPluginHost)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
 // Don't need the full interface, attempts to call other methods will just
 // throw which is just fine
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, args) {
+  openWindow(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
     do_check_neq(gCallback, null);
 
     args = args.wrappedJSObject;
 
     gNewBlocks = [];
     var list = args.list;
     for (let listItem of list)
       gNewBlocks.push(listItem.name + " " + listItem.version);
 
     // Call the callback after the blocklist has finished up
     do_timeout(0, gCallback);
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug455906.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug455906.js
@@ -114,50 +114,50 @@ var PLUGINS = [
   new MockPlugin("test_bug455906_6", "5", Ci.nsIPluginTag.STATE_ENABLED)
 ];
 
 var gNotificationCheck = null;
 var gTestCheck = null;
 
 // A fake plugin host for the blocklist service to use
 var PluginHost = {
-  getPluginTags: function(countRef) {
+  getPluginTags(countRef) {
     countRef.value = PLUGINS.length;
     return PLUGINS;
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIPluginHost)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
 // Don't need the full interface, attempts to call other methods will just
 // throw which is just fine
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, windowArguments) {
+  openWindow(parent, url, name, features, windowArguments) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
 
     if (gNotificationCheck) {
       var args = windowArguments.wrappedJSObject;
       gNotificationCheck(args);
     }
 
     // run the code after the blocklist is closed
     Services.obs.notifyObservers(null, "addon-blocklist-closed", null);
 
     // Call the next test after the blocklist has finished up
     do_timeout(0, gTestCheck);
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug465190.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug465190.js
@@ -3,23 +3,23 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 var installLocation = gProfD.clone();
 installLocation.append("baddir");
 installLocation.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0o664);
 
 var dirProvider2 = {
-  getFile: function(prop, persistent) {
+  getFile(prop, persistent) {
     persistent.value = true;
     if (prop == "XREUSysExt")
       return installLocation.clone();
     return null;
   },
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Components.interfaces.nsIDirectoryServiceProvider) ||
         iid.equals(Components.interfaces.nsISupports)) {
       return this;
     }
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 };
 Services.dirsvc.QueryInterface(Components.interfaces.nsIDirectoryService)
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug514327_3.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug514327_3.js
@@ -38,48 +38,48 @@ var PLUGINS = [{
   version: "5",
   disabled: false,
   blocklisted: false
 } ];
 
 
 // A fake plugin host for the blocklist service to use
 var PluginHost = {
-  getPluginTags: function(countRef) {
+  getPluginTags(countRef) {
     countRef.value = PLUGINS.length;
     return PLUGINS;
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIPluginHost)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
 // Don't need the full interface, attempts to call other methods will just
 // throw which is just fine
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, args) {
+  openWindow(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
     // Should only include one item
     do_check_eq(args.wrappedJSObject.list.length, 1);
     // And that item should be the blocked plugin, not the outdated one
     var item = args.wrappedJSObject.list[0];
     do_check_true(item.item instanceof Ci.nsIPluginTag);
     do_check_neq(item.name, "test_bug514327_outdated");
 
     // Call the next test after the blocklist has finished up
     do_timeout(0, gNextTestPart);
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug542391.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug542391.js
@@ -23,28 +23,28 @@ profileDir.append("extensions");
 var gInstallUpdate = false;
 var gCheckUpdates = false;
 
 // This will be called to show the compatibility update dialog.
 var WindowWatcher = {
   expected: false,
   args: null,
 
-  openWindow: function(parent, url, name, features, args) {
+  openWindow(parent, url, name, features, args) {
     do_check_true(Services.startup.interrupted);
     do_check_eq(url, URI_EXTENSION_UPDATE_DIALOG);
     do_check_true(this.expected);
     this.expected = false;
     this.args = args.QueryInterface(AM_Ci.nsIVariant);
 
     var updated = !gCheckUpdates;
     if (gCheckUpdates) {
       AddonManager.getAddonByID("override1x2-1x3@tests.mozilla.org", function(a6) {
         a6.findUpdates({
-          onUpdateFinished: function() {
+          onUpdateFinished() {
             AddonManagerPrivate.removeStartupChange("disabled", "override1x2-1x3@tests.mozilla.org");
             updated = true;
           }
         }, AddonManager.UPDATE_WHEN_NEW_APP_INSTALLED);
       });
     }
 
     var installed = !gInstallUpdate;
@@ -63,17 +63,17 @@ var WindowWatcher = {
     let thr = AM_Cc["@mozilla.org/thread-manager;1"].
               getService(AM_Ci.nsIThreadManager).
               mainThread;
 
     while (!installed || !updated)
       thr.processNextEvent(false);
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug554133.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug554133.js
@@ -30,27 +30,27 @@ var TESTS = [
   maxResults: 100,
   length:     10,
   total:      100
 }
 ];
 
 var gCurrentTest = 0;
 var SearchCallback = {
-  searchSucceeded: function(addons, length, total) {
+  searchSucceeded(addons, length, total) {
     do_check_false(AddonRepository.isSearching);
     do_check_eq(addons.length, length);
     do_check_eq(length, TESTS[gCurrentTest].length);
     do_check_eq(total, TESTS[gCurrentTest].total);
 
     gCurrentTest++;
     run_current_test();
   },
 
-  searchFailed: function() {
+  searchFailed() {
     server.stop(do_test_finished);
     do_throw("Search results failed");
   }
 };
 
 function run_current_test() {
   if (gCurrentTest < TESTS.length) {
     var query = TESTS[gCurrentTest].query;
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug594058.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug594058.js
@@ -15,21 +15,21 @@ Components.utils.import("resource://test
 var Ci = Components.interfaces;
 const extDir = gProfD.clone();
 extDir.append("extensions");
 
 var gCachePurged = false;
 
 // Override the window watcher
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, args) {
+  openWindow(parent, url, name, features, args) {
     do_check_false(gCachePurged);
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
@@ -40,17 +40,17 @@ MockRegistrar.register("@mozilla.org/emb
  */
 function run_test() {
   do_test_pending();
   gCachePurged = false;
 
   let obs = AM_Cc["@mozilla.org/observer-service;1"].
     getService(AM_Ci.nsIObserverService);
   obs.addObserver({
-    observe: function(aSubject, aTopic, aData) {
+    observe(aSubject, aTopic, aData) {
       gCachePurged = true;
     }
   }, "startupcache-invalidate", false);
   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1");
 
   startupManager();
   // nsAppRunner takes care of clearing this when a new app is installed
   do_check_false(gCachePurged);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug655254.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug655254.js
@@ -19,17 +19,17 @@ testserver.start(-1);
 gPort = testserver.identity.primaryPort;
 mapFile("/data/test_bug655254.rdf", testserver);
 
 var userDir = gProfD.clone();
 userDir.append("extensions2");
 userDir.append(gAppInfo.ID);
 
 var dirProvider = {
-  getFile: function(aProp, aPersistent) {
+  getFile(aProp, aPersistent) {
     aPersistent.value = false;
     if (aProp == "XREUSysExt")
       return userDir.parent;
     return null;
   },
 
   QueryInterface: XPCOMUtils.generateQI([AM_Ci.nsIDirectoryServiceProvider,
                                          AM_Ci.nsISupports])
@@ -76,17 +76,17 @@ function run_test_1() {
 
     do_check_neq(a2, null);
     do_check_false(a2.appDisabled);
     do_check_true(a2.isActive);
     do_check_false(isExtensionInAddonsList(userDir, a2.id));
     do_check_eq(Services.prefs.getIntPref("bootstraptest.active_version"), 1);
 
     a1.findUpdates({
-      onUpdateFinished: function() {
+      onUpdateFinished() {
         restartManager();
 
         AddonManager.getAddonByID("addon1@tests.mozilla.org", callback_soon(function(a1_2) {
           do_check_neq(a1_2, null);
           do_check_false(a1_2.appDisabled);
           do_check_true(a1_2.isActive);
           do_check_true(isExtensionInAddonsList(userDir, a1_2.id));
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug757663.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug757663.js
@@ -14,40 +14,40 @@ var addon1 = {
     id: "xpcshell@tests.mozilla.org",
     minVersion: "1",
     maxVersion: "1"
   }]
 };
 
 var listener1 = {
   sawEvent: false,
-  onDisabling: function() {
+  onDisabling() {
     this.sawEvent = true;
     AddonManager.removeAddonListener(this);
   },
-  onNewInstall: function() {
+  onNewInstall() {
     this.sawEvent = true;
     AddonManager.removeInstallListener(this);
   }
 };
 var listener2 = {
   sawEvent: false,
-  onDisabling: function() {
+  onDisabling() {
     this.sawEvent = true;
   },
-  onNewInstall: function() {
+  onNewInstall() {
     this.sawEvent = true;
   }
 };
 var listener3 = {
   sawEvent: false,
-  onDisabling: function() {
+  onDisabling() {
     this.sawEvent = true;
   },
-  onNewInstall: function() {
+  onNewInstall() {
     this.sawEvent = true;
   }
 };
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_cache_certdb.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_cache_certdb.js
@@ -53,17 +53,17 @@ function overrideCertDB() {
     }
 
     if (typeof realCertDB[property] == "function") {
       fakeCertDB[property] = realCertDB[property].bind(realCertDB);
     }
   }
 
   let certDBFactory = {
-    createInstance: function(outer, iid) {
+    createInstance(outer, iid) {
       if (outer != null) {
         throw Components.results.NS_ERROR_NO_AGGREGATION;
       }
       return fakeCertDB.QueryInterface(iid);
     }
   };
   registrar.registerFactory(CERTDB_CID, "CertDB",
                             CERTDB_CONTRACTID, certDBFactory);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_cacheflush.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_cacheflush.js
@@ -3,17 +3,17 @@
  */
 
 // This verifies that flushing the zipreader cache happens when appropriate
 
 var gExpectedFile = null;
 var gCacheFlushCount = 0;
 
 var CacheFlushObserver = {
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic != "flush-cache-entry")
       return;
     // Ignore flushes triggered by the fake cert DB
     if (aData == "cert-override")
       return;
 
     do_check_true(gExpectedFile != null);
     do_check_true(aSubject instanceof AM_Ci.nsIFile);
@@ -83,25 +83,25 @@ function run_test_2() {
     });
   });
 }
 
 // Tests that the cache is flushed when installing a restartless add-on
 function run_test_3() {
   AddonManager.getInstallForFile(do_get_addon("test_cacheflush2"), function(aInstall) {
     aInstall.addListener({
-      onInstallStarted: function() {
+      onInstallStarted() {
         // We should flush the staged XPI when completing the install
         gExpectedFile = gProfD.clone();
         gExpectedFile.append("extensions");
         gExpectedFile.append("staged");
         gExpectedFile.append("addon2@tests.mozilla.org.xpi");
       },
 
-      onInstallEnded: function() {
+      onInstallEnded() {
         do_check_eq(gCacheFlushCount, 1);
         gExpectedFile = null;
         gCacheFlushCount = 0;
 
         do_execute_soon(run_test_4);
       }
     });
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_corrupt.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_corrupt.js
@@ -160,19 +160,19 @@ function run_test() {
                                "theme2@tests.mozilla.org"], function([a2, a3, a4,
                                                                       a7, t2]) {
     // Set up the initial state
     a2.userDisabled = true;
     a4.userDisabled = true;
     a7.userDisabled = true;
     t2.userDisabled = false;
     a3.findUpdates({
-      onUpdateFinished: function() {
+      onUpdateFinished() {
         a4.findUpdates({
-          onUpdateFinished: function() {
+          onUpdateFinished() {
             do_execute_soon(run_test_1);
           }
         }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
       }
     }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
   });
 }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_corrupt_strictcompat.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_corrupt_strictcompat.js
@@ -161,19 +161,19 @@ function run_test() {
                                "theme2@tests.mozilla.org"], function([a2, a3, a4,
                                                                       a7, t2]) {
     // Set up the initial state
     a2.userDisabled = true;
     a4.userDisabled = true;
     a7.userDisabled = true;
     t2.userDisabled = false;
     a3.findUpdates({
-      onUpdateFinished: function() {
+      onUpdateFinished() {
         a4.findUpdates({
-          onUpdateFinished: function() {
+          onUpdateFinished() {
             do_execute_soon(run_test_1);
           }
         }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
       }
     }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
   });
 }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_dss.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_dss.js
@@ -19,17 +19,17 @@ Components.utils.import("resource://gre/
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // Observer to ensure a "lightweight-theme-styling-update" notification is sent
 // when expected
 var gLWThemeChanged = false;
 var LightweightThemeObserver = {
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic != "lightweight-theme-styling-update")
       return;
 
     gLWThemeChanged = true;
   }
 };
 
 AM_Cc["@mozilla.org/observer-service;1"]
--- a/toolkit/mozapps/extensions/test/xpcshell/test_duplicateplugins.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_duplicateplugins.js
@@ -78,22 +78,22 @@ var PLUGINS = [{
   get disabled() {
     return this.enabledState == Ci.nsIPluginTag.STATE_DISABLED;
   },
   filename: "/home/mozilla/.plugins/dupplugin5.so"
 }];
 
 // A fake plugin host to return the plugins defined above
 var PluginHost = {
-  getPluginTags: function(countRef) {
+  getPluginTags(countRef) {
     countRef.value = PLUGINS.length;
     return PLUGINS;
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Components.interfaces.nsIPluginHost)
      || iid.equals(Components.interfaces.nsISupports))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_hotfix.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_hotfix.js
@@ -68,17 +68,17 @@ function check_test_1() {
   });
 }
 
 // Don't install an already used hotfix
 function run_test_2() {
   restartManager();
 
   AddonManager.addInstallListener({
-    onNewInstall: function() {
+    onNewInstall() {
       do_throw("Should not have seen a new install created");
     }
   });
 
   // Run the background update
   AddonManagerInternal.backgroundUpdateCheck().then(run_test_3);
 }
 
@@ -118,33 +118,33 @@ function check_test_3() {
 // Don't install an incompatible hotfix
 function run_test_4() {
   restartManager();
 
   Services.prefs.setCharPref("extensions.hotfix.url", "http://localhost:" +
                              gPort + "/data/test_hotfix_3.rdf");
 
   AddonManager.addInstallListener({
-    onNewInstall: function() {
+    onNewInstall() {
       do_throw("Should not have seen a new install created");
     }
   });
 
   AddonManagerInternal.backgroundUpdateCheck().then(run_test_5);
 }
 
 // Don't install an older hotfix
 function run_test_5() {
   restartManager();
 
   Services.prefs.setCharPref("extensions.hotfix.url", "http://localhost:" +
                              gPort + "/data/test_hotfix_1.rdf");
 
   AddonManager.addInstallListener({
-    onNewInstall: function() {
+    onNewInstall() {
       do_throw("Should not have seen a new install created");
     }
   });
 
   AddonManagerInternal.backgroundUpdateCheck().then(run_test_6);
 }
 
 // Don't re-download an already pending install
@@ -167,17 +167,17 @@ function run_test_6() {
     "onInstallEnded",
   ], callback_soon(check_test_6));
 
   AddonManagerInternal.backgroundUpdateCheck();
 }
 
 function check_test_6() {
   AddonManager.addInstallListener({
-    onNewInstall: function() {
+    onNewInstall() {
       do_throw("Should not have seen a new install created");
     }
   });
 
   AddonManagerInternal.backgroundUpdateCheck()
     .then(promiseRestartManager)
     .then(() => promiseAddonByID("hotfix@tests.mozilla.org"))
     .then(aAddon => {
--- a/toolkit/mozapps/extensions/test/xpcshell/test_install.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_install.js
@@ -225,17 +225,17 @@ function run_test_2() {
       do_check_eq(activeInstalls[0], install);
 
       prepare_test({}, [
         "onDownloadStarted",
         "onDownloadEnded",
       ], check_test_2);
 
       install.addListener({
-        onDownloadProgress: function() {
+        onDownloadProgress() {
           do_execute_soon(function() {
             Components.utils.forceGC();
           });
         }
       });
 
       install.install();
     });
@@ -764,20 +764,20 @@ function run_test_14() {
 
 function check_test_14(install) {
   prepare_test({ }, [
     "onDownloadCancelled"
   ], function() {
     let file = install.file;
 
     install.addListener({
-      onDownloadProgress: function() {
+      onDownloadProgress() {
         do_throw("Download should not have continued");
       },
-      onDownloadEnded: function() {
+      onDownloadEnded() {
         do_throw("Download should not have continued");
       }
     });
 
     // Allow the listener to return to see if it continues downloading. The
     // The listener only really tests if we give it time to see progress, the
     // file check isn't ideal either
     do_execute_soon(function() {
@@ -818,49 +818,49 @@ function check_test_15(install) {
     "onDownloadCancelled"
   ]);
 
   install.cancel();
 
   ensure_test_completed();
 
   install.addListener({
-    onInstallStarted: function() {
+    onInstallStarted() {
       do_throw("Install should not have continued");
     }
   });
 
   // Allow the listener to return to see if it starts installing
   do_execute_soon(run_test_16);
 }
 
 // Verify that the userDisabled value carries over to the upgrade by default
 function run_test_16() {
   restartManager();
 
   let url = "http://localhost:" + gPort + "/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onInstallStarted: function() {
+      onInstallStarted() {
         do_check_false(aInstall.addon.userDisabled);
         aInstall.addon.userDisabled = true;
       },
 
-      onInstallEnded: function() {
+      onInstallEnded() {
        do_execute_soon(function install2_1_ended() {
         restartManager();
 
         AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
           do_check_true(a2.userDisabled);
           do_check_false(a2.isActive);
 
           let url_2 = "http://localhost:" + gPort + "/addons/test_install2_2.xpi";
           AddonManager.getInstallForURL(url_2, function(aInstall_2) {
             aInstall_2.addListener({
-              onInstallEnded: function() {
+              onInstallEnded() {
                do_execute_soon(function install2_2_ended() {
                 do_check_true(aInstall_2.addon.userDisabled);
 
                 restartManager();
 
                 AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2_2) {
                   do_check_true(a2_2.userDisabled);
                   do_check_false(a2_2.isActive);
@@ -883,35 +883,35 @@ function run_test_16() {
 
 // Verify that changing the userDisabled value before onInstallEnded works
 function run_test_17() {
   restartManager();
 
   let url = "http://localhost:" + gPort + "/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function() {
+      onInstallEnded() {
        do_execute_soon(function install2_1_ended2() {
         do_check_false(aInstall.addon.userDisabled);
 
         restartManager();
 
         AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
           do_check_false(a2.userDisabled);
           do_check_true(a2.isActive);
 
           let url_2 = "http://localhost:" + gPort + "/addons/test_install2_2.xpi";
           AddonManager.getInstallForURL(url_2, function(aInstall_2) {
             aInstall_2.addListener({
-              onInstallStarted: function() {
+              onInstallStarted() {
                 do_check_false(aInstall_2.addon.userDisabled);
                 aInstall_2.addon.userDisabled = true;
               },
 
-              onInstallEnded: function() {
+              onInstallEnded() {
                do_execute_soon(function install2_2_ended2() {
                 restartManager();
 
                 AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2_2) {
                   do_check_true(a2_2.userDisabled);
                   do_check_false(a2_2.isActive);
 
                   a2_2.uninstall();
@@ -932,38 +932,38 @@ function run_test_17() {
 
 // Verify that changing the userDisabled value before onInstallEnded works
 function run_test_18() {
   restartManager();
 
   let url = "http://localhost:" + gPort + "/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onInstallStarted: function() {
+      onInstallStarted() {
         do_check_false(aInstall.addon.userDisabled);
         aInstall.addon.userDisabled = true;
       },
 
-      onInstallEnded: function() {
+      onInstallEnded() {
        do_execute_soon(function install_2_1_ended3() {
         restartManager();
 
         AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
           do_check_true(a2.userDisabled);
           do_check_false(a2.isActive);
 
           let url_2 = "http://localhost:" + gPort + "/addons/test_install2_2.xpi";
           AddonManager.getInstallForURL(url_2, function(aInstall_2) {
             aInstall_2.addListener({
-              onInstallStarted: function() {
+              onInstallStarted() {
                 do_check_true(aInstall_2.addon.userDisabled);
                 aInstall_2.addon.userDisabled = false;
               },
 
-              onInstallEnded: function() {
+              onInstallEnded() {
                do_execute_soon(function install_2_2_ended3() {
                 restartManager();
 
                 AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2_2) {
                   do_check_false(a2_2.userDisabled);
                   do_check_true(a2_2.isActive);
 
                   a2_2.uninstall();
@@ -991,17 +991,17 @@ function run_test_18_1() {
   Services.prefs.setCharPref(PREF_GETADDONS_BYIDS,
                              "http://localhost:" + gPort + "/data/test_install.xml");
 
   Services.prefs.setBoolPref("extensions.addon2@tests.mozilla.org.getAddons.cache.enabled", false);
 
   let url = "http://localhost:" + gPort + "/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function(unused, aAddon) {
+      onInstallEnded(unused, aAddon) {
        do_execute_soon(function test18_1_install_ended() {
         do_check_neq(aAddon.fullDescription, "Repository description");
 
         restartManager();
 
         AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
           do_check_neq(a2.fullDescription, "Repository description");
 
@@ -1019,17 +1019,17 @@ function run_test_18_1() {
 // after restart
 function run_test_19() {
   restartManager();
   Services.prefs.setBoolPref("extensions.addon2@tests.mozilla.org.getAddons.cache.enabled", true);
 
   let url = "http://localhost:" + gPort + "/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function(unused, aAddon) {
+      onInstallEnded(unused, aAddon) {
        do_execute_soon(function test19_install_ended() {
         do_check_eq(aAddon.fullDescription, "Repository description");
 
         restartManager();
 
         AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
           do_check_eq(a2.fullDescription, "Repository description");
 
@@ -1045,17 +1045,17 @@ function run_test_19() {
 
 // Do the same again to make sure it works when the data is already in the cache
 function run_test_20() {
   restartManager();
 
   let url = "http://localhost:" + gPort + "/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function(unused, aAddon) {
+      onInstallEnded(unused, aAddon) {
        do_execute_soon(function test20_install_ended() {
         do_check_eq(aAddon.fullDescription, "Repository description");
 
         restartManager();
 
         AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
           do_check_eq(a2.fullDescription, "Repository description");
 
@@ -1311,17 +1311,17 @@ function run_test_26() {
     "onNewInstall",
     "onDownloadStarted",
     "onDownloadCancelled"
   ]);
 
   let observerService = AM_Cc["@mozilla.org/network/http-activity-distributor;1"].
                         getService(AM_Ci.nsIHttpActivityDistributor);
   observerService.addObserver({
-    observeActivity: function(aChannel, aType, aSubtype, aTimestamp, aSizeData,
+    observeActivity(aChannel, aType, aSubtype, aTimestamp, aSizeData,
                               aStringData) {
       aChannel.QueryInterface(AM_Ci.nsIChannel);
       // Wait for the final event for the redirected URL
       if (aChannel.URI.spec != "http://localhost:" + gPort + "/addons/test_install1.xpi" ||
           aType != AM_Ci.nsIHttpActivityObserver.ACTIVITY_TYPE_HTTP_TRANSACTION ||
           aSubtype != AM_Ci.nsIHttpActivityObserver.ACTIVITY_SUBTYPE_TRANSACTION_CLOSE)
         return;
 
@@ -1332,17 +1332,17 @@ function run_test_26() {
 
       run_test_27();
     }
   });
 
   let url = "http://localhost:" + gPort + "/redirect?/addons/test_install1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onDownloadProgress: function(aDownloadProgressInstall) {
+      onDownloadProgress(aDownloadProgressInstall) {
         aDownloadProgressInstall.cancel();
       }
     });
 
     aInstall.install();
   }, "application/x-xpinstall");
 }
 
@@ -1357,17 +1357,17 @@ function run_test_27() {
   let url = "http://localhost:" + gPort + "/addons/test_install3.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     ensure_test_completed();
 
     do_check_neq(aInstall, null);
     do_check_eq(aInstall.state, AddonManager.STATE_AVAILABLE);
 
     aInstall.addListener({
-      onDownloadProgress: function() {
+      onDownloadProgress() {
         aInstall.removeListener(this);
         aInstall.cancel();
       }
     });
 
     prepare_test({}, [
       "onDownloadStarted",
       "onDownloadCancelled",
--- a/toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js
@@ -208,17 +208,17 @@ function run_test_2(aAddon) {
       do_check_eq(activeInstalls[0], install);
 
       prepare_test({}, [
         "onDownloadStarted",
         "onDownloadEnded",
       ], check_test_2);
 
       install.addListener({
-        onDownloadProgress: function() {
+        onDownloadProgress() {
           do_execute_soon(function() {
             Components.utils.forceGC();
           });
         }
       });
 
       install.install();
     });
@@ -743,20 +743,20 @@ function run_test_14() {
 
 function check_test_14(install) {
   prepare_test({ }, [
     "onDownloadCancelled"
   ], function() {
     let file = install.file;
 
     install.addListener({
-      onDownloadProgress: function() {
+      onDownloadProgress() {
         do_throw("Download should not have continued");
       },
-      onDownloadEnded: function() {
+      onDownloadEnded() {
         do_throw("Download should not have continued");
       }
     });
 
     // Allow the listener to return to see if it continues downloading. The
     // The listener only really tests if we give it time to see progress, the
     // file check isn't ideal either
     do_execute_soon(function() {
@@ -797,49 +797,49 @@ function check_test_15(install) {
     "onDownloadCancelled"
   ]);
 
   install.cancel();
 
   ensure_test_completed();
 
   install.addListener({
-    onInstallStarted: function() {
+    onInstallStarted() {
       do_throw("Install should not have continued");
     }
   });
 
   // Allow the listener to return to see if it starts installing
   do_execute_soon(run_test_16);
 }
 
 // Verify that the userDisabled value carries over to the upgrade by default
 function run_test_16() {
   restartManager();
 
   let url = "http://localhost:4444/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onInstallStarted: function() {
+      onInstallStarted() {
         do_check_false(aInstall.addon.userDisabled);
         aInstall.addon.userDisabled = true;
       },
 
-      onInstallEnded: function() {
+      onInstallEnded() {
        do_execute_soon(function test16_install1() {
         restartManager();
 
         AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
           do_check_true(a2.userDisabled);
           do_check_false(a2.isActive);
 
           let url_2 = "http://localhost:4444/addons/test_install2_2.xpi";
           AddonManager.getInstallForURL(url_2, function(aInstall_2) {
             aInstall_2.addListener({
-              onInstallEnded: function() {
+              onInstallEnded() {
                do_execute_soon(function test16_install2() {
                 do_check_true(aInstall_2.addon.userDisabled);
 
                 restartManager();
 
                 AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2_2) {
                   do_check_true(a2_2.userDisabled);
                   do_check_false(a2_2.isActive);
@@ -862,35 +862,35 @@ function run_test_16() {
 
 // Verify that changing the userDisabled value before onInstallEnded works
 function run_test_17() {
   restartManager();
 
   let url = "http://localhost:4444/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function() {
+      onInstallEnded() {
        do_execute_soon(function() {
         do_check_false(aInstall.addon.userDisabled);
 
         restartManager();
 
         AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
           do_check_false(a2.userDisabled);
           do_check_true(a2.isActive);
 
           let url_2 = "http://localhost:4444/addons/test_install2_2.xpi";
           AddonManager.getInstallForURL(url_2, function(aInstall_2) {
             aInstall_2.addListener({
-              onInstallStarted: function() {
+              onInstallStarted() {
                 do_check_false(aInstall_2.addon.userDisabled);
                 aInstall_2.addon.userDisabled = true;
               },
 
-              onInstallEnded: function() {
+              onInstallEnded() {
                do_execute_soon(function() {
                 restartManager();
 
                 AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2_2) {
                   do_check_true(a2_2.userDisabled);
                   do_check_false(a2_2.isActive);
 
                   a2_2.uninstall();
@@ -911,38 +911,38 @@ function run_test_17() {
 
 // Verify that changing the userDisabled value before onInstallEnded works
 function run_test_18() {
   restartManager();
 
   let url = "http://localhost:4444/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onInstallStarted: function() {
+      onInstallStarted() {
         do_check_false(aInstall.addon.userDisabled);
         aInstall.addon.userDisabled = true;
       },
 
-      onInstallEnded: function() {
+      onInstallEnded() {
        do_execute_soon(function test18_install1() {
         restartManager();
 
         AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
           do_check_true(a2.userDisabled);
           do_check_false(a2.isActive);
 
           let url_2 = "http://localhost:4444/addons/test_install2_2.xpi";
           AddonManager.getInstallForURL(url_2, function(aInstall_2) {
             aInstall_2.addListener({
-              onInstallStarted: function() {
+              onInstallStarted() {
                 do_check_true(aInstall_2.addon.userDisabled);
                 aInstall_2.addon.userDisabled = false;
               },
 
-              onInstallEnded: function() {
+              onInstallEnded() {
                do_execute_soon(function test18_install2() {
                 restartManager();
 
                 AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2_2) {
                   do_check_false(a2_2.userDisabled);
                   do_check_true(a2_2.isActive);
 
                   a2_2.uninstall();
@@ -970,17 +970,17 @@ function run_test_18_1() {
   Services.prefs.setCharPref(PREF_GETADDONS_BYIDS,
                              "http://localhost:4444/data/test_install.xml");
 
   Services.prefs.setBoolPref("extensions.addon2@tests.mozilla.org.getAddons.cache.enabled", false);
 
   let url = "http://localhost:4444/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function(unused, aAddon) {
+      onInstallEnded(unused, aAddon) {
        do_execute_soon(function test18_install() {
         do_check_neq(aAddon.fullDescription, "Repository description");
 
         restartManager();
 
         AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
           do_check_neq(a2.fullDescription, "Repository description");
 
@@ -998,17 +998,17 @@ function run_test_18_1() {
 // after restart
 function run_test_19() {
   restartManager();
   Services.prefs.setBoolPref("extensions.addon2@tests.mozilla.org.getAddons.cache.enabled", true);
 
   let url = "http://localhost:4444/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function(unused, aAddon) {
+      onInstallEnded(unused, aAddon) {
        do_execute_soon(function test19_install() {
         do_check_eq(aAddon.fullDescription, "Repository description");
 
         restartManager();
 
         AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
           do_check_eq(a2.fullDescription, "Repository description");
 
@@ -1024,17 +1024,17 @@ function run_test_19() {
 
 // Do the same again to make sure it works when the data is already in the cache
 function run_test_20() {
   restartManager();
 
   let url = "http://localhost:4444/addons/test_install2_1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function(unused, aAddon) {
+      onInstallEnded(unused, aAddon) {
        do_execute_soon(function test20_install() {
         do_check_eq(aAddon.fullDescription, "Repository description");
 
         restartManager();
 
         AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
           do_check_eq(a2.fullDescription, "Repository description");
 
@@ -1290,17 +1290,17 @@ function run_test_26() {
     "onNewInstall",
     "onDownloadStarted",
     "onDownloadCancelled"
   ]);
 
   let observerService = AM_Cc["@mozilla.org/network/http-activity-distributor;1"].
                         getService(AM_Ci.nsIHttpActivityDistributor);
   observerService.addObserver({
-    observeActivity: function(aChannel, aType, aSubtype, aTimestamp, aSizeData,
+    observeActivity(aChannel, aType, aSubtype, aTimestamp, aSizeData,
                               aStringData) {
       aChannel.QueryInterface(AM_Ci.nsIChannel);
       // Wait for the final event for the redirected URL
       if (aChannel.URI.spec != "http://localhost:4444/addons/test_install1.xpi" ||
           aType != AM_Ci.nsIHttpActivityObserver.ACTIVITY_TYPE_HTTP_TRANSACTION ||
           aSubtype != AM_Ci.nsIHttpActivityObserver.ACTIVITY_SUBTYPE_TRANSACTION_CLOSE)
         return;
 
@@ -1311,17 +1311,17 @@ function run_test_26() {
 
       run_test_27();
     }
   });
 
   let url = "http://localhost:4444/redirect?/addons/test_install1.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     aInstall.addListener({
-      onDownloadProgress: function(aDownloadProgressInstall) {
+      onDownloadProgress(aDownloadProgressInstall) {
         aDownloadProgressInstall.cancel();
       }
     });
 
     aInstall.install();
   }, "application/x-xpinstall");
 }
 
@@ -1336,17 +1336,17 @@ function run_test_27() {
   let url = "http://localhost:4444/addons/test_install3.xpi";
   AddonManager.getInstallForURL(url, function(aInstall) {
     ensure_test_completed();
 
     do_check_neq(aInstall, null);
     do_check_eq(aInstall.state, AddonManager.STATE_AVAILABLE);
 
     aInstall.addListener({
-      onDownloadProgress: function() {
+      onDownloadProgress() {
         aInstall.removeListener(this);
         aInstall.cancel();
       }
     });
 
     prepare_test({}, [
       "onDownloadStarted",
       "onDownloadCancelled",
--- a/toolkit/mozapps/extensions/test/xpcshell/test_json_updatecheck.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_json_updatecheck.js
@@ -59,17 +59,17 @@ function checkUpdates(aData) {
               { data: JSON.stringify(manifestJSON),
                 contentType: aData.contentType || "application/json" });
 
 
   return new Promise((resolve, reject) => {
     AddonUpdateChecker.checkForUpdates(aData.id, aData.updateKey, updateUrl, {
       onUpdateCheckComplete: resolve,
 
-      onUpdateCheckError: function(status) {
+      onUpdateCheckError(status) {
         reject(new Error("Update check failed with status " + status));
       }
     });
   });
 }
 
 
 add_task(function* test_default_values() {
@@ -338,17 +338,17 @@ add_task(function* test_type_detection()
   ];
 
   for (let [i, test] of tests.entries()) {
     let { messages } = yield promiseConsoleOutput(function *() {
       let id = `updatecheck-typedetection-${i}@tests.mozilla.org`;
       let updates;
       try {
         updates = yield checkUpdates({
-          id: id,
+          id,
           version: "0.1",
           contentType: test.contentType,
           manifestExtension: test.extension,
           updates: [{ version: "0.2" }]
         });
       } catch (e) {
         ok(!test.valid, "update manifest correctly detected as RDF");
         return;
--- a/toolkit/mozapps/extensions/test/xpcshell/test_locked.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_locked.js
@@ -161,19 +161,19 @@ add_task(function* init() {
                                "theme2@tests.mozilla.org"]);
   let deferredUpdateFinished = Promise.defer();
   // Set up the initial state
   a2.userDisabled = true;
   a4.userDisabled = true;
   a7.userDisabled = true;
   t2.userDisabled = false;
   a3.findUpdates({
-    onUpdateFinished: function() {
+    onUpdateFinished() {
       a4.findUpdates({
-        onUpdateFinished: function() {
+        onUpdateFinished() {
           // Let the updates finish before restarting the manager
           deferredUpdateFinished.resolve();
         }
       }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
     }
   }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
 
   yield deferredUpdateFinished.promise;
--- a/toolkit/mozapps/extensions/test/xpcshell/test_locked_strictcompat.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_locked_strictcompat.js
@@ -163,19 +163,19 @@ add_task(function* init() {
   // Set up the initial state
   let deferredUpdateFinished = Promise.defer();
 
   a2.userDisabled = true;
   a4.userDisabled = true;
   a7.userDisabled = true;
   t2.userDisabled = false;
   a3.findUpdates({
-    onUpdateFinished: function() {
+    onUpdateFinished() {
       a4.findUpdates({
-        onUpdateFinished: function() {
+        onUpdateFinished() {
           deferredUpdateFinished.resolve();
         }
       }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
     }
   }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
   yield deferredUpdateFinished.promise;
 });
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_mapURIToAddonID.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_mapURIToAddonID.js
@@ -22,30 +22,30 @@ registerDirectory("XREUSysExt", userExtD
 BootstrapMonitor.init();
 
 function TestProvider(result) {
   this.result = result;
 }
 TestProvider.prototype = {
   uri: Services.io.newURI("hellow://world", null, null),
   id: "valid@id",
-  startup: function() {},
-  shutdown: function() {},
-  mapURIToAddonID: function(aURI) {
+  startup() {},
+  shutdown() {},
+  mapURIToAddonID(aURI) {
     if (aURI.spec === this.uri.spec) {
       return this.id;
     }
     throw Components.Exception("Not mapped", this.result);
   }
 };
 
 function TestProviderNoMap() {}
 TestProviderNoMap.prototype = {
-  startup: function() {},
-  shutdown: function() {}
+  startup() {},
+  shutdown() {}
 };
 
 function check_mapping(uri, id) {
   do_check_eq(AddonManager.mapURIToAddonID(uri), id);
   let svc = Components.classes["@mozilla.org/addons/integration;1"].
             getService(Components.interfaces.amIAddonManager);
   let val = {};
   do_check_true(svc.mapURIToAddonID(uri, val));
--- a/toolkit/mozapps/extensions/test/xpcshell/test_metadata_update.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_metadata_update.js
@@ -33,24 +33,24 @@ var testserver;
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // This will be called to show the compatibility update dialog.
 var WindowWatcher = {
   expected: false,
 
-  openWindow: function(parent, url, name, features, args) {
+  openWindow(parent, url, name, features, args) {
     do_check_true(Services.startup.interrupted);
     do_check_eq(url, URI_EXTENSION_UPDATE_DIALOG);
     do_check_true(this.expected);
     this.expected = false;
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_migrate4.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_migrate4.js
@@ -132,33 +132,33 @@ function prepare_profile() {
       a6.userDisabled = true;
       a9.userDisabled = false;
 
       for (let addon of [a1, a2, a3, a4, a5, a6]) {
         oldSyncGUIDs[addon.id] = addon.syncGUID;
       }
 
       a6.findUpdates({
-        onUpdateAvailable: function(aAddon, aInstall6) {
+        onUpdateAvailable(aAddon, aInstall6) {
           AddonManager.getInstallForURL("http://localhost:" + gPort + "/addons/test_migrate4_7.xpi", function(aInstall7) {
             completeAllInstalls([aInstall6, aInstall7], function() {
               restartManager();
 
               AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
                                            "addon2@tests.mozilla.org",
                                            "addon3@tests.mozilla.org",
                                            "addon4@tests.mozilla.org",
                                            "addon5@tests.mozilla.org",
                                            "addon6@tests.mozilla.org"],
                                            function([a1_2, a2_2, a3_2, a4_2, a5_2, a6_2]) {
                 a3_2.userDisabled = true;
                 a4_2.userDisabled = false;
 
                 a5_2.findUpdates({
-                  onUpdateFinished: function() {
+                  onUpdateFinished() {
                     do_execute_soon(perform_migration);
                   }
                 }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
               });
             });
           }, "application/x-xpinstall");
         }
       }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_pluginchange.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_pluginchange.js
@@ -20,34 +20,34 @@ PluginTag.prototype = {
   filename: null,
   fullpath: null,
   disabled: false,
   blocklisted: false,
   clicktoplay: false,
 
   mimeTypes: [],
 
-  getMimeTypes: function(count) {
+  getMimeTypes(count) {
     count.value = this.mimeTypes.length;
     return this.mimeTypes;
   }
 };
 
 const PLUGINS = [
   // A standalone plugin
   new PluginTag("Java", "A mock Java plugin"),
 
   // A plugin made up of two plugin files
   new PluginTag("Flash", "A mock Flash plugin"),
   new PluginTag("Flash", "A mock Flash plugin")
 ];
 
 const gPluginHost = {
   // nsIPluginHost
-  getPluginTags: function(count) {
+  getPluginTags(count) {
     count.value = PLUGINS.length;
     return PLUGINS;
   },
 
   QueryInterface: XPCOMUtils.generateQI([AM_Ci.nsIPluginHost])
 };
 
 MockRegistrar.register("@mozilla.org/plugin/host;1", gPluginHost);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_pref_properties.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_pref_properties.js
@@ -1,36 +1,36 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Tests the preference-related properties of AddonManager
 // eg: AddonManager.checkCompatibility, AddonManager.updateEnabled, etc
 
 var gManagerEventsListener = {
   seenEvents: [],
-  init: function() {
+  init() {
     let events = ["onCompatibilityModeChanged", "onCheckUpdateSecurityChanged",
                   "onUpdateModeChanged"];
     events.forEach(function(aEvent) {
       this[aEvent] = function() {
         do_print("Saw event " + aEvent);
         this.seenEvents.push(aEvent);
       }
     }, this);
     AddonManager.addManagerListener(this);
     // Try to add twice, to test that the second time silently fails.
     AddonManager.addManagerListener(this);
   },
-  shutdown: function() {
+  shutdown() {
     AddonManager.removeManagerListener(this);
   },
-  expect: function(aEvents) {
+  expect(aEvents) {
     this.expectedEvents = aEvents;
   },
-  checkExpected: function() {
+  checkExpected() {
     do_print("Checking expected events...");
     while (this.expectedEvents.length > 0) {
       let event = this.expectedEvents.pop();
       do_print("Looking for expected event " + event);
       let matchingEvents = this.seenEvents.filter(function(aSeenEvent) {
         return aSeenEvent == event;
       });
       do_check_eq(matchingEvents.length, 1);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_signed_migrate.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_signed_migrate.js
@@ -22,22 +22,22 @@ const ID = "test@tests.mozilla.org";
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // Override the window watcher
 var WindowWatcher = {
   sawAddon: false,
 
-  openWindow: function(parent, url, name, features, args) {
+  openWindow(parent, url, name, features, args) {
     let ids = args.QueryInterface(AM_Ci.nsIVariant);
     this.sawAddon = ids.indexOf(ID) >= 0;
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(AM_Ci.nsIWindowWatcher)
         || iid.equals(AM_Ci.nsISupports))
       return this;
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_softblocked.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_softblocked.js
@@ -14,32 +14,32 @@ Services.prefs.setBoolPref("extensions.c
 
 const testserver = createHttpServer();
 gPort = testserver.identity.primaryPort;
 testserver.registerDirectory("/data/", do_get_file("data"));
 
 // Don't need the full interface, attempts to call other methods will just
 // throw which is just fine
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, openArgs) {
+  openWindow(parent, url, name, features, openArgs) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
 
     // Simulate auto-disabling any softblocks
     var list = openArgs.wrappedJSObject.list;
     list.forEach(function(aItem) {
       if (!aItem.blocked)
         aItem.disable = true;
     });
 
     // run the code after the blocklist is closed
     Services.obs.notifyObservers(null, "addon-blocklist-closed", null);
   },
 
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 };
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_startup.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_startup.js
@@ -115,17 +115,17 @@ var gCachePurged = false;
 
 // Set up the profile
 function run_test() {
   do_test_pending("test_startup main");
 
   let obs = AM_Cc["@mozilla.org/observer-service;1"].
     getService(AM_Ci.nsIObserverService);
   obs.addObserver({
-    observe: function(aSubject, aTopic, aData) {
+    observe(aSubject, aTopic, aData) {
       gCachePurged = true;
     }
   }, "startupcache-invalidate", false);
 
   startupManager();
   check_startup_changes(AddonManager.STARTUP_CHANGE_INSTALLED, []);
   check_startup_changes(AddonManager.STARTUP_CHANGE_CHANGED, []);
   check_startup_changes(AddonManager.STARTUP_CHANGE_UNINSTALLED, []);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_system_update.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_system_update.js
@@ -139,61 +139,61 @@ function* check_installed(conditions) {
  * define the following properties:
  *
  * setup:        A task to setup the profile into the initial state.
  * initialState: The initial expected system add-on state after setup has run.
  */
 const TEST_CONDITIONS = {
   // Runs tests with no updated or default system add-ons initially installed
   blank: {
-    setup: function*() {
+    *setup() {
       clearUpdatesDir();
       distroDir.leafName = "empty";
     },
     initialState: [
       { isUpgrade: false, version: null},
       { isUpgrade: false, version: null},
       { isUpgrade: false, version: null},
       { isUpgrade: false, version: null},
       { isUpgrade: false, version: null}
     ],
   },
   // Runs tests with default system add-ons installed
   withAppSet: {
-    setup: function*() {
+    *setup() {
       clearUpdatesDir();
       distroDir.leafName = "prefilled";
     },
     initialState: [
       { isUpgrade: false, version: null},
       { isUpgrade: false, version: "2.0"},
       { isUpgrade: false, version: "2.0"},
       { isUpgrade: false, version: null},
       { isUpgrade: false, version: null}
     ]
   },
 
   // Runs tests with updated system add-ons installed
   withProfileSet: {
-    setup: function*() {
+    *setup() {
       buildPrefilledUpdatesDir();
       distroDir.leafName = "empty";
     },
     initialState: [
       { isUpgrade: false, version: null},
       { isUpgrade: true, version: "2.0"},
       { isUpgrade: true, version: "2.0"},
       { isUpgrade: false, version: null},
       { isUpgrade: false, version: null}
     ]
   },
 
   // Runs tests with both default and updated system add-ons installed
   withBothSets: {
-    setup: function*() {
+    *setup() {
       buildPrefilledUpdatesDir();
       distroDir.leafName = "hidden";
     },
     initialState: [
       { isUpgrade: false, version: "1.0"},
       { isUpgrade: true, version: "2.0"},
       { isUpgrade: true, version: "2.0"},
       { isUpgrade: false, version: null},
--- a/toolkit/mozapps/extensions/test/xpcshell/test_theme.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_theme.js
@@ -16,17 +16,17 @@ Components.utils.import("resource://gre/
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // Observer to ensure a "lightweight-theme-styling-update" notification is sent
 // when expected
 var gLWThemeChanged = false;
 var LightweightThemeObserver = {
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic != "lightweight-theme-styling-update")
       return;
 
     gLWThemeChanged = true;
   }
 };
 
 AM_Cc["@mozilla.org/observer-service;1"]
@@ -1063,17 +1063,17 @@ function run_test_21() {
 
     t1.userDisabled = false;
     ensure_test_completed();
 
     restartManager();
 
     AddonManager.getAddonByID("1@personas.mozilla.org", function(p1) {
       AddonManager.addAddonListener({
-        onEnabling: function(aAddon) {
+        onEnabling(aAddon) {
           do_check_false(hasFlag(aAddon.permissions, AddonManager.PERM_CAN_ENABLE));
           do_check_true(hasFlag(aAddon.pendingOperations, AddonManager.PENDING_ENABLE));
 
           do_check_eq(aAddon.permissions, p1.permissions);
           do_check_eq(aAddon.pendingOperations, p1.pendingOperations);
         }
       });
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_types.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_types.js
@@ -15,22 +15,22 @@ function run_test() {
   // The dumbest provider possible
   var provider = {
   };
 
   var expectedAdd = "test";
   var expectedRemove = null;
 
   AddonManager.addTypeListener({
-    onTypeAdded: function(aType) {
+    onTypeAdded(aType) {
       do_check_eq(aType.id, expectedAdd);
       expectedAdd = null;
     },
 
-    onTypeRemoved: function(aType) {
+    onTypeRemoved(aType) {
       do_check_eq(aType.id, expectedRemove);
       expectedRemove = null;
     }
   });
 
   AddonManagerPrivate.registerProvider(provider, [{
     id: "test",
     name: "Test",
--- a/toolkit/mozapps/extensions/test/xpcshell/test_update.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_update.js
@@ -120,63 +120,63 @@ for (let test of testParams) {
 
       a1.applyBackgroundUpdates = AddonManager.AUTOUPDATE_DISABLE;
 
       prepare_test({}, [
         "onNewInstall",
       ]);
 
       a1.findUpdates({
-        onNoCompatibilityUpdateAvailable: function(addon) {
+        onNoCompatibilityUpdateAvailable(addon) {
           ok(false, "Should not have seen onNoCompatibilityUpdateAvailable notification");
         },
 
-        onUpdateAvailable: function(addon, install) {
+        onUpdateAvailable(addon, install) {
           ensure_test_completed();
 
           AddonManager.getAllInstalls(function(aInstalls) {
             do_check_eq(aInstalls.length, 1);
             do_check_eq(aInstalls[0], install);
 
             do_check_eq(addon, a1);
             do_check_eq(install.name, addon.name);
             do_check_eq(install.version, "2.0");
             do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
             do_check_eq(install.existingAddon, addon);
             do_check_eq(install.releaseNotesURI.spec, "http://example.com/updateInfo.xhtml");
 
             // Verify that another update check returns the same AddonInstall
             a1.findUpdates({
-              onNoCompatibilityUpdateAvailable: function() {
+              onNoCompatibilityUpdateAvailable() {
                 ok(false, "Should not have seen onNoCompatibilityUpdateAvailable notification");
               },
 
-              onUpdateAvailable: function(newAddon, newInstall) {
+              onUpdateAvailable(newAddon, newInstall) {
                 AddonManager.getAllInstalls(function(aInstalls2) {
                   do_check_eq(aInstalls2.length, 1);
                   do_check_eq(aInstalls2[0], install);
                   do_check_eq(newAddon, addon);
                   do_check_eq(newInstall, install);
 
                   prepare_test({}, [
                     "onDownloadStarted",
                     "onDownloadEnded",
                   ], check_test_1);
                   install.install();
                 });
               },
 
-              onNoUpdateAvailable: function() {
+              onNoUpdateAvailable() {
                 ok(false, "Should not have seen onNoUpdateAvailable notification");
               }
             }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
           });
         },
 
-        onNoUpdateAvailable: function(addon) {
+        onNoUpdateAvailable(addon) {
           ok(false, "Should not have seen onNoUpdateAvailable notification");
         }
       }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
     });
   });
 
   let run_test_2;
   check_test_1 = (install) => {
@@ -186,25 +186,25 @@ for (let test of testParams) {
     return false;
   };
 
   // Continue installing the update.
   let check_test_2;
   run_test_2 = (install) => {
     // Verify that another update check returns no new update
     install.existingAddon.findUpdates({
-      onNoCompatibilityUpdateAvailable: function(addon) {
+      onNoCompatibilityUpdateAvailable(addon) {
         ok(false, "Should not have seen onNoCompatibilityUpdateAvailable notification");
       },
 
-      onUpdateAvailable: function() {
+      onUpdateAvailable() {
         ok(false, "Should find no available update when one is already downloading");
       },
 
-      onNoUpdateAvailable: function(addon) {
+      onNoUpdateAvailable(addon) {
         AddonManager.getAllInstalls(function(aInstalls) {
           do_check_eq(aInstalls.length, 1);
           do_check_eq(aInstalls[0], install);
 
           prepare_test({
             "addon1@tests.mozilla.org": [
               "onInstalling"
             ]
@@ -262,27 +262,27 @@ for (let test of testParams) {
     AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
       do_check_neq(a2, null);
       do_check_true(a2.isActive);
       do_check_true(a2.isCompatible);
       do_check_false(a2.appDisabled);
       do_check_true(a2.isCompatibleWith("0", "0"));
 
       a2.findUpdates({
-        onCompatibilityUpdateAvailable: function(addon) {
+        onCompatibilityUpdateAvailable(addon) {
           do_check_true(a2.isCompatible);
           do_check_false(a2.appDisabled);
           do_check_true(a2.isActive);
         },
 
-        onUpdateAvailable: function(addon, install) {
+        onUpdateAvailable(addon, install) {
           ok(false, "Should not have seen an available update");
         },
 
-        onNoUpdateAvailable: function(addon) {
+        onNoUpdateAvailable(addon) {
           do_check_eq(addon, a2);
           do_execute_soon(check_test_3);
         }
       }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
     });
   });
 
   check_test_3 = () => {
@@ -305,29 +305,29 @@ for (let test of testParams) {
       do_check_false(a3.isActive);
       do_check_false(a3.isCompatible);
       do_check_true(a3.appDisabled);
       do_check_true(a3.isCompatibleWith("5", "5"));
       do_check_false(a3.isCompatibleWith("2", "2"));
 
       a3.findUpdates({
         sawUpdate: false,
-        onCompatibilityUpdateAvailable: function(addon) {
+        onCompatibilityUpdateAvailable(addon) {
           ok(false, "Should not have seen compatibility information");
         },
 
-        onNoCompatibilityUpdateAvailable: function(addon) {
+        onNoCompatibilityUpdateAvailable(addon) {
           this.sawUpdate = true;
         },
 
-        onUpdateAvailable: function(addon, install) {
+        onUpdateAvailable(addon, install) {
           ok(false, "Should not have seen an available update");
         },
 
-        onNoUpdateAvailable: function(addon) {
+        onNoUpdateAvailable(addon) {
           do_check_true(this.sawUpdate);
           run_next_test();
         }
       }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
     });
   });
 
   // Checks that compatibility info for future apps are detected but don't make
@@ -339,32 +339,32 @@ for (let test of testParams) {
       do_check_false(a3.isActive);
       do_check_false(a3.isCompatible);
       do_check_true(a3.appDisabled);
       do_check_true(a3.isCompatibleWith("5", "5"));
       do_check_false(a3.isCompatibleWith("2", "2"));
 
       a3.findUpdates({
         sawUpdate: false,
-        onCompatibilityUpdateAvailable: function(addon) {
+        onCompatibilityUpdateAvailable(addon) {
           do_check_false(a3.isCompatible);
           do_check_true(a3.appDisabled);
           do_check_false(a3.isActive);
           this.sawUpdate = true;
         },
 
-        onNoCompatibilityUpdateAvailable: function(addon) {
+        onNoCompatibilityUpdateAvailable(addon) {
           ok(false, "Should have seen some compatibility information");
         },
 
-        onUpdateAvailable: function(addon, install) {
+        onUpdateAvailable(addon, install) {
           ok(false, "Should not have seen an available update");
         },
 
-        onNoUpdateAvailable: function(addon) {
+        onNoUpdateAvailable(addon) {
           do_check_true(this.sawUpdate);
           do_execute_soon(check_test_5);
         }
       }, AddonManager.UPDATE_WHEN_USER_REQUESTED, "3.0", "3.0");
     });
   });
 
   check_test_5 = () => {
@@ -604,28 +604,28 @@ for (let test of testParams) {
           a5_2.uninstall();
           a6_2.uninstall();
 
           restartManager();
           run_next_test();
         }
 
         let compatListener = {
-          onUpdateFinished: function(addon, error) {
+          onUpdateFinished(addon, error) {
             if (--count == 0)
               do_execute_soon(next_test);
           }
         };
 
         let updateListener = {
-          onUpdateAvailable: function(addon, update) {
+          onUpdateAvailable(addon, update) {
             // Dummy so the update checker knows we care about new versions
           },
 
-          onUpdateFinished: function(addon, error) {
+          onUpdateFinished(addon, error) {
             if (--count == 0)
               do_execute_soon(next_test);
           }
         };
 
         a1_2.findUpdates(updateListener, AddonManager.UPDATE_WHEN_USER_REQUESTED);
         a2_2.findUpdates(compatListener, AddonManager.UPDATE_WHEN_ADDON_INSTALLED);
         a3_2.findUpdates(updateListener, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
@@ -661,31 +661,31 @@ for (let test of testParams) {
     });
   });
 
   // Tests that a normal update check won't decrease a targetApplication's
   // maxVersion.
   add_test(function run_test_10() {
     AddonManager.getAddonByID("addon4@tests.mozilla.org", function(a4) {
       a4.findUpdates({
-        onUpdateFinished: function(addon) {
+        onUpdateFinished(addon) {
           do_check_true(addon.isCompatible, "addon4 is compatible");
 
           run_next_test();
         }
       }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
     });
   });
 
   // Tests that an update check for a new application will decrease a
   // targetApplication's maxVersion.
   add_test(function run_test_11() {
     AddonManager.getAddonByID("addon4@tests.mozilla.org", function(a4) {
       a4.findUpdates({
-        onUpdateFinished: function(addon) {
+        onUpdateFinished(addon) {
           do_check_true(addon.isCompatible, "addon4 is not compatible");
 
           run_next_test();
         }
       }, AddonManager.UPDATE_WHEN_NEW_APP_INSTALLED);
     });
   });
 
@@ -728,25 +728,25 @@ for (let test of testParams) {
       do_check_neq(a7, null);
       do_check_true(a7.isActive);
       do_check_true(a7.isCompatible);
       do_check_false(a7.appDisabled);
       do_check_true(a7.isCompatibleWith("0", "0"));
 
       a7.findUpdates({
         sawUpdate: false,
-        onNoCompatibilityUpdateAvailable: function(addon) {
+        onNoCompatibilityUpdateAvailable(addon) {
           ok(false, "Should have seen compatibility information");
         },
 
-        onUpdateAvailable: function(addon, install) {
+        onUpdateAvailable(addon, install) {
           ok(false, "Should not have seen an available update");
         },
 
-        onUpdateFinished: function(addon) {
+        onUpdateFinished(addon) {
           do_check_true(addon.isCompatible);
           do_execute_soon(check_test_13);
         }
       }, AddonManager.UPDATE_WHEN_NEW_APP_DETECTED, "3.0", "3.0");
     });
   });
 
   check_test_13 = () => {
@@ -795,54 +795,54 @@ for (let test of testParams) {
     restartManager();
 
     AddonManager.getAddonByID("addon8@tests.mozilla.org", function(a8) {
       a8.applyBackgroundUpdates = AddonManager.AUTOUPDATE_DISABLE;
 
       // The background update check will find updates for both add-ons but only
       // proceed to install one of them.
       AddonManager.addInstallListener({
-        onNewInstall: function(aInstall) {
+        onNewInstall(aInstall) {
           let id = aInstall.existingAddon.id;
           ok((id == "addon1@tests.mozilla.org" || id == "addon8@tests.mozilla.org"),
              "Saw unexpected onNewInstall for " + id);
         },
 
-        onDownloadStarted: function(aInstall) {
+        onDownloadStarted(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
         },
 
-        onDownloadEnded: function(aInstall) {
+        onDownloadEnded(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
         },
 
-        onDownloadFailed: function(aInstall) {
+        onDownloadFailed(aInstall) {
           ok(false, "Should not have seen onDownloadFailed event");
         },
 
-        onDownloadCancelled: function(aInstall) {
+        onDownloadCancelled(aInstall) {
           ok(false, "Should not have seen onDownloadCancelled event");
         },
 
-        onInstallStarted: function(aInstall) {
+        onInstallStarted(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
         },
 
-        onInstallEnded: function(aInstall) {
+        onInstallEnded(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
           do_check_eq(aInstall.existingAddon.pendingUpgrade.install, aInstall);
 
           do_execute_soon(check_test_14);
         },
 
-        onInstallFailed: function(aInstall) {
+        onInstallFailed(aInstall) {
           ok(false, "Should not have seen onInstallFailed event");
         },
 
-        onInstallCancelled: function(aInstall) {
+        onInstallCancelled(aInstall) {
           ok(false, "Should not have seen onInstallCancelled event");
         },
       });
 
       AddonManagerInternal.backgroundUpdateCheck();
     });
   });
 
@@ -896,52 +896,52 @@ for (let test of testParams) {
 
     AddonManager.getAddonByID("addon8@tests.mozilla.org", function(a8) {
       a8.uninstall();
       do_check_false(hasFlag(a8.permissions, AddonManager.PERM_CAN_UPGRADE));
 
       // The background update check will find updates for both add-ons but only
       // proceed to install one of them.
       AddonManager.addInstallListener({
-        onNewInstall: function(aInstall) {
+        onNewInstall(aInstall) {
           let id = aInstall.existingAddon.id;
           ok((id == "addon1@tests.mozilla.org" || id == "addon8@tests.mozilla.org"),
              "Saw unexpected onNewInstall for " + id);
         },
 
-        onDownloadStarted: function(aInstall) {
+        onDownloadStarted(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
         },
 
-        onDownloadEnded: function(aInstall) {
+        onDownloadEnded(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
         },
 
-        onDownloadFailed: function(aInstall) {
+        onDownloadFailed(aInstall) {
           ok(false, "Should not have seen onDownloadFailed event");
         },
 
-        onDownloadCancelled: function(aInstall) {
+        onDownloadCancelled(aInstall) {
           ok(false, "Should not have seen onDownloadCancelled event");
         },
 
-        onInstallStarted: function(aInstall) {
+        onInstallStarted(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
         },
 
-        onInstallEnded: function(aInstall) {
+        onInstallEnded(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
           do_execute_soon(check_test_15);
         },
 
-        onInstallFailed: function(aInstall) {
+        onInstallFailed(aInstall) {
           ok(false, "Should not have seen onInstallFailed event");
         },
 
-        onInstallCancelled: function(aInstall) {
+        onInstallCancelled(aInstall) {
           ok(false, "Should not have seen onInstallCancelled event");
         },
       });
 
       AddonManagerInternal.backgroundUpdateCheck();
     });
   });
 
@@ -962,28 +962,28 @@ for (let test of testParams) {
   add_test(function run_test_16() {
     restartManager();
 
     restartManager();
 
     let url = "http://localhost:" + gPort + "/addons/test_install2_1.xpi";
     AddonManager.getInstallForURL(url, function(aInstall) {
       aInstall.addListener({
-        onInstallEnded: function() {
+        onInstallEnded() {
          do_execute_soon(function install_2_1_ended() {
           restartManager();
 
           AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a1) {
             do_check_neq(a1.syncGUID, null);
             let oldGUID = a1.syncGUID;
 
             let url_2 = "http://localhost:" + gPort + "/addons/test_install2_2.xpi";
             AddonManager.getInstallForURL(url_2, function(aInstall_2) {
               aInstall_2.addListener({
-                onInstallEnded: function() {
+                onInstallEnded() {
                  do_execute_soon(function install_2_2_ended() {
                   restartManager();
 
                   AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
                     do_check_neq(a2.syncGUID, null);
                     do_check_eq(oldGUID, a2.syncGUID);
 
                     a2.uninstall();
@@ -1016,22 +1016,22 @@ for (let test of testParams) {
         minVersion: "0.1",
         maxVersion: "0.2"
       }],
       name: "Test Addon 9",
     }, profileDir);
     restartManager();
 
     AddonManager.addInstallListener({
-      onNewInstall: function(aInstall) {
+      onNewInstall(aInstall) {
         equal(aInstall.existingAddon.id, "addon9@tests.mozilla.org",
               "Saw unexpected onNewInstall for " + aInstall.existingAddon.id);
         do_check_eq(aInstall.version, "3.0");
       },
-      onDownloadFailed: function(aInstall) {
+      onDownloadFailed(aInstall) {
         AddonManager.getAddonByID("addon9@tests.mozilla.org", function(a9) {
           a9.uninstall();
           run_next_test();
         });
       }
     });
 
     Services.prefs.setCharPref(PREF_GETADDONS_BYIDS,
@@ -1059,25 +1059,25 @@ for (let test of testParams) {
       name: "Test Addon 10",
     }, profileDir);
     restartManager();
 
     AddonManager.getAddonByID("addon10@tests.mozilla.org", function(a10) {
       do_check_neq(a10, null);
 
       a10.findUpdates({
-        onNoCompatibilityUpdateAvailable: function() {
+        onNoCompatibilityUpdateAvailable() {
           ok(false, "Should have seen compatibility information");
         },
 
-        onUpdateAvailable: function() {
+        onUpdateAvailable() {
           ok(false, "Should not have seen an available update");
         },
 
-        onUpdateFinished: function() {
+        onUpdateFinished() {
           a10.uninstall();
           run_next_test();
         }
       }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
     });
   });
 
   // Test that the update check correctly observes when an addon opts-in to
@@ -1096,25 +1096,25 @@ for (let test of testParams) {
       name: "Test Addon 11",
     }, profileDir);
     restartManager();
 
     AddonManager.getAddonByID("addon11@tests.mozilla.org", function(a11) {
       do_check_neq(a11, null);
 
       a11.findUpdates({
-        onCompatibilityUpdateAvailable: function() {
+        onCompatibilityUpdateAvailable() {
           ok(false, "Should have not have seen compatibility information");
         },
 
-        onUpdateAvailable: function() {
+        onUpdateAvailable() {
           ok(false, "Should not have seen an available update");
         },
 
-        onUpdateFinished: function() {
+        onUpdateFinished() {
           a11.uninstall();
           run_next_test();
         }
      }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
     });
   });
 
   // Test that the update succeeds when the update.rdf URN contains a type prefix
@@ -1370,25 +1370,25 @@ add_test(function run_test_locked_instal
     name: "Test Addon 13",
   }, lockedDir);
   restartManager();
 
   AddonManager.getAddonByID("addon13@tests.mozilla.org", function(a13) {
     do_check_neq(a13, null);
 
     a13.findUpdates({
-      onCompatibilityUpdateAvailable: function() {
+      onCompatibilityUpdateAvailable() {
         ok(false, "Should have not have seen compatibility information");
       },
 
-      onUpdateAvailable: function() {
+      onUpdateAvailable() {
         ok(false, "Should not have seen an available update");
       },
 
-      onUpdateFinished: function() {
+      onUpdateFinished() {
         ok(true, "Should have seen an onUpdateFinished");
       }
     }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
   });
 
   AddonManager.getAllInstalls(aInstalls => {
     do_check_eq(aInstalls.length, 0);
   });
--- a/toolkit/mozapps/extensions/test/xpcshell/test_updateCancel.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_updateCancel.js
@@ -32,21 +32,21 @@ function run_test() {
 //  - ensure no callbacks after cancel
 //  - ensure update is gone
 
 // Create an addon update listener containing a promise
 // that resolves when the update is cancelled
 function makeCancelListener() {
   let updated = Promise.defer();
   return {
-    onUpdateAvailable: function(addon, install) {
+    onUpdateAvailable(addon, install) {
       updated.reject("Should not have seen onUpdateAvailable notification");
     },
 
-    onUpdateFinished: function(aAddon, aError) {
+    onUpdateFinished(aAddon, aError) {
       do_print("onUpdateCheckFinished: " + aAddon.id + " " + aError);
       updated.resolve(aError);
     },
     promise: updated.promise
   };
 }
 
 // Set up the HTTP server so that we can control when it responds
--- a/toolkit/mozapps/extensions/test/xpcshell/test_update_compatmode.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_update_compatmode.js
@@ -85,100 +85,100 @@ function end_test() {
 
 // Strict compatibility checking disabled.
 function run_test_1() {
   do_print("Testing with strict compatibility checking disabled");
   Services.prefs.setBoolPref(PREF_EM_STRICT_COMPATIBILITY, false);
   AddonManager.getAddonByID("compatmode-normal@tests.mozilla.org", function(addon) {
     do_check_neq(addon, null);
     addon.findUpdates({
-      onCompatibilityUpdateAvailable: function() {
+      onCompatibilityUpdateAvailable() {
         do_throw("Should have not have seen compatibility information");
       },
 
-      onNoUpdateAvailable: function() {
+      onNoUpdateAvailable() {
         do_throw("Should have seen an available update");
       },
 
-      onUpdateAvailable: function(unused, install) {
+      onUpdateAvailable(unused, install) {
         do_check_eq(install.version, "2.0")
       },
 
-      onUpdateFinished: function() {
+      onUpdateFinished() {
         run_test_2();
       }
     }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
   });
 }
 
 // Strict compatibility checking enabled.
 function run_test_2() {
   do_print("Testing with strict compatibility checking enabled");
   Services.prefs.setBoolPref(PREF_EM_STRICT_COMPATIBILITY, true);
   AddonManager.getAddonByID("compatmode-strict@tests.mozilla.org", function(addon) {
     do_check_neq(addon, null);
     addon.findUpdates({
-      onCompatibilityUpdateAvailable: function() {
+      onCompatibilityUpdateAvailable() {
         do_throw("Should have not have seen compatibility information");
       },
 
-      onNoUpdateAvailable: function() {
+      onNoUpdateAvailable() {
         do_throw("Should have seen an available update");
       },
 
-      onUpdateAvailable: function(unused, install) {
+      onUpdateAvailable(unused, install) {
         do_check_eq(install.version, "2.0")
       },
 
-      onUpdateFinished: function() {
+      onUpdateFinished() {
         run_test_3();
       }
     }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
   });
 }
 
 // Strict compatibility checking opt-in.
 function run_test_3() {
   do_print("Testing with strict compatibility disabled, but addon opt-in");
   Services.prefs.setBoolPref(PREF_EM_STRICT_COMPATIBILITY, false);
   AddonManager.getAddonByID("compatmode-strict-optin@tests.mozilla.org", function(addon) {
     do_check_neq(addon, null);
     addon.findUpdates({
-      onCompatibilityUpdateAvailable: function() {
+      onCompatibilityUpdateAvailable() {
         do_throw("Should have not have seen compatibility information");
       },
 
-      onUpdateAvailable: function() {
+      onUpdateAvailable() {
         do_throw("Should not have seen an available update");
       },
 
-      onUpdateFinished: function() {
+      onUpdateFinished() {
         run_test_4();
       }
     }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
   });
 }
 
 // Compatibility checking disabled.
 function run_test_4() {
   do_print("Testing with all compatibility checking disabled");
   AddonManager.checkCompatibility = false;
   AddonManager.getAddonByID("compatmode-ignore@tests.mozilla.org", function(addon) {
     do_check_neq(addon, null);
     addon.findUpdates({
-      onCompatibilityUpdateAvailable: function() {
+      onCompatibilityUpdateAvailable() {
         do_throw("Should have not have seen compatibility information");
       },
 
-      onNoUpdateAvailable: function() {
+      onNoUpdateAvailable() {
         do_throw("Should have seen an available update");
       },
 
-      onUpdateAvailable: function(unused, install) {
+      onUpdateAvailable(unused, install) {
         do_check_eq(install.version, "2.0")
       },
 
-      onUpdateFinished: function() {
+      onUpdateFinished() {
         end_test();
       }
     }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_update_ignorecompat.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_update_ignorecompat.js
@@ -47,22 +47,22 @@ for (let test of testParams) {
         maxVersion: "0.2"
       }],
       name: "Test Addon 9",
     }, profileDir);
 
     restartManager();
 
     AddonManager.addInstallListener({
-      onNewInstall: function(aInstall) {
+      onNewInstall(aInstall) {
         if (aInstall.existingAddon.id != "addon9@tests.mozilla.org")
           do_throw("Saw unexpected onNewInstall for " + aInstall.existingAddon.id);
         do_check_eq(aInstall.version, "4.0");
       },
-      onDownloadFailed: function(aInstall) {
+      onDownloadFailed(aInstall) {
         run_next_test();
       }
     });
 
     Services.prefs.setCharPref(PREF_GETADDONS_BYIDS_PERFORMANCE,
                                "http://localhost:" + gPort + "/data/" + updateFile);
     Services.prefs.setBoolPref(PREF_GETADDONS_CACHE_ENABLED, true);
 
@@ -85,23 +85,23 @@ for (let test of testParams) {
     }, profileDir);
 
     restartManager();
 
     AddonManager.getAddonByID("addon11@tests.mozilla.org", function(a11) {
       do_check_neq(a11, null);
 
       a11.findUpdates({
-        onCompatibilityUpdateAvailable: function() {
+        onCompatibilityUpdateAvailable() {
           do_throw("Should not have seen compatibility information");
         },
 
-        onUpdateAvailable: function() {
+        onUpdateAvailable() {
           do_throw("Should not have seen an available update");
         },
 
-        onUpdateFinished: function() {
+        onUpdateFinished() {
           run_next_test();
         }
       }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
     });
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_update_strictcompat.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_update_strictcompat.js
@@ -115,63 +115,63 @@ for (let test of testParams) {
 
       a1.applyBackgroundUpdates = AddonManager.AUTOUPDATE_DISABLE;
 
       prepare_test({}, [
         "onNewInstall",
       ]);
 
       a1.findUpdates({
-        onNoCompatibilityUpdateAvailable: function(addon) {
+        onNoCompatibilityUpdateAvailable(addon) {
           ok(false, "Should not have seen onNoCompatibilityUpdateAvailable notification");
         },
 
-        onUpdateAvailable: function(addon, install) {
+        onUpdateAvailable(addon, install) {
           ensure_test_completed();
 
           AddonManager.getAllInstalls(function(aInstalls) {
             do_check_eq(aInstalls.length, 1);
             do_check_eq(aInstalls[0], install);
 
             do_check_eq(addon, a1);
             do_check_eq(install.name, addon.name);
             do_check_eq(install.version, "2.0");
             do_check_eq(install.state, AddonManager.STATE_AVAILABLE);
             do_check_eq(install.existingAddon, addon);
             do_check_eq(install.releaseNotesURI.spec, "http://example.com/updateInfo.xhtml");
 
             // Verify that another update check returns the same AddonInstall
             a1.findUpdates({
-              onNoCompatibilityUpdateAvailable: function() {
+              onNoCompatibilityUpdateAvailable() {
                 ok(false, "Should not have seen onNoCompatibilityUpdateAvailable notification");
               },
 
-              onUpdateAvailable: function(newAddon, newInstall) {
+              onUpdateAvailable(newAddon, newInstall) {
                 AddonManager.getAllInstalls(function(aInstalls2) {
                   do_check_eq(aInstalls2.length, 1);
                   do_check_eq(aInstalls2[0], install);
                   do_check_eq(newAddon, addon);
                   do_check_eq(newInstall, install);
 
                   prepare_test({}, [
                     "onDownloadStarted",
                     "onDownloadEnded",
                   ], check_test_1);
                   install.install();
                 });
               },
 
-              onNoUpdateAvailable: function() {
+              onNoUpdateAvailable() {
                 ok(false, "Should not have seen onNoUpdateAvailable notification");
               }
             }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
           });
         },
 
-        onNoUpdateAvailable: function(addon) {
+        onNoUpdateAvailable(addon) {
           ok(false, "Should not have seen onNoUpdateAvailable notification");
         }
       }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
     });
   });
 
   let run_test_2;
   check_test_1 = (install) => {
@@ -181,25 +181,25 @@ for (let test of testParams) {
     return false;
   };
 
   // Continue installing the update.
   let check_test_2;
   run_test_2 = (install) => {
     // Verify that another update check returns no new update
     install.existingAddon.findUpdates({
-      onNoCompatibilityUpdateAvailable: function(addon) {
+      onNoCompatibilityUpdateAvailable(addon) {
         ok(false, "Should not have seen onNoCompatibilityUpdateAvailable notification");
       },
 
-      onUpdateAvailable: function() {
+      onUpdateAvailable() {
         ok(false, "Should find no available update when one is already downloading");
       },
 
-      onNoUpdateAvailable: function(addon) {
+      onNoUpdateAvailable(addon) {
         AddonManager.getAllInstalls(function(aInstalls) {
           do_check_eq(aInstalls.length, 1);
           do_check_eq(aInstalls[0], install);
 
           prepare_test({
             "addon1@tests.mozilla.org": [
               "onInstalling"
             ]
@@ -249,27 +249,27 @@ for (let test of testParams) {
     AddonManager.getAddonByID("addon2@tests.mozilla.org", function(a2) {
       do_check_neq(a2, null);
       do_check_false(a2.isActive);
       do_check_false(a2.isCompatible);
       do_check_true(a2.appDisabled);
       do_check_true(a2.isCompatibleWith("0", "0"));
 
       a2.findUpdates({
-        onCompatibilityUpdateAvailable: function(addon) {
+        onCompatibilityUpdateAvailable(addon) {
           do_check_true(a2.isCompatible);
           do_check_false(a2.appDisabled);
           do_check_false(a2.isActive);
         },
 
-        onUpdateAvailable: function(addon, install) {
+        onUpdateAvailable(addon, install) {
           ok(false, "Should not have seen an available update");
         },
 
-        onNoUpdateAvailable: function(addon) {
+        onNoUpdateAvailable(addon) {
           do_check_eq(addon, a2);
           do_execute_soon(check_test_3);
         }
       }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
     });
   });
 
   check_test_3 = () => {
@@ -292,29 +292,29 @@ for (let test of testParams) {
       do_check_false(a3.isActive);
       do_check_false(a3.isCompatible);
       do_check_true(a3.appDisabled);
       do_check_true(a3.isCompatibleWith("5", "5"));
       do_check_false(a3.isCompatibleWith("2", "2"));
 
       a3.findUpdates({
         sawUpdate: false,
-        onCompatibilityUpdateAvailable: function(addon) {
+        onCompatibilityUpdateAvailable(addon) {
           ok(false, "Should not have seen compatibility information");
         },
 
-        onNoCompatibilityUpdateAvailable: function(addon) {
+        onNoCompatibilityUpdateAvailable(addon) {
           this.sawUpdate = true;
         },
 
-        onUpdateAvailable: function(addon, install) {
+        onUpdateAvailable(addon, install) {
           ok(false, "Should not have seen an available update");
         },
 
-        onNoUpdateAvailable: function(addon) {
+        onNoUpdateAvailable(addon) {
           do_check_true(this.sawUpdate);
           run_next_test();
         }
       }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
     });
   });
 
   // Checks that compatibility info for future apps are detected but don't make
@@ -326,32 +326,32 @@ for (let test of testParams) {
       do_check_false(a3.isActive);
       do_check_false(a3.isCompatible);
       do_check_true(a3.appDisabled);
       do_check_true(a3.isCompatibleWith("5", "5"));
       do_check_false(a3.isCompatibleWith("2", "2"));
 
       a3.findUpdates({
         sawUpdate: false,
-        onCompatibilityUpdateAvailable: function(addon) {
+        onCompatibilityUpdateAvailable(addon) {
           do_check_false(a3.isCompatible);
           do_check_true(a3.appDisabled);
           do_check_false(a3.isActive);
           this.sawUpdate = true;
         },
 
-        onNoCompatibilityUpdateAvailable: function(addon) {
+        onNoCompatibilityUpdateAvailable(addon) {
           ok(false, "Should have seen some compatibility information");
         },
 
-        onUpdateAvailable: function(addon, install) {
+        onUpdateAvailable(addon, install) {
           ok(false, "Should not have seen an available update");
         },
 
-        onNoUpdateAvailable: function(addon) {
+        onNoUpdateAvailable(addon) {
           do_check_true(this.sawUpdate);
           do_execute_soon(check_test_5);
         }
       }, AddonManager.UPDATE_WHEN_USER_REQUESTED, "3.0", "3.0");
     });
   });
 
   check_test_5 = () => {
@@ -591,28 +591,28 @@ for (let test of testParams) {
           a5_2.uninstall();
           a6_2.uninstall();
 
           restartManager();
           run_next_test();
         }
 
         let compatListener = {
-          onUpdateFinished: function(addon, error) {
+          onUpdateFinished(addon, error) {
             if (--count == 0)
               do_execute_soon(next_test);
           }
         };
 
         let updateListener = {
-          onUpdateAvailable: function(addon, update) {
+          onUpdateAvailable(addon, update) {
             // Dummy so the update checker knows we care about new versions
           },
 
-          onUpdateFinished: function(addon, error) {
+          onUpdateFinished(addon, error) {
             if (--count == 0)
               do_execute_soon(next_test);
           }
         };
 
         a1_2.findUpdates(updateListener, AddonManager.UPDATE_WHEN_USER_REQUESTED);
         a2_2.findUpdates(compatListener, AddonManager.UPDATE_WHEN_ADDON_INSTALLED);
         a3_2.findUpdates(updateListener, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
@@ -648,31 +648,31 @@ for (let test of testParams) {
     });
   });
 
   // Tests that a normal update check won't decrease a targetApplication's
   // maxVersion.
   add_test(function run_test_10() {
     AddonManager.getAddonByID("addon4@tests.mozilla.org", function(a4) {
       a4.findUpdates({
-        onUpdateFinished: function(addon) {
+        onUpdateFinished(addon) {
           do_check_true(addon.isCompatible, "addon4 is compatible");
 
           run_next_test();
         }
       }, AddonManager.UPDATE_WHEN_PERIODIC_UPDATE);
     });
   });
 
   // Tests that an update check for a new application will decrease a
   // targetApplication's maxVersion.
   add_test(function run_test_11() {
     AddonManager.getAddonByID("addon4@tests.mozilla.org", function(a4) {
       a4.findUpdates({
-        onUpdateFinished: function(addon) {
+        onUpdateFinished(addon) {
           do_check_false(addon.isCompatible, "addon4 is compatible");
 
           run_next_test();
         }
       }, AddonManager.UPDATE_WHEN_NEW_APP_INSTALLED);
     });
   });
 
@@ -714,25 +714,25 @@ for (let test of testParams) {
       do_check_neq(a7, null);
       do_check_false(a7.isActive);
       do_check_false(a7.isCompatible);
       do_check_true(a7.appDisabled);
       do_check_true(a7.isCompatibleWith("0", "0"));
 
       a7.findUpdates({
         sawUpdate: false,
-        onCompatibilityUpdateAvailable: function(addon) {
+        onCompatibilityUpdateAvailable(addon) {
           ok(false, "Should not have seen compatibility information");
         },
 
-        onUpdateAvailable: function(addon, install) {
+        onUpdateAvailable(addon, install) {
           ok(false, "Should not have seen an available update");
         },
 
-        onUpdateFinished: function(addon) {
+        onUpdateFinished(addon) {
           do_check_true(addon.isCompatible);
           do_execute_soon(check_test_13);
         }
       }, AddonManager.UPDATE_WHEN_NEW_APP_DETECTED, "3.0", "3.0");
     });
   });
 
   check_test_13 = () => {
@@ -781,54 +781,54 @@ for (let test of testParams) {
     restartManager();
 
     AddonManager.getAddonByID("addon8@tests.mozilla.org", function(a8) {
       a8.applyBackgroundUpdates = AddonManager.AUTOUPDATE_DISABLE;
 
       // The background update check will find updates for both add-ons but only
       // proceed to install one of them.
       AddonManager.addInstallListener({
-        onNewInstall: function(aInstall) {
+        onNewInstall(aInstall) {
           let id = aInstall.existingAddon.id;
           ok((id == "addon1@tests.mozilla.org" || id == "addon8@tests.mozilla.org"),
              "Saw unexpected onNewInstall for " + id);
         },
 
-        onDownloadStarted: function(aInstall) {
+        onDownloadStarted(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
         },
 
-        onDownloadEnded: function(aInstall) {
+        onDownloadEnded(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
         },
 
-        onDownloadFailed: function(aInstall) {
+        onDownloadFailed(aInstall) {
           ok(false, "Should not have seen onDownloadFailed event");
         },
 
-        onDownloadCancelled: function(aInstall) {
+        onDownloadCancelled(aInstall) {
           ok(false, "Should not have seen onDownloadCancelled event");
         },
 
-        onInstallStarted: function(aInstall) {
+        onInstallStarted(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
         },
 
-        onInstallEnded: function(aInstall) {
+        onInstallEnded(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
           do_check_eq(aInstall.existingAddon.pendingUpgrade.install, aInstall);
 
           do_execute_soon(check_test_14);
         },
 
-        onInstallFailed: function(aInstall) {
+        onInstallFailed(aInstall) {
           ok(false, "Should not have seen onInstallFailed event");
         },
 
-        onInstallCancelled: function(aInstall) {
+        onInstallCancelled(aInstall) {
           ok(false, "Should not have seen onInstallCancelled event");
         },
       });
 
       AddonManagerInternal.backgroundUpdateCheck();
     });
   });
 
@@ -882,52 +882,52 @@ for (let test of testParams) {
 
     AddonManager.getAddonByID("addon8@tests.mozilla.org", function(a8) {
       a8.uninstall();
       do_check_false(hasFlag(a8.permissions, AddonManager.PERM_CAN_UPGRADE));
 
       // The background update check will find updates for both add-ons but only
       // proceed to install one of them.
       AddonManager.addInstallListener({
-        onNewInstall: function(aInstall) {
+        onNewInstall(aInstall) {
           let id = aInstall.existingAddon.id;
           ok((id == "addon1@tests.mozilla.org" || id == "addon8@tests.mozilla.org"),
              "Saw unexpected onNewInstall for " + id);
         },
 
-        onDownloadStarted: function(aInstall) {
+        onDownloadStarted(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
         },
 
-        onDownloadEnded: function(aInstall) {
+        onDownloadEnded(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
         },
 
-        onDownloadFailed: function(aInstall) {
+        onDownloadFailed(aInstall) {
           ok(false, "Should not have seen onDownloadFailed event");
         },
 
-        onDownloadCancelled: function(aInstall) {
+        onDownloadCancelled(aInstall) {
           ok(false, "Should not have seen onDownloadCancelled event");
         },
 
-        onInstallStarted: function(aInstall) {
+        onInstallStarted(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
         },
 
-        onInstallEnded: function(aInstall) {
+        onInstallEnded(aInstall) {
           do_check_eq(aInstall.existingAddon.id, "addon1@tests.mozilla.org");
           do_execute_soon(check_test_15);
         },
 
-        onInstallFailed: function(aInstall) {
+        onInstallFailed(aInstall) {
           ok(false, "Should not have seen onInstallFailed event");
         },
 
-        onInstallCancelled: function(aInstall) {
+        onInstallCancelled(aInstall) {
           ok(false, "Should not have seen onInstallCancelled event");
         },
       });
 
       AddonManagerInternal.backgroundUpdateCheck();
     });
   });
 
@@ -959,22 +959,22 @@ for (let test of testParams) {
         minVersion: "0.1",
         maxVersion: "0.2"
       }],
       name: "Test Addon 9",
     }, profileDir);
     restartManager();
 
     AddonManager.addInstallListener({
-      onNewInstall: function(aInstall) {
+      onNewInstall(aInstall) {
         equal(aInstall.existingAddon.id, "addon9@tests.mozilla.org",
               "Saw unexpected onNewInstall for " + aInstall.existingAddon.id);
         do_check_eq(aInstall.version, "2.0");
       },
-      onDownloadFailed: function(aInstall) {
+      onDownloadFailed(aInstall) {
         AddonManager.getAddonByID("addon9@tests.mozilla.org", function(a9) {
           a9.uninstall();
           run_next_test();
         });
       }
     });
 
     Services.prefs.setCharPref(PREF_GETADDONS_BYIDS,
@@ -1002,25 +1002,25 @@ for (let test of testParams) {
       name: "Test Addon 11",
     }, profileDir);
     restartManager();
 
     AddonManager.getAddonByID("addon11@tests.mozilla.org", function(a11) {
       do_check_neq(a11, null);
 
       a11.findUpdates({
-        onCompatibilityUpdateAvailable: function() {
+        onCompatibilityUpdateAvailable() {
           ok(false, "Should have not have seen compatibility information");
         },
 
-        onUpdateAvailable: function() {
+        onUpdateAvailable() {
           ok(false, "Should not have seen an available update");
         },
 
-        onUpdateFinished: function() {
+        onUpdateFinished() {
           run_next_test();
         }
       }, AddonManager.UPDATE_WHEN_USER_REQUESTED);
     });
   });
 
   add_task(function* cleanup() {
     let addons = yield AddonManager.getAddonsByTypes(["extension"]);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_updatecheck.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_updatecheck.js
@@ -11,17 +11,17 @@ Components.utils.import("resource://test
 var testserver = createHttpServer(4444);
 testserver.registerDirectory("/data/", do_get_file("data"));
 
 function checkUpdates(aId, aUpdateKey, aUpdateFile) {
   return new Promise((resolve, reject) => {
     AddonUpdateChecker.checkForUpdates(aId, aUpdateKey, `http://localhost:4444/data/${aUpdateFile}`, {
       onUpdateCheckComplete: resolve,
 
-      onUpdateCheckError: function(status) {
+      onUpdateCheckError(status) {
         let error = new Error("Update check failed with status " + status);
         error.status = status;
         reject(error);
       }
     });
   });
 }
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_webextension.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_webextension.js
@@ -383,17 +383,17 @@ add_task(function* developerShouldOverri
   addon.uninstall();
 });
 
 add_task(function* developerEmpty() {
   for (let developer of [{}, null, {name: null, url: null}]) {
     let addon = yield promiseInstallWebExtension({
       manifest: {
         author: "Some author",
-        developer: developer,
+        developer,
         homepage_url: "https://example.net",
         manifest_version: 2,
         name: "Web Extension Name",
         version: "1.0",
       }
     });
 
     addon = yield promiseAddonByID(addon.id);
@@ -402,17 +402,17 @@ add_task(function* developerEmpty() {
     addon.uninstall();
   }
 });
 
 add_task(function* authorNotString() {
   for (let author of [{}, [], 42]) {
     let addon = yield promiseInstallWebExtension({
       manifest: {
-        author: author,
+        author,
         manifest_version: 2,
         name: "Web Extension Name",
         version: "1.0",
       }
     });
 
     addon = yield promiseAddonByID(addon.id);
     equal(addon.creator, null);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_webextension_install.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_webextension_install.js
@@ -106,22 +106,22 @@ add_task(function* test_multiple_no_id_e
   const manifest = {
     name: "no ID",
     description: "extension without an ID",
     manifest_version: 2,
     version: "1.0"
   };
 
   let extension1 = ExtensionTestUtils.loadExtension({
-    manifest: manifest,
+    manifest,
     useAddonManager: "temporary",
   });
 
   let extension2 = ExtensionTestUtils.loadExtension({
-    manifest: manifest,
+    manifest,
     useAddonManager: "temporary",
   });
 
   yield Promise.all([extension1.startup(), extension2.startup()]);
 
   const allAddons = yield AddonManager.getAllAddons();
 
   do_print(`Found these add-ons: ${allAddons.map(a => a.name).join(", ")}`);
@@ -150,17 +150,17 @@ add_task(function* test_bss_id() {
       }
     }
   };
 
   let addon = yield promiseAddonByID(ID);
   equal(addon, null, "Add-on is not installed");
 
   let extension = ExtensionTestUtils.loadExtension({
-    manifest: manifest,
+    manifest,
     useAddonManager: "temporary",
   });
   yield extension.startup();
 
   addon = yield promiseAddonByID(ID);
   notEqual(addon, null, "Add-on is installed");
 
   yield extension.unload();
@@ -187,17 +187,17 @@ add_task(function* test_two_ids() {
     browser_specific_settings: {
       gecko: {
         id: GOOD_ID
       }
     }
   }
 
   let extension = ExtensionTestUtils.loadExtension({
-    manifest: manifest,
+    manifest,
     useAddonManager: "temporary",
   });
   yield extension.startup();
 
   let addon = yield promiseAddonByID(BAD_ID);
   equal(addon, null, "Add-on is not found using bad ID");
   addon = yield promiseAddonByID(GOOD_ID);
   notEqual(addon, null, "Add-on is found using good ID");
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger.js
@@ -10,17 +10,17 @@ function test() {
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: TESTROOT + "amosigned.xpi",
       IconURL: TESTROOT + "icon.png",
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function confirm_install(window) {
   var items = window.document.getElementById("itemList").childNodes;
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger_iframe.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger_iframe.js
@@ -11,17 +11,17 @@ function test() {
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var inner_url = encodeURIComponent(TESTROOT + "installtrigger.html?" + encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: TESTROOT + "amosigned.xpi",
       IconURL: TESTROOT + "icon.png",
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   })));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger_frame.html?" + inner_url);
 }
 
 function confirm_install(window) {
   var items = window.document.getElementById("itemList").childNodes;
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_badhash.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_badhash.js
@@ -8,17 +8,17 @@ function test() {
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: TESTROOT + "amosigned.xpi",
       Hash: "sha1:643b08418599ddbd1ea8a511c90696578fb844b9",
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function download_failed(install) {
   is(install.error, AddonManager.ERROR_INCORRECT_HASH, "Install should fail");
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_badhashtype.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_badhashtype.js
@@ -8,17 +8,17 @@ function test() {
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: TESTROOT + "amosigned.xpi",
       Hash: "foo:3d0dc22e1f394e159b08aaf5f0f97de4d5c65f4f",
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function download_failed(install) {
   is(install.error, AddonManager.ERROR_INCORRECT_HASH, "Install should fail");
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js
@@ -5,17 +5,17 @@ add_task(function * ()
   let testtab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, TESTROOT + "bug638292.html");
 
   function* verify(link, button)
   {
     info("Clicking " + link);
 
     let waitForNewTabPromise = BrowserTestUtils.waitForNewTab(gBrowser);
 
-    yield BrowserTestUtils.synthesizeMouseAtCenter("#" + link, { button: button },
+    yield BrowserTestUtils.synthesizeMouseAtCenter("#" + link, { button },
                                                    gBrowser.selectedBrowser);
 
     let newtab = yield waitForNewTabPromise;
 
     yield BrowserTestUtils.browserLoaded(newtab.linkedBrowser);
 
     let result = yield ContentTask.spawn(newtab.linkedBrowser, { }, function* () {
       return (content.document.getElementById("enabled").textContent == "true");
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_concurrent_installs.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_concurrent_installs.js
@@ -16,34 +16,34 @@ function frame_script() {
 
     content.addEventListener("InstallComplete", (e) => {
       sendAsyncMessage("Test:InstallComplete", e.detail);
     }, true);
   }, true);
 }
 
 var gAddonAndWindowListener = {
-  onOpenWindow: function(win) {
+  onOpenWindow(win) {
     var window = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow);
     info("Window opened");
 
     waitForFocus(function() {
       info("Focused!");
       // Initially the accept button is disabled on a countdown timer
       let button = window.document.documentElement.getButton("accept");
       button.disabled = false;
       if (gQueuedForInstall.length > 0) {
         // Start downloading the next add-on while we accept this dialog:
         installNext();
       }
       window.document.documentElement.acceptDialog();
     }, window);
   },
-  onCloseWindow: function(win) { },
-  onInstallEnded: function(install) {
+  onCloseWindow(win) { },
+  onInstallEnded(install) {
     install.cancel();
   },
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediatorListener])
 };
 
 function installNext() {
   let tab = gQueuedForInstall.shift();
   tab.linkedBrowser.messageManager.sendAsyncMessage("Test:StartInstall");
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_hash.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_hash.js
@@ -8,17 +8,17 @@ function test() {
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: TESTROOT + "amosigned.xpi",
       Hash: "sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9",
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function install_ended(install, addon) {
   install.cancel();
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js
@@ -8,17 +8,17 @@ function test() {
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: TESTROOT + "amosigned.xpi",
       Hash: "sha1:36FFB0ACFD9C6E9682473AAEBAAB394D38B473C9",
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function install_ended(install, addon) {
   install.cancel();
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js
@@ -12,17 +12,17 @@ function test() {
   Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false);
 
   var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
   url += "?sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9|" + TESTROOT + "amosigned.xpi";
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: url,
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function install_ended(install, addon) {
   install.cancel();
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash2.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash2.js
@@ -12,17 +12,17 @@ function test() {
   Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false);
 
   var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
   url += "?sha1:foobar|" + TESTROOT + "amosigned.xpi";
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: url,
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function download_failed(install) {
   is(install.error, AddonManager.ERROR_INCORRECT_HASH, "Download should fail");
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js
@@ -12,17 +12,17 @@ function test() {
 
   var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
   url += "?sha1:foobar|" + TESTROOT + "amosigned.xpi";
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: url,
       Hash: "sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9",
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function install_ended(install, addon) {
   install.cancel();
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash4.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash4.js
@@ -10,17 +10,17 @@ function test() {
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var url = "http://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
   url += "?sha1:foobar|" + TESTROOT + "amosigned.xpi";
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: url,
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function install_ended(install, addon) {
   install.cancel();
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js
@@ -13,17 +13,17 @@ function test() {
   var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
   url += "?sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9|";
   url += "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
   url += "?sha1:foobar|" + TESTROOT + "amosigned.xpi";
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: url,
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function install_ended(install, addon) {
   install.cancel();
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash6.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash6.js
@@ -29,17 +29,17 @@ function test() {
     "Location": "http://example.com/browser/" + RELATIVE_DIR + "amosigned.xpi"
   });
 
   var url = "https://example.com/browser/" + RELATIVE_DIR + "redirect.sjs?mode=redirect";
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: url,
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function download_failed(install) {
   is(install.error, AddonManager.ERROR_INCORRECT_HASH, "Should have seen a hash failure");
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_relative.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_relative.js
@@ -9,17 +9,17 @@ function test() {
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: "amosigned.xpi",
       IconURL: "icon.png",
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function confirm_install(window) {
   var items = window.document.getElementById("itemList").childNodes;
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_switchtab.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_switchtab.js
@@ -11,17 +11,17 @@ function test() {
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: TESTROOT + "amosigned.xpi",
       IconURL: TESTROOT + "icon.png",
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   expectedTab = gBrowser.addTab();
   expectedTab.linkedBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function confirm_install(window) {
   var items = window.document.getElementById("itemList").childNodes;
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger.js
@@ -10,17 +10,17 @@ function test() {
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var triggers = encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: TESTROOT + "unsigned.xpi",
       IconURL: TESTROOT + "icon.png",
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
 }
 
 function confirm_install(window) {
   var items = window.document.getElementById("itemList").childNodes;
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_iframe.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_iframe.js
@@ -11,17 +11,17 @@ function test() {
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var inner_url = encodeURIComponent(TESTROOT + "installtrigger.html?" + encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: TESTROOT + "unsigned.xpi",
       IconURL: TESTROOT + "icon.png",
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   })));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT + "installtrigger_frame.html?" + inner_url);
 }
 
 function confirm_install(window) {
   var items = window.document.getElementById("itemList").childNodes;
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_xorigin.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_xorigin.js
@@ -11,17 +11,17 @@ function test() {
 
   var pm = Services.perms;
   pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
 
   var inner_url = encodeURIComponent(TESTROOT + "installtrigger.html?" + encodeURIComponent(JSON.stringify({
     "Unsigned XPI": {
       URL: TESTROOT + "amosigned.xpi",
       IconURL: TESTROOT + "icon.png",
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   })));
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.loadURI(TESTROOT2 + "installtrigger_frame.html?" + inner_url);
 }
 
 function install_blocked(installInfo) {
   wasOriginBlocked = true;
--- a/toolkit/mozapps/extensions/test/xpinstall/head.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/head.js
@@ -93,17 +93,17 @@ var Harness = {
 
   waitingForFinish: false,
 
   // A unique value to return from the installConfirmCallback to indicate that
   // the install UI shouldn't be closed automatically
   leaveOpen: {},
 
   // Setup and tear down functions
-  setup: function() {
+  setup() {
     if (!this.waitingForFinish) {
       waitForExplicitFinish();
       this.waitingForFinish = true;
 
       Services.prefs.setBoolPref(PREF_INSTALL_REQUIRESECUREORIGIN, false);
 
       Services.prefs.setBoolPref(PREF_LOGGING_ENABLED, true);
       Services.obs.addObserver(this, "addon-install-started", false);
@@ -142,21 +142,21 @@ var Harness = {
       });
     }
 
     this.installCount = 0;
     this.pendingCount = 0;
     this.runningInstalls = [];
   },
 
-  finish: function() {
+  finish() {
     finish();
   },
 
-  endTest: function() {
+  endTest() {
     let callback = this.installsCompletedCallback;
     let count = this.installCount;
 
     is(this.runningInstalls.length, 0, "Should be no running installs left");
     this.runningInstalls.forEach(function(aInstall) {
       info("Install for " + aInstall.sourceURI + " is in state " + aInstall.state);
     });
 
@@ -175,17 +175,17 @@ var Harness = {
     this.installsCompletedCallback = null;
     this.runningInstalls = null;
 
     if (callback)
       executeSoon(() => callback(count));
   },
 
   // Window open handling
-  windowReady: function(window) {
+  windowReady(window) {
     if (window.document.location.href == XPINSTALL_URL) {
       if (this.installBlockedCallback)
         ok(false, "Should have been blocked by the whitelist");
       this.pendingCount = window.document.getElementById("itemList").childNodes.length;
 
       // If there is a confirm callback then its return status determines whether
       // to install the items or not. If not the test is over.
       let result = true;
@@ -237,43 +237,43 @@ var Harness = {
                 ok(false, "prompt type " + promptType + " not handled in test.");
                 break;
       }
     }
   },
 
   // Install blocked handling
 
-  installDisabled: function(installInfo) {
+  installDisabled(installInfo) {
     ok(!!this.installDisabledCallback, "Installation shouldn't have been disabled");
     if (this.installDisabledCallback)
       this.installDisabledCallback(installInfo);
     this.expectingCancelled = true;
     this.expectingCancelled = false;
     this.endTest();
   },
 
-  installCancelled: function(installInfo) {
+  installCancelled(installInfo) {
     if (this.expectingCancelled)
       return;
 
     ok(!!this.installCancelledCallback, "Installation shouldn't have been cancelled");
     if (this.installCancelledCallback)
       this.installCancelledCallback(installInfo);
     this.endTest();
   },
 
-  installOriginBlocked: function(installInfo) {
+  installOriginBlocked(installInfo) {
     ok(!!this.installOriginBlockedCallback, "Shouldn't have been blocked");
     if (this.installOriginBlockedCallback)
       this.installOriginBlockedCallback(installInfo);
     this.endTest();
   },
 
-  installBlocked: function(installInfo) {
+  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 {
       this.expectingCancelled = true;
       installInfo.installs.forEach(function(install) {
@@ -281,34 +281,34 @@ var Harness = {
       });
       this.expectingCancelled = false;
       this.endTest();
     }
   },
 
   // nsIWindowMediatorListener
 
-  onWindowTitleChange: function(window, title) {
+  onWindowTitleChange(window, title) {
   },
 
-  onOpenWindow: function(window) {
+  onOpenWindow(window) {
     var domwindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                           .getInterface(Components.interfaces.nsIDOMWindow);
     var self = this;
     waitForFocus(function() {
       self.windowReady(domwindow);
     }, domwindow);
   },
 
-  onCloseWindow: function(window) {
+  onCloseWindow(window) {
   },
 
   // Addon Install Listener
 
-  onNewInstall: function(install) {
+  onNewInstall(install) {
     this.runningInstalls.push(install);
 
     if (this.finalContentEvent && !this.waitingForEvent) {
       this.waitingForEvent = true;
       info("Waiting for " + this.finalContentEvent);
       let mm = gBrowser.selectedBrowser.messageManager;
       mm.loadFrameScript(`data:,content.addEventListener("${this.finalContentEvent}", () => { sendAsyncMessage("Test:GotNewInstallEvent"); });`, false);
       let listener = () => {
@@ -317,74 +317,74 @@ var Harness = {
         this.waitingForEvent = false;
         if (this.pendingCount == 0)
           this.endTest();
       }
       mm.addMessageListener("Test:GotNewInstallEvent", listener);
     }
   },
 
-  onDownloadStarted: function(install) {
+  onDownloadStarted(install) {
     this.pendingCount++;
     if (this.downloadStartedCallback)
       this.downloadStartedCallback(install);
   },
 
-  onDownloadProgress: function(install) {
+  onDownloadProgress(install) {
     if (this.downloadProgressCallback)
       this.downloadProgressCallback(install);
   },
 
-  onDownloadEnded: function(install) {
+  onDownloadEnded(install) {
     if (this.downloadEndedCallback)
       this.downloadEndedCallback(install);
   },
 
-  onDownloadCancelled: function(install) {
+  onDownloadCancelled(install) {
     isnot(this.runningInstalls.indexOf(install), -1,
           "Should only see cancelations for started installs");
     this.runningInstalls.splice(this.runningInstalls.indexOf(install), 1);
 
     if (this.downloadCancelledCallback)
       this.downloadCancelledCallback(install);
     this.checkTestEnded();
   },
 
-  onDownloadFailed: function(install) {
+  onDownloadFailed(install) {
     if (this.downloadFailedCallback)
       this.downloadFailedCallback(install);
     this.checkTestEnded();
   },
 
-  onInstallStarted: function(install) {
+  onInstallStarted(install) {
     if (this.installStartedCallback)
       this.installStartedCallback(install);
   },
 
-  onInstallEnded: function(install, addon) {
+  onInstallEnded(install, addon) {
     if (this.installEndedCallback)
       this.installEndedCallback(install, addon);
     this.installCount++;
     this.checkTestEnded();
   },
 
-  onInstallFailed: function(install) {
+  onInstallFailed(install) {
     if (this.installFailedCallback)
       this.installFailedCallback(install);
     this.checkTestEnded();
   },
 
-  checkTestEnded: function() {
+  checkTestEnded() {
     if (--this.pendingCount == 0 && !this.waitingForEvent)
       this.endTest();
   },
 
   // nsIObserver
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     var installInfo = subject.QueryInterface(Components.interfaces.amIWebInstallInfo);
     switch (topic) {
     case "addon-install-started":
       is(this.runningInstalls.length, installInfo.installs.length,
          "Should have seen the expected number of installs started");
       break;
     case "addon-install-disabled":
       this.installDisabled(installInfo);
--- a/toolkit/mozapps/preferences/fontbuilder.js
+++ b/toolkit/mozapps/preferences/fontbuilder.js
@@ -12,17 +12,17 @@ var FontBuilder = {
       this._enumerator = Components.classes["@mozilla.org/gfx/fontenumerator;1"]
                                    .createInstance(Components.interfaces.nsIFontEnumerator);
     }
     return this._enumerator;
   },
 
   _allFonts: null,
   _langGroupSupported: false,
-  buildFontList: function(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, { } );
--- a/toolkit/mozapps/preferences/removemp.js
+++ b/toolkit/mozapps/preferences/removemp.js
@@ -5,17 +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: function()
+  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");
 
@@ -25,22 +25,22 @@ 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: function()
+  validateInput()
   {
     this._okButton.disabled = !this._token.checkPassword(this._password.value);
   },
 
-  removePassword: function()
+  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"));
     }
--- a/toolkit/mozapps/update/content/history.js
+++ b/toolkit/mozapps/update/content/history.js
@@ -6,17 +6,17 @@
 const NS_XUL  = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
 var gUpdateHistory = {
   _view: null,
 
   /**
    * Initialize the User Interface
    */
-  onLoad: function() {
+  onLoad() {
     this._view = document.getElementById("historyItems");
 
     var um =
         Components.classes["@mozilla.org/updates/update-manager;1"].
         getService(Components.interfaces.nsIUpdateManager);
     var uc = um.updateCount;
     if (uc) {
       while (this._view.hasChildNodes())
@@ -52,17 +52,17 @@ var gUpdateHistory = {
   },
 
   /**
    * Formats a date into human readable form
    * @param   seconds
    *          A date in seconds since 1970 epoch
    * @returns A human readable date string
    */
-  _formatDate: function(seconds) {
+  _formatDate(seconds) {
     var date = new Date(seconds);
     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);
   }
--- a/toolkit/mozapps/update/content/updates.js
+++ b/toolkit/mozapps/update/content/updates.js
@@ -137,25 +137,25 @@ var gUpdates = {
    */
   _runUnload: true,
 
   /**
    * Submit on close telemtry values for the update wizard.
    * @param  pageID
    *         The page id for the last page displayed.
    */
-  _submitTelemetry: function(aPageID) {
+  _submitTelemetry(aPageID) {
     AUSTLMY.pingWizLastPageCode(aPageID);
   },
 
   /**
    * Helper function for setButtons
    * Resets button to original label & accesskey if string is null.
    */
-  _setButton: function(button, string) {
+  _setButton(button, string) {
     if (string) {
       var label = this.getAUSString(string);
       if (label.indexOf("%S") != -1)
         label = label.replace(/%S/, this.brandName);
       button.label = label;
       button.setAttribute("accesskey",
                           this.getAUSString(string + ".accesskey"));
     } else {
@@ -190,17 +190,17 @@ var gUpdates = {
    * Per Bug 324121 the wizard should not look like a wizard and to accomplish
    * this the back button is never displayed. This causes the wizard buttons to
    * be arranged as follows on Windows with the next and finish buttons never
    * being displayed at the same time.
    * +--------------------------------------------------------------+
    * | [ extra1 ] [ extra2 ]                     [ next or finish ] |
    * +--------------------------------------------------------------+
    */
-  setButtons: function(extra1ButtonString, extra2ButtonString,
+  setButtons(extra1ButtonString, extra2ButtonString,
                        nextFinishButtonString, canAdvance, showCancel) {
     this.wiz.canAdvance = canAdvance;
 
     var bnf = this.wiz.getButton(this.wiz.onLastPage ? "finish" : "next");
     var be1 = this.wiz.getButton("extra1");
     var be2 = this.wiz.getButton("extra2");
     var bc = this.wiz.getButton("cancel");
 
@@ -220,23 +220,23 @@ var gUpdates = {
     btn.hidden = btn.disabled = true;
 
     // Hide and disable the finish button if not on the last page or the next
     // button if on the last page each time setButtons is called.
     btn = this.wiz.getButton(this.wiz.onLastPage ? "next" : "finish");
     btn.hidden = btn.disabled = true;
   },
 
-  getAUSString: function(key, strings) {
+  getAUSString(key, strings) {
     if (strings)
       return this.strings.getFormattedString(key, strings);
     return this.strings.getString(key);
   },
 
-  never: function() {
+  never() {
     // If the user clicks "No Thanks", we should not prompt them to update to
     // this version again unless they manually select "Check for Updates..."
     // which will clear all of the "never" prefs. There are currently two
     // "never" prefs: the older PREFBRANCH_APP_UPDATE_NEVER as well as the
     // OSX-only PREF_APP_UPDATE_ELEVATE_NEVER. We set both of these prefs (if
     // applicable) to ensure that we don't prompt the user regardless of which
     // pref is checked.
     let neverPrefName = PREFBRANCH_APP_UPDATE_NEVER + this.update.appVersion;
@@ -254,41 +254,41 @@ var gUpdates = {
    * function calls to the appropriate page.
    */
   _pages: { },
 
   /**
    * Called when the user presses the "Finish" button on the wizard, dispatches
    * the function call to the selected page.
    */
-  onWizardFinish: function() {
+  onWizardFinish() {
     this._runUnload = false;
     var pageid = document.documentElement.currentPage.pageid;
     if ("onWizardFinish" in this._pages[pageid])
       this._pages[pageid].onWizardFinish();
     this._submitTelemetry(pageid);
   },
 
   /**
    * Called when the user presses the "Cancel" button on the wizard, dispatches
    * the function call to the selected page.
    */
-  onWizardCancel: function() {
+  onWizardCancel() {
     this._runUnload = false;
     var pageid = document.documentElement.currentPage.pageid;
     if ("onWizardCancel" in this._pages[pageid])
       this._pages[pageid].onWizardCancel();
     this._submitTelemetry(pageid);
   },
 
   /**
    * Called when the user presses the "Next" button on the wizard, dispatches
    * the function call to the selected page.
    */
-  onWizardNext: function() {
+  onWizardNext() {
     var cp = document.documentElement.currentPage;
     if (!cp)
       return;
     var pageid = cp.pageid;
     if ("onWizardNext" in this._pages[pageid])
       this._pages[pageid].onWizardNext();
   },
 
@@ -303,26 +303,26 @@ var gUpdates = {
    *   the user has the app.update.auto preference set to false.
    */
   sourceEvent: SRCEVT_FOREGROUND,
 
   /**
    * Helper function for onLoad
    * Saves default button label & accesskey for use by _setButton
    */
-  _cacheButtonStrings: function(buttonName) {
+  _cacheButtonStrings(buttonName) {
     var button = this.wiz.getButton(buttonName);
     button.defaultLabel = button.label;
     button.defaultAccesskey = button.getAttribute("accesskey");
   },
 
   /**
    * Called when the wizard UI is loaded.
    */
-  onLoad: function() {
+  onLoad() {
     this.wiz = document.documentElement;
 
     gLogEnabled = getPref("getBoolPref", PREF_APP_UPDATE_LOG, false);
 
     this.strings = document.getElementById("updateStrings");
     var brandStrings = document.getElementById("brandStrings");
     this.brandName = brandStrings.getString("brandShortName");
 
@@ -344,17 +344,17 @@ var gUpdates = {
       LOG("gUpdates", "onLoad - setting current page to startpage " + startPageID);
       gUpdates.wiz.currentPage = document.getElementById(startPageID);
     });
   },
 
   /**
    * Called when the wizard UI is unloaded.
    */
-  onUnload: function() {
+  onUnload() {
     if (this._runUnload) {
       var cp = this.wiz.currentPage;
       if (cp.pageid != "finished" && cp.pageid != "finishedBackground")
         this.onWizardCancel();
     }
   },
 
   /**
@@ -370,17 +370,17 @@ var gUpdates = {
    * showUpdateError      nsIUpdate obj failed        either      partial   errorpatching
    * showUpdateError      nsIUpdate obj failed        either      complete  errors
    * checkForUpdates      null          --            foreground  --        checking
    * checkForUpdates      null          downloading   foreground  --        downloading
    *
    * @param   aCallback
    *          A callback to pass the <wizardpage> object to be displayed first to.
    */
-  getStartPageID: function(aCallback) {
+  getStartPageID(aCallback) {
     if ("arguments" in window && window.arguments[0]) {
       var arg0 = window.arguments[0];
       if (arg0 instanceof CoI.nsIUpdate) {
         // If the first argument is a nsIUpdate object, we are notifying the
         // user that the background checking found an update that requires
         // their permission to install, and it's ready for download.
         this.setUpdate(arg0);
         if (this.update.errorCode == BACKGROUNDCHECK_MULTIPLE_FAILURES) {
@@ -470,17 +470,17 @@ var gUpdates = {
     return gUpdatesFoundPageId = "updatesfoundbasic";
   },
 
   /**
    * Sets the Update object for this wizard
    * @param   update
    *          The update object
    */
-  setUpdate: function(update) {
+  setUpdate(update) {
     this.update = update;
     if (this.update)
       this.update.QueryInterface(CoI.nsIWritablePropertyBag);
   }
 };
 
 /**
  * The "Checking for Updates" page. Provides feedback on the update checking
@@ -491,17 +491,17 @@ var gCheckingPage = {
    * The nsIUpdateChecker that is currently checking for updates. We hold onto
    * this so we can cancel the update check if the user closes the window.
    */
   _checker: null,
 
   /**
    * Initialize
    */
-  onPageShow: function() {
+  onPageShow() {
     gUpdates.setButtons(null, null, null, false, true);
     gUpdates.wiz.getButton("cancel").focus();
 
     // Clear all of the "never" prefs to handle the scenario where the user
     // clicked "never" for an update, selected "Check for Updates...", and
     // then canceled.  If we don't clear the "never" prefs future
     // notifications will never happen.
     Services.prefs.deleteBranch(PREFBRANCH_APP_UPDATE_NEVER);
@@ -525,29 +525,29 @@ var gCheckingPage = {
                     createInstance(CoI.nsIUpdateChecker);
     this._checker.checkForUpdates(this.updateListener, true);
   },
 
   /**
    * The user has closed the window, either by pressing cancel or using a Window
    * Manager control, so stop checking for updates.
    */
-  onWizardCancel: function() {
+  onWizardCancel() {
     this._checker.stopChecking(CoI.nsIUpdateChecker.CURRENT_CHECK);
   },
 
   /**
    * An object implementing nsIUpdateCheckListener that is notified as the
    * update check commences.
    */
   updateListener: {
     /**
      * See nsIUpdateCheckListener
      */
-    onCheckComplete: function(request, updates, updateCount) {
+    onCheckComplete(request, updates, updateCount) {
       var aus = CoC["@mozilla.org/updates/update-service;1"].
                 getService(CoI.nsIApplicationUpdateService);
       gUpdates.setUpdate(aus.selectUpdate(updates, updates.length));
       if (gUpdates.update) {
         LOG("gCheckingPage", "onCheckComplete - update found");
         if (gUpdates.update.unsupported) {
           gUpdates.wiz.goTo("unsupported");
           return;
@@ -567,42 +567,42 @@ var gCheckingPage = {
 
       LOG("gCheckingPage", "onCheckComplete - no update found");
       gUpdates.wiz.goTo("noupdatesfound");
     },
 
     /**
      * See nsIUpdateCheckListener
      */
-    onError: function(request, update) {
+    onError(request, update) {
       LOG("gCheckingPage", "onError - proceeding to error page");
       gUpdates.setUpdate(update);
       gUpdates.wiz.goTo("errors");
     },
 
     /**
      * See nsISupports.idl
      */
-    QueryInterface: function(aIID) {
+    QueryInterface(aIID) {
       if (!aIID.equals(CoI.nsIUpdateCheckListener) &&
           !aIID.equals(CoI.nsISupports))
         throw CoR.NS_ERROR_NO_INTERFACE;
       return this;
     }
   }
 };
 
 /**
  * The "No Updates Are Available" page
  */
 var gNoUpdatesPage = {
   /**
    * Initialize
    */
-  onPageShow: function() {
+  onPageShow() {
     LOG("gNoUpdatesPage", "onPageShow - could not select an appropriate " +
         "update. Either there were no updates or |selectUpdate| failed");
 
     if (getPref("getBoolPref", PREF_APP_UPDATE_ENABLED, true))
       document.getElementById("noUpdatesAutoEnabled").hidden = false;
     else
       document.getElementById("noUpdatesAutoDisabled").hidden = false;
 
@@ -611,33 +611,33 @@ var gNoUpdatesPage = {
   }
 };
 
 /**
  * The "Unable to Update" page. Provides the user information about why they
  * were unable to update and a manual download url.
  */
 var gManualUpdatePage = {
-  onPageShow: function() {
+  onPageShow() {
     var manualURL = Services.urlFormatter.formatURLPref(PREF_APP_UPDATE_URL_MANUAL);
     var manualUpdateLinkLabel = document.getElementById("manualUpdateLinkLabel");
     manualUpdateLinkLabel.value = manualURL;
     manualUpdateLinkLabel.setAttribute("url", manualURL);
 
     gUpdates.setButtons(null, null, "okButton", true);
     gUpdates.wiz.getButton("finish").focus();
   }
 };
 
 /**
  * The "System Unsupported" page. Provides the user with information about their
  * system no longer being supported and an url for more information.
  */
 var gUnsupportedPage = {
-  onPageShow: function() {
+  onPageShow() {
     Services.prefs.setBoolPref(PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED, true);
     if (gUpdates.update.detailsURL) {
       let unsupportedLinkLabel = document.getElementById("unsupportedLinkLabel");
       unsupportedLinkLabel.setAttribute("url", gUpdates.update.detailsURL);
     }
 
     gUpdates.setButtons(null, null, "okButton", true);
     gUpdates.wiz.getButton("finish").focus();
@@ -647,17 +647,17 @@ var gUnsupportedPage = {
 /**
  * The "Updates Are Available" page. Provides the user information about the
  * available update.
  */
 var gUpdatesFoundBasicPage = {
   /**
    * Initialize
    */
-  onPageShow: function() {
+  onPageShow() {
     gUpdates.wiz.canRewind = false;
     var update = gUpdates.update;
     gUpdates.setButtons("askLaterButton",
                         update.showNeverForVersion ? "noThanksButton" : null,
                         "updateButton_" + update.type, true);
     var btn = gUpdates.wiz.getButton("next");
     btn.focus();
 
@@ -683,21 +683,21 @@ var gUpdatesFoundBasicPage = {
     else
       updateMoreInfoURL.hidden = true;
 
     var updateTitle = gUpdates.getAUSString("updatesfound_" + update.type +
                                             ".title");
     document.getElementById("updatesFoundBasicHeader").setAttribute("label", updateTitle);
   },
 
-  onExtra1: function() {
+  onExtra1() {
     gUpdates.wiz.cancel();
   },
 
-  onExtra2: function() {
+  onExtra2() {
     gUpdates.never();
     gUpdates.wiz.cancel();
   }
 };
 
 /**
  * The "Update is Downloading" page - provides feedback for the download
  * process plus a pause/resume UI
@@ -732,17 +732,17 @@ var gDownloadingPage = {
   /**
    * Have we registered an observer for a background update being staged
    */
   _updateApplyingObserver: false,
 
   /**
    * Initialize
    */
-  onPageShow: function() {
+  onPageShow() {
     this._downloadStatus = document.getElementById("downloadStatus");
     this._downloadProgress = document.getElementById("downloadProgress");
     this._pauseButton = document.getElementById("pauseButton");
     this._label_downloadStatus = this._downloadStatus.textContent;
 
     this._pauseButton.setAttribute("tooltiptext",
                                    gUpdates.getAUSString("pauseButtonPause"));
 
@@ -797,17 +797,17 @@ var gDownloadingPage = {
 
     gUpdates.setButtons("hideButton", null, null, false);
     gUpdates.wiz.getButton("extra1").focus();
   },
 
   /**
    * Updates the text status message
    */
-  _setStatus: function(status) {
+  _setStatus(status) {
     // Don't bother setting the same text more than once. This can happen
     // due to the asynchronous behavior of the downloader.
     if (this._downloadStatus.textContent == status)
       return;
     while (this._downloadStatus.hasChildNodes())
       this._downloadStatus.removeChild(this._downloadStatus.firstChild);
     this._downloadStatus.appendChild(document.createTextNode(status));
   },
@@ -817,17 +817,17 @@ var gDownloadingPage = {
    * Also updates the status needed for pausing the download.
    *
    * @param aCurr
    *        Current number of bytes transferred
    * @param aMax
    *        Total file size of the download
    * @return Current active download status
    */
-  _updateDownloadStatus: function(aCurr, aMax) {
+  _updateDownloadStatus(aCurr, aMax) {
     let status;
 
     // Get the download time left and progress
     let rate = aCurr / (Date.now() - this._startTime) * 1000;
     [status, this._lastSec] =
       DownloadUtils.getDownloadStatus(aCurr, aMax, rate, this._lastSec);
 
     // Get the download progress for pausing
@@ -836,17 +836,17 @@ var gDownloadingPage = {
     return status;
   },
 
   /**
    * Adjust UI to suit a certain state of paused-ness
    * @param   paused
    *          Whether or not the download is paused
    */
-  _setUIState: function(paused) {
+  _setUIState(paused) {
     var u = gUpdates.update;
     if (paused) {
       if (this._downloadProgress.mode != "normal")
         this._downloadProgress.mode = "normal";
       this._pauseButton.setAttribute("tooltiptext",
                                      gUpdates.getAUSString("pauseButtonResume"));
       this._pauseButton.setAttribute("paused", "true");
       var p = u.selectedPatch.QueryInterface(CoI.nsIPropertyBag);
@@ -864,44 +864,44 @@ var gDownloadingPage = {
                                      gUpdates.getAUSString("pauseButtonPause"));
       this._setStatus(this._label_downloadStatus);
     }
   },
 
   /**
    * Wait for an update being staged in the background.
    */
-  _setUpdateApplying: function() {
+  _setUpdateApplying() {
     this._downloadProgress.mode = "undetermined";
     this._pauseButton.hidden = true;
     let applyingStatus = gUpdates.getAUSString("applyingUpdate");
     this._setStatus(applyingStatus);
 
     Services.obs.addObserver(this, "update-staged", false);
     this._updateApplyingObserver = true;
   },
 
   /**
    * Clean up the listener and observer registered for the wizard.
    */
-  cleanUp: function() {
+  cleanUp() {
     var aus = CoC["@mozilla.org/updates/update-service;1"].
               getService(CoI.nsIApplicationUpdateService);
     aus.removeDownloadListener(this);
 
     if (this._updateApplyingObserver) {
       Services.obs.removeObserver(this, "update-staged");
       this._updateApplyingObserver = false;
     }
   },
 
   /**
    * When the user clicks the Pause/Resume button
    */
-  onPause: function() {
+  onPause() {
     var aus = CoC["@mozilla.org/updates/update-service;1"].
               getService(CoI.nsIApplicationUpdateService);
     if (this._paused)
       aus.downloadUpdate(gUpdates.update, false);
     else {
       var patch = gUpdates.update.selectedPatch;
       patch.QueryInterface(CoI.nsIWritablePropertyBag);
       patch.setProperty("status", this._pausedStatus);
@@ -912,27 +912,27 @@ var gDownloadingPage = {
     // Update the UI
     this._setUIState(this._paused);
   },
 
   /**
    * When the user has closed the window using a Window Manager control (this
    * page doesn't have a cancel button) cancel the update in progress.
    */
-  onWizardCancel: function() {
+  onWizardCancel() {
     if (this._hiding)
       return;
 
     this.cleanUp();
   },
 
   /**
    * When the user closes the Wizard UI by clicking the Hide button
    */
-  onHide: function() {
+  onHide() {
     // Set _hiding to true to prevent onWizardCancel from cancelling the update
     // that is in progress.
     this._hiding = true;
 
     // Remove ourself as a download listener so that we don't continue to be
     // fed progress and state notifications after the UI we're updating has
     // gone away.
     this.cleanUp();
@@ -973,17 +973,17 @@ var gDownloadingPage = {
 
   /**
    * When the data transfer begins
    * @param   request
    *          The nsIRequest object for the transfer
    * @param   context
    *          Additional data
    */
-  onStartRequest: function(request, context) {
+  onStartRequest(request, context) {
     // This !paused test is necessary because onStartRequest may fire after
     // the download was paused (for those speedy clickers...)
     if (this._paused)
       return;
 
     if (this._downloadProgress.mode != "undetermined")
       this._downloadProgress.mode = "undetermined";
     this._setStatus(this._label_downloadStatus);
@@ -995,17 +995,17 @@ var gDownloadingPage = {
    *          The nsIRequest object for the transfer
    * @param   context
    *          Additional data
    * @param   progress
    *          The current number of bytes transferred
    * @param   maxProgress
    *          The total number of bytes that must be transferred
    */
-  onProgress: function(request, context, progress, maxProgress) {
+  onProgress(request, context, progress, maxProgress) {
     let status = this._updateDownloadStatus(progress, maxProgress);
     var currentProgress = Math.round(100 * (progress / maxProgress));
 
     var p = gUpdates.update.selectedPatch;
     p.QueryInterface(CoI.nsIWritablePropertyBag);
     p.setProperty("progress", currentProgress);
     p.setProperty("status", status);
 
@@ -1040,30 +1040,30 @@ var gDownloadingPage = {
    *          The nsIRequest object for the transfer
    * @param   context
    *          Additional data
    * @param   status
    *          A status code
    * @param   statusText
    *          Human readable version of |status|
    */
-  onStatus: function(request, context, status, statusText) {
+  onStatus(request, context, status, statusText) {
     this._setStatus(statusText);
   },
 
   /**
    * When data transfer ceases
    * @param   request
    *          The nsIRequest object for the transfer
    * @param   context
    *          Additional data
    * @param   status
    *          Status code containing the reason for the cessation.
    */
-  onStopRequest: function(request, context, status) {
+  onStopRequest(request, context, status) {
     if (this._downloadProgress.mode != "normal")
       this._downloadProgress.mode = "normal";
 
     var u = gUpdates.update;
     switch (status) {
       case CoR.NS_ERROR_CORRUPTED_CONTENT:
       case CoR.NS_ERROR_UNEXPECTED:
         if (u.selectedPatch.state == STATE_DOWNLOAD_FAILED &&
@@ -1107,17 +1107,17 @@ var gDownloadingPage = {
         gUpdates.wiz.goTo("errors");
         break;
     }
   },
 
   /**
    * See nsIObserver.idl
    */
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic == "update-staged") {
       if (aData == STATE_DOWNLOADING) {
         // We've fallen back to downloding the full update because the
         // partial update failed to get staged in the background.
         this._setStatus("downloading");
         return;
       }
       this.cleanUp();
@@ -1133,34 +1133,34 @@ var gDownloadingPage = {
         gUpdates.wiz.goTo("errors");
       }
     }
   },
 
   /**
    * See nsISupports.idl
    */
-  QueryInterface: function(iid) {
+  QueryInterface(iid) {
     if (!iid.equals(CoI.nsIRequestObserver) &&
         !iid.equals(CoI.nsIProgressEventSink) &&
         !iid.equals(CoI.nsIObserver) &&
         !iid.equals(CoI.nsISupports))
       throw CoR.NS_ERROR_NO_INTERFACE;
     return this;
   }
 };
 
 /**
  * The "There was an error during the update" page.
  */
 var gErrorsPage = {
   /**
    * Initialize
    */
-  onPageShow: function() {
+  onPageShow() {
     gUpdates.setButtons(null, null, "okButton", true);
     gUpdates.wiz.getButton("finish").focus();
 
     var statusText = gUpdates.update.statusText;
     LOG("gErrorsPage", "onPageShow - update.statusText: " + statusText);
 
     var errorReason = document.getElementById("errorReason");
     errorReason.value = statusText;
@@ -1174,17 +1174,17 @@ var gErrorsPage = {
 /**
  * The page shown when there is a background check or a certificate attribute
  * error.
  */
 var gErrorExtraPage = {
   /**
    * Initialize
    */
-  onPageShow: function() {
+  onPageShow() {
     gUpdates.setButtons(null, null, "okButton", true);
     gUpdates.wiz.getButton("finish").focus();
 
     if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDERRORS)) {
       Services.prefs.clearUserPref(PREF_APP_UPDATE_BACKGROUNDERRORS);
     }
 
     document.getElementById("genericBackgroundErrorLabel").hidden = false;
@@ -1197,21 +1197,21 @@ var gErrorExtraPage = {
 
 /**
  * The "There was an error applying a partial patch" page.
  */
 var gErrorPatchingPage = {
   /**
    * Initialize
    */
-  onPageShow: function() {
+  onPageShow() {
     gUpdates.setButtons(null, null, "okButton", true);
   },
 
-  onWizardNext: function() {
+  onWizardNext() {
     switch (gUpdates.update.selectedPatch.state) {
       case STATE_PENDING:
       case STATE_PENDING_SERVICE:
         gUpdates.wiz.goTo("finished");
         break;
       case STATE_DOWNLOADING:
         gUpdates.wiz.goTo("downloading");
         break;
@@ -1225,17 +1225,17 @@ var gErrorPatchingPage = {
 /**
  * The "Update has been downloaded" page. Shows information about what
  * was downloaded.
  */
 var gFinishedPage = {
   /**
    * Initialize
    */
-  onPageShow: function() {
+  onPageShow() {
     let aus = CoC["@mozilla.org/updates/update-service;1"].
               getService(CoI.nsIApplicationUpdateService);
     if (aus.elevationRequired) {
       LOG("gFinishedPage", "elevationRequired");
       gUpdates.setButtons("restartLaterButton", "noThanksButton",
                           "restartNowButton", true);
     } else {
       LOG("gFinishedPage", "not elevationRequired");
@@ -1243,17 +1243,17 @@ var gFinishedPage = {
                           true);
     }
     gUpdates.wiz.getButton("finish").focus();
   },
 
   /**
    * Initialize the Wizard Page for a Background Source Event
    */
-  onPageShowBackground: function() {
+  onPageShowBackground() {
     this.onPageShow();
     let updateFinishedName = document.getElementById("updateFinishedName");
     updateFinishedName.value = gUpdates.update.name;
 
     let link = document.getElementById("finishedBackgroundLink");
     if (gUpdates.update.detailsURL) {
       link.setAttribute("url", gUpdates.update.detailsURL);
       // The details link is stealing focus so it is disabled by default and
@@ -1286,17 +1286,17 @@ var gFinishedPage = {
                  UPDATE_TEST_LOOP_INTERVAL);
     }
   },
 
   /**
    * Called when the wizard finishes, i.e. the "Restart Now" button is
    * clicked.
    */
-  onWizardFinish: function() {
+  onWizardFinish() {
     // Do the restart
     LOG("gFinishedPage", "onWizardFinish - restarting the application");
 
     let aus = CoC["@mozilla.org/updates/update-service;1"].
               getService(CoI.nsIApplicationUpdateService);
     if (aus.elevationRequired) {
       let um = CoC["@mozilla.org/updates/update-manager;1"].
                getService(CoI.nsIUpdateManager);
@@ -1338,17 +1338,17 @@ var gFinishedPage = {
     CoC["@mozilla.org/toolkit/app-startup;1"].getService(CoI.nsIAppStartup).
     quit(CoI.nsIAppStartup.eAttemptQuit | CoI.nsIAppStartup.eRestart);
   },
 
   /**
    * When the user clicks the "Restart Later" instead of the Restart Now" button
    * in the wizard after an update has been downloaded.
    */
-  onExtra1: function() {
+  onExtra1() {
     gUpdates.wiz.cancel();
   },
 
   /**
    * When elevation is required and the user clicks "No Thanks" in the wizard.
    */
   onExtra2: Task.async(function*() {
     Services.obs.notifyObservers(null, "update-canceled", null);
--- a/toolkit/mozapps/update/nsUpdateService.js
+++ b/toolkit/mozapps/update/nsUpdateService.js
@@ -1787,17 +1787,17 @@ Update.prototype = {
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIUpdate,
                                          Ci.nsIPropertyBag,
                                          Ci.nsIWritablePropertyBag])
 };
 
 const UpdateServiceFactory = {
   _instance: null,
-  createInstance: function(outer, iid) {
+  createInstance(outer, iid) {
     if (outer != null)
       throw Cr.NS_ERROR_NO_AGGREGATION;
     return this._instance == null ? this._instance = new UpdateService() :
                                     this._instance;
   }
 };
 
 /**
@@ -4400,25 +4400,25 @@ UpdatePrompt.prototype = {
    *          Can be null
    */
   _showUnobtrusiveUI: function UP__showUnobUI(parent, uri, features, name, page,
                                               update) {
     var observer = {
       updatePrompt: this,
       service: null,
       timer: null,
-      notify: function() {
+      notify() {
         // the user hasn't restarted yet => prompt when idle
         this.service.removeObserver(this, "quit-application");
         // If the update window is already open skip showing the UI
         if (this.updatePrompt._getUpdateWindow())
           return;
         this.updatePrompt._showUIWhenIdle(parent, uri, features, name, page, update);
       },
-      observe: function(aSubject, aTopic, aData) {
+      observe(aSubject, aTopic, aData) {
         switch (aTopic) {
           case "quit-application":
             if (this.timer)
               this.timer.cancel();
             this.service.removeObserver(this, "quit-application");
             break;
         }
       }
@@ -4476,17 +4476,17 @@ UpdatePrompt.prototype = {
 
     // Don't allow the preference to set a value greater than 600 seconds for the idle time.
     const IDLE_TIME = Math.min(getPref("getIntPref", PREF_APP_UPDATE_IDLETIME, 60), 600);
     if (idleService.idleTime / 1000 >= IDLE_TIME) {
       this._showUI(parent, uri, features, name, page, update);
     } else {
       var observer = {
         updatePrompt: this,
-        observe: function(aSubject, aTopic, aData) {
+        observe(aSubject, aTopic, aData) {
           switch (aTopic) {
             case "idle":
               // If the update window is already open skip showing the UI
               if (!this.updatePrompt._getUpdateWindow())
                 this.updatePrompt._showUI(parent, uri, features, name, page, update);
               // fall thru
             case "quit-application":
               idleService.removeIdleObserver(this, IDLE_TIME);
--- a/toolkit/mozapps/update/nsUpdateServiceStub.js
+++ b/toolkit/mozapps/update/nsUpdateServiceStub.js
@@ -32,14 +32,14 @@ function UpdateServiceStub() {
   if (statusFile.exists()) {
     let aus = Cc["@mozilla.org/updates/update-service;1"].
               getService(Ci.nsIApplicationUpdateService).
               QueryInterface(Ci.nsIObserver);
     aus.observe(null, "post-update-processing", "");
   }
 }
 UpdateServiceStub.prototype = {
-  observe: function() {},
+  observe() {},
   classID: Components.ID("{e43b0010-04ba-4da6-b523-1f92580bc150}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([UpdateServiceStub]);
--- a/toolkit/mozapps/update/tests/chrome/utils.js
+++ b/toolkit/mozapps/update/tests/chrome/utils.js
@@ -971,17 +971,17 @@ const errorsPrefObserver = {
    *
    * @param  aObservePref
    *         The preference to observe.
    * @param  aMaxErrorPref
    *         The maximum errors preference.
    * @param  aMaxErrorCount
    *         The value to set the maximum errors preference to.
    */
-  init: function(aObservePref, aMaxErrorPref, aMaxErrorCount) {
+  init(aObservePref, aMaxErrorPref, aMaxErrorCount) {
     this.observedPref = aObservePref;
     this.maxErrorPref = aMaxErrorPref;
 
     let maxErrors = aMaxErrorCount ? aMaxErrorCount : 2;
     Services.prefs.setIntPref(aMaxErrorPref, maxErrors);
     Services.prefs.addObserver(aObservePref, this, false);
   },
 
--- a/toolkit/mozapps/update/tests/data/shared.js
+++ b/toolkit/mozapps/update/tests/data/shared.js
@@ -136,17 +136,17 @@ function initUpdateServiceStub() {
 
 /* Reloads the update metadata from disk */
 function reloadUpdateManagerData() {
   gUpdateManager.QueryInterface(Ci.nsIObserver).
   observe(null, "um-reload-update-data", "");
 }
 
 const observer = {
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if (aTopic == "nsPref:changed" && aData == PREF_APP_UPDATE_CHANNEL) {
       let channel = gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_CHANNEL);
       if (channel != gChannel) {
         debugDump("Changing channel from " + channel + " to " + gChannel);
         gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_CHANNEL, gChannel);
       }
     }
   },
--- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
@@ -1879,17 +1879,17 @@ function getUpdateLog(aLogLeafName) {
   updateLog.append(aLogLeafName);
   return updateLog;
 }
 
 /**
  * The update-staged observer for the call to nsIUpdateProcessor:processUpdate.
  */
 const gUpdateStagedObserver = {
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     debugDump("observe called with topic: " + aTopic + ", data: " + aData);
     if (aTopic == "update-staged") {
       Services.obs.removeObserver(gUpdateStagedObserver, "update-staged");
       // The environment is reset after the update-staged observer topic because
       // processUpdate in nsIUpdateProcessor uses a new thread and clearing the
       // environment immediately after calling processUpdate can clear the
       // environment before the updater is launched.
       resetEnvironment();
@@ -3652,17 +3652,17 @@ function UpdatePrompt(aCallback) {
                      Array.prototype.slice.call(arguments));
     };
   });
 }
 
 UpdatePrompt.prototype = {
   flags: Ci.nsIClassInfo.SINGLETON,
   getScriptableHelper: () => null,
-  getInterfaces: function(aCount) {
+  getInterfaces(aCount) {
     let interfaces = [Ci.nsISupports, Ci.nsIUpdatePrompt];
     aCount.value = interfaces.length;
     return interfaces;
   },
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIClassInfo, Ci.nsIUpdatePrompt])
 };
 
 /* Update check listener */
@@ -3797,17 +3797,17 @@ function createAppInfo(aID, aName, aVers
     logConsoleErrors: true,
     OS: "XPCShell",
     XPCOMABI: "noarch-spidermonkey",
 
     QueryInterface: XPCOMUtils.generateQI(ifaces)
   };
 
   const XULAppInfoFactory = {
-    createInstance: function(aOuter, aIID) {
+    createInstance(aOuter, aIID) {
       if (aOuter == null) {
         return XULAppInfo.QueryInterface(aIID);
       }
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
   };
 
   let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
--- a/toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedRecovery.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/downloadInterruptedRecovery.js
@@ -87,23 +87,23 @@ function initMockIncrementalDownload() {
  */
 
 function IncrementalDownload() {
   this.wrappedJSObject = this;
 }
 
 IncrementalDownload.prototype = {
   /* nsIIncrementalDownload */
-  init: function(uri, file, chunkSize, intervalInSeconds) {
+  init(uri, file, chunkSize, intervalInSeconds) {
     this._destination = file;
     this._URI = uri;
     this._finalURI = uri;
   },
 
-  start: function(observer, ctxt) {
+  start(observer, ctxt) {
     let tm = Cc["@mozilla.org/thread-manager;1"].
              getService(Ci.nsIThreadManager);
     // Do the actual operation async to give a chance for observers
     // to add themselves.
     tm.mainThread.dispatch(function() {
       this._observer = observer.QueryInterface(Ci.nsIRequestObserver);
       this._ctxt = ctxt;
       this._observer.onStartRequest(this, this._ctxt);
@@ -156,23 +156,23 @@ IncrementalDownload.prototype = {
     return this._finalURI;
   },
 
   get totalSize() {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
   /* nsIRequest */
-  cancel: function(aStatus) {
+  cancel(aStatus) {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
-  suspend: function() {
+  suspend() {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
-  isPending: function() {
+  isPending() {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
   _loadFlags: 0,
   get loadFlags() {
     return this._loadFlags;
   },
   set loadFlags(val) {
     this._loadFlags = val;
--- a/toolkit/mozapps/update/tests/unit_aus_update/uiAutoPref.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/uiAutoPref.js
@@ -1,24 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 Components.utils.import("resource://testing-common/MockRegistrar.jsm");
 
 const WindowWatcher = {
-  openWindow: function(aParent, aUrl, aName, aFeatures, aArgs) {
+  openWindow(aParent, aUrl, aName, aFeatures, aArgs) {
     gCheckFunc();
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher])
 };
 
 const WindowMediator = {
-  getMostRecentWindow: function(aWindowType) {
+  getMostRecentWindow(aWindowType) {
     do_execute_soon(check_status);
     return { getInterface: XPCOMUtils.generateQI([Ci.nsIDOMWindow]) };
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediator])
 };
 
 function run_test() {
--- a/toolkit/mozapps/update/tests/unit_aus_update/uiSilentPref.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/uiSilentPref.js
@@ -5,21 +5,21 @@
 Components.utils.import("resource://testing-common/MockRegistrar.jsm");
 
 /**
  * Test that nsIUpdatePrompt doesn't display UI for showUpdateAvailable and
  * showUpdateError when the app.update.silent preference is true.
  */
 
 const WindowWatcher = {
-  openWindow: function(aParent, aUrl, aName, aFeatures, aArgs) {
+  openWindow(aParent, aUrl, aName, aFeatures, aArgs) {
     gCheckFunc();
   },
 
-  getNewPrompter: function(aParent) {
+  getNewPrompter(aParent) {
     gCheckFunc();
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher])
 };
 
 function run_test() {
   setupTestCommon();
--- a/toolkit/mozapps/update/tests/unit_aus_update/uiUnsupportedAlreadyNotified.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/uiUnsupportedAlreadyNotified.js
@@ -1,24 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 Cu.import("resource://testing-common/MockRegistrar.jsm");
 
 const WindowWatcher = {
-  openWindow: function(aParent, aUrl, aName, aFeatures, aArgs) {
+  openWindow(aParent, aUrl, aName, aFeatures, aArgs) {
     check_showUpdateAvailable();
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher])
 };
 
 const WindowMediator = {
-  getMostRecentWindow: function(aWindowType) {
+  getMostRecentWindow(aWindowType) {
     return null;
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediator])
 };
 
 function run_test() {
   setupTestCommon();