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

Unified Diff: src/profiler/heap-snapshot-generator.cc

Issue 1425013006: Using override keyword in ObjectVisitor class hierarchy. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/heap/scavenger.h ('k') | src/snapshot/serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/heap-snapshot-generator.cc
diff --git a/src/profiler/heap-snapshot-generator.cc b/src/profiler/heap-snapshot-generator.cc
index efcd4e6702a81c4e1d6f5a4cad8022ffbff3531e..e37f03df1b00394eaa99625c3a987b930ceb4c1b 100644
--- a/src/profiler/heap-snapshot-generator.cc
+++ b/src/profiler/heap-snapshot-generator.cc
@@ -995,12 +995,12 @@ class IndexedReferencesExtractor : public ObjectVisitor {
parent_(parent),
next_index_(0) {
}
- void VisitCodeEntry(Address entry_address) {
+ void VisitCodeEntry(Address entry_address) override {
Code* code = Code::cast(Code::GetObjectFromEntryAddress(entry_address));
generator_->SetInternalReference(parent_obj_, parent_, "code", code);
generator_->TagCodeObject(code);
}
- void VisitPointers(Object** start, Object** end) {
+ void VisitPointers(Object** start, Object** end) override {
for (Object** p = start; p < end; p++) {
++next_index_;
if (CheckVisitedAndUnmark(p)) continue;
@@ -1769,7 +1769,7 @@ class RootsReferencesExtractor : public ObjectVisitor {
heap_(heap) {
}
- void VisitPointers(Object** start, Object** end) {
+ void VisitPointers(Object** start, Object** end) override {
if (collecting_all_references_) {
for (Object** p = start; p < end; p++) all_references_.Add(*p);
} else {
@@ -1802,7 +1802,7 @@ class RootsReferencesExtractor : public ObjectVisitor {
}
}
- void Synchronize(VisitorSynchronization::SyncTag tag) {
+ void Synchronize(VisitorSynchronization::SyncTag tag) override {
if (collecting_all_references_ &&
previous_reference_count_ != all_references_.length()) {
previous_reference_count_ = all_references_.length();
@@ -2188,7 +2188,7 @@ void V8HeapExplorer::MarkAsWeakContainer(Object* object) {
class GlobalObjectsEnumerator : public ObjectVisitor {
public:
- virtual void VisitPointers(Object** start, Object** end) {
+ void VisitPointers(Object** start, Object** end) override {
for (Object** p = start; p < end; p++) {
if ((*p)->IsNativeContext()) {
Context* context = Context::cast(*p);
@@ -2241,11 +2241,9 @@ class GlobalHandlesExtractor : public ObjectVisitor {
public:
explicit GlobalHandlesExtractor(NativeObjectsExplorer* explorer)
: explorer_(explorer) {}
- virtual ~GlobalHandlesExtractor() {}
- virtual void VisitPointers(Object** start, Object** end) {
- UNREACHABLE();
- }
- virtual void VisitEmbedderReference(Object** p, uint16_t class_id) {
+ ~GlobalHandlesExtractor() override {}
+ void VisitPointers(Object** start, Object** end) override { UNREACHABLE(); }
+ void VisitEmbedderReference(Object** p, uint16_t class_id) override {
explorer_->VisitSubtreeWrapper(p, class_id);
}
private:
« no previous file with comments | « src/heap/scavenger.h ('k') | src/snapshot/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698