Index: src/runtime/runtime-debug.cc |
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc |
index 51e7b70e441a28d3af68b4ae7a71050a9ac52fca..1e6a442b50e66ff86a135d57816fa50f3a3507a8 100644 |
--- a/src/runtime/runtime-debug.cc |
+++ b/src/runtime/runtime-debug.cc |
@@ -294,14 +294,20 @@ class FrameInspector { |
FrameInspector(JavaScriptFrame* frame, int inlined_jsframe_index, |
Isolate* isolate) |
: frame_(frame), deoptimized_frame_(NULL), isolate_(isolate) { |
+ has_adapted_arguments_ = frame_->has_adapted_arguments(); |
+ is_bottommost_ = inlined_jsframe_index == 0; |
+ is_optimized_ = frame_->is_optimized(); |
// Calculate the deoptimized frame. |
if (frame->is_optimized()) { |
+ // TODO(turbofan): Revisit once we support deoptimization. |
+ if (frame->LookupCode()->is_turbofanned() && !FLAG_turbo_deoptimization) { |
+ is_optimized_ = false; |
+ return; |
+ } |
+ |
deoptimized_frame_ = Deoptimizer::DebuggerInspectableFrame( |
frame, inlined_jsframe_index, isolate); |
} |
- has_adapted_arguments_ = frame_->has_adapted_arguments(); |
- is_bottommost_ = inlined_jsframe_index == 0; |
- is_optimized_ = frame_->is_optimized(); |
} |
~FrameInspector() { |
@@ -325,6 +331,10 @@ class FrameInspector { |
: frame_->GetParameter(index); |
} |
Object* GetExpression(int index) { |
+ // TODO(turbofan): Revisit once we support deoptimization. |
+ if (frame_->LookupCode()->is_turbofanned() && !FLAG_turbo_deoptimization) { |
+ return isolate_->heap()->undefined_value(); |
+ } |
return is_optimized_ ? deoptimized_frame_->GetExpression(index) |
: frame_->GetExpression(index); |
} |