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

Side by Side Diff: sdk/lib/developer/timeline.dart

Issue 1371353003: Fix error caught by analyzer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | 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 part of dart.developer; 5 part of dart.developer;
6 6
7 typedef dynamic TimelineSyncFunction(); 7 typedef dynamic TimelineSyncFunction();
8 8
9 /// Add to the timeline. 9 /// Add to the timeline.
10 class Timeline { 10 class Timeline {
(...skipping 23 matching lines...) Expand all
34 var block = _stack.removeLast(); 34 var block = _stack.removeLast();
35 // Close it. 35 // Close it.
36 block.close(); 36 block.close();
37 } 37 }
38 38
39 /// A utility method to time a synchronous [function]. Internally calls 39 /// A utility method to time a synchronous [function]. Internally calls
40 /// [function] bracketed by calls to [startSync] and [finishSync]. 40 /// [function] bracketed by calls to [startSync] and [finishSync].
41 static dynamic timeSync(String name, 41 static dynamic timeSync(String name,
42 TimelineSyncFunction function, 42 TimelineSyncFunction function,
43 {Map arguments}) { 43 {Map arguments}) {
44 beginSync(name, arguments: arguments); 44 startSync(name, arguments: arguments);
45 try { 45 try {
46 return function(); 46 return function();
47 } finally { 47 } finally {
48 finishSync(); 48 finishSync();
49 } 49 }
50 } 50 }
51 51
52 static final List<_SyncBlock> _stack = new List<_SyncBlock>(); 52 static final List<_SyncBlock> _stack = new List<_SyncBlock>();
53 } 53 }
54 54
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 /// Returns the current value from the trace clock. 95 /// Returns the current value from the trace clock.
96 external int _getTraceClock(); 96 external int _getTraceClock();
97 97
98 /// Reports a complete synchronous event. 98 /// Reports a complete synchronous event.
99 external void _reportCompleteEvent(int start, 99 external void _reportCompleteEvent(int start,
100 int end, 100 int end,
101 String category, 101 String category,
102 String name, 102 String name,
103 String argumentsAsJson); 103 String argumentsAsJson);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698