Bug 1608307 - remove redundant flags parameters from nsISiteSecurityService r=jschanck,necko-reviewers,kershaw
Before this patch, nsISiteSecurityService APIs took "flags" parameters that differentiated private contexts from not private contexts. However, these parameters were redundant with respect to origin attributes, which led to some confusion for consumers of these APIs. This patch removes these parameters in favor of using origin attributes. Differential Revision: https://phabricator.services.mozilla.com/D142901
This commit is contained in:
@@ -3668,8 +3668,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
// If this is an HTTP Strict Transport Security host or a pinned host
|
||||
// and the certificate is bad, don't allow overrides (RFC 6797 section
|
||||
// 12.1).
|
||||
uint32_t flags =
|
||||
UsePrivateBrowsing() ? nsISocketProvider::NO_PERMANENT_STORAGE : 0;
|
||||
bool isStsHost = false;
|
||||
bool isPinnedHost = false;
|
||||
OriginAttributes attrsForHSTS;
|
||||
@@ -3684,13 +3682,12 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
nsCOMPtr<nsISiteSecurityService> sss =
|
||||
do_GetService(NS_SSSERVICE_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = sss->IsSecureURI(aURI, flags, attrsForHSTS, nullptr, nullptr,
|
||||
&isStsHost);
|
||||
rv = sss->IsSecureURI(aURI, attrsForHSTS, nullptr, nullptr, &isStsHost);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
} else {
|
||||
mozilla::dom::ContentChild* cc =
|
||||
mozilla::dom::ContentChild::GetSingleton();
|
||||
cc->SendIsSecureURI(aURI, flags, attrsForHSTS, &isStsHost);
|
||||
cc->SendIsSecureURI(aURI, attrsForHSTS, &isStsHost);
|
||||
}
|
||||
nsCOMPtr<nsIPublicKeyPinningService> pkps =
|
||||
do_GetService(NS_PKPSERVICE_CONTRACTID, &rv);
|
||||
|
||||
Reference in New Issue
Block a user