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

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

Issue 1844683002: Issue 26106. Don't attempt to incrementally resolve sources without contents. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« 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 bef1653e8ec325df92817dfb1479fd4aa5faa73f..d2659baf50c4ab302d1c92cf233bc72c992fd65e 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -1066,7 +1066,8 @@ class AnalysisContextImpl implements InternalAnalysisContext {
// If not the same content (e.g. the file is being closed without save),
// then force analysis.
if (changed) {
- if (!analysisOptions.incremental ||
+ if (newContents == null ||
+ !analysisOptions.incremental ||
!_tryPoorMansIncrementalResolution(source, newContents)) {
_sourceChanged(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