Closed Bug 1126755 Opened 9 years ago Closed 9 years ago

Use weak references for |browser|s in UITour

Categories

(Firefox :: Tours, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: Dexter, Unassigned)

Details

Using UITour functions from a browser with no tab causes the window to leak.

A short-term solution could be to use weak references in places like [1], using the |Components.utils.getWeakReference| API[2].

[1] - https://dxr.mozilla.org/mozilla-central/source/browser/components/uitour/UITour.jsm#639
[2] - https://developer.mozilla.org/en-US/docs/Components.utils.getWeakReference
Blocks: 1111022
I realized afterwards that the problem with this solution is that 2 weak references to the same <browser> won't be treated as the same in the Set so I think we should go with replacing TabClose instead.
OS: Windows 7 → All
Hardware: x86_64 → All
(In reply to Matthew N. [:MattN] from comment #1)
> I realized afterwards that the problem with this solution is that 2 weak
> references to the same <browser> won't be treated as the same in the Set so
> I think we should go with replacing TabClose instead.

Good point. Can I close this one then?
Sure
No longer blocks: 1111022
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.