зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
6e37958c88
Коммит
6ead96bb08
|
@ -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",
|
||||
];
|
||||
|
|
Загрузка…
Ссылка в новой задаче