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

Napi handle scope mismatch #17161

Closed

Conversation

neta-kedem
Copy link

#goodness_squad

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Nov 20, 2017
Copy link
Member

@TimothyGu TimothyGu left a comment

Choose a reason for hiding this comment

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

Congrats on your first contribution! Left a few comments, but other than those it should be good to go.


module.exports = require(realJSYaml);
module.exports = yaml;
Copy link
Member

Choose a reason for hiding this comment

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

Stray change.

Copy link
Member

Choose a reason for hiding this comment

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

This is happening when you run make doc … we really should get rid of these npm installs :(

Copy link
Member

Choose a reason for hiding this comment

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

Or .gitignore them, everyone making a PR yesterday ran into this

Copy link
Member

Choose a reason for hiding this comment

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

If I'm not totally mistaken, adding an already tracked file to .gitignore has no effect 😞 . Something like git update-index --assume-unchanged would work, but every developer has to run that locally, not really a solution for this problem.

src/node_api.cc Outdated
@@ -898,7 +898,8 @@ const char* error_messages[] = {nullptr,
"Unknown failure",
"An exception is pending",
"The async work item was cancelled",
"napi_escape_handle already called on scope"};
"napi_escape_handle already called on scope",
"invalid handle scope usage"};
Copy link
Member

Choose a reason for hiding this comment

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

Capitalize "invalid" in accordance with the rest of error_messages.

The one immediately before this one is an exception, as napi_escape_handle is the name of a function, and function names are case-sensitive.

Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

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

Thanks for doing this :)

@refack refack added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Nov 20, 2017
@refack
Copy link
Contributor

refack commented Nov 20, 2017

Hello @neta-kedem and תודה רבה.

@refack
Copy link
Contributor

refack commented Nov 20, 2017

@neta-kedem You might want to set you local git Name & e-mail according to https://help.github.com/articles/setting-your-commit-email-address-in-git/ so that GitHub will recognize that these commits are yours.

@neta-kedem
Copy link
Author

Thanks! I set them correctly and amended

@TimothyGu
Copy link
Member

#17161 (comment) still seems to be a problem after the latest amendment...

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

Changes to src/node_api.cc LGTM

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM once stray change to tools/doc/node_modules/js-yaml/index.js is removed

@neta-kedem
Copy link
Author

I undid the changes in the node_modules index file

@neta-kedem neta-kedem closed this Nov 21, 2017
@neta-kedem neta-kedem reopened this Nov 21, 2017
@aqrln
Copy link
Contributor

aqrln commented Nov 22, 2017

@aqrln aqrln added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 22, 2017
@mhdawson
Copy link
Member

mhdawson commented Nov 22, 2017

Neither of those tests should be affected by this change so believe we are good to land.

@mhdawson mhdawson self-assigned this Nov 22, 2017
@mhdawson
Copy link
Member

In the process of landing

@mhdawson
Copy link
Member

Landed as a4a9a3d

@mhdawson mhdawson closed this Nov 22, 2017
mhdawson pushed a commit that referenced this pull request Nov 22, 2017
PR-URL: #17161
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
@addaleax addaleax removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 28, 2017
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
PR-URL: #17161
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
PR-URL: #17161
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Dec 12, 2017
gibfahn pushed a commit that referenced this pull request Dec 19, 2017
PR-URL: #17161
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
@gibfahn gibfahn mentioned this pull request Dec 20, 2017
gibfahn pushed a commit that referenced this pull request Dec 20, 2017
PR-URL: #17161
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
@gibfahn gibfahn mentioned this pull request Dec 20, 2017
gabrielschulhof pushed a commit to gabrielschulhof/node that referenced this pull request Apr 16, 2018
PR-URL: nodejs#17161
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
MylesBorins pushed a commit that referenced this pull request Apr 16, 2018
Backport-PR-URL: #19447
PR-URL: #17161
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Apr 16, 2018
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++. code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.