DescriptionRemove StringImpl::reallocate
This CL removes StringImpls::reallocate. StringImpls::reallocate's
implementation is hacky (e.g. calling ~StringImpl directly) and this CL
aims to improve code health.
There is no performance regression. StringBuilder is only one usage of
StringImpl::reallocate. StringImpl::reallocate is called only when
StringBuilder's expansion happens with doubled size. In this case,
according to the implementation of partitionReallocGeneric, free and
malloc are sure to happen instead of reusing the same address.
NOTE: StringImpl is not immutable yet because of
truncateAssumingIsolated.
BUG=n/a
TEST=blink_tests --gtest_filter=StringBuilderTest.*
Committed: https://crrev.com/2e6ad3a3d26b05e43f6274f71f670f83c0ba26e1
Cr-Commit-Position: refs/heads/master@{#353268}
Patch Set 1 #
Messages
Total messages: 7 (2 generated)
|