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

Unified Diff: third_party/WebKit/Source/devtools/front_end/platform/utilities.js

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove yoda disable. fix throw parens Created 4 years, 8 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
Index: third_party/WebKit/Source/devtools/front_end/platform/utilities.js
diff --git a/third_party/WebKit/Source/devtools/front_end/platform/utilities.js b/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
index 23b353d1b0dd5d821ed0f62ce1165c3a141bd7bd..814387723995a7c5b78a31ee0ed9bc877024379f 100644
--- a/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
+++ b/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
@@ -167,7 +167,7 @@ String.prototype.escapeForRegExp = function()
*/
String.prototype.escapeHTML = function()
{
- return this.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"); //" doublequotes just for editor
+ return this.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"); // " doublequotes just for editor
}
/**
@@ -284,7 +284,7 @@ String.hashCode = function(string)
zi = (zi * z) % p;
}
s = (s + zi * (p - 1)) % p;
- return Math.abs(s|0);
+ return Math.abs(s | 0);
}
/**
@@ -295,7 +295,7 @@ String.hashCode = function(string)
String.isDigitAt = function(string, index)
{
var c = string.charCodeAt(index);
- return 48 <= c && c <= 57;
+ return (48 <= c && c <= 57);
}
/**
@@ -929,7 +929,7 @@ Object.defineProperty(Array.prototype, "mergeOrdered",
}
});
-}());
+})();
/**
* @param {string} format
@@ -1538,7 +1538,7 @@ Promise.prototype.spread = function(callback)
* @template T
*/
Promise.prototype.catchException = function(defaultValue) {
- return this.catch(function (error) {
+ return this.catch(function(error) {
console.error(error);
return defaultValue;
});

Powered by Google App Engine
This is Rietveld 408576698