Chromium Code Reviews| Index: src/ast/scopes.cc | 
| diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc | 
| index 4ce1c0d85f7970f0b1cd5807d0519aac825d88c3..6b2fb96d3a7fb65f3f7054f8534968aa52ed9280 100644 | 
| --- a/src/ast/scopes.cc | 
| +++ b/src/ast/scopes.cc | 
| @@ -542,13 +542,15 @@ void DeclarationScope::Analyze(ParseInfo* info, AnalyzeMode mode) { | 
| scope->HoistSloppyBlockFunctions(&factory); | 
| } | 
| - // We are compiling one of three cases: | 
| + // We are compiling one of four cases: | 
| // 1) top-level code, | 
| // 2) a function/eval/module on the top-level | 
| // 3) a function/eval in a scope that was already resolved. | 
| + // 4) an asm.js function | 
| DCHECK(scope->scope_type() == SCRIPT_SCOPE || | 
| scope->outer_scope()->scope_type() == SCRIPT_SCOPE || | 
| - scope->outer_scope()->already_resolved_); | 
| + scope->outer_scope()->already_resolved_ || | 
| + (info->asm_function_scope() && scope->scope_type() == FUNCTION_SCOPE)); | 
| // The outer scope is never lazy. | 
| scope->set_should_eager_compile(); | 
| @@ -1006,7 +1008,7 @@ VariableProxy* Scope::NewUnresolved(AstNodeFactory* factory, | 
| // the same name because they may be removed selectively via | 
| // RemoveUnresolved(). | 
| DCHECK(!already_resolved_); | 
| - DCHECK_EQ(factory->zone(), zone()); | 
| + DCHECK(factory->zone() == zone() || outer_scope()->IsAsmFunction()); | 
| 
 
marja
2016/11/29 07:39:46
I think this DCHECK should be left as is and you s
 
bradn
2016/11/29 09:54:09
Done.
 
 | 
| VariableProxy* proxy = factory->NewVariableProxy(name, kind, start_position); | 
| proxy->set_next_unresolved(unresolved_); | 
| unresolved_ = proxy; |