Skip to content

ffi: include SharedArrayBuffer in error message - #65735

Open
HoonDongKang wants to merge 1 commit into
nodejs:mainfrom
HoonDongKang:ffi-sharedArrayBuffer-err-msg
Open

ffi: include SharedArrayBuffer in error message#65735
HoonDongKang wants to merge 1 commit into
nodejs:mainfrom
HoonDongKang:ffi-sharedArrayBuffer-err-msg

Conversation

@HoonDongKang

Copy link
Copy Markdown
Contributor

ExportBytes() accepts SharedArrayBuffer inputs:

if (args[0]->IsArrayBuffer() || args[0]->IsSharedArrayBuffer() ||
    args[0]->IsArrayBufferView()) {

However, its invalid argument messages do not include SharedArrayBuffer in the list of supported input types.

- The first argument must be a Buffer, ArrayBuffer, or ArrayBufferView
+ The first argument must be a Buffer, ArrayBuffer, SharedArrayBuffer, or ArrayBufferView
  • Updated both invalid argument messages in ExportBytes().
  • Aligned the messages with the existing input validation behavior.

ExportBytes accepts SharedArrayBuffer inputs, but its invalid argument
messages do not list SharedArrayBuffer as a supported input type.

Signed-off-by: HoonDongKang <d159123@naver.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/ffi

@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 Sep 2, 2026
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.05%. Comparing base (1309975) to head (b7c5af9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/ffi/data.cc 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65735      +/-   ##
==========================================
+ Coverage   89.98%   90.05%   +0.06%     
==========================================
  Files         755      755              
  Lines      257282   257282              
  Branches    48776    48797      +21     
==========================================
+ Hits       231525   231700     +175     
+ Misses      16841    16680     -161     
+ Partials     8916     8902      -14     
Files with missing lines Coverage Δ
src/ffi/data.cc 75.71% <0.00%> (ø)

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

3 participants