Index: test/cctest/wasm/wasm-run-utils.h |
diff --git a/test/cctest/wasm/wasm-run-utils.h b/test/cctest/wasm/wasm-run-utils.h |
index d791d9355b5c390218fa0dc5eed3bef6d4351f85..a9f70deadf5725e5b9bd21f98279bb277b53819d 100644 |
--- a/test/cctest/wasm/wasm-run-utils.h |
+++ b/test/cctest/wasm/wasm-run-utils.h |
@@ -211,10 +211,16 @@ class TestingModule : public ModuleEnv { |
WasmJs::InstallWasmFunctionMap(isolate_, isolate_->native_context()); |
Handle<Code> ret_code = |
compiler::CompileJSToWasmWrapper(isolate_, this, code, index); |
+ FunctionSig* funcSig = this->module->functions[index].sig; |
+ Handle<ByteArray> exportedSig = isolate_->factory()->NewByteArray( |
+ static_cast<int>(funcSig->parameter_count() + funcSig->return_count()), |
+ TENURED); |
+ exportedSig->copy_in(0, reinterpret_cast<const byte*>(funcSig->raw_data()), |
+ exportedSig->length()); |
Handle<JSFunction> ret = WrapExportCodeAsJSFunction( |
isolate_, ret_code, name, |
static_cast<int>(this->module->functions[index].sig->parameter_count()), |
- module_object); |
+ exportedSig, module_object); |
return ret; |
} |