| Index: pkg/dev_compiler/web/stack_trace_mapper.dart
|
| diff --git a/pkg/dev_compiler/web/stack_trace_mapper.dart b/pkg/dev_compiler/web/stack_trace_mapper.dart
|
| index e863fa7b44215574128f13627e61ea8d829ecb64..fda5b8b95afea870f36807793389edabeef00e4e 100644
|
| --- a/pkg/dev_compiler/web/stack_trace_mapper.dart
|
| +++ b/pkg/dev_compiler/web/stack_trace_mapper.dart
|
| @@ -39,7 +39,7 @@ typedef void ReadyCallback();
|
| external set dartStackTraceUtility(DartStackTraceUtility value);
|
|
|
| typedef String StackTraceMapper(String stackTrace);
|
| -typedef String SourceMapProvider(String modulePath);
|
| +typedef dynamic SourceMapProvider(String modulePath);
|
| typedef String SetSourceMapProvider(SourceMapProvider provider);
|
|
|
| @JS()
|
| @@ -49,6 +49,9 @@ class DartStackTraceUtility {
|
| {StackTraceMapper mapper, SetSourceMapProvider setSourceMapProvider});
|
| }
|
|
|
| +@JS('JSON.stringify')
|
| +external String _stringify(dynamic json);
|
| +
|
| /// Source mapping that is waits to parse source maps until they match the uri
|
| /// of a requested source map.
|
| ///
|
| @@ -72,6 +75,10 @@ class LazyMapping extends Mapping {
|
| if (!_bundle.containsMapping(uri)) {
|
| var rawMap = _provider(uri);
|
| if (rawMap != null) {
|
| + if (rawMap is! String) {
|
| + // The sourcemap was passed as regular JavaScript JSON.
|
| + rawMap = _stringify(rawMap);
|
| + }
|
| SingleMapping mapping = parse(rawMap);
|
| mapping
|
| ..targetUrl = uri
|
|
|