Index: src/runtime/runtime-wasm.cc |
diff --git a/src/runtime/runtime-wasm.cc b/src/runtime/runtime-wasm.cc |
index dd9cf7783e413d84a0b31f1734114efe18d1c4ca..d7e1dba54f7f18f10946e1397c49e064d707c1c0 100644 |
--- a/src/runtime/runtime-wasm.cc |
+++ b/src/runtime/runtime-wasm.cc |
@@ -169,6 +169,10 @@ RUNTIME_FUNCTION(Runtime_WasmRunInterpreter) { |
CHECK(arg_buffer_obj->IsSmi()); |
uint8_t* arg_buffer = reinterpret_cast<uint8_t*>(*arg_buffer_obj); |
+ // Set the current isolate's context, saving the previous one. |
+ SaveContext save(isolate); |
+ isolate->set_context(*instance->compiled_module()->native_context()); |
+ |
instance->debug_info()->RunInterpreter(func_index, arg_buffer); |
return isolate->heap()->undefined_value(); |
} |