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

Unified Diff: pkg/analyzer/lib/task/model.dart

Issue 2050573003: Issue 26629. Detect cache inconsistency in GetContentTask. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 | « pkg/analyzer/lib/src/task/general.dart ('k') | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/task/model.dart
diff --git a/pkg/analyzer/lib/task/model.dart b/pkg/analyzer/lib/task/model.dart
index dd1062fc9f067fe46da68cdb94428656c1d56b27..be39c04335521bc5a7a18535aba50857bd51c59c 100644
--- a/pkg/analyzer/lib/task/model.dart
+++ b/pkg/analyzer/lib/task/model.dart
@@ -335,6 +335,8 @@ abstract class AnalysisTask {
// }
} on AnalysisException {
rethrow;
+ } on ModificationTimeMismatchError {
+ rethrow;
} catch (exception, stackTrace) {
throw new AnalysisException(
'Unexpected exception while performing $description',
@@ -423,6 +425,18 @@ abstract class MapTaskInput<K, V> implements TaskInput<Map<K, V>> {
}
/**
+ * Instances of this class are thrown when a task detects that the modification
+ * time of a cache entry is not the same as the actual modification time. This
+ * means that any analysis results based on the content of the target cannot be
+ * used anymore and must be invalidated.
+ */
+class ModificationTimeMismatchError {
+ final AnalysisTarget target;
Brian Wilkerson 2016/06/08 22:21:55 I suspect this will always be a Source, but the ex
+
+ ModificationTimeMismatchError(this.target);
+}
+
+/**
* A policy object that can compute sizes of results and provide the maximum
* active and idle sizes that can be kept in the cache.
*
« no previous file with comments | « pkg/analyzer/lib/src/task/general.dart ('k') | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698