chore: bump node to v12.16.1 (master) (#22168)
* chore: bump node in DEPS to v12.16.0 * Fixup asar support setup patch https://github.com/nodejs/node/pull/30862 * Fixup InternalCallbackScope patch https://github.com/nodejs/node/pull/30236 * Fixup GN buildfiles patch https://github.com/nodejs/node/pull/30755 * Fixup low-level hooks patch https://github.com/nodejs/node/pull/30466 * Fixup globals require patch https://github.com/nodejs/node/pull/31643 * Fixup process stream patch https://github.com/nodejs/node/pull/30862 * Fixup js2c modification patch https://github.com/nodejs/node/pull/30755 * Fixup internal fs override patch https://github.com/nodejs/node/pull/30610 * Fixup context-aware warn patch https://github.com/nodejs/node/pull/30336 * Fixup Node.js with ltcg config https://github.com/nodejs/node/pull/29388 * Fixup oaepLabel patch https://github.com/nodejs/node/pull/30917 * Remove redundant ESM test patch https://github.com/nodejs/node/pull/30997 * Remove redundant cli flag patch https://github.com/nodejs/node/pull/30466 * Update filenames.json * Remove macro generation in GN build files https://github.com/nodejs/node/pull/30755 * Fix some compilation errors upstream * Add uvwasi to deps https://github.com/nodejs/node/pull/30258 * Fix BoringSSL incompatibilities * Fixup linked module patch https://github.com/nodejs/node/pull/30274 * Add missing sources to GN uv build https://github.com/libuv/libuv/pull/2347 * Patch some uvwasi incompatibilities * chore: bump Node.js to v12.6.1 * Remove mark_arraybuffer_as_untransferable.patch https://github.com/nodejs/node/pull/30549 * Fix uvwasi build failure on win * Fixup --perf-prof cli option error * Fixup early cjs module loading * fix: initialize diagnostics properly https://github.com/nodejs/node/pull/30025 * Disable new esm syntax specs https://github.com/nodejs/node/pull/30219 * Fixup v8 weakref hook spec https://github.com/nodejs/node/pull/29874 * Fix async context timer issue * Disable monkey-patch-main spec It relies on https://github.com/nodejs/node/pull/29777, and we don't override prepareStackTrace. * Disable new tls specs https://github.com/nodejs/node/pull/23188 We don't support much of TLS owing to schisms between BoringSSL and OpenSSL. Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
360c1cad1b
commit
f965b13d74
25 changed files with 441 additions and 269 deletions
|
@ -74,6 +74,17 @@ void SetNodeCliFlags() {
|
|||
ProcessGlobalArgs(&args, nullptr, &errors, node::kDisallowedInEnvironment);
|
||||
}
|
||||
|
||||
// TODO(codebytere): expose this from Node.js itself?
|
||||
void HostCleanupFinalizationGroupCallback(
|
||||
v8::Local<v8::Context> context,
|
||||
v8::Local<v8::FinalizationGroup> group) {
|
||||
node::Environment* env = node::Environment::GetCurrent(context);
|
||||
if (env == nullptr) {
|
||||
return;
|
||||
}
|
||||
env->RegisterFinalizationGroupForCleanup(group);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace electron {
|
||||
|
@ -142,6 +153,14 @@ int NodeMain(int argc, char* argv[]) {
|
|||
|
||||
node::BootstrapEnvironment(env);
|
||||
|
||||
// TODO(codebytere): we shouldn't have to call this - upstream?
|
||||
env->InitializeDiagnostics();
|
||||
|
||||
// This is needed in order to enable v8 host weakref hooks.
|
||||
// TODO(codebytere): we shouldn't have to call this - upstream?
|
||||
gin_env.isolate()->SetHostCleanupFinalizationGroupCallback(
|
||||
HostCleanupFinalizationGroupCallback);
|
||||
|
||||
gin_helper::Dictionary process(gin_env.isolate(), env->process_object());
|
||||
#if defined(OS_WIN)
|
||||
process.SetMethod("log", &ElectronBindings::Log);
|
||||
|
@ -165,7 +184,15 @@ int NodeMain(int argc, char* argv[]) {
|
|||
versions.SetReadOnly(ELECTRON_PROJECT_NAME, ELECTRON_VERSION_STRING);
|
||||
}
|
||||
|
||||
node::LoadEnvironment(env);
|
||||
// TODO(codebytere): we should try to handle this upstream.
|
||||
{
|
||||
node::InternalCallbackScope callback_scope(
|
||||
env, v8::Local<v8::Object>(), {1, 0},
|
||||
node::InternalCallbackScope::kAllowEmptyResource |
|
||||
node::InternalCallbackScope::kSkipAsyncHooks);
|
||||
node::LoadEnvironment(env);
|
||||
}
|
||||
|
||||
v8::Isolate* isolate = env->isolate();
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue