зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1014238 - don't break on invalid customization state, r=jaws
--HG-- extra : rebase_source : a803b73d7eda4ad38073f8d280324710666c16c7
This commit is contained in:
Родитель
68b2c4e1f8
Коммит
1472623df0
|
@ -1731,7 +1731,12 @@ let CustomizableUIInternal = {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
gSavedState = JSON.parse(state);
|
gSavedState = JSON.parse(state);
|
||||||
|
if (typeof gSavedState != "object" || gSavedState === null) {
|
||||||
|
throw "Invalid saved state";
|
||||||
|
}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
Services.prefs.clearUserPref(kPrefCustomizationState);
|
||||||
|
gSavedState = {};
|
||||||
LOG("Error loading saved UI customization state, falling back to defaults.");
|
LOG("Error loading saved UI customization state, falling back to defaults.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче