Ensure futils getPicker is always passed a typeList which is an array of arrays in cZ
Categories
(SeaMonkey :: Chat, enhancement)
Tracking
(Not tracked)
People
(Reporter: iannbugzilla, Assigned: iannbugzilla)
Details
Attachments
(1 file, 2 obsolete files)
6.75 KB,
patch
|
iannbugzilla
:
review+
iannbugzilla
:
approval-comm-release+
|
Details | Diff | Splinter Review |
At the moment typeList can be a string or an array containing arrays and strings, we should make it always be an array of arrays to simplify the code.
[Approval Request Comment]
Regression caused by (bug #): n/a
User impact if declined: none
Testing completed (on m-c, etc.): 2.53.21pre
Risk to taking this patch (and alternatives if risky): low
String changes made by this patch: none
The new logic means:
- An empty array adds just an "All Files" filter
- An array entry containing ["$all", ""] adds "All Files" file at the start of the list of filters
- An array with neither ["$all", ""] nor ["$noAll", ""] adds "All Files" filter at the end of the list of filters
![]() |
||
Comment 2•6 months ago
|
||
Comment on attachment 9443716 [details] [diff] [review]
1937399-irc-file-utils-getPicker-25321.patch
The case "$all": is missing a break. Intentional? Even with the break shouldn't "includeAll = false" be set there too so that at the end all is not added again twice? Or the appendFilters not called in the case and only a break used?
In the default case two types are used but there is no check if type[1] exists: picker.appendFilter(type[0], type[1]). The existing calls seem to be ok but feels a bit unsafe.
I didn't actually test but otherwise seems fine to me r/a+ with the first item fixed/explained.
[Triage Comment]
Carrying forward r/a
Fix comment
Pushed by frgrahl@gmx.net:
https://hg.mozilla.org/comm-central/rev/553e4554f26a
Ensure futils getPicker is always passed a typeList which is an array of arrays in cZ. r=frg DONTBUILD
Comment on attachment 9470911 [details] [diff] [review]
1937399-irc-file-utils-getPicker-v1_2-25321.patch
[Triage Comment]
Description
•