Closed
Bug 352911
Opened 18 years ago
Closed 18 years ago
leak when closing window while it contains a google maps page (missing ClearScope on outer window)
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: dbaron, Assigned: dbaron)
References
()
Details
(Keywords: memory-leak, regression, Whiteboard: [patch])
Attachments
(1 file)
1.25 KB,
patch
|
markh
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
I'm seeing major leaks, I think because JS_ClearScope and perhaps some other cleanup code is missing from one of the window teardown paths.
Steps to reproduce:
1. start firefox
2. load http://dbaron.org/maps/geotagged-photos
3. close the window
Actual results: the document and both the inner and outer windows leak
Note that if you navigate to a different page between (2) and (3), there's no leak.
The leak seems to be due to a cycle that should have been broken by a JS_ClearScope:
0a4de740 object 0xa502a68 HTMLDocument via locked object(Window @ 0x0a4de230).XPCWrappedNative::mNativeWrapper(XPCNativeWrapper @ 0x0a4de798).__proto__(XPCNativeWrapper @ 0x0a4de328).__parent__(Window @ 0x0a23fa18).GLoadApi(Function @ 0x0a720d58).__parent__(Call @ 0x0a720ae0).__proto__(Call @ 0x0a720ad8).arguments(Object @ 0x0a82e660).0(Object @ 0x0aab1840).photos(Array @ 0x0aab1848).0(Object @ 0x0a507338).marker(Object @ 0x0a8b1618).a(Object @ 0x0a507780).b(HTMLDivElement @ 0x0a507768).nsDOMClassInfo::sPreservedWrapperTable(HTMLImageElement @ 0x0a7bbec8).__parent__(HTMLDocument @ 0x0a4de740).
Assignee | ||
Comment 2•18 years ago
|
||
This fixes the leak, and I think it does what was intended here. Instead of repeating the clearing of the inner window's global that was just done in FreeInnerObjects, this clears the outer window's global.
Assignee: general → dbaron
Status: NEW → ASSIGNED
Attachment #238723 -
Flags: superreview?(jst)
Attachment #238723 -
Flags: review?(mhammond)
Assignee | ||
Updated•18 years ago
|
Whiteboard: [patch]
![]() |
||
Updated•18 years ago
|
Blocks: dom-agnostic
Assignee | ||
Updated•18 years ago
|
Flags: blocking1.9?
Assignee | ||
Updated•18 years ago
|
Summary: leak when closing window while it contains a google maps page → leak when closing window while it contains a google maps page (missing ClearScope on outer window)
Comment 3•18 years ago
|
||
Comment on attachment 238723 [details] [diff] [review]
patch
sr=jst
Attachment #238723 -
Flags: superreview?(jst) → superreview+
Comment 4•18 years ago
|
||
Comment on attachment 238723 [details] [diff] [review]
patch
Oh, but please do pull this code up to the previous line now that it fits.
Assignee | ||
Comment 5•18 years ago
|
||
All 3 lines even fit on one now!
Comment 6•18 years ago
|
||
Comment on attachment 238723 [details] [diff] [review]
patch
yeah, it looks like I did get that confused.
Attachment #238723 -
Flags: review?(mhammond) → review+
Assignee | ||
Comment 7•18 years ago
|
||
Checked in to trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9alpha
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•