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

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

Issue 668763002: Issue 21238. Fix for NPE in occurrences computer when FieldFormalParameterElement references unreso… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 | pkg/analysis_server/test/analysis/notification_occurrences_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/computer/computer_occurrences.dart
diff --git a/pkg/analysis_server/lib/src/computer/computer_occurrences.dart b/pkg/analysis_server/lib/src/computer/computer_occurrences.dart
index a4d53e0bfcc9de4d58737a556bbab110cac8a1a0..d1c941f9cf27aa1427ed6b7a3a20101d8b1658a1 100644
--- a/pkg/analysis_server/lib/src/computer/computer_occurrences.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_occurrences.dart
@@ -37,10 +37,10 @@ class DartUnitOccurrencesComputer {
}
void _addOccurrence(Element element, int offset) {
+ element = _canonicalizeElement(element);
if (element == null || element == DynamicElementImpl.instance) {
return;
}
- element = _canonicalizeElement(element);
List<int> offsets = _elementsOffsets[element];
if (offsets == null) {
offsets = <int>[];
« no previous file with comments | « no previous file | pkg/analysis_server/test/analysis/notification_occurrences_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698