Skip to content

Prevent Object.preventExtensions when a TypedArray has a resizable ArrayBuffer - #1695

Open
sr5434 wants to merge 1 commit into
quickjs-ng:masterfrom
sr5434:throw_error_prevent_extensions
Open

Prevent Object.preventExtensions when a TypedArray has a resizable ArrayBuffer#1695
sr5434 wants to merge 1 commit into
quickjs-ng:masterfrom
sr5434:throw_error_prevent_extensions

Conversation

@sr5434

@sr5434 sr5434 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #1691 by checking if the TypedArray's underlying ArrayBuffer is resizable, and throws an error if so. I also edited the error message when JS_PreventExtensions is false to be "Cannot prevent extensions", as this is more applicable to the widened set of reasons why the function might return false. Finally, I added a regression test.

@sr5434
sr5434 force-pushed the throw_error_prevent_extensions branch from 53741f3 to 23aecdf Compare August 25, 2026 14: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.

Object.preventExtensions succeeds on a TypedArray backed by a resizable ArrayBuffer

1 participant