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; |