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

Side by Side 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, 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:convert'; 5 import 'dart:convert';
6 import 'dart:typed_data'; 6 import 'dart:typed_data';
7 7
8 import 'package:analyzer/dart/ast/ast.dart'; 8 import 'package:analyzer/dart/ast/ast.dart';
9 import 'package:analyzer/dart/ast/token.dart'; 9 import 'package:analyzer/dart/ast/token.dart';
10 import 'package:analyzer/error/listener.dart'; 10 import 'package:analyzer/error/listener.dart';
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 } 486 }
487 487
488 @override 488 @override
489 String toString() => path; 489 String toString() => path;
490 490
491 /** 491 /**
492 * Return the [FileState] for the given [relativeUri], or `null` if the URI 492 * Return the [FileState] for the given [relativeUri], or `null` if the URI
493 * cannot be parsed, cannot correspond any file, etc. 493 * cannot be parsed, cannot correspond any file, etc.
494 */ 494 */
495 FileState _fileForRelativeUri(String relativeUri) { 495 FileState _fileForRelativeUri(String relativeUri) {
496 Uri absoluteUri = resolveRelativeUri(uri, Uri.parse(relativeUri)); 496 Uri absoluteUri;
497 try {
498 absoluteUri = resolveRelativeUri(uri, Uri.parse(relativeUri));
499 } on FormatException {
500 return null;
501 }
497 return _fsState.getFileForUri(absoluteUri); 502 return _fsState.getFileForUri(absoluteUri);
498 } 503 }
499 504
500 /** 505 /**
501 * Return `true` if the given byte lists are equal. 506 * Return `true` if the given byte lists are equal.
502 */ 507 */
503 static bool _equalByteLists(List<int> a, List<int> b) { 508 static bool _equalByteLists(List<int> a, List<int> b) {
504 if (a == null) { 509 if (a == null) {
505 return b == null; 510 return b == null;
506 } else if (b == null) { 511 } else if (b == null) {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 .where((f) => f._transitiveFiles == null) 711 .where((f) => f._transitiveFiles == null)
707 .toSet(); 712 .toSet();
708 } 713 }
709 714
710 Set<FileState> get filesWithoutTransitiveSignature { 715 Set<FileState> get filesWithoutTransitiveSignature {
711 return state._uriToFile.values 716 return state._uriToFile.values
712 .where((f) => f._transitiveSignature == null) 717 .where((f) => f._transitiveSignature == null)
713 .toSet(); 718 .toSet();
714 } 719 }
715 } 720 }
OLDNEW
« 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