Skip to content

buffer: handle detached ArrayBuffer views#64504

Open
Archkon wants to merge 1 commit into
nodejs:mainfrom
Archkon:viewbuffer
Open

buffer: handle detached ArrayBuffer views#64504
Archkon wants to merge 1 commit into
nodejs:mainfrom
Archkon:viewbuffer

Conversation

@Archkon

@Archkon Archkon commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Propagate the detached state of an ArrayBufferView's backing buffer so buffer.isUtf8() and buffer.isAscii() throw ERR_INVALID_STATE for detached TypedArray and Buffer views.

Fixes: #64503

Propagate the detached state of an ArrayBufferView's backing buffer so
buffer.isUtf8() and buffer.isAscii() throw ERR_INVALID_STATE for
detached TypedArray and Buffer views.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
@nodejs-github-bot 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

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.25%. Comparing base (3ac95f2) to head (0cc6bf7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64504      +/-   ##
==========================================
+ Coverage   90.23%   90.25%   +0.01%     
==========================================
  Files         741      741              
  Lines      241692   241695       +3     
  Branches    45541    45550       +9     
==========================================
+ Hits       218097   218140      +43     
+ Misses      15113    15101      -12     
+ Partials     8482     8454      -28     
Files with missing lines Coverage Δ
src/util-inl.h 83.38% <100.00%> (+0.74%) ⬆️

... and 29 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

2 participants