Bug 1420255 - Fix a regression from bug 1410736. r=florian a=gchang
authorZibi Braniecki <zbraniecki@mozilla.com>
Thu, 23 Nov 2017 13:11:07 -0600
changeset 444965 1b83e2c69374e442636a7c79619b2a173ef9ad0d
parent 444964 f24456236534520e2c381c765fcfd7a775fbc5cd
child 444966 66c82ad8b8a95a90f09e969eadbe312ada5663f5
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian, gchang
bugs1420255, 1410736
milestone58.0
Bug 1420255 - Fix a regression from bug 1410736. r=florian a=gchang MozReview-Commit-ID: H9pxFHecYip
toolkit/components/search/nsSearchService.js
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -2264,17 +2264,17 @@ Engine.prototype = {
     // or distribution directory.
     if (/^(?:jar:)?(?:\[app\]|\[distribution\])/.test(this._loadPath))
       return true;
 
     // If we are using a non-default locale or in the xpcshell test case,
     // we'll accept as a 'default' engine anything that has been registered at
     // resource://search-plugins/ even if the file doesn't come from the
     // application folder.  If not, skip costly additional checks.
-    if (Services.locale.defaultLocale !== Services.locale.getRequestedLocale() &&
+    if (Services.locale.defaultLocale == Services.locale.getRequestedLocale() &&
         !gEnvironment.get("XPCSHELL_TEST_PROFILE_DIR"))
       return false;
 
     // Some xpcshell tests use the search service without registering
     // resource://search-plugins/.
     if (!Services.io.getProtocolHandler("resource")
                  .QueryInterface(Ci.nsIResProtocolHandler)
                  .hasSubstitution("search-plugins"))