summaryrefslogtreecommitdiffstats
path: root/toolkit/components/search/orginal/nsSearchService.js
diff options
context:
space:
mode:
authorAscrod <32915892+Ascrod@users.noreply.github.com>2019-04-13 17:27:59 -0400
committerAscrod <32915892+Ascrod@users.noreply.github.com>2019-04-13 17:27:59 -0400
commit40fc72376411587e7bf9985fb9545eca1c9aaa8e (patch)
treeac903ee86826040650a54f972d2557d0fb99f0a2 /toolkit/components/search/orginal/nsSearchService.js
parent8757548a3e5b5cc4d159d61eb4a12c7af1be548e (diff)
downloadUXP-40fc72376411587e7bf9985fb9545eca1c9aaa8e.tar
UXP-40fc72376411587e7bf9985fb9545eca1c9aaa8e.tar.gz
UXP-40fc72376411587e7bf9985fb9545eca1c9aaa8e.tar.lz
UXP-40fc72376411587e7bf9985fb9545eca1c9aaa8e.tar.xz
UXP-40fc72376411587e7bf9985fb9545eca1c9aaa8e.zip
Pref try/catch block fixup. Tag #991.
Diffstat (limited to 'toolkit/components/search/orginal/nsSearchService.js')
-rw-r--r--toolkit/components/search/orginal/nsSearchService.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/toolkit/components/search/orginal/nsSearchService.js b/toolkit/components/search/orginal/nsSearchService.js
index c4481df5f..1cec5f966 100644
--- a/toolkit/components/search/orginal/nsSearchService.js
+++ b/toolkit/components/search/orginal/nsSearchService.js
@@ -1024,11 +1024,14 @@ function ParamSubstitution(aParamValue, aSearchTerms, aEngine) {
var distributionID = Services.prefs.getCharPref(BROWSER_SEARCH_PREF + "distributionID",
MOZ_DISTRIBUTION_ID || "");
- var official;
- if (Services.prefs.getBoolPref(BROWSER_SEARCH_PREF + "official", MOZ_OFFICIAL))
- official = "official";
- else
- official = "unofficial";
+ var official = MOZ_OFFICIAL;
+ try {
+ if (Services.prefs.getBoolPref(BROWSER_SEARCH_PREF + "official"))
+ official = "official";
+ else
+ official = "unofficial";
+ }
+ catch (ex) { }
// Custom search parameters. These are only available to default search
// engines.