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

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

Issue 2549883002: Guard against null in EditDomain. (Closed)
Patch Set: Created 4 years 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 | pkg/analysis_server/lib/src/edit/edit_domain.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index c16ed6ba98cebcac5e3e576f2d7887ab8a1c1674..3c4eed06b798a10dfb643da5531d0ceffe68b2a4 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -330,7 +330,8 @@ class AnalysisServer {
final Set<String> priorityFiles = new Set<String>();
/**
- * The cached results units for [priorityFiles].
+ * The cached results for [priorityFiles].
+ * These results must have not `null` units.
*/
final Map<String, nd.AnalysisResult> priorityFileResults = {};
@@ -1813,7 +1814,8 @@ class ServerContextManagerCallbacks extends ContextManagerCallbacks {
// TODO(scheglov) send server status
});
analysisDriver.results.listen((result) {
- if (analysisServer.priorityFiles.contains(result.path)) {
+ if (analysisServer.priorityFiles.contains(result.path) &&
+ result.unit != null) {
analysisServer.priorityFileResults[result.path] = result;
}
_runDelayed(() {
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/edit/edit_domain.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698