-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
buffer: move process.binding('buffer') to internalBinding #22370
Conversation
node/test/parallel/test-buffer-bindingobj-no-zerofill.js Lines 29 to 34 in 3814534
The tests is failed now because the
How can we solve it? |
This is going to be a tricky one because the way that test is written, there is no other way to test that particular bit. One question is: do we actually need to test that particular case? |
I am +1 on removing that part from the test. |
@starkwang I believe this should be added to the allow list at here. |
e9c556d
to
b0984ae
Compare
Ideally, that entire test file should be replaced by an addon test. See conversation at 27e84ddd4e1#r19182129 and #11706. The test was written to cover the // |zeroFill| can be undefined when running inside an isolate where we
// do not own the ArrayBuffer allocator. Zero fill is always on in that case.
const zeroFill = bindingObj.zeroFill || [0]; If you can come up with an addon test that makes sure that code is run in the appropriate condition, then this rather inelegant way to test that bit of code can be removed. |
This needs a rebase. |
2c1292c
to
3870dcd
Compare
I've removed the tricky |
bf7a154
to
2eda676
Compare
@nodejs/buffer PTAL |
2eda676
to
5e88675
Compare
CI before landing: https://ci.nodejs.org/job/node-test-pull-request/17861/ |
This change is semver-major so it needs another member in TSC to approve. @nodejs/tsc PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Landed in ac23e65 |
PR-URL: #22370 Refs: #22160 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
PR-URL: #22370 Refs: #22160 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Refs: #22160
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes