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

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

Issue 1859033002: [debugger] ScopeIterator should unwrap debug-evaluate contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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
Index: src/debug/debug-evaluate.cc
diff --git a/src/debug/debug-evaluate.cc b/src/debug/debug-evaluate.cc
index dceaee14261301584ff8e8818e5bece407f33e25..1729408e5ce0c644efb99213e39de0a425067b99 100644
--- a/src/debug/debug-evaluate.cc
+++ b/src/debug/debug-evaluate.cc
@@ -154,7 +154,7 @@ DebugEvaluate::ContextBuilder::ContextBuilder(Isolate* isolate,
ScopeIterator::ScopeType scope_type = it.Type();
if (scope_type == ScopeIterator::ScopeTypeLocal) {
DCHECK_EQ(FUNCTION_SCOPE, it.CurrentScopeInfo()->scope_type());
- Handle<JSObject> materialized = NewJSObjectWithNullProto();
+ Handle<JSObject> materialized = factory->NewJSObjectWithNullProto();
Handle<Context> local_context =
it.HasContext() ? it.CurrentContext() : outer_context;
Handle<StringSet> non_locals = it.GetNonLocals();
@@ -183,7 +183,7 @@ DebugEvaluate::ContextBuilder::ContextBuilder(Isolate* isolate,
}
context_chain_.Add(context_chain_element);
} else if (scope_type == ScopeIterator::ScopeTypeBlock) {
- Handle<JSObject> materialized = NewJSObjectWithNullProto();
+ Handle<JSObject> materialized = factory->NewJSObjectWithNullProto();
frame_inspector.MaterializeStackLocals(materialized,
it.CurrentScopeInfo());
ContextChainElement context_chain_element;
@@ -220,17 +220,6 @@ void DebugEvaluate::ContextBuilder::UpdateValues() {
}
-Handle<JSObject> DebugEvaluate::ContextBuilder::NewJSObjectWithNullProto() {
- Handle<JSObject> result =
- isolate_->factory()->NewJSObject(isolate_->object_function());
- Handle<Map> new_map =
- Map::Copy(Handle<Map>(result->map()), "ObjectWithNullProto");
- Map::SetPrototype(new_map, isolate_->factory()->null_value());
- JSObject::MigrateToMap(result, new_map);
- return result;
-}
-
-
void DebugEvaluate::ContextBuilder::MaterializeArgumentsObject(
Handle<JSObject> target, Handle<JSFunction> function) {
// Do not materialize the arguments object for eval or top-level code.
« no previous file with comments | « src/debug/debug-evaluate.h ('k') | src/debug/debug-scopes.h » ('j') | src/debug/debug-scopes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698