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

Unified Diff: pkg/analyzer/lib/src/services/lint.dart

Issue 954013002: Replace try/finally with PerformanceTag.makeCurrentWhile(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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
Index: pkg/analyzer/lib/src/services/lint.dart
diff --git a/pkg/analyzer/lib/src/services/lint.dart b/pkg/analyzer/lib/src/services/lint.dart
index de6a4b4ec81a3b9ddaaae65561c67e51b76bec6f..829b3710473cd51fdf1117c4b7fc712fc161c981 100644
--- a/pkg/analyzer/lib/src/services/lint.dart
+++ b/pkg/analyzer/lib/src/services/lint.dart
@@ -42,16 +42,13 @@ class LintGenerator {
: _linters = linters != null ? linters : LINTERS;
void generate() {
- PerformanceTag prevTag = PerformanceStatistics.lint.makeCurrent();
- try {
+ PerformanceStatistics.lint.makeCurrentWhile(() {
_compilationUnits.forEach((cu) {
if (cu.element != null) {
_generate(cu, cu.element.source);
}
});
- } finally {
- prevTag.makeCurrent();
- }
+ });
}
void _generate(CompilationUnit unit, Source source) {

Powered by Google App Engine
This is Rietveld 408576698