Index: pkg/dev_compiler/lib/js/legacy/dart_sdk.js |
diff --git a/pkg/dev_compiler/lib/js/legacy/dart_sdk.js b/pkg/dev_compiler/lib/js/legacy/dart_sdk.js |
index ff6fe1080a7e87723e1285d17c5ed8eb8b3b3acd..b508b31f103bc40fe976ad385ee3ee9836d9b563 100644 |
--- a/pkg/dev_compiler/lib/js/legacy/dart_sdk.js |
+++ b/pkg/dev_compiler/lib/js/legacy/dart_sdk.js |
@@ -4072,6 +4072,13 @@ dart_library.library('dart_sdk', null, /* Imports */[ |
children: dart.definiteFunctionType(core.List$(_debugger.NameValuePair), [dart.dynamic]) |
}) |
}); |
+ _debugger.StackTraceMapper = dart.typedef('StackTraceMapper', () => dart.functionType(core.String, [core.String])); |
+ dart.copyProperties(_debugger, { |
+ get stackTraceMapper() { |
+ let _util = dart.global.$dartStackTraceUtility; |
+ return _debugger.StackTraceMapper._check(_util != null ? _util.mapper : null); |
+ } |
+ }); |
_debugger.registerDevtoolsFormatter = function() { |
let formatters = JSArrayOfJsonMLFormatter().of([_debugger._devtoolsFormatter]); |
dart.global.devtoolsFormatters = formatters; |
@@ -11941,6 +11948,9 @@ dart_library.library('dart_sdk', null, /* Imports */[ |
let trace = null; |
if (this[_exception] !== null && typeof this[_exception] === "object") { |
trace = this[_exception].stack; |
+ if (trace != null && _debugger.stackTraceMapper != null) { |
+ trace = _debugger.stackTraceMapper(trace); |
+ } |
} |
return this[_trace] = trace == null ? '' : trace; |
} |