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); |