Index: sdk/lib/_internal/compiler/js_lib/js_helper.dart |
diff --git a/sdk/lib/_internal/compiler/js_lib/js_helper.dart b/sdk/lib/_internal/compiler/js_lib/js_helper.dart |
index 84213c6024e095d0edc19213ca57844db22ee29c..8b7ac87d4345b065af328b70e83be27be2a2086c 100644 |
--- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart |
+++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart |
@@ -1435,8 +1435,23 @@ throwAbstractClassInstantiationError(className) { |
throw new AbstractClassInstantiationError(className); |
} |
-throwConcurrentModificationError(collection) { |
- throw new ConcurrentModificationError(collection); |
+// Can be called |
+// |
+// throwConcurrentModificationError(a.length == startLength, a) |
+// |
+// or |
+// |
+// s.length == startLength || throwConcurrentModificationError(a) |
+// |
+@NoInline() @NoSideEffects() |
+throwConcurrentModificationError(sameLength, [collection]) { |
floitsch
2015/04/16 19:22:53
I would prefer a separate function which you then
sra1
2015/04/16 23:37:24
Done.
|
+ if (collection == null) { |
+ collection = sameLength; |
+ sameLength = false; |
+ } |
+ if (true != sameLength) { |
+ throw new ConcurrentModificationError(collection); |
+ } |
} |
/** |