Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JS_SealObject and JS_FreezeObject methods #819

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

ABBAPOH
Copy link
Contributor

@ABBAPOH ABBAPOH commented Jan 11, 2025

For optimisation, we share some huge objects in different scripts and make them "const" to prevent user from accidentally changing them.

quickjs.c Outdated Show resolved Hide resolved
quickjs.h Outdated Show resolved Hide resolved
Copy link
Contributor

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still using JSValueConst

@ABBAPOH
Copy link
Contributor Author

ABBAPOH commented Jan 12, 2025

Apparently, calling "git add" prior to committing really helps^^

quickjs.c Show resolved Hide resolved
quickjs.h Outdated Show resolved Hide resolved
@ABBAPOH ABBAPOH force-pushed the seal branch 2 times, most recently from c638925 to fda984f Compare January 12, 2025 15:00
quickjs.h Outdated Show resolved Hide resolved
@ABBAPOH ABBAPOH changed the title Add JS_ObjectSeal method Add JS_SealObject and JS_FreezeObject methods Jan 12, 2025
quickjs.h Outdated Show resolved Hide resolved
Copy link
Contributor

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. New API so it'd be good to get sign-off from at least one other committer. @saghul?

@saghul saghul merged commit d02a4ba into quickjs-ng:master Jan 14, 2025
59 checks passed
@ABBAPOH ABBAPOH deleted the seal branch January 16, 2025 21:12
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.

4 participants