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

Side by Side Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 2917453002: Fix an npe in context_manager.dart. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:convert'; 7 import 'dart:convert';
8 import 'dart:core'; 8 import 'dart:core';
9 9
10 import 'package:analysis_server/src/analysis_server.dart'; 10 import 'package:analysis_server/src/analysis_server.dart';
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 1037
1038 void _checkForPackagespecUpdate( 1038 void _checkForPackagespecUpdate(
1039 String path, ContextInfo info, Folder folder) { 1039 String path, ContextInfo info, Folder folder) {
1040 // Check to see if this is the .packages file for this context and if so, 1040 // Check to see if this is the .packages file for this context and if so,
1041 // update the context's source factory. 1041 // update the context's source factory.
1042 if (absolutePathContext.basename(path) == PACKAGE_SPEC_NAME) { 1042 if (absolutePathContext.basename(path) == PACKAGE_SPEC_NAME) {
1043 String contextRoot = info.folder.path; 1043 String contextRoot = info.folder.path;
1044 ContextBuilder builder = 1044 ContextBuilder builder =
1045 callbacks.createContextBuilder(info.folder, defaultContextOptions); 1045 callbacks.createContextBuilder(info.folder, defaultContextOptions);
1046 AnalysisOptions options = builder.getAnalysisOptions(contextRoot, 1046 AnalysisOptions options = builder.getAnalysisOptions(contextRoot,
1047 contextRoot: info.analysisDriver.contextRoot); 1047 contextRoot: info?.analysisDriver?.contextRoot);
Brian Wilkerson 2017/05/30 21:39:47 It would be good to understand why the info is nul
1048 SourceFactory factory = builder.createSourceFactory(contextRoot, options); 1048 SourceFactory factory = builder.createSourceFactory(contextRoot, options);
1049 if (enableNewAnalysisDriver) { 1049 if (enableNewAnalysisDriver) {
1050 AnalysisDriver driver = info.analysisDriver; 1050 AnalysisDriver driver = info.analysisDriver;
1051 driver.configure(analysisOptions: options, sourceFactory: factory); 1051 driver.configure(analysisOptions: options, sourceFactory: factory);
1052 } else { 1052 } else {
1053 info.context.analysisOptions = options; 1053 info.context.analysisOptions = options;
1054 info.context.sourceFactory = factory; 1054 info.context.sourceFactory = factory;
1055 } 1055 }
1056 } 1056 }
1057 } 1057 }
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1974 } 1974 }
1975 return _embedderLocator; 1975 return _embedderLocator;
1976 } 1976 }
1977 1977
1978 @override 1978 @override
1979 SdkExtensionFinder getSdkExtensionFinder(ResourceProvider resourceProvider) { 1979 SdkExtensionFinder getSdkExtensionFinder(ResourceProvider resourceProvider) {
1980 return _sdkExtensionFinder ??= 1980 return _sdkExtensionFinder ??=
1981 new SdkExtensionFinder(buildPackageMap(resourceProvider)); 1981 new SdkExtensionFinder(buildPackageMap(resourceProvider));
1982 } 1982 }
1983 } 1983 }
OLDNEW
« 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