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

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

Issue 1804783002: Remove Scope::scope_contains_with_ bit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix scope names and GCC build 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/ast/scopes.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
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 047574ae9cf179aa5f37c04422d9cca0aa02c738..27ee5e79ce4fbec8e69048dcf7f86c008a84af8a 100644
--- a/src/debug/debug-scopes.cc
+++ b/src/debug/debug-scopes.cc
@@ -135,11 +135,6 @@ MUST_USE_RESULT MaybeHandle<JSObject> ScopeIterator::MaterializeScopeDetails() {
Handle<JSFunction> js_function = HasContext()
? handle(CurrentContext()->closure())
: Handle<JSFunction>::null();
- if (!js_function.is_null()) {
- Handle<String> closure_name = JSFunction::GetDebugName(js_function);
- if (!closure_name.is_null() && (closure_name->length() != 0))
- details->set(kScopeDetailsNameIndex, *closure_name);
- }
if (Type() == ScopeTypeGlobal || Type() == ScopeTypeScript) {
return isolate_->factory()->NewJSArrayWithElements(details);
}
@@ -156,6 +151,10 @@ MUST_USE_RESULT MaybeHandle<JSObject> ScopeIterator::MaterializeScopeDetails() {
}
if (!js_function.is_null()) {
+ Handle<String> closure_name = JSFunction::GetDebugName(js_function);
+ if (!closure_name.is_null() && closure_name->length() != 0) {
+ details->set(kScopeDetailsNameIndex, *closure_name);
+ }
details->set(kScopeDetailsStartPositionIndex, Smi::FromInt(start_position));
details->set(kScopeDetailsEndPositionIndex, Smi::FromInt(end_position));
details->set(kScopeDetailsFunctionIndex, *js_function);
« no previous file with comments | « src/ast/scopes.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698