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

Unified Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1410813003: Reset AnalysisDriver after changes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index b2b22cf9673274e91bc3274c5f3d816b3ff04ae0..75335b6ec4ebf18b55ca725cf0aceade12a24ae3 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -1731,6 +1731,7 @@ class AnalysisContextImpl implements InternalAnalysisContext {
* that referenced the source before it existed.
*/
void _sourceAvailable(Source source) {
+ driver.reset();
// TODO(brianwilkerson) This method needs to check whether the source was
// previously being implicitly analyzed. If so, the cache entry needs to be
// update to reflect the new status and an event needs to be generated to
@@ -1807,6 +1808,7 @@ class AnalysisContextImpl implements InternalAnalysisContext {
}
entry.setState(CONTENT, CacheState.INVALID);
}
+ driver.reset();
for (WorkManager workManager in workManagers) {
workManager.applyChange(
Source.EMPTY_LIST, <Source>[source], Source.EMPTY_LIST);
@@ -1848,6 +1850,7 @@ class AnalysisContextImpl implements InternalAnalysisContext {
* Record that the given [source] has been removed.
*/
void _sourceRemoved(Source source) {
+ driver.reset();
_removeFromCache(source);
_removeFromPriorityOrder(source);
}
« no previous file with comments | « no previous file | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698