Skip to content

Using noAssert and default offset #336

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

Closed
BridgeAR opened this issue Mar 12, 2018 · 2 comments
Closed

Using noAssert and default offset #336

BridgeAR opened this issue Mar 12, 2018 · 2 comments

Comments

@BridgeAR
Copy link

Hey, I tried to check if this code uses the noAssert argument when using the Node.js Buffer. I also tried to check if some Buffer#read(U)Int and Buffer#write(U)Int functions use the default offset (not passing through any offset will coerce undefined to zero).

The code was just not straight forward enough for me to determine this easily to open a fix if either would be the case.

If either is the case, please consider changing that. The support for those two dropped for the upcoming Node.js 10.x release.

Refs: nodejs/node#18395

@lutovich
Copy link
Contributor

Hi @BridgeAR,

Thanks a lot for the heads-up! We will verify Buffer methods usages.
I think relevant code should be in to buf.js file / NodeBuffer class and utf8.js.

@lutovich
Copy link
Contributor

Looks like we do not use noAssert and always specify offset for write functions. Read/write functions are only used in buf.js file. Mentioned PR addresses another deprecation - Buffer constructor.

Thanks again for reporting this problem @BridgeAR!

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

No branches or pull requests

2 participants