| Index: src/debug/debug-evaluate.cc
|
| diff --git a/src/debug/debug-evaluate.cc b/src/debug/debug-evaluate.cc
|
| index 25c3c2603648c8df650b7868e0d5fd53532a0942..25e17a2151b2161e263578c200b1a79cf9d571bc 100644
|
| --- a/src/debug/debug-evaluate.cc
|
| +++ b/src/debug/debug-evaluate.cc
|
| @@ -95,7 +95,12 @@ MaybeHandle<Object> DebugEvaluate::Evaluate(
|
| Handle<JSObject> extension = Handle<JSObject>::cast(context_extension);
|
| Handle<JSFunction> closure(context->closure(), isolate);
|
| context = isolate->factory()->NewWithContext(
|
| - closure, context, ScopeInfo::CreateForWithScope(isolate), extension);
|
| + closure, context,
|
| + ScopeInfo::CreateForWithScope(
|
| + isolate, context->IsNativeContext()
|
| + ? Handle<ScopeInfo>::null()
|
| + : Handle<ScopeInfo>(context->scope_info())),
|
| + extension);
|
| }
|
|
|
| Handle<JSFunction> eval_fun;
|
| @@ -205,7 +210,12 @@ DebugEvaluate::ContextBuilder::ContextBuilder(Isolate* isolate,
|
|
|
| for (int i = context_chain_.length() - 1; i >= 0; i--) {
|
| evaluation_context_ = factory->NewDebugEvaluateContext(
|
| - evaluation_context_, ScopeInfo::CreateForWithScope(isolate),
|
| + evaluation_context_,
|
| + ScopeInfo::CreateForWithScope(
|
| + isolate,
|
| + evaluation_context_->IsNativeContext()
|
| + ? Handle<ScopeInfo>::null()
|
| + : Handle<ScopeInfo>(evaluation_context_->scope_info())),
|
| context_chain_[i].materialized_object,
|
| context_chain_[i].wrapped_context, context_chain_[i].whitelist);
|
| }
|
|
|