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

Side by Side Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1211993004: Dispose private cache partition on AnalysisContext.dispose(). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.dart ('k') | pkg/analyzer/test/src/context/cache_test.dart » ('j') | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library analyzer.src.context.context; 5 library analyzer.src.context.context;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/instrumentation/instrumentation.dart'; 10 import 'package:analyzer/instrumentation/instrumentation.dart';
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 671
672 @override 672 @override
673 void dispose() { 673 void dispose() {
674 _disposed = true; 674 _disposed = true;
675 for (List<PendingFuture> pendingFutures in _pendingFutureTargets.values) { 675 for (List<PendingFuture> pendingFutures in _pendingFutureTargets.values) {
676 for (PendingFuture pendingFuture in pendingFutures) { 676 for (PendingFuture pendingFuture in pendingFutures) {
677 pendingFuture.forciblyComplete(); 677 pendingFuture.forciblyComplete();
678 } 678 }
679 } 679 }
680 _pendingFutureTargets.clear(); 680 _pendingFutureTargets.clear();
681 _privatePartition.dispose();
681 } 682 }
682 683
683 @override 684 @override
684 List<CompilationUnit> ensureResolvedDartUnits(Source unitSource) { 685 List<CompilationUnit> ensureResolvedDartUnits(Source unitSource) {
685 // Check every library. 686 // Check every library.
686 List<CompilationUnit> units = <CompilationUnit>[]; 687 List<CompilationUnit> units = <CompilationUnit>[];
687 List<Source> containingLibraries = getLibrariesContaining(unitSource); 688 List<Source> containingLibraries = getLibrariesContaining(unitSource);
688 for (Source librarySource in containingLibraries) { 689 for (Source librarySource in containingLibraries) {
689 LibrarySpecificUnit target = 690 LibrarySpecificUnit target =
690 new LibrarySpecificUnit(librarySource, unitSource); 691 new LibrarySpecificUnit(librarySource, unitSource);
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 new PendingFuture<T>(_context, target, computeValue); 2023 new PendingFuture<T>(_context, target, computeValue);
2023 if (!pendingFuture.evaluate(entry)) { 2024 if (!pendingFuture.evaluate(entry)) {
2024 _context._pendingFutureTargets 2025 _context._pendingFutureTargets
2025 .putIfAbsent(target, () => <PendingFuture>[]) 2026 .putIfAbsent(target, () => <PendingFuture>[])
2026 .add(pendingFuture); 2027 .add(pendingFuture);
2027 scheduleComputation(); 2028 scheduleComputation();
2028 } 2029 }
2029 return pendingFuture.future; 2030 return pendingFuture.future;
2030 } 2031 }
2031 } 2032 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.dart ('k') | pkg/analyzer/test/src/context/cache_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698