Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move destructors to header so they can be trivially destructible #29379

Merged
merged 1 commit into from Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions shell/common/gin_helper/error_thrower.cc
Expand Up @@ -15,8 +15,6 @@ ErrorThrower::ErrorThrower(v8::Isolate* isolate) : isolate_(isolate) {}
// costly to invoke
ErrorThrower::ErrorThrower() : isolate_(v8::Isolate::GetCurrent()) {}

ErrorThrower::~ErrorThrower() = default;

void ErrorThrower::ThrowError(base::StringPiece err_msg) const {
Throw(v8::Exception::Error, err_msg);
}
Expand Down
3 changes: 1 addition & 2 deletions shell/common/gin_helper/error_thrower.h
Expand Up @@ -14,8 +14,7 @@ class ErrorThrower {
public:
explicit ErrorThrower(v8::Isolate* isolate);
ErrorThrower();

~ErrorThrower();
~ErrorThrower() = default;

void ThrowError(base::StringPiece err_msg) const;
void ThrowTypeError(base::StringPiece err_msg) const;
Expand Down
2 changes: 0 additions & 2 deletions shell/common/gin_helper/object_template_builder.cc
Expand Up @@ -11,8 +11,6 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(
v8::Local<v8::ObjectTemplate> templ)
: isolate_(isolate), template_(templ) {}

ObjectTemplateBuilder::~ObjectTemplateBuilder() = default;

ObjectTemplateBuilder& ObjectTemplateBuilder::SetImpl(
const base::StringPiece& name,
v8::Local<v8::Data> val) {
Expand Down
2 changes: 1 addition & 1 deletion shell/common/gin_helper/object_template_builder.h
Expand Up @@ -21,7 +21,7 @@ class ObjectTemplateBuilder {
public:
ObjectTemplateBuilder(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> templ);
~ObjectTemplateBuilder();
~ObjectTemplateBuilder() = default;

// It's against Google C++ style to return a non-const ref, but we take some
// poetic license here in order that all calls to Set() can be via the '.'
Expand Down