Fireshot creates zombie compartments

RESOLVED FIXED

Status

()

Core
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: eviljeff, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
x86_64
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

5 years ago
Fireshot v0.97 creates a zombie compartment if the capture 'selected' area function is used.

steps to reproduce:
1) open any webpage in new tab.
2) use dropdown menu on toolbar button and choose 'Capture Selected Area and...' then chose 'edit'
3) select random area
4) close down window that pops up with captured image
5) close tab with webpage in it.
6) navigate to about?memory:verbose and hit minimize memory button a few times.
7) see compartment for webpage still there.

Doesn't appear to happen for full page capture.

Comment 1

5 years ago
Thank you William for this notice.
I discovered that creating any class variables referencing to document.commandDispatcher.focusedWindow.document makes a zombie compartment unless I manually set them to null. 

Is this normal? If yes, then I'd rather rewrite the code to omit the singleton usage (and all issues caused by it).(In reply to Andrew Williamson [:eviljeff] from comment #0)
> Fireshot v0.97 creates a zombie compartment if the capture 'selected' area
> function is used.
> 
> steps to reproduce:
> 1) open any webpage in new tab.
> 2) use dropdown menu on toolbar button and choose 'Capture Selected Area
> and...' then chose 'edit'
> 3) select random area
> 4) close down window that pops up with captured image
> 5) close tab with webpage in it.
> 6) navigate to about?memory:verbose and hit minimize memory button a few
> times.
> 7) see compartment for webpage still there.
> 
> Doesn't appear to happen for full page capture.

Thank you William for this notice.
I discovered that creating any class variables referencing to document.commandDispatcher.focusedWindow.document makes a zombie compartment unless I manually set them to null. 

Is this normal? If yes, then I'd rather rewrite the code to omit the singleton usage (and all issues caused by it).

Comment 2

5 years ago
(In reply to Evgeny from comment #1)
> Thank you William for this notice.
> I discovered that creating any class variables referencing to
> document.commandDispatcher.focusedWindow.document makes a zombie compartment
> unless I manually set them to null. 
> 
> Is this normal? If yes, then I'd rather rewrite the code to omit the
> singleton usage (and all issues caused by it).

Yes. That means that the document and it's compartment will be kept alive as long as the class variable is unmodified and the enclosing object is alive. If there's a singleton holding on to that document, then it will remain alive forever.
(Reporter)

Comment 3

5 years ago
Zombie compartment fixed in latest version.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.