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

Unified Diff: tracing/tracing/model/memory_allocator_dump.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/location.html ('k') | tracing/tracing/model/memory_dump_test_utils.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/model/memory_allocator_dump.html
diff --git a/tracing/tracing/model/memory_allocator_dump.html b/tracing/tracing/model/memory_allocator_dump.html
index c1bbc1c8275c7bc4f5cdb5cf09659799b417e107..6f0ea2c45fea30613872f7d08599710bb123edc3 100644
--- a/tracing/tracing/model/memory_allocator_dump.html
+++ b/tracing/tracing/model/memory_allocator_dump.html
@@ -89,26 +89,29 @@ tr.exportTo('tr.model', function() {
isDescendantOf: function(otherDump) {
var dump = this;
while (dump !== undefined) {
- if (dump === otherDump)
- return true;
+ if (dump === otherDump) return true;
dump = dump.parent;
}
return false;
},
addNumeric: function(name, numeric) {
- if (!(numeric instanceof tr.b.Scalar))
+ if (!(numeric instanceof tr.b.Scalar)) {
throw new Error('Numeric value must be an instance of Scalar.');
- if (name in this.numerics)
+ }
+ if (name in this.numerics) {
throw new Error('Duplicate numeric name: ' + name + '.');
+ }
this.numerics[name] = numeric;
},
addDiagnostic: function(name, text) {
- if (typeof text !== 'string')
+ if (typeof text !== 'string') {
throw new Error('Diagnostic text must be a string.');
- if (name in this.diagnostics)
+ }
+ if (name in this.diagnostics) {
throw new Error('Duplicate diagnostic name: ' + name + '.');
+ }
this.diagnostics[name] = text;
},
@@ -152,8 +155,7 @@ tr.exportTo('tr.model', function() {
// Aggregate the units and sum up the values of the numerics.
numerics.forEach(function(numeric) {
- if (numeric === undefined)
- return;
+ if (numeric === undefined) return;
var unit = numeric.unit;
if (aggregatedUnit === undefined) {
@@ -175,8 +177,7 @@ tr.exportTo('tr.model', function() {
aggregatedValue += numeric.value;
}, this);
- if (aggregatedUnit === undefined)
- return undefined;
+ if (aggregatedUnit === undefined) return undefined;
return new tr.b.Scalar(aggregatedUnit, aggregatedValue);
};
« no previous file with comments | « tracing/tracing/model/location.html ('k') | tracing/tracing/model/memory_dump_test_utils.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698