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

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

Issue 2425563003: Bail out in AstTraversalVisitor::VisitFunctionBody for lazy functions (Closed)
Patch Set: 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..fa6e9bcf021d096819825235a80dd3dad39721c1 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.
Toon Verwaest 2016/10/18 08:21:42 Why not just check expr->is_lazily_parsed()?
jochen (gone - plz use gerrit) 2016/10/18 09:17:37 done
+ if (expr->body() == nullptr) 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