Index: src/deoptimizer.cc |
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc |
index 942b5284a377a811c367ce76618e3765bbc1197e..acbc662c3761dd0d074b99a41f70a9ff16c5d466 100644 |
--- a/src/deoptimizer.cc |
+++ b/src/deoptimizer.cc |
@@ -2492,7 +2492,9 @@ int ComputeSourcePosition(Handle<SharedFunctionInfo> shared, |
BailoutId node_id) { |
if (shared->HasBytecodeArray()) { |
BytecodeArray* bytecodes = shared->bytecode_array(); |
- return bytecodes->SourcePosition(node_id.ToInt()); |
+ // BailoutId points to the next bytecode in the bytecode aray. Subtract |
+ // 1 to get the end of current bytecode. |
+ return bytecodes->SourcePosition(node_id.ToInt() - 1); |
} else { |
Code* non_optimized_code = shared->code(); |
FixedArray* raw_data = non_optimized_code->deoptimization_data(); |