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

Unified Diff: runtime/lib/expando_patch.dart

Issue 11417058: Revert "Remove NullPointerException." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « runtime/lib/double.dart ('k') | runtime/lib/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/expando_patch.dart
diff --git a/runtime/lib/expando_patch.dart b/runtime/lib/expando_patch.dart
index 5c619695bfb26a9de471c3536f313792d90b0ba6..a218af63b7ac57578910afaec5ee06c6548a65bd 100644
--- a/runtime/lib/expando_patch.dart
+++ b/runtime/lib/expando_patch.dart
@@ -54,7 +54,10 @@ patch class Expando<T> {
}
static _checkType(object) {
- if (object == null || object is bool || object is num || object is String) {
+ if (object == null) {
+ throw new NullPointerException();
+ }
+ if (object is bool || object is num || object is String) {
throw new ArgumentError(object);
}
}
« no previous file with comments | « runtime/lib/double.dart ('k') | runtime/lib/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698