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

Can't run a node Process after invoking raw V8 #3

Closed
ericwlange opened this issue Dec 5, 2016 · 1 comment
Closed

Can't run a node Process after invoking raw V8 #3

ericwlange opened this issue Dec 5, 2016 · 1 comment

Comments

@ericwlange
Copy link
Member

Node requires some flags to be set prior to calling V8::Initialize(). If you start by running a node process and then subsequently create some contexts using raw v8, everything works fine. If you swap the order, the app will crash on node initialization.

@ericwlange ericwlange self-assigned this Dec 5, 2016
ericwlange added a commit that referenced this issue Dec 7, 2016
- Java side handled prototypes incorrectly, test was also incorrect -- fixed
- Added a default constructor for NodeInstance() in an attempt to find a fix for issue [#3], doesn't fix the problem yet
- Removed commented out code
- Moved prototype functions back from JSFunction to JSObject where they belong
ericwlange added a commit that referenced this issue Dec 7, 2016
Replaced usage of `v8::Lock` with `std::recursive_mutex`.  Once a v8 lock is
used, v8 requires it to be used everywhere, even in a separate isolate.  Since
node.js uses a single thread, it does not implement locking.  So if a lock is
introduced, node will crash.  We get the same value from `std::recursive_mutex`
so we use that instead.  Removed hack call of `NodeInstance init` as it has no
effect.
@ericwlange
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Release 0.1.0
Completed
Development

No branches or pull requests

1 participant