Index: tracing/tracing/model/helpers/chrome_browser_helper.html |
diff --git a/tracing/tracing/model/helpers/chrome_browser_helper.html b/tracing/tracing/model/helpers/chrome_browser_helper.html |
index 160a3262b51337ac313ba82119c8968516ab864d..12d42fdf88a1a53120131c75bf904aaaddc39368 100644 |
--- a/tracing/tracing/model/helpers/chrome_browser_helper.html |
+++ b/tracing/tracing/model/helpers/chrome_browser_helper.html |
@@ -18,8 +18,9 @@ tr.exportTo('tr.model.helpers', function() { |
function ChromeBrowserHelper(modelHelper, process) { |
tr.model.helpers.ChromeProcessHelper.call(this, modelHelper, process); |
this.mainThread_ = process.findAtMostOneThreadNamed('CrBrowserMain'); |
- if (!process.name) |
+ if (!process.name) { |
process.name = ChromeBrowserHelper.PROCESS_NAME; |
+ } |
} |
ChromeBrowserHelper.PROCESS_NAME = 'Browser'; |
@@ -65,14 +66,15 @@ tr.exportTo('tr.model.helpers', function() { |
get hasLatencyEvents() { |
var hasLatency = false; |
- for (var thread of this.modelHelper.model.getAllThreads()) |
+ for (var thread of this.modelHelper.model.getAllThreads()) { |
for (var event of thread.getDescendantEvents()) { |
- if (!event.isTopLevel) |
- continue; |
- if (!(event instanceof tr.e.cc.InputLatencyAsyncSlice)) |
+ if (!event.isTopLevel) continue; |
+ if (!(event instanceof tr.e.cc.InputLatencyAsyncSlice)) { |
continue; |
+ } |
hasLatency = true; |
} |
+ } |
return hasLatency; |
}, |
@@ -87,9 +89,11 @@ tr.exportTo('tr.model.helpers', function() { |
getAllAsyncSlicesMatching: function(pred, opt_this) { |
var events = []; |
this.iterAllThreads(function(thread) { |
- for (var slice of thread.getDescendantEvents()) |
- if (pred.call(opt_this, slice)) |
+ for (var slice of thread.getDescendantEvents()) { |
+ if (pred.call(opt_this, slice)) { |
events.push(slice); |
+ } |
+ } |
}); |
return events; |
}, |