Skip to content

test: verify ArrayBuffer ownership across native roundtrips - #1606

Open
mrousavy wants to merge 1 commit into
mainfrom
test/array-buffer-ownership
Open

test: verify ArrayBuffer ownership across native roundtrips#1606
mrousavy wants to merge 1 commit into
mainfrom
test/array-buffer-ownership

Conversation

@mrousavy

@mrousavy mrousavy commented Sep 5, 2026

Copy link
Copy Markdown
Member

The existing ArrayBuffer copy and bounce tests could pass when ownership was wrong because they checked only a byte copied before the roundtrip. Replace them with shared-memory and copy-isolation checks using the existing parameterized C++ and Swift/Kotlin Harness suite.

Cover JS buffers, native allocations, and native-backed buffers. Repeated bounces must share writes through the original and returned aliases; copies must preserve length and distinctive bytes while remaining independent after JS and native mutations. Reuse the existing native readers/writers and retain the JS identity test.

Validation:

  • Local iOS Debug build succeeded with Xcode 26.6.
  • Focused iOS Harness run: 14 passed (12 ownership cases plus 2 identity cases), on iPhone 17 Pro / iOS 26.5 using C++ and Swift.
  • Package build, example TypeScript check, targeted ESLint, and diff check passed.
  • Temporary assertion mutation check rejects aliased copies, copied bounces, and native writes to detached storage.
  • Android runtime validation was not run locally. CI is intentionally cancelled after PR creation to conserve Actions minutes.

@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
nitro-docs Skipped Skipped Sep 5, 2026 3:38pm UTC

Request Review

@mrousavy
mrousavy marked this pull request as ready for review September 5, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant