Skip to content

Commit b795953

Browse files
committed
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. PR-URL: #20634 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
1 parent 9c1c03e commit b795953

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/js2c.py

+4
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,12 @@ def ReadMacros(lines):
183183
184184
namespace node {{
185185
186+
namespace {{
187+
186188
{definitions}
187189
190+
}} // anonymous namespace
191+
188192
v8::Local<v8::String> LoadersBootstrapperSource(Environment* env) {{
189193
return internal_bootstrap_loaders_value.ToStringChecked(env->isolate());
190194
}}

0 commit comments

Comments
 (0)