summaryrefslogtreecommitdiffstats
path: root/devtools/client/framework/devtools.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /devtools/client/framework/devtools.js
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz
firefox-adbda400be353e676059e335c3c0aaf99e719475.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/framework/devtools.js')
-rw-r--r--devtools/client/framework/devtools.js22
1 files changed, 3 insertions, 19 deletions
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) {