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

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

Issue 752193002: fix broadcast streams (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/analysis_server/lib/src/analysis_server.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/engine.dart
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 3195e89e3de68b893c1daac28fc31b0de6660afd..958fda62caa244069fef8740de01e62fdadd2865 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -989,12 +989,6 @@ class AnalysisContextImpl implements InternalAnalysisContext {
StreamController<SourcesChangedEvent> _onSourcesChangedController;
/**
- * The stream that is notified when sources have been added or removed,
- * or the source's content has changed.
- */
- Stream<SourcesChangedEvent> _onSourcesChanged;
-
- /**
* The listeners that are to be notified when various analysis results are produced in this
* context.
*/
@@ -1010,8 +1004,8 @@ class AnalysisContextImpl implements InternalAnalysisContext {
AnalysisOptionsImpl.DEFAULT_CACHE_SIZE,
new AnalysisContextImpl_ContextRetentionPolicy(this));
_cache = createCacheFromSourceFactory(null);
- _onSourcesChangedController = new StreamController<SourcesChangedEvent>();
- _onSourcesChanged = _onSourcesChangedController.stream.asBroadcastStream();
+ _onSourcesChangedController =
+ new StreamController<SourcesChangedEvent>.broadcast();
}
@override
@@ -1239,7 +1233,8 @@ class AnalysisContextImpl implements InternalAnalysisContext {
}
@override
- Stream<SourcesChangedEvent> get onSourcesChanged => _onSourcesChanged;
+ Stream<SourcesChangedEvent> get onSourcesChanged =>
+ _onSourcesChangedController.stream;
@override
List<Source> get prioritySources => _priorityOrder;
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_server.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698