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

Unified Diff: tracing/tracing/model/slice_group.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/model/slice.html ('k') | tracing/tracing/model/slice_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/slice_group.html
diff --git a/tracing/tracing/model/slice_group.html b/tracing/tracing/model/slice_group.html
index 34e0d68c27d845ade908438ea8909905c248ec6b..9c14e8bf54e424883d4bf264866fde6e436c2ba0 100644
--- a/tracing/tracing/model/slice_group.html
+++ b/tracing/tracing/model/slice_group.html
@@ -275,20 +275,16 @@ tr.exportTo('tr.model', function() {
return newSlice;
},
- findTopmostSlicesInThisContainer: function(eventPredicate, callback,
- opt_this) {
+ findTopmostSlicesInThisContainer: function*(eventPredicate, opt_this) {
if (!this.haveTopLevelSlicesBeenBuilt)
throw new Error('Nope');
- this.topLevelSlices.forEach(function(s) {
- s.findTopmostSlicesRelativeToThisSlice(eventPredicate, callback,
- opt_this);
- });
+ for (var s of this.topLevelSlices)
+ yield * s.findTopmostSlicesRelativeToThisSlice(eventPredicate);
},
- childEvents: function*(eventTypePredicate, opt_this) {
- if (eventTypePredicate.call(opt_this, this.sliceConstructor))
- yield * this.slices;
+ childEvents: function*() {
+ yield * this.slices;
},
childEventContainers: function*() {
« no previous file with comments | « tracing/tracing/model/slice.html ('k') | tracing/tracing/model/slice_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698