Closed
Bug 1504
Opened 26 years ago
Closed 26 years ago
ss:Memory leak of select element
Categories
(Core :: Layout, defect, P1)
Tracking
()
VERIFIED
FIXED
M1
People
(Reporter: troy, Assigned: karnaze)
Details
Here's some simple HTML that shows HTML select elements are leaked:
<HTML>
<BODY>
<form>
<SELECT NAME="city1">
<OPTION value="">Departing from:</OPTION>
</SELECT>
</FORM>
</BODY></HTML>
A dump of the content objects show that the ref counts of the FORM and SELECT
elements are high:
HTML refcount=3<
HEAD refcount=2<
>
BODY refcount=4<
Text refcount=3<\n>
FORM refcount=5<>
Text refcount=3<\n>
SELECT NAME=city1 refcount=7<
OPTION VALUE= refcount=3<
Text refcount=2<Departing from:>
>
>
Text refcount=3<\n>
Text refcount=3<\n\n\n>
>
>
Here's the Purify output that shows the HTML select element is leaked and
also it's child elements. I verified in the debugger that the content object
is leaked:
[I] MPK: Potential memory leak of 52 bytes from 1 block allocated in
NS_NewTextNode(nsIHTMLContent * *)
Distribution of potentially leaked blocks
Allocation location
new(UINT) [new.cpp:23]
NS_NewTextNode(nsIHTMLContent * *) [nsTextNode.cpp:90]
SinkContext::FlushText(int *) [nsHTMLContentSink.cpp:1160]
SinkContext::CloseContainer(nsIParserNode const&)
[nsHTMLContentSink.cpp:964]
HTMLContentSink::CloseContainer(nsIParserNode const&)
[nsHTMLContentSink.cpp:1721]
CNavDTD::CloseContainer(nsIParserNode const&,nsHTMLTag,int)
[CNavDTD.cpp:2841]
CNavDTD::CloseContainersTo(int,nsHTMLTag,int) [CNavDTD.cpp:2875]
CNavDTD::CloseContainersTo(nsHTMLTag,int) [CNavDTD.cpp:2896]
CNavDTD::HandleEndToken(CToken *) [CNavDTD.cpp:1001]
NavDispatchTokenHandler(CToken *,nsIDTD *) [CNavDTD.cpp:444]
[I] MPK: Potential memory leak of 184 bytes from 1 block allocated in
NS_NewHTMLSelectElement(nsIHTMLContent * *,nsIAtom *)
Distribution of potentially leaked blocks
Allocation location
new(UINT) [new.cpp:23]
NS_NewHTMLSelectElement(nsIHTMLContent * *,nsIAtom *)
[nsHTMLSelectElement.cpp:154]
MakeContentObject [nsHTMLContentSink.cpp:639]
CreateContentObject [nsHTMLContentSink.cpp:814]
SinkContext::OpenContainer(nsIParserNode const&)
[nsHTMLContentSink.cpp:924]
HTMLContentSink::OpenContainer(nsIParserNode const&)
[nsHTMLContentSink.cpp:1711]
CNavDTD::OpenContainer(nsIParserNode const&,int) [CNavDTD.cpp:2784]
CNavDTD::HandleDefaultStartToken(CToken *,nsHTMLTag,nsIParserNode&)
[CNavDTD.cpp:832]
CNavDTD::HandleStartToken(CToken *) [CNavDTD.cpp:919]
NavDispatchTokenHandler(CToken *,nsIDTD *) [CNavDTD.cpp:442]
Raising the priority to P1, because it turns out many of the top 100 sites
have select elements that are leaking, e.g., cnn.com, altavista.com, city.net
Severity: normal → major
Summary: Memory leak of select element → ss:Memory leak of select element
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 4•26 years ago
|
||
The destructors for nsHTMLSelectElement and nsHTMLFormElement are now being
called.
Assignee | ||
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•