summaryrefslogtreecommitdiff
path: root/node.gyp
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2016-03-22 21:05:54 -0400
committerFedor Indutny <fedor@indutny.com>2016-03-25 21:02:18 -0400
commit8363ede8551b7c30293901f79ea8204680bc9757 (patch)
treeac3493855b1f6c03f7eb339d0f1e04bf3d012a87 /node.gyp
parent53a95a5b12fbbfc8d465689e43aa77da32e5d0f3 (diff)
downloadnode-new-8363ede8551b7c30293901f79ea8204680bc9757.tar.gz
node: --no-browser-globals configure flag
Introduce `--no-browser-globals` configure flag. With this flag set, following globals won't be exported: - `setTimeout`, `clearTimeout`, `setInterval`, `clearInterval`, `setImmediate`, `clearImmediate` - `console` These are provided by the DOM implementation in browser, so the `--no-browser-globals` flag may be helpful when embedding node.js within chromium/webkit. Inspired-By: https://github.com/atom/node/commit/82e10ce94f3c90234dac187f04a47d4d357ffd31 PR-URL: https://github.com/nodejs/node/pull/5853 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
Diffstat (limited to 'node.gyp')
-rw-r--r--node.gyp4
1 files changed, 4 insertions, 0 deletions
diff --git a/node.gyp b/node.gyp
index 510e8d89cb..a8747a639e 100644
--- a/node.gyp
+++ b/node.gyp
@@ -5,6 +5,7 @@
'node_use_lttng%': 'false',
'node_use_etw%': 'false',
'node_use_perfctr%': 'false',
+ 'node_no_browser_globals%': 'false',
'node_has_winsdk%': 'false',
'node_shared_zlib%': 'false',
'node_shared_http_parser%': 'false',
@@ -367,6 +368,9 @@
'tools/msvs/genfiles/node_perfctr_provider.rc',
]
} ],
+ [ 'node_no_browser_globals=="true"', {
+ 'defines': [ 'NODE_NO_BROWSER_GLOBALS' ],
+ } ],
[ 'v8_postmortem_support=="true"', {
'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
'conditions': [