Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: third_party/WebKit/Source/wtf/text/StringHash.h

Issue 2148423003: Use StringView for equalIgnoringCase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add rebaselines. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/wtf/text/StringHash.h
diff --git a/third_party/WebKit/Source/wtf/text/StringHash.h b/third_party/WebKit/Source/wtf/text/StringHash.h
index 025f03c0ed9a727c741d26f8bef73ce74858533b..b402c6965724c4d23b0554a99a1628da9c5fa6f7 100644
--- a/third_party/WebKit/Source/wtf/text/StringHash.h
+++ b/third_party/WebKit/Source/wtf/text/StringHash.h
@@ -98,7 +98,10 @@ public:
static inline bool equal(const StringImpl* a, const StringImpl* b)
{
- return equalIgnoringCaseNonNull(a, b);
+ DCHECK(a);
+ DCHECK(b);
+ // Save one branch inside StringView by derefing the StringImpl.
+ return equalIgnoringCaseAndNullity(*a, *b);
}
static unsigned hash(const RefPtr<StringImpl>& key)

Powered by Google App Engine
This is Rietveld 408576698