Index: test/cctest/wasm/test-wasm-stack.cc |
diff --git a/test/cctest/wasm/test-wasm-stack.cc b/test/cctest/wasm/test-wasm-stack.cc |
index 2b51287e87bc91082bab610a2b82b48c7ee33bc9..a0c2e73f9d1e1d72ccb5b8a51185ebe6e89ca02f 100644 |
--- a/test/cctest/wasm/test-wasm-stack.cc |
+++ b/test/cctest/wasm/test-wasm-stack.cc |
@@ -110,13 +110,13 @@ TEST(CollectDetailedWasmStack_ExplicitThrowFromJs) { |
Execution::TryCall(isolate, js_trampoline, global, 1, args, &maybe_exc); |
CHECK(returnObjMaybe.is_null()); |
- // The column is 1-based, so add 1 to the actual byte offset. |
+ // Line and column are 1-based, so add 1 for the expected wasm output. |
ExceptionInfo expected_exceptions[] = { |
- {"a", 3, 8}, // - |
- {"js", 4, 2}, // - |
- {"<WASM UNNAMED>", static_cast<int>(wasm_index), 3}, // - |
- {"<WASM UNNAMED>", static_cast<int>(wasm_index_2), 2}, // - |
- {"callFn", 1, 24} // - |
+ {"a", 3, 8}, // - |
+ {"js", 4, 2}, // - |
+ {"<WASM UNNAMED>", static_cast<int>(wasm_index) + 1, 3}, // - |
+ {"<WASM UNNAMED>", static_cast<int>(wasm_index_2) + 1, 2}, // - |
+ {"callFn", 1, 24} // - |
}; |
CheckExceptionInfos(maybe_exc.ToHandleChecked(), expected_exceptions); |
} |
@@ -154,11 +154,11 @@ TEST(CollectDetailedWasmStack_WasmError) { |
Execution::TryCall(isolate, js_trampoline, global, 1, args, &maybe_exc); |
CHECK(maybe_return_obj.is_null()); |
- // The column is 1-based, so add 1 to the actual byte offset. |
+ // Line and column are 1-based, so add 1 for the expected wasm output. |
ExceptionInfo expected_exceptions[] = { |
- {"<WASM UNNAMED>", static_cast<int>(wasm_index), 2}, // - |
- {"<WASM UNNAMED>", static_cast<int>(wasm_index_2), 2}, // - |
- {"callFn", 1, 24} //- |
+ {"<WASM UNNAMED>", static_cast<int>(wasm_index) + 1, 2}, // - |
+ {"<WASM UNNAMED>", static_cast<int>(wasm_index_2) + 1, 2}, // - |
+ {"callFn", 1, 24} //- |
}; |
CheckExceptionInfos(maybe_exc.ToHandleChecked(), expected_exceptions); |
} |