[webkit-dev] inconsistent refptr count between Frame and Document

Luke Kenneth Casson Leighton lkcl at lkcl.net
Fri Sep 19 04:20:11 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=20935

i've identified a number of areas where people are writing "FIXMEs"
and "TODOs" that are related to refcount inconsistency between Frame
and Document.  the key to the issue is, i believe, that it is
necessary to increase the refcount on all member objects which are
contained within an object.

in Document's case, that's m_frame, m_styleSheets and many other objects.

failure to observe the practice of increasing the parent's refcount
when a member object is referred to results in issues such as #20403,
at the very least.

it _may_ be that, due to the possibility of Document* being destroyed
_outside_ of the control of objects that have refs to it
(Document::detach()) - that this is the _only_ circumstance where this
is a problem - i damn well hope so because the design decisions that
need to be taken to solve this right across the board are pretty damn
tough ones.

it _may_ be that the problem is isolated to Document and the
interaction between Document and Frame.

i've outlined enough, here, and in the above bug-report, for other
people to be able to investigate this issue more thoroughly.  if
anyone has any questions, or requires clarification, please do contact
me (direct by email).

l.


More information about the webkit-dev mailing list