Avoid calling AtomicString::lower() in makeFontGlyphsCacheKey
Created attachment 212122 [details] Patch
Comment on attachment 212122 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=212122&action=review > Source/WebCore/platform/graphics/Font.cpp:171 > + if (!equalIgnoringCase(a.families[i].impl(), b.families[i].impl())) Why is the impl() needed here? Shouldn't we have functions overloaded so that isn’t needed? > Source/WebCore/platform/graphics/Font.cpp:206 > + Vector<unsigned, 7> hashCodes; > + hashCodes.reserveInitialCapacity(4 + key.families.size()); Need a comment explaining why 7. Why not, say, more like 16 to cover virtually all non-ridiculous cases without allocation? > Source/WebCore/platform/graphics/Font.cpp:215 > + return StringHasher::hashMemory(hashCodes.data(), hashCodes.size() * sizeof(unsigned)); The proper comment for this line is, "Yo dawg! I heard you like hashes, so I hashed your hash."
Comment on attachment 212122 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=212122&action=review > Source/WebCore/platform/graphics/Font.cpp:170 > + for (unsigned i = 0; i < a.families.size(); ++i) { Why don't we cache the size in a local variable or traverse backwards?
Committed r156139: <http://trac.webkit.org/changeset/156139>
(In reply to comment #4) > Committed r156139: <http://trac.webkit.org/changeset/156139> FYI:It made all test crash everywhere.
Fix landed in http://trac.webkit.org/changeset/156142. Thanks.