Files
sousa-gecko/toolkit/components/viewsource
Manuel Bucher 903c07672b Bug 2008062 - Fix context menu on view-source on error pages r=nchevobbe
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
2026-05-04 12:07:30 +00:00
..