Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use FunctionTemplate instead of Function for adding methods to a class #150

Merged
merged 1 commit into from
Jan 8, 2017
Merged

Use FunctionTemplate instead of Function for adding methods to a class #150

merged 1 commit into from
Jan 8, 2017

Conversation

jedireza
Copy link
Contributor

@jedireza jedireza commented Dec 23, 2016

This is the commit from #123 that resolves #119. I fixed a minor merge conflict with master and added a doc comment for the fun::new_template function.

I also looked at the possibility of using Nan::SetMethod but it didn't seem like the right solution in this case.

I tested this on linux with node 4, 6, and 7.

Fixes #119, which was causing hard crashes on newer
versions of node.

Signed-off-by: Nathan Sobo <nathan@github.com>
@jedireza jedireza requested a review from dherman December 23, 2016 05:39
@jedireza
Copy link
Contributor Author

jedireza commented Jan 3, 2017

📟 @dherman

Copy link
Collaborator

@dherman dherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

AIUI this is just the way you're supposed to define methods on a JS class, and I was just doing it the wrong way before.

@dherman dherman merged commit 09928b1 into neon-bindings:master Jan 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v8::ObjectTemplate::Set() with non-primitive values is deprecated
2 participants