зеркало из https://github.com/mozilla/gecko-dev.git
Bug 866638 - Ignore invalid URIs when importing Safari History, r=gavin
--HG-- extra : rebase_source : a7da5851b13ae1bb487ed843342e2c54976318fb
This commit is contained in:
Родитель
4cb8cb57bf
Коммит
00c5b4c4da
|
@ -212,10 +212,17 @@ History.prototype = {
|
|||
for (let entry of entries) {
|
||||
if (entry.has("lastVisitedDate")) {
|
||||
let visitDate = this._parseCocoaDate(entry.get("lastVisitedDate"));
|
||||
places.push({ uri: NetUtil.newURI(entry.get("")),
|
||||
title: entry.get("title"),
|
||||
visits: [{ transitionType: transType,
|
||||
visitDate: visitDate }] });
|
||||
try {
|
||||
places.push({ uri: NetUtil.newURI(entry.get("")),
|
||||
title: entry.get("title"),
|
||||
visits: [{ transitionType: transType,
|
||||
visitDate: visitDate }] });
|
||||
}
|
||||
catch(ex) {
|
||||
// Safari's History file may contain malformed URIs which
|
||||
// will be ignored.
|
||||
Cu.reportError(ex)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (places.length > 0) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче