Bug 300561 Handle broken default search engine pref value
Patch by ajschult, r=neil a=asa git-svn-id: svn://10.0.0.236/trunk@176075 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
af6df60f90
commit
5d3fd9b7db
@ -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…
x
Reference in New Issue
Block a user