Bug 1557504 - remove [array] use in xpidl from calIItipTransport.idl and calIPrintFormatter.idl. r=pmorris
authorKhushil Mistry <khushil324@gmail.com>
Thu, 14 Nov 2019 08:05:00 +0100
changeset 36639 bfb3d45e856fb748ff2b7101a596690a7c658492
parent 36638 019d5b24c54331e238387b7e4bb0673f9c339a2a
child 36640 d876748e86f5313bd99692a874f32d690eb2cd8c
push id2534
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:52:51 +0000
treeherdercomm-beta@055c50840778 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspmorris
bugs1557504
Bug 1557504 - remove [array] use in xpidl from calIItipTransport.idl and calIPrintFormatter.idl. r=pmorris
calendar/base/content/dialogs/calendar-print-dialog.js
calendar/base/modules/utils/calItipUtils.jsm
calendar/base/public/calIItipTransport.idl
calendar/base/public/calIPrintFormatter.idl
calendar/import-export/calListFormatter.js
calendar/import-export/calMonthGridPrinter.js
calendar/import-export/calWeekPrinter.js
calendar/itip/calItipEmailTransport.js
calendar/providers/caldav/calDavCalendar.js
--- a/calendar/base/content/dialogs/calendar-print-dialog.js
+++ b/calendar/base/content/dialogs/calendar-print-dialog.js
@@ -217,17 +217,16 @@ function refreshHtml(finishFunc) {
     try {
       let pipe = Cc["@mozilla.org/pipe;1"].createInstance(Ci.nsIPipe);
       const PR_UINT32_MAX = 4294967295; // signals "infinite-length"
       pipe.init(true, true, 0, PR_UINT32_MAX, null);
       printformatter.formatToHtml(
         pipe.outputStream,
         settings.start,
         settings.end,
-        settings.eventList.length,
         settings.eventList,
         settings.title
       );
       pipe.outputStream.close();
       // convert byte-array to UTF-8 string:
       let convStream = Cc["@mozilla.org/intl/converter-input-stream;1"].createInstance(
         Ci.nsIConverterInputStream
       );
--- a/calendar/base/modules/utils/calItipUtils.jsm
+++ b/calendar/base/modules/utils/calItipUtils.jsm
@@ -1473,17 +1473,17 @@ function sendMessage(aItem, aMethod, aRe
     itipItem.responseMethod = aMethod;
     itipItem.targetCalendar = aSendItem.calendar;
     itipItem.autoResponse = autoResponse.mode;
     // we switch to AUTO for each subsequent call of _sendItem()
     autoResponse.mode = Ci.calIItipItem.AUTO;
     // XXX I don't know whether the below is used at all, since we don't use the itip processor
     itipItem.isSend = true;
 
-    return transport.sendItems(aSendToList.length, aSendToList, itipItem);
+    return transport.sendItems(aSendToList, itipItem);
   };
 
   // split up transport, if attendee undisclosure is requested
   // and this is a message send by the organizer
   if (
     aItem.getProperty("X-MOZ-SEND-INVITATIONS-UNDISCLOSED") == "TRUE" &&
     aMethod != "REPLY" &&
     aMethod != "REFRESH" &&
--- a/calendar/base/public/calIItipTransport.idl
+++ b/calendar/base/public/calIItipTransport.idl
@@ -37,12 +37,11 @@ interface calIItipTransport : nsISupport
      * alternative representation. If a calIItipItem is attached, then an ICS
      * representation of those objects are generated and attached to the email.
      * If the calIItipItem is null, then the item(s) is sent without any
      * text/calendar mime part.
      * @param count             size of recipient array
      * @param recipientArray    array of recipients
      * @param calIItipItem      set of calIItems encapsulated as calIItipItems
      */
-    boolean sendItems(in uint32_t count,
-                      [array, size_is(count)] in calIAttendee recipientArray,
+    boolean sendItems(in Array<calIAttendee> recipientArray,
                       in calIItipItem item);
 };
--- a/calendar/base/public/calIPrintFormatter.idl
+++ b/calendar/base/public/calIPrintFormatter.idl
@@ -33,12 +33,11 @@ interface calIPrintFormatter : nsISuppor
    * @param aEnd     the last date that should be printed
    * @param aCount   the number of items being printed
    * @param aItems   the items to print
    * @param aTitle   a title for the HTML page
    */
   void formatToHtml(in nsIOutputStream aStream,
                     in calIDateTime aStart,
                     in calIDateTime aEnd,
-                    in unsigned long aCount,
-                    [array, size_is(aCount)] in calIItemBase aItems,
+                    in Array<calIItemBase> aItems,
                     in AString aTitle);
 };
--- a/calendar/import-export/calListFormatter.js
+++ b/calendar/import-export/calListFormatter.js
@@ -14,15 +14,15 @@ function calListFormatter() {
 calListFormatter.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.calIPrintFormatter]),
   classID: Components.ID("{9ae04413-fee3-45b9-8bbb-1eb39a4cbd1b}"),
 
   get name() {
     return cal.l10n.getCalString("formatListName");
   },
 
-  formatToHtml: function(aStream, aStart, aEnd, aCount, aItems, aTitle) {
+  formatToHtml: function(aStream, aStart, aEnd, aItems, aTitle) {
     let htmlexporter = Cc["@mozilla.org/calendar/export;1?type=htmllist"].createInstance(
       Ci.calIExporter
     );
     htmlexporter.exportToStream(aStream, aItems, aTitle);
   },
 };
--- a/calendar/import-export/calMonthGridPrinter.js
+++ b/calendar/import-export/calMonthGridPrinter.js
@@ -15,17 +15,17 @@ function calMonthPrinter() {
 calMonthPrinter.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.calIPrintFormatter]),
   classID: Components.ID("{f42d5132-92c4-487b-b5c8-38bf292d74c1}"),
 
   get name() {
     return cal.l10n.getCalString("monthPrinterName");
   },
 
-  formatToHtml: function(aStream, aStart, aEnd, aCount, aItems, aTitle) {
+  formatToHtml: function(aStream, aStart, aEnd, aItems, aTitle) {
     let document = cal.xml.parseFile(
       "chrome://calendar-common/skin/printing/calMonthGridPrinter.html"
     );
     let defaultTimezone = cal.dtz.defaultTimezone;
 
     // Set page title
     document.getElementById("title").textContent = aTitle;
 
--- a/calendar/import-export/calWeekPrinter.js
+++ b/calendar/import-export/calWeekPrinter.js
@@ -15,17 +15,17 @@ function calWeekPrinter() {
 calWeekPrinter.prototype = {
   QueryInterface: ChromeUtils.generateQI([Ci.calIPrintFormatter]),
   classID: Components.ID("{2d6ec97b-9109-4b92-89c5-d4b4806619ce}"),
 
   get name() {
     return cal.l10n.getCalString("weekPrinterName");
   },
 
-  formatToHtml: function(aStream, aStart, aEnd, aCount, aItems, aTitle) {
+  formatToHtml: function(aStream, aStart, aEnd, aItems, aTitle) {
     let document = cal.xml.parseFile("chrome://calendar-common/skin/printing/calWeekPrinter.html");
     let defaultTimezone = cal.dtz.defaultTimezone;
 
     // Set page title
     document.getElementById("title").textContent = aTitle;
 
     cal.view.colorTracker.addColorsToDocument(document);
 
--- a/calendar/itip/calItipEmailTransport.js
+++ b/calendar/itip/calItipEmailTransport.js
@@ -34,17 +34,17 @@ calItipEmailTransport.prototype = {
   mSenderAddress: null,
   get senderAddress() {
     return this.mSenderAddress;
   },
   set senderAddress(aValue) {
     return (this.mSenderAddress = aValue);
   },
 
-  sendItems: function(aCount, aRecipients, aItipItem) {
+  sendItems: function(aRecipients, aItipItem) {
     if (this.mHasXpcomMail) {
       cal.LOG("sendItems: Preparing to send an invitation email...");
       let items = this._prepareItems(aItipItem);
       if (items === false) {
         return false;
       }
 
       return this._sendXpcomMail(aRecipients, items.subject, items.body, aItipItem);
--- a/calendar/providers/caldav/calDavCalendar.js
+++ b/calendar/providers/caldav/calDavCalendar.js
@@ -2955,29 +2955,29 @@ calDavCalendar.prototype = {
   mSenderAddress: null,
   get senderAddress() {
     return this.mSenderAddress || this.calendarUserAddress;
   },
   set senderAddress(aString) {
     return (this.mSenderAddress = aString);
   },
 
-  sendItems: function(aCount, aRecipients, aItipItem) {
+  sendItems: function(aRecipients, aItipItem) {
     function doImipScheduling(aCalendar, aRecipientList) {
       let result = false;
       let imipTransport = cal.provider.getImipTransport(aCalendar);
       let recipients = [];
       aRecipientList.forEach(rec => recipients.push(rec.toString()));
       if (imipTransport) {
         cal.LOG(
           "Enforcing client-side email scheduling instead of server-side scheduling" +
             " for " +
             recipients.join()
         );
-        result = imipTransport.sendItems(aCount, aRecipientList, aItipItem);
+        result = imipTransport.sendItems(aRecipientList, aItipItem);
       } else {
         cal.ERROR(
           "No imip transport available for " +
             aCalendar.id +
             ", failed to notify" +
             recipients.join()
         );
       }
@@ -3100,17 +3100,17 @@ calDavCalendar.prototype = {
           if (remainingAttendees.length) {
             // try to fall back to email delivery if CalDAV-sched
             // didn't work
             let imipTransport = cal.provider.getImipTransport(self);
             if (imipTransport) {
               if (self.verboseLogging()) {
                 cal.LOG("CalDAV: sending email to " + remainingAttendees.length + " recipients");
               }
-              imipTransport.sendItems(remainingAttendees.length, remainingAttendees, aItipItem);
+              imipTransport.sendItems(remainingAttendees, aItipItem);
             } else {
               cal.LOG("CalDAV: no fallback to iTIP/iMIP transport for " + self.name);
             }
           }
         },
       };
 
       let uploadData = serializer.serializeToString();