Closed
Bug 294274
Opened 20 years ago
Closed 20 years ago
[FIXr]Memory leak if content sink appends script to node not in document
Categories
(Core :: DOM: Core & HTML, defect, P1)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.8beta3
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Keywords: helpwanted)
Attachments
(4 files, 3 obsolete files)
|
336 bytes,
text/html
|
Details | |
|
259 bytes,
application/xml
|
Details | |
|
170 bytes,
application/xml
|
Details | |
|
14.68 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
chofmann
:
approval1.8b3+
|
Details | Diff | Splinter Review |
See the test page in bug 292033. I'll also attach a minimal-ish testcase. We
never stop the throbber, and leak the document...
| Assignee | ||
Comment 1•20 years ago
|
||
| Assignee | ||
Comment 2•20 years ago
|
||
Attachment #183657 -
Flags: superreview?(peterv)
Attachment #183657 -
Flags: review?(bugmail)
| Assignee | ||
Updated•20 years ago
|
Priority: -- → P1
Summary: Memory leak if content sink appends script to node not in document → [FIx]Memory leak if content sink appends script to node not in document
Target Milestone: --- → mozilla1.8beta2
Comment on attachment 183657 [details] [diff] [review]
Proposed patch
won't the xml sink need the same fix? As should the xslt output handler.
Attachment #183657 -
Flags: review?(bugmail) → review+
opps, didn't mean to mark that r+ just yet. Lets just say it's an r+ pending an
answer to that question :)
| Assignee | ||
Comment 5•20 years ago
|
||
ML will need a similar fix, though it's a bit more work there because we don't
really have the parent node at the place where we currently decide to block the
parser.... I'm not quite sure what the best approach here is.
For XSLT, I really don't know what the right approach is; help there would be
much appreciated.
IMHO you can just kill ProcessEndSCRIPTTag. Then forward |parent| to
CloseElement and you should be good to go. Just keep in mind that parent can be
null when script is the root element.
For XSLT the class you want is txMozillaXMLOutput. Check if mCurrentNode ==
mNonAddedNode and then the parent is mNonAddedParent. You'll have to add this
code twice, once for svg-script (in endElement) and once for html (in
endHTMLElement)
| Assignee | ||
Comment 7•20 years ago
|
||
> For XSLT the class you want is txMozillaXMLOutput. Check if mCurrentNode ==
> mNonAddedNode and then the parent is mNonAddedParent.
I don't see how that helps.... Unless this class is listening to DOM mutations
and updating those members as needed?
| Assignee | ||
Comment 8•20 years ago
|
||
This fixes the throbbing for XML, but it still leaks.. no idea why.
And then there's XUL, of course... :(
Attachment #183664 -
Attachment is obsolete: true
| Assignee | ||
Comment 9•20 years ago
|
||
Ah, with XML I leak even if there is no second script. Any idea why?
| Assignee | ||
Comment 10•20 years ago
|
||
| Assignee | ||
Comment 11•20 years ago
|
||
Not going to have time to really debug this anytime soon....
Assignee: bzbarsky → general
OS: Linux → All
Priority: P1 → --
Hardware: PC → All
Target Milestone: mozilla1.8beta2 → ---
| Assignee | ||
Updated•20 years ago
|
Summary: [FIx]Memory leak if content sink appends script to node not in document → Memory leak if content sink appends script to node not in document
| Assignee | ||
Comment 12•20 years ago
|
||
Attachment #183657 -
Attachment is obsolete: true
Attachment #183671 -
Attachment is obsolete: true
Attachment #183673 -
Attachment is obsolete: true
| Assignee | ||
Updated•20 years ago
|
Attachment #183664 -
Attachment is obsolete: false
| Assignee | ||
Updated•20 years ago
|
Attachment #183657 -
Flags: superreview?(peterv) → superreview-
| Assignee | ||
Updated•20 years ago
|
Keywords: helpwanted
(In reply to comment #7)
> > For XSLT the class you want is txMozillaXMLOutput. Check if mCurrentNode ==
> > mNonAddedNode and then the parent is mNonAddedParent.
>
> I don't see how that helps.... Unless this class is listening to DOM mutations
> and updating those members as needed?
I mean that we should check if mNonAddedParent->GetCurrentDoc() returns the
appropriate document.
| Assignee | ||
Comment 14•20 years ago
|
||
So for XSLT the script should be added to the notifier if:
1) mCurrentNode != mNonAddedNode or
2) mNonAddedParent is in the right document,
right?
Any testcases I can use to test what effect that has?
| Assignee | ||
Comment 15•20 years ago
|
||
The PopContent() changes in the XML fragment sink are what fix the XML leaks.
The XSLT changes are untested; if you have tests you want me to run, please let
me know...
Attachment #183695 -
Flags: superreview?(peterv)
Attachment #183695 -
Flags: review?(bugmail)
| Assignee | ||
Comment 16•20 years ago
|
||
sicking, peterv, could we possibly get this reviewed? I've got less than a week
left to land it... and jst's already pretty swamped with review requests.
Assignee: general → bzbarsky
Priority: -- → P1
Summary: Memory leak if content sink appends script to node not in document → [FIX]Memory leak if content sink appends script to node not in document
Target Milestone: --- → mozilla1.8beta3
Comment 17•20 years ago
|
||
Comment on attachment 183695 [details] [diff] [review]
Patch that fixes the XML leaks
As discussed, let's split off the transformiix stuff.
Attachment #183695 -
Flags: superreview?(peterv)
Attachment #183695 -
Flags: superreview+
Attachment #183695 -
Flags: review?(bugmail)
Attachment #183695 -
Flags: review+
| Assignee | ||
Comment 18•20 years ago
|
||
Comment on attachment 183695 [details] [diff] [review]
Patch that fixes the XML leaks
Requesting approval for this memory leak fix (just the HTML/XML parts).
Attachment #183695 -
Flags: approval1.8b3?
Yeah, those are the only parts i'm unsure about too, i'd already reviewed the rest.
| Assignee | ||
Updated•20 years ago
|
Summary: [FIX]Memory leak if content sink appends script to node not in document → [FIXr]Memory leak if content sink appends script to node not in document
Comment 20•20 years ago
|
||
Comment on attachment 183695 [details] [diff] [review]
Patch that fixes the XML leaks
a=chofmann
Attachment #183695 -
Flags: approval1.8b3? → approval1.8b3+
| Assignee | ||
Comment 21•20 years ago
|
||
Filed bug 296334 for the XSLT issue; checked in the rest for 1.8b3.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
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
•