Bug 1423811 - do not attempt to reset search settings of users with an original default engine that isn't considered a default engine (likely due to a langpack), r=adw.

This commit is contained in:
Florian Quèze 2017-12-10 01:39:16 +01:00
Родитель ba010e685d
Коммит 37c9a0c332
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -2235,7 +2235,11 @@ BrowserGlue.prototype = {
let currentEngine = Services.search.currentEngine.wrappedJSObject;
// Only reset the current engine if it wasn't set by a WebExtension
// and it is not one of the default engines.
if (currentEngine._extensionID || currentEngine._isDefault)
// If the original default is not a default, the user has a weird
// configuration probably involving langpacks, it's not worth
// attempting to reset their settings.
if (currentEngine._extensionID || currentEngine._isDefault ||
!Services.search.originalDefaultEngine.wrappedJSObject._isDefault)
return;
if (currentEngine._loadPath.startsWith("[https]")) {