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

Side by Side 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 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/lib/mirrors/private_symbol_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of html; 5 part of html;
6 6
7 class _ConsoleVariables { 7 class _ConsoleVariables {
8 Map<String, Object> _data = new Map<String, Object>(); 8 Map<String, Object> _data = new Map<String, Object>();
9 9
10 /** 10 /**
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 /** 380 /**
381 * Removes the trailing dot from an expression ending in a dot. 381 * Removes the trailing dot from an expression ending in a dot.
382 * This method is used as Library prefixes include a trailing dot when using 382 * This method is used as Library prefixes include a trailing dot when using
383 * the C Dart debugger API. 383 * the C Dart debugger API.
384 */ 384 */
385 static String stripTrailingDot(String str) => 385 static String stripTrailingDot(String str) =>
386 (str != null && str[str.length - 1] == '.') ? str.substring(0, str.length - 1) : str; 386 (str != null && str[str.length - 1] == '.') ? str.substring(0, str.length - 1) : str;
387 387
388 static String addTrailingDot(String str) => '${str}.'; 388 static String addTrailingDot(String str) => '${str}.';
389 389
390 static String demangle(String str) {
391 var atPos = str.indexOf('@');
392 return atPos == -1 ? str : str.substring(0, atPos);
393 }
394
390 static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError; 395 static bool isNoSuchMethodError(obj) => obj is NoSuchMethodError;
391 396
392 static bool _isBuiltinType(ClassMirror cls) { 397 static bool _isBuiltinType(ClassMirror cls) {
393 // TODO(vsm): Find a less hackish way to do this. 398 // TODO(vsm): Find a less hackish way to do this.
394 LibraryMirror lib = cls.owner; 399 LibraryMirror lib = cls.owner;
395 String libName = lib.uri.toString(); 400 String libName = lib.uri.toString();
396 return libName.startsWith('dart:'); 401 return libName.startsWith('dart:');
397 } 402 }
398 403
399 static void register(Document document, String tag, Type type, 404 static void register(Document document, String tag, Type type,
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 _scheduleImmediateHelper._schedule(callback); 609 _scheduleImmediateHelper._schedule(callback);
605 }; 610 };
606 611
607 get _pureIsolateScheduleImmediateClosure => ((void callback()) => 612 get _pureIsolateScheduleImmediateClosure => ((void callback()) =>
608 throw new UnimplementedError("scheduleMicrotask in background isolates " 613 throw new UnimplementedError("scheduleMicrotask in background isolates "
609 "are not supported in the browser")); 614 "are not supported in the browser"));
610 615
611 void _initializeCustomElement(Element e) { 616 void _initializeCustomElement(Element e) {
612 _Utils.initializeCustomElement(e); 617 _Utils.initializeCustomElement(e);
613 } 618 }
OLDNEW
« 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