From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- devtools/client/framework/devtools.js | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'devtools/client/framework/devtools.js') diff --git a/devtools/client/framework/devtools.js b/devtools/client/framework/devtools.js index e56efb0c4b..05e340a454 100644 --- a/devtools/client/framework/devtools.js +++ b/devtools/client/framework/devtools.js @@ -195,29 +195,13 @@ DevTools.prototype = { * Removes all tools that match the given |toolId| * Needed so that add-ons can remove themselves when they are deactivated * - * @param {string|object} tool - * Definition or the id of the tool to unregister. Passing the - * tool id should be avoided as it is a temporary measure. + * @param {string} toolId + * The id of the tool to unregister. * @param {boolean} isQuitApplication * true to indicate that the call is due to app quit, so we should not * cause a cascade of costly events */ - unregisterTool(tool, isQuitApplication) { - let toolId = null; - if (typeof tool == "string") { - toolId = tool; - tool = this._tools.get(tool); - } else { - const { Deprecated } = ChromeUtils.importESModule( - "resource://gre/modules/Deprecated.sys.mjs" - ); - Deprecated.warning( - "Deprecation WARNING: gDevTools.unregisterTool(tool) is " + - "deprecated. You should unregister a tool using its toolId: " + - "gDevTools.unregisterTool(toolId)." - ); - toolId = tool.id; - } + unregisterTool(toolId, isQuitApplication) { this._tools.delete(toolId); if (!isQuitApplication) { -- cgit v1.2.3