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

Unified Diff: pkg/analysis_server/lib/src/domain_diagnostic.dart

Issue 1698093004: Throw a better exception for a modified analysis cache key (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/domain_diagnostic.dart
diff --git a/pkg/analysis_server/lib/src/domain_diagnostic.dart b/pkg/analysis_server/lib/src/domain_diagnostic.dart
index e9bd0c3b1af263f461cc82dfe2ceba17704384ce..94b1c3a5eff46c2599fcc96914286425203392f3 100644
--- a/pkg/analysis_server/lib/src/domain_diagnostic.dart
+++ b/pkg/analysis_server/lib/src/domain_diagnostic.dart
@@ -63,6 +63,10 @@ class DiagnosticDomainHandler implements RequestHandler {
AnalysisTarget target = iterator.key;
if (countedTargets.add(target)) {
CacheEntry cacheEntry = iterator.value;
+ if (cacheEntry == null) {
+ throw new StateError(
+ "mutated cache key detected: $target (${target.runtimeType})");
+ }
if (target is Source) {
if (cacheEntry.explicitlyAdded) {
explicitFiles++;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698