Chromium Code Reviews| Index: tracing/tracing/model/helpers/chrome_browser_helper.html |
| diff --git a/tracing/tracing/model/helpers/chrome_browser_helper.html b/tracing/tracing/model/helpers/chrome_browser_helper.html |
| index 0e6d295a471f1639c06528ca317fe0c579a3ee9a..90e29feb774afb39f8b8974a4e683174511a6c18 100644 |
| --- a/tracing/tracing/model/helpers/chrome_browser_helper.html |
| +++ b/tracing/tracing/model/helpers/chrome_browser_helper.html |
| @@ -56,18 +56,12 @@ tr.exportTo('tr.model.helpers', function() { |
| }, |
| get hasLatencyEvents() { |
| - var hasLatency = false; |
| - this.modelHelper.model.getAllThreads().some(function(thread) { |
| - thread.iterateAllEvents(function(event) { |
| - if (!event.isTopLevel) |
| - return; |
| - if (!(event instanceof tr.e.cc.InputLatencyAsyncSlice)) |
| - return; |
| - hasLatency = true; |
| - }); |
| - return hasLatency; |
| - }); |
| - return hasLatency; |
| + for (var thread of this.modelHelper.model.getAllThreads()) |
|
charliea (OOO until 10-5)
2016/06/29 18:08:44
see note earlier: in a CL this big, we should do a
alexandermont
2016/06/29 20:47:11
Done
|
| + for (var event of thread.descendantEvents()) |
| + if (event.isTopLevel) |
| + if (event instanceof tr.e.cc.InputLatencyAsyncSlice) |
| + return true; |
| + return false; |
| }, |
| getLatencyEventsInRange: function(rangeOfInterest) { |
| @@ -81,10 +75,9 @@ tr.exportTo('tr.model.helpers', function() { |
| getAllAsyncSlicesMatching: function(pred, opt_this) { |
| var events = []; |
| this.iterAllThreads(function(thread) { |
| - thread.iterateAllEvents(function(slice) { |
| + for (var slice of thread.descendantEvents()) |
| if (pred.call(opt_this, slice)) |
| events.push(slice); |
| - }); |
| }); |
| return events; |
| }, |