Closed Bug 1719413 Opened 3 years ago Closed 3 years ago

Implement nsINntpService in JavaScript

Categories

(MailNews Core :: Networking: NNTP, task)

Tracking

(thunderbird_esr78 wontfix, thunderbird_esr91 wontfix)

RESOLVED FIXED
92 Branch
Tracking Status
thunderbird_esr78 --- wontfix
thunderbird_esr91 --- wontfix

People

(Reporter: rnons, Assigned: rnons)

References

Details

Attachments

(13 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
No description provided.
Assignee: nobody → remotenonsense
Status: NEW → ASSIGNED
Target Milestone: --- → 92 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/822bad975580
Init NntpModuleLoader.jsm and NntpService.jsm to start implementing NNTP in JS. r=mkmelin

This is the initial step to fetch and render a news article.

Depends on D120192.

Implement the asyncOpen method in NntpChannel.jsm, and connect it with NntpClient.jsm.

Depends on D120822.

D121593 doesn't apply cleanly, and I'd rather not attempt to rebase it myself.

(In reply to Geoff Lankow (:darktrojan) from comment #5)

D121593 doesn't apply cleanly, and I'd rather not attempt to rebase it myself.

Forgot to set checkin-needed-tb in bug 1719414, apply in this order D120192, D120822, D121593.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/203e693fb0f9
Init NntpProtocolHandler.jsm and NntpChannel.jsm. r=mkmelin
https://hg.mozilla.org/comm-central/rev/b02dbe764d52
Support fetching and rendering a single article in NntpChannel.jsm. r=mkmelin

Thanks, I would've found that out if I'd actually looked at the stack in Phabricator. :-/

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/d237097fbf39
Implement postMessage in NntpService.jsm. r=mkmelin

When fetching an article from the server, use a nsIStreamListenerTee to save to the memory cache. When loading the message for a second time, read from the memory cache without asking the server.

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/7571a9fe8007
Use memory cache in NntpChannel.jsm if available. r=mkmelin

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/42360175507e
Enable test_nntpProtocols.js for SmtpService.jsm. r=mkmelin

Because new SlicedInputStream is not available in JS, but to read a single message from offline storage, we must use a sliced stream.

Support offline storage for news messages.

Depends on D125801.

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/396cff769c05
Add a getSlicedOfflineFileStream function to nsIMsgFolder. r=mkmelin
https://hg.mozilla.org/comm-central/rev/f8a9cb9b814b
Enable test_bug170727.js for nntp-js. r=mkmelin

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/848f5e66190e
Enable test_bug170727.js for nntp-js. r=mkmelin

(the original landing of f8a9cb9b814b was backed out, then relanded)

Looks like debug xpshell tests are all crashing or causing lots of problems though.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/93ce7c1076e7
Enable test_bug170727.js for nntp-js. r=mkmelin

  • Implement fetchMessage/cancelMessage of nsINntpService
  • Implement nsIMsgMessageService.Search

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/40d0a68df717
Enable test_internalUris.js for nntp-js. r=mkmelin

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/0471e9aac1d0
Add NntpProtocolInfo.jsm to implement nsIMsgProtocolInfo. r=mkmelin

Use folder.rawName as group name when communicating with NNTP server.

Depends on D128583.

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/5f00e345540f
Handle server charset in nntp-js. r=mkmelin

After a bunch of real world testing I found some problems (didn't verify if they are nntp-js only):

  • Set up a new nntp account, in the console I got
    TypeError: can't access property "folderURL", parentFolder is nullMailNotificationService.jsm:335:51
    onFolderAdded resource:///modules/MailNotificationService.jsm:335
    finishAccount chrome://messenger/content/AccountWizard.js:330
    FinishAccount chrome://messenger/content/AccountWizard.js:181
    _fireEvent chrome://global/content/elements/wizard.js:471
    advance chrome://global/content/elements/wizard.js:294
    listeners chrome://global/content/elements/wizard.js:523
    openNewsgroupAccountWizard chrome://messenger/content/accountUtils.js:95
    oncommand chrome://messenger/content/messenger.xhtml:1

  • In the subscription dialog, the Current group list is not showing when one opens the dialog. It does show up if I click Refresh.

  • Newsgroups showing empty To in header (should be hidden)

  • In a profile where I had a ddt.demos.su account set up already (with one newsgroup subscribed), the FIRST time I tried to access it I got the error below (After restart it seems to work though...)
    TypeError: can't access property "withClient", server.wrappedJSObject is undefined NntpService.jsm:100:5
    getNewNews resource:///modules/NntpService.jsm:100
    updateFolderAndNotifyOnLoad resource:///modules/DBViewWrapper.jsm:88
    open resource:///modules/DBViewWrapper.jsm:810
    show chrome://messenger/content/folderDisplay.js:849
    FolderPaneSelectionChange chrome://messenger/content/commandglue.js:363
    onselect chrome://messenger/content/messenger.xhtml:1
    MozTreeChildren chrome://global/content/elements/tree.js:69

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/941a98642b38
Fix server.prettyName and news groups searching. r=mkmelin

Empty To is bug 1739090.

(In reply to Magnus Melin [:mkmelin] from comment #29)

After a bunch of real world testing I found some problems (didn't verify if they are nntp-js only):

  • Set up a new nntp account, in the console I got
    TypeError: can't access property "folderURL", parentFolder is nullMailNotificationService.jsm:335:51

Yes, this also happens after creating a mail account, I think it's related to some msgfolder code changes.

  • In the subscription dialog, the Current group list is not showing when one opens the dialog. It does show up if I click Refresh.

I can't reproduce this, I tried using the cpp backend to create 2 newsgroup accounts and fetch the group list. After I change the pref to use jsm and restart, the group list is still there.

  • In a profile where I had a ddt.demos.su account set up already (with one newsgroup subscribed), the FIRST time I tried to access it I got the error below (After restart it seems to work though...)
    TypeError: can't access property "withClient", server.wrappedJSObject is undefined NntpService.jsm:100:5

I can't reproduce this as well, the server is being passed to NntpService.getNewNews(). This error can happen only if using NntpService.jsm together with nsNntpIncomingServer.cpp, I guess something failed in that particular startup and messed module registration.

Ok. Can't reproduce the group list problem either now. Potentially just slow network at the time.

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/a1975b7e4cdb
Enable nntp-js (mailnews.nntp.jsmodule=true). r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: