From 465c145c7890889c5156b39a874b088f35b8c344 Mon Sep 17 00:00:00 2001 From: Dan Mills Date: Tue, 27 Jan 2009 17:08:47 -0800 Subject: [PATCH] set record ID in history store when creating a record --- services/sync/modules/engines/history.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/sync/modules/engines/history.js b/services/sync/modules/engines/history.js index 3557bb81888..fdbf0c88e39 100644 --- a/services/sync/modules/engines/history.js +++ b/services/sync/modules/engines/history.js @@ -66,12 +66,12 @@ HistoryEngine.prototype = { // History reconciliation is simpler than the default one from SyncEngine, // because we have the advantage that we can use the URI as a definitive // check for local existence of incoming items. The steps are as follows: - // + // // 1) Check for the same item in the locally modified list. In that case, // local trumps remote. This step is unchanged from our superclass. // 2) Check if the incoming item was deleted. Skip if so. // 3) Apply new record/update. - // + // // Note that we don't attempt to equalize the IDs, the history store does that // as part of update() _reconcile: function HistEngine__reconcile(item) { @@ -398,7 +398,7 @@ HistoryStore.prototype = { } this._hsvc.setPageTitle(uri, record.cleartext.title); - // Equalize IDs + // Equalize IDs let localId = this._getGUID(record.cleartext.uri); if (localId != record.id) this.changeItemID(localId, record.id); @@ -420,6 +420,7 @@ HistoryStore.prototype = { createRecord: function HistStore_createRecord(guid) { let foo = this._findURLByGUID(guid); let record = new HistoryRec(); + record.id = guid; if (foo) { record.histUri = foo.url; record.title = foo.title;