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

Unified Diff: pkg/analysis_server/lib/src/services/index/store/split_store.dart

Issue 1168473003: Issue 23573. Catch exception during indexing. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Clean index information for the current Dart unit on exception. Created 5 years, 7 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
Index: pkg/analysis_server/lib/src/services/index/store/split_store.dart
diff --git a/pkg/analysis_server/lib/src/services/index/store/split_store.dart b/pkg/analysis_server/lib/src/services/index/store/split_store.dart
index 1859a410a65eb432b804176f68ccad87a914c1d5..ee5c3b8c37aa95502860c5d235b058f52372a794 100644
--- a/pkg/analysis_server/lib/src/services/index/store/split_store.dart
+++ b/pkg/analysis_server/lib/src/services/index/store/split_store.dart
@@ -696,6 +696,21 @@ class SplitIndexStore implements InternalIndexStore {
}
@override
+ void cancelIndexDart() {
+ if (_currentNode != null) {
+ // remove top-level information for the current node
+ for (Map<int, dynamic> nodeRelations in _topDeclarations.values) {
+ nodeRelations.remove(_currentNodeNameId);
+ }
+ // clear fields
+ _currentNodeName = null;
+ _currentNodeNameId = -1;
+ _currentNode = null;
+ _currentContextId = -1;
+ }
+ }
+
+ @override
void clear() {
_topDeclarations.clear();
_nodeManager.clear();

Powered by Google App Engine
This is Rietveld 408576698