Changes between Initial Version and Version 1 of Abandoned documents


Ignore:
Timestamp:
Aug 17, 2018 2:52:57 PM (6 years ago)
Author:
Simon Fraser
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Abandoned documents

    v1 v1  
     1= What is an abandoned document? =
     2
     3Abandoned documents are effectively leaked: they are Document objects which have never been destroyed, and persist after loading about:blank and clearing caches. This is probably because there's some object that is holding a reference to the Document object, possibly in the GC heap, or via a retain cycle (often involving Nodes in the document).
     4
     5All documents are referenced by Document::allDocumentsMap(), so they are not leaked in the sense that the 'leaks' tool doesn't show them.
     6
     7= Why are layout test results showing me a list of abandoned documents? =
     8
     9Because leaked documents usually entrain a lot of other objects, which can use lots of memory (e.g. via entries in the memory cache). Leaking documents is bad because it will cause ever-increasing memory use as the user browses. See [https://bugs.webkit.org/show_bug.cgi?id=186214]
     10
     11= What should I do if see a new case of document abandonment? =
     12
     13If you made a code change that is causing a test to newly show that a document is leaked, it probably means you have a coding bug that is triggered a leak or (more likely) a reference cycle. You need to resolve this before committing.