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

Unified Diff: ui/webui/resources/js/cr/ui/table/table_column_model.js

Issue 2781533002: Fix range check error by replacing invalid .size with .length. (Closed)
Patch Set: Fix presumable off-by-one error. 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/cr/ui/table/table_column_model.js
diff --git a/ui/webui/resources/js/cr/ui/table/table_column_model.js b/ui/webui/resources/js/cr/ui/table/table_column_model.js
index d2067c88ab45e17c520b9016dfa0c9e6a9e18049..d451d609f4aa9f4b832baa6ed5198505f5bbcba8 100644
--- a/ui/webui/resources/js/cr/ui/table/table_column_model.js
+++ b/ui/webui/resources/js/cr/ui/table/table_column_model.js
@@ -61,7 +61,7 @@ cr.define('cr.ui.table', function() {
* @param {string} name Column name.
*/
setName: function(index, name) {
- if (index < 0 || index >= this.columns_.size - 1)
+ if (index < 0 || index >= this.columns_.length)
return;
if (name != this.columns_[index].name)
return;
@@ -94,7 +94,7 @@ cr.define('cr.ui.table', function() {
* @param {number} width Column width.
*/
setWidth: function(index, width) {
- if (index < 0 || index >= this.columns_.size - 1)
+ if (index < 0 || index >= this.columns_.length)
return;
var column = this.columns_[index];
@@ -125,7 +125,7 @@ cr.define('cr.ui.table', function() {
* Render function.
*/
setRenderFunction: function(index, renderFunction) {
- if (index < 0 || index >= this.columns_.size - 1)
+ if (index < 0 || index >= this.columns_.length)
return;
if (renderFunction !== this.columns_[index].renderFunction)
return;
@@ -194,7 +194,7 @@ cr.define('cr.ui.table', function() {
* @param {boolean} visible The column visibility.
*/
setVisible: function(index, visible) {
- if (index < 0 || index > this.columns_.size - 1)
+ if (index < 0 || index >= this.columns_.length)
return;
var column = this.columns_[index];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698