Chromium Code Reviews| Index: src/handles.h |
| diff --git a/src/handles.h b/src/handles.h |
| index 2c98209a1d5faf8047cda9e5be4a637a077057b4..831a301a5a75adc472e8f3578d1cf4bdc51d0b01 100644 |
| --- a/src/handles.h |
| +++ b/src/handles.h |
| @@ -91,11 +91,10 @@ class Handle final : public HandleBase { |
| public: |
| V8_INLINE explicit Handle(T** location = nullptr) |
| : HandleBase(reinterpret_cast<Object**>(location)) { |
| - Object* a = nullptr; |
| - T* b = nullptr; |
| - a = b; // Fake assignment to enforce type checks. |
| - USE(a); |
| + // Type check: |
| + DCHECK(T::IsObjectSubclass()); |
|
Michael Starzinger
2017/01/09 11:33:07
Are we allowed to use std::is_base_of (https://chr
marja
2017/01/09 11:48:36
Done.
|
| } |
| + |
| V8_INLINE explicit Handle(T* object) : Handle(object, object->GetIsolate()) {} |
| V8_INLINE Handle(T* object, Isolate* isolate) : HandleBase(object, isolate) {} |