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

Unified Diff: sdk/lib/_internal/compiler/implementation/closure.dart

Issue 11787023: Fix dart2js by copying keys of a map that is modified under us. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files for fixed tests. Created 7 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 | « samples/tests/samples/samples.status ('k') | tests/compiler/dart2js_extra/checked_accessor_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/closure.dart
diff --git a/sdk/lib/_internal/compiler/implementation/closure.dart b/sdk/lib/_internal/compiler/implementation/closure.dart
index 201817f3dfa03c966db0b5326e897a60dcc71b30..2733cfc03fbfdf320e80c6014546a5eea08203e7 100644
--- a/sdk/lib/_internal/compiler/implementation/closure.dart
+++ b/sdk/lib/_internal/compiler/implementation/closure.dart
@@ -259,7 +259,7 @@ class ClosureTranslator extends Visitor {
Map<Element, Element> freeVariableMapping = data.freeVariableMapping;
// We get a copy of the keys and iterate over it, to avoid modifications
// to the map while iterating over it.
- freeVariableMapping.keys.forEach((Element fromElement) {
+ freeVariableMapping.keys.toList().forEach((Element fromElement) {
assert(fromElement == freeVariableMapping[fromElement]);
Element updatedElement = capturedVariableMapping[fromElement];
assert(updatedElement != null);
« no previous file with comments | « samples/tests/samples/samples.status ('k') | tests/compiler/dart2js_extra/checked_accessor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698