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

Unified Diff: tracing/tracing/model/user_model/user_expectation.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: Fix test 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
Index: tracing/tracing/model/user_model/user_expectation.html
diff --git a/tracing/tracing/model/user_model/user_expectation.html b/tracing/tracing/model/user_model/user_expectation.html
index 6641dbac2541f5b10c6b0684307811915cf7c263..5ec70cc0a23d5fc0278fe0fed8bc00e2ca09579e 100644
--- a/tracing/tracing/model/user_model/user_expectation.html
+++ b/tracing/tracing/model/user_model/user_expectation.html
@@ -51,20 +51,23 @@ tr.exportTo('tr.model.um', function() {
computeCompoundEvenSelectionState: function(selection) {
var cess = CompoundEventSelectionState.NOT_SELECTED;
- if (selection.contains(this))
+ if (selection.contains(this)) {
cess |= CompoundEventSelectionState.EVENT_SELECTED;
+ }
- if (this.associatedEvents.intersectionIsEmpty(selection))
+ if (this.associatedEvents.intersectionIsEmpty(selection)) {
return cess;
+ }
var allContained = this.associatedEvents.every(function(event) {
return selection.contains(event);
});
- if (allContained)
+ if (allContained) {
cess |= CompoundEventSelectionState.ALL_ASSOCIATED_EVENTS_SELECTED;
- else
+ } else {
cess |= CompoundEventSelectionState.SOME_ASSOCIATED_EVENTS_SELECTED;
+ }
return cess;
},
@@ -72,8 +75,9 @@ tr.exportTo('tr.model.um', function() {
get associatedSamples() {
var samples = new tr.model.EventSet();
this.associatedEvents.forEach(function(event) {
- if (event instanceof tr.model.ThreadSlice)
+ if (event instanceof tr.model.ThreadSlice) {
samples.addEventSet(event.overlappingSamples);
+ }
});
return samples;
},
@@ -97,8 +101,9 @@ tr.exportTo('tr.model.um', function() {
// constructor in that prototype object!
// http://javascript.info/tutorial/constructor
- if (!this.typeInfo_)
+ if (!this.typeInfo_) {
throw new Error('Unregistered UserExpectation');
+ }
return this.typeInfo_;
},
@@ -116,8 +121,9 @@ tr.exportTo('tr.model.um', function() {
},
get title() {
- if (!this.initiatorType)
+ if (!this.initiatorType) {
return this.stageTitle;
+ }
return this.initiatorType + ' ' + this.stageTitle;
},
@@ -128,8 +134,9 @@ tr.exportTo('tr.model.um', function() {
get totalCpuMs() {
var cpuMs = 0;
this.associatedEvents.forEach(function(event) {
- if (event.cpuSelfTime)
+ if (event.cpuSelfTime) {
cpuMs += event.cpuSelfTime;
+ }
});
return cpuMs;
}

Powered by Google App Engine
This is Rietveld 408576698