BabylonJS / BabylonJS/BabylonNative
NAPI JSI does not handle nullptr for Function::New utf8name parameter
Open
infrastructure
- Dominant language
- C++
- Stars
- 919
- Forks
- 162
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 19
Description
**Describe the bug**
Napi::Function::New takes four parameters, the third being a string "utf8name". You typically don't need to specify the utf8name, nullptr is fine. But with JSI, leaving out the third parameter will give you an Access violation error.
**To Reproduce**
Steps to reproduce the behavior:
1. Call Napi::Function::New(env, SomeFunction);
2. Build and run with JSI enabled
3. Program will generate an Access violation error
**Expected behavior**
When JSI is not enabled, you can just pass a nullptr as the utf8name, or not pass a third parameter at all.
**Other**
- Platform: Windows with JSI
Contributor guide
Assessment
This issue has not been assessed yet.