Port |Bug 1339461 - Convert foo.indexOf(...) == -1 to foo.includes()| to SM
Categories
(SeaMonkey :: General, task)
Tracking
(seamonkey2.49esr wontfix, seamonkey2.63 unaffected, seamonkey2.53+ fixed, seamonkey2.57esr+ fixed)
People
(Reporter: iannbugzilla, Assigned: iannbugzilla)
Details
(Whiteboard: SM2.53.1)
Attachments
(4 files, 1 obsolete file)
35.11 KB,
patch
|
frg
:
review+
|
Details | Diff | Splinter Review |
9.18 KB,
patch
|
frg
:
review+
frg
:
approval-comm-esr60+
|
Details | Diff | Splinter Review |
35.10 KB,
patch
|
frg
:
review+
frg
:
approval-comm-release+
frg
:
approval-comm-esr60+
|
Details | Diff | Splinter Review |
9.19 KB,
patch
|
frg
:
review+
frg
:
approval-comm-release+
|
Details | Diff | Splinter Review |
Switching from foo.indexOf(...) == -1 to foo.includes() happened back in 60 for m-c, we should probably do it for SM.
Missed one entry, changes to test files will be in another patch
Comment 4•5 years ago
|
||
Comment on attachment 9073324 [details] [diff] [review] Make use of foo.includes() r+ it is
Comment 5•5 years ago
|
||
Comment on attachment 9073326 [details] [diff] [review] Use foo.includes() in test files r+ it is
Comment 6•5 years ago
|
||
Hi enter too fast
suite/mailnews/content/msgMail3PaneWindow.js
-
if (hdrs && hdrs.indexOf("X-attachment-size:") > 0) {
-
if (hdrs && hdrs.includes("X-attachment-size:")) {
Is this ok IndexOf would return 0 for the first element but here this would be true if only one hdrs.
Comment 7•5 years ago
|
||
r/a+ Minor rebase for 2.53 and 2.57. Same question about > 0
Comment 8•5 years ago
|
||
Comment on attachment 9073326 [details] [diff] [review] Use foo.includes() in test files a+ fror 2.57
Comment 9•5 years ago
|
||
r+/a+ for 2.53
Assignee | ||
Comment 10•5 years ago
|
||
(In reply to Frank-Rainer Grahl (:frg) from comment #6)
Hi enter too fast
suite/mailnews/content/msgMail3PaneWindow.js
if (hdrs && hdrs.indexOf("X-attachment-size:") > 0) {
if (hdrs && hdrs.includes("X-attachment-size:")) {
Is this ok IndexOf would return 0 for the first element but here this would be true if only one hdrs.
As far as I can tell, this code is just looking to see if the headers contain the string, not sure why it originally thought finding it at position zero was wrong. Maybe a typo?
Comment 11•5 years ago
|
||
Pushed by frgrahl@gmx.net:
https://hg.mozilla.org/comm-central/rev/708b5e8fcaa6
Port |Bug 1339461 - Convert foo.indexOf(...) == -1 to foo.includes()| to SM. r=frg
https://hg.mozilla.org/comm-central/rev/d04da3816b8e
Port |Bug 1339461 - Convert foo.indexOf(...) == -1 to foo.includes()| to SM - test files. r=frg
Comment 12•5 years ago
|
||
https://hg.mozilla.org/releases/comm-esr60/rev/845d89795eb18dfad50db07602dd809e20c0af7b
Port |Bug 1339461 - Convert foo.indexOf(...) == -1 to foo.includes()| to SM. r=frg a=frg
https://hg.mozilla.org/releases/comm-esr60/rev/1820ce6af1a84ad3ff50c8866262b9e6ae82b1cf
Port |Bug 1339461 - Convert foo.indexOf(...) == -1 to foo.includes()| to SM - test files. r=frg a=frg
Comment 13•4 years ago
|
||
Target 2.53.1
https://gitlab.com/seamonkey-project/seamonkey-2.53-comm/-/commit/b969ba0318da0114c5e40bcd777010b603bfd2ea
Port |Bug 1339461 - Convert foo.indexOf(...) == -1 to foo.includes()| to SM. r=frg a=frg
https://gitlab.com/seamonkey-project/seamonkey-2.53-comm/-/commit/138e0043f5b5adb1509298209ff77bcb79a810d5
Port |Bug 1339461 - Convert foo.indexOf(...) == -1 to foo.includes()| to SM - test files. r=frg a=frg
Description
•