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

Unified Diff: sdk/lib/_internal/compiler/js_lib/js_number.dart

Issue 988523002: Fix int.parse bug (dart2js version) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months 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 | « sdk/lib/_internal/compiler/js_lib/js_helper.dart ('k') | sdk/lib/core/int.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/js_lib/js_number.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/js_number.dart b/sdk/lib/_internal/compiler/js_lib/js_number.dart
index c05f4f48173b1f930bb84ce15aff8ae4e0bc6612..c1357e02f73026ea9207f32b86a29d26cc44d01b 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_number.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_number.dart
@@ -167,7 +167,9 @@ class JSNumber extends Interceptor implements num {
String toRadixString(int radix) {
checkInt(radix);
- if (radix < 2 || radix > 36) throw new RangeError(radix);
+ if (radix < 2 || radix > 36) {
+ throw new RangeError.range(radix, 2, 36, "radix");
+ }
String result = JS('String', r'#.toString(#)', this, radix);
const int rightParenCode = 0x29;
if (result.codeUnitAt(result.length - 1) != rightParenCode) {
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_helper.dart ('k') | sdk/lib/core/int.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698