From 91127acdb73bde0be7bb8a337a8e065f535cc9eb Mon Sep 17 00:00:00 2001 From: Csoregi Natalia Date: Thu, 22 Jul 2021 19:30:49 +0300 Subject: [PATCH] Backed out changeset 06b855d93dad (bug 1660452) for causing failures on test_bug1660452_https.html. CLOSED TREE --- dom/base/nsGlobalWindowOuter.cpp | 9 +---- dom/security/test/general/mochitest.ini | 3 -- .../test/general/test_bug1660452_http.html | 39 ------------------- .../test/general/test_bug1660452_https.html | 39 ------------------- 4 files changed, 1 insertion(+), 89 deletions(-) delete mode 100644 dom/security/test/general/test_bug1660452_http.html delete mode 100644 dom/security/test/general/test_bug1660452_https.html diff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp index cfb66b73beeb..d2066476b688 100644 --- a/dom/base/nsGlobalWindowOuter.cpp +++ b/dom/base/nsGlobalWindowOuter.cpp @@ -1889,14 +1889,7 @@ bool nsGlobalWindowOuter::ComputeIsSecureContext(Document* aDocument, } if (principal->GetIsNullPrincipal()) { - // If the NullPrincipal has a valid precursor URI we want to use it to - // construct the principal otherwise we fall back to the original document - // URI. - nsCOMPtr precursorPrin = principal->GetPrecursorPrincipal(); - nsCOMPtr uri = precursorPrin ? precursorPrin->GetURI() : nullptr; - if (!uri) { - uri = aDocument->GetOriginalURI(); - } + nsCOMPtr uri = aDocument->GetOriginalURI(); // IsOriginPotentiallyTrustworthy doesn't care about origin attributes so // it doesn't actually matter what we use here, but reusing the document // principal's attributes is convenient. diff --git a/dom/security/test/general/mochitest.ini b/dom/security/test/general/mochitest.ini index 4d185aa6cb7b..06a339bc71de 100644 --- a/dom/security/test/general/mochitest.ini +++ b/dom/security/test/general/mochitest.ini @@ -64,6 +64,3 @@ support-files = file_xfo_error_page.sjs support-files = file_meta_referrer_in_head.html file_meta_referrer_notin_head.html -[test_bug1660452_http.html] -[test_bug1660452_https.html] -scheme = https diff --git a/dom/security/test/general/test_bug1660452_http.html b/dom/security/test/general/test_bug1660452_http.html deleted file mode 100644 index fd6d2aa4ff6d..000000000000 --- a/dom/security/test/general/test_bug1660452_http.html +++ /dev/null @@ -1,39 +0,0 @@ - - - -Bug 1660452: NullPrincipals need to know whether they were spun off of a Secure Context - - - - - - - - diff --git a/dom/security/test/general/test_bug1660452_https.html b/dom/security/test/general/test_bug1660452_https.html deleted file mode 100644 index 10a630c43995..000000000000 --- a/dom/security/test/general/test_bug1660452_https.html +++ /dev/null @@ -1,39 +0,0 @@ - - - -Bug 1660452: NullPrincipals need to know whether they were spun off of a Secure Context - - - - - - - -