Open
Bug 1707547
(imap-js)
Opened 4 years ago
Updated 8 months ago
[meta] implement IMAP in JavaScript
Categories
(MailNews Core :: Networking: IMAP, task)
MailNews Core
Networking: IMAP
Tracking
(Not tracked)
NEW
People
(Reporter: mkmelin, Unassigned)
References
(Depends on 20 open bugs)
Details
(Keywords: meta)
This bug is to track implementing IMAP in JavaScript.
See
Comment 1•3 years ago
•
|
||
When re-implementing, please make sure to not follow the old interaction design of the C++ IMAP component, which was forced by limitations in XPCOM at this time 24 years ago.
- C++ IMAP uses native OS threads to avoid blocking the UI. In today's JS, we can use
await
, which is far far easier to use. Threads caused all kinds of headaches, esp. when passing information, and when waiting for results. - C++ IMAP was driven by internal URLs. These are not the URLs you see in the web browser, but they used URLs as a kind of "async function callback", because XPCOM didn't have callback functions at the time when this IMAP component was designed. This URL-driven mechanism caused very very wierd and difficult call stacks that are very hard to follow and debug. Again,
await
solves the problem very nicely. - C++ IMAP returned the email message as URL, and the message is the URL response. In a new design, you would probably simply make an
async
function which returns the message as function result.
There are also regressions of bug 1762688 (bug 1818247, bug 1818253, bug 1818272) which you might want to add here.
Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•