Index: src/runtime/runtime-internal.cc |
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc |
index d93ffdb846a8f2206031cce3002709deb4a3c18b..e2b68aa48482ff118f9d9c12ca38de81f049c5bb 100644 |
--- a/src/runtime/runtime-internal.cc |
+++ b/src/runtime/runtime-internal.cc |
@@ -96,6 +96,13 @@ RUNTIME_FUNCTION(Runtime_ThrowStackOverflow) { |
return isolate->StackOverflow(); |
} |
+RUNTIME_FUNCTION(Runtime_ThrowWasmError) { |
+ HandleScope scope(isolate); |
+ DCHECK_EQ(1, args.length()); |
+ CONVERT_SMI_ARG_CHECKED(message_id, 0); |
+ THROW_NEW_ERROR_RETURN_FAILURE( |
+ isolate, NewError(static_cast<MessageTemplate::Template>(message_id))); |
+} |
RUNTIME_FUNCTION(Runtime_UnwindAndFindExceptionHandler) { |
SealHandleScope shs(isolate); |