Bug 1246245 - Webextensions and themes should also block initial e10s rollout. r=Mossop, a=lizzard
authorFelipe Gomes <felipc@gmail.com>
Thu, 11 Feb 2016 18:47:09 -0200
changeset 318761 042859215b0c1c4b40a619206ce6070918bfc9c3
parent 318760 b4698646a6814a451af8e335592c430fc6dee29b
child 318762 eb8dbc898f0698a9dee85587d0a8eb3d5fee831c
push id1079
push userjlund@mozilla.com
push dateFri, 15 Apr 2016 21:02:33 +0000
treeherdermozilla-release@575fbf6786d5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMossop, lizzard
bugs1246245
milestone46.0a2
Bug 1246245 - Webextensions and themes should also block initial e10s rollout. r=Mossop, a=lizzard
toolkit/mozapps/extensions/internal/XPIProvider.jsm
toolkit/mozapps/extensions/internal/XPIProviderUtils.js
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -4243,25 +4243,31 @@ this.XPIProvider = {
   /**
    * Determine if an add-on should be blocking e10s if enabled.
    *
    * @param  aAddon
    *         The add-on to test
    * @return true if enabling the add-on should block e10s
    */
   isBlockingE10s: function(aAddon) {
-    // Only extensions change behaviour
-    if (aAddon.type != "extension")
+    if (aAddon.type != "extension" &&
+        aAddon.type != "webextension" &&
+        aAddon.type != "theme")
       return false;
 
     // The hotfix is exempt
     let hotfixID = Preferences.get(PREF_EM_HOTFIX_ID, undefined);
     if (hotfixID && hotfixID == aAddon.id)
       return false;
 
+    // The default theme is exempt
+    if (aAddon.type == "theme" &&
+        aAddon.internalName == XPIProvider.defaultSkin)
+      return false;
+
     // System add-ons are exempt
     let locName = aAddon._installLocation ? aAddon._installLocation.name
                                           : undefined;
     if (locName == KEY_APP_SYSTEM_DEFAULTS ||
         locName == KEY_APP_SYSTEM_ADDONS)
       return false;
 
     return true;
--- a/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
+++ b/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
@@ -1394,18 +1394,20 @@ this.XPIDatabase = {
     this.saveChanges();
   },
 
   updateAddonsBlockingE10s: function() {
     let blockE10s = false;
     for (let [, addon] of this.addonDB) {
       let active = (addon.visible && !addon.disabled && !addon.pendingUninstall);
 
-      if (active && XPIProvider.isBlockingE10s(addon))
+      if (active && XPIProvider.isBlockingE10s(addon)) {
         blockE10s = true;
+        break;
+      }
     }
     Preferences.set(PREF_E10S_BLOCKED_BY_ADDONS, blockE10s);
   },
 
   /**
    * Synchronously calculates and updates all the active flags in the database.
    */
   updateActiveAddons: function() {