columns_.size in cr.ui.table.TableColumnModel should be columns_.length |
|||||
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.
,
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
,
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
,
Apr 18 2017
,
May 30 2017
,
Aug 1 2017
,
Jan 22 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by oka@chromium.org
, Mar 27 2017