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

Unified Diff: pkg/stack_trace/lib/src/frame.dart

Issue 180363003: Work around issue 17083 in pkg/stack_trace. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/stack_trace/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/stack_trace/lib/src/frame.dart
diff --git a/pkg/stack_trace/lib/src/frame.dart b/pkg/stack_trace/lib/src/frame.dart
index 7b9c7b1a9add8499daa83464cea726b4e0215e63..96a5ec5e11738011daed38f54838f655d7a93529 100644
--- a/pkg/stack_trace/lib/src/frame.dart
+++ b/pkg/stack_trace/lib/src/frame.dart
@@ -47,6 +47,15 @@ final _friendlyFrame = new RegExp(
final _initialDot = new RegExp(r"^\.");
+/// "dart:" libraries that are incorrectly reported without a "dart:" prefix.
+///
+/// See issue 11901. All these libraries should be in "dart:io".
+final _ioLibraries = new Set.from([
+ new Uri(path: 'timer_impl.dart'),
+ new Uri(path: 'http_impl.dart'),
+ new Uri(path: 'http_parser.dart')
+]);
+
/// A single stack frame. Each frame points to a precise location in Dart code.
class Frame {
/// The URI of the file in which the code is located.
@@ -130,10 +139,7 @@ class Frame {
// always be found. The column is optional.
var member = match[1].replaceAll("<anonymous closure>", "<fn>");
var uri = Uri.parse(match[2]);
- // Work around issue 11901.
- if (uri == new Uri(path: 'timer_impl.dart')) {
- uri = Uri.parse('dart:async/timer_impl.dart');
- }
+ if (_ioLibraries.contains(uri)) uri = Uri.parse('dart:io/${uri.path}');
var line = int.parse(match[3]);
var column = null;
var columnMatch = match[4];
« no previous file with comments | « no previous file | pkg/stack_trace/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698