зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1626335 - Don't treat any URI as third party for system principal r=baku,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D78151
This commit is contained in:
Родитель
2475b7008d
Коммит
59f798035c
|
@ -556,6 +556,12 @@ nsresult BasePrincipal::CheckMayLoadHelper(nsIURI* aURI,
|
|||
|
||||
NS_IMETHODIMP
|
||||
BasePrincipal::IsThirdPartyURI(nsIURI* aURI, bool* aRes) {
|
||||
if (IsSystemPrincipal()) {
|
||||
// Nothing is 3rd party to the system principal.
|
||||
*aRes = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*aRes = true;
|
||||
// If we do not have a URI its always 3rd party.
|
||||
nsCOMPtr<nsIURI> prinURI;
|
||||
|
@ -579,6 +585,12 @@ BasePrincipal::IsThirdPartyPrincipal(nsIPrincipal* aPrin, bool* aRes) {
|
|||
}
|
||||
NS_IMETHODIMP
|
||||
BasePrincipal::IsThirdPartyChannel(nsIChannel* aChan, bool* aRes) {
|
||||
if (IsSystemPrincipal()) {
|
||||
// Nothing is 3rd party to the system principal.
|
||||
*aRes = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> prinURI;
|
||||
GetURI(getter_AddRefs(prinURI));
|
||||
ThirdPartyUtil* thirdPartyUtil = ThirdPartyUtil::GetInstance();
|
||||
|
|
Загрузка…
Ссылка в новой задаче