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

test: checks on napi factory wrap’s finalization #22612

Closed
wants to merge 1 commit into from

Conversation

legendecas
Copy link
Member

@legendecas legendecas commented Aug 31, 2018

Expect closing #22396

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

@nodejs-github-bot nodejs-github-bot added node-api Issues and PRs related to the Node-API. test Issues and PRs related to the tests. labels Aug 31, 2018
@BridgeAR
Copy link
Member

@nodejs/n-api PTAL

Copy link
Contributor

@gabrielschulhof gabrielschulhof left a comment

Choose a reason for hiding this comment

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

I'm actually not sure that we need this PR given that we already test for this in https://github.com/nodejs/node/blob/master/test/addons-napi/8_passing_wrapped/test.js.

@gabrielschulhof gabrielschulhof dismissed their stale review August 31, 2018 15:06

Change unneeded. See comment.

@gabrielschulhof
Copy link
Contributor

Nevertheless, I don't have any strong objections to landing this.

@gabrielschulhof
Copy link
Contributor

gabrielschulhof commented Aug 31, 2018

@legendecas I suppose for completeness you could instead, in https://github.com/nodejs/node/blob/master/test/addons-napi/8_passing_wrapped/test.js, change the storage of obj2 from const to let and then add

obj2 = null;
global.gc();
assert.strictEqual(addon.finalizeCount(), 2);

That would round out that test nicely.

@legendecas
Copy link
Member Author

@gabrielschulhof thanks for reviewing😁. amended.

It's true that finalizer has been checked in 8_passing_wrapped, however it could be more reasonable to take more checks.

@gabrielschulhof
Copy link
Contributor

@gabrielschulhof
Copy link
Contributor

@gabrielschulhof
Copy link
Contributor

Resumed again as CI: https://ci.nodejs.org/job/node-test-pull-request/17017/

@gabrielschulhof
Copy link
Contributor

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 5, 2018
@gabrielschulhof
Copy link
Contributor

@gabrielschulhof
Copy link
Contributor

@gabrielschulhof
Copy link
Contributor

@gabrielschulhof
Copy link
Contributor

@gabrielschulhof
Copy link
Contributor

Landed in 1cee085.

gabrielschulhof pushed a commit that referenced this pull request Sep 13, 2018
Fixes: #22396
PR-URL: #22612
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
targos pushed a commit that referenced this pull request Sep 14, 2018
Fixes: #22396
PR-URL: #22612
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
targos pushed a commit that referenced this pull request Sep 19, 2018
Fixes: #22396
PR-URL: #22612
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
targos pushed a commit that referenced this pull request Sep 20, 2018
Fixes: #22396
PR-URL: #22612
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. node-api Issues and PRs related to the Node-API. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants