On node v9.4.0, node-gyp v3.6.2, nan@2.8.0, example 7_factory_wrap compiles but then coredumps.
If prototype is not set to a new one
tpl->PrototypeTemplate()->Set(Nan::New("plusOne").ToLocalChecked(),
Nan::New<v8::FunctionTemplate>(PlusOne)->GetFunction());
but only has the method added to it, as in 6_object_wrap
Nan::SetPrototypeMethod(tpl, "plusOne", PlusOne);
It works. But I assume the point was to demonstrate how the prototype can be created, so I didn't send a PR.
On node v9.4.0, node-gyp v3.6.2, nan@2.8.0, example 7_factory_wrap compiles but then coredumps.
If prototype is not set to a new one
but only has the method added to it, as in 6_object_wrap
It works. But I assume the point was to demonstrate how the prototype can be created, so I didn't send a PR.