| Index: src/compiler/wasm-compiler.cc
|
| diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
|
| index 21107521f1633fca03bb8438d298c3dda9cc0bf2..17065d61b4aac0b34adefab2a945af092250b159 100644
|
| --- a/src/compiler/wasm-compiler.cc
|
| +++ b/src/compiler/wasm-compiler.cc
|
| @@ -1597,7 +1597,9 @@ void WasmGraphBuilder::BuildWasmToJSWrapper(Handle<JSFunction> function,
|
| if (arg_count_before_args) {
|
| args[pos++] = jsgraph()->Int32Constant(wasm_count); // argument count
|
| }
|
| - args[pos++] = jsgraph()->UndefinedConstant(); // JS receiver.
|
| + // JS receiver.
|
| + Handle<Object> global(function->context()->global_object(), isolate);
|
| + args[pos++] = jsgraph()->Constant(global);
|
|
|
| // Convert WASM numbers to JS values.
|
| for (int i = 0; i < wasm_count; i++) {
|
|
|