зеркало из https://github.com/mozilla/pjs.git
porting patch from imageblocker to contentblocker.
already had r=dwitte, sr=shaver. bug 256172
This commit is contained in:
Родитель
2dc2f102cb
Коммит
ceadacf7c4
|
@ -259,6 +259,20 @@ nsContentBlocker::TestPermission(nsIURI *aCurrentURI,
|
|||
case BEHAVIOR_NOFOREIGN:
|
||||
// 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
|
||||
// we do this by comparing the tails of both names where each tail
|
||||
// includes at least one dot
|
||||
|
|
Загрузка…
Ссылка в новой задаче