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

Unified Diff: src/scopes.cc

Issue 1185313002: --print-scopes should ignore native code, even ones parsed lazily. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@debugger
Patch Set: remove stray edit Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index 63ae7ec1099627c187043ac2cb62e6e4d270f131..039bea0987a4261432cab324cdd464e0e87939a6 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -283,11 +283,14 @@ bool Scope::Analyze(ParseInfo* info) {
}
#ifdef DEBUG
- if (info->isolate()->bootstrapper()->IsActive()
- ? FLAG_print_builtin_scopes
- : FLAG_print_scopes) {
- scope->Print();
+ bool native = info->isolate()->bootstrapper()->IsActive();
+ if (!info->shared_info().is_null()) {
+ Object* script = info->shared_info()->script();
+ native = script->IsScript() &&
+ Script::cast(script)->type()->value() == Script::TYPE_NATIVE;
}
+
+ if (native ? FLAG_print_builtin_scopes : FLAG_print_scopes) scope->Print();
#endif
info->set_scope(scope);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698