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

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

Issue 2526363002: Fix for search references when the element is null. (Closed)
Patch Set: Created 4 years, 1 month 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/test/search/abstract_search_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/search/search_domain.dart
diff --git a/pkg/analysis_server/lib/src/search/search_domain.dart b/pkg/analysis_server/lib/src/search/search_domain.dart
index 765598708a8532129a7ec3614e578b85d884960a..903132576b9eefdbaf4cfcfc24d808f395a863d8 100644
--- a/pkg/analysis_server/lib/src/search/search_domain.dart
+++ b/pkg/analysis_server/lib/src/search/search_domain.dart
@@ -75,10 +75,12 @@ class SearchDomainHandler implements protocol.RequestHandler {
}
_sendSearchResult(request, result);
// search elements
- var computer = new ElementReferencesComputer(searchEngine);
- List<protocol.SearchResult> results =
- await computer.compute(element, params.includePotential);
- _sendSearchNotification(searchId, true, results);
+ if (element != null) {
+ var computer = new ElementReferencesComputer(searchEngine);
+ List<protocol.SearchResult> results =
+ await computer.compute(element, params.includePotential);
+ _sendSearchNotification(searchId, true, results);
Brian Wilkerson 2016/11/28 16:40:15 If element is null, will we still send a search no
scheglov 2016/11/28 16:49:40 We don't need to. According to the protocol: "If
+ }
}
Future findMemberDeclarations(protocol.Request request) async {
« no previous file with comments | « no previous file | pkg/analysis_server/test/search/abstract_search_domain.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698