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

Unified Diff: pkg/analyzer/lib/src/summary/summarize_ast.dart

Issue 2665213003: Encode URIs stored in unlinked summaries to make them Uri.parse() safe. (Closed)
Patch Set: 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: pkg/analyzer/lib/src/summary/summarize_ast.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index 240fa8000cae17a4614eb07cb90d362c4ba6ccb7..6017647cc5f3cee858d2845ad736a63a3b3fc367 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -1306,7 +1306,7 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
b.prefixOffset = node.prefix.offset;
}
b.isDeferred = node.deferredKeyword != null;
- b.uri = node.uri.stringValue;
+ b.uri = Uri.encodeFull(node.uri.stringValue ?? '');
b.uriOffset = node.uri.offset;
b.uriEnd = node.uri.end;
unlinkedImports.add(b);

Powered by Google App Engine
This is Rietveld 408576698