Skip to content

Conversation

gabrielschulhof
Copy link
Contributor

Fixes: #14367

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

n-api

@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 Jan 23, 2018
@gabrielschulhof gabrielschulhof added the node-api Issues and PRs related to the Node-API. label Jan 23, 2018
src/node_api.cc Outdated
Copy link
Member

Choose a reason for hiding this comment

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

env.h has some convenience wrappers for accessing private methods (look for PER_ISOLATE_PRIVATE_SYMBOL_PROPERTIES), can we use those?

src/node_api.cc Outdated
Copy link
Member

Choose a reason for hiding this comment

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

We generally use snake_case for local variables and parameters

@gabrielschulhof gabrielschulhof force-pushed the use-private-for-wrap branch 3 times, most recently from 2465f08 to b6d330e Compare January 30, 2018 01:06
@gabrielschulhof
Copy link
Contributor Author

@addaleax I have addressed your review comments.

@BridgeAR
Copy link
Member

BridgeAR commented Feb 1, 2018

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

src/node_api.cc Outdated
Copy link
Member

Choose a reason for hiding this comment

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

s/prefix/suffix/?

src/node_api.cc Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Since you have a reference to the v8::Context, it would be more efficient to call Environment::GetCurrent(context) once and then call env->napi_env() directly.

Applies to a few more spots. I won't point them out individually.

src/node_api.cc Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Consider using an enum instead of a bool. More self-descriptive at the call site.

src/node_api.cc Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Space before :.

src/node_api.cc Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Can you line up the arguments?

@gabrielschulhof
Copy link
Contributor Author

@gabrielschulhof
Copy link
Contributor Author

I re-ran the node-test-commit-arm portion, and it passed: https://ci.nodejs.org/job/node-test-commit-arm/13589/

@gabrielschulhof
Copy link
Contributor Author

Landed in 1286923.

gabrielschulhof pushed a commit that referenced this pull request Feb 3, 2018
PR-URL: #18311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Fixes: #14367
@gabrielschulhof gabrielschulhof deleted the use-private-for-wrap branch February 3, 2018 01:27
MylesBorins pushed a commit that referenced this pull request Feb 20, 2018
PR-URL: #18311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Fixes: #14367
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
PR-URL: #18311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Fixes: #14367
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
PR-URL: #18311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Fixes: #14367
@MylesBorins MylesBorins mentioned this pull request Feb 21, 2018
@MylesBorins
Copy link
Contributor

Should this be backported to v8.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.

@gabrielschulhof
Copy link
Contributor Author

@MylesBorins this is part of #19265.

gabrielschulhof pushed a commit to gabrielschulhof/node that referenced this pull request Apr 12, 2018
PR-URL: nodejs#18311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Fixes: nodejs#14367
gabrielschulhof pushed a commit to gabrielschulhof/node that referenced this pull request Apr 16, 2018
PR-URL: nodejs#18311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Fixes: nodejs#14367
MylesBorins pushed a commit that referenced this pull request Apr 16, 2018
Backport-PR-URL: #19447
PR-URL: #18311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Fixes: #14367
@MylesBorins MylesBorins mentioned this pull request Apr 16, 2018
MylesBorins pushed a commit that referenced this pull request May 1, 2018
Backport-PR-URL: #19265
PR-URL: #18311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Fixes: #14367
@MylesBorins MylesBorins mentioned this pull request May 2, 2018
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
PR-URL: nodejs#18311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Fixes: nodejs#14367
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++. lib / src Issues and PRs related to general changes in the lib or src directory. node-api Issues and PRs related to the Node-API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using v8::Private::ForApi for N-API object wrapping

8 participants