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

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

Issue 1709363003: Both unit and library sources must be isInSystemLibrary. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/summary_sdk.dart
diff --git a/pkg/analyzer/lib/src/summary/summary_sdk.dart b/pkg/analyzer/lib/src/summary/summary_sdk.dart
index 25caa9341536e0aa6cde66687fb71ceb5063ee4a..223d66afef0ee4568672daded774e9ef14a69a1c 100644
--- a/pkg/analyzer/lib/src/summary/summary_sdk.dart
+++ b/pkg/analyzer/lib/src/summary/summary_sdk.dart
@@ -50,7 +50,6 @@ class SdkSummaryResultProvider implements SummaryResultProvider {
if (target.source == null || !target.source.isInSystemLibrary) {
return false;
}
-// print('SummarySdkAnalysisContext: $result of $target');
// Constant expressions are always resolved in summaries.
if (result == CONSTANT_EXPRESSION_RESOLVED &&
target is ConstantEvaluationTarget) {
@@ -91,11 +90,14 @@ class SdkSummaryResultProvider implements SummaryResultProvider {
}
}
if (target is LibrarySpecificUnit) {
+ if (target.library == null || !target.library.isInSystemLibrary) {
+ return false;
+ }
if (result == COMPILATION_UNIT_ELEMENT) {
- String uri1 = target.library.uri.toString();
- String uri2 = target.unit.uri.toString();
- CompilationUnitElement unit = resynthesizer
- .getElement(new ElementLocationImpl.con3(<String>[uri1, uri2]));
+ String libraryUri = target.library.uri.toString();
+ String unitUri = target.unit.uri.toString();
+ CompilationUnitElement unit = resynthesizer.getElement(
+ new ElementLocationImpl.con3(<String>[libraryUri, unitUri]));
if (unit != null) {
entry.setValue(result, unit, TargetedResult.EMPTY_LIST);
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698