Closed
Bug 99168
Opened 25 years ago
Closed 25 years ago
MLK: nsMsgMailNewsUrl leaks on reading imap messages.
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: naving, Assigned: naving)
Details
(Keywords: memory-leak)
Attachments
(3 files)
|
2.40 KB,
patch
|
mscott
:
superreview+
|
Details | Diff | Splinter Review |
|
5.43 KB,
text/plain
|
Details | |
|
2.96 KB,
patch
|
Bienvenu
:
review+
mscott
:
superreview+
|
Details | Diff | Splinter Review |
| Assignee | ||
Comment 1•25 years ago
|
||
This is a pretty serious leak because every time user reads a message it
leaks this object.
Summary: MLK: nsMsgMailNewsUrl leaks on reading imap messages. → MLK: nsMsgMailNewsUrl leaks on reading imap messages.
QA Contact: huang → stephend
Keywords: mlk
| Assignee | ||
Comment 2•25 years ago
|
||
| Assignee | ||
Comment 3•25 years ago
|
||
The fix is not to set the URI for the mock Channel everytime we create an
imapUrl. This causes the imapUrl to leak because in some instances, more
specifically as shown below, they just need to know the url. If you
set the url on mockChannel you will have to explicitly null it in order
to destroy the circular reference, which never happens because the code
below knows nothing about mockChannel. However, we do need to set the url
on mockChannel, when we are running url using the imap connection, more
specifically when we do GetImapConnectionAndLoadUrl(). This patch has
been in my tree for a few days now and everything seems to work fine.
cc mscott and bienvenu for review.
nsImapUrlConstructor(nsISupports * 0x00000000, const nsID & {...}, void * *
0x0012e86c) line 38 + 132 bytes
nsGenericFactory::CreateInstance(nsGenericFactory * const 0x05615490,
nsISupports * 0x00000000, const nsID & {...}, void * * 0x0012e86c) line 59 + 21
bytes
nsComponentManagerImpl::CreateInstance(nsComponentManagerImpl * const
0x00957c30, const nsID & {...}, nsISupports * 0x00000000, const nsID & {...},
void * * 0x0012e86c) line 1544 + 24 bytes
nsComponentManager::CreateInstance(const nsID & {...}, nsISupports * 0x00000000,
const nsID & {...}, void * * 0x0012e86c) line 3073
nsImapService::NewURI(nsImapService * const 0x04d90a9c, const char * 0x066ee970,
nsIURI * 0x00000000, nsIURI * * 0x0012e990) line 3207 + 46 bytes
nsIOService::NewURI(nsIOService * const 0x00a404c0, const char * 0x066ee970,
nsIURI * 0x00000000, nsIURI * * 0x0012e990) line 694 + 35 bytes
NS_NewURI(nsIURI * * 0x0012e990, const char * 0x066ee970, nsIURI * 0x00000000,
nsIIOService * 0x00a404c0) line 81 + 24 bytes
nsScriptSecurityManager::GetCodebasePrincipal(nsScriptSecurityManager * const
0x0286ee50, nsIURI * 0x066af5c4, nsIPrincipal * * 0x066eca18) line 1217 + 43
bytes
nsDocument::GetPrincipal(nsDocument * const 0x066ec9b0, nsIPrincipal * *
0x0012ea90) line 739 + 37 bytes
IsScriptEnabled(nsIDocument * 0x066ec9b0, nsIWebShell * 0x044ec314) line 2419 +
36 bytes
HTMLContentSink::Init(nsIDocument * 0x066ec9b0, nsIURI * 0x066af5c4, nsIWebShell
* 0x044ec314, nsIChannel * 0x066af400) line 2502 + 13 bytes
NS_NewHTMLContentSink(nsIHTMLContentSink * * 0x0012f540, nsIDocument *
0x066ec9b0, nsIURI * 0x066af5c4, nsIWebShell * 0x044ec314, nsIChannel *
0x066af400) line 2318 + 24 bytes
nsHTMLDocument::StartDocumentLoad(nsHTMLDocument * const 0x066ec9b0, const char
* 0x02ad4ac8, nsIChannel * 0x066af400, nsILoadGroup * 0x044ed7c0, nsISupports *
0x044ec204, nsIStreamListener * * 0x0012fadc, int 1) line 868 + 67 bytes
nsContentDLF::CreateDocument(const char * 0x02ad4ac8, nsIChannel * 0x066af400,
nsILoadGroup * 0x044ed7c0, nsISupports * 0x044ec204, const nsID & {...},
nsIStreamListener * * 0x0012fadc, nsIContentViewer * * 0x0012f960) line 329 + 45
bytes
nsContentDLF::CreateInstance(nsContentDLF * const 0x066ebfa0, const char *
0x02ad4ac8, nsIChannel * 0x066af400, nsILoadGroup * 0x044ed7c0, const char *
0x0012fa8c, nsISupports * 0x044ec204, nsISupports * 0x00000000,
nsIStreamListener * * 0x0012fadc, nsIContentViewer * * 0x0012f960) line 219 + 37
bytes
nsDocShell::NewContentViewerObj(nsDocShell * const 0x044ec1e0, const char *
0x0012fa8c, nsIRequest * 0x066af400, nsILoadGroup * 0x044ed7c0,
nsIStreamListener * * 0x0012fadc, nsIContentViewer * * 0x0012f960) line 3929 +
101 bytes
nsDocShell::CreateContentViewer(nsDocShell * const 0x044ec1e0, const char *
0x0012fa8c, nsIRequest * 0x066af400, nsIStreamListener * * 0x0012fadc) line 3813
+ 60 bytes
nsDSURIContentListener::DoContent(nsDSURIContentListener * const 0x044ec050,
const char * 0x0012fa8c, int 0, nsIRequest * 0x066af400, nsIStreamListener * *
0x0012fadc, int * 0x0012fa70) line 121 + 33 bytes
nsDocumentOpenInfo::DispatchContent(nsIRequest * 0x066af400, nsISupports *
0x00000000) line 352 + 93 bytes
Status: NEW → ASSIGNED
Updated•25 years ago
|
Attachment #49155 -
Flags: superreview+
Comment 4•25 years ago
|
||
Comment on attachment 49155 [details] [diff] [review]
proposed fix
sr=mscott for the trunk. We might expose some crashers where we don't have a url and we need one off the mock channel. But I couldn't trigger any when running with the patch.
| Assignee | ||
Comment 5•25 years ago
|
||
fix checked in on trunk.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Using the log as criteria, this looks fixed to me.
Verified FIXED, latest trunk CVS pull on Win32.
Status: RESOLVED → VERIFIED
Comment 8•25 years ago
|
||
I think this fix broke reading imap messages with inline images. I'm going to
try backing out this locally, and if it fixes the problem, I'll check in the
backout and re-open this bug.
Comment 9•25 years ago
|
||
Re-opening, since I'm backing out the fix. I'll take the bug if you want, Navin.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 10•25 years ago
|
||
I will look into it again.
| Assignee | ||
Comment 11•25 years ago
|
||
David, have you backed out the fix. I have a fix in hand that will fix the
inline attachments problem. I am testing the fix right now.
Status: REOPENED → ASSIGNED
Comment 12•25 years ago
|
||
yes, I just checked it in - had to wait for the tree to open :-( You should
check view | message source too with your change.
| Assignee | ||
Comment 13•25 years ago
|
||
| Assignee | ||
Comment 14•25 years ago
|
||
The fix is to initializeURI for mockChannel when we are creating a new channel.
David, can i get r/sr ?
It works for view | Messages. I will do some more test before I land.
Comment 15•25 years ago
|
||
Let me try it out later - I'm still waiting for the build. This isn't the kind
of fix that I can just code review, because it really just requires lots of testing.
Comment 16•25 years ago
|
||
Comment on attachment 51163 [details] [diff] [review]
fix
looks good so far, haven't seen any regressions.
Attachment #51163 -
Flags: review+
Comment 17•25 years ago
|
||
how about testing printing...just for kicks....try printing with an image too.
| Assignee | ||
Comment 18•25 years ago
|
||
printing works fine too.
Comment 19•25 years ago
|
||
Comment on attachment 51163 [details] [diff] [review]
fix
sr=mscott then.
thanks for trying out printing.
Attachment #51163 -
Flags: superreview+
| Assignee | ||
Comment 20•25 years ago
|
||
fixed again.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Comment 21•25 years ago
|
||
I believe this fixed Bug 100712 ...
I'm marking it as resolved...
Verified FIXED (again).
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•