| 34 | ~InnerObject() {} |
| 35 | |
| 36 | static NAN_METHOD(New) { |
| 37 | if (info.IsConstructCall()) { |
| 38 | double value = info[0]->IsNumber() ? To<double>(info[0]).FromJust() : 0; |
| 39 | InnerObject * obj = new InnerObject(value); |
| 40 | obj->Wrap(info.This()); |
| 41 | info.GetReturnValue().Set(info.This()); |
| 42 | } else { |
| 43 | const int argc = 1; |
| 44 | v8::Local<v8::Value> argv[argc] = {info[0]}; |
| 45 | v8::Local<v8::Function> cons = Nan::New(constructor()); |
| 46 | info.GetReturnValue().Set( |
| 47 | Nan::NewInstance(cons, argc, argv).ToLocalChecked()); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | static NAN_METHOD(GetValue) { |
| 52 | InnerObject* obj = ObjectWrap::Unwrap<InnerObject>(info.Holder()); |
nothing calls this directly
no test coverage detected