| 34 | } |
| 35 | |
| 36 | NAN_MODULE_INIT(IndexedInterceptor::Init) { |
| 37 | v8::Local<v8::FunctionTemplate> tpl = |
| 38 | Nan::New<v8::FunctionTemplate>(IndexedInterceptor::New); |
| 39 | indexedinterceptors_constructor.Reset(tpl); |
| 40 | tpl->SetClassName(Nan::New("IndexedInterceptor").ToLocalChecked()); |
| 41 | tpl->InstanceTemplate()->SetInternalFieldCount(1); |
| 42 | v8::Local<v8::ObjectTemplate> inst = tpl->InstanceTemplate(); |
| 43 | |
| 44 | SetIndexedPropertyHandler( |
| 45 | inst |
| 46 | , IndexedInterceptor::PropertyGetter |
| 47 | , IndexedInterceptor::PropertySetter |
| 48 | , IndexedInterceptor::PropertyQuery |
| 49 | , IndexedInterceptor::PropertyDeleter |
| 50 | , IndexedInterceptor::PropertyEnumerator); |
| 51 | |
| 52 | v8::Local<v8::Function> createnew = |
| 53 | Nan::GetFunction(Nan::New<v8::FunctionTemplate>(CreateNew)) |
| 54 | .ToLocalChecked(); |
| 55 | Set(target, Nan::New("create").ToLocalChecked(), createnew); |
| 56 | } |
| 57 | |
| 58 | v8::Local<v8::Value> IndexedInterceptor::NewInstance () { |
| 59 | EscapableHandleScope scope; |
nothing calls this directly
no test coverage detected