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

Side by Side Diff: cc/base/contiguous_container.h

Issue 2257323002: Disable CFI on a few src/cc methods for perf reasons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 years, 3 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
« no previous file with comments | « base/compiler_specific.h ('k') | cc/blink/web_layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_BASE_CONTIGUOUS_CONTAINER_H_ 5 #ifndef CC_BASE_CONTIGUOUS_CONTAINER_H_
6 #define CC_BASE_CONTIGUOUS_CONTAINER_H_ 6 #define CC_BASE_CONTIGUOUS_CONTAINER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 IteratorWrapper<std::vector<void*>::reverse_iterator, BaseElementType>; 123 IteratorWrapper<std::vector<void*>::reverse_iterator, BaseElementType>;
124 using const_reverse_iterator = 124 using const_reverse_iterator =
125 IteratorWrapper<std::vector<void*>::const_reverse_iterator, 125 IteratorWrapper<std::vector<void*>::const_reverse_iterator,
126 const BaseElementType>; 126 const BaseElementType>;
127 127
128 explicit ContiguousContainer(size_t max_object_size) 128 explicit ContiguousContainer(size_t max_object_size)
129 : ContiguousContainerBase(Align(max_object_size)) {} 129 : ContiguousContainerBase(Align(max_object_size)) {}
130 ContiguousContainer(size_t max_object_size, size_t initial_size_bytes) 130 ContiguousContainer(size_t max_object_size, size_t initial_size_bytes)
131 : ContiguousContainerBase(Align(max_object_size), initial_size_bytes) {} 131 : ContiguousContainerBase(Align(max_object_size), initial_size_bytes) {}
132 132
133 DISABLE_CFI_PERF
133 ~ContiguousContainer() { 134 ~ContiguousContainer() {
134 for (auto& element : *this) { 135 for (auto& element : *this) {
135 // MSVC incorrectly reports this variable as unused. 136 // MSVC incorrectly reports this variable as unused.
136 (void)element; 137 (void)element;
137 element.~BaseElementType(); 138 element.~BaseElementType();
138 } 139 }
139 } 140 }
140 141
141 using ContiguousContainerBase::size; 142 using ContiguousContainerBase::size;
142 using ContiguousContainerBase::empty; 143 using ContiguousContainerBase::empty;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 DCHECK_EQ(aligned_size % alignment, 0u); 216 DCHECK_EQ(aligned_size % alignment, 0u);
216 DCHECK_GE(aligned_size, size); 217 DCHECK_GE(aligned_size, size);
217 DCHECK_LT(aligned_size, size + alignment); 218 DCHECK_LT(aligned_size, size + alignment);
218 return aligned_size; 219 return aligned_size;
219 } 220 }
220 }; 221 };
221 222
222 } // namespace cc 223 } // namespace cc
223 224
224 #endif // CC_BASE_CONTIGUOUS_CONTAINER_H_ 225 #endif // CC_BASE_CONTIGUOUS_CONTAINER_H_
OLDNEW
« no previous file with comments | « base/compiler_specific.h ('k') | cc/blink/web_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698