The private browsing service can leak windows

RESOLVED FIXED in Firefox 4.0b8

Status

()

RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

({memory-leak})

Trunk
Firefox 4.0b8
memory-leak
Points:
---

Firefox Tracking Flags

(blocking2.0 betaN+, blocking1.9.2 -, status1.9.2 .13-fixed, blocking1.9.1 -, status1.9.1 .16-fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
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.
(Assignee)

Updated

8 years ago
blocking2.0: --- → ?
(Assignee)

Comment 1

8 years ago
Created attachment 489577 [details] [diff] [review]
Patch (v1)
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
(Assignee)

Updated

8 years ago
Blocks: 587248
(Assignee)

Updated

8 years ago
Whiteboard: [needs landing]
(Assignee)

Comment 2

8 years ago
http://hg.mozilla.org/mozilla-central/rev/6adc19c7a1e4
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
Target Milestone: --- → Firefox 4.0b8
(Assignee)

Comment 3

8 years ago
We should take this on branches as well.
blocking1.9.1: --- → ?
blocking1.9.2: --- → ?
(Assignee)

Updated

8 years ago
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: ? → -
status1.9.1: --- → wanted
status1.9.2: --- → wanted
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+
(Assignee)

Comment 6

8 years ago
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/64cb7b04d78b
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/177a7eab1180
status1.9.1: wanted → .16-fixed
status1.9.2: wanted → .13-fixed
You need to log in before you can comment on or make changes to this bug.