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

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

Issue 2032893002: Fix two build failures - for typeProvider and findElement. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/services/search/search_engine_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7bc59b615db73673e25882fb75f011e85c8be637..5ed44ecda880c34ae8d485c9da20d61327e6940a 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -466,6 +466,11 @@ class AnalysisContextImpl implements InternalAnalysisContext {
@override
TypeProvider get typeProvider {
+ // The `AnalysisContextTarget.request` results to into the SDK partition,
Paul Berry 2016/06/02 12:09:35 "to" -> "go"
+ // and the TYPE_PROVIDER result is computed and put into the SDK partition
+ // only by the first non-SDK analysis context. So, in order to reuse it
+ // in other analysis context, we need to ask it from the cache.
Paul Berry 2016/06/02 12:09:36 "in other analysis context, we need to ask it" ->
+ _typeProvider ??= getResult(AnalysisContextTarget.request, TYPE_PROVIDER);
if (_typeProvider != null) {
return _typeProvider;
}
« no previous file with comments | « pkg/analysis_server/test/services/search/search_engine_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698