porting patch from imageblocker to contentblocker.

already had r=dwitte, sr=shaver. bug 256172
This commit is contained in:
mvl%exedo.nl 2005-01-25 18:31:02 +00:00
Родитель 2dc2f102cb
Коммит ceadacf7c4
1 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -259,6 +259,20 @@ nsContentBlocker::TestPermission(nsIURI *aCurrentURI,
case BEHAVIOR_NOFOREIGN: case BEHAVIOR_NOFOREIGN:
// Third party checking // Third party checking
// Need a requesting uri for third party checks to work.
if (!aFirstURI)
return NS_OK;
PRBool trustedSource = PR_FALSE;
rv = aFirstURI->SchemeIs("chrome", &trustedSource);
NS_ENSURE_SUCCESS(rv,rv);
if (!trustedSource) {
rv = aFirstURI->SchemeIs("resource", &trustedSource);
NS_ENSURE_SUCCESS(rv,rv);
}
if (trustedSource)
return NS_OK;
// compare tails of names checking to see if they have a common domain // compare tails of names checking to see if they have a common domain
// we do this by comparing the tails of both names where each tail // we do this by comparing the tails of both names where each tail
// includes at least one dot // includes at least one dot