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

Unified Diff: Source/heap/Heap.cpp

Issue 137803004: Update heap/ classes to use OVERRIDE / FINAL when needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: Source/heap/Heap.cpp
diff --git a/Source/heap/Heap.cpp b/Source/heap/Heap.cpp
index db9950febcb358f75bfa79142f39791ca48f50fd..329ac3e61cf0b12516f70a030a50db209ce512e5 100644
--- a/Source/heap/Heap.cpp
+++ b/Source/heap/Heap.cpp
@@ -1190,21 +1190,21 @@ public:
Heap::pushTraceCallback(const_cast<void*>(objectPointer), callback);
}
- virtual void mark(HeapObjectHeader* header, TraceCallback callback)
+ virtual void mark(HeapObjectHeader* header, TraceCallback callback) OVERRIDE
{
// We need both the HeapObjectHeader and FinalizedHeapObjectHeader
// version to correctly find the payload.
visitHeader(header, header->payload(), callback);
}
- virtual void mark(FinalizedHeapObjectHeader* header, TraceCallback callback)
+ virtual void mark(FinalizedHeapObjectHeader* header, TraceCallback callback) OVERRIDE
{
// We need both the HeapObjectHeader and FinalizedHeapObjectHeader
// version to correctly find the payload.
visitHeader(header, header->payload(), callback);
}
- virtual void mark(const void* objectPointer, TraceCallback callback)
+ virtual void mark(const void* objectPointer, TraceCallback callback) OVERRIDE
{
if (!objectPointer)
return;
@@ -1212,29 +1212,29 @@ public:
visitHeader(header, header->payload(), callback);
}
- virtual void registerWeakMembers(const void* containingObject, WeakPointerCallback callback)
+ virtual void registerWeakMembers(const void* containingObject, WeakPointerCallback callback) OVERRIDE
{
Heap::pushWeakPointerCallback(const_cast<void*>(containingObject), callback);
}
- virtual bool isMarked(const void* objectPointer)
+ virtual bool isMarked(const void* objectPointer) OVERRIDE
{
return FinalizedHeapObjectHeader::fromPayload(objectPointer)->isMarked();
}
// This macro defines the necessary visitor methods for typed heaps
-#define DEFINE_VISITOR_METHODS(Type) \
- virtual void mark(const Type* objectPointer, TraceCallback callback) \
- { \
- if (!objectPointer) \
- return; \
- HeapObjectHeader* header = \
- HeapObjectHeader::fromPayload(objectPointer); \
- visitHeader(header, header->payload(), callback); \
- } \
- virtual bool isMarked(const Type* objectPointer) \
- { \
- return HeapObjectHeader::fromPayload(objectPointer)->isMarked(); \
+#define DEFINE_VISITOR_METHODS(Type) \
+ virtual void mark(const Type* objectPointer, TraceCallback callback) OVERRIDE \
+ { \
+ if (!objectPointer) \
+ return; \
+ HeapObjectHeader* header = \
+ HeapObjectHeader::fromPayload(objectPointer); \
+ visitHeader(header, header->payload(), callback); \
+ } \
+ virtual bool isMarked(const Type* objectPointer) OVERRIDE \
+ { \
+ return HeapObjectHeader::fromPayload(objectPointer)->isMarked(); \
}
FOR_EACH_TYPED_HEAP(DEFINE_VISITOR_METHODS)
« Source/heap/Handle.h ('K') | « Source/heap/Handle.h ('k') | Source/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698