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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/intrusive_heap.h

Issue 2469653002: Fix incorrect usage of std::is_heap in blink::scheduler::IntrusiveHeap. (Closed)
Patch Set: Attempt to appease the Android compiler. Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/base/intrusive_heap_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/scheduler/base/intrusive_heap.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/intrusive_heap.h b/third_party/WebKit/Source/platform/scheduler/base/intrusive_heap.h
index 635df1f0394b614096760f1b46e80e265d844669..09c57a1fe7fb7f346c7e8fd4184a42b9065573ca 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/intrusive_heap.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/intrusive_heap.h
@@ -129,6 +129,8 @@ class IntrusiveHeap {
kMinimumHeapSize = 4u
};
+ friend class IntrusiveHeapTest;
+
size_t MoveHole(size_t new_hole_pos, size_t old_hole_pos) {
DCHECK_GT(new_hole_pos, 0u);
DCHECK_LE(new_hole_pos, size_);
@@ -155,7 +157,8 @@ class IntrusiveHeap {
DCHECK(std::is_heap(begin(), end(), CompareNodes));
}
- static bool CompareNodes(const T& a, const T& b) { return b <= a; }
+ // is_heap requires a strict comparator.
+ static bool CompareNodes(const T& a, const T& b) { return !(a <= b); }
// Moves the |hole| up the tree and when the right position has been found
// |element| is moved in.
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/base/intrusive_heap_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698