Remove leftover channel context parameter uses
Categories
(Thunderbird :: General, task)
Tracking
(thunderbird_esr6868+ fixed, thunderbird69 fixed, thunderbird70 fixed)
People
(Reporter: benc, Assigned: jorgk-bmo)
Details
Attachments
(2 files, 3 obsolete files)
|
17.51 KB,
patch
|
benc
:
review+
aceman
:
review+
|
Details | Diff | Splinter Review |
|
6.66 KB,
patch
|
benc
:
review+
jorgk-bmo
:
approval-comm-beta+
jorgk-bmo
:
approval-comm-esr68+
|
Details | Diff | Splinter Review |
Following on from Bug 1531307, there are still a few lingering uses of a context param on nsIChannel-related code.
Ones I've seen so far:
nsMsgProtcol::m_channelContext
Used innsMsgProtocol::OnStopRequest()one place to suppress multiple warnings, and in various derived protocols as a parameter to progress updates.nsImapMockChannel::m_channelContext
Used to pass on tonsIInputStreamPump::AsyncRead()- I think it's never used, so it should be safe to replace with nullptr...- parameters to
OnStatus()andOnProgressinnsIProgressEventSink
In M-C, nsIInputStreamPump::AsyncRead() currently accepts a context param. Probably safe to assume that'll get removed sometime soon too.
| Assignee | ||
Comment 1•6 years ago
|
||
Yes, AsyncRead() just ignores the parameter:
https://searchfox.org/mozilla-central/rev/8308eb7ea14318f53b55f3289c2bb9b712265318/netwerk/base/nsInputStreamPump.cpp#283
While I was doing some reformatting, I removed one here:
https://hg.mozilla.org/comm-central/rev/00dbf8bfc8eb2a26dcdbea3a13bb2e9085dde109#l28.616
I'll do a patch for the rest now.
| Assignee | ||
Comment 2•6 years ago
|
||
| Assignee | ||
Comment 3•6 years ago
•
|
||
Removed a few more NNTP bits. Also removed the member variable from IMAP. NNTP seems to use the one from nsMsgProtocol.h.
I'm not sure whether that stuff can go from nsMsgProtocol.cpp completely. I'd say yes, if it weren't for:
https://searchfox.org/comm-central/rev/6674517c6b2de7ad88628b568b0e8e8e46b65019/mailnews/base/util/nsMsgProtocol.cpp#408
Since IMAP has it's own variable, it's safe to remove.
EDIT: Interdiff to previous patch:
https://bugzilla.mozilla.org/attachment.cgi?oldid=9064348&action=interdiff&newid=9064349&headers=1
Those changes should affect the try run.
| Assignee | ||
Comment 4•6 years ago
|
||
This is more drastic. I still left the trickery re. the the alert, but replaced it with a bool. There were also more calls in POP3 that needed m_channelContext removed. Let's see:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=44a039417a1cd5ae9f8803be168c133aeef9fae1
| Assignee | ||
Comment 5•6 years ago
|
||
OK, the try is green. I'll split the patch in two:
Part 1, pass nullptr where the context parameter is ignored:
nsInputStreamPump::AsyncRead():
https://searchfox.org/mozilla-central/rev/8308eb7ea14318f53b55f3289c2bb9b712265318/netwerk/base/nsInputStreamPump.cpp#283
OnStatus() and OnProgress():
https://searchfox.org/comm-central/rev/6674517c6b2de7ad88628b568b0e8e8e46b65019/mailnews/base/src/nsMsgStatusFeedback.cpp#250
https://searchfox.org/comm-central/rev/6674517c6b2de7ad88628b568b0e8e8e46b65019/mailnews/base/src/nsMsgStatusFeedback.cpp#259
https://searchfox.org/comm-central/rev/6674517c6b2de7ad88628b568b0e8e8e46b65019/mailnews/base/src/nsMsgProgress.cpp#247
https://searchfox.org/comm-central/rev/6674517c6b2de7ad88628b568b0e8e8e46b65019/mailnews/base/src/nsMsgProgress.cpp#256
Part 2: The tricky handling of the alert.
| Assignee | ||
Comment 6•6 years ago
|
||
This is part 1. Just passing nullptr where the context parameter is ignored anyway. A bit of IDL infrastructure can go as well.
| Assignee | ||
Comment 7•6 years ago
|
||
OK, this is part 2. I'm not sure whether the whole thing couldn't be removed altogether, but let's at least lose the notion of the context and make it a bool flag.
The green try originated from the merged patch before I decided to pull it apart for clarity reasons.
| Assignee | ||
Comment 8•6 years ago
|
||
Filed bug 1551306 to see whether M-C want to remove the unneeded context parameters. That shouldn't stop us passing null for the context since all relevant code ignores the context now.
| Assignee | ||
Comment 10•6 years ago
|
||
I'm going to land the first part now since I'm in clean-up mode. The second can wait for Ben's review.
Comment 11•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Comment 12•6 years ago
|
||
| Reporter | ||
Comment 13•6 years ago
|
||
| Reporter | ||
Comment 14•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Comment 15•6 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/57d0ff007e02
Replace m_channelContext with m_isChannel bool flag in nsMsgProtocol.cpp. r=BenC DONTBUILD
| Assignee | ||
Comment 16•6 years ago
|
||
Thanks, Ben. Landed with m_isChannel as suggested. For the record, second part landed at TB 70. Maybe we should backport this for consistency.
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 17•6 years ago
|
||
| Assignee | ||
Comment 18•6 years ago
|
||
TB 68.0 ESR:
https://hg.mozilla.org/releases/comm-esr68/rev/08f45a2b590d50ed640972bca5fe007c72ff569b
Updated•6 years ago
|
Description
•