зеркало из https://github.com/mozilla/pjs.git
Fixes to memory provider's modifyItem. bug 299760, r=shaver
This commit is contained in:
Родитель
fa554375fd
Коммит
fbb71c7667
|
@ -202,8 +202,7 @@ calMemoryCalendar.prototype = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aOldItem.id != this.mItems[aOldItem.id] ||
|
if (aOldItem != this.mItems[aOldItem.id]) {
|
||||||
aOldItem.generation != aOldItem.generation) {
|
|
||||||
if (aListener)
|
if (aListener)
|
||||||
aListener.onOperationComplete (this.calendarToReturn,
|
aListener.onOperationComplete (this.calendarToReturn,
|
||||||
Components.results.NS_ERROR_FAILURE,
|
Components.results.NS_ERROR_FAILURE,
|
||||||
|
@ -226,7 +225,7 @@ calMemoryCalendar.prototype = {
|
||||||
var modifiedItem = aNewItem.clone();
|
var modifiedItem = aNewItem.clone();
|
||||||
modifiedItem.generation += 1;
|
modifiedItem.generation += 1;
|
||||||
modifiedItem.makeImmutable();
|
modifiedItem.makeImmutable();
|
||||||
this.mItems[newItem.id] = modifiedItem;
|
this.mItems[aNewItem.id] = modifiedItem;
|
||||||
|
|
||||||
if (aListener)
|
if (aListener)
|
||||||
aListener.onOperationComplete (this.calendarToReturn,
|
aListener.onOperationComplete (this.calendarToReturn,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче