Closed
Bug 476975
Opened 16 years ago
Closed 15 years ago
Crash running crashtests in [@ mozAutoDocUpdate ]
Categories
(Core :: DOM: Editor, defect, P2)
Tracking
()
RESOLVED
DUPLICATE
of bug 432114
People
(Reporter: mrbkap, Assigned: mrbkap)
Details
(Keywords: crash)
Crash Data
Attachments
(1 obsolete file)
While running the crashtest for bug 428844, I occasionally crash setting up the contenteditable style sheet on the transformed document because the original document gets GCed after its window's mDocument has been updated. Because of this, by the time it calls ChangeContentEditableCount (which ends up calling nsHTMLDocument::TearingDownEditor, which clears out the style sheet's mDocument member). One way to work around this would be to notify the original HTML document when it's about to be transformed by XSLT.
Assignee | ||
Comment 1•16 years ago
|
||
...by the time it calls ChangeContentEditableCount from UnbindToTree, we're unable to tell it to tear down the editor (the patch in bug 428844 made this not crash on the null pointer, but left the dangling pointer since nobody tells that document that the editor's gone).
Group: core-security
Assignee | ||
Comment 2•16 years ago
|
||
This should block -- at the very least it prevents me from running crashtests reliably and it is an exploitable crash.
Flags: blocking1.9.1?
Assignee | ||
Comment 3•16 years ago
|
||
Here's one way to fix the bug. I'm not sure if this could possibly result in us removing the given stylesheets on a document that's already being edited? I suppose I could add a check somewhere that we don't do that. peterv, what do you think?
Isn't this the bug you showed me where the fundamental problem is that editor is calling SetOwningDocument on a style sheet, but giving the style sheet a document that doesn't actually own the style sheet. (Could we fix this by making the document own the style sheet?)
Assignee | ||
Comment 5•16 years ago
|
||
(In reply to comment #4) > Isn't this the bug you showed me where the fundamental problem is that editor > is calling SetOwningDocument on a style sheet, Yes, it is. > (Could we fix this by > making the document own the style sheet?) Well, the document doesn't really own the stylesheet, the editor does. It only temporarily grants ownership to the document (and then we reuse the sheet for multiple documents). I suppose we could fix that by not reusing the sheet, but to be honest, that's more work than I wanted to do for this bug. The patch just makes sure we restore ownership back to the editor before the document goes away.
Is this related to bug 468353?
Assignee | ||
Comment 7•16 years ago
|
||
Comment on attachment 361689 [details] [diff] [review] patch v1 This doesn't actually fix the bug since by the time the destructor runs, we've already cleared the editing state off of the docshell.
Attachment #361689 -
Attachment is obsolete: true
Attachment #361689 -
Flags: review?(peterv)
Comment 8•15 years ago
|
||
It sounds like this bug may be fixed by my patch from bug 432114 comment 16. mrbkap, could you try that patch to see if it fixes your crash?
Updated•15 years ago
|
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P2
Whiteboard: [sg:investigate]
Updated•15 years ago
|
Flags: blocking1.9.1+ → blocking1.9.1?
Priority: P2 → --
Whiteboard: [sg:investigate] → [sg:critical?]
Updated•15 years ago
|
Priority: -- → P2
Updated•15 years ago
|
Flags: blocking1.9.1? → blocking1.9.1+
mrbkap, could you retest here? If it's fixed we should get it off the radar, if it's not we need to keep looking for a fix.
Whiteboard: [sg:critical?] → [sg:critical?][needs feedback]
Assignee | ||
Comment 10•15 years ago
|
||
I don't have time to retest right now, but the patch in that bug definitely fixes the problem that I was seeing.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Updated•15 years ago
|
Group: core-security
Updated•15 years ago
|
Whiteboard: [sg:critical?][needs feedback] → [sg:dupe 432114][needs feedback]
Comment 11•15 years ago
|
||
Why does this bug need feedback? This was already marked as a duplicate. If this still needs feedback, then it shouldn't be marked as a duplicate, should it?
Updated•15 years ago
|
Whiteboard: [sg:dupe 432114][needs feedback] → [sg:dupe 432114]
Severity: normal → critical
Keywords: crash
Summary: Crash running crashtests in [ @ mozAutoDocUpdate ] → Crash running crashtests in [@ mozAutoDocUpdate ]
Whiteboard: [sg:dupe 432114]
Updated•13 years ago
|
Crash Signature: [@ mozAutoDocUpdate ]
You need to log in
before you can comment on or make changes to this bug.
Description
•