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

Unified Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 647553006: Fix for missing LineInfo to SDK entries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « pkg/analysis_server/test/analysis/notification_navigation_test.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/engine.dart
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 7bd9320dcb422b59c3d10b7ea9a0cf1559c0abf7..145f799a7061a5e757d6e1df47eaba57988075e9 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -1539,12 +1539,13 @@ class AnalysisContextImpl implements InternalAnalysisContext {
while (iterator.moveNext()) {
SourceEntry sourceEntry = iterator.value;
if (sourceEntry is DartEntry) {
- if (!sourceEntry.isRefactoringSafe) {
- sources.add(iterator.key);
+ Source source = iterator.key;
+ if (!source.isInSystemLibrary && !sourceEntry.isRefactoringSafe) {
+ sources.add(source);
}
}
}
- return new List.from(sources);
+ return sources;
}
@override
@@ -11974,15 +11975,22 @@ class PartitionManager {
}
/**
- * Return the partition being used for the given SDK, creating the partition if necessary.
+ * Return the partition being used for the given SDK, creating the partition
+ * if necessary.
*
- * @param sdk the SDK for which a partition is being requested
- * @return the partition being used for the given SDK
+ * [sdk] - the SDK for which a partition is being requested.
*/
SdkCachePartition forSdk(DartSdk sdk) {
+ // Call sdk.context now, because when it creates a new
+ // InternalAnalysisContext instance, it calls forSdk() again, so creates an
+ // SdkCachePartition instance.
+ // So, if we initialize context after "partition == null", we end up
+ // with two SdkCachePartition instances.
+ InternalAnalysisContext sdkContext = sdk.context;
+ // Check cache for an existing partition.
SdkCachePartition partition = _sdkPartitions[sdk];
if (partition == null) {
- partition = new SdkCachePartition(sdk.context as InternalAnalysisContext, _DEFAULT_SDK_CACHE_SIZE);
+ partition = new SdkCachePartition(sdkContext, _DEFAULT_SDK_CACHE_SIZE);
_sdkPartitions[sdk] = partition;
}
return partition;
« no previous file with comments | « pkg/analysis_server/test/analysis/notification_navigation_test.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698