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

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

Issue 1180673008: Create LibraryElement with SDK context for SDK sources. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rollback model.dart change. Created 5 years, 6 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_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.dart
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index 810e1097cdf7bb06ac5d71de235a3fa4434357a3..e8443f87e0a9e61b75b5d019f4b110562fc7ffd2 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -1420,8 +1420,13 @@ class BuildLibraryElementTask extends SourceBasedAnalysisTask {
//
// Create and populate the library element.
//
+ AnalysisContext owningContext = context;
+ if (context is InternalAnalysisContext) {
+ InternalAnalysisContext internalContext = context;
+ owningContext = internalContext.getContextFor(librarySource);
+ }
LibraryElementImpl libraryElement =
- new LibraryElementImpl.forNode(context, libraryNameNode);
+ new LibraryElementImpl.forNode(owningContext, libraryNameNode);
libraryElement.definingCompilationUnit = definingCompilationUnitElement;
libraryElement.entryPoint = entryPoint;
libraryElement.parts = sourcedCompilationUnits;
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698