Closed Bug 1253282 Opened 9 years ago Closed 9 years ago

browser object does not seem to be deallocated on tab close

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox47 --- affected

People

(Reporter: oyiptong, Unassigned)

Details

Attachments

(1 file)

Attached file browser_gc.js
I was writing some code that keeps track of browser objects and while writing tests found that upon closing a tab, the browser objects stayed around. How to reproduce: 1. Write a test that opens a new tab 2. Keep track of browser object with a weak ref 3. Close the tab Expected outcome: Weak ref get() function returns null Observed outcome: Weak ref get() function returns a browser object whose documentURI property is nullsy
A tests that verifies this behavior is attached. Line 44 fails because line 22 never runs, because in line 19 the `browser` variable is always assigned a browser object.
If I bump the timeout to 15 seconds, (and turn the "else" in the numBrowsers loop to an "else if") I get this to pass.
it's a non-issue then. I'll mark it as invalid, and chalk it up to my misundertanding of the lifetimes of the objects
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.

Attachment

General

Created:
Updated:
Size: