Bug 1420255 - Fix a regression from bug 1410736. r=florian draft
authorZibi Braniecki <zbraniecki@mozilla.com>
Thu, 23 Nov 2017 13:11:07 -0600
changeset 702961 979580c364c844a71462d993892fc14614f6adb4
parent 701610 b96f009478987d44a68a8d7cad40c6a3d6626235
child 741616 01d8c0ba7a0464c8c1206708b1bd045ca9466704
push id90649
push userbmo:gandalf@aviary.pl
push dateFri, 24 Nov 2017 03:17:06 +0000
reviewersflorian
bugs1420255, 1410736
milestone59.0a1
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"))