Bug 1537723 Enable LWT updates on Android r=mixedpuppy a=pascalc
authorAndrew Swan <aswan@mozilla.com>
Wed, 27 Mar 2019 17:07:01 +0000
changeset 525827 0f768a9686b19f26c36483fe67fbe6fb913c8499
parent 525826 2a43c0f29c287054b941988970db92a64e5519be
child 525828 96d206a9f8937e7d3a4be445893f0345271ba1a2
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy, pascalc
bugs1537723
milestone67.0
Bug 1537723 Enable LWT updates on Android r=mixedpuppy a=pascalc Also ensure that LightweightThemeManager.updateOneTheme() returns even if the update request fails. Differential Revision: https://phabricator.services.mozilla.com/D24981
mobile/android/app/mobile.js
toolkit/mozapps/extensions/LightweightThemeManager.jsm
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -193,16 +193,17 @@ pref("xpinstall.signatures.required", tr
 // constants in AddonManager.jsm for values to use here, and Bug 1405528 for a rationale).
 pref("extensions.autoDisableScopes", 15);
 
 pref("extensions.enabledScopes", 1);
 pref("extensions.autoupdate.enabled", true);
 pref("extensions.autoupdate.interval", 86400);
 pref("extensions.update.enabled", true);
 pref("extensions.update.interval", 86400);
+pref("lightweightThemes.update.enabled", true);
 pref("extensions.dss.enabled", false);
 pref("extensions.ignoreMTimeChanges", false);
 pref("extensions.logging.enabled", false);
 pref("extensions.hideInstallButton", true);
 pref("extensions.hideUpdateButton", false);
 pref("extensions.strictCompatibility", false);
 pref("extensions.minCompatibleAppVersion", "11.0");
 
--- a/toolkit/mozapps/extensions/LightweightThemeManager.jsm
+++ b/toolkit/mozapps/extensions/LightweightThemeManager.jsm
@@ -298,16 +298,17 @@ var LightweightThemeManager = {
     req.open("GET", theme.updateURL, true);
     // Prevent the request from reading from the cache.
     req.channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE;
     // Prevent the request from writing to the cache.
     req.channel.loadFlags |= Ci.nsIRequest.INHIBIT_CACHING;
 
     await new Promise(resolve => {
       req.addEventListener("load", resolve, {once: true});
+      req.addEventListener("error", resolve, {once: true});
       req.send(null);
     });
 
     if (req.status != 200)
       return theme;
 
     let parsed;
     try {