fix: ensure that the node env is not bootstrapped before running inspector

This commit is contained in:
Samuel Attard 2019-07-23 12:41:48 -07:00 committed by Samuel Attard
parent 1d06f67672
commit cf2103d6e9

View file

@ -70,12 +70,14 @@ int NodeMain(int argc, char* argv[]) {
node::Environment* env = node::CreateEnvironment(
node::CreateIsolateData(gin_env.isolate(), loop, gin_env.platform()),
gin_env.context(), argc, argv, exec_argc, exec_argv);
gin_env.context(), argc, argv, exec_argc, exec_argv, false);
// Enable support for v8 inspector.
NodeDebugger node_debugger(env);
node_debugger.Start();
node::BootstrapEnvironment(env);
mate::Dictionary process(gin_env.isolate(), env->process_object());
#if defined(OS_WIN)
process.SetMethod("log", &ElectronBindings::Log);