Fix bug 793262 - JavaScript Error: "this_ is not defined" on any new calendar item. r=mmecca,a=philipp
authorPhilipp Kewisch <mozilla@kewis.ch>
Sun, 30 Sep 2012 19:39:16 +0200
changeset 13028 f2ea5e2fa4f558baf1dbd0604c37ccfa2223ac73
parent 13027 fa9f0f5581476dbe3eb6438495b88d9082c0faab
child 13029 1051d69d9043a05fd31282c4b0f650b18b8c7c45
push idunknown
push userunknown
push dateunknown
reviewersmmecca, philipp
bugs793262
Fix bug 793262 - JavaScript Error: "this_ is not defined" on any new calendar item. r=mmecca,a=philipp
calendar/providers/memory/calMemoryCalendar.js
--- a/calendar/providers/memory/calMemoryCalendar.js
+++ b/calendar/providers/memory/calMemoryCalendar.js
@@ -509,21 +509,21 @@ calMemoryCalendar.prototype = {
 
     modifyOfflineItem: function modifyOfflineItem(aItem, aListener) {
         let oldFlag = this.mOfflineFlags[aItem.id];
         if (oldFlag != cICL.OFFLINE_FLAG_CREATED_RECORD &&
             oldFlag != cICL.OFFLINE_FLAG_DELETED_RECORD) {
             this.mOfflineFlags[aItem.id] = cICL.OFFLINE_FLAG_MODIFIED_RECORD;
         }
 
-        this_.notifyOperationComplete(aListener,
-                                      Components.results.NS_OK,
-                                      Components.interfaces.calIOperationListener.MODIFY,
-                                      aItem.id,
-                                      aItem);
+        this.notifyOperationComplete(aListener,
+                                     Components.results.NS_OK,
+                                     Components.interfaces.calIOperationListener.MODIFY,
+                                     aItem.id,
+                                     aItem);
     },
 
     deleteOfflineItem: function deleteOfflineItem(aItem, aListener) {
         let oldFlag = this.mOfflineFlags[aItem.id];
         if (oldFlag == cICL.OFFLINE_FLAG_CREATED_RECORD) {
             delete this.mItems[aItem.id];
             delete this.mOfflineFlags[aItem.id];
         } else {
@@ -531,17 +531,17 @@ calMemoryCalendar.prototype = {
         }
 
         this.notifyOperationComplete(aListener,
                                      Components.results.NS_OK,
                                      Components.interfaces.calIOperationListener.DELETE,
                                      aItem.id,
                                      aItem);
         // notify observers
-        this_.observers.notify("onDeleteItem", [aItem]);
+        this.observers.notify("onDeleteItem", [aItem]);
     },
 
     getItemOfflineFlag: function getItemOfflineFlag(aItem, aListener) {
         let flag = (aItem && aItem.id in this.mOfflineFlags ? this.mOfflineFlags[aItem.id] : null);
         this.notifyOperationComplete(aListener, Components.results.NS_OK,
                                      Components.interfaces.calIOperationListener.GET,
                                      null, flag);
     },