Skip to content

Add JS_SealObject and JS_FreezeObject methods#819

Merged
saghul merged 1 commit intoquickjs-ng:masterfrom
qbs:seal
Jan 14, 2025
Merged

Add JS_SealObject and JS_FreezeObject methods#819
saghul merged 1 commit intoquickjs-ng:masterfrom
qbs:seal

Conversation

@ABBAPOH
Copy link
Copy Markdown
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.

Comment thread quickjs.c Outdated
Comment thread quickjs.h Outdated
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

ABBAPOH commented Jan 12, 2025

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

Comment thread quickjs.c Outdated
Comment thread quickjs.h Outdated
@ABBAPOH ABBAPOH force-pushed the seal branch 2 times, most recently from c638925 to fda984f Compare January 12, 2025 15:00
Comment thread quickjs.h Outdated
@ABBAPOH ABBAPOH changed the title Add JS_ObjectSeal method Add JS_SealObject and JS_FreezeObject methods Jan 12, 2025
Comment thread quickjs.h Outdated
Copy link
Copy Markdown
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
@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