Bug 1537723 Enable LWT updates on Android r=mixedpuppy
authorAndrew Swan <aswan@mozilla.com>
Wed, 27 Mar 2019 17:07:01 +0000
changeset 466463 d1e03f3bba1aabd64389e3c98c660242c6d59bb9
parent 466462 e5117d2f9311ff75bb90feb26cdeb148b8cdb025
child 466464 5dfec5266b7c4b495eba11d0e27e8135036ec7f1
push id35768
push useropoprus@mozilla.com
push dateThu, 28 Mar 2019 09:55:54 +0000
treeherdermozilla-central@c045dd97faf2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy
bugs1537723
milestone68.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 1537723 Enable LWT updates on Android r=mixedpuppy 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 {