Last Comment Bug 734097 - Fireshot creates zombie compartments
: Fireshot creates zombie compartments
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: General (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
https://addons.mozilla.org/en-US/fire...
Depends on:
Blocks: LeakyAddons ZombieCompartments
  Show dependency treegraph
 
Reported: 2012-03-08 08:04 PST by Andrew Williamson [:eviljeff]
Modified: 2012-03-12 10:57 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Andrew Williamson [:eviljeff] 2012-03-08 08:04:07 PST
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 Evgeny 2012-03-08 10:54:03 PST
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 Josh Matthews [:jdm] (on vacation until Dec 5) 2012-03-08 10:59:19 PST
(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.
Comment 3 Andrew Williamson [:eviljeff] 2012-03-12 10:57:22 PDT
Zombie compartment fixed in latest version.

Note You need to log in before you can comment on or make changes to this bug.