-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
[async_wrap] backport of gc abort on destroy() fix on v4.x #10097
Conversation
The constructor and destructor shouldn't have been placed in the -inl.h file from the beginning. Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
This is how it's done everywhere else in core. Make it follow suit. Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Calling JS during GC is a no-no. So intead create a queue of all ids that need to have their destroy() callback called and call them later. Removed checking destroy() in test-async-wrap-uid because destroy() can be called after the 'exit' callback. Missing a reliable test to reproduce the issue that caused the FATAL_ERROR. Fixes: nodejs#8216 Fixes: nodejs#9465 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Environment* env = Environment::from_destroy_ids_idle_handle(handle); | ||
// None of the V8 calls done outside the HandleScope leak a handle. If this | ||
// changes in the future then the SealHandleScope wrapping the uv_run() | ||
// will catch this can cause the process to abort. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this comment outdated? There's a HandleScope right below it! :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh. seems to have snuck into patches for other versions. I'll remove it here, and remove it in the other branches in an upcoming patch.
landed in c0c5608...60883de |
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
async_wrap
Description of change
This is a backport of 517e3a6, cf5f4b8 and b49b496 to v4.x
There have been no reports yet of abort on v4.x. So I believe this one can run the usual LTS release path before landing.
CI: https://ci.nodejs.org/job/node-test-commit/6341/