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
This commit is contained in:
yulia 2018-12-17 12:29:37 +00:00
Родитель cb4645ae90
Коммит 0913e97c35
2 изменённых файлов: 4 добавлений и 5 удалений

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

@ -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();
},
};

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

@ -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;
};