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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/file_state.dart

Issue 2671513002: Revert "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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/public_namespace_computer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/analysis/file_state.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 50ed70a9cb603d8fa7dfc6ac59aab5e010a5325e..d37576d2bcbd0a28018ba241905929910ce9d93b 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -493,7 +493,12 @@ class FileState {
* cannot be parsed, cannot correspond any file, etc.
*/
FileState _fileForRelativeUri(String relativeUri) {
- Uri absoluteUri = resolveRelativeUri(uri, Uri.parse(relativeUri));
+ Uri absoluteUri;
+ try {
+ absoluteUri = resolveRelativeUri(uri, Uri.parse(relativeUri));
+ } on FormatException {
+ return null;
+ }
return _fsState.getFileForUri(absoluteUri);
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/public_namespace_computer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698