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

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

Issue 2232083002: Fix incorrect usage of StringImpl::sizeInBytes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: size_teeee Created 4 years, 4 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
Index: third_party/WebKit/Source/wtf/text/StringImpl.h
diff --git a/third_party/WebKit/Source/wtf/text/StringImpl.h b/third_party/WebKit/Source/wtf/text/StringImpl.h
index 30736e2e2fc1bcd33c5d600d5b75d61e7ebffb5a..bbb92eceebf2195c8eed8fffee13742b5ba0653c 100644
--- a/third_party/WebKit/Source/wtf/text/StringImpl.h
+++ b/third_party/WebKit/Source/wtf/text/StringImpl.h
@@ -229,7 +229,10 @@ public:
template <typename CharType>
ALWAYS_INLINE const CharType * getCharacters() const;
- size_t sizeInBytes() const;
+ size_t charactersSizeInBytes() const
+ {
+ return length() * (is8Bit() ? sizeof(LChar) : sizeof(UChar));
+ }
bool isAtomic() const { return m_isAtomic; }
void setIsAtomic(bool isAtomic) { m_isAtomic = isAtomic; }
« no previous file with comments | « third_party/WebKit/Source/wtf/text/AtomicString.h ('k') | third_party/WebKit/Source/wtf/text/StringImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698