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

Side by Side Diff: pkg/dev_compiler/tool/input_sdk/private/debugger.dart

Issue 2735303002: Make all DDC internal stack traces apply source maps. (Closed)
Patch Set: Make all DDC internal stack traces apply source maps. Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library dart._debugger; 5 library dart._debugger;
6 6
7 import 'dart:_foreign_helper' show JS; 7 import 'dart:_foreign_helper' show JS;
8 import 'dart:_runtime' as dart; 8 import 'dart:_runtime' as dart;
9 import 'dart:core'; 9 import 'dart:core';
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 class TypeFormatter implements Formatter { 843 class TypeFormatter implements Formatter {
844 accept(object, config) => object is Type; 844 accept(object, config) => object is Type;
845 845
846 String preview(object) => object.toString(); 846 String preview(object) => object.toString();
847 847
848 bool hasChildren(object) => false; 848 bool hasChildren(object) => false;
849 849
850 List<NameValuePair> children(object) => []; 850 List<NameValuePair> children(object) => [];
851 } 851 }
852 852
853 typedef String StackTraceMapper(String stackTrace);
854
855 /// Hook for other parts of the SDK To use to map JS stack traces to Dart
856 /// stack traces.
857 ///
858 /// Raw JS stack traces are used if $dartStackTraceUtility has not been
859 /// specified.
860 StackTraceMapper get stackTraceMapper {
861 var _util = JS('', r'dart.global.$dartStackTraceUtility');
862 return _util != null ? JS('StackTraceMapper', '#.mapper', _util) : null;
863 }
864
853 /// This entry point is automatically invoked by the code generated by 865 /// This entry point is automatically invoked by the code generated by
854 /// Dart Dev Compiler 866 /// Dart Dev Compiler
855 registerDevtoolsFormatter() { 867 registerDevtoolsFormatter() {
856 var formatters = [_devtoolsFormatter]; 868 var formatters = [_devtoolsFormatter];
857 JS('', 'dart.global.devtoolsFormatters = #', formatters); 869 JS('', 'dart.global.devtoolsFormatters = #', formatters);
858 } 870 }
859 871
860 // Expose these methods here to facilitate writing debugger tests. 872 // Expose these methods here to facilitate writing debugger tests.
861 // If export worked for private SDK libraries we could just export 873 // If export worked for private SDK libraries we could just export
862 // these methods from dart:_runtime. 874 // these methods from dart:_runtime.
863 875
864 getModuleNames() { 876 getModuleNames() {
865 return dart.getModuleNames(); 877 return dart.getModuleNames();
866 } 878 }
867 879
868 getModuleLibraries(String name) { 880 getModuleLibraries(String name) {
869 return dart.getModuleLibraries(name); 881 return dart.getModuleLibraries(name);
870 } 882 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/lib/sdk/ddc_sdk.sum ('k') | pkg/dev_compiler/tool/input_sdk/private/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698