Chromium Code Reviews| Index: pkg/analysis_server/lib/src/domain_completion.dart |
| diff --git a/pkg/analysis_server/lib/src/domain_completion.dart b/pkg/analysis_server/lib/src/domain_completion.dart |
| index affe17c46e87a27371072af69648e3c5025594a1..676b0f54e1a67927e2775b0357714cb23580f2ad 100644 |
| --- a/pkg/analysis_server/lib/src/domain_completion.dart |
| +++ b/pkg/analysis_server/lib/src/domain_completion.dart |
| @@ -177,6 +177,9 @@ class CompletionDomainHandler implements RequestHandler { |
| ContextSourcePair contextSource = server.getContextSourcePair(params.file); |
| AnalysisContext context = contextSource.context; |
| Source source = contextSource.source; |
| + if (!context.exists(source)) { |
|
scheglov
2015/03/30 21:10:48
Actually it is not guaranteed that AnalysisContext
danrubel
2015/03/30 21:40:48
Good catch. Fixed.
|
| + return new Response.unknownSource(request); |
| + } |
| recordRequest(performance, context, source, params.offset); |
| if (manager == null) { |
| manager = completionManagerFor(context, source); |