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

Unified Diff: tracing/tracing/model/user_model/user_expectation.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/user_model/stub_expectation.html ('k') | tracing/tracing/model/vm_region.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b4eb17e602906928afed31fb750aa0224cc29b6b..ede22afcbab531888c89c54d5af8671f1f12c3b9 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;
}
« no previous file with comments | « tracing/tracing/model/user_model/stub_expectation.html ('k') | tracing/tracing/model/vm_region.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698