From dab91511dfa35050e81f948cca2b522f301aeb01 Mon Sep 17 00:00:00 2001 From: pietro-lopes Date: Sat, 9 Dec 2023 09:31:16 -0300 Subject: [PATCH] Fixed some general concurrency issue --- common/src/main/java/dev/latvian/mods/rhino/ArrowFunction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/dev/latvian/mods/rhino/ArrowFunction.java b/common/src/main/java/dev/latvian/mods/rhino/ArrowFunction.java index a38bd337..8e6a5d86 100644 --- a/common/src/main/java/dev/latvian/mods/rhino/ArrowFunction.java +++ b/common/src/main/java/dev/latvian/mods/rhino/ArrowFunction.java @@ -37,7 +37,7 @@ public ArrowFunction(Context cx, Scriptable scope, Callable targetFunction, Scri } @Override - public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) { + public synchronized Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) { Scriptable callThis = boundThis != null ? boundThis : ScriptRuntime.getTopCallScope(cx); return targetFunction.call(cx, scope, callThis, args); }