-
levin@chromium.org authored
2009-06-12 David Levin <levin@chromium.org> Reviewed by Darin Adler. UString shouldn't create sharedBuffer for SmallStrings. https://bugs.webkit.org/show_bug.cgi?id=26360 The methods changed are not used by JSC, so there is no JS perf impact. However, there is a potential DOM perf impact, so I re-ran several of the tests that I ran previously and ensured that the perf stay the same which caused me to adjust the minLengthToShare. * JavaScriptCore.exp: * runtime/UString.cpp: (JSC::UString::Rep::sharedBuffer): Determines if the buffer being shared is big enough before doing so. Previously, BaseString::sharedBuffer was called but it would only know the length of the base string (BaseString::len) which may not be the same as the string being shared (Rep::len). (JSC::UString::BaseString::sharedBuffer): This is now only be used by Rep::sharedBuffer. which does the length check. * runtime/UString.h: WebCore: 2009-06-12 David Levin <levin@chromium.org> Reviewed by Darin Adler. UString shouldn't create sharedBuffer for SmallStrings. https://bugs.webkit.org/show_bug.cgi?id=26347 Change the call to use the method UString::Rep::sharedBuffer due to changes in UString. No noticable change in behavior, so no test. * platform/text/StringImpl.cpp: (WebCore::StringImpl::create): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1ef10580