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

Unified Diff: tracing/tracing/ui/tracks/object_instance_track.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/ui/tracks/multi_row_track.html ('k') | tracing/tracing/ui/tracks/other_threads_track.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/tracks/object_instance_track.html
diff --git a/tracing/tracing/ui/tracks/object_instance_track.html b/tracing/tracing/ui/tracks/object_instance_track.html
index df37156414a7ba068a879085cfddf17f230d09e8..de0b3daf6a109cbe85bd9029816f8f497574be9f 100644
--- a/tracing/tracing/ui/tracks/object_instance_track.html
+++ b/tracing/tracing/ui/tracks/object_instance_track.html
@@ -129,8 +129,7 @@ tr.exportTo('tr.ui.tracks', function() {
for (var i = loI; i < objectInstances.length; ++i) {
var instance = objectInstances[i];
var x = instance.creationTs;
- if (x > viewRWorld)
- break;
+ if (x > viewRWorld) break;
var right = instance.deletionTs === Number.MAX_VALUE ?
viewRWorld : instance.deletionTs;
@@ -150,8 +149,8 @@ tr.exportTo('tr.ui.tracks', function() {
for (var i = loI; i < objectSnapshots.length; ++i) {
var snapshot = objectSnapshots[i];
var x = snapshot.ts;
- if (x - snapshotRadiusWorld > viewRWorld)
- break;
+ if (x - snapshotRadiusWorld > viewRWorld) break;
+
var xView = dt.xWorldToView(x);
ctx.fillStyle = EventPresenter.getObjectSnapshotColor(snapshot);
@@ -224,8 +223,7 @@ tr.exportTo('tr.ui.tracks', function() {
function(x) { return 2 * snapshotRadiusWorld; },
loWX, hiWX,
onSnapshot);
- if (foundSnapshot)
- return;
+ if (foundSnapshot) return;
// Try picking instances.
tr.b.math.iterateOverIntersectingIntervals(
@@ -248,12 +246,13 @@ tr.exportTo('tr.ui.tracks', function() {
*/
addEventNearToProvidedEventToSelection: function(event, offset, selection) {
var events;
- if (event instanceof tr.model.ObjectSnapshot)
+ if (event instanceof tr.model.ObjectSnapshot) {
events = this.objectSnapshots_;
- else if (event instanceof tr.model.ObjectInstance)
+ } else if (event instanceof tr.model.ObjectInstance) {
events = this.objectInstances_;
- else
+ } else {
throw new Error('Unrecognized event');
+ }
var index = events.indexOf(event);
var newIndex = index + offset;
@@ -275,8 +274,7 @@ tr.exportTo('tr.ui.tracks', function() {
worldX,
worldMaxDist);
- if (!snapshot)
- return;
+ if (!snapshot) return;
selection.push(snapshot);
« no previous file with comments | « tracing/tracing/ui/tracks/multi_row_track.html ('k') | tracing/tracing/ui/tracks/other_threads_track.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698