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

Unified Diff: tests/compiler/dart2js/sourcemaps/load.dart

Issue 2654023003: Add no-info mappings at start of out.js and after mapped functions (Closed)
Patch Set: fixes Created 3 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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/sourcemaps/load.dart
diff --git a/tests/compiler/dart2js/sourcemaps/load.dart b/tests/compiler/dart2js/sourcemaps/load.dart
index 29cb8e096ad660f3b5812bf66c11d17c5c2e1c45..d2ef0092b4e27bc656e8415ff849abc36d477785 100644
--- a/tests/compiler/dart2js/sourcemaps/load.dart
+++ b/tests/compiler/dart2js/sourcemaps/load.dart
@@ -74,17 +74,19 @@ String convertToHumanReadableSourceMap(SingleMapping sourceMap) {
} else {
position = '$line,$columnStart-';
}
- if (entry.sourceUrlId != null) {
- int sourceUrlId = entry.sourceUrlId;
- int sourceLine = entry.sourceLine + 1;
- int sourceColumn = entry.sourceColumn + 1;
+ if (entry.sourceUrlId != null || columnEnd == null) {
if (needsComma) {
sb.write(',\n');
}
sb.write(' {"target": "$position"');
- sb.write(', "source": "$sourceUrlId:$sourceLine,$sourceColumn"');
- if (entry.sourceNameId != null) {
- sb.write(', "name": "${sourceMap.names[entry.sourceNameId]}"');
+ if (entry.sourceUrlId != null) {
+ int sourceUrlId = entry.sourceUrlId;
+ int sourceLine = entry.sourceLine + 1;
+ int sourceColumn = entry.sourceColumn + 1;
+ sb.write(', "source": "$sourceUrlId:$sourceLine,$sourceColumn"');
+ if (entry.sourceNameId != null) {
+ sb.write(', "name": "${sourceMap.names[entry.sourceNameId]}"');
+ }
}
sb.write('}');
needsComma = true;
« no previous file with comments | « tests/compiler/dart2js/sourcemaps/js_tracer.dart ('k') | tests/compiler/dart2js/sourcemaps/sourcemap_visualizer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698