initViewSourceItems() checked browser.currentURI to decide whether to show the goToLine/wrapLongLines/highlightSyntax items. For error pages, browser.currentURI retains the originally-requested URL (e.g. view-source:https://expired.example.com/), so the check incorrectly returned true even though the tab was displaying about:certerror. Fix by checking browsingContext.currentWindowGlobal.documentURI instead, which reflects the document actually loaded in the window rather than the visible address bar URL. Differential Revision: https://phabricator.services.mozilla.com/D296372