зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1087646 - fast-path null principal'd documents. r=mcmanus
This commit is contained in:
Родитель
c6890412ec
Коммит
2b00b0f294
|
@ -109,6 +109,13 @@ CookieServiceChild::GetCookieStringInternal(nsIURI *aHostURI,
|
|||
|
||||
*aCookieString = nullptr;
|
||||
|
||||
// Fast past: don't bother sending IPC messages about nullprincipal'd
|
||||
// documents.
|
||||
nsAutoCString scheme;
|
||||
aHostURI->GetScheme(scheme);
|
||||
if (scheme.EqualsLiteral("moz-nullprincipal"))
|
||||
return NS_OK;
|
||||
|
||||
// Determine whether the request is foreign. Failure is acceptable.
|
||||
bool isForeign = true;
|
||||
if (RequireThirdPartyCheck())
|
||||
|
@ -137,6 +144,13 @@ CookieServiceChild::SetCookieStringInternal(nsIURI *aHostURI,
|
|||
NS_ENSURE_ARG(aHostURI);
|
||||
NS_ENSURE_ARG_POINTER(aCookieString);
|
||||
|
||||
// Fast past: don't bother sending IPC messages about nullprincipal'd
|
||||
// documents.
|
||||
nsAutoCString scheme;
|
||||
aHostURI->GetScheme(scheme);
|
||||
if (scheme.EqualsLiteral("moz-nullprincipal"))
|
||||
return NS_OK;
|
||||
|
||||
// Determine whether the request is foreign. Failure is acceptable.
|
||||
bool isForeign = true;
|
||||
if (RequireThirdPartyCheck())
|
||||
|
|
Загрузка…
Ссылка в новой задаче