chore: move destructors to header so they can be trivially destructible (#29379)
This commit is contained in:
parent
d74ad51826
commit
80a039ec40
4 changed files with 2 additions and 7 deletions
|
@ -15,8 +15,6 @@ ErrorThrower::ErrorThrower(v8::Isolate* isolate) : isolate_(isolate) {}
|
||||||
// costly to invoke
|
// costly to invoke
|
||||||
ErrorThrower::ErrorThrower() : isolate_(v8::Isolate::GetCurrent()) {}
|
ErrorThrower::ErrorThrower() : isolate_(v8::Isolate::GetCurrent()) {}
|
||||||
|
|
||||||
ErrorThrower::~ErrorThrower() = default;
|
|
||||||
|
|
||||||
void ErrorThrower::ThrowError(base::StringPiece err_msg) const {
|
void ErrorThrower::ThrowError(base::StringPiece err_msg) const {
|
||||||
Throw(v8::Exception::Error, err_msg);
|
Throw(v8::Exception::Error, err_msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,7 @@ class ErrorThrower {
|
||||||
public:
|
public:
|
||||||
explicit ErrorThrower(v8::Isolate* isolate);
|
explicit ErrorThrower(v8::Isolate* isolate);
|
||||||
ErrorThrower();
|
ErrorThrower();
|
||||||
|
~ErrorThrower() = default;
|
||||||
~ErrorThrower();
|
|
||||||
|
|
||||||
void ThrowError(base::StringPiece err_msg) const;
|
void ThrowError(base::StringPiece err_msg) const;
|
||||||
void ThrowTypeError(base::StringPiece err_msg) const;
|
void ThrowTypeError(base::StringPiece err_msg) const;
|
||||||
|
|
|
@ -11,8 +11,6 @@ ObjectTemplateBuilder::ObjectTemplateBuilder(
|
||||||
v8::Local<v8::ObjectTemplate> templ)
|
v8::Local<v8::ObjectTemplate> templ)
|
||||||
: isolate_(isolate), template_(templ) {}
|
: isolate_(isolate), template_(templ) {}
|
||||||
|
|
||||||
ObjectTemplateBuilder::~ObjectTemplateBuilder() = default;
|
|
||||||
|
|
||||||
ObjectTemplateBuilder& ObjectTemplateBuilder::SetImpl(
|
ObjectTemplateBuilder& ObjectTemplateBuilder::SetImpl(
|
||||||
const base::StringPiece& name,
|
const base::StringPiece& name,
|
||||||
v8::Local<v8::Data> val) {
|
v8::Local<v8::Data> val) {
|
||||||
|
|
|
@ -21,7 +21,7 @@ class ObjectTemplateBuilder {
|
||||||
public:
|
public:
|
||||||
ObjectTemplateBuilder(v8::Isolate* isolate,
|
ObjectTemplateBuilder(v8::Isolate* isolate,
|
||||||
v8::Local<v8::ObjectTemplate> templ);
|
v8::Local<v8::ObjectTemplate> templ);
|
||||||
~ObjectTemplateBuilder();
|
~ObjectTemplateBuilder() = default;
|
||||||
|
|
||||||
// It's against Google C++ style to return a non-const ref, but we take some
|
// 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 '.'
|
// poetic license here in order that all calls to Set() can be via the '.'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue