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

Unified Diff: pkg/analyzer/lib/src/generated/source_io.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/generated/source_io.dart
diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
index ac08551871be087fefbf58cc18e942da9027dd5a..06211df7252cde81872ea95a13dd93847f5ef585 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -129,12 +129,9 @@ class FileBasedSource extends Source {
@override
TimestampedData<String> get contents {
- PerformanceTag prevTag = PerformanceStatistics.io.makeCurrent();
- try {
+ return PerformanceStatistics.io.makeCurrentWhile(() {
return contentsFromFile;
- } finally {
- prevTag.makeCurrent();
- }
+ });
}
/**

Powered by Google App Engine
This is Rietveld 408576698