Bug 1420255 - Fix a regression from bug 1410736. r=florian
authorZibi Braniecki <zbraniecki@mozilla.com>
Thu, 23 Nov 2017 13:11:07 -0600
changeset 393508 c2832d8c079837d8c5e52b6f6cd307a95b33cda7
parent 393507 6724ad1ea3012c8e7ed32556a1dd3c9ae1c53370
child 393509 0b2634540732aa11cb73e15973d6ff0cd91500c1
push id32961
push useraiakab@mozilla.com
push dateFri, 24 Nov 2017 09:58:12 +0000
treeherdermozilla-central@e91a098e6e99 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1420255, 1410736
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1420255 - Fix a regression from bug 1410736. r=florian MozReview-Commit-ID: H9pxFHecYip
toolkit/components/search/nsSearchService.js
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -2265,17 +2265,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"))