Bug 831617 - Killed process when change settings, r=sicking

This commit is contained in:
Antonio M. Amaya 2013-01-17 22:50:59 +01:00
parent ac6b482ac2
commit 67f2879e63
2 changed files with 7 additions and 3 deletions

View File

@ -82,13 +82,17 @@ PermissionSettings.prototype = {
aBrowserFlag) {
debug("Set called with: " + aPermName + ", " + aManifestURL + ", " +
aOrigin + ", " + aPermValue + ", " + aBrowserFlag);
let currentPermValue = this.get(aPermName, aManifestURL, aOrigin,
aBrowserFlag);
let action;
// Check for invalid calls so that we throw an exception rather than get
// killed by parent process
if (aPermValue === "unknown" ||
if (currentPermValue === "unknown" ||
aPermValue === "unknown" ||
!this.isExplicit(aPermName, aManifestURL, aOrigin, aBrowserFlag)) {
let errorMsg = "PermissionSettings.js: '" + aPermName + "'" +
" is an implicit permission for '" + aManifestURL+"'";
" is an implicit permission for '" + aManifestURL +
"' or the permission isn't set";
Cu.reportError(errorMsg);
throw new Components.Exception(errorMsg);
}

View File

@ -159,7 +159,7 @@ this.PermissionSettingsModule = {
}
if (!success) {
Cu.reportError("PermissionSettings message " + msg.name + errorMsg);
Cu.reportError("PermissionSettings message " + msg.type + errorMsg);
return null;
}
break;