我正在尝试针对 Node 12 构建本机节点模块,但遇到以下错误:
warning: ‘static v8::Local<v8::String> v8::String::NewFromUtf8(v8::Isolate*, const char*, v8::String::NewStringType, int)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
在代码上,例如:
v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), "some string")
我理解错误,但基于 v8::String 文档,我无法弄清楚如何指定 Maybe 版本......原型看起来一样。如何使用此功能的 Maybe 版本?