Fix problem introduced with 043c0096ad.

R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2931383002 .
This commit is contained in:
Peter von der Ahé 2017-06-12 11:22:11 +02:00
parent 080a25f3a6
commit 1f294cbed0

View file

@ -499,8 +499,8 @@ class JsArray<E> extends JsObject with ListMixin<E> {
}
void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) {
_checkRange(start, end, length);
length = end - start;
_checkRange(start, end, this.length);
int length = end - start;
if (length == 0) return;
if (skipCount < 0) throw new ArgumentError(skipCount);
var args = [start, length]..addAll(iterable.skip(skipCount).take(length));