Bug 1434737 - Move to ChromeUtils.import() - Mail/Common/Ldap/Editor part. r=jorgk
authorPhilipp Kewisch <mozilla@kewis.ch>
Wed, 31 Jan 2018 23:41:33 +0100
changeset 31041 932a8eee8f8ce33bfc5923b3effc51d9cf0e0d3b
parent 31040 1ac48db6177e9ea975af601c25770fc50db1b6dc
child 31042 f4ec71bab936c0d7fb6f2566e9b7cd0318ecbe47
push id383
push userclokep@gmail.com
push dateMon, 07 May 2018 21:52:48 +0000
reviewersjorgk
bugs1434737
Bug 1434737 - Move to ChromeUtils.import() - Mail/Common/Ldap/Editor part. r=jorgk MozReview-Commit-ID: 8jabalzJIdA
common/bindings/preferences.xml
common/bindings/toolbar.xml
common/src/customizeToolbar.js
common/src/extensionSupport.jsm
editor/ui/composer/content/EditorContextMenu.js
editor/ui/composer/content/editor.js
editor/ui/composer/content/editorUtilities.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/aboutDialog-appUpdater.js
mail/base/content/aboutDialog.js
mail/base/content/charsetOverlay.xul
mail/base/content/commandglue.js
mail/base/content/contentAreaClick.js
mail/base/content/editContactOverlay.js
mail/base/content/folderDisplay.js
mail/base/content/folderPane.js
mail/base/content/glodaFacetBindings.xml
mail/base/content/glodaFacetTab.js
mail/base/content/glodaFacetView.js
mail/base/content/macMessengerOverlay.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/mailOverlay.xul
mail/base/content/mailTabs.js
mail/base/content/mailWidgets.xml
mail/base/content/mailWindow.js
mail/base/content/mailWindowOverlay.js
mail/base/content/messageWindow.js
mail/base/content/msgHdrViewOverlay.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/phishingDetector.js
mail/base/content/plugins.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/systemIntegrationDialog.js
mail/base/content/tabmail.xml
mail/base/content/threadPaneColumnPicker.xml
mail/base/content/utilityOverlay.js
mail/base/modules/MailUtils.js
mail/base/modules/Windows8WindowFrameColor.jsm
mail/base/modules/dbViewWrapper.js
mail/base/modules/displayNameUtils.js
mail/base/modules/distribution.js
mail/base/modules/mailInstrumentation.js
mail/base/modules/mailMigrator.js
mail/base/modules/oauth.jsm
mail/base/modules/quickFilterManager.js
mail/base/modules/searchSpec.js
mail/base/modules/sessionStoreManager.js
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/DownloadsStartup.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/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.js
mail/components/activity/modules/alertHook.js
mail/components/activity/modules/autosync.js
mail/components/activity/modules/glodaIndexer.js
mail/components/activity/modules/moveCopy.js
mail/components/activity/modules/pop3Download.js
mail/components/activity/modules/sendLater.js
mail/components/activity/nsActivity.js
mail/components/activity/nsActivityManager.js
mail/components/activity/nsActivityManagerUI.js
mail/components/addrbook/content/abCardOverlay.js
mail/components/addrbook/content/abCardViewOverlay.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/Hightail/fileExceedsQuota.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/addressingWidgetOverlay.js
mail/components/compose/content/bigFileObserver.js
mail/components/devtools/devtools-loader.js
mail/components/downloads/content/aboutDownloads.js
mail/components/im/content/addbuddy.js
mail/components/im/content/am-im.js
mail/components/im/content/chat-messenger-overlay.js
mail/components/im/content/imAccountWizard.js
mail/components/im/content/imAccounts.js
mail/components/im/content/imStatusSelector.js
mail/components/im/content/imcontact.xml
mail/components/im/content/imconv.xml
mail/components/im/content/imconversation.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.js
mail/components/im/modules/search_im.js
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/fonts.js
mail/components/preferences/messagestyle.js
mail/components/preferences/permissions.js
mail/components/preferences/preferences.js
mail/components/preferences/preferencesTab.js
mail/components/preferences/security.js
mail/components/preferences/sendoptions.js
mail/components/search/SearchIntegration.js
mail/components/search/SpotlightIntegration.js
mail/components/search/WinSearchIntegration.js
mail/components/search/content/searchCommon.js
mail/components/search/content/searchOverlay.js
mail/components/shell/nsSetDefaultMail.js
mail/components/test/unit/head_mailcomponents.js
mail/components/test/unit/test_about_support.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-ab-whitelist.js
mail/test/mozmill/account/test-account-port-setting.js
mail/test/mozmill/account/test-account-settings-infrastructure.js
mail/test/mozmill/account/test-account-values.js
mail/test/mozmill/account/test-archive-options.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-in-plain-msg.js
mail/test/mozmill/attachment/test-attachment-menus.js
mail/test/mozmill/attachment/test-attachment-size.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-eml-actions.js
mail/test/mozmill/composition/test-forward-headers.js
mail/test/mozmill/composition/test-forward-rfc822-attach.js
mail/test/mozmill/composition/test-forward-utf8.js
mail/test/mozmill/composition/test-forwarded-content.js
mail/test/mozmill/composition/test-forwarded-eml-actions.js
mail/test/mozmill/composition/test-image-display.js
mail/test/mozmill/composition/test-image-insertion-dialog.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-multipart-charset.js
mail/test/mozmill/composition/test-reply-signature.js
mail/test/mozmill/composition/test-save-changes-on-quit.js
mail/test/mozmill/composition/test-send-button.js
mail/test/mozmill/composition/test-send-format.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-policy/test-plugins-policy.js
mail/test/mozmill/content-policy/test-view-source.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/content-tabs/test-lwthemes.js
mail/test/mozmill/content-tabs/test-plugin-blocked.js
mail/test/mozmill/content-tabs/test-plugin-crashing.js
mail/test/mozmill/content-tabs/test-plugin-outdated.js
mail/test/mozmill/cookies/test-cookies.js
mail/test/mozmill/downloads/test-about-downloads.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-display/test-right-click-middle-click-messages.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/chrome/content/overlay.js
mail/test/mozmill/folder-widget/test-message-filters.js
mail/test/mozmill/im/test-toolbar-buttons.js
mail/test/mozmill/instrumentation/test-instrument-setup.js
mail/test/mozmill/junk-commands/test-junk-commands.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-header/test-phishing-bar.js
mail/test/mozmill/message-reader/test-bug594646.js
mail/test/mozmill/message-window/test-autohide-menubar.js
mail/test/mozmill/message-window/test-commands.js
mail/test/mozmill/message-window/test-eml-subject.js
mail/test/mozmill/message-window/test-vcard-actions.js
mail/test/mozmill/message-window/test-view-plaintext.js
mail/test/mozmill/migration-to-rdf-ui-2/test-migrate-to-rdf-ui-2.js
mail/test/mozmill/migration-to-rdf-ui-3/test-migrate-to-rdf-ui-3.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/runtest.py
mail/test/mozmill/session-store/test-session-store.js
mail/test/mozmill/shared-modules/test-account-manager-helpers.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-backend-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-compose-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-dom-helpers.js
mail/test/mozmill/shared-modules/test-folder-display-helpers.js
mail/test/mozmill/shared-modules/test-junk-helpers.js
mail/test/mozmill/shared-modules/test-message-helpers.js
mail/test/mozmill/shared-modules/test-mouse-event-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-pref-window-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-iteratorUtils.js
mail/test/resources/jsbridge/jsbridge/extension/chrome/content/overlay.js
mail/test/resources/jsbridge/jsbridge/extension/components/cmdarg.js
mail/test/resources/jsbridge/jsbridge/extension/resource/modules/init.js
mail/test/resources/jsbridge/jsbridge/extension/resource/modules/server.js
mail/test/resources/mozmill/mozmill/__init__.py
mail/test/resources/mozmill/mozmill/extension/content/dx.js
mail/test/resources/mozmill/mozmill/extension/content/inspector.js
mail/test/resources/mozmill/mozmill/extension/content/menus.js
mail/test/resources/mozmill/mozmill/extension/content/mozmill.js
mail/test/resources/mozmill/mozmill/extension/content/output.js
mail/test/resources/mozmill/mozmill/extension/content/overlay.js
mail/test/resources/mozmill/mozmill/extension/content/rec.js
mail/test/resources/mozmill/mozmill/extension/content/shell.js
mail/test/resources/mozmill/mozmill/extension/content/ui.js
mail/test/resources/mozmill/mozmill/extension/resource/modules/controller.js
mail/test/resources/mozmill/mozmill/extension/resource/modules/elementslib.js
mail/test/resources/mozmill/mozmill/extension/resource/modules/events.js
mail/test/resources/mozmill/mozmill/extension/resource/modules/frame.js
mail/test/resources/mozmill/mozmill/extension/resource/modules/init.js
mail/test/resources/mozmill/mozmill/extension/resource/modules/inspection.js
mail/test/resources/mozmill/mozmill/extension/resource/modules/jum.js
mail/test/resources/mozmill/mozmill/extension/resource/modules/mozmill.js
mail/test/resources/mozmill/mozmill/extension/resource/stdlib/httpd.js
mail/test/resources/mozmill/mozmill/extension/resource/stdlib/objects.js
mail/test/resources/mozmill/mozmill/extension/resource/stdlib/strings.js
mail/test/resources/mozmill/test/elementLib-UnitTest.js
mail/test/resources/mozmill/test/first_sunbird_test.js
mail/test/resources/mozmill/test/first_thunderbird_test.js
mail/test/resources/mozmill/test/restart/test_browser/testPost.js
mail/test/resources/mozmill/test/restart/test_browser/testPre.js
mail/test/resources/mozmill/test/restart/test_fails/testPost.js
mail/test/resources/mozmill/test/restart/test_fails/testPre.js
mail/test/resources/mozmill/test/restart/test_multi_restart/test1.js
mail/test/resources/mozmill/test/restart/test_multi_restart/test2.js
mail/test/resources/mozmill/test/restart/test_multi_restart/test3.js
mail/test/resources/mozmill/test/restart/test_multi_restart/test4.js
mail/test/resources/mozmill/test/restart/test_multi_restart/test5.js
mail/test/resources/mozmill/test/restart/test_nothing/testPost.js
mail/test/resources/mozmill/test/restart/test_nothing/testPre.js
mail/test/resources/mozmill/test/restart/test_python_callback/testPost.js
mail/test/resources/mozmill/test/restart/test_python_callback/testPre.js
mail/test/resources/mozmill/test/test_assert.js
mail/test/resources/mozmill/test/test_demo.js
mail/test/resources/mozmill/test/test_diggIterator.js
mail/test/resources/mozmill/test/test_googleIterator.js
mail/test/resources/mozmill/test/test_jum.js
mail/test/resources/mozmill/test/test_prefs.js
mail/test/resources/mozmill/test/test_property.js
mail/test/resources/mozmill/test/test_python_callbacks.js
mail/test/resources/mozmill/test/test_setupmodulereporting.js
mail/test/resources/mozmill/test/test_something/test_sub/test_deps.js
mail/test/resources/mozmill/test/test_unit.js
mailnews/addrbook/content/abAddressBookNameDialog.js
mailnews/addrbook/content/abDragDrop.js
mailnews/addrbook/content/addrbookWidgets.xml
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/folderWidgets.xml
mailnews/base/content/junkCommands.js
mailnews/base/content/junkLog.js
mailnews/base/content/msgAccountCentral.js
mailnews/base/content/msgFolderPickerOverlay.js
mailnews/base/content/msgPrintEngine.js
mailnews/base/content/msgSynchronize.js
mailnews/base/content/newmailalert.js
mailnews/base/content/subscribe.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-addressing.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-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/removeAccount.js
mailnews/base/prefs/content/smtpEditOverlay.js
mailnews/base/search/content/CustomHeaders.js
mailnews/base/search/content/FilterEditor.js
mailnews/base/search/content/searchWidgets.xml
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_accountMigration.js
mailnews/base/test/unit/test_acctRepair.js
mailnews/base/test/unit/test_autoconfigFetchDisk.js
mailnews/base/test/unit/test_autoconfigUtils.js
mailnews/base/test/unit/test_autoconfigXML.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_bug465805.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_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_folderLookupService.js
mailnews/base/test/unit/test_hostnameUtils.js
mailnews/base/test/unit/test_imapPump.js
mailnews/base/test/unit/test_iteratorUtils.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_mimemaltdetach.js
mailnews/base/test/unit/test_newMailNotification.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_fakeserverAuth.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/OAuth2.jsm
mailnews/base/util/StringBundle.js
mailnews/base/util/folderUtils.jsm
mailnews/base/util/jsTreeSelection.js
mailnews/base/util/mailServices.js
mailnews/base/util/mailnewsMigrator.js
mailnews/base/util/msgDBCacheManager.js
mailnews/base/util/templateUtils.js
mailnews/base/util/traceHelper.js
mailnews/compose/content/mailComposeEditorOverlay.xul
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/content/overlay.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/query.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_noun_mimetype.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_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/msgCompSMIMEOverlay.js
mailnews/extensions/smime/content/msgCompSecurityInfo.js
mailnews/extensions/smime/content/msgReadSMIMEOverlay.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_compactOfflineStore.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_folderOfflineFlags.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_imapFilterActions.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_imapHdrStreaming.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_imapStoreMsgOffline.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_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/testJaBaseIncomingServer.jsm
mailnews/jsaccount/test/unit/resources/testJaBaseIncomingServerComponent.js
mailnews/jsaccount/test/unit/resources/testJaBaseMsgFolder.jsm
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_fooUrl.js
mailnews/jsaccount/test/unit/test_jaMsgFolder.js
mailnews/local/test/unit/head_maillocal.js
mailnews/local/test/unit/test_bug457168.js
mailnews/local/test/unit/test_duplicateKey.js
mailnews/local/test/unit/test_fileName.js
mailnews/local/test/unit/test_movemailDownload.js
mailnews/local/test/unit/test_msgIDParsing.js
mailnews/local/test/unit/test_nsIMsgLocalMailFolder.js
mailnews/local/test/unit/test_nsIMsgParseMailMsgState.js
mailnews/local/test/unit/test_over4GBMailboxes.js
mailnews/local/test/unit/test_pop3AuthMethods.js
mailnews/local/test/unit/test_pop3Download.js
mailnews/local/test/unit/test_pop3DownloadTempFileHandling.js
mailnews/local/test/unit/test_pop3Duplicates.js
mailnews/local/test/unit/test_pop3FilterActions.js
mailnews/local/test/unit/test_pop3GSSAPIFail.js
mailnews/local/test/unit/test_pop3MoveFilter.js
mailnews/local/test/unit/test_pop3MoveFilter2.js
mailnews/local/test/unit/test_pop3MultiCopy.js
mailnews/local/test/unit/test_pop3MultiCopy2.js
mailnews/local/test/unit/test_pop3Password.js
mailnews/local/test/unit/test_pop3Password2.js
mailnews/local/test/unit/test_pop3Password3.js
mailnews/local/test/unit/test_pop3PasswordFailure.js
mailnews/local/test/unit/test_pop3PasswordFailure2.js
mailnews/local/test/unit/test_pop3PasswordFailure3.js
mailnews/local/test/unit/test_pop3Proxy.js
mailnews/local/test/unit/test_pop3ServerBrokenCRAMDisconnect.js
mailnews/local/test/unit/test_pop3ServerBrokenCRAMFail.js
mailnews/local/test/unit/test_saveMessage.js
mailnews/local/test/unit/test_undoDelete.js
mailnews/local/test/unit/test_verifyLogon.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_bug403242.js
mailnews/news/test/unit/test_bug540288.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/fakeserver/smtpd.js
mailnews/test/resources/IMAPpump.js
mailnews/test/resources/MockFactory.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
--- a/common/bindings/preferences.xml
+++ b/common/bindings/preferences.xml
@@ -1260,17 +1260,17 @@
                  temp : aStartElement;
         ]]>
         </body>
       </method>
 
       <property name="DeferredTask" readonly="true">
         <getter><![CDATA[
           let module = {};
-          Components.utils.import("resource://gre/modules/DeferredTask.jsm", module);
+          ChromeUtils.import("resource://gre/modules/DeferredTask.jsm", module);
           Object.defineProperty(this, "DeferredTask", {
             configurable: true,
             enumerable: true,
             writable: true,
             value: module.DeferredTask
           });
           return module.DeferredTask;
         ]]></getter>
--- a/common/bindings/toolbar.xml
+++ b/common/bindings/toolbar.xml
@@ -520,17 +520,17 @@
 #endif
     <implementation>
       <field name="_dragBindingAlive">true</field>
       <constructor><![CDATA[
         if (!this._draggableStarted) {
           this._draggableStarted = true;
           try {
             let tmp = {};
-            Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
+            ChromeUtils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
             let draggableThis = new tmp.WindowDraggingElement(this);
             draggableThis.mouseDownCheck = function(e) {
               // Don't move while customizing.
               return this._dragBindingAlive &&
                      this.getAttribute("customizing") != "true";
             };
           } catch (e) {}
         }
--- 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;
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+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/extensionSupport.jsm
+++ b/common/src/extensionSupport.jsm
@@ -3,22 +3,22 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = [ "extensionDefaults" ];
 
 var Ci = Components.interfaces;
 var Cc = Components.classes;
 var Cu = Components.utils;
 
-Cu.import("resource://gre/modules/Services.jsm");
-// Cu.import("resource://gre/modules/Deprecated.jsm") - needed for warning.
-Cu.import("resource://gre/modules/NetUtil.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+// ChromeUtils.import("resource://gre/modules/Deprecated.jsm") - needed for warning.
+ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 
-Cu.import("resource:///modules/iteratorUtils.jsm");
-Cu.import("resource:///modules/IOUtils.js");
+ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+ChromeUtils.import("resource:///modules/IOUtils.js");
 
 /**
  * Reads preferences from addon provided locations (defaults/preferences/*.js)
  * and stores them in the default preferences branch.
  */
 function extensionDefaults() {
 
   function setPref(preferDefault, name, value) {
--- a/editor/ui/composer/content/EditorContextMenu.js
+++ b/editor/ui/composer/content/EditorContextMenu.js
@@ -1,18 +1,18 @@
 /* -*- 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/. */
 
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "InlineSpellCheckerUI", function() {
   let tmp = {};
-  Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm", tmp);
+  ChromeUtils.import("resource://gre/modules/InlineSpellChecker.jsm", tmp);
   return new tmp.InlineSpellChecker();
 });
 
 // Overrides the main contentAreaContext onpopupshowing so needs to do
 // everything that does plus call Composer specific code.
 function editorContextPopupShowing(aNode)
 {
   gContextMenu = new nsContextMenu(aNode);
--- 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/. */
 
-Components.utils.import("resource:///modules/editorUtilities.jsm");
-Components.utils.import("resource://services-common/async.js");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
+ChromeUtils.import("resource:///modules/editorUtilities.jsm");
+ChromeUtils.import("resource://services-common/async.js");
+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/. */
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+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/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/. */
 
-Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm");
+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/. */
 
-Components.utils.import("resource://gre/modules/CharsetMenu.jsm");
+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/. */
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const nsICommandLineHandler = Components.interfaces.nsICommandLineHandler;
 const nsISupportsString     = Components.interfaces.nsISupportsString;
 const nsIWindowWatcher      = Components.interfaces.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/. */
 
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const kNetworkProtocolCIDPrefix = "@mozilla.org/network/protocol;1?name=";
 const nsIProtocolHandler = Components.interfaces.nsIProtocolHandler;
 
 function makeProtocolHandler(aCID, aProtocol, aDefaultPort) {
   return {
     classID: Components.ID(aCID),
     QueryInterface: XPCOMUtils.generateQI([nsIProtocolHandler]),
--- a/mail/base/content/ABSearchDialog.js
+++ b/mail/base/content/ABSearchDialog.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/. */
 
-Components.utils.import("resource:///modules/ABQueryUtils.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/ABQueryUtils.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var searchSessionContractID = "@mozilla.org/messenger/searchSession;1";
 var gSearchSession;
 
 var nsMsgSearchScope = Components.interfaces.nsMsgSearchScope;
 var nsIMsgSearchTerm = Components.interfaces.nsIMsgSearchTerm;
 var nsMsgSearchOp = Components.interfaces.nsMsgSearchOp;
 var nsMsgSearchAttrib = Components.interfaces.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/. */
 
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource:///modules/iteratorUtils.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gFilterListMsgWindow = null;
 var gCurrentFilterList;
 var gCurrentFolder;
 var gSelectedFolder = null;
 
 var gFilterListbox = null;
 var gEditButton = null;
--- a/mail/base/content/SearchDialog.js
+++ b/mail/base/content/SearchDialog.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/. */
 
-Components.utils.import("resource:///modules/MailUtils.js");
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/MailUtils.js");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+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/aboutDialog-appUpdater.js
+++ b/mail/base/content/aboutDialog-appUpdater.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/. */
 
 // Note: this file is included in aboutDialog.xul and preferences/advanced.xul
 // if MOZ_UPDATER is defined.
 
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
 
 const PREF_APP_UPDATE_CANCELATIONS_OSX = "app.update.cancelations.osx";
 const PREF_APP_UPDATE_ELEVATE_NEVER    = "app.update.elevate.never";
 
 var gAppUpdater;
 
 function onUnload(aEvent) {
   if (gAppUpdater.isChecking)
--- a/mail/base/content/aboutDialog.js
+++ b/mail/base/content/aboutDialog.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/. */
 
 "use strict";
 
 // Services = object with smart getters for common XPCOM services
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 function init(aEvent)
 {
   if (aEvent.target != document)
     return;
 
   try {
     var distroId = Services.prefs.getCharPref("distribution.id");
--- a/mail/base/content/charsetOverlay.xul
+++ b/mail/base/content/charsetOverlay.xul
@@ -1,17 +1,17 @@
 <?xml version="1.0"?>
 <!-- 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/. -->
 
 <!DOCTYPE overlay SYSTEM "chrome://global/locale/charsetMenu.dtd">
 <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <script>
-    Components.utils.import("resource://gre/modules/CharsetMenu.jsm");
+    ChromeUtils.import("resource://gre/modules/CharsetMenu.jsm");
 
     function UpdateCharsetMenu(aCharset, aNode)
     {
       var bundle = document.getElementById("charsetBundle");
       CharsetMenu.update(aNode, bundle.getString(aCharset.toLowerCase()));
     }
   </script>
 
--- a/mail/base/content/commandglue.js
+++ b/mail/base/content/commandglue.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/. */
 
 /*
  * Command-specific code. This stuff should be called by the widgets
  */
 
-Components.utils.import("resource:///modules/iteratorUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+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 &&
       gRightMouseButtonSavedSelection)
     return;
--- a/mail/base/content/contentAreaClick.js
+++ b/mail/base/content/contentAreaClick.js
@@ -6,18 +6,18 @@
   /**
    * Extract the href from the link click event.
    * We look for HTMLAnchorElement, HTMLAreaElement, HTMLLinkElement,
    * HTMLInputElement.form.action, and nested anchor tags.
    *
    * @return href for the url being clicked
    */
 
-  Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
-  Components.utils.import("resource://gre/modules/Services.jsm");
+  ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
+  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;
 
--- a/mail/base/content/editContactOverlay.js
+++ b/mail/base/content/editContactOverlay.js
@@ -1,15 +1,15 @@
 /* -*- 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/. */
 
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var editContactInlineUI = {
   _overlayLoaded: false,
   _overlayLoading: false,
   _cardDetails: null,
   _writeable: true,
   _blockedCommands: ["cmd_close"],
 
--- a/mail/base/content/folderDisplay.js
+++ b/mail/base/content/folderDisplay.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/. */
 
-Components.utils.import("resource:///modules/dbViewWrapper.js");
-Components.utils.import("resource:///modules/jsTreeSelection.js");
-Components.utils.import("resource:///modules/MailUtils.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/dbViewWrapper.js");
+ChromeUtils.import("resource:///modules/jsTreeSelection.js");
+ChromeUtils.import("resource:///modules/MailUtils.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gFolderDisplay = null;
 var gMessageDisplay = null;
 
 var nsMsgFolderFlags = Components.interfaces.nsMsgFolderFlags;
 var nsMsgMessageFlags = Components.interfaces.nsMsgMessageFlags;
 
 /**
--- a/mail/base/content/folderPane.js
+++ b/mail/base/content/folderPane.js
@@ -2,23 +2,23 @@
  * 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/. */
 
 // Implements a tree of folders. It shows icons depending on folder type
 // and other fancy styling.
 // This is used in the main folder pane, but also some dialogs that need
 // to show a nice list of folders.
 
-Components.utils.import("resource:///modules/folderUtils.jsm");
-Components.utils.import("resource:///modules/iteratorUtils.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource:///modules/MailUtils.js");
-Components.utils.import("resource:///modules/IOUtils.js");
-Components.utils.import("resource:///modules/FeedUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/folderUtils.jsm");
+ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/MailUtils.js");
+ChromeUtils.import("resource:///modules/IOUtils.js");
+ChromeUtils.import("resource:///modules/FeedUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 if (typeof FeedMessageHandler != "object")
   Services.scriptloader.loadSubScript("chrome://messenger-newsblog/content/newsblogOverlay.js");
 
 var kDefaultMode = "all";
 
 var nsMsgFolderFlags = Components.interfaces.nsMsgFolderFlags;
 
--- a/mail/base/content/glodaFacetBindings.xml
+++ b/mail/base/content/glodaFacetBindings.xml
@@ -13,17 +13,17 @@
 
 <!-- ===== Constraints ===== -->
 
 <binding id="query-explanation">
   <content>
   </content>
   <implementation>
     <constructor><![CDATA[
-      Components.utils.import("resource:///modules/mailServices.js");
+      ChromeUtils.import("resource:///modules/mailServices.js");
     ]]></constructor>
     <!-- Indicate that we are based on a fulltext search-->
     <method name="setFulltext">
       <parameter name="aMsgSearcher" />
       <body><![CDATA[
         while (this.hasChildNodes())
           this.lastChild.remove();
 
@@ -1502,17 +1502,17 @@
         </html:div>
       </html:div>
     </html:div>
     <html:pre anonid="snippet" class="message-body"></html:pre>
       <html:div anonid="attachments" class="message-attachments"></html:div>
   </content>
   <implementation>
     <constructor><![CDATA[
-      Components.utils.import("resource:///modules/mailServices.js");
+      ChromeUtils.import("resource:///modules/mailServices.js");
       this.build();
     ]]></constructor>
     <method name="build">
       <body><![CDATA[
         let message = this.message;
         let dis = this;
         function anonElem(aAnonId) {
           return document.getAnonymousElementByAttribute(dis, "anonid",
--- 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/. */
 
-Components.utils.import("resource:///modules/StringBundle.js");
+ChromeUtils.import("resource:///modules/StringBundle.js");
 
-Components.utils.import("resource:///modules/gloda/facet.js");
+ChromeUtils.import("resource:///modules/gloda/facet.js");
 // needed by search.xml to use us
-Components.utils.import("resource:///modules/gloda/msg_search.js");
+ChromeUtils.import("resource:///modules/gloda/msg_search.js");
 
 var glodaFacetTabType = {
   name: "glodaFacet",
   perTabPanel: "vbox",
   strings:
     new StringBundle("chrome://messenger/locale/glodaFacetView.properties"),
   modes: {
     glodaFacet: {
--- a/mail/base/content/glodaFacetView.js
+++ b/mail/base/content/glodaFacetView.js
@@ -12,25 +12,25 @@
  *  get it wrong and it may eventually want to migrate.
  */
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cr = Components.results;
 var Cu = Components.utils;
 
-Cu.import("resource:///modules/gloda/log4moz.js");
-Cu.import("resource:///modules/StringBundle.js");
-Cu.import("resource://gre/modules/PluralForm.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource:///modules/errUtils.js");
-Cu.import("resource:///modules/templateUtils.js");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
+ChromeUtils.import("resource:///modules/StringBundle.js");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/errUtils.js");
+ChromeUtils.import("resource:///modules/templateUtils.js");
 
-Cu.import("resource:///modules/gloda/public.js");
-Cu.import("resource:///modules/gloda/facet.js");
+ChromeUtils.import("resource:///modules/gloda/public.js");
+ChromeUtils.import("resource:///modules/gloda/facet.js");
 
 var glodaFacetStrings =
   new StringBundle("chrome://messenger/locale/glodaFacetView.properties");
 
 /**
  * Represents the active constraints on a singular facet.  Singular facets can
  *  only have an inclusive set or an exclusive set, but not both.  Non-singular
  *  facets can have both.  Because they are different worlds, non-singular gets
--- a/mail/base/content/macMessengerOverlay.js
+++ b/mail/base/content/macMessengerOverlay.js
@@ -1,15 +1,15 @@
 /* -*- 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/. */
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
 
 // Load and add the menu item to the OS X Dock icon menu.
 addEventListener("load", function() {
   let dockMenuElement = document.getElementById("menu_mac_dockmenu");
   let Cc = Components.classes;
   let Ci = Components.interfaces;
   let nativeMenu = Cc["@mozilla.org/widget/standalonenativemenu;1"]
                     .createInstance(Ci.nsIStandaloneNativeMenu);
--- a/mail/base/content/mail-offline.js
+++ b/mail/base/content/mail-offline.js
@@ -1,14 +1,14 @@
 /* -*- 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/. */
 
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var MailOfflineMgr = {
   offlineManager: null,
   offlineBundle: null,
 
   init: function()
   {
     Services.obs.addObserver(this, "network:offline-status-changed");
--- a/mail/base/content/mail3PaneWindowCommands.js
+++ b/mail/base/content/mail3PaneWindowCommands.js
@@ -2,20 +2,20 @@
  * 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/. */
 
 /**
  * Functionality for the main application window (aka the 3pane) usually
  * consisting of folder pane, thread pane and message pane.
  */
 
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource:///modules/MailUtils.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/MailUtils.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
 
 // Controller object for folder pane
 var FolderPaneController =
 {
   supportsCommand: function(command)
   {
     switch ( command )
     {
--- a/mail/base/content/mailCommands.js
+++ b/mail/base/content/mailCommands.js
@@ -1,15 +1,15 @@
 /* -*- 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/. */
 
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource:///modules/MailUtils.js");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/MailUtils.js");
 
 /**
  * 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
@@ -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/. */
 
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
 
 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
@@ -7,20 +7,20 @@
  * Core mail routines used by all of the major mail windows (address book,
  * 3-pane, compose and stand alone message window).
  * Routines to support custom toolbars in mail windows, opening up a new window
  * of a particular type all live here.
  * Before adding to this file, ask yourself, is this a JS routine that is going
  * to be used by all of the main mail windows?
  */
 
-Components.utils.import("resource://gre/modules/BrowserUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
-Components.utils.import("resource:///modules/mailServices.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:///modules/mailServices.js");
 
 var gCustomizeSheet = false;
 
 function overlayRestoreDefaultSet() {
   let toolbox = null;
   if ("arguments" in window && window.arguments[0])
     toolbox = window.arguments[0];
   else if (window.frameElement && "toolbox" in window.frameElement)
--- a/mail/base/content/mailOverlay.xul
+++ b/mail/base/content/mailOverlay.xul
@@ -5,17 +5,17 @@
 
 
 <!DOCTYPE overlay SYSTEM "chrome://messenger/locale/mailOverlay.dtd">
 <overlay id="mailOverlay.xul"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <script type="application/javascript">
   <![CDATA[
-    Components.utils.import("resource:///modules/mailServices.js");
+    ChromeUtils.import("resource:///modules/mailServices.js");
     function openNewCardDialog()
       {
         window.openDialog("chrome://messenger/content/addressbook/abNewCardDialog.xul",
                           "", "chrome,modal,resizable=no,centerscreen");
       }
 
     function goOpenNewMessage()
       {
--- a/mail/base/content/mailTabs.js
+++ b/mail/base/content/mailTabs.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/. */
 
-Components.utils.import("resource:///modules/MsgHdrSyntheticView.js");
-Components.utils.import("resource:///modules/errUtils.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/MsgHdrSyntheticView.js");
+ChromeUtils.import("resource:///modules/errUtils.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * 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.xml
+++ b/mail/base/content/mailWidgets.xml
@@ -570,17 +570,17 @@
       <xul:label class="moreIndicator" onclick="this.parentNode.toggleWrap()"
                  collapsed="true" anonid="more"/>
     </content>
 
     <implementation>
       <constructor>
         <![CDATA[
           this.mAddresses = new Array;
-          Components.utils.import("resource://gre/modules/Services.jsm");
+          ChromeUtils.import("resource://gre/modules/Services.jsm");
         ]]>
       </constructor>
 
       <field name="mAddresses"/>
 
       <!-- addAddressView: a public method used to add an address to this widget.
            aAddresses is an object with 3 properties: displayName, emailAddress and fullAddress
       -->
@@ -1332,17 +1332,17 @@
 
               headerValueNode.appendChild(label);
             }
         ]]>
         </body>
       </method>
       <constructor>
         <![CDATA[
-          Components.utils.import("resource:///modules/mailServices.js");
+          ChromeUtils.import("resource:///modules/mailServices.js");
         ]]>
       </constructor>
     </implementation>
   </binding>
 
   <binding id="search-menulist-abstract" name="searchMenulistAbstract" extends="xul:box">
     <content>
       <xul:menulist class="search-menulist" xbl:inherits="flex,disabled" oncommand="this.parentNode.onSelect(event)">
@@ -1660,18 +1660,18 @@
                                this.validityManager.getAttributeProperty(ids[i]));
             }
             return strings;
           ]]>
         </getter>
       </property>
       <constructor>
       <![CDATA[
-        Components.utils.import("resource:///modules/mailServices.js");
-        Components.utils.import("resource://gre/modules/Services.jsm", this);
+        ChromeUtils.import("resource:///modules/mailServices.js");
+        ChromeUtils.import("resource://gre/modules/Services.jsm", this);
         initializeTermFromId(this.id);
       ]]>
       </constructor>
     </implementation>
   </binding>
 
   <!-- searchoperator - Contains, Is Less than, etc -->
   <binding id="searchoperator" name="searchOperator"
@@ -1734,18 +1734,18 @@
         <getter>
           <![CDATA[
             return this.searchAttribute;
           ]]>
         </getter>
       </property>
       <constructor>
         <![CDATA[
-          Components.utils.import("resource:///modules/mailServices.js");
-          Components.utils.import("resource://gre/modules/Services.jsm", this);
+          ChromeUtils.import("resource:///modules/mailServices.js");
+          ChromeUtils.import("resource://gre/modules/Services.jsm", this);
         ]]>
       </constructor>
     </implementation>
   </binding>
 
   <!-- searchvalue - a widget which dynamically changes its user interface
        depending on what type of data it's supposed to be showing
        currently handles arbitrary text entry, and menulists for
@@ -2149,18 +2149,18 @@
         <body>
           <![CDATA[
             this.fillStringsForChildren(menulist.firstChild, bundle);
           ]]>
         </body>
       </method>
       <constructor>
       <![CDATA[
-        Components.utils.import("resource:///modules/mailServices.js");
-        Components.utils.import("resource://gre/modules/Services.jsm", this);
+        ChromeUtils.import("resource:///modules/mailServices.js");
+        ChromeUtils.import("resource://gre/modules/Services.jsm", this);
 
         // initialize strings
         var bundle = this.Services.strings.createBundle("chrome://messenger/locale/messenger.properties");
 
         // intialize the priority picker
         this.initialize(document.getAnonymousNodes(this)[1], bundle);
 
         // initialize the status picker
@@ -2641,18 +2641,18 @@
             var containingBox = document.getAnonymousNodes(this)[0];
             while (containingBox.hasChildNodes())
               containingBox.lastChild.remove();
           ]]>
         </body>
       </method>
       <constructor>
         <![CDATA[
-          Components.utils.import("resource:///modules/mailServices.js");
-          Components.utils.import("resource://gre/modules/Services.jsm", this);
+          ChromeUtils.import("resource:///modules/mailServices.js");
+          ChromeUtils.import("resource://gre/modules/Services.jsm", this);
         ]]>
       </constructor>
     </implementation>
   </binding>
 
   <binding id="folderSummary-location">
     <content>
       <xul:hbox>
@@ -2678,18 +2678,18 @@
           <xul:spring anonid="spring" flex="100%"/>
         </xul:hbox>
         <xul:description anonid="preview" class="folderSummary-message-row folderSummary-previewText" xbl:inherits="value=previewText" crop="right"></xul:description>
       </xul:vbox>
     </content>
     <implementation>
       <constructor>
         <![CDATA[
-          Components.utils.import("resource:///modules/MailUtils.js");
-          Components.utils.import("resource://gre/modules/Services.jsm", this);
+          ChromeUtils.import("resource:///modules/MailUtils.js");
+          ChromeUtils.import("resource://gre/modules/Services.jsm", this);
 
           if (!this.Services.prefs.getBoolPref("mail.biff.alert.show_preview"))
             document.getAnonymousElementByAttribute(this, "anonid", "preview").hidden = true;
           var hideSubject = !this.Services.prefs.getBoolPref("mail.biff.alert.show_subject");
           var hideSender = !this.Services.prefs.getBoolPref("mail.biff.alert.show_sender");
           if (hideSubject)
             document.getAnonymousElementByAttribute(this, "anonid", "subject").hidden = true;
           if (hideSender)
--- a/mail/base/content/mailWindow.js
+++ b/mail/base/content/mailWindow.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/. */
 
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource:///modules/appIdleManager.js");
-Components.utils.import("resource:///modules/MailUtils.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource:///modules/gloda/log4moz.js");
-Components.utils.import("resource:///modules/gloda/public.js");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/appIdleManager.js");
+ChromeUtils.import("resource:///modules/MailUtils.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
+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
@@ -1,28 +1,27 @@
 /* -*- 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/. */
 
-Components.utils.import("resource:///modules/FeedUtils.jsm");
-Components.utils.import("resource:///modules/gloda/dbview.js");
-Components.utils.import("resource:///modules/MailConsts.js");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource:///modules/MailUtils.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "BrowserToolboxProcess", "resource://devtools/client/framework/ToolboxProcess.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "ScratchpadManager","resource://devtools/client/scratchpad/scratchpad-manager.jsm");
+ChromeUtils.import("resource:///modules/FeedUtils.jsm");
+ChromeUtils.import("resource:///modules/gloda/dbview.js");
+ChromeUtils.import("resource:///modules/MailConsts.js");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/MailUtils.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+
+ChromeUtils.defineModuleGetter(this, "BrowserToolboxProcess", "resource://devtools/client/framework/ToolboxProcess.jsm");
+ChromeUtils.defineModuleGetter(this, "ScratchpadManager","resource://devtools/client/scratchpad/scratchpad-manager.jsm");
 Object.defineProperty(this, "HUDService", {
   get: function HUDService_getter() {
-    let devtools = Components.utils.import("resource://devtools/shared/Loader.jsm", {}).devtools;
+    let devtools = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {}).devtools;
     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
@@ -1,21 +1,21 @@
 /**
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* This is where functions related to the standalone message window are kept */
 
-Components.utils.import("resource:///modules/jsTreeSelection.js");
-Components.utils.import("resource:///modules/MailUtils.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource:///modules/MsgHdrSyntheticView.js");
+ChromeUtils.import("resource:///modules/jsTreeSelection.js");
+ChromeUtils.import("resource:///modules/MailUtils.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource:///modules/MsgHdrSyntheticView.js");
 
 // 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/msgHdrViewOverlay.js
+++ b/mail/base/content/msgHdrViewOverlay.js
@@ -2,23 +2,23 @@
  * 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/. */
 
 /**
  * Functions related to displaying the headers for a selected message in the
  * message pane.
  */
 
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/displayNameUtils.js");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource:///modules/gloda/utils.js");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/displayNameUtils.js");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/gloda/utils.js");
 var {Status: statusUtils} =
-  Components.utils.import("resource:///modules/imStatusUtils.jsm");
+  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
@@ -1308,17 +1308,17 @@ function UpdateEmailNodeDetails(aEmailAd
       chatAddresses.push(gTalk);
     let jid = card.getProperty("_JabberId", null);
     if (jid)
       chatAddresses.push(jid);
   }
   let chatContact;
   if (!("chatHandler" in window)) {
     window.chatHandler = {};
-    Components.utils.import("resource:///modules/chatHandler.jsm", chatHandler);
+    ChromeUtils.import("resource:///modules/chatHandler.jsm", chatHandler);
   }
   let onlineContacts = chatHandler.onlineContacts;
   for (let chatAddress of chatAddresses) {
     if (Object.prototype.hasOwnProperty.call(onlineContacts, chatAddresses)) {
       chatContact = onlineContacts[chatAddress];
       break;
     }
   }
--- a/mail/base/content/msgMail3PaneWindow.js
+++ b/mail/base/content/msgMail3PaneWindow.js
@@ -1,29 +1,29 @@
 /**
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-Components.utils.import("resource:///modules/activity/activityModules.js");
-Components.utils.import("resource:///modules/errUtils.js");
-Components.utils.import("resource:///modules/folderUtils.jsm");
-Components.utils.import("resource:///modules/IOUtils.js");
-Components.utils.import("resource:///modules/jsTreeSelection.js");
-Components.utils.import("resource:///modules/MailConsts.js");
-Components.utils.import("resource:///modules/mailInstrumentation.js");
-Components.utils.import("resource:///modules/mailnewsMigrator.js");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource:///modules/msgDBCacheManager.js");
-Components.utils.import("resource:///modules/sessionStoreManager.js");
-Components.utils.import("resource:///modules/summaryFrameManager.js");
-Components.utils.import("resource:///modules/MailUtils.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
-Components.utils.import("resource://gre/modules/Color.jsm");
+ChromeUtils.import("resource:///modules/activity/activityModules.js");
+ChromeUtils.import("resource:///modules/errUtils.js");
+ChromeUtils.import("resource:///modules/folderUtils.jsm");
+ChromeUtils.import("resource:///modules/IOUtils.js");
+ChromeUtils.import("resource:///modules/jsTreeSelection.js");
+ChromeUtils.import("resource:///modules/MailConsts.js");
+ChromeUtils.import("resource:///modules/mailInstrumentation.js");
+ChromeUtils.import("resource:///modules/mailnewsMigrator.js");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/msgDBCacheManager.js");
+ChromeUtils.import("resource:///modules/sessionStoreManager.js");
+ChromeUtils.import("resource:///modules/summaryFrameManager.js");
+ChromeUtils.import("resource:///modules/MailUtils.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+ChromeUtils.import("resource://gre/modules/Color.jsm");
 
 /* This is where functions related to the 3 pane window are kept */
 
 // from MailNewsTypes.h
 var nsMsgKey_None = 0xFFFFFFFF;
 var nsMsgViewIndex_None = 0xFFFFFFFF;
 var kMailCheckOncePrefName = "mail.startup.enabledMailCheckOnce";
 
@@ -340,17 +340,17 @@ function OnLoadMessenger()
   // in delayedOnLoadMessenger...
   UpdateMailPaneConfig(false);
   document.loadBindingDocument('chrome://global/content/bindings/textbox.xml');
 
   if (AppConstants.platform == "win") {
     // On Win8 set an attribute when the window frame color is too dark for black text.
     if (window.matchMedia("(-moz-os-version: windows-win8)").matches &&
         window.matchMedia("(-moz-windows-default-theme)").matches) {
-      let windowFrameColor = new Color(...Components.utils.import("resource:///modules/Windows8WindowFrameColor.jsm", {})
+      let windowFrameColor = new Color(...ChromeUtils.import("resource:///modules/Windows8WindowFrameColor.jsm", {})
                                             .Windows8WindowFrameColor.get());
       // Default to black for foreground text.
       if (!windowFrameColor.isContrastRatioAcceptable(new Color(0, 0, 0))) {
         document.documentElement.setAttribute("darkwindowframe", "true");
       }
     }
   }
 
@@ -444,17 +444,17 @@ function LoadPostAccountWizard()
 {
   InitMsgWindow();
   messenger.setWindow(window, msgWindow);
 
   InitPanes();
   MigrateJunkMailSettings();
   MigrateFolderViews();
   MigrateOpenMessageBehavior();
-  Components.utils.import("resource:///modules/mailMigrator.js");
+  ChromeUtils.import("resource:///modules/mailMigrator.js");
   MailMigrator.migratePostAccountWizard();
 
   accountManager.setSpecialFolders();
 
   try {
     accountManager.loadVirtualFolders();
   } catch (e) {Components.utils.reportError(e);}
   accountManager.addIncomingServerListener(gThreePaneIncomingServerListener);
@@ -504,17 +504,17 @@ function LoadPostAccountWizard()
       var defaultAccount;
       try {
         shellService = Components.classes["@mozilla.org/mail/shell-service;1"].getService(nsIShellService);
         defaultAccount = accountManager.defaultAccount;
       } catch (ex) {}
 
       // Next, try loading the search integration module
       // We'll get a null SearchIntegration if we don't have one
-      Components.utils.import("resource:///modules/SearchIntegration.js");
+      ChromeUtils.import("resource:///modules/SearchIntegration.js");
 
       // 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.
@@ -1478,17 +1478,17 @@ var LightWeightThemeWebInstaller = {
   },
 
   onTabSwitched: function (aTab, aOldTab) {
     this._resetPreview();
   },
 
   get _manager () {
     let temp = {};
-    Components.utils.import("resource://gre/modules/LightweightThemeManager.jsm", temp);
+    ChromeUtils.import("resource://gre/modules/LightweightThemeManager.jsm", temp);
     delete this._manager;
     return this._manager = temp.LightweightThemeManager;
   },
 
   _installRequest: function (event) {
     let node = event.target;
     let data = this._getThemeFromNode(node);
     if (!data)
--- a/mail/base/content/msgViewNavigation.js
+++ b/mail/base/content/msgViewNavigation.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/. */
 
 /*  This file contains the js functions necessary to implement view navigation within the 3 pane. */
 
-Components.utils.import("resource:///modules/folderUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/folderUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function GetSubFoldersInFolderPaneOrder(folder)
 {
   var subFolders = folder.subFolders;
   var msgFolders = Array();
 
   // get all the subfolders
   while (subFolders.hasMoreElements()) {
--- a/mail/base/content/multimessageview.js
+++ b/mail/base/content/multimessageview.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/. */
 
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource:///modules/gloda/gloda.js");
-Components.utils.import("resource:///modules/gloda/connotent.js");
-Components.utils.import("resource:///modules/gloda/mimemsg.js");
-Components.utils.import("resource:///modules/displayNameUtils.js");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource:///modules/templateUtils.js");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource:///modules/gloda/gloda.js");
+ChromeUtils.import("resource:///modules/gloda/connotent.js");
+ChromeUtils.import("resource:///modules/gloda/mimemsg.js");
+ChromeUtils.import("resource:///modules/displayNameUtils.js");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/templateUtils.js");
 
 var gMessenger = Components.classes["@mozilla.org/messenger;1"]
                            .createInstance(Components.interfaces.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/. */
 
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+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
@@ -1,22 +1,22 @@
 /**
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm");
-Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
-Components.utils.import("resource:///modules/MailUtils.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:///modules/MailUtils.js");
 
 XPCOMUtils.defineLazyGetter(this, "PageMenuParent", function() {
   let tmp = {};
-  Cu.import("resource://gre/modules/PageMenu.jsm", tmp);
+  ChromeUtils.import("resource://gre/modules/PageMenu.jsm", tmp);
   return new tmp.PageMenuParent();
 });
 
 var gSpellChecker = new InlineSpellChecker();
 
 function nsContextMenu(aXulMenu, aIsShift) {
   this.target         = null;
   this.menu           = null;
--- 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/. */
 
 // Dependencies:
 // gatherTextUnder from utilityOverlay.js
 
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var kPhishingNotSuspicious = 0;
 var kPhishingWithIPAddress = 1;
 var kPhishingWithMismatchedHosts = 2;
 
 
 var gPhishingDetector = {
   mCheckForIPAddresses: true,
@@ -22,17 +22,17 @@ var gPhishingDetector = {
 
   /**
    * Initialize the phishing warden.
    * Initialize the black and white list url tables.
    * Update the local tables if necessary.
    */
   init: function()
   {
-    Components.utils.import("resource:///modules/hostnameUtils.jsm", this);
+    ChromeUtils.import("resource:///modules/hostnameUtils.jsm", this);
 
     this.mCheckForIPAddresses = Services.prefs.getBoolPref("mail.phishing.detection.ipaddresses");
     this.mCheckForMismatchedHosts = Services.prefs.getBoolPref("mail.phishing.detection.mismatched_hosts");
   },
 
   /**
    * Analyzes the urls contained in the currently loaded message in the message pane, looking for
    * phishing URLs.
--- a/mail/base/content/plugins.js
+++ b/mail/base/content/plugins.js
@@ -3,18 +3,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /* A note to the curious: a large portion of this code was copied over from
  * mozilla/browser/base/content/browser.js
  */
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 if (AppConstants.MOZ_CRASHREPORTER) {
   XPCOMUtils.defineLazyServiceGetter(this, "gCrashReporter",
                                      "@mozilla.org/xre/app-info;1",
                                      "nsICrashReporter");
 }
 
 function getPluginInfo(pluginElement)
@@ -82,17 +82,17 @@ var gPluginHandler = {
   },
 
   getPluginUI: function (plugin, anonId) {
     return plugin.ownerDocument.getAnonymousElementByAttribute(plugin, "anonid", anonId);
   },
 
   get CrashSubmit() {
     delete this.CrashSubmit;
-    Components.utils.import("resource://gre/modules/CrashSubmit.jsm", this);
+    ChromeUtils.import("resource://gre/modules/CrashSubmit.jsm", this);
     return this.CrashSubmit;
   },
 
   // Map the plugin's name to a filtered version more suitable for user UI.
   makeNicePluginName : function ph_makeNicePluginName(aName, aFilename) {
     if (aName == "Shockwave Flash")
       return "Adobe Flash";
 
--- a/mail/base/content/quickFilterBar.js
+++ b/mail/base/content/quickFilterBar.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/. */
 
-Components.utils.import("resource:///modules/iteratorUtils.jsm");
-Components.utils.import("resource:///modules/errUtils.js");
-Components.utils.import("resource:///modules/quickFilterManager.js");
-Components.utils.import("resource:///modules/searchSpec.js");
+ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+ChromeUtils.import("resource:///modules/errUtils.js");
+ChromeUtils.import("resource:///modules/quickFilterManager.js");
+ChromeUtils.import("resource:///modules/searchSpec.js");
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Proper Code
 
 /**
  * There is only one message filter bar widget; the muxer deals with tab
  *  changes and directing modifications to and reflecting the state of the
  *  actual filterer objects.
--- a/mail/base/content/safeMode.js
+++ b/mail/base/content/safeMode.js
@@ -1,15 +1,15 @@
 /* -*- 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/. */
 
-Components.utils.import("resource://gre/modules/AddonManager.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function restartApp() {
   Services.startup.quit(Services.startup.eForceQuit | Services.startup.eRestart);
 }
 
 function deleteLocalstore() {
   var localstoreFile = Services.dirsvc.get("LStoreS", Components.interfaces.nsIFile);
   if (localstoreFile.exists())
--- a/mail/base/content/sanitize.js
+++ b/mail/base/content/sanitize.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/. */
 
-Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
+ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 function Sanitizer() {}
 Sanitizer.prototype = {
   // warning to the caller: this one may raise an exception (e.g. bug #265028)
   clearItem: function (aItemName)
   {
     if (this.items[aItemName].canClear)
       this.items[aItemName].clear();
--- a/mail/base/content/search.xml
+++ b/mail/base/content/search.xml
@@ -49,19 +49,19 @@
       ]]></handler>
     </handlers>
 
     <implementation implements="nsIObserver">
       <constructor><![CDATA[
         const Cc = Components.classes;
         const Ci = Components.interfaces;
         const Cu = Components.utils;
-        Cu.import("resource:///modules/errUtils.js");
-        Cu.import("resource://gre/modules/Services.jsm");
-        Cu.import("resource://gre/modules/AppConstants.jsm");
+        ChromeUtils.import("resource:///modules/errUtils.js");
+        ChromeUtils.import("resource://gre/modules/Services.jsm");
+        ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
         try {
           this.setAttribute(
             "placeholder",
             this.getAttribute("emptytextbase")
                 .replace("#1", this.getAttribute(
                                  (AppConstants.platform == "macosx") ?
                                   "keyLabelMac" : "keyLabelNonMac")));
@@ -84,29 +84,29 @@
           this.placeholder = this.getAttribute("placeholder");
         } catch (e) {
           logException(e, true);
         }
       ]]></constructor>
 
       <destructor>
         <![CDATA[
-          Components.utils.import("resource://gre/modules/Services.jsm");
+          ChromeUtils.import("resource://gre/modules/Services.jsm");
 
           Services.prefs.removeObserver("mailnews.database.global.indexer.enabled",
                                         this._prefObserver);
           Services.obs.removeObserver(this, "autocomplete-did-enter-text");
         ]]>
       </destructor>
 
       <field name="_prefObserver">({
         inputSearch: this,
         observe: function(subject, topic, data)
         {
-          Components.utils.import("resource://gre/modules/Services.jsm");
+          ChromeUtils.import("resource://gre/modules/Services.jsm");
 
           if (topic == "nsPref:changed") {
             subject.QueryInterface(Components.interfaces.nsIPrefBranch);
             switch (data) {
             case "mailnews.database.global.indexer.enabled":
               this.inputSearch.glodaEnabled =
                 Services.prefs.getBoolPref(
                   "mailnews.database.global.indexer.enabled");
@@ -213,17 +213,17 @@
         } catch (e) {
           logException(e);
         }
         ]]></body>
       </method>
 
       <method name="doSearch">
         <body><![CDATA[
-          Components.utils.import("resource://gre/modules/Services.jsm");
+          ChromeUtils.import("resource://gre/modules/Services.jsm");
 
           try {
             if (this.value) {
               let tabmail = document.getElementById("tabmail");
               // If the current tab is a gloda search tab, reset the value
               //  to the initial search value.  Otherwise, clear it.  This
               //  is the value that 3is going to be saved with the current
               //  tab when we switch back to it next.
@@ -237,17 +237,17 @@
                 tabmail.closeTab();
               }
               this.value = ''; // clear our value, to avoid persistence
               let args = {
                 searcher: new GlodaMsgSearcher(null, searchString)
               };
               if (Services.prefs.getBoolPref("mail.chat.enabled")) {
                 if (!("GlodaIMSearcher" in window))
-                  Cu.import("resource:///modules/search_im.js");
+                  ChromeUtils.import("resource:///modules/search_im.js");
                 args.IMSearcher = new GlodaIMSearcher(null, searchString);
               }
               tabmail.openTab("glodaFacet", args);
             }
           } catch (e) {
             logException(e);
           }
         ]]>
--- a/mail/base/content/searchBar.js
+++ b/mail/base/content/searchBar.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/. */
 
-Components.utils.import("resource:///modules/StringBundle.js");
+ChromeUtils.import("resource:///modules/StringBundle.js");
 
 var gSearchBundle;
 
 var gStatusBar = document.getElementById('statusbar-icon');
 
 var gGlodaCompleteStrings = new StringBundle("chrome://messenger/locale/glodaComplete.properties");
 
 /**
--- a/mail/base/content/specialTabs.js
+++ b/mail/base/content/specialTabs.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/. */
 
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/AddonManager.jsm");
-Components.utils.import("resource:///modules/StringBundle.js");
-Components.utils.import("resource://gre/modules/BrowserUtils.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
+ChromeUtils.import("resource:///modules/StringBundle.js");
+ChromeUtils.import("resource://gre/modules/BrowserUtils.jsm");
 
 function tabProgressListener(aTab, aStartsBlank) {
   this.mTab = aTab;
   this.mBrowser = aTab.browser;
   this.mBlank = aStartsBlank;
   this.mProgressListener = null;
 }
 
--- a/mail/base/content/systemIntegrationDialog.js
+++ b/mail/base/content/systemIntegrationDialog.js
@@ -18,18 +18,18 @@ var gSystemIntegrationDialog = {
   _startupCheckbox: null,
 
   _searchCheckbox: null,
 
   onLoad: function()
   {
     // Makes Services and SearchIntegration accessible via this.Services
     // and this.SearchIntegration.
-    Components.utils.import("resource://gre/modules/Services.jsm", this);
-    Components.utils.import("resource:///modules/SearchIntegration.js", this);
+    ChromeUtils.import("resource://gre/modules/Services.jsm", this);
+    ChromeUtils.import("resource:///modules/SearchIntegration.js", this);
 
     // initialize elements
     this._mailCheckbox    = document.getElementById("checkMail");
     this._newsCheckbox    = document.getElementById("checkNews");
     this._rssCheckbox     = document.getElementById("checkRSS");
     this._startupCheckbox = document.getElementById("checkOnStartup");
     this._searchCheckbox  = document.getElementById("searchIntegration");
 
--- a/mail/base/content/tabmail.xml
+++ b/mail/base/content/tabmail.xml
@@ -273,17 +273,17 @@
         <children includes="tabpanels"/>
       </xul:tabbox>
     </content>
 
     <implementation implements="nsIController">
       <constructor>
         window.controllers.insertControllerAt(0, this);
         this._restoringTabState = null;
-        Components.utils.import("resource://gre/modules/AppConstants.jsm");
+        ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
       </constructor>
       <destructor>
         window.controllers.removeController(this);
       </destructor>
       <field name="currentTabInfo">
         null
       </field>
       <!-- Temporary field that only has a non-null value during a call to
@@ -1716,17 +1716,17 @@
           </xul:hbox>
         </xul:hbox>
       </xul:vbox>
     </content>
 
     <implementation implements="nsITimerCallback, nsIDOMEventListener">
       <constructor>
         <![CDATA[
-          Components.utils.import("resource://gre/modules/Services.jsm");
+          ChromeUtils.import("resource://gre/modules/Services.jsm");
 
           try {
             this.mTabMinWidth = Services.prefs.getIntPref("mail.tabs.tabMinWidth");
           } catch (e) {
           }
           try {
             this.mTabMaxWidth = Services.prefs.getIntPref("mail.tabs.tabMaxWidth");
           } catch (e) {
@@ -1762,17 +1762,17 @@
           // anonymous nodes.
           this.arrowScrollbox.addEventListener("overflow", this);
           this.arrowScrollbox.addEventListener("underflow", this);
         ]]>
       </constructor>
 
       <destructor>
         <![CDATA[
-          Components.utils.import("resource://gre/modules/Services.jsm");
+          ChromeUtils.import("resource://gre/modules/Services.jsm");
 
           Services.prefs.removeObserver("mail.tabs.", this._prefObserver);
 
           // Release timer to avoid reference cycles.
           if (this._animateTimer) {
             this._animateTimer.cancel();
             this._animateTimer = null;
           }
--- a/mail/base/content/threadPaneColumnPicker.xml
+++ b/mail/base/content/threadPaneColumnPicker.xml
@@ -191,17 +191,17 @@
             // null out to avoid memory bloat
             aDestFolder.msgDatabase = null;
           }
         ]]></body>
       </method>
     </implementation>
     <handlers>
       <handler event="command"><![CDATA[
-        Components.utils.import("resource://gre/modules/Services.jsm");
+        ChromeUtils.import("resource://gre/modules/Services.jsm");
 
         // Are they clicking on our header to get us to show the column list?
         if (event.originalTarget == this) {
           this._showPopup();
           return;
         }
 
         // Are they clicking on one of the columns in the list?
--- a/mail/base/content/utilityOverlay.js
+++ b/mail/base/content/utilityOverlay.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/. */
 
-Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gShowBiDi = false;
 
 function getBrowserURL() {
   return Services.prefs.getCharPref("browser.chromeURL");
 }
 
 // update menu items that rely on focus
--- a/mail/base/modules/MailUtils.js
+++ b/mail/base/modules/MailUtils.js
@@ -2,21 +2,21 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var EXPORTED_SYMBOLS = ["MailUtils"];
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 
-Components.utils.import("resource:///modules/iteratorUtils.jsm");
-Components.utils.import("resource:///modules/MailConsts.js");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+ChromeUtils.import("resource:///modules/MailConsts.js");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
 
 var MC = MailConsts;
 
 /**
  * This module has several utility functions for use by both core and
  * third-party code. Some functions are aimed at code that doesn't have a
  * window context, while others can be used anywhere.
  */
--- a/mail/base/modules/Windows8WindowFrameColor.jsm
+++ b/mail/base/modules/Windows8WindowFrameColor.jsm
@@ -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/. */
 
 "use strict";
 const {interfaces: Ci, utils: Cu} = Components;
 
 this.EXPORTED_SYMBOLS = ["Windows8WindowFrameColor"];
 
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-var Registry = Cu.import("resource://gre/modules/WindowsRegistry.jsm").WindowsRegistry;
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var Registry = ChromeUtils.import("resource://gre/modules/WindowsRegistry.jsm").WindowsRegistry;
 
 var Windows8WindowFrameColor = {
   _windowFrameColor: null,
 
   get: function() {
     if (this._windowFrameColor)
       return this._windowFrameColor;
 
--- a/mail/base/modules/dbViewWrapper.js
+++ b/mail/base/modules/dbViewWrapper.js
@@ -4,20 +4,20 @@
 
 this.EXPORTED_SYMBOLS = ['DBViewWrapper', 'IDBViewWrapperListener'];
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cr = Components.results;
 var Cu = Components.utils;
 
-Cu.import("resource:///modules/mailServices.js");
-Cu.import("resource:///modules/mailViewManager.js");
-Cu.import("resource:///modules/searchSpec.js");
-Cu.import("resource:///modules/virtualFolderWrapper.js");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/mailViewManager.js");
+ChromeUtils.import("resource:///modules/searchSpec.js");
+ChromeUtils.import("resource:///modules/virtualFolderWrapper.js");
 
 var nsMsgFolderFlags = Ci.nsMsgFolderFlags;
 var nsMsgViewType = Ci.nsMsgViewType;
 var nsMsgViewFlagsType = Ci.nsMsgViewFlagsType;
 var nsMsgViewSortType = Ci.nsMsgViewSortType;
 var nsMsgViewSortOrder = Ci.nsMsgViewSortOrder;
 var nsMsgMessageFlags = Ci.nsMsgMessageFlags;
 
--- a/mail/base/modules/displayNameUtils.js
+++ b/mail/base/modules/displayNameUtils.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/. */
 
-Components.utils.import("resource:///modules/iteratorUtils.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource:///modules/StringBundle.js");
+ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/StringBundle.js");
 
 var EXPORTED_SYMBOLS = [
   "GetCardForEmail", "FormatDisplayName", "FormatDisplayNameList",
 ];
 
 // XXX: Maybe the strings for this file should go in a separate bundle?
 var gMessengerBundle = new StringBundle(
   "chrome://messenger/locale/messenger.properties"
--- a/mail/base/modules/distribution.js
+++ b/mail/base/modules/distribution.js
@@ -3,18 +3,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["TBDistCustomizer"];
 
 var Ci = Components.interfaces;
 var Cc = Components.classes;
 var Cu = Components.utils;
 
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 var DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC =
   "distribution-customization-complete";
 
 var TBDistCustomizer = {
   applyPrefDefaults: function TBDistCustomizer_applyPrefDefaults() {
     this._prefDefaultsApplied = true;
     if (!this._ini) {
--- a/mail/base/modules/mailInstrumentation.js
+++ b/mail/base/modules/mailInstrumentation.js
@@ -11,19 +11,19 @@
 this.EXPORTED_SYMBOLS = ["mailInstrumentationManager"];
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cu = Components.utils;
 
 var nsIMFNService = Ci.nsIMsgFolderNotificationService;
 
-Cu.import("resource:///modules/errUtils.js");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/errUtils.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
 
 Cu.importGlobalProperties(["XMLHttpRequest"]);
 
 /* :::::::: The Module ::::::::::::::: */
 
 var mailInstrumentationManager =
 {
   // JS object containing the current state object
--- a/mail/base/modules/mailMigrator.js
+++ b/mail/base/modules/mailMigrator.js
@@ -10,23 +10,22 @@
  */
 
 var EXPORTED_SYMBOLS = ["MailMigrator"];
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cu = Components.utils;
 
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource:///modules/mailServices.js");
-Cu.import("resource:///modules/IOUtils.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/IOUtils.js");
 
-XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper",
-                                  "resource://gre/modules/LoginHelper.jsm");
+ChromeUtils.defineModuleGetter(this, "LoginHelper",
+                               "resource://gre/modules/LoginHelper.jsm");
 
 var MailMigrator = {
   /**
    * Switch the given fonts to the given encodings, but only if the current fonts
    * are defaults.
    */
   _switchDefaultFonts: function MailMigrator__switchDefaultFonts(aFonts,
                                                                  aEncodings) {
@@ -362,17 +361,17 @@ var MailMigrator = {
           }
         } finally {
           db.close();
         }
       }
 
       // Changed notification sound behaviour on OS X.
       if (currentUIVersion < 15) {
-        Cu.import("resource://gre/modules/AppConstants.jsm");
+        ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
         if (AppConstants.platform == "macosx") {
           // For people updating from versions < 52 who had "Play system sound"
           // selected for notifications. As TB no longer plays system sounds,
           // uncheck the pref to match the new behaviour.
           const soundPref = "mail.biff.play_sound";
           if (Services.prefs.getBoolPref(soundPref) &&
               Services.prefs.getIntPref(soundPref + ".type") == 0) {
             Services.prefs.setBoolPref(soundPref, false);
--- a/mail/base/modules/oauth.jsm
+++ b/mail/base/modules/oauth.jsm
@@ -7,20 +7,20 @@
  * be shareable by various components that need Oauth, but some changes will
  * need to be made to support differences in OAuth usage.
  */
 
 var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
 
 var EXPORTED_SYMBOLS = ["OAuth"];
 
-Cu.import("resource://gre/modules/Http.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource:///modules/gloda/log4moz.js");
+ChromeUtils.import("resource://gre/modules/Http.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
 function OAuth(aDisplayName, aBaseUri, aAuthUri, aAuthToken, aAuthTokenSecret,
                aAppKey, aAppSecret, aSignatureMethod,
                aTempCredentialsMethod = "oauth/request_token",
                aAuthorizeMethod = "oauth/authorize",
                aRequestCredentialsMethod = "oauth/access_token")
 {
   this._userInfo = {};
--- a/mail/base/modules/quickFilterManager.js
+++ b/mail/base/modules/quickFilterManager.js
@@ -4,34 +4,34 @@
 
 this.EXPORTED_SYMBOLS = ["QuickFilterState", "QuickFilterManager",
                           "MessageTextFilter", "QuickFilterSearchListener"];
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cr = Components.results;
 var Cu = Components.utils;
 
-Cu.import("resource://gre/modules/PluralForm.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/AppConstants.jsm");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
-Cu.import("resource:///modules/iteratorUtils.jsm");
-Cu.import("resource:///modules/errUtils.js");
-Cu.import("resource:///modules/mailServices.js");
-Cu.import("resource:///modules/searchSpec.js");
+ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+ChromeUtils.import("resource:///modules/errUtils.js");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/searchSpec.js");
 
 var nsMsgSearchAttrib = Components.interfaces.nsMsgSearchAttrib;
 var nsMsgMessageFlags = Components.interfaces.nsMsgMessageFlags;
 var nsMsgSearchOp = Components.interfaces.nsMsgSearchOp;
 
 // XXX we need to know whether the gloda indexer is enabled for upsell reasons,
 // but this should really just be exposed on the main Gloda public interface.
-Cu.import("resource:///modules/gloda/indexer.js");
+ChromeUtils.import("resource:///modules/gloda/indexer.js");
 // we need to be able to create gloda message searcher instances for upsells:
-Cu.import("resource:///modules/gloda/msg_search.js");
+ChromeUtils.import("resource:///modules/gloda/msg_search.js");
 
 
 /**
  * Shallow object copy.
  */
 function shallowObjCopy(obj) {
   let newObj = {};
   for (let key in obj) {
--- a/mail/base/modules/searchSpec.js
+++ b/mail/base/modules/searchSpec.js
@@ -4,19 +4,19 @@
 
 this.EXPORTED_SYMBOLS = ['SearchSpec'];
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cr = Components.results;
 var Cu = Components.utils;
 
-Cu.import("resource:///modules/iteratorUtils.jsm");
-Cu.import("resource:///modules/mailServices.js");
-Cu.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var nsMsgSearchScope = Ci.nsMsgSearchScope;
 var nsIMsgSearchTerm = Ci.nsIMsgSearchTerm;
 var nsIMsgLocalMailFolder = Ci.nsIMsgLocalMailFolder;
 var nsMsgFolderFlags = Ci.nsMsgFolderFlags;
 var nsMsgSearchAttrib = Ci.nsMsgSearchAttrib;
 
 var NS_MSG_SEARCH_INTERRUPTED = 0x00550002;
--- a/mail/base/modules/sessionStoreManager.js
+++ b/mail/base/modules/sessionStoreManager.js
@@ -9,18 +9,18 @@
 /* :::::::: Constants and Helpers ::::::::::::::: */
 
 this.EXPORTED_SYMBOLS = ["sessionStoreManager"];
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cu = Components.utils;
 
-Cu.import("resource://gre/modules/JSONFile.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/JSONFile.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * asuth arbitrarily chose this value to trade-off powersaving,
  * processor usage, and recency of state in the face of the impossibility of
  * our crashing; he also worded this.
  */
 var SESSION_AUTO_SAVE_DEFAULT_MS = 300000; // 5 minutes
 
--- a/mail/base/test/unit/head_mailbase.js
+++ b/mail/base/test/unit/head_mailbase.js
@@ -1,12 +1,12 @@
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://testing-common/mailnews/mailTestUtils.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://testing-common/mailnews/mailTestUtils.js");
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cr = Components.results;
 var CC = Components.Constructor;
 
 // Ensure the profile directory is set up
 do_get_profile();
--- a/mail/base/test/unit/resources/viewWrapperTestUtils.js
+++ b/mail/base/test/unit/resources/viewWrapperTestUtils.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/. */
 
-Components.utils.import("resource:///modules/dbViewWrapper.js");
-Components.utils.import("resource:///modules/mailViewManager.js");
-Components.utils.import("resource:///modules/virtualFolderWrapper.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/dbViewWrapper.js");
+ChromeUtils.import("resource:///modules/mailViewManager.js");
+ChromeUtils.import("resource:///modules/virtualFolderWrapper.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gInbox;
 
 /**
  * Do initialization for xpcshell-tests; not used by
  *  test-folder-display-helpers.js, our friendly mozmill test helper.
  */
 function initViewWrapperTestUtils(aInjectionConfig) {
--- a/mail/base/test/unit/test_alertHook.js
+++ b/mail/base/test/unit/test_alertHook.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/. */
 
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource:///modules/activity/alertHook.js");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://testing-common/mailnews/MockFactory.js");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource:///modules/activity/alertHook.js");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://testing-common/mailnews/MockFactory.js");
 alertHook.init();
 
 // Replace the alerts service with our own. This will let us check if we're
 // prompting or not.
 var gAlertShown = false;
 
 var mockAlertsService = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAlertsService]),
--- a/mail/base/test/unit/test_attachmentChecker.js
+++ b/mail/base/test/unit/test_attachmentChecker.js
@@ -9,17 +9,17 @@
  * Currently tested:
  * - GetAttachmentKeywords function.
  */
 
 // make xpcshell-tests TEST_PATH=mail/base/test/unit/test_attachmentChecker.js
 
 // Globals
 
-Components.utils.import("resource:///modules/attachmentChecker.js");
+ChromeUtils.import("resource:///modules/attachmentChecker.js");
 
 /*
  * UTILITIES
  */
 
 function assert(aBeTrue, aWhy)
 {
   if (!aBeTrue)
--- a/mail/base/test/unit/test_mailGlue_distribution.js
+++ b/mail/base/test/unit/test_mailGlue_distribution.js
@@ -1,10 +1,10 @@
-Components.utils.import("resource:///modules/distribution.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/distribution.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function run_test()
 {
   do_test_pending();
 
   Services.locale.setRequestedLocales(["en-US"]);
 
   // Create an instance of nsIFile out of the current process directory
--- a/mail/base/test/unit/test_viewWrapper_realFolder.js
+++ b/mail/base/test/unit/test_viewWrapper_realFolder.js
@@ -9,17 +9,17 @@ load("../../../../mailnews/resources/asy
 
 load("../../../../mailnews/resources/messageGenerator.js");
 load("../../../../mailnews/resources/messageModifier.js");
 load("../../../../mailnews/resources/messageInjection.js");
 
 load("resources/viewWrapperTestUtils.js");
 initViewWrapperTestUtils();
 
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /* ===== Real Folder, no features ===== */
 
 /**
  * Open a pre-populated real folder, make sure all the messages show up.
  */
 function* test_real_folder_load() {
   let viewWrapper = make_view_wrapper();
--- a/mail/base/test/unit/test_viewWrapper_virtualFolderCustomTerm.js
+++ b/mail/base/test/unit/test_viewWrapper_virtualFolderCustomTerm.js
@@ -11,17 +11,17 @@ load("../../../../mailnews/resources/log
 load("../../../../mailnews/resources/asyncTestUtils.js");
 
 load("../../../../mailnews/resources/messageGenerator.js");
 load("../../../../mailnews/resources/messageModifier.js");
 load("../../../../mailnews/resources/messageInjection.js");
 
 load("resources/viewWrapperTestUtils.js");
 
-Components.utils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/mailServices.js");
 
 initViewWrapperTestUtils({mode: "imap", offline: false});
 
 /**
  * A custom search term, that just does Subject Contains
  */
 var gCustomSearchTermSubject = {
   id: "mailnews@mozilla.org#test",
--- a/mail/base/test/unit/test_windows_font_migration.js
+++ b/mail/base/test/unit/test_windows_font_migration.js
@@ -4,18 +4,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
  * Test font preference migration. This currently only makes sense on Windows --
  * however, we're able to test for all versions of Windows, regardless of which
  * version the test is run on.
  */
 
-Components.utils.import("resource:///modules/mailMigrator.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailMigrator.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * A list of font names to verify using |makeVerifier| and
  * |verifier|. |makeVerifier| expects all the prefs to be passed in, while
  * |verifier| doesn't require any.
  */
 var kNamesToVerify = ["serif", "sans", "monospace"];
 
--- a/mail/components/DownloadsStartup.js
+++ b/mail/components/DownloadsStartup.js
@@ -13,19 +13,19 @@
 "use strict";
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Globals
 
 var Ci = Components.interfaces;
 var Cu = Components.utils;
 
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "DownloadIntegration",
-                                  "resource://gre/modules/DownloadIntegration.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.defineModuleGetter(this, "DownloadIntegration",
+                               "resource://gre/modules/DownloadIntegration.jsm");
 
 /**
  * CID and Contract ID of the JavaScript implementation of nsITransfer.
  */
 var kTransferCid = Components.ID("{1b4c85df-cbdd-4bb6-b04e-613caece083c}");
 var kTransferContractId = "@mozilla.org/transfer;1";
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/mail/components/about-support/aboutSupportUnix.js
+++ b/mail/components/about-support/aboutSupportUnix.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/. */
 
 var EXPORTED_SYMBOLS = ["AboutSupportPlatform"];
 
 // JS ctypes are needed to get at the data we need
-Components.utils.import("resource://gre/modules/ctypes.jsm");
+ChromeUtils.import("resource://gre/modules/ctypes.jsm");
 var GFile = ctypes.StructType("GFile");
 var GFileInfo = ctypes.StructType("GFileInfo");
 var GError = ctypes.StructType("GError");
 var GCancellable = ctypes.StructType("GCancellable");
 
 var G_FILE_ATTRIBUTE_FILESYSTEM_TYPE = "filesystem::type";
 
 var kNetworkFilesystems = ["afs", "cifs", "nfs", "smb"];
--- a/mail/components/about-support/aboutSupportWin32.js
+++ b/mail/components/about-support/aboutSupportWin32.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/. */
 
 var EXPORTED_SYMBOLS = ["AboutSupportPlatform"];
 
 // JS ctypes are needed to get at the data we need
-Components.utils.import("resource://gre/modules/ctypes.jsm");
+ChromeUtils.import("resource://gre/modules/ctypes.jsm");
 
 var BOOL = ctypes.int32_t;
 var DRIVE_UNKNOWN = 0;
 var DRIVE_NETWORK = 4;
 
 var AboutSupportPlatform = {
   /**
    * Given an nsIFile, gets the file system type. The type is returned as a
--- a/mail/components/about-support/content/aboutSupport.js
+++ b/mail/components/about-support/content/aboutSupport.js
@@ -4,29 +4,28 @@
 
 /* This file is a copy of mozilla/toolkit/content/aboutSupport.js with
    modifications for TB. */
 
 "use strict";
 
 var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
 
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/Troubleshoot.jsm");
-Cu.import("resource://gre/modules/ResetProfile.jsm");
-Cu.import("resource://gre/modules/AppConstants.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/Troubleshoot.jsm");
+ChromeUtils.import("resource://gre/modules/ResetProfile.jsm");
+ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 // added for TB
-Cu.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/mailServices.js");
 // end of TB addition
 
-XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
-                                  "resource://gre/modules/PluralForm.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "PlacesDBUtils",
-                                  "resource://gre/modules/PlacesDBUtils.jsm");
+ChromeUtils.defineModuleGetter(this, "PluralForm",
+                               "resource://gre/modules/PluralForm.jsm");
+ChromeUtils.defineModuleGetter(this, "PlacesDBUtils",
+                               "resource://gre/modules/PlacesDBUtils.jsm");
 
 // added for TB
 /* Node classes. All of these are mutually exclusive. */
 
 // Any nodes marked with this class will be considered part of the UI only,
 // and therefore will not be copied.
 var CLASS_DATA_UIONLY = "data-uionly";
 
--- a/mail/components/about-support/content/accounts.js
+++ b/mail/components/about-support/content/accounts.js
@@ -1,27 +1,27 @@
 /* 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 { interfaces: Ci, utils: Cu } = Components;
 
-Cu.import("resource:///modules/mailServices.js");
-Cu.import("resource:///modules/iteratorUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // Platform-specific includes
 if ("@mozilla.org/windows-registry-key;1" in Cc)
-  Cu.import("resource:///modules/aboutSupportWin32.js");
+  ChromeUtils.import("resource:///modules/aboutSupportWin32.js");
 else if ("nsILocalFileMac" in Ci)
-  Cu.import("resource:///modules/aboutSupportMac.js");
+  ChromeUtils.import("resource:///modules/aboutSupportMac.js");
 else
-  Cu.import("resource:///modules/aboutSupportUnix.js");
+  ChromeUtils.import("resource:///modules/aboutSupportUnix.js");
 
 var gMessengerBundle = Services.strings.createBundle(
   "chrome://messenger/locale/messenger.properties");
 
 var gSocketTypes = {};
 for (let [str, index] of Object.entries(Ci.nsMsgSocketType))
   gSocketTypes[index] = str;
 
--- a/mail/components/about-support/content/export.js
+++ b/mail/components/about-support/content/export.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/. */
 
 "use strict";
 
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
+ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 /**
  * Create warning text to add to any private data.
  * @returns A HTML paragraph node containing the warning.
  */
 function createWarning() {
   let bundle = Services.strings.createBundle(
     "chrome://messenger/locale/aboutSupportMail.properties");
--- a/mail/components/aboutRedirector.js
+++ b/mail/components/aboutRedirector.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/. */
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function AboutRedirector() {}
 AboutRedirector.prototype = {
   classDescription: "Mail about: Redirector",
   classID: Components.ID("{8cc51368-6aa0-43e8-b762-bde9b9fd828c}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
 
   // Each entry in the map has the key as the part after the "about:" and the
--- a/mail/components/accountcreation/content/createInBackend.js
+++ b/mail/components/accountcreation/content/createInBackend.js
@@ -7,18 +7,18 @@
  * Takes an |AccountConfig| JS object and creates that account in the
  * Thunderbird backend (which also writes it to prefs).
  *
  * @param config {AccountConfig} The account to create
  *
  * @return - the account created.
  */
 
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function createAccountInBackend(config)
 {
   // incoming server
   let inServer = MailServices.accounts.createIncomingServer(
       config.incoming.username,
       config.incoming.hostname,
       sanitize.enum(config.incoming.type, ["pop3", "imap", "nntp"]));
--- a/mail/components/accountcreation/content/emailWizard.js
+++ b/mail/components/accountcreation/content/emailWizard.js
@@ -1,17 +1,17 @@
 /* -*- 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/. */
 
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/hostnameUtils.jsm");
-Components.utils.import("resource:///modules/OAuth2Providers.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/hostnameUtils.jsm");
+ChromeUtils.import("resource:///modules/OAuth2Providers.jsm");
 
 /**
  * This is the dialog opened by menu File | New account | Mail... .
  *
  * It gets the user's realname, email address and password,
  * and tries to automatically configure the account from that,
  * using various mechanisms. If all fails, the user can enter/edit
  * the config, then we create the account.
@@ -31,17 +31,17 @@ Components.utils.import("resource:///mod
  * - If user clicks OK, create the account
  */
 
 
 // from http://xyfer.blogspot.com/2005/01/javascript-regexp-email-validator.html
 var emailRE = /^[-_a-z0-9\'+*$^&%=~!?{}]+(?:\.[-_a-z0-9\'+*$^&%=~!?{}]+)*@(?:[-a-z0-9.]+\.[a-z]{2,20}|\d{1,3}(?:\.\d{1,3}){3})(?::\d+)?$/i;
 
 if (typeof gEmailWizardLogger == "undefined") {
-  Cu.import("resource:///modules/gloda/log4moz.js");
+  ChromeUtils.import("resource:///modules/gloda/log4moz.js");
   var gEmailWizardLogger = Log4Moz.getConfiguredLogger("mail.wizard");
 }
 
 var gStringsBundle;
 var gMessengerBundle;
 var gBrandShortName;
 
 /*********************
--- a/mail/components/accountcreation/content/fetchConfig.js
+++ b/mail/components/accountcreation/content/fetchConfig.js
@@ -4,19 +4,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Tries to find a configuration for this ISP on the local harddisk, in the
  * application install directory's "isp" subdirectory.
  * Params @see fetchConfigFromISP()
  */
 
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/JXON.js");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/JXON.js");
 
 
 function fetchConfigFromDisk(domain, successCallback, errorCallback)
 {
   return new TimeoutAbortable(runAsync(function()
   {
     try {
       // <TB installdir>/isp/example.com.xml
--- a/mail/components/accountcreation/content/fetchhttp.js
+++ b/mail/components/accountcreation/content/fetchhttp.js
@@ -10,17 +10,17 @@
  *
  * It does not provide download progress, but assumes that the
  * fetched resource is so small (<1 10 KB) that the roundtrip and
  * response generation is far more significant than the
  * download time of the response. In other words, it's fine for RPC,
  * but not for bigger file downloads.
  */
 
-Components.utils.import("resource:///modules/JXON.js");
+ChromeUtils.import("resource:///modules/JXON.js");
 
 /**
  * Set up a fetch.
  *
  * @param url {String}   URL of the server function.
  *    ATTENTION: The caller needs to make sure that the URL is secure to call.
  * @param urlArgs {Object, associative array} Parameters to add
  *   to the end of the URL as query string. E.g.
--- a/mail/components/accountcreation/content/guessConfig.js
+++ b/mail/components/accountcreation/content/guessConfig.js
@@ -1,15 +1,15 @@
 /* -*- 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/. */
 
-Cu.import("resource:///modules/gloda/log4moz.js");
-Cu.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var TIMEOUT = 10; // in seconds
 
 // This is a bit ugly - we set outgoingDone to false
 // when emailWizard.js cancels the outgoing probe because the user picked
 // an outoing server. It does this by poking the probeAbortable object,
 // so we need outgoingDone to have global scope.
 var outgoingDone = false;
--- a/mail/components/accountcreation/content/readFromXML.js
+++ b/mail/components/accountcreation/content/readFromXML.js
@@ -12,17 +12,17 @@
  * e.g. it can't tell whether the host name is a good server.
  *
  * The XML format is documented at
  * <https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat>
  *
  * @param clientConfigXML {JXON}  The <clientConfig> node.
  * @return AccountConfig   object filled with the data from XML
  */
-Components.utils.import("resource:///modules/hostnameUtils.jsm");
+ChromeUtils.import("resource:///modules/hostnameUtils.jsm");
 
 function readFromXML(clientConfigXML)
 {
   function array_or_undef(value) {
     return value === undefined ? [] : value;
   }
   var exception;
   if (typeof(clientConfigXML) != "object" ||
--- a/mail/components/accountcreation/content/sanitizeDatatypes.js
+++ b/mail/components/accountcreation/content/sanitizeDatatypes.js
@@ -11,17 +11,17 @@
  * input variables (strings, if nothing else is noted) are of the expected
  * type and syntax.
  *
  * The functions take a string (unless noted otherwise) and return
  * the expected datatype in JS types. If the value is not as expected,
  * they throw exceptions.
  */
 
-Components.utils.import("resource:///modules/hostnameUtils.jsm");
+ChromeUtils.import("resource:///modules/hostnameUtils.jsm");
 
 var sanitize =
 {
   integer : function(unchecked)
   {
     if (typeof(unchecked) == "number" && !isNaN(unchecked))
       return unchecked;
 
--- a/mail/components/accountcreation/content/util.js
+++ b/mail/components/accountcreation/content/util.js
@@ -9,18 +9,18 @@
 try {
   var Cc = Components.classes;
   var Ci = Components.interfaces;
 } catch (e) { ddump(e); } // if already declared, as in xpcshell-tests
 try {
   var Cu = Components.utils;
 } catch (e) { ddump(e); }
 
-Cu.import("resource:///modules/errUtils.js");
-Cu.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/errUtils.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function assert(test, errorMsg)
 {
   if (!test)
     throw new NotReached(errorMsg ? errorMsg :
           "Programming bug. Assertion failed, see log.");
 }
 
@@ -246,17 +246,17 @@ function deepCopy(org)
   if (typeof(org.length) != "undefined")
     var result = new Array();
   for (var prop in org)
     result[prop] = deepCopy(org[prop]);
   return result;
 }
 
 if (typeof gEmailWizardLogger == "undefined") {
-  Cu.import("resource:///modules/gloda/log4moz.js");
+  ChromeUtils.import("resource:///modules/gloda/log4moz.js");
   var gEmailWizardLogger = Log4Moz.getConfiguredLogger("mail.wizard");
 }
 function ddump(text)
 {
   gEmailWizardLogger.info(text);
 }
 
 function debugObject(obj, name, maxDepth, curDepth)
--- a/mail/components/accountcreation/content/verifyConfig.js
+++ b/mail/components/accountcreation/content/verifyConfig.js
@@ -24,21 +24,21 @@
  *   For accountConfig, see below.
  * @param errorCallback function(ex)
  *   Called when we could guess not the config, either
  *   because we have not found anything or
  *   because there was an error (e.g. no network connection).
  *   The ex.message will contain a user-presentable message.
  */
 
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource:///modules/OAuth2Providers.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/OAuth2Providers.jsm");
 
 if (typeof gEmailWizardLogger == "undefined") {
-  Cu.import("resource:///modules/gloda/log4moz.js");
+  ChromeUtils.import("resource:///modules/gloda/log4moz.js");
   var gEmailWizardLogger = Log4Moz.getConfiguredLogger("mail.wizard");
 }
 
 function verifyConfig(config, alter, msgWindow, successCallback, errorCallback)
 {
   ddump(debugObject(config, "config", 3));
   assert(config instanceof AccountConfig,
          "BUG: Arg 'config' needs to be an AccountConfig object");
--- a/mail/components/activity/content/activity.js
+++ b/mail/components/activity/content/activity.js
@@ -1,19 +1,19 @@
 /* -*- 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/. */
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Globals
 
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource:///modules/gloda/log4moz.js");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
 var nsActProcess = Components.Constructor("@mozilla.org/activity-process;1",
                                             "nsIActivityProcess", "init");
 var nsActEvent = Components.Constructor("@mozilla.org/activity-event;1",
                                           "nsIActivityEvent", "init");
 var nsActWarning = Components.Constructor("@mozilla.org/activity-warning;1",
                                             "nsIActivityWarning", "init");
 var ACTIVITY_LIMIT = 250;
--- a/mail/components/activity/content/activity.xml
+++ b/mail/components/activity/content/activity.xml
@@ -107,19 +107,19 @@
 
   <binding id="activity-base" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
     <resources>
       <stylesheet src="chrome://messenger/skin/activity/activity.css"/>
     </resources>
     <implementation implements="nsIActivityListener">
       <constructor>
        <![CDATA[
-        Components.utils.import("resource:///modules/templateUtils.js", this);
+        ChromeUtils.import("resource:///modules/templateUtils.js", this);
         try {
-          Components.utils.import("resource:///modules/gloda/log4moz.js");
+          ChromeUtils.import("resource:///modules/gloda/log4moz.js");
           let activityManager = Components.classes["@mozilla.org/activity-manager;1"]
                                           .getService(Components.interfaces.nsIActivityManager);
 
           // fetch the activity and set the base attributes
           let actID = this.getAttribute('actID');
           this._activity = activityManager.getActivity(actID);
           this._activity.addListener(this);
           this.setAttribute('iconclass', this._activity.iconClass);
--- a/mail/components/activity/modules/activityModules.js
+++ b/mail/components/activity/modules/activityModules.js
@@ -3,20 +3,20 @@
  * 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 designed to be a central place to initialise activity related
 // modules.
 
 this.EXPORTED_SYMBOLS = [];
 
-Components.utils.import("resource:///modules/activity/sendLater.js");
+ChromeUtils.import("resource:///modules/activity/sendLater.js");
 sendLaterModule.init();
-Components.utils.import("resource:///modules/activity/moveCopy.js");
+ChromeUtils.import("resource:///modules/activity/moveCopy.js");
 moveCopyModule.init();
-Components.utils.import("resource:///modules/activity/glodaIndexer.js");
+ChromeUtils.import("resource:///modules/activity/glodaIndexer.js");
 glodaIndexerActivity.init();
-Components.utils.import("resource:///modules/activity/autosync.js");
+ChromeUtils.import("resource:///modules/activity/autosync.js");
 autosyncModule.init();
-Components.utils.import("resource:///modules/activity/alertHook.js");
+ChromeUtils.import("resource:///modules/activity/alertHook.js");
 alertHook.init();
-Components.utils.import("resource:///modules/activity/pop3Download.js");
+ChromeUtils.import("resource:///modules/activity/pop3Download.js");
 pop3DownloadModule.init();
--- a/mail/components/activity/modules/alertHook.js
+++ b/mail/components/activity/modules/alertHook.js
@@ -7,19 +7,19 @@ this.EXPORTED_SYMBOLS = ['alertHook'];
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cr = Components.results;
 
 var nsActWarning = Components.Constructor("@mozilla.org/activity-warning;1",
                                             "nsIActivityWarning", "init");
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 // This module provides a link between the send later service and the activity
 // manager.
 var alertHook =
 {
   get activityMgr() {
     delete this.activityMgr;
     return this.activityMgr = Cc["@mozilla.org/activity-manager;1"]
--- a/mail/components/activity/modules/autosync.js
+++ b/mail/components/activity/modules/autosync.js
@@ -11,20 +11,20 @@ var Cr = Components.results;
 
 var nsActProcess = Components.Constructor("@mozilla.org/activity-process;1",
                                             "nsIActivityProcess", "init");
 var nsActEvent = Components.Constructor("@mozilla.org/activity-event;1",
                                           "nsIActivityEvent", "init");
 var nsActWarning = Components.Constructor("@mozilla.org/activity-warning;1",
                                             "nsIActivityWarning", "init");
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource:///modules/gloda/log4moz.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
 var nsIAutoSyncMgrListener = Components.interfaces.nsIAutoSyncMgrListener;
 
 /**
  * This code aims to mediate between the auto-sync code and the activity mgr.
  *
  * Not every auto-sync activity is directly  mapped to a process or event.
  * To prevent a possible event overflow, Auto-Sync monitor generates one
--- a/mail/components/activity/modules/glodaIndexer.js
+++ b/mail/components/activity/modules/glodaIndexer.js
@@ -12,22 +12,22 @@ var Cu = Components.utils;
 
 var nsActProcess = Components.Constructor("@mozilla.org/activity-process;1",
                                             "nsIActivityProcess", "init");
 var nsActEvent   = Components.Constructor("@mozilla.org/activity-event;1",
                                             "nsIActivityEvent", "init");
 var nsActWarning = Components.Constructor("@mozilla.org/activity-warning;1",
                                             "nsIActivityWarning", "init");
 
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/PluralForm.jsm");
-Cu.import("resource:///modules/gloda/log4moz.js");
-Cu.import("resource:///modules/gloda/public.js");
-Cu.import("resource:///modules/gloda/indexer.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
+ChromeUtils.import("resource:///modules/gloda/public.js");
+ChromeUtils.import("resource:///modules/gloda/indexer.js");
 
 /**
  * Gloda message indexer feedback.
  */
 var glodaIndexerActivity =
 {
   get log() {
     delete this.log;
--- a/mail/components/activity/modules/moveCopy.js
+++ b/mail/components/activity/modules/moveCopy.js
@@ -12,21 +12,21 @@ var Cr = Components.results;
 var nsActProcess = Components.Constructor("@mozilla.org/activity-process;1",
                                             "nsIActivityProcess", "init");
 var nsActEvent = Components.Constructor("@mozilla.org/activity-event;1",
                                           "nsIActivityEvent", "init");
 var nsActWarning = Components.Constructor("@mozilla.org/activity-warning;1",
                                             "nsIActivityWarning", "init");
 var nsMsgFolderFlags = Ci.nsMsgFolderFlags;
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource:///modules/gloda/log4moz.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
 // This module provides a link between the move/copy code and the activity
 // manager.
 var moveCopyModule =
 {
   lastMessage: {},
   lastFolder: {},
 
--- a/mail/components/activity/modules/pop3Download.js
+++ b/mail/components/activity/modules/pop3Download.js
@@ -11,21 +11,21 @@ var Cr = Components.results;
 
 var nsActProcess = Components.Constructor("@mozilla.org/activity-process;1",
                                             "nsIActivityProcess", "init");
 var nsActEvent = Components.Constructor("@mozilla.org/activity-event;1",
                                           "nsIActivityEvent", "init");
 var nsActWarning = Components.Constructor("@mozilla.org/activity-warning;1",
                                             "nsIActivityWarning", "init");
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource:///modules/gloda/log4moz.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
 // This module provides a link between the pop3 service code and the activity
 // manager.
 var pop3DownloadModule =
 {
   // hash table of most recent download items per folder
   _mostRecentActivityForFolder: new Map(),
   // hash table of prev download items per folder, so we can
--- a/mail/components/activity/modules/sendLater.js
+++ b/mail/components/activity/modules/sendLater.js
@@ -11,20 +11,20 @@ var Cr = Components.results;
 
 var nsActProcess = Components.Constructor("@mozilla.org/activity-process;1",
                                             "nsIActivityProcess", "init");
 var nsActEvent = Components.Constructor("@mozilla.org/activity-event;1",
                                           "nsIActivityEvent", "init");
 var nsActWarning = Components.Constructor("@mozilla.org/activity-warning;1",
                                             "nsIActivityWarning", "init");
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource:///modules/gloda/log4moz.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
 /**
  * This really, really, sucks. Due to mailnews widespread use of
  * nsIMsgStatusFeedback we're bound to the UI to get any sensible feedback of
  * mail sending operations. The current send later code can't hook into the
  * progress listener easily to get the state of messages being sent, so we'll
  * just have to do it here.
  */
--- a/mail/components/activity/nsActivity.js
+++ b/mail/components/activity/nsActivity.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/. */
 
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource:///modules/gloda/log4moz.js");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Constants
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cr = Components.results;
 
--- a/mail/components/activity/nsActivityManager.js
+++ b/mail/components/activity/nsActivityManager.js
@@ -1,15 +1,15 @@
 /* -*- 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/. */
 
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource:///modules/gloda/log4moz.js");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Constants
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cr = Components.results;
 
--- a/mail/components/activity/nsActivityManagerUI.js
+++ b/mail/components/activity/nsActivityManagerUI.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/. */
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Constants
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cr = Components.results;
 
--- a/mail/components/addrbook/content/abCardOverlay.js
+++ b/mail/components/addrbook/content/abCardOverlay.js
@@ -1,15 +1,15 @@
 /* -*- 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/. */
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
 
 var kNonVcardFields =
         ["NickNameContainer", "SecondaryEmailContainer", "ScreenNameContainer",
          "customFields", "preferDisplayName"];
 
 var kPhoneticFields =
         ["PhoneticLastName", "PhoneticLabel1", "PhoneticSpacer1",
          "PhoneticFirstName", "PhoneticLabel2", "PhoneticSpacer2"];
--- a/mail/components/addrbook/content/abCardViewOverlay.js
+++ b/mail/components/addrbook/content/abCardViewOverlay.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/. */
 
 //NOTE: gAddressBookBundle must be defined and set or this Overlay won't work
 
-Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gProfileDirURL;
 var gFileHandler = Services.io.getProtocolHandler("file")
   .QueryInterface(Components.interfaces.nsIFileProtocolHandler);
 var gPhotoDisplayHandlers = {};
 
 var zListName;
 var zPrimaryEmail;
--- a/mail/components/addrbook/content/abCommon.js
+++ b/mail/components/addrbook/content/abCommon.js
@@ -1,17 +1,17 @@
 /* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 ; js-indent-level: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource:///modules/IOUtils.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/IOUtils.js");
 
 var gDirTree;
 var abList = null;
 var gAbResultsTree = null;
 var gAbView = null;
 var gAddressBookBundle;
 // A boolean variable determining whether AB column should be shown
 // in Contacts Sidebar in compose window.
--- a/mail/components/addrbook/content/abContactsPanel.js
+++ b/mail/components/addrbook/content/abContactsPanel.js
@@ -1,15 +1,15 @@
 /* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 ; js-indent-level: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-Components.utils.import("resource:///modules/ABQueryUtils.jsm");
+ChromeUtils.import("resource:///modules/ABQueryUtils.jsm");
 
 function GetAbViewListener()
 {
   // the ab panel doesn't care if the total changes, or if the selection changes
   return null;
 }
 
 /**
--- a/mail/components/addrbook/content/abTrees.js
+++ b/mail/components/addrbook/content/abTrees.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/. */
 
 /**
  * This file contains our implementation for various addressbook trees.  It
  * depends on jsTreeView.js being loaded before this script is loaded.
  */
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource:///modules/IOUtils.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/IOUtils.js");
 
 // Tree Sort helper methods.
 var AB_ORDER = ["aab", "pab", "mork", "ldap", "mapi+other", "anyab", "cab"];
 
 function getDirectoryValue(aDir, aKey) {
   const Ci = Components.interfaces;
 
   if (aKey == "ab_type") {
--- a/mail/components/addrbook/content/addressbook.js
+++ b/mail/components/addrbook/content/addressbook.js
@@ -1,38 +1,38 @@
 /* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 ; js-indent-level: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /*
  * 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/. */
 
 // Ensure the activity modules are loaded for this window.
-Components.utils.import("resource:///modules/activity/activityModules.js");
-Components.utils.import("resource:///modules/ABQueryUtils.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/activity/activityModules.js");
+ChromeUtils.import("resource:///modules/ABQueryUtils.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var nsIAbListener = Components.interfaces.nsIAbListener;
 var kPrefMailAddrBookLastNameFirst = "mail.addr_book.lastnamefirst";
 var kPersistCollapseMapStorage = "directoryTree.json";
 
 var gSearchTimer = null;
 var gStatusText = null;
 var gQueryURIFormat = null;
 var gCardViewBox;
 var gCardViewBoxEmail1;
 var gPreviousDirTreeIndex = -1;
 
 var msgWindow = Components.classes["@mozilla.org/messenger/msgwindow;1"]
                           .createInstance(Components.interfaces.nsIMsgWindow);
 
 var chatHandler = {};
-Components.utils.import("resource:///modules/chatHandler.jsm", chatHandler);
+ChromeUtils.import("resource:///modules/chatHandler.jsm", chatHandler);
 
 // Constants that correspond to choices
 // in Address Book->View -->Show Name as
 var kDisplayName = 0;
 var kLastNameFirst = 1;
 var kFirstNameFirst = 2;
 var kLDAPDirectory = 0; // defined in nsDirPrefs.h
 var kPABDirectory  = 2; // defined in nsDirPrefs.h
--- a/mail/components/appIdleManager.js
+++ b/mail/components/appIdleManager.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/. */
 
 this.EXPORTED_SYMBOLS = ['appIdleManager'];
 
-Components.utils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 
 // This module provides a mechanism to turn window focus and blur events
 // into app idle notifications. If we get a blur notification that is not
 // followed by a focus notification in less than some small number of seconds,
 // then we send a begin app idle notification.
--- a/mail/components/cloudfile/cloudFileAccounts.js
+++ b/mail/components/cloudfile/cloudFileAccounts.js
@@ -13,19 +13,19 @@ var CATEGORY = "cloud-files";
 var PREF_ROOT = "mail.cloud_files.";
 var ACCOUNT_ROOT = PREF_ROOT + "accounts.";
 
 // The following constants are used to query and insert entries
 // into the nsILoginManager.
 var PWDMGR_HOST = "chrome://messenger/cloudfile";
 var PWDMGR_REALM = "BigFiles Auth Token";
 
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource:///modules/iteratorUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 
 var cloudFileAccounts = {
   get kTokenRealm() {
     return PWDMGR_REALM;
   },
 
   get _accountKeys() {
     let accountKeySet = {};
--- a/mail/components/cloudfile/content/Hightail/fileExceedsQuota.js
+++ b/mail/components/cloudfile/content/Hightail/fileExceedsQuota.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/. */
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cu = Components.utils;
 var Cr = Components.results;
 
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 document.addEventListener("DOMContentLoaded", function() {
   if ("wrappedJSObject" in window.arguments[0]) {
     let storage = parseInt(window.arguments[0].wrappedJSObject.storage);
     storage = (storage / 1024 / 1024 / 1024).toFixed(2);
     let currentStorage = document.getElementById('currentStorage');
     currentStorage.textContent = currentStorage.textContent.replace('#XXX', storage);
   }
--- a/mail/components/cloudfile/content/addAccountDialog.js
+++ b/mail/components/cloudfile/content/addAccountDialog.js
@@ -6,19 +6,19 @@
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cu = Components.utils;
 var Cr = Components.results;
 
 var kFormId = "provider-form";
 
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource:///modules/cloudFileAccounts.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource:///modules/cloudFileAccounts.js");
 
 function createAccountObserver() {};
 
 createAccountObserver.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIRequestObserver]),
   onStartRequest: function(aRequest, aContext) {},
   onStopRequest: function(aRequest, aContext, aStatusCode) {
     if (aStatusCode == Cr.NS_OK
--- a/mail/components/cloudfile/nsBox.js
+++ b/mail/components/cloudfile/nsBox.js
@@ -5,22 +5,22 @@
 /* This file implements the nsIMsgCloudFileProvider interface.
  *
  * This component handles the Box implementation of the
  * nsIMsgCloudFileProvider interface.
  */
 
 var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource:///modules/gloda/log4moz.js");
-Cu.import("resource:///modules/cloudFileAccounts.js");
-Cu.import("resource:///modules/OAuth2.jsm");
-Cu.import("resource://gre/modules/Http.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
+ChromeUtils.import("resource:///modules/cloudFileAccounts.js");
+ChromeUtils.import("resource:///modules/OAuth2.jsm");
+ChromeUtils.import("resource://gre/modules/Http.jsm");
 
 Cu.importGlobalProperties(["File", "XMLHttpRequest"]);
 
 var gServerUrl = "https://api.box.com/2.0/";
 var gUploadUrl = "https://upload.box.com/api/2.0/";
 
 var kAuthBaseUrl = "https://www.box.com/api/";
 var kAuthUrl = "oauth2/authorize";
--- a/mail/components/cloudfile/nsHightail.js
+++ b/mail/components/cloudfile/nsHightail.js
@@ -5,20 +5,20 @@
 /* This file implements the nsIMsgCloudFileProvider interface.
  *
  * This component handles the Hightail implementation of the
  * nsIMsgCloudFileProvider interface.
  */
 
 var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource:///modules/gloda/log4moz.js");
-Cu.import("resource:///modules/cloudFileAccounts.js");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/gloda/log4moz.js");
+ChromeUtils.import("resource:///modules/cloudFileAccounts.js");
 
 Cu.importGlobalProperties(["XMLHttpRequest"]);
 
 var gServerUrl = "https://dpi.yousendit.com"; // Production url
 // test url var gServerUrl = "https://test2-api.yousendit.com";
 
 var kApiKey = "7spvjdt7m4kycr7jyhywrdn2";
 var kAuthPath = "/dpi/v1/auth";
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -2,34 +2,34 @@
  * 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/. */
 
 /**
  * Commands for the message composition window.
  */
 
 // Ensure the activity modules are loaded for this window.
-Components.utils.import("resource:///modules/activity/activityModules.js");
-Components.utils.import("resource:///modules/attachmentChecker.js");
-Components.utils.import("resource:///modules/cloudFileAccounts.js");
-Components.utils.import("resource:///modules/mimeParser.jsm");
-Components.utils.import("resource:///modules/errUtils.js");
-Components.utils.import("resource:///modules/folderUtils.jsm");
-Components.utils.import("resource:///modules/iteratorUtils.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
-Components.utils.import("resource:///modules/MailUtils.js");
-Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm");
-Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/AppConstants.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "ShortcutUtils",
-                                  "resource://gre/modules/ShortcutUtils.jsm");
+ChromeUtils.import("resource:///modules/activity/activityModules.js");
+ChromeUtils.import("resource:///modules/attachmentChecker.js");
+ChromeUtils.import("resource:///modules/cloudFileAccounts.js");
+ChromeUtils.import("resource:///modules/mimeParser.jsm");
+ChromeUtils.import("resource:///modules/errUtils.js");
+ChromeUtils.import("resource:///modules/folderUtils.jsm");
+ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource:///modules/MailUtils.js");
+ChromeUtils.import("resource://gre/modules/InlineSpellChecker.jsm");
+ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+
+ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
+ChromeUtils.defineModuleGetter(this, "ShortcutUtils",
+                               "resource://gre/modules/ShortcutUtils.jsm");
 
 /**
  * interfaces
  */
 var nsIMsgCompDeliverMode = Components.interfaces.nsIMsgCompDeliverMode;
 var nsIMsgCompSendFormat = Components.interfaces.nsIMsgCompSendFormat;
 var nsIMsgCompConvertible = Components.interfaces.nsIMsgCompConvertible;
 var nsIMsgCompType = Components.interfaces.nsIMsgCompType;
--- a/mail/components/compose/content/addressingWidgetOverlay.js
+++ b/mail/components/compose/content/addressingWidgetOverlay.js
@@ -1,15 +1,15 @@
 /* -*- 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/. */
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/mailServices.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/mailServices.js");
 
 top.MAX_RECIPIENTS = 1; /* for the initial listitem created in the XUL */
 
 var inputElementType = "";
 var selectElementType = "";
 var selectElementIndexTable = null;
 
 var gNumberOfCols = 0;
--- a/mail/components/compose/content/bigFileObserver.js
+++ b/mail/components/compose/content/bigFileObserver.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/. */
 
-Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import("resource:///modules/cloudFileAccounts.js");
+ChromeUtils.import("resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource:///modules/cloudFileAccounts.js");
 
 var kUploadNotificationValue = "bigAttachmentUploading";
 var kPrivacyWarningNotificationValue = "bigAttachmentPrivacyWarning";
 
 var gBigFileObserver = {
   bigFiles: [],
   sessionHidden: false,
   privacyWarned: false,
--- a/mail/components/devtools/devtools-loader.js
+++ b/mail/components/devtools/devtools-loader.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/. */
 
 "use strict";
 
 const { interfaces: Ci, utils: Cu } = Components;
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
+ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ChromeUtils.defineModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
 
 function DevToolsStartup() {}
 
 DevToolsStartup.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
   classID: Components.ID("{089694e9-106a-4704-abf7-62a88545e194}"),
 
   helpInfo: "",
@@ -21,26 +21,26 @@ DevToolsStartup.prototype = {
     // We want to overwrite the -devtools flag and open the toolbox instead
     let devtoolsFlag = cmdLine.handleFlag("devtools", false);
     if (devtoolsFlag) {
         this.handleDevToolsFlag(cmdLine);
     }
   },
 
   handleDevToolsFlag: function (cmdLine) {
-    Cu.import("resource://devtools/client/framework/ToolboxProcess.jsm");
+    ChromeUtils.import("resource://devtools/client/framework/ToolboxProcess.jsm");
     BrowserToolboxProcess.init();
 
     if (cmdLine.state == Ci.nsICommandLine.STATE_REMOTE_AUTO) {
       cmdLine.preventDefault = true;
     }
   },
 
   initialize: function() {
-    var { devtools, require, DevToolsLoader } = Cu.import("resource://devtools/shared/Loader.jsm", {});
+    var { devtools, require, DevToolsLoader } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
     var { DebuggerServer } = require("devtools/server/main");
     var { gDevTools } = require("devtools/client/framework/devtools");
     var { HUDService } = require("devtools/client/webconsole/hudservice");
 
     if (DebuggerServer.chromeWindowType != "mail:3pane") {
       // Set up the server chrome window type, make sure it can't be set
       Object.defineProperty(DebuggerServer, "chromeWindowType", {
         get: () => "mail:3pane",
--- a/mail/components/downloads/content/aboutDownloads.js
+++ b/mail/components/downloads/content/aboutDownloads.js
@@ -5,21 +5,19 @@
   * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var Cu = Components.utils;
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyModuleGetter(this, "Downloads", "resource://gre/modules/Downloads.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "DownloadUtils", "resource://gre/modules/DownloadUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
+ChromeUtils.defineModuleGetter(this, "Downloads", "resource://gre/modules/Downloads.jsm");
+ChromeUtils.defineModuleGetter(this, "DownloadUtils", "resource://gre/modules/DownloadUtils.jsm");
+ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
 
 var DownloadsView = {
   init() {
     window.controllers.insertControllerAt(0, this);
     this.listElement = document.getElementById("msgDownloadsRichListBox");
 
     this.items = new Map();
 
--- a/mail/components/im/content/addbuddy.js
+++ b/mail/components/im/content/addbuddy.js
@@ -1,14 +1,14 @@
 /* This Source Code F