Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2041)

Unified Diff: Source/wtf/text/StringImpl.cpp

Issue 21274008: Remove ASCIILiteral optimization from StringImpl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/wtf/text/StringImpl.h ('k') | Source/wtf/text/WTFString.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/StringImpl.cpp
diff --git a/Source/wtf/text/StringImpl.cpp b/Source/wtf/text/StringImpl.cpp
index f4fdbde3e2b105b21d9ded561149bed515f09d89..7cfcad0bb76192373c02de853d05d9020828dcb9 100644
--- a/Source/wtf/text/StringImpl.cpp
+++ b/Source/wtf/text/StringImpl.cpp
@@ -260,21 +260,6 @@ StringImpl::~StringImpl()
AtomicString::remove(this);
}
-PassRefPtr<StringImpl> StringImpl::createFromLiteral(const char* characters, unsigned length)
-{
- ASSERT_WITH_MESSAGE(length, "Use StringImpl::empty() to create an empty string");
- ASSERT(charactersAreAllASCII<LChar>(reinterpret_cast<const LChar*>(characters), length));
- return adoptRef(new StringImpl(characters, length, ConstructFromLiteral));
-}
-
-PassRefPtr<StringImpl> StringImpl::createFromLiteral(const char* characters)
-{
- size_t length = strlen(characters);
- ASSERT_WITH_MESSAGE(length, "Use StringImpl::empty() to create an empty string");
- ASSERT(charactersAreAllASCII<LChar>(reinterpret_cast<const LChar*>(characters), length));
- return adoptRef(new StringImpl(characters, length, ConstructFromLiteral));
-}
-
PassRefPtr<StringImpl> StringImpl::createUninitialized(unsigned length, LChar*& data)
{
if (!length) {
@@ -314,7 +299,6 @@ PassRefPtr<StringImpl> StringImpl::createUninitialized(unsigned length, UChar*&
PassRefPtr<StringImpl> StringImpl::reallocate(PassRefPtr<StringImpl> originalString, unsigned length, LChar*& data)
{
ASSERT(originalString->is8Bit());
- ASSERT(!originalString->isASCIILiteral());
ASSERT(originalString->hasOneRef());
if (!length) {
@@ -335,7 +319,6 @@ PassRefPtr<StringImpl> StringImpl::reallocate(PassRefPtr<StringImpl> originalStr
PassRefPtr<StringImpl> StringImpl::reallocate(PassRefPtr<StringImpl> originalString, unsigned length, UChar*& data)
{
ASSERT(!originalString->is8Bit());
- ASSERT(!originalString->isASCIILiteral());
ASSERT(originalString->hasOneRef());
if (!length) {
« no previous file with comments | « Source/wtf/text/StringImpl.h ('k') | Source/wtf/text/WTFString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698