mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 854937: Fix reason code for bootstrap addon dropped in profile extensions folder. r=Mossop,Unfocused
This commit is contained in:
parent
83ed853ee8
commit
b8fb16353d
@ -1672,9 +1672,15 @@ var XPIProvider = {
|
||||
for (let id in this.bootstrappedAddons) {
|
||||
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
|
||||
file.persistentDescriptor = this.bootstrappedAddons[id].descriptor;
|
||||
let reason = BOOTSTRAP_REASONS.APP_STARTUP;
|
||||
// Eventually set INSTALLED reason when a bootstrap addon
|
||||
// is dropped in profile folder and automatically installed
|
||||
if (AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_INSTALLED)
|
||||
.indexOf(id) !== -1)
|
||||
reason = BOOTSTRAP_REASONS.ADDON_INSTALL;
|
||||
this.callBootstrapMethod(id, this.bootstrappedAddons[id].version,
|
||||
this.bootstrappedAddons[id].type, file,
|
||||
"startup", BOOTSTRAP_REASONS.APP_STARTUP);
|
||||
"startup", reason);
|
||||
}
|
||||
AddonManagerPrivate.recordTimestamp("XPI_bootstrap_addons_end");
|
||||
|
||||
|
@ -487,7 +487,7 @@ function run_test_8() {
|
||||
do_check_true(b1.isActive);
|
||||
do_check_eq(getInstalledVersion(), 1);
|
||||
do_check_eq(getActiveVersion(), 1);
|
||||
do_check_eq(getStartupReason(), APP_STARTUP);
|
||||
do_check_eq(getStartupReason(), ADDON_INSTALL);
|
||||
do_check_eq(getStartupOldVersion(), 0);
|
||||
do_check_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
|
||||
|
||||
@ -666,7 +666,7 @@ function run_test_12() {
|
||||
do_check_true(b1.isActive);
|
||||
do_check_eq(getInstalledVersion(), 1);
|
||||
do_check_eq(getActiveVersion(), 1);
|
||||
do_check_eq(getStartupReason(), APP_STARTUP);
|
||||
do_check_eq(getStartupReason(), ADDON_INSTALL);
|
||||
do_check_eq(getStartupOldVersion(), 0);
|
||||
do_check_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user