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

Unified Diff: pkg/analysis_server/lib/src/domain_execution.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/analysis_server/lib/src/domain_execution.dart
diff --git a/pkg/analysis_server/lib/src/domain_execution.dart b/pkg/analysis_server/lib/src/domain_execution.dart
index 18e8fef0c5eb07a581eefdc0823e92e3228be8ee..3e5d28cffd8ca17e52365a9adb794b4e0deb248f 100644
--- a/pkg/analysis_server/lib/src/domain_execution.dart
+++ b/pkg/analysis_server/lib/src/domain_execution.dart
@@ -13,7 +13,6 @@ import 'package:analysis_server/src/protocol.dart';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
/**
* Instances of the class [ExecutionDomainHandler] implement a [RequestHandler]
@@ -159,9 +158,7 @@ class ExecutionDomainHandler implements RequestHandler {
}
void _fileAnalyzed(ChangeNotice notice) {
- PerformanceTag prevTag =
- ServerPerformanceStatistics.executionNotifications.makeCurrent();
- try {
+ ServerPerformanceStatistics.executionNotifications.makeCurrentWhile(() {
Source source = notice.source;
String filePath = source.fullName;
if (!_isInAnalysisRoot(filePath)) {
@@ -187,9 +184,7 @@ class ExecutionDomainHandler implements RequestHandler {
filePath,
referencedFiles: _getFullNames(libraries)).toNotification());
}
- } finally {
- prevTag.makeCurrent();
- }
+ });
}
/**

Powered by Google App Engine
This is Rietveld 408576698