-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 SYNC_CALL/SYNC_DEST_CALL in node_file.cc #207
Comments
@piscisaureus is it still an issue? f6556b6 was supposed to fix that |
@vkurchatkin Yes, still an issue. (A)SYNC_DEST_CALL is not supposed to be used for |
I was thinking: Using macros serves some purpose (support for multiple types of arguments), however it has some problems: makes things difficult to debug, a bit overspecialized in some ways, too. So, how about using lambda expressions (in addition to macros, or else replacing macros with template functions)? For instance, instead of having specialized macros, you don't need variadic macros if the function itself is called using a lambda expression, and error handling could also be handled with lambdas. The compiler can inline these and eliminate dead code, and it should be much easier to debug. Variadic macros still have limited toolchain support, and make debugging much harder, so it seems like it could be a good tradeoff (I realize this is unrelated to the issue here, but same code area, wanted thoughts on it since it might harm toolchain support a bit. We still aren't using lambdas in v8) |
I'm +1 for template functions. |
* Include a description for the error message * For rename, link, and symlink, include both the source and destination path in the error message. * Expose the destination path as the `dest` property on the error object. * Fix a bug where `ThrowUVException()` would incorrectly delegate to `Environment::TrowErrnoException()`. API impact: * Adds an extra overload for node::UVException() which takes 6 arguments. PR: nodejs#675 Fixes: nodejs#207 Closes: nodejs#293 Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
* Refcount for v8impl::Reference should be unsigned Add ```Reference::RefCount()``` and check the refcount value before trying to call ```Reference::Unref()``` to avoid underflowing the refcount. This allows us to continue returning an error from ```napi_reference_unref``` if it is called with a reference that already has refcount set to zero. * Add check for _refcount == 0 in Reference::Unref to avoid an underflow
* Refcount for v8impl::Reference should be unsigned Add ```Reference::RefCount()``` and check the refcount value before trying to call ```Reference::Unref()``` to avoid underflowing the refcount. This allows us to continue returning an error from ```napi_reference_unref``` if it is called with a reference that already has refcount set to zero. * Add check for _refcount == 0 in Reference::Unref to avoid an underflow
f16edd2
Something's odd here:
The text was updated successfully, but these errors were encountered: