Bug 764976 - Deleting calendar throws Error: error purging calendar: TypeError: calendar.deleteCalendar is not a function r=philipp
authorStefan Sitter <ssitter@gmail.com>
Sun, 17 Jun 2012 21:25:32 +0200
changeset 10455 729da3db0e600f80f4d9490e84e46dc3b3bb0a2c
parent 10454 954f7f221df450e025727854c0441f60a81a5a50
child 10456 e5c33e9d0d7e2d4420d78f2ab25450a145de6e25
push id7908
push userssitter@gmail.com
push dateSun, 17 Jun 2012 19:26:00 +0000
treeherdercomm-central@729da3db0e60 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp
bugs764976
Bug 764976 - Deleting calendar throws Error: error purging calendar: TypeError: calendar.deleteCalendar is not a function r=philipp
calendar/providers/storage/calStorageCalendar.js
--- a/calendar/providers/storage/calStorageCalendar.js
+++ b/calendar/providers/storage/calStorageCalendar.js
@@ -24,35 +24,37 @@ function calStorageCalendar() {
     this.mItemCache = {};
     this.mRecEventCache = {};
     this.mRecTodoCache = {};
 }
 
 calStorageCalendar.prototype = {
     __proto__: cal.ProviderBase.prototype,
 
+    //
+    // nsIClassInfo interface
+    //
     classID: Components.ID("{b3eaa1c4-5dfe-4c0a-b62a-b3a514218461}"),
     contractID: "@mozilla.org/calendar/calendar;1?type=storage",
     classDescription: "Calendar Storage Provider",
     getInterfaces: function (count) {
         let ifaces = [
             Components.interfaces.nsISupports,
-            Components.interfaces.calICalendarManager,
-            Components.interfaces.calIStartupService,
-            Components.interfaces.nsIObserver,
+            Components.interfaces.calICalendar,
+            Components.interfaces.calICalendarProvider,
+            Components.interfaces.calIOfflineStorage,
+            Components.interfaces.calISyncWriteCalendar,
             Components.interfaces.nsIClassInfo
         ];
         count.value = ifaces.length;
         return ifaces;
     },
-
     getHelperForLanguage: function (language) {
         return null;
     },
-
     implementationLanguage: Components.interfaces.nsIProgrammingLanguage.JAVASCRIPT,
     flags: 0,
 
     //
     // private members
     //
     mDB: null,
     mItemCache: null,
@@ -60,20 +62,17 @@ calStorageCalendar.prototype = {
     mRecEventCache: null,
     mRecTodoCache: null,
     mLastStatement: null,
 
     //
     // nsISupports interface
     //
     QueryInterface: function (aIID) {
-        return cal.doQueryInterface(this, calStorageCalendar.prototype, aIID,
-                                   [Components.interfaces.calICalendarProvider,
-                                    Components.interfaces.calIOfflineStorage,
-                                    Components.interfaces.calISyncWriteCalendar]);
+        return cal.doQueryInterface(this, calStorageCalendar.prototype, aIID, null, this);
     },
 
     //
     // calICalendarProvider interface
     //
     get prefChromeOverlay() {
         return null;
     },