mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
fix followup review comments from bug 421494. r=mconnor, sr=bz
This commit is contained in:
parent
ebebb5e964
commit
079a39dbb9
@ -445,8 +445,10 @@ nsCookieService::Init()
|
||||
}
|
||||
|
||||
mPermissionService = do_GetService(NS_COOKIEPERMISSION_CONTRACTID);
|
||||
if (!mPermissionService)
|
||||
if (!mPermissionService) {
|
||||
NS_WARNING("nsICookiePermission implementation not available - some features won't work!");
|
||||
COOKIE_LOGSTRING(PR_LOG_WARNING, ("Init(): nsICookiePermission implementation not available"));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -1792,8 +1794,11 @@ nsCookieService::CheckPrefs(nsIURI *aHostURI,
|
||||
|
||||
} else if (mCookiesPermissions == BEHAVIOR_REJECTFOREIGN) {
|
||||
// check if cookie is foreign
|
||||
if (!mPermissionService)
|
||||
if (!mPermissionService) {
|
||||
NS_WARNING("Foreign cookie blocking enabled, but nsICookiePermission unavailable! Rejecting cookie");
|
||||
COOKIE_LOGSTRING(PR_LOG_WARNING, ("CheckPrefs(): foreign blocking enabled, but nsICookiePermission unavailable! Rejecting cookie"));
|
||||
return STATUS_REJECTED;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> firstURI;
|
||||
rv = mPermissionService->GetOriginatingURI(aChannel, getter_AddRefs(firstURI));
|
||||
|
Loading…
Reference in New Issue
Block a user