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

src: rename req_wrap with -async/-sync suffix #19628

Closed

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Mar 27, 2018

This commit renames the req_wrap variable to use an -async/-sync
suffix to avoid cases where the variables were being shadowed.

Refs: #19614

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to the fs subsystem / file system. labels Mar 27, 2018
@danbev
Copy link
Contributor Author

danbev commented Mar 27, 2018

FSReqBase* req_wrap = GetReqWrap(env, args[2]);
if (req_wrap != nullptr) { // access(path, mode, req)
AsyncCall(env, req_wrap, args, "access", UTF8, AfterNoArgs,
FSReqBase* req_wrap_async = GetReqWrap(env, args[2]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized it would be even easier to understand if FSReqBase is FSReqWrapAsync..LGTM with or without that though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about the late reply on this. I don't think that is possible with as GetReqWrap can also return FSReqPromise.

This commit renames the req_wrap variable to use an -async/-sync
suffix to avoid cases where the variables were being shadowed.

Refs: nodejs#19614
@danbev danbev force-pushed the rename_req_wrap_to_async_and_sync branch from 3009260 to c195864 Compare April 3, 2018 09:28
@danbev
Copy link
Contributor Author

danbev commented Apr 3, 2018

@danbev
Copy link
Contributor Author

danbev commented Apr 3, 2018

node-test-commit-linuxone failure looks unrelated

console output:

make[2]: write error
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 1
gyp ERR! Process leaked file descriptors. See https://jenkins.io/redirect/troubleshooting/process-leaked-file-descriptors for more information
node-test-arm-fanned failure looks unrelated

console output:

06:23:58 not ok 40 parallel/test-cluster-master-kill
06:23:58   ---
06:23:58   duration_ms: 360.112
06:23:58   severity: fail
06:23:58   stack: |-
06:23:58     timeout
06:23:58   ...

@danbev
Copy link
Contributor Author

danbev commented Apr 3, 2018

Landed in ed86cc5.

@danbev danbev closed this Apr 3, 2018
danbev added a commit that referenced this pull request Apr 3, 2018
This commit renames the req_wrap variable to use an -async/-sync
suffix to avoid cases where the variables were being shadowed.

PR-URL: #19628
Refs: #19614
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@danbev danbev deleted the rename_req_wrap_to_async_and_sync branch April 3, 2018 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants