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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2482133002: [debugger] do not accidentally pop contexts in bytecode (Closed)
Patch Set: fix bytecode generator Created 4 years, 1 month 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 | test/debugger/regress/regress-5610.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index ad1356f31a119a128c587bcc3b87dc34b1ca8bdd..22494607f5e515a7db9eb1229bcb3ea960c3ee13 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -362,7 +362,7 @@ void BytecodeGenerator::ControlScope::PerformCommand(Command command,
return;
}
current = current->outer();
- if (current->context() != context) {
+ if (current->context() != context && context->ShouldPopContext()) {
// Pop context to the expected depth.
// TODO(rmcilroy): Only emit a single context pop.
generator()->builder()->PopContext(current->context()->reg());
« no previous file with comments | « no previous file | test/debugger/regress/regress-5610.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698