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

Unified Diff: src/full-codegen.cc

Issue 14416011: Fix yield inside with (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Add assertion Created 7 years, 8 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 | « src/ast.h ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.cc
diff --git a/src/full-codegen.cc b/src/full-codegen.cc
index 81f4c1d4b0bc5e2f11b720ef5158c7bfd0c29451..dc646b1a98c88c1192730be5b2d6e9e6d7e36d14 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -1255,9 +1255,12 @@ void FullCodeGenerator::VisitWithStatement(WithStatement* stmt) {
__ CallRuntime(Runtime::kPushWithContext, 2);
StoreToFrameField(StandardFrameConstants::kContextOffset, context_register());
+ Scope* saved_scope = scope();
+ scope_ = stmt->scope();
{ WithOrCatch body(this);
Visit(stmt->statement());
}
+ scope_ = saved_scope;
// Pop context.
LoadContextField(context_register(), Context::PREVIOUS_INDEX);
« no previous file with comments | « src/ast.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698