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

Unified Diff: tracing/tracing/base/color_scheme.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/color.html ('k') | tracing/tracing/base/event_target.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/color_scheme.html
diff --git a/tracing/tracing/base/color_scheme.html b/tracing/tracing/base/color_scheme.html
index e88a0057124729e6bbb4c48228d11af4b98111bb..a5ececc5cf88b3fc0a68b0814bce8490630d0168 100644
--- a/tracing/tracing/base/color_scheme.html
+++ b/tracing/tracing/base/color_scheme.html
@@ -197,8 +197,9 @@ tr.exportTo('tr.b', function() {
*/
ColorScheme.getColorIdForReservedName = function(name) {
var id = reservedColorNameToIdMap.get(name);
- if (id === undefined)
+ if (id === undefined) {
throw new Error('Unrecognized color ' + name);
+ }
return id;
};
@@ -214,8 +215,9 @@ tr.exportTo('tr.b', function() {
*/
ColorScheme.getStringHash = function(name) {
var hash = 0;
- for (var i = 0; i < name.length; ++i)
+ for (var i = 0; i < name.length; ++i) {
hash = (hash + 37 * hash + 11 * name.charCodeAt(i)) % 0xFFFFFFFF;
+ }
return hash;
};
« no previous file with comments | « tracing/tracing/base/color.html ('k') | tracing/tracing/base/event_target.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698