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

Unified Diff: pkg/dev_compiler/lib/src/compiler/source_map_printer.dart

Issue 2811343002: Dev compiler debugger related tweaks. (Closed)
Patch Set: Dev compiler debugger related tweaks. Created 3 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
Index: pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart b/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
index a17005964d5a09eb2c0d6d316229a648bf2d91c7..322138959091a10f851418cc8608cc8059b10d37 100644
--- a/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
+++ b/pkg/dev_compiler/lib/src/compiler/source_map_printer.dart
@@ -49,8 +49,14 @@ class SourceMapPrintingContext extends JS.SimpleJavaScriptPrintingContext {
// parts.
_currentTopLevelDeclaration = node;
unit = node.getAncestor((n) => n is CompilationUnit);
+ var source = resolutionMap.elementDeclaredByCompilationUnit(unit).source;
+ // Use the uri for dart: uris instead of the path of the source file
+ // on disk as that results in much cleaner stack traces.
+ // Example:
+ // source.uri = dart:core/object.dart
+ // source.fullName = gen/patched_sdk/lib/core/object.dart
sourcePath =
- resolutionMap.elementDeclaredByCompilationUnit(unit).source.fullName;
+ source.isInSystemLibrary ? source.uri.toString() : source.fullName;
}
Jacob 2017/04/15 02:26:49 Jenny please review this change. This switches to
Jennifer Messerly 2017/04/17 21:37:05 Nice!!!
// Skip MethodDeclarations - in the case of a one line function it finds the
// declaration rather than the body and confuses devtools.
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/compiler.dart ('k') | pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698