Closed
Bug 217434
Opened 21 years ago
Closed 4 years ago
nsImapMockChannel does not implement Suspend/Resume
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(thunderbird_esr78 wontfix, thunderbird82 wontfix)
RESOLVED
FIXED
83 Branch
People
(Reporter: Biesinger, Assigned: greenrecyclebin)
References
(Blocks 1 open bug, )
Details
Attachments
(1 file)
suspend() and resume() just return a failure code.
Reporter | ||
Comment 1•21 years ago
|
||
ok, well, it looks like this is nothing I can implement; -> default owner
Assignee: cbiesinger → bienvenu
Comment 2•21 years ago
|
||
Is this an actual issue?
Reporter | ||
Comment 3•21 years ago
|
||
Yes, bug 57342 and possibly bug 69938 require this to be implemented for imap channels. This is the channel that necko/exthandler/... use for attachments loaded from mails on an imap server, right?
Comment 4•21 years ago
|
||
David, this is an issue if nsImapMockChannel is used for attachments to mails read via imap when the attachments are double-clicked on. If that's the case, things will soon break badly, because the helper app handler will soon require that the channel it interacts with support suspend/resume. If the channel does not support it, that content will not open in helper applications and not be able to be saved to disk.
Comment 5•21 years ago
|
||
OK, makes sense. I can do this, I think - can you tell me roughly when you need it by? The channel gets suspended from the UI thread, right, not the imap thread? Here's roughly how it would work - nsImapMockChannel::Suspend would set a flag on the mock channel - resume would clear it.. nsImapProtocol::CreateNewLineFromSocket would check if the channel was suspended before reading data from the server. Because of the way the parser is written, I think we'd have to block in CreateNewLineFromSocket, waiting until the channel is resumed or cancelled. the listener is notified of ODA in nsImapProtocol::PostLineDownLoadEvent - if blocking the imap thread turns out to be a huge problem, we could just continue to buffer the data from the server that we requested but hold off sending ODA events until the channel was resumed.
Reporter | ||
Comment 6•21 years ago
|
||
>OK, makes sense. I can do this, I think - can you tell me roughly when you need >it by? oh, I have no specific deadline, I suppose it would be nice if you could do it before 1.6a freezes. >The channel gets suspended from the UI thread, right, not the imap thread? Correct. Thanks for implementing this!
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
Updated•16 years ago
|
QA Contact: grylchan → networking.imap
Updated•12 years ago
|
Assignee: dbienvenu → nobody
Comment 8•4 years ago
|
||
Daniel, did you want to have a go at it?
Comment 10•4 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #8)
Daniel, did you want to have a go at it?
Flags: needinfo?(remotenonsense)
Assignee | ||
Comment 11•4 years ago
|
||
Per suggestions at https://bugzilla.mozilla.org/show_bug.cgi?id=217434#c5:
-
nsImapMockChannel::Suspend sets mSuspended
-
nsImapMockChannel::{Resume,Cancel} unset mSuspended and notify the
associated nsImapProtocol thread that waits on mSuspendedCV -
nsImapProtocol::CreateNewLineFromSocket is blocked until the
associated m_mockChannel is resumed (or cancelled)
Assumptions:
- nsIMapMockChannel{Suspend,Resume,Cancel} are only called from the main (UI) thread
- nsImapProtocol::CreateNewLineFromSocket is called from threads other than the main one
Updated•4 years ago
|
Assignee: nobody → greenrecyclebin
Status: NEW → ASSIGNED
Updated•4 years ago
|
Flags: needinfo?(remotenonsense)
Updated•4 years ago
|
Attachment #9179450 -
Attachment description: Bug 217434 - nsImapMockChannel supports Suspend and Resume. r=mkmelin → Bug 217434 - nsImapMockChannel supports Suspend and Resume. r=BenC
Updated•4 years ago
|
Keywords: checkin-needed-tb
Comment 12•4 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/a8aa32e1bd2c
nsImapMockChannel supports Suspend and Resume. r=BenC DONTBUILD
Comment 13•4 years ago
|
||
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/0d5a46fbeae0 followup - apply clang-format. rs=clang-format
Updated•4 years ago
|
status-thunderbird82:
--- → wontfix
status-thunderbird_esr78:
--- → wontfix
Target Milestone: --- → 83 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•