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

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

Issue 2033293002: Implement StringImpl sharing for StringView::toString(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix preload scanner bug. Created 4 years, 6 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 9e3178df841b44784ba308624164292db47a0901..d676b0c973a4d6436cd5f1e3eaf0f0c983b4eec4 100644
--- a/third_party/WebKit/Source/wtf/text/StringImpl.h
+++ b/third_party/WebKit/Source/wtf/text/StringImpl.h
@@ -224,6 +224,7 @@ public:
ALWAYS_INLINE const LChar* characters8() const { ASSERT(is8Bit()); return reinterpret_cast<const LChar*>(this + 1); }
ALWAYS_INLINE const UChar* characters16() const { ASSERT(!is8Bit()); return reinterpret_cast<const UChar*>(this + 1); }
+ ALWAYS_INLINE const void* bytes() const { return reinterpret_cast<const void*>(this + 1); }
template <typename CharType>
ALWAYS_INLINE const CharType * getCharacters() const;

Powered by Google App Engine
This is Rietveld 408576698