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

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

Issue 1834633003: [debugger] allow debug-evaluate to change stack and context values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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-scopes.h ('k') | src/factory.h » ('j') | src/factory.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-scopes.cc
diff --git a/src/debug/debug-scopes.cc b/src/debug/debug-scopes.cc
index 27ee5e79ce4fbec8e69048dcf7f86c008a84af8a..1807bde9ed95fa2165c0c995007b2951f98d9039 100644
--- a/src/debug/debug-scopes.cc
+++ b/src/debug/debug-scopes.cc
@@ -214,7 +214,7 @@ ScopeIterator::ScopeType ScopeIterator::Type() {
DCHECK(context_->IsScriptContext() || context_->IsNativeContext());
return ScopeTypeScript;
case WITH_SCOPE:
- DCHECK(context_->IsWithContext());
+ DCHECK(context_->IsWithContext() || context_->IsDebugEvaluateContext());
return ScopeTypeWith;
case CATCH_SCOPE:
DCHECK(context_->IsCatchContext());
@@ -247,7 +247,7 @@ ScopeIterator::ScopeType ScopeIterator::Type() {
if (context_->IsScriptContext()) {
return ScopeTypeScript;
}
- DCHECK(context_->IsWithContext());
+ DCHECK(context_->IsWithContext() || context_->IsDebugEvaluateContext());
return ScopeTypeWith;
}
@@ -344,16 +344,18 @@ Handle<Context> ScopeIterator::CurrentContext() {
}
}
-
-void ScopeIterator::GetNonLocals(List<Handle<String> >* list_out) {
+Handle<NameDictionary> ScopeIterator::GetNonLocals() {
Handle<String> this_string = isolate_->factory()->this_string();
+ Handle<NameDictionary> dict =
+ NameDictionary::New(isolate_, non_locals_->occupancy());
for (HashMap::Entry* entry = non_locals_->Start(); entry != nullptr;
entry = non_locals_->Next(entry)) {
Handle<String> name(reinterpret_cast<String**>(entry->key));
// We need to treat "this" differently.
if (name.is_identical_to(this_string)) continue;
- list_out->Add(Handle<String>(reinterpret_cast<String**>(entry->key)));
+ dict = NameDictionary::Add(dict, name, name, PropertyDetails::Empty());
}
+ return dict;
}
« no previous file with comments | « src/debug/debug-scopes.h ('k') | src/factory.h » ('j') | src/factory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698