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

Unified Diff: tracing/tracing/base/unit_scale.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/base/unit.html ('k') | tracing/tracing/base/unittest.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/unit_scale.html
diff --git a/tracing/tracing/base/unit_scale.html b/tracing/tracing/base/unit_scale.html
index 78eeaf46a1ac52f20c02d46fb15558bbcb653eb5..69f9a2d7fbbdfc49400defce87dcb02e932da829 100644
--- a/tracing/tracing/base/unit_scale.html
+++ b/tracing/tracing/base/unit_scale.html
@@ -24,8 +24,9 @@ tr.exportTo('tr.b', function() {
var UnitScale = {};
function defineUnitPrefixScale(name, prefixes) {
- if (UnitPrefixScale[name] !== undefined)
+ if (UnitPrefixScale[name] !== undefined) {
throw new Error('Unit prefix scale \'' + name + '\' already exists');
+ }
if (prefixes.AUTO !== undefined) {
throw new Error('The \'AUTO\' unit prefix is not supported for unit' +
'prefix scales and cannot be added to scale \'' + name + '\'');
@@ -35,8 +36,9 @@ tr.exportTo('tr.b', function() {
}
UnitScale.defineUnitScale = function(name, unitScale) {
- if (UnitScale[name] !== undefined)
+ if (UnitScale[name] !== undefined) {
throw new Error('Unit scale \'' + name + '\' already exists');
+ }
if (unitScale.AUTO !== undefined) {
throw new Error('\'AUTO\' unit scale will be added automatically ' +
'for unit scale \'' + name + '\'');
« no previous file with comments | « tracing/tracing/base/unit.html ('k') | tracing/tracing/base/unittest.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698