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

Side by Side Diff: third_party/WebKit/Source/platform/PODIntervalTree.h

Issue 2422973002: Revert of Convert a few more CFI blacklist entries into DISABLE_CFI_PERF attributes. (Closed)
Patch Set: Created 4 years, 2 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // Initializes the tree. 138 // Initializes the tree.
139 void init() { 139 void init() {
140 // Explicit dereference of "this" required because of 140 // Explicit dereference of "this" required because of
141 // inheritance rules in template classes. 141 // inheritance rules in template classes.
142 this->setNeedsFullOrderingComparisons(true); 142 this->setNeedsFullOrderingComparisons(true);
143 } 143 }
144 144
145 // Starting from the given node, adds all overlaps with the given 145 // Starting from the given node, adds all overlaps with the given
146 // interval to the result vector. The intervals are sorted by 146 // interval to the result vector. The intervals are sorted by
147 // increasing low endpoint. 147 // increasing low endpoint.
148 DISABLE_CFI_PERF
149 template <class AdapterType> 148 template <class AdapterType>
150 void searchForOverlapsFrom(IntervalNode* node, AdapterType& adapter) const { 149 void searchForOverlapsFrom(IntervalNode* node, AdapterType& adapter) const {
151 if (!node) 150 if (!node)
152 return; 151 return;
153 152
154 // Because the intervals are sorted by left endpoint, inorder 153 // Because the intervals are sorted by left endpoint, inorder
155 // traversal produces results sorted as desired. 154 // traversal produces results sorted as desired.
156 155
157 // See whether we need to traverse the left subtree. 156 // See whether we need to traverse the left subtree.
158 IntervalNode* left = node->left(); 157 IntervalNode* left = node->left();
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 struct ValueToString<PODInterval<T, UserData>> { 247 struct ValueToString<PODInterval<T, UserData>> {
249 static String toString(const PODInterval<T, UserData>& interval) { 248 static String toString(const PODInterval<T, UserData>& interval) {
250 return interval.toString(); 249 return interval.toString();
251 } 250 }
252 }; 251 };
253 #endif 252 #endif
254 253
255 } // namespace blink 254 } // namespace blink
256 255
257 #endif // PODIntervalTree_h 256 #endif // PODIntervalTree_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698