FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

buffer: handle detached ArrayBuffer views by Archkon · Pull Request #64504 · nodejs/node · GitHub

/ node Public

buffer: handle detached ArrayBuffer views - #64504

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
Archkon:viewbuffer
Aug 5, 2026
Merged

buffer: handle detached ArrayBuffer views#64504
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
Archkon:viewbuffer

Conversation

Archkon commented Jul 14, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Fixes: #64503

nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Jul 14, 2026

codecov Bot commented Jul 14, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.13%. Comparing base (00917ba) to head (acd9bec).
⚠️ Report is 231 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64504      +/-   ##
==========================================
- Coverage   90.14%   90.13%   -0.01%     
==========================================
  Files         741      741              
  Lines      242076   242051      -25     
  Branches    45558    45543      -15     
==========================================
- Hits       218216   218184      -32     
- Misses      15385    15398      +13     
+ Partials     8475     8469       -6     
Files with missing lines Coverage Δ
src/node_buffer.cc 68.84% <100.00%> (+0.01%) ⬆️

... and 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

jasnell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

As mentioned in the thread, I'd actually rather we went the other direction to treat detached just as zero-length with these.

This comment was marked as spam.

This comment was marked as spam.

Treat detached ArrayBuffers and Buffer or TypedArray views backed by
them as zero-length inputs in buffer.isUtf8() and buffer.isAscii(). Both
functions now return true for these inputs, consistent with other empty
inputs.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>

This comment was marked as spam.

jasnell commented Jul 23, 2026

Copy link
Copy Markdown
Member

@Archkon ... please keep in mind that folks in the project are volunteers that are often quite busy. Pinging every couple of days for review is a bit rude. An occasional ping once in a while is fine but three pings within a week is excessive.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

avivkeller added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jul 31, 2026
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 31, 2026

Copy link
Copy Markdown
Collaborator

This comment was marked as spam.

avivkeller added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 5, 2026
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 5, 2026
nodejs-github-bot merged commit 6bab948 into nodejs:main Aug 5, 2026
74 checks passed

Copy link
Copy Markdown
Collaborator

Landed in 6bab948

Archkon deleted the viewbuffer branch August 5, 2026 03:52
aduh95 pushed a commit that referenced this pull request Aug 13, 2026
Treat detached ArrayBuffers and Buffer or TypedArray views backed by
them as zero-length inputs in buffer.isUtf8() and buffer.isAscii(). Both
functions now return true for these inputs, consistent with other empty
inputs.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: #64504
Fixes: #64503
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 25, 2026
Treat detached ArrayBuffers and Buffer or TypedArray views backed by
them as zero-length inputs in buffer.isUtf8() and buffer.isAscii(). Both
functions now return true for these inputs, consistent with other empty
inputs.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: #64504
Fixes: #64503
Reviewed-By: James M Snell <jasnell@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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 outstanding review comments, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

buffer: isUtf8 and isAscii accept detached TypedArray views

4 participants


Back | FazBrowse Home | New Git URL