JavaScriptCore Node-API conformance defects

Abierto
#2,129 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cpp, javascript
Área
backend, testing

Línea de trabajo

Start with Dependencies/JsRuntimeHost/Core/Node-API/Source/js_native_api_javascriptcore.cc and the skipped test list in Dependencies/JsRuntimeHost/Tests/NodeApi/test_main.cpp. Choose one defect and run its named Node-API conformance test to understand the expected behavior; the issue lists several independent failures across value conversion, classes, finalizers, and Android. Done means fixing the selected behavior and removing its corresponding exclusion so the test guards the fix.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

[Filed by Copilot on behalf of @bghgary]

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

  • There is no napi_create_date, napi_is_date or napi_get_date_value, so the test_date addon cannot load and is not built. Skips test_date/.
  • napi_create_array_with_length throws a RangeError for the maximum array length (2^32-1) instead of returning an array. Skips test_array/test.js.
  • napi_define_class dereferences a NULL properties array and crashes. Skips test_constructor/test.js and test_constructor/test_null.js.
  • napi_define_properties takes enumerable from napi_configurable, and read-only assignment errors use different message text from V8's. Both also fail test_constructor/test.js.
  • napi_define_class does not set the constructor's name. Skips test_constructor/test2.js.
  • Value getters coerce instead of returning napi_*_expected, and string getters write through a NULL result when buf is NULL, which crashes. Skips test_conversions/test.js.
  • An external's finalizer runs only at context teardown, where napi_throw_error allocates during garbage collection and aborts. Skips test_exception/testFinalizerException.js.
  • napi_create_function ignores the name length and accepts a NULL callback. Skips test_function/test.js.
  • napi_add_finalizer callbacks are not called before exit (0 of 2 expected calls). Skips test_general/testFinalizer.js.
  • napi_run_script converts a non-string script to a string instead of returning napi_string_expected. Skips test_general/testNapiRun.js.
  • napi_get_value_double coerces a string instead of returning napi_number_expected. Skips test_general/testNapiStatus.js.
  • napi_instanceof passes a non-object constructor to JSValueIsInstanceOfConstructor, which crashes. Skips test_general/testV8Instanceof.js.
  • Integer getters cast out-of-range doubles instead of wrapping (int32 and uint32) or saturating (int64). Skips test_number/test.js.
  • napi_remove_wrap rejects an object wrapped with a NULL native pointer. Skips test_reference_double_free/test_wrap.js.
  • napi_create_function creates the function with JSObjectMakeFunctionWithCallback, which is not a constructor, so a class cannot extend it. Skips test_new_target/test.js.
  • On Android, jsc-android (WebKit r250231) predates WebKit's 2020 fix that gives JSObjectMakeConstructor instances new.target's prototype, so subclass instances lose their methods. test_new_target/test.js also needs this fixed on Android.
Lenguaje dominante
C++
Estrellas
931
Forks
169
Merge medio
2 d 17 h
PR fusionados (30 d)
66

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de BabylonJS/BabylonNative

Todos los issues de BabylonJS/BabylonNative

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.