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

Unified Diff: src/ast/ast-traversal-visitor.h

Issue 2425563003: Bail out in AstTraversalVisitor::VisitFunctionBody for lazy functions (Closed)
Patch Set: updates Created 4 years, 2 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/ast/ast-traversal-visitor.h
diff --git a/src/ast/ast-traversal-visitor.h b/src/ast/ast-traversal-visitor.h
index e0f88e19a980be2a9fa5c5abe29e5f575b2ecbd8..38788769073a139d770cb619093ce901f3438e07 100644
--- a/src/ast/ast-traversal-visitor.h
+++ b/src/ast/ast-traversal-visitor.h
@@ -288,6 +288,8 @@ void AstTraversalVisitor<Subclass>::VisitFunctionLiteral(
PROCESS_EXPRESSION(expr);
DeclarationScope* scope = expr->scope();
RECURSE_EXPRESSION(VisitDeclarations(scope->declarations()));
+ // A lazily parsed function literal won't have a body.
+ if (expr->scope()->is_lazily_parsed()) return;
RECURSE_EXPRESSION(VisitStatements(expr->body()));
}
« 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