Closed
Bug 413125
Opened 17 years ago
Closed 17 years ago
Messages in hidden tabs break adoptNode wrapper forever
Categories
(Other Applications :: ChatZilla, defect)
Other Applications
ChatZilla
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bugzilla-mozilla-20000923, Assigned: bugzilla-mozilla-20000923)
References
Details
(Keywords: regression, Whiteboard: [cz-0.9.81])
Attachments
(1 file)
(deleted),
patch
|
Gijs
:
review+
|
Details | Diff | Splinter Review |
Summary of what I believe happens (not entirely verified yet):
- Hide a tab, which removes the <browser> and does removeChild on the
messages (<table>) to detach it from the document.
- Some time later (possibly not very long) the GC knocks, and recycles the
document object. This causes ownerDocument on messages and all its children
to become null (violation of the DOM spec).
- Next message for a hidden tab arrives, attempts to adopt into
messages.ownerDocument, but it is null and this causes an error.
- The error trips the code into making adoptNode a no-op.
We might be able to work around the bad DOM implementation by just not calling removeChild in cmdHideView, if this is enough to force Gecko into keeping the document around. Alternatively, we can try and force the new view into existence *before* adding the newly-arrived message.
Assignee | ||
Comment 1•17 years ago
|
||
I have just verified with my debug build that if no GC occurs between hiding and a message arriving, it is fine; if a GC does occur, it breaks.
Updated•17 years ago
|
Depends on: strongparent
Assignee | ||
Comment 2•17 years ago
|
||
This adopts the messages into a hidden document which we forever keep a reference to (until we close), which means the nodes are no longer at risk of having null ownerDocuments.
Assignee: rginda → silver
Status: NEW → ASSIGNED
Attachment #298106 -
Flags: review?(gijskruitbosch+bugs)
Comment 3•17 years ago
|
||
Comment on attachment 298106 [details] [diff] [review]
Avoid null ownerDocument by adopting into controlled hidden document
Don't you need to null client.hiddenDocument out at some point? (onUnload?)
With that, or an explanation, r=gijs
Attachment #298106 -
Flags: review?(gijskruitbosch+bugs) → review+
Assignee | ||
Comment 4•17 years ago
|
||
Checked in --> FIXED.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•17 years ago
|
Whiteboard: [cz-0.9.81]
You need to log in
before you can comment on or make changes to this bug.
Description
•