Skip to content

Weakness #10

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

Merged
merged 4 commits into from
Jul 27, 2013
Merged

Weakness #10

merged 4 commits into from
Jul 27, 2013

Conversation

kkoopa
Copy link
Collaborator

@kkoopa kkoopa commented Jul 27, 2013

Added support for weak callbacks. Because the object argument has changed to a pointer, there is a need of some neutral way of accessing it. This is what NanWeakCallbackInit is supposed to achieve, clumsily. The THROW_ERROR macro was leaking out, so I tried to hide it more.

# define NanObjectWrapHandle(obj) obj->handle()
# define NanMakeWeak(handle, parameter, callback) \
handle.MakeWeak(nan_isolate, parameter, callback)
# define NanWeakCallback(type, name) \

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@kkoopa
Copy link
Collaborator Author

kkoopa commented Jul 27, 2013

This seems quite nice now.

@kkoopa kkoopa merged commit 9e4803d into 0.2.0 Jul 27, 2013
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.

2 participants