DescriptionSimplify AtomicStringTable and remove lots of dead code.
The special path for doing substring additions only made sense when we
shared StringImpls for substrings, now that we don't there's no reason
to keep it. The code was dead either way with nothing calling it
anymore.
I also removed constructors for AtomicString that no one used and
switched to using lengthOfNullTerminatedString directly in AtomicString
instead of having a separate code path in AtomicStringTable for finding
the length of UChar* strings.
Finally I simplified AtomicStringTable::remove which was using a find
codepath designed to find a string that may not exist in the table
without actually allocating a new string. This doesn't make sense since
remove is only ever called from StringImpl's destructor on a string we
already know to be atomic so it must be in the table and must have a
hash so we can just do m_table.remove on it.
Committed: https://crrev.com/dcb58b3f64ef0a0f41c3ebc609364fed0e302472
Cr-Commit-Position: refs/heads/master@{#403408}
Patch Set 1 #
Messages
Total messages: 12 (5 generated)
|