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

Add ObjectReference test case #212

Closed
wants to merge 7 commits into from
Closed

Conversation

anisha-rohra
Copy link

No description provided.

@@ -0,0 +1,163 @@
/* ObjectReference cant be used to create references to Values that
Copy link
Member

Choose a reason for hiding this comment

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

Should be can as opposed to cant

assert.equal(rcount, 0);
binding.objectreference.unrefObjects("weak");
},
Error
Copy link
Member

Choose a reason for hiding this comment

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

If the first 2 asserts are supposed to pass I'm not sure this would catch failures of those asserts ? (Since they throw and overall the assert.throws does not check what Error occured ?

mhdawson
mhdawson previously approved these changes Jan 18, 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

@mhdawson mhdawson dismissed their stale review January 18, 2018 14:34

turns out tests fail.

@mhdawson
Copy link
Member

I see the following crash after the tests run when this new test is added:

Running test 'name'
Running test 'object/delete_property'
Running test 'object/get_property'
Running test 'object/has_own_property'
Running test 'object/has_property'
Running test 'object/object'
Running test 'object/set_property'
Running test 'promise'
Running test 'typedarray'
Running test 'objectwrap'
Running test 'objectreference'

All tests passed!
(node:60515) Warning: N-API is an experimental feature and could change at any time.
Tests aborted with SIGSEGV
npm ERR! Test failed.  See above for more details.
-sh-4.2$

If I revert this PR the failure goes away.

@anisha-rohra
Copy link
Author

@mhdawson when you get a chance, can you check if my recent changes still causes a segfault? Checking on macOS and an ubuntu machine, the segfault no longer occurs.

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

mhdawson pushed a commit that referenced this pull request Jul 30, 2018
PR-URL: #212
Reviewed-By: Michael Dawson <[email protected]>
@mhdawson
Copy link
Member

Landed as 4d92a60

@mhdawson mhdawson closed this Jul 30, 2018
kevindavies8 added a commit to kevindavies8/node-addon-api-Develop that referenced this pull request Aug 24, 2022
Marlyfleitas added a commit to Marlyfleitas/node-api-addon-Development that referenced this pull request Aug 26, 2022
wroy7860 added a commit to wroy7860/addon-api-benchmark-node that referenced this pull request Sep 19, 2022
johnfrench3 pushed a commit to johnfrench3/node-addon-api-git that referenced this pull request Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants