fx128: Remove try/catch for Services.jsm not being available

Not sure if there are other errors here that we want to ignore, but the
specified one should no longer be an issue.
This commit is contained in:
Dan Stillman 2024-06-10 05:48:54 -04:00
parent 97329752a1
commit 6b3ea14aa1

View file

@ -118,15 +118,10 @@ function goBuildEditContextMenu() {
popup = document.documentElement.lastElementChild.firstElementChild;
}
try {
let menuitemSwitchTextDirection = popup.querySelector("[command='cmd_switchTextDirection']");
let showSwitchTextDirection = Services.prefs.getBoolPref("bidi.browser.ui", false);
menuitemSwitchTextDirection.hidden = !showSwitchTextDirection;
menuitemSwitchTextDirection.previousElementSibling.hidden = !showSwitchTextDirection;
}
catch (e) {
// Not worth failing over Services.jsm not being imported in a utility window
}
let menuitemSwitchTextDirection = popup.querySelector("[command='cmd_switchTextDirection']");
let showSwitchTextDirection = Services.prefs.getBoolPref("bidi.browser.ui", false);
menuitemSwitchTextDirection.hidden = !showSwitchTextDirection;
menuitemSwitchTextDirection.previousElementSibling.hidden = !showSwitchTextDirection;
return popup;
}