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

Unified Diff: pkg/analyzer/lib/src/task/driver.dart

Issue 988883004: Add CacheEntry.setErrorState(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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/task/driver.dart
diff --git a/pkg/analyzer/lib/src/task/driver.dart b/pkg/analyzer/lib/src/task/driver.dart
index e5dbb9d4739312b49ebe113769d758f0a44b5dae..6e1630e705460b0309428d8db3527210bf75ca79 100644
--- a/pkg/analyzer/lib/src/task/driver.dart
+++ b/pkg/analyzer/lib/src/task/driver.dart
@@ -191,10 +191,7 @@ class AnalysisDriver {
// Mark all of the results that the task would have computed as being in
// ERROR with the exception recorded on the work item.
CacheEntry targetEntry = context.getCacheEntry(item.target);
- targetEntry.exception = item.exception;
- for (ResultDescriptor result in item.descriptor.results) {
- targetEntry.setState(result, CacheState.ERROR);
- }
+ targetEntry.setErrorState(item.descriptor.results, item.exception);
return;
}
// Otherwise, perform the task.
@@ -210,10 +207,7 @@ class AnalysisDriver {
entry.setValue(result, outputs[result]);
}
} else {
- entry.exception = task.caughtException;
- for (ResultDescriptor result in task.descriptor.results) {
- entry.setState(result, CacheState.ERROR);
- }
+ entry.setErrorState(item.descriptor.results, task.caughtException);
}
_onTaskCompletedController.add(task);
}

Powered by Google App Engine
This is Rietveld 408576698