[jsscripting] Fix multi-thread access (#13582)

* [jsscripting] Share the lock mechanism that was used only for rules
This change moves the lock object that was originally created for ThreadsafeSimpleRuleDelegate to OpenhabGraalJSScriptEngine to make share it across the whole engine.

* [jsscripting] Inject the lock object into the JS runtime
* [jsscripting] Update `setTimeout` & `setInterval` polyfills to enable threadsafety
* [jsscripting] Upgrade GraalJS from 21.3.0 to 22.3.0
* [jsscripting] Reduce compiler warnings
* [jsscripting] Update node version of frontend-maven-plugin

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This commit is contained in:
Florian Hotze
2022-10-24 13:35:33 +02:00
committed by GitHub
parent 671d2de9b2
commit cf47dc0f39
12 changed files with 222 additions and 65 deletions

View File

@@ -22,7 +22,7 @@
!jdk.internal.reflect.*,
!jdk.vm.ci.services
</bnd.importpackage>
<graal.version>21.3.0</graal.version>
<graal.version>22.3.0</graal.version>
<asm.version>6.2.1</asm.version>
<oh.version>${project.version}</oh.version>
<ohjs.version>openhab@2.0.4</ohjs.version>
@@ -50,7 +50,7 @@
<artifactId>frontend-maven-plugin</artifactId>
<version>1.12.0</version>
<configuration>
<nodeVersion>v12.16.1</nodeVersion>
<nodeVersion>v16.17.1</nodeVersion>
<workingDirectory>target/js</workingDirectory>
</configuration>
<executions>