Bug 1539321 - Remove unused aboutdebugging debugAddon helper r=remote-debugging-reviewers,daisuke

This helper was only used by the old aboutdebugging and can be removed

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Julian Descottes 2019-07-22 08:46:51 +00:00
Родитель b4e6cbf3bc
Коммит 28d6b32674
1 изменённых файлов: 0 добавлений и 30 удалений

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

@ -18,38 +18,8 @@ loader.lazyRequireGetter(
true
);
const { Toolbox } = require("devtools/client/framework/toolbox");
const { gDevTools } = require("devtools/client/framework/devtools");
const { PREFERENCES } = require("../constants");
let addonToolbox = null;
/**
* Start debugging an addon.
*
* @param {String} id
* The addon id to debug.
* @param {DebuggerClient} client
* Required for debugging.
*/
exports.debugAddon = async function(id, client) {
const addonFront = await client.mainRoot.getAddon({ id });
const target = await addonFront.connect();
// Close previous addon debugging toolbox.
if (addonToolbox) {
addonToolbox.destroy();
}
const hostType = Toolbox.HostType.WINDOW;
addonToolbox = await gDevTools.showToolbox(target, null, hostType);
addonToolbox.once("destroy", () => {
addonToolbox = null;
});
};
/**
* Uninstall the addon with the provided id.
* Resolves when the addon shutdown has completed.