Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

context: allow attached external functions to access JS environment

Cerrado
#225 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
javascript, ruby

Línea de trabajo

The report names MiniRacer::Context#attach and Context#eval and shows a recursive locking error when the attached Ruby function evaluates JavaScript. Start by reading their implementation and the locking behavior around Context#call; determine whether the mutex can safely be released during the callback. Done means the attached function can access the JavaScript environment without deadlocking, with a regression test for the shown example.

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

Descripción

When attaching a Ruby function, it is not possible for that function to evaluate any JavaScript: there is a recursive locking error.

It would be nice if the attached function could access the JavaScript environment. Perhaps, the mutex could be released when calling the attached external function?

This does not work:

context = MiniRacer::Context.new
context.attach("f", ->(*args) { context.eval("1") })
context.call("f")
# => deadlock; recursive locking (ThreadError)

Environment:

  • ruby: 3.0.2
  • mini_racer: 0.5.0
Lenguaje dominante
JavaScript
Estrellas
628
Forks
100
Merge medio
1 d 20 h
PR fusionados (30 d)
2

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

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 rubyjs/mini_racer

Todos los issues de rubyjs/mini_racer

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.