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 <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>
diff --git a/src/node.cc b/src/node.cc
index f085874..0d059cc 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -3070,6 +3070,11 @@
     READONLY_PROPERTY(process, "throwDeprecation", True(env->isolate()));
   }
 
+#ifdef NODE_NO_BROWSER_GLOBALS
+  // configure --no-browser-globals
+  READONLY_PROPERTY(process, "_noBrowserGlobals", True(env->isolate()));
+#endif  // NODE_NO_BROWSER_GLOBALS
+
   // --prof-process
   if (prof_process) {
     READONLY_PROPERTY(process, "profProcess", True(env->isolate()));