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

Unified Diff: lib/source_map_stack_trace.dart

Issue 1111223003: Prefer "dart:" URLs to "package:" URLs. (Closed) Base URL: git@github.com:dart-lang/source_map_stack_trace.git@master
Patch Set: Created 5 years, 8 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 | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/source_map_stack_trace.dart
diff --git a/lib/source_map_stack_trace.dart b/lib/source_map_stack_trace.dart
index 41072e4fa70cbedadd697e055f115dddfc89ffa6..76ad41aff99ec39d07f7f9ed0991e2a1ce140873 100644
--- a/lib/source_map_stack_trace.dart
+++ b/lib/source_map_stack_trace.dart
@@ -61,11 +61,11 @@ StackTrace mapStackTrace(Mapping sourceMap, StackTrace stackTrace,
if (span == null) return null;
var sourceUrl = span.sourceUrl.toString();
- if (packageRoot != null && p.url.isWithin(packageRoot, sourceUrl)) {
+ if (sdkRoot != null && p.url.isWithin(sdkLib, sourceUrl)) {
+ sourceUrl = "dart:" + p.url.relative(sourceUrl, from: sdkLib);
+ } else if (packageRoot != null && p.url.isWithin(packageRoot, sourceUrl)) {
sourceUrl = "package:" +
p.url.relative(sourceUrl, from: packageRoot);
- } else if (sdkRoot != null && p.url.isWithin(sdkLib, sourceUrl)) {
- sourceUrl = "dart:" + p.url.relative(sourceUrl, from: sdkLib);
}
return new Frame(
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698