Bug 1246245 - Webextensions and themes should also block initial e10s rollout. r=Mossop

This commit is contained in:
Felipe Gomes 2016-02-11 18:47:09 -02:00
parent 500e6635c8
commit 69770f623a
2 changed files with 11 additions and 3 deletions

View File

@ -4213,8 +4213,9 @@ this.XPIProvider = {
* @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
@ -4222,6 +4223,11 @@ this.XPIProvider = {
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;

View File

@ -1404,8 +1404,10 @@ this.XPIDatabase = {
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);
},