зеркало из https://github.com/mozilla/gecko-dev.git
Bug 341035 - "Livemark service should delete annotations on livemark delete" [p=mak77@supereva.it (Marco Bonardo [mak77]) r=dietrich a1.9=damons]
This commit is contained in:
Родитель
851a344036
Коммит
9f67d75225
|
@ -443,19 +443,21 @@ LivemarkService.prototype = {
|
||||||
}
|
}
|
||||||
var livemark = this._livemarks[livemarkIndex];
|
var livemark = this._livemarks[livemarkIndex];
|
||||||
|
|
||||||
|
// remove the livemark from the update array
|
||||||
|
this._livemarks.splice(livemarkIndex, 1);
|
||||||
|
|
||||||
|
// check if we have more then one livemark for this address
|
||||||
|
// if exists we should not delete the annotation since it's still in use
|
||||||
var stillInUse = false;
|
var stillInUse = false;
|
||||||
stillInUse = this._livemarks.some(
|
stillInUse = this._livemarks.some(
|
||||||
function(mark) { return mark.feedURI.equals(livemark.feedURI) }
|
function(mark) { return mark.feedURI.equals(livemark.feedURI) }
|
||||||
);
|
);
|
||||||
if (!stillInUse) {
|
if (!stillInUse) {
|
||||||
// ??? the code in the C++ had "livemark_expiration" as
|
|
||||||
// the second arg... that must be wrong
|
|
||||||
this._ans.removePageAnnotation(livemark.feedURI, LMANNO_EXPIRATION);
|
this._ans.removePageAnnotation(livemark.feedURI, LMANNO_EXPIRATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (livemark.loadGroup)
|
if (livemark.loadGroup)
|
||||||
livemark.loadGroup.cancel(NS_BINDING_ABORTED);
|
livemark.loadGroup.cancel(NS_BINDING_ABORTED);
|
||||||
this._livemarks.splice(livemarkIndex, 1);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
createInstance: function LS_createInstance(outer, iid) {
|
createInstance: function LS_createInstance(outer, iid) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче