From 4d6c81be67d7a68690d35310edfdf642d3c32d84 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 9 May 2018 19:00:57 +0200 Subject: [PATCH] tools: hide symbols for builtin JS files in binary Do not expose symbols like `node::internal_process_next_tick_value`, `node::internal_process_next_tick_key` in the created `node` binary by wrapping them in an anonymous namespace. --- tools/js2c.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/js2c.py b/tools/js2c.py index bcfc4764a97df5..8685722c13cdc5 100755 --- a/tools/js2c.py +++ b/tools/js2c.py @@ -183,8 +183,12 @@ def ReadMacros(lines): namespace node {{ +namespace {{ + {definitions} +}} // anonymous namespace + v8::Local LoadersBootstrapperSource(Environment* env) {{ return internal_bootstrap_loaders_value.ToStringChecked(env->isolate()); }}