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 1f758bb8535dcf5ec316210a4a2b70829aa35aa9..eb1de83dcdf0450088baf53e9e93e5425e40fad4 100644 |
--- a/test/cctest/wasm/wasm-run-utils.h |
+++ b/test/cctest/wasm/wasm-run-utils.h |
@@ -186,10 +186,9 @@ class TestingModule : public ModuleEnv { |
Handle<JSFunction> jsfunc = Handle<JSFunction>::cast(v8::Utils::OpenHandle( |
*v8::Local<v8::Function>::Cast(CompileRun(source)))); |
uint32_t index = AddFunction(sig, Handle<Code>::null()); |
- WasmName module_name = ArrayVector("test"); |
- WasmName function_name; |
- Handle<Code> code = CompileWasmToJSWrapper(isolate_, jsfunc, sig, |
- module_name, function_name); |
+ Handle<Code> code = |
+ CompileWasmToJSWrapper(isolate_, jsfunc, sig, index, |
+ Handle<String>::null(), Handle<String>::null()); |
instance->function_code[index] = code; |
return index; |
} |
@@ -200,8 +199,10 @@ class TestingModule : public ModuleEnv { |
Handle<JSObject> module_object = Handle<JSObject>(0, isolate_); |
Handle<Code> code = instance->function_code[index]; |
WasmJs::InstallWasmFunctionMap(isolate_, isolate_->native_context()); |
- return compiler::CompileJSToWasmWrapper(isolate_, this, name, code, |
- module_object, index); |
+ Handle<JSFunction> ret = |
+ compiler::CompileJSToWasmWrapper(isolate_, this, name, code, index); |
+ ret->SetInternalField(0, *module_object); |
+ return ret; |
} |
void SetFunctionCode(uint32_t index, Handle<Code> code) { |