Closed Bug 315708 Opened 19 years ago Closed 19 years ago

Should release found link and current window object from nsTypeAheadFind.cpp

Categories

(Toolkit :: Find Toolbar, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8.1alpha1

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Keywords: fixed1.8.1, memory-leak, regression)

Attachments

(1 file, 1 obsolete file)

In nsTypeAheadFind, we add refs to link or window object when finding text or link. But these objects aren't release until next finding.
Currently, nsTypeAheadFind can know when these objects are not needed. The time is running |SetDocShell|. It's called when changing tab or unloaded the document in current tab. In this time, we should release these object.

This is regression of pseudo-focus behavior implementation.
Attached patch Patch rv1.0 (obsolete) — Splinter Review
Attachment #202379 - Flags: review?(mconnor)
Status: NEW → ASSIGNED
Whiteboard: [needs review mconnor]
The second half of the patch makes sense, but why the first half, if they're about to be released anyway?
> but why the first half, if they're
> about to be released anyway?

I don't need to release these on destructor?
nsCOMPtr's destructor releases the object it points to.
Comment on attachment 202379 [details] [diff] [review]
Patch rv1.0

thanks, I'll attach new patch.
Attachment #202379 - Flags: review?(mconnor) → review-
Attached patch Patch rv2.0Splinter Review
Attachment #202379 - Attachment is obsolete: true
Attachment #206610 - Flags: review?(mconnor)
Flags: blocking-firefox2?
Attachment #206610 - Flags: review?(mconnor) → review+
checked-in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: [needs review mconnor]
michaell+bmo:

This bug depends on bug 314288 that is calling nsTypeAheadFind::SetDocShell on hidden the document. But that bug is already denied to check-in to 1.8 branch...
Depends on: 314288
Target Milestone: --- → Firefox 3
Thanks for explaining. Sorry if I'm just adding to noise, but given that the reason for not taking main patch for bug 314288 on branch was because it was too close to release, I wonder if approval for the other patch would be reconsidered on the different criteria for 1.8.1? I'm afraid I don't know enough to know if that's a reasonable question for this patch. dbaron? mconnor?
The fact that a patch was denied approval for the 1.8 branch pre-1.5 doesn't mean that it can't land on the 1.8 branch for 1.8.1 (Firefox 2). It would of course help if the regressions are well-known and fixed, if applicable.
We didn't take that patch for 1.8 final because it was extremely late in the game.  That doesn't mean we won't take it for 1.8.1, and I would say we absolutely need/want to take both, assuming the regression gets fixed (bug 314819)
Flags: blocking-firefox2? → blocking-firefox2+
Attachment #206610 - Flags: branch-1.8.1?(mconnor)
Attachment #206610 - Flags: branch-1.8.1?(mconnor) → branch-1.8.1+
Whiteboard: [checkin needed (1.8 branch)]
checked-in to 1.8 branch.
Whiteboard: [checkin needed (1.8 branch)]
Target Milestone: Firefox 3 → Firefox 2 alpha1
Flags: blocking1.8.0.2?
You need to work through the regression chain before we can consider for a stability release.
Flags: blocking1.8.0.2? → blocking1.8.0.2-
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: