зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1698767 - Use ExtContentPolicyType instead of InternalContentPolicyType in SecFetch::IsUserTriggeredForSecFetchSite r=ckerschb
The internal content policy type of `TYPE_INTERNAL_IFRAME` gets mapped to `ExtContentPolicy::TYPE_SUBDOCUMENT`, so there is no need to use the internal type. Differential Revision: https://phabricator.services.mozilla.com/D108640
This commit is contained in:
Родитель
ed5eaf624b
Коммит
abde84c961
|
@ -202,13 +202,12 @@ bool IsUserTriggeredForSecFetchSite(nsIHttpChannel* aHTTPChannel) {
|
|||
* user agent’s address bar, bookmarks, etc).
|
||||
*/
|
||||
nsCOMPtr<nsILoadInfo> loadInfo = aHTTPChannel->LoadInfo();
|
||||
nsContentPolicyType contentType = loadInfo->InternalContentPolicyType();
|
||||
ExtContentPolicyType contentType = loadInfo->GetExternalContentPolicyType();
|
||||
|
||||
// only requests wich result in type "document" are subject to
|
||||
// user initiated actions in the context of SecFetch.
|
||||
if (contentType != nsIContentPolicy::TYPE_DOCUMENT &&
|
||||
contentType != nsIContentPolicy::TYPE_SUBDOCUMENT &&
|
||||
contentType != nsIContentPolicy::TYPE_INTERNAL_IFRAME) {
|
||||
if (contentType != ExtContentPolicy::TYPE_DOCUMENT &&
|
||||
contentType != ExtContentPolicy::TYPE_SUBDOCUMENT) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче