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

Side by Side Diff: pkg/analyzer/lib/src/summary/public_namespace_computer.dart

Issue 2628303002: Fix for crash when part directive uri is has null value. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/compile_time_error_code_driver_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.summary.public_namespace_visitor; 5 library analyzer.src.summary.public_namespace_visitor;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/src/summary/format.dart'; 8 import 'package:analyzer/src/summary/format.dart';
9 import 'package:analyzer/src/summary/idl.dart'; 9 import 'package:analyzer/src/summary/idl.dart';
10 10
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 172
173 @override 173 @override
174 visitFunctionTypeAlias(FunctionTypeAlias node) { 174 visitFunctionTypeAlias(FunctionTypeAlias node) {
175 addNameIfPublic(node.name.name, ReferenceKind.typedef, 175 addNameIfPublic(node.name.name, ReferenceKind.typedef,
176 node.typeParameters?.typeParameters?.length ?? 0); 176 node.typeParameters?.typeParameters?.length ?? 0);
177 } 177 }
178 178
179 @override 179 @override
180 visitPartDirective(PartDirective node) { 180 visitPartDirective(PartDirective node) {
181 parts.add(node.uri.stringValue); 181 parts.add(node.uri.stringValue ?? '');
182 } 182 }
183 183
184 @override 184 @override
185 visitVariableDeclaration(VariableDeclaration node) { 185 visitVariableDeclaration(VariableDeclaration node) {
186 String name = node.name.name; 186 String name = node.name.name;
187 addNameIfPublic(name, ReferenceKind.topLevelPropertyAccessor, 0); 187 addNameIfPublic(name, ReferenceKind.topLevelPropertyAccessor, 0);
188 if (!node.isFinal && !node.isConst) { 188 if (!node.isFinal && !node.isConst) {
189 addNameIfPublic('$name=', ReferenceKind.topLevelPropertyAccessor, 0); 189 addNameIfPublic('$name=', ReferenceKind.topLevelPropertyAccessor, 0);
190 } 190 }
191 } 191 }
192 } 192 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/compile_time_error_code_driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698