79813163

Date: 2025-11-08 12:25:22
Score: 1
Natty:
Report link

Solution was to add a handle scope:

void MyEmitFunc(const std::string & someStringFromQueue) {
    v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope scope(isolate);
    v8::Locker locker(isolate);
    v8::Isolate::Scope isolateScope(isolate);
    v8::Local<v8::String> s = v8::String::NewFromUtf8(isolate, someStringFromQueue.c_str()).ToLocalChecked();
    ...
}
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: user31836277