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

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 break/continue 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
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..f1333244a2d652c8dfcfc363126aa520ca815d02 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.descendantEvents()) {
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);
}

Powered by Google App Engine
This is Rietveld 408576698