Closed
Bug 61886
Opened 24 years ago
Closed 23 years ago
Oops, I'm leaking (through navigator.js)
Categories
(Core Graveyard :: Tracking, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla0.9.7
People
(Reporter: jag+mozbugs, Assigned: jag+mozilla)
References
Details
(Keywords: helpwanted)
Attachments
(4 files, 2 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
Apparantly my changes to navigator.js are somehow causing a XUL document (the
browser UI) to be leaked. We're trying to track down what it is, this is the
tracker bug in the mean time.
Reporter | ||
Comment 1•24 years ago
|
||
So I've got two suspects which might be leaking, the rest of the checkin was
just whitespace changes, style rewrites, etc.
1) _content.location.href changed to webNavigation.currentURI.spec
2) Assigning a string from a stringbundle to a member of XULBrowser:
function nsXULBrowserWindow()
{
this.defaultStatus = bundle.GetStringFromName("defaultStatus");
}
Reporter | ||
Comment 2•24 years ago
|
||
Reporter | ||
Comment 3•24 years ago
|
||
Reporter | ||
Comment 4•24 years ago
|
||
Reporter | ||
Comment 5•24 years ago
|
||
And patch #2 is the winner...
Reporter | ||
Comment 6•24 years ago
|
||
So the offending bit is:
getWebNavigation().currentURI;
To rule out xbl, I tested this line, which didn't leak:
getWebNavigation();
Reporter | ||
Comment 7•24 years ago
|
||
To clarify:
this JS shouldn't leak... So we'll need to fix something somewhere else... Patch
#2 is just a work-around we could use to bring current leak numbers down so
smaller (new) leaks get noticed more easily in the mean time.
Comment 8•24 years ago
|
||
r=dbaron on that patch if you add something like "// XXX this causes a big leak
and is temporarily comment out until we figure out why. See bug 61886" to both
changes...
Comment 9•24 years ago
|
||
a=ben@netscape.com, I agree with dbaron, please add the suggested comment.
Updated•24 years ago
|
Keywords: mozilla0.9,
mozilla1.0
Comment 10•24 years ago
|
||
jag: have you figured out why you are leaking yet? ;-) (I just came across the
comment when perusing navigator.js.)
Gerv
Reporter | ||
Comment 11•24 years ago
|
||
Not really yet, just some hunches.
Comment 12•24 years ago
|
||
Does this still cause a leak?
Comment 13•24 years ago
|
||
Any ETA for the real thing yet? I really need this for MultiZilla.
Comment 14•24 years ago
|
||
dbaron is packing this weekend. adding some other folks that might
be able to track this down. should this go on the 0.9.1 radar?
Comment 15•24 years ago
|
||
I just searched lxr on seamonkey for all usage of
getWebNavigation().currentURI and everything I found was already commented
out... from what I can tell all references of the offending line
var url = getWebNavigation().currentURI.spec;
has changed to
var url = _content.location.href;
which is what's suggested in patch #2, looks like work around patch has already
checked in.
Updated•24 years ago
|
Keywords: helpwanted
Target Milestone: --- → mozilla1.0
Comment 17•24 years ago
|
||
->moz1.0/helpwanted
Comment 18•23 years ago
|
||
Peter, is this Linux only, or is MS Windows also infected by this bug?
Assignee | ||
Comment 19•23 years ago
|
||
Well, currently no one is affected because of the work-arounds put in place. I
don't recall who was and who wasn't affected, though I wouldn't be surprised if
it's XP.
Comment 20•23 years ago
|
||
Well we are: http://MultiZilla.mozdev.org/index.html and we sure hope to see
this fixed far before 1.0.
Comment 21•23 years ago
|
||
Are we sure this hasn't been fixed already? There was a JSPROP_SHARED that was
missing somewhere in XBL stuff. I guess I'll try to test later today if the
commented-out code is still around...
Assignee | ||
Comment 22•23 years ago
|
||
I vaguely remember this wasn't fixed with the JSPROP_SHARED fix you mention.
Best way to find out is to go test.
Comment 23•23 years ago
|
||
Comment 24•23 years ago
|
||
Do we know that we'd still hit one of these running the bloat URLs?
Assignee | ||
Comment 25•23 years ago
|
||
We should hit that when the bookmarks "last visited" is updated.
Comment 26•23 years ago
|
||
There's no leaks anymore, so why can't we remove the workaround? I did, and have
no problems with it. What is the holding it from going into the tree?
Assignee | ||
Comment 27•23 years ago
|
||
We could, or I could just remove the comments, it shouldn't matter really which
version is used. Any strong preference from you, HJ?
Comment 28•23 years ago
|
||
Just a note. We apparently have security exploits that let a web page fake
_content.location.href by setting the appropriate getters on things. So the
nsIWebNavigation version is better in that it will definitely get the right URI.
Comment 30•23 years ago
|
||
Assignee | ||
Comment 31•23 years ago
|
||
Thanks, I'll play with this once I remember how to do leak tests :-)
Assignee | ||
Comment 32•23 years ago
|
||
Attachment #47048 -
Attachment is obsolete: true
Attachment #56340 -
Attachment is obsolete: true
Comment 33•23 years ago
|
||
Comment on attachment 60110 [details] [diff] [review]
Next update to trunk.
r=dbaron
Attachment #60110 -
Flags: review+
Assignee | ||
Comment 34•23 years ago
|
||
Fixed!
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 35•23 years ago
|
||
Jag, one small nit:
@@ -123,7 +120,7 @@
function HandleBookmarkIcon(iconURL, addFlag)
{
- var url = getWebNavigation().currentURI.spec
+ var url = getWebNavigation().currentURI.spec;
if (url) {
// update URL with new icon reference
if (!gBookmarksService)
Assignee | ||
Comment 36•23 years ago
|
||
I'll fix this next time I have to check in to navigator.js :-)
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•