Fixes to memory provider's modifyItem. bug 299760, r=shaver

git-svn-id: svn://10.0.0.236/trunk@175649 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mvl%exedo.nl
2005-07-05 21:47:16 +00:00
parent fb4073765c
commit dce832ff52

View File

@@ -202,8 +202,7 @@ calMemoryCalendar.prototype = {
return;
}
if (aOldItem.id != this.mItems[aOldItem.id] ||
aOldItem.generation != aOldItem.generation) {
if (aOldItem != this.mItems[aOldItem.id]) {
if (aListener)
aListener.onOperationComplete (this.calendarToReturn,
Components.results.NS_ERROR_FAILURE,
@@ -226,7 +225,7 @@ calMemoryCalendar.prototype = {
var modifiedItem = aNewItem.clone();
modifiedItem.generation += 1;
modifiedItem.makeImmutable();
this.mItems[newItem.id] = modifiedItem;
this.mItems[aNewItem.id] = modifiedItem;
if (aListener)
aListener.onOperationComplete (this.calendarToReturn,