mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 00:04:10 -08:00
Fix failing tests
This commit is contained in:
parent
5ad4496c34
commit
e966690284
|
@ -186,6 +186,10 @@ public class TObject {
|
|||
if (monitor == null) {
|
||||
return true;
|
||||
}
|
||||
if (PlatformDetector.isWebAssemblyGC()) {
|
||||
// TODO: fix Monitor implementation and remove this block
|
||||
return monitor.owner == null;
|
||||
}
|
||||
if (monitor.owner == null
|
||||
&& (monitor.enteringThreads == null || monitor.enteringThreads.isEmpty())
|
||||
&& (monitor.notifyListeners == null || monitor.notifyListeners.isEmpty())) {
|
||||
|
|
|
@ -31,6 +31,12 @@ import org.teavm.vm.spi.TeaVMPlugin;
|
|||
public class JSOPlugin implements TeaVMPlugin {
|
||||
@Override
|
||||
public void install(TeaVMHost host) {
|
||||
var jsHost = host.getExtension(TeaVMJavaScriptHost.class);
|
||||
var wasmGCHost = host.getExtension(TeaVMWasmGCHost.class);
|
||||
if (jsHost == null && wasmGCHost == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
JSBodyRepository repository = new JSBodyRepository();
|
||||
host.registerService(JSBodyRepository.class, repository);
|
||||
host.add(new JSObjectClassTransformer(repository));
|
||||
|
@ -48,12 +54,10 @@ public class JSOPlugin implements TeaVMPlugin {
|
|||
|
||||
TeaVMPluginUtil.handleNatives(host, JS.class);
|
||||
|
||||
var jsHost = host.getExtension(TeaVMJavaScriptHost.class);
|
||||
if (jsHost != null) {
|
||||
installForJS(jsHost);
|
||||
}
|
||||
|
||||
var wasmGCHost = host.getExtension(TeaVMWasmGCHost.class);
|
||||
if (wasmGCHost != null) {
|
||||
WasmGCJso.install(host, wasmGCHost, repository);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user