Commit df5263b0 authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[cleanup] Mark test/ methods in subclasses with override.

Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I6bd8e0c8c1965f22a3429fda12bc70ae454c39c2
Reviewed-on: https://chromium-review.googlesource.com/1226978Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55930}
parent 8e7e8459
...@@ -193,7 +193,7 @@ class ApiTestFuzzer: public v8::base::Thread { ...@@ -193,7 +193,7 @@ class ApiTestFuzzer: public v8::base::Thread {
void CallTest(); void CallTest();
// The ApiTestFuzzer is also a Thread, so it has a Run method. // The ApiTestFuzzer is also a Thread, so it has a Run method.
virtual void Run(); void Run() override;
enum PartOfTest { enum PartOfTest {
FIRST_PART, FIRST_PART,
...@@ -220,7 +220,7 @@ class ApiTestFuzzer: public v8::base::Thread { ...@@ -220,7 +220,7 @@ class ApiTestFuzzer: public v8::base::Thread {
test_number_(num), test_number_(num),
gate_(0), gate_(0),
active_(true) {} active_(true) {}
~ApiTestFuzzer() = default; ~ApiTestFuzzer() override = default;
static bool fuzzing_; static bool fuzzing_;
static int tests_being_run_; static int tests_being_run_;
...@@ -600,9 +600,9 @@ class StaticOneByteResource : public v8::String::ExternalOneByteStringResource { ...@@ -600,9 +600,9 @@ class StaticOneByteResource : public v8::String::ExternalOneByteStringResource {
~StaticOneByteResource() = default; ~StaticOneByteResource() = default;
const char* data() const { return data_; } const char* data() const override { return data_; }
size_t length() const { return strlen(data_); } size_t length() const override { return strlen(data_); }
private: private:
const char* data_; const char* data_;
...@@ -710,7 +710,7 @@ class TestPlatform : public v8::Platform { ...@@ -710,7 +710,7 @@ class TestPlatform : public v8::Platform {
protected: protected:
TestPlatform() : old_platform_(i::V8::GetCurrentPlatform()) {} TestPlatform() : old_platform_(i::V8::GetCurrentPlatform()) {}
~TestPlatform() { i::V8::SetPlatformForTesting(old_platform_); } ~TestPlatform() override { i::V8::SetPlatformForTesting(old_platform_); }
v8::Platform* old_platform() const { return old_platform_; } v8::Platform* old_platform() const { return old_platform_; }
......
...@@ -40,7 +40,7 @@ class ChunkSource : public v8::ScriptCompiler::ExternalSourceStream { ...@@ -40,7 +40,7 @@ class ChunkSource : public v8::ScriptCompiler::ExternalSourceStream {
} }
chunks_.push_back({nullptr, 0}); chunks_.push_back({nullptr, 0});
} }
~ChunkSource() = default; ~ChunkSource() override = default;
bool SetBookmark() override { return false; } bool SetBookmark() override { return false; }
void ResetToBookmark() override {} void ResetToBookmark() override {}
size_t GetMoreData(const uint8_t** src) override { size_t GetMoreData(const uint8_t** src) override {
......
...@@ -36,8 +36,8 @@ namespace internal { ...@@ -36,8 +36,8 @@ namespace internal {
class PrintExtension : public v8::Extension { class PrintExtension : public v8::Extension {
public: public:
PrintExtension() : v8::Extension("v8/print", "native function print();") { } PrintExtension() : v8::Extension("v8/print", "native function print();") { }
virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate( v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Local<v8::String> name); v8::Isolate* isolate, v8::Local<v8::String> name) override;
static void Print(const v8::FunctionCallbackInfo<v8::Value>& args); static void Print(const v8::FunctionCallbackInfo<v8::Value>& args);
}; };
......
...@@ -41,8 +41,8 @@ class ProfilerExtension : public v8::Extension { ...@@ -41,8 +41,8 @@ class ProfilerExtension : public v8::Extension {
public: public:
ProfilerExtension() : v8::Extension("v8/profiler", kSource) { } ProfilerExtension() : v8::Extension("v8/profiler", kSource) { }
virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate( v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Local<v8::String> name); v8::Isolate* isolate, v8::Local<v8::String> name) override;
static void set_profiler(v8::CpuProfiler* profiler) { profiler_ = profiler; } static void set_profiler(v8::CpuProfiler* profiler) { profiler_ = profiler; }
static void set_profiler(CpuProfiler* profiler) { static void set_profiler(CpuProfiler* profiler) {
......
...@@ -14,7 +14,7 @@ class SetupIsolateDelegateForTests : public SetupIsolateDelegate { ...@@ -14,7 +14,7 @@ class SetupIsolateDelegateForTests : public SetupIsolateDelegate {
public: public:
explicit SetupIsolateDelegateForTests(bool create_heap_objects) explicit SetupIsolateDelegateForTests(bool create_heap_objects)
: SetupIsolateDelegate(create_heap_objects) {} : SetupIsolateDelegate(create_heap_objects) {}
virtual ~SetupIsolateDelegateForTests() = default; ~SetupIsolateDelegateForTests() override = default;
void SetupBuiltins(Isolate* isolate) override; void SetupBuiltins(Isolate* isolate) override;
......
...@@ -37,7 +37,7 @@ class AllocationPlatform : public TestPlatform { ...@@ -37,7 +37,7 @@ class AllocationPlatform : public TestPlatform {
// Now that it's completely constructed, make this the current platform. // Now that it's completely constructed, make this the current platform.
i::V8::SetPlatformForTesting(this); i::V8::SetPlatformForTesting(this);
} }
virtual ~AllocationPlatform() = default; ~AllocationPlatform() override = default;
void OnCriticalMemoryPressure() override { oom_callback_called = true; } void OnCriticalMemoryPressure() override { oom_callback_called = true; }
......
This diff is collapsed.
...@@ -113,7 +113,7 @@ class ProducerThread: public v8::base::Thread { ...@@ -113,7 +113,7 @@ class ProducerThread: public v8::base::Thread {
value_(value), value_(value),
finished_(finished) {} finished_(finished) {}
virtual void Run() { void Run() override {
for (Record i = value_; i < value_ + records_per_chunk_; ++i) { for (Record i = value_; i < value_ + records_per_chunk_; ++i) {
Record* rec = reinterpret_cast<Record*>(scq_->StartEnqueue()); Record* rec = reinterpret_cast<Record*>(scq_->StartEnqueue());
CHECK(rec); CHECK(rec);
......
...@@ -44,7 +44,7 @@ class DateCacheMock: public DateCache { ...@@ -44,7 +44,7 @@ class DateCacheMock: public DateCache {
: local_offset_(local_offset), rules_(rules), rules_count_(rules_count) {} : local_offset_(local_offset), rules_(rules), rules_count_(rules_count) {}
protected: protected:
virtual int GetDaylightSavingsOffsetFromOS(int64_t time_sec) { int GetDaylightSavingsOffsetFromOS(int64_t time_sec) override {
int days = DaysFromTime(time_sec * 1000); int days = DaysFromTime(time_sec * 1000);
int time_in_day_sec = TimeInDay(time_sec * 1000, days) / 1000; int time_in_day_sec = TimeInDay(time_sec * 1000, days) / 1000;
int year, month, day; int year, month, day;
...@@ -53,7 +53,7 @@ class DateCacheMock: public DateCache { ...@@ -53,7 +53,7 @@ class DateCacheMock: public DateCache {
return rule == nullptr ? 0 : rule->offset_sec * 1000; return rule == nullptr ? 0 : rule->offset_sec * 1000;
} }
virtual int GetLocalOffsetFromOS(int64_t time_sec, bool is_utc) { int GetLocalOffsetFromOS(int64_t time_sec, bool is_utc) override {
return local_offset_ + GetDaylightSavingsOffsetFromOS(time_sec); return local_offset_ + GetDaylightSavingsOffsetFromOS(time_sec);
} }
......
...@@ -189,8 +189,9 @@ int break_point_hit_count = 0; ...@@ -189,8 +189,9 @@ int break_point_hit_count = 0;
int break_point_hit_count_deoptimize = 0; int break_point_hit_count_deoptimize = 0;
class DebugEventCounter : public v8::debug::DebugDelegate { class DebugEventCounter : public v8::debug::DebugDelegate {
public: public:
void BreakProgramRequested(v8::Local<v8::Context>, void BreakProgramRequested(
const std::vector<v8::debug::BreakpointId>&) { v8::Local<v8::Context>,
const std::vector<v8::debug::BreakpointId>&) override {
break_point_hit_count++; break_point_hit_count++;
// Perform a full deoptimization when the specified number of // Perform a full deoptimization when the specified number of
// breaks have been hit. // breaks have been hit.
...@@ -211,8 +212,9 @@ class DebugEventCounter : public v8::debug::DebugDelegate { ...@@ -211,8 +212,9 @@ class DebugEventCounter : public v8::debug::DebugDelegate {
// Debug event handler which performs a garbage collection. // Debug event handler which performs a garbage collection.
class DebugEventBreakPointCollectGarbage : public v8::debug::DebugDelegate { class DebugEventBreakPointCollectGarbage : public v8::debug::DebugDelegate {
public: public:
void BreakProgramRequested(v8::Local<v8::Context>, void BreakProgramRequested(
const std::vector<v8::debug::BreakpointId>&) { v8::Local<v8::Context>,
const std::vector<v8::debug::BreakpointId>&) override {
// Perform a garbage collection when break point is hit and continue. Based // Perform a garbage collection when break point is hit and continue. Based
// on the number of break points hit either scavenge or mark compact // on the number of break points hit either scavenge or mark compact
// collector is used. // collector is used.
...@@ -231,8 +233,9 @@ class DebugEventBreakPointCollectGarbage : public v8::debug::DebugDelegate { ...@@ -231,8 +233,9 @@ class DebugEventBreakPointCollectGarbage : public v8::debug::DebugDelegate {
// collector to have the heap verified. // collector to have the heap verified.
class DebugEventBreak : public v8::debug::DebugDelegate { class DebugEventBreak : public v8::debug::DebugDelegate {
public: public:
void BreakProgramRequested(v8::Local<v8::Context>, void BreakProgramRequested(
const std::vector<v8::debug::BreakpointId>&) { v8::Local<v8::Context>,
const std::vector<v8::debug::BreakpointId>&) override {
// Count the number of breaks. // Count the number of breaks.
break_point_hit_count++; break_point_hit_count++;
...@@ -255,8 +258,9 @@ int max_break_point_hit_count = 0; ...@@ -255,8 +258,9 @@ int max_break_point_hit_count = 0;
bool terminate_after_max_break_point_hit = false; bool terminate_after_max_break_point_hit = false;
class DebugEventBreakMax : public v8::debug::DebugDelegate { class DebugEventBreakMax : public v8::debug::DebugDelegate {
public: public:
void BreakProgramRequested(v8::Local<v8::Context>, void BreakProgramRequested(
const std::vector<v8::debug::BreakpointId>&) { v8::Local<v8::Context>,
const std::vector<v8::debug::BreakpointId>&) override {
v8::Isolate* v8_isolate = CcTest::isolate(); v8::Isolate* v8_isolate = CcTest::isolate();
v8::internal::Isolate* isolate = CcTest::i_isolate(); v8::internal::Isolate* isolate = CcTest::i_isolate();
if (break_point_hit_count < max_break_point_hit_count) { if (break_point_hit_count < max_break_point_hit_count) {
...@@ -2999,9 +3003,9 @@ int event_listener_hit_count = 0; ...@@ -2999,9 +3003,9 @@ int event_listener_hit_count = 0;
class EmptyExternalStringResource : public v8::String::ExternalStringResource { class EmptyExternalStringResource : public v8::String::ExternalStringResource {
public: public:
EmptyExternalStringResource() { empty_[0] = 0; } EmptyExternalStringResource() { empty_[0] = 0; }
virtual ~EmptyExternalStringResource() {} ~EmptyExternalStringResource() override {}
virtual size_t length() const { return empty_.length(); } size_t length() const override { return empty_.length(); }
virtual const uint16_t* data() const { return empty_.start(); } const uint16_t* data() const override { return empty_.start(); }
private: private:
::v8::internal::EmbeddedVector<uint16_t, 1> empty_; ::v8::internal::EmbeddedVector<uint16_t, 1> empty_;
...@@ -3677,7 +3681,7 @@ class TerminationThread : public v8::base::Thread { ...@@ -3677,7 +3681,7 @@ class TerminationThread : public v8::base::Thread {
explicit TerminationThread(v8::Isolate* isolate) explicit TerminationThread(v8::Isolate* isolate)
: Thread(Options("terminator")), isolate_(isolate) {} : Thread(Options("terminator")), isolate_(isolate) {}
virtual void Run() { void Run() override {
terminate_requested_semaphore.Wait(); terminate_requested_semaphore.Wait();
isolate_->TerminateExecution(); isolate_->TerminateExecution();
terminate_fired_semaphore.Signal(); terminate_fired_semaphore.Signal();
...@@ -3712,7 +3716,7 @@ class ArchiveRestoreThread : public v8::base::Thread, ...@@ -3712,7 +3716,7 @@ class ArchiveRestoreThread : public v8::base::Thread,
spawn_count_(spawn_count), spawn_count_(spawn_count),
break_count_(0) {} break_count_(0) {}
virtual void Run() { void Run() override {
v8::Locker locker(isolate_); v8::Locker locker(isolate_);
isolate_->Enter(); isolate_->Enter();
...@@ -3743,8 +3747,9 @@ class ArchiveRestoreThread : public v8::base::Thread, ...@@ -3743,8 +3747,9 @@ class ArchiveRestoreThread : public v8::base::Thread,
isolate_->Exit(); isolate_->Exit();
} }
void BreakProgramRequested(v8::Local<v8::Context> context, void BreakProgramRequested(
const std::vector<v8::debug::BreakpointId>&) { v8::Local<v8::Context> context,
const std::vector<v8::debug::BreakpointId>&) override {
auto stack_traces = v8::debug::StackTraceIterator::Create(isolate_); auto stack_traces = v8::debug::StackTraceIterator::Create(isolate_);
if (!stack_traces->Done()) { if (!stack_traces->Done()) {
v8::debug::Location location = stack_traces->GetSourceLocation(); v8::debug::Location location = stack_traces->GetSourceLocation();
......
...@@ -254,7 +254,7 @@ TEST(Unknown) { ...@@ -254,7 +254,7 @@ TEST(Unknown) {
class AbsentPropertyContext: public DeclarationContext { class AbsentPropertyContext: public DeclarationContext {
protected: protected:
virtual v8::Local<Integer> Query(Local<Name> key) { v8::Local<Integer> Query(Local<Name> key) override {
return v8::Local<Integer>(); return v8::Local<Integer>();
} }
}; };
...@@ -304,7 +304,7 @@ class AppearingPropertyContext: public DeclarationContext { ...@@ -304,7 +304,7 @@ class AppearingPropertyContext: public DeclarationContext {
AppearingPropertyContext() : state_(DECLARE) { } AppearingPropertyContext() : state_(DECLARE) { }
protected: protected:
virtual v8::Local<Integer> Query(Local<Name> key) { v8::Local<Integer> Query(Local<Name> key) override {
switch (state_) { switch (state_) {
case DECLARE: case DECLARE:
// Force declaration by returning that the // Force declaration by returning that the
...@@ -359,13 +359,13 @@ class ExistsInPrototypeContext: public DeclarationContext { ...@@ -359,13 +359,13 @@ class ExistsInPrototypeContext: public DeclarationContext {
public: public:
ExistsInPrototypeContext() { InitializeIfNeeded(); } ExistsInPrototypeContext() { InitializeIfNeeded(); }
protected: protected:
virtual v8::Local<Integer> Query(Local<Name> key) { v8::Local<Integer> Query(Local<Name> key) override {
// Let it seem that the property exists in the prototype object. // Let it seem that the property exists in the prototype object.
return Integer::New(isolate(), v8::None); return Integer::New(isolate(), v8::None);
} }
// Use the prototype as the holder for the interceptors. // Use the prototype as the holder for the interceptors.
virtual Local<ObjectTemplate> GetHolder(Local<FunctionTemplate> function) { Local<ObjectTemplate> GetHolder(Local<FunctionTemplate> function) override {
return function->PrototypeTemplate(); return function->PrototypeTemplate();
} }
}; };
...@@ -402,13 +402,13 @@ TEST(ExistsInPrototype) { ...@@ -402,13 +402,13 @@ TEST(ExistsInPrototype) {
class AbsentInPrototypeContext: public DeclarationContext { class AbsentInPrototypeContext: public DeclarationContext {
protected: protected:
virtual v8::Local<Integer> Query(Local<Name> key) { v8::Local<Integer> Query(Local<Name> key) override {
// Let it seem that the property is absent in the prototype object. // Let it seem that the property is absent in the prototype object.
return Local<Integer>(); return Local<Integer>();
} }
// Use the prototype as the holder for the interceptors. // Use the prototype as the holder for the interceptors.
virtual Local<ObjectTemplate> GetHolder(Local<FunctionTemplate> function) { Local<ObjectTemplate> GetHolder(Local<FunctionTemplate> function) override {
return function->PrototypeTemplate(); return function->PrototypeTemplate();
} }
}; };
...@@ -437,13 +437,13 @@ class ExistsInHiddenPrototypeContext: public DeclarationContext { ...@@ -437,13 +437,13 @@ class ExistsInHiddenPrototypeContext: public DeclarationContext {
} }
protected: protected:
virtual v8::Local<Integer> Query(Local<Name> key) { v8::Local<Integer> Query(Local<Name> key) override {
// Let it seem that the property exists in the hidden prototype object. // Let it seem that the property exists in the hidden prototype object.
return Integer::New(isolate(), v8::None); return Integer::New(isolate(), v8::None);
} }
// Install the hidden prototype after the global object has been created. // Install the hidden prototype after the global object has been created.
virtual void PostInitializeContext(Local<Context> context) { void PostInitializeContext(Local<Context> context) override {
Local<Object> global_object = context->Global(); Local<Object> global_object = context->Global();
Local<Object> hidden_proto = hidden_proto_->GetFunction(context) Local<Object> hidden_proto = hidden_proto_->GetFunction(context)
.ToLocalChecked() .ToLocalChecked()
...@@ -455,7 +455,7 @@ class ExistsInHiddenPrototypeContext: public DeclarationContext { ...@@ -455,7 +455,7 @@ class ExistsInHiddenPrototypeContext: public DeclarationContext {
} }
// Use the hidden prototype as the holder for the interceptors. // Use the hidden prototype as the holder for the interceptors.
virtual Local<ObjectTemplate> GetHolder(Local<FunctionTemplate> function) { Local<ObjectTemplate> GetHolder(Local<FunctionTemplate> function) override {
return hidden_proto_->InstanceTemplate(); return hidden_proto_->InstanceTemplate();
} }
......
...@@ -1025,9 +1025,9 @@ class TestJSONStream : public v8::OutputStream { ...@@ -1025,9 +1025,9 @@ class TestJSONStream : public v8::OutputStream {
TestJSONStream() : eos_signaled_(0), abort_countdown_(-1) {} TestJSONStream() : eos_signaled_(0), abort_countdown_(-1) {}
explicit TestJSONStream(int abort_countdown) explicit TestJSONStream(int abort_countdown)
: eos_signaled_(0), abort_countdown_(abort_countdown) {} : eos_signaled_(0), abort_countdown_(abort_countdown) {}
virtual ~TestJSONStream() = default; ~TestJSONStream() override = default;
virtual void EndOfStream() { ++eos_signaled_; } void EndOfStream() override { ++eos_signaled_; }
virtual WriteResult WriteAsciiChunk(char* buffer, int chars_written) { WriteResult WriteAsciiChunk(char* buffer, int chars_written) override {
if (abort_countdown_ > 0) --abort_countdown_; if (abort_countdown_ > 0) --abort_countdown_;
if (abort_countdown_ == 0) return kAbort; if (abort_countdown_ == 0) return kAbort;
CHECK_GT(chars_written, 0); CHECK_GT(chars_written, 0);
...@@ -1053,8 +1053,9 @@ class OneByteResource : public v8::String::ExternalOneByteStringResource { ...@@ -1053,8 +1053,9 @@ class OneByteResource : public v8::String::ExternalOneByteStringResource {
explicit OneByteResource(i::Vector<char> string) : data_(string.start()) { explicit OneByteResource(i::Vector<char> string) : data_(string.start()) {
length_ = string.length(); length_ = string.length();
} }
virtual const char* data() const { return data_; } const char* data() const override { return data_; }
virtual size_t length() const { return length_; } size_t length() const override { return length_; }
private: private:
const char* data_; const char* data_;
size_t length_; size_t length_;
...@@ -1217,13 +1218,13 @@ class TestStatsStream : public v8::OutputStream { ...@@ -1217,13 +1218,13 @@ class TestStatsStream : public v8::OutputStream {
TestStatsStream(const TestStatsStream& stream) TestStatsStream(const TestStatsStream& stream)
= default; = default;
virtual ~TestStatsStream() = default; ~TestStatsStream() override = default;
virtual void EndOfStream() { ++eos_signaled_; } void EndOfStream() override { ++eos_signaled_; }
virtual WriteResult WriteAsciiChunk(char* buffer, int chars_written) { WriteResult WriteAsciiChunk(char* buffer, int chars_written) override {
UNREACHABLE(); UNREACHABLE();
} }
virtual WriteResult WriteHeapStatsChunk(v8::HeapStatsUpdate* buffer, WriteResult WriteHeapStatsChunk(v8::HeapStatsUpdate* buffer,
int updates_written) { int updates_written) override {
++intervals_count_; ++intervals_count_;
CHECK(updates_written); CHECK(updates_written);
updates_written_ += updates_written; updates_written_ += updates_written;
...@@ -1528,7 +1529,7 @@ class TestActivityControl : public v8::ActivityControl { ...@@ -1528,7 +1529,7 @@ class TestActivityControl : public v8::ActivityControl {
total_(0), total_(0),
abort_count_(abort_count), abort_count_(abort_count),
reported_finish_(false) {} reported_finish_(false) {}
ControlOption ReportProgressValue(int done, int total) { ControlOption ReportProgressValue(int done, int total) override {
done_ = done; done_ = done;
total_ = total; total_ = total;
CHECK_LE(done_, total_); CHECK_LE(done_, total_);
...@@ -1605,7 +1606,7 @@ class EmbedderGraphBuilder : public v8::PersistentHandleVisitor { ...@@ -1605,7 +1606,7 @@ class EmbedderGraphBuilder : public v8::PersistentHandleVisitor {
public: public:
explicit Group(const char* name) : Node(name, 0) {} explicit Group(const char* name) : Node(name, 0) {}
// v8::EmbedderGraph::EmbedderNode // v8::EmbedderGraph::EmbedderNode
bool IsRootNode() { return true; } bool IsRootNode() override { return true; }
}; };
EmbedderGraphBuilder(v8::Isolate* isolate, v8::EmbedderGraph* graph) EmbedderGraphBuilder(v8::Isolate* isolate, v8::EmbedderGraph* graph)
...@@ -1779,7 +1780,7 @@ TEST(DeleteHeapSnapshot) { ...@@ -1779,7 +1780,7 @@ TEST(DeleteHeapSnapshot) {
class NameResolver : public v8::HeapProfiler::ObjectNameResolver { class NameResolver : public v8::HeapProfiler::ObjectNameResolver {
public: public:
virtual const char* GetName(v8::Local<v8::Object> object) { const char* GetName(v8::Local<v8::Object> object) override {
return "Global object name"; return "Global object name";
} }
}; };
...@@ -3057,7 +3058,7 @@ class EmbedderRootNode : public EmbedderNode { ...@@ -3057,7 +3058,7 @@ class EmbedderRootNode : public EmbedderNode {
public: public:
explicit EmbedderRootNode(const char* name) : EmbedderNode(name, 0) {} explicit EmbedderRootNode(const char* name) : EmbedderNode(name, 0) {}
// Graph::Node override. // Graph::Node override.
bool IsRootNode() { return true; } bool IsRootNode() override { return true; }
}; };
// Used to pass the global object to the BuildEmbedderGraph callback. // Used to pass the global object to the BuildEmbedderGraph callback.
......
...@@ -51,7 +51,7 @@ class DeoptimizeCodeThread : public v8::base::Thread { ...@@ -51,7 +51,7 @@ class DeoptimizeCodeThread : public v8::base::Thread {
context_(isolate, context), context_(isolate, context),
source_(trigger) {} source_(trigger) {}
void Run() { void Run() override {
v8::Locker locker(isolate_); v8::Locker locker(isolate_);
isolate_->Enter(); isolate_->Enter();
v8::HandleScope handle_scope(isolate_); v8::HandleScope handle_scope(isolate_);
...@@ -290,7 +290,7 @@ class KangarooThread : public v8::base::Thread { ...@@ -290,7 +290,7 @@ class KangarooThread : public v8::base::Thread {
isolate_(isolate), isolate_(isolate),
context_(isolate, context) {} context_(isolate, context) {}
void Run() { void Run() override {
{ {
v8::Locker locker(isolate_); v8::Locker locker(isolate_);
v8::Isolate::Scope isolate_scope(isolate_); v8::Isolate::Scope isolate_scope(isolate_);
...@@ -382,7 +382,7 @@ class JoinableThread { ...@@ -382,7 +382,7 @@ class JoinableThread {
: Thread(Options(joinable_thread->name_)), : Thread(Options(joinable_thread->name_)),
joinable_thread_(joinable_thread) {} joinable_thread_(joinable_thread) {}
virtual void Run() { void Run() override {
joinable_thread_->Run(); joinable_thread_->Run();
joinable_thread_->semaphore_.Signal(); joinable_thread_->semaphore_.Signal();
} }
...@@ -408,7 +408,7 @@ class IsolateLockingThreadWithLocalContext : public JoinableThread { ...@@ -408,7 +408,7 @@ class IsolateLockingThreadWithLocalContext : public JoinableThread {
isolate_(isolate) { isolate_(isolate) {
} }
virtual void Run() { void Run() override {
v8::Locker locker(isolate_); v8::Locker locker(isolate_);
v8::Isolate::Scope isolate_scope(isolate_); v8::Isolate::Scope isolate_scope(isolate_);
v8::HandleScope handle_scope(isolate_); v8::HandleScope handle_scope(isolate_);
...@@ -460,7 +460,7 @@ class IsolateNestedLockingThread : public JoinableThread { ...@@ -460,7 +460,7 @@ class IsolateNestedLockingThread : public JoinableThread {
explicit IsolateNestedLockingThread(v8::Isolate* isolate) explicit IsolateNestedLockingThread(v8::Isolate* isolate)
: JoinableThread("IsolateNestedLocking"), isolate_(isolate) { : JoinableThread("IsolateNestedLocking"), isolate_(isolate) {
} }
virtual void Run() { void Run() override {
v8::Locker lock(isolate_); v8::Locker lock(isolate_);
v8::Isolate::Scope isolate_scope(isolate_); v8::Isolate::Scope isolate_scope(isolate_);
v8::HandleScope handle_scope(isolate_); v8::HandleScope handle_scope(isolate_);
...@@ -508,7 +508,7 @@ class SeparateIsolatesLocksNonexclusiveThread : public JoinableThread { ...@@ -508,7 +508,7 @@ class SeparateIsolatesLocksNonexclusiveThread : public JoinableThread {
isolate1_(isolate1), isolate2_(isolate2) { isolate1_(isolate1), isolate2_(isolate2) {
} }
virtual void Run() { void Run() override {
v8::Locker lock(isolate1_); v8::Locker lock(isolate1_);
v8::Isolate::Scope isolate_scope(isolate1_); v8::Isolate::Scope isolate_scope(isolate1_);
v8::HandleScope handle_scope(isolate1_); v8::HandleScope handle_scope(isolate1_);
...@@ -556,7 +556,7 @@ class LockIsolateAndCalculateFibSharedContextThread : public JoinableThread { ...@@ -556,7 +556,7 @@ class LockIsolateAndCalculateFibSharedContextThread : public JoinableThread {
isolate_(isolate), isolate_(isolate),
context_(isolate, context) {} context_(isolate, context) {}
virtual void Run() { void Run() override {
v8::Locker lock(isolate_); v8::Locker lock(isolate_);
v8::Isolate::Scope isolate_scope(isolate_); v8::Isolate::Scope isolate_scope(isolate_);
v8::HandleScope handle_scope(isolate_); v8::HandleScope handle_scope(isolate_);
...@@ -577,7 +577,7 @@ class LockerUnlockerThread : public JoinableThread { ...@@ -577,7 +577,7 @@ class LockerUnlockerThread : public JoinableThread {
isolate_(isolate) { isolate_(isolate) {
} }
virtual void Run() { void Run() override {
isolate_->DiscardThreadSpecificMetadata(); // No-op isolate_->DiscardThreadSpecificMetadata(); // No-op
{ {
v8::Locker lock(isolate_); v8::Locker lock(isolate_);
...@@ -637,7 +637,7 @@ class LockTwiceAndUnlockThread : public JoinableThread { ...@@ -637,7 +637,7 @@ class LockTwiceAndUnlockThread : public JoinableThread {
isolate_(isolate) { isolate_(isolate) {
} }
virtual void Run() { void Run() override {
v8::Locker lock(isolate_); v8::Locker lock(isolate_);
v8::Isolate::Scope isolate_scope(isolate_); v8::Isolate::Scope isolate_scope(isolate_);
v8::HandleScope handle_scope(isolate_); v8::HandleScope handle_scope(isolate_);
...@@ -697,7 +697,7 @@ class LockAndUnlockDifferentIsolatesThread : public JoinableThread { ...@@ -697,7 +697,7 @@ class LockAndUnlockDifferentIsolatesThread : public JoinableThread {
isolate2_(isolate2) { isolate2_(isolate2) {
} }
virtual void Run() { void Run() override {
std::unique_ptr<LockIsolateAndCalculateFibSharedContextThread> thread; std::unique_ptr<LockIsolateAndCalculateFibSharedContextThread> thread;
v8::Locker lock1(isolate1_); v8::Locker lock1(isolate1_);
CHECK(v8::Locker::IsLocked(isolate1_)); CHECK(v8::Locker::IsLocked(isolate1_));
...@@ -760,7 +760,7 @@ class LockUnlockLockThread : public JoinableThread { ...@@ -760,7 +760,7 @@ class LockUnlockLockThread : public JoinableThread {
isolate_(isolate), isolate_(isolate),
context_(isolate, context) {} context_(isolate, context) {}
virtual void Run() { void Run() override {
v8::Locker lock1(isolate_); v8::Locker lock1(isolate_);
CHECK(v8::Locker::IsLocked(isolate_)); CHECK(v8::Locker::IsLocked(isolate_));
CHECK(!v8::Locker::IsLocked(CcTest::isolate())); CHECK(!v8::Locker::IsLocked(CcTest::isolate()));
...@@ -827,7 +827,7 @@ class LockUnlockLockDefaultIsolateThread : public JoinableThread { ...@@ -827,7 +827,7 @@ class LockUnlockLockDefaultIsolateThread : public JoinableThread {
: JoinableThread("LockUnlockLockDefaultIsolateThread"), : JoinableThread("LockUnlockLockDefaultIsolateThread"),
context_(CcTest::isolate(), context) {} context_(CcTest::isolate(), context) {}
virtual void Run() { void Run() override {
v8::Locker lock1(CcTest::isolate()); v8::Locker lock1(CcTest::isolate());
{ {
v8::Isolate::Scope isolate_scope(CcTest::isolate()); v8::Isolate::Scope isolate_scope(CcTest::isolate());
...@@ -914,7 +914,7 @@ class IsolateGenesisThread : public JoinableThread { ...@@ -914,7 +914,7 @@ class IsolateGenesisThread : public JoinableThread {
extension_names_(extension_names) extension_names_(extension_names)
{} {}
virtual void Run() { void Run() override {
v8::Isolate::CreateParams create_params; v8::Isolate::CreateParams create_params;
create_params.array_buffer_allocator = CcTest::array_buffer_allocator(); create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
v8::Isolate* isolate = v8::Isolate::New(create_params); v8::Isolate* isolate = v8::Isolate::New(create_params);
......
...@@ -263,9 +263,9 @@ class SimpleExternalString : public v8::String::ExternalStringResource { ...@@ -263,9 +263,9 @@ class SimpleExternalString : public v8::String::ExternalStringResource {
for (int i = 0; i < utf_source_.length(); ++i) for (int i = 0; i < utf_source_.length(); ++i)
utf_source_[i] = source[i]; utf_source_[i] = source[i];
} }
virtual ~SimpleExternalString() = default; ~SimpleExternalString() override = default;
virtual size_t length() const { return utf_source_.length(); } size_t length() const override { return utf_source_.length(); }
virtual const uint16_t* data() const { return utf_source_.start(); } const uint16_t* data() const override { return utf_source_.start(); }
private: private:
i::ScopedVector<uint16_t> utf_source_; i::ScopedVector<uint16_t> utf_source_;
}; };
......
...@@ -573,8 +573,8 @@ class ScriptResource : public v8::String::ExternalOneByteStringResource { ...@@ -573,8 +573,8 @@ class ScriptResource : public v8::String::ExternalOneByteStringResource {
ScriptResource(const char* data, size_t length) ScriptResource(const char* data, size_t length)
: data_(data), length_(length) { } : data_(data), length_(length) { }
const char* data() const { return data_; } const char* data() const override { return data_; }
size_t length() const { return length_; } size_t length() const override { return length_; }
private: private:
const char* data_; const char* data_;
......
...@@ -1821,9 +1821,9 @@ class SerializerOneByteResource ...@@ -1821,9 +1821,9 @@ class SerializerOneByteResource
public: public:
SerializerOneByteResource(const char* data, size_t length) SerializerOneByteResource(const char* data, size_t length)
: data_(data), length_(length), dispose_count_(0) {} : data_(data), length_(length), dispose_count_(0) {}
virtual const char* data() const { return data_; } const char* data() const override { return data_; }
virtual size_t length() const { return length_; } size_t length() const override { return length_; }
virtual void Dispose() { dispose_count_++; } void Dispose() override { dispose_count_++; }
int dispose_count() { return dispose_count_; } int dispose_count() { return dispose_count_; }
private: private:
...@@ -1837,11 +1837,11 @@ class SerializerTwoByteResource : public v8::String::ExternalStringResource { ...@@ -1837,11 +1837,11 @@ class SerializerTwoByteResource : public v8::String::ExternalStringResource {
public: public:
SerializerTwoByteResource(const char* data, size_t length) SerializerTwoByteResource(const char* data, size_t length)
: data_(AsciiToTwoByteString(data)), length_(length), dispose_count_(0) {} : data_(AsciiToTwoByteString(data)), length_(length), dispose_count_(0) {}
~SerializerTwoByteResource() { DeleteArray<const uint16_t>(data_); } ~SerializerTwoByteResource() override { DeleteArray<const uint16_t>(data_); }
virtual const uint16_t* data() const { return data_; } const uint16_t* data() const override { return data_; }
virtual size_t length() const { return length_; } size_t length() const override { return length_; }
virtual void Dispose() { dispose_count_++; } void Dispose() override { dispose_count_++; }
int dispose_count() { return dispose_count_; } int dispose_count() { return dispose_count_; }
private: private:
......
...@@ -105,9 +105,9 @@ static const int SUPER_DEEP_DEPTH = 80 * 1024; ...@@ -105,9 +105,9 @@ static const int SUPER_DEEP_DEPTH = 80 * 1024;
class Resource: public v8::String::ExternalStringResource { class Resource: public v8::String::ExternalStringResource {
public: public:
Resource(const uc16* data, size_t length): data_(data), length_(length) {} Resource(const uc16* data, size_t length): data_(data), length_(length) {}
~Resource() { i::DeleteArray(data_); } ~Resource() override { i::DeleteArray(data_); }
virtual const uint16_t* data() const { return data_; } const uint16_t* data() const override { return data_; }
virtual size_t length() const { return length_; } size_t length() const override { return length_; }
private: private:
const uc16* data_; const uc16* data_;
...@@ -119,9 +119,9 @@ class OneByteResource : public v8::String::ExternalOneByteStringResource { ...@@ -119,9 +119,9 @@ class OneByteResource : public v8::String::ExternalOneByteStringResource {
public: public:
OneByteResource(const char* data, size_t length) OneByteResource(const char* data, size_t length)
: data_(data), length_(length) {} : data_(data), length_(length) {}
~OneByteResource() { i::DeleteArray(data_); } ~OneByteResource() override { i::DeleteArray(data_); }
virtual const char* data() const { return data_; } const char* data() const override { return data_; }
virtual size_t length() const { return length_; } size_t length() const override { return length_; }
private: private:
const char* data_; const char* data_;
...@@ -1186,9 +1186,9 @@ class OneByteVectorResource : public v8::String::ExternalOneByteStringResource { ...@@ -1186,9 +1186,9 @@ class OneByteVectorResource : public v8::String::ExternalOneByteStringResource {
public: public:
explicit OneByteVectorResource(i::Vector<const char> vector) explicit OneByteVectorResource(i::Vector<const char> vector)
: data_(vector) {} : data_(vector) {}
virtual ~OneByteVectorResource() = default; ~OneByteVectorResource() override = default;
virtual size_t length() const { return data_.length(); } size_t length() const override { return data_.length(); }
virtual const char* data() const { return data_.start(); } const char* data() const override { return data_.start(); }
private: private:
i::Vector<const char> data_; i::Vector<const char> data_;
}; };
...@@ -1464,15 +1464,15 @@ TEST(Latin1IgnoreCase) { ...@@ -1464,15 +1464,15 @@ TEST(Latin1IgnoreCase) {
class DummyResource: public v8::String::ExternalStringResource { class DummyResource: public v8::String::ExternalStringResource {
public: public:
virtual const uint16_t* data() const { return nullptr; } const uint16_t* data() const override { return nullptr; }
virtual size_t length() const { return 1 << 30; } size_t length() const override { return 1 << 30; }
}; };
class DummyOneByteResource: public v8::String::ExternalOneByteStringResource { class DummyOneByteResource: public v8::String::ExternalOneByteStringResource {
public: public:
virtual const char* data() const { return nullptr; } const char* data() const override { return nullptr; }
virtual size_t length() const { return 1 << 30; } size_t length() const override { return 1 << 30; }
}; };
......
...@@ -166,7 +166,7 @@ class TerminatorThread : public v8::base::Thread { ...@@ -166,7 +166,7 @@ class TerminatorThread : public v8::base::Thread {
explicit TerminatorThread(i::Isolate* isolate) explicit TerminatorThread(i::Isolate* isolate)
: Thread(Options("TerminatorThread")), : Thread(Options("TerminatorThread")),
isolate_(reinterpret_cast<v8::Isolate*>(isolate)) {} isolate_(reinterpret_cast<v8::Isolate*>(isolate)) {}
void Run() { void Run() override {
semaphore->Wait(); semaphore->Wait();
CHECK(!isolate_->IsExecutionTerminating()); CHECK(!isolate_->IsExecutionTerminating());
isolate_->TerminateExecution(); isolate_->TerminateExecution();
...@@ -800,7 +800,7 @@ class TerminatorSleeperThread : public v8::base::Thread { ...@@ -800,7 +800,7 @@ class TerminatorSleeperThread : public v8::base::Thread {
: Thread(Options("TerminatorSlepperThread")), : Thread(Options("TerminatorSlepperThread")),
isolate_(isolate), isolate_(isolate),
sleep_ms_(sleep_ms) {} sleep_ms_(sleep_ms) {}
void Run() { void Run() override {
v8::base::OS::Sleep(v8::base::TimeDelta::FromMilliseconds(sleep_ms_)); v8::base::OS::Sleep(v8::base::TimeDelta::FromMilliseconds(sleep_ms_));
CHECK(!isolate_->IsExecutionTerminating()); CHECK(!isolate_->IsExecutionTerminating());
isolate_->TerminateExecution(); isolate_->TerminateExecution();
......
...@@ -43,7 +43,7 @@ class ThreadIdValidationThread : public v8::base::Thread { ...@@ -43,7 +43,7 @@ class ThreadIdValidationThread : public v8::base::Thread {
thread_to_start_(thread_to_start), thread_to_start_(thread_to_start),
semaphore_(semaphore) {} semaphore_(semaphore) {}
void Run() { void Run() override {
i::ThreadId thread_id = i::ThreadId::Current(); i::ThreadId thread_id = i::ThreadId::Current();
for (int i = 0; i < thread_no_; i++) { for (int i = 0; i < thread_no_; i++) {
CHECK(!(*refs_)[i].Equals(thread_id)); CHECK(!(*refs_)[i].Equals(thread_id));
......
...@@ -39,7 +39,7 @@ typedef std::vector<MockTraceObject*> MockTraceObjectList; ...@@ -39,7 +39,7 @@ typedef std::vector<MockTraceObject*> MockTraceObjectList;
class MockTracingController : public v8::TracingController { class MockTracingController : public v8::TracingController {
public: public:
MockTracingController() = default; MockTracingController() = default;
~MockTracingController() { ~MockTracingController() override {
for (size_t i = 0; i < trace_object_list_.size(); ++i) { for (size_t i = 0; i < trace_object_list_.size(); ++i) {
delete trace_object_list_[i]; delete trace_object_list_[i];
} }
...@@ -98,7 +98,7 @@ class MockTracingPlatform : public TestPlatform { ...@@ -98,7 +98,7 @@ class MockTracingPlatform : public TestPlatform {
// Now that it's completely constructed, make this the current platform. // Now that it's completely constructed, make this the current platform.
i::V8::SetPlatformForTesting(this); i::V8::SetPlatformForTesting(this);
} }
virtual ~MockTracingPlatform() = default; ~MockTracingPlatform() override = default;
v8::TracingController* GetTracingController() override { v8::TracingController* GetTracingController() override {
return &tracing_controller_; return &tracing_controller_;
......
...@@ -38,8 +38,8 @@ namespace internal { ...@@ -38,8 +38,8 @@ namespace internal {
class TraceExtension : public v8::Extension { class TraceExtension : public v8::Extension {
public: public:
TraceExtension() : v8::Extension("v8/trace", kSource) { } TraceExtension() : v8::Extension("v8/trace", kSource) { }
virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate( v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
v8::Isolate* isolate, v8::Local<v8::String> name); v8::Isolate* isolate, v8::Local<v8::String> name) override;
static void Trace(const v8::FunctionCallbackInfo<v8::Value>& args); static void Trace(const v8::FunctionCallbackInfo<v8::Value>& args);
static void JSTrace(const v8::FunctionCallbackInfo<v8::Value>& args); static void JSTrace(const v8::FunctionCallbackInfo<v8::Value>& args);
static void JSEntrySP(const v8::FunctionCallbackInfo<v8::Value>& args); static void JSEntrySP(const v8::FunctionCallbackInfo<v8::Value>& args);
......
...@@ -40,7 +40,7 @@ class MemoryAllocationPermissionsTest : public ::testing::Test { ...@@ -40,7 +40,7 @@ class MemoryAllocationPermissionsTest : public ::testing::Test {
#endif #endif
protected: protected:
virtual void SetUp() { void SetUp() override {
struct sigaction action; struct sigaction action;
action.sa_sigaction = SignalHandler; action.sa_sigaction = SignalHandler;
sigemptyset(&action.sa_mask); sigemptyset(&action.sa_mask);
...@@ -51,7 +51,7 @@ class MemoryAllocationPermissionsTest : public ::testing::Test { ...@@ -51,7 +51,7 @@ class MemoryAllocationPermissionsTest : public ::testing::Test {
#endif #endif
} }
virtual void TearDown() { void TearDown() override {
// Be a good citizen and restore the old signal handler. // Be a good citizen and restore the old signal handler.
sigaction(SIGSEGV, &old_action_, nullptr); sigaction(SIGSEGV, &old_action_, nullptr);
#if V8_OS_MACOSX #if V8_OS_MACOSX
......
...@@ -44,7 +44,7 @@ class FunctionalTest : public ::testing::Test { ...@@ -44,7 +44,7 @@ class FunctionalTest : public ::testing::Test {
public: public:
FunctionalTest() FunctionalTest()
: rng_(GetRandomSeedFromFlag(::v8::internal::FLAG_random_seed)) {} : rng_(GetRandomSeedFromFlag(::v8::internal::FLAG_random_seed)) {}
virtual ~FunctionalTest() = default; ~FunctionalTest() override = default;
RandomNumberGenerator* rng() { return &rng_; } RandomNumberGenerator* rng() { return &rng_; }
......
...@@ -30,7 +30,7 @@ class ThreadLocalStorageTest : public Thread, public ::testing::Test { ...@@ -30,7 +30,7 @@ class ThreadLocalStorageTest : public Thread, public ::testing::Test {
keys_[i] = Thread::CreateThreadLocalKey(); keys_[i] = Thread::CreateThreadLocalKey();
} }
} }
~ThreadLocalStorageTest() { ~ThreadLocalStorageTest() override {
for (size_t i = 0; i < arraysize(keys_); ++i) { for (size_t i = 0; i < arraysize(keys_); ++i) {
Thread::DeleteThreadLocalKey(keys_[i]); Thread::DeleteThreadLocalKey(keys_[i]);
} }
......
...@@ -71,7 +71,7 @@ class ThreadedRunner final : public base::Thread { ...@@ -71,7 +71,7 @@ class ThreadedRunner final : public base::Thread {
explicit ThreadedRunner(TestTask* task) explicit ThreadedRunner(TestTask* task)
: Thread(Options("runner thread")), task_(task) {} : Thread(Options("runner thread")), task_(task) {}
virtual void Run() { void Run() override {
task_->Run(); task_->Run();
delete task_; delete task_;
} }
......
...@@ -34,7 +34,7 @@ class MockHistogram : public Histogram { ...@@ -34,7 +34,7 @@ class MockHistogram : public Histogram {
class AggregatedMemoryHistogramTest : public ::testing::Test { class AggregatedMemoryHistogramTest : public ::testing::Test {
public: public:
AggregatedMemoryHistogramTest() : aggregated_(&mock_) {} AggregatedMemoryHistogramTest() : aggregated_(&mock_) {}
virtual ~AggregatedMemoryHistogramTest() = default; ~AggregatedMemoryHistogramTest() override = default;
void AddSample(double current_ms, double current_value) { void AddSample(double current_ms, double current_value) {
aggregated_.AddSample(current_ms, current_value); aggregated_.AddSample(current_ms, current_value);
...@@ -66,7 +66,7 @@ class RuntimeCallStatsTest : public TestWithNativeContext { ...@@ -66,7 +66,7 @@ class RuntimeCallStatsTest : public TestWithNativeContext {
stats()->Reset(); stats()->Reset();
} }
~RuntimeCallStatsTest() { ~RuntimeCallStatsTest() override {
// Disable RuntimeCallStats before tearing down the isolate to prevent // Disable RuntimeCallStats before tearing down the isolate to prevent
// printing the tests table. Comment the following line for debugging // printing the tests table. Comment the following line for debugging
// purposes. // purposes.
......
...@@ -15,7 +15,7 @@ const MachineRepresentation kSimd128 = MachineRepresentation::kSimd128; ...@@ -15,7 +15,7 @@ const MachineRepresentation kSimd128 = MachineRepresentation::kSimd128;
class RegisterConfigurationUnitTest : public ::testing::Test { class RegisterConfigurationUnitTest : public ::testing::Test {
public: public:
RegisterConfigurationUnitTest() = default; RegisterConfigurationUnitTest() = default;
virtual ~RegisterConfigurationUnitTest() = default; ~RegisterConfigurationUnitTest() override = default;
}; };
TEST_F(RegisterConfigurationUnitTest, BasicProperties) { TEST_F(RegisterConfigurationUnitTest, BasicProperties) {
......
...@@ -26,7 +26,7 @@ class ArrayBufferAllocator; ...@@ -26,7 +26,7 @@ class ArrayBufferAllocator;
class TestWithIsolate : public virtual ::testing::Test { class TestWithIsolate : public virtual ::testing::Test {
public: public:
TestWithIsolate(); TestWithIsolate();
virtual ~TestWithIsolate(); ~TestWithIsolate() override;
v8::Isolate* isolate() const { return v8_isolate(); } v8::Isolate* isolate() const { return v8_isolate(); }
...@@ -55,7 +55,7 @@ class TestWithIsolate : public virtual ::testing::Test { ...@@ -55,7 +55,7 @@ class TestWithIsolate : public virtual ::testing::Test {
class TestWithContext : public virtual v8::TestWithIsolate { class TestWithContext : public virtual v8::TestWithIsolate {
public: public:
TestWithContext(); TestWithContext();
virtual ~TestWithContext(); ~TestWithContext() override;
const Local<Context>& context() const { return v8_context(); } const Local<Context>& context() const { return v8_context(); }
const Local<Context>& v8_context() const { return context_; } const Local<Context>& v8_context() const { return context_; }
...@@ -79,7 +79,7 @@ class Factory; ...@@ -79,7 +79,7 @@ class Factory;
class TestWithIsolate : public virtual ::v8::TestWithIsolate { class TestWithIsolate : public virtual ::v8::TestWithIsolate {
public: public:
TestWithIsolate() = default; TestWithIsolate() = default;
virtual ~TestWithIsolate(); ~TestWithIsolate() override;
Factory* factory() const; Factory* factory() const;
Isolate* isolate() const { return i_isolate(); } Isolate* isolate() const { return i_isolate(); }
...@@ -97,7 +97,7 @@ class TestWithIsolate : public virtual ::v8::TestWithIsolate { ...@@ -97,7 +97,7 @@ class TestWithIsolate : public virtual ::v8::TestWithIsolate {
class TestWithZone : public virtual ::testing::Test { class TestWithZone : public virtual ::testing::Test {
public: public:
TestWithZone() : zone_(&allocator_, ZONE_NAME) {} TestWithZone() : zone_(&allocator_, ZONE_NAME) {}
virtual ~TestWithZone(); ~TestWithZone() override;
Zone* zone() { return &zone_; } Zone* zone() { return &zone_; }
...@@ -111,7 +111,7 @@ class TestWithZone : public virtual ::testing::Test { ...@@ -111,7 +111,7 @@ class TestWithZone : public virtual ::testing::Test {
class TestWithIsolateAndZone : public virtual TestWithIsolate { class TestWithIsolateAndZone : public virtual TestWithIsolate {
public: public:
TestWithIsolateAndZone() : zone_(&allocator_, ZONE_NAME) {} TestWithIsolateAndZone() : zone_(&allocator_, ZONE_NAME) {}
virtual ~TestWithIsolateAndZone(); ~TestWithIsolateAndZone() override;
Zone* zone() { return &zone_; } Zone* zone() { return &zone_; }
...@@ -126,7 +126,7 @@ class TestWithNativeContext : public virtual ::v8::TestWithContext, ...@@ -126,7 +126,7 @@ class TestWithNativeContext : public virtual ::v8::TestWithContext,
public virtual TestWithIsolate { public virtual TestWithIsolate {
public: public:
TestWithNativeContext() = default; TestWithNativeContext() = default;
virtual ~TestWithNativeContext(); ~TestWithNativeContext() override;
Handle<Context> native_context() const; Handle<Context> native_context() const;
......
...@@ -58,7 +58,7 @@ class ValueSerializerTest : public TestWithIsolate { ...@@ -58,7 +58,7 @@ class ValueSerializerTest : public TestWithIsolate {
isolate_ = reinterpret_cast<i::Isolate*>(isolate()); isolate_ = reinterpret_cast<i::Isolate*>(isolate());
} }
~ValueSerializerTest() { ~ValueSerializerTest() override {
// In some cases unhandled scheduled exceptions from current test produce // In some cases unhandled scheduled exceptions from current test produce
// that Context::New(isolate()) from next test's constructor returns NULL. // that Context::New(isolate()) from next test's constructor returns NULL.
// In order to prevent that, we added destructor which will clear scheduled // In order to prevent that, we added destructor which will clear scheduled
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment