Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iojs: introduce internal modules #848

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use cli arg instead
  • Loading branch information
vkurchatkin committed Mar 25, 2015
commit b293da97eba9a722409ba79972ac4325b6bccd83
3 changes: 3 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
@@ -3133,6 +3133,9 @@ static void ParseArgs(int* argc,
} else if (strncmp(arg, "--icu-data-dir=", 15) == 0) {
icu_data_dir = arg + 15;
#endif
} else if (strcmp(arg, "--expose-internals") == 0 ||
strcmp(arg, "--expose_internals") == 0) {
// consumed in js
} else {
// V8 option. Pass through as-is.
new_v8_argv[new_v8_argc] = arg;
6 changes: 5 additions & 1 deletion src/node.js
Original file line number Diff line number Diff line change
@@ -838,7 +838,11 @@
return NativeModule._source.hasOwnProperty(id);
};

if (process.env['NODE_EXPOSE_INTERNALS']) {
const EXPOSE_INTERNALS = process.execArgv.some(function(arg) {
return arg.match(/^--expose[-_]internals$/);
});

if (EXPOSE_INTERNALS) {
NativeModule.nonInternalExists = NativeModule.exists;

NativeModule.isInternal = function(id) {