Bug 1012597 - Part 2: ensure Sync invalidates the Places GUIDs cache when needed. r=rnewman

This commit is contained in:
Marco Bonardo 2015-05-25 17:18:36 +02:00
parent 00d8891808
commit 0983863048
2 changed files with 1 additions and 17 deletions

View File

@ -80,23 +80,6 @@ PlacesWrapper.prototype = {
return deferred.promise;
},
setGuidForLocalId: function (localId, guid) {
let deferred = Promise.defer();
let stmt = "UPDATE moz_bookmarks " +
"SET guid = :guid " +
"WHERE id = :item_id";
let query = this.placesQueries.getQuery(stmt);
query.params.guid = guid;
query.params.item_id = localId;
this.asyncQuery(query)
.then(deferred.resolve, deferred.reject);
return deferred.promise;
},
getItemsById: function (ids, types) {
let deferred = Promise.defer();
let stmt = "SELECT b.id, b.type, b.parent, b.position, b.title, b.guid, b.dateAdded, b.lastModified, p.url " +

View File

@ -1154,6 +1154,7 @@ BookmarksStore.prototype = {
stmt.params.guid = guid;
stmt.params.item_id = id;
Async.querySpinningly(stmt);
PlacesUtils.invalidateCachedGuidFor(id);
return guid;
},