зеркало из https://github.com/mozilla/gecko-dev.git
Bug 566061 - After server syncing, lightweight themes do not get applied to Chrome [r=mconnor]
Make sure the pref exists (is a bool) before trying to access its value.
This commit is contained in:
Родитель
587c8c9d4c
Коммит
6af153cd30
|
@ -141,8 +141,12 @@ PrefStore.prototype = {
|
|||
try {
|
||||
Cu.import("resource://gre/modules/LightweightThemeManager.jsm", ltm);
|
||||
ltm = ltm.LightweightThemeManager;
|
||||
enabledBefore = this._prefs.getBoolPref("lightweightThemes.isThemeSelected");
|
||||
prevTheme = ltm.currentTheme;
|
||||
|
||||
let enabledPref = "lightweightThemes.isThemeSelected";
|
||||
if (this._prefs.getPrefType(enabledPref) == this._prefs.PREF_BOOL) {
|
||||
enabledBefore = this._prefs.getBoolPref(enabledPref);
|
||||
prevTheme = ltm.currentTheme;
|
||||
}
|
||||
} catch(ex) {
|
||||
ltmExists = false;
|
||||
} // LightweightThemeManager only exists in Firefox 3.6+
|
||||
|
|
Загрузка…
Ссылка в новой задаче