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

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

Issue 2952363003: Handle toString on DOM types (Closed)
Patch Set: Address comments Created 3 years, 6 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
Index: pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
index 578c724728d0b83303532825c4b0036e5e0f5096..131aa180c1221305487c7ebf752e81fedf8ae9c7 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
@@ -15,6 +15,7 @@ import 'dart:_internal'
show EfficientLengthIterable, MappedIterable, IterableElementError;
import 'dart:_native_typed_data';
+import 'dart:_runtime' as dart;
part 'annotations.dart';
part 'linked_hash_map.dart';
@@ -183,17 +184,8 @@ class Primitives {
/** [: r"$".codeUnitAt(0) :] */
static const int DOLLAR_CHAR_VALUE = 36;
- /// Returns the type of [object] as a string (including type arguments).
- ///
- /// In minified mode, uses the unminified names if available.
- static String objectTypeName(Object object) {
- return getRuntimeType(object).toString();
- }
-
- /// In minified mode, uses the unminified names if available.
static String objectToString(Object object) {
- // String name = objectTypeName(object);
- String name = JS('String', 'dart.typeName(dart.getReifiedType(#))', object);
+ String name = dart.typeName(dart.getReifiedType(object));
return "Instance of '$name'";
}
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/private/interceptors.dart ('k') | tests/lib_strong/html/private_extension_member_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698