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

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

Issue 2550093011: Fix race condition with 'knownFiles'. (Closed)
Patch Set: Created 4 years 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/test/src/dart/analysis/driver_test.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/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 54c526ec1f63a8f1b03779068ea39d16d236ec4a..d8e7ba244fab2309b9fbbab1a28cf053da77cb1f 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -278,7 +278,13 @@ class AnalysisDriver {
/**
* Return the set of files that are known, i.e. added or used implicitly.
*/
- Set<String> get knownFiles => _fsState.knownFilePaths;
+ Set<String> get knownFiles {
+ // TODO(scheglov) This method is invoked too often and the implementation
+ // is probably not the most efficient. Consider isKnownFile().
+ return new Set<String>()
+ ..addAll(_explicitFiles)
+ ..addAll(_fsState.knownFilePaths);
+ }
/**
* Return the list of files that the driver should try to analyze sooner.
« no previous file with comments | « no previous file | pkg/analyzer/test/src/dart/analysis/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698