fix: add missing cpp_heap
to Node.js worker CreateParams
(#46176)
fix: add missing cpp_heap to Node.js worker CreateParams Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
4b0d49898f
commit
7f85c85b71
1 changed files with 12 additions and 2 deletions
|
@ -165,10 +165,20 @@ index 4119ac1b002681d39711eac810ca2fcc2702ffc7..790347056cde949ffe6cf8498a7eca0c
|
||||||
|
|
||||||
ExitCode NodeMainInstance::Run() {
|
ExitCode NodeMainInstance::Run() {
|
||||||
diff --git a/src/node_worker.cc b/src/node_worker.cc
|
diff --git a/src/node_worker.cc b/src/node_worker.cc
|
||||||
index 1fc3774948dae3c0aae7d2aef563e18ecd4243a3..a610ee24ff18bddc3849aec3a43c2037b9ab5d53 100644
|
index 1fc3774948dae3c0aae7d2aef563e18ecd4243a3..9d35cbf3dff538f38e8d5b8660d40c1fbaa56474 100644
|
||||||
--- a/src/node_worker.cc
|
--- a/src/node_worker.cc
|
||||||
+++ b/src/node_worker.cc
|
+++ b/src/node_worker.cc
|
||||||
@@ -230,13 +230,8 @@ class WorkerThreadData {
|
@@ -162,6 +162,9 @@ class WorkerThreadData {
|
||||||
|
SetIsolateCreateParamsForNode(¶ms);
|
||||||
|
w->UpdateResourceConstraints(¶ms.constraints);
|
||||||
|
params.array_buffer_allocator_shared = allocator;
|
||||||
|
+ params.cpp_heap =
|
||||||
|
+ v8::CppHeap::Create(w->platform_, v8::CppHeapCreateParams{{}})
|
||||||
|
+ .release();
|
||||||
|
Isolate* isolate =
|
||||||
|
NewIsolate(¶ms, &loop_, w->platform_, w->snapshot_data());
|
||||||
|
if (isolate == nullptr) {
|
||||||
|
@@ -230,13 +233,8 @@ class WorkerThreadData {
|
||||||
*static_cast<bool*>(data) = true;
|
*static_cast<bool*>(data) = true;
|
||||||
}, &platform_finished);
|
}, &platform_finished);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue