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

Unified Diff: pkg/analysis_server/lib/src/operation/operation_queue.dart

Issue 1008443002: Cherry-pick r44373, r44378, and r44275. (Closed) Base URL: https://dart.googlecode.com/svn/trunk/dart
Patch Set: Created 5 years, 9 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/operation/operation_queue.dart
diff --git a/pkg/analysis_server/lib/src/operation/operation_queue.dart b/pkg/analysis_server/lib/src/operation/operation_queue.dart
index 7ea825759599e6e047531dc6ef25c9c6a66f3a3c..ced4a8c9e54f74c59d2c92e382f5b5fc6558d6b0 100644
--- a/pkg/analysis_server/lib/src/operation/operation_queue.dart
+++ b/pkg/analysis_server/lib/src/operation/operation_queue.dart
@@ -8,6 +8,7 @@ import 'dart:collection';
import 'package:analysis_server/src/analysis_server.dart';
import 'package:analysis_server/src/operation/operation.dart';
+import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/source.dart';
/**
@@ -51,6 +52,16 @@ class ServerOperationQueue {
}
/**
+ * The given [context] has been removed, so all pending operations that refer
+ * to it should be removed from the queue.
+ */
+ void contextRemoved(AnalysisContext context) {
+ for (Queue<ServerOperation> queue in _queues) {
+ queue.removeWhere((operation) => operation.context == context);
+ }
+ }
+
+ /**
* Return the next operation to perform, or `null` if the queue is empty.
* This method does not change the queue.
*/
« no previous file with comments | « pkg/analysis_server/lib/src/operation/operation_analysis.dart ('k') | pkg/analysis_server/test/analysis_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698