Skip to content

Commit

Permalink
Another extensions fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedor committed Oct 16, 2023
1 parent 8b8fd92 commit 7fd9b48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
11 changes: 0 additions & 11 deletions toolkit/mozapps/extensions/internal/XPIInstall.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -3711,17 +3711,6 @@ var XPIInstall = {

let addon = await loadManifestFromFile(source, location);

if (
XPIDatabase.mustSign(addon.type) &&
addon.signedState <= AddonManager.SIGNEDSTATE_MISSING
) {
throw new Error(
`Refusing to install staged add-on ${id} with signed state ${
addon.signedState
}`
);
}

addon.importMetadata(metadata);

logger.debug(`Processing install of ${id} in ${location.name}`);
Expand Down
8 changes: 6 additions & 2 deletions toolkit/mozapps/extensions/internal/XPIProvider.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ class XPIState {

// Builds prior to be 1512436 did not include the rootURI property.
// If we're updating from such a build, add that property now.
if (!("rootURI" in this) && this.file) {
if (this.file) {
this.rootURI = getURIForResourceInFile(this.file, "").spec;
}

Expand All @@ -489,7 +489,10 @@ class XPIState {
) {
this.lastModifiedTime = saved.currentModifiedTime;
this.changed = true;
} else if (saved.currentModifiedTime === null) {
} else if (
saved.currentModifiedTime === null &&
(!this.file || !this.file.exists())
) {
this.missing = true;
this.changed = true;
}
Expand Down Expand Up @@ -1419,6 +1422,7 @@ var XPIStates = {

if (oldState[loc.name]) {
loc.restore(oldState[loc.name]);
changed = changed || loc.path != oldState[loc.name].path;
}
changed = changed || loc.changed;

Expand Down

0 comments on commit 7fd9b48

Please sign in to comment.