Chromium Code Reviews| Index: src/debug/debug-frames.cc |
| diff --git a/src/debug/debug-frames.cc b/src/debug/debug-frames.cc |
| index f01354500b0e5ce1670a45e8e7afe6087158f99f..1d4c6eb03b5dfb28668b2624c0c73ef88a19558f 100644 |
| --- a/src/debug/debug-frames.cc |
| +++ b/src/debug/debug-frames.cc |
| @@ -15,6 +15,7 @@ FrameInspector::FrameInspector(JavaScriptFrame* frame, |
| has_adapted_arguments_ = frame_->has_adapted_arguments(); |
| is_bottommost_ = inlined_jsframe_index == 0; |
| is_optimized_ = frame_->is_optimized(); |
| + is_interpreted_ = frame_->is_interpreted(); |
| // Calculate the deoptimized frame. |
| if (frame->is_optimized()) { |
| // TODO(turbofan): Revisit once we support deoptimization. |
| @@ -69,6 +70,12 @@ Handle<Object> FrameInspector::GetExpression(int index) { |
| int FrameInspector::GetSourcePosition() { |
| if (is_optimized_) { |
| return deoptimized_frame_->GetSourcePosition(); |
| + } else if (is_interpreted_) { |
| + InterpretedFrame* frame = reinterpret_cast<InterpretedFrame*>(frame_); |
| + // TODO(yangguo): Get the bytecode array from the frame. |
|
Michael Starzinger
2016/02/22 09:37:49
Not sure about this TODO, why do we need to get th
Yang
2016/02/22 12:48:43
Absolutely correct. This is a stale TODO I forgot
|
| + BytecodeArray* bytecode_array = |
| + frame->function()->shared()->bytecode_array(); |
| + return bytecode_array->SourcePosition(frame->GetBytecodeOffset()); |
| } else { |
| Code* code = frame_->LookupCode(); |
| int offset = static_cast<int>(frame_->pc() - code->instruction_start()); |
| @@ -95,6 +102,7 @@ void FrameInspector::SetArgumentsFrame(JavaScriptFrame* frame) { |
| DCHECK(has_adapted_arguments_); |
| frame_ = frame; |
| is_optimized_ = frame_->is_optimized(); |
| + is_interpreted_ = frame_->is_interpreted(); |
| DCHECK(!is_optimized_); |
| } |