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

Unified Diff: tracing/tracing/model/async_slice.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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/metrics/v8/v8_metrics.html ('k') | tracing/tracing/model/async_slice_group.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/async_slice.html
diff --git a/tracing/tracing/model/async_slice.html b/tracing/tracing/model/async_slice.html
index 28aa8977f6d060c33637097acf401961ddac3fd7..45ea88a08263d9933615bcd6a371d28de0ac882c 100644
--- a/tracing/tracing/model/async_slice.html
+++ b/tracing/tracing/model/async_slice.html
@@ -103,16 +103,13 @@ tr.exportTo('tr.model', function() {
parentAsyncSliceGroup.slices.indexOf(this);
},
- findTopmostSlicesRelativeToThisSlice: function(eventPredicate, callback,
- opt_this) {
- if (eventPredicate(this))
- callback.call(opt_this, this);
- else {
- this.subSlices.forEach(function(s) {
- s.findTopmostSlicesRelativeToThisSlice(eventPredicate, callback,
- opt_this);
- });
+ findTopmostSlicesRelativeToThisSlice: function*(eventPredicate, opt_this) {
+ if (eventPredicate(this)) {
+ yield this;
+ return;
}
+ for (var s of this.subSlices)
+ yield * s.findTopmostSlicesRelativeToThisSlice(eventPredicate);
},
findDescendentSlice: function(targetTitle) {
@@ -128,11 +125,11 @@ tr.exportTo('tr.model', function() {
return undefined;
},
- iterateAllDescendents: function(callback, opt_this) {
- this.subSlices.forEach(callback, opt_this);
- this.subSlices.forEach(function(subSlice) {
- subSlice.iterateAllDescendents(callback, opt_this);
- }, opt_this);
+ enumerateAllDescendents: function*() {
+ for (var slice of this.subSlices)
+ yield slice;
+ for (var slice of this.subSlices)
+ yield * slice.enumerateAllDescendents();
},
compareTo: function(that) {
« no previous file with comments | « tracing/tracing/metrics/v8/v8_metrics.html ('k') | tracing/tracing/model/async_slice_group.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698