Index: src/deoptimizer.cc |
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc |
index abc8154d3545164a8699f1b809c0d511a1cfac68..f7791d210ec3c6dde23c3f060775a5b976412b47 100644 |
--- a/src/deoptimizer.cc |
+++ b/src/deoptimizer.cc |
@@ -2508,7 +2508,8 @@ DeoptimizedFrameInfo::DeoptimizedFrameInfo(Deoptimizer* deoptimizer, |
// Get the source position using the unoptimized code. |
Address pc = reinterpret_cast<Address>(output_frame->GetPc()); |
Code* code = Code::cast(deoptimizer->isolate()->FindCodeObject(pc)); |
- source_position_ = code->SourcePosition(pc); |
+ int offset = static_cast<int>(pc - code->instruction_start()); |
+ source_position_ = code->SourcePosition(offset); |
for (int i = 0; i < expression_count_; i++) { |
Object* value = output_frame->GetExpression(i); |