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

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

Issue 1420613003: Keep cache entries for explicitly added sources. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/test/src/context/cache_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/cache.dart
diff --git a/pkg/analyzer/lib/src/context/cache.dart b/pkg/analyzer/lib/src/context/cache.dart
index 4535ca4ce1d4cea4079b9eafa45152bce0f267f5..4443dfaad38d423c09730c98fc92551fe97e4f19 100644
--- a/pkg/analyzer/lib/src/context/cache.dart
+++ b/pkg/analyzer/lib/src/context/cache.dart
@@ -565,8 +565,8 @@ class CacheEntry {
}
// Invalidate results that depend on this result.
_invalidateDependentResults(id, thisData, delta, level + 1);
- // If empty, remove the entry altogether.
- if (_resultMap.isEmpty) {
+ // If empty and not explicitly added, remove the entry altogether.
+ if (_resultMap.isEmpty && !explicitlyAdded) {
_partition._targetMap.remove(target);
_partition._removeIfSource(target);
}
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/cache_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698