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

Unified Diff: runtime/lib/double.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 | « pkg/unittest/test/matchers_test.dart ('k') | runtime/lib/expando_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/double.dart
diff --git a/runtime/lib/double.dart b/runtime/lib/double.dart
index aee84e23bc74334e383864da1cc1359eb2bb1d1f..f4025f3b745ed90d6c66233c91568357720d57a6 100644
--- a/runtime/lib/double.dart
+++ b/runtime/lib/double.dart
@@ -114,9 +114,7 @@ class _Double implements double {
if (exponent == 0) {
return 1.0; // ECMA-262 15.8.2.13
}
- if (exponent is! num) {
- throw new ArgumentError(null);
- }
+ // Throw NullPointerException if exponent is null.
double doubleExponent = exponent.toDouble();
if (isNaN || exponent.isNaN) {
return double.NAN;
« no previous file with comments | « pkg/unittest/test/matchers_test.dart ('k') | runtime/lib/expando_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698