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

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

Issue 1214853028: One more fix for making removing overlays incremental changes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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/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 70871f9bbb7ebdc55fa428cf9db3bad75577d9f4..095c2938dc4489ac630e17ad90f1a7f48849d092 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -970,13 +970,12 @@ class AnalysisContextImpl implements InternalAnalysisContext {
// contents is the same as it was in the overlay.
try {
TimestampedData<String> fileContents = getContents(source);
- String fileContentsData = fileContents.data;
- if (fileContentsData == originalContents) {
- entry.setValue(CONTENT, fileContentsData, TargetedResult.EMPTY_LIST);
- entry.modificationTime = fileContents.modificationTime;
+ newContents = fileContents.data;
+ entry.modificationTime = fileContents.modificationTime;
+ if (newContents == originalContents) {
+ entry.setValue(CONTENT, newContents, TargetedResult.EMPTY_LIST);
changed = false;
}
- newContents = fileContentsData;
} catch (e) {}
// If not the same content (e.g. the file is being closed without save),
// then force analysis.
« no previous file with comments | « pkg/analysis_server/test/analysis/update_content_test.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698