Index: src/heap/spaces.h |
diff --git a/src/heap/spaces.h b/src/heap/spaces.h |
index 18a6a0e65fac6189098fe993c79e9c0fa254d6c8..72218ffee271901148aabda8dc8e8f8992ab214c 100644 |
--- a/src/heap/spaces.h |
+++ b/src/heap/spaces.h |
@@ -1422,7 +1422,7 @@ class HeapObjectIterator : public ObjectIterator { |
// skipping the special garbage section of which there is one per space. |
// Returns NULL when the iteration has ended. |
inline HeapObject* Next(); |
- virtual inline HeapObject* next_object(); |
+ inline HeapObject* next_object() override; |
private: |
enum PageMode { kOnePageOnly, kAllPagesInSpace }; |
@@ -1877,7 +1877,7 @@ class PagedSpace : public Space { |
// Creates a space with an id. |
PagedSpace(Heap* heap, AllocationSpace id, Executability executable); |
- virtual ~PagedSpace() { TearDown(); } |
+ ~PagedSpace() override { TearDown(); } |
// Set up the space using the given address range of virtual memory (from |
// the memory allocator's initial chunk) if possible. If the block of |
@@ -2470,7 +2470,7 @@ class SemiSpaceIterator : public ObjectIterator { |
inline HeapObject* Next(); |
// Implementation of the ObjectIterator functions. |
- virtual inline HeapObject* next_object(); |
+ inline HeapObject* next_object() override; |
private: |
void Initialize(Address start, Address end); |
@@ -2839,15 +2839,15 @@ class CompactionSpace : public PagedSpace { |
Free(start, size_in_bytes); |
} |
- virtual bool is_local() override { return true; } |
+ bool is_local() override { return true; } |
- virtual void RefillFreeList() override; |
+ void RefillFreeList() override; |
protected: |
// The space is temporary and not included in any snapshots. |
- virtual bool snapshotable() override { return false; } |
+ bool snapshotable() override { return false; } |
- MUST_USE_RESULT virtual HeapObject* SweepAndRetryAllocation( |
+ MUST_USE_RESULT HeapObject* SweepAndRetryAllocation( |
int size_in_bytes) override; |
}; |
@@ -2912,7 +2912,7 @@ class MapSpace : public PagedSpace { |
// TODO(1600): this limit is artifical just to keep code compilable |
static const int kMaxMapPageIndex = 1 << 16; |
- virtual int RoundSizeDownToObjectAlignment(int size) { |
+ int RoundSizeDownToObjectAlignment(int size) override { |
if (base::bits::IsPowerOfTwo32(Map::kSize)) { |
return RoundDown(size, Map::kSize); |
} else { |
@@ -2920,8 +2920,9 @@ class MapSpace : public PagedSpace { |
} |
} |
- protected: |
- virtual void VerifyObject(HeapObject* obj); |
+#ifdef VERIFY_HEAP |
+ void VerifyObject(HeapObject* obj) override; |
+#endif |
private: |
static const int kMapsPerPage = Page::kAllocatableMemory / Map::kSize; |