Index: src/runtime/runtime-wasm.cc |
diff --git a/src/runtime/runtime-wasm.cc b/src/runtime/runtime-wasm.cc |
index 9f609df5b4357aec4c2014a7398f1481f01a6ea1..37608e61cda6f90265fa093519affcdd18360548 100644 |
--- a/src/runtime/runtime-wasm.cc |
+++ b/src/runtime/runtime-wasm.cc |
@@ -109,5 +109,12 @@ RUNTIME_FUNCTION(Runtime_WasmGrowMemory) { |
return *isolate->factory()->NewNumberFromInt(old_size / |
wasm::WasmModule::kPageSize); |
} |
+ |
+RUNTIME_FUNCTION(Runtime_WasmThrowTypeError) { |
+ HandleScope scope(isolate); |
+ DCHECK_EQ(0, args.length()); |
+ THROW_NEW_ERROR_RETURN_FAILURE( |
+ isolate, NewTypeError(MessageTemplate::kWasmTrapTypeError)); |
+} |
} // namespace internal |
} // namespace v8 |