Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

context: allow attached external functions to access JS environment

Offen
#225 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
30/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
javascript, ruby

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
JavaScript
Sterne
628
Forks
100
Ø Merge
1 T. 20 Std.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

  • Enthält ein Dockerfile oder eine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus rubyjs/mini_racer

Alle Issues in rubyjs/mini_racer

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.