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

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

Issue 1408393007: Possible fix for a null-pointer problem (Closed) Base URL: https://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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index b27fa19e584a61015a01e2805bb5705144285402..2ae9062889e1153e1cb498897b8ba929f8ff86e6 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -1517,7 +1517,9 @@ class AnalysisContextImpl implements InternalAnalysisContext {
CacheEntry cacheEntry = _cache.get(target);
List<PendingFuture> pendingFutures = _pendingFutureTargets[target];
for (int i = 0; i < pendingFutures.length;) {
- if (pendingFutures[i].evaluate(cacheEntry)) {
+ if (cacheEntry == null) {
+ pendingFutures[i].forciblyComplete();
Paul Berry 2015/10/21 17:57:34 After this line, add: pendingFutures.removeAt(i);
Brian Wilkerson 2015/10/21 18:05:01 Good catch! Done.
Leaf 2015/10/21 18:15:47 This is the same location that I was generally see
+ } else if (pendingFutures[i].evaluate(cacheEntry)) {
pendingFutures.removeAt(i);
} else {
i++;
« 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