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

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

Issue 11415028: Remove NullPointerException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed VM bugs. Created 8 years, 1 month 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
Index: sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
index 311d1a4ef45ec68b51ca71ac36a19a55b029a81a..5c6cb3bbe6ee7f8a38ba7532fc3d4730c0287a00 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
@@ -169,7 +169,6 @@ patch class _ListImpl<E> {
patch class String {
patch factory String.fromCharCodes(List<int> charCodes) {
- checkNull(charCodes);
if (!isJsArray(charCodes)) {
if (charCodes is !List) throw new ArgumentError(charCodes);
charCodes = new List.from(charCodes);
@@ -182,7 +181,6 @@ patch class String {
patch class Strings {
patch static String join(List<String> strings, String separator) {
checkNull(strings);
- checkNull(separator);
if (separator is !String) throw new ArgumentError(separator);
return stringJoinUnchecked(_toJsStringArray(strings), separator);
}
@@ -199,14 +197,12 @@ patch class Strings {
array = strings;
for (int i = 0; i < length; i++) {
final string = strings[i];
- checkNull(string);
if (string is !String) throw new ArgumentError(string);
}
} else {
array = new List(length);
for (int i = 0; i < length; i++) {
final string = strings[i];
- checkNull(string);
if (string is !String) throw new ArgumentError(string);
array[i] = string;
}

Powered by Google App Engine
This is Rietveld 408576698