summaryrefslogtreecommitdiff
path: root/deps/v8/src/debug/debug-evaluate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/debug/debug-evaluate.cc')
-rw-r--r--deps/v8/src/debug/debug-evaluate.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/deps/v8/src/debug/debug-evaluate.cc b/deps/v8/src/debug/debug-evaluate.cc
index fb2df312b8..8970520edc 100644
--- a/deps/v8/src/debug/debug-evaluate.cc
+++ b/deps/v8/src/debug/debug-evaluate.cc
@@ -94,7 +94,13 @@ MaybeHandle<Object> DebugEvaluate::Evaluate(
if (context_extension->IsJSObject()) {
Handle<JSObject> extension = Handle<JSObject>::cast(context_extension);
Handle<JSFunction> closure(context->closure(), isolate);
- context = isolate->factory()->NewWithContext(closure, context, extension);
+ context = isolate->factory()->NewWithContext(
+ closure, context,
+ ScopeInfo::CreateForWithScope(
+ isolate, context->IsNativeContext()
+ ? Handle<ScopeInfo>::null()
+ : Handle<ScopeInfo>(context->scope_info())),
+ extension);
}
Handle<JSFunction> eval_fun;
@@ -203,8 +209,13 @@ DebugEvaluate::ContextBuilder::ContextBuilder(Isolate* isolate,
}
for (int i = context_chain_.length() - 1; i >= 0; i--) {
+ Handle<ScopeInfo> scope_info(ScopeInfo::CreateForWithScope(
+ isolate, evaluation_context_->IsNativeContext()
+ ? Handle<ScopeInfo>::null()
+ : Handle<ScopeInfo>(evaluation_context_->scope_info())));
+ scope_info->SetIsDebugEvaluateScope();
evaluation_context_ = factory->NewDebugEvaluateContext(
- evaluation_context_, context_chain_[i].materialized_object,
+ evaluation_context_, scope_info, context_chain_[i].materialized_object,
context_chain_[i].wrapped_context, context_chain_[i].whitelist);
}
}