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: pass context to Get() operations for child processes #16247

Merged
merged 3 commits into from
Oct 18, 2017

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Oct 17, 2017

Replace Get(key) with Get(context, key) in src/process_wrap.cc and src/spawn_sync.cc.

cc: @bnoordhuis per #15380 (comment)

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

src

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. child_process Issues and PRs related to the child_process subsystem. labels Oct 17, 2017
@@ -93,39 +93,46 @@ class ProcessWrap : public HandleWrap {
static void ParseStdioOptions(Environment* env,
Local<Object> js_options,
uv_process_options_t* options) {
Local<Context> context = env->isolate()->GetCurrentContext();
Copy link
Member

Choose a reason for hiding this comment

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

Does env->context() work? Ditto below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it does. Updated.

@joyeecheung
Copy link
Member

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

LGTM. While you're at it, you might also want to update the BooleanValue(), IntegerValue() and Int32Value() calls.

@cjihrig
Copy link
Contributor Author

cjihrig commented Oct 18, 2017

New CI with requested changes: https://ci.nodejs.org/job/node-test-pull-request/10819/

@cjihrig
Copy link
Contributor Author

cjihrig commented Oct 18, 2017

CI failures were unrelated. Looks like #16208 (comment), a known flake, and a Jenkins issue.

Refs: nodejs#15380
PR-URL: nodejs#16247
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Refs: nodejs#15380
PR-URL: nodejs#16247
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
In spawn_sync.cc, two consecutive loops are used to convert
data to strings, and compute the size of the data. This commit
merges the two independent loops into one.

Refs: nodejs#15380
PR-URL: nodejs#16247
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins
Copy link
Contributor

this does not land cleanly on 8.x

Would you be willing to backport @cjihrig ?

cjihrig added a commit to cjihrig/node that referenced this pull request Oct 24, 2017
Refs: nodejs#15380
PR-URL: nodejs#16247
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
cjihrig added a commit to cjihrig/node that referenced this pull request Oct 24, 2017
Refs: nodejs#15380
PR-URL: nodejs#16247
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
cjihrig added a commit to cjihrig/node that referenced this pull request Oct 24, 2017
In spawn_sync.cc, two consecutive loops are used to convert
data to strings, and compute the size of the data. This commit
merges the two independent loops into one.

Refs: nodejs#15380
PR-URL: nodejs#16247
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@cjihrig
Copy link
Contributor Author

cjihrig commented Oct 24, 2017

Backport in #16426

MylesBorins pushed a commit that referenced this pull request Oct 24, 2017
Backport-PR-URL: #16426
Refs: #15380
PR-URL: #16247
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 24, 2017
Backport-PR-URL: #16426
Refs: #15380
PR-URL: #16247
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 24, 2017
In spawn_sync.cc, two consecutive loops are used to convert
data to strings, and compute the size of the data. This commit
merges the two independent loops into one.

Backport-PR-URL: #16426
Refs: #15380
PR-URL: #16247
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 26, 2017
addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 26, 2017
addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 26, 2017
In spawn_sync.cc, two consecutive loops are used to convert
data to strings, and compute the size of the data. This commit
merges the two independent loops into one.

Refs: nodejs/node#15380
PR-URL: nodejs/node#16247
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins
Copy link
Contributor

Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
In spawn_sync.cc, two consecutive loops are used to convert
data to strings, and compute the size of the data. This commit
merges the two independent loops into one.

Refs: nodejs/node#15380
PR-URL: nodejs/node#16247
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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++. child_process Issues and PRs related to the child_process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants