Skip to content

node-api: reject detaching immutable arraybuffers - #67388

Open
fatihguzeldev wants to merge 1 commit into
nodejs:mainfrom
fatihguzeldev:napi-detach-immutable
Open

fatihguzeldev wants to merge 1 commit into
nodejs:mainfrom
fatihguzeldev:napi-detach-immutable

Conversation

@fatihguzeldev

Copy link
Copy Markdown
Contributor

napi_detach_arraybuffer() aborts when passed an immutable arraybuffer.
return napi_detachable_arraybuffer_expected instead.

Refs: #66346

return napi_detachable_arraybuffer_expected for immutable arraybuffers
instead of aborting when v8 rejects the detach operation.

Refs: nodejs#66346
Signed-off-by: Fatih Güzel <fatihguzeldev@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/node-api

@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. node-api Issues and PRs related to Node-API. labels Nov 10, 2026
@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.72%. Comparing base (2929073) to head (1bbb8f7).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/js_native_api_v8.cc 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67388      +/-   ##
==========================================
- Coverage   92.62%   90.72%   -1.91%     
==========================================
  Files         430      798     +368     
  Lines      196333   280076   +83743     
  Branches    29897    53886   +23989     
==========================================
+ Hits       181849   254089   +72240     
- Misses      14159    16276    +2117     
- Partials      325     9711    +9386     
Files with missing lines Coverage Δ
src/js_native_api_v8.cc 76.63% <0.00%> (ø)

... and 510 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. node-api Issues and PRs related to Node-API.

Projects

Status: Need Triage

Development

Successfully merging this pull request may close these issues.

2 participants