Commit 756d12c1 authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[cleanup] Mark wasm methods in subclasses with override.

Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: If115a71b1c57eecdec7c57d3613a4f0bd90f2e66
Reviewed-on: https://chromium-review.googlesource.com/1226791Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55944}
parent 9edad5d5
...@@ -248,7 +248,7 @@ class LiftoffAssembler : public TurboAssembler { ...@@ -248,7 +248,7 @@ class LiftoffAssembler : public TurboAssembler {
}; };
LiftoffAssembler(); LiftoffAssembler();
~LiftoffAssembler(); ~LiftoffAssembler() override;
LiftoffRegister PopToRegister(LiftoffRegList pinned = {}); LiftoffRegister PopToRegister(LiftoffRegList pinned = {});
......
...@@ -2451,7 +2451,7 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2451,7 +2451,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
return true; return true;
} }
virtual void onFirstError() { void onFirstError() override {
this->end_ = this->pc_; // Terminate decoding loop. this->end_ = this->pc_; // Terminate decoding loop.
TRACE(" !%s\n", this->error_msg_.c_str()); TRACE(" !%s\n", this->error_msg_.c_str());
CALL_INTERFACE(OnFirstError); CALL_INTERFACE(OnFirstError);
......
...@@ -2296,7 +2296,7 @@ class AsyncCompileJob::CompileTask : public CancelableTask { ...@@ -2296,7 +2296,7 @@ class AsyncCompileJob::CompileTask : public CancelableTask {
job_(job), job_(job),
on_foreground_(on_foreground) {} on_foreground_(on_foreground) {}
~CompileTask() { ~CompileTask() override {
if (job_ != nullptr && on_foreground_) ResetPendingForegroundTask(); if (job_ != nullptr && on_foreground_) ResetPendingForegroundTask();
} }
......
...@@ -267,7 +267,7 @@ class ModuleDecoderImpl : public Decoder { ...@@ -267,7 +267,7 @@ class ModuleDecoderImpl : public Decoder {
} }
} }
virtual void onFirstError() { void onFirstError() override {
pc_ = end_; // On error, terminate section decoding loop. pc_ = end_; // On error, terminate section decoding loop.
} }
......
...@@ -212,7 +212,7 @@ class AsyncCompilationResolver : public i::wasm::CompilationResultResolver { ...@@ -212,7 +212,7 @@ class AsyncCompilationResolver : public i::wasm::CompilationResultResolver {
AsyncCompilationResolver(i::Isolate* isolate, i::Handle<i::JSPromise> promise) AsyncCompilationResolver(i::Isolate* isolate, i::Handle<i::JSPromise> promise)
: promise_(isolate->global_handles()->Create(*promise)) {} : promise_(isolate->global_handles()->Create(*promise)) {}
~AsyncCompilationResolver() { ~AsyncCompilationResolver() override {
i::GlobalHandles::Destroy(i::Handle<i::Object>::cast(promise_).location()); i::GlobalHandles::Destroy(i::Handle<i::Object>::cast(promise_).location());
} }
...@@ -248,7 +248,7 @@ class InstantiateModuleResultResolver ...@@ -248,7 +248,7 @@ class InstantiateModuleResultResolver
i::Handle<i::JSPromise> promise) i::Handle<i::JSPromise> promise)
: promise_(isolate->global_handles()->Create(*promise)) {} : promise_(isolate->global_handles()->Create(*promise)) {}
~InstantiateModuleResultResolver() { ~InstantiateModuleResultResolver() override {
i::GlobalHandles::Destroy(i::Handle<i::Object>::cast(promise_).location()); i::GlobalHandles::Destroy(i::Handle<i::Object>::cast(promise_).location());
} }
...@@ -284,7 +284,7 @@ class InstantiateBytesResultResolver ...@@ -284,7 +284,7 @@ class InstantiateBytesResultResolver
promise_(isolate_->global_handles()->Create(*promise)), promise_(isolate_->global_handles()->Create(*promise)),
module_(isolate_->global_handles()->Create(*module)) {} module_(isolate_->global_handles()->Create(*module)) {}
~InstantiateBytesResultResolver() { ~InstantiateBytesResultResolver() override {
i::GlobalHandles::Destroy(i::Handle<i::Object>::cast(promise_).location()); i::GlobalHandles::Destroy(i::Handle<i::Object>::cast(promise_).location());
i::GlobalHandles::Destroy(i::Handle<i::Object>::cast(module_).location()); i::GlobalHandles::Destroy(i::Handle<i::Object>::cast(module_).location());
} }
...@@ -349,7 +349,7 @@ class AsyncInstantiateCompileResultResolver ...@@ -349,7 +349,7 @@ class AsyncInstantiateCompileResultResolver
: isolate_->global_handles()->Create( : isolate_->global_handles()->Create(
*maybe_imports.ToHandleChecked())) {} *maybe_imports.ToHandleChecked())) {}
~AsyncInstantiateCompileResultResolver() { ~AsyncInstantiateCompileResultResolver() override {
i::GlobalHandles::Destroy(i::Handle<i::Object>::cast(promise_).location()); i::GlobalHandles::Destroy(i::Handle<i::Object>::cast(promise_).location());
if (!maybe_imports_.is_null()) { if (!maybe_imports_.is_null()) {
i::GlobalHandles::Destroy( i::GlobalHandles::Destroy(
......
...@@ -284,7 +284,7 @@ class InterruptThread : public v8::base::Thread { ...@@ -284,7 +284,7 @@ class InterruptThread : public v8::base::Thread {
WriteLittleEndianValue<int32_t>(ptr, interrupt_value_); WriteLittleEndianValue<int32_t>(ptr, interrupt_value_);
} }
virtual void Run() { void Run() override {
// Wait for the main thread to write the signal value. // Wait for the main thread to write the signal value.
int32_t val = 0; int32_t val = 0;
do { do {
......
...@@ -72,7 +72,7 @@ class BreakHandler : public debug::DebugDelegate { ...@@ -72,7 +72,7 @@ class BreakHandler : public debug::DebugDelegate {
: isolate_(isolate), expected_breaks_(expected_breaks) { : isolate_(isolate), expected_breaks_(expected_breaks) {
v8::debug::SetDebugDelegate(reinterpret_cast<v8::Isolate*>(isolate_), this); v8::debug::SetDebugDelegate(reinterpret_cast<v8::Isolate*>(isolate_), this);
} }
~BreakHandler() { ~BreakHandler() override {
// Check that all expected breakpoints have been hit. // Check that all expected breakpoints have been hit.
CHECK_EQ(count_, expected_breaks_.size()); CHECK_EQ(count_, expected_breaks_.size());
v8::debug::SetDebugDelegate(reinterpret_cast<v8::Isolate*>(isolate_), v8::debug::SetDebugDelegate(reinterpret_cast<v8::Isolate*>(isolate_),
...@@ -181,7 +181,7 @@ class CollectValuesBreakHandler : public debug::DebugDelegate { ...@@ -181,7 +181,7 @@ class CollectValuesBreakHandler : public debug::DebugDelegate {
: isolate_(isolate), expected_values_(expected_values) { : isolate_(isolate), expected_values_(expected_values) {
v8::debug::SetDebugDelegate(reinterpret_cast<v8::Isolate*>(isolate_), this); v8::debug::SetDebugDelegate(reinterpret_cast<v8::Isolate*>(isolate_), this);
} }
~CollectValuesBreakHandler() { ~CollectValuesBreakHandler() override {
v8::debug::SetDebugDelegate(reinterpret_cast<v8::Isolate*>(isolate_), v8::debug::SetDebugDelegate(reinterpret_cast<v8::Isolate*>(isolate_),
nullptr); nullptr);
} }
......
...@@ -117,7 +117,7 @@ class SharedEngineThread : public v8::base::Thread { ...@@ -117,7 +117,7 @@ class SharedEngineThread : public v8::base::Thread {
engine_(engine), engine_(engine),
callback_(callback) {} callback_(callback) {}
virtual void Run() { void Run() override {
SharedEngineIsolate isolate(engine_); SharedEngineIsolate isolate(engine_);
callback_(isolate); callback_(isolate);
} }
...@@ -146,10 +146,10 @@ class MockInstantiationResolver : public InstantiationResultResolver { ...@@ -146,10 +146,10 @@ class MockInstantiationResolver : public InstantiationResultResolver {
public: public:
explicit MockInstantiationResolver(Handle<Object>* out_instance) explicit MockInstantiationResolver(Handle<Object>* out_instance)
: out_instance_(out_instance) {} : out_instance_(out_instance) {}
virtual void OnInstantiationSucceeded(Handle<WasmInstanceObject> result) { void OnInstantiationSucceeded(Handle<WasmInstanceObject> result) override {
*out_instance_->location() = *result; *out_instance_->location() = *result;
} }
virtual void OnInstantiationFailed(Handle<Object> error_reason) { void OnInstantiationFailed(Handle<Object> error_reason) override {
UNREACHABLE(); UNREACHABLE();
} }
...@@ -162,13 +162,13 @@ class MockCompilationResolver : public CompilationResultResolver { ...@@ -162,13 +162,13 @@ class MockCompilationResolver : public CompilationResultResolver {
MockCompilationResolver(SharedEngineIsolate& isolate, MockCompilationResolver(SharedEngineIsolate& isolate,
Handle<Object>* out_instance) Handle<Object>* out_instance)
: isolate_(isolate), out_instance_(out_instance) {} : isolate_(isolate), out_instance_(out_instance) {}
virtual void OnCompilationSucceeded(Handle<WasmModuleObject> result) { void OnCompilationSucceeded(Handle<WasmModuleObject> result) override {
isolate_.isolate()->wasm_engine()->AsyncInstantiate( isolate_.isolate()->wasm_engine()->AsyncInstantiate(
isolate_.isolate(), isolate_.isolate(),
base::make_unique<MockInstantiationResolver>(out_instance_), result, base::make_unique<MockInstantiationResolver>(out_instance_), result,
{}); {});
} }
virtual void OnCompilationFailed(Handle<Object> error_reason) { void OnCompilationFailed(Handle<Object> error_reason) override {
UNREACHABLE(); UNREACHABLE();
} }
......
...@@ -23,7 +23,7 @@ void CrashOnPurpose() { *reinterpret_cast<volatile int*>(42); } ...@@ -23,7 +23,7 @@ void CrashOnPurpose() { *reinterpret_cast<volatile int*>(42); }
// on failures. // on failures.
class SignalHandlerFallbackTest : public ::testing::Test { class SignalHandlerFallbackTest : public ::testing::Test {
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);
...@@ -32,7 +32,7 @@ class SignalHandlerFallbackTest : public ::testing::Test { ...@@ -32,7 +32,7 @@ class SignalHandlerFallbackTest : public ::testing::Test {
sigaction(SIGBUS, &action, &old_bus_action_); sigaction(SIGBUS, &action, &old_bus_action_);
} }
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_segv_action_, nullptr); sigaction(SIGSEGV, &old_segv_action_, nullptr);
sigaction(SIGBUS, &old_bus_action_, nullptr); sigaction(SIGBUS, &old_bus_action_, nullptr);
......
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