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

Side by Side Diff: third_party/WebKit/Source/wtf/text/AtomicString.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // AtomicString::fromUTF8 will return a null string if 141 // AtomicString::fromUTF8 will return a null string if
142 // the input data contains invalid UTF-8 sequences. 142 // the input data contains invalid UTF-8 sequences.
143 // NOTE: Passing a zero size means use the whole string. 143 // NOTE: Passing a zero size means use the whole string.
144 static AtomicString fromUTF8(const char*, size_t length); 144 static AtomicString fromUTF8(const char*, size_t length);
145 static AtomicString fromUTF8(const char*); 145 static AtomicString fromUTF8(const char*);
146 146
147 CString ascii() const { return m_string.ascii(); } 147 CString ascii() const { return m_string.ascii(); }
148 CString latin1() const { return m_string.latin1(); } 148 CString latin1() const { return m_string.latin1(); }
149 CString utf8(UTF8ConversionMode mode = LenientUTF8Conversion) const { return m_string.utf8(mode); } 149 CString utf8(UTF8ConversionMode mode = LenientUTF8Conversion) const { return m_string.utf8(mode); }
150 150
151 size_t charactersSizeInBytes() const { return m_string.charactersSizeInBytes (); }
152
151 #ifndef NDEBUG 153 #ifndef NDEBUG
152 void show() const; 154 void show() const;
153 #endif 155 #endif
154 156
155 private: 157 private:
156 String m_string; 158 String m_string;
157 159
158 ALWAYS_INLINE static PassRefPtr<StringImpl> add(StringImpl* r) 160 ALWAYS_INLINE static PassRefPtr<StringImpl> add(StringImpl* r)
159 { 161 {
160 if (!r || r->isAtomic()) 162 if (!r || r->isAtomic())
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 using WTF::AtomicString; 223 using WTF::AtomicString;
222 using WTF::nullAtom; 224 using WTF::nullAtom;
223 using WTF::emptyAtom; 225 using WTF::emptyAtom;
224 using WTF::starAtom; 226 using WTF::starAtom;
225 using WTF::xmlAtom; 227 using WTF::xmlAtom;
226 using WTF::xmlnsAtom; 228 using WTF::xmlnsAtom;
227 using WTF::xlinkAtom; 229 using WTF::xlinkAtom;
228 230
229 #include "wtf/text/StringConcatenate.h" 231 #include "wtf/text/StringConcatenate.h"
230 #endif // AtomicString_h 232 #endif // AtomicString_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/v8_inspector/V8DebuggerScript.cpp ('k') | third_party/WebKit/Source/wtf/text/StringImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698