Index: src/debug/debug-frames.cc |
diff --git a/src/debug/debug-frames.cc b/src/debug/debug-frames.cc |
index c98f911f754275a42f0b92d3d226106369b71f79..5da1656fadd9977f2ff012e8e32fe3463895c3a9 100644 |
--- a/src/debug/debug-frames.cc |
+++ b/src/debug/debug-frames.cc |
@@ -77,23 +77,11 @@ Handle<Object> FrameInspector::GetExpression(int index) { |
: handle(frame_->GetExpression(index), isolate_); |
} |
- |
int FrameInspector::GetSourcePosition() { |
- if (is_optimized_) return deoptimized_frame_->GetSourcePosition(); |
- AbstractCode* code; |
- int code_offset; |
- if (is_interpreted_) { |
- InterpretedFrame* frame = reinterpret_cast<InterpretedFrame*>(frame_); |
- code = AbstractCode::cast(frame->GetBytecodeArray()); |
- code_offset = frame->GetBytecodeOffset(); |
- } else { |
- code = AbstractCode::cast(frame_->LookupCode()); |
- code_offset = static_cast<int>(frame_->pc() - code->instruction_start()); |
- } |
- return code->SourcePosition(code_offset); |
+ return is_optimized_ ? deoptimized_frame_->GetSourcePosition() |
+ : frame_->position(); |
} |
- |
bool FrameInspector::IsConstructor() { |
return is_optimized_ && !is_bottommost_ |
? deoptimized_frame_->HasConstructStub() |