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

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

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 years, 6 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/debug/debug-evaluate.cc ('k') | src/debug/debug-scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-frames.cc
diff --git a/src/debug/debug-frames.cc b/src/debug/debug-frames.cc
index 453a77db020166026c87361b233297782378893f..5eeb42a9e281937cf1dd96bb3cf3eff6bdd4c750 100644
--- a/src/debug/debug-frames.cc
+++ b/src/debug/debug-frames.cc
@@ -123,7 +123,7 @@ void FrameInspector::MaterializeStackLocals(Handle<JSObject> target,
i < GetParametersCount()
? GetParameter(i)
: Handle<Object>::cast(isolate_->factory()->undefined_value());
- DCHECK(!value->IsTheHole());
+ DCHECK(!value->IsTheHole(isolate_));
JSObject::SetOwnPropertyIgnoreAttributes(target, name, value, NONE).Check();
}
@@ -135,7 +135,9 @@ void FrameInspector::MaterializeStackLocals(Handle<JSObject> target,
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->IsTheHole(isolate_)) {
+ value = isolate_->factory()->undefined_value();
+ }
if (value->IsOptimizedOut()) value = isolate_->factory()->undefined_value();
JSObject::SetOwnPropertyIgnoreAttributes(target, name, value, NONE).Check();
}
@@ -166,7 +168,7 @@ void FrameInspector::UpdateStackLocalsFromMaterializedObject(
if (ScopeInfo::VariableIsSynthetic(*name)) continue;
if (ParameterIsShadowedByContextLocal(scope_info, name)) continue;
- DCHECK(!frame_->GetParameter(i)->IsTheHole());
+ DCHECK(!frame_->GetParameter(i)->IsTheHole(isolate_));
Handle<Object> value =
Object::GetPropertyOrElement(target, name).ToHandleChecked();
frame_->SetParameterValue(i, *value);
@@ -177,7 +179,7 @@ void FrameInspector::UpdateStackLocalsFromMaterializedObject(
Handle<String> name(scope_info->StackLocalName(i));
if (ScopeInfo::VariableIsSynthetic(*name)) continue;
int index = scope_info->StackLocalIndex(i);
- if (frame_->GetExpression(index)->IsTheHole()) continue;
+ if (frame_->GetExpression(index)->IsTheHole(isolate_)) continue;
Handle<Object> value =
Object::GetPropertyOrElement(target, name).ToHandleChecked();
frame_->SetExpression(index, *value);
« no previous file with comments | « src/debug/debug-evaluate.cc ('k') | src/debug/debug-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698