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

@@ -85,7 +85,7 @@ bool ImageCacheKey::operator==(const ImageCacheKey& aOther) const {
// Don't share the image cache between two top-level documents of different
// base domains.
if (!mIsolationKey.Equals(aOther.mIsolationKey,
nsCaseInsensitiveCStringComparator())) {
nsCaseInsensitiveCStringComparator)) {
return false;
}
// The origin attributes always have to match.