Closed
Bug 161304
Opened 22 years ago
Closed 22 years ago
Deletion of HTML node causes Mozilla crash
Categories
(Core :: CSS Parsing and Computation, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla1.3beta
People
(Reporter: owen.marshall+bmo, Assigned: dbaron)
References
()
Details
(Keywords: crash, testcase, Whiteboard: [patch])
Attachments
(1 file)
|
6.53 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.1b) Gecko/20020805 BuildID: 2002080508 The summary says it all. Reproducible: Always Steps to Reproduce: 1.Load the test page, and click "test node deletion" Actual Results: Mozilla crashes in GKCONTENT.DLL Expected Results: Mozilla should have handled this gracefully, either returning an error message (if needed), or by displaying a blank page (as IE does, not sure if this is proper). If someone wants to refresh my memory on how to send in a talkback ID, I can send it in.
| Reporter | ||
Comment 1•22 years ago
|
||
Additional Note: Removing all children of document also causes a crash. (see http://www.people.fas.harvard.edu/~dbaron/dom/test/removing-html/document_ch)
Talkback for first problem using BuildID 2002080508 on Win2K SP2 is TB9034733X Once u have submitted talkback report, go into bin\components and run talkback.exe to find the incident ID Adding crash keyword
Comment 4•22 years ago
|
||
We crash due to an UndisplayedNode holding a weak pointer to a content object
that has already been deleted.
Here's the stack for the crash:
StyleSetImpl::ResolveStyleFor(nsIPresContext * 0x03590650, nsIContent *
0x0331e7f8, nsIStyleContext * 0x0356aea8) line 1104 + 11 bytes
nsPresContext::ResolveStyleContextFor(nsPresContext * const 0x03590650,
nsIContent * 0x0331e7f8, nsIStyleContext * 0x0356aea8, nsIStyleContext * *
0x0012c580) line 926 + 37 bytes
FrameManager::ReResolveStyleContext(nsIPresContext * 0x03590650, nsIFrame *
0x033e228c, nsIContent * 0x0347eb58, int -1, nsIAtom * 0x00000000,
nsStyleChangeList & {...}, int 0, int & 0) line 1791
FrameManager::ReResolveStyleContext(nsIPresContext * 0x03590650, nsIFrame *
0x033e1e74, nsIContent * 0x00000000, int -1, nsIAtom * 0x00000000,
nsStyleChangeList & {...}, int 0, int & 0) line 1874
FrameManager::ReResolveStyleContext(nsIPresContext * 0x03590650, nsIFrame *
0x033e1c4c, nsIContent * 0x00000000, int -1, nsIAtom * 0x00000000,
nsStyleChangeList & {...}, int 0, int & 0) line 1874
FrameManager::ComputeStyleChangeFor(FrameManager * const 0x0332dd80,
nsIPresContext * 0x03590650, nsIFrame * 0x033e1c4c, int -1, nsIAtom *
0x00000000, nsStyleChangeList & {...}, int 0, int & 0) line 1916
PresShell::ReconstructStyleData(PresShell * const 0x033386d0, int 1) line 5540
PresShell::StyleSheetRemoved(PresShell * const 0x033386d8, nsIDocument *
0x032da8e8, nsIStyleSheet * 0x0165ce98) line 5573
nsDocument::RemoveStyleSheet(nsIStyleSheet * 0x0165ce98) line 1531
nsStyleLinkElement::UpdateStyleSheet(nsStyleLinkElement * const 0x03376c7c,
nsIDocument * 0x032da8e8, int -1) line 182
nsHTMLLinkElement::SetDocument(nsHTMLLinkElement * const 0x03376c50, nsIDocument
* 0x00000000, int 1, int 1) line 110
nsGenericElement::SetDocumentInChildrenOf(nsIContent * 0x03468220, nsIDocument *
0x00000000, int 1) line 1735
nsGenericElement::SetDocument(nsGenericElement * const 0x03468220, nsIDocument *
0x00000000, int 1, int 1) line 1797 + 17 bytes
nsGenericHTMLElement::SetDocument(nsGenericHTMLElement * const 0x03468220,
nsIDocument * 0x00000000, int 1, int 1) line 1282 + 21 bytes
nsGenericElement::SetDocumentInChildrenOf(nsIContent * 0x0347eb58, nsIDocument *
0x00000000, int 1) line 1735
nsGenericElement::SetDocument(nsGenericElement * const 0x0347eb58, nsIDocument *
0x00000000, int 1, int 1) line 1797 + 17 bytes
nsGenericHTMLElement::SetDocument(nsGenericHTMLElement * const 0x0347eb58,
nsIDocument * 0x00000000, int 1, int 1) line 1282 + 21 bytes
nsDocument::RemoveChild(nsDocument * const 0x032da8ec, nsIDOMNode * 0x0347eb7c,
nsIDOMNode * * 0x0012d348) line 3329
nsHTMLDocument::RemoveChild(nsHTMLDocument * const 0x032da8ec, nsIDOMNode *
0x0347eb7c, nsIDOMNode * * 0x0012d348) line 1735
Over to style system for further investigation.Assignee: jst → dbaron
Component: DOM Core → Style System
QA Contact: stummala → ian
Tested 1st problem on Linux BuildID 2002061014 on RH7.3 and crashes that too. Talkback ID TB9035125Q Setting OS to all
OS: Windows ME → All
| Reporter | ||
Comment 6•22 years ago
|
||
Still in build 2002082704. *ping* =)
| Assignee | ||
Comment 7•22 years ago
|
||
OK, I think I'm going to make the UndisplayedNode objects hold owning pointers to content nodes, just like frames do (and then remove that other hack to clear the undisplayed map, which I'll have to find). That said, this won't necessarily happen immediately.
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.2beta
| Assignee | ||
Updated•22 years ago
|
Target Milestone: mozilla1.2beta → Future
Comment 8•22 years ago
|
||
as per comment 1 : testcase at http://www.people.fas.harvard.edu/~dbaron/dom/test/removing-html/document_ch
Keywords: testcase
Comment 9•22 years ago
|
||
*** Bug 189303 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 10•22 years ago
|
||
I need to retest bug 145737.
| Assignee | ||
Comment 11•22 years ago
|
||
This fixes the testcase, and I retested the testcase for bug 145737. (I was using a build with the memset in nsPresShell::FreeFrame.)
| Assignee | ||
Updated•22 years ago
|
Attachment #111944 -
Flags: superreview?(bzbarsky)
Attachment #111944 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•22 years ago
|
Whiteboard: [patch]
Target Milestone: Future → mozilla1.3beta
Comment 12•22 years ago
|
||
Comment on attachment 111944 [details] [diff] [review] patch looks good.
Attachment #111944 -
Flags: superreview?(bzbarsky)
Attachment #111944 -
Flags: superreview+
Attachment #111944 -
Flags: review?(bzbarsky)
Attachment #111944 -
Flags: review+
| Assignee | ||
Comment 13•22 years ago
|
||
Fix checked in to trunk, 2003-01-20 16:47 PST.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 14•22 years ago
|
||
Verified. Mozilla no longer crashes on those testcases. Thanks, David =)
Status: RESOLVED → VERIFIED
| Assignee | ||
Updated•21 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•