V8 Node-API conformance defects

Open
#2,125 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp, javascript
Domain
backend, testing

Research direction

Read Dependencies/JsRuntimeHost/Core/Node-API/Source/js_native_api_v8.cc alongside the V8 exclusions in Dependencies/JsRuntimeHost/Tests/NodeApi/test_main.cpp. Start with one listed conformance failure and run its named test to understand the expected Node-API behavior. Fix the V8 implementation, remove that test's exclusion, and confirm the test passes; the issue lists affected tests for each defect.

Written by the indexing model from the issue text.

Description

[Filed by Copilot on behalf of @bghgary]

The Node-API conformance suite added in #2097 skips these tests on V8. Their exclusions in Dependencies/JsRuntimeHost/Tests/NodeApi/test_main.cpp link here; the implementation is Dependencies/JsRuntimeHost/Core/Node-API/Source/js_native_api_v8.cc. Remove an exclusion when its item is fixed, so the test guards the fix.

  • napi_wrap aborts on an object not created by napi_define_class. Skips test_function/test.js, test_general/test.js, test_general/testEnvCleanup.js, test_general/testFinalizer.js and test_reference_double_free/test_wrap.js.
  • napi_run_script aborts on a non-string script instead of returning napi_string_expected. Skips test_general/testNapiRun.js.
  • napi_get_version reports 9, but napi_get_all_property_names (version 6) is commented out. test_general/test.js expects 5, as the other JsRuntimeHost implementations report.
Dominant language
C++
Stars
931
Forks
169
Avg merge
2d 17h
Merged PRs (30d)
66

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from BabylonJS/BabylonNative

All issues in BabylonJS/BabylonNative

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.