Chromium Code Reviews| 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..325ef09d0a866a96620ce3215fe933654a486416 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) { |
|
charliea (OOO until 10-5)
2016/06/29 18:08:44
What a weird function...
alexandermont
2016/06/29 20:47:11
Acknowledged, although I'm just translating the fu
|
| + if (eventPredicate(this)) { |
| + yield this; |
| + return; |
| } |
| + for (var s of this.subSlices) |
| + yield * s.findTopmostSlicesRelativeToThisSlice(eventPredicate); |
| }, |
| findDescendentSlice: function(targetTitle) { |