Commit 789c0601 authored by yangguo's avatar yangguo Committed by Commit bot

--print-scopes should ignore native code, even ones parsed lazily.

R=adamk@chromium.org

Review URL: https://codereview.chromium.org/1185313002

Cr-Commit-Position: refs/heads/master@{#29093}
parent 9e7732c5
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment