summaryrefslogtreecommitdiff
path: root/src/node.h
diff options
context:
space:
mode:
authorShelley Vohr <shelley.vohr@gmail.com>2023-02-03 15:43:29 +0000
committerGitHub <noreply@github.com>2023-02-03 15:43:29 +0000
commit3aaeb309b3483bd13c90088b9604d07ba14d9c81 (patch)
treefb87bbfb62ab09e2ca1e42e52736282374032dcc /src/node.h
parent82ee78295ab6497dae861b0e5dae7294d44edb12 (diff)
downloadnode-new-3aaeb309b3483bd13c90088b9604d07ba14d9c81.tar.gz
src: allow embedder control of code generation policy
PR-URL: https://github.com/nodejs/node/pull/46368 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'src/node.h')
-rw-r--r--src/node.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/node.h b/src/node.h
index ca7b100311..8547df2d04 100644
--- a/src/node.h
+++ b/src/node.h
@@ -450,7 +450,8 @@ enum IsolateSettingsFlags {
MESSAGE_LISTENER_WITH_ERROR_LEVEL = 1 << 0,
DETAILED_SOURCE_POSITIONS_FOR_PROFILING = 1 << 1,
SHOULD_NOT_SET_PROMISE_REJECTION_CALLBACK = 1 << 2,
- SHOULD_NOT_SET_PREPARE_STACK_TRACE_CALLBACK = 1 << 3
+ SHOULD_NOT_SET_PREPARE_STACK_TRACE_CALLBACK = 1 << 3,
+ ALLOW_MODIFY_CODE_GENERATION_FROM_STRINGS_CALLBACK = 1 << 4,
};
struct IsolateSettings {
@@ -468,6 +469,8 @@ struct IsolateSettings {
v8::PromiseRejectCallback promise_reject_callback = nullptr;
v8::AllowWasmCodeGenerationCallback
allow_wasm_code_generation_callback = nullptr;
+ v8::ModifyCodeGenerationFromStringsCallback2
+ modify_code_generation_from_strings_callback = nullptr;
};
// Overriding IsolateSettings may produce unexpected behavior