Closed Bug 1110166 Opened 9 years ago Closed 9 years ago

Port |Bug 1102219 - Rename String.prototype.contains to String.prototype.includes| to comm-central

Categories

(Thunderbird :: General, defect)

defect
Not set
major

Tracking

(thunderbird39 unaffected, thunderbird40 fixed)

RESOLVED FIXED
Thunderbird 40.0
Tracking Status
thunderbird39 --- unaffected
thunderbird40 --- fixed

People

(Reporter: clokep, Assigned: aryx)

References

Details

Attachments

(8 files)

Bug 1102219 will bust us, it just landed on mozilla-inbound. I couldn't find a bug about porting this to TB/IB/SM. Figured Archaeopteryx might know what needs to be done for this...
Assignee: nobody → archaeopteryx
Status: NEW → ASSIGNED
(In reply to Patrick Cloke [:clokep] from comment #0)
> Bug 1102219 will bust us, it just landed on mozilla-inbound.
No it won't. What will really break comm-central is Bug 1103588
Blocks: 1103588
No longer blocks: 1102219
Depends on: 1102219
(In reply to Philip Chee from comment #1)
> (In reply to Patrick Cloke [:clokep] from comment #0)
> > Bug 1102219 will bust us, it just landed on mozilla-inbound.
> No it won't. What will really break comm-central is Bug 1103588

Yeah, we discussed this on IRC. Not a big deal though, we still need to fix it.
Bug 1102219 jut landed on m-c again, and the tests are pretty much busted since we check for "errors" in the console, and now there is the deprecation warning.


"CONSOLE_MESSAGE: (warn) [JavaScript Warning: "String.prototype.contains() is deprecated and will be removed in a future release; use String.prototype.includes() instead" {file: "resource://testing-common/mailnews/imapd.js" line: 1427}]"
Error console says [stackFrame String.prototype.contains() is deprecated and will be removed in a future release; use String.prototype.includes() instead]
../../../../mailnews/resources/logHelper.js:_errorConsoleTunnel.observe:95
/opt/comm-central/src/mozilla/testing/xpcshell/head.js:_do_main:207
/opt/comm-central/src/mozilla/testing/xpcshell/head.js:_execute_test:513
-e:null:1
null:null:0
exiting test
Comment on attachment 8600279 [details] [diff] [review]
chat, v1

Review of attachment 8600279 [details] [diff] [review]:
-----------------------------------------------------------------

::: chat/protocols/irc/ircCommands.jsm
@@ +284,5 @@
>      name: "mode",
>      get helpString() _("command.modeUser", "mode") + "\n" +
>                       _("command.modeChannel", "mode"),
>      run: function(aMsg, aConv) {
> +      function isMode(aString) "+-".includes(aString[0]);

Can I ask you to change this to 

let isMode = aString => "+-".includes(aString[0]);

while you are at it, or we'll just get a different warning? Looks like this line was overlooked in the recent removal of this kind of deprecated short function definiton.
Comment on attachment 8600279 [details] [diff] [review]
chat, v1

Review of attachment 8600279 [details] [diff] [review]:
-----------------------------------------------------------------

You can ignore my previous comment, as it seems the removal of expression closures hasn't landed yet for /chat.
Attachment #8600279 - Flags: review?(aleth) → review+
Attachment #8600278 - Flags: review?(philipp) → review+
(In reply to Archaeopteryx [:aryx] from comment #11)
> Created attachment 8600283 [details] [diff] [review]
> suite/browser, v1

Isn't there some in suite/browser/navigator.js?
Flags: needinfo?(archaeopteryx)
(In reply to Archaeopteryx [:aryx] from comment #12)
> Created attachment 8600284 [details] [diff] [review]
> suite/common, v1

Isn't there some in:
suite/common/downloads/downloadmanager.js
suite/common/search/search.xml
suite/common/sidebar/sidebarOverlay.js
Attachment #8600280 - Flags: review?(iann_bugzilla) → review+
Comment on attachment 8600286 [details] [diff] [review]
suite/mailnews, v1

Stealing, r=me
Attachment #8600286 - Flags: review?(neil) → review+
(In reply to Ian Neal from comment #16)
> (In reply to Archaeopteryx [:aryx] from comment #11)
> > Created attachment 8600283 [details] [diff] [review]
> > suite/browser, v1
> 
> Isn't there some in suite/browser/navigator.js?

None of them are strings:
> line 694 -- if (!next || !next.classList.contains("nav-bar-class"))
> line 697 -- if (!previous || !previous.classList.contains("nav-bar-class"))
classLists

> line 2132 -- if (!title || frameset.document.styleSheetSets.contains(title)) {
DOMStringList

(In reply to Ian Neal from comment #17)
> (In reply to Archaeopteryx [:aryx] from comment #12)
> > Created attachment 8600284 [details] [diff] [review]
> > suite/common, v1
> 
> Isn't there some in:
> suite/common/downloads/downloadmanager.js
> line 680 -- if (types.contains("text/uri-list") ||
> line 681 -- types.contains("text/x-moz-url") ||
> line 682 -- types.contains("text/plain"))
DOMStringList

> suite/common/search/search.xml
DOMStringList and classLists

> suite/common/sidebar/sidebarOverlay.js
classLists
Flags: needinfo?(archaeopteryx)
Attachment #8600281 - Flags: review?(mkmelin+mozilla) → review+
Attachment #8600282 - Flags: review?(mkmelin+mozilla) → review+
Attachment #8600283 - Flags: review?(neil) → review+
Attachment #8600284 - Flags: review?(neil) → review+
suite/browser: https://hg.mozilla.org/comm-central/rev/5e4860468aba
suite/common: https://hg.mozilla.org/comm-central/rev/8f08e3298ab8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 40.0
You need to log in before you can comment on or make changes to this bug.