Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin

There's no use case for stateful comparators, so they can be just plain
function pointers.

This is used in some hot places like CSS selector matching.

Differential Revision: https://phabricator.services.mozilla.com/D77084
This commit is contained in:
Emilio Cobos Álvarez
2020-05-27 18:11:12 +00:00
parent e08215360f
commit 03cfd95496
85 changed files with 263 additions and 340 deletions

View File

@@ -2040,7 +2040,7 @@ void HTMLInputElement::MozSetFileNameArray(const Sequence<nsString>& aFileNames,
nsCOMPtr<nsIFile> file;
if (StringBeginsWith(aFileNames[i], NS_LITERAL_STRING("file:"),
nsASCIICaseInsensitiveStringComparator())) {
nsASCIICaseInsensitiveStringComparator)) {
// Converts the URL string into the corresponding nsIFile if possible
// A local file will be created if the URL string begins with file://
NS_GetFileFromURLSpec(NS_ConvertUTF16toUTF8(aFileNames[i]),