Bug 888585 - Don't load LightweightThemeImageOptimizer during start-up for users who don't have a lightweight theme applied. r=MattN

This commit is contained in:
Jared Wein 2013-07-01 11:12:23 -04:00
parent 528bf43628
commit 97c0f7ba63

View File

@ -73,11 +73,13 @@ LightweightThemeConsumer.prototype = {
},
_update: function (aData) {
if (!aData)
if (!aData) {
aData = { headerURL: "", footerURL: "", textcolor: "", accentcolor: "" };
this._lastData = aData;
aData = LightweightThemeImageOptimizer.optimize(aData, this._win.screen);
this._lastData = aData;
} else {
this._lastData = aData;
aData = LightweightThemeImageOptimizer.optimize(aData, this._win.screen);
}
var root = this._doc.documentElement;
var active = !!aData.headerURL;