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

Bandaid for async hooks #738

Merged
merged 1 commit into from
Feb 22, 2018
Merged

Bandaid for async hooks #738

merged 1 commit into from
Feb 22, 2018

Conversation

kkoopa
Copy link
Collaborator

@kkoopa kkoopa commented Feb 22, 2018

Temporary fix disabling async_hooks for Node 8 below 8.6. Having some non-obvious issues with getting the older async_hooks API working. Addresses #735.

@kkoopa
Copy link
Collaborator Author

kkoopa commented Feb 22, 2018

To follow up on the issue I mentioned: The seemingly obvious fix of using node::EmitAsyncInit(isolate, resource, name) with the version of node::EmitAsyncInit for 8.5.0 results in this assertion:
../src/node.cc:1379:v8::MaybeLocal<v8::Value> node::MakeCallback(node::Environment*, v8::Local<v8::Value>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context): Assertion '(env->current_async_id()) == (asyncContext.async_id)' failed.

@Flarna
Copy link
Member

Flarna commented Feb 22, 2018

Not sure here but I fear this would result in issues if an addon is built with NodeJs >=8.6 but later used with NodeJs < 8.6 which is usually an allowed setup.

There are several projects which distribute pre-compiled binaries and they rely on one binary per major version.

@gavinservai
Copy link

I think it's time to merge this one in!

@nodejs nodejs locked as off-topic and limited conversation to collaborators Feb 22, 2018
@kkoopa
Copy link
Collaborator Author

kkoopa commented Feb 22, 2018

Not sure here but I fear this would result in issues if an addon is built with NodeJs >=8.6 but later used with NodeJs < 8.6 which is usually an allowed setup.

You may be right. I changed it to ignore versions below Node 9.0.

@kkoopa kkoopa merged commit 212bd2f into nodejs:master Feb 22, 2018
@nodejs nodejs unlocked this conversation Feb 22, 2018
@kkoopa kkoopa deleted the async_bandaid branch February 22, 2018 23:37
@kkoopa kkoopa mentioned this pull request Feb 22, 2018
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.

3 participants