Bug 1174397 - No current or upcoming Events in Today Pane. r+a=philipp RELEASE_BASE_20150629
authorMatthew Mecca <matthew.mecca@gmail.com>
Mon, 29 Jun 2015 16:24:32 +0200
changeset 22379 81f91457dfbadb1ad199fc339cdd8d32ec985315
parent 22378 9ae9dd17eadead674786c73ad1c0233190a20b1a
child 22380 9a5b4fa8c135f5108cdfafab559ad81320e69f3d
push id1418
push usermozilla@kewis.ch
push dateMon, 29 Jun 2015 14:54:36 +0000
treeherdercomm-beta@81f91457dfba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1174397
Bug 1174397 - No current or upcoming Events in Today Pane. r+a=philipp
calendar/base/content/agenda-listbox.js
calendar/base/content/calendar-base-view.xml
--- a/calendar/base/content/agenda-listbox.js
+++ b/calendar/base/content/agenda-listbox.js
@@ -641,18 +641,19 @@ function refreshCalendarQuery(aStart, aE
             }
             for (let item of aItems) {
                 this.agendaListbox.addItem(item);
             }
         },
 
         cancel: function() {
             this.cancelled = true;
-            if (this.operation && this.operation.isPending) {
-                this.operation.cancel();
+            let op = cal.wrapInstance(this.operation, Components.interfaces.calIOperation);
+            if (op && op.isPending) {
+                op.cancel();
                 this.operation = null;
             }
         },
 
         execute: function(aStart, aEnd, aCalendar) {
             if (!(aStart || aEnd || aCalendar)) {
                 this.agendaListbox.removeListItems();
             }
@@ -685,16 +686,17 @@ function refreshCalendarQuery(aStart, aE
                     this.agendaListbox.mPendingRefreshJobs.delete(this.calId);
                 }
             }
             this.calendar = aCalendar;
 
             let filter = this.calendar.ITEM_FILTER_CLASS_OCCURRENCES |
                          this.calendar.ITEM_FILTER_TYPE_EVENT;
             let op = this.calendar.getItems(filter, 0, aStart, aEnd, this);
+            op = cal.wrapInstance(op, Components.interfaces.calIOperation);
             if (op && op.isPending) {
                 this.operation = op;
                 this.agendaListbox.mPendingRefreshJobs.set(this.calId, this);
             }
         }
     };
 
     refreshJob.execute(aStart, aEnd, aCalendar);
--- a/calendar/base/content/calendar-base-view.xml
+++ b/calendar/base/content/calendar-base-view.xml
@@ -481,18 +481,19 @@
                           this.calView.doAddItem(item);
                       }
                   }
               },
 
               cancel: function() {
                   this.calView.mLog.info("Refresh cancelled for calendar " + this.calId);
                   this.cancelled = true;
-                  if (this.operation && this.operation.isPending) {
-                      this.operation.cancel();
+                  let op = cal.wrapInstance(this.operation, Components.interfaces.calIOperation);
+                  if (op && op.isPending) {
+                      op.cancel();
                       this.operation = null;
                   }
               },
 
               execute: function(aCalendar) {
                   if (!this.calView.startDate || !this.calView.endDate || !aCalendar) {
                       return;
                   }
@@ -532,16 +533,17 @@
                       filter |= this.calendar.ITEM_FILTER_TYPE_EVENT;
                   }
 
                   let op = this.calendar.getItems(filter,
                                                   0,
                                                   this.calView.startDate,
                                                   this.calView.queryEndDate,
                                                   this);
+                  op = cal.wrapInstance(op, Components.interfaces.calIOperation);
                   if (op && op.isPending) {
                       this.operation = op;
                       this.calView.mPendingRefreshJobs.set(this.calId, this);
                   }
               }
           };
 
           refreshJob.execute(aCalendar);