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

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

Issue 10443083: Only pass message if it is a string, and InternalError must be a function. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/lib/js_helper.dart
===================================================================
--- lib/compiler/implementation/lib/js_helper.dart (revision 8099)
+++ lib/compiler/implementation/lib/js_helper.dart (working copy)
@@ -814,7 +814,7 @@
// If we cannot determine what kind of error this is, we fall back
// to reporting this as a TypeError even though that may be
// inaccurate. It's probably better than nothing.
- return new TypeError(message);
+ return new TypeError(message is String ? message : '');
}
if (JS('bool', @'# instanceof RangeError', ex)) {
@@ -830,7 +830,7 @@
// Check for the Firefox specific stack overflow signal.
if (JS('bool',
- @"typeof InternalError == 'object' && # instanceof InternalError",
+ @"typeof InternalError == 'function' && # instanceof InternalError",
ex)) {
if (message is String && message == 'too much recursion') {
return new StackOverflowException();
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698