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

Unified Diff: runtime/lib/expando_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: runtime/lib/expando_patch.dart
diff --git a/runtime/lib/expando_patch.dart b/runtime/lib/expando_patch.dart
index a218af63b7ac57578910afaec5ee06c6548a65bd..5c619695bfb26a9de471c3536f313792d90b0ba6 100644
--- a/runtime/lib/expando_patch.dart
+++ b/runtime/lib/expando_patch.dart
@@ -54,10 +54,7 @@ patch class Expando<T> {
}
static _checkType(object) {
- if (object == null) {
- throw new NullPointerException();
- }
- if (object is bool || object is num || object is String) {
+ if (object == null || object is bool || object is num || object is String) {
throw new ArgumentError(object);
}
}

Powered by Google App Engine
This is Rietveld 408576698