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

doc: fix doc example for cctest #17355

Closed
wants to merge 1 commit into from

Conversation

mmarchini
Copy link
Contributor

cctest guide example wasn't working because of a few typos.

Checklist
Affected core subsystem(s)

doc

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Nov 27, 2017
@addaleax addaleax added fast-track PRs that do not need to wait for 48 hours to land. test Issues and PRs related to the tests. labels Nov 27, 2017
@@ -312,7 +312,7 @@ TEST_F(EnvTest, RunAtExit) {
v8::Local<v8::Context> context = v8::Context::New(isolate_);
node::IsolateData* isolateData = node::CreateIsolateData(isolate_, uv_default_loop());
Argv argv{"node", "-e", ";"};
auto env = Environment:CreateEnvironment(isolateData, context, 1, *argv, 2, *argv);
auto env = node::CreateEnvironment(isolateData, context, 1, *argv, 2, *argv);
node::AtExit(at_exit_callback);
Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM, could you also pass the env to the AtExit function:

node::AtExit(env, at_exit_callback);

Without this AtExit will use the thread local environment which will be different and cause a segment fault. I'll take a closer look into the exact cause of this, or let me know if you'd like to dig into it further.

cctest guide example wasn't working because of a few typos.
@mmarchini
Copy link
Contributor Author

@danbev env added to the AtExit function, thanks for pointing this out.

@maclover7
Copy link
Contributor

Landing...

@maclover7 maclover7 self-assigned this Nov 30, 2017
maclover7 pushed a commit that referenced this pull request Nov 30, 2017
cctest guide example wasn't working because of a few typos.

PR-URL: #17355
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
@maclover7
Copy link
Contributor

Thank you for your contribution, landed in c9d1704.
❤️ 💚 💙 💛 💜

@maclover7 maclover7 closed this Nov 30, 2017
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
cctest guide example wasn't working because of a few typos.

PR-URL: #17355
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
cctest guide example wasn't working because of a few typos.

PR-URL: #17355
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Dec 12, 2017
gibfahn pushed a commit that referenced this pull request Dec 19, 2017
cctest guide example wasn't working because of a few typos.

PR-URL: #17355
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
@gibfahn gibfahn mentioned this pull request Dec 20, 2017
gibfahn pushed a commit that referenced this pull request Dec 20, 2017
cctest guide example wasn't working because of a few typos.

PR-URL: #17355
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
@gibfahn gibfahn mentioned this pull request Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. fast-track PRs that do not need to wait for 48 hours to land. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants