New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 705527 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

columns_.size in cr.ui.table.TableColumnModel should be columns_.length

Project Member Reported by oka@chromium.org, Mar 27 2017

Issue description

Chrome Version: ToT

What steps will reproduce the problem?
(1) Open Files app and open developer console with Ctrl-Shift-I.
(2) Type:
var cm = $$('.detail-table')[0].columnModel;
cm.setName(cm.size, 'a');

What is the expected result?
Error doesn't happen

What happens instead?
Error happens.


This happens because of in this range check https://cs.chromium.org/chromium/src/ui/webui/resources/js/cr/ui/table/table_column_model.js?q=TAbleColumnModel&dr=CSs&l=64
this.columns_.size is always evaluated to be undefined and the right hand size becomes NaN.
the .size should be .length .
Samely all the occurence of this.columns_.size should be replaced with this.columns_.length.

 

Comment 1 by oka@chromium.org, Mar 27 2017

Summary: columns_.size in cr.ui.table.TableColumnModel should be columns_.length (was: columns_.size in cr.ui.table.TableColumns should be columns_.length)
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1a3aebe1689f7e9759d97bc0cdb1e7f27b7ce02a

commit 1a3aebe1689f7e9759d97bc0cdb1e7f27b7ce02a
Author: oka <oka@chromium.org>
Date: Tue Mar 28 13:19:01 2017

Fix range check error by replacing invalid .size with .length.

Also fixed presumable off-by-one errors.

BUG= 705527 
TEST=try
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2781533002
Cr-Commit-Position: refs/heads/master@{#460079}

[modify] https://crrev.com/1a3aebe1689f7e9759d97bc0cdb1e7f27b7ce02a/ui/webui/resources/js/cr/ui/table/table_column_model.js

Project Member

Comment 3 by bugdroid1@chromium.org, Mar 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/068669c24287ba5fbd0b541649ecc65fa08019ee

commit 068669c24287ba5fbd0b541649ecc65fa08019ee
Author: oka <oka@chromium.org>
Date: Wed Mar 29 07:08:56 2017

Compile cr.ui.Table and cr.ui.table.* in gyp v2

- Replaced all occurrences of cr.ui.Table in cr/ui/table/* to Element.
- Moved renderFunction_ in TableList, which uses the knowledge that
cr.ui.Table has columnModel, to cr.ui.Table.

BUG= 705527 
TEST=run_compiler
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2779663002
Cr-Commit-Position: refs/heads/master@{#460309}

[modify] https://crrev.com/068669c24287ba5fbd0b541649ecc65fa08019ee/ui/webui/resources/js/cr/ui/compiled_resources2.gyp
[modify] https://crrev.com/068669c24287ba5fbd0b541649ecc65fa08019ee/ui/webui/resources/js/cr/ui/table.js
[add] https://crrev.com/068669c24287ba5fbd0b541649ecc65fa08019ee/ui/webui/resources/js/cr/ui/table/compiled_resources2.gyp
[modify] https://crrev.com/068669c24287ba5fbd0b541649ecc65fa08019ee/ui/webui/resources/js/cr/ui/table/table_column.js
[modify] https://crrev.com/068669c24287ba5fbd0b541649ecc65fa08019ee/ui/webui/resources/js/cr/ui/table/table_column_model.js
[modify] https://crrev.com/068669c24287ba5fbd0b541649ecc65fa08019ee/ui/webui/resources/js/cr/ui/table/table_header.js
[modify] https://crrev.com/068669c24287ba5fbd0b541649ecc65fa08019ee/ui/webui/resources/js/cr/ui/table/table_list.js
[modify] https://crrev.com/068669c24287ba5fbd0b541649ecc65fa08019ee/ui/webui/resources/js/cr/ui/table/table_splitter.js

Comment 4 by oka@chromium.org, Apr 18 2017

Status: Fixed (was: Started)

Comment 5 by dchan@google.com, May 30 2017

Labels: VerifyIn-60

Comment 6 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 7 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment