Commit 0c0748c8 authored by Jaroslav Sevcik's avatar Jaroslav Sevcik Committed by Commit Bot

[debugger] Move DCHECK to a useful place.

Change-Id: I485e6ef79fb641ca1db0784433b0866c91a382b8
Reviewed-on: https://chromium-review.googlesource.com/1071442Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53334}
parent 2a01ff8e
......@@ -549,11 +549,11 @@ void ScopeIterator::MaterializeStackLocals(Handle<JSObject> local_scope,
}
Handle<Object> value(parameters_and_registers->get(i), isolate_);
DCHECK(!value.is_identical_to(isolate_->factory()->stale_register()));
// 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(isolate_) || value->IsOptimizedOut(isolate_)) {
DCHECK(!value.is_identical_to(isolate_->factory()->stale_register()));
value = isolate_->factory()->undefined_value();
}
......@@ -567,11 +567,11 @@ void ScopeIterator::MaterializeStackLocals(Handle<JSObject> local_scope,
Handle<Object> value(parameters_and_registers->get(
parameter_count + scope_info->StackLocalIndex(i)),
isolate_);
DCHECK(!value.is_identical_to(isolate_->factory()->stale_register()));
// 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(isolate_) || value->IsOptimizedOut(isolate_)) {
DCHECK(!value.is_identical_to(isolate_->factory()->stale_register()));
value = isolate_->factory()->undefined_value();
}
JSObject::SetOwnPropertyIgnoreAttributes(local_scope, name, value, NONE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment