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

doc: buffer allocation methods throw for negative size #10151

Closed
wants to merge 1 commit into from

Conversation

joyeecheung
Copy link
Member

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

Description of change

Update the doc to match the current behavior.

Ref: #7079

@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations. labels Dec 6, 2016
A zero-length `Buffer` will be created if `size <= 0`.
Allocates a new `Buffer` of `size` bytes. If the `size` is larger than
[`buffer.kMaxLength`] or smaller than `0`, a [`RangeError`] will be thrown.
A zero-length `Buffer` will be created if `size === 0`.
Copy link
Contributor

Choose a reason for hiding this comment

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

if size is 0

Use English words consistently, as in the previous sentence.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing this out. Addressed.

@sam-github sam-github added the semver-major PRs that contain breaking changes and should be released in the next major version. label Dec 6, 2016
A zero-length `Buffer` will be created if `size <= 0`.
Allocates a new `Buffer` of `size` bytes. If the `size` is larger than
[`buffer.kMaxLength`] or smaller than 0, a [`RangeError`] will be thrown.
A zero-length `Buffer` will be created if `size === 0`.
Copy link
Contributor

Choose a reason for hiding this comment

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

is 0

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed. Sorry for pushing too fast before the review complete.

@sam-github
Copy link
Contributor

Why did you say issue is addressed? Did you forget to push? There are still 5 instances of === used in the doc text.

@addaleax addaleax added dont-land-on-v4.x and removed semver-major PRs that contain breaking changes and should be released in the next major version. labels Dec 6, 2016
@addaleax
Copy link
Member

addaleax commented Dec 6, 2016

@sam-github Why did you tag this semver-major? This matches current behaviour on v7.x.

@joyeecheung
Copy link
Member Author

Why did you say issue is addressed? Did you forget to push? There are still 5 instances of === used in the doc text.

Sorry, I pushed before the review was finished, so it's partially addressed.

@sam-github
Copy link
Contributor

@addaleax sorry, I thought this was changing the Buffer to throw

@joyeecheung
Copy link
Member Author

Ping. Is there anything stopping this from being landed?

@cjihrig
Copy link
Contributor

cjihrig commented Dec 9, 2016

It needs a CI run. So, https://ci.nodejs.org/job/node-test-pull-request/5341/

@addaleax
Copy link
Member

addaleax commented Dec 9, 2016

@cjihrig It’s a docs change :)

I think the only thing this has been waiting for were the mandatory 48 hours before landing but we might as well wait for CI to finish now that it’s started

@cjihrig
Copy link
Contributor

cjihrig commented Dec 9, 2016

@addaleax D'oh. I looked that it had been reviewed and saw there was no CI run, but didn't look at anything else. 😔

addaleax pushed a commit that referenced this pull request Dec 9, 2016
PR-URL: #10151
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@addaleax
Copy link
Member

addaleax commented Dec 9, 2016

Landed in bc335c0 (had to trim the commit subject line a bit to fit it into 50 characters)

Thanks for the ping!

@addaleax addaleax closed this Dec 9, 2016
@joyeecheung
Copy link
Member Author

I think the only thing this has been waiting for were the mandatory 48 hours before landing but we might as well wait for CI to finish now that it’s started

Hmm.. I had no idea that there is a mandatory 48 hours wait. Did a little bit of searching and turns out it is described in the onboarding guide, but I think the contributing guide should mention this as well?

Fishrock123 pushed a commit that referenced this pull request Dec 13, 2016
PR-URL: #10151
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@italoacasas italoacasas mentioned this pull request Dec 15, 2016
gibfahn pushed a commit that referenced this pull request Dec 22, 2016
Adds/mentions:
- Link to glossary
- Commit squashing and CI run
- 48/72 hour wait and PR review feature
- Extra notes section
- "Landed in <sha>" comment

PR-URL: #10202
Ref: #10151
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@joyeecheung joyeecheung deleted the fix-buffer-negative branch January 2, 2017 05:28
evanlucas pushed a commit that referenced this pull request Jan 3, 2017
Adds/mentions:
- Link to glossary
- Commit squashing and CI run
- 48/72 hour wait and PR review feature
- Extra notes section
- "Landed in <sha>" comment

PR-URL: #10202
Ref: #10151
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
evanlucas pushed a commit that referenced this pull request Jan 4, 2017
Adds/mentions:
- Link to glossary
- Commit squashing and CI run
- 48/72 hour wait and PR review feature
- Extra notes section
- "Landed in <sha>" comment

PR-URL: #10202
Ref: #10151
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
Adds/mentions:
- Link to glossary
- Commit squashing and CI run
- 48/72 hour wait and PR review feature
- Extra notes section
- "Landed in <sha>" comment

PR-URL: #10202
Ref: #10151
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
Adds/mentions:
- Link to glossary
- Commit squashing and CI run
- 48/72 hour wait and PR review feature
- Extra notes section
- "Landed in <sha>" comment

PR-URL: #10202
Ref: #10151
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
Adds/mentions:
- Link to glossary
- Commit squashing and CI run
- 48/72 hour wait and PR review feature
- Extra notes section
- "Landed in <sha>" comment

PR-URL: #10202
Ref: #10151
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
Adds/mentions:
- Link to glossary
- Commit squashing and CI run
- 48/72 hour wait and PR review feature
- Extra notes section
- "Landed in <sha>" comment

PR-URL: #10202
Ref: #10151
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
Adds/mentions:
- Link to glossary
- Commit squashing and CI run
- 48/72 hour wait and PR review feature
- Extra notes section
- "Landed in <sha>" comment

PR-URL: #10202
Ref: #10151
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
Adds/mentions:
- Link to glossary
- Commit squashing and CI run
- 48/72 hour wait and PR review feature
- Extra notes section
- "Landed in <sha>" comment

PR-URL: #10202
Ref: #10151
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 1, 2017
Adds/mentions:
- Link to glossary
- Commit squashing and CI run
- 48/72 hour wait and PR review feature
- Extra notes section
- "Landed in <sha>" comment

PR-URL: #10202
Ref: #10151
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants