Bug 1466846 - Enabling addon should set homepage override. r=kmag
authorMichael Kaply <mozilla@kaply.com>
Fri, 22 Jun 2018 15:58:15 -0500
changeset 423589 1de24ca67b86
parent 423588 417c037121ab
child 423590 987d0ed1d6f9
push id65513
push usermozilla@kaply.com
push dateMon, 25 Jun 2018 22:17:18 +0000
treeherderautoland@1de24ca67b86 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1466846
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1466846 - Enabling addon should set homepage override. r=kmag MozReview-Commit-ID: G9cfRuQjyGb
browser/components/extensions/parent/ext-chrome-settings-overrides.js
--- a/browser/components/extensions/parent/ext-chrome-settings-overrides.js
+++ b/browser/components/extensions/parent/ext-chrome-settings-overrides.js
@@ -180,17 +180,18 @@ this.chrome_settings_overrides = class e
     let {manifest} = extension;
 
     await ExtensionSettingsStore.initialize();
 
     let homepageUrl = manifest.chrome_settings_overrides.homepage;
 
     if (homepageUrl) {
       let inControl;
-      if (extension.startupReason == "ADDON_INSTALL") {
+      if (extension.startupReason == "ADDON_INSTALL" ||
+          extension.startupReason == "ADDON_ENABLE") {
         inControl = await ExtensionPreferencesManager.setSetting(
           extension.id, "homepage_override", homepageUrl);
       } else {
         let item = await ExtensionPreferencesManager.getSetting("homepage_override");
         inControl = item.id == extension.id;
       }
       // We need to add the listener here too since onPrefsChanged won't trigger on a
       // restart (the prefs are already set).