BabylonJS / BabylonJS/BabylonNative

NAPI JSI does not handle nullptr for Function::New utf8name parameter

Open
#887 0 comments 0 reactions 1 assignee Claimed by @bghgary View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.