Bug 1520643 - Port bug 1514594: Change import call sites using kmag's script (calendar/). rs=bustage-fix,jorgk
authorGeoff Lankow <geoff@darktrojan.net>
Tue, 29 Jan 2019 11:24:57 +0100
changeset 33541 6e514874b3267dcff87456dff8620f7c51dc1f5c
parent 33540 bbad5e72b58bfd7881cfa706aa3e7da54f63ba28
child 33542 985a367b6423f28e297d4c55d0256e741e91d225
push id2390
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:12:16 +0000
treeherdercomm-beta@29b1f2c027d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage-fix, jorgk
bugs1520643, 1514594
Bug 1520643 - Port bug 1514594: Change import call sites using kmag's script (calendar/). rs=bustage-fix,jorgk
calendar/base/backend/calBackendLoader.js
calendar/base/backend/icaljs/calDateTime.js
calendar/base/backend/icaljs/calDuration.js
calendar/base/backend/icaljs/calICALJSComponents.js
calendar/base/backend/icaljs/calICSService.js
calendar/base/backend/icaljs/calPeriod.js
calendar/base/backend/icaljs/calRecurrenceRule.js
calendar/base/content/agenda-listbox.js
calendar/base/content/calendar-base-view.xml
calendar/base/content/calendar-chrome-startup.js
calendar/base/content/calendar-clipboard.js
calendar/base/content/calendar-common-sets.js
calendar/base/content/calendar-daypicker.xml
calendar/base/content/calendar-dnd-listener.js
calendar/base/content/calendar-extract.js
calendar/base/content/calendar-invitations-manager.js
calendar/base/content/calendar-item-editing.js
calendar/base/content/calendar-management.js
calendar/base/content/calendar-menus.xml
calendar/base/content/calendar-month-view.xml
calendar/base/content/calendar-multiday-view.xml
calendar/base/content/calendar-statusbar.js
calendar/base/content/calendar-task-editing.js
calendar/base/content/calendar-task-tree.js
calendar/base/content/calendar-task-tree.xml
calendar/base/content/calendar-task-view.js
calendar/base/content/calendar-ui-utils.js
calendar/base/content/calendar-unifinder.js
calendar/base/content/calendar-views.js
calendar/base/content/calendar-views.xml
calendar/base/content/dialogs/calendar-alarm-dialog.js
calendar/base/content/dialogs/calendar-conflicts-dialog.xul
calendar/base/content/dialogs/calendar-creation.js
calendar/base/content/dialogs/calendar-dialog-utils.js
calendar/base/content/dialogs/calendar-event-dialog-attendees.js
calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
calendar/base/content/dialogs/calendar-event-dialog-reminder.js
calendar/base/content/dialogs/calendar-event-dialog-timezone.js
calendar/base/content/dialogs/calendar-invitations-dialog.js
calendar/base/content/dialogs/calendar-invitations-list.xml
calendar/base/content/dialogs/calendar-migration-dialog.js
calendar/base/content/dialogs/calendar-occurrence-prompt.xul
calendar/base/content/dialogs/calendar-print-dialog.js
calendar/base/content/dialogs/calendar-properties-dialog.js
calendar/base/content/dialogs/calendar-providerUninstall-dialog.js
calendar/base/content/dialogs/calendar-subscriptions-dialog.js
calendar/base/content/dialogs/calendar-summary-dialog.js
calendar/base/content/dialogs/chooseCalendarDialog.js
calendar/base/content/import-export.js
calendar/base/content/preferences/alarms.js
calendar/base/content/preferences/categories.js
calendar/base/content/preferences/editCategory.js
calendar/base/content/preferences/general.js
calendar/base/content/preferences/views.js
calendar/base/content/today-pane.js
calendar/base/content/widgets/calendar-alarm-widget.xml
calendar/base/content/widgets/calendar-widgets.xml
calendar/base/content/widgets/minimonth.xml
calendar/base/modules/calExtract.jsm
calendar/base/modules/calHashedArray.jsm
calendar/base/modules/calRecurrenceUtils.jsm
calendar/base/modules/calUtils.jsm
calendar/base/modules/calUtilsCompat.jsm
calendar/base/modules/ical.js
calendar/base/modules/shim/calAlarmUtils.jsm
calendar/base/modules/shim/calAsyncUtils.jsm
calendar/base/modules/shim/calAuthUtils.jsm
calendar/base/modules/shim/calItemUtils.jsm
calendar/base/modules/shim/calIteratorUtils.jsm
calendar/base/modules/shim/calItipUtils.jsm
calendar/base/modules/shim/calPrintUtils.jsm
calendar/base/modules/shim/calProviderUtils.jsm
calendar/base/modules/shim/calViewUtils.jsm
calendar/base/modules/shim/calXMLUtils.jsm
calendar/base/modules/utils/calACLUtils.jsm
calendar/base/modules/utils/calAlarmUtils.jsm
calendar/base/modules/utils/calAsyncUtils.jsm
calendar/base/modules/utils/calAuthUtils.jsm
calendar/base/modules/utils/calCategoryUtils.jsm
calendar/base/modules/utils/calDataUtils.jsm
calendar/base/modules/utils/calDateTimeUtils.jsm
calendar/base/modules/utils/calEmailUtils.jsm
calendar/base/modules/utils/calItemUtils.jsm
calendar/base/modules/utils/calIteratorUtils.jsm
calendar/base/modules/utils/calItipUtils.jsm
calendar/base/modules/utils/calL10NUtils.jsm
calendar/base/modules/utils/calPrintUtils.jsm
calendar/base/modules/utils/calProviderUtils.jsm
calendar/base/modules/utils/calUnifinderUtils.jsm
calendar/base/modules/utils/calViewUtils.jsm
calendar/base/modules/utils/calWindowUtils.jsm
calendar/base/src/calAlarm.js
calendar/base/src/calAlarmMonitor.js
calendar/base/src/calAlarmService.js
calendar/base/src/calApplicationUtils.js
calendar/base/src/calAttachment.js
calendar/base/src/calAttendee.js
calendar/base/src/calCachedCalendar.js
calendar/base/src/calCalendarManager.js
calendar/base/src/calCalendarSearchService.js
calendar/base/src/calDateTimeFormatter.js
calendar/base/src/calDefaultACLManager.js
calendar/base/src/calDeletedItems.js
calendar/base/src/calEvent.js
calendar/base/src/calFilter.js
calendar/base/src/calFreeBusyService.js
calendar/base/src/calIcsParser.js
calendar/base/src/calIcsSerializer.js
calendar/base/src/calItemBase.js
calendar/base/src/calItemModule.js
calendar/base/src/calItipItem.js
calendar/base/src/calProtocolHandler.js
calendar/base/src/calRecurrenceDate.js
calendar/base/src/calRecurrenceInfo.js
calendar/base/src/calRelation.js
calendar/base/src/calSleepMonitor.js
calendar/base/src/calStartupService.js
calendar/base/src/calTimezone.js
calendar/base/src/calTimezoneService.js
calendar/base/src/calTodo.js
calendar/base/src/calTransactionManager.js
calendar/base/src/calWeekInfoService.js
calendar/import-export/calHtmlExport.js
calendar/import-export/calIcsImportExport.js
calendar/import-export/calImportExportModule.js
calendar/import-export/calListFormatter.js
calendar/import-export/calMonthGridPrinter.js
calendar/import-export/calOutlookCSVImportExport.js
calendar/import-export/calWeekPrinter.js
calendar/itip/calItipEmailTransport.js
calendar/lightning/components/calItipProtocolHandler.js
calendar/lightning/components/lightningTextCalendarConverter.js
calendar/lightning/content/imip-bar.js
calendar/lightning/content/lightning-item-iframe.js
calendar/lightning/content/lightning-item-panel.js
calendar/lightning/content/lightning-utils.js
calendar/lightning/content/messenger-overlay-sidebar.js
calendar/lightning/content/suite-overlay-sidebar.js
calendar/lightning/modules/ltnInvitationUtils.jsm
calendar/providers/caldav/calDavCalendar.js
calendar/providers/caldav/calDavRequestHandlers.js
calendar/providers/composite/calCompositeCalendar.js
calendar/providers/gdata/components/calGoogleCalendar.js
calendar/providers/gdata/content/browserRequest.js
calendar/providers/gdata/content/gdata-calendar-creation.js
calendar/providers/gdata/content/gdata-event-dialog-reminder.js
calendar/providers/gdata/content/gdata-lightning-item-iframe.js
calendar/providers/gdata/content/gdata-migration.js
calendar/providers/gdata/modules/OAuth2.jsm
calendar/providers/gdata/modules/calUtilsShim.jsm
calendar/providers/gdata/modules/gdataLogging.jsm
calendar/providers/gdata/modules/gdataRequest.jsm
calendar/providers/gdata/modules/gdataSession.jsm
calendar/providers/gdata/modules/gdataUtils.jsm
calendar/providers/ics/calICSCalendar.js
calendar/providers/memory/calMemoryCalendar.js
calendar/providers/storage/calStorageCalendar.js
calendar/providers/storage/calStorageHelpers.jsm
calendar/providers/storage/calStorageUpgrade.jsm
calendar/providers/wcap/calWcapCalendar.js
calendar/providers/wcap/calWcapCalendarItems.js
calendar/providers/wcap/calWcapCalendarModule.js
calendar/providers/wcap/calWcapRequest.js
calendar/providers/wcap/calWcapSession.js
calendar/providers/wcap/calWcapUtils.js
calendar/resources/content/calendarCreation.js
calendar/resources/content/datetimepickers/datetimepickers.xml
calendar/resources/content/mouseoverPreviews.js
calendar/resources/content/publish.js
calendar/test/mozmill/cal-recurrence/testWeeklyNRecurrence.js
calendar/test/mozmill/cal-recurrence/testWeeklyUntilRecurrence.js
calendar/test/mozmill/cal-recurrence/testWeeklyWithExceptionRecurrence.js
calendar/test/mozmill/eventDialog/testEventDialog.js
calendar/test/mozmill/eventDialog/testEventDialogModificationPrompt.js
calendar/test/mozmill/eventDialog/testEventDialogSize.js
calendar/test/mozmill/eventDialog/testUTF8.js
calendar/test/mozmill/recurrenceRotated/testWeeklyNRecurrence.js
calendar/test/mozmill/recurrenceRotated/testWeeklyUntilRecurrence.js
calendar/test/mozmill/recurrenceRotated/testWeeklyWithExceptionRecurrence.js
calendar/test/mozmill/shared-modules/test-calendar-utils.js
calendar/test/mozmill/shared-modules/test-item-editing-helpers.js
calendar/test/mozmill/testAlarmDefaultValue.js
calendar/test/mozmill/testBasicFunctionality.js
calendar/test/mozmill/testLocalICS.js
calendar/test/mozmill/testTimezones.js
calendar/test/mozmill/testTodayPane.js
calendar/test/mozmill/views/testDayView.js
calendar/test/mozmill/views/testMonthView.js
calendar/test/mozmill/views/testMultiweekView.js
calendar/test/mozmill/views/testWeekView.js
calendar/test/unit/head_consts.js
calendar/test/unit/head_icaljs.js
calendar/test/unit/head_libical.js
calendar/test/unit/test_alarmservice.js
calendar/test/unit/test_alarmutils.js
calendar/test/unit/test_attachment.js
calendar/test/unit/test_bug1199942.js
calendar/test/unit/test_bug1204255.js
calendar/test/unit/test_bug1209399.js
calendar/test/unit/test_bug523860.js
calendar/test/unit/test_calmgr.js
calendar/test/unit/test_datetimeformatter.js
calendar/test/unit/test_extract.js
calendar/test/unit/test_gdata_provider.js
calendar/test/unit/test_hashedarray.js
calendar/test/unit/test_imip.js
calendar/test/unit/test_itip_utils.js
calendar/test/unit/test_l10n_utils.js
calendar/test/unit/test_ltninvitationutils.js
calendar/test/unit/test_recurrence_utils.js
calendar/test/unit/test_webcal.js
--- a/calendar/base/backend/calBackendLoader.js
+++ b/calendar/base/backend/calBackendLoader.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 function calBackendLoader() {
     this.wrappedJSObject = this;
     try {
         this.loadBackend();
     } catch (e) {
         dump(`### Error loading backend:${e.filename || e.fileName}:${e.lineNumber}: ${e}\n`);
     }
--- a/calendar/base/backend/icaljs/calDateTime.js
+++ b/calendar/base/backend/icaljs/calDateTime.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/. */
 
-var { ICAL, unwrap, unwrapSetter } = ChromeUtils.import("resource://calendar/modules/ical.js", null);
+var { ICAL, unwrap, unwrapSetter } = ChromeUtils.import("resource://calendar/modules/ical.js");
 
 var UNIX_TIME_TO_PRTIME = 1000000;
 
 function calDateTime(innerObject) {
     this.wrappedJSObject = this;
     this.innerObject = innerObject || ICAL.Time.epochTime.clone();
 }
 
--- a/calendar/base/backend/icaljs/calDuration.js
+++ b/calendar/base/backend/icaljs/calDuration.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/. */
 
-var { ICAL, unwrap } = ChromeUtils.import("resource://calendar/modules/ical.js", null);
+var { ICAL, unwrap } = ChromeUtils.import("resource://calendar/modules/ical.js");
 
 function calDuration(innerObject) {
     this.innerObject = innerObject || new ICAL.Duration();
     this.wrappedJSObject = this;
 }
 
 calDuration.prototype = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIDuration]),
--- a/calendar/base/backend/icaljs/calICALJSComponents.js
+++ b/calendar/base/backend/icaljs/calICALJSComponents.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 this.NSGetFactory = (cid) => {
     let scriptLoadOrder = [
         "resource://calendar/calendar-js/calTimezone.js",
         "resource://calendar/calendar-js/calDateTime.js",
         "resource://calendar/calendar-js/calDuration.js",
         "resource://calendar/calendar-js/calICSService.js",
         "resource://calendar/calendar-js/calPeriod.js",
--- a/calendar/base/backend/icaljs/calICSService.js
+++ b/calendar/base/backend/icaljs/calICSService.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/. */
 
-var { ICAL, unwrapSetter, unwrapSingle, wrapGetter } = ChromeUtils.import("resource://calendar/modules/ical.js", null);
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { ICAL, unwrapSetter, unwrapSingle, wrapGetter } = ChromeUtils.import("resource://calendar/modules/ical.js");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function calIcalProperty(innerObject) {
     this.innerObject = innerObject || new ICAL.Property();
     this.wrappedJSObject = this;
 }
 
 calIcalProperty.prototype = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIIcalProperty]),
--- a/calendar/base/backend/icaljs/calPeriod.js
+++ b/calendar/base/backend/icaljs/calPeriod.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/. */
 
-var { ICAL, unwrapSetter, wrapGetter } = ChromeUtils.import("resource://calendar/modules/ical.js", null);
+var { ICAL, unwrapSetter, wrapGetter } = ChromeUtils.import("resource://calendar/modules/ical.js");
 
 function calPeriod(innerObject) {
     this.innerObject = innerObject || new ICAL.Period({});
     this.wrappedJSObject = this;
 }
 
 calPeriod.prototype = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIPeriod]),
--- a/calendar/base/backend/icaljs/calRecurrenceRule.js
+++ b/calendar/base/backend/icaljs/calRecurrenceRule.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/. */
 
-var { ICAL, unwrapSetter, unwrapSingle, wrapGetter } = ChromeUtils.import("resource://calendar/modules/ical.js", null);
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { ICAL, unwrapSetter, unwrapSingle, wrapGetter } = ChromeUtils.import("resource://calendar/modules/ical.js");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function calRecurrenceRule(innerObject) {
     this.innerObject = innerObject || new ICAL.Recur();
     this.wrappedJSObject = this;
 }
 
 var calRecurrenceRuleInterfaces = [
     Ci.calIRecurrenceRule,
--- a/calendar/base/content/agenda-listbox.js
+++ b/calendar/base/content/agenda-listbox.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/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function Synthetic(aHeader, aDuration, aMultiday) {
     this.open = aHeader.getAttribute("checked") == "true";
     this.duration = aDuration;
     this.multiday = aMultiday;
 }
 
 var agendaListbox = {
--- a/calendar/base/content/calendar-base-view.xml
+++ b/calendar/base/content/calendar-base-view.xml
@@ -214,19 +214,19 @@
 
               onDefaultCalendarChanged: function(aNewDefaultCalendar) {
                   // don't care, for now
               }
           })
       ]]></field>
 
       <constructor><![CDATA[
-          ChromeUtils.import("resource://gre/modules/Services.jsm");
-          ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-          const { Log4Moz } = ChromeUtils.import("resource:///modules/gloda/log4moz.js", null);
+          const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+          const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+          const { Log4Moz } = ChromeUtils.import("resource:///modules/gloda/log4moz.js");
 
           const kWorkdaysCommand = "calendar_toggle_workdays_only_command";
           const kTasksInViewCommand = "calendar_toggle_tasks_in_view_command";
           const kShowCompleted = "calendar_toggle_show_completed_in_view_command";
           const kOrientation = "calendar_toggle_orientation_command";
 
           this.workdaysOnly = (document.getElementById(kWorkdaysCommand)
                                   .getAttribute("checked") == "true");
@@ -252,17 +252,17 @@
           this.weekStartOffset = Preferences.get("calendar.week.start", 0);
           this.updateDaysOffPrefs();
           this.mPendingRefreshJobs = new Map();
           this.mLog = Log4Moz.getConfiguredLogger("calBaseView");
           this.mFlashingEvents = {};
       ]]></constructor>
 
       <destructor><![CDATA[
-          ChromeUtils.import("resource://gre/modules/Services.jsm");
+          const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
           if (this.mCalendar) {
               this.mCalendar.removeObserver(this.mObserver);
           }
           let alarmService = Cc["@mozilla.org/calendar/alarm-service;1"]
                                .getService(Ci.calIAlarmService);
           alarmService.removeObserver(this.mObserver);
           this.viewBroadcaster.removeEventListener(this.getAttribute("type") + "viewresized", this.mResizeHandler, true);
--- a/calendar/base/content/calendar-chrome-startup.js
+++ b/calendar/base/content/calendar-chrome-startup.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 { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+var { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { AppConstants } = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 /* exported commonInitCalendar, commonFinishCalendar */
 
 /**
  * Common initialization steps for calendar chrome windows.
  */
 async function commonInitCalendar() {
     // load locale specific default values for preferences
--- a/calendar/base/content/calendar-clipboard.js
+++ b/calendar/base/content/calendar-clipboard.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /* exported cutToClipboard, pasteFromClipboard */
 
 /**
  * Test if a writable calendar is selected, and if the clipboard has items that
  * can be pasted into Calendar. The data must be of type "text/calendar" or
  * "text/unicode".
  *
--- a/calendar/base/content/calendar-common-sets.js
+++ b/calendar/base/content/calendar-common-sets.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /* exported injectCalendarCommandController, removeCalendarCommandController,
  *          setupContextItemType, minimonthPick, getSelectedItems,
  *          deleteSelectedItems, calendarUpdateNewItemsCommand
  */
 
 var CalendarDeleteCommandEnabled = false;
 var CalendarNewEventsCommandEnabled = false;
--- a/calendar/base/content/calendar-daypicker.xml
+++ b/calendar/base/content/calendar-daypicker.xml
@@ -103,18 +103,18 @@
                     days.push(index + 1);
                 }
             }
             return days;
         ]]></getter>
       </property>
 
       <constructor><![CDATA[
-          ChromeUtils.import("resource://gre/modules/Services.jsm");
-          ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+          const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+          const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
           this.weekStartOffset = Preferences.get("calendar.week.start", 0);
 
           let props =
               Services.strings.createBundle(
                   "chrome://calendar/locale/dateFormat.properties");
           let mainbox =
               document.getAnonymousElementByAttribute(
@@ -228,17 +228,17 @@
                     }
                 }
             }
             return days;
         ]]></getter>
       </property>
 
       <constructor><![CDATA[
-          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
           let mainbox =
               document.getAnonymousElementByAttribute(
                   this, "anonid", "mainbox");
           let numRows = mainbox.childNodes.length;
           let child = null;
           for (let i = 0; i < numRows; i++) {
               let row = mainbox.childNodes[i];
               let numChilds = row.childNodes.length;
--- a/calendar/base/content/calendar-dnd-listener.js
+++ b/calendar/base/content/calendar-dnd-listener.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 { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { AppConstants } = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 /* exported invokeEventDragSession, calendarViewDNDObserver,
  *          calendarMailButtonDNDObserver, calendarCalendarButtonDNDObserver,
  *          calendarTaskButtonDNDObserver
  */
 
 var itemConversion = {
 
--- a/calendar/base/content/calendar-extract.js
+++ b/calendar/base/content/calendar-extract.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/. */
 
-const { Extractor } = ChromeUtils.import("resource://calendar/modules/calExtract.jsm", null);
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Extractor } = ChromeUtils.import("resource://calendar/modules/calExtract.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var calendarExtract = {
     onShowLocaleMenu: function(target) {
         let localeList = document.getElementById(target.id);
         let langs = [];
         let chrome = Cc["@mozilla.org/chrome/chrome-registry;1"]
                        .getService(Ci.nsIXULChromeRegistry)
                        .QueryInterface(Ci.nsIToolkitChromeRegistry);
--- a/calendar/base/content/calendar-invitations-manager.js
+++ b/calendar/base/content/calendar-invitations-manager.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 /* exported getInvitationsManager */
 
 /**
  * This object contains functions to take care of manipulating requests.
  */
 var gInvitationsRequestManager = {
     mRequestStatusList: {},
--- a/calendar/base/content/calendar-item-editing.js
+++ b/calendar/base/content/calendar-item-editing.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 /* exported modifyEventWithDialog, undo, redo, setContextPartstat */
 
 /**
  * Takes a job and makes sure the dispose function on it is called. If there is
  * no dispose function or the job is null, ignore it.
  *
  * @param job       The job to dispose.
--- a/calendar/base/content/calendar-management.js
+++ b/calendar/base/content/calendar-management.js
@@ -4,19 +4,19 @@
 
 /* exported promptDeleteCalendar, loadCalendarManager, unloadCalendarManager,
  *         updateSortOrderPref, calendarListTooltipShowing,
  *         calendarListSetupContextMenu, ensureCalendarVisible, toggleCalendarVisible,
  *         showAllCalendars, showOnlyCalendar, openCalendarSubscriptionsDialog,
  *         calendarOfflineManager
  */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 /**
  * Get this window's currently selected calendar.
  *
  * @return      The currently selected calendar.
  */
 function getSelectedCalendar() {
     return cal.view.getCompositeCalendar(window).defaultCalendar;
--- a/calendar/base/content/calendar-menus.xml
+++ b/calendar/base/content/calendar-menus.xml
@@ -12,17 +12,17 @@
 
   <binding id="task-menupopup" extends="xul:menupopup">
     <implementation>
       <field name="mType">null</field>;
       <field name="mPopupHandler">null</field>
       <field name="mParentMenuPopup">null</field>
 
       <constructor><![CDATA[
-          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
           this.mPopupHandler = () => { this.changeMenuByPropertyName(); };
           this.mParentMenuPopup = cal.view.getParentNodeOrThis(this, "menupopup");
           this.mParentMenuPopup.addEventListener("popupshowing", this.mPopupHandler, true);
       ]]></constructor>
 
       <destructor><![CDATA[
           this.mParentMenuPopup.removeEventListener("popupshowing", this.mPopupHandler, true);
--- a/calendar/base/content/calendar-month-view.xml
+++ b/calendar/base/content/calendar-month-view.xml
@@ -411,17 +411,17 @@
             </xul:row>
           </xul:rows>
         </xul:grid>
       </xul:vbox>
     </content>
 
     <implementation implements="calICalendarView">
       <constructor><![CDATA[
-          ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+          const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
           // Set the preference for the default start of the week
           this.weekStartOffset = Preferences.get("calendar.week.start", 0);
 
           for (let i = 0; i < 7; i++) {
               let hdr = createXULElement("calendar-day-label");
               this.labeldaybox.appendChild(hdr);
               hdr.weekDay = (i + this.mWeekStartOffset) % 7;
--- a/calendar/base/content/calendar-multiday-view.xml
+++ b/calendar/base/content/calendar-multiday-view.xml
@@ -88,17 +88,17 @@
       </method>
 
       <property name="pixelsPerMinute"
                 onget="return this.mPixPerMin"
                 onset="if (this.mPixPerMin != val) { this.mPixPerMin = val; this.relayout(); } return val;"/>
 
       <method name="relayout">
         <body><![CDATA[
-            const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+            const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
             let topbox = document.getAnonymousElementByAttribute(this, "anonid", "topbox");
             let orient = topbox.getAttribute("orient");
 
             function makeTimeBox(timestr, size) {
                 let box = createXULElement("box");
                 box.setAttribute("orient", orient);
 
                 if (orient == "horizontal") {
@@ -240,17 +240,17 @@
           <xul:label anonid="fgdragbox-endlabel" class="fgdragbox-label"/>
         </xul:box>
       </xul:stack>
       <xul:calendar-event-box anonid="config-box" hidden="true" xbl:inherits="orient"/>
     </content>
 
     <implementation>
       <constructor><![CDATA[
-          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
           this.mEventInfos = [];
           this.mTimezone = cal.dtz.UTC;
           this.mSelectedItemIds = {};
       ]]></constructor>
 
       <!-- fields -->
       <field name="mPixPerMin">0.6</field>
@@ -1938,17 +1938,17 @@
             // So we really don't have anything to do here.
         ]]></body>
       </method>
 
       <method name="updateDragLabels">
         <parameter name="aFirstColumn"/>
         <parameter name="aLastColumn"/>
         <body><![CDATA[
-            const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+            const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
             if (!this.mDragState) {
                 return;
             }
 
             let firstColumn = aFirstColumn || this;
             let lastColumn = aLastColumn || this;
             let realstartmin = this.mDragState.startMin + this.mStartMin;
             let realendmin = this.mDragState.endMin + this.mStartMin;
@@ -2505,17 +2505,17 @@
           <xul:box anonid="daybox" class="multiday-view-day-box" flex="1"
                    equalsize="always"/>
         </xul:scrollbox>
       </xul:box>
     </content>
 
     <implementation implements="calICalendarView">
       <constructor><![CDATA[
-          ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+          const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
           // get day start/end hour from prefs and set on the view
           this.setDayStartEndMinutes(Preferences.get("calendar.view.daystarthour", 8) * 60,
                                      Preferences.get("calendar.view.dayendhour", 17) * 60);
 
           // initially scroll to the day start hour in the view
           this.scrollToMinute(this.mDayStartMin);
 
--- a/calendar/base/content/calendar-statusbar.js
+++ b/calendar/base/content/calendar-statusbar.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /* exported gCalendarStatusFeedback */
 
 /**
  * This code might change soon if we support Thunderbird's activity manager.
  * NOTE: The naming "Meteors" is historical.
  */
 var gCalendarStatusFeedback = {
--- a/calendar/base/content/calendar-task-editing.js
+++ b/calendar/base/content/calendar-task-editing.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * Used by the "quick add" feature for tasks, for example in the task view or
  * the uniinder-todo.
  *
  * NOTE: many of the following methods are called without taskEdit being the
  * |this| object.
  */
--- a/calendar/base/content/calendar-task-tree.js
+++ b/calendar/base/content/calendar-task-tree.js
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* exported addCalendarNames, calendars, changeContextMenuForTask,
  *          contextChangeTaskCalendar, contextChangeTaskPriority,
  *          contextPostponeTask, modifyTaskFromContext, deleteToDoCommand,
  *          tasksToMail, tasksToEvents, toggleCompleted,
  */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * Add registered calendars to the given menupopup. Removes all previous
  * children.
  *
  * XXX Either replace the existing items using replaceNode, or use helper
  * functions (cal.removeChildren).
  *
--- a/calendar/base/content/calendar-task-tree.xml
+++ b/calendar/base/content/calendar-task-tree.xml
@@ -106,18 +106,18 @@
         </xul:treecols>
         <xul:treechildren tooltip="taskTreeTooltip" ondblclick="mTreeView.onDoubleClick(event)"/>
       </xul:tree>
     </content>
 
     <implementation implements="nsIObserver">
       <constructor><![CDATA[
           ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-          ChromeUtils.import("resource://gre/modules/Services.jsm");
-          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+          const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
           // set up the tree filter
           this.mFilter = new calFilter();
 
           // set up the custom tree view
           let tree = document.getAnonymousElementByAttribute(this, "anonid", "calendar-task-tree");
           this.mTreeView.tree = tree;
           tree.view = this.mTreeView;
@@ -162,17 +162,17 @@
                       this.mTreeView.selectedColumn = treecols[i];
                   }
               }
           }
 
           this.dispatchEvent(new CustomEvent("bindingattached", { bubbles: false }));
       ]]></constructor>
       <destructor><![CDATA[
-          ChromeUtils.import("resource://gre/modules/Services.jsm");
+          const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
           // remove composite calendar observer
           let composite = cal.view.getCompositeCalendar(window);
           composite.removeObserver(this.mTaskTreeObserver);
 
           // remove the preference observer
           let branch = Services.prefs.getBranch("");
           branch.removeObserver("calendar.", this);
--- a/calendar/base/content/calendar-task-view.js
+++ b/calendar/base/content/calendar-task-view.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/. */
 
 /* exported taskDetailsView, sendMailToOrganizer, taskViewCopyLink */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-const { recurrenceRule2String } = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { recurrenceRule2String } = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { AppConstants } = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 var taskDetailsView = {
 
     /**
      * Task Details Events
      *
      * XXXberend Please document this function, possibly also consolidate since
      * its the only function in taskDetailsView.
--- a/calendar/base/content/calendar-ui-utils.js
+++ b/calendar/base/content/calendar-ui-utils.js
@@ -7,18 +7,18 @@
  *          enableElementWithLock, uncheckChildNodes, removeChildren,
  *          appendCalendarItems, setAttributeToChildren, checkRadioControl,
  *          processEnableCheckbox, updateListboxDeleteButton,
  *          updateUnitLabelPlural, updateMenuLabelsPlural, menuListSelectItem,
  *          getOptimalMinimumWidth, getOptimalMinimumHeight,
  *          getOtherOrientation, updateSelectedLabel, setupAttendanceMenu
  */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
 
 /**
  * Helper function for filling the form,
  * Set the value of a property of a XUL element
  *
  * @param aElement      ID of XUL element to set, or the element node itself
  * @param aNewValue     value to set property to ( if undefined no change is made )
  * @param aPropertyName OPTIONAL name of property to set, default is "value",
@@ -236,17 +236,17 @@ function removeChildren(aElement) {
 /**
  * Sorts a sorted array of calendars by pref |calendar.list.sortOrder|.
  * Repairs that pref if dangling entries exist.
  *
  * @param calendars     An array of calendars to sort.
  */
 function sortCalendarArray(calendars) {
     // Be careful not to pollute the window object, as things break.
-    let { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm", null);
+    let { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
     let ret = calendars.concat([]);
     let sortOrder = {};
     let sortOrderPref = Preferences.get("calendar.list.sortOrder", "").split(" ");
     for (let i = 0; i < sortOrderPref.length; ++i) {
         sortOrder[sortOrderPref[i]] = i;
     }
     function sortFunc(cal1, cal2) {
--- a/calendar/base/content/calendar-unifinder.js
+++ b/calendar/base/content/calendar-unifinder.js
@@ -11,18 +11,18 @@
  *
  * This is a hacked in interface to the unifinder. We will need to
  * improve this to make it usable in general.
  *
  * NOTE: Including this file will cause a load handler to be added to the
  * window.
  */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // Set this to true when the calendar event tree is clicked to allow for
 // multiple selection
 var gCalendarEventTreeClicked = false;
 
 // Store the start and enddate, because the providers can't be trusted when
 // dealing with all-day events. So we need to filter later. See bug 306157
 
--- a/calendar/base/content/calendar-views.js
+++ b/calendar/base/content/calendar-views.js
@@ -4,20 +4,20 @@
 
 /* exported switchToView, getSelectedDay, scheduleMidnightUpdate,
  *          updateStyleSheetForViews, observeViewDaySelect, toggleOrientation,
  *          toggleWorkdaysOnly, toggleTasksInView, toggleShowCompletedInView,
  *          goToDate, getLastCalendarView, deleteSelectedEvents,
  *          editSelectedEvents, selectAllEvents
  */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-const { countOccurrences } = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { countOccurrences } = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 /**
  * Controller for the views
  * @see calIcalendarViewController
  */
 var calendarViewController = {
     QueryInterface: ChromeUtils.generateQI([Ci.calICalendarViewController]),
 
--- a/calendar/base/content/calendar-views.xml
+++ b/calendar/base/content/calendar-views.xml
@@ -112,17 +112,17 @@
         ]]></body>
       </method>
     </implementation>
   </binding>
 
   <binding id="calendar-multiweek-view" extends="chrome://calendar/content/calendar-month-view.xml#calendar-month-base-view">
     <implementation implements="calICalendarView">
       <constructor><![CDATA[
-          ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+          const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
           this.mWeeksInView = Preferences.get("calendar.weeks.inview", 4);
       ]]></constructor>
 
       <field name="mWeeksInView">4</field>
 
       <property name="weeksInView">
         <getter><![CDATA[
             return this.mWeeksInView;
--- a/calendar/base/content/dialogs/calendar-alarm-dialog.js
+++ b/calendar/base/content/dialogs/calendar-alarm-dialog.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/. */
 
 /* exported onDismissAllAlarms, setupWindow, finishWindow, addWidgetFor,
  *         removeWidgetFor, onSelectAlarm, ensureCalendarVisible
  */
 
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 /**
  * Helper function to get the alarm service and cache it.
  *
  * @return The alarm service component
  */
 function getAlarmService() {
     if (!("mAlarmService" in window)) {
--- a/calendar/base/content/dialogs/calendar-conflicts-dialog.xul
+++ b/calendar/base/content/dialogs/calendar-conflicts-dialog.xul
@@ -10,17 +10,17 @@
         windowtype="Calendar:Conflicts"
         onload="onLoad()"
         ondialogaccept="return onAccept();"
         ondialogcancel="return onCancel();"
         persist="screenX screenY"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <script type="application/javascript" src="chrome://calendar/content/mouseoverPreviews.js"/>
   <script type="application/javascript"><![CDATA[
-    ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+    const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
     function onLoad() {
         let docEl = document.documentElement;
         let item = window.arguments[0].item;
         let vbox = getPreviewForItem(item, false);
         if (vbox) {
             document.getElementById("item-box").replaceWith(vbox);
         }
 
--- a/calendar/base/content/dialogs/calendar-creation.js
+++ b/calendar/base/content/dialogs/calendar-creation.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/. */
 
 /* exported openLocalCalendar */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * Shows the filepicker and creates a new calendar with a local file using the ICS
  * provider.
  */
 function openLocalCalendar() {
     const nsIFilePicker = Ci.nsIFilePicker;
     let picker = Cc["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
--- a/calendar/base/content/dialogs/calendar-dialog-utils.js
+++ b/calendar/base/content/dialogs/calendar-dialog-utils.js
@@ -3,19 +3,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* exported gInTab, gMainWindow, gTabmail, intializeTabOrWindowVariables,
  *          dispose, setDialogId, loadReminders, saveReminder,
  *          commonUpdateReminder, updateLink, rearrangeAttendees,
  *          adaptScheduleAgent
  */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 // Variables related to whether we are in a tab or a window dialog.
 var gInTab = false;
 var gMainWindow = null;
 var gTabmail = null;
 
 /**
  * Initialize variables for tab vs window.
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees.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/. */
 
 /* exported onLoad, onAccept, onCancel, zoomWithButtons, updateStartTime,
  *          endWidget, updateEndTime, editStartTimezone, editEndTimezone,
  *          changeAllDay, onNextSlot, onPreviousSlot
  */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 var gStartDate = null;
 var gEndDate = null;
 var gStartTimezone = null;
 var gEndTimezone = null;
 var gDuration = null;
 var gStartHour = 0;
 var gEndHour = 24;
--- a/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-recurrence.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/. */
 
 /* exported onLoad, onAccept, onCancel */
 
-const { splitRecurrenceRules } = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm", null);
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { splitRecurrenceRules } = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gIsReadOnly = false;
 var gStartTime = null;
 var gEndTime = null;
 var gUntilDate = null;
 
 /**
  * Sets up the recurrence dialog from the window arguments. Takes care of filling
--- a/calendar/base/content/dialogs/calendar-event-dialog-reminder.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-reminder.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/. */
 
 /* exported onLoad, onReminderSelected, updateReminder, onNewReminder,
  *          onRemoveReminder, onAccept, onCancel
  */
 
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var allowedActionsMap = {};
 var suppressListUpdate = false;
 
 /**
  * Sets up the reminder dialog.
  */
 function onLoad() {
--- a/calendar/base/content/dialogs/calendar-event-dialog-timezone.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-timezone.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/. */
 
 /* exported onLoad, onAccept, onCancel */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * Sets up the timezone dialog from the window arguments, also setting up all
  * dialog controls from the window's dates.
  */
 function onLoad() {
     let args = window.arguments[0];
     window.time = args.time;
--- a/calendar/base/content/dialogs/calendar-invitations-dialog.js
+++ b/calendar/base/content/dialogs/calendar-invitations-dialog.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/. */
 
 /* exported onLoad, onUnload, onAccept, onCancel */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * Sets up the invitations dialog from the window arguments, retrieves the
  * invitations from the invitations manager.
  */
 function onLoad() {
     let operationListener = {
         QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
--- a/calendar/base/content/dialogs/calendar-invitations-list.xml
+++ b/calendar/base/content/dialogs/calendar-invitations-list.xml
@@ -113,17 +113,17 @@
                 this, "anonid", "icon");
             icon.setAttribute("status", val);
             return val;
         ]]></setter>
       </property>
 
       <!-- constructor -->
       <constructor><![CDATA[
-          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
           this.mDateFormatter = cal.getDateFormatter();
       ]]></constructor>
 
       <!-- methods -->
       <method name="setCalendarItem">
         <parameter name="aItem"/>
         <body><![CDATA[
             this.mCalendarItem = aItem;
--- a/calendar/base/content/dialogs/calendar-migration-dialog.js
+++ b/calendar/base/content/dialogs/calendar-migration-dialog.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/. */
 
 var FIREFOX_UID = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}";
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { AppConstants } = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 //
 // The front-end wizard bits.
 //
 var gMigrateWizard = {
     /**
      * Called from onload of the migrator window.  Takes all of the migrators
      * that were passed in via window.arguments and adds them to checklist. The
--- a/calendar/base/content/dialogs/calendar-occurrence-prompt.xul
+++ b/calendar/base/content/dialogs/calendar-occurrence-prompt.xul
@@ -14,17 +14,17 @@
         ondialogcancel="return exitOccurrenceDialog(0)"
         ondialogaccept="exitOccurrenceDialog(1)"
         onload="onLoad()"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:xhtml2="http://www.w3.org/TR/xhtml2"
         xmlns:wairole="http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#"
         xhtml2:role="wairole:alertdialog">
   <script type="application/javascript"><![CDATA[
-      ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+      const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
       function exitOccurrenceDialog(aReturnValue) {
           window.arguments[0].value = aReturnValue;
           window.close();
           return true;
       }
 
       function getDString(aKey) {
--- a/calendar/base/content/dialogs/calendar-print-dialog.js
+++ b/calendar/base/content/dialogs/calendar-print-dialog.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/. */
 
 /* exported loadCalendarPrintDialog, printAndClose, onDatePick */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var printContent = "";
 
 /**
  * Gets the calendar view from the opening window
  */
 function getCalendarView() {
     let theView = window.opener.currentView();
--- a/calendar/base/content/dialogs/calendar-properties-dialog.js
+++ b/calendar/base/content/dialogs/calendar-properties-dialog.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/. */
 
 /* exported onLoad, onAcceptDialog, unsubscribeCalendar */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
 
 /**
  * The calendar to modify, is retrieved from window.arguments[0].calendar
  */
 var gCalendar;
 
 /**
  * This function gets called when the calendar properties dialog gets opened. To
--- a/calendar/base/content/dialogs/calendar-providerUninstall-dialog.js
+++ b/calendar/base/content/dialogs/calendar-providerUninstall-dialog.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/. */
 
 /* exported onLoad, onAccept, onCancel */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function onLoad() {
     let extension = window.arguments[0].extension;
     document.getElementById("provider-name-label").value = extension.name;
 
     let calendars = cal.getCalendarManager().getCalendars({})
                        .filter(x => x.providerID == extension.id);
 
--- a/calendar/base/content/dialogs/calendar-subscriptions-dialog.js
+++ b/calendar/base/content/dialogs/calendar-subscriptions-dialog.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/. */
 
 /* exported onLoad, onUnload, onKeyPress, onTextBoxKeyPress, onAccept,
  *          onCancel, onSubscribe, onUnsubscribe
  */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * Cancels any pending search operations.
  */
 var gCurrentSearchOperation = null;
 function cancelPendingSearchOperation() {
     if (gCurrentSearchOperation && gCurrentSearchOperation.isPending) {
         gCurrentSearchOperation.cancel(Ci.calIErrors.OPERATION_CANCELLED);
--- a/calendar/base/content/dialogs/calendar-summary-dialog.js
+++ b/calendar/base/content/dialogs/calendar-summary-dialog.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/. */
 
 /* exported onLoad, onUnload, onAccept, onCancel, updatePartStat, browseDocument,
  *          sendMailToOrganizer, openAttachment, reply
  */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-const { recurrenceRule2String } = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { recurrenceRule2String } = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm");
 
 /**
  * Sets up the summary dialog, setting all needed fields on the dialog from the
  * item received in the window arguments.
  */
 function onLoad() {
     let args = window.arguments[0];
     let item = args.calendarEvent;
--- a/calendar/base/content/dialogs/chooseCalendarDialog.js
+++ b/calendar/base/content/dialogs/chooseCalendarDialog.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/. */
 
 /* exported loadCalendars, doOK, doExtra1 */
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function loadCalendars() {
     const calendarManager = Cc["@mozilla.org/calendar/manager;1"]
                               .getService(Ci.calICalendarManager);
     let listbox = document.getElementById("calendar-list");
     let composite = cal.view.getCompositeCalendar(window.opener);
     let selectedIndex = 0;
     let calendars;
--- a/calendar/base/content/import-export.js
+++ b/calendar/base/content/import-export.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /* exported loadEventsFromFile, exportEntireCalendar */
 
 // File constants copied from file-utils.js
 var MODE_RDONLY = 0x01;
 var MODE_WRONLY = 0x02;
 var MODE_CREATE = 0x08;
 var MODE_TRUNCATE = 0x20;
--- a/calendar/base/content/preferences/alarms.js
+++ b/calendar/base/content/preferences/alarms.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/. */
 
 /* exported gAlarmsPane */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * Global Object to hold methods for the alarms pref pane
  */
 var gAlarmsPane = {
     /**
      * Initialize the alarms pref pane. Sets up dialog controls to match the
      * values set in prefs.
--- a/calendar/base/content/preferences/categories.js
+++ b/calendar/base/content/preferences/categories.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/. */
 
 /* exported gCategoriesPane */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { AppConstants } = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 var gCategoryList;
 var categoryPrefBranch = Services.prefs.getBranch("calendar.category.color.");
 
 /**
  * Global Object to hold methods for the categories pref pane
  */
 var gCategoriesPane = {
--- a/calendar/base/content/preferences/editCategory.js
+++ b/calendar/base/content/preferences/editCategory.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/. */
 
 /* exported editCategoryLoad, doOK, categoryNameChanged, clickColor, delay */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 // Global variable, set to true if the user has picked a custom color.
 var customColorSelected = false;
 
 /**
  * Load Handler, called when the edit category dialog is loaded
  */
 function editCategoryLoad() {
--- a/calendar/base/content/preferences/general.js
+++ b/calendar/base/content/preferences/general.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/. */
 
 /* exported gCalendarGeneralPane */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * Global Object to hold methods for the general pref pane
  */
 var gCalendarGeneralPane = {
     /**
      * Initialize the general pref pane. Sets up dialog controls to match the
      * values set in prefs.
--- a/calendar/base/content/preferences/views.js
+++ b/calendar/base/content/preferences/views.js
@@ -19,17 +19,17 @@ var gViewsPane = {
         this.initializeViewStartEndMenus();
     },
 
     /**
      * Initialize the strings for the  "day starts at" and "day ends at"
      * menulists. This is needed to respect locales that use AM/PM.
      */
     initializeViewStartEndMenus: function() {
-        const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+        const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
         let labelIdStart;
         let labelIdEnd;
 
         let calTime = cal.createDateTime();
         calTime.minute = 0;
 
         let timeFormatter = cal.getDateFormatter();
 
--- a/calendar/base/content/today-pane.js
+++ b/calendar/base/content/today-pane.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * Namespace object to hold functions related to the today pane.
  */
 var TodayPane = {
     paneViews: null,
     start: null,
     cwlabel: null,
--- a/calendar/base/content/widgets/calendar-alarm-widget.xml
+++ b/calendar/base/content/widgets/calendar-alarm-widget.xml
@@ -250,17 +250,17 @@
         <xul:toolbarbutton anonid="snooze-popup-cancel"
                            class="snooze-popup-button snooze-popup-cancel-button"
                            aria-label="&calendar.alarm.snooze.cancel;"
                            oncommand="snoozeCancel()"/>
       </xul:hbox>
     </content>
     <implementation>
       <constructor><![CDATA[
-          ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+          const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
           let snoozePref = Preferences.get("calendar.alarms.defaultsnoozelength", 0);
           if (snoozePref <= 0) {
               snoozePref = 5;
           }
 
           let unitList = document.getAnonymousElementByAttribute(this, "anonid", "snooze-unit-menulist");
           let unitValue = document.getAnonymousElementByAttribute(this, "anonid", "snooze-value-textbox");
--- a/calendar/base/content/widgets/calendar-widgets.xml
+++ b/calendar/base/content/widgets/calendar-widgets.xml
@@ -188,17 +188,17 @@
                     collapsedModes.splice(modeIndex, 1);
                     if (collapsedModes.join(",") == "") {
                         collapsedModes[0] = ",";
                     }
                 }
                 this.setAttribute("collapsedinmodes", collapsedModes.join(","));
 
                 // This binding is used all over the place. We can't guarantee that Services is available.
-                ChromeUtils.import("resource://gre/modules/Services.jsm");
+                var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
                 Services.xulStore.persist(this, "collapsedinmodes");
             }
             if (notifyRefControl === true) {
                 if (this.hasAttribute("refcontrol")) {
                     let command = document.getElementById(this.getAttribute("refcontrol"));
                     if (command) {
                         command.setAttribute("checked", display);
                         setBooleanAttribute(command, "disabled", !this.isVisibleInMode());
--- a/calendar/base/content/widgets/minimonth.xml
+++ b/calendar/base/content/widgets/minimonth.xml
@@ -133,17 +133,17 @@
       </xul:popupset>
     </content>
     <implementation>
       <field name="kMinimonth">null</field>
       <field name="mPopup">null</field>
       <field name="mScrollYearsHandler">null</field>
       <field name="mPixelScrollDelta">0</field>
       <constructor><![CDATA[
-          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
           this.kMinimonth = cal.view.getParentNodeOrThis(this, "minimonth");
           document.getAnonymousElementByAttribute(this, "anonid", "back-button").kMinimonth = this.kMinimonth;
           document.getAnonymousElementByAttribute(this, "anonid", "today-button").kMinimonth = this.kMinimonth;
           document.getAnonymousElementByAttribute(this, "anonid", "forward-button").kMinimonth = this.kMinimonth;
 
           this.mScrollYearsHandler = this.scrollYears.bind(this);
           document.getAnonymousElementByAttribute(this, "anonid", "years-popup")
@@ -450,18 +450,18 @@
       <field name="mEditorDate">null</field>
       <field name="mExtraDate">null</field>
       <field name="mPixelScrollDelta">0</field>
       <field name="mIsReadOnly">false</field>
       <field name="mObservesComposite">false</field>
       <field name="mShowWeekNumber">true</field>
 
       <constructor><![CDATA[
-          ChromeUtils.import("resource://gre/modules/Services.jsm");
-          ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+          const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+          const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
           this.mToday = false;
           this.mSelected = false;
           this.mExtra = false;
           this.mValue = new Date(); // Default to "today"
           this.mFocused = null;
           // save references for convenience
           if (this.hasAttribute("readonly")) {
@@ -474,17 +474,17 @@
           this.mShowWeekNumber = Preferences.get("calendar.view-minimonth.showWeekNumber", true);
 
           // Add pref observer
           let branch = Services.prefs.getBranch("");
           branch.addObserver("calendar.", this);
       ]]></constructor>
 
       <destructor><![CDATA[
-          ChromeUtils.import("resource://gre/modules/Services.jsm");
+          const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
           if (this.mObservesComposite) {
               cal.view.getCompositeCalendar(window).removeObserver(this);
           }
 
           // Remove pref observer
           let branch = Services.prefs.getBranch("");
           branch.removeObserver("calendar.", this);
--- a/calendar/base/modules/calExtract.jsm
+++ b/calendar/base/modules/calExtract.jsm
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 this.EXPORTED_SYMBOLS = ["Extractor"];
-const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 /**
 * Initializes extraction
 *
 * @param fallbackLocale  locale to use when others are not found or
 *                            detection is disabled
 * @param dayStart        ambiguous hours earlier than this are considered to
 *                            be in the afternoon, when null then by default
--- a/calendar/base/modules/calHashedArray.jsm
+++ b/calendar/base/modules/calHashedArray.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var EXPORTED_SYMBOLS = ["cal"]; // even though it's defined in calUtils.jsm, import needs this
 
 /**
  * An unsorted array of hashable items with some extra functions to quickly
  * retrieve the item by its hash id.
  *
  * Performance Considerations:
--- a/calendar/base/modules/calRecurrenceUtils.jsm
+++ b/calendar/base/modules/calRecurrenceUtils.jsm
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* exported recurrenceRule2String, splitRecurrenceRules, checkRecurrenceRule
  *          countOccurrences
  */
 
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 this.EXPORTED_SYMBOLS = [
     "recurrenceRule2String", "splitRecurrenceRules", "checkRecurrenceRule",
     "countOccurrences"
 ];
 
 /**
  * This function takes the recurrence info passed as argument and creates a
--- a/calendar/base/modules/calUtils.jsm
+++ b/calendar/base/modules/calUtils.jsm
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-const { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm", null);
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 // Usually the backend loader gets loaded via profile-after-change, but in case
 // a calendar component hooks in earlier, its very likely it will use calUtils.
 // Getting the service here will load if its not already loaded
 Cc["@mozilla.org/calendar/backend-loader;1"].getService();
 
 // The calendar console instance
 var gCalendarConsole = new ConsoleAPI({
@@ -513,10 +513,10 @@ function makeQI(aInterfaces) {
             }
         }
 
         throw Cr.NS_ERROR_NO_INTERFACE;
     };
 }
 
 // Backwards compatibility for bug 905097. Please remove with Thunderbird 61.
-const { injectCalUtilsCompat } = ChromeUtils.import("resource://calendar/modules/calUtilsCompat.jsm", null);
+const { injectCalUtilsCompat } = ChromeUtils.import("resource://calendar/modules/calUtilsCompat.jsm");
 injectCalUtilsCompat(cal);
--- a/calendar/base/modules/calUtilsCompat.jsm
+++ b/calendar/base/modules/calUtilsCompat.jsm
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
  * Backwards compat for calUtils migration.
  */
 
-ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
+const { Deprecated } = ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
 
 /* exported injectCalUtilsCompat */
 
 this.EXPORTED_SYMBOLS = ["injectCalUtilsCompat"];
 
 /**
  * Migration data for backwards compatibility, will be used with
  * injectCalUtilsCompat.
--- a/calendar/base/modules/ical.js
+++ b/calendar/base/modules/ical.js
@@ -26,17 +26,17 @@ function unwrapSetter(type, val, innerFu
 }
 
 function unwrapSingle(type, val) {
     if (!val || !val.wrappedJSObject) {
         return null;
     } else if (val.wrappedJSObject.innerObject instanceof type) {
         return val.wrappedJSObject.innerObject;
     } else {
-        ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+        var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
         Cu.reportError("Unknown " + (type.icalclass || type) + " passed at " + cal.STACK(10));
         return null;
     }
 }
 
 // -- start ical.js --
 
 /* This Source Code Form is subject to the terms of the Mozilla Public
--- a/calendar/base/modules/shim/calAlarmUtils.jsm
+++ b/calendar/base/modules/shim/calAlarmUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Deprecated } = ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 this.EXPORTED_SYMBOLS = ["cal"];
 
 Deprecated.warning("calAlarmUtils.jsm must no longer be imported directly, it" +
                    " is already available via calUtils.jsm",
                    "https://bugzilla.mozilla.org/show_bug.cgi?id=905097",
                    Components.stack.caller);
--- a/calendar/base/modules/shim/calAsyncUtils.jsm
+++ b/calendar/base/modules/shim/calAsyncUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Deprecated } = ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 this.EXPORTED_SYMBOLS = ["cal"];
 
 Deprecated.warning("calAsyncUtils.jsm must no longer be imported directly, it" +
                    " is already available via calUtils.jsm",
                    "https://bugzilla.mozilla.org/show_bug.cgi?id=905097",
                    Components.stack.caller);
--- a/calendar/base/modules/shim/calAuthUtils.jsm
+++ b/calendar/base/modules/shim/calAuthUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Deprecated } = ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 this.EXPORTED_SYMBOLS = ["cal"];
 
 Deprecated.warning("calAuthUtils.jsm must no longer be imported directly, it" +
                    " is already available via calUtils.jsm",
                    "https://bugzilla.mozilla.org/show_bug.cgi?id=905097",
                    Components.stack.caller);
--- a/calendar/base/modules/shim/calItemUtils.jsm
+++ b/calendar/base/modules/shim/calItemUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Deprecated } = ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 this.EXPORTED_SYMBOLS = ["cal"];
 
 Deprecated.warning("calItemUtils.jsm must no longer be imported directly, it" +
                    " is already available via calUtils.jsm",
                    "https://bugzilla.mozilla.org/show_bug.cgi?id=905097",
                    Components.stack.caller);
--- a/calendar/base/modules/shim/calIteratorUtils.jsm
+++ b/calendar/base/modules/shim/calIteratorUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Deprecated } = ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 this.EXPORTED_SYMBOLS = ["cal"];
 
 Deprecated.warning("calIteratorUtils.jsm must no longer be imported directly, it" +
                    " is already available via calUtils.jsm",
                    "https://bugzilla.mozilla.org/show_bug.cgi?id=905097",
                    Components.stack.caller);
--- a/calendar/base/modules/shim/calItipUtils.jsm
+++ b/calendar/base/modules/shim/calItipUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Deprecated } = ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 this.EXPORTED_SYMBOLS = ["cal"];
 
 Deprecated.warning("calItipUtils.jsm must no longer be imported directly, it" +
                    " is already available via calUtils.jsm",
                    "https://bugzilla.mozilla.org/show_bug.cgi?id=905097",
                    Components.stack.caller);
--- a/calendar/base/modules/shim/calPrintUtils.jsm
+++ b/calendar/base/modules/shim/calPrintUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Deprecated } = ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 this.EXPORTED_SYMBOLS = ["cal"];
 
 Deprecated.warning("calPrintUtils.jsm must no longer be imported directly, it" +
                    " is already available via calUtils.jsm",
                    "https://bugzilla.mozilla.org/show_bug.cgi?id=905097",
                    Components.stack.caller);
--- a/calendar/base/modules/shim/calProviderUtils.jsm
+++ b/calendar/base/modules/shim/calProviderUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Deprecated } = ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 this.EXPORTED_SYMBOLS = ["cal"];
 
 Deprecated.warning("calProviderUtils.jsm must no longer be imported directly, it" +
                    " is already available via calUtils.jsm",
                    "https://bugzilla.mozilla.org/show_bug.cgi?id=905097",
                    Components.stack.caller);
--- a/calendar/base/modules/shim/calViewUtils.jsm
+++ b/calendar/base/modules/shim/calViewUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Deprecated } = ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 this.EXPORTED_SYMBOLS = ["cal"];
 
 Deprecated.warning("calViewUtils.jsm must no longer be imported directly, it" +
                    " is already available via calUtils.jsm",
                    "https://bugzilla.mozilla.org/show_bug.cgi?id=905097",
                    Components.stack.caller);
--- a/calendar/base/modules/shim/calXMLUtils.jsm
+++ b/calendar/base/modules/shim/calXMLUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Deprecated } = ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 this.EXPORTED_SYMBOLS = ["cal"];
 
 Deprecated.warning("calXMLUtils.jsm must no longer be imported directly, it" +
                    " is already available via calUtils.jsm",
                    "https://bugzilla.mozilla.org/show_bug.cgi?id=905097",
                    Components.stack.caller);
--- a/calendar/base/modules/utils/calACLUtils.jsm
+++ b/calendar/base/modules/utils/calACLUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /*
  * Helpers for permission checks and other ACL features
  */
 
 // NOTE: This module should not be loaded directly, it is available when
 // including calUtils.jsm under the cal.acl namespace.
 
--- a/calendar/base/modules/utils/calAlarmUtils.jsm
+++ b/calendar/base/modules/utils/calAlarmUtils.jsm
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "cal", "resource://calendar/modules/calUtils.jsm", "cal");
 
 /*
  * Helpers for manipulating calendar alarms
  */
 
 // NOTE: This module should not be loaded directly, it is available when
--- a/calendar/base/modules/utils/calAsyncUtils.jsm
+++ b/calendar/base/modules/utils/calAsyncUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
+const { PromiseUtils } = ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
 
 /*
  * Asynchronous tools for handling calendar operations
  */
 
 // NOTE: This module should not be loaded directly, it is available when
 // including calUtils.jsm under the cal.async namespace.
 
--- a/calendar/base/modules/utils/calAuthUtils.jsm
+++ b/calendar/base/modules/utils/calAuthUtils.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "cal", "resource://calendar/modules/calUtils.jsm", "cal");
 
 /*
  * Authentication tools and prompts, mostly for providers
  */
 
 // NOTE: This module should not be loaded directly, it is available when including
--- a/calendar/base/modules/utils/calCategoryUtils.jsm
+++ b/calendar/base/modules/utils/calCategoryUtils.jsm
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "cal", "resource://calendar/modules/calUtils.jsm", "cal");
 
 /*
  * Helpers for reading and writing calendar categories
  */
 
 // NOTE: This module should not be loaded directly, it is available when
--- a/calendar/base/modules/utils/calDataUtils.jsm
+++ b/calendar/base/modules/utils/calDataUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "cal", "resource://calendar/modules/calUtils.jsm", "cal");
 
 /*
  * Data structures and algorithms used within the codebase
  */
 
 // NOTE: This module should not be loaded directly, it is available when
--- a/calendar/base/modules/utils/calDateTimeUtils.jsm
+++ b/calendar/base/modules/utils/calDateTimeUtils.jsm
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "cal", "resource://calendar/modules/calUtils.jsm", "cal");
 
 /*
  * Date, time and timezone related functions
  */
 
 // NOTE: This module should not be loaded directly, it is available when
--- a/calendar/base/modules/utils/calEmailUtils.jsm
+++ b/calendar/base/modules/utils/calEmailUtils.jsm
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "cal", "resource://calendar/modules/calUtils.jsm", "cal");
 
 /*
  * Functions for processing email addresses and sending email
  */
 
 // NOTE: This module should not be loaded directly, it is available when
--- a/calendar/base/modules/utils/calItemUtils.jsm
+++ b/calendar/base/modules/utils/calItemUtils.jsm
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Deprecated } = ChromeUtils.import("resource://gre/modules/Deprecated.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-const { cal } = ChromeUtils.import("resource://calendar/modules/calHashedArray.jsm", null);
+const { cal } = ChromeUtils.import("resource://calendar/modules/calHashedArray.jsm");
 
 /*
  * Calendar item related functions
  */
 
 // NOTE: This module should not be loaded directly, it is available when
 // including calUtils.jsm under the cal.item namespace.
 
--- a/calendar/base/modules/utils/calIteratorUtils.jsm
+++ b/calendar/base/modules/utils/calIteratorUtils.jsm
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "cal", "resource://calendar/modules/calUtils.jsm", "cal");
 
 /*
  * Iterators for various data structures
  */
 
 // NOTE: This module should not be loaded directly, it is available when
--- a/calendar/base/modules/utils/calItipUtils.jsm
+++ b/calendar/base/modules/utils/calItipUtils.jsm
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-ChromeUtils.import("resource:///modules/MailServices.jsm");
+const { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "cal", "resource://calendar/modules/calUtils.jsm", "cal");
 
 /*
  * Scheduling and iTIP helper code
  */
 
 // NOTE: This module should not be loaded directly, it is available when
--- a/calendar/base/modules/utils/calL10NUtils.jsm
+++ b/calendar/base/modules/utils/calL10NUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /*
  * Localization and locale functions
  */
 
 // NOTE: This module should not be loaded directly, it is available when
 // including calUtils.jsm under the cal.l10n namespace.
 
--- a/calendar/base/modules/utils/calPrintUtils.jsm
+++ b/calendar/base/modules/utils/calPrintUtils.jsm
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "cal", "resource://calendar/modules/calUtils.jsm", "cal");
 
 /*
  * Helpers for printing and print preparation
  */
 
 // NOTE: This module should not be loaded directly, it is available when
--- a/calendar/base/modules/utils/calProviderUtils.jsm
+++ b/calendar/base/modules/utils/calProviderUtils.jsm
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-const { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm", null);
+const { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "cal", "resource://calendar/modules/calUtils.jsm", "cal");
 ChromeUtils.defineModuleGetter(this, "Deprecated", "resource://gre/modules/Deprecated.jsm");
 
 /*
  * Helpers and base class for calendar providers
  */
 
--- a/calendar/base/modules/utils/calUnifinderUtils.jsm
+++ b/calendar/base/modules/utils/calUnifinderUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "cal", "resource://calendar/modules/calUtils.jsm", "cal");
 
 /*
  * Helpers for the unifinder
  */
 
 // NOTE: This module should not be loaded directly, it is available when
--- a/calendar/base/modules/utils/calViewUtils.jsm
+++ b/calendar/base/modules/utils/calViewUtils.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "cal", "resource://calendar/modules/calUtils.jsm", "cal");
 
 /*
  * View and DOM related helper functions
  */
 
 // NOTE: This module should not be loaded directly, it is available when
--- a/calendar/base/modules/utils/calWindowUtils.jsm
+++ b/calendar/base/modules/utils/calWindowUtils.jsm
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { AppConstants } = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /*
  * Calendar window helpers, e.g. to open our dialogs
  */
 
 // NOTE: This module should not be loaded directly, it is available when
 // including calUtils.jsm under the cal.window namespace.
 
--- a/calendar/base/src/calAlarm.js
+++ b/calendar/base/src/calAlarm.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var ALARM_RELATED_ABSOLUTE = Ci.calIAlarm.ALARM_RELATED_ABSOLUTE;
 var ALARM_RELATED_START = Ci.calIAlarm.ALARM_RELATED_START;
 var ALARM_RELATED_END = Ci.calIAlarm.ALARM_RELATED_END;
 
 function calAlarm() {
     this.wrappedJSObject = this;
     this.mProperties = new Map();
--- a/calendar/base/src/calAlarmMonitor.js
+++ b/calendar/base/src/calAlarmMonitor.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 function peekAlarmWindow() {
     return Services.wm.getMostRecentWindow("Calendar:AlarmWindow");
 }
 
 /**
  * The alarm monitor takes care of playing the alarm sound and opening one copy
  * of the calendar-alarm-dialog. Both depend on their respective prefs to be
--- a/calendar/base/src/calAlarmService.js
+++ b/calendar/base/src/calAlarmService.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 { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { PromiseUtils } = ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
 
 var kHoursBetweenUpdates = 6;
 
 function nowUTC() {
     return cal.dtz.jsDateToDateTime(new Date()).getInTimezone(cal.dtz.UTC);
 }
 
 function newTimerWithCallback(aCallback, aDelay, aRepeating) {
--- a/calendar/base/src/calApplicationUtils.js
+++ b/calendar/base/src/calApplicationUtils.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/. */
 
 /* exported launchBrowser */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * Launch the given url (string) in the external browser. If an event is passed,
  * then this is only done on left click and the event propagation is stopped.
  *
  * @param url       The URL to open, as a string
  * @param event     (optional) The event that caused the URL to open
  */
--- a/calendar/base/src/calAttachment.js
+++ b/calendar/base/src/calAttachment.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 //
 // calAttachment.js
 //
 function calAttachment() {
     this.wrappedJSObject = this;
     this.mProperties = new Map();
 }
--- a/calendar/base/src/calAttendee.js
+++ b/calendar/base/src/calAttendee.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function calAttendee() {
     this.wrappedJSObject = this;
     this.mProperties = new Map();
 }
 
 calAttendee.prototype = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIAttendee]),
--- a/calendar/base/src/calCachedCalendar.js
+++ b/calendar/base/src/calCachedCalendar.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 var calICalendar = Ci.calICalendar;
 var cICL = Ci.calIChangeLog;
 var cIOL = Ci.calIOperationListener;
 
 var gNoOpListener = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
     onGetResult: function(calendar, status, itemType, detail, count, items) {
--- a/calendar/base/src/calCalendarManager.js
+++ b/calendar/base/src/calCalendarManager.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/. */
 
-ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { AddonManager } = ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var REGISTRY_BRANCH = "calendar.registry.";
 var DB_SCHEMA_VERSION = 10;
 var MAX_INT = Math.pow(2, 31) - 1;
 var MIN_INT = -MAX_INT;
 
 function calCalendarManager() {
     this.wrappedJSObject = this;
--- a/calendar/base/src/calCalendarSearchService.js
+++ b/calendar/base/src/calCalendarSearchService.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function calCalendarSearchListener(numOperations, finalListener) {
     this.mFinalListener = finalListener;
     this.mNumOperations = numOperations;
     this.mResults = [];
 
     this.opGroup = new cal.data.OperationGroup(() => {
         this.notifyResult(null);
--- a/calendar/base/src/calDateTimeFormatter.js
+++ b/calendar/base/src/calDateTimeFormatter.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function calDateTimeFormatter() {
     this.wrappedJSObject = this;
     this.mDateStringBundle = Services.strings.createBundle("chrome://calendar/locale/dateFormat.properties");
 }
 calDateTimeFormatter.prototype = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIDateTimeFormatter]),
     classID: Components.ID("{4123da9a-f047-42da-a7d0-cc4175b9f36a}"),
--- a/calendar/base/src/calDefaultACLManager.js
+++ b/calendar/base/src/calDefaultACLManager.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /* calDefaultACLManager */
 function calDefaultACLManager() {
     this.mCalendarEntries = {};
 }
 
 calDefaultACLManager.prototype = {
     QueryInterface: ChromeUtils.generateQI([Ci.calICalendarACLManager]),
--- a/calendar/base/src/calDeletedItems.js
+++ b/calendar/base/src/calDeletedItems.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { FileUtils } = ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
 
 /**
  * Handles remembering deleted items.
  *
  * This is (currently) not a real trashcan. Only ids and time deleted is stored.
  * Note also that the code doesn't strictly check the calendar of the item,
  * except when a calendar id is passed to getDeletedDate.
  */
--- a/calendar/base/src/calEvent.js
+++ b/calendar/base/src/calEvent.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 //
 // constructor
 //
 function calEvent() {
     this.initItemBase();
 
     this.eventPromotedProps = {
--- a/calendar/base/src/calFilter.js
+++ b/calendar/base/src/calFilter.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * Object that contains a set of filter properties that may be used by a calFilter object
  * to filter a set of items.
  * Supported filter properties:
  *   start, end:   Specifies the relative date range to use when calculating the filter date
  *               range. The relative date range may relative to the current date and time, the
  *               currently selected date, or the dates range of the current view. The actual
--- a/calendar/base/src/calFreeBusyService.js
+++ b/calendar/base/src/calFreeBusyService.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function calFreeBusyListener(numOperations, finalListener) {
     this.mFinalListener = finalListener;
     this.mNumOperations = numOperations;
 
     this.opGroup = new cal.data.OperationGroup(() => {
         this.notifyResult(null);
     });
--- a/calendar/base/src/calIcsParser.js
+++ b/calendar/base/src/calIcsParser.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 
 function calIcsParser() {
     this.wrappedJSObject = this;
     this.mItems = [];
     this.mParentlessItems = [];
     this.mComponents = [];
     this.mProperties = [];
 }
--- a/calendar/base/src/calIcsSerializer.js
+++ b/calendar/base/src/calIcsSerializer.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function calIcsSerializer() {
     this.wrappedJSObject = this;
     this.mItems = [];
     this.mProperties = [];
     this.mComponents = [];
 }
 calIcsSerializer.prototype = {
--- a/calendar/base/src/calItemBase.js
+++ b/calendar/base/src/calItemBase.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * calItemBase prototype definition
  *
  * @implements calIItemBase
  * @constructor
  */
 function calItemBase() {
--- a/calendar/base/src/calItemModule.js
+++ b/calendar/base/src/calItemModule.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 this.NSGetFactory = (cid) => {
     let scriptLoadOrder = [
         "resource://calendar/calendar-js/calItemBase.js",
         "resource://calendar/calendar-js/calCachedCalendar.js",
 
         "resource://calendar/calendar-js/calAlarm.js",
         "resource://calendar/calendar-js/calAlarmMonitor.js",
--- a/calendar/base/src/calItipItem.js
+++ b/calendar/base/src/calItipItem.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * Constructor of calItipItem object
  */
 function calItipItem() {
     this.wrappedJSObject = this;
     this.mCurrentItemIndex = 0;
 }
--- a/calendar/base/src/calProtocolHandler.js
+++ b/calendar/base/src/calProtocolHandler.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * Generic webcal constructor
  *
  * @param scheme        The scheme to init for (webcal, webcals)
  */
 function calProtocolHandler(scheme) {
     this.scheme = scheme;
--- a/calendar/base/src/calRecurrenceDate.js
+++ b/calendar/base/src/calRecurrenceDate.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function calRecurrenceDate() {
     this.wrappedJSObject = this;
 }
 
 var calRecurrenceDateClassID = Components.ID("{806b6423-3aaa-4b26-afa3-de60563e9cec}");
 var calRecurrenceDateInterfaces = [Ci.calIRecurrenceItem, Ci.calIRecurrenceDate];
 calRecurrenceDate.prototype = {
--- a/calendar/base/src/calRecurrenceInfo.js
+++ b/calendar/base/src/calRecurrenceInfo.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function getRidKey(date) {
     if (!date) {
         return null;
     }
     let timezone = date.timezone;
     if (!timezone.isUTC && !timezone.isFloating) {
         date = date.getInTimezone(cal.dtz.UTC);
--- a/calendar/base/src/calRelation.js
+++ b/calendar/base/src/calRelation.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * calRelation prototype definition
  *
  * @implements calIRelation
  * @constructor
  */
 function calRelation() {
--- a/calendar/base/src/calSleepMonitor.js
+++ b/calendar/base/src/calSleepMonitor.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 
 function calSleepMonitor() {
     this.wrappedJSObject = this;
 }
 
 calSleepMonitor.prototype = {
     QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
--- a/calendar/base/src/calStartupService.js
+++ b/calendar/base/src/calStartupService.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/L10nRegistry.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { FileSource, L10nRegistry } = ChromeUtils.import("resource://gre/modules/L10nRegistry.jsm");
 
 /**
  * Helper function to asynchronously call a certain method on the objects passed
  * in 'services' in order (i.e wait until the first completes before calling the
  * second
  *
  * @param method        The method name to call. Usually startup/shutdown.
  * @param services      The array of service objects to call on.
--- a/calendar/base/src/calTimezone.js
+++ b/calendar/base/src/calTimezone.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-var { ICAL } = ChromeUtils.import("resource://calendar/modules/ical.js", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+var { ICAL } = ChromeUtils.import("resource://calendar/modules/ical.js");
 
 function calICALJSTimezone(innerObject) {
     this.innerObject = innerObject || new ICAL.Timezone();
     this.wrappedJSObject = this;
 }
 
 calICALJSTimezone.prototype = {
     QueryInterface: ChromeUtils.generateQI([Ci.calITimezone]),
--- a/calendar/base/src/calTimezoneService.js
+++ b/calendar/base/src/calTimezoneService.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/. */
 
-ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-var { ICAL, unwrapSingle } = ChromeUtils.import("resource://calendar/modules/ical.js", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+var { ICAL, unwrapSingle } = ChromeUtils.import("resource://calendar/modules/ical.js");
 
 function calStringEnumerator(stringArray) {
     this.mIndex = 0;
     this.mStringArray = stringArray;
 }
 calStringEnumerator.prototype = {
     // nsIUTF8StringEnumerator:
     [Symbol.iterator]: function() {
--- a/calendar/base/src/calTodo.js
+++ b/calendar/base/src/calTodo.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 //
 // constructor
 //
 function calTodo() {
     this.initItemBase();
 
     this.todoPromotedProps = {
--- a/calendar/base/src/calTransactionManager.js
+++ b/calendar/base/src/calTransactionManager.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function calTransactionManager() {
     this.wrappedJSObject = this;
     if (!this.transactionManager) {
         this.transactionManager =
             Cc["@mozilla.org/transactionmanager;1"].createInstance(Ci.nsITransactionManager);
     }
 }
--- a/calendar/base/src/calWeekInfoService.js
+++ b/calendar/base/src/calWeekInfoService.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 function calWeekInfoService() {
     this.wrappedJSObject = this;
 }
 calWeekInfoService.prototype = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIWeekInfoService]),
     classID: Components.ID("{6877bbdd-f336-46f5-98ce-fe86d0285cc1}"),
 
--- a/calendar/import-export/calHtmlExport.js
+++ b/calendar/import-export/calHtmlExport.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * HTML Export Plugin
  */
 function calHtmlExporter() {
     this.wrappedJSObject = this;
 }
 
--- a/calendar/import-export/calIcsImportExport.js
+++ b/calendar/import-export/calIcsImportExport.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * ICS Import and Export Plugin
  */
 
 // Shared functions
 function getIcsFileTypes(aCount) {
     aCount.value = 1;
--- a/calendar/import-export/calImportExportModule.js
+++ b/calendar/import-export/calImportExportModule.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 this.NSGetFactory = (cid) => {
     let scriptLoadOrder = [
         "resource://calendar/calendar-js/calIcsImportExport.js",
         "resource://calendar/calendar-js/calHtmlExport.js",
         "resource://calendar/calendar-js/calOutlookCSVImportExport.js",
 
         "resource://calendar/calendar-js/calListFormatter.js",
--- a/calendar/import-export/calListFormatter.js
+++ b/calendar/import-export/calListFormatter.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * A thin wrapper around the html list exporter for the list print format.
  */
 function calListFormatter() {
     this.wrappedJSObject = this;
 }
 
--- a/calendar/import-export/calMonthGridPrinter.js
+++ b/calendar/import-export/calMonthGridPrinter.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * Prints a rough month-grid of events/tasks
  */
 function calMonthPrinter() {
     this.wrappedJSObject = this;
 }
 
--- a/calendar/import-export/calOutlookCSVImportExport.js
+++ b/calendar/import-export/calOutlookCSVImportExport.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 var localeEn = {
     headTitle:       "Subject",
     headStartDate:   "Start Date",
     headStartTime:   "Start Time",
     headEndDate:     "End Date",
     headEndTime:     "End Time",
     headAllDayEvent: "All day event",
--- a/calendar/import-export/calWeekPrinter.js
+++ b/calendar/import-export/calWeekPrinter.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * Prints a two column view of a week of events, much like a paper day-planner
  */
 function calWeekPrinter() {
     this.wrappedJSObject = this;
 }
 
--- a/calendar/itip/calItipEmailTransport.js
+++ b/calendar/itip/calItipEmailTransport.js
@@ -1,18 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-const { ltn } = ChromeUtils.import("resource://calendar/modules/ltnInvitationUtils.jsm", null);
+const { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { ltn } = ChromeUtils.import("resource://calendar/modules/ltnInvitationUtils.jsm");
 
 /**
  * Constructor of calItipEmailTransport object
  */
 function calItipEmailTransport() {
     this.wrappedJSObject = this;
     this._initEmailTransport();
 }
--- a/calendar/lightning/components/calItipProtocolHandler.js
+++ b/calendar/lightning/components/calItipProtocolHandler.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var ITIP_HANDLER_MIMETYPE = "application/x-itip-internal";
 var ITIP_HANDLER_PROTOCOL = "moz-cal-handle-itip";
 var NS_ERROR_WONT_HANDLE_CONTENT = 0x805d0001;
 
 
 function NYI() {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
--- a/calendar/lightning/components/lightningTextCalendarConverter.js
+++ b/calendar/lightning/components/lightningTextCalendarConverter.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/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-const { ltn } = ChromeUtils.import("resource://calendar/modules/ltnInvitationUtils.jsm", null);
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { ltn } = ChromeUtils.import("resource://calendar/modules/ltnInvitationUtils.jsm");
 
 function ltnMimeConverter() {
     this.wrappedJSObject = this;
 }
 
 ltnMimeConverter.prototype = {
     QueryInterface: ChromeUtils.generateQI([Ci.nsISimpleMimeConverter]),
     classID: Components.ID("{c70acb08-464e-4e55-899d-b2c84c5409fa}"),
--- a/calendar/lightning/content/imip-bar.js
+++ b/calendar/lightning/content/imip-bar.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-const { ltn } = ChromeUtils.import("resource://calendar/modules/ltnInvitationUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { ltn } = ChromeUtils.import("resource://calendar/modules/ltnInvitationUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 /**
  * Provides shortcuts to set label and collapsed attribute of imip-bar node.
  */
 const imipBar = {
     get bar() {
         return document.querySelector(".lightning-notification-bar");
     },
--- a/calendar/lightning/content/lightning-item-iframe.js
+++ b/calendar/lightning/content/lightning-item-iframe.js
@@ -9,29 +9,29 @@
  *          deleteAllAttachments, copyAttachment, attachmentLinkKeyPress,
  *          attachmentDblClick, attachmentClick, notifyUser,
  *          removeNotification, chooseRecentTimezone, showTimezonePopup,
  *          attendeeDblClick, attendeeClick, removeAttendee,
  *          removeAllAttendees, sendMailToUndecidedAttendees, checkUntilDate,
  *          applyValues
  */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 const {
     recurrenceRule2String,
     splitRecurrenceRules,
     checkRecurrenceRule,
     countOccurrences
-} = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+} = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm");
+const { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 try {
-    ChromeUtils.import("resource:///modules/cloudFileAccounts.js");
+    var { cloudFileAccounts } = ChromeUtils.import("resource:///modules/cloudFileAccounts.js");
 } catch (e) {
     // This will fail on Seamonkey, but thats ok since the pref for cloudfiles
     // is false, which means the UI will not be shown
 }
 
 // Flag for using new item UI code (HTML/React.js).
 const gNewItemUI = Preferences.get("calendar.item.useNewItemUI", false);
 
--- a/calendar/lightning/content/lightning-item-panel.js
+++ b/calendar/lightning/content/lightning-item-panel.js
@@ -8,19 +8,19 @@
  *          rotateShowTimeAs, editShowTimeAs, updateShowTimeAs, editToDoStatus,
  *          postponeTask, toggleTimezoneLinks, toggleLink, attachURL,
  *          onCommandViewToolbar, onCommandCustomize, attachFileByAccountKey,
  *          onUnloadLightningItemPanel, openNewEvent, openNewTask,
  *          openNewMessage, openNewCardDialog
  */
 
 // XXX Need to determine which of these we really need here.
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource:///modules/MailServices.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm");
 
 // gTabmail is null if we are in a dialog window and not in a tab.
 var gTabmail = document.getElementById("tabmail") || null;
 
 if (!gTabmail) {
     // In a dialog window the following menu item functions need to be
     // defined.  In a tab they are defined elsewhere.  To prevent errors in
     // the log they are defined here (before the onLoad function is called).
--- a/calendar/lightning/content/lightning-utils.js
+++ b/calendar/lightning/content/lightning-utils.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/. */
 
 /* exported ltnInitMailIdentitiesRow, ltnGetMailIdentitySelection,
  *          ltnSaveMailIdentitySelection, ltnNotifyOnIdentitySelection
  */
 
-var { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm", null);
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
+const { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * Initializing the email identity row
  * (shared between calendar creation wizard and properties dialog)
  */
 function ltnInitMailIdentitiesRow() {
     if (!gCalendar) {
         collapseElement("calendar-email-identity-row");
--- a/calendar/lightning/content/messenger-overlay-sidebar.js
+++ b/calendar/lightning/content/messenger-overlay-sidebar.js
@@ -3,19 +3,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* exported refreshUIBits, switchCalendarView, rescheduleInvitationsUpdate,
  *          openInvitationsDialog, onToolbarsPopupShowingWithMode,
  *          InitViewCalendarPaneMenu, onToolbarsPopupShowingForTabType,
  *          customizeMailToolbarForTabType
  */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { AddonManager } = ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var gLastShownCalendarView = null;
 
 var calendarTabMonitor = {
     monitorName: "lightning",
 
     // Unused, but needed functions
     onTabTitleChanged: function() {},
--- a/calendar/lightning/content/suite-overlay-sidebar.js
+++ b/calendar/lightning/content/suite-overlay-sidebar.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var ltnSuiteUtils = {
 
     addStartupObserver: function() {
         Services.obs.addObserver(this.startupObserver, "lightning-startup-done");
         Services.obs.addObserver(this.startupObserver, "calendar-taskview-startup-done");
     },
 
--- a/calendar/lightning/modules/ltnInvitationUtils.jsm
+++ b/calendar/lightning/modules/ltnInvitationUtils.jsm
@@ -1,16 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-const { recurrenceRule2String } = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource:///modules/MailServices.jsm");
+const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { recurrenceRule2String } = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm");
 
 this.EXPORTED_SYMBOLS = ["ltn"]; /* exported ltn */
 var ltn = {};
 
 ltn.invitation = {
     /**
      * Returns a header title for an ITIP item depending on the response method
      * @param  {calItipItem}     aItipItem  the itip item to check
--- a/calendar/providers/caldav/calDavCalendar.js
+++ b/calendar/providers/caldav/calDavCalendar.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/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-var { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm", null);
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
-ChromeUtils.import("resource:///modules/OAuth2.jsm");
+const { OAuth2 } = ChromeUtils.import("resource:///modules/OAuth2.jsm");
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 //
 // calDavCalendar.js
 //
 
 var xmlHeader = '<?xml version="1.0" encoding="UTF-8"?>\n';
 
 var davNS = "DAV:";
--- a/calendar/providers/caldav/calDavRequestHandlers.js
+++ b/calendar/providers/caldav/calDavRequestHandlers.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-var { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm", null);
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+var { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 var xmlHeader = '<?xml version="1.0" encoding="UTF-8"?>\n';
 var MIME_TEXT_XML = "text/xml; charset=utf-8";
 
 /**
  * This is a handler for the etag request in calDavCalendar.js' getUpdatedItem.
  * It uses the SAX parser to incrementally parse the items and compose the
  * resulting multiget.
--- a/calendar/providers/composite/calCompositeCalendar.js
+++ b/calendar/providers/composite/calCompositeCalendar.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 //
 // calCompositeCalendar.js
 //
 
 /**
  * Calendar specific utility functions
  */
--- a/calendar/providers/gdata/components/calGoogleCalendar.js
+++ b/calendar/providers/gdata/components/calGoogleCalendar.js
@@ -1,42 +1,42 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 // Backwards compatibility with Thunderbird <60.
 if (!("Cc" in this)) {
     // eslint-disable-next-line mozilla/no-define-cc-etc, no-unused-vars
     const { classes: Cc, interfaces: Ci, results: Cr } = Components;
 }
 
-var { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm", null);
-const { stringException } = ChromeUtils.import("resource://gdata-provider/modules/gdataLogging.jsm", null);
+var { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm");
+const { stringException } = ChromeUtils.import("resource://gdata-provider/modules/gdataLogging.jsm");
 const {
     calGoogleRequest,
     getCorrectedDate,
     API_BASE
-} = ChromeUtils.import("resource://gdata-provider/modules/gdataRequest.jsm", null);
-const { getGoogleSessionManager } = ChromeUtils.import("resource://gdata-provider/modules/gdataSession.jsm", null);
+} = ChromeUtils.import("resource://gdata-provider/modules/gdataRequest.jsm");
+const { getGoogleSessionManager } = ChromeUtils.import("resource://gdata-provider/modules/gdataSession.jsm");
 const {
     ItemToJSON,
     JSONToItem,
     ItemSaver,
     checkResolveConflict,
     getGoogleId,
     getItemMetadata,
     saveItemMetadata,
     deleteItemMetadata,
     migrateItemMetadata,
     JSONToAlarm
-} = ChromeUtils.import("resource://gdata-provider/modules/gdataUtils.jsm", null);
+} = ChromeUtils.import("resource://gdata-provider/modules/gdataUtils.jsm");
 
 var cIOL = Ci.calIOperationListener;
 
 var MIN_REFRESH_INTERVAL = 30;
 
 /**
  * calGoogleCalendar
  * This Implements a calICalendar Object adapted to the Google Calendar
--- a/calendar/providers/gdata/content/browserRequest.js
+++ b/calendar/providers/gdata/content/browserRequest.js
@@ -3,17 +3,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Backwards compatibility with Thunderbird <60.
 if (!("Cc" in this)) {
     // eslint-disable-next-line mozilla/no-define-cc-etc, no-unused-vars
     const { interfaces: Ci } = Components;
 }
 
-var { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm", null);
+var { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm");
 
 /* exported cancelRequest, loadRequestedUrl, reportUserClosed */
 
 var wpl = Ci.nsIWebProgressListener;
 
 var reporterListener = {
     _isBusy: false,
     get securityButton() {
--- a/calendar/providers/gdata/content/gdata-calendar-creation.js
+++ b/calendar/providers/gdata/content/gdata-calendar-creation.js
@@ -3,19 +3,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Backwards compatibility with Thunderbird <60.
 if (!("Cc" in this)) {
     // eslint-disable-next-line mozilla/no-define-cc-etc, no-unused-vars
     const { utils: Cu } = Components;
 }
 
-var { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm", null);
-const { getGoogleSessionManager } = ChromeUtils.import("resource://gdata-provider/modules/gdataSession.jsm", null);
-const { monkeyPatch } = ChromeUtils.import("resource://gdata-provider/modules/gdataUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm");
+const { getGoogleSessionManager } = ChromeUtils.import("resource://gdata-provider/modules/gdataSession.jsm");
+const { monkeyPatch } = ChromeUtils.import("resource://gdata-provider/modules/gdataUtils.jsm");
 
 (function() {
     function pageorder(anchor, ...pages) {
         let wizard = document.documentElement;
         let page = wizard.getPageById(anchor);
         for (let id of pages) {
             page.next = id;
             page = wizard.getPageById(id);
--- a/calendar/providers/gdata/content/gdata-event-dialog-reminder.js
+++ b/calendar/providers/gdata/content/gdata-event-dialog-reminder.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/. */
 
 (function() {
     const FOUR_WEEKS_BEFORE = -2419200;
-    const { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm", null);
-    const { monkeyPatch } = ChromeUtils.import("resource://gdata-provider/modules/gdataUtils.jsm", null);
+    const { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm");
+    const { monkeyPatch } = ChromeUtils.import("resource://gdata-provider/modules/gdataUtils.jsm");
 
     // NOTE: This function exits early if its not a gdata calendar
     let item = window.arguments[0].item;
     let calendar = window.arguments[0].calendar;
     if (calendar.type != "gdata") {
         return;
     }
 
--- a/calendar/providers/gdata/content/gdata-lightning-item-iframe.js
+++ b/calendar/providers/gdata/content/gdata-lightning-item-iframe.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/. */
 
-const { monkeyPatch } = ChromeUtils.import("resource://gdata-provider/modules/gdataUtils.jsm", null);
+const { monkeyPatch } = ChromeUtils.import("resource://gdata-provider/modules/gdataUtils.jsm");
 
-var { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm", null);
+var { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm");
 
 (function() {
     monkeyPatch(window, "updateCalendar", function(protofunc, ...args) {
         let rv = protofunc.apply(this, args);
         let calendar = getCurrentCalendar();
         let isGoogleCalendar = (calendar.type == "gdata");
         let isTask = cal.item.isToDo(window.calendarItem);
         let isEvent = cal.item.isEvent(window.calendarItem);
--- a/calendar/providers/gdata/content/gdata-migration.js
+++ b/calendar/providers/gdata/content/gdata-migration.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 /* exported migrateSelectedCalendars */
 
 /**
  * Migrate the calendar selected in the wizard from ics to gdata.
  */
 function migrateSelectedCalendars() {
     let listbox = document.getElementById("calendars-listbox");
--- a/calendar/providers/gdata/modules/OAuth2.jsm
+++ b/calendar/providers/gdata/modules/OAuth2.jsm
@@ -8,21 +8,21 @@
 var EXPORTED_SYMBOLS = ["OAuth2"]; /* exported OAuth2 */
 
 // Backwards compatibility with Thunderbird <60.
 if (!("Cc" in this)) {
     // eslint-disable-next-line mozilla/no-define-cc-etc, no-unused-vars
     const { interfaces: Ci, results: Cr } = Components;
 }
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-const { Log4Moz } = ChromeUtils.import("resource:///modules/gloda/log4moz.js", null);
-const { httpRequest } = ChromeUtils.import("resource://gre/modules/Http.jsm", null);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Log4Moz } = ChromeUtils.import("resource:///modules/gloda/log4moz.js");
+const { httpRequest } = ChromeUtils.import("resource://gre/modules/Http.jsm");
 
-const { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm", null);
+const { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm");
 
 function parseURLData(aData) {
     let result = {};
     aData.split(/[?#]/, 2)[1].split("&").forEach((aParam) => {
         let [key, value] = aParam.split("=");
         result[key] = value;
     });
     return result;
--- a/calendar/providers/gdata/modules/calUtilsShim.jsm
+++ b/calendar/providers/gdata/modules/calUtilsShim.jsm
@@ -1,23 +1,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 // calAsyncUtils and calAlarmUtils should no longer be injected directly, so first check if it is
 // already on the cal object through newer calUtils.jsm
 if (typeof cal.async == "undefined") {
-    let { cal: temp } = ChromeUtils.import("resource://calendar/modules/calAsyncUtils.jsm", null);
+    let { cal: temp } = ChromeUtils.import("resource://calendar/modules/calAsyncUtils.jsm");
     cal.async = temp.async;
 }
 if (typeof cal.alarms == "undefined") {
-    let { cal: temp } = ChromeUtils.import("resource://calendar/modules/calAlarmUtils.jsm", null);
+    let { cal: temp } = ChromeUtils.import("resource://calendar/modules/calAlarmUtils.jsm");
     cal.alarms = temp.alarms;
 }
 
 this.EXPORTED_SYMBOLS = ["cal"];
 
 if (!cal.dtz) {
     cal.dtz = {
         get defaultTimezone() { return cal.calendarDefaultTimezone(); },
@@ -88,17 +88,17 @@ if (typeof cal.window == "undefined") {
 if (typeof cal.category == "undefined") {
     cal.category = {
         stringToArray: function(aStr) { return cal.categoriesStringToArray(aStr); },
         arrayToString: function(aArr) { return cal.categoriesArrayToString(aArr); }
     };
 }
 
 if (typeof cal.itip == "undefined") {
-    let { cal: temp } = ChromeUtils.import("resource://calendar/modules/calItipUtils.jsm", null);
+    let { cal: temp } = ChromeUtils.import("resource://calendar/modules/calItipUtils.jsm");
     cal.itip = temp.itip;
 }
 
 if (typeof cal.itip.isInvitation == "undefined") {
     cal.itip.isInvitation = function(aItem) { return cal.isInvitation(aItem); };
 }
 
 if (typeof cal.l10n == "undefined") {
--- a/calendar/providers/gdata/modules/gdataLogging.jsm
+++ b/calendar/providers/gdata/modules/gdataLogging.jsm
@@ -5,18 +5,18 @@
 var EXPORTED_SYMBOLS = ["LOGitem", "LOGverbose", "LOGinterval", "stringException"];
 
 // Backwards compatibility with Thunderbird <60.
 if (!("Cc" in this)) {
     // eslint-disable-next-line mozilla/no-define-cc-etc, no-unused-vars
     const { interfaces: Ci } = Components;
 }
 
-const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 function LOGverbose(aStr) {
     if (Preferences.get("calendar.debug.log.verbose", false)) {
         cal.LOG(aStr);
     }
 }
 
 function stringException(e) {
--- a/calendar/providers/gdata/modules/gdataRequest.jsm
+++ b/calendar/providers/gdata/modules/gdataRequest.jsm
@@ -3,21 +3,21 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Backwards compatibility with Thunderbird <60.
 if (!("Cc" in this)) {
     // eslint-disable-next-line mozilla/no-define-cc-etc, no-unused-vars
     const { classes: Cc, interfaces: Ci, results: Cr } = Components;
 }
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { PromiseUtils } = ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
-const { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm", null);
+const { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm");
 
 var API_BASE = {
     EVENTS: "https://www.googleapis.com/calendar/v3/",
     TASKS: "https://www.googleapis.com/tasks/v1/"
 };
 
 var EXPORTED_SYMBOLS = ["calGoogleRequest", "getCorrectedDate", "API_BASE"];
 
--- a/calendar/providers/gdata/modules/gdataSession.jsm
+++ b/calendar/providers/gdata/modules/gdataSession.jsm
@@ -3,32 +3,32 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Backwards compatibility with Thunderbird <60.
 if (!("Cc" in this)) {
     // eslint-disable-next-line mozilla/no-define-cc-etc, no-unused-vars
     const { classes: Cc, interfaces: Ci, results: Cr } = Components;
 }
 
-ChromeUtils.import("resource://gdata-provider/modules/OAuth2.jsm");
-const { getProviderString } = ChromeUtils.import("resource://gdata-provider/modules/gdataUtils.jsm", null);
-const { LOGinterval } = ChromeUtils.import("resource://gdata-provider/modules/gdataLogging.jsm", null);
+const { OAuth2 } = ChromeUtils.import("resource://gdata-provider/modules/OAuth2.jsm");
+const { getProviderString } = ChromeUtils.import("resource://gdata-provider/modules/gdataUtils.jsm");
+const { LOGinterval } = ChromeUtils.import("resource://gdata-provider/modules/gdataLogging.jsm");
 const {
     calGoogleRequest,
     API_BASE
-} = ChromeUtils.import("resource://gdata-provider/modules/gdataRequest.jsm", null);
+} = ChromeUtils.import("resource://gdata-provider/modules/gdataRequest.jsm");
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
-const { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm", null);
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { PromiseUtils } = ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
+const { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm");
 
-const { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm", null);
+const { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
 
-const { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm", null);
+const { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm");
 
 var cIFBI = Ci.calIFreeBusyInterval;
 var nIPM = Ci.nsIPermissionManager;
 
 var NOTIFY_TIMEOUT = 60 * 1000;
 
 var EXPORTED_SYMBOLS = ["getGoogleSessionManager"];
 
--- a/calendar/providers/gdata/modules/gdataUtils.jsm
+++ b/calendar/providers/gdata/modules/gdataUtils.jsm
@@ -7,25 +7,25 @@ if (!("Cc" in this)) {
     // eslint-disable-next-line mozilla/no-define-cc-etc, no-unused-vars
     const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
 }
 
 const {
     LOGitem,
     LOGverbose,
     stringException
-} = ChromeUtils.import("resource://gdata-provider/modules/gdataLogging.jsm", null);
-const { calGoogleRequest } = ChromeUtils.import("resource://gdata-provider/modules/gdataRequest.jsm", null);
-const { windowsTimezoneMap } = ChromeUtils.import("resource://gdata-provider/modules/timezoneMap.jsm", null);
+} = ChromeUtils.import("resource://gdata-provider/modules/gdataLogging.jsm");
+const { calGoogleRequest } = ChromeUtils.import("resource://gdata-provider/modules/gdataRequest.jsm");
+const { windowsTimezoneMap } = ChromeUtils.import("resource://gdata-provider/modules/timezoneMap.jsm");
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { PromiseUtils } = ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
 
-const { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm", null);
+const { cal } = ChromeUtils.import("resource://gdata-provider/modules/calUtilsShim.jsm");
 
 var FOUR_WEEKS_IN_MINUTES = 40320;
 
 var EXPORTED_SYMBOLS = [
     "ItemToJSON", "JSONToItem", "ItemSaver",
     "checkResolveConflict", "getGoogleId",
     "getItemMetadata", "saveItemMetadata",
     "deleteItemMetadata", "migrateItemMetadata",
--- a/calendar/providers/ics/calICSCalendar.js
+++ b/calendar/providers/ics/calICSCalendar.js
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 //
 // calICSCalendar.js
 //
 // This is a non-sync ics file. It reads the file pointer to by uri when set,
 // then writes it on updates. External changes to the file will be
 // ignored and overwritten.
 //
--- a/calendar/providers/memory/calMemoryCalendar.js
+++ b/calendar/providers/memory/calMemoryCalendar.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 //
 // calMemoryCalendar.js
 //
 
 var cICL = Ci.calIChangeLog;
 
 function calMemoryCalendar() {
--- a/calendar/providers/storage/calStorageCalendar.js
+++ b/calendar/providers/storage/calStorageCalendar.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/. */
 
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 const {
     DB_SCHEMA_VERSION,
     getSqlTable,
     upgradeDB
-} = ChromeUtils.import("resource://calendar/modules/calStorageUpgrade.jsm", null);
-const { CAL_ITEM_FLAG, newDateTime } = ChromeUtils.import("resource://calendar/modules/calStorageHelpers.jsm", null);
+} = ChromeUtils.import("resource://calendar/modules/calStorageUpgrade.jsm");
+const { CAL_ITEM_FLAG, newDateTime } = ChromeUtils.import("resource://calendar/modules/calStorageHelpers.jsm");
 
 var USECS_PER_SECOND = 1000000;
 var kCalICalendar = Ci.calICalendar;
 var cICL = Ci.calIChangeLog;
 
 //
 // calStorageCalendar
 //
--- a/calendar/providers/storage/calStorageHelpers.jsm
+++ b/calendar/providers/storage/calStorageHelpers.jsm
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /* exported CAL_ITEM_FLAG, getInUtcOrKeepFloating, dateToText, textToDate,
  *          calStorageTimezone, getTimezone, newDateTime
  */
 
 this.EXPORTED_SYMBOLS = [
     "CAL_ITEM_FLAG",
     "getInUtcOrKeepFloating",
--- a/calendar/providers/storage/calStorageUpgrade.jsm
+++ b/calendar/providers/storage/calStorageUpgrade.jsm
@@ -63,24 +63,24 @@
  *     failure and roll back the transaction.
  *
  * If this documentation isn't sufficient to make upgrading understandable,
  * please file a bug.
  */
 
 /* exported upgradeDB */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 const {
     CAL_ITEM_FLAG,
     textToDate,
     getTimezone,
     newDateTime
-} = ChromeUtils.import("resource://calendar/modules/calStorageHelpers.jsm", null);
+} = ChromeUtils.import("resource://calendar/modules/calStorageHelpers.jsm");
 
 // The current database version. Be sure to increment this when you create a new
 // updater.
 var DB_SCHEMA_VERSION = 22;
 
 var EXPORTED_SYMBOLS = ["DB_SCHEMA_VERSION", "getSql", "getAllSql", "getSqlTable", "upgradeDB", "backupDB"];
 
 /**
--- a/calendar/providers/wcap/calWcapCalendar.js
+++ b/calendar/providers/wcap/calWcapCalendar.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * The calendar provider class for WCAP calendars. Usually instanciated through
  * the calendar manager, but may also be created by the wcap session, hence the
  * following optional parameters.
  *
  * @param session       (optional) The calWcapSession for this calendar
  * @param calProps      (optional) The XML node containing the WCAP calendar properties
--- a/calendar/providers/wcap/calWcapCalendarItems.js
+++ b/calendar/providers/wcap/calWcapCalendarItems.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 calWcapCalendar.prototype.encodeAttendee = function(att) {
     if (LOG_LEVEL > 2) {
         log("attendee.icalProperty.icalString=" + att.icalProperty.icalString, this);
     }
     function encodeAttr(val, attr, params) {
         if (val && val.length > 0) {
             if (params.length > 0) {
--- a/calendar/providers/wcap/calWcapCalendarModule.js
+++ b/calendar/providers/wcap/calWcapCalendarModule.js
@@ -6,19 +6,19 @@
  *          calIWcapCalendar, calIWcapErrors, calICalendar, calIItemBase,
  *          calIOperationListener, calIFreeBusyProvider, calIFreeBusyInterval,
  *          calICalendarSearchProvider, calIErrors, g_privateItemTitle,
  *          g_confidentialItemTitle, g_busyItemTitle,
  *          g_busyPhantomItemUuidPrefix, CACHE_LAST_RESULTS,
  *          CACHE_LAST_RESULTS_INVALIDATE, LOG_LEVEL
  */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 //
 // init code for globals, prefs:
 //
 
 // constants:
 var NS_OK = Cr.NS_OK;
 var NS_ERROR_UNEXPECTED = Cr.NS_ERROR_UNEXPECTED;
--- a/calendar/providers/wcap/calWcapRequest.js
+++ b/calendar/providers/wcap/calWcapRequest.js
@@ -14,18 +14,18 @@
    The request function itself may return either
    - a further calIOperation request object, i.e. an async continuation
    - some data (incl null/undefined) which is the result of the async function,
      indicating that there is no further continuation
 */
 
 /* exported issueNetworkRequest, getWcapRequestStatusString, stringToIcal, stringToXml */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function generateRequestId() {
     if (!generateRequestId.mRequestPrefix) {
         generateRequestId.mRequestPrefix = cal.getUUID() + "-";
         generateRequestId.mRequestId = 0;
     }
     ++generateRequestId.mRequestId;
     return generateRequestId.mRequestPrefix + generateRequestId.mRequestId;
--- a/calendar/providers/wcap/calWcapSession.js
+++ b/calendar/providers/wcap/calWcapSession.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/. */
 
 /* exported getWcapSessionFor */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function calWcapTimezone(tzProvider, tzid_, component_) {
     this.wrappedJSObject = this;
     this.provider = tzProvider;
     this.icalComponent = component_;
     this.tzid = tzid_;
     this.isUTC = false;
     this.isFloating = false;
--- a/calendar/providers/wcap/calWcapUtils.js
+++ b/calendar/providers/wcap/calWcapUtils.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/. */
 
 /* exported getCalendarSearchService, getDomParser, isParent, filterXmlNodes,
  *          getIcalUTC, getDatetimeFromIcalProp, getWcapString
  */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var g_bShutdown = false;
 
 function initLogging() {
     initLogging.mLogTimezone = cal.dtz.defaultTimezone;
     if (initLogging.mLogFilestream) {
         try {
             initLogging.mLogFilestream.close();
--- a/calendar/resources/content/calendarCreation.js
+++ b/calendar/resources/content/calendarCreation.js
@@ -2,18 +2,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/. */
 
 /* exported initLocationPage, initCustomizePage, onSelectProvider,
  *          onInitialAdvance, doCreateCalendar, setCanRewindFalse
  */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var gCalendar;
 
 var errorConstants = {
     SUCCESS: 0,
     INVALID_URI: 1,
     ALREADY_EXISTS: 2
 };
--- a/calendar/resources/content/datetimepickers/datetimepickers.xml
+++ b/calendar/resources/content/datetimepickers/datetimepickers.xml
@@ -54,17 +54,17 @@
     <implementation>
       <field name="mRelativeDates">[]</field>
       <field name="mDayNames">[]</field>
       <field name="mRelationWords">[]</field>
       <field name="mMonthLongNames">[]</field>
       <field name="mMonthShortNames">[]</field>
 
       <constructor><![CDATA[
-          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
           let goButton = document.getAnonymousElementByAttribute(this, "anonid", "date-go-button");
           goButton.setAttribute("label", cal.l10n.getCalString("go"));
           // Load the stuff we're going to use to parse written dates
           this.mRelativeDates = [
               { word: cal.l10n.getCalString("today").toLowerCase(), offset: 0 },
               { word: cal.l10n.getCalString("yesterday").toLowerCase(), offset: -1 },
               { word: cal.l10n.getCalString("tomorrow").toLowerCase(), offset: 1 }];
           for (let i = 1; i <= 7; i++) {
@@ -406,17 +406,17 @@
         </xul:menulist>
       </xul:hbox>
     </content>
 
     <implementation>
       <field name="mForeverStr">null</field>
 
       <constructor><![CDATA[
-          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+          const { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
           this.mForeverStr = cal.l10n.getString("calendar-event-dialog", "eventRecurrenceForeverLabel");
           document.getAnonymousElementByAttribute(this, "anonid", "menuitemForever")
                   .setAttribute("label", this.mForeverStr);
       ]]></constructor>
 
       <method name="parseTextBoxDate">
         <parameter name="aRefresh"/>
--- a/calendar/resources/content/mouseoverPreviews.js
+++ b/calendar/resources/content/mouseoverPreviews.js
@@ -15,17 +15,17 @@
              getEventStatusString, getToDoStatusString */
 
 /**
  * PUBLIC: This changes the mouseover preview based on the start and end dates
  * of an occurrence of a (one-time or recurring) calEvent or calToDo.
  * Used by all grid views.
  */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 /**
  * PUBLIC: Displays a tooltip with details when hovering over an item in the views
  *
  * @param   {DOMEvent} occurrenceBoxMouseEvent  the triggering event
  * @returns {boolean}                           true, if the tooltip is displayed
  */
 function onMouseOverItem(occurrenceBoxMouseEvent) {
--- a/calendar/resources/content/publish.js
+++ b/calendar/resources/content/publish.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/. */
 
 /* exported publishCalendarData, publishCalendarDataDialogResponse,
  *          publishEntireCalendar, publishEntireCalendarDialogResponse
  */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * publishCalendarData
  * Show publish dialog, ask for URL and publish all selected items.
  */
 function publishCalendarData() {
     let args = {};
 
--- a/calendar/test/mozmill/cal-recurrence/testWeeklyNRecurrence.js
+++ b/calendar/test/mozmill/cal-recurrence/testWeeklyNRecurrence.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/. */
 
 var MODULE_NAME = "testWeeklyNRecurrence";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "item-editing-helpers", "window-helpers"];
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var TIMEOUT_MODAL_DIALOG, CALENDARNAME, EVENTPATH, EVENT_BOX, CANVAS_BOX;
 var helpersForController, handleOccurrencePrompt, switchToView, goToDate, invokeEventDialog;
 var viewForward, deleteCalendars, closeAllEventDialogs, createCalendar, menulistSelect;
 var REC_DLG_ACCEPT, REC_DLG_DAYS;
 var plan_for_modal_dialog, wait_for_modal_dialog;
 
 const HOUR = 8;
--- a/calendar/test/mozmill/cal-recurrence/testWeeklyUntilRecurrence.js
+++ b/calendar/test/mozmill/cal-recurrence/testWeeklyUntilRecurrence.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/. */
 
 var MODULE_NAME = "testWeeklyUntilRecurrence";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "item-editing-helpers", "window-helpers"];
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var SHORT_SLEEP, TIMEOUT_MODAL_DIALOG, CALENDARNAME, EVENTPATH, EVENT_BOX, CANVAS_BOX;
 var helpersForController, handleOccurrencePrompt, switchToView, goToDate, invokeEventDialog;
 var viewForward, closeAllEventDialogs, deleteCalendars, createCalendar, menulistSelect;
 var REC_DLG_DAYS, REC_DLG_ACCEPT, REC_DLG_UNTIL_INPUT;
 var plan_for_modal_dialog, wait_for_modal_dialog;
 
 const ENDDATE = new Date(2009, 0, 26); // Last Monday in month.
--- a/calendar/test/mozmill/cal-recurrence/testWeeklyWithExceptionRecurrence.js
+++ b/calendar/test/mozmill/cal-recurrence/testWeeklyWithExceptionRecurrence.js
@@ -10,17 +10,17 @@ var TIMEOUT_MODAL_DIALOG, CALENDARNAME, 
 var DAY_VIEW, WEEK_VIEW, EVENTPATH;
 var helpersForController, handleOccurrencePrompt, switchToView, goToDate;
 var invokeEventDialog, viewForward, closeAllEventDialogs, deleteCalendars, createCalendar;
 var menulistSelect;
 var REPEAT_DETAILS, REC_DLG_ACCEPT, REC_DLG_DAYS;
 var helpersForEditUI, setData;
 var plan_for_modal_dialog, wait_for_modal_dialog;
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 const HOUR = 8;
 const STARTDATE = new Date(2009, 0, 6);
 
 function setupModule(module) {
     controller = mozmill.getMail3PaneController();
     ({
         TIMEOUT_MODAL_DIALOG,
--- a/calendar/test/mozmill/eventDialog/testEventDialog.js
+++ b/calendar/test/mozmill/eventDialog/testEventDialog.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/. */
 
 var MODULE_NAME = "testEventDialog";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "item-editing-helpers", "window-helpers"];
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var TIMEOUT_MODAL_DIALOG, CALENDARNAME, EVENTPATH, EVENT_BOX, CANVAS_BOX;
 var helpersForController, handleOccurrencePrompt, switchToView, goToDate, lookupEventBox;
 var invokeEventDialog, checkAlarmIcon, viewBack, closeAllEventDialogs, deleteCalendars;
 var createCalendar;
 var EVENT_TABPANELS, ATTENDEES_ROW;
 var helpersForEditUI, setData;
 var plan_for_modal_dialog, wait_for_modal_dialog;
--- a/calendar/test/mozmill/eventDialog/testEventDialogModificationPrompt.js
+++ b/calendar/test/mozmill/eventDialog/testEventDialogModificationPrompt.js
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var MODULE_NAME = "testEventDialogModificationPrompt";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "item-editing-helpers",
     "window-helpers", "folder-display-helpers"];
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var CALENDARNAME, EVENT_BOX, CANVAS_BOX, EVENTPATH;
 var helpersForController, invokeEventDialog, createCalendar, closeAllEventDialogs, deleteCalendars;
 var goToDate;
 var setData;
 var plan_for_modal_dialog, wait_for_modal_dialog;
 var mark_failure;
 
--- a/calendar/test/mozmill/eventDialog/testEventDialogSize.js
+++ b/calendar/test/mozmill/eventDialog/testEventDialogSize.js
@@ -4,17 +4,17 @@
 
 var MODULE_NAME = "testEventDialogSize";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "window-helpers"];
 
 var helpersForController, invokeEventDialog, createCalendar, closeAllEventDialogs, deleteCalendars;
 var CALENDARNAME;
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 const SMALL_TOLERANCE = 5;
 const LARGE_TOLERANCE = 10;
 
 function setupModule(module) {
     controller = mozmill.getMail3PaneController();
     ({
         helpersForController,
--- a/calendar/test/mozmill/eventDialog/testUTF8.js
+++ b/calendar/test/mozmill/eventDialog/testUTF8.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/. */
 
 var MODULE_NAME = "testUTF8";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "item-editing-helpers"];
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 var EVENT_BOX, CANVAS_BOX;
 var helpersForController, invokeEventDialog, closeAllEventDialogs, createCalendar, deleteCalendars;
 var setData;
 
 var UTF8STRING = " 💣 💥  ☣  ";
 
 function setupModule(module) {
--- a/calendar/test/mozmill/recurrenceRotated/testWeeklyNRecurrence.js
+++ b/calendar/test/mozmill/recurrenceRotated/testWeeklyNRecurrence.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/. */
 
 var MODULE_NAME = "testWeeklyNRecurrenceRotated";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "item-editing-helpers", "window-helpers"];
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var TIMEOUT_MODAL_DIALOG, CALENDARNAME, EVENTPATH, EVENT_BOX, CANVAS_BOX;
 var helpersForController, handleOccurrencePrompt, switchToView, goToDate;
 var invokeEventDialog, viewForward, closeAllEventDialogs, deleteCalendars, createCalendar, menulistSelect;
 var REC_DLG_ACCEPT, REC_DLG_DAYS;
 var plan_for_modal_dialog, wait_for_modal_dialog;
 
 const HOUR = 8;
--- a/calendar/test/mozmill/recurrenceRotated/testWeeklyUntilRecurrence.js
+++ b/calendar/test/mozmill/recurrenceRotated/testWeeklyUntilRecurrence.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/. */
 
 var MODULE_NAME = "testWeeklyUntilRecurrenceRotated";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "item-editing-helpers", "window-helpers"];
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var SHORT_SLEEP, TIMEOUT_MODAL_DIALOG, CALENDARNAME, EVENTPATH, EVENT_BOX, CANVAS_BOX;
 var helpersForController, handleOccurrencePrompt, switchToView, goToDate;
 var invokeEventDialog, viewForward, closeAllEventDialogs, deleteCalendars, createCalendar, menulistSelect;
 var REC_DLG_DAYS, REC_DLG_ACCEPT, REC_DLG_UNTIL_INPUT;
 var plan_for_modal_dialog, wait_for_modal_dialog;
 
 const ENDDATE = new Date(2009, 0, 26); // last Monday in month
--- a/calendar/test/mozmill/recurrenceRotated/testWeeklyWithExceptionRecurrence.js
+++ b/calendar/test/mozmill/recurrenceRotated/testWeeklyWithExceptionRecurrence.js
@@ -10,17 +10,17 @@ var TIMEOUT_MODAL_DIALOG, CALENDARNAME, 
 var DAY_VIEW, WEEK_VIEW, EVENTPATH;
 var helpersForController, handleOccurrencePrompt, switchToView, goToDate;
 var invokeEventDialog, viewForward, closeAllEventDialogs, deleteCalendars, createCalendar;
 var menulistSelect;
 var REPEAT_DETAILS, REC_DLG_ACCEPT, REC_DLG_DAYS;
 var helpersForEditUI, setData;
 var plan_for_modal_dialog, wait_for_modal_dialog;
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 const HOUR = 8;
 const STARTDATE = new Date(2009, 0, 6);
 
 function setupModule(module) {
     controller = mozmill.getMail3PaneController();
     ({
         TIMEOUT_MODAL_DIALOG,
--- a/calendar/test/mozmill/shared-modules/test-calendar-utils.js
+++ b/calendar/test/mozmill/shared-modules/test-calendar-utils.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/. */
 
 var MODULE_NAME = "calendar-utils";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["window-helpers", "folder-display-helpers", "pref-window-helpers"];
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var os = {};
 ChromeUtils.import("chrome://mozmill/content/stdlib/os.js", os);
 var frame = {};
 ChromeUtils.import("chrome://mozmill/content/modules/frame.js", frame);
 var utils = {};
 ChromeUtils.import("chrome://mozmill/content/modules/utils.js", utils);
 
 var SHORT_SLEEP = 100;
--- a/calendar/test/mozmill/shared-modules/test-item-editing-helpers.js
+++ b/calendar/test/mozmill/shared-modules/test-item-editing-helpers.js
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var MODULE_NAME = "item-editing-helpers";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "window-helpers"];
 
 var EventUtils = {};
 ChromeUtils.import("chrome://mozmill/content/stdlib/EventUtils.js", EventUtils);
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var SHORT_SLEEP, TIMEOUT_MODAL_DIALOG;
 var helpersForController, menulistSelect;
 var plan_for_modal_dialog, wait_for_modal_dialog;
 
 function setupModule(module) {
     controller = mozmill.getMail3PaneController();
     ({
--- a/calendar/test/mozmill/testAlarmDefaultValue.js
+++ b/calendar/test/mozmill/testAlarmDefaultValue.js
@@ -5,19 +5,19 @@
 /**
  * Test default alarm settings for events and tasks
  */
 
 var MODULE_NAME = "testAlarmDefaultValue";
 var RELATIVE_ROOT = "./shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "content-tab-helpers"];
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { PluralForm } = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 const DEFVALUE = 43;
 
 var helpersForController, invokeEventDialog, openLightningPrefs, menulistSelect;
 var plan_for_modal_dialog, wait_for_modal_dialog;
 
 function setupModule(module) {
     controller = mozmill.getMail3PaneController();
--- a/calendar/test/mozmill/testBasicFunctionality.js
+++ b/calendar/test/mozmill/testBasicFunctionality.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/. */
 
 var MODULE_NAME = "testBasicFunctionality";
 var RELATIVE_ROOT = "./shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "window-helpers"];
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var TIMEOUT_MODAL_DIALOG, CALENDARNAME, CALENDAR_PANEL, DAY_VIEW, DAYBOX, MINIMONTH, CALENDARLIST;
 var helpersForController, switchToView, deleteCalendars, handleNewCalendarWizard;
 var plan_for_modal_dialog, wait_for_modal_dialog;
 
 function setupModule(module) {
     controller = mozmill.getMail3PaneController();
     ({
--- a/calendar/test/mozmill/testLocalICS.js
+++ b/calendar/test/mozmill/testLocalICS.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/. */
 
 var MODULE_NAME = "testLocalICS";
 var RELATIVE_ROOT = "./shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "item-editing-helpers", "window-helpers"];
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var TIMEOUT_MODAL_DIALOG, CANVAS_BOX, EVENT_BOX;
 var helpersForController, invokeEventDialog, deleteCalendars, handleNewCalendarWizard;
 var setData;
 var plan_for_modal_dialog, wait_for_modal_dialog;
 
 const HOUR = 8;
 var calendarName, calendarTitle, calendarFile;
--- a/calendar/test/mozmill/testTimezones.js
+++ b/calendar/test/mozmill/testTimezones.js
@@ -16,17 +16,17 @@ var DATES = [
     [2009, 7, 2], [2009, 10, 15], [2009, 10, 29], [2009, 11, 5]
 ];
 
 var TIMEZONES = [
     "America/St_Johns", "America/Caracas", "America/Phoenix", "America/Los_Angeles",
     "America/Argentina/Buenos_Aires", "Europe/Paris", "Asia/Kathmandu", "Australia/Adelaide"
 ];
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 function setupModule(module) {
     controller = mozmill.getMail3PaneController();
     ({
         CANVAS_BOX,
         DAY_VIEW,
         helpersForController,
         invokeEventDialog,
--- a/calendar/test/mozmill/testTodayPane.js
+++ b/calendar/test/mozmill/testTodayPane.js
@@ -6,17 +6,17 @@ var MODULE_NAME = "testTodayPane";
 var RELATIVE_ROOT = "./shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "item-editing-helpers"];
 
 var CALENDARNAME, CANVAS_BOX, DAY_VIEW, LABELDAYBOX, TODAY_BUTTON, TODAY_PANE, AGENDA_LISTBOX;
 var helpersForController, invokeEventDialog, viewForward, createCalendar;
 var deleteCalendars;
 var setData;
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function setupModule(module) {
     controller = mozmill.getMail3PaneController();
     ({
         CALENDARNAME,
         CANVAS_BOX,
         DAY_VIEW,
         LABELDAYBOX,
--- a/calendar/test/mozmill/views/testDayView.js
+++ b/calendar/test/mozmill/views/testDayView.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/. */
 
 var MODULE_NAME = "testDayView";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "item-editing-helpers"];
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var CALENDARNAME, CANVAS_BOX, EVENT_BOX, DAY_VIEW, LABELDAYBOX, EVENTPATH;
 var helpersForController, invokeEventDialog, getEventDetails, createCalendar;
 var closeAllEventDialogs, deleteCalendars, goToDate, lookupEventBox;
 var helpersForEditUI, setData;
 
 const TITLE1 = "Day View Event";
 const TITLE2 = "Day View Event Changed";
--- a/calendar/test/mozmill/views/testMonthView.js
+++ b/calendar/test/mozmill/views/testMonthView.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/. */
 
 var MODULE_NAME = "testMonthView";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "item-editing-helpers"];
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var CALENDARNAME, EVENT_BOX, CANVAS_BOX, MONTH_VIEW, EVENTPATH;
 var helpersForController, switchToView, invokeEventDialog, getEventDetails, createCalendar;
 var closeAllEventDialogs, deleteCalendars, goToDate, lookupEventBox;
 var helpersForEditUI, setData;
 
 const TITLE1 = "Month View Event";
 const TITLE2 = "Month View Event Changed";
--- a/calendar/test/mozmill/views/testMultiweekView.js
+++ b/calendar/test/mozmill/views/testMultiweekView.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/. */
 
 var MODULE_NAME = "testMultiweekView";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "item-editing-helpers"];
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var CALENDARNAME, EVENT_BOX, CANVAS_BOX, MULTIWEEK_VIEW, EVENTPATH;
 var helpersForController, switchToView, invokeEventDialog, getEventDetails, createCalendar;
 var closeAllEventDialogs, deleteCalendars, goToDate, lookupEventBox;
 var helpersForEditUI, setData;
 
 const TITLE1 = "Multiweek View Event";
 const TITLE2 = "Multiweek View Event Changed";
--- a/calendar/test/mozmill/views/testWeekView.js
+++ b/calendar/test/mozmill/views/testWeekView.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/. */
 
 var MODULE_NAME = "testWeekView";
 var RELATIVE_ROOT = "../shared-modules";
 var MODULE_REQUIRES = ["calendar-utils", "item-editing-helpers"];
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 var CALENDARNAME, CANVAS_BOX, EVENT_BOX, WEEK_VIEW, EVENTPATH;
 var helpersForController, switchToView, invokeEventDialog, getEventDetails, createCalendar;
 var closeAllEventDialogs, deleteCalendars, goToDate, lookupEventBox;
 var helpersForEditUI, setData;
 
 var TITLE1 = "Week View Event";
 var TITLE2 = "Week View Event Changed";
--- a/calendar/test/unit/head_consts.js
+++ b/calendar/test/unit/head_consts.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/. */
 
 /* exported do_calendar_startup, do_load_calmgr, do_load_timezoneservice, readJSONFile,
  *          ics_unfoldline, dedent, compareItemsSpecific, getStorageCal, getMemoryCal,
  *          createTodoFromIcalString, createEventFromIcalString, createDate, Cc, Ci, Cr, Cu
  */
 
-ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+var { AppConstants } = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { FileUtils } = ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
+var { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-ChromeUtils.import("resource://testing-common/AppInfo.jsm");
+var { getAppInfo, newAppInfo, updateAppInfo } = ChromeUtils.import("resource://testing-common/AppInfo.jsm");
 
 ChromeUtils.defineModuleGetter(this, "NetUtil", "resource://gre/modules/NetUtil.jsm");
 
 updateAppInfo();
 
 (function() {
     let manager = Cc["@mozilla.org/component-manager-extra;1"].getService(Ci.nsIComponentManagerExtra);
 
@@ -42,17 +42,17 @@ updateAppInfo();
         manager.addLegacyExtensionManifestLocation(bindir);
     }
 
     // Make sure to load the backend loader as early as possible, as xpcshell doesn't have the
     // normal app flow with profile-after-change et al.
     Cc["@mozilla.org/calendar/backend-loader;1"].getService();
 })();
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function createDate(aYear, aMonth, aDay, aHasTime, aHour, aMinute, aSecond, aTimezone) {
     let date = Cc["@mozilla.org/calendar/datetime;1"].createInstance(Ci.calIDateTime);
     date.resetTo(aYear,
                aMonth,
                aDay,
                aHour || 0,
                aMinute || 0,
--- a/calendar/test/unit/head_icaljs.js
+++ b/calendar/test/unit/head_icaljs.js
@@ -1,6 +1,6 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 Preferences.set("calendar.icaljs", true);
--- a/calendar/test/unit/head_libical.js
+++ b/calendar/test/unit/head_libical.js
@@ -1,6 +1,6 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 Preferences.set("calendar.icaljs", false);
--- a/calendar/test/unit/test_alarmservice.js
+++ b/calendar/test/unit/test_alarmservice.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var EXPECT_NONE = 0;
 var EXPECT_FIRED = 1;
 var EXPECT_TIMER = 2;
 
 function do_check_xor(a, b, aMessage) { return ok((a && !b) || (!a && b), aMessage); }
 
 var alarmObserver = {
--- a/calendar/test/unit/test_alarmutils.js
+++ b/calendar/test/unit/test_alarmutils.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function run_test() {
     do_calendar_startup(run_next_test);
 }
 
 add_task(async function test_setDefaultValues_events() {
     let item, alarm;
 
--- a/calendar/test/unit/test_attachment.js
+++ b/calendar/test/unit/test_attachment.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function run_test() {
     test_serialize();
     test_hashes();
     test_uriattach();
     test_binaryattach();
 }
 
--- a/calendar/test/unit/test_bug1199942.js
+++ b/calendar/test/unit/test_bug1199942.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function run_test() {
     // Test the graceful handling of attendee ids for bug 1199942
     createAttendee_test();
     serializeEvent_test();
 }
 
 function createAttendee_test() {
--- a/calendar/test/unit/test_bug1204255.js
+++ b/calendar/test/unit/test_bug1204255.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function run_test() {
     // Test attendee duplicate handling for bug 1204255
     test_newAttendee();
     test_fromICS();
 }
 
 function test_newAttendee() {
--- a/calendar/test/unit/test_bug1209399.js
+++ b/calendar/test/unit/test_bug1209399.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function run_test() {
     // Test handling for multiple double quotes leading/trailing to attendee CN for bug 1209399
     test_newAttendee();
     test_fromICS();
 }
 
 function test_newAttendee() {
--- a/calendar/test/unit/test_bug523860.js
+++ b/calendar/test/unit/test_bug523860.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 function run_test() {
     // In bug 523860, we found out that in the spec doublequotes should not be
     // escaped.
     let prop = cal.getIcsService().createIcalProperty("DESCRIPTION");
     let expected = "A String with \"quotes\" and 'other quotes'";
 
     prop.value = expected;
--- a/calendar/test/unit/test_calmgr.js
+++ b/calendar/test/unit/test_calmgr.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 /**
  * Tests the calICalendarManager interface
  */
 function run_test() {
     do_calendar_startup(run_next_test);
 }
 
--- a/calendar/test/unit/test_datetimeformatter.js
+++ b/calendar/test/unit/test_datetimeformatter.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 function run_test() {
     do_calendar_startup(run_next_test);
 }
 
 // This test assumes the timezone of your system is not set to Pacific/Fakaofo or equivalent.
 
 // Time format is platform dependent, so we use alternative result sets here in 'expected'.
--- a/calendar/test/unit/test_extract.js
+++ b/calendar/test/unit/test_extract.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/. */
 
-const { Extractor } = ChromeUtils.import("resource://calendar/modules/calExtract.jsm", null);
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Extractor } = ChromeUtils.import("resource://calendar/modules/calExtract.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 var extractor = new Extractor("en-US", 8);
 
 function run_test() {
     // Sanity check to make sure the base url is still right. If this fails,
     // don't forget to also fix the url in base/content/calendar-extract.js.
     ok(extractor.checkBundle("en-US"));
 
--- a/calendar/test/unit/test_gdata_provider.js
+++ b/calendar/test/unit/test_gdata_provider.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/. */
 
 (function() {
-    ChromeUtils.import("resource://gre/modules/Services.jsm");
+    const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
     Services.prefs.setBoolPref("javascript.options.showInConsole", true);
     Services.prefs.setBoolPref("browser.dom.window.dump.enabled", true);
     Services.prefs.setBoolPref("calendar.debug.log", true);
     Services.prefs.setBoolPref("calendar.debug.log.verbose", true);
 
     let xpiFile;
     let env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
     if (env.exists("MOZ_FETCHES_DIR")) {
@@ -20,27 +20,27 @@
         xpiFile.append("{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}");
     }
 
     dump("Loading " + xpiFile.path + "\n");
     let manager = Cc["@mozilla.org/component-manager-extra;1"].getService(Ci.nsIComponentManagerExtra);
     manager.addLegacyExtensionManifestLocation(xpiFile);
 })();
 
-const { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js", null);
-ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js");
+const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
-const { getGoogleSessionManager } = ChromeUtils.import("resource://gdata-provider/modules/gdataSession.jsm", null);
+const { getGoogleSessionManager } = ChromeUtils.import("resource://gdata-provider/modules/gdataSession.jsm");
 const {
     dateToJSON,
     JSONToDate,
     monkeyPatch
-} = ChromeUtils.import("resource://gdata-provider/modules/gdataUtils.jsm", null);
-ChromeUtils.import("resource://testing-common/MockRegistrar.jsm");
+} = ChromeUtils.import("resource://gdata-provider/modules/gdataUtils.jsm");
+const { MockRegistrar } = ChromeUtils.import("resource://testing-common/MockRegistrar.jsm");
 
 var gServer;
 
 var MockConflictPrompt = {
     _origFunc: null,
     overwrite: false,
     register: function() {
         if (!this._origFunc) {
--- a/calendar/test/unit/test_hashedarray.js
+++ b/calendar/test/unit/test_hashedarray.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calHashedArray.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calHashedArray.jsm");
 
 function run_test() {
     test_array_base();
     test_array_sorted();
     test_hashAccessor();
 }
 
 /**
--- a/calendar/test/unit/test_imip.js
+++ b/calendar/test/unit/test_imip.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var calItipEmailTransport = {};
 Services.scriptloader.loadSubScript(
     "resource://calendar/components/calItipEmailTransport.js",
     calItipEmailTransport);
 
 function itipItemForTest(title, seq) {
     let itipItem = Cc["@mozilla.org/calendar/itip-item;1"].createInstance(Ci.calIItipItem);
     itipItem.init([
--- a/calendar/test/unit/test_itip_utils.js
+++ b/calendar/test/unit/test_itip_utils.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/. */
 
-var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm", null);
+var { cal } = ChromeUtils.import("resource://calendar/modules/calUtils.jsm");
 
 // tests for calItipUtils.jsm
 
 function run_test() {
     test_getMessageSender();
     test_getSequence();
     test_getStamp();
     test_compareSequence();
--- a/calendar/test/unit/test_l10n_utils.js
+++ b/calendar/test/unit/test_l10n_utils.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
-ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function run_test() {
     do_calendar_startup(run_next_test);
 }
 
 // tests for calL10NUtils.jsm
 /* Incomplete - still missing test coverage for:
    * getAnyString
--- a/calendar/test/unit/test_ltninvitationutils.js
+++ b/calendar/test/unit/test_ltninvitationutils.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/. */
 
-const { ltn } = ChromeUtils.import("resource://calendar/modules/ltnInvitationUtils.jsm", null);
-ChromeUtils.import("resource:///modules/MailServices.jsm");
-ChromeUtils.import("resource://gre/modules/Preferences.jsm");
+const { ltn } = ChromeUtils.import("resource://calendar/modules/ltnInvitationUtils.jsm");
+const { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm");
+const { Preferences } = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 function run_test() {
     do_calendar_startup(run_next_test);
 }
 
 // tests for ltnInvitationUtils.jsm
 
 function getIcs(aAsArray=false) {
--- a/calendar/test/unit/test_recurrence_utils.js
+++ b/calendar/test/unit/test_recurrence_utils.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/. */
 
-const { countOccurrences } = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm", null);
+const { countOccurrences } = ChromeUtils.import("resource://calendar/modules/calRecurrenceUtils.jsm");
 
 function run_test() {
     do_calendar_startup(run_next_test);
 }
 
 // tests for calRecurrenceUtils.jsm
 /* Incomplete - still missing test coverage for:
    * recurrenceRule2String
--- a/calendar/test/unit/test_webcal.js
+++ b/calendar/test/unit/test_webcal.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
-const { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js", null);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
+const { HttpServer } = ChromeUtils.import("resource://testing-common/httpd.js");
 
 function run_test() {
     let httpserv = new HttpServer();
     httpserv.registerPrefixHandler("/", {
         handle: function(request, response) {
             response.setStatusLine(request.httpVersion, 200, "OK");
             equal(request.path, "/test_webcal");
         }