Closed
Bug 1187068
Opened 10 years ago
Closed 10 years ago
Leak with document.fonts, document.open()
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla43
People
(Reporter: jruderman, Assigned: mccr8, NeedInfo)
References
Details
(Keywords: memory-leak, testcase, Whiteboard: [MemShrink:P2])
Attachments
(2 files)
141 bytes,
text/html
|
Details | |
1.20 KB,
patch
|
heycam
:
review+
ritu
:
approval-mozilla-aurora+
ritu
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
PCOM_MEM_LEAK_LOG=2 shows this leaking nsGlobalWindow, nsDocument.
I didn't know my fuzzer could even test document.open() this way!
Assignee | ||
Comment 1•10 years ago
|
||
Using CC logs, I determined that a css::Loader was keeping alive the window. Then, using DMD heap scanner logs, I determined that an nsContentSink was holding alive the Loader, via the mCSSLoader field, which should be cycle collected. I could have skipped the second step and found it via code inspection, but for some reason I forgot that nsContentSink is cycle collected.
Assignee: nobody → continuation
Whiteboard: [MemShrink]
Assignee | ||
Comment 2•10 years ago
|
||
It looks like this was an incomplete cycle collectification of Loader in bug 1031967, and then the actual leak was probably caused by bug 1028497, which the CCing was needed for it seems. It would be nice if we had some static analysis of CC methods.
Blocks: 1028497
Assignee | ||
Comment 3•10 years ago
|
||
I don't know how to write a test for this. A crash test hangs, presumably because the loading never finishes.
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8648412 -
Flags: review?(cam)
![]() |
||
Comment 5•10 years ago
|
||
heycam: review ping! It's a two-line change :)
Whiteboard: [MemShrink] → [MemShrink:P2]
Comment 6•10 years ago
|
||
Comment on attachment 8648412 [details] [diff] [review]
Tell the cycle collector about nsContentSink::mCSSLoader.
Review of attachment 8648412 [details] [diff] [review]:
-----------------------------------------------------------------
Sorry for overlooking this.
Attachment #8648412 -
Flags: review?(cam) → review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Reporter | ||
Comment 7•10 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #3)
> I don't know how to write a test for this. A crash test hangs, presumably
> because the loading never finishes.
Either:
A) Make a new file that loads the testcase as an iframe. Make the new page navigate away after boom().
B) Follow the document.open with a document.close() at some point.
Hopefully one of those still reproduces the bug (without the patch)
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Assignee | ||
Comment 10•10 years ago
|
||
Comment on attachment 8648412 [details] [diff] [review]
Tell the cycle collector about nsContentSink::mCSSLoader.
Approval Request Comment
[Feature/regressing bug #]: bug 1028497
[User impact if declined]: Potential for bad leaks, though I haven't seen any evidence they are happening in the real world.
[Describe test coverage new/current, TreeHerder]: This feature has some existing tests.
[Risks and why]: Very low. It just tells the cycle collector about one more field.
[String/UUID change made/needed]: none
Attachment #8648412 -
Flags: approval-mozilla-beta?
Attachment #8648412 -
Flags: approval-mozilla-aurora?
Comment 11•10 years ago
|
||
Jesse, could you please verify this specific memleak is fixed in the latest Nightly build? Thanks.
Flags: needinfo?(jruderman)
Comment 12•10 years ago
|
||
Comment on attachment 8648412 [details] [diff] [review]
Tell the cycle collector about nsContentSink::mCSSLoader.
Approving for uplift to Aurora42 and Beta41 as the fix seems simple and the patch has been in Nightly for a few days already.
Attachment #8648412 -
Flags: approval-mozilla-beta?
Attachment #8648412 -
Flags: approval-mozilla-beta+
Attachment #8648412 -
Flags: approval-mozilla-aurora?
Attachment #8648412 -
Flags: approval-mozilla-aurora+
status-firefox41:
--- → affected
Comment 13•10 years ago
|
||
Comment 14•10 years ago
|
||
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
•