>-
>- if (!allTermsFound && !URIHasAnyTagFromTerms(aSet[nodeIndex]->mURI, tagTerms))
>- continue;
>+ // Load up the title, url, tags for the current node as UTF16 strings
>+ NS_ConvertUTF8toUTF16 nodeTitle(aSet[nodeIndex]->mTitle);
>+ // Unescape the URL for search term matching
>+ nsCAutoString cNodeURL(aSet[nodeIndex]->mURI);
>+ NS_ConvertUTF8toUTF16 nodeURL(NS_UnescapeURL(cNodeURL));
>+ // Fetch the tags
>+ nsAutoString nodeTags;
>+ rv = aSet[nodeIndex]->GetTags(nodeTags);
no conversion needed?
also, iirc the direct db access in URIHasTag was originally due to poor performance of the tag service (not to mention level xpconnect traversals), and i believe GetTags() does exactly that.
please test, and if this is still a problem, maybe we should instead have GetTags() use URIHasTag()?
>+ NS_ENSURE_SUCCESS(rv, rv);
>+
>+ // Determine if every search term matches anywhere in the title, url, tag
>+ PRBool matchAll = PR_TRUE;
>+ for (PRInt32 termIndex = terms[queryIndex]->Count(); --termIndex >= 0 &&
>+ matchAll; ) {
nit: weird indent, please line up with parens contents
(From update of attachment 305702)
>- omTerms( aSet[nodeIndex] ->mURI, tagTerms)) oUTF16 nodeTitle( aSet[nodeIndex] ->mTitle) ; aSet[nodeIndex] ->mURI) ; oUTF16 nodeURL( NS_UnescapeURL( cNodeURL) ); ->GetTags( nodeTags) ;
>- if (!allTermsFound && !URIHasAnyTagFr
>- continue;
>+ // Load up the title, url, tags for the current node as UTF16 strings
>+ NS_ConvertUTF8t
>+ // Unescape the URL for search term matching
>+ nsCAutoString cNodeURL(
>+ NS_ConvertUTF8t
>+ // Fetch the tags
>+ nsAutoString nodeTags;
>+ rv = aSet[nodeIndex]
no conversion needed?
also, iirc the direct db access in URIHasTag was originally due to poor performance of the tag service (not to mention level xpconnect traversals), and i believe GetTags() does exactly that.
please test, and if this is still a problem, maybe we should instead have GetTags() use URIHasTag()?
>+ NS_ENSURE_ SUCCESS( rv, rv); x]->Count( ); --termIndex >= 0 &&
>+
>+ // Determine if every search term matches anywhere in the title, url, tag
>+ PRBool matchAll = PR_TRUE;
>+ for (PRInt32 termIndex = terms[queryInde
>+ matchAll; ) {
nit: weird indent, please line up with parens contents