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

Side by Side Diff: lib/src/util/stack_trace_mapper.dart

Issue 1580973002: Get rid of all the library tags. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « lib/src/util/remote_exception.dart ('k') | lib/src/util/stream_channel.dart » ('j') | 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) 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 test.util.stack_trace_mapper;
6
7 import 'package:source_map_stack_trace/source_map_stack_trace.dart' as mapper; 5 import 'package:source_map_stack_trace/source_map_stack_trace.dart' as mapper;
8 import 'package:source_maps/source_maps.dart'; 6 import 'package:source_maps/source_maps.dart';
9 7
10 /// A class for mapping JS stack traces to Dart stack traces using source maps. 8 /// A class for mapping JS stack traces to Dart stack traces using source maps.
11 class StackTraceMapper { 9 class StackTraceMapper {
12 /// The parsed source map. 10 /// The parsed source map.
13 final Mapping _mapping; 11 final Mapping _mapping;
14 12
15 /// The URI of the package root, as passed to dart2js. 13 /// The URI of the package root, as passed to dart2js.
16 final Uri _packageRoot; 14 final Uri _packageRoot;
17 15
18 /// The URI of the SDK root from which dart2js loaded its sources. 16 /// The URI of the SDK root from which dart2js loaded its sources.
19 final Uri _sdkRoot; 17 final Uri _sdkRoot;
20 18
21 StackTraceMapper(String contents, {Uri mapUrl, Uri packageRoot, Uri sdkRoot}) 19 StackTraceMapper(String contents, {Uri mapUrl, Uri packageRoot, Uri sdkRoot})
22 : _mapping = parse(contents, mapUrl: mapUrl), 20 : _mapping = parse(contents, mapUrl: mapUrl),
23 _packageRoot = packageRoot, 21 _packageRoot = packageRoot,
24 _sdkRoot = sdkRoot; 22 _sdkRoot = sdkRoot;
25 23
26 /// Converts [trace] into a Dart stack trace. 24 /// Converts [trace] into a Dart stack trace.
27 StackTrace mapStackTrace(StackTrace trace) => 25 StackTrace mapStackTrace(StackTrace trace) =>
28 mapper.mapStackTrace(_mapping, trace, 26 mapper.mapStackTrace(_mapping, trace,
29 packageRoot: _packageRoot, sdkRoot: _sdkRoot); 27 packageRoot: _packageRoot, sdkRoot: _sdkRoot);
30 } 28 }
OLDNEW
« no previous file with comments | « lib/src/util/remote_exception.dart ('k') | lib/src/util/stream_channel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698