DescriptionRefactor to remove unnecessary code from the string hashing functions
Previously, StringHasher contained methods for calculating the hash of a pure C
character array without having to pass in the length of the array. This was only
used for AtomicStrings constructed via a string literal. The impl of the specific
hashing function currently used in WTF already checks for null terminated character
array and when the final StringImpl* for the AtomicString is constructed we
do so again.
This patch just computes the length up front and passes that information along
to the hashing function. Eventually this length is used to construct the
StringImpl without computing again.
BUG=none
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175826
Patch Set 1 #Patch Set 2 : Fix the unit tests #
Messages
Total messages: 5 (0 generated)
|