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

Unified Diff: pkg/analyzer/lib/src/context/context.dart

Issue 2610063004: Add ContentCache.getExists() and use it in AnalysisContextImpl.exists(). (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/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 4f055910a64168ea74047283ffc56ab438a1dcbe..c2c2ec0c47f0a7a1d3149c12a4b5e6793a061831 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -810,8 +810,9 @@ class AnalysisContextImpl implements InternalAnalysisContext {
if (source == null) {
return false;
}
- if (_contentCache.getContents(source) != null) {
- return true;
+ bool overriddenExists = _contentCache.getExists(source);
+ if (overriddenExists != null) {
Paul Berry 2017/01/04 18:28:57 Assuming you accept my proposal below, I think lin
+ return overriddenExists;
}
return source.exists();
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/source.dart » ('j') | pkg/analyzer/lib/src/generated/source.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698