mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1012597 - Part 2: ensure Sync invalidates the Places GUIDs cache when needed. r=rnewman
This commit is contained in:
parent
00d8891808
commit
0983863048
@ -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 " +
|
||||
|
@ -1154,6 +1154,7 @@ BookmarksStore.prototype = {
|
||||
stmt.params.guid = guid;
|
||||
stmt.params.item_id = id;
|
||||
Async.querySpinningly(stmt);
|
||||
PlacesUtils.invalidateCachedGuidFor(id);
|
||||
return guid;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user