Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Elm <elmdominic@gmx.net>2021-09-02 16:17:42 +0300
committerBradley Farias <bradley.meck@gmail.com>2021-09-10 18:54:39 +0300
commita9dd03b1ec89a75186f05967fc76ec0704050c36 (patch)
treedb9cd062535160d91bd45f178b9761259ca9e2dd /src/node.h
parenta42bd7e944ed422adb78f767c7a9b3187989234a (diff)
src: add option to disable loading native addons
PR-URL: https://github.com/nodejs/node/pull/39977 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'src/node.h')
-rw-r--r--src/node.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/node.h b/src/node.h
index 8622dff8425..e4a7de217e9 100644
--- a/src/node.h
+++ b/src/node.h
@@ -407,7 +407,13 @@ enum Flags : uint64_t {
// Set this flag to force hiding console windows when spawning child
// processes. This is usually used when embedding Node.js in GUI programs on
// Windows.
- kHideConsoleWindows = 1 << 5
+ kHideConsoleWindows = 1 << 5,
+ // Set this flag to disable loading native addons via `process.dlopen`.
+ // This environment flag is especially important for worker threads
+ // so that a worker thread can't load a native addon even if `execArgv`
+ // is overwritten and `--no-addons` is not specified but was specified
+ // for this Environment instance.
+ kNoNativeAddons = 1 << 6
};
} // namespace EnvironmentFlags