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

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

Issue 1390033003: Remove StringImpl::reallocate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « third_party/WebKit/Source/wtf/text/StringImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/text/StringImpl.cpp
diff --git a/third_party/WebKit/Source/wtf/text/StringImpl.cpp b/third_party/WebKit/Source/wtf/text/StringImpl.cpp
index 38d5c599eedd0ad513e00b0828033599cc16d963..303ee9d1ddd1707c356393bd1b2eabdde4c4fce9 100644
--- a/third_party/WebKit/Source/wtf/text/StringImpl.cpp
+++ b/third_party/WebKit/Source/wtf/text/StringImpl.cpp
@@ -317,23 +317,6 @@ PassRefPtr<StringImpl> StringImpl::createUninitialized(unsigned length, UChar*&
return adoptRef(new (string) StringImpl(length));
}
-PassRefPtr<StringImpl> StringImpl::reallocate(PassRefPtr<StringImpl> originalString, unsigned length)
-{
- ASSERT(originalString->hasOneRef());
-
- if (!length)
- return empty();
-
- bool is8Bit = originalString->is8Bit();
- // Same as createUninitialized() except here we use realloc.
- size_t size = is8Bit ? allocationSize<LChar>(length) : allocationSize<UChar>(length);
- originalString->~StringImpl();
- StringImpl* string = static_cast<StringImpl*>(Partitions::bufferRealloc(originalString.leakRef(), size));
- if (is8Bit)
- return adoptRef(new (string) StringImpl(length, Force8BitConstructor));
- return adoptRef(new (string) StringImpl(length));
-}
-
static StaticStringsTable& staticStrings()
{
DEFINE_STATIC_LOCAL(StaticStringsTable, staticStrings, ());
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698