зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1231211 P5 Add nsContentUtils::IsNonSubresourceInternalPolicyType() method. r=asuth
This commit is contained in:
Родитель
5a5a70b6f5
Коммит
c0ed8a4f53
|
@ -8867,8 +8867,18 @@ nsContentUtils::IsNonSubresourceRequest(nsIChannel* aChannel)
|
|||
return false;
|
||||
}
|
||||
nsContentPolicyType type = loadInfo->InternalContentPolicyType();
|
||||
return type == nsIContentPolicy::TYPE_INTERNAL_WORKER ||
|
||||
type == nsIContentPolicy::TYPE_INTERNAL_SHARED_WORKER;
|
||||
return IsNonSubresourceInternalPolicyType(type);
|
||||
}
|
||||
|
||||
// static
|
||||
bool
|
||||
nsContentUtils::IsNonSubresourceInternalPolicyType(nsContentPolicyType aType)
|
||||
{
|
||||
return aType == nsIContentPolicy::TYPE_DOCUMENT ||
|
||||
aType == nsIContentPolicy::TYPE_INTERNAL_IFRAME ||
|
||||
aType == nsIContentPolicy::TYPE_INTERNAL_FRAME ||
|
||||
aType == nsIContentPolicy::TYPE_INTERNAL_WORKER ||
|
||||
aType == nsIContentPolicy::TYPE_INTERNAL_SHARED_WORKER;
|
||||
}
|
||||
|
||||
// static, public
|
||||
|
|
|
@ -2907,6 +2907,8 @@ public:
|
|||
|
||||
static bool IsNonSubresourceRequest(nsIChannel* aChannel);
|
||||
|
||||
static bool IsNonSubresourceInternalPolicyType(nsContentPolicyType aType);
|
||||
|
||||
// The order of these entries matters, as we use std::min for total ordering
|
||||
// of permissions. Private Browsing is considered to be more limiting
|
||||
// then session scoping
|
||||
|
|
Загрузка…
Ссылка в новой задаче