Chromium Code Reviews| 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. |
| * |