зеркало из https://github.com/mozilla/pjs.git
Bug 636603 - Part 2: mozIAsyncHistory: use new mozIVisitInfoCallback API from Sync. r=philikon
Updating the firefox sync consumer for the new api.
This commit is contained in:
Родитель
55da1855ea
Коммит
1743484b7d
|
@ -22,6 +22,7 @@
|
|||
* Dan Mills <thunder@mozilla.com>
|
||||
* Philipp von Weitershausen <philipp@weitershausen.de>
|
||||
* Richard Newman <rnewman@mozilla.com>
|
||||
* Allison Naaktgeboren <ally@mozilla.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -253,8 +254,8 @@ HistoryStore.prototype = {
|
|||
}
|
||||
|
||||
let cb = Async.makeSyncCallback();
|
||||
let onPlace = function onPlace(result, placeInfo) {
|
||||
if (!Components.isSuccessCode(result)) {
|
||||
let updatePlacesCallback = {
|
||||
handleError: function handleError(resultCode, placeInfo) {
|
||||
failed.push(placeInfo.guid);
|
||||
}
|
||||
};
|
||||
|
@ -263,7 +264,7 @@ HistoryStore.prototype = {
|
|||
cb();
|
||||
};
|
||||
Svc.Obs.add(TOPIC_UPDATEPLACES_COMPLETE, onComplete);
|
||||
this._asyncHistory.updatePlaces(records, onPlace);
|
||||
this._asyncHistory.updatePlaces(records, updatePlacesCallback);
|
||||
Async.waitForSyncCallback(cb);
|
||||
return failed;
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче