Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: src/runtime/runtime-internal.cc

Issue 1915123006: [wasm] Pass byte position for trapping instructions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | src/wasm/ast-decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-internal.cc
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc
index 72cd23abe731a58a243ad577cd593dfd367de606..0aefae9bf4eb69483fec2b58a71854d8658ae7fb 100644
--- a/src/runtime/runtime-internal.cc
+++ b/src/runtime/runtime-internal.cc
@@ -98,10 +98,13 @@ RUNTIME_FUNCTION(Runtime_ThrowStackOverflow) {
RUNTIME_FUNCTION(Runtime_ThrowWasmError) {
HandleScope scope(isolate);
- DCHECK_EQ(1, args.length());
+ DCHECK_EQ(2, args.length());
CONVERT_SMI_ARG_CHECKED(message_id, 0);
- THROW_NEW_ERROR_RETURN_FAILURE(
- isolate, NewError(static_cast<MessageTemplate::Template>(message_id)));
+ CONVERT_SMI_ARG_CHECKED(byte_offset, 1);
+ USE(byte_offset); // TODO(clemensh): patch the stack trace with this offset
+ Handle<Object> error = isolate->factory()->NewError(
+ static_cast<MessageTemplate::Template>(message_id));
+ return isolate->Throw(*error);
}
RUNTIME_FUNCTION(Runtime_UnwindAndFindExceptionHandler) {
« no previous file with comments | « src/runtime/runtime.h ('k') | src/wasm/ast-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698