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

Unified Diff: pkg/analyzer/lib/src/task/dart_work_manager.dart

Issue 1377613002: Fix for the libraries to parts map. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/task/dart_work_manager_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart_work_manager.dart
diff --git a/pkg/analyzer/lib/src/task/dart_work_manager.dart b/pkg/analyzer/lib/src/task/dart_work_manager.dart
index 5b66e0b6460e4d6eeac0bf57d490eab5fc8b9716..77c4a0ac488f632c106fbcefe3218c3760d211f9 100644
--- a/pkg/analyzer/lib/src/task/dart_work_manager.dart
+++ b/pkg/analyzer/lib/src/task/dart_work_manager.dart
@@ -265,13 +265,16 @@ class DartWorkManager implements WorkManager {
@override
void resultsComputed(
AnalysisTarget target, Map<ResultDescriptor, dynamic> outputs) {
+ bool isDartSource = _isDartSource(target);
// Organize sources.
- if (_isDartSource(target)) {
+ bool isDartLibrarySource = false;
+ if (isDartSource) {
Source source = target;
SourceKind kind = outputs[SOURCE_KIND];
if (kind != null) {
unknownSourceQueue.remove(source);
if (kind == SourceKind.LIBRARY) {
+ isDartLibrarySource = true;
if (context.prioritySources.contains(source)) {
_schedulePriorityLibrarySourceAnalysis(source);
} else {
@@ -284,7 +287,7 @@ class DartWorkManager implements WorkManager {
}
}
// Update parts in libraries.
- if (_isDartSource(target)) {
+ if (isDartLibrarySource) {
Source library = target;
List<Source> includedParts = outputs[INCLUDED_PARTS];
if (includedParts != null) {
@@ -300,7 +303,7 @@ class DartWorkManager implements WorkManager {
}
}
// Update notice.
- if (_isDartSource(target)) {
+ if (isDartSource) {
bool shouldSetErrors = false;
outputs.forEach((ResultDescriptor descriptor, value) {
if (descriptor == PARSED_UNIT && value != null) {
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_work_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698