| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
|
cc @legendecas I presume this is incorrect then. |
Sorry, something went wrong.
| @@ -703,6 +700,18 @@ Maybe<void> InitializeContextRuntime(Local<Context> context) { | |||
| // to the runtime flags, propagate the value to the embedder data. | |||
| bool is_code_generation_from_strings_allowed = | |||
There was a problem hiding this comment.
The V8Option{} is removed in node_options.cc for --disallow-code-generation-from-strings, this will always be true. Because the flag is not set in V8.
Sorry, something went wrong.
There was a problem hiding this comment.
@legendecas this has been open for so long, does this need addressing?
Sorry, something went wrong.
My comment at #60371 (comment) was answering the question "why aren't v8 options supported for a worker thread?" and to most V8 options, we should not change them for a single worker. However, we declared a same name flag --disallow-code-generation-from-strings in Node.js (it was derived from the V8 flag). It is safe if we didn't use the APIs like V8::SetFlagsFromString, which sets the per-process V8 flag storage. In short, I think this PR should be good. |
Sorry, something went wrong.
There was a problem hiding this comment.
A side-effect of this could be add-ons using v8::Context::New API directly, and these contexts will always allow code generation regardless if --disallow-code-generation-from-strings is specified or not.
Sorry, something went wrong.
|
@LegendCas @addaleax can you take another look? This should be ready. |
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 78.94737% with 4 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #60549 +/- ##
==========================================
- Coverage 88.58% 88.52% -0.07%
==========================================
Files 704 703 -1
Lines 207777 208447 +670
Branches 40033 40196 +163
==========================================
+ Hits 184068 184525 +457
- Misses 15755 15936 +181
- Partials 7954 7986 +32
... and 133 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
|
Might need a format-cpp. |
Sorry, something went wrong.
|
Hi @mcollina , Since the PR is inactive for a while and it needs to have format-cpp. Would you still like to move this PR forward? If helpful, I'd be happy to assist with rebasing, formatting, or testing against current main. Thanks! |
Sorry, something went wrong.
Make --disallow-code-generation-from-strings a per-isolate option instead of a V8-only option, allowing it to be passed via worker execArgv. Fixes: nodejs#60371 Signed-off-by: Matteo Collina <hello@matteocollina.com>
Do not rely on IsCodeGenerationFromStringsAllowed() since V8Option{}
was removed for --disallow-code-generation-from-strings in node_options.cc.
Instead, determine the value directly from the Node.js option.
Refs: nodejs#60549 (comment)
PR-URL: nodejs#60549
Signed-off-by: Matteo Collina <hello@matteocollina.com>
| Back | FazBrowse Home | New Git URL |
Make --disallow-code-generation-from-strings a per-isolate option instead of a V8-only option, allowing it to be passed via worker execArgv.
Fixes: #60371