Chromium Code Reviews| 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 a99cbebf283fbd1f90efff3f07513df32eeea9ba..b33ccd8efa912bf8520d959f105fdf01df9083dc 100644 |
| --- a/pkg/analysis_server/lib/src/analysis_server.dart |
| +++ b/pkg/analysis_server/lib/src/analysis_server.dart |
| @@ -661,7 +661,6 @@ class AnalysisServer { |
| * Perform the next available [ServerOperation]. |
| */ |
| void performOperation() { |
| - assert(performOperationPending); |
|
Paul Berry
2015/02/27 22:05:00
Why remove this assertion? AFAICT this invariant
scheglov
2015/02/28 01:34:35
I found the problem in my test code.
And you are r
|
| PerformanceTag.UNKNOWN.makeCurrent(); |
| performOperationPending = false; |
| if (!running) { |
| @@ -1030,18 +1029,21 @@ class AnalysisServer { |
| // source contents. |
| // TODO(scheglov) consider checking if there are subscriptions. |
| if (AnalysisEngine.isDartFileName(file)) { |
| - CompilationUnit dartUnit = |
| - context.ensureAnyResolvedDartUnit(source); |
| - if (dartUnit != null) { |
| + List<CompilationUnit> dartUnits = |
| + context.ensureResolvedDartUnits(source); |
| + if (dartUnits != null) { |
| AnalysisErrorInfo errorInfo = context.getErrors(source); |
| - scheduleNotificationOperations( |
| - this, |
| - file, |
| - errorInfo.lineInfo, |
| - context, |
| - null, |
| - dartUnit, |
| - errorInfo.errors); |
| + for (var dartUnit in dartUnits) { |
| + scheduleNotificationOperations( |
| + this, |
| + file, |
| + errorInfo.lineInfo, |
| + context, |
| + null, |
| + dartUnit, |
| + errorInfo.errors); |
| + scheduleIndexOperation(this, file, context, dartUnit); |
| + } |
| } else { |
| schedulePerformAnalysisOperation(context); |
| } |