Bug 1557504 - remove [array] use in xpidl from calICalendarManager.idl and calICalendar.idl. r=pmorris
authorKhushil Mistry <khushil324@gmail.com>
Mon, 18 Nov 2019 13:14:00 +0100
changeset 37546 2a0f5703a010e69efcaf1bdde30f17e890ce03a0
parent 37545 65758d4222c29d8f8f85841e26b2c1fac4fbaa17
child 37547 1628c49941d6699b96b2fff5688c9b8625133f4b
push id396
push userclokep@gmail.com
push dateMon, 06 Jan 2020 23:11:57 +0000
reviewerspmorris
bugs1557504
Bug 1557504 - remove [array] use in xpidl from calICalendarManager.idl and calICalendar.idl. r=pmorris
calendar/base/content/agenda-listbox-utils.js
calendar/base/content/calendar-base-view.js
calendar/base/content/calendar-clipboard.js
calendar/base/content/calendar-command-controller.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-task-tree.js
calendar/base/content/calendar-ui-utils.js
calendar/base/content/calendar-unifinder.js
calendar/base/content/calendar-views-utils.js
calendar/base/content/dialogs/calendar-creation.js
calendar/base/content/dialogs/calendar-invitations-dialog.js
calendar/base/content/dialogs/calendar-migration-dialog.js
calendar/base/content/dialogs/calendar-print-dialog.js
calendar/base/content/dialogs/calendar-providerUninstall-dialog.js
calendar/base/content/dialogs/calendar-subscriptions-dialog.js
calendar/base/content/dialogs/chooseCalendarDialog.js
calendar/base/content/import-export.js
calendar/base/content/widgets/calendar-minimonth.js
calendar/base/modules/utils/calAsyncUtils.jsm
calendar/base/modules/utils/calItipUtils.jsm
calendar/base/modules/utils/calViewUtils.jsm
calendar/base/public/calICalendar.idl
calendar/base/public/calICalendarManager.idl
calendar/base/src/calAlarmService.js
calendar/base/src/calCachedCalendar.js
calendar/base/src/calCalendarManager.js
calendar/base/src/calFilter.js
calendar/base/src/calTransactionManager.js
calendar/lightning/components/calItipProtocolHandler.js
calendar/lightning/content/imip-bar.js
calendar/lightning/content/lightning-item-iframe.js
calendar/lightning/content/messenger-overlay-sidebar.js
calendar/providers/caldav/calDavCalendar.js
calendar/providers/composite/calCompositeCalendar.js
calendar/providers/ics/calICSCalendar.js
calendar/providers/memory/calMemoryCalendar.js
calendar/providers/storage/calStorageCalendar.js
calendar/providers/wcap/calWcapCalendarItems.js
calendar/providers/wcap/calWcapSession.js
calendar/resources/content/calendarCreation.js
calendar/resources/content/publish.js
calendar/test/browser/browser_calendarList.js
calendar/test/browser/browser_import.js
calendar/test/modules/CalendarUtils.jsm
calendar/test/unit/test_bug494140.js
calendar/test/unit/test_calmgr.js
calendar/test/unit/test_providers.js
calendar/test/unit/test_storage.js
--- a/calendar/base/content/agenda-listbox-utils.js
+++ b/calendar/base/content/agenda-listbox-utils.js
@@ -620,17 +620,17 @@ agendaListbox.refreshCalendarQuery = fun
         this.agendaListbox.mPendingRefreshJobs.delete(this.calId);
       }
 
       if (!this.cancelled) {
         setCurrentEvent();
       }
     },
 
-    onGetResult: function(aOpCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+    onGetResult: function(aOpCalendar, aStatus, aItemType, aDetail, aItems) {
       if (this.cancelled || !Components.isSuccessCode(aStatus)) {
         return;
       }
       for (let item of aItems) {
         this.agendaListbox.addItem(item);
       }
     },
 
--- a/calendar/base/content/calendar-base-view.js
+++ b/calendar/base/content/calendar-base-view.js
@@ -216,17 +216,17 @@
         this.calView.mPendingRefreshJobs.delete(this.calId);
       }
 
       if (!this.cancelled) {
         this.calView.fireEvent("viewloaded", operationType);
       }
     }
 
-    onGetResult(opCalendar, status, itemType, detail, count, items) {
+    onGetResult(opCalendar, status, itemType, detail, items) {
       if (this.cancelled || !Components.isSuccessCode(status)) {
         return;
       }
 
       for (const item of items) {
         if (!cal.item.isToDo(item) || item.entryDate || item.dueDate) {
           this.calView.doAddItem(item);
         }
--- a/calendar/base/content/calendar-clipboard.js
+++ b/calendar/base/content/calendar-clipboard.js
@@ -27,17 +27,17 @@ function canPaste() {
       !cal.acl.isCalendarWritable(selectedCal) ||
       !cal.acl.userCanAddItemsToCalendar(selectedCal)
     ) {
       return false;
     }
   } else {
     let calendars = cal
       .getCalendarManager()
-      .getCalendars({})
+      .getCalendars()
       .filter(cal.acl.isCalendarWritable)
       .filter(cal.acl.userCanAddItemsToCalendar);
     if (!calendars.length) {
       return false;
     }
   }
 
   const flavors = ["text/calendar", "text/unicode"];
@@ -229,17 +229,17 @@ function pasteFromClipboard() {
             pasteText += "s";
           }
         }
         let validPasteText = pasteText != "paste" && !pasteText.endsWith("Item");
         pasteText += items.length == withAttendees.length ? "Only" : "Also";
 
         let calendars = cal
           .getCalendarManager()
-          .getCalendars({})
+          .getCalendars()
           .filter(cal.acl.isCalendarWritable)
           .filter(cal.acl.userCanAddItemsToCalendar)
           .filter(aCal => {
             let status = aCal.getProperty("currentStatus");
             return Components.isSuccessCode(status);
           });
         if (calendars.length > 1) {
           let args = {};
--- a/calendar/base/content/calendar-command-controller.js
+++ b/calendar/base/content/calendar-command-controller.js
@@ -540,17 +540,17 @@ var calendarController = {
 
   /**
    * Returns a boolean indicating if its possible to write items to any
    * calendar.
    */
   get writable() {
     return cal
       .getCalendarManager()
-      .getCalendars({})
+      .getCalendars()
       .some(cal.acl.isCalendarWritable);
   },
 
   /**
    * Returns a boolean indicating if the application is currently in offline
    * mode.
    */
   get offline() {
@@ -582,17 +582,17 @@ var calendarController = {
   },
 
   /**
    * Returns a boolean indicating if there are cached calendars and thus that don't require
    * network access.
    */
   get has_cached_calendars() {
     let calMgr = cal.getCalendarManager();
-    let calendars = calMgr.getCalendars({});
+    let calendars = calMgr.getCalendars();
     for (let calendar of calendars) {
       if (calendar.getProperty("cache.enabled") || calendar.getProperty("cache.always")) {
         return true;
       }
     }
     return false;
   },
 
@@ -604,17 +604,17 @@ var calendarController = {
   },
 
   /**
    * Returns a boolean indicating that all local calendars are readonly
    */
   get all_local_calendars_readonly() {
     // We might want to speed this part up by keeping track of this in the
     // calendar manager.
-    let calendars = cal.getCalendarManager().getCalendars({});
+    let calendars = cal.getCalendarManager().getCalendars();
     let count = calendars.length;
     for (let calendar of calendars) {
       if (!cal.acl.isCalendarWritable(calendar)) {
         count--;
       }
     }
     return count == 0;
   },
@@ -886,17 +886,17 @@ function calendarUpdateNewItemsCommand()
     "calendar_new_todo_todaypane_command",
   ];
 
   // re-calculate command status
   CalendarNewEventsCommandEnabled = false;
   CalendarNewTasksCommandEnabled = false;
   let calendars = cal
     .getCalendarManager()
-    .getCalendars({})
+    .getCalendars()
     .filter(cal.acl.isCalendarWritable)
     .filter(cal.acl.userCanAddItemsToCalendar);
   if (calendars.some(cal.item.isEventCalendar)) {
     CalendarNewEventsCommandEnabled = true;
   }
   if (calendars.some(cal.item.isTaskCalendar)) {
     CalendarNewTasksCommandEnabled = true;
   }
--- a/calendar/base/content/calendar-invitations-manager.js
+++ b/calendar/base/content/calendar-invitations-manager.js
@@ -120,17 +120,17 @@ InvitationsManager.prototype = {
     if (operationListener2) {
       listeners.push(operationListener2);
     }
 
     gInvitationsRequestManager.cancelPendingRequests();
     this.updateStartDate();
     this.deleteAllItems();
 
-    let cals = cal.getCalendarManager().getCalendars({});
+    let cals = cal.getCalendarManager().getCalendars();
 
     let opListener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
       mCount: cals.length,
       mRequestManager: gInvitationsRequestManager,
       mInvitationsManager: this,
       mHandledItems: {},
 
@@ -144,17 +144,16 @@ InvitationsManager.prototype = {
             try {
               if (this.mInvitationsManager.mItemList.length) {
                 // Only call if there are actually items
                 listener.onGetResult(
                   null,
                   Cr.NS_OK,
                   Ci.calIItemBase,
                   null,
-                  this.mInvitationsManager.mItemList.length,
                   this.mInvitationsManager.mItemList
                 );
               }
               listener.onOperationComplete(
                 null,
                 Cr.NS_OK,
                 Ci.calIOperationListener.GET,
                 null,
@@ -162,17 +161,17 @@ InvitationsManager.prototype = {
               );
             } catch (exc) {
               cal.ERROR(exc);
             }
           }
         }
       },
 
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
         if (Components.isSuccessCode(aStatus)) {
           for (let item of aItems) {
             // we need to retrieve by occurrence to properly filter exceptions,
             // should be fixed with bug 416975
             item = item.parentItem;
             let hid = item.hashId;
             if (!this.mHandledItems[hid]) {
               this.mHandledItems[hid] = true;
@@ -277,17 +276,17 @@ InvitationsManager.prototype = {
           this.mInvitationsManager.addItem(aDetail);
         }
         this.mInvitationsManager.mJobsPending--;
         if (this.mInvitationsManager.mJobsPending == 0 && this.mJobQueueFinishedCallBack) {
           this.mJobQueueFinishedCallBack();
         }
       },
 
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {},
+      onGetResult: function(calendar, status, itemType, detail, items) {},
     };
 
     this.mJobsPending = 0;
     for (let i = 0; i < queue.length; i++) {
       let job = queue[i];
       let oldItem = job.oldItem;
       let newItem = job.newItem;
       switch (job.action) {
--- a/calendar/base/content/calendar-item-editing.js
+++ b/calendar/base/content/calendar-item-editing.js
@@ -416,17 +416,17 @@ function openEventDialog(
     dlg.focus();
     disposeJob(job);
     return;
   }
 
   // Set up some defaults
   mode = mode || "new";
   calendar = calendar || getSelectedCalendar();
-  let calendars = cal.getCalendarManager().getCalendars({});
+  let calendars = cal.getCalendarManager().getCalendars();
   calendars = calendars.filter(cal.acl.isCalendarWritable);
 
   let isItemSupported;
   if (cal.item.isToDo(calendarItem)) {
     isItemSupported = function(aCalendar) {
       return aCalendar.getProperty("capabilities.tasks.supported") !== false;
     };
   } else if (cal.item.isEvent(calendarItem)) {
--- a/calendar/base/content/calendar-management.js
+++ b/calendar/base/content/calendar-management.js
@@ -32,17 +32,17 @@ function getSelectedCalendar() {
  *
  * @param aCalendar     The calendar to delete.
  */
 function promptDeleteCalendar(aCalendar) {
   const nIPS = Ci.nsIPromptService;
   const cICM = Ci.calICalendarManager;
 
   let calMgr = cal.getCalendarManager();
-  let calendars = calMgr.getCalendars({});
+  let calendars = calMgr.getCalendars();
   if (calendars.length <= 1) {
     // If this is the last calendar, don't delete it.
     return;
   }
 
   let modes = new Set(aCalendar.getProperty("capabilities.removeModes") || ["unsubscribe"]);
   let title = cal.l10n.getCalString("removeCalendarTitle");
 
@@ -101,17 +101,17 @@ function loadCalendarManager() {
 
   // Set up the composite calendar in the calendar list widget.
   let compositeCalendar = cal.view.getCompositeCalendar(window);
 
   // Initialize our composite observer
   compositeCalendar.addObserver(compositeObserver);
 
   // Create the home calendar if no calendar exists.
-  let calendars = cal.getCalendarManager().getCalendars({});
+  let calendars = cal.getCalendarManager().getCalendars();
   if (calendars.length) {
     // migration code to make sure calendars, which do not support caching have cache enabled
     // required to further clean up on top of bug 1182264
     for (let calendar of calendars) {
       if (
         calendar.getProperty("cache.supported") === false &&
         calendar.getProperty("cache.enabled") === true
       ) {
@@ -119,17 +119,17 @@ function loadCalendarManager() {
       }
     }
   } else {
     initHomeCalendar();
   }
 
   let calendarManager = cal.getCalendarManager();
 
-  for (let calendar of sortCalendarArray(cal.getCalendarManager().getCalendars({}))) {
+  for (let calendar of sortCalendarArray(cal.getCalendarManager().getCalendars())) {
     addCalendarItem(calendar);
   }
 
   function addCalendarItem(calendar) {
     let item = document.createXULElement("richlistitem");
     item.searchLabel = calendar.name;
     item.setAttribute("calendar-id", calendar.id);
     if (calendar.getProperty("disabled")) {
@@ -387,17 +387,17 @@ function loadCalendarManager() {
       addCalendarItem(calendar);
       saveSortOrder();
     },
     onCalendarUnregistering(calendar) {
       compositeCalendar.removeCalendar(calendar);
       let item = calendarList.getElementsByAttribute("calendar-id", calendar.id)[0];
       item.remove();
       if (compositeCalendar.defaultCalendar.id == calendar.id) {
-        compositeCalendar.defaultCalendar = compositeCalendar.getCalendars({})[0];
+        compositeCalendar.defaultCalendar = compositeCalendar.getCalendars()[0];
       }
       saveSortOrder();
     },
     onCalendarDeleting(calendar) {},
   };
   calendarManager.addObserver(calendarList._calendarManagerObserver);
 }
 
@@ -574,17 +574,17 @@ function toggleCalendarVisible(aCalendar
   }
 }
 
 /**
  * Shows all hidden calendars.
  */
 function showAllCalendars() {
   let composite = cal.view.getCompositeCalendar(window);
-  let cals = cal.getCalendarManager().getCalendars({});
+  let cals = cal.getCalendarManager().getCalendars();
 
   composite.startBatch();
   for (let calendar of cals) {
     if (!composite.getCalendarById(calendar.id)) {
       composite.addCalendar(calendar);
     }
   }
   composite.endBatch();
@@ -592,17 +592,17 @@ function showAllCalendars() {
 
 /**
  * Shows only the specified calendar, and hides all others.
  *
  * @param aCalendar   The calendar to show as the only visible calendar
  */
 function showOnlyCalendar(aCalendar) {
   let composite = cal.view.getCompositeCalendar(window);
-  let cals = composite.getCalendars({}) || [];
+  let cals = composite.getCalendars() || [];
 
   composite.startBatch();
   for (let calendar of cals) {
     if (calendar.id != aCalendar.id) {
       composite.removeCalendar(calendar);
     }
   }
   composite.addCalendar(aCalendar);
--- a/calendar/base/content/calendar-task-tree.js
+++ b/calendar/base/content/calendar-task-tree.js
@@ -462,17 +462,17 @@
           if (opCalendar.id in this.tree.mPendingRefreshJobs) {
             delete this.tree.mPendingRefreshJobs[opCalendar.id];
           }
 
           let oldItems = this.tree.mTaskArray.filter(item => item.calendar.id == opCalendar.id);
           this.tree.mTreeView.modifyItems(this.items, oldItems);
         },
 
-        onGetResult(opCalendar, status, itemType, detail, count, items) {
+        onGetResult(opCalendar, status, itemType, detail, items) {
           this.items = this.items.concat(items);
         },
 
         cancel() {
           if (this.operation && this.operation.isPending) {
             this.operation.cancel();
             this.operation = null;
             this.items = [];
@@ -513,17 +513,17 @@
      */
     refresh() {
       this.view = this.mTreeView;
 
       cal.view.getCompositeCalendar(window).addObserver(this.mTaskTreeObserver);
 
       Services.prefs.getBranch("").addObserver("calendar.", this.mPrefObserver);
 
-      const cals = cal.view.getCompositeCalendar(window).getCalendars({}) || [];
+      const cals = cal.view.getCompositeCalendar(window).getCalendars() || [];
       const enabledCals = cals.filter(calendar => !calendar.getProperty("disabled"));
 
       enabledCals.forEach(calendar => this.refreshFromCalendar(calendar));
     }
 
     onCalendarAdded(calendar) {
       if (!calendar.getProperty("disabled")) {
         this.refreshFromCalendar(calendar);
--- a/calendar/base/content/calendar-ui-utils.js
+++ b/calendar/base/content/calendar-ui-utils.js
@@ -208,17 +208,17 @@ function sortCalendarArray(calendars) {
   }
   ret.sort(sortFunc);
 
   // check and repair pref when an array of all calendars has been passed:
   let sortOrderString = Services.prefs.getStringPref("calendar.list.sortOrder", "");
   let wantedOrderString = ret.map(calendar => calendar.id).join(" ");
   if (
     wantedOrderString != sortOrderString &&
-    cal.getCalendarManager().getCalendars({}).length == ret.length
+    cal.getCalendarManager().getCalendars().length == ret.length
   ) {
     Services.prefs.setStringPref("calendar.list.sortOrder", wantedOrderString);
   }
 
   return ret;
 }
 
 /**
@@ -231,17 +231,17 @@ function sortCalendarArray(calendars) {
  * @param aCalendarToUse        The default-calendar
  * @param aOnCommand            A string that is applied to the "oncommand"
  *                                attribute of each menuitem
  * @return                      The index of the calendar that matches the
  *                                default-calendar. By default 0 is returned.
  */
 function appendCalendarItems(aItem, aCalendarMenuParent, aCalendarToUse, aOnCommand) {
   let calendarToUse = aCalendarToUse || aItem.calendar;
-  let calendars = sortCalendarArray(cal.getCalendarManager().getCalendars({}));
+  let calendars = sortCalendarArray(cal.getCalendarManager().getCalendars());
   let indexToSelect = 0;
   let index = -1;
   for (let i = 0; i < calendars.length; ++i) {
     let calendar = calendars[i];
     if (
       calendar.id == calendarToUse.id ||
       (calendar &&
         cal.acl.isCalendarWritable(calendar) &&
--- a/calendar/base/content/calendar-unifinder.js
+++ b/calendar/base/content/calendar-unifinder.js
@@ -912,17 +912,17 @@ function addItemsFromCalendar(aCalendar,
 
     onOperationComplete: function(aOpCalendar, aStatus, aOperationType, aId, aDateTime) {
       let refreshTreeInternalFunc = function() {
         aAddItemsInternalFunc(refreshListener.mEventArray);
       };
       setTimeout(refreshTreeInternalFunc, 0);
     },
 
-    onGetResult: function(aOpCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+    onGetResult: function(aOpCalendar, aStatus, aItemType, aDetail, aItems) {
       refreshListener.mEventArray = refreshListener.mEventArray.concat(aItems);
     },
   };
 
   let filter = 0;
 
   filter |= aCalendar.ITEM_FILTER_TYPE_EVENT;
 
--- a/calendar/base/content/calendar-views-utils.js
+++ b/calendar/base/content/calendar-views-utils.js
@@ -558,17 +558,17 @@ function editSelectedEvents() {
  */
 function selectAllEvents() {
   let items = [];
   let listener = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
     onOperationComplete: function(calendar, status, operationType, id, detail) {
       currentView().setSelectedItems(items.length, items, false);
     },
-    onGetResult: function(calendar, status, itemType, detail, count, itemsArg) {
+    onGetResult: function(calendar, status, itemType, detail, itemsArg) {
       for (let item of itemsArg) {
         items.push(item);
       }
     },
   };
 
   let composite = cal.view.getCompositeCalendar(window);
   let filter = composite.ITEM_FILTER_CLASS_OCCURRENCES;
--- a/calendar/base/content/dialogs/calendar-creation.js
+++ b/calendar/base/content/dialogs/calendar-creation.js
@@ -20,17 +20,17 @@ function openLocalCalendar() {
   picker.appendFilters(nsIFilePicker.filterAll);
 
   picker.open(rv => {
     if (rv != nsIFilePicker.returnOK || !picker.file) {
       return;
     }
 
     let calMgr = cal.getCalendarManager();
-    let calendars = calMgr.getCalendars({});
+    let calendars = calMgr.getCalendars();
     let calendar = calendars.find(x => x.uri.equals(picker.fileURL));
     if (!calendar) {
       calendar = calMgr.createCalendar("ics", picker.fileURL);
 
       // Strip ".ics" from filename for use as calendar name, taken from
       // calendarCreation.js
       let fullPathRegex = new RegExp("([^/:]+)[.]ics$");
       let prettyName = picker.fileURL.spec.match(fullPathRegex);
--- a/calendar/base/content/dialogs/calendar-invitations-dialog.js
+++ b/calendar/base/content/dialogs/calendar-invitations-dialog.js
@@ -216,21 +216,21 @@ function onLoad() {
       let richListBox = document.getElementById("invitations-listbox");
       if (richListBox.getRowCount() > 0) {
         richListBox.selectedIndex = 0;
       } else {
         let noInvitationsBox = document.getElementById("noinvitations-box");
         noInvitationsBox.removeAttribute("hidden");
       }
     },
-    onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+    onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
       if (!Components.isSuccessCode(aStatus)) {
         return;
       }
-      document.title = invitationsText + " (" + aCount + ")";
+      document.title = invitationsText + " (" + aItems.length + ")";
       let updatingBox = document.getElementById("updating-box");
       updatingBox.setAttribute("hidden", "true");
       let richListBox = document.getElementById("invitations-listbox");
       for (let item of aItems) {
         let newNode = document.createXULElement("richlistitem", {
           is: "calendar-invitations-richlistitem",
         });
         richListBox.appendChild(newNode);
--- a/calendar/base/content/dialogs/calendar-migration-dialog.js
+++ b/calendar/base/content/dialogs/calendar-migration-dialog.js
@@ -243,17 +243,17 @@ var gDataMigrator = {
     function parseAndMigrate(aDoc, aCallback) {
       function getRDFAttr(aNode, aAttr) {
         return aNode.getAttributeNS("http://home.netscape.com/NC-rdf#", aAttr);
       }
 
       // For duplicate detection
       let calManager = cal.getCalendarManager();
       let uris = [];
-      for (let oldCal of calManager.getCalendars({})) {
+      for (let oldCal of calManager.getCalendars()) {
         uris.push(oldCal.uri);
       }
 
       const RDFNS = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
       let nodes = aDoc.getElementsByTagNameNS(RDFNS, "Description");
       migLOG("nodes: " + nodes.length);
       for (let i = 0; i < nodes.length; i++) {
         migLOG("Beginning calendar node");
--- a/calendar/base/content/dialogs/calendar-print-dialog.js
+++ b/calendar/base/content/dialogs/calendar-print-dialog.js
@@ -147,17 +147,17 @@ function getPrintSettings(receiverFunc) 
   // Some filters above might have filled the events list themselves. If not,
   // then fetch the items here.
   if (requiresFetch) {
     let listener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
       onOperationComplete: function(aCalendar, aStatus, aOperationType, aId, aDateTime) {
         receiverFunc(settings);
       },
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
         settings.eventList = settings.eventList.concat(aItems);
         if (!settings.printTasksWithNoDueDate) {
           let eventWithDueDate = [];
           for (let item of settings.eventList) {
             if (item.dueDate || item.endDate) {
               eventWithDueDate.push(item);
             }
           }
--- a/calendar/base/content/dialogs/calendar-providerUninstall-dialog.js
+++ b/calendar/base/content/dialogs/calendar-providerUninstall-dialog.js
@@ -7,17 +7,17 @@
 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 calendarList = document.getElementById("calendar-list");
 
-  for (let calendar of cal.getCalendarManager().getCalendars({})) {
+  for (let calendar of cal.getCalendarManager().getCalendars()) {
     if (calendar.providerID != extension.id) {
       continue;
     }
 
     let item = document.createXULElement("richlistitem");
     item.setAttribute("calendar-id", calendar.id);
 
     let checkbox = document.createXULElement("checkbox");
--- a/calendar/base/content/dialogs/calendar-subscriptions-dialog.js
+++ b/calendar/base/content/dialogs/calendar-subscriptions-dialog.js
@@ -90,17 +90,17 @@ function onSearch() {
 
   let richListBox = document.getElementById("subscriptions-listbox");
 
   while (richListBox.hasChildNodes()) {
     richListBox.lastChild.remove();
   }
 
   let registeredCals = {};
-  for (let calendar of cal.getCalendarManager().getCalendars({})) {
+  for (let calendar of cal.getCalendarManager().getCalendars()) {
     registeredCals[calendar.id] = true;
   }
 
   let opListener = {
     onResult: function(operation, result) {
       if (result) {
         for (let calendar of result) {
           let newNode = document.createXULElement("richlistitem", {
--- a/calendar/base/content/dialogs/chooseCalendarDialog.js
+++ b/calendar/base/content/dialogs/chooseCalendarDialog.js
@@ -13,17 +13,17 @@ function loadCalendars() {
   let listbox = document.getElementById("calendar-list");
   let composite = cal.view.getCompositeCalendar(window.opener);
   let selectedIndex = 0;
   let calendars;
 
   if (window.arguments[0].calendars) {
     calendars = window.arguments[0].calendars;
   } else {
-    calendars = calendarManager.getCalendars({});
+    calendars = calendarManager.getCalendars();
   }
   calendars = sortCalendarArray(calendars);
 
   for (let i = 0; i < calendars.length; i++) {
     let calendar = calendars[i];
     let listItem = document.createXULElement("richlistitem");
 
     let colorCell = document.createXULElement("box");
--- a/calendar/base/content/import-export.js
+++ b/calendar/base/content/import-export.js
@@ -96,17 +96,17 @@ function loadEventsFromFile(aCalendar) {
       }
 
       if (aCalendar) {
         await putItemsIntoCal(aCalendar, items);
         resolve();
         return;
       }
 
-      let calendars = cal.getCalendarManager().getCalendars({});
+      let calendars = cal.getCalendarManager().getCalendars();
       calendars = calendars.filter(cal.acl.isCalendarWritable);
 
       if (calendars.length == 1) {
         // There's only one calendar, so it's silly to ask what calendar
         // the user wants to import into.
         await putItemsIntoCal(calendars[0], items, filePath);
         resolve();
       } else if (calendars.length > 1) {
@@ -303,34 +303,33 @@ function saveEventsToFile(calendarEventA
  */
 function exportEntireCalendar(aCalendar) {
   let itemArray = [];
   let getListener = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
     onOperationComplete: function(aOpCalendar, aStatus, aOperationType, aId, aDetail) {
       saveEventsToFile(itemArray, aOpCalendar.name);
     },
-    onGetResult: function(aOpCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+    onGetResult: function(aOpCalendar, aStatus, aItemType, aDetail, aItems) {
       for (let item of aItems) {
         itemArray.push(item);
       }
     },
   };
 
   let getItemsFromCal = function(aCal) {
     aCal.getItems(Ci.calICalendar.ITEM_FILTER_ALL_ITEMS, 0, null, null, getListener);
   };
 
   if (aCalendar) {
     getItemsFromCal(aCalendar);
   } else {
-    let count = {};
-    let calendars = cal.getCalendarManager().getCalendars(count);
+    let calendars = cal.getCalendarManager().getCalendars();
 
-    if (count.value == 1) {
+    if (calendars.length == 1) {
       // There's only one calendar, so it's silly to ask what calendar
       // the user wants to import into.
       getItemsFromCal(calendars[0]);
     } else {
       // Ask what calendar to import into
       let args = {};
       args.onOk = getItemsFromCal;
       args.promptText = cal.l10n.getCalString("exportPrompt");
--- a/calendar/base/content/widgets/calendar-minimonth.js
+++ b/calendar/base/content/widgets/calendar-minimonth.js
@@ -304,17 +304,17 @@
     get mReadOnlyHeader() {
       return this.querySelector(".minimonth-readonly-header");
     }
 
     // calIOperationListener methods.
 
     onOperationComplete(aCalendar, aStatus, aOperationType, aId, aDetail) {}
 
-    onGetResult(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+    onGetResult(aCalendar, aStatus, aItemType, aDetail, aItems) {
       if (Components.isSuccessCode(aStatus)) {
         aItems.forEach(item => this.setBusyDaysForOccurrence(item, true));
       }
     }
 
     setBusyDaysForItem(aItem, aState) {
       let items = aItem.recurrenceInfo
         ? aItem.getOccurrencesBetween(this.firstDate, this.lastDate)
--- a/calendar/base/modules/utils/calAsyncUtils.jsm
+++ b/calendar/base/modules/utils/calAsyncUtils.jsm
@@ -105,17 +105,17 @@ var calasync = {
    *     return calendar.addItem(aItem);
    *   }
    */
   promiseOperationListener: function(deferred) {
     return {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
       items: [],
       itemStatus: Cr.NS_OK,
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
         this.itemStatus = aStatus;
         if (Components.isSuccessCode(aStatus)) {
           this.items = this.items.concat(aItems);
         } else {
           this.itemSuccess = aStatus;
         }
       },
 
--- a/calendar/base/modules/utils/calItipUtils.jsm
+++ b/calendar/base/modules/utils/calItipUtils.jsm
@@ -198,17 +198,17 @@ var calitip = {
       /* TODO: missing ACL check for existing items (require callback API) */
       return (
         calitip.isSchedulingCalendar(aCalendar) && cal.acl.userCanAddItemsToCalendar(aCalendar)
       );
     };
 
     let writableCalendars = cal
       .getCalendarManager()
-      .getCalendars({})
+      .getCalendars()
       .filter(isWritableCalendar);
     if (writableCalendars.length > 0) {
       let compCal = Cc["@mozilla.org/calendar/calendar;1?type=composite"].createInstance(
         Ci.calICompositeCalendar
       );
       writableCalendars.forEach(compCal.addCalendar, compCal);
       itipItem.targetCalendar = compCal;
     }
@@ -594,17 +594,17 @@ var calitip = {
       default:
         needsCalendar = true;
         break;
     }
 
     if (needsCalendar) {
       let calendars = cal
         .getCalendarManager()
-        .getCalendars({})
+        .getCalendars()
         .filter(calitip.isSchedulingCalendar);
 
       if (aItipItem.receivedMethod == "REQUEST") {
         // try to further limit down the list to those calendars that
         // are configured to a matching attendee;
         let item = aItipItem.getItemList()[0];
         let matchingCals = calendars.filter(
           calendar => calitip.getInvitedAttendee(item, calendar) != null
@@ -1533,17 +1533,17 @@ ItipOpListener.prototype = {
     cal.ASSERT(Components.isSuccessCode(aStatus), "error on iTIP processing");
     if (Components.isSuccessCode(aStatus)) {
       calitip.checkAndSend(aOperationType, aDetail, this.mOldItem, this.mExtResponse);
     }
     if (this.mOpListener) {
       this.mOpListener.onOperationComplete(aCalendar, aStatus, aOperationType, aId, aDetail);
     }
   },
-  onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {},
+  onGetResult: function(calendar, status, itemType, detail, items) {},
 };
 
 /** local to this module file
  * Add a parameter SCHEDULE-AGENT=CLIENT to the item before it is
  * created or updated so that the providers knows scheduling will
  * be handled by the client.
  *
  * @param {calIItemBase} item       item about to be added or updated
@@ -2024,14 +2024,14 @@ ItipItemFinder.prototype = {
         }
       };
       actionFunc.method = actionMethod;
     }
 
     this.mOptionsFunc(this.mItipItem, rc, actionFunc, this.mFoundItems);
   },
 
-  onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+  onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
     if (Components.isSuccessCode(aStatus)) {
       this.mFoundItems = this.mFoundItems.concat(aItems);
     }
   },
 };
--- a/calendar/base/modules/utils/calViewUtils.jsm
+++ b/calendar/base/modules/utils/calViewUtils.jsm
@@ -355,17 +355,17 @@ calview.colorTracker = {
   categoryBranch: null,
   windows: new Set(),
   QueryInterface: cal.generateQI([Ci.calICalendarManagerObserver, Ci.calIObserver]),
 
   // Deregistration is not required.
   registerWindow(aWindow) {
     if (this.calendars === null) {
       let manager = cal.getCalendarManager();
-      this.calendars = new Set(manager.getCalendars({}));
+      this.calendars = new Set(manager.getCalendars());
       manager.addObserver(this);
       manager.addCalendarObserver(this);
       this.categoryBranch = Services.prefs.getBranch("calendar.category.color.");
       this.categoryBranch.addObserver("", this);
       Services.obs.addObserver(this, "xpcom-shutdown");
     }
 
     this.windows.add(aWindow);
--- a/calendar/base/public/calICalendar.idl
+++ b/calendar/base/public/calICalendar.idl
@@ -511,18 +511,17 @@ interface calICompositeCalendar : calICa
    * return it; otherwise return null.
    *
    * @param aId id of calendar
    * @return calendar, or null if none
    */
   calICalendar getCalendarById(in AUTF8String aId);
 
   /* return a list of all calendars currently registered */
-  void getCalendars(out uint32_t count,
-                    [array, size_is(count), retval] out calICalendar aCalendars);
+  Array<calICalendar> getCalendars();
 
   /**
    * In order for addItem() to be called on this object, it is first necessary
    * to set this attribute to specify which underlying calendar the item is
    * to be added to.
    */
   attribute calICalendar defaultCalendar;
 
@@ -622,20 +621,18 @@ interface calIOperationListener : nsISup
    * For getItem and getItems.
    *
    * @param aStatus   status code summarizing what happened.
    * @param aItemType type of interface returned in the array (@see
    *                  calICalendar::GetItems).
    * @param aDetail   not yet fully specified.  If aStatus is an error
    *                  result, this will probably be an extended error
    *                  string (eg one returned by a server).
-   * @param aCount    size of array returned, in items
    * @param aItems    array of immutable items
    *
    * Multiple onGetResults might be called
    */
-  void onGetResult (in calICalendar aCalendar,
-                    in nsresult aStatus,
-                    in nsIIDRef aItemType,
-                    in nsIVariant aDetail,
-                    in uint32_t aCount,
-                    [array, size_is(aCount), iid_is(aItemType)]  in nsQIResult aItems );
+  void onGetResult(in calICalendar aCalendar,
+                   in nsresult aStatus,
+                   in nsIIDRef aItemType,
+                   in nsIVariant aDetail,
+                   [iid_is(aItemType)] in Array<nsQIResult> aItems);
 };
--- a/calendar/base/public/calICalendarManager.idl
+++ b/calendar/base/public/calICalendarManager.idl
@@ -61,18 +61,17 @@ interface calICalendarManager : nsISuppo
    * @param aMode           A combination of the above mode flags.
    */
   void removeCalendar(in calICalendar aCalendar, [optional] in uint8_t aMode);
 
   /* get a calendar by its id */
   calICalendar getCalendarById(in AUTF8String aId);
 
   /* return a list of all calendars currently registered */
-  void getCalendars(out uint32_t count,
-                    [array, size_is(count), retval] out calICalendar aCalendars);
+  Array<calICalendar> getCalendars();
 
   /** Add an observer for the calendar manager, i.e when calendars are registered */
   void addObserver(in calICalendarManagerObserver aObserver);
   /** Remove an observer for the calendar manager */
   void removeObserver(in calICalendarManagerObserver aObserver);
 
   /** Add an observer to handle changes to all calendars (even disabled or unchecked ones) */
   void addCalendarObserver(in calIObserver aObserver);
--- a/calendar/base/src/calAlarmService.js
+++ b/calendar/base/src/calAlarmService.js
@@ -226,17 +226,17 @@ calAlarmService.prototype = {
 
     // Make sure the alarm monitor is alive so it's observing the notification.
     Cc["@mozilla.org/calendar/alarm-monitor;1"].getService(Ci.calIAlarmServiceObserver);
     // Tell people that we're alive so they can start monitoring alarms.
     Services.obs.notifyObservers(null, "alarm-service-startup");
 
     cal.getCalendarManager().addObserver(this.calendarManagerObserver);
 
-    for (let calendar of cal.getCalendarManager().getCalendars({})) {
+    for (let calendar of cal.getCalendarManager().getCalendars()) {
       this.observeCalendar(calendar);
     }
 
     /* set up a timer to update alarms every N hours */
     let timerCallback = {
       alarmService: this,
       notify: function() {
         let now = nowUTC();
@@ -256,17 +256,17 @@ calAlarmService.prototype = {
         let until = now.clone();
         until.month += Ci.calIAlarmService.MAX_SNOOZE_MONTHS;
 
         // We don't set timers for every future alarm, only those within 6 hours
         let end = now.clone();
         end.hour += kHoursBetweenUpdates;
         this.alarmService.mRangeEnd = end.getInTimezone(cal.dtz.UTC);
 
-        this.alarmService.findAlarms(cal.getCalendarManager().getCalendars({}), start, until);
+        this.alarmService.findAlarms(cal.getCalendarManager().getCalendars(), start, until);
       },
     };
     timerCallback.notify();
 
     this.mUpdateTimer = newTimerWithCallback(timerCallback, kHoursBetweenUpdates * 3600000, true);
 
     this.mStarted = true;
   },
@@ -283,17 +283,17 @@ calAlarmService.prototype = {
       this.mUpdateTimer.cancel();
       this.mUpdateTimer = null;
     }
 
     let calmgr = cal.getCalendarManager();
     calmgr.removeObserver(this.calendarManagerObserver);
 
     // Stop observing all calendars. This will also clear the timers.
-    for (let calendar of calmgr.getCalendars({})) {
+    for (let calendar of calmgr.getCalendars()) {
       this.unobserveCalendar(calendar);
     }
 
     this.mRangeEnd = null;
 
     Services.obs.removeObserver(this, "profile-after-change");
     Services.obs.removeObserver(this, "xpcom-shutdown");
     Services.obs.removeObserver(this, "wake_notification");
@@ -515,17 +515,17 @@ calAlarmService.prototype = {
           }
         );
 
         // if no results were returned we still need to resolve the promise
         if (!this.results) {
           this.addRemovePromise.resolve();
         }
       },
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
         let promise = this.addRemovePromise;
         this.batchCount++;
         this.results = true;
 
         cal.iterate.forEach(
           aItems,
           item => {
             try {
--- a/calendar/base/src/calCachedCalendar.js
+++ b/calendar/base/src/calCachedCalendar.js
@@ -6,17 +6,17 @@ var { cal } = ChromeUtils.import("resour
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.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) {},
+  onGetResult: function(calendar, status, itemType, detail, items) {},
 
   onOperationComplete: function(calendar, status, opType, id, detail) {},
 };
 
 /**
  * Returns true if the exception passed is one that should cause the cache
  * layer to retry the operation. This is usually a network error or other
  * temporary error.
@@ -224,17 +224,17 @@ calCachedCalendar.prototype = {
     }
   },
 
   getOfflineAddedItems: function(callbackFunc) {
     let self = this;
     self.offlineCachedItems = {};
     let getListener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
         for (let item of aItems) {
           self.offlineCachedItems[item.hashId] = item;
           self.offlineCachedItemFlags[item.hashId] = cICL.OFFLINE_FLAG_CREATED_RECORD;
         }
       },
 
       onOperationComplete: function(aCalendar, aStatus, aOpType, aId, aDetail) {
         self.getOfflineModifiedItems(callbackFunc);
@@ -248,17 +248,17 @@ calCachedCalendar.prototype = {
       getListener
     );
   },
 
   getOfflineModifiedItems: function(callbackFunc) {
     let self = this;
     let getListener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
         for (let item of aItems) {
           self.offlineCachedItems[item.hashId] = item;
           self.offlineCachedItemFlags[item.hashId] = cICL.OFFLINE_FLAG_MODIFIED_RECORD;
         }
       },
 
       onOperationComplete: function(aCalendar, aStatus, aOpType, aId, aDetail) {
         self.getOfflineDeletedItems(callbackFunc);
@@ -272,17 +272,17 @@ calCachedCalendar.prototype = {
       getListener
     );
   },
 
   getOfflineDeletedItems: function(callbackFunc) {
     let self = this;
     let getListener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
         for (let item of aItems) {
           self.offlineCachedItems[item.hashId] = item;
           self.offlineCachedItemFlags[item.hashId] = cICL.OFFLINE_FLAG_DELETED_RECORD;
         }
       },
 
       onOperationComplete: function(aCalendar, aStatus, aOpType, aId, aDetail) {
         if (callbackFunc) {
@@ -366,17 +366,17 @@ calCachedCalendar.prototype = {
     let completeListener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
       modifiedTimes: {},
       hasRenewedCalendar: false,
       getsCompleted: 0,
       getsReceived: 0,
       opCompleted: false,
 
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
         if (Components.isSuccessCode(aStatus)) {
           if (!this.hasRenewedCalendar) {
             // TODO instead of deleting the calendar and creating a new
             // one, maybe we want to do a "real" sync between the
             // existing local calendar and the remote calendar.
             self.setupCachedCalendar();
             this.hasRenewedCalendar = true;
           }
@@ -574,17 +574,17 @@ calCachedCalendar.prototype = {
         filter = calICalendar.ITEM_FILTER_OFFLINE_DELETED;
         break;
       default:
         cal.ERROR("[calCachedCalendar] Invalid playback type: " + aPlaybackType);
         return;
     }
 
     let opListener = {
-      onGetResult: function(calendar, status, itemType, detail, count, items) {},
+      onGetResult: function(calendar, status, itemType, detail, items) {},
       onOperationComplete: function(calendar, status, opType, id, detail) {
         if (Components.isSuccessCode(status)) {
           if (aPlaybackType == cICL.OFFLINE_FLAG_DELETED_RECORD) {
             self.mCachedCalendar.deleteItem(detail, resetListener);
           } else {
             storage.resetItemOfflineFlag(detail, resetListener);
           }
         } else {
@@ -628,17 +628,17 @@ calCachedCalendar.prototype = {
               e
           );
           opListener.onOperationComplete(self, e.result, listenerOp, item.id, e.message);
         }
       }
     }
 
     let getListener = {
-      onGetResult: function(calendar, status, itemType, detail, count, items) {
+      onGetResult: function(calendar, status, itemType, detail, items) {
         itemQueue = itemQueue.concat(items);
       },
       onOperationComplete: function(calendar, status, opType, id, detail) {
         if (self.offline) {
           cal.LOG("[calCachedCalendar] back to offline mode, reconciliation aborted");
           if (aCallback) {
             aCallback();
           }
@@ -736,17 +736,17 @@ calCachedCalendar.prototype = {
     // calIOperationListener, e.g. *before* it fires on calIObservers
     // (because that order is undefined). Firing onOperationComplete before onAddItem et al
     // would result in this facade firing onOperationComplete even though the modification
     // hasn't yet been performed on the cached calendar (which happens in onAddItem et al).
     // Result is that we currently stick to firing onOperationComplete if the cached calendar
     // has performed the modification, see below:
     let self = this;
     let cacheListener = {
-      onGetResult: function(calendar, status, itemType, detail, count, items) {
+      onGetResult: function(calendar, status, itemType, detail, items) {
         cal.ASSERT(false, "unexpected!");
       },
       onOperationComplete: function(calendar, status, opType, id, detail) {
         if (isUnavailableCode(status)) {
           // The item couldn't be added to the (remote) location,
           // this is like being offline. Add the item to the cached
           // calendar instead.
           cal.LOG(
@@ -770,17 +770,17 @@ calCachedCalendar.prototype = {
     } else {
       // Otherwise ask the provider to add the item now.
       this.mUncachedCalendar.adoptItem(item, cacheListener);
     }
   },
   adoptOfflineItem: function(item, listener) {
     let self = this;
     let opListener = {
-      onGetResult: function(calendar, status, itemType, detail, count, items) {
+      onGetResult: function(calendar, status, itemType, detail, items) {
         cal.ASSERT(false, "unexpected!");
       },
       onOperationComplete: function(calendar, status, opType, id, detail) {
         if (Components.isSuccessCode(status)) {
           let storage = self.mCachedCalendar.QueryInterface(Ci.calIOfflineStorage);
           storage.addOfflineItem(detail, listener);
         } else if (listener) {
           listener.onOperationComplete(self, status, opType, id, detail);
@@ -791,17 +791,17 @@ calCachedCalendar.prototype = {
   },
 
   modifyItem: function(newItem, oldItem, listener) {
     let self = this;
 
     // First of all, we should find out if the item to modify is
     // already an offline item or not.
     let flagListener = {
-      onGetResult: function() {},
+      onGetResult: function(calendar, status, itemType, detail, items) {},
       onOperationComplete: function(calendar, status, opType, id, offline_flag) {
         if (
           offline_flag == cICL.OFFLINE_FLAG_CREATED_RECORD ||
           offline_flag == cICL.OFFLINE_FLAG_MODIFIED_RECORD
         ) {
           // The item is already offline, just modify it in the cache
           self.modifyOfflineItem(newItem, oldItem, listener);
         } else {
@@ -817,17 +817,17 @@ calCachedCalendar.prototype = {
      * But this would mean the uncached provider fires on the passed
      * calIOperationListener, e.g. *before* it fires on calIObservers
      * (because that order is undefined). Firing onOperationComplete before onAddItem et al
      * would result in this facade firing onOperationComplete even though the modification
      * hasn't yet been performed on the cached calendar (which happens in onAddItem et al).
      * Result is that we currently stick to firing onOperationComplete if the cached calendar
      * has performed the modification, see below: */
     let cacheListener = {
-      onGetResult: function() {},
+      onGetResult: function(calendar, status, itemType, detail, items) {},
       onOperationComplete: function(calendar, status, opType, id, detail) {
         if (isUnavailableCode(status)) {
           // The item couldn't be modified at the (remote) location,
           // this is like being offline. Add the item to the cache
           // instead.
           cal.LOG(
             "[calCachedCalendar] Calendar " +
               calendar.name +
@@ -852,17 +852,17 @@ calCachedCalendar.prototype = {
       // process the item.
       this.mCachedCalendar.getItemOfflineFlag(oldItem, flagListener);
     }
   },
 
   modifyOfflineItem: function(newItem, oldItem, listener) {
     let self = this;
     let opListener = {
-      onGetResult: function(calendar, status, itemType, detail, count, items) {
+      onGetResult: function(calendar, status, itemType, detail, items) {
         cal.ASSERT(false, "unexpected!");
       },
       onOperationComplete: function(calendar, status, opType, id, detail) {
         if (Components.isSuccessCode(status)) {
           // Modify the offline item in the storage, passing the
           // listener will make sure its notified
           let storage = self.mCachedCalendar.QueryInterface(Ci.calIOfflineStorage);
           storage.modifyOfflineItem(detail, listener);
@@ -878,17 +878,17 @@ calCachedCalendar.prototype = {
   },
 
   deleteItem: function(item, listener) {
     let self = this;
 
     // First of all, we should find out if the item to delete is
     // already an offline item or not.
     let flagListener = {
-      onGetResult: function() {},
+      onGetResult: function(calendar, status, itemType, detail, items) {},
       onOperationComplete: function(calendar, status, opType, id, offline_flag) {
         if (
           offline_flag == cICL.OFFLINE_FLAG_CREATED_RECORD ||
           offline_flag == cICL.OFFLINE_FLAG_MODIFIED_RECORD
         ) {
           // The item is already offline, just mark it deleted it in
           // the cache
           self.deleteOfflineItem(item, listener);
@@ -904,17 +904,17 @@ calCachedCalendar.prototype = {
     // But this would mean the uncached provider fires on the passed
     // calIOperationListener, e.g. *before* it fires on calIObservers
     // (because that order is undefined). Firing onOperationComplete before onAddItem et al
     // would result in this facade firing onOperationComplete even though the modification
     // hasn't yet been performed on the cached calendar (which happens in onAddItem et al).
     // Result is that we currently stick to firing onOperationComplete if the cached calendar
     // has performed the modification, see below:
     let cacheListener = {
-      onGetResult: function() {},
+      onGetResult: function(calendar, status, itemType, detail, items) {},
       onOperationComplete: function(calendar, status, opType, id, detail) {
         if (isUnavailableCode(status)) {
           // The item couldn't be deleted at the (remote) location,
           // this is like being offline. Mark the item deleted in the
           // cache instead.
           cal.LOG(
             "[calCachedCalendar] Calendar " +
               calendar.name +
--- a/calendar/base/src/calCalendarManager.js
+++ b/calendar/base/src/calCalendarManager.js
@@ -93,17 +93,17 @@ calCalendarManager.prototype = {
   cleanupOfflineObservers: function() {
     Services.obs.removeObserver(this, "network:offline-status-changed");
   },
 
   observe: function(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "timer-callback": {
         // Refresh all the calendars that can be refreshed.
-        for (let calendar of this.getCalendars({})) {
+        for (let calendar of this.getCalendars()) {
           if (!calendar.getProperty("disabled") && calendar.canRefresh) {
             calendar.refresh();
           }
         }
         break;
       }
       case "network:offline-status-changed": {
         for (let id in this.mCache) {
@@ -409,24 +409,23 @@ calCalendarManager.prototype = {
   getCalendarById: function(aId) {
     if (aId in this.mCache) {
       return this.mCache[aId];
     } else {
       return null;
     }
   },
 
-  getCalendars: function(count) {
+  getCalendars: function() {
     this.assureCache();
     let calendars = [];
     for (let id in this.mCache) {
       let calendar = this.mCache[id];
       calendars.push(calendar);
     }
-    count.value = calendars.length;
     return calendars;
   },
 
   assureCache: function() {
     if (!this.mCache) {
       this.mCache = {};
       this.mCalObservers = {};
 
@@ -869,17 +868,17 @@ var gCalendarManagerAddonListener = {
     }
   },
 
   queryUninstallProvider: function(aAddon) {
     const uri = "chrome://calendar/content/calendar-providerUninstall-dialog.xul";
     const features = "chrome,titlebar,resizable,modal";
     let calMgr = cal.getCalendarManager();
     let affectedCalendars = calMgr
-      .getCalendars({})
+      .getCalendars()
       .filter(calendar => calendar.providerID == aAddon.id);
     if (!affectedCalendars.length) {
       // If no calendars are affected, then everything is fine.
       return true;
     }
 
     let args = { shouldUninstall: false, extension: aAddon };
 
--- a/calendar/base/src/calFilter.js
+++ b/calendar/base/src/calFilter.js
@@ -886,33 +886,33 @@ calFilter.prototype = {
     // we use a local proxy listener for the calICalendar.getItems() call, and use it
     // to handle occurrence expansion and filter the results before forwarding them to
     // the listener passed in the aListener argument.
     let self = this;
     let listener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
       onOperationComplete: aListener.onOperationComplete.bind(aListener),
 
-      onGetResult: function(aOpCalendar, aStatus, aOpItemType, aDetail, aCount, aItems) {
+      onGetResult: function(aOpCalendar, aStatus, aOpItemType, aDetail, aItems) {
         let items;
         if (props.occurrences == props.FILTER_OCCURRENCES_PAST_AND_NEXT) {
           // with the FILTER_OCCURRENCES_PAST_AND_NEXT occurrence filter we will
           // get parent items returned here, so we need to let the getOccurrences
           // function handle occurrence expansion.
           items = [];
           for (let item of aItems) {
             items = items.concat(self.getOccurrences(item));
           }
         } else {
           // with other occurrence filters the calICalendar.getItems() function will
           // return expanded occurrences appropriately, we only need to filter them.
           items = self.filterItems(aItems);
         }
 
-        aListener.onGetResult(aOpCalendar, aStatus, aOpItemType, aDetail, items.length, items);
+        aListener.onGetResult(aOpCalendar, aStatus, aOpItemType, aDetail, items);
       },
     };
 
     // build the filter argument for calICalendar.getItems() from the filter properties
     let filter = aItemType || aCalendar.FILTER_TYPE_ALL;
     if (
       !props.status ||
       props.status & (props.FILTER_STATUS_COMPLETED_TODAY | props.FILTER_STATUS_COMPLETED_BEFORE)
--- a/calendar/base/src/calTransactionManager.js
+++ b/calendar/base/src/calTransactionManager.js
@@ -113,19 +113,19 @@ calTransaction.prototype = {
         }
       }
     }
     if (this.mListener) {
       this.mListener.onOperationComplete(aCalendar, aStatus, aOperationType, aId, aDetail);
     }
   },
 
-  onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+  onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
     if (this.mListener) {
-      this.mListener.onGetResult(aCalendar, aStatus, aItemType, aDetail, aCount, aItems);
+      this.mListener.onGetResult(aCalendar, aStatus, aItemType, aDetail, aItems);
     }
   },
 
   doTransaction: function() {
     this.mIsDoTransaction = true;
     switch (this.mAction) {
       case "add":
         this.mCalendar.addItem(this.mItem, this);
--- a/calendar/lightning/components/calItipProtocolHandler.js
+++ b/calendar/lightning/components/calItipProtocolHandler.js
@@ -94,15 +94,15 @@ ItipContentHandler.prototype = {
         event.title +
         "' from " +
         event.organizer.id +
         " (" +
         event.id +
         ")\n"
     );
     let calMgr = cal.getCalendarManager();
-    let cals = calMgr.getCalendars({});
+    let cals = calMgr.getCalendars();
     cals[0].addItem(event, null);
   },
 };
 
 var components = [ItipChannel, ItipProtocolHandler, ItipContentHandler];
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
--- a/calendar/lightning/content/imip-bar.js
+++ b/calendar/lightning/content/imip-bar.js
@@ -398,17 +398,17 @@ var ltnImipBar = {
             // For now, we just state the status for the user something very simple
             let label = cal.itip.getCompleteText(aStatus, aOperationType);
             imipBar.label = label;
 
             if (!Components.isSuccessCode(aStatus)) {
               cal.showError(label);
             }
           },
-          onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {},
+          onGetResult: function(calendar, status, itemType, detail, items) {},
         };
 
         try {
           aActionFunc(opListener, aParticipantStatus, aExtResponse);
         } catch (exc) {
           Cu.reportError(exc);
         }
         return true;
--- a/calendar/lightning/content/lightning-item-iframe.js
+++ b/calendar/lightning/content/lightning-item-iframe.js
@@ -621,17 +621,17 @@ function loadDialog(aItem) {
   } else {
     setElementValue("item-title", aItem.title);
     setElementValue("item-location", aItem.getProperty("LOCATION"));
   }
 
   // add calendars to the calendar menulist
   if (gNewItemUI) {
     let calendarToUse = aItem.calendar || window.arguments[0].calendar;
-    let unfilteredList = sortCalendarArray(cal.getCalendarManager().getCalendars({}));
+    let unfilteredList = sortCalendarArray(cal.getCalendarManager().getCalendars());
 
     // filter out calendars that should not be included
     let calendarList = unfilteredList.filter(
       calendar =>
         calendar.id == calendarToUse.id ||
         (calendar &&
           cal.acl.isCalendarWritable(calendar) &&
           (cal.acl.userCanAddItemsToCalendar(calendar) ||
@@ -3264,17 +3264,17 @@ function onCommandSave(aIsClosing) {
           eventDialogCalendarObserver.observe(window.calendarItem.calendar);
         }
       }
       // this triggers the update of the imipbar in case this is a rescheduling case
       if (window.counterProposal && window.counterProposal.onReschedule) {
         window.counterProposal.onReschedule();
       }
     },
-    onGetResult: function() {},
+    onGetResult: function(calendarItem, status, itemType, detail, items) {},
   };
   let resp = document.getElementById("notify-attendees-checkbox").checked
     ? Ci.calIItipItem.AUTO
     : Ci.calIItipItem.NONE;
   let extResponse = { responseMode: resp };
   window.onAcceptCallback(item, calendar, originalItem, listener, extResponse);
 }
 
--- a/calendar/lightning/content/messenger-overlay-sidebar.js
+++ b/calendar/lightning/content/messenger-overlay-sidebar.js
@@ -580,19 +580,19 @@ var gInvitationsOperationListener = {
       document.getElementById("calendar-invitations-label").value = value;
       setElementValue(invitationsBox, this.mCount < 1 && "true", "hidden");
     } else {
       invitationsBox.setAttribute("hidden", "true");
     }
     this.mCount = 0;
   },
 
-  onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+  onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
     if (Components.isSuccessCode(aStatus)) {
-      this.mCount += aCount;
+      this.mCount += aItems.length;
     }
   },
 };
 
 var gInvitationsCalendarManagerObserver = {
   mSideBar: this,
 
   QueryInterface: ChromeUtils.generateQI([Ci.calICalendarManagerObserver]),
--- a/calendar/providers/caldav/calDavCalendar.js
+++ b/calendar/providers/caldav/calDavCalendar.js
@@ -261,17 +261,17 @@ calDavCalendar.prototype = {
    * Ensure that cached items have associated meta data, otherwise server side
    * changes may not be reflected
    */
   ensureMetaData: function() {
     let self = this;
     let refreshNeeded = false;
     let getMetaListener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
         for (let item of aItems) {
           if (!(item.id in self.mItemInfoCache)) {
             let path = self.getItemLocationPath(item);
             cal.LOG("Adding meta-data for cached item " + item.id);
             self.mItemInfoCache[item.id] = {
               etag: null,
               isNew: false,
               locationPath: path,
@@ -1387,17 +1387,17 @@ calDavCalendar.prototype = {
         aChangeLogListener.onResult({ status: status }, status);
       }
     };
 
     if (!this.mACLEntry) {
       let self = this;
       let opListener = {
         QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-        onGetResult: function(calendar, status, itemType, detail, count, items) {
+        onGetResult: function(calendar, status, itemType, detail, items) {
           cal.ASSERT(false, "unexpected!");
         },
         onOperationComplete: function(opCalendar, opStatus, opType, opId, opDetail) {
           self.mACLEntry = opDetail;
           self.fillACLProperties();
           self.safeRefresh(aChangeLogListener);
         },
       };
@@ -1531,17 +1531,17 @@ calDavCalendar.prototype = {
     );
   },
 
   refresh: function() {
     this.replayChangesOn(null);
   },
 
   firstInRealm: function() {
-    let calendars = cal.getCalendarManager().getCalendars({});
+    let calendars = cal.getCalendarManager().getCalendars();
     for (let i = 0; i < calendars.length; i++) {
       if (calendars[i].type != "caldav" || calendars[i].getProperty("disabled")) {
         continue;
       }
       // XXX We should probably expose the inner calendar via an
       // interface, but for now use wrappedJSObject.
       let calendar = calendars[i].wrappedJSObject;
       if (calendar.mUncachedCalendar) {
@@ -2863,17 +2863,17 @@ calDavCalendar.prototype = {
     getItemListener.QueryInterface = ChromeUtils.generateQI([Ci.calIOperationListener]);
     getItemListener.onOperationComplete = function(
       aCalendar,
       aStatus,
       aOperationType,
       aId,
       aDetail
     ) {};
-    getItemListener.onGetResult = function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+    getItemListener.onGetResult = function(aCalendar, aStatus, aItemType, aDetail, aItems) {
       let itemToUpdate = aItems[0];
       if (aItem.recurrenceId && itemToUpdate.recurrenceInfo) {
         itemToUpdate = itemToUpdate.recurrenceInfo.getOccurrenceFor(aItem.recurrenceId);
       }
       let newItem = itemToUpdate.clone();
 
       for (let attendee of aItem.getAttendees()) {
         let att = newItem.getAttendeeById(attendee.id);
--- a/calendar/providers/composite/calCompositeCalendar.js
+++ b/calendar/providers/composite/calCompositeCalendar.js
@@ -129,17 +129,17 @@ calCompositeCalendar.prototype = {
       for (let calendar of this.mCalendars) {
         this.removeCalendar(calendar);
       }
     }
     this.mPrefPrefix = aPrefPrefix;
     this.mActivePref = aPrefPrefix + "-in-composite";
     this.mDefaultPref = aPrefPrefix + "-default";
     let mgr = cal.getCalendarManager();
-    let cals = mgr.getCalendars({});
+    let cals = mgr.getCalendars();
 
     cals.forEach(function(calendar) {
       if (calendar.getProperty(this.mActivePref)) {
         this.addCalendar(calendar);
       }
       if (calendar.getProperty(this.mDefaultPref)) {
         this.setDefaultCalendar(calendar, false);
       }
@@ -191,18 +191,17 @@ calCompositeCalendar.prototype = {
     for (let calendar of this.mCalendars) {
       if (calendar.id == aId) {
         return calendar;
       }
     }
     return null;
   },
 
-  getCalendars: function(count) {
-    count.value = this.mCalendars.length;
+  getCalendars: function() {
     return this.mCalendars;
   },
 
   get defaultCalendar() {
     return this.mDefaultCalendar;
   },
 
   setDefaultCalendar: function(calendar, usePref) {
@@ -479,56 +478,58 @@ calCompositeGetListenerHelper.prototype 
     }
     if (this.mCompositeCalendar.statusDisplayed) {
       this.mCompositeCalendar.mStatusObserver.calendarCompleted(aCalendar);
     }
     if (!Components.isSuccessCode(aStatus)) {
       // proxy this to a onGetResult
       // XXX - do we want to give the real calendar? or this?
       // XXX - get rid of iid param
-      this.mRealListener.onGetResult(aCalendar, aStatus, Ci.nsISupports, aDetail, 0, []);
+      this.mRealListener.onGetResult(aCalendar, aStatus, Ci.nsISupports, aDetail, []);
     }
 
     this.mReceivedCompletes++;
     if (this.mReceivedCompletes == this.mNumQueries) {
       if (this.mCompositeCalendar.statusDisplayed) {
         this.mCompositeCalendar.mStatusObserver.stopMeteors();
       }
       // we're done here.
       this.mFinished = true;
       this.opGroup.notifyCompleted();
       this.mRealListener.onOperationComplete(this, aStatus, calIOperationListener.GET, null, null);
     }
   },
 
-  onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+  onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
     if (!this.mRealListener) {
       // has been cancelled, ignore any providers firing on this...
       return;
     }
     if (this.mFinished) {
       dump("+++ calCompositeGetListenerHelper.onGetResult: called with mFinished == true!");
       return;
     }
 
     // ignore if we have a max and we're past it
     if (this.mMaxItems && this.mItemsReceived >= this.mMaxItems) {
       return;
     }
 
+    let itemsCount = aItems.length;
+
     if (
       Components.isSuccessCode(aStatus) &&
       this.mMaxItems &&
-      this.mItemsReceived + aCount > this.mMaxItems
+      this.mItemsReceived + itemsCount > this.mMaxItems
     ) {
       // this will blow past the limit
-      aCount = this.mMaxItems - this.mItemsReceived;
-      aItems = aItems.slice(0, aCount);
+      itemsCount = this.mMaxItems - this.mItemsReceived;
+      aItems = aItems.slice(0, itemsCount);
     }
 
     // send GetResults to the real listener
-    this.mRealListener.onGetResult(aCalendar, aStatus, aItemType, aDetail, aCount, aItems);
-    this.mItemsReceived += aCount;
+    this.mRealListener.onGetResult(aCalendar, aStatus, aItemType, aDetail, aItems);
+    this.mItemsReceived += itemsCount;
   },
 };
 
 /** Module Registration */
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([calCompositeCalendar]);
--- a/calendar/providers/ics/calICSCalendar.js
+++ b/calendar/providers/ics/calICSCalendar.js
@@ -361,18 +361,18 @@ calICSCalendar.prototype = {
             ex.result,
             "The calendar could not be saved; there was a failure: 0x" + ex.result.toString(16)
           );
           self.mObserver.onError(self.superCalendar, calIErrors.MODIFICATION_FAILED, "");
           self.unlock(calIErrors.MODIFICATION_FAILED);
           self.forceRefresh();
         }
       },
-      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
-        this.serializer.addItems(aItems, aCount);
+      onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
+        this.serializer.addItems(aItems, aItems.length);
       },
     };
     listener.serializer = Cc["@mozilla.org/calendar/ics-serializer;1"].createInstance(
       Ci.calIIcsSerializer
     );
     for (let comp of this.unmappedComponents) {
       listener.serializer.addComponent(comp);
     }
@@ -524,17 +524,17 @@ calICSCalendar.prototype = {
       return;
     }
 
     function modListener(action) {
       this.mAction = action;
     }
     modListener.prototype = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-      onGetResult: function() {},
+      onGetResult: function(calendar, status, itemType, detail, items) {},
       onOperationComplete: function() {
         this.mAction.opCompleteArgs = arguments;
       },
     };
 
     let a;
     let writeICS = false;
     let refreshAction = null;
--- a/calendar/providers/memory/calMemoryCalendar.js
+++ b/calendar/providers/memory/calMemoryCalendar.js
@@ -352,17 +352,17 @@ calMemoryCalendar.prototype = {
         Cr.NS_ERROR_FAILURE,
         Ci.calIOperationListener.GET,
         aId,
         "Can't deduce item type based on QI"
       );
       return;
     }
 
-    aListener.onGetResult(this.superCalendar, Cr.NS_OK, iid, null, 1, [item]);
+    aListener.onGetResult(this.superCalendar, Cr.NS_OK, iid, null, [item]);
 
     this.notifyOperationComplete(aListener, Cr.NS_OK, Ci.calIOperationListener.GET, aId, null);
   },
 
   // void getItems( in unsigned long aItemFilter, in unsigned long aCount,
   //                in calIDateTime aRangeStart, in calIDateTime aRangeEnd,
   //                in calIOperationListener aListener );
   getItems: function(aItemFilter, aCount, aRangeStart, aRangeEnd, aListener) {
@@ -510,24 +510,17 @@ calMemoryCalendar.prototype = {
           itemsFound.push(item);
         }
         if (aCount && itemsFound.length >= aCount) {
           return cal.iterate.forEach.BREAK;
         }
         return cal.iterate.forEach.CONTINUE;
       },
       () => {
-        aListener.onGetResult(
-          this.superCalendar,
-          Cr.NS_OK,
-          typeIID,
-          null,
-          itemsFound.length,
-          itemsFound
-        );
+        aListener.onGetResult(this.superCalendar, Cr.NS_OK, typeIID, null, itemsFound);
         this.notifyOperationComplete(aListener, Cr.NS_OK, Ci.calIOperationListener.GET, null, null);
       }
     );
   },
 
   //
   // calIOfflineStorage interface
   //
--- a/calendar/providers/storage/calStorageCalendar.js
+++ b/calendar/providers/storage/calStorageCalendar.js
@@ -561,17 +561,17 @@ calStorageCalendar.prototype = {
         Cr.NS_ERROR_FAILURE,
         Ci.calIOperationListener.GET,
         aId,
         "Can't deduce item type based on QI"
       );
       return;
     }
 
-    aListener.onGetResult(this.superCalendar, Cr.NS_OK, item_iid, null, 1, [item]);
+    aListener.onGetResult(this.superCalendar, Cr.NS_OK, item_iid, null, [item]);
 
     this.notifyOperationComplete(aListener, Cr.NS_OK, Ci.calIOperationListener.GET, aId, null);
   },
 
   // void getItems( in unsigned long aItemFilter, in unsigned long aCount,
   //                in calIDateTime aRangeStart, in calIDateTime aRangeEnd,
   //                in calIOperationListener aListener );
   getItems: async function(aItemFilter, aCount, aRangeStart, aRangeEnd, aListener) {
@@ -652,24 +652,17 @@ calStorageCalendar.prototype = {
         queuedItemsIID = theIID;
       }
 
       if (theItems) {
         queuedItems = queuedItems.concat(theItems);
       }
 
       if (queuedItems.length != 0 && (!theItems || queuedItems.length > maxQueueSize)) {
-        aListener.onGetResult(
-          self.superCalendar,
-          Cr.NS_OK,
-          queuedItemsIID,
-          null,
-          queuedItems.length,
-          queuedItems
-        );
+        aListener.onGetResult(self.superCalendar, Cr.NS_OK, queuedItemsIID, null, queuedItems);
         queuedItems = [];
       }
     }
 
     // helper function to handle converting a row to an item,
     // expanding occurrences, and queue the items for the listener
     function handleResultItem(item, theIID, optionalFilterFunc) {
       let expandedItems = [];
@@ -897,17 +890,17 @@ calStorageCalendar.prototype = {
       aItem
     );
   },
 
   modifyOfflineItem: function(aItem, aListener) {
     let self = this;
     let opListener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-      onGetResult: function(calendar, status, itemType, detail, count, items) {},
+      onGetResult: function(calendar, status, itemType, detail, items) {},
       onOperationComplete: async function(calendar, status, opType, id, oldOfflineJournalFlag) {
         let newOfflineJournalFlag = cICL.OFFLINE_FLAG_MODIFIED_RECORD;
         if (
           oldOfflineJournalFlag == cICL.OFFLINE_FLAG_CREATED_RECORD ||
           oldOfflineJournalFlag == cICL.OFFLINE_FLAG_DELETED_RECORD
         ) {
           // Do nothing since a flag of "created" or "deleted" exists
         } else {
@@ -924,17 +917,17 @@ calStorageCalendar.prototype = {
     };
     this.getItemOfflineFlag(aItem, opListener);
   },
 
   deleteOfflineItem: function(aItem, aListener) {
     let self = this;
     let opListener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-      onGetResult: function(calendar, status, itemType, detail, count, items) {},
+      onGetResult: function(calendar, status, itemType, detail, items) {},
       onOperationComplete: async function(calendar, status, opType, id, oldOfflineJournalFlag) {
         if (oldOfflineJournalFlag) {
           // Delete item if flag is c
           if (oldOfflineJournalFlag == cICL.OFFLINE_FLAG_CREATED_RECORD) {
             await self.deleteItemById(aItem.id);
           } else if (oldOfflineJournalFlag == cICL.OFFLINE_FLAG_MODIFIED_RECORD) {
             await self.setOfflineJournalFlag(aItem, cICL.OFFLINE_FLAG_DELETED_RECORD);
           }
--- a/calendar/providers/wcap/calWcapCalendarItems.js
+++ b/calendar/providers/wcap/calWcapCalendarItems.js
@@ -1139,17 +1139,16 @@ calWcapCalendar.prototype.getItem = func
             this.notifyError(NS_ERROR_UNEXPECTED, "unexpected number of items: " + items.length);
           }
           if (listener) {
             listener.onGetResult(
               this.superCalendar,
               NS_OK,
               calIItemBase,
               log("getItem(): success. id=" + id, this),
-              items.length,
               items
             );
           }
           request.execRespFunc(null, items[0]);
         };
         if (err) {
           if (
             !checkErrorCode(err, calIWcapErrors.WCAP_FETCH_EVENTS_BY_ID_FAILED) &&
@@ -1266,17 +1265,16 @@ calWcapCalendar.prototype.getItems = fun
       ) {
         log("reusing last getItems() cached data.", this);
         if (listener) {
           listener.onGetResult(
             this.superCalendar,
             NS_OK,
             calIItemBase,
             "getItems()",
-            entry.results.length,
             entry.results
           );
         }
         request.execRespFunc(null, entry.results);
         return request;
       }
     }
   }
@@ -1320,17 +1318,16 @@ calWcapCalendar.prototype.getItems = fun
                     item.makeImmutable();
                     items.push(item);
                   }
                   listener.onGetResult(
                     this.superCalendar,
                     NS_OK,
                     calIItemBase,
                     "getItems()/free-busy",
-                    items.length,
                     items
                   );
                 }.bind(this),
               };
               request.attachSubRequest(
                 this.session.getFreeBusyIntervals(
                   this.calId,
                   rangeStart,
@@ -1398,24 +1395,17 @@ calWcapCalendar.prototype.getItems = fun
               results: items,
             };
             this.m_cachedResults.unshift(cacheEntry);
             if (this.m_cachedResults.length > CACHE_LAST_RESULTS) {
               this.m_cachedResults.length = CACHE_LAST_RESULTS;
             }
           }
 
-          listener.onGetResult(
-            this.superCalendar,
-            NS_OK,
-            calIItemBase,
-            "getItems()",
-            items.length,
-            items
-          );
+          listener.onGetResult(this.superCalendar, NS_OK, calIItemBase, "getItems()", items);
         }
       },
       stringToIcal,
       "fetchcomponents_by_range",
       params,
       calIWcapCalendar.AC_COMP_READ
     );
   } catch (exc) {
@@ -1447,17 +1437,17 @@ calWcapCalendar.prototype.replayChangesO
     if (listener) {
       listener.onResult(request, null);
     }
   }, log("replayChangesOn():\n\titemFilter=0x" + itemFilter.toString(0x10) + "\n\tdtFrom=" + getIcalUTC(dtFrom), this));
 
   try {
     let writeListener = {
       QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
-      onGetResult: function() {},
+      onGetResult: function(calendar, status, itemType, detail, items) {},
       onOperationComplete: function(aCalendar, status, opType, id, detail) {
         if (!Components.isSuccessCode(status)) {
           request.execRespFunc(status); // any error on writing breaks whole operation
         }
       },
     };
     let request = new calWcapRequest((err, data) => {
       let modifiedIds = {};
--- a/calendar/providers/wcap/calWcapSession.js
+++ b/calendar/providers/wcap/calWcapSession.js
@@ -880,17 +880,17 @@ calWcapSession.prototype = {
       // Fall through to the return statement below in case the uncached
       // calendar can't be retrieved.
     }
     return null;
   },
 
   getRegisteredCalendars: function(asAssocObj) {
     let registeredCalendars = asAssocObj ? {} : [];
-    let cals = cal.getCalendarManager().getCalendars({});
+    let cals = cal.getCalendarManager().getCalendars();
     for (let calendar of cals) {
       calendar = this.belongsTo(calendar);
       if (calendar) {
         if (asAssocObj) {
           registeredCalendars[calendar.calId] = calendar;
         } else {
           registeredCalendars.push(calendar);
         }
--- a/calendar/resources/content/calendarCreation.js
+++ b/calendar/resources/content/calendarCreation.js
@@ -279,17 +279,17 @@ function parseUri(aUri) {
   try {
     // Test if the entered uri can be parsed.
     uri = Services.io.newURI(aUri);
   } catch (ex) {
     return [errorConstants.INVALID_URI, null];
   }
 
   let calManager = cal.getCalendarManager();
-  let cals = calManager.getCalendars({});
+  let cals = calManager.getCalendars();
   let type = document.getElementById("calendar-type").selectedItem.value;
   if (type != "local" && cals.some(calendar => calendar.uri.spec == uri.spec)) {
     // If the calendar is not local, we check if there is already a calendar
     // with the same uri spec. Storage calendars all have the same uri, so
     // we have to specialcase them.
     return [errorConstants.ALREADY_EXISTS, null];
   }
 
--- a/calendar/resources/content/publish.js
+++ b/calendar/resources/content/publish.js
@@ -45,20 +45,19 @@ function publishCalendarDataDialogRespon
  * publishEntireCalendar
  * Show publish dialog, ask for URL and publish all items from the calendar.
  *
  * @param aCalendar   (optional) The calendar that will be published. If omitted
  *                               the user will be prompted to select a calendar.
  */
 function publishEntireCalendar(aCalendar) {
   if (!aCalendar) {
-    let count = {};
-    let calendars = cal.getCalendarManager().getCalendars(count);
+    let calendars = cal.getCalendarManager().getCalendars();
 
-    if (count.value == 1) {
+    if (calendars.length == 1) {
       // Do not ask user for calendar if only one calendar exists
       aCalendar = calendars[0];
     } else {
       // Ask user to select the calendar that should be published.
       // publishEntireCalendar() will be called again if OK is pressed
       // in the dialog and the selected calendar will be passed in.
       // Therefore return after openDialog().
       let args = {};
@@ -106,22 +105,22 @@ function publishEntireCalendarDialogResp
   CalendarPublishObject.calendar.setProperty("remote-ics-path", CalendarPublishObject.remotePath);
 
   let itemArray = [];
   let getListener = {
     QueryInterface: ChromeUtils.generateQI([Ci.calIOperationListener]),
     onOperationComplete: function(aCalendar, aStatus, aOperationType, aId, aDetail) {
       publishItemArray(itemArray, CalendarPublishObject.remotePath, aProgressDialog);
     },
-    onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
+    onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
       if (!Components.isSuccessCode(aStatus)) {
         return;
       }
-      if (aCount) {
-        for (let i = 0; i < aCount; ++i) {
+      if (aItems.length) {
+        for (let i = 0; i < aItems.length; ++i) {
           // Store a (short living) reference to the item.
           let itemCopy = aItems[i].clone();
           itemArray.push(itemCopy);
         }
       }
     },
   };
   aProgressDialog.onStartUpload();
--- a/calendar/test/browser/browser_calendarList.js
+++ b/calendar/test/browser/browser_calendarList.js
@@ -103,17 +103,17 @@ add_task(async () => {
   let calendarList = document.getElementById("calendar-list");
   let contextMenu = document.getElementById("list-calendars-context-menu");
   let manager = cal.getCalendarManager();
   let composite = cal.view.getCompositeCalendar(window);
 
   await openCalendarTab();
 
   // Check the default calendar.
-  let calendars = manager.getCalendars({});
+  let calendars = manager.getCalendars();
   is(calendars.length, 1);
   is(calendarList.itemCount, 1);
   checkProperties(0, {
     color: "rgb(168, 194, 225)",
     name: "Home",
   });
   checkSortOrder(0);
 
@@ -129,17 +129,17 @@ add_task(async () => {
   // Add some new calendars, check their properties.
   let uri = Services.io.newURI("moz-memory-calendar://");
   for (let i = 1; i <= 3; i++) {
     calendars[i] = manager.createCalendar("memory", uri);
     calendars[i].name = `Mochitest ${i}`;
     manager.registerCalendar(calendars[i]);
   }
 
-  is(manager.getCalendars({}).length, 4);
+  is(manager.getCalendars().length, 4);
   is(calendarList.itemCount, 4);
 
   for (let i = 1; i <= 3; i++) {
     checkProperties(i, {
       id: calendars[i].id,
       displayed: true,
       color: "rgb(168, 194, 225)",
       name: `Mochitest ${i}`,
@@ -296,42 +296,42 @@ add_task(async () => {
 
   is(document.activeElement, calendarList);
   is(calendarList.selectedItem, calendarList.itemChildren[0]);
 
   // Test deleting calendars.
 
   // Delete a calendar by unregistering it.
   manager.unregisterCalendar(calendars[3]);
-  is(manager.getCalendars({}).length, 3);
+  is(manager.getCalendars().length, 3);
   is(calendarList.itemCount, 3);
   checkSortOrder(0, 1, 2);
 
   // Start to remove a calendar. Cancel the prompt.
   EventUtils.synthesizeMouseAtCenter(calendarList.itemChildren[1], {});
   await withMockPromptService(1, () => {
     EventUtils.synthesizeKey("VK_DELETE");
   });
-  is(manager.getCalendars({}).length, 3);
+  is(manager.getCalendars().length, 3);
   is(calendarList.itemCount, 3);
   checkSortOrder(0, 1, 2);
 
   // Remove a calendar with the keyboard.
   await withMockPromptService(0, () => {
     EventUtils.synthesizeKey("VK_DELETE");
   });
-  is(manager.getCalendars({}).length, 2);
+  is(manager.getCalendars().length, 2);
   is(calendarList.itemCount, 2);
   checkSortOrder(0, 2);
 
   // Remove a calendar with the context menu.
   await withMockPromptService(0, async () => {
     EventUtils.synthesizeMouseAtCenter(calendarList.itemChildren[1], {});
     await calendarListContextMenu(calendarList.itemChildren[1], "list-calendars-context-delete");
   });
-  is(manager.getCalendars({}).length, 1);
+  is(manager.getCalendars().length, 1);
   is(calendarList.itemCount, 1);
   checkSortOrder(0);
 
   is(composite.defaultCalendar.id, calendars[0].id);
   is(calendarList.selectedItem, calendarList.itemChildren[0]);
   await closeCalendarTab();
 });
--- a/calendar/test/browser/browser_import.js
+++ b/calendar/test/browser/browser_import.js
@@ -15,17 +15,17 @@ add_task(async () => {
   let file = fileUrl.QueryInterface(Ci.nsIFileURL).file;
 
   MockFilePicker.init(content);
   MockFilePicker.setFiles([file]);
   MockFilePicker.returnValue = MockFilePicker.returnOK;
 
   await loadEventsFromFile();
 
-  let calendar = cal.getCalendarManager().getCalendars({})[0];
+  let calendar = cal.getCalendarManager().getCalendars()[0];
   let promiseCalendar = cal.async.promisifyCalendar(calendar);
   let result = await promiseCalendar.getItems(
     Ci.calICalendar.ITEM_FILTER_ALL_ITEMS,
     0,
     cal.createDateTime("20190101T000000"),
     cal.createDateTime("20190102T000000")
   );
   is(result.length, 4);
--- a/calendar/test/modules/CalendarUtils.jsm
+++ b/calendar/test/modules/CalendarUtils.jsm
@@ -482,17 +482,17 @@ function closeAllEventDialogs() {
  * @param name          calendar name
  */
 function deleteCalendars(controller, name) {
   let { eid } = helpersForController(controller);
 
   let win = eid("messengerWindow").getNode().ownerGlobal;
   let manager = win.cal.getCalendarManager();
 
-  for (let calendar of manager.getCalendars({})) {
+  for (let calendar of manager.getCalendars()) {
     if (calendar.name == name) {
       manager.removeCalendar(calendar);
     }
   }
 }
 
 /**
  * Creates local calendar with given name and select it in calendars list.
--- a/calendar/test/unit/test_bug494140.js
+++ b/calendar/test/unit/test_bug494140.js
@@ -44,23 +44,23 @@ add_task(async () => {
   // There should still be one alarm, one relation and one attachment
   equal(item.getAlarms().length, 1);
   equal(item.getRelations().length, 1);
   equal(item.getAttachments().length, 1);
 
   // Add the item to the storage calendar and retrieve it again
   await new Promise(resolve => {
     storageCal.adoptItem(item, {
-      onGetResult: function() {},
+      onGetResult: function(calendar, status, itemType, detail, items) {},
       onOperationComplete: resolve,
     });
   });
   let retrievedItem = await new Promise(resolve => {
     storageCal.getItem("c1a6cfe7-7fbb-4bfb-a00d-861e07c649a5", {
-      onGetResult: function(cal, stat, type, detail, count, items) {
+      onGetResult: function(cal, stat, type, detail, items) {
         resolve(items[0]);
       },
       onOperationComplete: function() {},
     });
   });
 
   // There should still be one alarm, one relation and one attachment
   equal(retrievedItem.getAlarms().length, 1);
--- a/calendar/test/unit/test_calmgr.js
+++ b/calendar/test/unit/test_calmgr.js
@@ -72,30 +72,30 @@ add_test(function test_registration() {
   checkRegistration(true, false, false);
   checkCalendarCount(0, 0, 1);
 
   // The calendar should now have an id
   notEqual(memory.id, null);
 
   // And be in the list of calendars
   equal(memory, calmgr.getCalendarById(memory.id));
-  ok(calmgr.getCalendars({}).some(x => x.id == memory.id));
+  ok(calmgr.getCalendars().some(x => x.id == memory.id));
 
   // Make it readonly and check if the observer caught it
   memory.setProperty("readOnly", true);
   equal(readOnly, true);
 
   // Now unregister it
   calmgr.unregisterCalendar(memory);
   checkRegistration(false, true, false);
   checkCalendarCount(0, 0, 0);
 
   // The calendar shouldn't be in the list of ids
   equal(calmgr.getCalendarById(memory.id), null);
-  ok(calmgr.getCalendars({}).every(x => x.id != memory.id));
+  ok(calmgr.getCalendars().every(x => x.id != memory.id));
 
   // And finally delete it
   calmgr.removeCalendar(memory, Ci.calICalendarManager.REMOVE_NO_UNREGISTER);
   checkRegistration(false, false, true);
   checkCalendarCount(0, 0, 0);
 
   // Now remove the observer again
   calmgr.removeObserver(mgrobs);
--- a/calendar/test/unit/test_providers.js
+++ b/calendar/test/unit/test_providers.js
@@ -213,20 +213,20 @@ add_task(async function testIcalData() {
           if (aOperationType == Ci.calIOperationListener.ADD) {
             // perform getItems() on calendar
             aCalendar.getItems(filter, 0, rangeStart, rangeEnd, listener);
           } else if (aOperationType == Ci.calIOperationListener.GET) {
             equal(count, aResult);
             resolve();
           }
         },
-        onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
-          if (aCount) {
-            count += aCount;
-            for (let i = 0; i < aCount; i++) {
+        onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
+          if (aItems.length) {
+            count += aItems.length;
+            for (let i = 0; i < aItems.length; i++) {
               // Don't check creationDate as it changed when we added the item to the database.
               compareItemsSpecific(aItems[i].parentItem, aItem, [
                 "start",
                 "end",
                 "duration",
                 "title",
                 "priority",
                 "privacy",
@@ -282,19 +282,19 @@ add_task(async function testIcalData() {
               "privacy",
               "status",
               "alarmLastAck",
               "recurrenceStartDate",
             ]);
           }
           this.promises.pop()();
         },
-        onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
-          if (aCount) {
-            count += aCount;
+        onGetResult: function(aCalendar, aStatus, aItemType, aDetail, aItems) {
+          if (aItems.length) {
+            count += aItems.length;
             returnedItem = aItems[0];
           }
         },
       };
 
       await new Promise(resolve => {
         listener.promises.push(resolve);
         // add item to calendar
@@ -309,29 +309,29 @@ add_task(async function testMetaData() {
     dump("testMetaData_() calendar type: " + aCalendar.type + "\n");
     let event1 = createEventFromIcalString(
       "BEGIN:VEVENT\n" + "DTSTART;VALUE=DATE:20020402\n" + "END:VEVENT\n"
     );
 
     event1.id = "item1";
     await new Promise(resolve => {
       aCalendar.addItem(event1, {
-        onGetResult: function() {},
+        onGetResult: function(calendar, aStatus, aItemType, aDetail, aItems) {},
         onOperationComplete: resolve,
       });
     });
     aCalendar.setMetaData("item1", "meta1");
     equal(aCalendar.getMetaData("item1"), "meta1");
     equal(aCalendar.getMetaData("unknown"), null);
 
     let event2 = event1.clone();
     event2.id = "item2";
     await new Promise(resolve => {
       aCalendar.addItem(event2, {
-        onGetResult: function() {},
+        onGetResult: function(calendar, aStatus, aItemType, aDetail, aItems) {},
         onOperationComplete: resolve,
       });
     });
     aCalendar.setMetaData("item2", "meta2-");
     equal(aCalendar.getMetaData("item2"), "meta2-");
 
     aCalendar.setMetaData("item2", "meta2");
     equal(aCalendar.getMetaData("item2"), "meta2");
@@ -343,17 +343,17 @@ add_task(async function testMetaData() {
     equal(count.value, 2);
     ok(ids.value[0] == "item1" || ids.value[1] == "item1");
     ok(ids.value[0] == "item2" || ids.value[1] == "item2");
     ok(values.value[0] == "meta1" || values.value[1] == "meta1");
     ok(values.value[0] == "meta2" || values.value[1] == "meta2");
 
     await new Promise(resolve => {
       aCalendar.deleteItem(event1, {
-        onGetResult: () => {},
+        onGetResult: (calendar, aStatus, aItemType, aDetail, aItems) => {},
         onOperationComplete: resolve,
       });
     });
     equal(aCalendar.getMetaData("item1"), null);
     aCalendar.getAllMetaData(count, ids, values);
     equal(count.value, 1);
     ok(ids.value[0] == "item2");
     ok(values.value[0] == "meta2");
--- a/calendar/test/unit/test_storage.js
+++ b/calendar/test/unit/test_storage.js
@@ -33,17 +33,17 @@ add_task(async () => {
   });
 
   // Make sure the cache is cleared, otherwise we'll get the cached item.
   delete storage.wrappedJSObject.mItemCache[addedItemId];
 
   await new Promise(resolve => {
     storage.getItem(addedItemId, {
       found: false,
-      onGetResult: function(calendar, status, type, detail, count, items) {
+      onGetResult: function(calendar, status, type, detail, items) {
         let item = items[0];
 
         // Check start date
         equal(item.startDate.compare(cal.createDateTime("20120101T010101Z")), 0);
 
         // Check attachment
         let attaches = item.getAttachments();
         let attach = attaches[0];