Commit 48870883 authored by Johann Hofmann's avatar Johann Hofmann Committed by Matthew Finkel
Browse files

Bug 1554805 - Never set firstPartyDomain on origin attributes for moz-extension. r=rpl,Ehsan,tjr

Differential Revision: https://phabricator.services.mozilla.com/D47425

--HG--
extra : moz-landing-system : lando
parent 1e1d8c49
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -92,6 +92,13 @@ void OriginAttributes::SetFirstPartyDomain(const bool aIsTopLevelDocument,
    return;
  }

  // Add-on principals should never get any first-party domain
  // attributes in order to guarantee their storage integrity when switching
  // FPI on and off.
  if (scheme.EqualsLiteral("moz-extension")) {
    return;
  }

  nsCOMPtr<nsIPrincipal> blobPrincipal;
  if (dom::BlobURLProtocolHandler::GetBlobURLPrincipal(
          aURI, getter_AddRefs(blobPrincipal))) {