Removes WASM hack used for circumventing a wasmer 2.2.1 bug, as it's now resolved in 2.3.0
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-06-07 22:49:37 +02:00
parent 66fb9f5bd6
commit fd4eb77dc9
3 changed files with 2 additions and 12 deletions

View File

@@ -73,9 +73,7 @@ public:
~Env() {}
};
auto env = (Env*)malloc(sizeof(Env));
new (env) Env{.Resolver = resolver, .Func = func};
resolver->Temp_WasmerBug2_2_1_Bypass.Append(env);
auto env = new Env{.Resolver = resolver, .Func = func};
auto* f = wasm_func_new_with_env(
resolver->GetStore(), funcType,
[](void* env, const wasm_val_vec_t* parameters, wasm_val_vec_t* results) -> wasm_trap_t* {
@@ -97,7 +95,7 @@ public:
}
return nullptr;
},
env, /*[](void*) { delete (Env*)env; }*/ nullptr);
env, [](void* env) { delete (Env*)env; });
wasm_functype_delete(funcType);
return f;
}