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

Unified Diff: tracing/tracing/extras/chrome/cc/region.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: Fix test 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
Index: tracing/tracing/extras/chrome/cc/region.html
diff --git a/tracing/tracing/extras/chrome/cc/region.html b/tracing/tracing/extras/chrome/cc/region.html
index ff53d56a6a0431c0e7b14ccce9b2591ea17e7085..f73444f6bb1a4e34c4f5cd2af13be9f6265021dd 100644
--- a/tracing/tracing/extras/chrome/cc/region.html
+++ b/tracing/tracing/extras/chrome/cc/region.html
@@ -18,8 +18,9 @@ tr.exportTo('tr.e.cc', function() {
}
Region.fromArray = function(array) {
- if (array.length % 4 !== 0)
+ if (array.length % 4 !== 0) {
throw new Error('Array must consist be a multiple of 4 in length');
+ }
var r = new Region();
for (var i = 0; i < array.length; i += 4) {
@@ -34,8 +35,7 @@ tr.exportTo('tr.e.cc', function() {
* returns Region.fromArray(array).
*/
Region.fromArrayOrUndefined = function(array) {
- if (array === undefined)
- return new Region();
+ if (array === undefined) return new Region();
return Region.fromArray(array);
};
@@ -44,8 +44,7 @@ tr.exportTo('tr.e.cc', function() {
rectIntersects: function(r) {
for (var i = 0; i < this.rects.length; i++) {
- if (this.rects[i].intersects(r))
- return true;
+ if (this.rects[i].intersects(r)) return true;
}
return false;
},

Powered by Google App Engine
This is Rietveld 408576698