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

Unified Diff: tracing/tracing/importer/find_input_expectations.html

Issue 2083213002: Change call-sites in trace viewer to use generators instead of iteration functions. (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: fix nits, rebase Created 4 years, 6 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
« no previous file with comments | « tracing/tracing/extras/tquery/tquery.html ('k') | tracing/tracing/importer/find_load_expectations.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/importer/find_input_expectations.html
diff --git a/tracing/tracing/importer/find_input_expectations.html b/tracing/tracing/importer/find_input_expectations.html
index c59cc6e2f369b07eb38f32be4ccf036f0807574d..36e77d32ba5f564ddb5e65041ebf6b54d0b09dab 100644
--- a/tracing/tracing/importer/find_input_expectations.html
+++ b/tracing/tracing/importer/find_input_expectations.html
@@ -133,22 +133,22 @@ tr.exportTo('tr.importer', function() {
var browserProcess = modelHelper.browserHelper.process;
var mainThread = browserProcess.findAtMostOneThreadNamed(
'CrBrowserMain');
- mainThread.asyncSliceGroup.iterateAllEvents(function(slice) {
+ for (var slice of mainThread.asyncSliceGroup.getDescendantEvents()) {
if (!slice.isTopLevel)
- return;
+ continue;
if (!(slice instanceof tr.e.cc.InputLatencyAsyncSlice))
- return;
+ continue;
// TODO(beaudoin): This should never happen but it does. Investigate
// the trace linked at in #1567 and remove that when it's fixed.
if (isNaN(slice.start) ||
isNaN(slice.duration) ||
isNaN(slice.end))
- return;
+ continue;
inputEvents.push(slice);
- });
+ }
return inputEvents.sort(compareEvents);
}
« no previous file with comments | « tracing/tracing/extras/tquery/tquery.html ('k') | tracing/tracing/importer/find_load_expectations.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698