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

Side by Side Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2453773006: Clone SourceFactory to ensure that it does not bring a ContentAnalysis reference. (Closed)
Patch Set: Created 4 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 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 * The controller for the [status] stream. 170 * The controller for the [status] stream.
171 */ 171 */
172 final _statusController = new StreamController<AnalysisStatus>(); 172 final _statusController = new StreamController<AnalysisStatus>();
173 173
174 /** 174 /**
175 * The last status sent to the [status] stream. 175 * The last status sent to the [status] stream.
176 */ 176 */
177 AnalysisStatus _currentStatus = AnalysisStatus.IDLE; 177 AnalysisStatus _currentStatus = AnalysisStatus.IDLE;
178 178
179 AnalysisDriver(this._logger, this._resourceProvider, this._byteStore, 179 AnalysisDriver(this._logger, this._resourceProvider, this._byteStore,
180 this._contentCache, this._sourceFactory, this._analysisOptions) { 180 this._contentCache, SourceFactory sourceFactory, this._analysisOptions)
181 _sdkBundle = _sourceFactory.dartSdk.getLinkedBundle(); 181 : _sourceFactory = sourceFactory.clone() {
Brian Wilkerson 2016/10/31 13:16:57 It seems to me that this ought to be the responsib
182 _sdkBundle = sourceFactory.dartSdk.getLinkedBundle();
182 } 183 }
183 184
184 /** 185 /**
185 * Set the list of files that the driver should try to analyze sooner. 186 * Set the list of files that the driver should try to analyze sooner.
186 * 187 *
187 * Every path in the list must be absolute and normalized. 188 * Every path in the list must be absolute and normalized.
188 * 189 *
189 * The driver will produce the results through the [results] stream. The 190 * The driver will produce the results through the [results] stream. The
190 * exact order in which results are produced is not defined, neither 191 * exact order in which results are produced is not defined, neither
191 * between priority files, nor between priority and non-priority files. 192 * between priority files, nor between priority and non-priority files.
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 } 1197 }
1197 } 1198 }
1198 for (UnlinkedExportPublic export in unit.publicNamespace.exports) { 1199 for (UnlinkedExportPublic export in unit.publicNamespace.exports) {
1199 referenced.exported.add(export.uri); 1200 referenced.exported.add(export.uri);
1200 } 1201 }
1201 return referenced; 1202 return referenced;
1202 } 1203 }
1203 1204
1204 _ReferencedUris._(); 1205 _ReferencedUris._();
1205 } 1206 }
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