Follow up to crash fix for bug 240397.

This commit is contained in:
mozilla.mano@sent.com 2007-05-29 12:44:26 -07:00
Родитель b3e1249f4c
Коммит 31e4547ce2
1 изменённых файлов: 14 добавлений и 12 удалений

Просмотреть файл

@ -490,11 +490,12 @@ nsNavHistory::AutoCompleteFullHistorySearch(const nsAString& aSearchString,
AUTOCOMPLETE_MATCHES_SCHEME_PENALTY, &matches);
}
// fill into result
if (matches.Length() > 0) {
// sort according to priorities
AutoCompleteResultComparator comparator(this);
matches.Sort(comparator);
// fill into result
rv = aResult->AppendMatch(matches[0].url, matches[0].title);
NS_ENSURE_SUCCESS(rv, rv);
for (i = 1; i < matches.Length(); i ++) {
@ -505,6 +506,7 @@ nsNavHistory::AutoCompleteFullHistorySearch(const nsAString& aSearchString,
NS_ENSURE_SUCCESS(rv, rv);
}
}
}
return NS_OK;
}