chore: remove wasm CompileJSToWasmWrapperJob patch (#37782)

chore: remove wasm CompileJSToWasmWrapperJob patch
This commit is contained in:
Shelley Vohr
2023-04-01 14:47:54 +02:00
committed by GitHub
parent 6012172187
commit ef657bdc9d
4 changed files with 33 additions and 477 deletions

View File

@@ -37,3 +37,4 @@ src_allow_optional_isolation_termination_in_node.patch
test_mark_cpu_prof_tests_as_flaky_in_electron.patch
lib_fix_broadcastchannel_initialization_location.patch
fix_adapt_debugger_tests_for_upstream_v8_changes.patch
fix_increase_concurrency_in_v8platform_postjob.patch

View File

@@ -0,0 +1,32 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Fri, 31 Mar 2023 17:04:39 +0200
Subject: fix: increase concurrency in V8Platform::PostJob()
Refs https://chromium-review.googlesource.com/c/v8/v8/+/4347597/11
PostJob posts |job_task| to run in parallel, and so must call NotifyConcurrencyIncrease()
on the JobTask. In Node.js, the implementations of CreateJob and PostJob were identical,
meaning that PostJob calls could potentially never run all their tasks.
This was brought to our attention by the above linked V8 CL, which switched a call from
CreateJob to PostJob and caused a series of failures.
This should be upstreamed.
diff --git a/src/node_platform.cc b/src/node_platform.cc
index b3994c4398598c67c0029394d58e8f4dba032c5d..f004176d296c8a8ffbd12d44a917d9c7be7b6cf0 100644
--- a/src/node_platform.cc
+++ b/src/node_platform.cc
@@ -530,8 +530,10 @@ bool NodePlatform::FlushForegroundTasks(Isolate* isolate) {
std::unique_ptr<v8::JobHandle> NodePlatform::PostJob(v8::TaskPriority priority,
std::unique_ptr<v8::JobTask> job_task) {
- return v8::platform::NewDefaultJobHandle(
+ auto handle = v8::platform::NewDefaultJobHandle(
this, priority, std::move(job_task), NumberOfWorkerThreads());
+ handle->NotifyConcurrencyIncrease();
+ return handle;
}
std::unique_ptr<v8::JobHandle> NodePlatform::CreateJob(v8::TaskPriority priority,