Chromium Code Reviews| Index: tracing/tracing/model/cpu.html |
| diff --git a/tracing/tracing/model/cpu.html b/tracing/tracing/model/cpu.html |
| index 0ded8a7a76a8139699ca99a024ebf97f2d9fb8fe..32ad367ffed1b6798ffeb8de50898b50abe11568 100644 |
| --- a/tracing/tracing/model/cpu.html |
| +++ b/tracing/tracing/model/cpu.html |
| @@ -51,7 +51,7 @@ tr.exportTo('tr.model', function() { |
| }; |
| Cpu.prototype = { |
| - __proto__: tr.model.ProcessBase.prototype, |
| + __proto__: tr.model.EventContainer.prototype, |
| get samples() { |
| return this.samples_; |
| @@ -61,23 +61,23 @@ tr.exportTo('tr.model', function() { |
| return 'CPU ' + this.cpuNumber; |
| }, |
| - findTopmostSlicesInThisContainer: function(eventPredicate, callback, |
| - opt_this) { |
| + // Inherit these functions from EventContainer, since this isn't |
|
charliea (OOO until 10-5)
2016/06/29 18:08:44
nit: this comment no longer applies, right?
alexandermont
2016/06/29 20:47:11
That is correct. Removed comment
|
| + // actually a subclass of EventContainer but we need to treat |
| + // it like one for iteration methods. |
| + |
| + findTopmostSlicesInThisContainer: function*(eventPredicate, opt_this) { |
| // All CpuSlices are toplevel since CpuSlices do not nest. |
| - this.slices.forEach(function(s) { |
| - s.findTopmostSlicesRelativeToThisSlice(eventPredicate, callback, |
| - opt_this); |
| - }); |
| + for (var s of slices) { |
| + yield * s.findTopmostSlicesRelativeToThisSlice( |
| + eventPredicate, opt_this); |
| + } |
| }, |
| - childEvents: function*(eventTypePredicate, opt_this) { |
| - if (eventTypePredicate.call(opt_this, tr.model.CpuSlice)) |
| - yield * this.slices; |
| + childEvents: function*() { |
| + yield * this.slices; |
| - if (this.samples_) { |
| - if (eventTypePredicate.call(opt_this, tr.model.Sample)) |
| - yield * this.samples_; |
| - } |
| + if (this.samples_) |
| + yield * this.samples_; |
| }, |
| childEventContainers: function*() { |