Bug 1318874 - Remove some occurrences of nsIPrincipal.appStatus from b2g; r=baku

This commit is contained in:
Ehsan Akhgari 2016-11-19 14:47:27 -05:00
parent 04638eba02
commit 4dcc508e2a
2 changed files with 2 additions and 14 deletions

View File

@ -264,11 +264,7 @@ ContentPermissionPrompt.prototype = {
}
let principal = request.principal;
let isApp = principal.appStatus != Ci.nsIPrincipal.APP_STATUS_NOT_INSTALLED;
let remember = (principal.appStatus == Ci.nsIPrincipal.APP_STATUS_PRIVILEGED ||
principal.appStatus == Ci.nsIPrincipal.APP_STATUS_CERTIFIED)
? true
: request.remember;
let remember = request.remember;
let isGranted = typesInfo.every(function(type) {
return type.action == Ci.nsIPermissionManager.ALLOW_ACTION;
});
@ -286,15 +282,11 @@ ContentPermissionPrompt.prototype = {
// compare against the mozApp.origin of app windows, so we
// are not concerned with origin suffixes here (appId, etc).
origin: principal.originNoSuffix,
isApp: isApp,
isApp: false,
remember: remember,
isGranted: isGranted,
};
if (isApp) {
details.manifestURL = DOMApplicationRegistry.getManifestURLByLocalId(principal.appId);
}
// request.element is defined for OOP content, while request.window
// is defined for In-Process content.
// In both cases the message needs to be dispatched to the top-level

View File

@ -25,10 +25,6 @@ function fireOrientationEvent(window) {
function hookScreen(window) {
let nodePrincipal = window.document.nodePrincipal;
let origin = nodePrincipal.origin;
if (nodePrincipal.appStatus == nodePrincipal.APP_STATUS_NOT_INSTALLED) {
// Only inject screen mock for apps
return;
}
let screen = window.wrappedJSObject.screen;