Closed
Bug 198867
Opened 21 years ago
Closed 19 years ago
Some of nsDocument::mPrincipal objects are leaked
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
EXPIRED
People
(Reporter: leonidr, Unassigned)
Details
Attachments
(3 files)
288 bytes,
text/html
|
Details | |
288 bytes,
text/html
|
Details | |
4.35 KB,
patch
|
jst
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; Debian/1.3.3.20030317-1) Gecko/20030305 Galeon/1.3.3 Build Identifier: This is for Mozilla 1.0.2. I haven't checked 1.3 or trunk yet, but I'm going to do it. Attached pages load each other via JavaScript. It seems that nsStandardURL objects with URLs of pages aren't freed, even if you quit Mozilla. Reproducible: Always Steps to Reproduce: 1. Add some counting facility to nsStandardURL constructor/destructor 2. Load urltest1.html -- Or --- 1. Put urltest1.html and urltest2.html into directory with the longest path possible, like 2K of characters. 2. Load urltest1.html Actual Results: Counter goes up and never stops. -- Or --- Mozilla consumes more and more memory until it crashes. Expected Results: Counter stops going up on some value. -- Or --- Mozilla frees used memory eventually.
Reporter | ||
Comment 1•21 years ago
|
||
Reporter | ||
Comment 2•21 years ago
|
||
Reporter | ||
Updated•21 years ago
|
Version: Trunk → 1.0 Branch
Reporter | ||
Comment 3•21 years ago
|
||
I looked at nsStandardURL object's refcounter. After object has been removed from session history, refcounter value was 1. So, I think there is one unbalanced AddRef somewhere.
Reporter | ||
Comment 5•21 years ago
|
||
It is not network, but content. And not nsStandardURL, but nsDocument::mPrincipal. nsDocument::mPrincipal is raw pointer in 1.0.2, not nsCOMPtr as in Mozilla 1.3. So, it is released manually by NS_IF_RELEASE in nsDocument destructor. The problem is that release happens before calling mNodeInfoManager->DropDocumentReference(). But DropDocumentReference in turn calls nsDocuments::GetPrincipal where mPrincipal is getting initialized and AddRef'ed again. Hence the leak. Changing bug's title and component.
Component: Networking → DOM Other
Summary: Some of nsStandardURL objects are leaked → Some of nsDocument::mPrincipal objects are leaked
please set the default owners when you hop components.
Assignee: dougt → dom_bugs
QA Contact: ashishbhatt → gerardok
Reporter | ||
Comment 7•21 years ago
|
||
It was fixed on trunk. See http://bugzilla.mozilla.org/show_bug.cgi?id=170201
Comment 8•21 years ago
|
||
Fixed on the trunk, marking FIXED.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 9•21 years ago
|
||
But what about the branch? It must be fixed there too. And I'm going to provide patch for 1.0 branch. Or I don't understand bug's life cycle and "fixed" means something else?
Comment 10•21 years ago
|
||
In general, the focus has moved off the 1.0 branch, but if you still has an interest in fixing this on the branch, then feel free to open up this bug and provide a patch.
Reporter | ||
Comment 11•21 years ago
|
||
Reopening: I've got a patch.
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Reporter | ||
Comment 12•21 years ago
|
||
This is a patch from bug 17201, backported to 1.0 branch.
Reporter | ||
Comment 13•21 years ago
|
||
bug 170201, sorry.
Comment 14•21 years ago
|
||
Comment on attachment 119085 [details] [diff] [review] patch converting nsDocument::mPrincipal into an nsCOMPtr sr=jst
Attachment #119085 -
Flags: superreview+
Comment 15•21 years ago
|
||
Asa, Brendan, are we still maintaining the 1.0 branch? If so, should we land this there?
Comment 16•19 years ago
|
||
This is an automated message, with ID "auto-resolve01". This bug has had no comments for a long time. Statistically, we have found that bug reports that have not been confirmed by a second user after three months are highly unlikely to be the source of a fix to the code. While your input is very important to us, our resources are limited and so we are asking for your help in focussing our efforts. If you can still reproduce this problem in the latest version of the product (see below for how to obtain a copy) or, for feature requests, if it's not present in the latest version and you still believe we should implement it, please visit the URL of this bug (given at the top of this mail) and add a comment to that effect, giving more reproduction information if you have it. If it is not a problem any longer, you need take no action. If this bug is not changed in any way in the next two weeks, it will be automatically resolved. Thank you for your help in this matter. The latest beta releases can be obtained from: Firefox: http://www.mozilla.org/projects/firefox/ Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html Seamonkey: http://www.mozilla.org/projects/seamonkey/
Comment 17•19 years ago
|
||
This bug has been automatically resolved after a period of inactivity (see above comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago → 19 years ago
Resolution: --- → EXPIRED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•