-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
src: pass along errors from object instantiations (part II) #25822
Conversation
CI: https://ci.nodejs.org/job/node-test-pull-request/20530/ (:white_check_mark:) |
Any volunteers for review? :) |
Maybe @gireeshpunathil @joyeecheung or somebody from @nodejs/workers? |
sure, will have a look! |
@@ -404,19 +410,19 @@ class FileHandle : public AsyncWrap, public StreamBase { | |||
FileHandle& operator=(const FileHandle&&) = delete; | |||
|
|||
private: | |||
FileHandle(Environment* env, v8::Local<v8::Object> obj, int fd); | |||
|
|||
// Synchronous close that emits a warning | |||
void Close(); | |||
void AfterClose(); | |||
|
|||
class CloseReq : public ReqWrap<uv_fs_t> { | |||
public: | |||
CloseReq(Environment* env, |
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.
any reason why CloseReq
does not follow the suit - i.e., a private
constructor and a static
factory?
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.
Just that it’s used at only one call site rather than multiple ones. I can add/use a factory constructor if you like?
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.
ok, I thought so. I think it is fine; doesn't look like anything beneficial of doing so.
Landed in d999b55...8b79c15 |
PR-URL: #25822 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: #25822 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: #25822 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: #25822 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: #25822 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: #25822 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: #25822 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: #25822 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This addresses the slightly harder-to-address cases of potentially failing
NewInstance()
calls.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes