Remove String::deprecatedCharactersWithNullTermination() and related code
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Jun 2013 01:39:28 +0000 (01:39 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Jun 2013 01:39:28 +0000 (01:39 +0000)
commitd34eeff20f60af52cf970bdafed78188274b1068
tree3e3bcaa8f1a709d70bccaba16afcc505cfa5fe66
parentfa621eb251104ef016bb58a42f2c995f51a61632
Remove String::deprecatedCharactersWithNullTermination() and related code
https://bugs.webkit.org/show_bug.cgi?id=118211

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

* API/JSStringRef.cpp:
(JSStringCreateWithCharactersNoCopy):
Update call to StringImpl::createWithoutCopying.

Source/WTF:

Remove String::deprecatedCharactersWithNullTermination, StringImpl::createWithTerminatingNullCharacter
and the s_hashFlagHasTerminatingNullCharacter flag. We no longer care about whether strings have a
terminating null character.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createFromLiteral):
(WTF::StringImpl::createWithoutCopying):
(WTF::StringImpl::getData16SlowCase):
(WTF::StringImpl::sizeInBytes):
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::createFromLiteral):
(WTF::StringImpl::isolatedCopy):
* wtf/text/WTFString.cpp:
* wtf/text/WTFString.h:

Tools:

Remove all hasTerminatingNullCharacter() checks.

* TestWebKitAPI/Tests/WTF/AtomicString.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/WTFString.cpp:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/API/JSStringRef.cpp
Source/JavaScriptCore/ChangeLog
Source/WTF/ChangeLog
Source/WTF/wtf/text/StringImpl.cpp
Source/WTF/wtf/text/StringImpl.h
Source/WTF/wtf/text/WTFString.cpp
Source/WTF/wtf/text/WTFString.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/AtomicString.cpp
Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp
Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp