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

Unified Diff: tool/input_sdk/private/js_helper.dart

Issue 1143953004: Fixes for sunflower (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 7 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 | « test/generated_sdk/lib/_internal/compiler/js_lib/js_helper.dart ('k') | tool/sdk_expected_errors.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/js_helper.dart
diff --git a/tool/input_sdk/private/js_helper.dart b/tool/input_sdk/private/js_helper.dart
index e36c37147609e160a50a147cf2e8dead981811ba..d60bbc08a4ad0b9e20cf8071ee1b25929f86ac11 100644
--- a/tool/input_sdk/private/js_helper.dart
+++ b/tool/input_sdk/private/js_helper.dart
@@ -589,7 +589,9 @@ class Primitives {
static int parseInt(String source,
int radix,
int handleError(String source)) {
- if (handleError == null) handleError = _throwFormatException;
+ // TODO(vsm): Make _throwFormatException generic and use directly
+ // to avoid closure allocation.
+ if (handleError == null) handleError = (s) => _throwFormatException(s);
checkString(source);
var match = JS('JSExtendableArray|Null',
@@ -657,7 +659,9 @@ class Primitives {
static double parseDouble(String source, double handleError(String source)) {
checkString(source);
- if (handleError == null) handleError = _throwFormatException;
+ // TODO(vsm): Make _throwFormatException generic and use directly
+ // to avoid closure allocation.
+ if (handleError == null) handleError = (s) => _throwFormatException(s);
// Notice that JS parseFloat accepts garbage at the end of the string.
// Accept only:
// - [+/-]NaN
« no previous file with comments | « test/generated_sdk/lib/_internal/compiler/js_lib/js_helper.dart ('k') | tool/sdk_expected_errors.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698