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 v8::Signature, and other problems with Object example #8

Closed
paulharris opened this issue Dec 7, 2012 · 1 comment
Closed

Use v8::Signature, and other problems with Object example #8

paulharris opened this issue Dec 7, 2012 · 1 comment

Comments

@paulharris
Copy link

Problem 1)
You call ObjectWrap::Unwrap, which grabs the original pointer from This().
Shouldn't it be using Holder() and not This() ?

Problem 2)
Your 06_objects example is missing a critical part of the example - v8::Signature for type safety.
see line 489 here:
https://github.com/laverdet/node-fibers/blob/master/src/fibers.cc

Problem 3)
You create a Persistent global handle for constructor, and then do nothing with it.
This example also won't work for other v8 embedders who might be using v8 in multiple Isolates and threads.

Instead, it should be a plain Local handle (no global constructor handle), and use the Signature technique to ensure type safety.

@markate
Copy link

markate commented May 7, 2014

well done

@paulharris paulharris closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2022
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

No branches or pull requests

2 participants