Bug 830983 - Prevent removing in-memory app permissions when deleting only its in-browser permissions., r=sicking

This commit is contained in:
Alexandre Poirot 2013-01-18 11:04:40 +01:00
parent c1ce2bf42c
commit b7715a8b56

View File

@ -1231,6 +1231,9 @@ nsPermissionManager::RemovePermissionsForApp(uint32_t aAppId, bool aBrowserOnly)
data.permissions[i]->GetIsInBrowserElement(&isInBrowserElement);
data.permissions[i]->GetType(type);
if (aBrowserOnly && !isInBrowserElement)
continue;
nsCOMPtr<nsIPrincipal> principal;
if (NS_FAILED(GetPrincipal(host, aAppId, isInBrowserElement,
getter_AddRefs(principal)))) {