mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1318874 - Remove some occurrences of nsIPrincipal.appStatus from b2g; r=baku
This commit is contained in:
parent
04638eba02
commit
4dcc508e2a
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user