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

Unified Diff: src/isolate.cc

Issue 2493943002: [wasm] Make reported "lines" on stack frames 1-based (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « no previous file | test/cctest/wasm/test-wasm-stack.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index abb519eea29ee6d016721784aa882a3459ce7ed0..e93f469e4e00bb2eb4e9dcaffcfbde35b66d754b 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -706,13 +706,14 @@ class CaptureStackTraceHelper {
frame->function_index());
JSObject::AddProperty(stack_frame, function_key_, name, NONE);
}
- // Encode the function index as line number.
+ // Encode the function index as line number (1-based).
if (!line_key_.is_null()) {
JSObject::AddProperty(
stack_frame, line_key_,
- isolate_->factory()->NewNumberFromInt(frame->function_index()), NONE);
+ isolate_->factory()->NewNumberFromInt(frame->function_index() + 1),
+ NONE);
}
- // Encode the byte offset as column.
+ // Encode the byte offset as column (1-based).
if (!column_key_.is_null()) {
Code* code = frame->LookupCode();
int offset = static_cast<int>(frame->pc() - code->instruction_start());
« no previous file with comments | « no previous file | test/cctest/wasm/test-wasm-stack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698