This can make node_is_initialized correctly set to true for applications
that use node::Init to embed iojs.
PR-URL: https://github.com/iojs/io.js/pull/225/
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
if (!use_debug_agent) {
RegisterDebugSignalHandler();
}
+
+ // We should set node_is_initialized here instead of in node::Start,
+ // otherwise embedders using node::Init to initialize everything will not be
+ // able to set it and native modules will not load for them.
+ node_is_initialized = true;
}
int code;
V8::Initialize();
- node_is_initialized = true;
// Fetch a reference to the main isolate, so we have a reference to it
// even when we need it to access it from another (debugger) thread.