Skip to content

Commit

Permalink
Bug 31562: Fix circuit display for error pages
Browse files Browse the repository at this point in the history
  • Loading branch information
acatarineu committed Sep 5, 2019
1 parent 1edfec5 commit 2bbd04c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ var getDomainForBrowser = (browser) => {
// Bug 22538: For neterror or certerror, get firstPartyDomain causing it from the u param
if (firstPartyDomain === k_tb_about_uri_first_party_domain) {
let knownErrors = ["about:neterror", "about:certerror"];
let origin = browser.contentPrincipal.origin || '';
if (knownErrors.some(x => origin.startsWith(x))) {
let spec = browser.contentPrincipal.URI.spec || '';
if (knownErrors.some(x => spec.startsWith(x))) {
try {
let urlOrigin = new URL(origin);
let urlOrigin = new URL(spec);
let { hostname } = new URL(urlOrigin.searchParams.get('u'));
if (hostname) {
try {
Expand Down

0 comments on commit 2bbd04c

Please sign in to comment.