| 28 | |
| 29 | template <class T> |
| 30 | static inline T* Unwrap(v8::Local<v8::Object> object) { |
| 31 | assert(!object.IsEmpty()); |
| 32 | assert(object->InternalFieldCount() > 0); |
| 33 | // Cast to ObjectWrap before casting to T. A direct cast from void |
| 34 | // to T won't work right when T has more than one base class. |
| 35 | void* ptr = GetInternalFieldPointer(object, 0); |
| 36 | ObjectWrap* wrap = static_cast<ObjectWrap*>(ptr); |
| 37 | return static_cast<T*>(wrap); |
| 38 | } |
| 39 | |
| 40 | |
| 41 | inline v8::Local<v8::Object> handle() const { |
nothing calls this directly
no test coverage detected