Bug 1694140 - [devtools] Remove unused getTargetForTab helper on gDevTools r=ochameau

Depends on D106001

This is only used internally: https://searchfox.org/mozilla-central/search?path=&q=getTargetForTab
Can be inlined and removed from DevToolsShim

Differential Revision: https://phabricator.services.mozilla.com/D106002
This commit is contained in:
Julian Descottes 2021-02-25 18:02:53 +00:00
Родитель 6e37958c88
Коммит 6ead96bb08
2 изменённых файлов: 2 добавлений и 15 удалений

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

@ -694,29 +694,17 @@ DevTools.prototype = {
return true;
},
/**
* Wrapper on TargetFactory.forTab, constructs a Target for the provided tab.
*
* @param {XULTab} tab
* The tab to use in creating a new target.
*
* @return {Target} A target object
*/
getTargetForTab: function(tab) {
return TargetFactory.forTab(tab);
},
/**
* Retrieve an existing toolbox for the provided tab if it was created before.
* Returns null otherwise.
*/
async getToolboxForTab(tab) {
const target = await this.getTargetForTab(tab);
const target = await TargetFactory.forTab(tab);
return this._toolboxes.get(target);
},
async closeToolboxForTab(tab) {
const target = await this.getTargetForTab(tab);
const target = await TargetFactory.forTab(tab);
return this.closeToolbox(target);
},

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

@ -311,7 +311,6 @@ const DevToolsShim = {
const webExtensionsMethods = [
"createDescriptorForTab",
"createWebExtensionInspectedWindowFront",
"getTargetForTab",
"getTheme",
"openBrowserConsole",
];