mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 300561 Handle broken default search engine pref value
Patch by ajschult, r=neil a=asa
This commit is contained in:
parent
34d2fa2c1d
commit
61c31f009d
@ -216,9 +216,9 @@
|
||||
defaultEngine = this.mPrefs.getComplexValue("browser.search.defaultengine",
|
||||
Components.interfaces.nsISupportsString).data;
|
||||
} catch(ex) {
|
||||
// this will re-invoke updateEngines via the pref observer if the pref changes
|
||||
this.ensureDefaultEnginePrefs(rdf, ds);
|
||||
defaultEngine = this.mPrefs.getComplexValue("browser.search.defaultengine",
|
||||
Components.interfaces.nsISupportsString).data;
|
||||
return;
|
||||
}
|
||||
|
||||
if (defaultEngine) {
|
||||
@ -231,10 +231,15 @@
|
||||
} catch(ex) {
|
||||
searchBarUrl = null;
|
||||
}
|
||||
this.addEngine(res.Value,
|
||||
this.readRDFString(ds, res, kNC_Name),
|
||||
this.readRDFString(ds, res, kNC_Icon),
|
||||
searchBarUrl);
|
||||
if (searchBarUrl == null) {
|
||||
// this will re-invoke updateEngines via the pref observer if the pref changes
|
||||
this.ensureDefaultEnginePrefs(rdf, ds);
|
||||
return;
|
||||
}
|
||||
this.addEngine(res.Value,
|
||||
this.readRDFString(ds, res, kNC_Name),
|
||||
this.readRDFString(ds, res, kNC_Icon),
|
||||
searchBarUrl);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user