| Index: src/handles.cc
|
| diff --git a/src/handles.cc b/src/handles.cc
|
| index 3b1902e076ff397b238d3f2cf17eb99611160db0..e4562eaf8e5a31c240ffd005f4ffc336dd06d304 100644
|
| --- a/src/handles.cc
|
| +++ b/src/handles.cc
|
| @@ -12,6 +12,16 @@
|
| namespace v8 {
|
| namespace internal {
|
|
|
| +// Handles should be trivially copyable so that they can be efficiently passed
|
| +// by value. If they are not trivially copyable, they cannot be passed in
|
| +// registers.
|
| +static_assert(std::is_trivially_copyable<HandleBase>::value,
|
| + "HandleBase should be trivially copyable");
|
| +static_assert(std::is_trivially_copyable<Handle<Object>>::value,
|
| + "Handle<Object> should be trivially copyable");
|
| +static_assert(std::is_trivially_copyable<MaybeHandle<Object>>::value,
|
| + "MaybeHandle<Object> should be trivially copyable");
|
| +
|
| #ifdef DEBUG
|
| bool HandleBase::IsDereferenceAllowed(DereferenceCheckMode mode) const {
|
| DCHECK_NOT_NULL(location_);
|
|
|