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

Unified Diff: lib/src/vm_trace.dart

Issue 936643002: Even better stack chains with VM async/await. (Closed) Base URL: git@github.com:dart-lang/stack_trace@master
Patch Set: Created 5 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 | « lib/src/frame.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/vm_trace.dart
diff --git a/lib/src/vm_trace.dart b/lib/src/vm_trace.dart
index 89474f58322f8d2e98dfa3dc4ca6de6e1532d11c..79911602ac7b59abadfc31d8315a8a17eb93c186 100644
--- a/lib/src/vm_trace.dart
+++ b/lib/src/vm_trace.dart
@@ -23,8 +23,9 @@ class VMTrace implements StackTrace {
return frames.map((frame) {
var number = padRight("#${i++}", 8);
var member = frame.member
- .replaceAll("<fn>", "<anonymous closure>")
- .replaceAll("<async>", "<<anonymous closure>_async_body>");
+ .replaceAllMapped(new RegExp(r"[^.]+\.<async>"),
+ (match) => "${match[1]}.<${match[1]}_async_body>")
+ .replaceAll("<fn>", "<anonymous closure>");
var line = frame.line == null ? 0 : frame.line;
var column = frame.column == null ? 0 : frame.column;
return "$number$member (${frame.uri}:$line:$column)\n";
« no previous file with comments | « lib/src/frame.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698