Closed
Bug 305448
Opened 19 years ago
Closed 19 years ago
Leaving document while script loaded via document.write is loading leaks the world
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: mrbkap)
References
()
Details
(Keywords: fixed1.8, memory-leak)
Attachments
(2 files)
1.91 KB,
patch
|
bzbarsky
:
review+
jst
:
superreview+
asa
:
approval1.8b4+
|
Details | Diff | Splinter Review |
218 bytes,
text/html
|
Details |
Steps to reproduce: 1) Load www.cbsnews.com 2) While it's loading, go to a different page. Chances are, you leak the world. The problem is that nsParser::Terminate doesn't work when we're waiting on a document.written <script> tag to finish loading because mParserContext->mPrevContext is not null. So we never call HTMLContentSink::DidBuildModel, and never break the document/sink/parser refcount cycles.
Reporter | ||
Comment 1•19 years ago
|
||
I think we should get this fixed for 1.8b4; it's a pretty big leak and very easy to hit.
Flags: blocking1.8b4?
Assignee | ||
Comment 3•19 years ago
|
||
This cleans up the parser contexts so that nsParser::DidBuildModel actually believes that we're done parsing the document.
Reporter | ||
Comment 4•19 years ago
|
||
Reporter | ||
Updated•19 years ago
|
Attachment #193462 -
Flags: review+
Assignee | ||
Updated•19 years ago
|
Attachment #193462 -
Flags: superreview?(jst)
Comment 5•19 years ago
|
||
Comment on attachment 193462 [details] [diff] [review] possible fix sr=jst
Attachment #193462 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Comment 6•19 years ago
|
||
Comment on attachment 193462 [details] [diff] [review] possible fix This patch is very safe (only changes our behavior when we're in this weird case) and fixes a rather large leak (parser + document + scanner + etc.).
Attachment #193462 -
Flags: approval1.8b4?
Assignee | ||
Comment 7•19 years ago
|
||
Fix checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Flags: blocking1.8b4? → blocking1.8b4+
Updated•19 years ago
|
Attachment #193462 -
Flags: approval1.8b4? → approval1.8b4+
You need to log in
before you can comment on or make changes to this bug.
Description
•