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

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

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase Created 3 years, 9 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/selectable_item.html ('k') | tracing/tracing/model/slice_group.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/slice.html
diff --git a/tracing/tracing/model/slice.html b/tracing/tracing/model/slice.html
index d8cc02e6fa320fccd5d7605139e4389cbcd14f95..5320053a56dd473589a171c96e26296855960220 100644
--- a/tracing/tracing/model/slice.html
+++ b/tracing/tracing/model/slice.html
@@ -53,17 +53,21 @@ tr.exportTo('tr.model', function() {
// After SliceGroup processes Slices, isTopLevel should be equivalent to
// !parentSlice.
- if (opt_duration !== undefined)
+ if (opt_duration !== undefined) {
this.duration = opt_duration;
+ }
- if (opt_cpuStart !== undefined)
+ if (opt_cpuStart !== undefined) {
this.cpuStart = opt_cpuStart;
+ }
- if (opt_cpuDuration !== undefined)
+ if (opt_cpuDuration !== undefined) {
this.cpuDuration = opt_cpuDuration;
+ }
- if (opt_argsStripped !== undefined)
+ if (opt_argsStripped !== undefined) {
this.argsStripped = true;
+ }
}
Slice.prototype = {
@@ -90,12 +94,14 @@ tr.exportTo('tr.model', function() {
},
findDescendentSlice: function(targetTitle) {
- if (!this.subSlices)
+ if (!this.subSlices) {
return undefined;
+ }
for (var i = 0; i < this.subSlices.length; i++) {
- if (this.subSlices[i].title === targetTitle)
+ if (this.subSlices[i].title === targetTitle) {
return this.subSlices[i];
+ }
var slice = this.subSlices[i].findDescendentSlice(targetTitle);
if (slice) return slice;
}
@@ -104,23 +110,26 @@ tr.exportTo('tr.model', function() {
get mostTopLevelSlice() {
var curSlice = this;
- while (curSlice.parentSlice)
+ while (curSlice.parentSlice) {
curSlice = curSlice.parentSlice;
+ }
return curSlice;
},
getProcess: function() {
var thread = this.parentContainer;
- if (thread && thread.getProcess)
+ if (thread && thread.getProcess) {
return thread.getProcess();
+ }
return undefined;
},
get model() {
var process = this.getProcess();
- if (process !== undefined)
+ if (process !== undefined) {
return this.getProcess().model;
+ }
return undefined;
},
@@ -147,8 +156,9 @@ tr.exportTo('tr.model', function() {
yield this;
return;
}
- for (var s of this.subSlices)
+ for (var s of this.subSlices) {
yield* s.findTopmostSlicesRelativeToThisSlice(eventPredicate);
+ }
},
/**
@@ -185,10 +195,11 @@ tr.exportTo('tr.model', function() {
while (parentStack.length !== 0) {
var curSlice = parentStack.pop();
- if (started)
+ if (started) {
callback.call(opt_this, curSlice);
- else
+ } else {
started = (curSlice.guid === this.guid);
+ }
for (var i = curSlice.subSlices.length - 1; i >= 0; i--) {
parentStack.push(curSlice.subSlices[i]);
@@ -226,8 +237,9 @@ tr.exportTo('tr.model', function() {
get ancestorSlices() {
var res = [];
- for (var slice of this.enumerateAllAncestors())
+ for (var slice of this.enumerateAllAncestors()) {
res.push(slice);
+ }
return res;
},
@@ -262,8 +274,9 @@ tr.exportTo('tr.model', function() {
res.push(this);
- for (var aSlice of this.enumerateAllAncestors())
+ for (var aSlice of this.enumerateAllAncestors()) {
res.push(aSlice);
+ }
this.iterateAllSubsequentSlices(function(sSlice) {
res.push(sSlice);
@@ -273,16 +286,19 @@ tr.exportTo('tr.model', function() {
},
enumerateAllDescendents: function* () {
- for (var slice of this.subSlices)
+ for (var slice of this.subSlices) {
yield slice;
- for (var slice of this.subSlices)
+ }
+ for (var slice of this.subSlices) {
yield* slice.enumerateAllDescendents();
+ }
},
get descendentSlices() {
var res = [];
- for (var slice of this.enumerateAllDescendents())
+ for (var slice of this.enumerateAllDescendents()) {
res.push(slice);
+ }
return res;
}
« no previous file with comments | « tracing/tracing/model/selectable_item.html ('k') | tracing/tracing/model/slice_group.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698