Skip to content

Conversation

legendecas
Copy link
Member

Context's default IsCodeGenerationFromStringsAllowed value can be
changed by v8 flag --disallow-code-generation-from-strings. Restore
the value at runtime when delegating the code generation validation to
node::ModifyCodeGenerationFromStrings.

The context's settings are serialized in the snapshot. Reset the setting
values to its default values before the serialization so that it can be
correctly re-initialized after deserialization at runtime.

Fixes: #44287

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Aug 21, 2022
@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 22, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 22, 2022
@nodejs-github-bot
Copy link
Collaborator

Context's default IsCodeGenerationFromStringsAllowed value can be
changed by v8 flag `--disallow-code-generation-from-strings`. Restore
the value at runtime when delegating the code generation validation to
`node::ModifyCodeGenerationFromStrings`.

The context's settings are serialized in the snapshot. Reset the setting
values to its default values before the serialization so that it can be
correctly re-initialized after deserialization at runtime.
@legendecas
Copy link
Member Author

Rebased and resolved conflicts.

@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 24, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 24, 2022
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@legendecas legendecas added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 28, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 28, 2022
@nodejs-github-bot nodejs-github-bot merged commit 3370e7c into nodejs:main Aug 28, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 3370e7c

@legendecas legendecas deleted the issue-44287 branch August 28, 2022 16:51
RafaelGSS pushed a commit that referenced this pull request Sep 5, 2022
Context's default IsCodeGenerationFromStringsAllowed value can be
changed by v8 flag `--disallow-code-generation-from-strings`. Restore
the value at runtime when delegating the code generation validation to
`node::ModifyCodeGenerationFromStrings`.

The context's settings are serialized in the snapshot. Reset the setting
values to its default values before the serialization so that it can be
correctly re-initialized after deserialization at runtime.

PR-URL: #44324
Fixes: #44287
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Fyko pushed a commit to Fyko/node that referenced this pull request Sep 15, 2022
Context's default IsCodeGenerationFromStringsAllowed value can be
changed by v8 flag `--disallow-code-generation-from-strings`. Restore
the value at runtime when delegating the code generation validation to
`node::ModifyCodeGenerationFromStrings`.

The context's settings are serialized in the snapshot. Reset the setting
values to its default values before the serialization so that it can be
correctly re-initialized after deserialization at runtime.

PR-URL: nodejs#44324
Fixes: nodejs#44287
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@juanarbol
Copy link
Member

Sadly, this is not landing cleanly on the v16.x branch; it depends on #43531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--disallow-code-generation-from-strings is ignored since versions 16.17 and 18.6
5 participants