| Index: src/debug/debug-frames.cc
|
| diff --git a/src/debug/debug-frames.cc b/src/debug/debug-frames.cc
|
| index df395fcb1fd2a5f4ea8edec6488802cf54c2a214..f01354500b0e5ce1670a45e8e7afe6087158f99f 100644
|
| --- a/src/debug/debug-frames.cc
|
| +++ b/src/debug/debug-frames.cc
|
| @@ -44,27 +44,25 @@ int FrameInspector::GetParametersCount() {
|
| : frame_->ComputeParametersCount();
|
| }
|
|
|
| -
|
| -Object* FrameInspector::GetFunction() {
|
| - return is_optimized_ ? deoptimized_frame_->GetFunction() : frame_->function();
|
| +Handle<Object> FrameInspector::GetFunction() {
|
| + return is_optimized_ ? deoptimized_frame_->GetFunction()
|
| + : handle(frame_->function(), isolate_);
|
| }
|
|
|
| -
|
| -Object* FrameInspector::GetParameter(int index) {
|
| +Handle<Object> FrameInspector::GetParameter(int index) {
|
| return is_optimized_ ? deoptimized_frame_->GetParameter(index)
|
| - : frame_->GetParameter(index);
|
| + : handle(frame_->GetParameter(index), isolate_);
|
| }
|
|
|
| -
|
| -Object* FrameInspector::GetExpression(int index) {
|
| +Handle<Object> FrameInspector::GetExpression(int index) {
|
| // TODO(turbofan): Revisit once we support deoptimization.
|
| if (frame_->LookupCode()->is_turbofanned() &&
|
| frame_->function()->shared()->asm_function() &&
|
| !FLAG_turbo_asm_deoptimization) {
|
| - return isolate_->heap()->undefined_value();
|
| + return isolate_->factory()->undefined_value();
|
| }
|
| return is_optimized_ ? deoptimized_frame_->GetExpression(index)
|
| - : frame_->GetExpression(index);
|
| + : handle(frame_->GetExpression(index), isolate_);
|
| }
|
|
|
|
|
| @@ -85,9 +83,9 @@ bool FrameInspector::IsConstructor() {
|
| : frame_->IsConstructor();
|
| }
|
|
|
| -
|
| -Object* FrameInspector::GetContext() {
|
| - return is_optimized_ ? deoptimized_frame_->GetContext() : frame_->context();
|
| +Handle<Object> FrameInspector::GetContext() {
|
| + return is_optimized_ ? deoptimized_frame_->GetContext()
|
| + : handle(frame_->context(), isolate_);
|
| }
|
|
|
|
|
| @@ -114,10 +112,10 @@ void FrameInspector::MaterializeStackLocals(Handle<JSObject> target,
|
| Handle<String> name(scope_info->ParameterName(i));
|
| if (ParameterIsShadowedByContextLocal(scope_info, name)) continue;
|
|
|
| - Handle<Object> value(i < GetParametersCount()
|
| - ? GetParameter(i)
|
| - : isolate_->heap()->undefined_value(),
|
| - isolate_);
|
| + Handle<Object> value =
|
| + i < GetParametersCount()
|
| + ? GetParameter(i)
|
| + : Handle<Object>::cast(isolate_->factory()->undefined_value());
|
| DCHECK(!value->IsTheHole());
|
|
|
| JSObject::SetOwnPropertyIgnoreAttributes(target, name, value, NONE).Check();
|
| @@ -127,8 +125,7 @@ void FrameInspector::MaterializeStackLocals(Handle<JSObject> target,
|
| for (int i = 0; i < scope_info->StackLocalCount(); ++i) {
|
| if (scope_info->LocalIsSynthetic(i)) continue;
|
| Handle<String> name(scope_info->StackLocalName(i));
|
| - Handle<Object> value(GetExpression(scope_info->StackLocalIndex(i)),
|
| - isolate_);
|
| + Handle<Object> value = GetExpression(scope_info->StackLocalIndex(i));
|
| if (value->IsTheHole()) value = isolate_->factory()->undefined_value();
|
|
|
| JSObject::SetOwnPropertyIgnoreAttributes(target, name, value, NONE).Check();
|
|
|