Skip to content

Commit

Permalink
tools: hide symbols for builtin JS files in binary
Browse files Browse the repository at this point in the history
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 <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
  • Loading branch information
addaleax committed May 14, 2018
1 parent 9c1c03e commit b795953
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/js2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,12 @@ def ReadMacros(lines):
namespace node {{
namespace {{
{definitions}
}} // anonymous namespace
v8::Local<v8::String> LoadersBootstrapperSource(Environment* env) {{
return internal_bootstrap_loaders_value.ToStringChecked(env->isolate());
}}
Expand Down

0 comments on commit b795953

Please sign in to comment.