From 0913e97c35dbf94fe7e675257ef44cd058586231 Mon Sep 17 00:00:00 2001 From: yulia Date: Mon, 17 Dec 2018 12:29:37 +0000 Subject: [PATCH] Bug 1508660 - migrate getKnownHighlighter to inspectorFront; r=ochameau Depends on D12438 Differential Revision: https://phabricator.services.mozilla.com/D12439 --HG-- extra : moz-landing-system : lando --- devtools/client/definitions.js | 5 ++++- devtools/client/framework/toolbox-highlighter-utils.js | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/devtools/client/definitions.js b/devtools/client/definitions.js index 9c4e3c8ba433..d3a3ece9d1e5 100644 --- a/devtools/client/definitions.js +++ b/devtools/client/definitions.js @@ -593,7 +593,10 @@ function createHighlightButton(highlighterName, id) { return highlighter.show({}); }, isChecked(toolbox) { - const highlighter = toolbox.highlighterUtils.getKnownHighlighter(highlighterName); + if (!toolbox.inspector) { + return false; + } + const highlighter = toolbox.inspector.getKnownHighlighter(highlighterName); return highlighter && highlighter.isShown(); }, }; diff --git a/devtools/client/framework/toolbox-highlighter-utils.js b/devtools/client/framework/toolbox-highlighter-utils.js index c2a5441ae51b..9ab21dde097b 100644 --- a/devtools/client/framework/toolbox-highlighter-utils.js +++ b/devtools/client/framework/toolbox-highlighter-utils.js @@ -189,10 +189,6 @@ exports.getHighlighterUtils = function(toolbox) { `creating highlighters by types or ${typeName} is unknown`); }); - exported.getKnownHighlighter = function(typeName) { - return toolbox.inspector && toolbox.inspector.getKnownHighlighter(typeName); - }; - // Return the public API return exported; };