зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1434241 - showEditBookmarkPopup should stop accepting itemIds. r=standard8
MozReview-Commit-ID: 8doEkhc8Wyd --HG-- extra : rebase_source : a08336ea1442752b76132c60af62d41b78b1c01e
This commit is contained in:
Родитель
d8b0109aae
Коммит
9645d23bf4
|
@ -213,13 +213,6 @@ var StarUI = {
|
|||
|
||||
this._isNewBookmark = aIsNewBookmark;
|
||||
this._itemGuids = null;
|
||||
// TODO (bug 1131491): Deprecate this once async transactions are enabled
|
||||
// and the legacy transactions code is gone.
|
||||
if (typeof(aNode) == "number") {
|
||||
let itemId = aNode;
|
||||
let guid = await PlacesUtils.promiseItemGuid(itemId);
|
||||
aNode = await PlacesUIUtils.fetchNodeLike(guid);
|
||||
}
|
||||
|
||||
// Performance: load the overlay the first time the panel is opened
|
||||
// (see bug 392443).
|
||||
|
@ -478,8 +471,9 @@ var PlacesCommandHook = {
|
|||
* The linked page description, if available
|
||||
*/
|
||||
async bookmarkLink(parentId, url, title, description = "") {
|
||||
let node = await PlacesUIUtils.fetchNodeLike({ url });
|
||||
if (node) {
|
||||
let bm = await PlacesUtils.bookmarks.fetch({url});
|
||||
if (bm) {
|
||||
let node = await PlacesUIUtils.promiseNodeLikeFromFetchInfo(bm);
|
||||
PlacesUIUtils.showBookmarkDialog({ action: "edit", node }, window.top);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -257,14 +257,6 @@ this.PlacesUIUtils = {
|
|||
return bundle.GetStringFromName(key);
|
||||
},
|
||||
|
||||
get _copyableAnnotations() {
|
||||
return [
|
||||
this.DESCRIPTION_ANNO,
|
||||
this.LOAD_IN_SIDEBAR_ANNO,
|
||||
PlacesUtils.READ_ONLY_ANNO,
|
||||
];
|
||||
},
|
||||
|
||||
/**
|
||||
* Constructs a Places Transaction for the drop or paste of a blob of data
|
||||
* into a container.
|
||||
|
@ -1213,19 +1205,6 @@ this.PlacesUIUtils = {
|
|||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Shortcut for calling promiseNodeLikeFromFetchInfo on the result of
|
||||
* Bookmarks.fetch for the given guid/info object.
|
||||
*
|
||||
* @see promiseNodeLikeFromFetchInfo above and Bookmarks.fetch in Bookmarks.jsm.
|
||||
*/
|
||||
async fetchNodeLike(aGuidOrInfo) {
|
||||
let info = await PlacesUtils.bookmarks.fetch(aGuidOrInfo);
|
||||
if (!info)
|
||||
return null;
|
||||
return this.promiseNodeLikeFromFetchInfo(info);
|
||||
},
|
||||
|
||||
/**
|
||||
* This function wraps potentially large places transaction operations
|
||||
* with batch notifications to the result node, hence switching the views
|
||||
|
|
Загрузка…
Ссылка в новой задаче