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

Unified Diff: test/mjsunit/wasm/stack.js

Issue 1924253002: [wasm] Patch trapping position into stack trace (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@pass-wasm-position-to-runtime
Patch Set: 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
Index: test/mjsunit/wasm/stack.js
diff --git a/test/mjsunit/wasm/stack.js b/test/mjsunit/wasm/stack.js
index e0d39b35a6bf8b4a07f005d5ded322d5b202dee6..454920e59a07305fcfdfe19851ccc1c316d999a1 100644
--- a/test/mjsunit/wasm/stack.js
+++ b/test/mjsunit/wasm/stack.js
@@ -122,13 +122,13 @@ Error.prepareStackTrace = function(error, frames) {
assertContains("unreachable", e.message);
verifyStack(e.stack, [
// function line file toString
- [ "exec_unreachable", null, null, "exec_unreachable (<WASM>:-1)"], // TODO(clemensh): position should be 1
+ [ "exec_unreachable", null, null, "exec_unreachable (<WASM>:1)"],
["testWasmUnreachable", 119, "stack.js", "stack.js:119:20"],
[ null, 136, "stack.js", "stack.js:136:3"]
]);
verifyWasmStack(e.stack, [
// isWasm funcIndex byteOffset
- [ true, unreach_func.index, -1], // TODO(clemensh): position should be 1
+ [ true, unreach_func.index, 1],
[ false, undefined, null],
[ false, undefined, null],
]);
@@ -143,7 +143,7 @@ Error.prepareStackTrace = function(error, frames) {
assertContains("out of bounds", e.message);
verifyStack(e.stack, [
// function line file toString
- [ "?", null, null, " (<WASM>:-1)"], // TODO(clemensh): position should be 1
+ [ "?", null, null, " (<WASM>:1)"],
["call_mem_out_of_bounds", null, null, "bounds (<WASM>:1)"],
["testWasmMemOutOfBounds", 140, "stack.js", "stack.js:140:20"],
[ null, 160, "stack.js", "stack.js:160:3"]
@@ -151,7 +151,7 @@ Error.prepareStackTrace = function(error, frames) {
assertTrue(call_mem_oob_func.index != mem_oob_func.index);
verifyWasmStack(e.stack, [
// isWasm funcIndex byteOffset
- [ true, mem_oob_func.index, -1], // TODO(clemensh): position should be 1
+ [ true, mem_oob_func.index, 1],
[ true, call_mem_oob_func.index, 1],
[ false, undefined, 1],
[ false, undefined, 1],

Powered by Google App Engine
This is Rietveld 408576698