Bug 1520643 - Port bug 1514594: Change import call sites using kmag's script. rs=bustage-fix,jorgk
authorGeoff Lankow <geoff@darktrojan.net>
Tue, 29 Jan 2019 11:25:29 +0100
changeset 33542 985a367b6423f28e297d4c55d0256e741e91d225
parent 33541 6e514874b3267dcff87456dff8620f7c51dc1f5c
child 33543 d9424aeb558e407c88394de81dd368b8551ce340
push id2390
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:12:16 +0000
treeherdercomm-beta@29b1f2c027d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage-fix, jorgk
bugs1520643, 1514594
Bug 1520643 - Port bug 1514594: Change import call sites using kmag's script. rs=bustage-fix,jorgk
chat/components/src/imAccounts.js
chat/components/src/imCommands.js
chat/components/src/imContacts.js
chat/components/src/imConversations.js
chat/components/src/imCore.js
chat/components/src/logger.js
chat/components/src/smileProtocolHandler.js
chat/components/src/test/test_accounts.js
chat/components/src/test/test_commands.js
chat/components/src/test/test_conversations.js
chat/components/src/test/test_logger.js
chat/content/browserRequest.js
chat/modules/DNS.jsm
chat/modules/ToLocaleFormat.jsm
chat/modules/hiddenWindow.jsm
chat/modules/imContentSink.jsm
chat/modules/imServices.jsm
chat/modules/imSmileys.jsm
chat/modules/imStatusUtils.jsm
chat/modules/imTextboxUtils.jsm
chat/modules/imThemes.jsm
chat/modules/imXPCOMUtils.jsm
chat/modules/jsProtoHelper.jsm
chat/modules/socket.jsm
chat/modules/test/test_NormalizedMap.js
chat/modules/test/test_filtering.js
chat/protocols/facebook/facebook.js
chat/protocols/gtalk/gtalk.js
chat/protocols/irc/irc.js
chat/protocols/irc/ircBase.jsm
chat/protocols/irc/ircCAP.jsm
chat/protocols/irc/ircCTCP.jsm
chat/protocols/irc/ircDCC.jsm
chat/protocols/irc/ircISUPPORT.jsm
chat/protocols/irc/ircMultiPrefix.jsm
chat/protocols/irc/ircNonStandard.jsm
chat/protocols/irc/ircSASL.jsm
chat/protocols/irc/ircServerTime.jsm
chat/protocols/irc/ircServices.jsm
chat/protocols/irc/ircUtils.jsm
chat/protocols/irc/ircWatchMonitor.jsm
chat/protocols/irc/test/test_ctcpDequote.js
chat/protocols/irc/test/test_ctcpQuote.js
chat/protocols/irc/test/test_ircCAP.js
chat/protocols/irc/test/test_ircCommands.js
chat/protocols/irc/test/test_ircMessage.js
chat/protocols/irc/test/test_ircNonStandard.js
chat/protocols/irc/test/test_ircServerTime.js
chat/protocols/irc/test/test_sendBufferedCommand.js
chat/protocols/irc/test/test_setMode.js
chat/protocols/irc/test/test_splitLongMessages.js
chat/protocols/irc/test/test_tryNewNick.js
chat/protocols/jsTest/jsTestProtocol.js
chat/protocols/matrix/matrix-sdk.jsm
chat/protocols/matrix/matrix.js
chat/protocols/odnoklassniki/odnoklassniki.js
chat/protocols/skype/skype.js
chat/protocols/skype/test/test_MagicSha256.js
chat/protocols/skype/test/test_contactUrlToName.js
chat/protocols/twitter/twitter.js
chat/protocols/xmpp/test/test_dnsSrv.js
chat/protocols/xmpp/test/test_parseJidAndNormalization.js
chat/protocols/xmpp/test/test_saslPrep.js
chat/protocols/xmpp/test/test_xmppParser.js
chat/protocols/xmpp/test/test_xmppXml.js
chat/protocols/xmpp/xmpp-authmechs.jsm
chat/protocols/xmpp/xmpp-commands.jsm
chat/protocols/xmpp/xmpp-session.jsm
chat/protocols/xmpp/xmpp.js
chat/protocols/xmpp/xmpp.jsm
chat/protocols/yahoo/yahoo.js
common/saxparser/test/unit/test_parser.js
common/src/BootstrapLoader.jsm
common/src/ChromeManifest.jsm
common/src/ExtensionSupport.jsm
common/src/Overlays.jsm
common/src/customizeToolbar.js
common/src/viewSource.js
common/test/xpcshell/data/BootstrapMonitor.jsm
common/test/xpcshell/head_addons.js
common/test/xpcshell/test_bootstrap.js
common/test/xpcshell/test_bootstrap_globals.js
editor/ui/composer/content/EditorContextMenu.js
editor/ui/composer/content/editor.js
editor/ui/composer/content/editorUtilities.js
editor/ui/dialogs/content/EdImageLinkLoader.js
editor/ui/dialogs/content/EdSpellCheck.js
editor/ui/dialogs/content/EditorSaveAsCharset.js
editor/ui/nsComposerCmdLineHandler.js
ldap/xpcom/src/nsLDAPProtocolHandler.js
mail/base/content/ABSearchDialog.js
mail/base/content/FilterListDialog.js
mail/base/content/SearchDialog.js
mail/base/content/aboutAddonsExtra.js
mail/base/content/aboutDialog-appUpdater.js
mail/base/content/aboutDialog.js
mail/base/content/commandglue.js
mail/base/content/contentAreaClick.js
mail/base/content/customElements.js
mail/base/content/editContactPanel.js
mail/base/content/extensions.xml
mail/base/content/folderDisplay.js
mail/base/content/folderPane.js
mail/base/content/foldersummary.js
mail/base/content/glodaFacet.js
mail/base/content/glodaFacetTab.js
mail/base/content/glodaFacetView.js
mail/base/content/macMessengerMenu.js
mail/base/content/mail-offline.js
mail/base/content/mail3PaneWindowCommands.js
mail/base/content/mailCommands.js
mail/base/content/mailContextMenus.js
mail/base/content/mailCore.js
mail/base/content/mailTabs.js
mail/base/content/mailWidgets.js
mail/base/content/mailWindow.js
mail/base/content/mailWindowOverlay.js
mail/base/content/messageWindow.js
mail/base/content/msgHdrView.js
mail/base/content/msgMail3PaneWindow.js
mail/base/content/msgViewNavigation.js
mail/base/content/multimessageview.js
mail/base/content/newTagDialog.js
mail/base/content/nsContextMenu.js
mail/base/content/nsDragAndDrop.js
mail/base/content/phishingDetector.js
mail/base/content/quickFilterBar.js
mail/base/content/safeMode.js
mail/base/content/sanitize.js
mail/base/content/search.xml
mail/base/content/searchBar.js
mail/base/content/specialTabs.js
mail/base/content/tabmail.xml
mail/base/content/threadPaneColumnPicker.xml
mail/base/content/utilityOverlay.js
mail/base/modules/DBViewWrapper.jsm
mail/base/modules/DisplayNameUtils.jsm
mail/base/modules/ExtensionsUI.jsm
mail/base/modules/GlobalPopupNotifications.jsm
mail/base/modules/MailInstrumentation.jsm
mail/base/modules/MailMigrator.jsm
mail/base/modules/MailUtils.js
mail/base/modules/MailUtils.jsm
mail/base/modules/QuickFilterManager.jsm
mail/base/modules/SearchSpec.jsm
mail/base/modules/SessionStoreManager.jsm
mail/base/modules/TBDistCustomizer.jsm
mail/base/modules/Windows8WindowFrameColor.jsm
mail/base/test/unit/head_mailbase.js
mail/base/test/unit/resources/viewWrapperTestUtils.js
mail/base/test/unit/test_alertHook.js
mail/base/test/unit/test_attachmentChecker.js
mail/base/test/unit/test_mailGlue_distribution.js
mail/base/test/unit/test_viewWrapper_realFolder.js
mail/base/test/unit/test_viewWrapper_virtualFolderCustomTerm.js
mail/base/test/unit/test_windows_font_migration.js
mail/components/about-support/aboutSupportUnix.js
mail/components/about-support/aboutSupportWin32.js
mail/components/about-support/content/aboutSupport.js
mail/components/about-support/content/accounts.js
mail/components/about-support/content/export.js
mail/components/aboutRedirector.js
mail/components/accountcreation/content/createInBackend.js
mail/components/accountcreation/content/emailWizard.js
mail/components/accountcreation/content/exchangeAutoDiscover.js
mail/components/accountcreation/content/fetchConfig.js
mail/components/accountcreation/content/fetchhttp.js
mail/components/accountcreation/content/guessConfig.js
mail/components/accountcreation/content/readFromXML.js
mail/components/accountcreation/content/sanitizeDatatypes.js
mail/components/accountcreation/content/util.js
mail/components/accountcreation/content/verifyConfig.js
mail/components/activity/content/activity.js
mail/components/activity/content/activity.xml
mail/components/activity/modules/activityModules.jsm
mail/components/activity/modules/alertHook.jsm
mail/components/activity/modules/autosync.jsm
mail/components/activity/modules/glodaIndexer.jsm
mail/components/activity/modules/moveCopy.jsm
mail/components/activity/modules/pop3Download.jsm
mail/components/activity/modules/sendLater.jsm
mail/components/activity/nsActivity.js
mail/components/activity/nsActivityManager.js
mail/components/activity/nsActivityManagerUI.js
mail/components/addrbook/content/abCard.js
mail/components/addrbook/content/abCardView.js
mail/components/addrbook/content/abCommon.js
mail/components/addrbook/content/abContactsPanel.js
mail/components/addrbook/content/abTrees.js
mail/components/addrbook/content/addressbook.js
mail/components/appIdleManager.js
mail/components/cloudfile/cloudFileAccounts.js
mail/components/cloudfile/content/addAccountDialog.js
mail/components/cloudfile/nsBox.js
mail/components/cloudfile/nsHightail.js
mail/components/compose/content/MsgComposeCommands.js
mail/components/compose/content/bigFileObserver.js
mail/components/devtools/devtools-loader.js
mail/components/extensions/ExtensionPopups.jsm
mail/components/extensions/ExtensionToolbarButtons.jsm
mail/components/extensions/parent/ext-accounts.js
mail/components/extensions/parent/ext-addressBook.js
mail/components/extensions/parent/ext-cloudFile.js
mail/components/extensions/parent/ext-mail.js
mail/components/extensions/parent/ext-menus.js
mail/components/extensions/test/browser/head.js
mail/components/extensions/test/xpcshell/head.js
mail/components/extensions/test/xpcshell/test_ext_accounts.js
mail/components/extensions/test/xpcshell/test_ext_addressBook.js
mail/components/extensions/test/xpcshell/test_ext_cloudFile.js
mail/components/extensions/test/xpcshell/test_ext_messages.js
mail/components/im/content/addbuddy.js
mail/components/im/content/am-im.js
mail/components/im/content/chat-messenger.js
mail/components/im/content/imAccountWizard.js
mail/components/im/content/imAccounts.js
mail/components/im/content/imStatusSelector.js
mail/components/im/content/imconv.xml
mail/components/im/content/joinchat.js
mail/components/im/imIncomingServer.js
mail/components/im/imProtocolInfo.js
mail/components/im/modules/chatHandler.jsm
mail/components/im/modules/chatNotifications.jsm
mail/components/im/modules/index_im.jsm
mail/components/im/modules/search_im.jsm
mail/components/mailContentHandler.js
mail/components/mailGlue.js
mail/components/migration/content/migration.js
mail/components/newmailaccount/content/accountProvisioner.js
mail/components/newmailaccount/content/accountProvisionerTab.js
mail/components/newmailaccount/content/uriListener.js
mail/components/nsMailDefaultHandler.js
mail/components/preferences/advanced.js
mail/components/preferences/applications.js
mail/components/preferences/attachmentReminder.js
mail/components/preferences/compose.js
mail/components/preferences/connection.js
mail/components/preferences/cookies.js
mail/components/preferences/downloads.js
mail/components/preferences/fonts.js
mail/components/preferences/messagestyle.js
mail/components/preferences/messengerLanguages.js
mail/components/preferences/permissions.js
mail/components/preferences/preferences.js
mail/components/preferences/preferencesTab.js
mail/components/preferences/sendoptions.js
mail/components/search/SearchIntegration.jsm
mail/components/search/content/SpotlightIntegration.js
mail/components/search/content/WinSearchIntegration.js
mail/components/shell/nsSetDefaultMail.js
mail/components/test/unit/head_mailcomponents.js
mail/components/test/unit/test_about_support.js
mail/components/test/unit/test_autoconfigFetchDisk.js
mail/components/test/unit/test_autoconfigUtils.js
mail/components/test/unit/test_autoconfigXML.js
mail/components/wintaskbar/windowsJumpLists.js
mail/extensions/mailviews/content/mailViewList.js
mail/extensions/mailviews/content/msgViewPickerOverlay.js
mail/extensions/smime/content/msgCompSMIMEOverlay.js
mail/test/mozmill/account/test-mail-account-setup-wizard.js
mail/test/mozmill/account/test-retest-config.js
mail/test/mozmill/addrbook/test-address-book.js
mail/test/mozmill/addrbook/test-update-mailing-list.js
mail/test/mozmill/attachment/test-attachment-events.js
mail/test/mozmill/attachment/test-attachment.js
mail/test/mozmill/cloudfile/test-cloudfile-add-account-dialog.js
mail/test/mozmill/cloudfile/test-cloudfile-attachment-urls.js
mail/test/mozmill/cloudfile/test-cloudfile-backend-hightail.js
mail/test/mozmill/cloudfile/test-cloudfile-manager.js
mail/test/mozmill/cloudfile/test-cloudfile-notifications.js
mail/test/mozmill/composition/test-attachment-reminder.js
mail/test/mozmill/composition/test-attachment.js
mail/test/mozmill/composition/test-blocked-content.js
mail/test/mozmill/composition/test-charset-edit.js
mail/test/mozmill/composition/test-charset-upgrade.js
mail/test/mozmill/composition/test-draft-identity.js
mail/test/mozmill/composition/test-drafts.js
mail/test/mozmill/composition/test-forward-headers.js
mail/test/mozmill/composition/test-forward-utf8.js
mail/test/mozmill/composition/test-image-display.js
mail/test/mozmill/composition/test-multipart-related.js
mail/test/mozmill/composition/test-newmsg-compose-identity.js
mail/test/mozmill/composition/test-reply-addresses.js
mail/test/mozmill/composition/test-reply-format-flowed.js
mail/test/mozmill/composition/test-reply-signature.js
mail/test/mozmill/composition/test-save-changes-on-quit.js
mail/test/mozmill/composition/test-signature-init.js
mail/test/mozmill/composition/test-signature-updating.js
mail/test/mozmill/content-policy/test-general-content-policy.js
mail/test/mozmill/content-tabs/test-about-support.js
mail/test/mozmill/content-tabs/test-content-tab.js
mail/test/mozmill/content-tabs/test-install-xpi.js
mail/test/mozmill/folder-display/test-columns.js
mail/test/mozmill/folder-display/test-mail-views.js
mail/test/mozmill/folder-display/test-message-commands-on-msgstore.js
mail/test/mozmill/folder-display/test-message-commands.js
mail/test/mozmill/folder-display/test-opening-messages-without-a-backing-view.js
mail/test/mozmill/folder-display/test-recent-menu.js
mail/test/mozmill/folder-pane/test-folder-names-in-recent-mode.js
mail/test/mozmill/folder-pane/test-folder-pane-consumers.js
mail/test/mozmill/folder-pane/test-folder-pane.js
mail/test/mozmill/folder-tree-modes/test-extension/bootstrap.js
mail/test/mozmill/im/test-toolbar-buttons.js
mail/test/mozmill/instrumentation/test-instrument-setup.js
mail/test/mozmill/keyboard/test-spacehit.js
mail/test/mozmill/message-header/test-header-toolbar.js
mail/test/mozmill/message-header/test-message-header.js
mail/test/mozmill/message-window/test-commands.js
mail/test/mozmill/message-window/test-eml-subject.js
mail/test/mozmill/message-window/test-view-plaintext.js
mail/test/mozmill/multiple-identities/test-display-names.js
mail/test/mozmill/newmailaccount/test-newmailaccount.js
mail/test/mozmill/notification/test-notification.js
mail/test/mozmill/override-main-menu-collapse/test-override-mainmenu-collapse.js
mail/test/mozmill/pref-window/test-font-chooser.js
mail/test/mozmill/session-store/test-session-store.js
mail/test/mozmill/shared-modules/test-address-book-helpers.js
mail/test/mozmill/shared-modules/test-attachment-helpers.js
mail/test/mozmill/shared-modules/test-cloudfile-helpers.js
mail/test/mozmill/shared-modules/test-cloudfile-hightail-helpers.js
mail/test/mozmill/shared-modules/test-content-tab-helpers.js
mail/test/mozmill/shared-modules/test-customization-helpers.js
mail/test/mozmill/shared-modules/test-folder-display-helpers.js
mail/test/mozmill/shared-modules/test-message-helpers.js
mail/test/mozmill/shared-modules/test-newmailaccount-helpers.js
mail/test/mozmill/shared-modules/test-nntp-helpers.js
mail/test/mozmill/shared-modules/test-prompt-helpers.js
mail/test/mozmill/shared-modules/test-window-helpers.js
mail/test/mozmill/tabmail/test-tabmail-dragndrop.js
mail/test/mozmill/utils/test-extensionSupport.js
mail/test/resources/jsbridge/jsbridge/extension/bootstrap.js
mail/test/resources/jsbridge/jsbridge/extension/chrome/content/modules/server.js
mail/test/resources/jsbridge/jsbridge/extension/components/cmdarg.js
mail/test/resources/mozmill/mozmill/extension/bootstrap.js
mail/test/resources/mozmill/mozmill/extension/content/modules/frame.js
mail/test/resources/mozmill/mozmill/extension/content/modules/init.js
mail/test/resources/mozmill/mozmill/extension/content/stdlib/httpd.js
mailnews/addrbook/content/abAddressBookNameDialog.js
mailnews/addrbook/content/abDragDrop.js
mailnews/addrbook/content/abMailListDialog.js
mailnews/addrbook/prefs/content/pref-directory-add.js
mailnews/addrbook/prefs/content/pref-editdirectories.js
mailnews/addrbook/src/nsAbAutoCompleteMyDomain.js
mailnews/addrbook/src/nsAbAutoCompleteSearch.js
mailnews/addrbook/src/nsAbLDAPAttributeMap.js
mailnews/addrbook/src/nsAbLDAPAutoCompleteSearch.js
mailnews/addrbook/test/unit/head_addrbook.js
mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch2.js
mailnews/base/content/charsetList.xml
mailnews/base/content/dateFormat.js
mailnews/base/content/folderProps.js
mailnews/base/content/folderProps.xul
mailnews/base/content/junkCommands.js
mailnews/base/content/junkLog.js
mailnews/base/content/msgAccountCentral.js
mailnews/base/content/msgFolderPickerOverlay.js
mailnews/base/content/msgSynchronize.js
mailnews/base/content/newmailalert.js
mailnews/base/content/subscribe.js
mailnews/base/content/virtualFolderListEdit.js
mailnews/base/content/virtualFolderProperties.js
mailnews/base/prefs/content/AccountManager.js
mailnews/base/prefs/content/AccountWizard.js
mailnews/base/prefs/content/SmtpServerEdit.js
mailnews/base/prefs/content/accountUtils.js
mailnews/base/prefs/content/am-copies.js
mailnews/base/prefs/content/am-identities-list.js
mailnews/base/prefs/content/am-identity-edit.js
mailnews/base/prefs/content/am-junk.js
mailnews/base/prefs/content/am-offline.js
mailnews/base/prefs/content/am-prefs.js
mailnews/base/prefs/content/am-server-advanced.js
mailnews/base/prefs/content/am-server.js
mailnews/base/prefs/content/am-serverwithnoidentities.js
mailnews/base/prefs/content/am-smtp.js
mailnews/base/prefs/content/amUtils.js
mailnews/base/prefs/content/aw-done.js
mailnews/base/prefs/content/aw-incoming.js
mailnews/base/prefs/content/aw-outgoing.js
mailnews/base/prefs/content/converterDialog.js
mailnews/base/prefs/content/removeAccount.js
mailnews/base/search/content/CustomHeaders.js
mailnews/base/search/content/FilterEditor.js
mailnews/base/search/content/searchWidgets.js
mailnews/base/search/src/nsMsgTraitService.js
mailnews/base/src/folderLookupService.js
mailnews/base/src/msgAsyncPrompter.js
mailnews/base/src/msgOAuth2Module.js
mailnews/base/src/newMailNotificationService.js
mailnews/base/src/nsMailNewsCommandLineHandler.js
mailnews/base/src/virtualFolderWrapper.js
mailnews/base/test/unit/head_mailbase.js
mailnews/base/test/unit/test_accountMgr.js
mailnews/base/test/unit/test_acctRepair.js
mailnews/base/test/unit/test_base64_decoding.js
mailnews/base/test/unit/test_bccInDatabase.js
mailnews/base/test/unit/test_bug366491.js
mailnews/base/test/unit/test_bug404489.js
mailnews/base/test/unit/test_bug428427.js
mailnews/base/test/unit/test_bug434810.js
mailnews/base/test/unit/test_bug471682.js
mailnews/base/test/unit/test_compactColumnSave.js
mailnews/base/test/unit/test_compactFailure.js
mailnews/base/test/unit/test_converterDeferredAccount.js
mailnews/base/test/unit/test_copyChaining.js
mailnews/base/test/unit/test_copyThenMoveManual.js
mailnews/base/test/unit/test_copyToInvalidDB.js
mailnews/base/test/unit/test_detachToFile.js
mailnews/base/test/unit/test_emptyTrash.js
mailnews/base/test/unit/test_fix_deferred_accounts.js
mailnews/base/test/unit/test_folderCompact.js
mailnews/base/test/unit/test_headerFoldingInDatabase.js
mailnews/base/test/unit/test_hostnameUtils.js
mailnews/base/test/unit/test_imapPump.js
mailnews/base/test/unit/test_jsTreeSelection.js
mailnews/base/test/unit/test_junkWhitelisting.js
mailnews/base/test/unit/test_junkingWhenDisabled.js
mailnews/base/test/unit/test_loadVirtualFolders.js
mailnews/base/test/unit/test_mailServices.js
mailnews/base/test/unit/test_mailstoreConverter.js
mailnews/base/test/unit/test_mimemaltdetach.js
mailnews/base/test/unit/test_newMailNotification.js
mailnews/base/test/unit/test_nsIMsgContentPolicy.js
mailnews/base/test/unit/test_nsIMsgFolder.js
mailnews/base/test/unit/test_nsIMsgFolderListener.js
mailnews/base/test/unit/test_nsIMsgTagService.js
mailnews/base/test/unit/test_nsMailDirProvider.js
mailnews/base/test/unit/test_nsMsgDBView.js
mailnews/base/test/unit/test_nsMsgMailSession_Alerts.js
mailnews/base/test/unit/test_nsMsgMailSession_Listeners.js
mailnews/base/test/unit/test_quarantineFilterMove.js
mailnews/base/test/unit/test_search.js
mailnews/base/test/unit/test_searchAddressInAb.js
mailnews/base/test/unit/test_searchBody.js
mailnews/base/test/unit/test_searchBoolean.js
mailnews/base/test/unit/test_searchChaining.js
mailnews/base/test/unit/test_searchCustomTerm.js
mailnews/base/test/unit/test_searchJunk.js
mailnews/base/test/unit/test_searchLocalizationStrings.js
mailnews/base/test/unit/test_searchTag.js
mailnews/base/test/unit/test_searchUint32HdrProperty.js
mailnews/base/test/unit/test_testsuite_fakeserver_imapd_gmail.js
mailnews/base/test/unit/test_testsuite_fakeserver_imapd_list-extended.js
mailnews/base/test/unit/test_viewSortByAddresses.js
mailnews/base/util/ABQueryUtils.jsm
mailnews/base/util/IOUtils.js
mailnews/base/util/MailServices.jsm
mailnews/base/util/OAuth2.jsm
mailnews/base/util/StringBundle.js
mailnews/base/util/folderUtils.jsm
mailnews/base/util/mailServices.js
mailnews/base/util/mailnewsMigrator.js
mailnews/base/util/mailstoreConverter.jsm
mailnews/base/util/msgDBCacheManager.js
mailnews/base/util/templateUtils.js
mailnews/compose/src/nsSMTPProtocolHandler.js
mailnews/compose/test/unit/head_compose.js
mailnews/compose/test/unit/test_autoReply.js
mailnews/compose/test/unit/test_bug155172.js
mailnews/compose/test/unit/test_bug235432.js
mailnews/compose/test/unit/test_bug474774.js
mailnews/compose/test/unit/test_detectAttachmentCharset.js
mailnews/compose/test/unit/test_expandMailingLists.js
mailnews/compose/test/unit/test_longLines.js
mailnews/compose/test/unit/test_mailtoURL.js
mailnews/compose/test/unit/test_messageHeaders.js
mailnews/compose/test/unit/test_nsMsgCompose1.js
mailnews/compose/test/unit/test_nsMsgCompose3.js
mailnews/compose/test/unit/test_nsMsgCompose4.js
mailnews/compose/test/unit/test_sendBackground.js
mailnews/compose/test/unit/test_sendMailMessage.js
mailnews/compose/test/unit/test_sendMessageFile.js
mailnews/compose/test/unit/test_sendMessageLater.js
mailnews/compose/test/unit/test_sendMessageLater2.js
mailnews/compose/test/unit/test_sendMessageLater3.js
mailnews/compose/test/unit/test_sendObserver.js
mailnews/compose/test/unit/test_smtp8bitMime.js
mailnews/compose/test/unit/test_smtpAuthMethods.js
mailnews/compose/test/unit/test_smtpPassword.js
mailnews/compose/test/unit/test_smtpPassword2.js
mailnews/compose/test/unit/test_smtpPasswordFailure1.js
mailnews/compose/test/unit/test_smtpPasswordFailure2.js
mailnews/compose/test/unit/test_smtpPasswordFailure3.js
mailnews/compose/test/unit/test_smtpProxy.js
mailnews/compose/test/unit/test_staleTemporaryFileCleanup.js
mailnews/compose/test/unit/test_temporaryFilesRemoved.js
mailnews/db/gloda/components/glautocomp.js
mailnews/db/gloda/components/jsmimeemitter.js
mailnews/db/gloda/modules/collection.js
mailnews/db/gloda/modules/connotent.js
mailnews/db/gloda/modules/databind.js
mailnews/db/gloda/modules/datamodel.js
mailnews/db/gloda/modules/datastore.js
mailnews/db/gloda/modules/dbview.js
mailnews/db/gloda/modules/everybody.js
mailnews/db/gloda/modules/explattr.js
mailnews/db/gloda/modules/facet.js
mailnews/db/gloda/modules/fundattr.js
mailnews/db/gloda/modules/gloda.js
mailnews/db/gloda/modules/index_ab.js
mailnews/db/gloda/modules/index_msg.js
mailnews/db/gloda/modules/indexer.js
mailnews/db/gloda/modules/log4moz.js
mailnews/db/gloda/modules/mimemsg.js
mailnews/db/gloda/modules/msg_search.js
mailnews/db/gloda/modules/noun_freetag.js
mailnews/db/gloda/modules/noun_mimetype.js
mailnews/db/gloda/modules/noun_tag.js
mailnews/db/gloda/modules/public.js
mailnews/db/gloda/modules/utils.js
mailnews/db/gloda/test/unit/base_gloda_content.js
mailnews/db/gloda/test/unit/base_index_junk.js
mailnews/db/gloda/test/unit/base_index_messages.js
mailnews/db/gloda/test/unit/head_gloda.js
mailnews/db/gloda/test/unit/resources/glodaTestHelper.js
mailnews/db/gloda/test/unit/test_corrupt_database.js
mailnews/db/gloda/test/unit/test_fts3_tokenizer.js
mailnews/db/gloda/test/unit/test_index_addressbook.js
mailnews/db/gloda/test/unit/test_mime_attachments_size.js
mailnews/db/gloda/test/unit/test_mime_emitter.js
mailnews/db/gloda/test/unit/test_msg_search.js
mailnews/db/gloda/test/unit/test_nuke_migration.js
mailnews/db/gloda/test/unit/test_smime_mimemsg_representation.js
mailnews/db/gloda/test/unit/test_startup_offline.js
mailnews/db/msgdb/test/unit/head_maildb.js
mailnews/db/msgdb/test/unit/test_enumerator_cleanup.js
mailnews/db/msgdb/test/unit/test_propertyEnumerator.js
mailnews/db/msgdb/test/unit/test_references_parsing.js
mailnews/extensions/bayesian-spam-filter/test/unit/head_bayes.js
mailnews/extensions/bayesian-spam-filter/test/unit/resources/trainingfile.js
mailnews/extensions/bayesian-spam-filter/test/unit/test_bug228675.js
mailnews/extensions/bayesian-spam-filter/test/unit/test_customTokenization.js
mailnews/extensions/bayesian-spam-filter/test/unit/test_junkAsTraits.js
mailnews/extensions/bayesian-spam-filter/test/unit/test_msgCorpus.js
mailnews/extensions/bayesian-spam-filter/test/unit/test_traitAliases.js
mailnews/extensions/dsn/src/dsn-service.js
mailnews/extensions/mdn/src/mdn-service.js
mailnews/extensions/mdn/test/unit/head_mdn.js
mailnews/extensions/newsblog/content/FeedUtils.jsm
mailnews/extensions/newsblog/content/am-newsblog.js
mailnews/extensions/newsblog/content/feed-subscriptions.js
mailnews/extensions/newsblog/content/feedAccountWizard.js
mailnews/extensions/newsblog/content/newsblogOverlay.js
mailnews/extensions/newsblog/js/newsblog.js
mailnews/extensions/offline-startup/js/offlineStartup.js
mailnews/extensions/smime/content/am-smime.js
mailnews/extensions/smime/content/certFetchingStatus.js
mailnews/extensions/smime/content/msgCompSecurityInfo.js
mailnews/extensions/smime/content/msgReadSMIMEOverlay.js
mailnews/extensions/smime/content/msgReadSecurityInfo.js
mailnews/extensions/smime/src/smime-service.js
mailnews/imap/test/unit/head_server.js
mailnews/imap/test/unit/test_cacheParts.js
mailnews/imap/test/unit/test_converterImap.js
mailnews/imap/test/unit/test_copyThenMove.js
mailnews/imap/test/unit/test_customCommandReturnsFetchResponse.js
mailnews/imap/test/unit/test_dod.js
mailnews/imap/test/unit/test_dontStatNoSelect.js
mailnews/imap/test/unit/test_fetchCustomAttribute.js
mailnews/imap/test/unit/test_filterCustomHeaders.js
mailnews/imap/test/unit/test_gmailAttributes.js
mailnews/imap/test/unit/test_gmailOfflineMsgStore.js
mailnews/imap/test/unit/test_imapAttachmentSaves.js
mailnews/imap/test/unit/test_imapAuthMethods.js
mailnews/imap/test/unit/test_imapAutoSync.js
mailnews/imap/test/unit/test_imapChunks.js
mailnews/imap/test/unit/test_imapContentLength.js
mailnews/imap/test/unit/test_imapCopyTimeout.js
mailnews/imap/test/unit/test_imapFilterActionsPostplugin.js
mailnews/imap/test/unit/test_imapFolderCopy.js
mailnews/imap/test/unit/test_imapHdrChunking.js
mailnews/imap/test/unit/test_imapHighWater.js
mailnews/imap/test/unit/test_imapID.js
mailnews/imap/test/unit/test_imapMove.js
mailnews/imap/test/unit/test_imapPasswordFailure.js
mailnews/imap/test/unit/test_imapProxy.js
mailnews/imap/test/unit/test_imapRename.js
mailnews/imap/test/unit/test_imapUndo.js
mailnews/imap/test/unit/test_listSubscribed.js
mailnews/imap/test/unit/test_localToImapFilter.js
mailnews/imap/test/unit/test_localToImapFilterQuarantine.js
mailnews/imap/test/unit/test_lsub.js
mailnews/imap/test/unit/test_nsIMsgFolderListenerIMAP.js
mailnews/imap/test/unit/test_offlineCopy.js
mailnews/imap/test/unit/test_offlineDraftDataloss.js
mailnews/imap/test/unit/test_offlinePlayback.js
mailnews/imap/test/unit/test_offlineStoreLocking.js
mailnews/imap/test/unit/test_partsOnDemand.js
mailnews/imap/test/unit/test_preserveDataOnMove.js
mailnews/imap/test/unit/test_saveImapDraft.js
mailnews/imap/test/unit/test_saveTemplate.js
mailnews/imap/test/unit/test_starttlsFailure.js
mailnews/imap/test/unit/test_stopMovingToLocalFolder.js
mailnews/imap/test/unit/test_trustSpamAssassin.js
mailnews/import/content/importDialog.js
mailnews/import/test/unit/head_import.js
mailnews/import/test/unit/resources/TestMailImporter.js
mailnews/import/test/unit/resources/import_helper.js
mailnews/import/test/unit/resources/mock_windows_reg_factory.js
mailnews/import/test/unit/test_becky_addressbook.js
mailnews/import/test/unit/test_becky_filters.js
mailnews/import/test/unit/test_bug_263304.js
mailnews/import/test/unit/test_ldif_import.js
mailnews/import/test/unit/test_outlook_settings.js
mailnews/import/test/unit/test_shiftjis_csv.js
mailnews/import/test/unit/test_utf16_csv.js
mailnews/jsaccount/modules/JSAccountUtils.jsm
mailnews/jsaccount/modules/JaBaseUrl.jsm
mailnews/jsaccount/test/unit/head_jsaccount.js
mailnews/jsaccount/test/unit/resources/testJaBaseIncomingServerComponent.js
mailnews/jsaccount/test/unit/resources/testJaBaseMsgFolderComponent.js
mailnews/jsaccount/test/unit/resources/testJaFooUrlComponent.js
mailnews/jsaccount/test/unit/resources/testJaMsgProtocolInfoComponent.js
mailnews/jsaccount/test/unit/test_jaMsgFolder.js
mailnews/local/test/unit/head_maillocal.js
mailnews/local/test/unit/test_duplicateKey.js
mailnews/local/test/unit/test_movemailDownload.js
mailnews/local/test/unit/test_nsIMsgLocalMailFolder.js
mailnews/local/test/unit/test_nsIMsgParseMailMsgState.js
mailnews/local/test/unit/test_pop3FilterActions.js
mailnews/local/test/unit/test_pop3MoveFilter.js
mailnews/local/test/unit/test_pop3MultiCopy.js
mailnews/local/test/unit/test_pop3MultiCopy2.js
mailnews/local/test/unit/test_pop3Proxy.js
mailnews/local/test/unit/test_saveMessage.js
mailnews/mime/jsmime/test/head_xpcshell_glue.js
mailnews/mime/src/jsmime.jsm
mailnews/mime/src/mimeJSComponents.js
mailnews/mime/src/mimeParser.jsm
mailnews/mime/test/unit/head_mime.js
mailnews/mime/test/unit/test_EncodeMimePartIIStr_UTF8.js
mailnews/mime/test/unit/test_alternate_p7m_handling.js
mailnews/mime/test/unit/test_attachment_size.js
mailnews/mime/test/unit/test_bug493544.js
mailnews/mime/test/unit/test_jsmime_charset.js
mailnews/mime/test/unit/test_mimeStreaming.js
mailnews/mime/test/unit/test_nsIMsgHeaderParser1.js
mailnews/mime/test/unit/test_nsIMsgHeaderParser2.js
mailnews/mime/test/unit/test_nsIMsgHeaderParser3.js
mailnews/mime/test/unit/test_nsIMsgHeaderParser4.js
mailnews/mime/test/unit/test_nsIMsgHeaderParser5.js
mailnews/mime/test/unit/test_parseHeadersWithArray.js
mailnews/mime/test/unit/test_parser.js
mailnews/mime/test/unit/test_structured_headers.js
mailnews/news/content/downloadheaders.js
mailnews/news/src/nsNewsAutoCompleteSearch.js
mailnews/news/test/unit/head_server_setup.js
mailnews/news/test/unit/test_biff.js
mailnews/news/test/unit/test_bug37465.js
mailnews/news/test/unit/test_bug695309.js
mailnews/news/test/unit/test_getNewsMessage.js
mailnews/news/test/unit/test_internalUris.js
mailnews/news/test/unit/test_newsAutocomplete.js
mailnews/news/test/unit/test_nntpPassword2.js
mailnews/news/test/unit/test_nntpPassword3.js
mailnews/news/test/unit/test_nntpPasswordFailure.js
mailnews/news/test/unit/test_nntpPost.js
mailnews/news/test/unit/test_nntpProxy.js
mailnews/news/test/unit/test_nntpUrl.js
mailnews/news/test/unit/test_uriParser.js
mailnews/test/fakeserver/imapd.js
mailnews/test/fakeserver/maild.js
mailnews/test/fakeserver/nntpd.js
mailnews/test/fakeserver/pop3d.js
mailnews/test/resources/IMAPpump.js
mailnews/test/resources/NetworkTestUtils.jsm
mailnews/test/resources/POP3pump.js
mailnews/test/resources/PromiseTestUtils.jsm
mailnews/test/resources/abSetup.js
mailnews/test/resources/alertTestUtils.js
mailnews/test/resources/asyncTestUtils.js
mailnews/test/resources/folderEventLogHelper.js
mailnews/test/resources/localAccountUtils.js
mailnews/test/resources/logHelper.js
mailnews/test/resources/mailTestUtils.js
mailnews/test/resources/messageInjection.js
mailnews/test/resources/messageModifier.js
mailnews/test/resources/msgFolderListenerSetup.js
mailnews/test/resources/passwordStorage.js
suite/base/content/about.js
suite/base/content/defaultClientDialog.js
suite/base/content/nsContextMenu.js
suite/base/content/safeMode.js
suite/base/content/sanitize.xul
suite/base/content/tasksOverlay.js
suite/base/content/utilityOverlay.js
suite/base/content/viewApplyThemeOverlay.js
suite/browser/browser-places.js
suite/browser/metadata.js
suite/browser/navigator.js
suite/browser/nsBrowserContentHandler.js
suite/browser/nsTypeAheadFind.js
suite/browser/pageinfo/pageInfo.js
suite/browser/test/browser/browser_pluginCrashCommentAndURL.js
suite/browser/test/browser/browser_pluginnotification.js
suite/browser/test/browser/browser_pluginplaypreview.js
suite/components/console/content/console.js
suite/components/console/jsconsole-clhandler.js
suite/components/dataman/content/dataman.js
suite/components/downloads/DownloadsCommon.jsm
suite/components/downloads/DownloadsTaskbar.jsm
suite/components/downloads/content/downloadmanager.js
suite/components/downloads/content/progressDialog.js
suite/components/downloads/content/treeView.js
suite/components/downloads/content/uploadProgress.js
suite/components/downloads/tests/chrome/test_ui_stays_open_on_alert_clickback.xul
suite/components/feeds/FeedConverter.js
suite/components/feeds/FeedWriter.js
suite/components/feeds/WebContentConverter.js
suite/components/helpviewer/content/contextHelp.js
suite/components/nsAbout.js
suite/components/nsGopherProtocolStubHandler.js
suite/components/nsSuiteGlue.js
suite/components/permissions/content/cookieViewer.js
suite/components/places/PlacesUIUtils.jsm
suite/components/places/content/editBookmarkOverlay.js
suite/components/places/content/places.js
suite/components/places/content/placesOverlay.xul
suite/components/places/content/sidebarUtils.js
suite/components/places/content/treeView.js
suite/components/places/nsPlacesAutoComplete.js
suite/components/places/tests/autocomplete/head_autocomplete.js
suite/components/places/tests/chrome/test_bug549192.xul
suite/components/places/tests/chrome/test_bug549491.xul
suite/components/places/tests/chrome/test_treeview_date.xul
suite/components/places/tests/head_common.js
suite/components/places/tests/unit/head_bookmarks.js
suite/components/places/tests/unit/test_browserGlue_corrupt.js
suite/components/places/tests/unit/test_browserGlue_corrupt_nobackup.js
suite/components/places/tests/unit/test_browserGlue_corrupt_nobackup_default.js
suite/components/places/tests/unit/test_browserGlue_migrate.js
suite/components/places/tests/unit/test_browserGlue_restore.js
suite/components/pref/content/pref-advanced.js
suite/components/pref/content/pref-appearance.js
suite/components/pref/content/pref-applications.js
suite/components/pref/content/pref-cache.js
suite/components/pref/content/pref-download.js
suite/components/pref/content/pref-history.js
suite/components/pref/content/pref-navigator.js
suite/components/pref/content/pref-offlineapps.js
suite/components/pref/content/pref-search.js
suite/components/pref/content/pref-sync.js
suite/components/pref/content/preferences.js
suite/components/profile/SuiteProfileMigrator.js
suite/components/profile/content/migration.js
suite/components/profile/content/profileSelection.js
suite/components/search/content/engineManager.js
suite/components/search/content/search-panel.js
suite/components/sessionstore/content/aboutSessionRestore.js
suite/components/sessionstore/nsSessionStartup.js
suite/components/sessionstore/nsSessionStore.js
suite/components/shell/ShellService.jsm
suite/components/shell/nsSetDefault.js
suite/components/sidebar/content/customize.js
suite/components/sidebar/content/sidebarOverlay.js
suite/components/sidebar/nsSidebar.js
suite/components/sync/content/aboutSyncTabs.js
suite/components/sync/content/syncAddDevice.js
suite/components/sync/content/syncGenericChange.js
suite/components/sync/content/syncQuota.js
suite/components/sync/content/syncSetup.js
suite/components/sync/content/syncUtils.js
suite/components/tests/browser/browser_423132.js
suite/components/tests/browser/browser_465223.js
suite/components/tests/browser/browser_490040.js
suite/extensions/smime/content/msgCompSMIMEOverlay.js
suite/mailnews/components/addrbook/content/abCommon.js
suite/mailnews/components/addrbook/content/abSelectAddressesDialog.js
suite/mailnews/components/addrbook/content/abTrees.js
suite/mailnews/components/addrbook/content/addressbook.js
suite/mailnews/components/compose/content/MsgComposeCommands.js
suite/mailnews/components/compose/content/addressingWidgetOverlay.js
suite/mailnews/components/prefs/content/pref-mailnews.js
suite/mailnews/content/ABSearchDialog.js
suite/mailnews/content/FilterListDialog.js
suite/mailnews/content/SearchDialog.js
suite/mailnews/content/commandglue.js
suite/mailnews/content/mailCommands.js
suite/mailnews/content/mailContextMenus.js
suite/mailnews/content/mailWindowOverlay.js
suite/mailnews/content/msgHdrViewOverlay.js
suite/mailnews/content/msgMail3PaneWindow.js
suite/mailnews/content/msgViewNavigation.js
suite/mailnews/content/searchBar.js
suite/mailnews/content/widgetglue.js
suite/mailnews/modules/MailUtils.js
suite/modules/OpenInTabsUtils.jsm
suite/modules/PermissionUI.jsm
suite/modules/RecentWindow.jsm
suite/modules/Sanitizer.jsm
suite/modules/SitePermissions.jsm
suite/modules/WindowsJumpLists.jsm
suite/modules/WindowsPreviewPerTab.jsm
suite/modules/test/unit/head.js
--- a/chat/components/src/imAccounts.js
+++ b/chat/components/src/imAccounts.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {EmptyEnumerator, XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 
 var kPrefAutologinPending = "messenger.accounts.autoLoginPending";
 var kPrefMessengerAccounts = "messenger.accounts";
 var kPrefAccountPrefix = "messenger.account.";
 var kAccountKeyPrefix = "account";
 var kAccountOptionPrefPrefix = "options.";
 var kPrefAccountName = "name";
--- a/chat/components/src/imCommands.js
+++ b/chat/components/src/imCommands.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/commands.properties")
 );
 
 function CommandsService() { }
 CommandsService.prototype = {
   initCommands: function() {
--- a/chat/components/src/imContacts.js
+++ b/chat/components/src/imContacts.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/contacts.properties")
 );
 
 var gDBConnection = null;
 
 function executeAsyncThenFinalize(statement)
--- a/chat/components/src/imConversations.js
+++ b/chat/components/src/imConversations.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/. */
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
-ChromeUtils.import("resource:///modules/imStatusUtils.jsm");
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
+const {Status} = ChromeUtils.import("resource:///modules/imStatusUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 
 var gLastUIConvId = 0;
 var gLastPrplConvId = 0;
 
 XPCOMUtils.defineLazyGetter(this, "bundle", () =>
   Services.strings.createBundle("chrome://chat/locale/conversations.properties")
 );
--- a/chat/components/src/imCore.js
+++ b/chat/components/src/imCore.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "categoryManager",
                                    "@mozilla.org/categorymanager;1",
                                    "nsICategoryManager");
 
 var kQuitApplicationGranted = "quit-application-granted";
 var kProtocolPluginCategory = "im-protocol-plugin";
 
--- a/chat/components/src/logger.js
+++ b/chat/components/src/logger.js
@@ -1,19 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var CC = Components.Constructor;
 
 ChromeUtils.import("resource:///modules/hiddenWindow.jsm");
-ChromeUtils.import("resource:///modules/imServices.jsm");
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
+const {EmptyEnumerator, XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
-ChromeUtils.import("resource:///modules/ToLocaleFormat.jsm");
+const {ToLocaleFormat} = ChromeUtils.import("resource:///modules/ToLocaleFormat.jsm");
 
 ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/logger.properties")
 );
 
 var kLineBreak = "@mozilla.org/windows-registry-key;1" in Cc ? "\r\n" : "\n";
--- a/chat/components/src/smileProtocolHandler.js
+++ b/chat/components/src/smileProtocolHandler.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/imSmileys.jsm");
 
 var kSmileRegexp = /^smile:\/\//;
 
 function smileProtocolHandler() { }
 
 smileProtocolHandler.prototype = {
   scheme: "smile",
--- a/chat/components/src/test/test_accounts.js
+++ b/chat/components/src/test/test_accounts.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/. */
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource:///modules/imServices.jsm");
-ChromeUtils.import("resource://testing-common/AppInfo.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
+const {updateAppInfo} = ChromeUtils.import("resource://testing-common/AppInfo.jsm");
 
 function run_test() {
   do_get_profile();
 
   // Test the handling of accounts for unknown protocols.
   const kAccountName = "Unknown"
   const kPrplId = "prpl-unknown";
 
--- a/chat/components/src/test/test_commands.js
+++ b/chat/components/src/test/test_commands.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 // We don't load the command service via Services as we want to access
 // _findCommands in order to avoid having to intercept command execution.
 var imCommands = {};
 Services.scriptloader.loadSubScript("resource:///components/imCommands.js", imCommands);
 
 var kPrplId = "green";
 var kPrplId2 = "red";
 
--- a/chat/components/src/test/test_conversations.js
+++ b/chat/components/src/test/test_conversations.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 
 var imConversations = {};
 Services.scriptloader.loadSubScript(
   "resource:///components/imConversations.js", imConversations
 );
 
 // Fake prplConversation
--- a/chat/components/src/test/test_logger.js
+++ b/chat/components/src/test/test_logger.js
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 do_get_profile();
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/osfile.jsm");
+const {OS} = ChromeUtils.import("resource://gre/modules/osfile.jsm");
 
 var gLogger = {};
 Services.scriptloader.loadSubScript("resource:///components/logger.js", gLogger);
 
 var logDirPath = OS.Path.join(OS.Constants.Path.profileDir, "logs");
 
 var dummyAccount = {
   name: "dummy-account",
--- a/chat/content/browserRequest.js
+++ b/chat/content/browserRequest.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 
 var wpl = Ci.nsIWebProgressListener;
 
 var reporterListener = {
   _isBusy: false,
   get statusMeter() {
     delete this.statusMeter;
     return this.statusMeter = document.getElementById("statusbar-icon");
--- a/chat/modules/DNS.jsm
+++ b/chat/modules/DNS.jsm
@@ -1,19 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This module is responsible for performing DNS queries using ctypes for
 // loading system DNS libraries on Linux, Mac and Windows.
 
 if (typeof Components !== "undefined") {
-  ChromeUtils.import("resource://gre/modules/ctypes.jsm");
-  ChromeUtils.import("resource://gre/modules/Services.jsm");
-  ChromeUtils.import('resource://gre/modules/PromiseWorker.jsm');
+  var {ctypes} = ChromeUtils.import("resource://gre/modules/ctypes.jsm");
+  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+  var {BasePromiseWorker} = ChromeUtils.import("resource://gre/modules/PromiseWorker.jsm");
 }
 
 var LOCATION = "resource:///modules/DNS.jsm";
 
 // These constants are luckily shared, but with different names
 var NS_T_TXT = 16; // DNS_TYPE_TXT
 var NS_T_SRV = 33; // DNS_TYPE_SRV
 
--- a/chat/modules/ToLocaleFormat.jsm
+++ b/chat/modules/ToLocaleFormat.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 this.EXPORTED_SYMBOLS = ["ToLocaleFormat"];
 
 // JS implementation of the deprecated Date.toLocaleFormat.
 // aFormat follows strftime syntax,
 // http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html
 function ToLocaleFormat(aFormat, aDate) {
   function Day(t) {
--- a/chat/modules/hiddenWindow.jsm
+++ b/chat/modules/hiddenWindow.jsm
@@ -1,16 +1,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.EXPORTED_SYMBOLS = ["getHiddenHTMLWindow"];
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "hiddenWindow", () =>
   Services.appShell.hiddenDOMWindow
 );
 #ifndef XP_MACOSX
 function getHiddenHTMLWindow() { return hiddenWindow; }
 #else
 function getHiddenHTMLWindow() {
--- a/chat/modules/imContentSink.jsm
+++ b/chat/modules/imContentSink.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 Cu.importGlobalProperties(["DOMParser"]);
 
 this.EXPORTED_SYMBOLS = [
   "cleanupImMarkup", // used to clean up incoming IMs.
                      // This will use the global ruleset of acceptable stuff
                      // except if another (custom one) is provided
   "createDerivedRuleset", // used to create a ruleset that inherits from the
                           // default one
--- a/chat/modules/imServices.jsm
+++ b/chat/modules/imServices.jsm
@@ -1,16 +1,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.EXPORTED_SYMBOLS = ["Services"];
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(Services, "accounts",
                                    "@mozilla.org/chat/accounts-service;1",
                                    "imIAccountsService");
 XPCOMUtils.defineLazyServiceGetter(Services, "core",
                                    "@mozilla.org/chat/core-service;1",
                                    "imICoreService");
 XPCOMUtils.defineLazyServiceGetter(Services, "cmd",
--- a/chat/modules/imSmileys.jsm
+++ b/chat/modules/imSmileys.jsm
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "gTextDecoder", () => {
   return new TextDecoder();
 });
 
 ChromeUtils.defineModuleGetter(this, "NetUtil",
                                "resource://gre/modules/NetUtil.jsm");
 
--- a/chat/modules/imStatusUtils.jsm
+++ b/chat/modules/imStatusUtils.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 = ["Status"];
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/imServices.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/status.properties")
 );
 
 var imIStatusInfo = Ci.imIStatusInfo;
 var statusAttributes = {};
--- a/chat/modules/imTextboxUtils.jsm
+++ b/chat/modules/imTextboxUtils.jsm
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = [
   "MessageFormat",
   "TextboxSize",
   "TextboxSpellChecker"
 ];
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 
 var MessageFormat = {
   _observedPrefs: [],
 
   getValues: function mf_getValues() {
     this.unregisterObservers();
     let langGroup =
       Services.prefs.getComplexValue("font.language.group",
--- a/chat/modules/imThemes.jsm
+++ b/chat/modules/imThemes.jsm
@@ -9,19 +9,19 @@ this.EXPORTED_SYMBOLS = [
   "getThemeVariants",
   "isNextMessage",
   "insertHTMLForMessage",
   "initHTMLDocument",
   "getMessagesForRange",
   "serializeSelection"
 ];
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
-ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
+const {DownloadUtils} = ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.importGlobalProperties(["DOMParser", "Element"]);
 
 var kMessagesStylePrefBranch = "messenger.options.messagesStyle.";
 var kThemePref = "theme";
 var kVariantPref = "variant";
 var kShowHeaderPref = "showHeader";
 var kCombineConsecutivePref = "combineConsecutive";
 var kCombineConsecutiveIntervalPref = "combineConsecutiveInterval";
--- a/chat/modules/imXPCOMUtils.jsm
+++ b/chat/modules/imXPCOMUtils.jsm
@@ -9,18 +9,18 @@ this.EXPORTED_SYMBOLS = [
   "executeSoon",
   "nsSimpleEnumerator",
   "EmptyEnumerator",
   "ClassInfo",
   "l10nHelper",
   "initLogModule"
 ];
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 
 var kLogLevelPref = "purple.debug.loglevel";
 
 /**
  * Creates an nsIScriptError instance and logs it.
  *
  * @param aModule
  *        string identifying the module within which the error occurred.
--- a/chat/modules/jsProtoHelper.jsm
+++ b/chat/modules/jsProtoHelper.jsm
@@ -10,18 +10,18 @@ this.EXPORTED_SYMBOLS = [
   "GenericConvChatBuddyPrototype",
   "GenericConversationPrototype",
   "GenericMessagePrototype",
   "GenericProtocolPrototype",
   "Message",
   "TooltipInfo"
 ];
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {EmptyEnumerator, XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/conversations.properties")
 );
 
 var GenericAccountPrototype = {
   __proto__: ClassInfo("prplIAccount", "generic account object"),
   get wrappedJSObject() { return this; },
--- a/chat/modules/socket.jsm
+++ b/chat/modules/socket.jsm
@@ -73,17 +73,17 @@
  * To Do:
  *   Add a message queue to keep from flooding a server (just an array, just
  *     keep shifting the first element off and calling as setTimeout for the
  *     desired flood time?).
  */
 
 this.EXPORTED_SYMBOLS = ["Socket"];
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource:///modules/ArrayBufferUtils.jsm");
 ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/hiddenWindow.jsm");
 
 // Network errors see: xpcom/base/nsError.h
 var NS_ERROR_MODULE_NETWORK = 2152398848;
 var NS_ERROR_CONNECTION_REFUSED = NS_ERROR_MODULE_NETWORK + 13;
 var NS_ERROR_NET_TIMEOUT = NS_ERROR_MODULE_NETWORK + 14;
--- a/chat/modules/test/test_NormalizedMap.js
+++ b/chat/modules/test/test_NormalizedMap.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource:///modules/NormalizedMap.jsm");
+const {NormalizedMap} = ChromeUtils.import("resource:///modules/NormalizedMap.jsm");
 
 function test_setter_getter() {
   let m = new NormalizedMap(aStr => aStr.toLowerCase());
   m.set("foo", "bar");
   m.set("BaZ", "blah");
   Assert.equal(m.has("FOO"), true);
   Assert.equal(m.has("BaZ"), true);
   Assert.equal(m.get("FOO"), "bar");
--- a/chat/modules/test/test_filtering.js
+++ b/chat/modules/test/test_filtering.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 ChromeUtils.import("resource:///modules/imContentSink.jsm");
 
 var kModePref = "messenger.options.filterMode";
 var kStrictMode = 0, kStandardMode = 1, kPermissiveMode = 2;
 
 function run_test() {
   let defaultMode = Services.prefs.getIntPref(kModePref);
 
--- a/chat/protocols/facebook/facebook.js
+++ b/chat/protocols/facebook/facebook.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/facebook.properties")
 );
 
 function FacebookAccount(aProtoInstance, aImAccount) {
   this._init(aProtoInstance, aImAccount);
--- a/chat/protocols/gtalk/gtalk.js
+++ b/chat/protocols/gtalk/gtalk.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 ChromeUtils.import("resource:///modules/xmpp.jsm");
 ChromeUtils.import("resource:///modules/xmpp-session.jsm");
 ChromeUtils.import("resource:///modules/xmpp-xml.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/xmpp.properties")
 );
--- a/chat/protocols/irc/irc.js
+++ b/chat/protocols/irc/irc.js
@@ -1,18 +1,18 @@
 /* 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/. */
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {EmptyEnumerator, XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 ChromeUtils.import("resource:///modules/ircUtils.jsm");
-ChromeUtils.import("resource:///modules/ircHandlers.jsm");
+const {ircHandlers} = ChromeUtils.import("resource:///modules/ircHandlers.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
-ChromeUtils.import("resource:///modules/NormalizedMap.jsm");
+const {NormalizedMap} = ChromeUtils.import("resource:///modules/NormalizedMap.jsm");
 ChromeUtils.import("resource:///modules/socket.jsm");
 
 ChromeUtils.defineModuleGetter(this, "PluralForm",
   "resource://gre/modules/PluralForm.jsm");
 
 ChromeUtils.defineModuleGetter(this, "DownloadUtils",
   "resource://gre/modules/DownloadUtils.jsm");
 
--- a/chat/protocols/irc/ircBase.jsm
+++ b/chat/protocols/irc/ircBase.jsm
@@ -15,18 +15,18 @@
  *   RFC 2813: Internet Relay Chat: Server Protocol
  *     http://tools.ietf.org/html/rfc2813
  *   RFC 1459: Internet Relay Chat Protocol
  *     http://tools.ietf.org/html/rfc1459
  */
 this.EXPORTED_SYMBOLS = ["ircBase"];
 
 ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
-ChromeUtils.import("resource:///modules/imServices.jsm");
-ChromeUtils.import("resource:///modules/ircHandlers.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
+const {ircHandlers} = ChromeUtils.import("resource:///modules/ircHandlers.jsm");
 ChromeUtils.import("resource:///modules/ircUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 
 function privmsg(aAccount, aMessage, aIsNotification) {
   let params = {incoming: true, tags: aMessage.tags};
   if (aIsNotification)
     params.notification = true;
   aAccount.getConversation(aAccount.isMUCName(aMessage.params[0]) ?
--- a/chat/protocols/irc/ircCAP.jsm
+++ b/chat/protocols/irc/ircCAP.jsm
@@ -14,17 +14,17 @@
  *     http://ircv3.net/specs/core/capability-negotiation-3.2.html
  *
  * Note that this doesn't include any implementation as these RFCs do not even
  * include example parameters.
  */
 
 this.EXPORTED_SYMBOLS = ["ircCAP"];
 
-ChromeUtils.import("resource:///modules/ircHandlers.jsm");
+const {ircHandlers} = ChromeUtils.import("resource:///modules/ircHandlers.jsm");
 ChromeUtils.import("resource:///modules/ircUtils.jsm");
 
 /*
  * Parses a CAP message of the form:
  *   CAP <subcommand> [<parameters>]
  * The cap field is added to the message and it has the following fields:
  *   subcommand
  *   parameters A list of capabilities.
--- a/chat/protocols/irc/ircCTCP.jsm
+++ b/chat/protocols/irc/ircCTCP.jsm
@@ -5,19 +5,19 @@
 /*
  * This implements the Client-to-Client Protocol (CTCP), a subprotocol of IRC.
  *   REVISED AND UPDATED CTCP SPECIFICATION
  *     http://www.alien.net.au/irc/ctcp.txt
  */
 
 this.EXPORTED_SYMBOLS = ["ircCTCP", "ctcpBase"];
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
-ChromeUtils.import("resource:///modules/ircHandlers.jsm");
+const {ircHandlers} = ChromeUtils.import("resource:///modules/ircHandlers.jsm");
 ChromeUtils.import("resource:///modules/ircUtils.jsm");
 
 // Split into a CTCP message which is a single command and a single parameter:
 //   <command> " " <parameter>
 // The high level dequote is to unescape \001 in the message content.
 function CTCPMessage(aMessage, aRawCTCPMessage) {
   let message = Object.assign({}, aMessage);
   message.ctcp = {};
--- a/chat/protocols/irc/ircDCC.jsm
+++ b/chat/protocols/irc/ircDCC.jsm
@@ -6,17 +6,17 @@
  * This contains an implementation of the Direct Client-to-Client (DCC)
  * protocol.
  *   A description of the DCC protocol
  *     http://www.irchelp.org/irchelp/rfc/dccspec.html
  */
 
 this.EXPORTED_SYMBOLS = ["ctcpDCC"/*, "dccBase"*/];
 
-ChromeUtils.import("resource:///modules/ircHandlers.jsm");
+const {ircHandlers} = ChromeUtils.import("resource:///modules/ircHandlers.jsm");
 ChromeUtils.import("resource:///modules/ircUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 
 // Parse a CTCP message into a DCC message. A DCC message is a CTCP message of
 // the form:
 //   DCC <type> <argument> <address> <port> [<size>]
 function DCCMessage(aMessage, aAccount) {
   let message = aMessage;
--- a/chat/protocols/irc/ircISUPPORT.jsm
+++ b/chat/protocols/irc/ircISUPPORT.jsm
@@ -9,17 +9,17 @@
  *     http://www.irc.org/tech_docs/005.html
  *   RFC Drafts: IRC RPL_ISUPPORT Numeric Definition
  *     http://tools.ietf.org/html/draft-brocklesby-irc-isupport-03
  *     http://tools.ietf.org/html/draft-hardy-irc-isupport-00
  */
 
 this.EXPORTED_SYMBOLS = ["ircISUPPORT", "isupportBase"];
 
-ChromeUtils.import("resource:///modules/ircHandlers.jsm");
+const {ircHandlers} = ChromeUtils.import("resource:///modules/ircHandlers.jsm");
 ChromeUtils.import("resource:///modules/ircUtils.jsm");
 
 /*
  * Parses an ircMessage into an ISUPPORT message for each token of the form:
  *   <parameter>=<value> or -<value>
  * The isupport field is added to the message and it has the following fields:
  *   parameter  What is being configured by this ISUPPORT token.
  *   useDefault Whether this parameter should be reset to the default value, as
--- a/chat/protocols/irc/ircMultiPrefix.jsm
+++ b/chat/protocols/irc/ircMultiPrefix.jsm
@@ -12,17 +12,17 @@
  * foo knows that it has mode +h, but bar does not know foo has +h set.
  *
  *   http://wiki.inspircd.org/Modules/2.1/namesx
  *   http://ircv3.atheme.org/extensions/multi-prefix-3.1
  */
 
 this.EXPORTED_SYMBOLS = ["isupportNAMESX", "capMultiPrefix"];
 
-ChromeUtils.import("resource:///modules/ircHandlers.jsm");
+const {ircHandlers} = ChromeUtils.import("resource:///modules/ircHandlers.jsm");
 
 var isupportNAMESX = {
   name: "ISUPPORT NAMESX",
   // Slightly above default ISUPPORT priority.
   priority: ircHandlers.DEFAULT_PRIORITY + 10,
   isEnabled: () => true,
 
   commands: {
--- a/chat/protocols/irc/ircNonStandard.jsm
+++ b/chat/protocols/irc/ircNonStandard.jsm
@@ -9,17 +9,17 @@
  * listing the known servers that support this extension.
  *
  * Resources for these commands include:
  *  https://github.com/atheme/charybdis/blob/master/include/numeric.h
  *  http://hg.unrealircd.com/hg/unreal/raw-file/tip/include/numeric.h
  */
 this.EXPORTED_SYMBOLS = ["ircNonStandard"];
 
-ChromeUtils.import("resource:///modules/ircHandlers.jsm");
+const {ircHandlers} = ChromeUtils.import("resource:///modules/ircHandlers.jsm");
 ChromeUtils.import("resource:///modules/ircUtils.jsm");
 
 var ircNonStandard = {
   name: "Non-Standard IRC Extensions",
   priority: ircHandlers.DEFAULT_PRIORITY + 1,
   isEnabled: () => true,
 
   commands: {
--- a/chat/protocols/irc/ircSASL.jsm
+++ b/chat/protocols/irc/ircSASL.jsm
@@ -5,17 +5,17 @@
 /*
  * This implements SASL for IRC.
  *   https://raw.github.com/atheme/atheme/master/doc/SASL
  *   https://github.com/ircv3/ircv3-specifications/blob/master/extensions/sasl-3.1
  */
 
 this.EXPORTED_SYMBOLS = ["ircSASL", "capSASL"];
 
-ChromeUtils.import("resource:///modules/ircHandlers.jsm");
+const {ircHandlers} = ChromeUtils.import("resource:///modules/ircHandlers.jsm");
 ChromeUtils.import("resource:///modules/ircUtils.jsm");
 
 var ircSASL = {
   name: "SASL AUTHENTICATE",
   priority: ircHandlers.DEFAULT_PRIORITY,
   isEnabled: () => true,
 
   commands: {
--- a/chat/protocols/irc/ircServerTime.jsm
+++ b/chat/protocols/irc/ircServerTime.jsm
@@ -4,17 +4,17 @@
 
 /*
  * This implements server-time for IRC.
  *   http://ircv3.net/specs/extensions/server-time-3.2.html
  */
 
 this.EXPORTED_SYMBOLS = ["capServerTime", "tagServerTime"];
 
-ChromeUtils.import("resource:///modules/ircHandlers.jsm");
+const {ircHandlers} = ChromeUtils.import("resource:///modules/ircHandlers.jsm");
 
 function handleServerTimeTag(aMsg) {
   if (aMsg.tagValue) {
     // Normalize leap seconds to the next second before it.
     const time = aMsg.tagValue.replace(/60.\d{3}(?=Z$)/, "59.999");
     aMsg.message.time = Math.floor(Date.parse(time) / 1000);
     aMsg.message.delayed = true;
   }
--- a/chat/protocols/irc/ircServices.jsm
+++ b/chat/protocols/irc/ircServices.jsm
@@ -14,17 +14,17 @@
  *
  * Anope
  *  http://www.anope.org/docgen/1.8/
  */
 
 this.EXPORTED_SYMBOLS = ["ircServices", "servicesBase"];
 
 ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
-ChromeUtils.import("resource:///modules/ircHandlers.jsm");
+const {ircHandlers} = ChromeUtils.import("resource:///modules/ircHandlers.jsm");
 ChromeUtils.import("resource:///modules/ircUtils.jsm");
 
 /*
  * If a service is found, an extra field (serviceName) is added with the
  * "generic" service name (e.g. a bot which performs NickServ like functionality
  * will be mapped to NickServ).
  */
 function ServiceMessage(aAccount, aMessage) {
--- a/chat/protocols/irc/ircUtils.jsm
+++ b/chat/protocols/irc/ircUtils.jsm
@@ -1,16 +1,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.EXPORTED_SYMBOLS = ["_", "_conv", "ctcpFormatToText", "ctcpFormatToHTML",
                           "conversationErrorMessage", "kListRefreshInterval"];
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/irc.properties")
 );
 
 XPCOMUtils.defineLazyGetter(this, "_conv", () =>
   l10nHelper("chrome://chat/locale/conversations.properties")
 );
--- a/chat/protocols/irc/ircWatchMonitor.jsm
+++ b/chat/protocols/irc/ircWatchMonitor.jsm
@@ -11,17 +11,17 @@
  *   WATCH (supported by Bahamut and UnrealIRCd)
  *     http://www.stack.nl/~jilles/cgi-bin/hgwebdir.cgi/irc-documentation-jilles/raw-file/tip/reference/draft-meglio-irc-watch-00.txt
  */
 
 this.EXPORTED_SYMBOLS = ["ircWATCH", "isupportWATCH", "ircMONITOR",
                           "isupportMONITOR"];
 
 ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
-ChromeUtils.import("resource:///modules/ircHandlers.jsm");
+const {ircHandlers} = ChromeUtils.import("resource:///modules/ircHandlers.jsm");
 ChromeUtils.import("resource:///modules/ircUtils.jsm");
 
 function setStatus(aAccount, aNick, aStatus) {
   if (!aAccount.watchEnabled && !aAccount.monitorEnabled)
     return false;
 
   if (aStatus == "AWAY") {
     // We need to request the away message.
--- a/chat/protocols/irc/test/test_ctcpDequote.js
+++ b/chat/protocols/irc/test/test_ctcpDequote.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var ircCTCP = {};
 Services.scriptloader.loadSubScript("resource:///modules/ircCTCP.jsm", ircCTCP);
 
 var input = [
   "ACTION",
   "ACTION test",
   "ACTION \x5Ctest",
   "ACTION te\x5Cst",
--- a/chat/protocols/irc/test/test_ctcpQuote.js
+++ b/chat/protocols/irc/test/test_ctcpQuote.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var irc = {};
 Services.scriptloader.loadSubScript("resource:///components/irc.js", irc);
 
 var input = [
   undefined,
   "test",
   "\\test",
   "te\\st",
--- a/chat/protocols/irc/test/test_ircCAP.js
+++ b/chat/protocols/irc/test/test_ircCAP.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var cap = {};
 Services.scriptloader.loadSubScript("resource:///modules/ircCAP.jsm", cap);
 
 var testData = [
   // A normal LS from the server.
   [
     ["*", "LS", "multi-prefix sasl userhost-in-names"],
     [{
--- a/chat/protocols/irc/test/test_ircCommands.js
+++ b/chat/protocols/irc/test/test_ircCommands.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 ChromeUtils.import("resource:///modules/ircCommands.jsm");
 
 var irc = {};
 Services.scriptloader.loadSubScript("resource:///components/irc.js", irc);
 
 // Ensure the commands have been initialized.
 Services.conversations.initConversations();
 
--- a/chat/protocols/irc/test/test_ircMessage.js
+++ b/chat/protocols/irc/test/test_ircMessage.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var irc = {};
 Services.scriptloader.loadSubScript("resource:///components/irc.js", irc);
 
 var testData = [
   // First off, let's test the messages from RFC 2812.
   "PASS secretpasswordhere",
   "NICK Wiz",
   ":WiZ!jto@tolsun.oulu.fi NICK Kilroy",
--- a/chat/protocols/irc/test/test_ircNonStandard.js
+++ b/chat/protocols/irc/test/test_ircNonStandard.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var irc = {};
 Services.scriptloader.loadSubScript("resource:///components/irc.js", irc);
-ChromeUtils.import("resource:///modules/ircNonStandard.jsm");
+const {ircNonStandard} = ChromeUtils.import("resource:///modules/ircNonStandard.jsm");
 
 // The function that is under test here.
 var NOTICE = ircNonStandard.commands["NOTICE"];
 
 function FakeConversation() {}
 FakeConversation.prototype = {
   writeMessage: function(aSender, aTarget, aOpts) {}
 };
--- a/chat/protocols/irc/test/test_ircServerTime.js
+++ b/chat/protocols/irc/test/test_ircServerTime.js
@@ -1,13 +1,13 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 ChromeUtils.import("resource:///modules/ircServerTime.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var irc = {};
 Services.scriptloader.loadSubScript("resource:///components/irc.js", irc);
 
 function getTags(aRawMsg) {
   const {tags} = irc.ircMessage(aRawMsg, "doesnt@matter");
 
   return tags;
--- a/chat/protocols/irc/test/test_sendBufferedCommand.js
+++ b/chat/protocols/irc/test/test_sendBufferedCommand.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 var irc = {};
 Services.scriptloader.loadSubScript("resource:///components/irc.js", irc);
 
 function FakeAccount() {
   this._commandBuffers = new Map();
   this.callbacks = [];
 }
 FakeAccount.prototype = {
--- a/chat/protocols/irc/test/test_setMode.js
+++ b/chat/protocols/irc/test/test_setMode.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
 var irc = {};
 Services.scriptloader.loadSubScript("resource:///components/irc.js", irc);
 Services.conversations.initConversations();
 
 
 function FakeAccount() {
   this.normalizeNick = irc.ircAccount.prototype.normalizeNick.bind(this);
 }
--- a/chat/protocols/irc/test/test_splitLongMessages.js
+++ b/chat/protocols/irc/test/test_splitLongMessages.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var irc = {};
 Services.scriptloader.loadSubScript("resource:///components/irc.js", irc);
 
 var messages = {
   // Exactly 51 characters.
   "This is a test.": ["This is a test."],
   // Too long.
   "This is a message that is too long.":
--- a/chat/protocols/irc/test/test_tryNewNick.js
+++ b/chat/protocols/irc/test/test_tryNewNick.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var irc = {};
 Services.scriptloader.loadSubScript("resource:///components/irc.js", irc);
 
 var fakeProto = {
   id: "fake-proto",
   options: {alternateNicks: ""},
   _getOptionDefault: function(aOption) { return this.options[aOption]; }
 };
--- a/chat/protocols/jsTest/jsTestProtocol.js
+++ b/chat/protocols/jsTest/jsTestProtocol.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 
 function Conversation(aAccount)
 {
   this._init(aAccount);
 }
 Conversation.prototype = {
   __proto__: GenericConvIMPrototype,
--- a/chat/protocols/matrix/matrix-sdk.jsm
+++ b/chat/protocols/matrix/matrix-sdk.jsm
@@ -1,18 +1,18 @@
 /* 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/. */
 
-ChromeUtils.import("resource://gre/modules/Console.jsm");
+const {console} = ChromeUtils.import("resource://gre/modules/Console.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Timer.jsm");
+const {clearInterval, clearTimeout, setInterval, setTimeout} = ChromeUtils.import("resource://gre/modules/Timer.jsm");
 Cu.importGlobalProperties(["XMLHttpRequest"]);
 
-const { Loader, Require, Module } = ChromeUtils.import("resource://devtools/shared/base-loader.js", null);
+const { Loader, Require, Module } = ChromeUtils.import("resource://devtools/shared/base-loader.js");
 
 this.EXPORTED_SYMBOLS = ["MatrixSDK"];
 
 // Set-up loading so require works properly in CommonJS modules.
 let matrixPath = "resource:///modules/matrix/";
 let loader = Loader({
   paths: {
       "": matrixPath,
--- a/chat/protocols/matrix/matrix.js
+++ b/chat/protocols/matrix/matrix.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/matrix.properties")
 );
 
 ChromeUtils.defineModuleGetter(this, "MatrixSDK", "resource:///modules/matrix-sdk.jsm");
 
--- a/chat/protocols/odnoklassniki/odnoklassniki.js
+++ b/chat/protocols/odnoklassniki/odnoklassniki.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 ChromeUtils.import("resource:///modules/xmpp.jsm");
 ChromeUtils.import("resource:///modules/xmpp-session.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/xmpp.properties")
 );
 
--- a/chat/protocols/skype/skype.js
+++ b/chat/protocols/skype/skype.js
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Http.jsm");
+const {httpRequest} = ChromeUtils.import("resource://gre/modules/Http.jsm");
 ChromeUtils.import("resource:///modules/ArrayBufferUtils.jsm");
 ChromeUtils.import("resource:///modules/BigInteger.jsm");
-ChromeUtils.import("resource:///modules/imServices.jsm");
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
+const {EmptyEnumerator, XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 
 // Constants used by the login process. This emulates a captured session using
 // official means.
 var kLockAndKeyAppId = "msmsgs@msnmsgr.com";
 var kLockAndKeySecret = "Q1P7W2E4J9R8U3S5";
 var kClientId = "578134";
 var kClientInfo = "os=Windows; osVer=8.1; proc=Win32; lcid=en-us; " +
--- a/chat/protocols/skype/test/test_MagicSha256.js
+++ b/chat/protocols/skype/test/test_MagicSha256.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var skype = {};
 Services.scriptloader.loadSubScript("resource:///components/skype.js", skype);
 
 var data = {
   "1416264993": "3a33ac47fe2ec1a33d569f4be5c69ddc",
   "1416387358": "eca9716e1eedcbe93320ba794cea3388",
   "1416392361": "2ed6fc80c3303caa137ae3fd4fcc7d80"
 };
--- a/chat/protocols/skype/test/test_contactUrlToName.js
+++ b/chat/protocols/skype/test/test_contactUrlToName.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var skype = {};
 Services.scriptloader.loadSubScript("resource:///components/skype.js", skype);
 
 var data = {
   "https://bay-client-s.gateway.messenger.live.com/v1/users/ME/contacts/8:clokep":
     "clokep",
   "https://bay-client-s.gateway.messenger.live.com/v1/users/8:clokep/presenceDocs/messagingService":
     "clokep"
--- a/chat/protocols/twitter/twitter.js
+++ b/chat/protocols/twitter/twitter.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/. */
 
-ChromeUtils.import("resource://gre/modules/Http.jsm");
-ChromeUtils.import("resource:///modules/imServices.jsm");
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {httpRequest, percentEncode} = ChromeUtils.import("resource://gre/modules/Http.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 ChromeUtils.import("resource:///modules/twitter-text.jsm");
 
 var NS_PREFBRANCH_PREFCHANGE_TOPIC_ID = "nsPref:changed";
 var kMaxMessageLength = 140;
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/twitter.properties")
--- a/chat/protocols/xmpp/test/test_dnsSrv.js
+++ b/chat/protocols/xmpp/test/test_dnsSrv.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var dns = {};
 Services.scriptloader.loadSubScript("resource:///modules/DNS.jsm", dns);
 
 var xmpp = {};
 Services.scriptloader.loadSubScript("resource:///components/xmpp.js", xmpp);
 
 var xmppSession = {};
--- a/chat/protocols/xmpp/test/test_parseJidAndNormalization.js
+++ b/chat/protocols/xmpp/test/test_parseJidAndNormalization.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var xmpp = {};
 Services.scriptloader.loadSubScript("resource:///components/xmpp.js", xmpp);
 
 var TEST_DATA = {
   "abdelrhman@instantbird": {
     node: "abdelrhman",
     domain: "instantbird",
--- a/chat/protocols/xmpp/test/test_saslPrep.js
+++ b/chat/protocols/xmpp/test/test_saslPrep.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var xmppAuth = {};
 Services.scriptloader.loadSubScript("resource:///modules/xmpp-authmechs.jsm",
                                     xmppAuth);
 
 // RFC 4013 3.Examples
 var TEST_DATA = [
   {
--- a/chat/protocols/xmpp/test/test_xmppParser.js
+++ b/chat/protocols/xmpp/test/test_xmppParser.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var xmppXml = {};
 Services.scriptloader.loadSubScript("resource:///modules/xmpp-xml.jsm", xmppXml);
 
 var TEST_DATA = [
   {
     input: '<message xmlns="jabber:client" from="juliet@capulet.example/balcony" \
 to="romeo@montague.example/garden" type="chat">\
--- a/chat/protocols/xmpp/test/test_xmppXml.js
+++ b/chat/protocols/xmpp/test/test_xmppXml.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var xmppXml = {};
 Services.scriptloader.loadSubScript("resource:///modules/xmpp-xml.jsm", xmppXml);
 
 var TEST_DATA = [
   {
     input: {
       name: "message",
--- a/chat/protocols/xmpp/xmpp-authmechs.jsm
+++ b/chat/protocols/xmpp/xmpp-authmechs.jsm
@@ -7,17 +7,17 @@
 // By default we currently support the PLAIN and the DIGEST-MD5 mechanisms.
 // As this is only used by XMPPSession, it may seem like an internal
 // detail of the XMPP implementation, but exporting it is valuable so that
 // add-ons can add support for more auth mechanisms easily by adding them
 // in XMPPAuthMechanisms without having to modify XMPPSession.
 
 this.EXPORTED_SYMBOLS = ["XMPPAuthMechanisms"];
 
-ChromeUtils.import("resource://services-crypto/utils.js");
+const {CryptoUtils, btoa} = ChromeUtils.import("resource://services-crypto/utils.js");
 ChromeUtils.import("resource:///modules/xmpp-xml.jsm");
 
 // Handle PLAIN authorization mechanism.
 function* PlainAuth(aUsername, aPassword, aDomain) {
   let data = "\0"+ aUsername + "\0" + aPassword;
 
   // btoa for Unicode, see https://developer.mozilla.org/en-US/docs/DOM/window.btoa
   let base64Data = btoa(unescape(encodeURIComponent(data)));
--- a/chat/protocols/xmpp/xmpp-commands.jsm
+++ b/chat/protocols/xmpp/xmpp-commands.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 = ["commands"];
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/xmpp.properties")
 );
 
 // Get conversation object.
 function getConv(aConv) {
   return aConv.wrappedJSObject;
--- a/chat/protocols/xmpp/xmpp-session.jsm
+++ b/chat/protocols/xmpp/xmpp-session.jsm
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["XMPPSession", "XMPPDefaultResource"];
 
-ChromeUtils.import("resource:///modules/DNS.jsm");
-ChromeUtils.import("resource:///modules/imServices.jsm");
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {DNS} = ChromeUtils.import("resource:///modules/DNS.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/socket.jsm");
 ChromeUtils.import("resource:///modules/xmpp-xml.jsm");
 ChromeUtils.import("resource:///modules/xmpp-authmechs.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/xmpp.properties")
 );
 
--- a/chat/protocols/xmpp/xmpp.js
+++ b/chat/protocols/xmpp/xmpp.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 ChromeUtils.import("resource:///modules/xmpp.jsm");
 ChromeUtils.import("resource:///modules/xmpp-session.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/xmpp.properties")
 );
 
--- a/chat/protocols/xmpp/xmpp.jsm
+++ b/chat/protocols/xmpp/xmpp.jsm
@@ -4,21 +4,21 @@
 
 this.EXPORTED_SYMBOLS = [
   "XMPPConversationPrototype",
   "XMPPMUCConversationPrototype",
   "XMPPAccountBuddyPrototype",
   "XMPPAccountPrototype"
 ];
 
-ChromeUtils.import("resource:///modules/imServices.jsm");
-ChromeUtils.import("resource:///modules/imStatusUtils.jsm");
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource:///modules/imServices.jsm");
+const {Status} = ChromeUtils.import("resource:///modules/imStatusUtils.jsm");
+const {EmptyEnumerator, XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
-ChromeUtils.import("resource:///modules/NormalizedMap.jsm");
+const {NormalizedMap} = ChromeUtils.import("resource:///modules/NormalizedMap.jsm");
 ChromeUtils.import("resource:///modules/socket.jsm");
 ChromeUtils.import("resource:///modules/xmpp-xml.jsm");
 ChromeUtils.import("resource:///modules/xmpp-session.jsm");
 
 ChromeUtils.defineModuleGetter(this, "DownloadUtils",
   "resource://gre/modules/DownloadUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "FileUtils",
   "resource://gre/modules/FileUtils.jsm");
--- a/chat/protocols/yahoo/yahoo.js
+++ b/chat/protocols/yahoo/yahoo.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource:///modules/imXPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/jsProtoHelper.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "_", () =>
   l10nHelper("chrome://chat/locale/yahoo.properties")
 );
 
 function YahooAccount(aProtoInstance, aImAccount)
 {
--- a/common/saxparser/test/unit/test_parser.js
+++ b/common/saxparser/test/unit/test_parser.js
@@ -1,9 +1,9 @@
-ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
+const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 
 function updateDocumentSourceMaps(src) {
   const nsISAXXMLReader = Ci.nsISAXXMLReader;
   const saxReader = Cc["@mozilla.org/saxparser/xmlreader;1"]
                       .createInstance(nsISAXXMLReader);
   try {
     saxReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
     saxReader.setFeature("http://xml.org/sax/features/namespace", true);
--- a/common/src/BootstrapLoader.jsm
+++ b/common/src/BootstrapLoader.jsm
@@ -1,33 +1,33 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["BootstrapLoader"];
 
-ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const {AddonManager} = ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   AddonInternal: "resource://gre/modules/addons/XPIDatabase.jsm",
   Blocklist: "resource://gre/modules/Blocklist.jsm",
   ConsoleAPI: "resource://gre/modules/Console.jsm",
   InstallRDF: "resource:///modules/RDFManifestConverter.jsm",
   Services: "resource://gre/modules/Services.jsm",
 });
 
 XPCOMUtils.defineLazyGetter(this, "BOOTSTRAP_REASONS", () => {
-  const {XPIProvider} = ChromeUtils.import("resource://gre/modules/addons/XPIProvider.jsm", {});
+  const {XPIProvider} = ChromeUtils.import("resource://gre/modules/addons/XPIProvider.jsm");
   return XPIProvider.BOOTSTRAP_REASONS;
 });
 
-ChromeUtils.import("resource://gre/modules/Log.jsm");
+const {Log} = ChromeUtils.import("resource://gre/modules/Log.jsm");
 var logger = Log.repository.getLogger("addons.bootstrap");
 
 /**
  * Valid IDs fit this pattern.
  */
 var gIDTest = /^(\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}|[a-z0-9-\._]*\@[a-z0-9-\._]+)$/i;
 
 // Properties that exist in the install manifest
--- a/common/src/ChromeManifest.jsm
+++ b/common/src/ChromeManifest.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 = ["ChromeManifest"];
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * A parser for chrome.manifest files. Implements a subset of
  * https://developer.mozilla.org/en-US/docs/Mozilla/Chrome_Registration
  */
 class ChromeManifest {
 
   /**
--- a/common/src/ExtensionSupport.jsm
+++ b/common/src/ExtensionSupport.jsm
@@ -4,23 +4,23 @@
 
 /**
  * Helper functions for use by extensions that should ease them plug
  * into the application.
  */
 
 this.EXPORTED_SYMBOLS = ["ExtensionSupport"];
 
-ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {AddonManager} = ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 // ChromeUtils.import("resource://gre/modules/Deprecated.jsm") - needed for warning.
-ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
+const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 
-var { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm", null);
-ChromeUtils.import("resource:///modules/IOUtils.js");
+var { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+const {IOUtils} = ChromeUtils.import("resource:///modules/IOUtils.js");
 
 var extensionHooks = new Map();
 var legacyExtensions = new Map();
 var openWindowList;
 
 var ExtensionSupport = {
   /**
    * A Map-like object which tracks legacy extension status. The "has" method
--- a/common/src/Overlays.jsm
+++ b/common/src/Overlays.jsm
@@ -5,17 +5,17 @@
 /**
  * Load overlays in a similar way as XUL did for legacy XUL add-ons.
  */
 
 "use strict";
 
 this.EXPORTED_SYMBOLS = ["Overlays"];
 
-const { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm", null);
+const { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
 ChromeUtils.defineModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
 ChromeUtils.defineModuleGetter(this, "setTimeout", "resource://gre/modules/Timer.jsm");
 
 let oconsole = new ConsoleAPI({
   prefix: "Overlays.jsm",
   consoleID: "overlays-jsm",
   maxLogLevelPref: "extensions.overlayloader.loglevel",
 });
--- a/common/src/customizeToolbar.js
+++ b/common/src/customizeToolbar.js
@@ -4,18 +4,18 @@
 
 var gToolboxDocument = null;
 var gToolbox = null;
 var gCurrentDragOverItem = null;
 var gToolboxChanged = false;
 var gToolboxSheet = false;
 var gPaletteBox = null;
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 function onLoad() {
   if ("arguments" in window && window.arguments[0]) {
     InitWithToolbox(window.arguments[0]);
     repositionDialog(window);
   } else if (window.frameElement &&
            "toolbox" in window.frameElement) {
     gToolboxSheet = true;
--- a/common/src/viewSource.js
+++ b/common/src/viewSource.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/. */
 
 /* globals internalSave, goDoCommand */
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/ViewSourceBrowser.jsm");
+const {ViewSourceBrowser} = ChromeUtils.import("resource://gre/modules/ViewSourceBrowser.jsm");
 
 ChromeUtils.defineModuleGetter(this, "Services",
   "resource://gre/modules/Services.jsm");
 ChromeUtils.defineModuleGetter(this, "CharsetMenu",
   "resource://gre/modules/CharsetMenu.jsm");
 ChromeUtils.defineModuleGetter(this, "Deprecated",
   "resource://gre/modules/Deprecated.jsm");
 
--- a/common/test/xpcshell/data/BootstrapMonitor.jsm
+++ b/common/test/xpcshell/data/BootstrapMonitor.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var EXPORTED_SYMBOLS = [ "monitor" ];
 
 function notify(event, originalMethod, data, reason) {
   let info = {
     event,
     data: Object.assign({}, data, {
       installPath: data.installPath.path,
--- a/common/test/xpcshell/head_addons.js
+++ b/common/test/xpcshell/head_addons.js
@@ -15,25 +15,25 @@ const PREF_DISABLE_SECURITY = ("security
 // modification times exactly. As long as we are closer than this then it
 // still passes.
 const MAX_TIME_DIFFERENCE = 3000;
 
 // Time to reset file modified time relative to Date.now() so we can test that
 // times are modified (10 hours old).
 const MAKE_FILE_OLD_DIFFERENCE = 10 * 3600 * 1000;
 
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
-ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/addons/AddonRepository.jsm");
-ChromeUtils.import("resource://gre/modules/osfile.jsm");
+var {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+var {FileUtils} = ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
+var {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
+var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var {AddonRepository} = ChromeUtils.import("resource://gre/modules/addons/AddonRepository.jsm");
+var {OS, require} = ChromeUtils.import("resource://gre/modules/osfile.jsm");
 
-ChromeUtils.import("resource://testing-common/AddonTestUtils.jsm");
+var {AddonTestUtils, MockAsyncShutdown} = ChromeUtils.import("resource://testing-common/AddonTestUtils.jsm");
 
 ChromeUtils.defineModuleGetter(this, "Blocklist",
                                "resource://gre/modules/Blocklist.jsm");
 ChromeUtils.defineModuleGetter(this, "Extension",
                                "resource://gre/modules/Extension.jsm");
 ChromeUtils.defineModuleGetter(this, "ExtensionTestUtils",
                                "resource://testing-common/ExtensionXPCShellUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "ExtensionTestCommon",
@@ -144,22 +144,22 @@ Object.defineProperty(this, "TEST_UNPACK
     return AddonTestUtils.testUnpacked;
   },
   set(val) {
    return AddonTestUtils.testUnpacked = val;
   },
 });
 
 // We need some internal bits of AddonManager
-var AMscope = ChromeUtils.import("resource://gre/modules/AddonManager.jsm", {});
+var AMscope = ChromeUtils.import("resource://gre/modules/AddonManager.jsm", null);
 var { AddonManager, AddonManagerInternal, AddonManagerPrivate } = AMscope;
 
 // Wrap the startup functions to ensure the bootstrap loader is added.
 function promiseStartupManager(newVersion) {
-  ChromeUtils.import("resource:///modules/BootstrapLoader.jsm");
+  const {BootstrapLoader} = ChromeUtils.import("resource:///modules/BootstrapLoader.jsm");
   AddonManager.addExternalExtensionLoader(BootstrapLoader);
   return AddonTestUtils.promiseStartupManager(newVersion);
 }
 
 async function promiseRestartManager(newVersion) {
   await promiseShutdownManager(false);
   await promiseStartupManager(newVersion);
 }
--- a/common/test/xpcshell/test_bootstrap.js
+++ b/common/test/xpcshell/test_bootstrap.js
@@ -10,17 +10,17 @@ const ADDON_INSTALL                   = 
 const ADDON_UNINSTALL                 = 6;
 const ADDON_UPGRADE                   = 7;
 const ADDON_DOWNGRADE                 = 8;
 
 const ID1 = "bootstrap1@tests.mozilla.org";
 const ID2 = "bootstrap2@tests.mozilla.org";
 
 // This verifies that bootstrappable add-ons can be used without restarts.
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // Enable loading extensions from the user scopes
 Services.prefs.setIntPref("extensions.enabledScopes",
                           AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_USER);
 
 BootstrapMonitor.init();
 
 createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
@@ -121,17 +121,17 @@ function getInstallOldVersion() {
 }
 
 function getUninstallNewVersion() {
   let info = BootstrapMonitor.uninstalled.get(ID1);
   return info ? info.data.newVersion : undefined;
 }
 
 async function checkBootstrappedPref() {
-  let XPIScope = ChromeUtils.import("resource://gre/modules/addons/XPIProvider.jsm", {});
+  let XPIScope = ChromeUtils.import("resource://gre/modules/addons/XPIProvider.jsm", null);
 
   let data = new Map();
   for (let entry of XPIScope.XPIStates.enabledAddons()) {
     data.set(entry.id, entry);
   }
 
   let addons = await AddonManager.getAddonsByTypes(["extension"]);
   for (let addon of addons) {
--- a/common/test/xpcshell/test_bootstrap_globals.js
+++ b/common/test/xpcshell/test_bootstrap_globals.js
@@ -1,14 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 // This verifies that bootstrap.js has the expected globals defined
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1");
 
 const ADDONS = {
   bootstrap_globals: {
     "install.rdf": {
       "id": "bootstrap_globals@tests.mozilla.org",
     },
--- a/editor/ui/composer/content/EditorContextMenu.js
+++ b/editor/ui/composer/content/EditorContextMenu.js
@@ -1,14 +1,14 @@
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 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/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "InlineSpellCheckerUI", function() {
   let tmp = {};
   ChromeUtils.import("resource://gre/modules/InlineSpellChecker.jsm", tmp);
   return new tmp.InlineSpellChecker();
 });
 
 // Overrides the main contentAreaContext onpopupshowing so needs to do
--- a/editor/ui/composer/content/editor.js
+++ b/editor/ui/composer/content/editor.js
@@ -1,16 +1,16 @@
 /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 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/. */
 
 ChromeUtils.import("resource:///modules/editorUtilities.jsm");
 ChromeUtils.import("resource://services-common/async.js");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 /* Main Composer window UI control */
 
 var gComposerWindowControllerID = 0;
 var prefAuthorString = "";
 
 var kDisplayModeNormal = 0;
 var kDisplayModeAllTags = 1;
--- a/editor/ui/composer/content/editorUtilities.js
+++ b/editor/ui/composer/content/editorUtilities.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 /**** NAMESPACES ****/
 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
 // Each editor window must include this file
 // Variables  shared by all dialogs:
 
 // Object to attach commonly-used widgets (all dialogs should use this)
--- a/editor/ui/dialogs/content/EdImageLinkLoader.js
+++ b/editor/ui/dialogs/content/EdImageLinkLoader.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gMsgCompProcessLink = false;
 var gMsgCompInputElement = null;
 var gMsgCompPrevInputValue = null;
 var gMsgCompPrevMozDoNotSendAttribute;
 var gMsgCompAttachSourceElement = null;
 
 function OnLoadDialog() {
--- a/editor/ui/dialogs/content/EdSpellCheck.js
+++ b/editor/ui/dialogs/content/EdSpellCheck.js
@@ -1,14 +1,14 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
 
-ChromeUtils.import("resource://gre/modules/InlineSpellChecker.jsm");
+const {InlineSpellChecker} = ChromeUtils.import("resource://gre/modules/InlineSpellChecker.jsm");
 
 var gMisspelledWord;
 var gSpellChecker = null;
 var gAllowSelectWord = true;
 var gPreviousReplaceWord = "";
 var gFirstTime = true;
 var gLastSelectedLang = null;
 var gDictCount = 0;
--- a/editor/ui/dialogs/content/EditorSaveAsCharset.js
+++ b/editor/ui/dialogs/content/EditorSaveAsCharset.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/CharsetMenu.jsm");
+const {CharsetMenu} = ChromeUtils.import("resource://gre/modules/CharsetMenu.jsm");
 
 var gCharset="";
 var gTitleWasEdited = false;
 var gCharsetWasChanged = false;
 var gInsertNewContentType = false;
 var gContenttypeElement;
 var gInitDone = false;
 var gCharsetInfo;
--- a/editor/ui/nsComposerCmdLineHandler.js
+++ b/editor/ui/nsComposerCmdLineHandler.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const nsICommandLineHandler = Ci.nsICommandLineHandler;
 const nsISupportsString     = Ci.nsISupportsString;
 const nsIWindowWatcher      = Ci.nsIWindowWatcher;
 
 function nsComposerCmdLineHandler() {}
 nsComposerCmdLineHandler.prototype = {
   get wrappedJSObject() {
--- a/ldap/xpcom/src/nsLDAPProtocolHandler.js
+++ b/ldap/xpcom/src/nsLDAPProtocolHandler.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const kNetworkProtocolCIDPrefix = "@mozilla.org/network/protocol;1?name=";
 const nsIProtocolHandler = Ci.nsIProtocolHandler;
 
 function makeProtocolHandler(aCID, aProtocol, aDefaultPort) {
   return {
     classID: Components.ID(aCID),
     QueryInterface: ChromeUtils.generateQI([nsIProtocolHandler]),
--- a/mail/base/content/ABSearchDialog.js
+++ b/mail/base/content/ABSearchDialog.js
@@ -7,20 +7,20 @@
 /* import-globals-from ../../../mailnews/base/content/dateFormat.js */
 /* import-globals-from ../../../mailnews/base/search/content/searchTermOverlay.js */
 /* import-globals-from ../../components/addrbook/content/abCommon.js */
 /* import-globals-from commandglue.js */
 /* import-globals-from mailWindow.js */
 /* import-globals-from msgMail3PaneWindow.js */
 /* import-globals-from nsDragAndDrop.js */
 
-var { encodeABTermValue } = ChromeUtils.import("resource:///modules/ABQueryUtils.jsm", null);
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { encodeABTermValue } = ChromeUtils.import("resource:///modules/ABQueryUtils.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {PluralForm} = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var searchSessionContractID = "@mozilla.org/messenger/searchSession;1";
 var gSearchSession;
 
 var nsMsgSearchScope = Ci.nsMsgSearchScope;
 var nsIMsgSearchTerm = Ci.nsIMsgSearchTerm;
 var nsMsgSearchOp = Ci.nsMsgSearchOp;
 var nsMsgSearchAttrib = Ci.nsMsgSearchAttrib;
--- a/mail/base/content/FilterListDialog.js
+++ b/mail/base/content/FilterListDialog.js
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
 
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-var { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm", null);
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {PluralForm} = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+var { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gFilterListMsgWindow = null;
 var gCurrentFilterList;
 var gServerMenu = null;
 var gFilterListbox = null;
 var gEditButton = null;
 var gDeleteButton = null;
 var gCopyToNewButton = null;
--- a/mail/base/content/SearchDialog.js
+++ b/mail/base/content/SearchDialog.js
@@ -7,19 +7,19 @@
 /* import-globals-from folderDisplay.js */
 /* import-globals-from mailWindow.js */
 /* import-globals-from mailWindowOverlay.js */
 /* import-globals-from messageDisplay.js */
 /* import-globals-from threadPane.js */
 
 "use strict";
 
-ChromeUtils.import("resource:///modules/MailUtils.jsm");
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
+const {PluralForm} = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gCurrentFolder;
 
 var gFolderDisplay;
 // Although we don't display messages, we have a message display object to
 //  simplify our code.  It's just always disabled.
 var gMessageDisplay;
 
--- a/mail/base/content/aboutAddonsExtra.js
+++ b/mail/base/content/aboutAddonsExtra.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/. */
 
 /* import-globals-from ../../../../toolkit/mozapps/extensions/content/extensions.js */
 
-ChromeUtils.import("resource:///modules/ExtensionSupport.jsm");
+const {ExtensionSupport} = ChromeUtils.import("resource:///modules/ExtensionSupport.jsm");
 
 gStrings.mailExt =
   Services.strings.createBundle("chrome://messenger/locale/extensionsOverlay.properties");
 
 (function() {
   window.isCorrectlySigned = function() { return true; };
 
   let contentStylesheet = document.createProcessingInstruction(
--- a/mail/base/content/aboutDialog-appUpdater.js
+++ b/mail/base/content/aboutDialog-appUpdater.js
@@ -1,18 +1,18 @@
 /* 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: this file is included in aboutDialog.xul and preferences/advanced.xul
 // if MOZ_UPDATER is defined.
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
+var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var {DownloadUtils} = ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
 
 ChromeUtils.defineModuleGetter(this, "UpdateUtils",
                                "resource://gre/modules/UpdateUtils.jsm");
 
 const PREF_APP_UPDATE_CANCELATIONS_OSX = "app.update.cancelations.osx";
 const PREF_APP_UPDATE_ELEVATE_NEVER    = "app.update.elevate.never";
 
 var gAppUpdater;
--- a/mail/base/content/aboutDialog.js
+++ b/mail/base/content/aboutDialog.js
@@ -2,18 +2,18 @@
  * 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/. */
 
 /* import-globals-from aboutDialog-appUpdater.js */
 
 "use strict";
 
 // Services = object with smart getters for common XPCOM services
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 function init(aEvent) {
   if (aEvent.target != document)
     return;
 
   try {
     var distroId = Services.prefs.getCharPref("distribution.id");
     if (distroId) {
--- a/mail/base/content/commandglue.js
+++ b/mail/base/content/commandglue.js
@@ -6,18 +6,18 @@
  * Command-specific code. This stuff should be called by the widgets
  */
 
 /* import-globals-from folderDisplay.js */
 /* import-globals-from folderPane.js */
 /* import-globals-from mailWindow.js */
 /* import-globals-from msgMail3PaneWindow.js */
 
-var { MailViewConstants } = ChromeUtils.import("resource:///modules/MailViewManager.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { MailViewConstants } = ChromeUtils.import("resource:///modules/MailViewManager.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function UpdateMailToolbar(caller) {
   // If we have a transient selection, we shouldn't update the toolbar. We'll
   // update it once we've restored the original selection.
   if ("gRightMouseButtonSavedSelection" in window &&
       window.gRightMouseButtonSavedSelection)
     return;
 
--- a/mail/base/content/contentAreaClick.js
+++ b/mail/base/content/contentAreaClick.js
@@ -12,18 +12,18 @@
  * We look for HTMLAnchorElement, HTMLAreaElement, HTMLLinkElement,
  * HTMLInputElement.form.action, and nested anchor tags.
  * If the clicked element was a HTMLInputElement or HTMLButtonElement
  * we return the form action.
  *
  * @return href for the url being clicked
  */
 
-ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {PlacesUtils} = ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function hRefForClickEvent(aEvent, aDontCheckInputElement) {
   var href;
   var isKeyCommand = (aEvent.type == "command");
   var target =
     isKeyCommand ? document.commandDispatcher.focusedElement : aEvent.target;
 
   if (target instanceof HTMLAnchorElement ||
--- a/mail/base/content/customElements.js
+++ b/mail/base/content/customElements.js
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 // This is loaded into chrome windows with the subscript loader. Wrap in
 // a block to prevent accidentally leaking globals onto `window`.
 (() => {
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 const isDummyDocument = document.documentURI == "chrome://extensions/content/dummy.xul";
 if (!isDummyDocument) {
   for (let script of [
     "chrome://chat/content/conversation-browser.js",
     "chrome://messenger/content/mailWidgets.js",
     "chrome://messenger/content/generalBindings.js",
     "chrome://messenger/content/statuspanel.js",
--- a/mail/base/content/editContactPanel.js
+++ b/mail/base/content/editContactPanel.js
@@ -1,16 +1,16 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
 
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-var { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm", null);
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 
 var editContactInlineUI = {
   _overlayLoaded: false,
   _overlayLoading: false,
   _cardDetails: null,
   _writeable: true,
   _blockedCommands: ["cmd_close"],
 
--- a/mail/base/content/extensions.xml
+++ b/mail/base/content/extensions.xml
@@ -10,17 +10,17 @@
 <bindings id="thunderbird-addon-bindings"
           xmlns="http://www.mozilla.org/xbl"
           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
           xmlns:xbl="http://www.mozilla.org/xbl">
   <binding id="thunderbird-addon-generic"
            extends="chrome://mozapps/content/extensions/extensions.xml#addon-generic">
     <implementation>
       <constructor><![CDATA[
-        ChromeUtils.import("resource://gre/modules/ExtensionParent.jsm");
+        const {ExtensionParent} = ChromeUtils.import("resource://gre/modules/ExtensionParent.jsm");
         ChromeUtils.import("resource://gre/modules/Services.jsm");
         this._updateState = this._updateState.bind(this);
         ExtensionParent.apiManager.on("startup", this._updateState);
         ExtensionParent.apiManager.on("shutdown", this._updateState);
       ]]></constructor>
       <destructor><![CDATA[
         ExtensionParent.apiManager.off("startup", this._updateState);
         ExtensionParent.apiManager.off("shutdown", this._updateState);
--- a/mail/base/content/folderDisplay.js
+++ b/mail/base/content/folderDisplay.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/. */
 
 /* import-globals-from commandglue.js */
 /* import-globals-from mailWindow.js */
 /* import-globals-from ../../extensions/mailviews/content/msgViewPickerOverlay.js */
 
-ChromeUtils.import("resource:///modules/DBViewWrapper.jsm");
-var { JSTreeSelection } = ChromeUtils.import("resource:///modules/jsTreeSelection.js", null);
-ChromeUtils.import("resource:///modules/MailUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {DBViewWrapper} = ChromeUtils.import("resource:///modules/DBViewWrapper.jsm");
+var { JSTreeSelection } = ChromeUtils.import("resource:///modules/jsTreeSelection.js");
+const {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gFolderDisplay = null;
 var gMessageDisplay = null;
 
 /**
  * Maintains a list of listeners for all FolderDisplayWidget instances in this
  *  window.  The assumption is that because of our multiplexed tab
  *  implementation all consumers are effectively going to care about all such
--- a/mail/base/content/folderPane.js
+++ b/mail/base/content/folderPane.js
@@ -11,26 +11,26 @@
 /* import-globals-from folderDisplay.js */
 /* import-globals-from mailWindow.js */
 
 var {
   getFolderProperties,
   allAccountsSorted,
   getMostRecentFolders,
   folderNameCompare,
-} = ChromeUtils.import("resource:///modules/folderUtils.jsm", null);
+} = ChromeUtils.import("resource:///modules/folderUtils.jsm");
 var {
   fixIterator,
   toXPCOMArray,
-} = ChromeUtils.import("resource:///modules/iteratorUtils.jsm", null);
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource:///modules/MailUtils.jsm");
-ChromeUtils.import("resource:///modules/IOUtils.js");
-ChromeUtils.import("resource:///modules/FeedUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+} = ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
+const {IOUtils} = ChromeUtils.import("resource:///modules/IOUtils.js");
+const {FeedUtils} = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 if (typeof FeedMessageHandler != "object")
   Services.scriptloader.loadSubScript("chrome://messenger-newsblog/content/newsblogOverlay.js");
 
 var kDefaultMode = "all";
 
 /**
  * This file contains the controls and functions for the folder pane.
--- a/mail/base/content/foldersummary.js
+++ b/mail/base/content/foldersummary.js
@@ -3,19 +3,19 @@
  * 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/. */
 
 /* globals MozXULElement */
 /* import-globals-from folderDisplay.js */
 /* import-globals-from folderPane.js */
 /* import-globals-from ../../../mailnews/base/content/newmailalert.js */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource:///modules/MailUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
 
 /**
  * MozFolderSummary displays a listing of NEW mails for the folder in question.
  * For each mail the subject, sender and a message preview can be included.
  */
 class MozFolderSummary extends MozXULElement {
   constructor() {
     super();
--- a/mail/base/content/glodaFacet.js
+++ b/mail/base/content/glodaFacet.js
@@ -1,16 +1,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/. */
 
 /* global HTMLElement, DateFacetVis, FacetContext, glodaFacetStrings, FacetUtils, PluralForm */
 /* global logException, Gloda */
 
-ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
 
 class MozFacetDate extends HTMLElement {
   get build() {
     return this.buildFunc;
   }
 
   get brushItems() {
     return (items) => this.vis.hoverItems(items);
@@ -1299,17 +1299,17 @@ class MozFacetResultMessage extends HTML
     authorNode.setAttribute("title", message.from.value);
     authorNode.textContent = message.from.contact.name;
     let toNode = this.to;
     toNode.textContent = glodaFacetStrings.get("glodaFacetView.result.message.toLabel");
 
     // this.author.textContent = ;
     let {
       makeFriendlyDateAgo,
-    } = ChromeUtils.import("resource:///modules/templateUtils.js", null);
+    } = ChromeUtils.import("resource:///modules/templateUtils.js");
     this.date.textContent = makeFriendlyDateAgo(message.date);
 
     // - Recipients
     try {
       let recipientsNode = this.recipients;
       if (message.recipients) {
         let recipientCount = 0;
         const MAX_RECIPIENTS = 3;
--- a/mail/base/content/glodaFacetTab.js
+++ b/mail/base/content/glodaFacetTab.js
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/StringBundle.js");
+const {StringBundle} = ChromeUtils.import("resource:///modules/StringBundle.js");
 
-var { FacetDriver } = ChromeUtils.import("resource:///modules/gloda/facet.js", null);
+var { FacetDriver } = ChromeUtils.import("resource:///modules/gloda/facet.js");
 // needed by search.xml to use us
-var { GlodaMsgSearcher } = ChromeUtils.import("resource:///modules/gloda/msg_search.js", null);
+var { GlodaMsgSearcher } = ChromeUtils.import("resource:///modules/gloda/msg_search.js");
 
 var glodaFacetTabType = {
   name: "glodaFacet",
   perTabPanel: "vbox",
   lastTabId: 0,
   strings:
     new StringBundle("chrome://messenger/locale/glodaFacetView.properties"),
   modes: {
--- a/mail/base/content/glodaFacetView.js
+++ b/mail/base/content/glodaFacetView.js
@@ -7,31 +7,31 @@
  *  Model View Controller (paradigm), we are the view and the XBL widgets are
  *  the the view and controller.
  *
  * Because much of the work related to faceting is not UI-specific, we try and
  *  push as much of it into mailnews/db/gloda/facet.js.  In some cases we may
  *  get it wrong and it may eventually want to migrate.
  */
 
-var { Log4Moz } = ChromeUtils.import("resource:///modules/gloda/log4moz.js", null);
-ChromeUtils.import("resource:///modules/StringBundle.js");
+var { Log4Moz } = ChromeUtils.import("resource:///modules/gloda/log4moz.js");
+const {StringBundle} = ChromeUtils.import("resource:///modules/StringBundle.js");
 ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
 var {
   logObject,
   logException,
-} = ChromeUtils.import("resource:///modules/errUtils.js", null);
+} = ChromeUtils.import("resource:///modules/errUtils.js");
 
-var { Gloda } = ChromeUtils.import("resource:///modules/gloda/public.js", null);
+var { Gloda } = ChromeUtils.import("resource:///modules/gloda/public.js");
 var {
   FacetDriver,
   FacetUtils,
-} = ChromeUtils.import("resource:///modules/gloda/facet.js", null);
+} = ChromeUtils.import("resource:///modules/gloda/facet.js");
 
 var glodaFacetStrings =
   new StringBundle("chrome://messenger/locale/glodaFacetView.properties");
 
 /**
  * Object containing query-explanantion binding methods.
  */
 const QueryExplanation = {
--- a/mail/base/content/macMessengerMenu.js
+++ b/mail/base/content/macMessengerMenu.js
@@ -1,17 +1,17 @@
 /* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
 
 /* import-globals-from mailCore.js */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
 
 // Load and add the menu item to the OS X Dock icon menu.
 addEventListener("load", function() {
   let dockMenuElement = document.getElementById("menu_mac_dockmenu");
   let nativeMenu = Cc["@mozilla.org/widget/standalonenativemenu;1"]
                     .createInstance(Ci.nsIStandaloneNativeMenu);
 
   nativeMenu.init(dockMenuElement);
--- a/mail/base/content/mail-offline.js
+++ b/mail/base/content/mail-offline.js
@@ -1,16 +1,16 @@
 /* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
 
 /* import-globals-from mailWindow.js */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var MailOfflineMgr = {
   offlineManager: null,
   offlineBundle: null,
 
   init() {
     Services.obs.addObserver(this, "network:offline-status-changed");
 
--- a/mail/base/content/mail3PaneWindowCommands.js
+++ b/mail/base/content/mail3PaneWindowCommands.js
@@ -10,20 +10,20 @@
 /* import-globals-from ../../components/im/content/chat-messenger.js */
 /* import-globals-from commandglue.js */
 /* import-globals-from folderDisplay.js */
 /* import-globals-from mailWindow.js */
 /* import-globals-from msgViewNavigation.js */
 /* import-globals-from threadPane.js */
 /* import-globals-from utilityOverlay.js */
 
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource:///modules/MailUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {PluralForm} = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
 
 // Controller object for folder pane
 var FolderPaneController = {
   supportsCommand(command) {
     switch (command) {
       case "cmd_delete":
       case "cmd_shiftDelete":
       case "button_delete":
--- a/mail/base/content/mailCommands.js
+++ b/mail/base/content/mailCommands.js
@@ -3,18 +3,18 @@
  * 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/. */
 
 /* import-globals-from commandglue.js */
 /* import-globals-from folderDisplay.js */
 /* import-globals-from mailWindow.js */
 /* import-globals-from utilityOverlay.js */
 
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource:///modules/MailUtils.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
 
 /**
  * Get the identity that most likely is the best one to use, given the hint.
  * @param identities    nsIArray<nsIMsgIdentity> of identities
  * @param optionalHint  string containing comma separated mailboxes
  * @param useDefault    If true, use the default identity of the default
  *                      account as last choice. This is useful when all
  *                      identities are passed in. Otherwise, use the first
--- a/mail/base/content/mailContextMenus.js
+++ b/mail/base/content/mailContextMenus.js
@@ -2,19 +2,19 @@
  * 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/. */
 
 /* import-globals-from commandglue.js */
 /* import-globals-from folderDisplay.js */
 /* import-globals-from mailWindow.js */
 /* import-globals-from nsContextMenu.js */
 
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {PluralForm} = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
 
 var mailtolength = 7;
 
 /**
  * Function to change the highlighted row back to the row that is currently
  * outline/dotted without loading the contents of either rows. This is
  * triggered when the context menu for a given row is hidden/closed
  * (onpopuphiding).
--- a/mail/base/content/mailCore.js
+++ b/mail/base/content/mailCore.js
@@ -13,21 +13,21 @@
  */
 
 /* import-globals-from ../../../common/src/customizeToolbar.js */
 /* import-globals-from ../../extensions/mailviews/content/msgViewPickerOverlay.js */
 /* import-globals-from commandglue.js */
 /* import-globals-from mailWindow.js */
 /* import-globals-from utilityOverlay.js */
 
-ChromeUtils.import("resource://gre/modules/BrowserUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/CharsetMenu.jsm");
+const {BrowserUtils} = ChromeUtils.import("resource://gre/modules/BrowserUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const {CharsetMenu} = ChromeUtils.import("resource://gre/modules/CharsetMenu.jsm");
 ChromeUtils.import("resource:///modules/MailServices.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "gViewSourceUtils", function() {
   let scope = {};
   Services.scriptloader.loadSubScript("chrome://global/content/viewSourceUtils.js", scope);
   scope.gViewSourceUtils.viewSource = async function(aArgs) {
     // Check if external view source is enabled. If so, try it. If it fails,
     // fallback to internal view source.
--- a/mail/base/content/mailTabs.js
+++ b/mail/base/content/mailTabs.js
@@ -5,22 +5,22 @@
 /* import-globals-from commandglue.js */
 /* import-globals-from mail3PaneWindowCommands.js */
 /* import-globals-from mailContextMenus.js */
 /* import-globals-from mailWindow.js */
 /* import-globals-from mailWindowOverlay.js */
 /* import-globals-from messageDisplay.js */
 /* import-globals-from msgMail3PaneWindow.js */
 
-ChromeUtils.import("resource:///modules/MsgHdrSyntheticView.jsm");
-var { logException } = ChromeUtils.import("resource:///modules/errUtils.js", null);
-ChromeUtils.import("resource:///modules/MailUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-var { getSpecialFolderString } = ChromeUtils.import("resource:///modules/folderUtils.jsm", null);
-var { MsgHdrToMimeMessage } = ChromeUtils.import("resource:///modules/gloda/mimemsg.js", null);
+const {MsgHdrSyntheticView} = ChromeUtils.import("resource:///modules/MsgHdrSyntheticView.jsm");
+var { logException } = ChromeUtils.import("resource:///modules/errUtils.js");
+const {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { getSpecialFolderString } = ChromeUtils.import("resource:///modules/folderUtils.jsm");
+var { MsgHdrToMimeMessage } = ChromeUtils.import("resource:///modules/gloda/mimemsg.js");
 
 /**
  * Displays message "folder"s, mail "message"s, and "glodaList" results.  The
  *  commonality is that they all use the "mailContent" panel's folder tree,
  *  thread tree, and message pane objects.  This happens for historical reasons,
  *  likely involving the fact that prior to the introduction of this
  *  abstraction, everything was always stored in global objects.  For the 3.0
  *  release cycle we considered avoiding this 'multiplexed' style of operation
--- a/mail/base/content/mailWidgets.js
+++ b/mail/base/content/mailWidgets.js
@@ -31,17 +31,17 @@ class MozMailUrlfield extends MozMailHea
       }
     });
   }
 }
 
 class MozMailHeaderfieldTags extends MozXULElement {
   connectedCallback() {
     this.classList.add("headerValue");
-    ChromeUtils.import("resource:///modules/MailServices.jsm");
+    const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
   }
 
   set headerValue(val) {
     return this.buildTags(val);
   }
 
   buildTags(tags) {
     // tags contains a list of actual tag names (not the keys), delimited by spaces
--- a/mail/base/content/mailWindow.js
+++ b/mail/base/content/mailWindow.js
@@ -9,23 +9,23 @@
 /* import-globals-from commandglue.js */
 /* import-globals-from mail-offline.js */
 /* import-globals-from mailCore.js */
 /* import-globals-from mailWindowOverlay.js */
 /* import-globals-from msgHdrView.js */
 /* import-globals-from msgMail3PaneWindow.js */
 /* import-globals-from utilityOverlay.js */
 
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource:///modules/appIdleManager.js");
-ChromeUtils.import("resource:///modules/MailUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {appIdleManager} = ChromeUtils.import("resource:///modules/appIdleManager.js");
+const {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-var { Log4Moz } = ChromeUtils.import("resource:///modules/gloda/log4moz.js", null);
-var { Gloda } = ChromeUtils.import("resource:///modules/gloda/public.js", null);
+var { Log4Moz } = ChromeUtils.import("resource:///modules/gloda/log4moz.js");
+var { Gloda } = ChromeUtils.import("resource:///modules/gloda/public.js");
 
 // This file stores variables common to mail windows
 var messenger;
 var statusFeedback;
 var msgWindow;
 
 var accountManager;
 
--- a/mail/base/content/mailWindowOverlay.js
+++ b/mail/base/content/mailWindowOverlay.js
@@ -10,33 +10,33 @@
 /* import-globals-from folderDisplay.js */
 /* import-globals-from mail3PaneWindowCommands.js */
 /* import-globals-from mailCommands.js */
 /* import-globals-from mailContextMenus.js */
 /* import-globals-from mailWindow.js */
 /* import-globals-from phishingDetector.js */
 /* import-globals-from utilityOverlay.js */
 
-ChromeUtils.import("resource:///modules/FeedUtils.jsm");
-var { GlodaSyntheticView } = ChromeUtils.import("resource:///modules/gloda/dbview.js", null);
+const {FeedUtils} = ChromeUtils.import("resource:///modules/FeedUtils.jsm");
+var { GlodaSyntheticView } = ChromeUtils.import("resource:///modules/gloda/dbview.js");
 ChromeUtils.import("resource:///modules/MailConsts.jsm");
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource:///modules/MailUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {PluralForm} = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+const {AddonManager} = ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
 
 ChromeUtils.defineModuleGetter(this, "BrowserToolboxProcess", "resource://devtools/client/framework/ToolboxProcess.jsm");
 ChromeUtils.defineModuleGetter(this, "ScratchpadManager", "resource://devtools/client/scratchpad/scratchpad-manager.jsm");
 ChromeUtils.defineModuleGetter(this, "ExtensionParent", "resource://gre/modules/ExtensionParent.jsm");
 ChromeUtils.defineModuleGetter(this, "ExtensionSupport", "resource:///modules/ExtensionSupport.jsm");
 Object.defineProperty(this, "HUDService", {
   get() {
-    let { devtools } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", null);
+    let { devtools } = ChromeUtils.import("resource://devtools/shared/Loader.jsm");
     return devtools.require("devtools/client/webconsole/hudservice").HUDService;
   },
   configurable: true,
   enumerable: true,
 });
 
 var ADDR_DB_LARGE_COMMIT = 1;
 
--- a/mail/base/content/messageWindow.js
+++ b/mail/base/content/messageWindow.js
@@ -18,21 +18,21 @@
 /* import-globals-from mailWindowOverlay.js */
 /* import-globals-from messageDisplay.js */
 /* import-globals-from msgHdrView.js */
 /* import-globals-from msgViewNavigation.js */
 /* import-globals-from nsDragAndDrop.js */
 /* import-globals-from phishingDetector.js */
 /* import-globals-from toolbarIconColor.js */
 
-ChromeUtils.import("resource:///modules/MailUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+const {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource:///modules/MsgHdrSyntheticView.jsm");
+const {MsgHdrSyntheticView} = ChromeUtils.import("resource:///modules/MsgHdrSyntheticView.jsm");
 
 // from MailNewsTypes.h
 var nsMsgKey_None = 0xFFFFFFFF;
 var nsMsgViewIndex_None = 0xFFFFFFFF;
 
 /* globals for a particular window */
 
 // we have no tree view; let people know that.
--- a/mail/base/content/msgHdrView.js
+++ b/mail/base/content/msgHdrView.js
@@ -9,23 +9,23 @@
 
 /* import-globals-from editContactPanel.js */
 /* import-globals-from folderDisplay.js */
 /* import-globals-from mailWindow.js */
 /* import-globals-from messageDisplay.js */
 /* import-globals-from nsDragAndDrop.js */
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource:///modules/DisplayNameUtils.jsm");
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-var { GlodaUtils } = ChromeUtils.import("resource:///modules/gloda/utils.js", null);
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {DisplayNameUtils} = ChromeUtils.import("resource:///modules/DisplayNameUtils.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+var { GlodaUtils } = ChromeUtils.import("resource:///modules/gloda/utils.js");
 var {
   Status: statusUtils,
-} = ChromeUtils.import("resource:///modules/imStatusUtils.jsm", null);
+} = ChromeUtils.import("resource:///modules/imStatusUtils.jsm");
 
 // Warning: It's critical that the code in here for displaying the message
 // headers for a selected message remain as fast as possible. In particular,
 // right now, we only introduce one reflow per message. i.e. if you click on
 // a message in the thread pane, we batch up all the changes for displaying
 // the header pane (to, cc, attachements button, etc.) and we make a single
 // pass to display them. It's critical that we maintain this one reflow per
 // message view in the message header pane.
--- a/mail/base/content/msgMail3PaneWindow.js
+++ b/mail/base/content/msgMail3PaneWindow.js
@@ -17,30 +17,30 @@
 /* import-globals-from mailWindow.js */
 /* import-globals-from quickFilterBar.js */
 /* import-globals-from searchBar.js */
 /* import-globals-from searchBar.js */
 /* import-globals-from specialTabs.js */
 /* import-globals-from toolbarIconColor.js */
 
 ChromeUtils.import("resource:///modules/activity/activityModules.jsm");
-var { logException } = ChromeUtils.import("resource:///modules/errUtils.js", null);
+var { logException } = ChromeUtils.import("resource:///modules/errUtils.js");
 ChromeUtils.import("resource:///modules/IOUtils.js");
-var { JSTreeSelection } = ChromeUtils.import("resource:///modules/jsTreeSelection.js", null);
-ChromeUtils.import("resource:///modules/MailConsts.jsm");
-ChromeUtils.import("resource:///modules/MailInstrumentation.jsm");
+var { JSTreeSelection } = ChromeUtils.import("resource:///modules/jsTreeSelection.js");
+const {MailConsts} = ChromeUtils.import("resource:///modules/MailConsts.jsm");
+const {MailInstrumentation} = ChromeUtils.import("resource:///modules/MailInstrumentation.jsm");
 ChromeUtils.import("resource:///modules/mailnewsMigrator.js");
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource:///modules/msgDBCacheManager.js");
-ChromeUtils.import("resource:///modules/SessionStoreManager.jsm");
-ChromeUtils.import("resource:///modules/SummaryFrameManager.jsm");
-ChromeUtils.import("resource:///modules/MailUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-ChromeUtils.import("resource://gre/modules/Color.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {msgDBCacheManager} = ChromeUtils.import("resource:///modules/msgDBCacheManager.js");
+const {SessionStoreManager} = ChromeUtils.import("resource:///modules/SessionStoreManager.jsm");
+const {SummaryFrameManager} = ChromeUtils.import("resource:///modules/SummaryFrameManager.jsm");
+const {MailUtils} = ChromeUtils.import("resource:///modules/MailUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+const {Color} = ChromeUtils.import("resource://gre/modules/Color.jsm");
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   LightweightThemeManager: "resource://gre/modules/LightweightThemeManager.jsm",
 });
 
 XPCOMUtils.defineLazyGetter(this, "PopupNotifications", function() {
   let tmp = {};
   ChromeUtils.import("resource:///modules/GlobalPopupNotifications.jsm", tmp);
@@ -537,17 +537,17 @@ function OnLoadMessenger() {
 function LoadPostAccountWizard() {
   InitMsgWindow();
   messenger.setWindow(window, msgWindow);
 
   InitPanes();
   MigrateJunkMailSettings();
   MigrateFolderViews();
   MigrateOpenMessageBehavior();
-  ChromeUtils.import("resource:///modules/MailMigrator.jsm");
+  const {MailMigrator} = ChromeUtils.import("resource:///modules/MailMigrator.jsm");
   MailMigrator.migratePostAccountWizard();
 
   accountManager.setSpecialFolders();
 
   try {
     accountManager.loadVirtualFolders();
   } catch (e) {
     Cu.reportError(e);
@@ -591,17 +591,17 @@ function LoadPostAccountWizard() {
       var shellService;
       try {
         shellService = Cc["@mozilla.org/mail/shell-service;1"].getService(nsIShellService);
       } catch (ex) {}
       let defaultAccount = accountManager.defaultAccount;
 
       // Next, try loading the search integration module
       // We'll get a null SearchIntegration if we don't have one
-      ChromeUtils.import("resource:///modules/SearchIntegration.jsm");
+      var {SearchIntegration} = ChromeUtils.import("resource:///modules/SearchIntegration.jsm");
 
       // Show the default client dialog only if
       // EITHER: we have at least one account, and we aren't already the default
       // for mail,
       // OR: we have the search integration module, the OS version is suitable,
       // and the first run hasn't already been completed.
       // Needs to be shown outside the he normal load sequence so it doesn't appear
       // before any other displays, in the wrong place of the screen.
--- a/mail/base/content/msgViewNavigation.js
+++ b/mail/base/content/msgViewNavigation.js
@@ -5,18 +5,18 @@
 
 /*  This file contains the js functions necessary to implement view navigation within the 3 pane. */
 
 /* import-globals-from commandglue.js */
 /* import-globals-from folderDisplay.js */
 /* import-globals-from mailWindow.js */
 /* import-globals-from messageDisplay.js */
 
-var { allAccountsSorted } = ChromeUtils.import("resource:///modules/folderUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { allAccountsSorted } = ChromeUtils.import("resource:///modules/folderUtils.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function GetSubFoldersInFolderPaneOrder(folder) {
   var subFolders = folder.subFolders;
   var msgFolders = [];
 
   // get all the subfolders
   while (subFolders.hasMoreElements()) {
     msgFolders[msgFolders.length] =
--- a/mail/base/content/multimessageview.js
+++ b/mail/base/content/multimessageview.js
@@ -1,24 +1,24 @@
 /* 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/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-var { Gloda } = ChromeUtils.import("resource:///modules/gloda/gloda.js", null);
+const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var { Gloda } = ChromeUtils.import("resource:///modules/gloda/gloda.js");
 var {
   mimeMsgToContentSnippetAndMeta,
-} = ChromeUtils.import("resource:///modules/gloda/connotent.js", null);
-var { MsgHdrToMimeMessage } = ChromeUtils.import("resource:///modules/gloda/mimemsg.js", null);
-ChromeUtils.import("resource:///modules/DisplayNameUtils.jsm");
-ChromeUtils.import("resource:///modules/MailServices.jsm");
+} = ChromeUtils.import("resource:///modules/gloda/connotent.js");
+var { MsgHdrToMimeMessage } = ChromeUtils.import("resource:///modules/gloda/mimemsg.js");
+const {DisplayNameUtils} = ChromeUtils.import("resource:///modules/DisplayNameUtils.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
 var {
   PluralStringFormatter,
   makeFriendlyDateAgo,
-} = ChromeUtils.import("resource:///modules/templateUtils.js", null);
+} = ChromeUtils.import("resource:///modules/templateUtils.js");
 
 var gMessenger = Cc["@mozilla.org/messenger;1"]
                    .createInstance(Ci.nsIMessenger);
 
 // Set up our string formatter for localizing strings.
 XPCOMUtils.defineLazyGetter(this, "formatString", function() {
   let formatter = new PluralStringFormatter(
     "chrome://messenger/locale/multimessageview.properties"
--- a/mail/base/content/newTagDialog.js
+++ b/mail/base/content/newTagDialog.js
@@ -1,16 +1,16 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
 
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var dialog;
 
 /**
  * Pass in keyToEdit as a window argument to turn this dialog into an edit
  * tag dialog.
  */
 function onLoad() {
--- a/mail/base/content/nsContextMenu.js
+++ b/mail/base/content/nsContextMenu.js
@@ -4,21 +4,21 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* import-globals-from folderDisplay.js */
 /* import-globals-from mailTabs.js */
 /* import-globals-from mailWindow.js */
 /* import-globals-from messageDisplay.js */
 /* import-globals-from utilityOverlay.js */
 
-ChromeUtils.import("resource://gre/modules/InlineSpellChecker.jsm");
-ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var {InlineSpellChecker, SpellCheckHelper} = ChromeUtils.import("resource://gre/modules/InlineSpellChecker.jsm");
+var {PlacesUtils} = ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
+var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+var {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource:///modules/MailUtils.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "PageMenuParent", function() {
   let tmp = {};
   ChromeUtils.import("resource://gre/modules/PageMenu.jsm", tmp);
   return new tmp.PageMenuParent();
 });
 
--- a/mail/base/content/nsDragAndDrop.js
+++ b/mail/base/content/nsDragAndDrop.js
@@ -17,17 +17,17 @@ ChromeUtils.defineModuleGetter(this, "Se
 
 /**
  *  nsTransferable - a wrapper for nsITransferable that simplifies
  *                   javascript clipboard and drag&drop. for use in
  *                   these situations you should use the nsClipboard
  *                   and nsDragAndDrop wrappers for more convenience
  **/
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var nsTransferable = {
   /**
    * nsITransferable set (TransferData aTransferData) ;
    *
    * Creates a transferable with data for a list of supported types ("flavours")
    *
    * @param TransferData aTransferData
--- a/mail/base/content/phishingDetector.js
+++ b/mail/base/content/phishingDetector.js
@@ -1,16 +1,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/. */
 
 /* import-globals-from mailWindowOverlay.js */
 /* import-globals-from utilityOverlay.js */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var kPhishingNotSuspicious = 0;
 var kPhishingWithIPAddress = 1;
 var kPhishingWithMismatchedHosts = 2;
 
 
 var gPhishingDetector = {
   mCheckForIPAddresses: true,
--- a/mail/base/content/quickFilterBar.js
+++ b/mail/base/content/quickFilterBar.js
@@ -3,23 +3,23 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* import-globals-from folderDisplay.js */
 /* import-globals-from mailWindow.js */
 
 var {
   logException,
   errorWithDebug,
-} = ChromeUtils.import("resource:///modules/errUtils.js", null);