Bug 1524254 - Rename addTab's title parameter to lazyTabTitle. r=dao

Differential Revision: https://phabricator.services.mozilla.com/D18320

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Oriol Brufau 2019-02-01 10:33:19 +00:00
Родитель 4776754f01
Коммит 35e59fd61b
2 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -2289,6 +2289,7 @@ window._gBrowser = {
forceNotRemote,
fromExternal,
index,
lazyTabTitle,
name,
nextTabParentId,
noInitialLabel,
@ -2306,7 +2307,6 @@ window._gBrowser = {
sameProcessAsFrameLoader,
skipAnimation,
skipBackgroundNotify,
title,
triggeringPrincipal,
userContextId,
recordExecution,
@ -2553,7 +2553,7 @@ window._gBrowser = {
SessionStore.setTabState(t, {
entries: [{
url: lazyBrowserURI ? lazyBrowserURI.spec : "about:blank",
title,
title: lazyTabTitle,
triggeringPrincipal_base64: Utils.serializePrincipal(triggeringPrincipal),
}],
});

Просмотреть файл

@ -606,7 +606,7 @@ this.tabs = class extends ExtensionAPI {
}
// Simple properties
const properties = ["index", "pinned", "title"];
const properties = ["index", "pinned"];
for (let prop of properties) {
if (createProperties[prop] != null) {
options[prop] = createProperties[prop];
@ -626,6 +626,7 @@ this.tabs = class extends ExtensionAPI {
return Promise.reject({message: `Cannot create a discarded new tab or "about" urls.`});
}
options.createLazyBrowser = true;
options.lazyTabTitle = createProperties.title;
} else if (createProperties.title) {
return Promise.reject({message: `Title may only be set for discarded tabs.`});
}