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

Unified Diff: tracing/tracing/base/color.html

Issue 2390373003: Change all == to === and != to !== in trace viewer. (Closed)
Patch Set: more changes from code review Created 4 years, 2 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 | « common/eslint/.eslintrc ('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.html
diff --git a/tracing/tracing/base/color.html b/tracing/tracing/base/color.html
index 6cda5e4eb08ad54672a8ccabae03a15d9e6dec59..d173fb45073abed76e1da9ed03bb202b9c19d269 100644
--- a/tracing/tracing/base/color.html
+++ b/tracing/tracing/base/color.html
@@ -23,30 +23,30 @@ tr.exportTo('tr.b', function() {
Color.fromString = function(str) {
var tmp;
var values;
- if (str.substr(0, 4) == 'rgb(') {
+ if (str.substr(0, 4) === 'rgb(') {
tmp = str.substr(4, str.length - 5);
values = tmp.split(',').map(function(v) {
return v.replace(/^\s+/, '', 'g');
});
- if (values.length != 3)
+ if (values.length !== 3)
throw new Error('Malformatted rgb-expression');
return new Color(
parseInt(values[0]),
parseInt(values[1]),
parseInt(values[2]));
- } else if (str.substr(0, 5) == 'rgba(') {
+ } else if (str.substr(0, 5) === 'rgba(') {
tmp = str.substr(5, str.length - 6);
values = tmp.split(',').map(function(v) {
return v.replace(/^\s+/, '', 'g');
});
- if (values.length != 4)
+ if (values.length !== 4)
throw new Error('Malformatted rgb-expression');
return new Color(
parseInt(values[0]),
parseInt(values[1]),
parseInt(values[2]),
parseFloat(values[3]));
- } else if (str[0] == '#' && str.length == 7) {
+ } else if (str[0] === '#' && str.length === 7) {
return new Color(
parseInt(str.substr(1, 2), 16),
parseInt(str.substr(3, 2), 16),
« no previous file with comments | « common/eslint/.eslintrc ('k') | tracing/tracing/base/event_target.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698