Bug 785631 - Temporarily allow permissions if they don't match the app/browserElement info. r=cjones

This is a workaround for Gaia.
This commit is contained in:
Mounir Lamouri 2012-08-26 15:59:59 -03:00
parent 3ed95c9cd2
commit 11a64b3607

View File

@ -963,6 +963,16 @@ nsPermissionManager::GetPermissionHashKey(const nsACString& aHost,
do {
nsRefPtr<PermissionKey> key = new PermissionKey(Substring(aHost, offset), aAppId, aIsInBrowserElement);
entry = mPermissionTable.GetEntry(key);
if (!entry) {
// This is a temporary fix to have Gaia working and allow a time frame to
// update profiles. With this hack, if a permission isn't found for an app
// the check will be done for the same host outside of any app.
// TODO: remove this with bug 785632.
key = new PermissionKey(Substring(aHost, offset), nsIScriptSecurityManager::NO_APP_ID, false);
entry = mPermissionTable.GetEntry(key);
}
if (entry) {
PermissionEntry permEntry = entry->GetPermission(aType);