Index: src/debug/debug-frames.cc |
diff --git a/src/debug/debug-frames.cc b/src/debug/debug-frames.cc |
index 25634be8d233178429cfd8cf0fe3ae739cf96f0c..a7956ff417975f7ad1121a45d92ec0836be27fa4 100644 |
--- a/src/debug/debug-frames.cc |
+++ b/src/debug/debug-frames.cc |
@@ -133,8 +133,10 @@ void FrameInspector::MaterializeStackLocals(Handle<JSObject> target, |
if (scope_info->LocalIsSynthetic(i)) continue; |
Handle<String> name(scope_info->StackLocalName(i)); |
Handle<Object> value = GetExpression(scope_info->StackLocalIndex(i)); |
+ // TODO(yangguo): We convert optimized out values to {undefined} when they |
+ // are passed to the debugger. Eventually we should handle them somehow. |
if (value->IsTheHole()) value = isolate_->factory()->undefined_value(); |
- |
+ if (value->IsOptimizedOut()) value = isolate_->factory()->undefined_value(); |
JSObject::SetOwnPropertyIgnoreAttributes(target, name, value, NONE).Check(); |
} |
} |