From 5ad24d51851cd4967a787a455014f8f9744800b7 Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Fri, 28 Oct 2016 10:23:55 -0700 Subject: [PATCH] Clone SourceFactory to ensure that it does not bring a ContentAnalysis reference. TBR R=brianwilkerson@google.com, paulberry@google.com BUG= Review URL: https://codereview.chromium.org/2453773006 . --- pkg/analyzer/lib/src/dart/analysis/driver.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart index 69040333d01..6677376eb61 100644 --- a/pkg/analyzer/lib/src/dart/analysis/driver.dart +++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart @@ -177,8 +177,9 @@ class AnalysisDriver { AnalysisStatus _currentStatus = AnalysisStatus.IDLE; AnalysisDriver(this._logger, this._resourceProvider, this._byteStore, - this._contentCache, this._sourceFactory, this._analysisOptions) { - _sdkBundle = _sourceFactory.dartSdk.getLinkedBundle(); + this._contentCache, SourceFactory sourceFactory, this._analysisOptions) + : _sourceFactory = sourceFactory.clone() { + _sdkBundle = sourceFactory.dartSdk.getLinkedBundle(); } /**