mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1182366 - avoid an invalid bookmark from preventing all bookmarks syncing. r=rnewman
This commit is contained in:
parent
c13a121531
commit
1e6713632f
@ -269,11 +269,24 @@ BookmarksEngine.prototype = {
|
|||||||
id, SMART_BOOKMARKS_ANNO);
|
id, SMART_BOOKMARKS_ANNO);
|
||||||
} catch(ex) {}
|
} catch(ex) {}
|
||||||
|
|
||||||
if (queryId)
|
if (queryId) {
|
||||||
key = "q" + queryId;
|
key = "q" + queryId;
|
||||||
else
|
} else {
|
||||||
key = "b" + PlacesUtils.bookmarks.getBookmarkURI(id).spec + ":" +
|
let uri;
|
||||||
PlacesUtils.bookmarks.getItemTitle(id);
|
try {
|
||||||
|
uri = PlacesUtils.bookmarks.getBookmarkURI(id);
|
||||||
|
} catch (ex) {
|
||||||
|
// Bug 1182366 - NS_ERROR_MALFORMED_URI here stops bookmarks sync.
|
||||||
|
this._log.warn("Deleting bookmark with invalid URI. id: " + id);
|
||||||
|
try {
|
||||||
|
PlacesUtils.bookmarks.removeItem(id);
|
||||||
|
} catch (ex) {
|
||||||
|
this._log.warn("Failed to delete invalid bookmark", ex);
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
key = "b" + uri.spec + ":" + PlacesUtils.bookmarks.getItemTitle(id);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case PlacesUtils.bookmarks.TYPE_FOLDER:
|
case PlacesUtils.bookmarks.TYPE_FOLDER:
|
||||||
key = "f" + PlacesUtils.bookmarks.getItemTitle(id);
|
key = "f" + PlacesUtils.bookmarks.getItemTitle(id);
|
||||||
|
Loading…
Reference in New Issue
Block a user