Chromium Code Reviews| Index: compiler/lib/implementation/array.dart |
| diff --git a/compiler/lib/implementation/array.dart b/compiler/lib/implementation/array.dart |
| index 74f64e3d6784f7e0d1991061e8048f846106203e..0e3795a9a35094cd27c1e0cf53831e76be34698b 100644 |
| --- a/compiler/lib/implementation/array.dart |
| +++ b/compiler/lib/implementation/array.dart |
| @@ -4,6 +4,9 @@ |
| class ListFactory { |
| factory List<E>.from(Iterable<E> other) { |
| + if (other == null) { |
|
codefu
2011/12/14 16:12:13
When testing optimized co19/LibTest/core/List/List
|
| + throw const NullPointerException(); |
| + } |
| List<E> list = new List<E>(); |
| for (final e in other) { |
| list.add(e); |
| @@ -174,6 +177,9 @@ class ListImplementation<T> implements List<T> native "Array" { |
| throw const UnsupportedOperationException( |
| "Cannot add to a non-extendable list"); |
| } else { |
| + if (elements == null) { |
|
codefu
2011/12/14 16:12:13
dito above, test: co19/LibTest/core/List/addAll/Li
|
| + throw const NullPointerException(); |
| + } |
| for (final e in elements) { |
| _add(e); |
| } |