diff options
| author | Gus Caplan <me@gus.host> | 2018-02-26 14:29:41 -0600 |
|---|---|---|
| committer | Gus Caplan <me@gus.host> | 2018-03-12 14:39:21 -0500 |
| commit | cb5f358ee7461f191db8c88e0af26023558f5232 (patch) | |
| tree | f23e34d68a09fb05d044f00bd795575db63a9370 /src/node_contextify.h | |
| parent | a03c90b661f69200f124718b56b55b0cb3506c71 (diff) | |
| download | node-new-cb5f358ee7461f191db8c88e0af26023558f5232.tar.gz | |
vm: add code generation options
Adds options to a VM Context to disable code generation from strings
(such as eval or new Function) and WASM code generation
(WebAssembly.compile).
PR-URL: https://github.com/nodejs/node/pull/19016
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Diffstat (limited to 'src/node_contextify.h')
| -rw-r--r-- | src/node_contextify.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node_contextify.h b/src/node_contextify.h index b25e1a75d4..cf3e6452fd 100644 --- a/src/node_contextify.h +++ b/src/node_contextify.h @@ -24,6 +24,9 @@ class ContextifyContext { v8::Local<v8::Object> sandbox_obj, v8::Local<v8::Object> options_obj); static void Init(Environment* env, v8::Local<v8::Object> target); + static bool AllowWasmCodeGeneration( + v8::Local<v8::Context> context, v8::Local<v8::String>); + static ContextifyContext* ContextFromContextifiedSandbox( Environment* env, const v8::Local<v8::Object>& sandbox); |
