Skip to content

Fix abort when overwriting existing properties via JS_SetPropertyFunctionList. - #572

Open
vanzomerenc wants to merge 1 commit into
bellard:masterfrom
vanzomerenc:master
Open

vanzomerenc wants to merge 1 commit into
bellard:masterfrom
vanzomerenc:master

Conversation

@vanzomerenc

Copy link
Copy Markdown

When JS_DefineAutoInitProperty encounters an existing property, fall back to JS_DefinePropertyValue.

One of the places where auto-init properties are used is JS_SetPropertyFunctionList, which user code may call on an existing object that may already have some of the properties in a given list.

…back to JS_DefinePropertyValue.

One of the places where auto-init properties are used is JS_SetPropertyFunctionList, which user
code may call on an existing object that may already have some of the properties in a given list.
@vanzomerenc
vanzomerenc marked this pull request as draft October 19, 2026 02:48
@vanzomerenc
vanzomerenc marked this pull request as ready for review October 19, 2026 03:53
@vanzomerenc

Copy link
Copy Markdown
Author

This change also means that calling some of the JS_AddIntrinsic[...] functions twice won’t abort anymore, but aborting in that case was probably a good thing because they clearly weren’t meant to be called twice.

I’m not sure what would be the best thing to do about that.

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