Bug 1347452 - Assigned item.guid using PlacesUtils.history.makeGuid() in insertBookmark(). r?mak
MozReview-Commit-ID: LgVFlgNEzHf
--- a/toolkit/components/places/Bookmarks.jsm
+++ b/toolkit/components/places/Bookmarks.jsm
@@ -1323,17 +1323,17 @@ function updateBookmark(info, item, newP
function insertBookmark(item, parent) {
return PlacesUtils.withConnectionWrapper("Bookmarks.jsm: insertBookmark",
async function(db) {
// If a guid was not provided, generate one, so we won't need to fetch the
// bookmark just after having created it.
let hasExistingGuid = item.hasOwnProperty("guid");
if (!hasExistingGuid)
- item.guid = (await db.executeCached("SELECT GENERATE_GUID() AS guid"))[0].getResultByName("guid");
+ item.guid = PlacesUtils.history.makeGuid();
let isTagging = parent._parentId == PlacesUtils.tagsFolderId;
await db.executeTransaction(async function transaction() {
if (item.type == Bookmarks.TYPE_BOOKMARK) {
// Ensure a page exists in moz_places for this URL.
// The IGNORE conflict can trigger on `guid`.
await maybeInsertPlace(db, item.url);