Closed Bug 611089 Opened 14 years ago Closed 14 years ago

The private browsing service can leak windows

Categories

(Firefox :: Private Browsing, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 4.0b8
Tracking Status
blocking2.0 --- betaN+
blocking1.9.2 --- -
status1.9.2 --- .13-fixed
blocking1.9.1 --- -
status1.9.1 --- .16-fixed

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

(Keywords: memory-leak)

Attachments

(1 file)

I noticed that running some browser-chrome tests alone reports memory leaks.  I investigated this, and with the help of the folks on #jsapi, now I know the cause.  We have _windowsToClose as a prototype property, and here we assign to it: <http://mxr.mozilla.org/mozilla-central/source/browser/components/privatebrowsing/src/nsPrivateBrowsingService.js#551>.  This assignment actually affects the instance, not the prototype, which causes the original array on the prototype to coexist with the new array.

The fix is simple, we should just have _windowsToClose as an instance variable.
blocking2.0: --- → ?
Attached patch Patch (v1)Splinter Review
Attachment #489577 - Flags: review?(gavin.sharp)
Attachment #489577 - Flags: approval2.0?
Attachment #489577 - Flags: review?(gavin.sharp)
Attachment #489577 - Flags: review+
Attachment #489577 - Flags: approval2.0?
blocking2.0: ? → betaN+
OS: Mac OS X → All
Hardware: x86 → All
Blocks: 587248
Whiteboard: [needs landing]
http://hg.mozilla.org/mozilla-central/rev/6adc19c7a1e4
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
Target Milestone: --- → Firefox 4.0b8
We should take this on branches as well.
blocking1.9.1: --- → ?
blocking1.9.2: --- → ?
Attachment #489577 - Flags: approval1.9.2.13?
Attachment #489577 - Flags: approval1.9.1.16?
Not a branch blocker but seems good to take.
blocking1.9.1: ? → -
blocking1.9.2: ? → -
Comment on attachment 489577 [details] [diff] [review]
Patch (v1)

Approved for 1.9.2.13 and 1.9.1.16, a=dveditz for release-drivers
Attachment #489577 - Flags: approval1.9.2.13?
Attachment #489577 - Flags: approval1.9.2.13+
Attachment #489577 - Flags: approval1.9.1.16?
Attachment #489577 - Flags: approval1.9.1.16+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: