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

Unified Diff: tools/dom/src/native_DOMImplementation.dart

Issue 79023010: Add demangle utility to Dartium's dart:html. Demangle typedef names in UserVisibleName. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 1 month 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 | « tests/lib/mirrors/private_symbol_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/native_DOMImplementation.dart
diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart
index 5cf230b7f955eeddc363aa06765b52c3f3b8a757..75c699ca554e0b840560ac852c741c5a47b5d8c6 100644
--- a/tools/dom/src/native_DOMImplementation.dart
+++ b/tools/dom/src/native_DOMImplementation.dart
@@ -387,6 +387,11 @@ class _Utils {
static String addTrailingDot(String str) => '${str}.';
+ static String demangle(String str) {
+ var atPos = str.indexOf('@');
+ return atPos == -1 ? str : str.substring(0, atPos);
+ }
+
static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError;
static bool _isBuiltinType(ClassMirror cls) {
« no previous file with comments | « tests/lib/mirrors/private_symbol_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698