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

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

Issue 993723002: Don't schedule indexing operations if index is null. (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
« 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/operation/operation_analysis.dart
diff --git a/pkg/analysis_server/lib/src/operation/operation_analysis.dart b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
index 51725f7a7d448e8968fb5a5eebb1c73d58b301d3..e5f5edb17f12b987371667db400549f456144cad 100644
--- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart
+++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
@@ -24,7 +24,9 @@ import 'package:analyzer/src/generated/source.dart';
*/
void scheduleIndexOperation(AnalysisServer server, String file,
AnalysisContext context, CompilationUnit dartUnit) {
- server.addOperation(new _DartIndexOperation(context, file, dartUnit));
+ if (server.index != null) {
+ server.addOperation(new _DartIndexOperation(context, file, dartUnit));
+ }
}
/**
@@ -236,8 +238,7 @@ class PerformAnalysisOperation extends ServerOperation {
}
void _updateIndex(AnalysisServer server, List<ChangeNotice> notices) {
- Index index = server.index;
- if (index == null) {
+ if (server.index == null) {
return;
}
for (ChangeNotice notice in notices) {
« 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