From 250514830ee668367aa289b7a98e6b34fd463f67 Mon Sep 17 00:00:00 2001 From: Simon Lindholm Date: Thu, 14 Jul 2016 14:10:20 +0200 Subject: [PATCH] Bug 1287277 - Silly micro-optimization. r=mak --HG-- extra : rebase_source : ec8d72d13a97133ae8392c5071980724e280ec24 --- toolkit/components/places/SQLFunctions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolkit/components/places/SQLFunctions.cpp b/toolkit/components/places/SQLFunctions.cpp index 83b22817b60b..ababd5cd5bae 100644 --- a/toolkit/components/places/SQLFunctions.cpp +++ b/toolkit/components/places/SQLFunctions.cpp @@ -357,9 +357,9 @@ namespace places { // We only want to filter javascript: URLs if we are not supposed to search // for them, and the search does not start with "javascript:". if (matchBehavior != mozIPlacesAutoComplete::MATCH_ANYWHERE_UNMODIFIED && + StringBeginsWith(url, NS_LITERAL_CSTRING("javascript:")) && !HAS_BEHAVIOR(JAVASCRIPT) && - !StringBeginsWith(searchString, NS_LITERAL_CSTRING("javascript:")) && - StringBeginsWith(url, NS_LITERAL_CSTRING("javascript:"))) { + !StringBeginsWith(searchString, NS_LITERAL_CSTRING("javascript:"))) { NS_ADDREF(*_result = new IntegerVariant(0)); return NS_OK; }