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

Unified Diff: tracing/tracing/model/time_to_object_instance_map.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/thread_time_slice.html ('k') | tracing/tracing/model/timed_event.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/time_to_object_instance_map.html
diff --git a/tracing/tracing/model/time_to_object_instance_map.html b/tracing/tracing/model/time_to_object_instance_map.html
index d8f15884f48493ebc96b8ab308eddf98d3dab458..6e27d93dc14f811af6335873f06877efba179f02 100644
--- a/tracing/tracing/model/time_to_object_instance_map.html
+++ b/tracing/tracing/model/time_to_object_instance_map.html
@@ -102,11 +102,11 @@ tr.exportTo('tr.model', function() {
var lastValidIndex;
for (var i = this.instances.length - 1; i >= 0; i--) {
var tmp = this.instances[i];
- if (ts >= tmp.deletionTs)
- break;
+ if (ts >= tmp.deletionTs) break;
if (tmp.creationTsWasExplicit === false &&
- tmp.snapshots.length === 0)
+ tmp.snapshots.length === 0) {
lastValidIndex = i;
+ }
}
if (lastValidIndex === undefined) {
throw new Error(
@@ -123,8 +123,7 @@ tr.exportTo('tr.model', function() {
},
get lastInstance() {
- if (this.instances.length === 0)
- return undefined;
+ if (this.instances.length === 0) return undefined;
return this.instances[this.instances.length - 1];
},
@@ -134,15 +133,17 @@ tr.exportTo('tr.model', function() {
this.parent, this.scopedId, category, name, ts));
}
var lastInstance = this.instances[this.instances.length - 1];
- if (ts < lastInstance.creationTs)
+ if (ts < lastInstance.creationTs) {
throw new Error('Cannot delete an id before it was created');
+ }
if (lastInstance.deletionTs === Number.MAX_VALUE) {
lastInstance.wasDeleted(ts);
return lastInstance;
}
- if (ts < lastInstance.deletionTs)
+ if (ts < lastInstance.deletionTs) {
throw new Error('id was already deleted earlier.');
+ }
// A new instance was deleted with no snapshots in-between.
// Create an instance then kill it.
@@ -160,8 +161,9 @@ tr.exportTo('tr.model', function() {
function(inst) { return inst.deletionTs - inst.creationTs; },
ts);
if (i < 0) {
- if (this.instances[0].creationTsWasExplicit)
+ if (this.instances[0].creationTsWasExplicit) {
return undefined;
+ }
return this.instances[0];
} else if (i >= this.instances.length) {
return undefined;
« no previous file with comments | « tracing/tracing/model/thread_time_slice.html ('k') | tracing/tracing/model/timed_event.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698