Skip to content

7_factory_wrap coredumps #64

@amosonn

Description

@amosonn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions