All the C-C nsIURL-derived classes have extra members which track the state related to individual requests. This is an issue for a bunch of reasons: 1) they are not really just URLs as most people would understand them. They are more like request objects. And this is totally counter to how they are used in the M-C side of things, which assumes URLs are just URLs. 2) it splits up request state needlessly, making everything way more complicated. For example, IMAP requests have their state smeared across nsImapProtocol, nsImapMockChannel and nsImapUrl, among others. 3) it causes all kinds of threading issues. Because our URLs hold pointers to XPCOM objects, using them anywhere except the main thread is a recipe for trouble (e.g. Bug 1175168). But there's no reason for this, and I'd be surprised if M-C didn't assume that URLs can be used on any thread. covers: nsImapUrl, nsPop3URL, nsSmtpUrl, nsMailboxUrl, JaBaseCppUrl, nsNntpUrl etc... most use nsMsgMailNewsUrl as base class, so that's probably a good place to start.
Bug 1729228 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
All the C-C nsIURL-derived classes have extra members which track the state related to individual requests. This is an issue for a bunch of reasons: 1) they are not really just URLs as most people would understand them. They are more like request objects. And this is totally counter to how they are used in the M-C side of things, which assumes URLs are just URLs. 2) it splits up request state needlessly, making everything way more complicated. For example, IMAP requests have their state smeared across nsImapProtocol, nsImapMockChannel and nsImapUrl, among others. 3) it causes all kinds of threading issues. Because our URLs hold pointers to XPCOM objects, using them anywhere except the main thread is a recipe for trouble (e.g. Bug 1175168). But there's no reason for this, and I'd be surprised if M-C didn't assume that URLs can be used on any thread. covers: nsImapUrl, nsPop3URL, nsSmtpUrl, nsMailboxUrl, JaBaseCppUrl, nsNntpUrl etc... most use [nsMsgMailNewsUrl](https://searchfox.org/comm-central/source/mailnews/base/src/nsMsgMailNewsUrl.h) as base class, so that's probably a good place to start.