Index: src/compiler/wasm-compiler.cc |
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc |
index 08ab36dc1ab6a64a59e45a2312e13e038f0b80f3..b6b64f65656fba5c15ac31ed6908b6da8c4393ee 100644 |
--- a/src/compiler/wasm-compiler.cc |
+++ b/src/compiler/wasm-compiler.cc |
@@ -91,7 +91,9 @@ Node* BuildCallToRuntime(Runtime::FunctionId f, JSGraph* jsgraph, |
inputs[count++] = jsgraph->ExternalConstant( |
ExternalReference(f, jsgraph->isolate())); // ref |
inputs[count++] = jsgraph->Int32Constant(fun->nargs); // arity |
- inputs[count++] = jsgraph->HeapConstant(context); // context |
+ inputs[count++] = context.is_null() |
+ ? jsgraph->SmiConstant(0) |
+ : jsgraph->HeapConstant(context); // context |
inputs[count++] = *effect_ptr; |
inputs[count++] = control; |
@@ -328,7 +330,7 @@ class WasmTrapHelper : public ZoneObject { |
Node* parameters[] = {trap_reason_smi, // message id |
trap_position_smi}; // byte position |
BuildCallToRuntime(Runtime::kThrowWasmError, jsgraph(), |
- module->instance->context, parameters, |
+ Handle<Context>::null(), parameters, |
arraysize(parameters), effect_ptr, *control_ptr); |
} |
if (false) { |