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

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

Issue 2812673002: Add missing checks for null imported/exportedLibraries. (Closed)
Patch Set: Created 3 years, 8 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/element_resolver.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/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index ccfa988cb5533de362480dc8fe7e2e8e53811427..720c8f44d1354974821ede9e353c1e2adec09e44 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -2104,7 +2104,7 @@ class DeadCodeVerifier extends RecursiveAstVisitor<Object> {
LibraryElement library = exportElement.exportedLibrary;
if (library != null && !library.isSynthetic) {
for (Combinator combinator in node.combinators) {
- _checkCombinator(exportElement.exportedLibrary, combinator);
+ _checkCombinator(library, combinator);
}
}
}
@@ -4082,7 +4082,7 @@ class ImportsVerifier {
*/
void _addAdditionalLibrariesForExports(LibraryElement library,
ImportDirective importDirective, Set<LibraryElement> visitedLibraries) {
- if (!visitedLibraries.add(library)) {
+ if (library == null || !visitedLibraries.add(library)) {
return;
}
List<ExportElement> exports = library.exports;
« no previous file with comments | « pkg/analyzer/lib/src/generated/element_resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698