зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1634414 - Check principal before using IsThirdPartyPrincipal in AllowAccessFor r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D73418
This commit is contained in:
Родитель
6ebc5624fc
Коммит
08758993f7
|
@ -322,6 +322,10 @@ ContentBlocking::AllowAccessFor(
|
|||
bool isThirdParty;
|
||||
nsCOMPtr<nsIPrincipal> principal =
|
||||
AntiTrackingUtils::GetPrincipal(aParentContext);
|
||||
if (!principal) {
|
||||
LOG(("Can't get the principal from the browsing context"));
|
||||
return StorageAccessGrantPromise::CreateAndReject(false, __func__);
|
||||
}
|
||||
Unused << trackingPrincipal->IsThirdPartyPrincipal(principal,
|
||||
&isThirdParty);
|
||||
runInSameProcess = !isThirdParty;
|
||||
|
|
Загрузка…
Ссылка в новой задаче