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

Unified Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 1188663006: watch for file system changes after context created (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 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 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/analysis_server/lib/src/context_manager.dart
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index 5085d24016ecb552507c47e5bba293ece3f2dab4..275df09683006d8a60a4122d29cb5731a3a57847 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -478,9 +478,14 @@ abstract class ContextManager {
info.changeSubscription = folder.changes.listen((WatchEvent event) {
_handleWatchEvent(folder, info, event);
});
- UriResolver packageUriResolver = _computePackageUriResolver(folder, info);
- info.context = addContext(folder, packageUriResolver);
- info.context.name = folder.path;
+ try {
+ UriResolver packageUriResolver = _computePackageUriResolver(folder, info);
+ info.context = addContext(folder, packageUriResolver);
+ info.context.name = folder.path;
+ } catch (_) {
+ info.changeSubscription.cancel();
+ rethrow;
+ }
return info;
}
« 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