| Index: dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
|
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
|
| index 94fd88763ca0986236931924e7caab2dabe5da2b..1014f047542f1e7c1666ef7752768e05f228991f 100644
|
| --- a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
|
| +++ b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
|
| @@ -37,6 +37,11 @@ checkGrowable(list, reason) {
|
| }
|
|
|
| String S(value) {
|
| + if (value is String) return value;
|
| + if ((value is num && value != 0) || value is bool) {
|
| + return JS('String', r'String(#)', value);
|
| + }
|
| + if (value == null) return 'null';
|
| var res = value.toString();
|
| if (res is !String) throw new ArgumentError(value);
|
| return res;
|
|
|