chore: bump node to v16.8.0 (main) (#30714)

* chore: bump node in DEPS to v16.8.0

* build: add option to hide console window

https://github.com/nodejs/node/pull/39712

* chore: fixup patch indices

* stream: duplexify

https://github.com/nodejs/node/pull/39519

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
electron-roller[bot] 2021-08-31 10:36:04 -04:00 committed by GitHub
parent 88ff3a6a9a
commit c1075debf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 44 additions and 61 deletions

View file

@ -450,13 +450,15 @@ node::Environment* NodeBindings::CreateEnvironment(
node::CreateIsolateData(context->GetIsolate(), uv_loop_, platform);
node::Environment* env;
uint64_t flags = node::EnvironmentFlags::kDefaultFlags |
node::EnvironmentFlags::kHideConsoleWindows;
if (browser_env_ != BrowserEnvironment::kBrowser) {
// Only one ESM loader can be registered per isolate -
// in renderer processes this should be blink. We need to tell Node.js
// not to register its handler (overriding blinks) in non-browser processes.
uint64_t flags = node::EnvironmentFlags::kDefaultFlags |
node::EnvironmentFlags::kNoRegisterESMLoader |
node::EnvironmentFlags::kNoInitializeInspector;
flags |= node::EnvironmentFlags::kNoRegisterESMLoader |
node::EnvironmentFlags::kNoInitializeInspector;
v8::TryCatch try_catch(context->GetIsolate());
env = node::CreateEnvironment(
isolate_data_, context, args, exec_args,
@ -470,7 +472,9 @@ node::Environment* NodeBindings::CreateEnvironment(
<< process_type;
}
} else {
env = node::CreateEnvironment(isolate_data_, context, args, exec_args);
env = node::CreateEnvironment(
isolate_data_, context, args, exec_args,
static_cast<node::EnvironmentFlags::Flags>(flags));
DCHECK(env);
}