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

Side by Side Diff: third_party/WebKit/Source/wtf/text/CString.h

Issue 2565883002: Test for codegen of RELEASE_ASSERT vs CHECK in WTF (Closed)
Patch Set: . Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/CString.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2008, 2009, 2010, 2012 Apple Inc. All rights 2 * Copyright (C) 2003, 2006, 2008, 2009, 2010, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class WTF_EXPORT CStringImpl : public RefCounted<CStringImpl> { 42 class WTF_EXPORT CStringImpl : public RefCounted<CStringImpl> {
43 WTF_MAKE_NONCOPYABLE(CStringImpl); 43 WTF_MAKE_NONCOPYABLE(CStringImpl);
44 44
45 public: 45 public:
46 // CStringImpls are allocated out of the WTF buffer partition. 46 // CStringImpls are allocated out of the WTF buffer partition.
47 void* operator new(size_t, void* ptr) { return ptr; } 47 void* operator new(size_t, void* ptr) { return ptr; }
48 void operator delete(void*); 48 void operator delete(void*);
49 49
50 static PassRefPtr<CStringImpl> createUninitialized(size_t length, 50 static PassRefPtr<CStringImpl> createUninitialized(size_t length,
51 char*& data); 51 char*& data);
52 static PassRefPtr<CStringImpl> createUninitializedCHECK(size_t length,
53 char*& data);
52 54
53 const char* data() const { return reinterpret_cast<const char*>(this + 1); } 55 const char* data() const { return reinterpret_cast<const char*>(this + 1); }
54 size_t length() const { return m_length; } 56 size_t length() const { return m_length; }
55 57
56 private: 58 private:
57 explicit CStringImpl(size_t length) : m_length(length) {} 59 explicit CStringImpl(size_t length) : m_length(length) {}
58 60
59 const unsigned m_length; 61 const unsigned m_length;
60 }; 62 };
61 63
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 110
109 // Pretty printer for gtest and base/logging.*. It prepends and appends 111 // Pretty printer for gtest and base/logging.*. It prepends and appends
110 // double-quotes, and escapes characters other than ASCII printables. 112 // double-quotes, and escapes characters other than ASCII printables.
111 WTF_EXPORT std::ostream& operator<<(std::ostream&, const CString&); 113 WTF_EXPORT std::ostream& operator<<(std::ostream&, const CString&);
112 114
113 } // namespace WTF 115 } // namespace WTF
114 116
115 using WTF::CString; 117 using WTF::CString;
116 118
117 #endif // CString_h 119 #endif // CString_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/CString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698