зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1472472 - Use PlacesCommandHook.bookmarkLink instead of PlacesCommandHook.bookmarkPage in activity stream. r=Mardak
MozReview-Commit-ID: EszRhVlaNky --HG-- extra : rebase_source : e2357135b8a048415479342f8562b271985a37a8
This commit is contained in:
Родитель
218266a334
Коммит
092a352343
|
@ -293,7 +293,7 @@ class PlacesFeed {
|
|||
break;
|
||||
}
|
||||
case at.BOOKMARK_URL:
|
||||
NewTabUtils.activityStreamLinks.addBookmark(action.data, action._target.browser);
|
||||
NewTabUtils.activityStreamLinks.addBookmark(action.data, action._target.browser.ownerGlobal);
|
||||
break;
|
||||
case at.DELETE_BOOKMARK_BY_ID:
|
||||
NewTabUtils.activityStreamLinks.deleteBookmark(action.data);
|
||||
|
|
|
@ -1289,14 +1289,15 @@ var ActivityStreamLinks = {
|
|||
* @param {Object} aData
|
||||
* aData.url The url to bookmark
|
||||
* aData.title The title of the page to bookmark
|
||||
* @param {Browser} aBrowser
|
||||
* a <browser> element
|
||||
* @param {Window} aBrowserWindow
|
||||
* The current browser chrome window
|
||||
*
|
||||
* @returns {Promise} Returns a promise set to an object representing the bookmark
|
||||
*/
|
||||
addBookmark(aData, aBrowser) {
|
||||
addBookmark(aData, aBrowserWindow) {
|
||||
const {url, title} = aData;
|
||||
return aBrowser.ownerGlobal.PlacesCommandHook.bookmarkPage(
|
||||
return aBrowserWindow.PlacesCommandHook.bookmarkLink(
|
||||
PlacesUtils.bookmarksMenuFolderId,
|
||||
url,
|
||||
title);
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче