-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
embeddingIssues and PRs related to embedding Node.js in another project.Issues and PRs related to embedding Node.js in another project.
Description
I'm using the new MultiIsolatePlatform feature added in v9.3.0.
I have following code running in a new node isolate which has its own thread loop. But it have a check failure error when trying to find isolate on the platform.
static node::MultiIsolatePlatform* platform = node::CreatePlatform(4, nullptr);
node::IsolateData* isolateData = node::CreateIsolateData(thread_isolate, thread_loop, platform);
thread_isolate->MemoryPressureNotification(v8::MemoryPressureLevel::kCritical);
The thread isolate is registered to the newly create platform when creating isolate data in line 2.
However, line 3 leads to a CHECK failure when trying to find this thread isolate because the platform instance here is returned from V8::GetCurrentPlatform() and it's not the one I created. Here's the callstack:
1: node::Abort
2: node::Assert
3: node::NodePlatform::ForIsolate
4: node::NodePlatform::CallDelayedOnForegroundThread
5: v8::internal::Heap::CheckMemoryPressure
6: v8::internal::Heap::MemoryPressureNotification
7: v8::Isolate::MemoryPressureNotification
I'm not sure if I'm using this feature correctly. Could somebody advise?
Metadata
Metadata
Assignees
Labels
embeddingIssues and PRs related to embedding Node.js in another project.Issues and PRs related to embedding Node.js in another project.