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

Unified Diff: pkg/analyzer/lib/src/summary/pub_summary.dart

Issue 2242963002: Add DartSdk.getLinkedBundle() and use it in PubSummaryManager. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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/analyzer/lib/src/generated/sdk_io.dart ('k') | pkg/analyzer/lib/src/summary/summary_sdk.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/pub_summary.dart
diff --git a/pkg/analyzer/lib/src/summary/pub_summary.dart b/pkg/analyzer/lib/src/summary/pub_summary.dart
index 83737a7a1cf6bd87889d31b42cb23ecc37c9d096..132fb4ef0881e9718204f284ed618ed52cfc66c2 100644
--- a/pkg/analyzer/lib/src/summary/pub_summary.dart
+++ b/pkg/analyzer/lib/src/summary/pub_summary.dart
@@ -224,14 +224,18 @@ class PubSummaryManager {
* its computation, so that it might be available later for other contexts
* referencing the same packages.
*/
- List<LinkedPubPackage> getLinkedBundles(
- AnalysisContext context, PackageBundle sdkBundle) {
+ List<LinkedPubPackage> getLinkedBundles(AnalysisContext context) {
+ PackageBundle sdkBundle = context.sourceFactory.dartSdk.getLinkedBundle();
+ if (sdkBundle == null) {
+ return const <LinkedPubPackage>[];
+ }
+
Map<PubPackage, PackageBundle> unlinkedBundles =
getUnlinkedBundles(context);
// If no unlinked bundles, there is nothing we can try to link.
if (unlinkedBundles.isEmpty) {
- return <LinkedPubPackage>[];
+ return const <LinkedPubPackage>[];
}
// Create graph nodes for packages.
« no previous file with comments | « pkg/analyzer/lib/src/generated/sdk_io.dart ('k') | pkg/analyzer/lib/src/summary/summary_sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698