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

Unified Diff: runtime/vm/kernel_to_il.cc

Issue 2640353002: VM: [Kernel] Ensure we don't capture :stack_trace variable in yielding functions (Closed)
Patch Set: Created 3 years, 11 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 | tests/language/language_kernel.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_to_il.cc
diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc
index 15962431289fd594b1375d928e4076e0c66bf967..11a84e2ffe6f9bbc55a57a82685f8b6ff037a375 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -671,10 +671,11 @@ void ScopeBuilder::VisitFunctionNode(FunctionNode* node) {
if (node->async_marker() == FunctionNode::kSyncYielding) {
LocalScope* scope = parsed_function_->node_sequence()->scope();
+ intptr_t offset = parsed_function_->function().num_fixed_parameters();
for (intptr_t i = 0;
i < parsed_function_->function().NumOptionalPositionalParameters();
i++) {
- scope->VariableAt(i)->set_is_forced_stack();
+ scope->VariableAt(offset + i)->set_is_forced_stack();
Florian Schneider 2017/01/19 17:57:16 Can we get rid of is_forced_stack? (see the discu
}
}
« no previous file with comments | « no previous file | tests/language/language_kernel.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698