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?
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.
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:
I'm not sure if I'm using this feature correctly. Could somebody advise?