Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4237)

Unified Diff: src/runtime/runtime-debug.cc

Issue 1810483002: Introduce "optimized_out" oddball marker for compilers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix debugger. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-debug.cc ('k') | src/types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index b8c7be0da59e188db36bd37867fbcdb43fe5003b..631f5e8153e82538bfc19c170749b78ce836f504 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -554,7 +554,11 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) {
// Use the value from the stack.
if (scope_info->LocalIsSynthetic(i)) continue;
locals->set(local * 2, scope_info->LocalName(i));
- locals->set(local * 2 + 1, *(frame_inspector.GetExpression(i)));
+ Handle<Object> value = frame_inspector.GetExpression(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->IsOptimizedOut()) value = isolate->factory()->undefined_value();
+ locals->set(local * 2 + 1, *value);
local++;
}
if (local < local_count) {
« no previous file with comments | « src/objects-debug.cc ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698