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

Unified Diff: pkg/analysis_server/lib/src/plugin/plugin_manager.dart

Issue 2836953002: Minor clean-up and bug fix (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
Index: pkg/analysis_server/lib/src/plugin/plugin_manager.dart
diff --git a/pkg/analysis_server/lib/src/plugin/plugin_manager.dart b/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
index 663443fe4724dc1198f928384ded90bb8fd60b3f..916131cadbb0ef9664bd31edb2ae9c2686d953d2 100644
--- a/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
+++ b/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
@@ -212,10 +212,12 @@ class PluginManager {
Future<Null> addPluginToContextRoot(
analyzer.ContextRoot contextRoot, String path) async {
PluginInfo plugin = _pluginMap[path];
- bool isNew = false;
- if (plugin == null) {
- isNew = true;
+ bool isNew = plugin == null;
+ if (isNew) {
List<String> pluginPaths = _pathsFor(path);
+ if (pluginPaths == null) {
+ return;
+ }
plugin = new PluginInfo(path, pluginPaths[0], pluginPaths[1],
notificationManager, instrumentationService);
_pluginMap[path] = plugin;
@@ -387,8 +389,9 @@ class PluginManager {
if (!packagesFile.exists) {
packagesFile = null;
}
+ } else {
+ packagesFile = null;
}
- packagesFile = null;
}
return <String>[pluginFile.path, packagesFile?.path];
}

Powered by Google App Engine
This is Rietveld 408576698