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

Unified Diff: dart/lib/compiler/implementation/lib/js_helper.dart

Issue 11026035: Fix Hello World size regression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/lib/js_helper.dart
diff --git a/dart/lib/compiler/implementation/lib/js_helper.dart b/dart/lib/compiler/implementation/lib/js_helper.dart
index 47c81bf78cac4b474f3047e8fff9b68fbc4ad08e..bec987b362545deba6032753665afddf710a5efd 100644
--- a/dart/lib/compiler/implementation/lib/js_helper.dart
+++ b/dart/lib/compiler/implementation/lib/js_helper.dart
@@ -389,7 +389,10 @@ class Primitives {
return;
}
- throw 'Unable to print message: ${NoSuchMethodError.safeToString(string)}';
+ // This is somewhat nasty, but we don't want to drag in a bunch of
+ // dependencies to handle a situation that cannot happen. So we
+ // avoid using Dart [:throw:] and Dart [toString].
+ JS('void', "throw 'Unable to print message: ' + String(#)", string);
}
static int parseInt(String string) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698