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

Fix electron stability #176

Closed
McShelby opened this issue Nov 18, 2020 · 0 comments · Fixed by #177
Closed

Fix electron stability #176

McShelby opened this issue Nov 18, 2020 · 0 comments · Fixed by #177

Comments

@McShelby
Copy link
Contributor

Me again. As a follow up to #173 I wasn't able run this module in a stable fashion from inside electron. Besides immediate crashes I came as far a having a first successful render but a crash of the render process afterwards.

After reading a lot of documentation, source code, tutorials and howtos, I came to the conclusion that the used nan module to create the native addon is discouraged now and we better should use node-addon-api. This is because the latter is at least independend of any volatile interface like the v8 types, makes addon initialization safe for multithreaded environments and also reentrant, etc.

So I reworked the addon using that said module and now it works. So far so good.

But: I am using the latest version of node-addon-api (3.0.2 of 2020-09-18 at this point) and using an interface introduced in that release (namely Napi::Addon). I am not quite sure how backwards compatiblity is affected by my choice. Especially I could not find out the minimum required node version for my change.

Anyway, I'll prepare a PR. Feel free to ignore it if my choice isn't in your interest.

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 a pull request may close this issue.

1 participant